🦋 Welcome to the MAIN() IRC channel of the Raku Programming Language (raku.org). Log available at irclogs.raku.org/raku/live.html . If you're a beginner, you can also check out the #raku-beginner channel! Set by lizmat on 6 September 2022. |
|||
00:42
tadzik left
|
|||
antononcube | @calma 1) hi; 2) ok; 3) no; 4) depends on your interests . | 00:52 | |
01:22
tadzik joined
01:57
calma joined,
hulk joined,
kylese left
|
|||
scullucs | I'm so unhappy (refraining from swearing here) with all the "smart" formatting helpers out there. | 02:05 | |
Be it Markdown, Pod, whatever, they always get in the way of what I'm trying to do. | 02:06 | ||
02:15
hulk left,
kylese joined
02:26
calma left
02:30
kylese left
02:35
kylese joined
|
|||
Maybe I'm just ignorant. | 02:41 | ||
Here's what I want to do: | 02:42 | ||
Paragraph reads: | |||
There are also variations of the methods where their name can be changed by either, or both: | |||
(doing Pod here) | |||
I want that to be followed by three indented paragraphs describing those variations. | 02:43 | ||
But if I indent the paragraphs in Pod, they get formatted as 'code' and all the C<baz> stuff appears literally. | 02:44 | ||
Can this be done? | 02:46 | ||
Indenting a paragraph? | |||
Just indenting a paragraph? | |||
Haha! Okay, ignorant I am. In desperation, I prefixed each paragraph with - and they got indented (at least with the shell script that converts the Pod to Markdown then to HTML -- not sure how robust that all is). | 03:20 | ||
04:43
skyesoss joined
05:08
wayland left,
wayland joined
05:26
skyesoss left
06:08
Aedil left
07:01
sena_kun joined
07:43
calma joined
08:10
calma left
08:19
Sgeo left
08:23
Aedil joined
08:32
Aedil left
09:33
Aedil joined
11:13
xinming left
11:15
xinming joined
|
|||
tbrowder | scullocs: the rendering from pod to Markdown is a basic translator and i don't think a random '-' is significant in pod so it doesn't get any special handling. | 13:00 | |
you should be able to indent =item blocks which is kind of like indenting paras | 13:02 | ||
try: | 13:06 | ||
following your intro para, skip a line and start your first subpara with "item blah blah", skip a line and start subpara "=item blah..." etc. | 13:10 | ||
antononcube | @lizmat It did not occur to me to do a poll. And after you pointed that out, now I see the poll button... 🙂 | 13:18 | |
lizmat | TYL :-) | 13:19 | |
antononcube | Thank You, Lord! | 13:22 | |
lizmat | Today You Learned ? | ||
antononcube | Ten Years Later -- it did't take me that long... | 13:23 | |
@lizmat 🙂 I figured -- so, TYL on "TYL", also. | |||
@lizmat and @librasteve I deleted my previous post on Reddit -- thank you for your comments on it! | 13:24 | ||
My new Reddit post has a proper poll. (As prompted by lizmat.) | 13:25 | ||
lizmat | :-) | ||
13:27
foxieze joined,
foxieze left
14:15
hulk joined,
kylese left
|
|||
lucs | tbrowder: Turns out that ‹raku --doc=Markdown ⟨rakumod file⟩› converts "=item Subpara..." to " * Subpara...", but leaves "- Subpara..." unchanged. | 14:57 | |
But coincidentally, both forms get converted to "<li><p>Subpara…" in HTML produced by ‹markdown-calibre ⟨Markdown file⟩›. | |||
Not that I want "list item" indented paragraphs, but that will do. | |||
(I'll use "=item ...", it's more meaningful than "- ..." -- thanks for the tip.) | 14:59 | ||
tbrowder | lucs: can you show a gist of your pod file? something doesn't sound right. | 16:59 | |
[Coke] | ok, I like rak, but it definitely takes longer to install than ack. :) | 17:00 | |
tbrowder | and the second transformation is a different ballgame | 17:02 | |
with the =item you can create something like a titled subpara if you use =begin item followed immediately by a line with a subpara title, then a blank line, then paras separated by blank lines, finally a =end item closes it | 17:06 | ||
lizmat | [Coke]: there's quite a lot tests, have you tried with --/test | 17:24 | |
[Coke] | I hesitate to do that, but yah, makes sense. | 17:27 | |
lizmat | BTW, the next release of App::Rak will allow you to specify: "s:foo &!bar" as a search query | 17:28 | |
the s: for split on spaces for multiple queries | |||
the & to indicate the next needle should be and-ed with the previous, instead of or-ed | 17:29 | ||
and the ! means: should not | |||
so in other works: give me all the lines that contain "foo" but not "bar" | |||
17:30
xinming left
|
|||
lizmat | *words | 17:30 | |
antononcube | @lizmat Maybe a guide why using "App::rak" is more efficient than ack might convince Coke to rak it. | ||
17:32
xinming joined
17:47
Sgeo joined,
eseyman left
17:52
manu_ joined,
manu_ is now known as eseyman
17:57
xinming left
17:59
xinming joined
18:47
tadzik left,
tadzik joined
|
|||
[Coke] | a guide is not necessary | 18:56 | |
change is annoying. I'm still using ack v1 muscle memory | |||
lizmat | [Coke]: with the --save feature you can adapt rak to match your ack muscle mempry | 18:59 | |
*memory | |||
and if you do, please publish your list of aliases, I may well put that into rak as a feature | 19:00 | ||
e.g. --ack : accept all following arguments with ack semantics | 19:01 | ||
hmmm... | |||
19:06
rypervenche left,
rypervenche joined
|
|||
lucs | tbrowder: It's this file (er, I'd said it was a rakumod file, but it's actually a rakudoc): github.com/lucs/Debugging-Tool/blo...ol.rakudoc | 19:11 | |
At line 101 is the first of three '=item'. | |||
That file rendered to Markdown is github.com/lucs/Debugging-Tool/blo.../README.md | 19:12 | ||
antononcube | @Coke "a guide is not necessary", "change is annoying." -- This means a guide to ease the change is necessary. | 19:46 | |
[Coke] | ... no | 19:56 | |
it's not annoying -because I don't have a guide- | |||
having a guide -will not make it less annoying-. I already know how to use rak. :) | 19:57 | ||
but I appreciate you trying to help me out. thank you | |||
lizmat | github.com/lizmat/App-Rak/issues/53 [Coke] | 19:58 | |
antononcube | @Coke Honestly, I am looking for an excuses to revisit and extend this post/work: rakuforprediction.wordpress.com/20...e-manuals/ | 19:59 | |
lizmat | afk& | ||
[Coke] | lizmat: You don't have to do that for me, I'm not sure I'd use that. | 20:07 | |
But again I appreciate you. | |||
20:21
donaldh joined
20:22
donaldh left
|
|||
librasteve | @antononcube I voted | 20:23 | |
antononcube | Yes, please “vote often, and vote early.” | 20:24 | |
20:31
Aedil left
|
|||
tbrowder | lucs: are you happy with the results of the =items? they look okay to me. buit i do notice the later chunk of examples in the large code block need # in front of the internal comments. | 20:36 | |
lucs | tbrowder: Yes, I'm okay with the '=item' renderings. | 20:39 | |
The missing '#' are not accidental. The reader will have to think for half a second to realize that those lines are not code that should be commented out, but just comments. | 20:44 | ||
tbrowder | ah, i see. did i help or hinder? | 20:45 | |
lucs | Suggesting '=item' helped, it makes my Pod better than the '- ' I had found to render similarly. | 20:46 | |
tbrowder | how do you actially generate the Markdown README? | 20:47 | |
*actually | 20:48 | ||
lucs | I did 'raku -doc=Markdown .../Tool.rakudoc' | ||
And I realized this afternoon that doing 'rakudoc Debugging::Tool' won't show the contents of the Tool.rakudoc file :-( | 20:50 | ||
I'm guessing there's a good chance that can be arranged, but I have no idea how. | 20:51 | ||
tbrowder | reason i ask is your code looks like using App::Mi6 would help you do that automatically. i started using it when it was introduced some years ago and love it. @lizmat does too! | ||
i'll be happy to help if you'll accept a PR? | 20:52 | ||
lucs | Um, I do it kind of automatically, I'm Perl-lazy, so I wrote shell scripts to do it for me :) | ||
tbrowder | arg!! | ||
lucs | No worries, it works fine. | 20:53 | |
But like I said I would like to know how to get that Tool.rakudoc file rendered when invoking 'rakudoc Debugging::Tool'. | 20:54 | ||
tbrowder | ok, but you're missing out. among other things it make testing and publishing real easy. for instance, you want to rebuild all your docs: mi6 build | 20:55 | |
are your shell scripts in the repo? | 20:56 | ||
lucs | I used to use mi6. I don't anymore, but I used to. (sorry Mitch Hedberg) | ||
No, they're not. | 20:57 | ||
I understand where you're leading, and you're probably correct. | |||
tbrowder | do you mind saying why you quit mi6? it's improved a lot since skaji first released it | 20:58 | |
lucs | I can't remember. I should look at it again, it has been a while. | ||
tbrowder | for instance, a one-liner in yr dist.ini file can turn the pod in one file to its own Markdown. add more one-liners for other inputs | 21:01 | |
more complex stuff can also be done | 21:02 | ||
lucs | Yeah, it would make things better self-contained. | 21:04 | |
21:20
sena_kun left
|
|||
[Coke] | having trouble golfing this, but have a script that is erroring with: | 21:57 | |
No such method 'mutate' for string '`*%args`,' | |||
(the code is: $word = $word.mutate(:g, /<-alpha>+/, " ").words[0]; | 21:59 | ||
antononcube | @Coke Is subst doing what you want? | 22:09 | |
[Coke] | ... wait, mutate is just wrong, I had subst-mutate at one point and incorrectly updated it. | 22:10 | |
... why is only dying after so many values of $word?! weird. | 22:11 | ||
antononcube | I just read in the docs that subst-mutate is obsolete... | ||
[Coke] | Yup, used it in a oneliner, tried to update it in the script, and ... what a strange failure mode. | 22:13 | |
(ah. maybe it was the first file being tested that met any of the conditions (but not literally the first file in the list)) | 22:14 | ||
antononcube | 🤷♂️ | 22:23 | |
[Coke] | that was it. sorry for the spam | 22:25 | |
weird. using subtest and in some case it's nesting the subtest instead of completing it | 22:40 | ||
ab5tract | Maybe I'm holding things wrong, but this looks like a deeply insidious bug to me... | 22:42 | |
m: say from-json(to-json(%( array => [ %( i => "d", a => %( b => "c" ), d => %( e => "f" ))] ) ))<array>[0] | |||
camelia | {d => {e => f}} | ||
ab5tract | that should be `%( i => "d", a => %( b => "c" ), d => %( e => "f" ))` | ||
this also happens with JSON::Fast, I haven't checked other libraries yet | 22:43 | ||
doesn't matter if you change things to `{ }` brackets, either | 22:44 | ||
m: my %h; %h<array>.push: %( i => "d", a => %( b => "c" ), d => %( e => "f" )); say from-json(to-json(%h))<array>[0]; | 22:46 | ||
camelia | {a => {b => c}, d => {e => f}, i => d} | ||
tbrowder | ref my roundtrip problems the other day, they seem to be solved. using :bin on all pertinent files tested now seems to work. part of my badness was awkward use of slurp and spurt. i implememted subs slurp-file and spurt-file to have stricter control over the inputs. | 22:48 | |
ab5tract | sigh, I guess I'm holding it wrong, but it's late and the subtlety absolutely escpaes me... | ||
m: my %h; %h<array>.push: %( i => "d", a => %( b => "c" ), d => %( e => "f" )); say from-json(to-json(%h))<array>[0]; say %h ~~ %( array => [ %( i => "d", a => %( b => "c" ), d => %( e => "f" ))] ) | |||
camelia | {a => {b => c}, d => {e => f}, i => d} False |
||
[Coke] | <-alpha> is "not alpha". how to combine with <-digit> in the same class? | 22:52 | |
ugexe | <-alpha -digit> ? | 22:56 | |
(i am indeed guessing) | |||
ab5tract | into a single class, not sure (but also curious why that would be necessary?) | 22:59 | |
m: "9e" ~~ /<-alpha>&<-digit>/ ==> say() | |||
camelia | Nil | ||
ab5tract | surprised this didn't work: | 23:02 | |
m: "9e" ~~ /<!:L+:!N>/ ==> say() | |||
camelia | 「e」 | ||
ab5tract | but I'm frustrated enough at the moment so I'll avoid diving deeper | ||
I hope you find a suitable solution [Coke] | |||
ugexe | m: for " ", 1, "a" { say so $_ ~~ m/<-alpha -digit>/ } | 23:03 | |
camelia | True False False |
||
ab5tract | ugexe++ | ||
23:38
modula joined,
defaultxr left
|