»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or rakudo:, or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_logs/perl6 | UTF-8 is our friend!
Set by moritz on 22 December 2015.
BenGoldberg Save your intermediate results to a file after every successfully processed page; when you get to the end, read the file in and exit(0). Write a wrapper program which restarts the program when it crashes. 00:00
AlexDaniel yeah, that's I'm pissed off 00:02
took 30 minutes to write the scraper, and several hours trying to work around all of the issues
70 lines of code, and now I'll double or trible that number trying to do what you've just said 00:03
that said, as long as I'm not fixing memory leaks or segfaults, I think I have no right to complain… 00:04
00:05 cyphase joined 00:10 Cabanossi left 00:11 Cabanossi joined 00:13 cyphase left, gdonald left 00:14 gdonald joined 00:18 cyphase joined 00:21 dj_goku left
AlexDaniel AW YEAH, much better! 00:21
BenGoldberg :) 00:24
00:24 cyphase left 00:26 andrei9999 left
AlexDaniel fwiw: github.com/sergot/http-useragent/issues/169 00:27
00:28 cyphase joined 00:29 BenGoldberg left
AlexDaniel hm… OK, it's better. Now with only ≈5 MB leaking per page, I'd be able to parse 2000 pages using 10GB RAM. That might work 00:32
00:32 bjz left 00:34 dj_goku joined 00:37 cyphase left 00:39 wamba left 00:41 cyphase joined 00:47 thowe_work left 00:49 cyphase left 00:54 cyphase joined 00:57 bjz joined 00:58 bjz left 01:00 labster left 01:02 cyphase left 01:03 BenGoldberg joined 01:07 cyphase joined 01:11 cyphase left 01:18 LeCamarade left 01:26 nbrown joined 01:38 Cabanossi left, bjz joined 01:41 Cabanossi joined 01:43 sufrostico left 01:44 sufrostico joined 01:45 ilbot3 left 01:47 ilbot3 joined, ChanServ sets mode: +v ilbot3 01:50 sufrostico left 02:01 raschipi joined 02:09 Cabanossi left 02:11 Cabanossi joined 02:27 Ben_Goldberg joined, BenGoldberg left, Ben_Goldberg is now known as BenGoldberg 02:31 raschipi left 02:36 noganex joined 02:39 noganex_ left 02:40 kurahaupo__ left 02:48 labster joined, kurahaupo left 02:57 BenGoldberg left 03:01 rpburkholder left 03:04 Luna521 joined 03:11 skids left
ugexe gfldex: you might look at github.com/ugexe/Perl6-Distribution--Common - specifically ::Git 03:11
03:12 Luna521 left 03:13 BenGoldberg joined 03:14 Luna521 joined
ugexe that would even respect .gitignore, because it uses `git ls-files` to get its file list 03:14
03:17 Luna521 left, Luna521 joined 03:21 Luna521 left
ugexe eventually zef will be backed by those, but they don't work on earlier version of 6.c 03:22
infact Distribution::Common's whole purpose was to see how an additional required method, `ls-files`, would work with the current Distribution interface to solve the "which files to use if i dont have a manifest?" problem 03:38
03:44 bjz left 03:53 Cabanossi left, Luna521 joined 03:55 Cabanossi joined 03:58 Luna521 left 04:00 Luna521 joined 04:02 bjz joined 04:03 gdonald left, gdonald joined 04:10 Luna521 left 04:16 ryan_ joined
ryan_ newby question... anybody here using atom's vim-mode-plus for perl 6 editing? 04:19
04:21 nbrown left 04:22 skaji_ is now known as skaji
MasterDuke ryan_: i don't use atom, but i know a couple people here do, there's a wiki somewhere about using it for perl 6 04:29
huggable: atom
huggable MasterDuke, nothing found
MasterDuke huggable: Atom
huggable MasterDuke, nothing found
MasterDuke huggable: Perl 6 IDE 04:30
huggable MasterDuke, nothing found
MasterDuke huggable: Perl6 IDE
huggable MasterDuke, nothing found
MasterDuke ryan_: oops, not a wiki. github.com/perl6/Atom-as-a-Perl6-IDE
.seen sergot 04:32
yoleaux I saw sergot 11 Mar 2017 15:51Z in #perl6: <sergot> sjn: have you solved the http::useragent issue somehow? :)
04:35 Todd__ joined
MasterDuke .tell sergot fyi, i just created a PR in github.com/sergot/openssl that gave me a measurable speedup using HTTP::UserAgent to get an HTTPS url 04:35
yoleaux MasterDuke: I'll pass your message to sergot.
Todd__ Hi All, something weird just happened to my perl6:
$ perl6 -v Unhandled exception: While looking for 'ModuleLoader.moarvm': no such file or directory
same message when running "zef" 04:36
MasterDuke Todd__: how did you get/built your perl6? 04:38
Todd__ rakudo-star-0.0.2016.11-1.el7.x86_64
from the rpm
And I did not do anything to since
MasterDuke you're on centos7? 04:40
or rhel7?
Todd__ close. Scieltific Linux 7.3, which rebases centos 04:41
scientific
MasterDuke did you use yum to install from a repo or did you download from the rakudo page?
Todd__ yum --enablerepo=epel* install rakudo-star 04:42
that was about two months ago. it has been working since. Would a reinstall screw it up?
MasterDuke well, there's a 2017.01 star, so that repo is out of date
reinstalling should be fine 04:43
Todd__ When I try to reinstall, I get : Installed package rakudo-star-0.0.2016.11-1.el7.x86_64 (from epel-testing) not available 04:44
I wonder if it has been pulled? "whatprovides" still shows it 04:45
MasterDuke if you don't mind installing an rpm directly (and just regular rakudo, not star), El_Che has packages here github.com/nxadm/rakudo-pkg/releases 04:46
Todd__ what is non-star?
EPEL now has: dl.fedoraproject.org/pub/epel/7/x8...x86_64.rpm 04:47
MasterDuke same perl6, just without all the additional modules bundled
Todd__ star had almost no modules anyway that I could tell. I had to zef them all
MasterDuke i.e., you'll probably have to use zef to install the modules yourself
Todd__ do I need to do an uninsall on rakudo-star first 04:48
MasterDuke i don't really know the redhat distros enough to say, but that seems like a good idea 04:49
Todd__ interesting rakudo-start was an 18M package to unbinsall; regular is also 18M 04:51
# perl6 -v This is Rakudo version 2017.02 built on MoarVM version 2017.02 implementing Perl 6.c. 04:52
MasterDuke Todd__: huh, maybe they didn't actually have star in the first place. would explain why you had to zef everything 04:53
buggable: eco sum 04:54
buggable MasterDuke, Found 5 results: String::CRC32, Sum, Business::CreditCard, Concurrent::Iterator, MetaCPAN::Favorite. See modules.perl6.org/#q=sum
Todd__ makes sense. zef is now broken
rebuilding zef 04:56
can't win: # perl6 -Ilib bin/zef install . ===> Testing: zef:ver('0.1.5'):auth('github:ugexe') ===SORRY!=== Could not find Test at line 2 in: /home/linuxutil/zef/lib /root/.perl6 /usr/share/perl6/site /usr/share/perl6/vendor /usr/share/perl6 CompUnit::Repository::AbsolutePath<71479552> CompUnit::Repository::NQP<54652192> CompUnit::Repository::Perl5<54652232> 04:59
MasterDuke might need to ask ugexe, i don't really know zef 05:01
Todd__ not finding how to uninstall zef 05:07
I uninstalled again and deleted /usr/share/perl6; I am updating updatedb; then I will install the one from rakudo-pkg 05:16
ugexe well you could just run it with --/test to disable testing, but rakudo isnt finding your perl6 libs anyway (or it would have found Test.pm) 05:25
05:25 Luna521 joined
Todd__ I am fighting with pathmunge to get the path to perl6 correct. The two rpm used different install location. AAHHHH !!! 05:26
05:27 ryan_ left
Todd__ I have to log off and log back in, so I will get back if it doesn't work 05:27
05:28 Todd__ left
ugexe you can use an uninstalled zef to uninstall and install modules too 05:28
05:28 ryan_ joined
ugexe from anywhere 05:28
05:32 Luna521 left 05:33 llfourn left 05:37 vendethiel left 05:39 Cabanossi left, todd__ joined 05:40 Cabanossi joined
todd__ hi, I am back. I uninstalled and erased everything I could find. Then reinstalled nsadm's epel centos release. Had to update my paths in /etc/profile to 05:41
pathmunge /opt/rakudo/bin after
Voldenet eh, whenever I recompile perl I tend to just remove ~/.perl and reinstall zef
todd__ and make a link # ln -s /opt/rakudo/bin/perl6 /usr/bin/perl6
Voldenet faster
todd__ I am back and running. zef too. Thank you for all the help.
My guess is that epel screwed up something royalls. SO I think I will stay on nxadm for now 05:42
question. I have #!/usr/bin/perl6 as my first line. so, or course, the rpm and nxadm use different paths. The link cured that. Sounld I not use that as a first line? is there a way to look at both paths in the first line? 05:43
ugexe #!/usr/bin/env perl6 ? 05:46
samcv hello todd__ Voldenet and all
todd__ Hi Sam! I have been in panic mode, but I think I am on the right path now 05:48
ugexe openssl bumped to 0.1.8 with MasterDuke's leak fix
AlexDaniel MasterDuke: oh wait, so is it still leaking or is it 268Mb of some other cruft?
05:49 ryan_ left 05:50 ryan_ joined 05:52 ryan_ left 05:53 ryan_ joined
todd__ I am probably going to get the figure shaken at me for this, but I reported it anyway: 05:56
github.com/nxadm/rakudo-pkg/issues/9
05:56 ryan_ left 05:57 ryan_ joined
todd__ need best practice: if various releases of rakudo are going to install in different places (in Linux), is it best to leave the `#!/usr/bin/perl6`off and run everything the hard way with `perl6 xxx.pl6` and remove the bash first line path? I am trying to make things univeral across Liux machines 06:00
I am about to post this on the mailing list, whre other can take their time answer it. 06:12
Thank you all for the help. I am runnign again. And I did not even utter one cuss word! Man EPEL screwed things up! Bye bye 06:13
06:14 todd__ left
Voldenet samcv: hello there, apostle of perl6 ;) 06:15
06:15 domidumont joined 06:16 BenGoldberg left
Voldenet I was going to respond todd__ to use the "env" version, because he can in fact control PATHs 06:16
06:17 domidumont left
samcv is the mailing list any good? i'm not on it 06:17
not sure if i should be. maybe good idea?
get enough mail as is, but no excuse not to get more mail
Voldenet hmmmm, maybe, I don't set up any new ones because of the emails flood 06:18
06:19 domidumont joined, bjz left 06:22 Cabanossi left 06:25 Cabanossi joined
samcv i've started to set up filtering 06:26
but i think i've lost some email cause idk where they are 06:27
and should have more email than i do. pretty sure i wuold have gotten an email about the rakudo project in the last 15 days by now
though it's working fine for the other filters so idk. maybe github changed my setting. 06:28
and need to fix it because although it's filtering into folder some of the unicode maillinglist i still am getting floods of email threads. 06:29
much email. very wow
06:31 ryan_ left, ryan_ joined
samcv lots of silly discussion with the emoji release, people uselessly arguing over what 'recommends' in the technical report means 06:32
Voldenet when I was younger I thought getting many emails is good, because I'm important, heh :D 06:34
samcv usually a mix of script based questions and sometimes technical questions and such
though there is some thread in the huge like tree shape the unicode emoji 5.0 characters now being final thing 06:35
about stability of country codes and such which idk. i guess maybe sounds boring but it's at least important. not arguing about what 'recommends' means. and then peolpe finally settle on that recommendhs means... drumroll. "recommends" 06:36
which i could have told you but. whatever
06:37 RabidGravy joined
Voldenet heh, I'd advise against using such fuzzy terms, I'd use "suggests" instead ;-) 06:37
samcv that's different though 06:38
i mean recommends means that it is recommended but not required
Voldenet and suggest means it's a good practice but not required
pretty much
samcv and is not needed to be Unicode compliant and other systems should not assume conformance with said recommendation
but they use recommended in many documents. which is loose and not really a strong technical thing 06:39
06:39 wamba joined
samcv well. it's recommended. idk how else to say it. lol 06:39
and people arguing about flags 06:40
Voldenet actually, RFC is pretty clear on what "RECOMMENDED" means
samcv angry because england and wales got flags because of sports
This word, or the adjective "RECOMMENDED", mean that there 06:41
may exist valid reasons in particular circumstances to ignore a
particular item, but the full implications must be understood and
carefully weighed before choosing a different course.
yeah. exactly
Voldenet meaning "implement it unless you're working on 10kb ram"
samcv and people not understanding how unicode chooses things 06:42
"i am mad because these symbols are used more in practice than mine, and they were included. becuase i don't care about sports"
"but i care about XYZ"
Voldenet unicode could just set up a code for inline bitmaps just for them :-) 06:45
that'd be a great april fools joke
samcv well that is their recommendation
in the technical reports even now. for a long time
to implement images 06:46
Voldenet uhh, hmm I can imagine hardware being fast enough for this, but it adds a layer of complexity nobody really needs
samcv also there is no reason why a vender can't allow use of a flog not on their list. if it follows unicode's rules
for how they should be laid out
that is the best way for it to be officially included in the next revision 06:47
dlike it says california is not a standard sequence, but gives an example of how that would be laid out, and for some other non country things 06:48
Voldenet hmm, there are also political things at play, some people would see Basque or ISIS with separate flags for instance 06:49
samcv lol
TEttinger hehe unicode emoji is a silly thing to argue about because it's a silly thing in general
samcv depending on what it is yeah
Voldenet TEttinger: well, I can't imagine any font fully implementing unicode
some fonts try, but I doubt they're complete 06:50
samcv just becuase it's not on the list doesn't mean unicode hasn' already defined how to properly construct it
but it's touchy for some people
TEttinger U+1D00D DEPICTION OF THE PROPHET MUHAMMAD, BLESSED BE HIS NAME 06:51
samcv they basically just made it have certain 'standard' onnes to support emoji 5 or whatever, which was some more popular flags. which will get people to integrate support for those encodings of those flags
which will then... make it easier to add flags for less popular things
TEttinger and then with joiners...
samcv so they should not be unhappy
Voldenet TEttinger: actually U+1D00D is "Byzantine Musical Symbol Apeso Ekfonitikon" 06:52
TEttinger you could have genderbent muhammad emoji, not controversial at all
ha
Voldenet I don't know how it actually looks like, because none of my fonts support it
samcv Indeed, why isn't the flag of Texas there already so as to terminate
the abuse of <U+1F1E8, U+1F1F1>. Technically, at least, it has the
justification of being a formerly independent country, though I don't
know that they have any national teams.
Is anyone working on the issue of flags for the whole of Ireland?
Different sports have their own 'national' flags.
ok gotta stop reading this particular thread
TEttinger haha
samcv they showed an example for how one would construct a california flag. and then next to it said it was not official but conformant with construction. idk 06:53
people don't understand that i guess. that they basically handed them the way to make texas
06:53 Cabanossi left
TEttinger I mean... what we need is some kind of turing-complete way to describe Unicode encodings 06:53
samcv don't we already
TEttinger procedural unicode version generator
samcv also define describe
Voldenet TEttinger: 0xBITMAP
TEttinger hehe
samcv what do you mean by describe 06:54
TEttinger declarative language that can define an arbitrary sub/superset of unicode graphemes and use it in some cross-compatible way
including, for example, defining a texas flag as they do
but assigning it to its own codepoint in the subset 06:55
06:55 Cabanossi joined
Voldenet I think only regular letters (or symbols, in any language) should be a part of the official UTF standard, bitmap should work for the rest 06:55
TEttinger yes.
dingbats and emoji are really sketchy
Voldenet fonts can't think of other ways to display flags, so it's just a bit silly to include them
TEttinger but it kinda needs better vector support than a bitmap, since most fonts aren't bitmap fonts 06:56
Voldenet Okay, some emoticons can be included, but ehm... flags?
I can imagine having "asian people" font for emotes or "monkeys"
TEttinger since those originated on japanese phones?
but everyone uses them
Voldenet I try not to, it makes me look silly. 06:57
TEttinger every cultural group has people who use them
u-ou how do you reference a method like &foo for sub foo?
TEttinger (not the Amish, though)
Voldenet u-ou: you mean as an argument? 06:58
m: sub x(&my-sub) { my-sub() }; x({ say "I work!" }) 06:59
camelia I work!
u-ou you can reference the subroutine 'foo' without calling it like &foo. but how do you do that with a method?
Voldenet ah
u-ou actually. maybe I don't need to. but I'm interested now. 07:00
I might just use an anonymous function
samcv well. people use emoji and flags to communicate. and that's unicode's job. to enable the interoperability of the display of graphics with semantical meaning
TEttinger but each carrier displays them differently 07:01
and each font!
samcv they are used by people to communicate. so therefore they are important. same with many different scripts, and they added dingbats to allow conversion between encodings which already were encoded that way
that is not unicode's fault 07:02
like apple changing pistol to a ray gun. that's not what it is. it's the symbol for a pistol
you can't just change what the meaning of the codepoint is because reasons 07:03
that goes against the whole spirit of unicode and interoperability
07:03 ufobat joined, bjz joined
Voldenet m: class a { method m() { say "m"} }; sub b(&m) { say "b"; m(); }; my $x = a.new; say b(&{$a.m}) 07:06
camelia 5===SORRY!5=== Error while compiling <tmp>
Variable '$a' is not declared
at <tmp>:1
------> 3say "b"; m(); }; my $x = a.new; say b(&{7⏏5$a.m})
Voldenet m: class a { method m() { say "m"} }; sub b(&m) { say "b"; m(); }; my $a = a.new; say b(&{$a.m})
camelia b
m
True
Voldenet u-ou: ^
in fact 07:07
m: class a { method m() { say "m"} }; sub b(&m) { say "b"; m(); say "/b"; }; my $a = a.new; b(&{$a.m()}) 07:08
camelia b
m
/b
Voldenet samcv: but the emoticons can have bigger or smaller eyes, "pistol" doesn't have to be any special model/color 07:09
u-ou didn't you just make an anonymous function that calls a.m
Voldenet u-ou: but look at the output, /it works/ ;D 07:10
samcv well it has to be a pistol
not something that is a fictional toy weapon
u-ou well, that's probably all I need
Voldenet u-ou: actually, just {$a.m()} would suffice
samcv also. they should maintain consistent color
u-ou yeah 07:11
I wonder if you can ref. methods though
Voldenet samcv: too late, on my system it's silver pistol, but on reference graphic it's black 07:13
u-ou oh well. I'll just use an anon. func. 07:14
RabidGravy boom! 07:15
TEttinger I mean, there's more than one color of pistol. you could use the skin color selectors on it if they were open-minded enough to allow more arbitrary colors. maybe I identify as green man 07:16
07:16 rindolf joined
TEttinger maybe flag color selectors? not sure how it works 07:16
samcv lol TEttinger 07:17
TEttinger maybe my pistol is made of stitched together human flesh 07:18
pretty sure that's a zombie attack in the Disgaea series
Voldenet some flags actually have colors described in CIELUV
TEttinger oh wow
nepal is a weird one 07:19
the two triangles
07:20 mr-foobar joined 07:22 Cabanossi left 07:25 Cabanossi joined
Voldenet TEttinger: unicode.org/reports/tr51/#Diversity 07:25
You actually can be green
TEttinger hooray 07:26
now can I be a color that is brighter than white light
I am actually pretty pale!
or could I be vantablack, the blackest shade of black currently prodicible... 07:27
Voldenet: that restricts it to 5 skin colors, it seems 07:30
Voldenet Whoa, that's totally racist. My green people will hear of this
TEttinger greengos 07:31
Voldenet ;D
rindolf Hi all 07:33
Voldenet welcome 07:34
rindolf Voldenet: sup? 07:35
Voldenet nothing much, hating on modern communication standards ;)
u-ou my brain is so tired 07:36
07:41 ryan_ left 07:49 nadim_ joined 07:51 Tonik joined 07:56 RabidGravy left 08:01 espadrine_ joined 08:03 Wanderer68 joined 08:04 RabidGravy joined, dct joined, domidumont left
RabidGravy have they changed the font on github recently or are my eyes worse than they usually are on a Saturday morning? 08:16
lizmat I think they use a special font for pirates 08:50
08:51 titsuki left 08:53 Cabanossi left 08:55 Cabanossi joined
RabidGravy sounds about right :) 08:59
I don't suppose anyone can remember off the top of their head where in the code parameter coercion is implemented? 09:01
lizmat FROGGS would know, perhaps timotimo
RabidGravy presumably in the parameter binding bit somewhere, but I am struggling to find it 09:03
09:04 rpburkholder joined
RabidGravy not being obviously able to implement Foo(Str) without augmenting Str finally bugged me enough to think about it 09:08
09:11 rindolf left 09:16 cog_ joined 09:17 labster left 09:19 rindolf joined 09:20 rpburkholder left
RabidGravy Oh it looks like it's in Ops.nqp - not that easy to fix from user code then 09:21
09:23 cog_ left
Woodi hi #perl6 :) 09:31
so what is minimal bitmap resolution for all Unicode chars ? in 8bit computers 8x8 was enough :) 09:33
09:42 setty1 joined 09:43 Peter_R left 09:44 mr-foobar left, Peter_R joined, mr-foobar joined 09:53 Peter_R left, Cabanossi left, Peter_R joined 09:55 Cabanossi joined, pmurias joined
Voldenet m: class x { submethod BUILD { say "i live" }; submethod DESTROY { say "i die" }}; { my $x = x.new(); undefine $x; }; 10:06
camelia i live
Voldenet Hm, am I doing something wrong? 10:07
lizmat Voldenet: Perl 6 doesn't have predictable destruction 10:13
if you want to make sure something gets destroyed when leaving a block, you will have to do it yourself
m: class x { submethod BUILD { say "i live" }; submethod DESTROY { say "i die" }}; { my $x = x.new(); LEAVE $x.DESTROY }; 10:14
camelia i live
i die
Voldenet hmm, that's quite golang-ish
does perl have some cool feature for that, like C++? 10:15
lizmat in a bigger program, .DESTROY *will* be called as soon as $x is kicked in a GC run
but if you have a small program, rakudo perl 6 just lets the OS take care of cleanup
Voldenet m: use nqp; class x { submethod BUILD { say "i live" }; submethod DESTROY { say "i die" }}; { my $x = x.new(); undefine $x; }; nqp::force_gc()
camelia i live
lizmat m: use nqp; class x { submethod BUILD { say "i live" }; submethod DESTROY { say "i die" }}; { my $x = x.new(); undefine $x; }; nqp::force_gc; nqp::force_gc 10:16
camelia i live
i die
10:16 llfourn joined
Voldenet ah, wonders of GC 10:16
10:16 Peter_R left
lizmat actually, a GC run will mark the object first 10:16
a subsequent run will actually call the .DESTROY 10:17
Voldenet oh, moar's GC doesn't do generations?
lizmat Voldenet: moar uses a nursery approach
Voldenet hm
nothing too wrong with that I suppose 10:18
lizmat www.amazon.com/Garbage-Collection-...1420082795 # the theory implemented in Moar
10:18 Peter_R joined
Voldenet hm, sorry, I don't have that book 10:20
but it's mark and sweep, right?
lizmat that's the idea, afaik 10:21
and a nursery for short-lived objects
moarvm.org/features.html # Garbage collection section
Voldenet well, but I can be sure that DESTROY works, that's the most important 10:22
I would admire having some solid method that'd force a "full gc run that destroys inaccessible objects"
lizmat indeed... if you want predictable destruction, you will have to take care of it yourself
Voldenet to ensure my destructors are working fine
lizmat I think doing the force_gc twice, is fairly sure way of testing that 10:23
especially in single threaded programs :-)
Voldenet hm, C# has the using and IDisposable block for that, perl could use something similar
lizmat but, what do you want to test? 10:25
that the .DESTROY method is called, or that it does the right thing?
if you want to test it's doing the right thing, why not just call it ?
Voldenet some simple stuff like calling closing some connections
heh, fair point :) 10:26
still, perl has much syntax, one "new and destroy on leave" wouldn't hurt
lizmat well 10:27
one syntax is:
my $handle will leave .close = open("file")
my $handle will leave { .close } = open("file") 10:28
which will create a LEAVE block for you
Voldenet That's actually pretty nice, but don't we have any nice role for that? Explicitly calling destructor feels very Cish ;P 10:29
s/destructor/dispose/
I might be a bit intoxicated by C# here though, I like how they solved it.
lizmat well, it's one of the consequences of not doing reference counting
so how did C# solve it ?
(reference counting in a threaded world is a recipe for either slowness or disaster) 10:30
Voldenet they have normal classes with constructor and destructor
and additionally
IDisposable interface having method { void Dispose(); }
and when a class implements IDisposable, it can be used in such way
using(var sth = new MyClass()){ sth.Test(); } 10:31
and Dispose is called automatically upon exiting the "using" clause
and real Destructor is usually just keeping eye on IDisposable (hand-written "if it wasn't disposed then dispose") 10:32
lizmat hmmm... feels like we should be able to do something like that
10:35 domidumont joined
lizmat m: sub using(\a) { class { method AT-KEY(\b) { a.DESTROY; b } }.new }; class A { method DESTROY() { say "died" } }; using(A.new){ say "foo" } 10:36
camelia foo
died
lizmat not sure I like the syntax though 10:37
10:37 robertle joined, setty1 left
lizmat Voldenet: ^^^ 10:38
10:39 setty1 joined, Cabanossi left 10:40 Cabanossi joined 10:41 domidumont left
Voldenet lizmat: whoa, that's quite nice 10:41
but it doesn't preserve all the features - how do you actually use this object created? ;) 10:44
10:44 domidumont joined
Voldenet ah 10:44
hm, okay, I figured it out and it's very similar to what C# does 10:46
10:46 notbenh joined, domidumont left
lizmat m: sub using(\a) { class { method AT-KEY(\b) { a.DESTROY; b } }.new }; class A { method DESTROY() { say "died" } }; using(my $a = A.new){ say $a } 10:46
camelia A.new
died
lizmat so yes, basically the same way that C# does it 10:47
Voldenet C# can also do this: > using(my $a = A.new) using(my $b = A.new) using(my $c = A.new) { say $a, $b, $c; }
But well, the syntax doesn't fit perl anyway. 10:49
> my $handle will leave .DESTROY = A.new; 10:51
lizmat you still need a block there for now
my $handle will leave { .DESTROY } = A.new
but yeah
Voldenet except "will leave { .DESTROY }" could be something simpler 10:52
my $handle transient = A.new;
a lot more concise 10:53
jnthn would quite like something akin to C#'s "using" in Perl 6, though .close is probably the right method to use given we've used it on file handles, taps, etc.
otoh, supplies are often consumed with whenever blocks which already do the .close calls for you :) 10:54
lizmat m: sub using(**@a) { sub (&b) { LEAVE .DESTROY for @a; b() } }; class A { method DESTROY() { say "died" } }; using(my $a = A.new, my $b = A.new)( { say $a.WHICH; say $b.WHICH } ) # more Perl6ish using() with multiple values 10:56
camelia A|65335024
A|65335088
died
died
jnthn I don't think re-purposing DESTROY is wise
Because the GC will still call it
Voldenet Hmm, are you sure?
jnthn Yes, because I wrote the GC. :P 10:57
In C# finalizers and disposers are separate methods
Voldenet :D 10:58
Okay.
jnthn There's often some arrangement made to have the finalizer call the dispose method, and a boolean to trackthat
*track that
Voldenet yeah, and finalizer doesn't have to track anything
jnthn It would be rather nice if we could save ourselves that boilerplate.
Voldenet the convention is that it should though
jnthn Yeah, that's the "problem", people either forget to implement that, or they do but then it's the same stuff copy-pasted everywhere 10:59
Since we have roles in Perl 6, we can perhaps factor it out in some way
10:59 _28_ria joined
Voldenet Well, C# has tons of problems related to 'using' blocks 11:00
11:00 darutoko joined
jnthn Using blocks themselves, or people's (mis)use of them? :) 11:01
Voldenet nah, more like the convention of "Disposable being callable more than once"
jnthn Ah
Yeah, that's exactly the kind of boilerplate it'd be nice to factor out
Voldenet and inability to use non-disposable objects in using() even if the subtype is implementing the interface
jnthn Hm, why'd it implement the interface but not declare it? 11:02
Voldenet I meant something like this: using(Parent p = new Sub())
basically, you can't decorate a parent with IDisposable after its compiled
jnthn Oh, right
Voldenet which creates monstrosities like autogenerated wrappers 11:03
are we java yet? :)
jnthn I think Perl 6 is late-bound enough to not have that particular problem :)
Voldenet Yeah, it's one of the good parts
11:04 pmurias left
Voldenet also, should be reversed 11:04
erm, usage of it should be reversed
regular way: { my $x = open("File"); use $x somehow } 11:05
the way that doesn't close file: { my $x = do-not-close-until-i-say-so open("File") } 11:06
11:06 Sound joined
Voldenet both way lead to errors, but the absence of latter is easier to test and more obvious 11:07
11:07 Sound is now known as Guest13818
Voldenet "the file was closed already" vs "massproducing descriptors in the background" 11:07
11:30 Guest13818 left 11:34 Peter_R left 11:36 Peter_R joined 11:43 ufobat left 11:49 bjz left 11:52 Cabanossi left 11:53 geekosaur left, geekosaur joined, andrzejku joined, bjz joined 11:55 Cabanossi joined 12:00 Sound_ joined 12:04 wamba left 12:11 Sound_ left 12:23 Cabanossi left 12:25 Cabanossi joined 12:44 LeCamarade joined 12:48 gdonald left 12:49 gdonald joined 12:50 stux|RC-only joined 13:10 obfusk left 13:14 AndyDee left 13:15 domidumont joined 13:19 skids joined 13:21 pytuger left 13:25 obfusk joined 13:29 obfusk left, obfusk joined 13:37 ufobat joined 13:38 Cabanossi left 13:40 Cabanossi joined 13:42 AndyDee joined
Voldenet m: use nqp; class m { submethod DESTROY { say "i die" }}; { my $x = m.new(); undefine $x; }; nqp::force_gc; nqp::force_gc 13:51
camelia i die
Voldenet m: use nqp; class m { submethod DESTROY { say "i die" }}; { my $x = m.new(); undefine $x; }; nqp::force_gc for ^2; 13:52
camelia ( no output )
Voldenet what's the actual difference between those two?
I can see they behave differently, but I can't tell why
timotimo when you work with something like gc, the smallest changes in memory layout and usage can have significant effects 13:53
m: use nqp; class m { submethod DESTROY { say "i die" }}; { my $x = m.new(); undefine $x; }; nqp::force_gc for ^3;
camelia ( no output )
timotimo m: use nqp; class m { submethod DESTROY { say "i die" }}; { my $x = m.new(); undefine $x; }; nqp::force_gc for ^100;
camelia ( no output )
Voldenet even setting that to 500 doesn't change much
:)
timotimo m: use nqp; class m { submethod DESTROY { say "i die" }}; { my $x = m.new(); undefine $x; }; for ^100 { say "ping"; nqp::force_gc }
camelia ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
ping
pi…
timotimo m: use nqp; class m { submethod DESTROY { say "i die" }}; { say "doing the thing"; my $x = m.new(); say "done"; undefine $x; }; for ^100 { nqp::force_gc } 13:54
camelia doing the thing
done
timotimo dunno.
13:55 wamba joined 14:08 ryan_ joined 14:09 andrzejku left 14:13 ryan_ left 14:15 ryan_ joined 14:37 leego left, Cabanossi left, leego joined, itaipu joined 14:40 Cabanossi joined 14:46 Geth left 14:49 buggable_ joined, ChanServ sets mode: +v buggable_, kurahaupo__ joined, buggable_ left 14:50 Geth joined, ChanServ sets mode: +v Geth, Sound joined 14:51 Sound is now known as Guest68686 14:57 Peter_R left 14:59 Peter_R joined 15:22 Cabanossi left 15:24 BenGoldberg joined 15:25 Cabanossi joined 15:31 hankache joined, zakharyas joined 15:39 ryan_ left, obfusk left
hankache Perl 6 Introduction has a new chapter on Native Calling perl6intro.com/#_native_calling_interface 15:40
15:40 ryan_ joined
hankache I would appreciate your feedback. 15:40
15:41 ufobat left
hankache PRs are welcomed github.com/hankache/perl6intro 15:42
lizmat hankache++
hankache hiya lizmat
15:54 itaipu left, itaipu joined 15:57 ryan_ left 15:59 Ven joined 16:00 Ven is now known as Guest13463 16:01 Guest68686 left
timotimo "and dpending on your OS" sounds a bit strange in that sentence 16:06
16:08 Tonik left
timotimo hankache: do you think a subchapter on "is rw" combined with NativeCall would be good? and is CStruct out of scope? 16:09
16:12 gdonald left, gdonald joined
hankache timotimo remove "and"? 16:13
timotimo i think i'd put "depending on your OS" at the end of the sentence
won't need a comma that way 16:14
hankache the issue is I think in French and write in English.
timotimo :D
hankache so I might end up with phrases like these :)
timotimo i used to put commas into english the way you would in german
which is like 5 commas per sentence more than you would use in english 16:15
hankache hah 16:16
timotimo To compile the above C code into a library, run the following commands depending on your OS. 16:18
that's it?
timotimo hm
or maybe the other way around
hankache Depending on your OS run the following commands to compile the above C code into a library. 16:19
now?
timotimo that sounds good!
hm 16:20
this is turning into the ultimate bikeshed
hankache haha
16:22 zakharyas left
lizmat m: say <Depending on your OS run the following commands to compile the above C code into a library>.pick(*).Str 16:22
camelia to C a into following OS run the the library Depending compile your on commands above code
lizmat :-)
hankache hihi 16:23
16:23 Cabanossi left 16:25 Cabanossi joined
hankache timotimo regarding is rw and CStruct. I like to put enough info to break the ice and then point the readers to the appropriate page on docs.perl6.org 16:25
timotimo sounds good 16:26
16:27 khw joined
hankache None of the chapters are complete. Each chapter presents "Just the necessary" to get you going and then points you to somewhere else. 16:27
timotimo yeah, that's fair
hankache thanks
16:36 kirkins joined
kirkins hi all wondering if anyone knows if the Rakudo package on arch linux is still maintained? 16:37
16:38 Guest13463 left
MasterDuke kirkins: yeah, it's up to date 16:39
kirkins I keep getting error: target not found: rakudo 16:40
MasterDuke it's in the aur 16:41
geekosaur huggable, rpm 16:46
huggable geekosaur, CentOS, Debian, Fedora and Ubuntu Rakudo packages: github.com/nxadm/rakudo-pkg/releases
geekosaur ohm thought that also had arch etc. :/
16:47 pmurias joined
pmurias In regards to our git commit message 'style guide' do we want to enforce a 50 chars summary limit? 16:49
16:51 skids left 16:53 lichtkind joined
TEttinger summary or message? 16:55
16:56 hankache left
geekosaur summary (1st line of message) 16:57
I would say that stuff generally plays better with git if you follow the common conventions: first line <=50 chars, 2nd line blank 16:58
pmurias why is the limit 50 chars? 17:17
TimToady to give people something to complain about, obviously :) 17:19
geekosaur I think so it fits in the output of various git commands (consider git branch -lvv)
which various tools use to get summary information about branches
and the second line is blank so git itself doesn't combine the summary with the rest of the message
(which again causes things like git branch output to be weird) 17:20
basically this matters for those of us who have our shell prompts include git information :) 17:21
that being probably the most common tooling that uses this information; but other things also use it
17:22 Cabanossi left
timotimo what, a shell prompt that has a commit description in it? 17:23
geekosaur oh, also the git branch command I cited won't show the effect unless you're actually working in a branch and not at HEAD of the remote, because it adds extra infromation showing the relationship of the current checkout to that
no, but it may be looking for the stuff I just mentioned (how the current checkout compares to the known state of the remote) and overly long commit description will confuse it because that comes *after* the commit description 17:24
and may run into it without any space, iirc 17:25
17:25 Cabanossi joined
timotimo mhm 17:27
geekosaur it's annoying
geekosaur got to figure this out the hard way: already have a fairly complex prompt and needed to integrate git info into it, so couldn't use other people's canned solutions
dylanwh if you use zsh, there's a builtin for it 17:29
geekosaur needs to finish rewriting prompt generating script someday.. still has lots of perl4-isms from when it needed to be able to run on pmaxen >.> 17:31
17:52 bartolin left, esh_ joined 17:53 camelia joined 17:54 ChanServ sets mode: +v camelia, MasterDuke left 17:55 DrEeevil left, xiaomiao joined, xiaomiao left, xiaomiao joined 17:58 bartolin joined 18:01 bolangi left 18:03 musca joined 18:06 MasterDuke joined 18:09 dct left 18:23 Cabanossi left 18:25 Cabanossi joined 18:39 mr-foobar left, espadrine_ is now known as espadrine 18:43 dct joined 18:47 AndyDee left 18:52 AndyDee joined 18:58 dct left 19:04 darutoko left 19:08 raschipi joined 19:14 itaipu left, kirkins left 19:18 pmurias left
grondilu m: say √2 19:19
camelia 5===SORRY!5===
Argument to "say" seems to be malformed
at <tmp>:1
------> 3say7⏏5 √2
Bogus postfix
at <tmp>:1
------> 3say 7⏏5√2
expecting any of:
infix
infix stopper
postfix
s…
grondilu is slightly disappointed this is not in core
DrForr I use that as a example on slides :) 19:20
moritz there's got to be *some* somewhat sensible operators that you can add in examples :-)
like prefix:<√> and postfix:<!>
AlexDaniel huggable: save me from texas
huggable AlexDaniel, 🌟 🌟 🌟 → → → github.com/rakudo/rakudo/wiki/save...from-texas ← ← ← 🌟 🌟 🌟
AlexDaniel grondilu: you can complain about it here ↑ :) 19:21
DrForr Nod. I need to work out a way to make the overbar composition work without resorting to a slang :)
moritz I guess one problem with prefix:<√> is that there's no obvious precedence for it 19:22
19:22 domidumont left
moritz because in classical notation, the root symbol extends over the whole expression it applies to, so there's no need for a precedence 19:22
grondilu moritz: we could restrict it to literals 19:23
DrForr Yeah, hence my overbar comment - Isn't there an invisible grouping?
AlexDaniel … or make it an alias to sqrt
moritz grondilu: then it's not very general, and thus not very useful
19:26 dmaestro joined 19:29 sufrostico joined 19:36 robertle left 19:39 patrickz joined 19:42 rindolf left 19:45 Actualeyes left, rindolf joined
timotimo clearly that root symbol ends its scope immediately 19:46
so its just 0
though its hard to say if theres a sensible value for sqrt()
19:47 rindolf left 19:48 rindolf joined 19:52 Cabanossi left 19:55 sufrostico left, Cabanossi joined
dmaestro Reading @zoffix nice article: perl6.party/post/Perl6-But-Heres-M...with-Maybe I saw this syntax: 20:01
m: ^25 .pick
camelia ( no output )
dmaestro m: ^25 .pick.say
camelia 22
dmaestro I always thought you had to do this:
m: (^25).pick.say
camelia 10
dmaestro Because this generates a warning: 20:02
m: ^25.pick.say
camelia Potential difficulties:
Precedence of ^ is looser than method call; please parenthesize
at <tmp>:1
------> 3^257⏏5.pick.say
WARNINGS for <tmp>:
Useless use of "^" in expression "^25.pick.say" in sink context (line 1)
25
geekosaur dmaestro, it's a hack
there's a space before the .
20:03 ufobat joined
geekosaur so that changes it from using the hardwired-for-speed behavior to using the actual . infix 20:03
20:03 silug joined
dmaestro Whitespace can be confusing - where does this 'hack' apply? 20:03
20:05 Ven joined, Ven is now known as Guest36204
dmaestro I don't see infix <.> documented in Operators ?? 20:06
geekosaur it's a hack in the rakudo grammar; I don't think it's even considered part of official perl 6 20:08
dmaestro I _much_ prefer not having to type parentheses, but I don't want to get bit by using an undocumented feature :-/ 20:09
@geekosaur thanks for that info :-)
20:11 gdonald left, gdonald joined
timotimo geekosaur: are you sure? after all, timtoady put that in there 20:12
geekosaur: github.com/perl6/roast/commit/be4fc4f 20:18
dmaestro This is one of the more Awesome error messages: 20:22
m: 1 .&{ .say }
camelia 5===SORRY!5=== Error while compiling <tmp>
Malformed postfix call (only alphabetic methods may be detached)
at <tmp>:1
------> 031 .7⏏5&{ .say }
dmaestro m: 1.&{ .say }
camelia 1
dmaestro m: 1.say 20:23
camelia 1
dmaestro m: 1 . say 20:24
camelia 1
dmaestro m: 1 .say
camelia 1
jnthn fwiw, ^25 .pick and (^25).pick generate close enough the same code 20:27
timotimo yeah, nothing slow about it
jnthn (Was pretty sure, but just checked) 20:28
I'm also pretty sure it's an official part of the language
lizmat yes, most definitely 20:29
maybe not very well documented, but definitely pre-Xmas
jnthn Well, I more meant "has spectests" :)
AlexDaniel dmaestro: it is a well-known feature
jnthn Which is what counts :)
lizmat true
AlexDaniel (relatively)
jnthn But yeah, at a language level it is a bit of a hack in that it's a TTIAR violation so needed to be put in a little creatively :) 20:31
AlexDaniel error messages are not that great in this case, by the way
m: 1 . &say
camelia 5===SORRY!5=== Error while compiling <tmp>
Unsupported use of . to concatenate strings; in Perl 6 please use ~
at <tmp>:1
------> 031 .7⏏5 &say
AlexDaniel ↑ yet another “hey, you have perl 5 code here” when you don't mean it at all
Related piece of docs: docs.perl6.org/routine/$FULL_STOP 20:33
dmaestro: I created a doc issue here: github.com/perl6/doc/issues/1263 20:35
dmaestro: feel free to resolve it yourself :)
20:36 eroux joined
AlexDaniel by the way, rakudo commit should have a more detailed explanation for this 20:37
bisect: old=2015.07 42 . say 20:38
bisectable6 AlexDaniel, Bisecting by exit code (old=2015.07 new=8a4df16). Old exit code: 1
20:38 robertle joined
bisectable6 AlexDaniel, bisect log: gist.github.com/f301f101fac4622e56...371cc4b2e8 20:38
AlexDaniel, (2015-09-26) github.com/rakudo/rakudo/commit/cb...ceec2c74de
AlexDaniel there it is ↑
20:39 cdg joined 20:47 khw left 20:50 cdg left 20:52 Cabanossi left 20:55 Cabanossi joined 21:01 robertle left 21:09 RabidGravy left 21:10 obfusk joined
dmaestro AlexDaniel: Yeah, I didn't mention that other LTA message, since I'd seen it before ;-) 21:21
21:33 labster joined 21:37 zakharyas joined 21:39 Cabanossi left 21:40 Cabanossi joined 21:42 obfusk left 21:57 zakharyas left 21:58 wamba left 22:04 patrickz left 22:08 BenGoldberg left 22:09 dct joined 22:12 espadrine left 22:19 dct left 22:23 Cabanossi left 22:25 Cabanossi joined 22:50 TeamBlast left 22:51 KongWubba joined
timotimo somebody know how best to ".words" in python? 22:52
22:53 Cabanossi left
raschipi PCRE 22:53
timotimo eh, i'll just "import re"
raschipi yep, import half of perl to do it.
timotimo pff. i just want to write a list of strings without ', ' between each element 22:54
22:55 Cabanossi joined
raschipi should use the right tool for the job 22:56
mst and in this case, half of perl is a better tool than python, and your comments aren't remotely constructive 22:58
#perl6 tries to avoid going full curmudgeon 22:59
(that's why I make plenty of observations in other channels rather than here ;)
raschipi well, the only constructive part was the "pcre", the others were trying to be funny. If you're trying to avoid going fiu 23:00
full curmudgeon, why are you doubling the amount?
23:01 ChanServ sets mode: +o mst
mst because I prefer to warn people first. 23:01
23:01 mst sets mode: -o mst 23:04 KongWubba left
timotimo raschipi: ok, write a perl or perl6 binding for gdb for me, will ya? 23:04
after all, python isn't the best tool for the job, right? and guile is probably also not the right tool for the job? 23:05
so i can just write my own gdb-besttoolforjob bindings now?
cool.
raschipi No, should do it in BASIC.
mst PROC TOLOGIST 23:06
raschipi OR FORTRAN.
timotimo PROC TOLOGICIAN?
sorry if i get a bit unfriendly when you're trying to counter my "help me with python" with "you should use something else" 23:09
jnthn Hah, finally got around to figuring out how to write a (very hack, client only) IO::Socket::Async::SSL. 23:10
timotimo ooooh, neat!
jnthn (That actually is non-blocking)
raschipi I did give you a good answer. 23:11
jnthn (And doesn't do tricks like reading a byte at a time like one other attempt I saw :))
timotimo so why is pcre better than python's re module here?
geekosaur tbh I;m trying to understand what .words has to do with writing a list without ', ' in between
raschipi re module is pcre 23:12
geekosaur isn't that something like ' '.join(list) ?
timotimo geekosaur: python doesn't have qw
so you have to write ["foo", "bar", "baz", "quux", "boop"]
geekosaur oh, you mean writing in code, not writing to stdout
timotimo that's right
geekosaur silly overloaded (natural) language... 23:13
timotimo yeah, i should have put "in my code" into that sentence
jnthn Tossed my WIP in github.com/jnthn/p6-io-socket-async-ssl, will hack some more on it as time allows, which it ain't likely to much during the next week 23:21
mst timotimo: "foo bar baz quux".split() 23:25
jnthn 'night 23:26
23:34 TeamBlast joined 23:36 sivoais joined 23:48 rindolf left
timotimo mst: doesn't seem to work if you have newlines 23:51
oh, what do you know
it actually does work. why didn't it work the first time i tried it?
mst atmospheric pressure 23:52
timotimo i accept this hypothesis as the most likely explanation