00:02 librasteve_ left 00:15 arkiuat joined 00:20 arkiuat left 00:23 halloy9957 joined 00:38 oodani left 00:40 oodani joined 00:48 arkiuat joined 00:54 arkiuat left 00:58 halloy9957 left 01:14 arkiuat joined 01:16 hulk joined, kylese left 01:19 arkiuat left 01:32 arkiuat joined 02:15 hulk left, kylese joined
.landyacht. Does anyone have a good idiom for when you have a topic variable, and you need a CATCH phaser that does something with the topic? Inside CATCH the topic is the exception... 02:27
Voldenet typically in a lot of languages you can't do that, because try/catch have separate scopes 02:29
so `try { var x = "thing" } catch(Exception) { …x is not available here.. }` 02:30
but in raku I avoid topic variable whenever I have multiple topic variables
m: my $x = "foo"; die; CATCH { default { say $x } }; 02:31
camelia foo
Voldenet maybe you can avoid it somehow and access that topic variable, but it promotes convusion 02:32
confusion, even
in fact, in most languages I do the most similar thing: `string x; try { x = "thing"; } catch { …x is available }` 02:33
m_zero Hrm... just noticed that (elem) and (cont) are chaining... but, er, doesn't seem to make much sense. And, well, it compiles and runs, but doesn't seem to be useful in any real way: 'a' (elem) Set(<a b c>) (elem) Set(<a z>) # is equivalent to: ('a' (elem) Set(<a b c>) & (Set(<a b c>) (elem) Set(<a z>)) 03:20
Voldenet if you use both it has some sense 03:29
m: <f> (elem) <e f g> (cont) <g> 03:30
camelia ( no output )
Voldenet m: say so <f> (elem) <e f g> (cont) <g>
camelia True
Voldenet that way you can check if set contains both elements
it's one of these clever tricks I wouldn't use though ;p 03:31
it would probably make more sense if (elem) would allow sets as operators 03:33
e.g. <a b>.Set (elem) <a b c>.Set (elem) <a b c d> (elem)
and so on
but its usefulness would be extremely limited 03:34
m_zero I think that operation is called subset!
Voldenet :P
m: say <a b> (<) <a b c> (<) <a b c d>
camelia True
Voldenet yeah it makes sense :D
I've never used this operator but maybe I should use it instead of (elem) 03:37
m: say <a> (<) <a b c> # single-values are supported too
camelia True
03:57 constxd left 04:12 arkiuat left 04:16 arkiuat joined 05:23 Aedil joined 05:36 arkiuat left 05:55 itaipu left 06:04 arkiuat joined 06:09 arkiuat left 06:10 itaipu joined 06:19 Sgeo left 06:40 arkiuat joined 06:44 arkiuat left 07:14 arkiuat joined, DarthGandalf left
librasteve looks up (elem) vs (cont) … oh, I see 07:21
fwiw I find 4 ∈ (1, 2, 3); pretty useful in my code 07:22
07:24 abraxxa joined 07:26 arkiuat left 07:30 abraxxa2 joined 07:32 abraxxa3 joined, abraxxa left 07:36 abraxxa2 left
Voldenet i never use ∈ because I've lost my apl keyboard somewhere 07:45
it's readable, just there's no way to type it comfortably
07:50 arkiuat joined
ab5tract presumably a plugin could auto-replace the texas versions with the unicode versions, or present a user with a virtual keyboard. 07:50
Not that I could add it to raku-intellij-plugin, as the parser is currently beyond my comprehension capacity
I could present it as an inspection though 07:51
07:54 librasteve_ joined 07:55 arkiuat left 08:03 lichtkind joined
librasteve in the interests of -Ofun I have just found and installed IntelliJ Marketplace spec & math symbol plugin - I can now type SymbolElementOf, SymbolContainsAsMember and so on with autocomplete (so you have to learn you fingers to type symbol...) 08:07
now I jusy have to pin this to my wall unicode.org/charts/PDF/U2200.pdf 08:09
@mzero - since this pdf hows the official unicode names, then maybe they will be a good choice for the operator text? 08:14
08:17 arkiuat joined 08:22 arkiuat left 08:30 abraxxa joined 08:34 abraxxa3 left 08:45 oodani left 08:47 oodani joined 08:53 arkiuat joined 08:58 arkiuat left 09:02 abraxxa1 joined 09:05 abraxxa left 09:10 arkiuat joined
Voldenet I don't use any IDE though 09:11
just plain text editors 09:12
09:15 arkiuat left
Voldenet and the moment I start needing IDE, I know I need a refactor ;p 09:16
09:36 arkiuat joined 09:40 arkiuat left 10:10 arkiuat joined, apac joined 10:15 arkiuat left 10:20 abraxxa joined 10:22 melezhik_ joined 10:23 abraxxa1 left
librasteve yeah - I alternate vi and intellij 10:24
for a while i was using intellij for other things - php and so on - but need to find a way to stop sending them $$$ 10:25
id try the vi plugin for intellij - but way too laggy - otoh the RIP plugin is very cool 10:27
Voldenet yeah, I dislike IDEs because typing locally can be actually more laggy than round trip over ssh to vim and back 10:30
and it's the pattern that I see a lot 10:31
10:32 melezhik_ left 10:35 arkiuat joined 10:40 arkiuat left 10:49 elcaro left 10:50 elcaro joined 10:59 abraxxa2 joined 11:01 abraxxa left 11:09 arkiuat joined 11:13 arkiuat left 11:20 arkiuat joined 11:24 arkiuat left 11:52 arkiuat joined 11:57 arkiuat left 12:18 apac left 12:20 arkiuat joined 12:24 arkiuat left
patrickb I can really recommend zed. Responsiveness is a key feature. 12:32
(and they have a decent vim mode) 12:33
librasteve raku hilites?
lizmat oops, missed it yesterday: librasteve++ for the weekly! 12:38
librasteve tx!
12:46 arkiuat joined 12:51 arkiuat left 13:03 arkiuat joined 13:08 arkiuat left 13:21 arkiuat joined 13:24 melezhik_ joined 14:01 melezhik_ left, melezhik_ joined 14:06 melezhik_ left, melezhik_ joined 14:18 melezhik_ left, melezhik_ joined 14:23 simcop2387 left 14:25 shareable6 left 14:27 shareable6 joined 14:31 swaggboi joined 14:43 apac joined 14:59 simcop2387 joined 15:09 melezhik_ left, melezhik_ joined 15:13 stanrifkin joined 15:23 abraxxa2 left 15:31 meadow joined 15:46 human-blip left 15:47 human-blip joined 15:52 melezhik_ left 15:53 melezhik_ joined, melezhik_ left 16:04 meadow left 16:09 meadow joined 16:13 oodani left 16:14 oodani joined
arkiuat if I were going to set up keyboard shortcuts for the unicode operators, I would totally want the triggering keystrokes to be typing the texas operator. I wouldn't want to train my finger habits any other way 16:15
lucs If you're running the terminal under X11 and if it won't interfere with other mappings, maybe the the XCompose mechanism can help. 16:25
For example, I press the compose key followed by two "greater than"s to obtain ». 16:27
I use *a lot* of those combinations, especially in my personal documentation files. 16:28
I've remapped dozens of compose key combinations.
arkiuat that sounds like a good way
I'm not currently running under X11 tho 16:29
lucs Ah. Not sure how to do it in a plain console.
arkiuat but there are a bazillion different keyboard macro thingies out there
I use vi so I could just remap those sequences if I wanted to do it that way 16:30
lucs Oh, right, I've got them remapped in Vim too, but I'm pretty much always under X11, so I use the XCompose. 16:33
arkiuat there you go!
17:31 constxd joined 17:38 abraxxa joined 17:45 abraxxa1 joined, abraxxa left 17:46 abraxxa1 left 17:49 meadow left 18:15 melezhik joined
tbrowder can anyone find CSV::Writer on raku.land? 18:17
i can't, nor can i find it with zef. 18:18
supposedly it exists and was written by Jonathan and Moritz 18:19
i'm on Debian 11
18:22 DarthGandalf joined
SmokeMachine m: class Bla { our ::?CLASS constant Ble .= new }; say Bla::Ble # Should this work? 18:43
camelia ===SORRY!=== Error while compiling <tmp>
An exception X::Method::NotFound occurred while evaluating a constant:
Method Bla.new not found
at <tmp>:1
Exception details:
Method Bla.new not found
in block at <tmp> line 1
jubilatious1_98524 @tbrowder_04810 I've used Text::CSV (by tux) and CSV::Parser (by tony-o). But not the one you've cited. 18:45
tbrowder thnx 18:52
timo2 SmokeMachine: i would be surprised if you could create instances of a class before it's composed 18:55
which happens at the closing brace, as long as it's not a "..."
tbrowder chatgpt suggested it today, but i’m pretty sure i’ve seen it referenced elsewhere before. there is a Ruby CSV::Writer which confuses the situation 18:56
SmokeMachine timo2: it makes sense... but if I'm creating `class Logic::Ternary does Enumaration {...}` (that I didn't know was an option until earlier today, and it seems and it seems DNA on docs.raku.org/type/Enumeration does not work...), how can I create Logic::Ternary::True? 19:01
lizmat SmokeMachine: please ignore my suggestion of yesterday: it won't work, as you've found out 19:09
I just realized that I ran into that myself a few months ago, and worked around it for SBOM::CycloneDX
see github.com/lizmat/SBOM-CycloneDX/b...ms.rakumod for possible inspiration
note that in that case, the definitions of the enums actually live in resource files 19:10
SmokeMachine I'm doing it with class ... does Enumerable, it's kinda working... but I'm not being able to create constants with the enum values on it's namespace... :(
lizmat: ☝️ 19:11
lizmat: the code I'm doing looks like this: www.irccloud.com/pastebin/fb9aqpiE/ 19:12
lizmat and that doesn't work, I assume ? 19:14
SmokeMachine usercontent.irccloud-cdn.com/file/.../image.png 19:16
lizmat: it does...
Now I'm just trying to add Logic::Ternary::True/False/Unknown 19:17
lizmat but the False, True and Unknown don't get exported, right ?
19:18 Geth left, Geth joined
SmokeMachine yeah, it doesn't... I was planning adding a sub EXPORT for that. and let the user decide if they want it exported or not and as True/Unknown/False or True3/Unknown3/False3... 19:19
jubilatious1_98524 @tbrowder Hasn't been updated in 11 years: github.com/masak/csv
lizmat why not export KnownTrue / Unknown / KnownFalse 19:21
?
SmokeMachine it can also be an option
lizmat: do you have any suggestion on how can I add the Logic::Ternary::*? 19:22
lizmat well, adding them to Logic::Ternary: stash: would be a start, so Logic::Ternary::<KnownTrue> := ... 19:23
and possibly Logic::Ternary::EXPORT:: ? 19:24
my mind's a bit hazy in that area atm :-)
timo2 personally, i'd probably look at the code in Actions.nqp that handles creation of enums, and then see if using the MOP is a workable approach 19:25
don't we have COMPOSE phasers in classes?
is that still too early?
SmokeMachine I was initially trying to follow Bool... 19:27
lizmat COMPOSE doesn't exist: the mainline of the class is run at INIT time 19:28
SmokeMachine github.com/rakudo/rakudo/blob/main...ol.rakumod
lizmat actually, when the mainline is ran
m: say "running"; class A { say "foo" }; INIT say "bar"; CHECK say "zip"
camelia zip
bar
running
foo
lizmat m: class A { say "foo" }; INIT say "bar"; CHECK say "zip"; say "running" 19:29
camelia zip
bar
foo
running
tbrowder jubilatious1_98524: good find! i knew i had seen that a long time ago, just not in mixed-case. I remember wanting to use it but too many competitors at the time, lots still in flux 19:51
19:53 silug left
tbrowder anyone heard from @masak? 19:56
20:16 silug joined
SmokeMachine so... my tests are passing... time to add the features, like diferent ways for exporting... Any suggestions? currently I'm thinking on: 1) do not export values, 2) False/Unknown/True, 3) False3/Unknown3/True3, and 4) KnownTrue/Unknown/KnownFalse 20:33
arkiuat it seems with that many different options, I'd go with 1) at first, at least until actual usage shows which of the options is preferred 20:43
now that I see it, I really like the KnownTrue/Unknown/KnownFalse formualation 20:44
but if I were using this module, I wouldn't be put out by needing to specify which variety I wanted to import
20:45 melezhik left
ugexe technically KnownUnknown makes sense as well 20:54
21:02 kylese left
SmokeMachine usercontent.irccloud-cdn.com/file/.../image.png 21:03
21:18 Aedil left, apac left 21:30 Guest0 joined, Guest0 left
SmokeMachine Does that make sense? usercontent.irccloud-cdn.com/file/.../image.png 21:39
usercontent.irccloud-cdn.com/file/.../image.png 21:58
22:10 lichtkind left
SmokeMachine Released 22:21
22:25 stanrifkin left 22:35 Sgeo joined 22:44 arkiuat left