»ö« Welcome to Perl 6! | perl6.org/ | evalbot usage: 'p6: say 3;' or /msg camelia p6: ... | irclog: irc.perl6.org or colabti.org/irclogger/irclogger_log/perl6 | UTF-8 is our friend! 🦋 Set by Zoffix on 25 July 2018. |
|||
irced | m: await IO::Socket::Async.connect("irc.freenode.net", 6667).then: -> $p { if $p.status { given $p.result { .print: "NICK IRS\nUSER z z z z\nJOIN #perl6\nPRIVMSG #perl6 :What are you waiting for? Kill that sleeping maniac!\n"; react { whenever .Supply { .say } } } } } | 00:01 | |
00:01
IRS joined
|
|||
IRS | What are you waiting for? Kill that sleeping maniac! | 00:01 | |
00:02
IRS left
|
|||
evalable6 | (signal SIGHUP) :wolfe.freenode.net NOTICE * :*** Looking up your hostname...␦ :wolfe.fre… |
00:02 | |
irced, Full output: gist.github.com/64716437e7ad893990...8ca2a312d7 | |||
00:06
tyilanmenyn left
00:08
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
tobs | m: say 10.7 mod 10 | 00:25 | |
evalable6 | (exit code 1) Cannot resolve caller infix:<div>(Rat:D, Int:D); none of these signatures match: (Int:D \a, Int:D \b --> Int:D) (int $a, int $b --> int) in block <unit> at /tmp/jifSNGIpz4 line 1 |
||
tobs | wouldn't it be nice if that worked? | ||
m: multi infix:<mod> (Rat $r, Int $i) { $r - $i * floor($r / $i) }; say 10.7 mod 10 | 00:26 | ||
evalable6 | 0.7 | ||
tobs | m: multi infix:<mod> (Rat $r, Int $i) { $r - $i * floor($r / $i) }; say 10.7 mod 8 | ||
evalable6 | 2.7 | ||
tobs | like that I guess | 00:27 | |
timotimo | m: say 10.7 % 10 | ||
evalable6 | 0.7 | ||
timotimo | tobs: mod is integer modulus, % is general modulus | ||
like / and div | |||
m: say 10 div 3; say 10 / 3 | 00:28 | ||
evalable6 | 3 3.333333 |
||
irced stops breathing in his sleep momentarily. | |||
tobs | thanks, timotimo. (I sometimes work in a language where mod and div are just synonyms for / and %) | 00:29 | |
timotimo | no prob | 00:30 | |
00:34
tyilanmenyn joined
00:38
vrurg joined
00:39
zachk left
00:40
dct_ left
00:43
tyilanmenyn left
00:46
lmy9900 joined
00:47
kurahaupo left,
kurahaupo joined
00:49
lmy9900 left
|
|||
irced wakes up. | 00:49 | ||
00:50
aindilis` left
|
|||
irced | whoa, I've always felt that fortunes had something meaningful to say to me. I just read this fortune: static from nylon underwear . so that's where it was coming from when I couldn't stay grounded when I was upgrading my pc. oh, where am I ? perl6. oops, never mind. | 00:51 | |
irced falls back to sleep. | |||
00:54
kurahaupo_ joined,
kurahaupo left,
kurahaupo_ left
00:57
kurahaupo joined
00:59
irced left
01:10
tyilanmenyn joined
01:12
irced joined
|
|||
irced | hey timotimo, here's one you might not have seen... | 01:13 | |
m: [].^methods | |||
evalable6 | |||
irced | aww | ||
p6: [].^methods | |||
evalable6 | |||
irced | aww | ||
m: my @arr; arr.^methods; | 01:15 | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/iqcTqDE59Q Undeclared routine: arr used at line 1 |
||
timotimo | in contrast to the REPL you're perhaps using, the eval bots won't output the value of the last statement | ||
irced | m: my @arr=[]; arr.^methods; | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/s0Db_gtj44 Undeclared routine: arr used at line 1 |
||
irced | m: my @arr=[]; @arr.^methods; | ||
evalable6 | |||
timotimo | so you'll need a "say" or similar | ||
m: say [].^methods | |||
evalable6 | (iterator from-iterator from-list new STORE reification-target FLATTENABLE_LIST shape pop … | ||
timotimo, Full output: gist.github.com/e24c06f468e73dc0be...2048dd3d7f | |||
irced | right right, thanks | ||
timotimo | YW | ||
01:18
sena_kun left
|
|||
irced | m: say now; | 01:18 | |
evalable6 | Instant:1549070363.088548 | ||
irced | m: say now.^methods; | 01:19 | |
evalable6 | (SET-SELF new from-posix to-posix Bridge Num Rat Int narrow Date DateTime Instant pred cot… | ||
irced, Full output: gist.github.com/96b7a414a0f6e495ee...328c261a9f | |||
irced | say now.DateTime; | ||
evalable6 | 2019-02-02T01:19:13.856386Z | ||
irced | say now.Rat; | ||
evalable6 | 1549070408.310907 | ||
irced | say now.Rat.Nude; | ||
timotimo | it's lower cased | ||
irced | say now.Rat.nude; | ||
evalable6 | (1823255903179 1177) | ||
irced | k, thanks :-) | 01:20 | |
timotimo | m: say now.Rat.Nude | ||
evalable6 | (exit code 1) No such method 'Nude' for invocant of type 'Rat'. Did you mean any of these? Num nude in block <unit> at /tmp/78DvxXFE7V line 1 |
||
timotimo | look it suggests other methods that do exist :) | ||
irced | ahh, eval redeems itself! | 01:21 | |
irced pets evalable6. | |||
timotimo | the "m:" in front was important :) | ||
irced | m: (1, 2, 3) <<+>> (1,2,0); | 01:25 | |
evalable6 | Potential difficulties: Useless use of <<+>> in sink context at /tmp/aALwL38Dov:1 ------> 03(1, 2, 3) 08⏏04<<+>> (1,2,0); |
||
irced | m: say (1, 2, 3) <<+>> (1,2,0); | 01:26 | |
evalable6 | (2 4 3) | ||
irced | m: say [1, 2, 3] <<+>> [1,2,0]; | ||
evalable6 | [2 4 3] | ||
timotimo | you want your mind blown a little bit more by hyper ops? | ||
irced | m: say < 1, 2, 3 > <<+>> < 1, 2, 0 > | ||
evalable6 | (exit code 1) Cannot convert string to number: trailing characters after number in '031⏏04,' (indicated by ⏏) in block <unit> at /tmp/VDsIVpVtdM line 1 |
||
01:27
lmy9900 joined
|
|||
timotimo | m: say { cookies => 9, chips => 4 } <<+>> { cookies => 1, chips => 99 } | 01:27 | |
evalable6 | {chips => 103, cookies => 10} | ||
irced | tis a little brain but I'm down for it | ||
timotimo | m: say (1, (2, 3, 4), 2) <<+>> (5, (4, 4, 4), 9) | 01:28 | |
evalable6 | (6 (6 7 8) 11) | ||
irced picks up the fragments of bone and brain from the floor and attempts to reassemble his skull. | |||
eww, brain matter | |||
timotimo | i'll be AFK for a while :) | 01:29 | |
irced | okay, I'm still cleaning up from that first one | ||
01:29
lmy9900 left
|
|||
timotimo | a long while | 01:29 | |
irced | ok, I talk mostly to myself anywayz | 01:30 | |
irced has a insider conversation with himself. | |||
m: say put "off" | 01:34 | ||
evalable6 | off True |
||
irced | m: put "off" | ||
evalable6 | off | ||
irced | m: put 'off' | ||
evalable6 | off | ||
irced | m: put 'off\n' | ||
evalable6 | off\n | ||
irced | m: print 'off\n' | 01:35 | |
evalable6 | off\n | ||
irced | m: print "off\n" | ||
evalable6 | off | ||
01:41
saki joined
01:45
aindilis joined
|
|||
irced | m: say $*USER | 01:47 | |
evalable6 | bisectable | ||
irced | m: say $*PROGRAM | ||
evalable6 | "/tmp/hBGeZNifdr".IO | ||
irced | m: say $*EXECUTABLE | 01:48 | |
evalable6 | "/tmp/whateverable/rakudo-moar/92ebc333a61457e353151e376b8fdc080bfafdea/bin/perl6".IO | ||
irced | m: say $*CWD | ||
evalable6 | "/home/bisectable/git/whateverable".IO | ||
irced | m: say $*PERL | 01:49 | |
evalable6 | Perl 6 (6.d) | ||
irced | m: say $*VM | ||
evalable6 | moar (2018.12.45.ga.9.d.02578.a) | ||
01:50
kurahaupo left
01:57
kurahaupo joined
01:59
schwaa joined
02:00
leont left,
schwaa is now known as tomato_,
tomato_ is now known as schwaa
02:04
kurahaupo left
02:13
[particle]1 joined
02:14
[particle] left
02:16
kurahaupo joined
02:22
kurahaupo left
02:24
markoong left,
markoong joined
02:27
ToddAndMargo joined
|
|||
ToddAndMargo | If you will suffer a newbie question, what is the best way to test for a series of bytes in a Buf? I need to know the positino of 46 00 69 00 6C 00 65 00 56 00 65 00 72 00 73 00 69 00 6F 00 6E and read till I find a )D | 02:29 | |
0D | |||
02:35
saki left
02:38
markoong left
02:46
kurahaupo joined
02:53
kurahaupo_ joined
02:55
kurahaupo left
03:02
irced left
03:07
kurahaupo_ left
03:08
kurahaupo joined
|
|||
ToddAndMargo | What do I use instead of "contains" on a type Buf? | 03:13 | |
03:16
cpan-p6 left,
cpan-p6 joined
03:19
kurahaupo left,
kurahaupo joined
03:30
kurahaupo left,
kurahaupo joined
03:31
kurahaupo left
03:32
kurahaupo joined
03:38
ToddAndMargo left
03:45
kurahaupo left
04:01
irced joined
04:05
schwaa left
04:06
schwaa joined
04:20
ToddAndmargo joined
|
|||
ToddAndmargo | What do I use instead of `pos` to find the position of a pattern in a Buf? | 04:21 | |
irced | 286 souls . monks maybe . they have taken a vow of silence . and me, well, I'm still learning. | 04:36 | |
ToddAndmargo | google is no help. Lots of hits on perl 5 | 04:38 | |
irced | one algorithm could be thus | 04:41 | |
given the length of the pattern and given a chosen "sub buffer length", extract a string of length sub buffer and check it for a match position | |||
then move pattern-length -1 from the end of the extracted part and read again | 04:42 | ||
rinse and repeat | |||
i have never written such an algorithm so you may need to correct me :-) | |||
it's costly but less expensive in terms of the logic that would have to go into a more efficient algorithm | 04:43 | ||
that is, the mental logic | |||
ToddAndmargo | If I have to, I will. I was hoping our intrepit heros had a function for it. | 04:44 | |
irced | they are ghosts, killed by hubris | ||
ToddAndmargo | Basically I need the pos equivalent for Buf | ||
Or they may be doing what I should be doing: sleeping! | 04:45 | ||
irced | m: await IO::Socket::Async.connect("irc.freenode.net", 6667).then: -> $p { if $p.status { given $p.result { .print: "NICK hubris\nUSER z z z z\nJOIN #perl6\nPRIVMSG #perl6 :I will be the death of you ALL!\n"; react { whenever .Supply { .say } } } } } | 04:47 | |
04:47
hubris joined
|
|||
hubris | I will be the death of you ALL! | 04:47 | |
04:47
hubris left
|
|||
evalable6 | (signal SIGHUP) :leguin.freenode.net NOTICE * :*** Looking up your hostname...␦ :leguin.f… |
04:47 | |
irced, Full output: gist.github.com/739181632fbaf8c5b1...da18567470 | |||
irced | see | ||
04:59
schwaa left
|
|||
irced | a better algorithm would be to look for the next instance of the first character of a pattern then only extract the length of the pattern to check a match and move on if none | 05:00 | |
ToddAndmargo | actaully I do beleive it is the binary equivalent of `index` I am looking for | ||
irced | naturally the counter is the position or subscript index of the bf | 05:01 | |
bf | |||
o my gawd i forgot a letter of the alphabet, abcdefghijklmnopqrstvwxyz | |||
crap | |||
05:01
smallick joined
|
|||
irced | so basically you can roll your own. you might even be able to make it faster than an inhouse algorithm by parallelizing and then you would probably keep yours for future use. | 05:03 | |
then you'd write it in c/c++ and you'd be the buf'est pattern searcher | 05:04 | ||
c++ probably, since c++17 has <threads> | 05:05 | ||
err, that goes back to c++14 maybe 11, whatever. | |||
but I digress. | |||
m: 'abcdefghijklmnopqrstvwxyz'.elems | 05:08 | ||
evalable6 | |||
irced | say m: 'abcdefghijklmnopqrstvwxyz'.elems | ||
m: say 'abcdefghijklmnopqrstvwxyz'.elems | |||
evalable6 | 1 | ||
irced | m: say 'abcdefghijklmnopqrstvwxyz'.length | 05:09 | |
evalable6 | (exit code 1) No such method 'length' for invocant of type 'Str'. Did you mean any of these? chars codes in block <unit> at /tmp/oTgY2echHm line 1 |
||
irced | m: say 'abcdefghijklmnopqrstvwxyz'.chars | ||
evalable6 | 25 | ||
irced | jst as I sspected. | ||
smallick | m: say 'a'..'z' .elems | ||
evalable6 | "a"..1 | ||
irced | m: say 'a'..'t' | ||
evalable6 | "a".."t" | ||
irced | m: say a..t | 05:10 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/WQy4AYi6Ug Undeclared routines: a used at line 1 t used at line 1 |
||
irced | m: .say for a..t | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/3IV_ah3k7E Undeclared routines: a used at line 1 t used at line 1 |
||
smallick | m: say ('a'..'z').elems | ||
evalable6 | 26 | ||
irced | by george you got it! | 05:11 | |
05:11
ferreira joined
|
|||
irced | m: say 'ferreira, you're not the one' | 05:11 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/EJp_hYBc4U Two ter… |
||
irced, Full output: gist.github.com/1872ce421383027bf5...83c89d1a97 | |||
smallick | irced: you left out 'u' | 05:12 | |
irced | m: say "ferreira, you're not the one" | ||
evalable6 | ferreira, you're not the one | ||
irced | m: for a..t .say | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/G3_G6Kwfc4 Missing… |
||
irced, Full output: gist.github.com/1cea4713209de67a5f...a72190ba5e | |||
05:12
ferreira2 left
|
|||
irced | smallick, i know, i was having an identity crisis | 05:13 | |
smallick | what that mean | ||
irced | i'm being serious | 05:14 | |
05:14
ToddAndmargo left
|
|||
irced | m: await IO::Socket::Async.connect("irc.freenode.net", 6667).then: -> $p { if $p.status { given $p.result { .print: "NICK SERIOUSPOLICE\nUSER z z z z\nJOIN #perl6\nPRIVMSG #perl6 :irced checks out. Moving on.\n"; react { whenever .Supply { .say } } } } } | 05:15 | |
05:15
SERIOUSPOLICE joined
|
|||
SERIOUSPOLICE | irced checks out. Moving on. | 05:15 | |
05:16
SERIOUSPOLICE left
|
|||
evalable6 | (signal SIGHUP) :rajaniemi.freenode.net NOTICE * :*** Looking up your hostname...␦ :rajan… |
05:16 | |
irced, Full output: gist.github.com/1ff3a653f82a7ff5fc...2607424ff8 | |||
irced | smallick, this is where you oh, ha ha | ||
this is where you say, oh, ha ha | |||
irced pulls out his marionette strings and eyes the lifeless in the room. | 05:17 | ||
m: say oh, ha ha | |||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/JUE7tYxNNi Undeclared routines: ha used at line 1 oh used at line 1 |
||
irced | m: say 'oh, ha ha' | ||
evalable6 | oh, ha ha | ||
05:21
smallick left
05:24
aborazmeh left
05:25
_isomorphismes joined
|
|||
irced | m: say q{quote 'this!'} | 05:26 | |
evalable6 | quote 'this!' | ||
irced | m: say q!quote 'this!'! | 05:27 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/8aIb29c87D Two ter… |
||
irced, Full output: gist.github.com/03c48020bc55c6e0cb...d2e694a03e | |||
irced | m: put buf.^methods | 05:36 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/VfTmJvDzMc Undeclared routine: buf used at line 1 |
||
irced | m: put array.^methods | ||
evalable6 | Method object coerced to string (please use .gist or .perl to do that) STORE BIND-POS DELE… |
||
irced, Full output: gist.github.com/4ad761b7d00f9bb239...fcc719d7d3 | |||
irced | m: my @buf = buf.new; put buf.^methods | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/2SrTpraOgJ Undeclared routine: buf used at line 1 |
||
05:39
kurahaupo joined
|
|||
irced eats a live butterfly. | 05:44 | ||
irced toothpicks his teeth. | |||
irced eyes Camelia knowingly. | |||
I know what you're all thinking. I'm not an Andy. | 05:45 | ||
05:48
smallick joined
|
|||
irced | smallick, you Russian? | 05:49 | |
smallick | no | ||
i'm indian | 05:50 | ||
05:50
kurahaupo left
|
|||
irced | oh, you in India? | 05:50 | |
smallick | yes, why | ||
05:50
kurahaupo joined
|
|||
irced | I hear it's rough there. do you always have to watch your back? bar your windows? | 05:50 | |
smallick | what do you mean? | 05:51 | |
irced | I mean I hear it's slums everywhere. | ||
smallick | not everywhere | 05:54 | |
irced | i bet. do you have a president or something? in the states our guy resides in a big White House. | 05:55 | |
smallick | remember, india is 6th richest country, i'm not that rich, anyway | ||
we have rashtrapati bhavan | 05:56 | ||
irced | hmm, well one might say Venezuela is rich because of all its oil exports, but none of its people profit... | ||
rashtrapati bhavan? | |||
05:56
vrurg left
|
|||
smallick | sigh | 05:56 | |
the house (bhavan) of president (rashtrapati) | 05:57 | ||
irced | well, of course the rashtrapati bhavan is not the slums! | ||
smallick | its created by british, anyway | ||
irced | those Brits, can't they conquer anything! major fail in the America too. | 05:58 | |
smallick | i do not think it is a topic here, so i stop | 05:59 | |
irced | and they didn't build anything here. | ||
ok. | |||
smallick | hmm | ||
irced checks the pulse of the other room attendees, one by one. | |||
irced records time of death. | |||
well, I hope you're not afraid of ghosts. | 06:00 | ||
06:00
kurahaupo left
|
|||
smallick | no | 06:00 | |
06:01
kurahaupo joined
|
|||
smallick is not afraid of ghosts | 06:01 | ||
irced nods in approval. | 06:02 | ||
06:09
smallick left
06:11
kurahaupo left,
kurahaupo joined
|
|||
irced | m: put "\c[DAGGER, BLACK HEART]"; | 06:18 | |
evalable6 | †🖤 | ||
06:18
hythm joined
|
|||
irced | m: put "This is { put 'heresy' }!" | 06:20 | |
evalable6 | heresy This is True! |
||
irced | m: put "This is { 'heresy'.chars }!" | ||
evalable6 | This is 6! | ||
irced | m: put "This is { 'heresy'.chars }X3!" | ||
evalable6 | This is 6X3! | ||
irced | m: put "This is { 'heresy'.chars X3 }!" | ||
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/GvPUC6VUEN Bogus s… |
||
irced, Full output: gist.github.com/3f7332a954f757e6a0...ab08ce7d02 | |||
irced | m: put "This is { 'heresy'.chars X 3 }!" | ||
evalable6 | This is 6 3! | ||
irced | m: put "This is {{ 'heresy'.chars} X 3 }!" | 06:21 | |
evalable6 | Block object coerced to string (please use .gist or .perl to do that) This is 3! in block <unit> at /tmp/GfxSywGLzl line 1 |
||
irced | m: put "This is {{ 'heresy'.chars} x 3 }!" | ||
evalable6 | Block object coerced to string (please use .gist or .perl to do that) This is ! in block at /tmp/s0u8muCZvm line 1 |
||
irced | m: put "This is {~{ 'heresy'.chars} x 3 }!" | ||
evalable6 | Block object coerced to string (please use .gist or .perl to do that) This is ! in block at /tmp/OFRvwRzlVX line 1 |
||
irced | m: put "This is {{~ 'heresy'.chars} x 3 }!" | ||
evalable6 | Block object coerced to string (please use .gist or .perl to do that) This is ! in block at /tmp/iNtjvh7M7Z line 1 |
||
06:22
kurahaupo left,
kurahaupo joined
|
|||
irced | m: put "\ttab\t!" | 06:22 | |
evalable6 | ␉tab␉! | ||
06:28
kurahaupo left
06:29
kurahaupo joined
06:31
kurahaupo_ joined
06:32
sauvin joined
06:33
kurahaupo left
06:38
smallick joined
06:41
irced left
06:46
kurahaupo_ left,
kurahaupo joined
|
|||
Xliff | m: say "/webkitgtk.org/reference/webkit2gtk...List.html" ~~ /^ 'http' 's'? '://' .+ '/' *([A-Za-Z]+) '.html' $/ | 06:48 | |
evalable6 | (exit code 1) 04===SORRY!04=== Unrecognized regex metacharacter - (must be q… |
||
Xliff, Full output: gist.github.com/7e3f37f8483e3bcfae...ddbd3bdf45 | |||
Xliff | m: say "/webkitgtk.org/reference/webkit2gtk...List.html" ~~ /^ 'http' 's'? '://' .+ '/' *([A..Za..Z]+) '.html' $/ | ||
evalable6 | Nil | ||
Xliff | m: say "/webkitgtk.org/reference/webkit2gtk...List.html" ~~ /^ 'http' 's'? '://' .+ '/' ([A..Za..Z]+) '.html' $/ | ||
evalable6 | Nil | ||
06:48
xinming_ left
|
|||
Xliff | m: say "webkitgtk.org/reference/webkit2gtk...List.html" ~~ /^ 'http' 's'? '://' .+ '/' ([A..Za..Z]+) '.html' $/ | 06:48 | |
evalable6 | Nil | ||
Xliff | m: say "webkitgtk.org/reference/webkit2gtk...List.html" ~~ /^ 'http' 's'? '://' .+? '/' ([A..Za..Z]+) '.html' $/ | ||
evalable6 | Nil | ||
smallick | m: say 'example.com/path/to/some.html' ~~ /^ 'http' 's'? '://' .+? '/' (.+) '.html' $/ | 06:51 | |
evalable6 | 「example.com/path/to/some.html」 0 => 「path/to/some」 |
||
smallick | m: say 'example.com/path/to/some.html' ~~ /^ 'http' 's'? '://' .+? '/' (\w+) '.html' $/ | 06:53 | |
evalable6 | 「example.com/path/to/some.html」 0 => 「some」 |
||
smallick | m: say 'example.com/path/to/some.html' ~~ /^ 'http' 's'? '://' .+? '/' ([ a..z A..Z ]+) '.html' / | 06:55 | |
evalable6 | Potential difficulties: Space is not significant here; please use quotes or :s (:sigsp… |
||
smallick, Full output: gist.github.com/342f7915c2c6f132d3...3999b4066a | |||
06:57
kurahaupo left,
kurahaupo joined
|
|||
smallick | m: say 'a.bc/d/ef/ghi.html' ~~ /^ 'http' 's'? '://' .+? '/' ([ 'a'..'z' 'A' .. 'Z' ]+) '.html' $/ | 06:59 | |
evalable6 | Nil | ||
smallick | hmm | 07:00 | |
07:00
smallick left
07:10
kurahaupo left
07:11
kurahaupo joined
07:12
jmerelo joined
|
|||
Xliff | m: "WebKitBackForwardListItem" ~~ /(<[A..Z]>+) %% <[a..z]>+/; $/[0].map( .Str ).join('') | 07:17 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/sCJ5emeeUT Missing… |
||
Xliff, Full output: gist.github.com/0265e86e104e0c67d6...2614a400d3 | |||
Xliff | m: "WebKitBackForwardListItem" ~~ /(<[A..Z]>+) %% [ <[a..z]>+ ] /; $/[0].map( .Str ).join('') | 07:18 | |
evalable6 | (exit code 1) 04===SORRY!04=== Error while compiling /tmp/jEwyULtwyt Missing… |
||
Xliff, Full output: gist.github.com/d7adf9ee09016ff12d...d3f852faa3 | |||
Xliff | m: "WebKitBackForwardListItem" ~~ /(<[A..Z]>)+ %% [ <[a..z]>+ ] /; $/[0].map( .Str ).join('') | 07:19 | |
evalable6 | (exit code 1) Use of uninitialized value of type Any in string context. Methods .^name, .p… |
||
Xliff, Full output: gist.github.com/58f51ca778872711c5...0bdd416fe1 | |||
07:20
kurahaupo left
07:21
kurahaupo joined,
ufobat_ joined,
_isomorphismes left
07:25
ufobat left
|
|||
AlexDaniel | nine: hello? :) | 07:28 | |
nine: camelia was down for a bit | 07:29 | ||
it needs some help, I think :) | |||
07:31
kurahaupo left
07:32
kurahaupo joined
07:42
cpan-p6 left,
cpan-p6 joined
|
|||
Geth | doc: 51b7b95cdb | (JJ Merelo)++ | doc/Type/IO/CatHandle.pod6 Completed, rewritten and reflow closes #2600 |
07:42 | |
synopsebot | Link: doc.perl6.org/type/IO::CatHandle | ||
07:46
kurahaupo left
07:47
kurahaupo joined
08:00
kurahaupo left
08:01
kurahaupo joined
08:04
ravenousmoose joined
08:12
kurahaupo left,
kurahaupo joined
08:17
Kaypie left
08:19
Kaiepi left
08:22
kurahaupo left,
kurahaupo joined
08:25
smallick joined
08:31
w17t joined
08:32
w17t left,
w17t joined
|
|||
Geth | doc: bac7d41032 | (JJ Merelo)++ | doc/Type/IO/ArgFiles.pod6 Improves ARGFILES with examples, refs #96 |
08:34 | |
synopsebot | Link: doc.perl6.org/type/IO::ArgFiles | ||
08:34
kurahaupo left
08:38
kurahaupo joined,
rindolf joined
|
|||
ufobat_ | when you've forked a repo on github, is there a way to rebase it to the current version from which you had forked it? | 08:48 | |
i mean on the github website | |||
08:49
ravenousmoose left
08:53
kurahaupo left,
ravenousmoose joined
08:54
patrickb joined
08:57
kurahaupo joined
08:59
hythm left
09:01
ravenousmoose left
09:03
dct_ joined
09:09
nebuchadnezzar joined
09:10
dct_ left
09:12
kurahaupo left,
kurahaupo joined
09:15
smallick left
09:18
_isomorphismes joined
09:23
_isomorphismes left
09:24
[particle] joined,
smallick joined
09:26
[particle]1 left,
smallick left
09:27
kurahaupo left,
dct_ joined,
kurahaupo joined
09:30
smallick joined
|
|||
smallick | m: say 1 ~~ /1/ | 09:31 | |
evalable6 | 「1」 | ||
09:38
Sgeo_ left,
Sgeo_ joined
09:40
jmerelo left
09:42
kurahaupo left
|
|||
DrForr | Hey hey. | 09:43 | |
yoleaux | 22 Nov 2018 14:45Z <tbrowder___> DrForr: Can one of your modules be used to debug Rakudo NQP Grammar.nqp? | ||
09:49
molaf joined
09:50
w17t left
09:51
w17t joined
09:55
w17t left
09:56
w17t joined
09:57
patrickb left
10:00
w17t left,
w17t joined
10:01
w17t left,
w17t joined
10:04
pecastro joined
10:05
ravenousmoose joined
10:09
ravenousmoose left
10:18
reach_satori_ joined
10:20
smallick left
10:21
reach_satori left
|
|||
pmurias | AlexDaniel: finding stuff people are willing to mentor seems to be the problem with gsoc ideas :( | 10:24 | |
nine | m: say "alive" | 10:26 | |
evalable6 | alive | ||
Xliff | m: say sprintf('%1$s %1$s %3$s', 'a', 'b', 'c') | 10:36 | |
evalable6 | a a c | ||
10:44
nine joined
10:45
camelia joined
10:46
ChanServ sets mode: +v camelia
|
|||
nine | AlexDaniel: thanks for the heads-up! Apparently my server needs a reboot every couple of months or the VMs lose their network connection :/ | 10:46 | |
11:19
_isomorphismes joined
11:23
_isomorphismes left
11:28
domidumont joined
11:30
pmurias left,
pmurias joined
11:35
ZZZzz joined,
ZZZzz left
11:38
lucasb joined
11:46
sena_kun joined,
saki joined
11:47
saki left
11:48
smallick joined,
smallick left
11:49
smallick joined
11:50
smallick left
11:51
rindolf left
11:58
rindolf joined
12:05
saki joined
12:06
saki left,
MasterDuke left
12:07
ravenousmoose joined,
pmurias left
12:14
saki joined
|
|||
gfldex | lolibloggedalittle: gfldex.wordpress.com/2019/02/02/nq...n-threads/ | 12:15 | |
12:17
ravenousmoose left
12:18
pmurias joined,
abraxxa joined
12:20
cpan-p6 left,
cpan-p6 joined
|
|||
tadzik | oh, interesting title :) | 12:21 | |
12:21
molaf left
12:22
Sgeo_ left,
Sgeo_ joined,
markoong joined
|
|||
timotimo | Xliff: i don't think you need to check for the number of general workers for Promise.start to not cause a worker to be spawned unnecessarily | 12:30 | |
the thread pool scheduler only spawns new workers if it thinks it's worth doing | |||
tadzik | gfldex: also, s/then/than/ in the title, I think :) | 12:36 | |
12:38
wi15ht joined
12:41
w17t left
|
|||
timotimo | there's an env var that makes the TPS output what it's thinking. actually, two of them | 12:46 | |
one of them outputs measurements many many times per second, the other just outputs decisions like once per second | 12:47 | ||
12:49
MasterDuke joined
12:50
MasterDuke left,
MasterDuke joined
|
|||
MasterDuke | i suspect the gather/take is what makes the builtin dir slow | 12:50 | |
timotimo | it's quite possible that making it a custom iterator would make it a bunch faster | 12:52 | |
12:52
sena_kun left
|
|||
tyil | Andrew Shitov's talk starts in a couple moments! | 12:59 | |
timotimo | oh, do you have a link to a stream? | ||
fosdem.org/2019/schedule/streaming/ | 13:00 | ||
live.fosdem.org/watch/k4201 | |||
tyil | yes, that one :) | ||
13:01
pmurias left
13:02
pmurias joined
|
|||
timotimo | there's a timeline thingie with a knob but i can't rewind in time at all :o | 13:03 | |
tyil | I cant seem to rewind the speaker irl either | 13:04 | |
timotimo | damn | ||
i wonder how much different this talk is from the previously given one | 13:05 | ||
tyil | I haven't seen a previous one (except the small preview at amsterdam.pm) | ||
timotimo | i don't remember where it was given previously | 13:06 | |
Xliff | gfldex: Nice writeup! I need to save that one when someone tells me "nqp is not for user facing code" | ||
timotimo | "you can't rely on nqp behaving the same way in the future" - "but it's faster!" ? ;) | 13:07 | |
tyil | Xliff: it's not ment for it, but you're free to use it | ||
timotimo | ("but you use nqp thoroughly in JSON::Fast" - "yes, but i'm also a core developer" ;) ) | ||
tyil | meaning and usage don't have to align all the time | 13:08 | |
timotimo | alex needs to remove the s from <statements>* | ||
tyil | andrew? | ||
timotimo | andrew* | ||
thank you | |||
tyil | :p | ||
timotimo | i think i'm at the start of a wonderful cold | ||
tyil | for a moment there I was scared I've had his name wrong all along | ||
timotimo | nah, i'm just wrong more often than the average person | 13:09 | |
13:11
pmurias left,
pmurias joined
13:12
patrickb joined
|
|||
Xliff | "yes, but i'm a core developer" doesn't mean much if someone is using JSON::Fast to learn perl 6. | 13:15 | |
You can't stop that. Why make people feel like they are making a mistake. | |||
If you are "free to use it" then let people use it. | |||
tyil | because it may bite them majorly in the future | ||
so people warn up front | |||
Xliff | You might get more nqp users, that way. | ||
Warn them, yes. Belittle them? No. | |||
tyil | nobody's stopping them for using it after the warning | ||
timotimo | well, they are free to use it, but we won't necessarily have mercy upon their souls if they rely on something we're not intent on keeping | ||
13:16
aborazmeh joined,
aborazmeh left,
aborazmeh joined
|
|||
Xliff | tyil: That's not been my experience. | 13:16 | |
timotimo | i'm not sure what belittling would mean here | ||
Xliff | I've been here over 2 years and I still get that warning when I paste nqp code. | ||
It gets tiring. | 13:17 | ||
timotimo | ah, you mean "did you forget to 'use nqp'" one? | ||
Xliff | LOL. no. | ||
timotimo | oh, you mean people like me complaining | ||
Xliff | Yes. | ||
tyil | I think people say it with their best intentions | ||
timotimo | i'm saying it mostly for bystanders, TBH | ||
tyil | because it'd be very annoying for people to have written hard(er) to read code, only to have it break in some release | ||
without notice or anything | 13:18 | ||
Xliff | timotimo: Thanks. I will remember that. | ||
Although it won't prevent the snark when I respond that I have been nipping on nqp's edges for years. | |||
timotimo | i guess that's fair | 13:19 | |
Xliff | And still no comments on github.com/rakudo/rakudo/issues/2589 | ||
timotimo | once the ecosystem gets bigger, we may not have the time/patience to also fix user code that's breaking because nqp:: stuff changes | ||
but fixing user code that uses perl 6 code only, i.e. the stuff tested in roast, we'll take that a lot more seriously | |||
13:20
zacts joined
|
|||
Xliff | timotimo: No, the warning about nqp should be enough to clue people in about that. | 13:20 | |
Still, where there is no fix in pure Perl6 code (ala #2589), there is no recourse but to seek out a solution by any means necessary. | 13:21 | ||
And if that means nqp, so be it. Hence more snark. | |||
tyil | working code is more important than pretty code most of the time :p | ||
timotimo | the other talks in that room also seem interesting | 13:25 | |
13:26
pmurias left
13:27
pmurias joined
|
|||
patrickb | timotimo: Are you at FOSDEM atm? | 13:31 | |
timotimo | no, just looking at the live streams | 13:32 | |
patrickb | ah | ||
timotimo | more exactly, i just started looking at live streams | ||
nine | Xliff: I'm curious: in what situations do you actually have to use nqp? | 13:36 | |
timotimo | to get around this bug for example :) | ||
Xliff | nine: github.com/rakudo/rakudo/issues/2589 | 13:41 | |
And after re-reading it, I think this bug applies to all non int/num types. | 13:42 | ||
Anything that converts to a pointer, this applies to. | |||
Shucks. Missed the Perl6 talk in K.4.201 | 13:43 | ||
13:46
sena_kun joined
|
|||
MasterDuke | timotimo: did you see yesterday where leont++ pointed out that open was dying with an X::AdHoc instead of a typed exception? how hard is it to throw typed exceptions from moar? | 13:47 | |
Xliff | sena_kun: \\o | ||
sena_kun | o/ | ||
13:48
pmurias left
|
|||
timotimo | hm, i'm not sure if we do it anywhere so far | 13:48 | |
13:48
pmurias joined
|
|||
timotimo | if the exception can just be created with an nqp::create plus a few bindattr calls, that should be easy. i think throwing an object, like a hash for example, would also be possible | 13:49 | |
calling a constructor and such would be much more annoying, i expect | |||
but i haven't tried any of that yet | |||
MasterDuke | it comes from here github.com/rakudo/rakudo/blob/mast...e.pm6#L156 | 13:51 | |
13:55
aborazmeh left,
MasterDuke_ joined
13:56
dct_ left
|
|||
lucs | It appears that precompilation is not occuring when I run some code; the --stagestats option shows the same, rather long, parse time for each execution of my program. | 13:56 | |
How can I tell what's going on? | |||
13:56
pecastro left,
patrickb left
|
|||
timotimo | try RAKUDO_MODULE_DEBUG | 13:57 | |
is that what it's called? | |||
lucs | Is that an envvar I have to set? | ||
timotimo | aye | ||
lucs | Ok, trying... | ||
13:58
MasterDuke left
|
|||
lucs | Looks like that's what it's called, a lot of reading to do now :) | 13:59 | |
timotimo | i hope it helps :S | ||
btw, it's possible for modules to export a "no precompilation" into other modules; Inline::Perl5 does - or at least did at some point do - this | 14:00 | ||
lucs | I happen to be using that one, I'll keep that in mind. | 14:01 | |
14:01
pmurias left,
dotdotdot joined,
pmurias joined
14:03
smallick joined
|
|||
timotimo | i wonder if the module debug outputs something about that. it would probably be nice if it would | 14:05 | |
but yeah, it's a lot of text | |||
14:06
pmurias left
14:07
pmurias joined
14:09
smallick left
14:16
dct_ joined
14:18
zacts left
|
|||
timotimo | oh no, the audio isn't working right | 14:21 | |
14:21
dct_ left
|
|||
timotimo | someone fixed the audio! | 14:24 | |
janneke just mentioned perl 6 compiler :D | |||
Xliff | m: start { sleep 0.5; say 1 }; sleep(2) | 14:29 | |
camelia | 1 | ||
Xliff | m: start { sleep 0.5; say 1 }; sleep(1) | ||
camelia | 1 | ||
14:30
leont joined
|
|||
lucs | Apart from maybe expecting a rather long next compilation time, what's the worse that could happen if I delete all precompiled files in my environment (yeah, I'm thinking of doing that). | 14:33 | |
14:33
zacts joined
|
|||
timotimo | shouldn't be a problem, unless some compilations have side-effects that are not reproducible | 14:33 | |
lucs | Okay, thanks | 14:34 | |
timotimo | though if "all precompiled files" includes for example the core setting or the nqp compiler, things will rather not work out very well | 14:35 | |
lucs | Whoops :) | ||
Bah, I'll just rebuild everything if I hit a snag | 14:36 | ||
14:38
pecastro joined
14:47
ravenousmoose joined
|
|||
lucs | timotimo: Nothing broke. Is there anywhere I can read up to understand what's up with the precompilation, what flags and options I can set to see what's happening, etc.? | 14:48 | |
(It appears to keep recompiling some of my modules all the time.) | |||
timotimo | sorry, that module debug env var is all i know of for now | 14:49 | |
lucs | Okay, thanks anyway. | 14:50 | |
timotimo: For what it's worth, I get a "aborted precompilation without failure" message when trying to compile something that wants Inline::Perl5, so what you mentioned earlier appears to apply. | 14:57 | ||
I'll try to use DBIish (had some problems with it in the past) instead of Perl5's DBI, and hope for the best. | |||
15:09
ravenousmoose left
|
|||
nine | Right now a module that uses Inline::Perl5 cannot be precompiled. I'll have to somehiw recreate the Perl 5 interpreter's state on deserialization for that to be fixed | 15:10 | |
I think that's quite possible, but not exactly trivial | |||
15:12
z-o-a joined
15:13
zacts left
15:14
wi15ht left,
zacts joined
15:16
w17t joined
|
|||
lucs | nine: I hope you find the inspiration and a couple of round tuits to get it done :) | 15:16 | |
Even for some of its shortcomings, Inline::Perl5 is a great and indispensable module! | 15:17 | ||
15:17
w17t left
|
|||
nine | thanks :) | 15:19 | |
15:19
zacts left
15:21
w17t joined
15:24
w17t left,
pmurias left
15:25
mowcat joined
15:28
lucasb left,
pmurias joined
15:30
w17t joined
15:35
skids joined
15:46
skids left
15:55
zacts joined,
zacts left
15:56
zacts joined,
zacts left
15:57
zacts joined
15:58
zacts left,
zacts joined
16:00
z-o-a left,
domidumont left
16:06
cpan-p6 left,
cpan-p6 joined
|
|||
tbrowder | ref $*ARGFILES discussions, why not create a new dyn var called @*ARGFILES which would have ARGS that are valid files, not the handles but just their paths. it would be created during the @*ARGS creation. | 16:17 | |
hahainternet | what's a 'valid file'? | 16:21 | |
leont | Exactly | ||
timotimo | "but this file was *just* readable!" | 16:22 | |
hahainternet | but this file is a symlink | 16:23 | |
AlexDaniel | “yeah, sure, it is readable. Now.” | ||
hahainternet | ;) | ||
timotimo | "oh yeah COM4 is totally a file" | ||
16:23
zacts left
16:24
zacts joined
16:30
probablymoony joined,
moony left
|
|||
tbrowder | “valid file”: an element of @*ARGS that is a path to a readable file | 16:31 | |
hahainternet | what's a 'readable file'? does that mean you can seek? | 16:33 | |
or just read()? | |||
timotimo | does $*ARGFILES immediately open all files on the commandline? i hope not %) | 16:34 | |
hahainternet | ultimately tbrowder the semantics inside linux don't really permit this sort of optimistic processing | 16:35 | |
for a start, filesystems can implement open and read ultimately however they like | |||
leont | Traditionally, it's "anything left in argv after argument parsing", which boils down to "anything that isn't an option" | ||
hahainternet | and FUSE may mean files are truly ephemeral | ||
leont | timotimo: it's opened on usage, as long as you edit @*ARGS before using $*ARGFILES, you're fine | ||
tbrowder | so you skeptics never passed a list of files as CLI? then you tested the file as readable or existing. and NO paths would be turned into handles. | ||
hahainternet | you then have to consider the difference between block and character inputs, as well as devices | ||
tbrowder: the point is that this model is easily subverted and there will be someone using some system that does | 16:36 | ||
for example, as i mentioned above, does ARGFILES guarantee you can seek? | |||
tbrowder | those are details that can be handled, can’t | ||
hahainternet | if it doesn't, then most of the operations you expect on 'files' won't work | ||
tbrowder | they? | ||
hahainternet | but if it does, then what do you do about ideas like /dev/stdin etc? | 16:37 | |
tbrowder | how is the model easily subverted? | 16:38 | |
hahainternet | provide a character device, not a file | ||
it can be read, it cannot be seeked | |||
provide a fuse filesystem backed 'file', it can be read, but perhaps only once | |||
leont | perl6 -e 'use v6.c; sub MAIN(*@*ARGS, :$foo) { say lines if $foo } ' --foo VERSION | ||
That actually DWIMs | |||
tbrowder | isn’t that a user problem? | ||
hahainternet | it's a specification problem imho | ||
there's no consistent definition that would make ARGFILES work for all | |||
16:39
mowcat left
|
|||
hahainternet | short of '-e' tests | 16:39 | |
timotimo | "50 common misconceptions programmers have about files", anyone? :) | ||
hahainternet | linux is old and messy enough that almost everything is like this | 16:40 | |
tbrowder | well e tests can be done while creating @*ARGS can’t they? | ||
hahainternet | it gets frustrating as a devops guy, as a language developer i start to cry a bit | ||
tbrowder: sure, but is it really 'ARGFILES' anymore, or 'ARGWHATEVEREXISTEDATBEGINTIME'? :p | |||
timotimo | hopefully not at BEGIN time :) | 16:41 | |
hahainternet | i forget which phaser is which :) | ||
INIT, not BEGIN i guess :p | |||
timotimo | right | ||
hahainternet | speaking of which, i have a semi theoretical question that has some minor relation to BEGIN/INIT, if anyone fancies a discussion on that front | ||
timotimo | CHECK is also still part of compile time | ||
i can't guarantee to be a good discussion partner, but go ahead | 16:42 | ||
hahainternet | it's not directly related to 6 however | ||
tbrowder | and that’s what i get when i loop and test over @*ARGS, right? | ||
hahainternet | so I'm interested in the concept of 'Total Functional Programming', that is programming which has a limited form of recursion or iteration that guarantees the program will halt | ||
16:42
[Sno] left
|
|||
hahainternet | a common problem with this is that you can't, for example, implement a generic, recursive, graph traversal algorithm, as how could you possibly place an upper bound on the iteration count? | 16:42 | |
16:43
zacts left,
molaf joined
|
|||
hahainternet | but it strikes me that if your language has a JIT, you indeed can place an upper limit, because at run-time you can determine the graph structure before compiling the code to iterate it | 16:43 | |
i know perl6 embodies this idea of runtime phasers, and I have a nice article on 'my first JIT' somewhere | |||
but i find it hard to sufficiently describe the problem domain i'm trying to attack | 16:44 | ||
this channel a bit more about language design than most, so thought it worth a mention at least once | |||
16:44
mowcat joined
16:45
sno joined
16:47
mowcat left
|
|||
timotimo | damn, i'm noticing i can't actually spend any attention here | 16:47 | |
since i'm in another discussion + watching a panel of fosdem | 16:48 | ||
hahainternet | no pressure on my behalf, i can barely comprehend what i'm trying to do atm | 16:49 | |
timotimo | i can still be a rubber duck, ha | 16:50 | |
hahainternet | well honestly at the moment, i think i lack the understanding of type theory well enough to formalise any of this | 16:51 | |
trying to find a good book on the axioms of set theory, so i can learn about the alternate type-centric formulations | |||
but ultimately the goal is to see exactly how much of a 'typical' application can be written in a language which is guaranteed to halt at runtime | 16:52 | ||
once you can eliminate the halting problem, you can start to make more serious guarantees about performance | |||
16:53
molaf left,
mowcat joined
17:00
mkapra joined
17:02
z-o-a joined
|
|||
tbrowder | ladies and gentlemen: why can we not create @*ARGFILES when we already create $*ARGFILES which attempts to open file handles before testing for files? | 17:07 | |
17:07
abraxxa left
17:08
abraxxa joined
|
|||
leont | Because $*ARGFILES already refers to @*ARGS? (or $*IN, if @*ARGS is empty) | 17:09 | |
17:10
z-o-a left
17:35
pmurias left
17:37
jme` joined
17:58
andrzejku_ joined
18:00
andrzejku_ is now known as andriej
18:07
mkapra_ joined
18:08
mkapra left
18:12
MasterDuke_ is now known as MasterDuke,
MasterDuke left,
MasterDuke joined
18:14
pmurias joined,
ExtraCrispy joined
18:20
mkapra_ left
18:45
pmurias left
18:49
mkapra joined
18:55
rindolf left
18:58
pmurias joined
19:00
rindolf joined
19:03
sena_kun left
19:07
zakharyas joined,
vrurg joined
19:15
telex left
19:17
andriej left,
telex joined
|
|||
b2gills | If you want $*ARGFILES to skip files it can't open, why not change $*ARGFILES to skip files it can't open. | 19:23 | |
19:24
mkapra left
|
|||
b2gills | Or have it so that the `$*ARGFILES.lines()` iterator pass you a Failure when it comes across a file it can't open. | 19:25 | |
19:32
MilkmanDan left
19:33
MilkmanDan joined
|
|||
tbrowder | i don’t want handles, i want a list of file paths | 19:36 | |
19:36
cjkinni left
|
|||
tbrowder | so @*ARGFILES would be a subset of @*ARGS that pass some kind of file test | 19:37 | |
19:39
dct_ joined
19:40
zachk joined
19:41
zachk left
19:42
zachk joined,
zachk left,
zachk joined
19:44
cpan-p6 left
19:45
cpan-p6 joined
19:48
abraxxa left
19:51
mkapra joined,
ferreira left
19:52
ferreira joined
19:53
dct_ left
20:02
andriej joined
20:03
abraxxa joined
20:08
mkapra left
20:17
pmurias left
20:18
abraxxa left
20:19
abraxxa joined,
pmurias joined
20:22
mowcat left
20:26
zakharyas left
20:32
andriej left
20:33
satori__ joined
|
|||
pmurias | hahainternet: what does a JIT time upper bound give you? | 20:33 | |
hahainternet | pmurias: a "total functional" algorithm | 20:34 | |
ie one that is guaranteed to halt | |||
20:35
reach_satori_ left
|
|||
pmurias | hahainternet: so how to you guarantee that you will always construct a valid "total functional" algorithm from the the graph you get as input? | 20:38 | |
20:39
mkapra joined
|
|||
hahainternet | pmurias: the general concept i think is that the language will only support total functional programming, but will allow the deferring until JIT time of the actual data structure | 20:39 | |
so you'd define some static data that describes the data type, say a double linked list or something | |||
and then you'd have some dynamic property, say the length of that list | 20:40 | ||
as soon as that length is available to your program, you can JIT the algorithm | |||
i'm really bad at explaining this it turns out | |||
pmurias | does it give you anything in this example? | 20:43 | |
if you have the length of the list you can use that to make sure a regular total functional algorithm terminates | 20:44 | ||
hahainternet | pmurias: well the question is more how do you write a language that can support this data becoming available at arbitrary times in 'runtime' | 20:45 | |
and how much can be compiled ahead of time | 20:46 | ||
i've become a little obsessed of late in eliminating turing completeness | |||
i want to be able to use a json parser that is proven to halt, that doesn't require static type definitions, that is optimised on machine via profiling / micro-optimising based on hardware | 20:47 | ||
20:53
uzl joined
|
|||
Geth | doc: ugexe++ created pull request #2602: CURFS and CURI basics |
20:53 | |
uzl | hello, #perl6! | ||
20:54
abraxxa left
|
|||
hahainternet | good evening | 20:54 | |
uzl | Q: Are pinned issues in a repo something Github recommend to a user? Or something a member of the repo pins? | 20:55 | |
hahainternet: good evening! | |||
hahainternet | I'm not even sure I know what a pinned issue in github is! | 20:56 | |
20:57
abraxxa joined
|
|||
uzl | hahainternet: there was some little box on perl6/doc issues and I clicked the X to dismiss it thinking Github was recommending that to me. | 20:57 | |
But probably somebody pinned it there. | 20:58 | ||
20:58
pecastro left
|
|||
hahainternet | uzl: intriguing, i'm not sure I know what that is! I'm sure if you broke anything someone will fix it :) | 20:59 | |
your bug looks good, and doc corrections are always A+ | |||
uzl | hahainternet: oh, great! It wasn't something big but I didn't want to be missing around. | 21:00 | |
*messing | 21:01 | ||
hahainternet: Thanks and have a great weekend ;-)! | |||
21:01
uzl left
21:05
sena_kun joined
|
|||
cpan-p6 | New module released to CPAN! CheckSocket (0.0.6) by 03JSTOWE | 21:16 | |
21:16
mkapra left
21:23
MasterDuke left
|
|||
pmurias | hahainternet: do you have a super concrete vision of what you want to do or just a vague set of things you want to work? | 21:25 | |
hahainternet | pmurias: i wouldn't say super concrete, but i'm not trying to achieve specific things in terms of working | 21:27 | |
i'm more interested in the question "if we didn't have turing complete languages, what would we miss?" | 21:28 | ||
after all, most software can be written in very functional forms | |||
and maximum iteration limits as we've discussed before is a part of restricting iteration / recursion | |||
so i want to know where exactly the disconnect is here, if i gave someone a simple imperative language that wasn't turing complete, are there any un-analysable scenarios? | 21:29 | ||
21:30
pecastro joined
|
|||
pmurias | hahainternet: tons of programms would be super awkward in a language that always terminate | 21:31 | |
hahainternet | pmurias: can you give me an example? | ||
pmurias | an irc client for example | ||
it doesn't know how many messages you will send | 21:32 | ||
or a game loops of a computer game | |||
hahainternet | pmurias: that would be true if they were implemented in a naive loop, are you familiar with channels in Go? | 21:33 | |
it's quite common to simultaneously listen on an input channel, and on a 'cancel' channel | |||
so being able to know "this program won't halt until cancel is sent, then it is guaranteed to halt" would be perfectly sufficient | 21:34 | ||
it's the ambiguity i wish to eliminate | |||
tobs | I kinda get the point. In Perl 6 you don't even know if making a string will halt because of :x, :f or :c interpolation :D | ||
hahainternet | in almost all languages* | ||
in python you don't even know if you can safely access an attribute | |||
it's bad | |||
tobs | but these are a boundary in this case. Remove these adverbs and you know that you can always write down a string in a finite amount of time | ||
21:35
MasterDuke joined,
MasterDuke left,
MasterDuke joined
|
|||
pmurias | hahainternet: I would guess you could do a lot with primitives that always terminate and with the wait for input forever parts put into a special construct | 21:36 | |
21:36
w17t left
|
|||
sena_kun | anything that has any contact with real world already loses determinism. there is no guarantees that simple `my $a = get` will terminate in next 10 years if no-one will enter something. :) | 21:37 | |
hahainternet | sena_kun: but that is a rule that can be applied | ||
it's not ambiguous | |||
"if the user enters a string and hits enter, the program is guaranteed to halt" | 21:38 | ||
i'm fine with that :) | |||
pmurias | hahainternet: keep in mind that even if the program would terminate on a turing machine it doesn't mean it will finish before the heat death of the universe | ||
hahainternet | pmurias: the question is what 'a lot' encompasses. | ||
pmurias: oh no doubt, but we don't even have a language for config files that allows any sort of complex manipulation and also is guaranteed to parse and halt | |||
so even the most trivial tasks are indeterminate | |||
21:39
w17t joined
21:40
abraxxa left
|
|||
tobs | hahainternet: I don't know about your CS background, but there are non-Turing-complete formalisms. The most straightforward of these is called LOOP programs. | 21:40 | |
hahainternet | tobs: very poor (CS background), the non-turing one I was looking at are "total functional languages" | ||
i assume you're referring to en.wikipedia.org/wiki/LOOP_(progra..._language) ? | 21:41 | ||
tobs | and you can observe how you gain Turing-completeness by replacing counting-only loops by classical while loops, which are unconfusingly called WHILE programs | ||
21:41
mkapra joined
|
|||
tobs | hahainternet: yes, that | 21:41 | |
hahainternet | tobs: indeed, there's a few other ones mentioned in en.wikipedia.org/wiki/Total_functi...rogramming which i've had a look through | ||
tobs: the main question i had above was, if instead of using while loops, you deferred the determination of the maximum iteration count until runtime, and then JIT compiled the algorithm based on having that maximum count | 21:42 | ||
that might be my worst explanation yet :) | |||
pmurias | hahainternet: what do you mean by JIT compiled? | 21:43 | |
hahainternet | i mean the traditional meaning, but i'll try and give a more descriptive example | 21:44 | |
pmurias | to machine code? | ||
tobs | hmm. Let me try: so, LOOP programs have all their loop counts known at compile time, WHILE programs have loops which decide when to terminate at runtime. This difference makes one Turing-complete, the other not. Where in the middle does your suggestion fall? | ||
hahainternet | pmurias: yes, or as low level as possible | 21:45 | |
pmurias | hahainternet: I don't see why that would change anything in terms of language power | ||
21:45
mkapra left
|
|||
hahainternet | pmurias: because as tobs highlights, at compile time LOOP programs have the iteration count known | 21:45 | |
and so you can prove they halt | |||
WHILE programs cannot (presumably, traditional languages cannot) be proven to halt at compile time, as there's no available 'maximum iteration count' | |||
if you don't know how many nodes a graph has, you can't set an upper limit | 21:46 | ||
21:46
[Sno] joined
|
|||
hahainternet | but if you defer the compilation until /after/ you have retrieved the graph, you can indeed determine the node count, and therefore write LOOP equivalent code guaranteed to halt | 21:46 | |
tobs | but I don't think the power of the language is influenced by the target architecture -- unless you say "my program is killed after at most 10³ steps on an x86" | ||
21:46
reach_satori joined
|
|||
tobs | which I guarantee gives you an awkward language :) | 21:47 | |
21:47
satori__ left
|
|||
hahainternet | it's not so much the target architecture, as the target data | 21:47 | |
tobs | or awkward set of computable functions, rather | ||
pmurias | hahainternet: so the generate LOOP code not x86 part is what you want | ||
hahainternet | oh i don't care about the specific architecture | ||
LOOP just happens to be a pertinent example | |||
21:47
w17t left
|
|||
pmurias | yes you do | 21:47 | |
hahainternet | i really dont, the JIT could be to perl6 code as far as i'm concerned | 21:48 | |
21:48
pmurias left
|
|||
hahainternet | the question is whether you can prove at 'write time' that can be compiled as the data becomes available | 21:48 | |
21:48
pmurias joined,
sno left
|
|||
pmurias | I'm not convinced generating code gives you more power than just executing it | 21:49 | |
21:49
w17t joined
|
|||
hahainternet | for example tobs in LOOP, you can prove the LOOP construct halts, despite not knowing what integer count is passed in a particular user's code | 21:49 | |
at least, it seems that way | |||
tobs | indeed | 21:50 | |
pmurias | if you now that the graph has a size in a none primitive language you could just use that to bound the iteration instead of going through a code generation step | ||
s/now/know/ | |||
hahainternet | pmurias: i'm not sure what the difference is | ||
you mean just write code that checks the size and adds a $max_iterations = $graph.nodes? | 21:51 | ||
or the equivalent? | |||
pmurias | yes | ||
hahainternet | sure, that is ultimately equivalent to what i want, but the difference is that i want to do the first bit in a non-turing-complete language | ||
21:51
mowcat joined
|
|||
hahainternet | that way i get strong guarantees about its behaviour | 21:52 | |
i think i need to write a better description of what's in my head before i continue discussing it, as i am not making the goals clear at all | |||
tobs: would you mind a PM? | 21:53 | ||
tobs | hahainternet: go ahead | ||
pmurias | hahainternet: I think that would help clarify stuff, I think I understand what your high level goals (powerful language that always terminates) but what seems vague how the JIT parts is of any benefit | 21:55 | |
s/how/is how/ | |||
hahainternet | pmurias: understood | ||
21:55
abraxxa joined,
pmurias left
21:56
pmurias joined
21:59
Bob left
22:00
bobby joined
22:03
bobby left
22:04
bobby joined
22:17
mkapra joined
|
|||
sena_kun | "No lexical found with name '$_'" is pretty bad, right? I don't have it with `no precompilation` pragma, but it always occurs without it. | 22:19 | |
I wonder if it can be related to latest $_ changes. | |||
22:20
abraxxa left
22:22
molaf joined
|
|||
sena_kun | oh, am I not supposed to mix EVAL with precompilation, right? | 22:27 | |
leont | precompilation has a tendency to introduce bugs around capturing atypical things, I've seen several examples of that already | 22:29 | |
pmurias | sena_kun: I don't think there is any sort of taboo with mixing EVAL and precompilation | 22:30 | |
sena_kun | I'm trying to dig further now, maybe I can get more details... | ||
pmurias | but there are a bunch of bugs in precompilation mode, if you run a precompiled roast a lot of things break | ||
sena_kun: there is a t/precompileandrun in the rakudo repo so if you have something golfed you can check if there is a difference between precompiled and not-precompiled modes | 22:31 | ||
sena_kun | well, the thing I am trying to build is like this: I am executing a bunch of code at BEGIN time. Sometimes I can get some of my Perl 6 code from a file and EVAL it to check if that produces some results or just Nil. If it produces something based on a condition, I'm working with result, but it not, just nop. It shouldn't be impossible, right? I mean, in theory. | 22:33 | |
pmurias | sena_kun: doesn't seem impossible to me | 22:35 | |
sena_kun | thanks. :) | ||
hmm, the bad thing CATCH doesn't clarifies my error at all, just `===SORRY!===; No lexical found with name '$_'` isn't too informative about line... | 22:36 | ||
I guess I'll comment it out line by line... | |||
pmurias | sena_kun: when I deal with weird rakudo problems I try to golf them down to the smallest chunks of code that has the eror | ||
* error | 22:37 | ||
leont | Usually when the error comes from a low level it's uninformative like that, IME | ||
sena_kun | well, I have a golfed thing, but it gives me another error, absence of REPR, but not $_. | ||
so I suspect it may be "a bug", not "the bug". :) | 22:39 | ||
MasterDuke | sena_kun: --ll-exception doesn't give any more info? | ||
sena_kun | oh, it gives a pretty stacktrace, yes | 22:40 | |
and starts with | |||
> at EVAL_0:3 (<ephemeral file>:) | |||
I wonder if it's my code for EVAL is broken instead. | |||
will check it now... | |||
ok, seems like the code itself breaks it, as replacing it with `Nil` stops it from dying. | 22:42 | ||
22:46
isomorphismes joined
|
|||
sena_kun | resolved that with `if $foo eq 'foo' else` instead of `given $foo { when 'foo' }`. | 22:48 | |
damn, it's back. :S | 22:49 | ||
22:52
mkapra left
|
|||
Xliff | m: say (1/10).∈v | 22:56 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Malformed postfix call at <tmp>:1 ------> 3say (1/10).7⏏5∈v |
||
Xliff | m: say (1/10).inv | ||
camelia | No such method 'inv' for invocant of type 'Rat' in block <unit> at <tmp> line 1 |
||
Xliff | ?!?! | ||
No inverse? | |||
tobs | m: say (1/10).flip # :) | 22:58 | |
camelia | 1.0 | ||
Xliff | m: 10.flip.say | ||
camelia | 01 | ||
timotimo | hahaha | ||
beautiful | |||
Xliff | m: 10.Num.flip.say | ||
camelia | 01 | ||
Xliff | tobs: For ints, silly! # :P | ||
m: 10.Int.flip.say | 22:59 | ||
camelia | 01 | ||
22:59
mkapra joined
|
|||
Xliff just got played. Well done. | 22:59 | ||
timotimo | m: say Rat.new(|.nude.reverse) given 2.5 | ||
camelia | 0.4 | ||
Xliff | (10/1).flip.say | ||
evalable6 | 01 | ||
Xliff | m: say Rat.new(|.nude.reverse) given 10 | 23:00 | |
camelia | No such method 'nude' for invocant of type 'Int'. Did you mean any of these? none note in block <unit> at <tmp> line 1 |
||
Xliff | m: say Rat.new(|.nude.reverse) given 10.0 | ||
camelia | 0.1 | ||
Xliff | m: say Rat.new(|.nude.reverse) given 10.Num | ||
camelia | No such method 'nude' for invocant of type 'Num'. Did you mean any of these? none note in block <unit> at <tmp> line 1 |
||
Xliff | m: say Rat.new(|.nude.reverse) given 10.Rat | ||
camelia | 0.1 | ||
Xliff | say 10.Rat.flip | ||
evalable6 | 01 | ||
Xliff | say 10.Rat.nude.flip | 23:01 | |
evalable6 | 1 01 | ||
Xliff | ~:( | ||
Elronnd | I don't understand exceptions in perl6. I wrote this sprunge.us/K2teev, but it has a strange error on line 3 of "Cannot invoke this object (REPR: Null; VMNull)". If I remove the CATCH block, that works fine (it dies with my message) | 23:04 | |
23:04
mkapra left
|
|||
Elronnd | how can I make happen what I want to happen? | 23:04 | |
timotimo | m: say $*ERR | 23:05 | |
camelia | IO::Handle<IO::Special.new("<STDERR>")>(opened) | ||
timotimo | if you get that error, it's usually an internals bug, but you look like you're doing something not so usual | 23:06 | |
Elronnd | that's unusual? | ||
what...what is the usual way to define a custom error type, throw it, and catch it? | |||
timotimo | having a CATCH block in the body of a class maybe | 23:07 | |
not to mention | |||
throwing the exception before it's declaration is finished | |||
Elronnd | I don't want to put anything in this exception except to give it a unique name | ||
timotimo | could it be you really ment "class FatalCError is Exception { }"? | 23:08 | |
Elronnd | oh, when I change it to class FatalCError is Exception {}, it seems to work | ||
yeah | |||
timotimo | yeah, trying to create an instance of the exception inside of it's body is the problem i'd say | 23:09 | |
m: unit class Blorb; Blorb.new.say | |||
camelia | Blorb.new | ||
timotimo | m: unit class Blorb is Exception; Blorb.new.say | ||
camelia | Unthrown Blorb with no message | ||
timotimo | m: unit class Blorb is Exception; Blorb.new.throw | ||
camelia | Died with Blorb in block <unit> at <tmp> line 1 |
||
timotimo | oh? | ||
m: unit class Blorb is Exception; Blorb.new.throw; CATCH { .say } | 23:10 | ||
camelia | Cannot invoke this object (REPR: Null; VMNull) in any at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | m: unit class Blorb is Exception; Blorb.new.throw; CATCH { say "here" } | ||
camelia | Cannot invoke this object (REPR: Null; VMNull) in any at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
timotimo | so the throwing is fine, but not the catching | 23:11 | |
oh also, silly me; the throw happens at run time of course, the class is already done declaring at that point? | |||
23:14
woolfy joined
23:22
rindolf left
|
|||
cpan-p6 | New module released to CPAN! Audio-Liquidsoap (0.0.7) by 03JSTOWE | 23:29 | |
23:31
z-o-a joined
23:36
mkapra joined
23:42
aborazmeh joined,
aborazmeh left,
aborazmeh joined
23:49
cpan-p6 left
23:50
z-o-a left,
cpan-p6 joined
23:51
oodani left
23:52
oodani joined
23:58
dct_ joined
|