🦋 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.
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
summerisle m: .say for ^3 07:56
evalable6 0
1
2
andinus , 09:41
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
tbrowder thnx, it's working now with both browsers 14:49
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
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
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
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
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
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
[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.
lizmat cog__: probably ? 17:47
[Coke] cog__: yes. 17:57
my $dir = $*CWD; say $dir while $dir = $dir.parent; gets to C:\ and then just repeats 17:58
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
PimDaniel forgottend the struct/union : risky and not portable. 18:17
clear
cog__ Thx lizmat & [Coke] 18:19
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
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
sortiz \o #raku 19:44
tony-o cog__: one way is to append your cur to $*REPOS 20:14
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
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
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
[Coke] m: "/".IO.parent.say # OOC. 21:17
evalable6 "/".IO
[Coke] (so it works on windows & elsewhere.) 21:17
tbrowder thnx, and 21:32
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
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
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
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
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
tbrowder raku-bridge: hi 22:22
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?
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
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
tbrowder sortz: now using with unstead of given, thnx! 22:57
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
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
tbrowder pdf structure is LOTS different than postscript, but the translation is getting easier. 23:15
[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
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