»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋
Set by Zoffix on 25 July 2018.
netrino m: class A { has @.xs }; my %args = xs => [1,2,3]; say '(1) ', A.new(xs => [1, 2, 3]); say '(2) ', A.new(|%args) 00:02
evalable6 (1) A.new(xs => [1, 2, 3])
(2) A.new(xs => [[1, 2, 3],])
netrino Is it possible to make unpacking in (2) to yield the same result as in (1)?
00:02 [particle]1 joined 00:04 [particle] left 00:06 lichtkind_ joined 00:09 lichtkind left 00:11 dolmen left
AlexDaniel netrino: which part are we allowed to tweak? :) 00:20
netrino: for example, we can try `xs => |[1,2,3]` 00:21
00:22 wildtrees left
AlexDaniel hm that doesn't really work 00:22
netrino The A.new(|%args) part, preferably :D 00:24
00:25 [particle] joined
AlexDaniel netrino: but I disagree :D 00:25
for example
m: class A { has @.xs }; my $capture = \(xs => (1,2,3)); say ‘(1) ’, A.new(xs => [1, 2, 3]); say ‘(2) ’, A.new(|$capture)
evalable6 (1) A.new(xs => [1, 2, 3])
(2) A.new(xs => [1, 2, 3])
00:25 [particle]1 left
netrino :) 00:25
AlexDaniel netrino: ok, but may I ask why do you need that? 00:27
netrino I'll expand on the use-case, i'm looking into this awesome API::Discord package and it has magic class construction from a Hash. But for arrays i have to supply it separately, which is fine, but was wondering if there any way to make it work
AlexDaniel that was quick :)
netrino :D
AlexDaniel so it has magic class construction from hashes but not from captures? 00:28
netrino It takes the parsed into hash json and passes it to a .new
basically
But if json has an array, it doesn't quite work 00:29
AlexDaniel hmm weird 00:38
m: class A { has @.xs }; my $c = \(xs => (1,2,3)); my %args = xs => [1,2,3]; my $z = \(|eager flat %args); say $z; say $c; say A.new(|$c); say A.new(|$z)'
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/m2gFCiknhD
Two ter…
AlexDaniel m: class A { has @.xs }; my $c = \(xs => (1,2,3)); my %args = xs => [1,2,3]; my $z = \(|eager flat %args); say $z; say $c; say A.new(|$c); say A.new(|$z)
evalable6 (exit code 1) \(:xs($[1, 2, 3]))
Default constructor for 'A' only takes named arguments
in block <unit> at /tmp/p0ebwXv5qy line 1

\(:xs((1, 2, 3)))
A.new(xs => [1, 2, 3])
AlexDaniel, Full output: gist.github.com/fdb8e601753bb0f37c...54f22ebb5b
AlexDaniel I don't really see a difference between the two 00:39
it can be golfed I'm sure, but dd output looks kinda identical, so what's the issue?
00:40 [particle]1 joined
netrino In the sample i've provided? 00:40
00:41 [particle] left
netrino well, in first case xs is plain array, in second is an array of arrays 00:41
AlexDaniel no, in my example 00:45
lucasb m: class A { has @.xs }; my $c = \(xs => [1,2,3]); say A.new(|$c.hash) 00:46
evalable6 A.new(xs => [1, 2, 3])
lucasb m: class A { has @.xs }; my $c = \(xs => [1,2,3]); say A.new(|$c.Hash)
evalable6 A.new(xs => [[1, 2, 3],])
netrino Oh, you mean with captures?
lucasb (I was just testing) 00:47
netrino I already have a hash, i only need to figure out how to unpack it properly, if that is possible. Constructing a capture from a hash just to work this around doesn't seem reasonable
lucasb indeed, trick problem
AlexDaniel lucasb: I actually don't understand why it works the way it does 00:48
00:49 [particle]1 left, [particle] joined
AlexDaniel netrino: it's weird, it must be doable but I tried a bunch of stuff and none of it works :S 00:50
lucasb m: class A { has @.xs }; my %args = xs => [1,2,3]; say '(1) ', A.new(xs => [1, 2, 3]); say '(2) ', A.new(|%args.Map)
evalable6 (1) A.new(xs => [1, 2, 3])
(2) A.new(xs => [[1, 2, 3],])
lucasb wait, that is different in 2019.03 haha 00:51
AlexDaniel huh?
6c: class A { has @.xs }; my %args = xs => [1,2,3]; say '(1) ', A.new(xs => [1, 2, 3]); say '(2) ', A.new(|%args.Map)
netrino AlexDaniel: yeah, thanks! :)
committable6 AlexDaniel, gist.github.com/1f61397f6f910bdc59...bcdbaa494d
AlexDaniel netrino: actually, look ↑ 00:52
lucasb so is different in HEAD?
AlexDaniel netrino: I think you discovered a bug…
netrino Yep, just checked it out, .Map does work!
AlexDaniel yeah it's different on HEAD
let's bisect
bisect: old=2019.07.1 class A { has @.xs }; my %args = xs => [1,2,3]; say '(1) ', A.new(xs => [1, 2, 3]); say '(2) ', A.new(|%args.Map)
bisectable6 AlexDaniel, Bisecting by output (old=2019.07.1 new=9d1505d) because on both starting points the exit code is 0
netrino Awesome, thanks, guys :) 00:53
bisectable6 AlexDaniel, bisect log: gist.github.com/15d7c7a23df88fc70c...6804a799e5
AlexDaniel, (2019-07-24) github.com/rakudo/rakudo/commit/2e...d8eb3b9fee
lucasb cool netrino++ AlexDaniel++ :)
AlexDaniel netrino: can you file a bug report?
I think the commit in question does something right but it breaks this stuff, and it shouldn't
netrino AlexDaniel: sure, where to? 00:54
AlexDaniel netrino: github.com/rakudo/rakudo/issues
I wonder what was the justification for fixing it the last time 00:56
bisect: 2016.06,2016.07.1 class A { has @.xs }; my %args = xs => [1,2,3]; say '(1) ', A.new(xs => [1, 2, 3]); say '(2) ', A.new(|%args.Map)
bisectable6 AlexDaniel, Using old=2016.06 new=2016.07.1 in an attempt to do what you mean
AlexDaniel, Bisecting by output (old=2016.06 new=2016.07.1) because on both starting points the exit code is 0
AlexDaniel, bisect log: gist.github.com/67a51db4eacc14c868...b819c5fcc6 00:57
AlexDaniel, (2016-06-25) github.com/rakudo/rakudo/commit/9b...514e3c90ac
00:57 [particle] left
AlexDaniel hmm 00:57
00:58 vrurg joined 01:07 molaf left 01:10 [particle] joined
AlexDaniel netrino: thank you! 01:12
01:14 [particle] left
AlexDaniel netrino: I'll make sure we do something about this before the next release 01:14
netrino Thanks for helping me out :)
01:14 [particle] joined
AlexDaniel just wow code-golf.io/users/primo-ppcg 01:17
also they figured out some trick that saves exactly one character in many solutions 01:18
I wonder what it is
Grinnz trailing newline? 01:19
01:20 molaf joined
AlexDaniel Grinnz: that'd be too easy. This is what we know: github.com/AlexDaniel/raku-golf-cheatsheet 01:21
01:22 mowcat left 01:28 [particle] left 01:34 [particle] joined 01:39 [particle]1 joined 01:40 [particle] left 01:43 epony left 02:04 Manifest0 left, Manifest0 joined 02:10 jaldhar_ joined 02:11 [particle] joined, Cabanossi left, [particle]1 left, Cabanossi joined 02:22 [particle]1 joined 02:23 [particle] left, vike left
cpan-p6 New module released to CPAN! Tomty (0.0.4) by 03MELEZHIK 02:41
02:59 netrino left 03:00 lucasb left, epony joined 03:21 pycer left 03:24 stux|RC-- left, stux|RC joined 03:26 astronavt left 03:28 astronavt joined, astronavt left, irced joined 03:29 astronavt joined
Elronnd can I forcibly give nativecall a filename? I have a library called 'port', with no file extension, but when I say is native("port"), it complains that it can't find any libport.so 03:30
03:31 astronavt left, astronavt joined
irced thinks. 03:32
03:32 astronavt left
irced I am looking for the native function signature to see if i can offer an suggestions, but am not seeing it. anyway, perhaps there is an overloaded signature that accepts a file handle or path object ? 03:33
03:34 astronavt joined
Elronnd actually, scratch that. I realised that that wouldn't do what I want it to 03:34
thanks for the idea, though :)
irced err, "function" as in method call as in BUILD call it would appear
ok, cool
03:35 astronavt left
Elronnd (I'm figuring out how to embed p6 in c, for real this time) 03:36
irced head spins.
Elronnd github.com/Elronnd/libport this was take 1, but it was bad 03:37
irced raises an eyebrow.
ur serious
Elronnd yes
irced 😃awesome
Elronnd partly based off of github.com/niner/Inline-Perl6/blob...r/Perl6.xs 03:38
may put it into my video game engine if it's a success
03:38 [particle]1 left
Elronnd right now struggling with segfaults 03:38
03:39 [particle] joined
irced I am still learning the perl6 language but i know c tho i haven't even learned native calls yet. maybe someday I can help as I like the c language very much and perl6 ain't too shabby 03:39
Elronnd once it actually does anything useful, I'll shoot you a link 03:40
irced thanks 😃
sortiz Elronnd: The is-native trait accepts an IO::Path, try "is native('port'.IO)", just be sure that port is a shared library 03:41
irced woop 03:42
03:43 astronavt joined
Elronnd sortiz: thanks 03:44
(might end up needing that after all, because of nativecall shenanigans)
03:45 astronavt left, astronavt joined
sortiz Check also that in the IO::Path case, the loader searchs for an absolute path. 03:46
03:47 astronavt left
irced iow, add .resolve 03:47
Elronnd *woo*! 03:48
got information back from p6 to c
irced holds his breath for the end of the world.
irced sighs in relief.
nice!
Elronnd thanks! 03:49
03:56 sena_kun joined, [particle]1 joined
cpan-p6 New module released to CPAN! Constants::Sys::Socket (0.0.2) by 03GARLANDG 03:58
03:58 hythm joined 03:59 [particle] left
hythm o/ How to suppress all stacktrace when throwing exceptio, for example "die "died" prints "died" only without the rest of the stacktrace? 04:00
m: die 'died' 04:01
evalable6 (exit code 1) died
in block <unit> at /tmp/cz0_IxPyOg line 1
Elronnd w00000000 04:03
Elronnd has eval
irced lights some fireworks. 04:11
irced lights an m80 too close and loses two fingers with a loud bang. 04:12
Elronnd makes irced a prosthetic finger
irced hythm: are you CATCHing the exception ? 04:13
hythm: if so, you automatically suppress the trace or optionally print it.
04:14 astronavt joined
irced thanks dude always good to have a friend with a 3d printer and prosthetic algos 04:14
Xliff . 04:15
Elronnd :3
hythm irced: thanks, I was CATCHing without using default {}, works now 04:17
irced hthm: try catching either default or X::AdHoc anywhere beneath the stack but in try block
hythm: righto
hythm m: die "died"; CATCH { .message.say }
evalable6 (exit code 1) died
died
in block <unit> at /tmp/RuXyPwtk8j line 1
hythm m: die "died"; CATCH { default { .message.say } } 04:18
evalable6 died
irced m: try die "died"; CATCH { when X::AdHoc { say "and does not want to be resurrected" } } 04:19
evalable6
irced m: try { die "died"; CATCH { when X::AdHoc { say "and does not want to be resurrected" } } }
evalable6 and does not want to be resurrected
irced m: try { die "died"; CATCH { when X::AdHoc { .backtrace.print } } } 04:22
evalable6 in block <unit> at /tmp/IbQU_m2qou line 1
hythm irced, what If I wanted the program to exit after the exception is thrown, I need to add `exit` in the CATCH block? this is the only way? 04:24
basically I want the program to exit right after the exception (which prints the message only without the backtrace) 04:25
irced hythm: great question. it begs the question, what code runs next. personally, i've historically swept that question under the rug and used exit.
hythm: so, unless any1 here disagrees, exit is the way to go if there's nothing more to do. 04:26
hythm got it, thank you
irced hth 04:29
Elronnd how to nativecast from an integer to a pointer? 04:39
sortiz Elronnd: Don't need to. The constructor Pointer.new(Int) works. 04:41
04:43 hythm left, sena_kun left
cpan-p6 New module released to CPAN! MessageStream (0.0.1) by 03MLDEVINE 04:44
Elronnd sortiz: ahh, ok, cool 04:59
05:09 sauvin joined 05:10 vike joined
Elronnd docs say that lexical scope's namespace is immutable. How does the repl work, then, how can I add symbols there? 05:19
can I make a namespace variable for use with EVAL, so that variables declared with EVAL will persist across evaluations, even if they're not accessible from outside? 05:21
I tried passing a PseudoStash, and a hash, but none of those seemed to have any effect 05:35
05:39 [particle] joined 05:41 [particle]1 left 05:42 jmerelo joined 05:43 antoniogamiz10 joined
jmerelo hey, antoniogamiz10 05:43
antoniogamiz10 o/
05:44 domidumont joined 05:50 sortiz left 05:57 irced left 06:04 abraxxa joined 06:07 wamba joined 06:09 abraxxa left 06:10 abraxxa joined 06:13 domidumont left 06:30 jmerelo left 06:33 Xliff left
antoniogamiz10 what's the correct of using string interpolation in q:to/END/; END? 06:41
m: my $a = "Hi"; say q:to/END/; {$a} END
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/DxS8BEPzUq
Strange…
antoniogamiz10, Full output: gist.github.com/45dddeb1f41aadb3bd...dd0361966d
CIAvash using qq instead of q? or using \qq[$a] inside q 06:51
antoniogamiz10 ah thanks :) 06:52
07:03 dolmen joined 07:14 dolmen left 07:23 success joined, success is now known as Guest13777 07:26 robertle joined 07:37 dakkar joined 07:39 aborazmeh joined, aborazmeh left, aborazmeh joined 07:42 rabbit0 joined 07:46 antoniogamiz10 left 07:47 domidumont joined 07:51 dolmen joined 07:58 kktt007 joined 08:01 |oLa| joined, |oLa| left 08:10 khisanth_ left 08:11 dolmen left 08:12 dolmen joined 08:15 |oLa| joined
kktt007 Are there any examples for practice. "rosettacode.org/wiki/Category:Perl_6" is difficult for me. 08:15
Elronnd kktt007: you can try doing project euler 08:17
kktt007 Are there simple examples i could learn. I can't do project euler. I am a newbie. 08:20
Elronnd ah--hmmm 08:21
let me think 08:22
kktt007 ok. Thank you in advanced.
08:24 khisanth_ joined, pecastro joined
Elronnd kktt007: ah here, these look pretty good www.codeabbey.com/index/task_list 08:25
kktt007 In fact. I want Perl6 solve a question.
{ "title": "qq.com", "active": true, "pattern": "*qq.com*", "type": 1, "protocols": 1 }
Elronnd k 08:26
gah
what is that?
kktt007: also, if you have any interest in web development, check out cro.services/. Is nice 08:27
I think they also make an ide
kktt007 I want to solve this questions with Perl6. I heard Perl6 is good at it. So i choose Perl6. 08:29
img.vim-cn.com/af/b7bde66b9a3a4eed...0e3068.jpg
Elronnd that's not a question. That's some json
kktt007 I want to add the all the websites to above
If i add it manual. I think i will crazy. So i want Perl6 help me solve the question. 08:30
This json is exported from Foxyproxy. 08:31
Elronnd so you want to...generate a json file that has { "title": "<website>", "active": true, "pattern": "*<website>*", "type": 1, "protocols": 1 }, for every website?
why?
(also, that's not something perl6 is particularly better than anything else at. Not that perl6 is bad at it, it's just not a Hard task) 08:32
kktt007 img.vim-cn.com/0f/654ea59e5173c67b...4e2efb.jpg
Yes. i just want generate a json for every website i need. Due to "en.wikipedia.org/wiki/Great_Firewall" 08:34
Leaning english, learning Perl6, learning vim, together. Solve my question, improve my life. Haha 08:35
08:35 rindolf joined
kktt007 I think other program is to difficult for me. Maybe Perl is good at solve text i think. 08:36
08:38 daxim left
kktt007 Could you give me some suggestions to solve it? Dear Elronnd. 08:41
moritz use a JSON parser like JSON::Tiny or JSON::Fast to read the data structure 08:44
and then use an HTTP client like Cro or HTTP::UserAgent to fetch the pages
though from a purely practical standpoint, today I'd use the command line with "jq" to extract the data, and then a shell loop with curl or wget to actually fetch the stuff
08:45 daxim joined 08:46 dogbert17 left
kktt007 emm. could understand. 08:47
Couldn't understand.
moritz which part?
kktt007 Could you please record a video for demo. 08:49
"an HTTP client like Cro or HTTP::UserAgent to fetch the pages" and "jq" 08:50
08:53 wamba left
holyghost I've started code for a cell system in perl6, later on there will be time-dependant noise-reduction in e.g. the mutation rate. The code is on Xliff's server 08:55
08:58 sena_kun joined
holyghost The chaos in the cell systems' mutate and crossover time and rate will be calcualted with statistics 08:58
chaos theoretical statistics
There's mutation and crossover in the code, but I need to read more on the chaos theory for cells' meiosis and mitosis 08:59
08:59 kktt007 left 09:01 wamba joined 09:04 rabbit0 left 09:17 daxim left 09:18 daxim joined 09:31 zakharyas joined 09:32 kktt joined 09:36 Black_Ribbon left 09:38 pat_js joined 09:40 pilne left 09:50 zakharyas left 09:59 aborazmeh left 10:00 domidumont left 10:25 zakharyas joined
kawaii Is it permitted to use non-standard characters in module namespaces? 10:27
i.e..... emojis?
tadzik what happens if you try? ;) 10:28
kawaii I'm typing from my phone right now just theorising it would probably work :) 10:30
tadzik :) 10:31
m: unit module Acme::( ͡° ͜ʖ ͡°);
evalable6 (exit code 1) ===SORRY!===
Name Acme:: ends with '::' and cannot be used as a package name
tadzik :(
kawaii Rakudo compiles on ARM doesn't it? I'm tempted to install it on my Android
m: unit module Test::🥳; 10:32
evalable6 (exit code 1) ===SORRY!===
Name Test:: ends with '::' and cannot be used as a package name
kawaii :(
seems like a bug that should be a feature 10:33
we can use emojis in function names, I've done that before
modules too pls :(
10:34 satori__ left
jnthn m: unit module Acme::('( ͡° ͜ʖ ͡°)') 10:39
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/KN6HMKC2M9
Unable …
10:40
jnthn, Full output: gist.github.com/03f8ed1752ffa90166...3591471a02
10:40 dolmen left
El_Che kawaii: it does, but iirc without jit 10:43
timotimo that's right, we don't have a jit compiler for arm ISA yet 10:44
really only x86_64, because that's comparatively easy; so many registers to use!
the dynamic specializer, which many other systems would consider to be part of their JIT, is active on arm, though 10:45
that already gives good speed-ups in many cases
10:46 molaf left 10:59 molaf joined
holyghost I've done the cell system for a Human, I would have to the several types of cells for a Human being. the code is on Xliff's server. 11:05
11:05 mowcat joined
holyghost It's somewhat ALife now 11:05
11:09 netrino joined 11:34 dolmen joined 11:35 aborazmeh joined, aborazmeh left, aborazmeh joined, jmerelo joined 11:41 zakharyas left 11:48 domidumont joined, domidumont left 11:49 domidumont joined 11:50 pmurias joined 11:54 jmerelo left 11:56 lucasb joined 12:01 Doc_Holliwood joined
Doc_Holliwood Soooooo 12:01
I have just revived an old thread on SO. In my answer I am using .hyper stackoverflow.com/questions/520823...l-approach 12:02
I just changed that to .race, expecting file 4 to be done first in a race, why isn't it? 12:03
12:03 Guest15407 joined
Doc_Holliwood i get the same output for .race and .hyper. 12:03
timotimo you're putting the .hyper after the .map? 12:04
Doc_Holliwood tried both ways
timotimo i think the inside of the for loop is probably what blocks
Doc_Holliwood makes no difference 12:05
timotimo you'll need a "hyper for" or "race for"
for loops without hyper or race prefix don't parallelize, because "for" is normally expected to be serial execution, and just by something returning a HyperSeq unexpectedly that can change and bite you in the butt with accessing lexical variables outside of the loop body 12:06
Doc_Holliwood ty, I just tried that. Same output. Still linear
12:11 dolmen left 12:15 dolmen joined
SmokeMachine m: try { die "died"; CATCH { .^name.say } } 12:20
evalable6 (exit code 1) X::AdHoc
died
in block <unit> at /tmp/WhmFhww0Ux line 1
SmokeMachine m: die "died"; CATCH { when X::AdHoc { say "and does not want to be resurrected" } } 12:21
evalable6 and does not want to be resurrected
SmokeMachine m: die "died"; CATCH { when X::AdHoc { say "{ .message } and does not want to be resurrected" } } 12:23
evalable6 died and does not want to be resurrected
12:24 dolmen left
timotimo oh 12:29
Doc_Holliwood: the default batch size for hyper is too large for your use case
try .hyper(batch => 1)
SmokeMachine m: say to-json <a b c d e>.map({ %(:title($_), :active, :pattern("*$_*"), :1type, :1protocols) }).Hash
12:29 dolmen joined
evalable6 {
"active": true,
"type": 1,
"protocols": 1,
"pattern": "*e*",
"title": "e"
}
Sa…
12:29
SmokeMachine, Full output: gist.github.com/401fa8edea40e269a8...c329ac4ef2
12:30 dolmen left
SmokeMachine m: use JSON::Fast; say to-json <a b c d e>.map({ %(:title($_), :active, :pattern("*$_*"), :1type, :1protocols) }).Hash 12:30
evalable6 (exit code 1) ===SORRY!===
Could not find JSON::Fast at line 1 in:
file#/home/bisectab…
SmokeMachine, Full output: gist.github.com/493205686f02e762dc...6621f87811
12:31 pmurias left, kktt left 12:32 pmurias joined 12:34 dolmen joined 12:35 dolmen left 12:36 epony left
Doc_Holliwood timotimo: that works for some reason. but why? i would have thought if anything that enforces linearity 12:38
SmokeMachine why not something like? `say await do for <num1.txt num2.txt num4.txt num5.txt> -> $file { start {run("perl", "num.pl", $filename, :out).out.slurp } }`
Doc_Holliwood i mean, batch size of 1 means, "will only do 1 at a time" doesn't it?
12:38 epony joined
netrino It means, every thread will do 1 at a time. If batch is 500 and you supply 100 elements, they will all fit in one thread 12:39
SmokeMachine `say await do for <num1.txt num2.txt num4.txt num5.txt> -> $file { start {run("perl", "num.pl", $file, :out).out.slurp } }` 12:40
netrino Doc_Holliwood: In other words, when you provide data, hyper/race will split that data on batches and feed every batch to a different thread 12:41
Doc_Holliwood netrino: ok, but then why, when I add :degrees(8) to my call it all is linear again
because that should mean 8 threads, shouldnt it 12:42
SmokeMachine m: say await do for ^5 -> $secs { start {run("sleep", $secs); $secs } }
evalable6 (0 1 2 3 4)
jnthn It's spelled degree, not degrees 12:43
Doc_Holliwood SmokeMachine: Sure, promises are an option. I'm just trying to understand 12:45
jnthn Doc_Holliwood: batch is how many things to send to a worker; it defaults the 64 12:46
Doc_Holliwood: degree is how many workers
abraxxa is there a module for ldap available? I can't find one on modules.pelr6.org 12:47
sena_kun abraxxa, github.com/Altai-man/cro-ldap 12:48
abraxxa I knew I had read about one, thanks!
why doesn't it show up on modules.perl6.org? 12:49
tadzik I remember the PerlCon talk about this :)
sena_kun abraxxa, it is in a kind of a beta right now, some advanced features may be missing, basic ones are working
more stuff comes whenever I'll finish my paper. :/
El_Che github.com/Altai-man/cro-ldap 12:50
oh you zere faster
abraxxa El_Che: duplicate ack packet detected :)
El_Che hehe
abraxxa sena_kun: so it's not released so far and I have to install it from github? 12:51
sena_kun: does it support LDAPS?
sena_kun abraxxa, yes, all the dependencies are in the ecosystem though. just git clone the repo and then `zef install .` inside of it
rba sena_kun++ El_Che++
sena_kun abraxxa, yes, but not StartTLS
abraxxa that's ok
testing now
sena_kun what's missing for sure: StartTLS, intermediate messages, the client doesn't really understand types of attributes, so just gives you Buf. if you need to connect using ldaps:// and do some bind/search/modify/something-something the chances are it'll just work. otherwise a bug report will be welcome. :) 12:54
ah, also LDIF serialization is missing 12:55
timotimo Doc_Holliwood: "batch" is an important tune-able; the smaller your individual work, the higher you want the batch to be; with small workloads, a batch size of 1 will be close to 100% overhead for splitting and sending and combining the things 12:57
abraxxa sena_kun: ===> Testing: Cro::LDAP:ver<0.5.2>:auth<github:Altai-man> 12:58
No such method 'decode' for invocant of type 'Str'. Did you mean 'encode'?
in block <unit> at t/04-client.t line 126
when installing via zef install .
timotimo in the future (as in, if someone takes the time to implement it) the batch size could by default start low and increase after measuring the time an individual task takes
abraxxa sena_kun: same as the travis-ci job: travis-ci.org/Altai-man/cro-ldap/jobs/564713068 12:59
12:59 ufobat joined
sena_kun abraxxa, yes, I have a feeling I was in the middle of patching something before the perlcon trip happened. one moment... 13:00
abraxxa, pushed tests update, git pull && zef install . 13:02
abraxxa, the fix was that by the standard matched-dn and error-message are always utf-8, so we can decode them before giving back to the user 13:03
abraxxa sena_kun++ #tests successful 13:05
13:05 aborazmeh left
sena_kun \o/ 13:05
abraxxa sena_kun: the Cro::Client docs seem to be wrong because the example doesn't work 13:08
looking at the tests now
connect returns a Promise on which .bind can't be called
the await is missing 13:09
also the bind call has to be name =>
13:11 pecastro left
sena_kun abraxxa, the tests have more authority than docs right now, the development process was rather vigorous when I had time, with a lot of things changing 13:12
that's why it is not in the ecosystem yet. :P
13:14 pmurias left, pmurias joined
abraxxa sena_kun: ldaps port is 636, not 626, doc patch? 13:14
sena_kun abraxxa, yes, 636, doc patch. 13:15
abraxxa it seems it isn't doing a TLS handshake although i specify an ldaps uri
sena_kun abraxxa, did you specify CA file? the working example is in t/06-ldaps.t 13:16
abraxxa just did this and works, error message instead of hang would be nice 13:17
13:17 aborazmeh joined, aborazmeh left, aborazmeh joined
sena_kun abraxxa, mind opening a ticket? 13:17
abraxxa for the doc patch? 13:18
Can only specify Awaitable objects to await (got a BindResponse+{Cro::LDAP::ControlCarry[List]})
guess the bind didn't succeed
sena_kun bind does not return a Promise right now
that's an exception, because by the standard bind must be syncronous 13:19
*synchronous
abraxxa i just copied the docs
sena_kun so no need to `await` it
abraxxa ok. will use the tests from now on
sena_kun: why do i need to pass a dn to search and not just an ldap filter? 13:27
sena_kun abraxxa, what the default DN be? 13:28
abraxxa ah, that's the base dn!
sena_kun yup
abraxxa the docs still use base which is a better term imho 13:29
what about naming it base-dn?
sena_kun abraxxa, having something like :$base instead of :$dn is better?
abraxxa i'd call it base-dn to include both therms
terms
sena_kun abraxxa, created a ticket, thanks a lot for your feedback 13:30
abraxxa sena_kun: no problem, thanks for the module! 13:31
13:34 pecastro joined
abraxxa sena_kun: I can't get it to return anything 13:38
sena_kun abraxxa, what is "it"? search? do you have react/whenever on it? 13:39
abraxxa I used the code from the docs and now from t/04-client.t
github.com/Altai-man/cro-ldap/blob...ent.t#L170
I can see in wireshark that it doesn't return much after the tls handshake 13:40
sena_kun abraxxa, what's on the other side, openldap? I assume you likely can't peek at its log, right? 13:41
abraxxa i tried with the same filter I have in a Catalyst app for authentication and also without one where it uses the default filter
13:41 zakharyas joined
sena_kun abraxxa, can you enable CRO_TRACE envvar (just CRO_TRACE=1) and paste the output somewhere? 13:43
abraxxa i see: In order to perform this operation a successful bind must be completed on the connection 13:44
how can i check that the bind was successful? 13:45
sena_kun abraxxa, was your bind successful? ah, one important thing - you need to always check result-code of your operations, it won't throw an exception if it's error, so you can check what's wrong with your bind, just look at .result-code and .error-message of the BindResponse object returned from bind method 13:46
abraxxa sena_kun: is there any code where I can see how to check and output an error? 13:47
sena_kun github.com/Altai-man/cro-ldap/blob...ent.t#L125 <- e.g. this 13:49
my $bind-resp = $client.bind(...); unless $bind-resp.result-code ~~ success { #`( error is happened ); die $bind-resp.error-message; } 13:50
abraxxa i did eq success
sena_kun should work this way too 13:51
abraxxa sena_kun: using a CN= format instead of just the samaccountname works 13:58
but it's quite slow 14:00
one cpu core maxed out just for outputting the dn, about 5/sec 14:01
AlexDaniel squashable6: status
squashable6 AlexDaniel, ⚠🍕 Next SQUASHathon in ≈13 hours (2019-09-07 UTC-12⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
14:01 cpan-p6 left
AlexDaniel SmokeMachine: hello 14:01
SmokeMachine Hi!
14:01 cpan-p6 joined, cpan-p6 left, cpan-p6 joined 14:02 squashable6 left
lucasb let's get red 14:02
*ready!
14:03 squashable6 joined, ChanServ sets mode: +v squashable6
AlexDaniel SmokeMachine: ok, can you add a webhook like this? user-images.githubusercontent.com/...6d4004.png 14:05
14:06 mowcat left
SmokeMachine AlexDaniel: If it's the same as it was for Hacktoberfest fest, I already did... 14:06
oh! it's not! 14:07
AlexDaniel: How can I test if it's working? new commit? 14:10
a new PR? 14:11
abraxxa omg the syntax...
why does this not work? 14:12
attributes => (<samaccountname>)
in a method call that expects an array
SmokeMachine AlexDaniel: GitHub is not showing errors... :) 14:13
sena_kun you need `=> [<foo>]` instead, or `=> ("foo",)`
abraxxa, ^
lucasb m: class C { method m(:@a) { dd @a } }; C.m(a => <a b c>) 14:14
evalable6 ("a", "b", "c")
abraxxa docs.perl6.org/language/list shows my @a = <foo bar buzz>;
sena_kun m: class C { method m(:@a) { dd @a } }; C.m(a => <a>)
evalable6 (exit code 1) Type check failed in binding to parameter '@a'; expected Positional but got Str ("a")
in method m at /tmp/3bzLC5xkYZ line 1
in block <unit> at /tmp/3bzLC5xkYZ line 1
lucasb ah, singleton list :)
m: class C { method m(:@a) { dd @a } }; C.m(a => (<hi>,))
evalable6 ("hi",)
sena_kun m: class C { method m(:@a) { dd @a } }; C.m(a => <a >) 14:15
evalable6 (exit code 1) Type check failed in binding to parameter '@a'; expected Positional but got Str ("a")
in method m at /tmp/2rqTlM1YOU line 1
in block <unit> at /tmp/2rqTlM1YOU line 1
sena_kun hmmmm
I expected that to work, but whatever
abraxxa so when Perl 6 has no refs why the [] for an array? 14:16
docs.perl6.org/language/5to6-nutshell doesn't even mention how to define an array or hash at all, just slices
docs.perl6.org/language/5to6-nutsh..._separator shows no brackets at all 14:17
sena_kun: how do i get an attribute as Str instead of Blob? 14:18
sena_kun abraxxa, attribute or attribute value?
abraxxa value
$entry<sAMAccountName> and $entry.attributes<sAMAccountName> both return a Blob 14:19
.decode does 14:20
sena_kun abraxxa, ah, sorry, I misread your question as "why do I get an attr value to be Str instead of Blob" and a deep WTF was ongoing. yes, .decode does the job if it is parse-able as utf8. 14:21
abraxxa so no api for that currently?
sena_kun abraxxa, well, Blob is a normal Perl 6 type and `decode` is a normal method on it. you mean for the client to get the schema and be smarter about what to automagically turn into strings? 14:22
abraxxa yes
sena_kun not supported currently, but on my list (eventually)
abraxxa I've expected to get the proper Perl 6 datatypes
i see
not a problem for the one off script I'm writing to get used to Perl 6
14:36 aborazmeh left
abraxxa :foo<bar> and foo => 'bar' is the same thing in a method call? 14:46
jnthn Yes
abraxxa why two ways for the same thing?
14:46 kktt joined
jnthn Though note :foo<42> and foo => '42' are not the same 14:47
And nor are :foo<bar baz> and foo => 'bar baz'
abraxxa why?
jnthn m: sub foo(*%args) { dd %args }; foo bar => 42 14:48
evalable6 Hash element = {:bar(42)}
jnthn m: sub foo(*%args) { dd %args }; foo :bar<42>
evalable6 Hash element = {:bar(IntStr.new(42, "42"))}
14:48 dolmen joined
jnthn Uses `val` semantics 14:48
SmokeMachine m: sub foo(*%args) { dd %args }; foo :42bar 14:50
evalable6 Hash element = {:bar(42)}
abraxxa whatever that means...
to me <> looks like qw() in Perl 5, so I expect strings 14:51
jnthn doc.perl6.org/routine/val 14:52
abraxxa 'it will return an X::Str::Numeric' would read better as 'will throw an X::Str::Numeric exception' 14:53
jnthn Well, it's not clear indeed; I think it returns a Failure containing that exception
abraxxa so which calling format is recommended and why? 14:54
or just point me at some docs if available
14:56 pmurias left 14:58 Doc_Holliwood left
tobs abraxxa: I don't think one way of passing named arguments is generally recommended over the other. Just use what you like best. 14:58
`name => value` should remind you more of Perl 5 and the `:name($value)` syntax allows for some shortcuts such as `:$varname` which is the same as `:varname($varname)` or `:42years` being `:years(42)`. 15:02
abraxxa the last is just scary
15:07 Doc_Holliwood joined
AlexDaniel SmokeMachine: can you try removing and adding it again? 15:08
SmokeMachine: squashable6 will print a message if it's done correctly
(sorry I was afk for a little bit)
SmokeMachine np 15:10
squashable6 Webhook for FCO/Red is now active! Speak like a human. 15:12
SmokeMachine \o/
15:13 ufobat_ joined 15:14 ufobat_ left
abraxxa what's the preferred way when I want to transform a list to a lookup hash? 15:16
list of objects that is and one attribute should be the hash key 15:17
15:17 ufobat left
jnthn @objects.map({ .attr-that-should-be-the-key => $_ }).hash 15:18
abraxxa the original source is a Supply which I transformed to a list by calling its list method 15:19
is there a smarter and more performant way?
Supply has a map method itself that returns another Supply
japhb abraxxa: Generally, keep streaming data as a Supply, or Seq, or Channel as long as possible, until you really need to await collection of all data (or drop laziness, if you're worried about late-arriving side effects). 15:25
abraxxa japhb: makes sense, thanks
15:26 zakharyas left
AlexDaniel SmokeMachine: yay! I think we're ready then :) 15:27
abraxxa jnthn: is the .hash at the end really necessary?
AlexDaniel SmokeMachine: still no description in tickets? 15:28
SmokeMachine: for example, let's say that I pick this ticket github.com/FCO/Red/issues/342
SmokeMachine: where should I document it?
japhb abraxxa: without coercing to hash, you've just created a list of pairs. 15:29
abraxxa i see
Grinnz lizmat: maybe you should edit your early post that suggests camelia to indicate the direction changed to raku, since new commenters (understandably) aren't reading all of the posts to find this out
tellable6 Grinnz, I'll pass your message to lizmat
abraxxa it hangs forever 15:30
Kaiepi squashable6, status
squashable6 Kaiepi, ⚠🍕 Next SQUASHathon in ≈12 hours (2019-09-07 UTC-12⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
SmokeMachine AlexDaniel: that's something I don't know... I don't know where any of those issues should be documented... 15:32
AlexDaniel SmokeMachine: soo… I mean, how will a contributor know what to do? :)
japhb abraxxa: Wait, are you combining the suggestions? Meaning, you're calling .hash on a Supply? If so, it's probably waiting for the Supply to be done sending data. 15:33
15:33 Actualeyes joined
japhb .hash is intrinsically an end to streaming. 15:33
abraxxa japhb: I'm calling this on the result of a Cro::LDAP::Client.search call 15:34
japhb is not familiar with Cro::LDAP::Client (and in particular, how it ends a search) 15:35
abraxxa it returns a Supply
sena_kun you whenever it and it returns you either Entry object or Reference object (Cro::LDAP::Entry and Cro::LDAP::Reference), based on type you can do things with it. 15:36
japhb abraxxa: Sure, which would be a stream of results I assume. But my point is I don't know how that Supply closes.
abraxxa it worked already but stopped when I refactored it
sena_kun the supply of `search` is closed whenever the server sends SearchResultDone
abraxxa my %ldap-by-username = $client.search().grep(* ~~ Cro::LDAP::Entry).map({ .<sAMAccountName>.decode => $_ }).hash; 15:37
sena_kun you likely need `map({ $_<sAMAccountName>.decode => $_ })` 15:38
m: ({a => 1},).map({ .a => 5 }).hash.say 15:39
evalable6 (exit code 1) No such method 'a' for invocant of type 'Hash'
in block <unit> at /tmp/B2DdTFhWVX line 1
sena_kun m: ({a => 1},).map({ .<a> => 5 }).hash.say
evalable6 {1 => 5}
sena_kun :S then never mind the suggestion
15:39 domidumont left
japhb abraxxa: If it were me, I would be testing my assumptions by breaking that into: my @pairs = $client.search().grep(* ~~ Cro::LDAP::Entry).map({ .<sAMAccountName>.decode => $_ }); #`( EXAMINE @pairs HERE ) my %ldap-by-username = @pairs.hash; 15:40
abraxxa CRO_TRACE shows Cro::LDAP::MessageParser QUIT Earlier failure
(HANDLED) "From argument to subbuf out of range. Is: 5, should be in 0..3 15:41
Type check failed in assignment to $input; expected Blob but got Failure (&CORE::infix:<orelse>...)
SmokeMachine AlexDaniel: until now, the only documentation I have on Red is the README.md generated by the Red.pm6...
japhb abraxxa: Oh interesting. Maybe the Cro::LDAP::Client.search supply isn't propagating the error, or .hash isn't handling an erroring Supply? 15:42
sena_kun abraxxa, can you provide the last stream of the log? starting from Connector emitting TCP stuff, as that seems like a bug
abraxxa I've added extensionattribute6 to the list of attributes and that seems to break it
Grinnz I have been mildly curious how error handling works in Supply; in promises it's simple, it resolves or rejects, but in Supply there's a continuous state? does an error bail out the whole thing? can you have a warning? 15:43
abraxxa sena_kun: which paste site do you prefer?
sena_kun abraxxa, don't have preferences, you can just create a ticket at the repo with the log 15:44
abraxxa that's user specific data I can't post
sena_kun abraxxa, surely you should remove any credentials
abraxxa no credentials but the user record that breaks the parser
sena_kun: paste.scsys.co.uk/585921 15:45
sena_kun abraxxa, can you paste the stacktrace of the error in ASN::BER?
abraxxa that's the exact error
sena_kun I see, thank you
abraxxa the extensionattribute6 contains a phone number
sena_kun sure, no need for me to know such things, and the error is unrelated to the data, I think 15:46
AlexDaniel SmokeMachine: what about using the wiki? github.com/FCO/Red/wiki 15:47
SmokeMachine: I have to go now, but please do organize something for potential contributors, otherwise people will just come, look around and leave… 15:48
SmokeMachine could make sense... but it would not show up on modules.perl6
AlexDaniel SmokeMachine: add a link to the wiki from README? 15:49
sena_kun abraxxa, I see the issue, will do something with it after $dayjob, thanks for reporting
AlexDaniel also, editing the wiki is perhaps easier than submitting a pull request
abraxxa is the syntax of the Supply map method different?
SmokeMachine AlexDaniel: yes... it exists...
AlexDaniel: makes sense
abraxxa .map({ .<sAMAccountName>.decode => $_ }) results in No such method 'decode' for invocant of type 'Any' 15:50
AlexDaniel SmokeMachine: alternatively you can add a docs/ directory with some basic doc files, just to give an example on how things should be documented
sena_kun abraxxa, just add `say $_;` as fir statement inside of map to see if you actually have such a pair in the Entry
s/fir/first/ 15:51
SmokeMachine AlexDaniel: how do you think it should be doci=umented?
abraxxa I also wonder why it's called after the ldap search has finished and not concurrently
sena_kun: outputs (Any)
DOH
i've formatted the code to have one operation per line 15:52
e.g. .grep
.map
and had a ; at the end of the grep
no syntax error though
15:52 robertle left
sena_kun well, technically it is not a syntax error 15:52
m: .map({ say $_ });
evalable6 (Any)
abraxxa but a line break won't end a line of code, only ; does, right? 15:53
sena_kun as far as I know, yes
15:54 Actualeyes left
abraxxa works now 15:55
sena_kun \o/ 15:56
15:59 Doc_Holliwood left
El_Che lo 16:00
abraxxa how can I access a hash element by key when it is a variable? 16:01
sorry, but the docs are really useless...
sena_kun use {} instead of <> 16:02
%foo{$key}
abraxxa they mostly look like some autogenerated stuff and the perl 5 to 6 guides don't contain the basics
AlexDaniel SmokeMachine: well, I don't know how red should be documented. It's your project, and you probably know better. But tickets for the squashathon should give direction like “$*RED-DEBUG-RESPONSE is currently not documented. Features should be documented on the [wiki](github.com/FCO/Red/wiki). Feel free to create a new wiki page if you cannot find an existing page that is suitable.” or something similar 16:03
jnthn abraxxa: I typed "hash indexing" into the doc search and got straight to an explanation. How did you try to find it? 16:04
abraxxa jnthn: click Documentation at the top of perl6.org, then Language Reference & Tutorials, then Hashes and maps 16:05
for whatever reason does Firefox not scroll to the anchor on page load but only when you press enter in the url bar again 16:07
jnthn Hm, that doc manages to put a more advanced thing at the top, and then the indexing stuff further down. 16:09
16:12 mowcat joined
abraxxa 'hash exist' is another search term that doesn't return anything 16:15
16:19 jmerelo joined
abraxxa sena_kun: any idea why I can't find all users but ldapsearch does? 16:20
16:23 domidumont joined, domidumont left 16:24 domidumont joined 16:26 aborazmeh joined, aborazmeh left, aborazmeh joined
holyghost I made my cell system code ready for evolution i.e. you can run several ALife organisms (later on with several cell types) so you can evolve a Nautilus into a Human :-) 16:29
16:33 Doc_Holliwood joined
sena_kun abraxxa, no idea, the bind is ok? the arguments (and default ones) are the same? 16:36
abraxxa everything works, just not all users are found
16:37 dakkar left, thiccdaddy left
sena_kun abraxxa, are you sure that the server does not send you references to another server? because ldapsearch will likely follow them, but cro::ldap is not yet 16:38
abraxxa I have that same problem in a Perl 5 script that generates a vcard file too, might be the same
the CN is in the same OU for a user that is found and one that isn't 16:39
sena_kun: how can I find out if that's the case? maybe with ldapsearch 16:41
sena_kun abraxxa, you can remove grep ~~ Entry part and then in map you map Entry to what you do, but for Reference you just print it and turn into Nil, then you do .grep(*.defined) to get rid of Nils 16:42
if any References will pop out, then it's possibly the case 16:43
El_Che abraxxa: maybe a different scope (-a)?
-O is the referral hops 16:44
-R does not follow referrals 16:45
abraxxa sena_kun: I only get a single reference with is a DomainDns Zones
El_Che (use -v for verbose)
abraxxa El_Che: -R realm SASL realm 16:46
sena_kun abraxxa, then the answer is above: ldapsearch follows references automagically and cro::ldap doesn't know how to do it (yet) 16:47
abraxxa -a deref one of never (default), always, search, or find
El_Che access.redhat.com/documentation/en...ch_Options
it was from there
abraxxa drop RedHat 16:48
16:49 aborazmeh left
abraxxa sena_kun: I can't find the docs saying that it follows ref, also when my only ref is a DomainDnsZones one I don't think that it will have users there 16:53
sena_kun abraxxa, sorry, no idea in this case 16:56
16:57 dolmen left
abraxxa is there a limit on the number of results returned from a query? 16:57
it seems newer users are missing
when i query for the sAMAccountName the user is found 16:58
17:00 robertle joined
abraxxa maybe a Active Directory limitation? 17:00
17:00 pat_js left
sena_kun by default size-limit is 0, which means "all records" 17:01
abraxxa I saw this in the code, but maybe the server enforces one?
sena_kun I mean, for the client
abraxxa ldap.perl.org/perl-ldap-oscon2001.pdf still is a good read ;)
www.tirasa.net/en/blog/getting-aro...ory-search
looks like it 17:02
sena_kun yay, thanks for the link
abraxxa should I get such an error via the module?
can it already do paging? 17:03
this seems to be a control, never came around that ldap term before 17:04
sena_kun well, we have some controls implemented, but not for paging
abraxxa ;(
would that be hard to implement?
sena_kun let me check its RFC... 17:05
abraxxa CRO_TRACE showed [TRACE(anon 1)] Cro::LDAP::MessageParser EMIT LDAP MSG [2] SearchResDone so I assumed everything went well
17:06 zakharyas joined, wildtrees joined 17:07 mowcat left
sena_kun well, technically there was no error, the other question is that you can request additional things 17:07
sena_kun has a quick dinner
abraxxa if I can't find a solution I'll have to change the script to search each user with a separate ldap query instead of fetching all users beforehand 17:08
hehe, me too
;)
Mahlzeit!
17:08 jaldhar_ left 17:11 kktt left
timotimo prepares a slow dinner 17:11
17:14 domidumont left 17:18 ravenousmoose joined 17:22 domidumont joined 17:24 domidumont left 17:27 Xliff joined
Xliff \o 17:27
jnthn: Hi there. Is there some help I can give you in tracking down github.com/jnthn/p6-io-socket-asyn...issues/44? I know you're busy, however I have code changes I'd like to merge back into master if this can be fixed. Please let me know if I can assist in some way. 17:28
.tell jnthn Hi there. Is there some help I can give you in tracking down github.com/jnthn/p6-io-socket-asyn...issues/44? I know you're busy, however I have code changes I'd like to merge back into master if this can be fixed. Please let me know if I can assist in some way. 17:29
tellable6 Xliff, I'll pass your message to jnthn
17:29 Xliff left
sena_kun abraxxa, I read the tools.ietf.org/pdf/rfc2696.pdf and it doesn't seem to complex to implement. however, I'd like to schedule implementing it (along with fixing the parser bug you stumbled upon) on next Saturday, if you are ok with it. 17:38
abraxxa sena_kun: sure, thanks! 17:42
sena_kun abraxxa, no problem, thank you very much for inspecting it despite it being still work in progress, and giving some nice feedback 17:43
abraxxa how it works as it should ;) 17:46
I wonder if I can parallize the ldap searches based on the data query result ;) 17:47
sena_kun you can
queries are concurrent except for when bind and a couple of friends are in progress 17:48
though it won't work with paged query since you need to know the cookie of next batch
abraxxa I'd need to have a Supply from the database query instead of a list I guess 17:49
allrows lazily returns all the rows as a list of arrays
sena_kun is lost 17:50
Geth ¦ problem-solving: vrurg assigned to jnthn Issue Unification of Array/List and Hash/Map behaviors. github.com/perl6/problem-solving/issues/99 17:51
17:55 aeyxa joined
abraxxa sena_kun: now my script hangs at the same user all the time but CRO_TRACE shows that the user was found in LDAP 17:55
17:57 aeyxa left 18:01 natrys joined
abraxxa a working one: [TRACE(anon 1)] Cro::LDAP::MessageParser EMIT LDAP MSG [126] SearchResEntry 18:02
the hanging one: [TRACE(anon 1)] Cro::LDAP::MessageParser EMIT LDAP MSG [4294967168] SearchResEntry
the only thing I see is the large number in the brackets 18:03
sena_kun oh-uh
how big is your search results? 18:04
abraxxa one user at a time
sena_kun the number in brackets stands for ID of the message, but it seems to me kind of unlikely that you was able to send+recieve 4294967168 messages
abraxxa the last response has 126, the query 127 and its result 4294967168 18:05
sena_kun d'oh
abraxxa looks like an overflow to me
sena_kun that's clearly an overflow, yes...
Elronnd is there any way to pass multiple '-e' options? Like, perl6 -e "say 'hello'" -e "say 'world'"?
abraxxa class Cro::LDAP::Client { has atomicint $!message-counter = 1; 18:06
how big is an atomicint?
sena_kun well, not big enough for sure. :)
abraxxa ;)
sena_kun >On a 32-bit CPU it will typically be 32 bits in size, and on an a 64-bit CPU it will typically be 64 bits in size
abraxxa 64bit here 18:07
sena_kun it doesn't look to me like it should overflow in less than 18446744073709551615 messages, but whatever, I'll replace it with something else right now...
abraxxa I only find its initialization and the increment, where is it set for responses? 18:08
sena_kun abraxxa, what do you mean? where is it parsed?
abraxxa it's only increased in wrap-with-envelope 18:09
is that also called for responses?
as the response to a request has a different message-id
sena_kun no, it isn't called for responses 18:10
and request-response pairs must have the same id
so only client increments it
abraxxa i see 18:11
the output if my script and CRO_TRACE is a bit misleading then
TRACE(anon 1)] Cro::TLS::Connector EMIT TCP Message should contain the message id as well 18:12
sena_kun TCP messages does not have ids
they are just TCP bytes from the socket, they might not form a whole LDAP-level message
s/does/do/
abraxxa m: my atomicint $message-counter = 1; while $message-counter < 130 { $message-counter⚛++; say $message-counter } 18:13
evalable6 2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34…
abraxxa, Full output: gist.github.com/4c5dda71fe11d97178...1feacc3cd1
abraxxa that counts to 130
18:13 MilkmanDan left
abraxxa jnthn: any idea what's going on here? 18:14
sena_kun abraxxa, yes, it is big enough, 64 bits, its the parser parses the response ID incorrectly
abraxxa sena_kun: ah, the ldap packets have an id field?
18:14 MilkmanDan joined
sena_kun github.com/Altai-man/ASN-BER/blob/...r.pm6#L211 <- here the parsing of Int is wrong, I suspect 18:15
abraxxa, yes, and my ASN.1 implementation parses it incorrectly, so I need to sit in some quite place and re-do it looking at the spec. :)
abraxxa sena_kun: ok, then I'll have to wait for that
18:16 domidumont joined
sena_kun abraxxa, the weekend is near, I hope 18:16
18:17 cooper joined
sena_kun abraxxa, created github.com/Altai-man/ASN-BER/issues/2 18:17
and I even see why the code is broken... 18:18
18:19 ravenousmoose left, domidumont left 18:24 sauvin left
abraxxa is there a configurable timeout? 18:25
sena_kun: reconnect after 120 searches ;) 18:33
sena_kun abraxxa, nope 18:34
jmerelo sena_kun: the squashathon is near! 18:36
squashable6: next!
squashable6 jmerelo, I cannot recognize this command. See wiki for some examples: github.com/perl6/whateverable/wiki/Squashable
jmerelo squashable6: next
squashable6 jmerelo, ⚠🍕 Next SQUASHathon in ≈9 hours (2019-09-07 UTC-12⌁UTC+20). See github.com/rakudo/rakudo/wiki/Mont...Squash-Day
18:38 zakharyas left 18:42 aborazmeh joined, aborazmeh left, aborazmeh joined 18:43 zakharyas joined 18:47 lichtkind_ is now known as lichtkind, [Coke] left 18:56 ravenousmoose joined 18:58 cooper left, dogbert17 joined 19:00 [Coke] joined 19:02 aborazmeh left
abraxxa sena_kun: thanks for your help! I've subscribed to the ASN parsing issue so I should get notified when I can remove my workaround 19:04
19:13 zakharyas left, abraxxa left 19:17 ravenousmoose left 19:24 Black_Ribbon joined 19:45 reach_satori joined, jmerelo left 19:53 dolmen joined 19:56 irced joined 20:10 mowcat joined
irced yoleaux! 20:11
.botsnack 20:12
.w sovereign 20:13
timotimo yoleaux is no more 20:16
20:18 pmurias joined
Elronnd irced: stuff is at github.com/Elronnd/libport. Main things I can't figure out are--#1, creating multiple instances causes a crash (maybe this is a moarvm bug? Not sure). And #2, you can't create variables because lexical scope is immutable, and I can't figure out a *good* solution to that 20:20
irced takes a look.
irced nods affirmatively to timotimo and bows his head in silence briefly. 20:21
20:21 natrys left 20:23 |oLa| left
irced is working on running make successfully. 20:31
20:32 MasterDuke joined
Elronnd are you on linux? 20:33
if not, you'll have to alter the paths in copy-necessary-files
irced on linux, have rakudo on ~/.local making adjustments 20:35
Elronnd probably something like copy-necessary-files ~/.local; make INCLUDE_PATH=~/.local/include 20:38
irced it compiled, retracing steps to journal 20:40
fyi: besides my rakudo local install from source requiring a symlink $rakudodir/share/perl6/core to $rakudodir/include/moar/core, the following line needed to be added to find tommath.h: CFLAGS += -I$(HEADER_DIR)/libtommath. then export HEADER_DIR=$rakudodir/include followed by make (or passed into make) compiled nicely 20:48
apparently -I$(HEADER_DIR)/moar was not enough to find all the headers. 20:49
the symlink was needed to copy files from core, obviously. 20:50
20:50 pecastro_ joined
Elronnd tommath I will add 20:51
core--what was that needed for?
I already have a $rakudir/include/moar/core. And share/perl6/core doesn't have any headers 20:53
irced yeah, no need to add a whole separate line like i did, probably some fancy bash substitution could be used to put it with "moar" 😃 anyway, my install tree must have been a little different because cp -r $perl6_install_dir/share/perl6/core $BUNDLE_DIR/share/perl6/core
from the shell script failed
err, bash is not make sorry
20:53 pecastro left
irced scratch that part about fancy substitution in the makefile 20:54
Elronnd that is interesting...how did you install perl6?
20:57 pmurias left
irced so, instead of a symlink i could have changed the line to cp -r $HOME/.local/rakudo i.e. $rakudodir##include/moar/core since ##share/perl6/core did not exist 20:57
i simply installed from source via instructions at rakudo website to install 2019.03.1 20:58
20:58 pmurias joined
[Coke] "from source" would typically be a later release than that. 20:58
irced my $rakudodir/share/perl6 did have the other directories. in fact, it has bin dist lib precomp repo.lock resources runtime short site sources vendor version 20:59
[Coke] ah, that's rakudo star instructions tied to the last release. OK
irced Coke: right
Elronnd I don't want to copy the entire directory because it might just be /usr, and I don't want to make a copy of all /usr
try the latest git master, maybe? That's what I use 21:00
irced Elronnd: well good to go for now, i'll consider installing the latest at a later point. it compiles and runs. kewl.
irced inspects the source.
Elronnd aight! 21:01
[Coke] irced;what OS ar eou on?
(runs) sweet.
irced Coke: define OS. i am running gentoo.
Elronnd is working now on returning values from p6 to c
irced gentoo linux 21:02
Elronnd irced: I use arch
fite me irl
irced or just linux 😃
21:04 lucasb left
irced that's okay, the distro wars are more of an internal fight with me 😄i have distro hopped for awhile since it's all linux. gentoo is the kewl'est tho 😃 21:05
Elronnd my computer isn't fast enough to take the compilation time of gentoo 21:06
thinking of switching to void, though. Systemd is really annoying
irced my compilation times are excellent and the system is configured to use all cpu capabilities supported by the gcc suite. it's a xeon 3.8ghz+ 8M on processor Cache 4 cores, 8 threads, plenty of memory to -pipe compilation on 7 threads. it compiles really really fast 21:10
so gentoo has been the best fit
Elronnd D: 21:11
irced and the remaining thread lets me do whatever while compilation occurs in the background
Elronnd mobile i3 @ 2ghz?
irced good luck
Elronnd thanks 21:12
irced xeon e3
formely known as kaby lake
Elronnd am broadwell
probably get a better machine in ~a year, little less, when I finish school and get a job 21:13
21:17 sena_kun left 21:23 pmurias left 21:25 japhb left
irced yeah, built mine from go when i had the funds 21:27
21:30 pmurias joined, kensanata joined 21:34 dolmen left 21:40 dolmen joined 21:47 pierre55 joined, japhb joined
pierre55 p6: say 3 21:49
evalable6 3
Elronnd m: say 3 21:56
evalable6 3
Elronnd j: say 3
awww, no rakudo-jvm?
js: say 3 21:57
22:05 khisanth_ left 22:06 khisanth_ joined 22:08 kensanata left 22:12 Cabanossi left 22:14 pecastro_ left 22:18 _jrjsmrtn left 22:22 __jrjsmrtn__ joined 22:26 [particle] left 22:27 Cabanossi joined 22:29 [particle] joined 22:34 [particle] left 22:35 [particle] joined, irced left 22:37 irced joined
MasterDuke r-j: say 3 22:41
oh right, camelia is still offline. the *ables only support the moarvm backend 22:42
irced camelia: say "where's beatrice?" 22:44
tellable6 irced, I'll pass your message to camelia
22:45 pmurias left 22:47 dolmen left 22:54 pierre55 left 22:57 lichtkind left 23:07 rindolf left 23:24 [particle]1 joined
irced Elronnd: let me know if there is something else i can look at with your project 23:24
23:25 [particle] left 23:32 Doc_Holliwood left 23:43 dotdotdot left 23:47 kktt007 joined 23:48 wamba left 23:50 wildtrees left 23:58 [particle] joined