🦋 Welcome to Raku! raku.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: colabti.org/irclogger/irclogger_log/raku
Set by ChanServ on 14 October 2019.
00:05 markong left, rir joined
rir Hi all, In the comments of DBIish it states "There is a long term Rakudo based project to develop a new,# comprehensive DBI architecture for Rakudo and Perl 6.# DBIish is not that ..." Is 'that' somewhere? 00:13
00:20 leont left 00:21 MasterDuke left 00:29 wamba left 00:38 rir left, finanalyst left 00:57 __jrjsmrtn__ joined 00:59 _jrjsmrtn left, daxim left
guifa2 .tell rir Yes, the "that" is Red 01:05
tellable6 guifa2, and I oop! Backtrace: gist.github.com/27f6f6489f9c29ad49...a80afd93f2
AlexDaniel looks
guifa2 apologizes for breaking things
AlexDaniel it's not you I'm pretty sure 01:06
hmm
codesections I'm a bit confused about best practice around sigils. My general understanding was that `%` is the Associative sigil, and thus should (generally) be used for any class that does Associative (e.g., Hash, Set, Bag, etc)
guifa2 there's no way in a method call to replace self, right? 01:07
codesections (I'm not talking about what's required, just what best communicates intent/is clear)
but now I'm starting to wonder if `%` is really more the *Hash* sigil, and Sets etc. are best with `$` 01:08
The docs mostly show Sets with `$` and then, at the end, say «Finally, you can create Set masquerading as a hash by using the is trait: my %s is Set = <a b c>;» 01:09
guifa2 It's true that a lot of people use Sets/Bags/Hashes with scalars, although I never fully understand that practice
% = Hash[Str,Any] by default and obligatorily Associative; @ = Array[Any] by default and obligatorily Positional 01:10
AlexDaniel codesections: neither works well 01:11
guifa2 My guess is that conceptually, sets/bags/mixes kind of hover in the grey zone between being conceptually fully associative and fully scalar
codesections Yeah, I understand that rule. I guess I'm wondering if, given that I have a Set, would the name `%name` confuse readers into thinking it was a Hash? Or would the name `$name` confuse readers into thinking it's a non-Associative scalar? 01:12
principle of least surprise, and all of that.
guifa2 that's where I'd use variable naming to clear it up 01:13
01:13 aborazmeh joined, aborazmeh left, aborazmeh joined 01:14 Altai-man_ joined
guifa2 still thinks it would be possible to add new sigils. Like ƒ for a IOs or something 01:14
codesections hmmm, I *generally* think of adding type info to variable names as a bit of a code smell. (`let people-array = ['bob', 'jo']` doesn't feel great in other languages) 01:15
(Not quite sure what other language I had in mind there, with the odd combination of syntax and kebab case, but whatever) 01:16
01:16 sena_kun left
AlexDaniel last time I used sets in raku I regretted it a lot. No longer remember the details, just that it was so clunky that I wished I just used hashes instead. 01:16
I did use $ though, maybe that is related 01:17
codesections AlexDaniel, I'm kind of feeling that way too. But I'm new enough to Raku that I'm assuming the problem is on my end :D
AlexDaniel I did that too, yeah 01:18
guifa2 codesections: you don't need to do it via literal ones
but like
%ingredientes 01:19
ingredients*
lol
for a weighted recipe
AlexDaniel guifa2: weighted? Did you want a bag or a mix?
or maybe a BagHash or a MixHash?
guifa2 yeah, the naming issues are a big problem with them 01:20
codesections Yeah, maybe for Bags. But a Set has very similar semantics to a Hash
guifa2 the Bag vs Mix feels very … arbitrary
codesections And a Map even more so, since it's literally just an immutable Hash 01:21
guifa2 I think using Mix with Numeric might have made a bit more sense, but I'd have to look back at the original rationales for why the two were made separate
Don't forget we have Tuples now too :-) lizmat++
AlexDaniel Tuples?
I hope not? 01:22
m: say Tuple 01:23
camelia 5===SORRY!5=== Error while compiling <tmp>
Undeclared name:
Tuple used at line 1
guifa2 github.com/lizmat/Tuple
github.com/Raku/problem-solving/issues/135 01:25
Basically, allow for a value type listy/hashy thing
Value typing is something I need to look into for LanguageTag, one of my pending things. Right now you can create a set that includes 10 'en' language tags, because they have unique WHICH 01:26
codesections (this is the sort of thing that makes me feel like `%` and Sets don't get along: 01:27
m: my %s is Set = Set.new(<a b c>); say %s.WHAT # looks good 01:28
camelia (Set)
codesections m: my %s is Set = Set.new(<a b c>); dd %s # isn't good
camelia Set.new(Set.new("c","a","b"))
01:34 daxim joined
AlexDaniel hmm tellable6 sorta trashed itself a bit… restoring from a backup… 01:34
codesections or, even worse/less obvious (at least to me): 01:35
m: my %s is Set = (1, 2, 3) (-) (2,); dd %s
camelia Set.new(Set.new(1,3))
guifa2 Yeah, they don't play nicely with list assignment 01:36
but that feels more buggy to me that anything else
m: my @a is Array = Array.new: 1,2,3,4; say @a 01:37
camelia [1 2 3 4]
guifa2 because Arrays work okay there (I think on the single argument principle) 01:38
That set example is probably a bad artifact left over from the great list refactor I'd bet
codesections Maybe. But I guess that's part of why I was asking about style/best practice. If most people use $ for Sets, then odd/buggy behavior with %sets is probably a low priority 01:39
AlexDaniel well, what isn't 01:40
codesections Which is the sense I'm getting – I think I should mostly label `%` as the Hash sigil in my head, and not have any assumption that a $-sigiled variable is a (true) scalar 01:41
guifa2 I just ran a random roundtirp test with a few thousand POSIX times and a dozen or so timezones. Victory is mine. I might even get my sonic screwdriver now
codesections Congrats :)
guifa2 scalar just means "holds a value" and nothing more. Really @ and % are just special short hands for the two most common data structures (I mean, there's a bit more to it, but that's a decent sumary) 01:42
AlexDaniel that's a good summary 01:43
codesections yeah, I know. That's what my "(true)" was about. I know that's what "scalar" means in the Raku context, and I just should forget/set aside what in means in math/other contexts
AlexDaniel Set aside :) 01:44
codesections :)
guifa2 this isn't too snarky for a test file comment is it? 01:46
# Reference POSIX time: 1599310800 (when the author was *supposed* to walk across a stage to get his doctorate, but COVID-19)
01:47 molaf left
AlexDaniel it's perfect :) 01:47
guifa2 I need to start doing the write up for this DateTime extension though
codesections Just snarky enough :) 01:48
guifa2 There's a lot of cool stuff I'm taking advantage of to make it work without preventing precompilation and not needing MONKEY-TYPING
Which means that everything is fully compatible with every other module and all extant code too :D :D :D 01:49
guifa2 . o O ( unless someone does something weird like DateTime.new(now).timezone.Str.Numeric )
is the github user jforget on IRC ever? 01:50
AlexDaniel guifa2: we could've used the bot to figure it out, but I'm still fixing it…
guifa2 some people have different names (I'm alabamenhu on github because someone squatted my name grrrr) 01:51
even worse, I'm tenesianu on on blogspot because someone squatted BOTH alabamenhu AND guifa grrr xx 2
01:56 aborazmeh left 01:58 molaf joined 01:59 gnufr33dom joined 02:05 Manifest0 left 02:06 Manifest0 joined
codesections Wait, how does this typecheck successfully? 02:15
my Map $m := Hash.new('key', 0); $m.WHAT
timotimo m: say Hash ~~ Map
camelia True
codesections …Why?! 02:16
AlexDaniel m: my Cool $m := Hash.new('key', 0); $m.WHAT
camelia ( no output )
AlexDaniel m: my Cool $m := Hash.new('key', 0); say $m.WHAT
camelia (Hash)
AlexDaniel codesections: docs.raku.org/type/Hash#Type_Graph
codesections not mechanically, I get that it's because of ACCEPTS
That seems … odd. The directionality of that type graph suggests that Hashes are a type of Map. But that's not really the case in Raku: Maps are a subset of Hashes – of the immutable variety 02:21
Compare docs.raku.org/type/Real#Type_Graph which makes much more sense, semantically
So, if I want to guarantee that a Hash-like thing is actually immutable, what do I do? Clearly `my Map $foo` won't cut it. 02:23
02:23 Chi1thangoo joined
codesections m: say Hash.isa('Map') # Grrr 02:24
camelia True
guifa2 There must be some kind of special foo going on in the background
because 02:25
m: class A {}; class B is A {}; my B $b = A.new; 02:26
camelia Type check failed in assignment to $b; expected B but got A (A.new)
in block <unit> at <tmp> line 1
guifa2 m: class A {}; class B is A {}; my B $b := A.new;
camelia Type check failed in binding; expected B but got A (A.new)
in block <unit> at <tmp> line 1
02:28 zacts left
codesections isn't that just the other direction? 02:35
m: class A {}; class B is A {}; my A $a = B.new;
camelia ( no output )
cpan-raku New module released to CPAN! Abbreviations (0.3.0) by 03TBROWDER 02:41
guifa2 It's the same relationship between Hash and Map. Map (B) is a Hash (A)
codesections No, that's the problem. That's how it *should* be, semantically. But Hash is a Map! 02:43
That's what AlexDaniel was pointing out with the type graph
guifa2 oh, I misread the graph 02:44
nm me lol
timotimo what was the problem right now?
AlexDaniel oh, so you're saying that Map should be an immutable Hash instead of Hash being a mutable Map?
codesections yeah
timotimo any hash is an acceptable map, because whatever you can do with a map, you can do with a hash
AlexDaniel timotimo: yeah, that makes sense. What about Set and SetHash though? 02:46
codesections But that's not how other types work. A SetHash isn't a Set, a Rat isn't an Int
timotimo for those we have Real, the equivalent is Associative 02:47
02:47 toppo joined
codesections Well, the practical point of using a Map (instead of a Hash) is that the user wants a guarantee of immutability, right? Doesn't that kind of disappear if Hashes typecheck as Maps? 02:48
AlexDaniel hah. Interesting point 02:49
codesections Like you said, "whatever you can do with a Map, you can do with a Hash" – the whole point of using a Map is to place limits on yourself, and get the typechecker to enforce those limits
guifa2 The problem is as someone (I think you) had mentioned a while back, the question is whether conceptually it's that a Hash is a mutable map, or a map is an immutable Hash
I guess you could also do something like 02:50
AlexDaniel codesections: but what if I want to mutate whatever I get, then I want to make sure that it's mutable, so I typecheck for Hash and Maps won't pass through
02:50 toppo left
codesections I can see arguments either way, conceptually. But I still want the typechecker guaranteeing immutablilty :D 02:51
02:51 toppo joined
codesections It seems like the Setty/SetHash/Set setup solves that? A Set hash isn't a Set and a Set isn't a SetHash 02:51
Composition over inheritance, right? 02:52
guifa2 subset FrozenMap of Map where *.WHAT === Map;
:-)
[Coke] spends 2 hours setting up a universal remote control, and wonders how long it will take to recoup that time. 02:53
AlexDaniel [Coke]: you're assuming that it will keep working and won't require maintenance :) 02:54
the joy of having things working the way you need is priceless though
[Coke] (maintenance) AIIIGH 03:01
[Coke] ponders combining www.youtube.com/watch?v=LYKn0yUTIU4 with Lingua::Number for some homework. 03:02
timotimo liskov substitution principle says if "map is a hash plus immutable", then you can typecheck-pass a Map where a Hash is expected and the code will blow if/because it expected to mutate it 03:03
AlexDaniel hmm
tellable6: seen AlexDaniel
tellable6 AlexDaniel, I saw AlexDaniel 2020-08-07T03:03:50Z in #raku: <AlexDaniel> hmm
AlexDaniel guifa2: it's mostly restored now 03:04
guifa2 [Coke]: how about add some RBNF support for Intl:: ;-) 03:05
03:07 epony left
guifa2 (I'm not kidding btw, I've been needing to get on that at some point but DateTime took priority) 03:11
[Coke] ugh, lingua::number's borked. 03:15
I have no love for RBNF, so, no thanks. :) 03:16
guifa2 Yeah I'm not looking forward to it 03:18
03:20 lucasb left 03:33 toppo left, toppo joined 03:36 epony joined 03:47 rir joined, rir left 03:48 rir joined
guifa2 hello rir 03:52
You asked before about DBIsh 03:53
The insanely awesmoe and comprehensive module that's been made to handle things is called Red
timotimo isn't that more or less closer to what the DBIx namespace covers? 03:55
guifa2 timotimo: I admit I haven't used it (although I will soon for a new project), but I have heard very good things about it 03:58
rir That was my impression, timotimo. At first look I thought it interesting but wanted something close to DBI. I'm just getting a bit serious with Raku so have enough to learn without ORMing now. 04:00
timotimo there's a good postgres module, but DBI is of course about accessing all databases with a common interface
rir I am having a problem with DBIish. I want to delegate to what is commonly named $dbh but am stumbling over where the Connect type is coming from. 04:02
What is the Postgres module?
timotimo i think Db::Pg or so? DB::PG? DB::Pg? 04:05
$dbh will be what the common "create a connection" sub will give you
it's the "database handle" if that wasn't clear
maybe if it isn't clear the docs should explain that prominently 04:06
my $dbh = DBIish.connect("SQLite", :database<example-db.sqlite3>, :RaiseError);
rir Yes, I understand that but WHAT it is is a Connection which isn't declared anywhere that I find. 04:07
04:07 rir left
timotimo may have to call .^long_name or what it is to get it to also say what package it's from 04:08
04:10 rir joined
rir ^ s/Connection/Connect/ 04:10
timotimo there are multiple
each database has one
github.com/abraxxa/DBIish/blob/mas...ection.pm6 Postgres 04:11
github.com/abraxxa/DBIish/blob/mas...ection.pm6 sqlite
etc
04:14 sena_kun joined 04:16 Altai-man_ left
rir timotimo, I don't find long_name anywhere, but the error gives me DBDish::Pg::Connection. I'm should I tried that, but being tired I can't say that I use-d it, That was naive I guess. Good localtime to you, good night for me. Thanks. 04:28
04:38 toppo left, toppo joined 04:47 toppo left 04:48 toppo joined
guifa2 jjmerelo: lizmat: I just did a write up on my DateTime work, but not sure if it would be best to hold off and make it an advent article. It goes over dynamic vars, wrapping, dispatch control, and paramterized roles, so it feels like one of those show-offy advent ones 05:03
( gist.github.com/alabamenhu/d9a4652...ef78928bac for preview )
05:14 cpan-raku left 05:15 cpan-raku joined, cpan-raku left, cpan-raku joined 05:32 vike left 05:52 bocaneri joined 06:14 Altai-man_ joined, wamba joined 06:16 sena_kun left 06:18 toppo left 06:22 skids left 06:40 cgfbee left 06:59 molaf left 07:06 Manifest0 left 07:09 Manifest0 joined 07:24 vike joined 07:38 ab5tract joined 07:49 leont joined 07:56 ensamvarg left 07:58 oddp joined 07:59 ensamvarg joined, patrickb joined 08:33 JJMerelo joined 08:47 rindolf joined 09:00 JJMerelo left
moon-child how should I interpret this error? 'No exception handler located for catch', followed by a traceback 09:04
ab5tract .tell JJMerelo so the good news is that my last few days have been deeply steeped in rational numbers. just need to get it all down now :)
tellable6 ab5tract, I'll pass your message to JJMerelo
moon-child only line of my code in the traceback is a write to a Proc::Async
possibly the problem is I'm writing concurrently from multiple threads? 09:05
09:05 synthmeat left 09:07 synthmeat joined
ab5tract .tell JJMerelo working on examples that use Hilbert matrices for demonstration purposes, inspired by a great presentation by Roger Hui on (still as of yet unreleased today) rational numbers in Dyalog APL: www.youtube.com/watch?v=CkaQQYcxpfM 09:09
tellable6 ab5tract, I'll pass your message to JJMerelo
09:14 Altai-man joined
oddp m: say "ay".succ.succ.succ 09:16
camelia bb
oddp Okay, but isn't this a bit unexpected?
m: ("ay".."bb").elems
camelia ( no output )
oddp m: say ("ay".."bb").elems
camelia 48
09:16 Altai-man_ left
oddp m: say ("ay".."bb").head(10) 09:17
camelia (ay ax aw av au at as ar aq ap)
moon-child mm: say "ay".succ, "ay".succ.succ, "ay".succ.succ.succ
m: say "ay".succ, "ay".succ.succ, "ay".succ.succ.succ
camelia azbabb
moon-child hmm
sjn that's odd, yeah
moon-child m: say "ay".succ, " ", "ay".succ.succ, ' ', "ay".succ.succ.succ
camelia az ba bb
moon-child oh, here's something even weirder 09:18
sjn I'd assume "ay".."bb" didn't count down
moon-child m: say 'z'.succ
camelia aa
ab5tract moon-child, what's wrong with that?
oddp Yeah, that's expected. Same as in ruby.
sjn 'z'.succ should be 'aa'; that's as expected
same in perl6
same in perl5* 09:19
moon-child hmmm
ab5tract oddp, ah, I see what you mean there
oddp Ruby gives me 4 elems for that range.
sjn file a bugreport :-D
ab5tract yeah and as demonstrated by moon-child++ that the explicit calls for the successor work as expected 09:20
m: say ^15.head(4)
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3say ^157⏏5.head(4)
^1
ab5tract m: say ^15 .head(4)
camelia (0 1 2 3)
ab5tract m: say ^"bb" .head(10) 09:21
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5bb' (indicated by ⏏)
in block <unit> at <tmp> line 1
ab5tract ok, that's quite fair camelia :) 09:22
m: "a".."bb".head(10).say
camelia WARNINGS for <tmp>:
(bb)
Useless use of ".." in expression "\"a\"..\"bb\".head(10).say" in sink context (line 1)
ab5tract m: "aa".."bb".head(10).say
camelia WARNINGS for <tmp>:
(bb)
Useless use of ".." in expression "\"aa\"..\"bb\".head(10).say" in sink context (line 1)
ab5tract m: say "aa".."bb".head(10)
camelia Seq objects are not valid endpoints for Ranges
in block <unit> at <tmp> line 1
ab5tract m: say "aa".."bb" .head(10)
camelia Seq objects are not valid endpoints for Ranges
in block <unit> at <tmp> line 1
ab5tract m: say ("aa".."bb").head(10) 09:23
camelia (aa ab ba bb)
ab5tract :S
I guess the heuristic is a cross-product of the endpoints
09:23 xinming left 09:24 xinming joined
ab5tract or, rather, the inner product? I need remedial math for a reason and I'm working on it (and will write about it to explain at some point) 09:24
oddp m: ("11".."22").head(10).say 09:25
camelia (11 12 21 22)
ab5tract definitely not the outer product
oddp Okay, I see. Thanks for the input, everyone!
ab5tract cross product of individual elements of the string? 09:26
m: say ("pretty".."cool").tail(20)
camelia ()
ab5tract m: say ("tt".."zz").tail(20)
camelia (xu xv xw xx xy xz yt yu yv yw yx yy yz zt zu zv zw zx zy zz)
ab5tract m: say ("tt".."zz").head(20) 09:27
camelia (tt tu tv tw tx ty tz ut uu uv uw ux uy uz vt vu vv vw vx vy)
moon-child m: say ("cool".."pret").tail(20)
camelia (prgs prgt prfl prfm prfn prfo prfp prfq prfr prfs prft prel prem pren preo prep preq prer pres pret)
ab5tract m: say ("tt".."vv").head(20)
camelia (tt tu tv ut uu uv vt vu vv)
ab5tract m: say ("tt".comb Z "vv".comb).head(20) 09:28
camelia ((t v) (t v))
ab5tract m: say ("tt".comb X "vv".comb).head(20)
camelia ((t v) (t v) (t v) (t v))
ab5tract m: say ((|"tt".comb) X (|"vv".comb)).head(20) 09:29
camelia ((t t v v))
ab5tract m: say ((|"tt".comb) X~ (|"vv".comb)).head(20)
camelia (ttvv)
ab5tract ok I will go to my own repl now :)
09:33 JJMerelo joined 09:40 Black_Ribbon joined 09:44 Black_Ribbon left 09:48 finanalyst joined 09:51 dolmen joined 10:02 Sgeo left
Kaiepi m: my Int:D $obj = 1; say role ::[Mu ::T] { has T $.obj; method type-of-obj(::?CLASS:D: --> Mu) { T } }[$obj].new(:$obj).type-of-obj 10:08
camelia Could not instantiate role '<anon|1>':
Too few positionals passed; expected 2 arguments but got 1
in any protect at gen/moar/stage2/NQPCORE.setting line 1216
in block <unit> at <tmp> line 1
Kaiepi m: my Int:D $obj = 1; role Foo[Mu ::T] { has T $.obj; method type-of-obj(::?CLASS:D: --> Mu) { T } }; say Foo[$obj].new(:$obj).type-of-obj 10:09
camelia (Int)
Kaiepi m: my Int:D $obj = 1; say class { has Mu $.obj; method type-of-obj(::?CLASS:D (::T :obj($)!): --> Mu) { T } }.new(:$obj).type-of-obj
camelia (Int)
Kaiepi m: my Str:D $obj = "a"; say class { has Mu $.obj; method type-of-obj(::?CLASS:D (::T :obj($)!): --> Mu) { T } }.new(:$obj).type-of-obj 10:10
camelia (Str)
Kaiepi interesting way to avoid type parameters in some cases 10:11
10:22 markong joined
tbrowder ah, a good Raku day to all! 10:26
i've finally discovered the joy of using App::Mi6: 10:27
and "release early, release often!"
10:28 markong left 10:29 markoong joined
JJMerelo tbrowder congrats! 10:35
10:35 pecastro joined
cpan-raku New module released to CPAN! Abbreviations (0.3.1) by 03TBROWDER 10:36
10:36 m_athias left 10:37 ribasushi left
tbrowder thnx, but i just saw an artifact in my generated readme that i'm trying to find the source of. it may be an mi6ism. going to tweak and release again. 10:38
10:39 moony left 10:40 moony joined 10:41 pecastro left, ribasushi joined 10:44 finanalyst left
tbrowder the "artifact" was produced by mi6 capturing some pod trailing declaration and showing at the end of the readme as a class Mu. 10:47
in my module i have the begin/end pod at the top of the file. i wonder if moving it to the bottom would change that behavior. 10:48
10:49 xinming left
tbrowder speaking of pod, i can't find p6doc nor rakupod on my machine!! 10:49
*or 10:50
10:51 xinming joined
tbrowder ach, re mi6, all i need do for now is put pod i want in the readme in its own file and name it in the dist.ini file or remove the trailing docs. with some published mi6 conventions mi6 could just extract the first chunk and leave all below the first chunk alone. 11:01
all pod below the first begin/end pod block. 11:02
11:05 holyghost left
cpan-raku New module released to CPAN! Abbreviations (0.3.2) by 03TBROWDER 11:06
11:14 sena_kun joined 11:16 Altai-man left 11:17 wamba left 11:18 wamba joined 11:33 JJMerelo left 11:50 fluca1978 left 11:55 Voldenet left 11:58 demostanis joined
demostanis Hello guys! I've been improving my code for my little project: github.com/demostanis/hubtodate I was wondering, where could I find people up to contribute? Should I publish it to p6c? 11:59
sena_kun demostanis, people who contribute are usually actual software users who have some free time. 12:03
demostanis Yeah, but where can I find people to use my software 12:06
?
sena_kun I am afraid there is no crowd of people who have nothing to do and waiting for projects to work on. It is usually people who have lots on their shoulders already and they contribute their time if they find it interesting or worthy in some way. 12:08
You can ask people who usually are here for help with some code, because some here enjoy helping out others and playing with code examples. 12:09
jnthn demostanis: Publishing it to p6c would probably make it easier for at least other Raku users to install and try out. 12:14
sena_kun Oh, if you are asking about using: well, there are various ways to promote things. Posting about it on SNS, writing blog posts, rakudo weekly etc. If it is nice, people will use it. 12:16
rockxloose A mention on HN will get you eyeballs. 12:23
tbrowder HN? 12:35
sena_kun HackerNews, news.ycombinator.com/ 12:37
tbrowder ah, another multiuse acro, thnx 12:39
rockxloose Eight doublings from one gets you 100 users. 12:42
demostanis I'll probably write up some stuff and publish it on p6c on I exit from the beta phase 12:44
sena_kun: What's SNS 12:45
?
s/on/once
Fuck, I'm tired today...
12:48 zacts joined 12:49 stoned75 joined
sena_kun SNS == social network sites, yet another abbreviation I used without thinking. :S 12:52
demostanis, ^
12:52 zacts left 12:53 zacts joined 12:54 aborazmeh joined, aborazmeh left, aborazmeh joined 13:01 wamba1 joined, wamba left 13:14 Altai-man joined 13:16 sena_kun left 13:21 ab5tract left 13:30 lucasb joined 13:31 stoned75 left 13:33 stoned75 joined 13:42 ab5tract joined 13:44 aborazmeh left 13:55 stux|RC left 13:56 dolmen left
jdv79 guifa2 its not red 13:57
it was tim bunce's JDBC type thingee iirc 13:58
rir: ^
13:58 stux|RC joined
jdv79 and i think it might be dead - repo hasnt been touched in a decade... blog.timbunce.org/2010/07/16/java2...d-whereto/ 14:03
14:04 Voldenet joined, Voldenet left, Voldenet joined, patrickb left
[Coke] wonders if it's confusing that the REPL doesn't output the result of 'say 3', but does output the result of 'note 3' (since we're only tracking stdout) 14:07
Geth_ doc/xref-x-nyi: 6df01fab06 | (Stoned Elipot)++ | doc/Type/IO/CatHandle.pod6
xref X::NYI
14:11
doc: stoned++ created pull request #3551:
xref X::NYI
14:14 patrickb joined 14:17 patrickb left 14:21 zacts left
demostanis My code can't compile and exits with 'Died' and saying it's at the line 2 of a file, which contains an import... 14:26
Everywhere where my code as a 'die', a log should appear before, but it doesn't 14:27
Error while compiling: Died at ............pm6 (My::Package):@ 14:28
s/'@'/2
El_Che missing ';' at the end? 14:34
demostanis There's no such error 14:35
But I just realized before getting those errors that I was using the old version of my code...
My code sucked all the time and I didn't even realize 14:37
El_Che that sounds like all code :) 14:38
demostanis My code wasn't good* 14:39
Missing serialize REPR function for REPR MVMContext (BOOTContext) 14:40
What does this even mean?
14:42 zacts joined 14:45 wamba1 left
El_Che demostanis: old rakudo? 14:46
github.com/rakudo/rakudo/issues/2544 14:47
demostanis I'm using 2020.07 14:53
I'm lost 14:55
Altai-man demostanis, can you provide some of your code?
demostanis My code is at github.com/demostanis/hubtodate/tree/broken 14:58
I cannot only give some parts, I don't even know where the errors come from
To prevent the compilation from dying, one needs to remove ', &die' from hubtodate/lib/HubToDate/Log.pm6
Oh wait, I think it wasn't logging when dying because of the «» 15:01
Altai-man demostanis, what if you remove `&` from `&die`?
demostanis Removing the & from die calls die?
Altai-man Yes.
demostanis Why would I do that? 15:02
Altai-man & sigil before routine name allows to refer to it, not call it.
15:02 natrys joined
demostanis Yep, I don't want to call it, I want to refer it 15:02
Altai-man Hmmm. 15:03
demostanis, how can I run it to reproduce your error?
15:03 gnufr33dom left
demostanis I've made a script in ./scripts/run.sh to run it inside of a docker container 15:03
./scripts/run.sh build 15:04
Builds the docker container
./scripts/run.sh run
Runs the docker container
Importing HubToDate::Release only makes the process die
Using the REPL
And removing the &die in HubToDate::Log only produces the weird error Missing serialize REPR function for REPR MVMContext (BOOTContext) 15:06
15:10 MilkmanDan left
demostanis [!!!] Failed to parse configuration file! 15:10
===SORRY!=== Error while compiling:
Died
yy
Probably why it dies. Why isn't this logged if I only import HubToDate::Release? 15:11
I think it's because the parser won't allow only a comment 15:13
Thus making HubToDate::Config fail
and every other module depending on it 15:14
But it doesn't log the errors
15:14 sena_kun joined 15:16 Altai-man left 15:34 rir left
ab5tract I'm not sure I will ever understand why it can be so difficult to get a gist to have the file I want on top. anyway, here is the basis for what I hope will be a decent argument for Raku's decision to have Rat as the default fractional representation gist.github.com/ab5tract/3e25e4a2c...01a85b6993 15:35
tellable6 2020-08-07T09:36:46Z #raku-dev <JJMerelo> ab5tract amazing. Good luck.
15:36 rir joined
ab5tract .tell lichtkind I think there may be an uninintentional falling back to rational math when matrices of nums are involved in Math::Matrix? gist.github.com/ab5tract/3e25e4a2c...01a85b6993 15:38
tellable6 ab5tract, I'll pass your message to lichtkind
15:38 rir left
ab5tract .tell lichtkind a bit unfair for Num to be "wrong", but also slow at being so :) 15:40
tellable6 ab5tract, I'll pass your message to lichtkind
demostanis My code now dies with Died with X::TypeCheck::Assignment... How do I get more info about what's wrong?? 15:41
A CATCH literally doesn't change anything 15:42
ab5tract .tell JJMerelo check scrollback for a gist that I'll be using tomorrow to finally _write_ this thing instead of researching it :) ... that gist will be all for today tho, I expect 15:43
tellable6 ab5tract, I'll pass your message to JJMerelo 15:44
guifa2 demostanis: the topic of a CATCH block is the exception. But an assignment typecheck should be fairly easy to diagnose based on the line it occured at 15:48
15:49 zacts left
demostanis I checked, the wanted type was List:D, I replaced it by Array:D but the same error still happens at the same line 15:50
role A { has Array:D @.arr; submethod BUILD(:@!arr) {} }; A.new: arr => <hello world>; 15:51
When running into a REPL, it says arr is of type Str?? 15:52
%(arr => <hello world>){"arr"}.^name # OUTPUT: List 15:54
p6: role A { has Array:D @.arr; submethod BUILD(:@!arr) {} }; A.new: arr => <hello world>;
camelia Type check failed in assignment to @!arr; expected Array:D but got Str ("hello")
in submethod BUILD at <tmp> line 1
in block <unit> at <tmp> line 1