🦋 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:04 shalom___ left, Manifest0 left 00:28 AlexDaniel joined 00:44 shalom____ joined 00:51 shalom____ is now known as Myrrh_ 00:57 lichtkind__ left 01:12 Myrrh_ left 01:29 ProperNoun left 01:30 ProperNoun joined 02:05 xinming left 02:07 xinming joined 02:27 jgaz left 03:50 AlexDaniel left 04:04 deoac joined 04:06 xinming left 04:08 xinming joined 04:28 mark22k left 04:29 mark22k joined 05:05 sivoais left 05:14 sivoais joined 05:34 teatime joined 06:27 Antim0des joined 06:42 Antim0des left, Antim0des joined 07:05 Antim0des left 07:12 jpn joined 07:57 amaz0n joined 08:00 amaz0n left 08:01 amaz0n joined 08:07 oodani left 08:08 oodani joined 08:14 justHaunting left 08:15 justache joined 08:22 Manifest0 joined 08:38 jpn left 08:40 sena_kun joined 09:19 amaz0n left 09:20 amaz0n joined 09:39 Sgeo left 10:02 lichtkind__ joined 10:13 committable6 left, committable6 joined 10:39 amaz0n left 11:39 teatwo joined 11:41 teatime left 11:49 justache left 11:50 justache joined 12:21 gcd left, sena_kun left 13:44 AlexDaniel joined 14:24 lucs left, lucs joined 14:58 jpn joined 15:05 xinming left 15:07 xinming joined 15:36 Util left 15:38 Util joined 16:00 guifa left 16:01 guifa joined 16:08 committable6_ joined 16:10 committable6_ left 16:49 deoac left 17:05 deoac joined 17:08 deoac left 17:16 sena_kun joined 17:35 teatwo left 17:39 teatime joined 17:47 Guest27 joined 17:48 Guest27 left
antononcube I sort of want to write a package that duplicates the functionalities of Python's "argparse", but looks like a fair amount of that is in the "Getopt::Long" module. Do you think it is a good idea to: 1) Extend "Getopt::Long" or similar package, 2) write a package "Python::ArgParse::Grammar", 3) write a package "Getopt::Grammar"? 17:56
18:09 linkable6 left 18:10 linkable6 joined
leont antononcube: Getopt::Long is written to be extensible, that route would be sensible to me. AFAICT the additional functionality is mainly a help generator 18:38
SmokeMachine Hi all!!! I've been reading about Elixir, does anyone here have played with it? I'm finding it very interesting... I started playing with it in Raku (github.com/FCO/OTPish) does anyone think something like this would be interesting? 18:45
antononcube @leont Thank you for your answer! I will study the code of "Getopt::Long". 18:46
leont hasn't played with Elixir, but has with Erlang a long time ago. It's pretty interesting, and wildly different from Raku 18:48
SmokeMachine leont: I've been only reading about it... but I really liked the "process way" of doing stuff... I really like the Hash example I've added on the README of that repo... I really think it can goes well with raku... 18:50
I've implemented the "process" with Promises... 18:54
Does anyone thinks something like that for Raku would be interesting? 19:08
antononcube @leont I decided not to mess (your neat) "Getopt::Long" setup. Meaning fork it, change it, make a PR. I decided to make "Getopt::Long::Grammar". 19:42
leont What are you trying to achieve exactly? 19:48
antononcube @leont Given a Jupyter chatbook made with Python kernel I want to be able to switch to a Raku kernel for that notebook and use the chatbook cells as they are, without changing the cells "magic specs." This means that I have to implement parsing of the argument specs the way Jupyter Python uses them. 19:52
19:52 AlexDaniel left
For example, I need this say getopt-interpret('my_command --option=value'); to produce {arguments => (Any), command => my_command, options => [{long-opt => {opt-arg => value, opt-name => option}, short-opt => (Any)}]} or something similar. 19:53
Geth CCR: raiph++ created pull request #5:
Create AaronSherman.md
20:01
leont I don't quite do the long-opt short-op distinction (and I don't know why anyone would think that's useful), but you can generally fake it by treating all single-character arguments as short 20:05
Geth ecosystem/main: f100c02d4c | (Elizabeth Mattijsen)++ | META.list
Remove Hash::Consistent

It lives in the zef ecosystem now
20:08
antononcube @leont Agreed -- no need to distinct short-opt and long-opt. I am simply trying to emulate Python's "argparse" (the way I understand it.)
20:29 Sgeo joined
@leont See examples of the preiliminary version here: github.com/antononcube/Raku-Getopt-Long-Grammar 20:50
leont Odds are you're not handling quoting correctly 20:52
You really want to split converting the string into an array, and then interpreting the array. That would be two reusable parts, together they're not really reusable. That's probably also why the name is wrong. 20:53
antononcube @leont Yeah, thanks. 21:14
SmokeMachine It also has a Stack implementation using GenServer now as example: github.com/FCO/OTPish 21:16
21:25 jpn left 21:51 AlexDaniel joined 22:04 lichtkind__ left 22:21 sena_kun left 23:38 teatime left 23:39 teatwo joined