»ö« 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. |
|||
00:00
Laurent_R left,
virtualsue left
00:04
Juerd left
00:05
Juerd joined
00:18
brrt joined,
z8_ left
00:21
apiw left
|
|||
AlexDaniel | m: say ** | 00:21 | |
camelia | rakudo-moar 585619: OUTPUT«**» | ||
AlexDaniel | O_o | ||
00:21
vendethiel left
|
|||
AlexDaniel | m: say * | 00:21 | |
camelia | rakudo-moar 585619: OUTPUT«*» | ||
timotimo | uruwi: mergesubstates and mergesubrule are about Longest Token Matching | ||
AlexDaniel | oh, ok | ||
m: say **,*,**,**,*,** | 00:22 | ||
camelia | rakudo-moar 585619: OUTPUT«**********» | ||
timotimo | uruwi: we generate an NFA for everything that's involved in LTM, and if you have a call to a subrule in the declarative prefix of a rule, that goes into the computation, too | ||
uruwi: you can find that code inside the nqp repository under src/QRegex/NFA.nqp (i think) - if you can find something that makes that stuff faster, that'd be cool. the optimize method there is also a good candidate for optimization, as it contains a piece of deduplication code in the middle that's ... quadratic, i think? | 00:24 | ||
there hasn't yet been a good idea for how to make a hashmap apply to that algorithm so that it would become a bit faster | 00:25 | ||
the optimize function is very busy when you have a module that has lots and lots of operator definitions | |||
only when that module gets compiled first, of course | 00:26 | ||
ah, i see now | 00:28 | ||
you have a left-recursing grammar, don't you | |||
i think that might just be a worst-case for our grammars? or something? i seem to recall reading something along those lines | 00:29 | ||
what do i know :) | |||
00:33
RabidGravy left
00:37
limhk joined
00:39
limhk left
|
|||
dalek | kudo-star-daily: c7df306 | coke++ | log/ (8 files): today (automated commit) |
00:39 | |
00:43
brrt left
00:53
gtbjj joined
00:55
BenGoldberg_ joined
00:57
BenGoldberg_ left,
Ben_Goldberg left
00:58
BenGoldberg_ joined
01:03
yeahnoob joined
|
|||
AlexDaniel | b2gills: here? | 01:11 | |
b2gills | AlexDaniel: Yes | 01:13 | |
AlexDaniel | m: {substr $^a x$^b+1: 0,$a.chars*$b}(‘test case’, 3.33).say | 01:15 | |
camelia | rakudo-moar 585619: OUTPUT«test casetest casetest casete» | ||
AlexDaniel | b2gills: that's 32 bytes I think | 01:16 | |
m: {~($^a x$^b+1~~/.**{$a.chars*$b}/)}(‘test case’, 3.33).say | |||
camelia | rakudo-moar 585619: OUTPUT«test casetest casetest casete» | ||
AlexDaniel | I've also tried this but it is a bit longer I think | ||
b2gills | m: say "{substr $^a x$^b+1: 0,$a.chars*$b}".chars | 01:17 | |
camelia | rakudo-moar 585619: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FibgajcYtqPlaceholder variable $^a may not be used here because the surrounding block takes no signatureat /tmp/FibgajcYtq:1------> 3say "{substr $^a x$^b+1: 0,$a.chars*$b}7⏏5".chars expect…» | ||
b2gills | m: say '{substr $^a x$^b+1: 0,$a.chars*$b}'.chars | ||
camelia | rakudo-moar 585619: OUTPUT«34» | ||
AlexDaniel | oh ya including {} that's 34 | ||
still shorter :) | |||
b2gills | It has to be a function, not a snippet. | 01:18 | |
AlexDaniel | “Since the rules disallow string repetition,” | ||
ooh! | |||
I completely missed that | 01:19 | ||
nah then… | |||
damn rules :) | |||
01:21
Actualeyes joined
01:22
gtbjj left
|
|||
[Coke] | botsnack | 01:22 | |
01:23
wamba left
01:36
apiw joined
01:39
apiw left
01:50
revhippie left
02:11
vendethiel joined
02:19
yqt left
02:24
Ben_Goldberg joined
02:27
BenGoldberg_ left
02:32
vendethiel left
02:37
geraud left
02:41
partly_ joined
02:45
yeahnoob left,
partly left
02:51
vendethiel joined
02:54
abaugher left,
Zero_Dogg left
02:55
Zero_Dogg joined,
Zero_Dogg left,
Zero_Dogg joined,
abaugher joined
02:56
ryan_ joined
03:00
Sqirrel left
03:03
yeahnoob joined
03:05
noganex joined
03:07
kid51 left
|
|||
ryan_ | if I declare an attribute with has $!var, shouldn't I be able to access it in a method with $!var? | 03:07 | |
03:08
noganex_ left
|
|||
hoelzro | ryan_: yes, you should | 03:09 | |
ryan_: could you provide an example? | |||
03:10
sevvie left
|
|||
ryan_ | class DaySchedule { | 03:11 | |
has $!opening; | |||
has $!closing; | |||
method add-appointment($time, $client) { | |||
say $!opening; | |||
say $!closing; | |||
} | |||
} | |||
sub MAIN { | |||
my $sched = DaySchedule.new(opening => 9, closing => 17); | |||
03:11
vendethiel left
|
|||
ryan_ | $sched.add-appointment(10, ’Fred’); | 03:11 | |
} | |||
llfourn | ryan_: you can't set $! attributes in .new | 03:13 | |
you will be able to set them in them add-appointment | |||
you probably want to make them $. attributes | 03:14 | ||
03:15
yeahnoob left
|
|||
ryan_ | ok, thank you | 03:18 | |
llfourn | ryan_: note, you are not alone in expecting to be able to set them in .new. I wrote a module that lets you do it: github.com/LLFourn/p6-AttrX-InitArg | ||
and you're welcome :) | 03:19 | ||
m: my @data = 1,{},@data,"YEWHAT??"; say @data.perl # amusing new bug | 03:20 | ||
camelia | rakudo-moar 585619: OUTPUT«(my \Array_71124752 = [1, {}, Array_71124752, "YEWHAT??"])» | ||
llfourn | m: my $data = 1,{},$data,"YEWHAT??"; say $data.perl | 03:22 | |
camelia | rakudo-moar 585619: OUTPUT«WARNINGS for /tmp/_DkGUH2bs6:Useless use of constant string "YEWHAT??" in sink context (lines 1, 1)1» | ||
llfourn | heh | ||
03:56
leont left
04:01
Sqirrel joined
|
|||
Ben_Goldberg | m: my $data = (1,{},$data,"YEWHAT??"); say $data.perl | 04:13 | |
camelia | rakudo-moar 585619: OUTPUT«(my \List_64275264 = $(1, {}, List_64275264, "YEWHAT??"))» | ||
04:14
remmie joined,
SWAN joined
|
|||
AlexDaniel | Ben_Goldberg: rt.perl.org/Public/Bug/Display.html?id=126858 | 04:15 | |
Ben_Goldberg: as far as I remember it is not supposed to be this way | 04:17 | ||
04:19
SWAN left
04:20
Ben_Goldberg left,
adu joined
04:21
ryan_ left
|
|||
AlexDaniel | yet I have no idea how one would prevent this :) | 04:22 | |
remmie | hey! perl6.bat appears to crash my cygwin terminal for some reason | 04:28 | |
oh! it seems to be because moar.exe lingers after i ^C | 04:29 | ||
hmmm, it works fine in cmd.exe | 04:36 | ||
but after i ^C out it momentarily hangs the cygwin shell | 04:37 | ||
i tried the unix version in cygwin and it didn't work | |||
skids | AlexDaniel: I don't think there's supposed to be an inherent prohibition on self-referential arrays, just eager flattening/iteration in combination with them. | 04:57 | |
05:00
colomon_ joined
05:01
colomon left,
asdf12z_ left,
colomon_ is now known as colomon
05:08
ka left
05:16
mohae left,
ka joined
05:17
mohae joined
05:19
mr-foobar joined
05:31
khw left
05:35
adu left
05:40
Cabanossi left
05:44
Cabanossi joined
05:53
skids left
06:00
mohae left,
AlexDaniel left
06:01
mohae joined
06:06
_Gustaf_ joined
06:23
shmibs is now known as Noses
06:24
Noses is now known as shmibs
06:28
|Tux| joined
06:29
Xor_ left
06:36
CIAvash joined
06:50
CIAvash left
|
|||
[Tux] | test 23.504 | 07:03 | |
test-t 12.151 | |||
csv-parser 52.929 | |||
07:03
japhb left,
vike left,
anshin left,
Exodist left,
apejens left,
Rotwang left,
mprelude_ left,
brabo left,
xiaomiao left,
klapperl left,
emdashcomma left,
johan left,
Util left,
lnx left,
notbenh left,
matt_ left,
apejens joined,
Util joined,
Rotwang joined,
lnx joined,
MadcapJake left,
lestrrat left,
inokenty left,
autarch left,
nowan left,
gregf_ left,
tinita left,
tharkun left,
go|dfish left
07:04
culb left,
llfourn left,
gensym left,
xnrand left,
El_Che left,
ruoso left,
aigan_ left,
zhmylove left,
sjohnsen left,
SHODAN left,
El_Che joined,
xiaomiao joined,
johan joined,
ruoso joined,
japhb joined,
anshin joined,
tinita joined,
brabo joined,
Exodist joined,
klapperl joined,
nowan joined,
tharkun joined,
gregf_ joined,
llfourn joined,
aigan_ joined,
matt_ joined,
mprelude_ joined,
zhmylove joined,
SHODAN joined,
nightfrog joined,
emdashcomma joined,
MadcapJake joined,
gensym joined,
autarch joined,
matt_ is now known as Guest84232,
xnrand joined,
go|dfish joined,
vike joined,
inokenty joined
07:05
notbenh joined
07:06
sjohnsen joined,
lestrrat joined,
TEttinger left
07:10
_mg_ joined
07:17
FROGGS joined
07:19
[Sno] left
07:30
frankjh joined
07:42
firstdayonthejob joined
|
|||
llfourn | wow quietly is cool! | 07:45 | |
m: quietly try Cool/2 | 07:46 | ||
camelia | ( no output ) | ||
llfourn | as opposed to | ||
m: try Cool/2 | |||
camelia | rakudo-moar 585619: OUTPUT«Use of uninitialized value of type Cool in numeric context in code at /tmp/LovdKylcpB line 1» | ||
07:52
begunner joined
|
|||
begunner | hi, i am a absolute beginner and have following question: I looked for a string in an array with "my @funde = @array.grep/"matcher"/;" If nothing was found, the code with @funde {...} is nontheless executed. Why is this happening? | 07:57 | |
llfourn | begunner: with @funde { } would be testing for definedness (if I understand you correctly) | 07:59 | |
why not use if? | |||
nine | m: my @array = <foo bar baz>; my @funde = @array.grep: /"matcher"/; if @funde { say @funde; } | 08:00 | |
camelia | ( no output ) | ||
begunner | I used now "if @funde != [ ]" and it worked, but I wanted to understand, why the with block does not behave as expected. | ||
Is a empty list defined? | |||
nine | begunner: yes, it is | ||
llfourn | yep. just use if @funde { } | ||
if it's empty it will be false | 08:01 | ||
begunner | ok thank you very much | ||
llfourn | m: say ?[]; | ||
camelia | rakudo-moar 585619: OUTPUT«False» | ||
begunner | no i have understood | ||
llfourn | no worries :) | ||
08:03
begunner left
08:12
darutoko joined
08:18
ka left
08:25
CIAvash joined
08:27
mr-foobar left
08:29
vytas left
08:30
ely-se joined
08:31
Guest84232 is now known as matt_
08:32
matt_ is now known as Guest96104,
abraxxa joined,
Guest96104 is now known as matt_
08:37
vytas joined,
RabidGravy joined
08:38
firstdayonthejob left
08:42
rindolf joined
09:00
Guest93189 left
09:04
Actualeyes left
09:07
zakharyas joined
|
|||
RabidGravy | marning! | 09:08 | |
09:09
dakkar_ joined
09:11
Actualeyes joined
|
|||
llfourn | o/ | 09:14 | |
09:15
pmurias joined
|
|||
pmurias | jnthn: should columns returned by HLL::Compiler.line_and_column_of start from 0 or 1? | 09:16 | |
09:16
go|dfish left,
go|dfish joined
09:26
gcole_ joined,
pyrimidi_ joined
|
|||
dalek | p: dc7d3d5 | (Pawel Murias)++ | src/HLL/Compiler.nqp: Convert tabs to spaces. |
09:26 | |
p: 5ac9283 | (Pawel Murias)++ | src/HLL/Compiler.nqp: Implement line_and_column_of. |
|||
p: 18ca9a7 | (Pawel Murias)++ | src/vm/js/ (3 files): [js] Generate source-maps with column info. |
|||
09:27
mithaldu__ joined,
olinkl_ joined,
aindilis` joined,
sftp_ joined
09:28
timrs2991 joined,
mithaldu_ left,
olinkl left,
sftp left,
caasih left,
timrs2998 left,
gcole left,
sftp_ is now known as sftp,
mithaldu__ is now known as mithaldu_
09:29
olinkl_ is now known as olinkl,
bpmedley left,
pyrimidine left,
aindilis left
09:30
caasih joined,
Perleone joined
09:34
kurahaupo joined,
molaf joined
09:36
sjoshi joined
09:38
Sqirrel left
09:50
wamba joined
09:56
sortiz left
|
|||
jnthn | pmurias: I'd say "same as we do for line numbers", which I guess are 1-based | 09:59 | |
pmurias: It's for human output I guess, and even programmers seem to agree files start at line 1 :) | 10:00 | ||
10:00
[Sno] joined
|
|||
moritz | it's a conspiracy of all those editors | 10:00 | |
jnthn | A conspiracy led by Fortran programmers! /o\ | 10:01 | |
10:03
rurban joined
10:12
vendethiel joined
10:14
aindilis` left
|
|||
moritz | speaking of conspiracy theories: journals.plos.org/plosone/article?i...ne.0147905 is quite interesting | 10:18 | |
it's a mathematical model for the likelyhood that a big conspiracy is uncovered from within | 10:19 | ||
10:19
aindilis` joined
|
|||
moritz | and basically the big ones (climate, moon landing, cancer treatment) are far too big to survive more than a few years -- and that's even without considering external investigation | 10:19 | |
jnthn | But what if this paper is a conspiracy to make us less likely to believe conspiracies?! *gasp* :) | 10:26 | |
10:27
TEttinger joined,
Averna left
|
|||
moritz | my question would be more like: what if the baseline likelyhood for exposing conspiracies is much lower? Because, we only know of exposed ones. There could be thousands of unexposed conspiracies that we can't even dream of right now, each involving millions of people! | 10:28 | |
10:30
bowtie joined
10:31
bowtie is now known as Guest14840
10:35
vendethiel left
10:38
YP-QMUL-W joined
10:39
espadrine_ joined
10:40
espadrine_ is now known as espadrine
10:46
Guest14840 left
|
|||
lizmat | good *, #perl6! | 10:53 | |
10:53
ocbtec joined
10:56
bpmedley joined
11:08
Skarsnik joined
11:09
gregf_ left
11:11
gregf__ joined
|
|||
frankjh | q | 11:13 | |
11:24
bowtie joined,
bowtie is now known as Guest14558
|
|||
dalek | kudo/nom: b1a9e62 | lizmat++ | src/core/DateTime.pm: Give DateTime.new a positional candidate again Also adapt .perl to use the faster positional interface. Please note this was not done by renaming the new-from-positional private method to "new", because we probably want to be able to programmatically recognize added methods / candidates in the (near) future, e.g. by adding a trait. |
11:27 | |
11:29
Guest14558 left
11:30
abraxxa left,
bowtie_ joined
|
|||
jnthn | news.perlfoundation.org/2016/02/gra...forma.html is looking for feedback from the community | 11:30 | |
11:30
kaare_ joined
|
|||
moritz | jnthn++ | 11:32 | |
11:33
ChoHag left,
ChoHag joined
|
|||
rindolf | Hi all. Que pasa? | 11:34 | |
11:35
ely-se left,
Actualeyes left
11:36
ely-se joined
11:37
Actualeyes joined
|
|||
dalek | c: 9454fb3 | RabidGravy++ | doc/Type/Semaphore.pod: Add Semaphore doc as per #393 From @MARTINMM |
11:38 | |
lizmat | jnthn: I'm not sure I understand what "make await non-blocking" means... I mean, it's supposed to wait, isn't it ? | 11:41 | |
11:41
vendethiel joined
11:43
rurban left
|
|||
moritz | lizmat: but it doesn't need to block a thread | 11:43 | |
lizmat | that's not clear to most people from the description :-) | ||
jnthn | What moritz said, and I think it's the most reasonable interpretation :) | 11:47 | |
11:48
YP-QMUL-W left,
abraxxa joined
11:49
YP-QMUL-W joined
|
|||
jnthn | Anyways, if there's a question posted in the comments I'll happily post an explanation :) | 11:50 | |
lizmat | so, technically, would you be able to force a deadock if you would have sufficient awaits at the moment? | 11:51 | |
jnthn | Not just technically :) | ||
moritz | we actually had that | 11:52 | |
jnthn | Any kind of recursive divide/conquer today will, if not carefully done, be likley to exhaust the thread pool. | ||
moritz | somebody wrote a blog post about it | ||
lizmat | ah, ok, I see, must have missed the blog post | 11:53 | |
dalek | osystem: 3f61e9d | RabidGravy++ | META.list: Switch JSON::Infer to use META6.json |
||
lizmat | or it didn't register with me that that was the underlying reason | ||
moritz | (it's been a while, like, certainly last year) | 11:54 | |
RabidGravy | Yeah Tinky gets in an awful state if there are more than a certain number of validators being awaited on | 11:56 | |
11:57
bowtie_ left
11:59
YP-QMUL-W left
|
|||
RabidGravy | So am I going to finish the CouchDB thing this week? "Only" authentication and attachments left to do | 12:02 | |
or am I going to get distracted and right something else off the TODO list | 12:03 | ||
dalek | kudo/nom: 1654832 | lizmat++ | src/core/DateTime.pm: Make DateTime fully subclassable For additional public attributes, settable by name |
12:05 | |
Skarsnik | good luck RabidGravy | 12:11 | |
RabidGravy | lizmat++ # I've actually got a cheeky "augment class DateTime { }" in Chronic :-\ | 12:13 | |
lizmat | yeah, I figured Date / DateTime would be common targets for subclassing | 12:14 | |
12:15
bowtie_ joined
12:17
TEttinger left
|
|||
Skarsnik | what was blocking to subclass Date? private new? | 12:19 | |
lizmat | yup | 12:23 | |
12:24
leont joined,
vendethiel left
12:26
eyck left
12:31
Actualeyes left
12:35
bowtie_ left
12:36
pmurias left,
rurban joined
12:37
bowtie joined,
bowtie is now known as Guest54258
12:43
cosarara left,
Guest54258 left
12:46
bowtie_ joined
12:47
kid51 joined
12:48
Actualeyes joined,
eyck joined
12:50
bowtie_ left
12:51
bowtie_ joined
12:55
iloveunix8955 joined
|
|||
dalek | kudo/nom: 5648fea | lizmat++ | src/core/ (12 files): Change fake BUILD methods to SET-SELF If a method is called BUILD, it has a special meaning for the default way of building objects. These methods only shared the name, but were never intended to be called by BUILDALL. Having a SET-SELF in a class, usually means the class is not subclassable as is. By making the method private, it should hopefully optimize even better in the future |
12:55 | |
12:56
bowtie_ left
12:58
iloveunix8955 left
12:59
iloveunix8955 joined
13:01
iloveunix8955 left
13:02
cosarara joined
13:04
_mg__ joined
13:06
iloveunix8955 joined,
sufrostico joined,
_mg_ left,
_mg__ is now known as _mg_
13:18
bowtie_ joined
13:22
bowtie_ left
|
|||
lizmat | hoelz.ro/blog/state-of-multi-line-input # nice blog post, hoelzro++ | 13:22 | |
13:23
bowtie joined,
bowtie is now known as Guest12105
|
|||
dalek | kudo/nom: cddf5da | lizmat++ | src/core/ (29 files): Mark all BUILD methods as returning nothing The remaining BUILD methods in core are intended to be called by the default building sequence, which does not expect a return value. Hopefully we'll see some benefit of this speed-wise now, or in the (near) future. |
13:25 | |
Skarsnik | any feedback on gist.github.com/Skarsnik/c4bc15b75b883f69fde1 ? | 13:26 | |
lizmat | Skarsnik: no anything sensible from me, I'm afraid | 13:27 | |
*not | |||
Skarsnik | hm, don't know why github put the output before x) | 13:28 | |
13:30
vendethiel joined
|
|||
perlpilot | Skarsnik: it orders the files alphabetically. | 13:38 | |
Skarsnik | I don't remember doing this? | ||
whatever I change the ouput name x) | |||
perlpilot | Skarsnik: I don't quite understand what ENV is for | 13:39 | |
13:39
rurban left
|
|||
perlpilot | "will be used instead of the rest" used for what exactly? | 13:39 | |
Skarsnik | to determine the library path x) | 13:40 | |
look at the second command in the output | |||
perlpilot | So, PERL6_LIBGUMDO would be a full path to the .so ? Or could it just be relative to LD_LIBRARY_PATH? Both? Something else? | 13:41 | |
s/DO/BO/ | |||
The example you mention doesn't have a version ... did it intuit the version number somehow? | 13:42 | ||
Skarsnik | both probably work x) | ||
basicly the library-name is something given to dlopen | 13:43 | ||
a full path or a partial path will work (if the file is in LD_LIBRARY_PATH | 13:44 | ||
perlpilot | Skarsnik: anyway ... my general reaction is +1 :) | ||
13:47
eternaleye left,
bioexpress joined
|
|||
hoelzro | o/ #perl6 | 13:47 | |
bioexpress | Hi! To I have to give Travis authorization to access my accout to get Travis test results on modules.perl6.org? | 13:48 | |
13:48
leont left
|
|||
hoelzro | lizmat: thanks! | 13:49 | |
13:51
vendethiel left
|
|||
dalek | osystem: 774150f | sylvarant++ | META.list: Switch Avro and Compress::Brotli to Json |
13:52 | |
13:59
smls joined,
smls left
14:03
Humbedooh is now known as Guest2,
Guest2 is now known as Humbedooh,
M-eternaleye joined
|
|||
lizmat | afk for a few hours& | 14:04 | |
El_Che | does panda have a magic incantation to reinstall a module (e.g. once installed by 'panda install .') | 14:07 | |
flussence | --force? | 14:09 | |
14:12
M-matthew joined,
M-Illandan joined
|
|||
hoelzro | did Panda change how modules are supposed to extend the build process? I'm getting this error when trying to build Linenoise now: Redeclaration of symbol Build | 14:14 | |
14:15
M-Illandan left,
M-matthew left,
M-eternaleye left
|
|||
hoelzro | stmuk: do I talk to you about getting my Perl 6 blog entries on pl6anet? | 14:19 | |
14:20
pyrimidine joined,
vendethiel joined
14:23
donaldh joined,
johan___ joined,
ChoHag_ joined
14:24
ruoso_ joined,
tharkun_ joined,
Actualeyes left,
ChoHag left,
pyrimidi_ left,
RabidGravy left,
tharkun left,
johan left,
ruoso left
14:25
RabidGravy joined,
Actualeyes joined,
sufrostico left
14:27
sufrostico joined
14:28
espadrine left
14:32
apiw joined
14:34
yurivish joined,
M-eternaleye joined
14:36
gregf__ left
14:39
ka joined
14:43
M-matthew joined,
M-Illandan joined
14:44
vendethiel left,
bioexpress left,
sjoshi left
14:51
gregf_ joined
|
|||
RabidGravy | boom | 14:55 | |
15:06
apiw left
15:07
ka left
15:09
uruwi left
15:10
frankjh left,
skids joined
|
|||
ugexe | hoelzro: there were changes to `require` in the latest rakudo and how it handles importing stuff | 15:11 | |
that sounds like it might be consistent with that | |||
zef appears to still handle the Build ok, but it spawns it in a new process whereas panda `require`s it into the main program | 15:13 | ||
15:14
p6newbee joined
|
|||
awwaiid | Greetings. I made some larger button-looking links for downloading Rakudo Star from rakudo.org. The idea is to put this at the top of the main "How to get Rakudo Perl 6" page, but for review it is separate. Check it out, rakudo.org/how-to-get-rakudo/download/ | 15:16 | |
timotimo | ^- my name is timotimo and i approve this message | 15:17 | |
awwaiid | hehe | 15:18 | |
15:19
donaldh left,
_Gustaf_ left
|
|||
awwaiid | timotimo: anyone in particular we should get feedback from on that? | 15:19 | |
15:19
donaldh joined,
leont joined
15:20
apiw joined
|
|||
timotimo | not sure | 15:20 | |
moritz | +1 from me | 15:21 | |
jnthn | +1 | 15:22 | |
15:24
nchambers^ joined
15:25
nchambers left,
pierrot left
15:26
nchambers^ is now known as nchambers
|
|||
hoelzro | ah ha | 15:29 | |
Skarsnik | awwaiid, this look good | 15:37 | |
perlpilot | awwaiid: nice! | 15:40 | |
ugexe | maybe the big download button could download helpful ask toolbar and we can put the rakudo link in small print under it | 15:41 | |
awwaiid | good idea ugexe. gotta fix my affiliate link... | ||
flussence | while we're fixing rakudo.org, how about putting pl6anet in that “Other Sites” sidebar? | 15:42 | |
15:44
apiw left
|
|||
awwaiid | crazy talk | 15:44 | |
flussence | crazy talk would be asking to remove the links that haven't been active in 3 years :) | 15:45 | |
Skarsnik | hm constant PIKO = somefunction is not evalued at runtime? | 15:47 | |
flussence | m: constant foo = say 'bar'; compile-time-error | 15:48 | |
camelia | rakudo-moar cddf5d: OUTPUT«bar5===SORRY!5=== Error while compiling /tmp/OZDuhilvtxUndeclared routine: compile-time-error used at line 1» | ||
moritz | Skarsnik: RHS of a constant declarator is evaluated at compile time, yes | ||
15:48
edehont joined
|
|||
flussence | m: INIT constant foo = say 'bar'; compile-time-error | 15:48 | |
camelia | rakudo-moar cddf5d: OUTPUT«bar5===SORRY!5=== Error while compiling /tmp/w5FmK8QhFbUndeclared routine: compile-time-error used at line 1» | ||
Skarsnik | damn that annoying | 15:49 | |
flussence | m: my \foo = say 'bar'; compile-time-error | ||
camelia | rakudo-moar cddf5d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/Cbajticz4jUndeclared routine: compile-time-error used at line 1» | ||
15:49
edehont left
|
|||
moritz | if you want to avoid the error message: | 15:49 | |
15:49
iloveunix32 joined
|
|||
moritz | m: constant foo = say 'bar; BEGIN exit 0 | 15:50 | |
camelia | rakudo-moar cddf5d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/XcGyu02jyWUnable to parse expression in single quotes; couldn't find final "'" at /tmp/XcGyu02jyW:1------> 3constant foo = say 'bar; BEGIN exit 07⏏5<EOL> expecting any of: argumen…» | ||
moritz | m: constant foo = say 'bar'; BEGIN exit 0 | ||
camelia | rakudo-moar cddf5d: OUTPUT«bar» | ||
moritz | m: my \foo = say 'bar'; BEGIN exit 0 | ||
camelia | ( no output ) | ||
15:50
apiw joined
|
|||
Skarsnik | I though it will delay the evuluation of the constant since the right part is not know | 15:50 | |
constant should be named compilevar x) | 15:51 | ||
flussence | m: my \foo := 'bar'; say foo; foo = 'baz' # runtime constant-ish var | ||
camelia | rakudo-moar cddf5d: OUTPUT«barCannot modify an immutable Str in block <unit> at /tmp/j7WXJIVhkr line 1» | ||
15:51
musiKk joined
|
|||
Skarsnik | Yes, but it's not the same meaning that the word constant for me x) | 15:52 | |
moritz | it's very much inspired by perl 5's "use constant ...." | ||
flussence | we have to give the compiler *some* way to cheat, after all | 15:53 | |
Skarsnik | It's really bad, for me it's confusing | ||
just looking at the keyword | 15:54 | ||
jnthn | "I want constants...THAT MIGHT CHANGE!!!" :P | ||
Skarsnik | I want constant that are constant. not constant at compile time | ||
jnthn | If your data were actually constant, that distinction wouldn't matter one bit. :) | 15:55 | |
abraxxa | Skarsnik: read-only variable? | ||
p6newbee | hi | 15:57 | |
perlpilot | Skarsnik: maybe you want a once block? | ||
Skarsnik | I mean an use case for me will be: my constant stuff = $config<stuff-value>; or even my constant piko = %*ENV<somevenvalue>; | ||
moritz | just use my \stuff = ...' | ||
s/'/;/ | |||
Skarsnik | I am not talking how achieving what I want. I just found that the constant keyword is not good | ||
it's totatly not obvious it's a compile time value | 15:58 | ||
it should be named compileconstant or something like that x) | 15:59 | ||
jnthn | *sigh* | ||
It's not going to change. Stop moaning about it. | |||
moritz | Skarsnik: your complaint has been heard. | 16:00 | |
jnthn | .oO( It's not going to change because...it's constant! :D ) |
||
Skarsnik | I guess it's not going to change. It's just very confusing. and the sigilless notation look like a hack for me x) | 16:01 | |
b2gills | 「use constant」 runs compile time in Perl 5 too, it's just that happens every time you run it. | 16:02 | |
geekosaur | actually that's your warning that it's not a runtime thing | ||
Skarsnik | but with precomp is an issue inside lib if you use to store a ENV value | ||
for example | |||
timotimo | i wonder if we should put a little blurb above the announcements on the "home" site of rakudo.org, too | ||
Skarsnik | Since script are not precompiled you are probably fine with constant piko = %*ENV<PIKO> but it will not work on a lib | 16:03 | |
awwaiid | rakudo.org/how-to-get-rakudo/ now updated with download link-button-things | ||
16:04
iloveunix8955 left,
iloveunix32 left
|
|||
b2gills | Don't use a compile time feature if you want it to run at runtime | 16:04 | |
perlpilot | Skarsnik: You seem to be more concerned about when initialization happens than the "constantness". Ergo, you should look at phasers or phaser-like things IMHO. | ||
timotimo | awwaiid: at the moment, clicking those links opens a new tab for a split-second, which immediately closes again; can we change the links so that it won't do that? | ||
16:04
apiw left
|
|||
timotimo | target=_blank may be the culprit? | 16:05 | |
Skarsnik | I am just complaining that the keyword constant is confusing for something that happen at compile time | ||
moritz | yes, we heard that. | ||
RabidGravy | GAH! I've just realised why http useragent gets the "compiled in failure" | ||
thanks Skarsnik! | |||
timotimo | because of "constant"? | 16:06 | |
awwaiid | yes | ||
RabidGravy | yeah | ||
"constant $HRC_DEBUG = %*ENV<HRC_DEBUG>.Bool;" | |||
Skarsnik | see. I am pretty sure it will be a weird issue. since in a script it 'work' but not for lib that are precompiled :) | ||
timotimo | ah | ||
awwaiid | timotimo: target _blank removed | ||
timotimo | m: $foo = %*ENV<lalala>:exists.Bool; say $foo.perl | 16:07 | |
camelia | rakudo-moar cddf5d: OUTPUT«5===SORRY!5=== Error while compiling /tmp/9bNUzxhP1iVariable '$foo' is not declaredat /tmp/9bNUzxhP1i:1------> 3<BOL>7⏏5$foo = %*ENV<lalala>:exists.Bool; say $f» | ||
timotimo | m: my $foo = %*ENV<lalala>:exists.Bool; say $foo.perl | ||
camelia | rakudo-moar cddf5d: OUTPUT«Bool::False» | ||
timotimo | m: my $foo = %*ENV<lalala>:exists:v.Bool; say $foo.perl | ||
camelia | rakudo-moar cddf5d: OUTPUT«Bool::False» | ||
RabidGravy | it doesn't want to be constant at all | ||
timotimo | oh | ||
of course it doesn't :) | |||
Skarsnik | it should be called static x) | ||
timotimo | static means something completely muddy, though | 16:08 | |
static is more like state in perl6 | |||
perlpilot | I'm sure he's joking :) | ||
RabidGravy | well in that case it just wants to be a lexical variable | ||
16:09
apiw joined
|
|||
Skarsnik | in my head static is associated with compile, I think it's because of the static keyword before function in C that force the sub to not be seen outside his file (comp/translation unit?) | 16:10 | |
timotimo | we can hardly expect people think "static" for variables in p6 works like "static" for functions in C | 16:11 | |
when in C, static for variables means something very different | |||
Skarsnik | Yes, I know | 16:12 | |
that really weird | |||
interesting BEGIN is run after the first compile time? | 16:13 | ||
flussence | constant result = $*IN.slurp; exit result; # look, an AOT compiler! | ||
perlpilot | "first compile time"? | ||
16:14
alpha123 left
|
|||
flussence | BEGIN is run during compile time... | 16:14 | |
m: BEGIN say '0'; constant a = say '1'; BEGIN say '2'; | |||
camelia | rakudo-moar cddf5d: OUTPUT«012» | ||
16:15
virtualsue joined
|
|||
flussence | m: BEGIN say '0'; constant a = say '1'; say 'foo'; BEGIN say '2'; | 16:15 | |
camelia | rakudo-moar cddf5d: OUTPUT«012foo» | ||
Skarsnik | Ah it's run in order | ||
root@testperl6:~/piko/cpp/gptrixie# perl6 -e 'constant FOO = %*ENV<FOO>; BEGIN { %*ENV<FOO> = "Hello"}; say FOO' | 16:16 | ||
(Any) | |||
root@testperl6:~/piko/cpp/gptrixie# perl6 -e 'BEGIN { %*ENV<FOO> = "Hello"}; constant FOO = %*ENV<FOO>; say FOO' | |||
Hello | |||
flussence | m: BEGIN say '0'; constant a = say '1'; BEGIN BEGIN say '2'; # I hope this doesn't change it... | ||
camelia | rakudo-moar cddf5d: OUTPUT«012» | ||
flussence | m: BEGIN say '0'; constant a = say '1'; BEGIN INIT FIRST say '2'; # this might? | 16:17 | |
camelia | rakudo-moar cddf5d: OUTPUT«01» | ||
flussence | well that's weird. | ||
perlpilot | not really ... you don't have a loop | 16:18 | |
flussence | oh, duh | ||
m: BEGIN say '0'; constant a = say '1'; BEGIN INIT say '2'; | |||
camelia | rakudo-moar cddf5d: OUTPUT«012» | ||
flussence | and there's no other way to jump the queue like that, I guess | ||
Skarsnik | hm INIT is fist run time? Should it ouput 2 twice? | 16:19 | |
or it's a modifier on BEING? | |||
timotimo | the code after BEGIN gets run at compile time. the code inside that has a phaser that runs say '2' at the INIT time of that compile-time-run code | 16:20 | |
perlpilot | Skarsnik: read S04:1369 | 16:21 | |
timotimo | damn it, i still haven't set up synopsebot >_> | 16:22 | |
16:27
ka joined
16:29
uruwi joined
16:30
khw joined
16:32
alpha123 joined,
ely-se left
|
|||
[Coke] | S99:NELSON | 16:34 | |
Skarsnik | how do I catch note in tests? | ||
m: use Test; dies-ok { CONTROL { when CX::Warn { .die } }; note "hello"}, "Foo"; | |||
camelia | rakudo-moar cddf5d: OUTPUT«hellonot ok 1 - Foo# Failed test 'Foo'# at /tmp/5uPO5Pdmvx line 1» | ||
geekosaur | note doesn't die | 16:35 | |
it's just a write to stderr with a newline | |||
or if you prefer, say to $*STDERR instead of $*STDOUT | |||
Skarsnik | hm, ok seem more difficult to test | 16:36 | |
16:36
alpha123 left
16:37
alpha123 joined
|
|||
Skarsnik | or should I raise the note in NC that say 'NativeCall: Consider adding the api version of the library you want to use, sub foo is native(foo, v1)' to a warning? I wanted that just being in information than an 'error' | 16:37 | |
geekosaur | I'd make it a warning (well, I'd make it an error actually >.> ) | 16:38 | |
geekosaur considers not specifying the ABI expected to be a bug waiting to happen | |||
Skarsnik | well some lib does not play the ABI version game | 16:40 | |
like mysqlclient, their versionning is just... versionning... like so.16 is the same abi than so.22 | 16:41 | ||
and I don't if I can raise this to a warn, since it was not in x-mas release x) | 16:42 | ||
know | |||
geekosaur | that's another bug waiting to happen (although I suspect in their case it's actually political vs. technical; technical assumes if the client and server are not tightly version-tied, they should be completely separated) | 16:43 | |
16:45
ka left
16:54
zakharyas left
16:57
rurban joined
16:58
amishGeek joined
17:01
abraxxa left
17:02
apiw left,
abraxxa joined
|
|||
rudi_s_ | Hi. I'm looking for a perl5-like do in Perl6. I have a "config file" (which is actually a perl6 program) and I'd like to load it from the main program. How can I do this so I can access (specific) variables in the config file and provide functions to it. | 17:03 | |
17:04
espadrine joined,
cognominal left
|
|||
jnthn | Well, EVALFILE gets you an EVAL of the code and it'll be evluated with the lexicals (e.g. subs) of the calling scope available. Getting access to things that it declares is trickier, though. You could instead my %vars = EVAL slurp('file') ~ '; MY::'; | 17:06 | |
Which'll make the code evaluate to the Stash of lexical variables declared in the config file | 17:07 | ||
ugexe | you could probably also do something like `require "/home/perl6/my-project/bin/config-script";` if you set up your exports/imports | 17:08 | |
rudi_s_ | jnthn: I don't need access to the stuff it declares, but access to functions and the values they use. Sample: my $x = 4; sub foo { $x = 10 }; EVAL_MAGIC_HERE('path/to/file'); | 17:10 | |
And $x is either 4 or 10 if EVAL_MAGIC_HERE called foo or not. | |||
17:11
musiKk left
|
|||
jnthn | Oh, then a plain EVALFILE should do it | 17:11 | |
rudi_s_ | And EVAL_MAGIC_HERE should be able to access e.g. $y (which is declared like $x) as well. | ||
jnthn | It's just like EVAL but takes a file name | 17:12 | |
rudi_s_ | Where can I find documentation for that? | ||
doc.perl6.org doesn't find it. | |||
17:14
uruwi left
|
|||
jnthn | Indeed it doesn't... :( But docs for doc.perl6.org/routine/EVAL apply except EVALFILE takes a filename. | 17:14 | |
And reads the code from that file. | |||
17:16
FROGGS left,
apiw joined
17:17
hankache joined
|
|||
nine | rudi_s_: one of Perl 6' key features is its excellent parsing abilities. Considering we have those, why not use a more human friendly config format? | 17:18 | |
17:18
uruwi joined
|
|||
rudi_s_ | nine: Because I want a programming language to configure my system. It removes many unnecessary and complicate features like embedding a template engine for better configurability. | 17:20 | |
nine | rudi_s_: are you the only user of this system? | 17:21 | |
rudi_s_ | nine: No. | 17:23 | |
17:24
abraxxa left,
pmurias joined
|
|||
nine | rudi_s_: many programmers come to the same faulty conclusion that the flexibility offered by using a full programming language for configuration outweighs the downsides. Sysadmins tend to disagree. It's no fun having to figure out Erlang's syntax just to be able to set up an XMPP server. | 17:25 | |
mst | executable configs are satan, especially for systems configuration | 17:26 | |
hankache | hello * | 17:27 | |
nine | rudi_s_: the fun really starts when tools try to automatically change the configuration of some service, for example for fully automated upgrades. The halting problem makes this theoretically impossible with touring complete configuration | ||
rudi_s_ | nine: True. But I'm a programmer and a sysadmin and I want a flexible system which is easy to read/write (which I think works with perl6) but still extensible (which is a given with Perl6). | ||
I know that it has some issues, but I think that's a fine trade-off. | 17:28 | ||
nine: Yeah. But that's not a use case in my case. | |||
nine | not now at least | ||
17:28
SWAN joined
|
|||
rudi_s_ | True. But I think that's a good assumption in my setup. | 17:29 | |
17:29
SWAN left
|
|||
pmurias | aren't excutable config file roughly eqivalent to just exposing the program as a module? | 17:29 | |
rudi_s_ | mst: "systems configuration?"? | 17:30 | |
jnthn: Thank you! Works fine. | |||
17:30
llfourn left
|
|||
mst | rudi_s_: anything that runs on a server and needs actual uptime. | 17:31 | |
ok, so, here's my suggestion: make really really sure that your config subsystem is pluggable | |||
that way you can carry on down the route you're currently going, since it's clear that you're going to have to learn this one the hard way | |||
and if you ever do find yourself suddenly missing both feet, you can replace the subsystem then :) | 17:32 | ||
rudi_s_ | mst: Ah. | ||
I think that's fine for me ;-) | |||
17:35
_mg_ left,
apiw left
|
|||
stmuk | hoelzro: yeah either submit a PR github.com/stmuk/pl6anet.org or just tell me the atom/rss link | 17:37 | |
donaldh o O (Given perl 6's built-in grammars, I'd be writing a grammar for config) | 17:38 | ||
17:38
amishGeek left
|
|||
mst | rudi_s_: also, you can gradually evolve your programmable config to be steadily more DSL-like, because that'll make it nicer anyway | 17:38 | |
rudi_s_: at which point turning it into a grammar later should be relatively easy if you do decide to | |||
17:38
apiw joined
|
|||
mst | donaldh: yeah, same. but if he wants to go down the rabbit hole, I can't stop him, so I'll settle for making sure he has a plan B | 17:39 | |
rudi_s_ said he was a sysadmin, and therefore I have faith that he'll actually care about having a plan B ;) | |||
17:40
CIAvash left
|
|||
hoelzro | stmuk: thanks, will do! | 17:40 | |
donaldh | turing complete config files are a huge attack surface | 17:41 | |
17:41
pierrot joined
|
|||
rudi_s_ | mst: Yeah, the idea is to be as DSL-like as possible, but still be extensible when it's useful. | 17:41 | |
17:41
sortiz joined
|
|||
rudi_s_ | Not applicable in my case. | 17:41 | |
mst | I'm not thinking about attack surface, only debugging surface | ||
17:42
apiw left,
dakkar_ left
17:43
virtualsue left
17:45
vendethiel joined
|
|||
dalek | p: 2a21a59 | (Pawel Murias)++ | src/vm/js/RegexCompiler.nqp: [js] Remove (broken) debugging leftover |
17:46 | |
RabidGravy | is it Radiator or some other evil RADIUS server that has all its configs in Perl? That was the satan | 17:48 | |
hoelzro | stmuk: here's the URL: hoelz.ro/perl6.rss | ||
17:49
CIAvash joined
|
|||
dalek | kudo/nom: b5c6a49 | lizmat++ | src/core/Failure.pm: Creating a Failure is now more efficient |
17:49 | |
RabidGravy gives up for the second time to debug Websocket | |||
somehow the equivalent of | 17:51 | ||
m: my $s = supply -> \s { }; say $s.Channel.receive | |||
camelia | rakudo-moar cddf5d: OUTPUT«Method 'phasers' not found for invocant of class 'Code' in block <unit> at /tmp/rMPaX1EQyj line 1» | ||
RabidGravy | is happening | ||
17:53
leont left
|
|||
DrForr | o/ | 17:53 | |
stmuk | hoelzro: done | 17:55 | |
17:55
donaldh left
|
|||
DrForr | Question about junctions - I understand they can't be introspected, but is there a way to get access to what is being matched against? I know it's only one term in this case, if it helps. | 17:56 | |
17:58
donaldh joined,
donaldh left
17:59
iloveunix8955 joined
18:00
iloveunix32 joined
|
|||
DrForr | Aha, just worked around it. | 18:02 | |
hoelzro | stmuk: thanks! | 18:03 | |
18:04
sufrostico left
18:05
apiw joined,
CIAvash left
18:06
pmurias left,
sufrostico joined,
musiKk joined
18:08
apiw left
|
|||
dalek | kudo/nom: 659f2e9 | lizmat++ | src/core/Distribution.pm: Prevent double lookup of RAKUDO_PRECOMP_DIST |
18:09 | |
18:16
mohae left
18:17
mohae joined
18:20
espadrine left,
adu joined
|
|||
Skarsnik | RabidGravy, the websocket client or server. | 18:23 | |
RabidGravy | server | 18:24 | |
Skarsnik | damn | ||
18:24
uruwi left
|
|||
Skarsnik | still nobody to write a websocket client async module? x) | 18:24 | |
18:26
apiw joined,
ka joined,
TEttinger joined
18:29
vendethiel left
18:30
iloveunix8955 left,
iloveunix32 left,
iloveunix32 joined
18:33
vendethiel joined,
FROGGS joined
18:34
ocbtec left
18:35
musiKk left
|
|||
FROGGS | o/ | 18:35 | |
18:36
rurban left
|
|||
lizmat | FROGGS o/ | 18:36 | |
FROGGS | :o) | ||
hoelzro | o/ FROGGS | ||
vendethiel | \o | 18:37 | |
18:37
rurban joined
|
|||
hankache | o | 18:37 | |
sortiz | \o #perl6 | 18:39 | |
dalek | kudo/nom: 90b31ae | lizmat++ | src/core/Str.pm: Mark some more methods as not returning anything |
||
18:43
Laurent_R joined
|
|||
FROGGS | huh, a 'use Foo;' in Foo.pm makes it infiniloop >.< | 18:44 | |
dalek | kudo/nom: 3c6e44e | lizmat++ | src/core/Str.pm: Remove superflous call |
18:48 | |
18:48
brrt joined
|
|||
stmuk | "How to be a 10x engineer: help ten other engineers be twice as good." | 18:49 | |
hankache | heh | ||
RabidGravy | WAHAY! | 18:52 | |
fix0rificated the Websocket!! | |||
hankache | is there another way to write multiline comments other than =begin comment ............. =end comment? | 18:53 | |
something a la /** .............. **/ | |||
18:53
brrt left
18:54
adu left
|
|||
DrForr | #`( .. ) | 18:54 | |
(shades of Lisp) | |||
geekosaur | or with [] or {} or other matching brackets | 18:55 | |
hankache | thanks | ||
18:56
Actualeyes left
|
|||
Skarsnik | =begin and =end ? | 18:57 | |
timotimo | that also works, but it'll end up in the $= variables, which you may or may not want | 18:58 | |
dalek | kudo/nom: 3f469f1 | lizmat++ | src/core/Str.pm: Make triage_substitution a private method Instead of a multi with a where clause: should make substitution a bit faster, especially when doing many of them |
19:00 | |
19:00
firstdayonthejob joined
19:01
iloveunix32 left,
iloveunix32 joined
19:14
sufrostico left,
uruwi joined
|
|||
RabidGravy | what larks | 19:14 | |
19:14
iloveunix32 left
|
|||
lizmat | spring surprise | 19:14 | |
19:24
hankache left
|
|||
dalek | kudo/nom: b28da05 | lizmat++ | src/core/Str.pm: Make increment_index a private method Instead of a multi + some more micro-opts |
19:24 | |
RabidGravy | micro-opts++ | ||
19:26
Jaglor joined
|
|||
dalek | c: 8ab319f | jnthn++ | doc/Type/Cool.pod: Extend coverage of EVAL. |
19:32 | |
c: 24cb91d | jnthn++ | doc/Type/Cool.pod: Document EVALFILE. |
|||
19:33
apiw left
19:34
sufrostico joined,
sufrosti1o joined
19:35
apiw joined
|
|||
nine | Note to self: always write the user of an API first. Keeps you from pushing embarassing API mistakes... | 19:36 | |
FROGGS | yeah | 19:37 | |
lizmat | nine: personally, I prefer a bit of a whirlpool approach, but your note is well taken | ||
nine | Why the hell did I think an API for finding an installed module would be a good match for finding out if a dist is already installed? Why not provide a method that actually looks for a dist? | ||
lizmat | nine: wasn't that what .candidates was ? | 19:38 | |
19:38
ka left
|
|||
nine | lizmat: yes, .candidates let you look for a module same as .resolve now does. But a tool like panda is actually more interested in dists, not modules. | 19:38 | |
19:39
rurban left
|
|||
lizmat | nine: ah, good point :-) | 19:39 | |
dalek | kudo/nom: e588d93 | lizmat++ | src/core/Str.pm: Remove superfluous return |
||
Skarsnik | Ok, my last iteration before doing a PR gist.github.com/Skarsnik/c4bc15b75b883f69fde1 | 19:41 | |
19:43
p6newbee left
19:44
ka joined
19:49
shicheng joined
|
|||
Skarsnik | gah of course that does not work since the GUMBO_LIB has no type now that is executed at runtime >< | 19:51 | |
19:51
apiw left
|
|||
Skarsnik | it should work like auto in c++ xD | 19:51 | |
dalek | kudo/nom: 4cd2875 | lizmat++ | src/core/Str.pm: Change curly into postfix if And reorder conditional because this seems to only be applicable when squashing, so check that first! |
19:52 | |
19:52
ka left
19:53
jameslenz left
19:54
jameslenz joined,
SCHAAP137 joined
|
|||
lizmat | afk for some deadpool, then work on P6W & | 20:00 | |
20:03
apiw joined
|
|||
orbus | apparently 2016.01 came out and I totally missed it | 20:05 | |
orbus compiles | 20:06 | ||
20:08
ka joined
|
|||
Skarsnik | hm, I am confused. I don't get this error gist.github.com/Skarsnik/28555eade4bd5a40d036 | 20:10 | |
20:13
darutoko left
20:17
llfourn joined
|
|||
geekosaur | suggest you check with "dd GUMBO_LIB" to make sure it's what you think it is | 20:23 | |
20:23
musiKk joined
|
|||
Skarsnik | dd will be executed at runtime, trait are compile time x) | 20:24 | |
geekosaur | so comment out the third one | ||
Skarsnik | but it should fallback on the non typed version of the trait? | ||
20:24
tharkun_ left,
tharkun_ joined
20:25
tharkun_ is now known as tharkun,
apiw left
|
|||
Skarsnik | I mean, it's etheir it don't find a specialised candidate and use the generic version or use the right one. but why it complain it find nothing? | 20:26 | |
commenting the 3 trait still does not work. hum | 20:29 | ||
oh it's the \GUMBO_LIB that confuse it. using $GUMBO_LIB instead work | 20:31 | ||
well I get Any as type. damn | 20:32 | ||
perlpilot | yep, because your initilization happens at runtime while your traits are compile time. | 20:33 | |
Skarsnik | m: use NativeCall; my \foo = "Hello"; sub piko is native(foo) { * }; | ||
camelia | rakudo-moar 4cd287: OUTPUT«5===SORRY!5=== Error while compiling /tmp/QtJ3n1LowqCan't use unknown trait 'is native' in a sub declaration.at /tmp/QtJ3n1Lowq:1 expecting any of: rw raw hidden-from-backtrace hidden-from-USAGE pure default DEPRECATED i…» | ||
Skarsnik | Look like a parse bug? | 20:34 | |
probably fail with every trait | 20:35 | ||
20:35
cognominal joined
|
|||
jnthn | No, \foo isn't bound until runtime | 20:35 | |
But traits are applied at compile time | |||
So it's trying to apply the trait with Mu | |||
perlpilot taps the mic | 20:36 | ||
*tap* *tap* *tap* Is this thing on? | |||
Skarsnik | perlpilot, it's a bit a annoying that it does not guess the type from the sub at the right signature (it expliclty return a type) | ||
jnthn | perlpilot: heh, was distracted by valgrind output :) | 20:37 | |
perlpilot | Skarsnik: type-inference isn't a thing (yet) | ||
Skarsnik | jnthn, hm so Mu can't be a value for the trait argument? | ||
jnthn | Skarsnik: Well it *can* but only if a trait declare it accepts that. | 20:38 | |
And I don't see why `is native` would | |||
Skarsnik | well nc declaration is just the 'generic' one. | 20:40 | |
jnthn | I've said more than once before now that the right way to provide a richer interface to native resolution would be to pass a type there that implement some interface, perhaps formalized by a role. | ||
20:40
adu joined
|
|||
Skarsnik | That why I did jnthn | 20:40 | |
jnthn | OK, good. | ||
Skarsnik | but I wanted to hide the type from the user so he does not have to type the value | ||
jnthn | Why? | 20:41 | |
perlpilot | Skarsnik: have you heard about waterbeds and language complexity? :) | ||
Skarsnik | Well it will be: my NC-Library-Handle $LIB = register-native-lib(....); | 20:42 | |
sortiz | Anyone need to create an empty (zeroed) Buf of a given size? See github.com/rakudo/rakudo/pull/712 and comment | ||
Skarsnik | annoying we have to put the sigil x) | ||
sortiz, could be useful with NC probably | 20:43 | ||
sortiz | Skarsnik, yes, that's the idea. | ||
jnthn | Skarsnik: But...you're passing it off to a trait, so it should be declared at compile time, not runtime | ||
20:43
avenj left
|
|||
jnthn | "my" is too late | 20:44 | |
Skarsnik | but compile time sucks with precompile | ||
jnthn | No, you suck at designing things to work WITH Perl 6 rather than against it. | ||
Skarsnik | in this case | ||
20:45
TeamBlast left
|
|||
jnthn | class MyLibrary { method resolve() { ...called on first invocation of trait... } }; sub foo() is native(MyLibrary) { * } | 20:45 | |
ugexe | m: say Buf.new( 0 xx 5 ) | ||
camelia | rakudo-moar 4cd287: OUTPUT«Buf:0x<00 00 00 00 00>» | ||
Skarsnik | NC solve the libname the first time a sub is called | ||
20:45
Jaglor left
|
|||
jnthn | Skarsnik: Right, which is at runtime. | 20:46 | |
sortiz | Skarsnik, 'is native' accepts a Callable, that way you can move the evaluation till runtime. | ||
Skarsnik | the Callable solution is aweful for me | ||
jnthn | Why? | ||
perlpilot is totally confused. | |||
20:47
donaldh joined
|
|||
perlpilot | Skarsnik: I have no understanding of your motivations here. It seems your constructing a situation such that any solution is deliberately wrong or broken in some way. | 20:47 | |
s/your/you're/ | |||
oops, s:2nd/your/you're/ actually | 20:48 | ||
20:48
_dolmen_ joined,
TeamBlast joined
20:50
shicheng left
|
|||
Skarsnik | I base this on a 1-2 common usage: Knowning the lib throug some base info the developper know (basename and the version), allowing the user to use a ENV variable to locate the lib. Or find the lib at runtime like with pkg-config | 20:51 | |
20:52
edehont joined
|
|||
jnthn | sortiz: I left a comment on the PR | 20:53 | |
Skarsnik | actually if I want to do that I need to give a Callable to NC. It's not really friendly (and I need to use NC interntal to not rewrite the guess_lib_name). Here I want just to build a 'blackbox' type | ||
And the issue with the Callable solution, you don't really control when it will be called | 20:55 | ||
20:56
edehont_ joined
|
|||
jnthn | Why do you want to control when it will be called? | 20:56 | |
20:56
edehont_ left,
edehont left
20:57
edehont joined
|
|||
Skarsnik | well using the %*ENV example, maybe the env will be changed before your C lib call, like if you work with multiple lib | 20:58 | |
jnthn | So, solve that inside the sub with INIT? | ||
sub resolver() { INIT my $foo = %*ENV<blah>; ... } | 20:59 | ||
That'll capture what it was at startup (yes, even if pre-comp'd) | |||
perlpilot | Would using an "our" var do the same? (If he wanted to continue with the same general approach) | 21:01 | |
Aren't our vars initialized at INIT time? | |||
21:01
revhippie joined
|
|||
jnthn | perlpilot: Yeah, though have the side-effect of being our-scoped :) | 21:02 | |
Skarsnik | Oh I need to patch DBIish :( | ||
It use a constant MYSQ_LIB = %ENV<mysql> || (regular stuff); | |||
and well, that does not really work | 21:03 | ||
worked before precomp x) | |||
21:04
edehont left
21:06
geraud joined
21:18
yqt joined
|
|||
sortiz | jnthn, The use case of :elems is only for pre-allocate some slots, not for fix its size. Right now Blob size if fixed and Buf can grow, but in both cases, if I need some initial size, the alternatives are expensive. | 21:19 | |
s/if fixed/is fixed/ | |||
jnthn | sortiz: OK, then I think it needs to be more like initial-elems or so | 21:20 | |
21:20
nowan_ joined
|
|||
jnthn | TimToady may also have some views, given it's a naming question :) | 21:20 | |
perlpilot | it would be nice if you could do something like :init(5) too :) | ||
(to initialize the elements to the number 5) | 21:21 | ||
21:22
[Sno] left,
nowan left
21:24
TreyHarris joined
|
|||
sortiz | jnthn, Yes. Thank you. I'll wait for a decision. | 21:24 | |
21:25
nowan_ left,
nowan joined
|
|||
sortiz | perlpilot, For that case I prefer something like Blob.fill(...) | 21:26 | |
21:29
kaare_ left
|
|||
TreyHarris | On Rakudo 2016.01.1 built on MoarVM version 2016.01, running on darwin 15.2 (El Capitan), the following one-liner causes the moar process to runaway, quickly using up all available CPU: | 21:30 | |
perl6 -e 'say so "foo" ~~ /<.ws>+/;' | |||
Should I report this as a bug? | |||
Skarsnik | m: say so "foo" ~~ /<.ws>+/; | 21:31 | |
21:31
musiKk left
|
|||
camelia | rakudo-moar 4cd287: OUTPUT«(timeout)» | 21:32 | |
Skarsnik | I am not sure how so work, but it look like a bug x) | 21:33 | |
TreyHarris | m: say so "foo" ~~ /<.ws/; | ||
camelia | rakudo-moar 4cd287: OUTPUT«5===SORRY!5=== Error while compiling /tmp/FUWthKeDjtUnable to parse expression in metachar:sym<assert>; couldn't find final '>' at /tmp/FUWthKeDjt:1------> 3say so "foo" ~~ /<.ws7⏏5/; expecting any of: term» | ||
TreyHarris | oops | ||
m: say so "foo" ~~ /<.ws>/; | |||
camelia | rakudo-moar 4cd287: OUTPUT«True» | ||
TreyHarris | the plus makes it go runaway | ||
Skarsnik: it's not the so. | 21:34 | ||
m: say "foo" ~~ /<.ws>+/; | |||
jnthn | TreyHarris: <.ws> can match nothing | ||
TreyHarris: And can match nothing infinitely | |||
camelia | rakudo-moar 4cd287: OUTPUT«(timeout)» | ||
jnthn | You don't need to (and shouldn't) quantify <.ws> | ||
Skarsnik | ws is whitespace? | ||
jnthn | Yes, but with the !ww behavior (unless you override it) | 21:35 | |
Skarsnik | maybe it should warn? | ||
TreyHarris | jnthn: in Perl 5 you can't cause an infinite loop that way, so I didn't know if it was a bug or not. That's why I'm asking. | ||
Skarsnik | I added a compile time solution gist.github.com/Skarsnik/c4bc15b75b883f69fde1 | 21:36 | |
skids | RT#75586 probably covers it | 21:37 | |
jnthn | TreyHarris: There's at lesat one RT ticket tracking the issue of whether quantifying empty things should do that or not. | ||
skids | rt.perl.org/Public/Bug/Display.html?id=75586 # alas poor synopsbot, I knew ye well | ||
TreyHarris | jnthn: ah, my search-fu wasn't good enough to find it. That's why I asked here :) | ||
21:38
colomon left
|
|||
jnthn | We're aware of it, just undecided on how to fix it (or whether to, though I think we generally consider it desirable to if possible) | 21:38 | |
jnthn thought "oh, that's easy" at least once, then it wasn't :) | |||
Forget exactly why | |||
Skarsnik | just warning about it it's not easy thou? | 21:41 | |
21:42
ely-se joined
|
|||
jnthn | I think if we can detect it well enough not to build up an infinite number of backtrack points, we could not do that rather than do the warning :) | 21:42 | |
21:50
sno joined
21:51
partly_ left
21:53
dbrunton joined
|
|||
mst | that looks like at least the reasonably normally runnable into cases could be made to throw an exception telling you what to do instead | 21:54 | |
21:54
M-eternaleye left,
M-eternaleye joined
|
|||
flussence | maybe we need a trait_mod on regex-y things that turns quantifying them into a compile-time error | 21:54 | |
21:55
zacts joined
21:57
shicheng joined
|
|||
MadcapJake | is there a concise way to test if some code causes a certain exception to throw? «dies-ok» doesn't let you specify the error type. | 21:58 | |
flussence | .oO(or a Sufficiently Smart Compiler that can detect when you try to quantify a declarative regex that can match 0..*) |
||
m: use Test; say &throws-like | 21:59 | ||
camelia | rakudo-moar 4cd287: OUTPUT«sub throws-like ($code, $ex_type, $reason?, *%matcher) { #`(Sub|95507800) ... }» | ||
22:00
skids left
|
|||
MadcapJake | oh! thanks flussence! don't know how i missed that | 22:00 | |
jnthn | throws-like is nice :) | 22:01 | |
flussence | does that work for CX::Warn too? | ||
jnthn | Not sure | 22:02 | |
flussence | that's a CONTROL-ish, not a CATCH-ish, so I'd guess not | ||
jnthn | Right | ||
It'd have to explicitly do so | |||
m: use Test; throws-like { warn 'foo' }, CX::Warn; | |||
camelia | rakudo-moar 4cd287: OUTPUT« 1..2foo in block at /tmp/H1RvP4jmhb line 1 not ok 1 - code dies # Failed test 'code dies'# at /tmp/H1RvP4jmhb line 1 ok 2 - # SKIP Code did not die, can not check exception # Looks like you failed 1 test of 2not ok…» | ||
MadcapJake | i've written a whole bunch of try/catch blocks with a series of pass/flunk style tests :S so I'm really glad to cut a lot of that out | 22:03 | |
dbrunton | I have a few questions about doc/Supply.pod, and I'm not completely certain where to raise them. | 22:05 | |
Anyone here interested and/or have a few minutes to talk it through? | 22:06 | ||
jnthn | dbrunton: Have a few minutes...hopefully have the brane for it too :) | 22:08 | |
dbrunton | hee hee, okay :) | 22:11 | |
Starting with the Promise method- | |||
The doc has a couple places where it doesn't match the implementation and tests, specifically- | |||
Supply.new - could be Supplier.new.Supply, but | 22:12 | ||
later, the Supply $s has emit called on it, which is also not a method on a Supply, but on a Supplier, so maybe it needs to have a Supplier around. | |||
So, something like this works: my $r = Supplier.new; my $s = $r.Supply; | 22:13 | ||
22:13
raiph joined
|
|||
dbrunton | Then the emit down below can be changed to $r.emit. | 22:13 | |
22:14
colomon joined
|
|||
dbrunton | But this is where it starts to get a little tangled, because the promise acts a little different as well. | 22:14 | |
Specifically, $p.then doesn't call its method until $r.done, which is, again, not exactly what's documented. | 22:15 | ||
jnthn | Yeah, there were a number of changes, and it seems the docs weren't updated to match :) | ||
dbrunton | Yeah, that part's fine, I'm just not certain which behavior is correct- should I just make it so the documentation reflects the current rakudo behavior? | 22:16 | |
I think it's possible there is a bug or two in there (specifically, I'm not certain the $p.then behavior in rakudo is correct, and by not certain, I just mean not certain :)) | |||
I feel competent to get rid of all the Supply.new calls and replace them with Supplier.new.Supply or something equivalent :) | 22:17 | ||
I could also happily muddle through this and send it along as a pull request for discussion if that's more sensible, I just wouldn't want it to get merged without some pretty thorough review :) | 22:18 | ||
22:18
gcole_ left
22:19
gcole joined
|
|||
dalek | c: 6ddeaa2 | jnthn++ | doc/Type/Supply.pod: Fix Supply.Promise docs; dbrunton++. |
22:21 | |
22:21
shicheng left,
vendethiel left
|
|||
jnthn | Yeah, if there's more places that need a similar tweak, a PR would be good. | 22:22 | |
The docs were certainly in the wrong for the case of .Promise | |||
They were right at some point in history :) | 22:23 | ||
dbrunton | For sure :) | ||
jnthn | We had various cleanups related to Supply not so long before the Christmas release. | ||
dbrunton | Thanks for taking a look, I'll take another pass through. The test coverage is pretty good, I presume I can treat that as gospel truth? | ||
22:24
shicheng joined,
sufrostico left,
sufrostico joined
|
|||
dalek | c: 614044b | jnthn++ | doc/Type/Supply.pod: There is no Supply.close method any more. You .close individual taps. |
22:25 | |
jnthn | dbrunton: Yeah, so long as they're not fudged (marked with something like `#?rakudo skip ...` or so) | ||
dbrunton: But we consider the test suite is the language specification, so it's a good place to look for what is intended behavior. | 22:26 | ||
dbrunton | jnthn: perfect, thanks for taking a pass through it. I have to go feed the kids dinner, but I sent a small pull request and will happily muddle through Supply.wait (the other one that was a bit wonky). | 22:28 | |
22:28
mohae left
|
|||
dbrunton | I really appreciate your all's work on this, it's been quite fun to work with. | 22:28 | |
22:29
khw left
22:30
mohae joined
|
|||
dalek | c: 7e56f2e | (David Brunton)++ | doc/Type/Supply.pod: live method Supplier creates a Supply. |
22:30 | |
c: 13d61d7 | RabidGravy++ | doc/Type/Supply.pod: Merge pull request #396 from dbrunton/patch-9 live method |
|||
jnthn | Oops, that PR adds back the doc for the close method that I removed... | ||
dbrunton | Shoot, I'm sorry jnthn. | ||
jnthn | np :) | 22:31 | |
RabidGravy | oh sorry I should have noticed | ||
dbrunton | I need to take a break anyhow, so no collisions from me for a while. | ||
:) | |||
Again, thank you all. You're the best! | |||
dalek | c: 332c51d | jnthn++ | doc/Type/Supply.pod: Remove Supply.close docs, again. :-) |
22:32 | |
jnthn | dbrunton: Thanks for the PR. Happy feeding. :-) | ||
22:32
xinming left
22:33
xinming joined,
khw joined
22:36
dbrunton left
22:40
flaviusb left
22:41
flaviusb joined
22:42
avenj joined,
avenj left,
avenj joined
|
|||
sortiz | m: use NativeCall; class MV is repr('CStruct') { has uint64 $.start; method s { if $!start {} } } | 22:46 | |
camelia | rakudo-moar 4cd287: OUTPUT«===SORRY!===Cannot unbox a type object» | ||
lizmat returned from Deadpool and starts working on the P6W | |||
sortiz | m: use NativeCall; class MV is repr('CStruct') { has uint64 $.start; method s { if +$!start {} } } # This works :/ | 22:47 | |
camelia | ( no output ) | ||
sortiz | And the error message is totally uninformative! | 22:48 | |
Skarsnik | duh | 22:51 | |
I don't even get why it does not work x) | |||
22:53
adu left
22:54
colomon left
|
|||
sortiz | Toke me hours to find the point of the error! | 22:55 | |
jnthn | Odd, that's a compile-time failure even | ||
raiph | doc.perl6.org/language/control#if says "The block attached to the condition will only be evaluated if the condition means True when coerced to Bool." | ||
22:56
ely-se left
|
|||
jnthn | sortiz: Yeah, it's a crash during code-gen, bizzarely | 22:56 | |
sortiz: Please RT it, if you didn't already. --ll-exception gives some clues as to where it's going wrong. | |||
sortiz | I'll RT it. | 22:57 | |
jnthn | Thanks | 22:58 | |
jnthn too tired for more patching today | |||
sortiz | jnthn, Do you distract with a mad experiment? See gist.github.com/salortiz/64e34f05273e34b04310 | 23:09 | |
23:16
colomon joined
23:18
adu joined,
kurahaupo left
23:19
skids joined
|
|||
orbus | my $c=Channel.new; my $s1=$c.Supply; my $s2=$c.Supply; $s1.tap(-> $x {say "1:$x"}); $s2.tap(-> $y {say "2:$y"}); for ^10 {$c.send($_)}; $c.close; await $c.closed | 23:19 | |
m: my $c=Channel.new; my $s1=$c.Supply; my $s2=$c.Supply; $s1.tap(-> $x {say "1:$x"}); $s2.tap(-> $y {say "2:$y"}); for ^10 {$c.send($_)}; $c.close; await $c.closed | |||
camelia | rakudo-moar 4cd287: OUTPUT«Could not spawn thread: errorcode -111:0» | ||
orbus | d'oh | ||
23:21
_dolmen_ left
|
|||
jnthn | I think the camelia is limited (by memory?) in how many threads can be started. | 23:21 | |
And the scheduler isn't smart enough to not make so many | |||
23:21
ryan_ joined
|
|||
orbus | yeah | 23:22 | |
well | |||
was just trying to figure out if the results of that are expected behavior | |||
the values from the channel only get emitted on one supply or the other | |||
I was going to document Channel.Supply better | |||
jnthn | Yeah, they compete | ||
orbus | okay, cool | ||
I'll write something up and submit a pr | 23:23 | ||
thanks | |||
jnthn | Channels are largely for that kind of use case | ||
orbus | sure | ||
jnthn | Means you can spin up a bunch of workers that react { whenever $channel { ... } } | ||
And they'll compete over the incoming work | 23:24 | ||
orbus | I was just thinking it might also be nice to have a way for a single channel to send to multiple endpoints | ||
23:24
Ben_Goldberg joined
|
|||
orbus | there might already be one | 23:24 | |
jnthn | my $s = $channel.Supply.share; | ||
orbus | ah | ||
okay, cool | 23:26 | ||
haven't had much time to mess with perl6 stuff lately | |||
life tends to get in the way | |||
23:28
ryan_ left
|
|||
jnthn decides to let sleep get in the way :) | 23:30 | ||
'night o/ | |||
23:30
Laurent_R left
|
|||
lizmat | good night, jnthn! | 23:31 | |
orbus | later | ||
skids | m: Failure.new(Exception) # This is a less awesome error than it was prior to today's optimization. Though, even then it was only awesome by accident. | 23:35 | |
camelia | rakudo-moar 4cd287: OUTPUT«Use of uninitialized value of type Exception in string contextAny of .^name, .perl, .gist, or .say can stringify undefined things, if needed. in block <unit> at /tmp/wr4MBQeDE_ line 1Actually thrown at: in block <unit> at /tmp/wr4MBQeDE_ l…» | ||
skids | (used to be "Invocant requires an instance...") | ||
orbus | pr sent | 23:37 | |
23:37
Skarsnik left
|
|||
orbus goes to find food | 23:37 | ||
23:38
shicheng left,
TreyHarris left
23:43
donaldh left,
RabidGravy left
23:47
yqt left
23:49
shicheng joined,
rindolf left
|
|||
lizmat | and another Perl 6 Weekly hits the net: p6weekly.wordpress.com/2016/02/15/...ersioning/ | 23:54 | |
and on that note: good night, #perl6! | 23:56 | ||
sortiz | 'night lizmat | 23:57 | |
23:59
shicheng left
|