🦋 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:08 aborazme- left 00:21 BarrOff[m] joined 00:26 guifa2 joined 00:31 guifa2 left 00:51 pecastro left 00:52 lucasb left 01:03 cydf left 01:14 sena_kun left 01:15 aindilis` joined 01:16 aindilis left 01:17 sena_kun joined 01:20 aindilis` left 01:23 Black_Ribbon joined 01:51 gnufr33dom joined 02:02 Kaiepi joined 02:12 Kaiepi left, Kaiepi joined 02:21 BuildTheRobots left, spacebat2 left, spacebat2 joined 02:23 BuildTheRobots joined 02:25 kvw_5_ left 02:27 kvw_5 joined, roguelazer joined 02:40 Kaiepi left 02:41 Kaiepi joined 02:50 Black_Ribbon left 03:06 Kaiepi left, Kaiepi joined 03:22 Garbanzo joined 04:22 linkable6 left, squashable6 left, bisectable6 joined, sourceable6 joined, greppable6 joined, committable6 joined 04:23 nativecallable6 joined, statisfiable6 joined, unicodable6 joined 04:24 evalable6 joined, shareable6 joined, benchable6 joined, coverable6 joined, quotable6 joined, squashable6 joined 04:25 tellable6 joined, linkable6 joined, aindilis joined 05:25 shareable6 left, linkable6 left, nativecallable6 left, benchable6 left, tellable6 left, committable6 left, evalable6 left, unicodable6 left, sourceable6 left, squashable6 left, bisectable6 left, coverable6 left, quotable6 left, statisfiable6 left, greppable6 left 05:26 nativecallable6 joined, tellable6 joined, benchable6 joined, notable6 joined, greppable6 joined, unicodable6 joined, committable6 joined 05:27 squashable6 joined, coverable6 joined, shareable6 joined, bisectable6 joined, quotable6 joined, sourceable6 joined 05:28 statisfiable6 joined, evalable6 joined, linkable6 joined 05:42 brtastic joined 05:48 parabolize left 06:01 Sgeo_ joined 06:04 Sgeo left
sxmx m: for ^3 say $_; 06:09
evalable6 (exit code 1) 04===SORRY!04=== Er…
sxmx, Full output: gist.github.com/d1256c452f7167e001...0a9794b8ce
sxmx m: for ^3 { say $_ };
evalable6 0
1
2
06:09 jmerelo joined 06:49 BuildTheRobots left 06:50 BuildTheRobots joined 06:58 ufobat joined 07:12 sjm_uk joined 07:16 Garbanzo left 07:27 wamba joined 07:32 Sgeo_ left 07:39 Xliff left 07:52 domidumont joined
summerisle m: .say for ^3 07:56
evalable6 0
1
2
08:00 PimDaniel joined 08:06 PimDaniel left 08:28 rindolf joined 08:48 MasterDuke joined 08:53 pecastro joined 08:54 dakkar joined 09:12 eater joined
andinus , 09:41
09:43 Scimon joined 09:46 natrys joined 09:49 cydf joined 10:16 aborazmeh joined, aborazmeh left, aborazmeh joined 10:28 aborazmeh left 10:40 oddp joined 11:01 gordonfish left 11:02 gnufr33dom left 11:03 kini joined 11:08 MasterDuke left, MasterDuke joined 11:22 wamba left 11:28 wamba joined 11:50 [Sno] joined 12:15 sena_kun left, Altai-man_ joined 12:49 linkable6 left 12:52 linkable6 joined 12:58 jmerelo left 13:01 pilne joined 13:43 ufobat_ joined 13:44 |Sno| joined 13:45 BuildTheRobots left, oddp left 13:46 [Sno] left, ufobat left 13:47 BuildTheRobots joined 13:50 oddp joined 14:26 MasterDuke left 14:27 MasterDuke joined
tbrowder hey, anyone else having probs accessing the docs? getting non-https error on my end with chrome 14:39
moritz tbrowder: works fine here (current firefox) 14:46
14:47 Kaiepi left, Kaiepi joined
tbrowder thnx, it's working now with both browsers 14:49
15:00 rindolf left 15:02 gnufr33dom joined 15:03 parabolize joined 15:05 Sgeo joined 15:07 rindolf joined 15:18 Kaiepi left 15:19 Kaiepi joined 15:46 domidumont left 15:48 domidumont joined 15:51 wamba left 15:59 RaycatWhoDat joined
RaycatWhoDat raku 15:59
oh
it ate my input
In any case, hello. I'm sure I've asked here before but who here is familiar with TXR? nongnu.org/txr 16:01
Every time I look at it, it fits my needs regarding workflow but it's not very pleasant to write. 16:03
I ask here because I'm not really using Raku to its fullest so one of three things needs to happen for me 16:10
1) Figure out other use cases for Raku that I might encounter. 2) Replace Raku with a tool that makes sense for me. 3) Drop Raku entirely (which I don't really wanna do because I really like the language). 16:12
16:14 RaycatWhoDat is now known as Raycat|Work, RaycatWhoDat joined 16:17 dakkar_ joined, dakkar left
sjn RaycatWhoDat: 4) Create some tooling that makes Raku useful with the workflow I would like to use 16:26
MasterDuke how/why isn't it useful for your workflow? 16:29
16:31 Raycat|Work left, epony left 16:42 gordonfish joined
RaycatWhoDat It is useful! 16:45
I just don't use enough of its features, I suppose. 16:47
Makes me wonder if I don't need to use a whole other language to achieve my goals.
(Usually simple text processing.) 16:48
perry I know right? That's why I still use COBOL.
(But yes, I often feel similarly with regard to Raku.)
(But that might be because I don't have enough experience or time to learn it effectively.) 16:49
I think the most successful thing I did with it was write a script that gave a solution to a NYTimes puzzle that got a reply from the Associate Puzzles Editor of the NYTimes. 16:50
16:50 gordonfish left 16:52 gordonfish joined 16:57 gnufr33dom left 17:02 jmerelo joined 17:06 Raycat|Work joined 17:10 epony joined 17:11 Raycat|Work left 17:14 PimDaniel joined
PimDaniel Hi. 17:14
Does anybody knows if we can make a kind of C union-like in Raku. I need of 3 int8_t. 17:15
tadzik if you need 3 of the same type, wy do you need a union? 17:16
PimDaniel tadzik: I'll make a kindof 24 bits type which i can use whole or part. 17:18
17:18 epony left
tadzik then you want a struct, not a union, I think 17:21
what is the problem you're trying to solve? 17:22
PimDaniel According to docs.raku.org/language/nativecall.html#CUnions, i can may be make it with NativeCall but i'll be carefull. 17:24
17:26 epony joined
PimDaniel I's difficult to explain what i'm trying to do for now. 17:26
cog__ When doing $file.IO.parent on windows, is it idempotent on the root of a partition ? 17:27
17:27 PimDaniel left 17:31 Scimon left
[Coke] If it's not something being passed to nativecall, I'm not sure mimicing a C union is necessarily helpful in Raku. 17:34
I also am curious what problem you're trying to solve.
17:35 dakkar_ left 17:45 Raycat|Work joined
lizmat cog__: probably ? 17:47
17:48 Raycat|Work left 17:49 Raycat|Work joined, Raycat|Work left, jmchael joined
[Coke] cog__: yes. 17:57
my $dir = $*CWD; say $dir while $dir = $dir.parent; gets to C:\ and then just repeats 17:58
18:06 aborazmeh joined, aborazmeh left, aborazmeh joined 18:10 PimDaniel joined
PimDaniel Hi again. 18:10
Suppose i type may variables :
May i declare many variables on one line of for example Int type? 18:11
The question is more how to do it if it's possible? 18:12
hooo i dit it : my Int ($a,$b,$c); 18:13
18:14 MasterDuke left
PimDaniel forgottend the struct/union : risky and not portable. 18:17
clear
18:17 PimDaniel left 18:18 aborazmeh left
cog__ Thx lizmat & [Coke] 18:19
18:23 |Sno| left 18:26 domidumont left 18:30 Black_Ribbon joined 18:35 squashable6 left 18:36 squashable6 joined 18:38 sjm_uk left 18:44 wamba joined 18:47 Garbanzo joined
RaycatWhoDat QQ: If I wanted to implement a new addition to the standard routines Raku provides out of the box, is there any benefit to implement it in NQP over just making an external module? 18:50
lizmat I think the consensus is that it is better to do it in Raku as an external module 18:51
once proven useful enough for inclusion in core, it can be nqp-ified if needed
game& 18:52
RaycatWhoDat Got it. 18:53
18:56 jmerelo left 18:59 sortiz joined
cog__ m: require lib 'lib' 19:05
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/5K6fOnq8iI
Redeclaration of symbol 'lib'.
at /tmp/5K6fOnq8iI:1
------> 03require lib 'lib'08⏏04<EOL>
cog__ Not possible to define libs dir a execution time ? 19:07
19:08 aindilis left 19:16 sortiz left, sortiz joined 19:17 sortiz left, sortiz joined 19:32 aindilis joined 19:35 cydf left, cydf joined
sortiz \o #raku 19:44
19:52 ufobat__ joined 19:56 ufobat_ left 19:57 Geth joined 20:08 aborazmeh joined, aborazmeh left, aborazmeh joined
tony-o cog__: one way is to append your cur to $*REPOS 20:14
20:19 ufobat__ left 20:27 ufobat__ joined
tbrowder sortiz: o/ 20:27
tony-o m: $l = $*REPO; $l.=next-repo while $l.next-repo.defined; $l.next-repo = CompUnit::Repository::FileSystem('lib'.IO); say $*REPO.repo-chain.tail; 20:30
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/rmRQ9Koqv1
Variable '$l' is not declared
at /tmp/rmRQ9Koqv1:1
------> 03<BOL>08⏏04$l = $*REPO; $l.=next-repo while $l.next
tony-o m: my $l = $*REPO; $l.=next-repo while $l.next-repo.defined; $l.next-repo = CompUnit::Repository::FileSystem('lib'.IO); say $*REPO.repo-chain.tail;
evalable6 (exit code 1) Impossible coercion from 'IO::Path' into 'CompUnit::Repository::FileSystem': no acceptable coercion method found
in block <unit> at /tmp/1I_i5r_R3P line 1
tony-o m: my $l = $*REPO; $l.=next-repo while $l.next-repo.defined; $l.next-repo = CompUnit::Repository::FileSystem(prefix => 'lib'.IO); say $*REPO.repo-chain.tail;
evalable6 (exit code 1) No such method 'CALL-ME' for invocant of type
'CompUnit::Repository::FileSystem'
in block <unit> at /tmp/GRBSyACjdN line 1
tony-o m: my $l = $*REPO; $l.=next-repo while $l.next-repo.defined; $l.next-repo = CompUnit::Repository::FileSystem.new(prefix => 'lib'.IO); say $*REPO.repo-chain.tail;
evalable6 file#/home/bisectable/git/whateverable/lib
tony-o there we go
AlexDaniel` where's camelia? 20:31
20:34 brtastic left
El_Che Hi AlexDaniel` 20:34
AlexDaniel` hello
tbrowder FYI, I'm near to publishing a major update to my PDF::Document module and wonder if anyone would like to give it a try. its current use is as a test bed for lifting most PDF::Lite up to a single Doc class with easy-to- use wrapper methods for creating PDF documents. As such it now functions very similar to the old Display PostScript or maybe WordPerfect or ed.
it currently has simple graphics (circle, ellipse, rectangle, polyline, polygon, and line). 20:36
there is an example program with it that demos all the working parts and it can be easily modified for custom output. 20:37
it has all 14 PostScript core fonts available, with para fill, underlining, kerning, and strikethrough. 20:38
eventually it will be used with other PDF modules to enable pod to PDF for a fairly sophisticated pod-to-pdf word processor. 20:41
sortiz tbrowder, looks great. 20:46
20:47 aborazmeh left
tbrowder well i hope it's useful, it will be for me for sure. web stuff is great, but i still like real paper! 20:48
sortiz Just a suggestion: In your example, it would seem more idiomatic to use 'with' instead of 'given'. 20:51
If I see a 'given' I expect one or more 'when'. 20:57
21:05 mowcat joined 21:10 Kaiepi left 21:11 Kaiepi joined 21:13 aborazmeh joined, aborazmeh left, aborazmeh joined
[Coke] m: "/".IO.parent.say # OOC. 21:17
evalable6 "/".IO
21:17 |Sno| joined
[Coke] (so it works on windows & elsewhere.) 21:17
21:19 MasterDuke joined 21:32 sono__ joined, mowcat left
tbrowder thnx, and 21:32
21:32 mowcat joined 21:35 Black_Ribbon left
tbrowder it would help if you would file issues. since you have looked at it i'll push the latest stuff (docs are behind, the example will be updated from the working prog in dev/make-example-doc.raku). 21:39
i'm trying to push now but having probs with git... 21:40
21:42 guifa2 joined 21:50 |Sno| left
cog__ tony-o, thx and interesting. But thus is has a low level taste I would like to avoid. 21:51
Lizmat, should I file a RFE ? 21:52
lizmat probably :-)
cog__ I am not even sure what the error message means 21:53
lizmat which error ? 21:54
21:54 notagoodidea joined
cog__ m: require lib 'lib' 21:55
evalable6 (exit code 1) 04===SORRY!04=== Error while compiling /tmp/ZrPBtnYWyD
Redeclaration of symbol 'lib'.
at /tmp/ZrPBtnYWyD:1
------> 03require lib 'lib'08⏏04<EOL>
notagoodidea guifa2: I just saw you reply on HN and... I found your proposal last week when looking at an old SO question about parsing binary with grammar I asked :D
lizmat cog__: yeah, that's LTA
notagoodidea btw I really liked the proposal and the interface design for the grammar proposed. 21:56
cog__ m: use lib 'lib'
evalable6
21:57 MasterDuke left 21:58 MasterDuke joined 22:02 jmchael left 22:04 aborazmeh left
guifa2 notagoodidea: I'll definitely develop it fully once RakuAST is in. Otherwise, it's going to be a lot of retooling now to just recode it all in a few months 22:14
22:19 natrys left 22:20 natrys joined
raku-bridge <ionsolo> tbrowder I always feel curiosity for your module to automation of making pdf, but never understanding where I should start because I never do that before, so.. where I should start? what I need before? 22:21
22:22 natrys left
tbrowder raku-bridge: hi 22:22
22:25 rindolf left
tbrowder david warring has a huge suite of low-level raku pdf modules. (see github.com/pdf-raku 22:25
my module's purpose is to make it easy for a user to essily create a pdf document without knowing too much about the insides of pdf. 22:27
but you do need some basic knowledge of typesetting, page layout terms, fonts, etc. i do not have a good tutorial to recommend at the moment. 22:29
so what do you want to do with pdf?
22:30 neshpion joined, notagoodidea left, notagoodidea joined
notagoodidea guifa2: Sorry got cut, what RakuAST bring to the table for the BinEx proposal? Leveraging macro? 22:31
tbrowder sortiz: i just pushed my latest to github 22:35
sortiz cog: 'lib' is a pragma, so only valid with 'use'. On the other side "require lib 'lib'" creates, at compile time, a package 'lib' and expect to import the symbol 'lib' from the 'lib' module. But you can't redeclare a symbol in the same scope. 22:37
22:39 stux|RC joined
tbrowder btw, one of the cool pdf graphics things i will have is a function to create an image of the moon at any desired phase (waning or waxing, northern or southern hemisphere), fraction of illumination, crescent and of course any desired radius. 22:40
*crescent angle
i have already created the function in postscript, and the pdf version should be easier. 22:41
22:43 wamba left
tbrowder sortz: now using with unstead of given, thnx! 22:57
23:00 notagoodidea left 23:12 ufobat__ left
sortiz tbrowder, I see that most of your methods in your roles just delegate to methods in, for example, $!page.gfx. Have you tried the 'handles' trait? 23:12
23:12 ufobat__ joined 23:13 mightypork joined
tbrowder no, not aware of that. frankly, i'm just racing to find the right pieces under the covers, and hope to tidy that more later. 23:14
23:15 RaycatWhoDat left, ufobat__ left
tbrowder pdf structure is LOTS different than postscript, but the translation is getting easier. 23:15
23:15 ufobat__ joined
[Coke] I am "had college classmates who would write their programs in postscript and have the printer execute them" years old. 23:17
tbrowder yep, that's the way it works
23:18 hvxgr joined
tbrowder a stack oriented language, and fun to program in 23:18
in that era we wanted to see a working graphics terminal with display postscript. 23:20
i do not know if any were ever available 23:21
[Coke] Next, no?
tbrowder maybe, i never saw one in operation 23:22
sortiz PS is a descendant of Forth
tbrowder ah, that's right! 23:23
[Coke] wonders if he still has his Modula-3 book. 23:26
tbrowder company i was with was an sgi user, and the only way we could print ps output was with a real ps printer (serial port) which i think was by apple. 23:27
1993
23:28 aindilis left, aindilis joined 23:30 aindilis` joined, aindilis left 23:31 aluaces left 23:32 aindilis` left 23:33 aindilis joined 23:35 kawaii left 23:36 mithaldu_ left, Grinnz left, peteretep left 23:37 peteretep_ joined, spycrab0_ joined, mithaldu_ joined, Grinnz joined, kawaii joined, spycrab0 left, spycrab0_ is now known as spycrab0, zostay_ joined 23:38 zostay left, zostay_ is now known as zostay 23:46 ufobat__ left