»ö« 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
autarch1 left
|
|||
AlexDaniel | Juerd: ok I think that there's an easier way to confirm your solution… | 00:00 | |
I'll just slam random input into your solution and into mine, let's see if it finds any bugs… | 00:01 | ||
00:11
musiKk left
|
|||
AlexDaniel | m: say ‘abc’ eq ‘abc’ eq ‘abc’ eq ‘abc’ | 00:11 | |
camelia | rakudo-moar 8fdaad: OUTPUT«True» | ||
AlexDaniel | m: my @a = ‘abc’, ‘abc’, ‘abc’, ‘abc’; say [eq] @a | 00:12 | |
camelia | rakudo-moar 8fdaad: OUTPUT«True» | ||
00:13
autarch joined
00:16
poele joined
|
|||
AlexDaniel | Juerd: yeah! | 00:23 | |
Juerd: gist.github.com/AlexDaniel/791f4994d35e2d8a63b1 | 00:24 | ||
Juerd | AlexDaniel: What the... | 00:27 | |
AlexDaniel | ya :) | ||
Juerd | AlexDaniel: That's not even valid input, though :) | 00:28 | |
That can never happen in a game | |||
AlexDaniel | errr, are you sure? | ||
I mean *exactly* this input is not going to happen | |||
Juerd | Yes, games always grow from the center. | ||
AlexDaniel | but a similar situation probably can | ||
Juerd | Show me :) | 00:29 | |
(Regardless, I have no idea what's happening here!) | |||
Oh, 8 requires special treatment :( | 00:30 | ||
00:31
poele left
|
|||
Juerd | That is, for the edge | 00:31 | |
I think I'll leave it at the current state | |||
Feel free to debug if you do like to | |||
00:31
damnlie left
|
|||
Hotkeys | what's the best way to find the next existing number in an array given a number that doesn't exist | 00:32 | |
00:32
damnlie joined
|
|||
Hotkeys | eg | 00:33 | |
given @a = [1, 7, 9, 10] and $n = 2, how would I get 7? | |||
oh wait | |||
m: @a.first(* | 00:34 | ||
camelia | rakudo-moar 8fdaad: OUTPUT«5===SORRY!5=== Error while compiling /tmp/7Gn1ss7sg7Unable to parse expression in argument list; couldn't find final ')' at /tmp/7Gn1ss7sg7:1------> 3@a.first(*7⏏5<EOL>» | ||
Hotkeys | er | ||
m: my @a = [1, 7, 9, 10]; my $n = 2; @a.first(* > $n).say | |||
camelia | rakudo-moar 8fdaad: OUTPUT«7» | ||
AlexDaniel | Juerd: this position is just fine | ||
Hotkeys | okay got it | ||
AlexDaniel | Juerd: not sure if I did everything right but something like this: gist.github.com/AlexDaniel/65623bce3cd1f360eed0 | 00:35 | |
Juerd | AlexDaniel: I lost interest though | 00:36 | |
AlexDaniel | XD | ||
Juerd | AlexDaniel: I realised that I'm spending way too much time on this. | ||
00:36
addison joined
|
|||
AlexDaniel | true-true | 00:36 | |
Juerd: I think that this is the last bug though | 00:37 | ||
timotimo | sdh: sorry, i haven't caught up with recent JVM work yet | ||
synopsebot6 seems happier now that it has no limit on number of processes it may spaws | 00:39 | ||
spawn | |||
00:40
ely-se left
|
|||
AlexDaniel | Juerd: actually, yes, it is the last bug. I'm currently running both solutions and comparing the output. After like 2 minutes it found nothing | 00:40 | |
Juerd: that previous bug was actually found by this script… but I think that I got lucky | |||
Juerd | Just find it then :P | ||
timotimo | grondilu: with recent changes taken into account, my code for white noise is now at something like 20 FPS, how does that sound to you? :) | ||
00:42
cfedde left
00:45
gfldex left
00:47
gfldex joined
|
|||
Juerd | AlexDaniel: Out of the 6 that my solution found, I don't know which one is wrong or missing. | 00:48 | |
mspo | i.imgur.com/mRNOELn.png | ||
AlexDaniel | mspo: awesome | ||
mspo | AlexDaniel: I've never seen anything so relevant to this channel ;) | ||
AlexDaniel | I've never seen these quotes in Estonia though… | 00:49 | |
Juerd: hmm did you just fix something? | 00:50 | ||
00:51
cfedde joined
|
|||
AlexDaniel | because it looks like it went away | 00:51 | |
Juerd: gist.github.com/AlexDaniel/2b23299c8b68fa4a7426 | 00:54 | ||
Juerd: this one is slightly different | 00:55 | ||
Juerd: seems like it cannot find any solution from the edge: gist.github.com/AlexDaniel/2b23299c8b68fa4a7426 | 00:57 | ||
Juerd: “Out of the 6 that my solution found” – this was not a test case, it was just a proof that this state is valid | 00:58 | ||
“proof” because I played it by hand | |||
mspo: any stats about which one is the most common? | 01:00 | ||
mspo | AlexDaniel: just a link I saw on reddit, not much background info | 01:02 | |
01:03
cfedde left
01:04
cfedde joined
01:08
cfedde left
01:10
cfedde joined
01:26
addison left
01:27
kid51 joined
01:28
pierrot left
01:34
pierrot joined
01:37
pierrot left
01:42
Ben_Goldberg joined
01:44
BenGoldberg_ left
02:00
PerlJam left
02:01
PerlJam joined
02:02
sortiz joined
|
|||
sortiz | \o #perl6 | 02:02 | |
02:03
lichtkind left
|
|||
skids | \o | 02:05 | |
masak | o/ | 02:06 | |
I'm toying around with LF and CRLF. I observe the following: if I read a file with CRLF line endings with Rakudo, and just print it back out with -n or -p, it comes out with LF line endings. (I'm on Linux.) | 02:09 | ||
this, I think is a good default. | |||
I haven't yet been able to override that default. I don't think it's possible with today's Rakudo. | 02:10 | ||
Hotkeys | is there an option for as-is yet | ||
masak | S28 says there's supposed to be a $*OUT.output-record-separator, but there isn't in Rakudo right now | 02:11 | |
Hotkeys | so you don't convert any of the line endings | ||
and just leave them as is | |||
skids | .nl-out? | ||
masak | skids: see above; S28 says it's called $*OUT.output-record-separator | ||
I'm a little confused as to why the naming between $*IN.input-line-separator() and $*OUT.output-record-separator() is inconsistent | 02:12 | ||
skids | Yes but S28 is probably older than the whole CRLF thing right before 6.c | ||
masak | skids: yes; that's part of why I'm asking | ||
m: say $*OUT.nl-out | |||
camelia | rakudo-moar 8fdaad: OUTPUT«» | ||
masak | oh, so that one does exist. | ||
masak tries | |||
it's confusing when S28 says one thing and Rakudo implements another ;) | 02:13 | ||
skids | Yeah we need a re-whirlpool-the-design-docs initiative | 02:14 | |
masak | ok, .nl-out works | 02:15 | |
I don't know what "re-whirlpool" means, but it seems to me it'd be worth it to take S28 as a starting point when introducing new replacements for old Perl 5 special variables :) | 02:17 | ||
02:22
addison joined
|
|||
sortiz | For "re-whirlpool" I understand that, now that roasts tests are somewhat normative, when there are inconsistencies between them and S*, the tested form should be taken to S*. | 02:23 | |
masak | t/spec/S32-num/power.rakudo.moar | ||
TODO passed: 13-15, 68-70 | |||
02:24
Ben_Goldberg is now known as BenGoldberg
|
|||
masak | sortiz: the tests have been normative in that sense for years, IMO. | 02:24 | |
maybe even since they were created. | |||
timotimo | fair enough, but development reality made the specs get outdated at a much faster pace than they used to | ||
masak | that doesn't seem to be the problem here, though | 02:25 | |
the problem is that S28 was never even consulted | |||
sortiz | That is what I know, yes. | ||
masak | I'm just curious why that is | ||
timotimo | i think the names used to be implemented that way in rakudo, but were later changed again? | 02:26 | |
hm, no, that's not it | |||
02:27
addison left
02:28
BenGoldberg left
02:29
BenGoldberg joined,
BenGoldberg left
02:30
BenGoldberg joined
|
|||
masak | no, there used to be a single .nl, and then they were split up as .nl-in and .nl-out | 02:32 | |
sortiz | In that sense what was missing at the time was to update the specs. | 02:37 | |
masak | or to read them | 02:38 | |
geekosaur | that was near the start of the final rush toward 6.c, no? | 02:39 | |
think people were in too much of a hurry | |||
skids | IIRC that change was done at a pretty frantic time. In addition to that, lizmat++ spent a lot of time reworking IO design docs, kept soliciting feedback or for some sort of approval for a merge, but was feeling a bit warnocked on the matter. Not that nl-out was part of that. | 02:40 | |
masak | yes, yes | 02:41 | |
sortiz | Btw, in roast I only found two mentions to 'nl-out' and only in the context of exceptions. | 02:42 | |
skids | But it was reasonable with the general sense that IO needed a rework to treat that part of the design as a bit more fungeable than the rest. | ||
masak | it's far too easy to come in after a change and expect a full accounding of events and why things were done the way they were | ||
I'm not trying to do that | |||
I'm just interested in some sort of consistency going forward | |||
timotimo is likely to go forward to bed in the very near future | |||
masak | S28 is among the less stable/reliable documents, I'm aware of that | ||
but it still has value IMO | |||
02:45
ilbot3 left,
Herby_ joined
|
|||
skids | S28 is not where I would have thought to check for that :-). Anyway So far at least we have some rules for what can change in roast 6.c-errata. I don't know if that's the branch that should be used to update design docs but it should be relatively stable. | 02:45 | |
Herby_ | Evening, everyone! | ||
yoleaux | 20 Feb 2016 16:46Z <timotimo> Herby_: seems like nobody pointed this out to you, but there's already an irc bot framework in the ecosystem :) it's what synopsebot is written with | ||
masak | we seem to have spectests for .nl-in but not for (the behavior of) .nl-out | 02:46 | |
02:47
ilbot3 joined
|
|||
skids | Yeah unfortunately (for this purpose) the rules for 6.c-errata are "no new tests, just unfudges" and unless I missed it there's no level between master and that yet. | 02:48 | |
masak | e20a16b2bea9eebaab2a05496e8ff134a4cde9f2 from roast is interesting. | 02:49 | |
there used to be a test with `$RT123888.input-line-separator`, but it got changed to `$RT123888.nl` | |||
the commit comment seems unrelated to that change. | 02:50 | ||
I can see how no-one thought to update S28 if that was the only test, and if the change was made in passing without acknowledging it in the commit comment ;) | |||
02:54
zpmorgan left
|
|||
timotimo | good night #perl6 | 02:55 | |
skids | o/ | ||
Herby_ | \o | ||
skids | .oO(Herby_ always waves with the opposite hand from me. Contrarian. :-) |
02:56 | |
Herby_ | it is my nature :) | ||
02:57
kid51 left
|
|||
AlexDaniel | what is FSA? | 03:00 | |
masak | AlexDaniel: "finite state automaton"? | ||
ugexe | fixed size allocator | 03:01 | |
masak | Federal Student Aid | 03:02 | |
Full Speed Ahead! | |||
sortiz | AlexDaniel, In MoarVM The fixed size allocator provides a thread-safe mechanism for getting and releasing fixed-size chunks of memory." | 03:09 | |
AlexDaniel | thanks | 03:13 | |
03:18
sdh left
|
|||
dalek | ast: 04784c1 | skids++ | S01-perl-5-integration/context.t: Fix some spelling |
03:50 | |
ast: 2f4cda8 | skids++ | S01-perl-5-integration/context.t: Missed some spelling to fix |
|||
ast: e57bfe9 | skids++ | S01-perl-5-integration/context.t: Merge pull request #105 from skids/master Did this as a PR to prove to myself it does not merge automatically |
|||
skids | Good. I must have been confused the first time I tried that. | 03:51 | |
03:53
cpage_ left
03:55
noganex_ joined
|
|||
dalek | kudo/nom: 5dcf96f | (Carl Masak)++ | src/core/IO.pm: remove predeclaration of Instant in core/IO.pm This one hasn't been needed since 509545a46136390feef5f3c0f56943ccf6a1881a. |
03:58 | |
03:59
noganex left
04:04
sunnavy left
04:07
sunnavy joined,
yqt left
|
|||
MadcapJake | . | 04:11 | |
yoleaux | 20 Feb 2016 21:45Z <pmurias> MadcapJake: lab name => "common case", try => {...}; lab name => "complex case", try => {variant1 => {...}, variant2 => {...}} | ||
04:15
Ben_Goldberg joined
04:16
BenGoldberg left
04:19
Actualeyes joined
04:27
mattp_ joined
04:34
cognominal left,
cognominal joined
|
|||
Ben_Goldberg | m: use POSIX; | 04:42 | |
camelia | rakudo-moar 5dcf96: OUTPUT«===SORRY!===Could not find POSIX in: /home/camelia/.perl6/2015.12-403-g5dcf96f /home/camelia/rakudo-m-inst-1/share/perl6/site /home/camelia/rakudo-m-inst-1/share/perl6/vendor /home/camelia/rakudo-m-inst-1/share/perl6 CompUn…» | ||
04:43
Sgeo__ joined
04:44
kaare_ joined
04:45
Sgeo_ left
04:47
grassass joined
04:49
edenc left
04:51
kaare_ left,
edenc joined,
kaare_ joined
04:52
AndyDee joined,
adrusi left
04:54
kst` joined
04:55
kst left
04:56
adrusi joined,
Ben_Goldberg left
04:58
vendethiel joined
05:21
vendethiel left
05:34
Cabanossi left
05:37
Cabanossi joined
05:43
rburkholder left
05:48
adu joined
06:04
khw left
06:13
davido_ joined
|
|||
jdv79 | is panda bootstrap broken? | 06:21 | |
06:26
Herby_ left
06:27
autarch left
06:44
cpage_ joined
06:46
CIAvash joined
|
|||
sortiz | jdv79, I didn't see any problem in my last 'rakudobrew build' | 06:50 | |
06:55
alpha123 left,
AndyDee left
|
|||
jdv79 | yeah its fine | 06:57 | |
having a env issue which is causing the wrong perl6 to be run | |||
masak .oO( env: the silent killer ) | 07:04 | ||
jdv79 | anyone know why moving ~/.rakudobrew would stop its PATH entries from magically appearing | ||
NO. there's .profile and i was looking for .bash* files. :( | 07:06 | ||
07:08
aindilis joined
07:57
adu left
08:09
skids left
08:10
davido_ left
08:11
pmurias joined
08:12
rindolf joined
08:13
darutoko joined
08:16
pmurias left
08:30
sortiz left
08:41
DoverMo joined
|
|||
DoverMo | my nib broke | 08:41 | |
Hotkeys | unbreak it | 08:45 | |
DoverMo: what happened? | |||
AlexDaniel | break it again, try to figure out why exactly it breaks. Then submit a bug report. | 08:47 | |
08:50
DoverMoo joined,
DoverMoo left
08:53
DoverMo left
08:59
chienjo joined
09:00
chienjo left
09:02
_mg_ joined
09:12
psch joined
|
|||
psch | hi #perl6 o/ | 09:14 | |
.seen sdh | |||
yoleaux | I saw sdh 20 Feb 2016 23:45Z in #perl6: <sdh> Ah, thanks. Is it in the works? I was digging around the runtimes to see what I could hack together, but didn't have any luck. | ||
psch | ah, doesn't tell when someone left... | ||
.tell sdh github.com/perl6/nqp/tree/standalo.../tools/jvm has some probing from a while ago wrt deploying jars. i'm unsure in how far it still works nowadays, though. | 09:15 | ||
yoleaux | psch: I'll pass your message to sdh. | ||
09:16
wamba joined
09:20
molaf joined
09:23
ely-se joined,
grassass left
|
|||
dalek | kudo/nom: dae9f6a | okaoka++ | LICENSE: Fix a license duration 2000-2015 -> 2000-2016 |
09:25 | |
kudo/nom: 7010f32 | niner++ | LICENSE: Merge pull request #717 from okaoka/fix-license-duration Fix a license duration 2000-2015 -> 2000-2016 |
|||
09:25
iH2O joined
09:29
agentzh left
09:31
petercommand left
09:32
petercommand joined
09:35
TEttinger left
09:37
RabidGravy joined
09:38
jeek left
09:42
agentzh joined,
agentzh left,
agentzh joined
09:50
iH2O left
09:51
vendethiel joined
|
|||
RabidGravy | HARR! | 09:54 | |
10:08
_mg_ left
|
|||
masak | H∀RR! | 10:09 | |
RabidGravy | W€€! | 10:11 | |
[Tux] | test 22.532 | ||
test-t 11.956 | |||
csv-parser 49.302 | |||
RabidGravy | Oöøh! nice | 10:12 | |
started going down again | |||
10:13
ely-se left
|
|||
RabidGravy | if I have a parametric role, and I compose that into another role is there a way of applying the parameter when I apply the resulting role to an actual class | 10:15 | |
a bit like | |||
m: role Foo[$bar?] { method bar() { say $bar }}; role Bar does Foo {}; my $a = "yu"; $a does Bar["yuck"]; $a.bar | |||
camelia | rakudo-moar 7010f3: OUTPUT«No appropriate parametric role variant available for 'Bar' in any specialize at gen/moar/m-Metamodel.nqp line 2600 in any specialize at gen/moar/m-Metamodel.nqp line 2194 in any compose at gen/moar/m-Metamodel.nqp line 2979 in any generate_…» | ||
RabidGravy | but working obviously | ||
10:15
vendethiel left
|
|||
masak | I fail to see why that shouldn't work | 10:16 | |
RabidGravy | well I guess because Bar itself doesn't have parameters, | 10:17 | |
10:19
TEttinger joined
|
|||
arnsholt | role Bar[$b] does Foo[$a] { ... } perhaps? | 10:23 | |
s/$a/$b/ | |||
Obviously | |||
10:28
CIAvash left
10:29
gregf left
|
|||
RabidGravy | Nope, I'll have to stick with the yucky I have at the moment | 10:32 | |
10:36
AlexDaniel left
10:37
spider-mario joined
10:40
renormalist joined
10:41
_dolmen_ joined
10:44
CIAvash joined
|
|||
RabidGravy | also need more coffee | 11:00 | |
nine | coffee++ | 11:02 | |
11:10
hankache joined
|
|||
hankache | hola #perl6 | 11:10 | |
11:14
_dolmen_ left
11:25
apiw joined
11:32
domidumont joined
11:39
vendethiel joined
11:45
musiKk joined
11:49
apiw left
11:50
CIAvash left
11:56
apiw joined
11:58
hankache left
12:01
vendethiel left
12:15
vendethiel joined
12:19
FROGGS joined
12:34
apiw left
12:35
rburkholder joined
12:36
vendethiel left
12:40
kid51 joined
12:48
_mg_ joined
12:51
musiKk left
12:52
FROGGS left
12:53
FROGGS joined
12:54
Skarsnik joined
12:55
pmurias joined
12:58
zpmorgan joined
|
|||
pmurias | .tell do we need %Test::Lab::context for anything? in ruby the defaults are set per class, having that global doesn't seem to give us much | 12:58 | |
yoleaux | pmurias: I'll pass your message to do. | ||
13:01
BenGoldberg joined
13:09
aigan_ left
|
|||
Skarsnik | Hello | 13:16 | |
pmurias | hi | ||
RabidGravy | erp | 13:18 | |
13:19
Relsak joined
|
|||
FROGGS | pmurias: was it intentional that you .told "do" something? | 13:20 | |
13:27
apiw joined
|
|||
pmurias | .tell MadcapJake do we need %Test::Lab::context for anything? in ruby the defaults are set per class, having that global doesn't seem to give us much | 13:30 | |
yoleaux | pmurias: I'll pass your message to MadcapJake. | ||
pmurias | FROGGS: no, thanks | ||
any ideas when the rakudo-js grant vote will take place? | 13:32 | ||
nine | Does rakudo always use the Backtrace class when printing backtraces? | 13:35 | |
13:36
risou is now known as risou_awy,
risou_awy is now known as risou
|
|||
jnthn | nine: afaik, yes, except when you pass --ll-exception, then we just let the VM spew out whatever it will | 13:36 | |
pmurias | do we want to add column info to the Backtrace class? | 13:37 | |
nine | jnthn: ah, that could explain it, thanks! | ||
I'm working on getting rid of absolute paths in precomp files. I already turned them into paths relative to the repository that contains the files and now "just" need to assemble it back together on output | |||
jnthn | nine: Will this rid us of the sha-1s in backtraces too? | 13:38 | |
nine | And out of lazyness I tested with NativeCall and --ll-exception :) | ||
jnthn: yes, I already add the requested module's name in () to the displayed source path | |||
at perl#sources/24DD121B5B4774C04A7084827BFAD92199756E03 (NativeCall):261 | 13:39 | ||
jnthn | nine: Is there a way we can show the path the source file had inside its distribution? | ||
Instead of the SHA-1 | |||
13:40
vendethiel joined
|
|||
Skarsnik | hm, for rt.perl.org/Ticket/Display.html?id=127345 it's in the Backtrace class? | 13:41 | |
nine | I'd rather like to keep the SHA-1 in the output as you can copy&paste this path to look at the source. Adding the module name to the output should already make the backtrace much more readable | ||
13:41
Begi joined
13:51
Psyche^ joined
|
|||
Begi | is there a method to keep only letters in a string ? | 13:53 | |
without spaces and ponctuation | |||
jnthn | m: say "oh! I've been stripped!".subst(/\W+/, '', :g) | 13:54 | |
camelia | rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped» | ||
jnthn | Though that'll keep _ too | ||
13:55
Psyche^_ left
|
|||
jnthn | m: say "o__h! I've been stripped!".subst(/<-:Letter>+/, '', :g) | 13:55 | |
camelia | rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped» | ||
jnthn | That used the Unicode Letter property | ||
m: say "o__h! I've been stripped!".subst(/<-:L>+/, '', :g) | |||
camelia | rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped» | ||
jnthn | Can shorten it to that if golfing :) | 13:56 | |
Ulti | www.lamdu.org/ this feels like something you could maybe do with Rakudo | 13:59 | |
14:00
musiKk joined
|
|||
Begi | Thanks jnthn, it works ! I'm reading the doc about this method | 14:01 | |
14:01
apiw left
|
|||
moritz | m: say "o__h! I've been stripped!".comb(/<:L>+/).join | 14:03 | |
camelia | rakudo-moar 7010f3: OUTPUT«ohIvebeenstripped» | ||
lizmat | sometimes I think .comb should also be able to take a Callable, like .grep | 14:08 | |
BenGoldberg | m: say [ "o__h! I've been stripped!".comb(/<:L>+/) ] | 14:10 | |
camelia | rakudo-moar 7010f3: OUTPUT«[o h I ve been stripped]» | ||
14:10
musiKk left
14:13
Amendil joined
|
|||
BenGoldberg | What would be the semantics, if .comb *did* take a Callable? | 14:14 | |
moritz | lizmat: you can jsut write .comb.grep | ||
lizmat | yeah, but I was thinking performance | 14:15 | |
try this for difference: .comb(/../) and .comb(2) :-) | |||
14:16
apiw joined
|
|||
jnthn | I think we'd get more mileage out of making simple regexes like that a bunch faster. :) | 14:17 | |
14:19
autarch joined
|
|||
lizmat | jnthn: true, but Callable has it's own rewards in that respect... and we don't really have a .grep on characters | 14:19 | |
jnthn | lizmat: I don't know it's worth a lot over .comb.grep tbh | 14:20 | |
nine | I don't get it. Why do I get "Could not find symbol '&RepositoryRegistry'" for a $file = CompUnit::RepositoryRegistry.repository-for-name(... in Backtrace's AT-POS at runtime? | ||
moritz | lizmat: the approach of adding ever more specialized built-ins for performance doesn't scale | ||
lizmat | moritz: I said "sometimes I think" :-) | 14:23 | |
14:23
vendethiel left
|
|||
moritz | lizmat: noted :-) | 14:23 | |
jnthn | The trade-off of note is that every one we add increases base memory | 14:24 | |
nine | Ah, predeclaring CompUnit::RepositoryRegistry fixes it | ||
moritz | nine: bootstrapping is fun :-) | ||
14:25
beatdown joined
14:27
_mg_ left
|
|||
dalek | c: dafabe7 | (Simon Ruderich)++ | doc/Type/Hash.pod: Hash: fix display of code listing The tab caused the listing to be displayed as multiple listing separated by an empty line. |
14:29 | |
14:34
dududuedu joined
14:38
stux|RC-only left
14:40
vendethiel joined
14:41
stux|RC-only joined
|
|||
rudi_s | I'm looking at Hash documentation and I'm a little confused about the last example in "Loop over hash keys and values": for %vowels.kv { .say } with "This would print the list one line at a time". <- This is not true, it prints all keys and values. Any idea how the code is supposed to look? | 14:43 | |
And in the example before that, should we mention .flat as an alternative way to get the usual -> $k, $v { .. } way? | 14:44 | ||
14:45
Zero_Dogg left
|
|||
moritz | +1 to the latter | 14:46 | |
FROGGS | rudi_s: for the first snipped, it should probably say "This would print one Pair at a time." | ||
psch | m: my %h = a => 0, b => 1, c => 3; for %h.kv { .say } | ||
camelia | rakudo-moar 7010f3: OUTPUT«a0c3b1» | ||
FROGGS | ohh | ||
of course :o) | 14:47 | ||
the sentence is still weird though | |||
psch | yeah, "the list" seems insufficiently explained | ||
FROGGS | yeah | ||
moritz | feel free to replace it or toss it | ||
14:47
Ben_Goldberg joined
14:48
apiw left
|
|||
lizmat | m: sub a(*@a) { state $b = -> { say @a.shift }; $b() }; a(1,2,3); a(4,5,6) # jnthn moritz: is this a scoping issue or not? | 14:48 | |
camelia | rakudo-moar 7010f3: OUTPUT«12» | ||
lizmat | I would expected 1,4 there | ||
moritz | lizmat: looks fine to me | ||
lizmat: the state initializer is only run the first time, and the pointy block is a closure | 14:49 | ||
14:50
BenGoldberg left
|
|||
rudi_s | I'd drop the code example including the last sentence of the paragraph as I've no idea what it's supposed to say, any objections? | 14:50 | |
lizmat | hmmm... | ||
moritz | rudi_s: it's supposed to give you an idea how iterating a hash works | ||
psch | rudi_s: fwiw, explaining what actually happens is probably sensible, i'm at a lost how to phrase it though | ||
rudi_s | Should I change the previous example to ust .flat per default and mention that without .flat the pointy block needs to split the argument. | 14:51 | |
moritz | what happens when you iterate over %h, %h.kv, %h.pairs, %h.keys etc? | ||
rudi_s: nah, just offer both; There is more than one way to do it! | |||
rudi_s | moritz: But that's the first example in the section, I'm talking about the last one. | ||
psch | "This would print the list consisting of unordered and flattened Pairs one element at a time." seems slightly wrong... | ||
rudi_s | moritz: Ok. | ||
moritz | ah well, if it's redundant and unclear, by all means, drop it | 14:52 | |
rudi_s | "The output of this operation is a L<Seq>," <- this seems to be wrong too, the result is a List, not a Seq. | ||
psch | m: my %h = a => 0, b => 1, c => 3; say %h.kv.WHAT | ||
camelia | rakudo-moar 7010f3: OUTPUT«(Seq)» | ||
rudi_s | m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>.kv.WHAT | 14:53 | |
camelia | rakudo-moar 7010f3: OUTPUT«(List)» | ||
rudi_s | m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>.kv[0].WHAT | 14:54 | |
camelia | rakudo-moar 7010f3: OUTPUT«(List)» | ||
14:54
BenGoldberg_ joined
|
|||
moritz | .kv gives you Seq of List objects, no? | 14:54 | |
psch | huh | ||
isn't that calling .kv on Pairs? | |||
m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>.WHAT | 14:55 | ||
camelia | rakudo-moar 7010f3: OUTPUT«(List)» | ||
psch | err, WHAT *shakes fist* | ||
moritz | m: say %*ENV.sort[0].^name | ||
camelia | rakudo-moar 7010f3: OUTPUT«Pair» | ||
psch | m: my %h = a => 0, b => 1, c => 3; say %h.sort(*.key)>>[0].WHAT | ||
camelia | rakudo-moar 7010f3: OUTPUT«(List)» | ||
14:55
BenGoldberg_ left
|
|||
psch | right, so the sorted Pairs each get a .kv, which is why the order remains | 14:55 | |
rudi_s | moritz: But not with >>.kv, not ide awhy. | ||
14:56
Ben_Goldberg left
|
|||
moritz | because >> is magical about the way how far it descends into a nested data structure *handwave* | 14:56 | |
rudi_s | My point is, we shouldn't say it returns a Seq in the docs if it doesn't. | ||
moritz | +1 | ||
psch | and the hyper is what builds the List afaik | ||
14:57
BenGoldberg joined
|
|||
psch | yeah, the nodemap helper for METAOP_HYPER_POSTFIX builds a List directly | 14:58 | |
tbh, i'd rather say the example is misleading | |||
the .kv call doesn't happen on a Hash in the first place | |||
rudi_s | Yeah. | ||
14:59
apiw joined
15:01
Ben_Goldberg joined,
vendethiel left
15:02
Relsak left
|
|||
psch | well, the example is useful on it's own, it just seems a little misplaced vOv | 15:02 | |
rudi_s | Proposed patch: pbot.rmdir.de/3tRjAtzxfSdFKYbusG166Q | 15:03 | |
15:04
BenGoldberg left
15:05
dududuedu left
15:06
Ben_Goldberg is now known as BenGoldberg,
apiw left
|
|||
psch | rudi_s: looks good to me, fwiw | 15:06 | |
15:07
kurahaupo joined
15:15
kurahaupo left,
kurahaupo joined
15:16
apiw joined,
kurahaupo left,
kurahaupo_ joined
|
|||
dalek | c: d70a800 | (Simon Ruderich)++ | doc/Type/Hash.pod: Hash: clarify the looping over sorted keys example |
15:18 | |
rudi_s | psch: Thanks. | ||
15:19
vendethiel joined
15:21
jack_rabbit joined,
Ben_Goldberg joined
15:22
apiw left,
Ben_Goldberg left
15:23
BenGoldberg left
|
|||
jnthn | lizmat: On the state/closure thing, agree with moritz; the closure is taken and stored at state variable initialization. | 15:23 | |
15:24
Ben_Goldberg joined,
apiw joined
15:27
apiw left
15:28
zakharyas joined,
apiw joined
15:30
Relsak joined
15:31
_mg_ joined
|
|||
nine | I just don't get it. How can my $custom-lib := nqp::hash(); in CompUnit::RepositoryRegistry ever become empty after having actual contents? | 15:32 | |
15:32
zpmorganASDF joined
15:34
zpmorgan left,
zpmorgag joined
|
|||
nine | Aaah...different processes! | 15:36 | |
15:36
apiw left
|
|||
nine | And of course, the precomp process skips the normal repository initialization, so $custom-lib stays empty | 15:37 | |
renormalist | is there something I can install to have moer Emacs'ish keybindings in perl6 REPL (having rakudo 2016.01)? | ||
(wordwise jump, delete, transpose typos) | 15:38 | ||
15:38
apiw joined,
zpmorganASDF left
|
|||
psch | apparently i have to build a ContextRef manually to get jvm interop working with all the new CUR stuff..? | 15:39 | |
15:39
jack_rabbit left
|
|||
psch | renormalist: i think Linenoise does a few of those at least? otherwise people use rlwrap i think | 15:39 | |
the Linenoise module that is* | |||
renormalist looks up rlwrap | |||
15:40
musiKk joined,
apiw left
|
|||
psch | re the ContextRef thingy: previously RakudoJavaInterop.computeInterop() returned a Hash, which apparently was enough to register the class successfully. nowadays i run into a nqp::ctxlexpad invocation that wants a ContextRef there | 15:41 | |
unfortunately i don't have one, and the existing CallFrame i could stuff into a freshly allocated one apparently don't have the methods actual lexical information about e.g. the methods of the class | 15:42 | ||
renormalist | psch: thanks, rlwrap works for me. | ||
psch | renormalist: you're welcome :) | 15:44 | |
renormalist | and I also realized it is an FAQ - I'm now just reading that whole thing. :-) | ||
psch | hm, i might not actually need anything though, right? as in, a java class never has an attached lexical scope, only methods and attributes... not sure if that actually means i don't need CU::Handle.globalish-package to know what a java class can do... | ||
orrr i forgot what exactly a lexical scope is :S | 15:45 | ||
15:46
apiw joined
|
|||
nine | Yes! "in block at /home/nine/rakudo/install/share/perl6/site/sources/C59503AFF985B18BEF96604D1979FE6EA8004641 (Panda::Installer) line 61" while the precomp file only contains "site#sources/C59503AFF985B18BEF96604D1979FE6EA8004641 (Panda::Installer)" | 15:48 | |
RabidGravy | nine++ | 15:49 | |
15:50
apiw left
15:57
apiw joined
|
|||
dalek | p/relocateable-precomp: 571323a | (Stefan Seifert)++ | src/ (2 files): Option for a source-name different from the actual source file While absolute paths are useful for reading source files reliably, we don't want to save those absolute paths in precompiled files as the source files may move after precompilation. This happens when modules are packaged for Linux distributions and the build process runs with an unprivileged user while the result should be installed in a system location. The source-name option allows for specifying a different string to use for the $?FILES variable and thus for the path to the source file in backtraces. |
15:59 | |
15:59
khw joined
|
|||
Skarsnik | hoo, is that a step to system wide pre comp file? | 16:00 | |
stmuk_ | nine++ | 16:01 | |
dalek | rakudo/relocateable-precomp: 59ed434 | (Stefan Seifert)++ | src/core/CompUnit/Repository/Installation.pm: | 16:06 | |
rakudo/relocateable-precomp: Turn short-name lookup files into directories | |||
rakudo/relocateable-precomp: | |||
rakudo/relocateable-precomp: This may become part of CompUnit::Repository::Installation format v1. | |||
rakudo/relocateable-precomp: Having to change any already existing files on installation of a module makes | |||
16:06
dalek left
16:07
dalek joined,
ChanServ sets mode: +v dalek
|
|||
nine | Store logical file names in precomp files | 16:10 | |
We now use logical file names for annotating sources and construct absolute paths when printing stack traces. This avoids storing absolute paths inprecompiled files which is a problem for packaging modules for Linux distributions. | |||
It also allows for us to add the name of the requested module to the backtrace output, alleviating the problem with the undeciferable SHA-1 file names. | |||
Review: github.com/rakudo/rakudo/commit/37...a920730d01 | |||
16:11
yurivish left
|
|||
rudi_s | I have either a Str or Nil and want to call .chomp on Str but not on Nil (which causes a warning). I tried $x.?chomp but that doesn't work as Nil is a subclass of Class which has .chomp as method. Any idea? | 16:12 | |
16:18
cpage_ left
16:19
apiw left
|
|||
timotimo | m: say Nil.chomp | 16:24 | |
camelia | rakudo-moar 7010f3: OUTPUT«Use of Nil in string context in block <unit> at /tmp/MbONCtpJkV line 1» | ||
timotimo | ah, that's how | ||
m: say quietly Nil.chomp | |||
camelia | rakudo-moar 7010f3: OUTPUT«» | ||
timotimo | m: say quietly "oh my gosh ".chomp | ||
camelia | rakudo-moar 7010f3: OUTPUT«oh my gosh » | ||
16:24
virtualsue joined
|
|||
rudi_s | That feels a big ugly. | 16:25 | |
Is there something like $_ = $_.chomp with $x which modifies $x in short? | 16:27 | ||
timotimo | sure, $x .= chomp | ||
oh, that "with" was perl6-with | 16:28 | ||
rudi_s | Ah, nice. | ||
$x .= chomp with $x; good enough for me. | |||
timotimo | aye | ||
rudi_s | Thakns. | ||
16:28
apiw joined
16:30
domidumont left
|
|||
timotimo | nine: i merged that commit into nom; that was a mistake, wasn't it? :) | 16:32 | |
nine: because now make install complains with "Constraint type check failed for parameter '$precomp-id'" "in block <unit> at tools/build/install-core-dist.pl line 13" | |||
nine | ouch | 16:33 | |
You'd probably need the whole relocaeable-precomp branch | 16:34 | ||
16:34
_mg_ left
|
|||
timotimo | oh, did i say "merged that commit"? i meant "merged that branch" | 16:35 | |
rather than cherry-pick it | |||
maybe i need a reconfigure? | |||
nine | You also need the relocateable-precomp nqp branch | 16:36 | |
16:37
Ben_Goldberg left
16:39
Ben_Goldberg joined
|
|||
timotimo | oh! | 16:40 | |
yeah, turns out i didn't look closely enough at all | |||
rudi_s | Can I prefix an enum with a "namespace"? enum Foo <A B C>; adds A directly into the file. I'd like to get Foo::A. At the moment I have module Foo { enum Foo <A B C>; } but then the type is Foo::Foo. Can I get just Foo? | 16:42 | |
timotimo | >:( | ||
Configure.pl isn't good at NQP_REVISION and branches and merges and stuff | |||
with a straight-up checkout of the relocatable-precomp branch it works better | 16:44 | ||
16:44
Ben_Goldberg left
16:45
skids joined
16:46
Ben_Goldberg joined
16:47
pierrot joined,
ELBeavers_away left
|
|||
rudi_s | Can I use the return type constrain to declare that the function should return an array with values of specific type? Like my Str @x; | 16:48 | |
16:48
apiw left
16:50
Ben_Goldberg left
|
|||
timotimo | no, same as parameter type constraints | 16:50 | |
16:51
Ben_Goldberg joined
|
|||
Ben_Goldberg | m: my %vowels = 'a' => 1, 'e' => 2, 'i' => 3, 'o' => 4, 'u' => 5; for %vowels.sort(*.key)>>.kv -> [$vowel, $index] { "$vowel: $index".say } | 16:52 | |
camelia | rakudo-moar 7010f3: OUTPUT«a: 1e: 2i: 3o: 4u: 5» | ||
rudi_s | timotimo: But I can declare foo(Str @foo) and it seems to work. | ||
I want the same for the return type. | 16:53 | ||
timotimo | that is a check for "does the user pass a Str-typed Positional of some kind" | ||
it does not check "is the array passed in filled with only Str objects or derived from Str objects" | |||
so if you do "returns Positional[Str]", you'll have to declare the object you're returning to fill that role | |||
it won't introspect a regular array for "is it only Str in there?" | 16:54 | ||
rudi_s | Ah, too bad. Thanks. | ||
Ben_Goldberg | m: my %vowels = 'a' => 1, 'e' => 2, 'i' => 3, 'o' => 4, 'u' => 5; for %vowels.sort(*.key) -> (:key($vowel), :value($index)) { "$vowel: $index".say } | 16:55 | |
camelia | rakudo-moar 7010f3: OUTPUT«a: 1e: 2i: 3o: 4u: 5» | ||
16:58
apiw joined
|
|||
timotimo | nine: i wonder if we can get the profiler to know about the nicer filenames, too | 17:00 | |
nine: but the profiler itself is "only" vm-level, so not exactly sure how to introduce the two | 17:01 | ||
17:03
jameslenz left
|
|||
timotimo | now that our filenames are so super long, maybe it'd be a good idea to have the filenames as a list up front in the json blob and then reference that array later on | 17:03 | |
so that the file gets a bit smaller? | |||
17:04
jameslenz joined
|
|||
timotimo | on the other hand, i really can't tell what exactly it is that makes browsers fall to their knees: raw json blob string size, or size of the constructed object? | 17:06 | |
Skarsnik | the js is bad maybe§ | ||
timotimo | if you'd like to improve it, feel absolutely free :) | 17:07 | |
Skarsnik | I rather work on the Qt thingy x) | ||
17:07
apiw left
17:08
jameslenz left,
musiKk left
|
|||
timotimo | sure, that's fine, too | 17:08 | |
last time i looked, it didn't do anything with the GC list, for example | |||
and it doesn't do anything at all with the call graph except sum up all the data | 17:09 | ||
17:09
jameslenz joined
|
|||
flussence | I wonder how many of these workarounds are going to pile up before we all finally accept the sha1 filenames thing is insane :/ | 17:10 | |
timotimo | i'd find it nicer if the filenames could be the original filenames on disk and only change if there's disambiguation needed | ||
but there could definitely be good reasons against my idea | 17:11 | ||
MadcapJake | . | 17:13 | |
yoleaux | 13:30Z <pmurias> MadcapJake: do we need %Test::Lab::context for anything? in ruby the defaults are set per class, having that global doesn't seem to give us much | ||
17:14
apiw joined
|
|||
MadcapJake | .tell pmurias the Ruby version has the helper method as a module, so the default_scientist_context lets you change the context for any time you use the science helper. I thought the best reflection of that in P6 would be a module-scoped hash. | 17:16 | |
yoleaux | MadcapJake: I'll pass your message to pmurias. | ||
ugexe | timotimo: i imagine part of it might be you don't really know whats allowed (at least on windows). on windows you can create files with illegal characters using perl (5 or 6) and windows does nothing to stop it or warn about it | ||
Ben_Goldberg | Err, if a file is creatable with some specific character as part of the name, doesn't that mean that that char is, in fact, legal? | 17:17 | |
MadcapJake | .ask pmurias what would you see as a more Perl 6 reflection of that? Check here for some context (pun intended): github.com/github/scientist#adding-context | 17:18 | |
yoleaux | MadcapJake: I'll pass your message to pmurias. | ||
17:19
apiw left
|
|||
timotimo | ugexe: okay, so we'd just limit to a-zA-Z - and _ | 17:19 | |
ugexe | its legal for some underlying part of windows, but not others | ||
timotimo | and - and _ are only allowed between a-z and A-Z | ||
and 0-9 | |||
ugexe | but without a unique mapping couldnt 2 modules with names differing only by 1 Unicode character end up in the same path? | 17:20 | |
timotimo | yeah, so? in taht case we disambiguate with whatever method we feel necessary | ||
jnthn | I wonder how many discussions we're going to have trying to work out clever mapping strategies before folks learn to darn cope with the sha-1 names. :/ | 17:21 | |
MadcapJake | jnthn, do you really think sha-1 names in an error message are user-friendly? | ||
17:21
verzit joined
|
|||
jnthn | MadcapJake: No, which is why I said earlier I thought we should show the source filename as it was in the installed distribution. | 17:22 | |
ugexe | 11:10:33 nine | It also allows for us to add the name of the requested module to the backtrace output, | ||
timotimo | yeah, we do that now | ||
jnthn | OK, good. | 17:23 | |
17:23
apiw joined
|
|||
timotimo | i see no good way to introduce it to the profiler | 17:23 | |
jnthn | We might want to abbreviate the SHA-1s, or only show them in debugging output. | ||
timotimo | often enough the table in the "routines" tab is all wonky because a few routines in the table are super super wide because of their file name | ||
MadcapJake | jnthn, ok I'm in agreement with that, i think we should show not only the source but the module-relative path e.g., «Module::Name/Foo/Bar.pm6» | 17:24 | |
timotimo | and the allocations popup is *super* b0rked, too | ||
jnthn | MadcapJake: Yes, that's what I mean by the source filename as it was, before we installed it. Though I can see I that wasn't so clear how I wrote it ;) | ||
mst needs to get round to documenting the current CURLI on-disk layout | 17:26 | ||
... and then take a chainsaw to it, because having the filenames be hashes is frigging ridiculous | |||
jnthn | *sigh* | ||
mst | (having a hash as part of the *path*, less so) | ||
jnthn | So long as I don't have to work on this, I guess it's fine. | ||
mst | jnthn: it's ok. I understand why it was done that way. the trick will be to keep all the advantages of that *and* get back some of the things we lost | 17:27 | |
and I'm about 98% sure I know how to do that | |||
I'm also not expecting anybody else to | |||
timotimo | how terrible would it be to reduce the shasums to only 2/3rds or 1/2 length? | 17:28 | |
17:28
domidumont joined,
kid51 left,
verzit left
|
|||
jnthn | I guess we just have different design ideas on it. I like the SHA-1s in the installation repo because (a) filesystem valid name issues go away and (b) it makes it darn clear you're not meant to be messing with those things by hand | 17:28 | |
MadcapJake | jnthn, what's the route to take if you want to tweak a module? | 17:29 | |
mst | if you're trying to tweak then you want a lib/ dir or something outside the CURLI with the code in it | ||
17:30
perturbation joined
|
|||
mst | similarly to in perl5, where I do 'mkdir lib/Module; cp $(perldoc -l Module::Name) lib/Module/Name.pm; vi $_' | 17:30 | |
ugexe | just sha1 non-alpha numerics! | 17:31 | |
mst | jnthn: those are good reasons to have the sha1 as *part* of the path, however in terms of various sorts of debugging having that be the only thing encoded in the path is flipping terrible | ||
basically, (b) is not a reason to be actively hostile to people trying to debug dependency issues | 17:32 | ||
jnthn | MadcapJake: Tweaking installed things sounds like a really bad idea... | ||
MadcapJake | it'd be nice if there was a `panda develop Module::Name` that would download (or move from precomp) the module into a directory at the current location and symlink it into the precomp module dirs. | ||
mst | jnthn: yeah, it's an absolutely terrible idea at the moment. and frankly I'd rather make sure there are good alternatives so you don't ever want to do that, than make it less of a terrible idea :) | 17:33 | |
MadcapJake | jnthn, i guess i'm coming from Node.js world where every package is placed in a node_modules dir and you can tweak to your hearts content, I really wish Perl 6 had some similar facility (tweaks on a per-project basis) | ||
flussence | what's the issue with just percent-encoding the non-alnum parts of what's currently hashed...? | ||
mst | oh gods please no let's not bikeshed this now | ||
we want the hash *as well* | |||
there's lots of useful reasons for this | 17:34 | ||
the current design is academically elegant and has lots of useful properties | |||
I just need to beat it with a shovel until it's also not actively hostile to sysadmins and operations staff | |||
jnthn | mst: To me having a unique identifier for the thing being loaded, so I can know exactly which one it is, is highly useful for dependency debugging. :-) | ||
mst | jnthn: WHICH IS WHY I WANT TO KEEP THE HASH AS WELL! | ||
jnthn | mst: Yeah, I know :) | 17:35 | |
mst | sorry. every time I talk about this somebody assumes I want to get rid of the hashes | ||
and, no, they're also useful | |||
jnthn | If you were trying to get rid of them I wouldn't be saying "I don't want to do it", I'd be saying "please don't do it". ;) | ||
flussence | erm, isn't the *input* to sha1 already a unique ID? that's what I'm saying | ||
17:36
hacst left
|
|||
mst | the last time I designed a system like this, what you basically got was DistributionName-1.23-sha1goeshere/File/Name.pm | 17:36 | |
MadcapJake | so here's a common workflow that I have in the JS world, install a package, write up my code that uses it, notice something that needs fixing, fix it in my project's node_modules dir, run tests, test my project, then submit those fixes as a PR. | ||
mst | which gave you the unique identifier stuff nicely, while still also giving you sensible names on disk to find stuff using | 17:37 | |
17:37
hacst joined
|
|||
jnthn | Anyway, my (apparently wrong) assumption was storing the things under hashed names then buliding tooling around that would be a fine the way to go. But if having the stuff on disk more closely match the original file names is really valuable, I can go with us adding that too. | 17:37 | |
17:38
apiw left
|
|||
jnthn | cooking needs attention; bbiab | 17:38 | |
mst | jnthn: there's lots of stuff that relies on file names already out there, and lots of common debugging tricks that use them | 17:39 | |
as an example, if I get an error of "can't find Foo::Bar" or so | |||
for perl5, I can find out if that's in a vendor package by running 'apt-file search Foo/Bar.pm' | |||
17:39
alpha123 joined,
pierrot left
|
|||
mst | it would seem quite sad to say "yeah, you can't do that for perl6, you'll have to make your sysadmin learn a complete new set of ways of working" | 17:40 | |
17:40
sjoshi joined
|
|||
mst | because what I'm willing to bet will happen in a bunch of cases is the response you'll get it "if you're going to be this hostile to basic systems stuff, I'm not deploying this in production because I don't want to deal with this if I get a 3am page" | 17:40 | |
and, honestly, I'm pretty sympathetic to that response | |||
so I want to make it unnecessary, without losing any of the cool advantages of the current system :) | 17:41 | ||
timotimo | i'm glad we have mst working for us :3 | ||
mst gets off his soap box | |||
mst still isn't expecting anybody else to do the legwork | |||
flussence | what timo said +1 | ||
mst | if nothing else because if somebody else does it I'll probably only moan about their version | 17:42 | |
first weekend I don't have a frigging head cold, I swear I'll look at this properly | |||
meanwhile, you're welcome to blame me for it not being done already :D | |||
flussence | (if anything I've said sounds idiotic, feel free to ignore. bit under the weather myself today) | 17:43 | |
mst | percent encoding is a bit icky when you're trying to navigate around the filesystem | 17:44 | |
timotimo | ugh, yes | ||
mst | we'll probably have to experiment a bit with what to do instead of that, it's not a terrible plan Z | 17:45 | |
a completely random thought would be: if you have something like Cote.pm where there's a circumflex over the o | |||
you'd encode it to Cote-abcdef.pm where abcdef is the first 6 chars of the sha1, with code that'll use more characters if it somehow manages to collide within its target directory | 17:46 | ||
note: just thought of that, idea not actually endorsed, meant as a thought to consider | |||
but something in that direction would let us avoid the filesystem-character-restriction problem while still having reasonably ops-friendly names | |||
(goal: let somebody, when paged at 3am, manage to debug the broken production service even if they're not awake enough to remember perl6 has a whole extra set of tools for interacting with this stuff) | 17:47 | ||
MadcapJake: we need to enable some approach to hacking stuff up, but I'd rather think about it because once we make it even possible, people will do it all the time and it's effectively supported forever whether we meant that to happen or not :) | 17:48 | ||
17:54
virtualsue left
|
|||
MadcapJake | mst, yeah that's a good point! Better to have a well-engineered path that can stand the test of time. | 17:57 | |
18:00
sjoshi left,
apiw joined
18:01
sufrostico joined,
sjoshi joined
|
|||
sufrostico | hi there | 18:02 | |
somebody knows if there is a way to incorporate C code whitin a perl6 module ? | |||
other than the NativeCall library ? | |||
mst | "is there a way to do X, other than the way to do X?" | 18:03 | |
why do you need another way? :) | |||
DrForr | Why won't NativeCall work for you? | ||
18:03
apiw left
|
|||
simcop2387 | w 60 | 18:03 | |
18:05
hacst left
|
|||
sufrostico | there is some code that not exactly compiles to a shared library (.so) | 18:06 | |
18:07
hacst joined
|
|||
sufrostico | the code is not mine and the manual basically says download the code to your project and add the files to your makefile | 18:07 | |
so, i was checking the options | |||
18:08
adu joined
18:10
TEttinger left,
vendethiel- joined,
kst`` joined,
wamba left
18:11
virtualsue joined
|
|||
timotimo | there's Inline::C with which you can have a sub that has C source code as its body | 18:11 | |
18:11
d4l3k_ joined,
dalek left,
vendethiel left,
Gothmog_ left,
Roamer` left,
d4l3k_ is now known as dalek,
ChanServ sets mode: +v dalek,
Actualeyes left
18:12
wamba joined,
kst` left,
ilbot3 left,
MilkmanDan left,
apiw joined,
Gothmog joined
18:13
Gothmog is now known as Gothmog_,
Roamer` joined,
zakharyas left
|
|||
mst | sufrostico: you could still build them into a .so | 18:14 | |
sufrostico: and you're going to need a .so to be able to runtime load them into perl6 no matter how you do it, I think | 18:15 | ||
sufrostico: though Inline::C may be able to do that for you | |||
18:16
apiw left
|
|||
sufrostico | mst: Is posible that the perl6 module compile the c sources when installing ? | 18:16 | |
ugexe | put code to compile the source in a Build.pm | 18:17 | |
18:18
apiw joined
|
|||
sufrostico | ugexe: Thanks, I'll look into that | 18:22 | |
timotimo | we have things in the ecosystem that help you with that, like LibraryMake | 18:23 | |
18:24
TEttinger joined
18:26
apiw left
|
|||
RabidGravy | yeah I have three modules that do it, it's fairly easy to do | 18:27 | |
(build a small C library that is) | |||
18:28
wamba left
|
|||
ribasushi | putting this out here again (perl.christmas) twitter.com/ribasushi/status/701468980855382016 | 18:29 | |
timotimo | now if they had a 6 in there ... :P | 18:32 | |
sufrostico | RabidGravy: you have the urls of the modules at hand ? | 18:33 | |
I'll love to take a look at those | 18:34 | ||
18:34
adu left
|
|||
timotimo | why not just modules.perl6.org ? | 18:34 | |
oh, sorry | |||
RabidGravy | github.com/jonathanstowe/p6-Sys-Utmp, github.com/jonathanstowe/p6-Sys-Lastlog, github.com/jonathanstowe/RPi-Device-SMBus for example | ||
timotimo | you didn't mean for LibraryMake, obviously | 18:35 | |
18:35
apiw joined
|
|||
RabidGravy | see also Inline::Perl5 that does similar | 18:35 | |
DrForr | And Inline::Scheme::Guile. | 18:36 | |
ugexe | you can remove about 5 dependencies from your overall dependency chain by using a Build.pm modeled this way: github.com/retupmoca/P6-Compress-Z...r/Build.pm | 18:37 | |
18:40
apiw left
18:41
ilbot3 joined
|
|||
jnthn | mst: Thanks for the explanations; they make sense. | 18:42 | |
mst | jnthn: ISTR you spend quite a bit of time in win32? | 18:43 | |
or am I wrong about that? | 18:44 | ||
timotimo | i think that's fair to say | ||
mst | I think if you don't live in unix full time you don't see the extent to which directory/path naming when done carefully is actually a massive part of the utility | 18:45 | |
jnthn | mst: Yeah, quite a bit. | ||
mst | for you, needing special tools likely isn't a surprise or a problem so long as they're good | ||
18:45
firstdayonthejob left
|
|||
jnthn | mst: And while I do increasingly more of my day to day development work on Linux, it's fair to say I've never had to admin anything much more than a server hosting a handful of simple websites. :) | 18:46 | |
mst | for me, it would be a moment not unlike sungo.im/misc/fault-tolerance.png (swearing) | ||
18:46
Relsak left
|
|||
jnthn | mst: Though curiously, my design inspiration for it was actually largely Git | 18:46 | |
mst: Which is just a big store of things addressable as SHA-1s. :) | 18:47 | ||
mst | if git used the shas in the *checkout* I'd want to murder it too | ||
jnthn | Yeah :) | ||
Context, context, context... :) | |||
mst | oh, yeah, also - a very trivial example - grep gives you the file name and the matching line | ||
grep -r 'use Foo' $CURLI_PATH | |||
flussence | (git also has, according to my bash-completion, 170 frontend programs to that on disk format) | 18:48 | |
mst | would produce rather useful output under the approach I'm thinking about | ||
whereas currently you're a bit stuffed | |||
jnthn | *nod* | 18:49 | |
Yeah, I see why you'd miss it. | |||
mst | and, like, it's nice to have shiny thing-specific tools but if production just blew up I do not want to -have- to remember them | ||
sufrostico | timotimo, mst , ugexe : thanks | 18:50 | |
mst | jnthn: excellent. if your POV is now "this isn't my itch, but I could understand why somebody else would want to scratch it, and that if it goes well the end result would be a net usability improvement" then I'm happy | 18:51 | |
jnthn | mst: Yes, thanks for being patient enough to fill me in on what I was missing. | ||
18:52
john51 joined
18:53
john51 left
18:54
john51 joined
|
|||
mst | jnthn: thanks for being part of creating something with a developer experience nice enough for me to care :D | 18:55 | |
flussence | .oO( oh this is neat, some of the git frontends are hardlinked by category: `ls -l /usr/libexec/git-core | sort -nk 2` groups them by functionality [loose ends, servers, net transports, user interface] ) |
||
mst | cute! | ||
stmuk_ | I don't think anyone should cite git as an example of well designed front ends however neat the backends are :) | 18:56 | |
see git-man-page-generator.lokaltog.net/ | 18:57 | ||
mst | well, I think it's a good example of "how to make something that's extremely powerful once you know it backwards, but the learning curve is steep and you need to keep it memorised" | 18:58 | |
jnthn: which is kinda what you did, and the one part of git I don't want us to accidentally steal :D | |||
18:59
john51 left
|
|||
MadcapJake | .tell perlpilot I got another email about GSoC from Mark Keating, they decided to hold off this year and start preparations in the fall to make for a stronger, more-organized effort for the 2017 GSoC | 18:59 | |
yoleaux | MadcapJake: I'll pass your message to perlpilot. | ||
19:00
john51 joined
|
|||
jnthn | stmuk_: Agree, though a good backend can have another frontend put on, but a bad backend design is probably pretty hard to redeem with a better frontend. :) | 19:01 | |
mst | MadcapJake: that sounds like an mdk sort of plan | 19:03 | |
19:03
virtualsue left
|
|||
MadcapJake | mst, I don't know mdk but I do think that the redoubling should've happened 2015 Fall not 2016 Fall. | 19:05 | |
mst | MadcapJake: remember I explained that the summer 2015 picks were basically inexplicable and put a lot of people off - we didn't have the available volunteer time+motivation to do that as a result | 19:06 | |
I do think it would've been nice if we could've done it in fall 2015, but you can't force people to be motivated, especially after they've just been shat on from a great height | 19:07 | ||
awwaiid | I don't have time myself... but just to throw it out there -- we could have our own (non-google-sponsored) internship type program if we could scrape together the time and $$ | ||
19:07
kid51 joined
|
|||
awwaiid | though maybe google puts a lot more $$ in this than I'm realizing | 19:07 | |
labor-wise, they have the orgs put up details, find students, mentor students, evaluate students ... | 19:08 | ||
19:08
MilkmanDan joined
|
|||
mst | hm. what might be interesting is to submit for 2017 ... and then if we get refused, open it up to companies to pledge to sponsor the students anyway | 19:09 | |
awwaiid | exactly | ||
says here it is $5500 per student that they get | |||
mst | MadcapJake: eventually, you discover that 'should' generally isn't a useful word for such things | ||
MadcapJake | mst, but skipping just seems kind of immature | 19:10 | |
mst | because it's effectively complaining that other people didn't volunteer to do the things you wanted them to do | ||
awwaiid | (which... is about the size of the budget for the DC-Baltimore Perl Workshop... so maybe nontrivial) | ||
MadcapJake | i'm speaking entirely from the perspective of what I would expect a Foundation to be | ||
stmuk_ | I don't think Google give the same orgs money every year anyway .. they try and spread it around | 19:11 | |
mst | it's still made of volunteers, and better to do it next year properly than to half ass it this year and waste all the time put in | ||
MadcapJake | mst, certainly a valid perspective, I'm not disagreeing, I just thinking from the perspective of those at Google deciding these things, for a well-recognized foundation to skip a year seems a bit "non-foundation-like" | 19:12 | |
mst | people seem to have expectations of TPF that really don't match the reality of it being a non-profit run by volunteers in their spare time (and note also that on the occasions we've proposed fixing that by paying people, a whole different set of people have got up in arms about it) | ||
and, as I said earlier, after the debacle last year quite a number of projects are skipping a year | 19:13 | ||
I suspect some of them won't bother again full stop, if the process doesn't start making a bit more sense | |||
MadcapJake | mst, perhaps that's there intent :P | 19:14 | |
jnthn | Don't ascribe malice to what could easily be disorganization :) | ||
mst | perhaps. but I don't expect anybody who's actually worked with OSS non-profits to be remotely surprised, either way | ||
I think it's just that they completely changed the selection process, and forgot to tell anybody what they were doing or how | 19:15 | ||
I mean, it's google. it's not like they haven't done that before. | |||
jnthn | :-) | ||
mst | MadcapJake: if it was six months ago and you were volunteering to help co-ordinate, this would be a different conversation - but as it is, all you're really achieving is bagging on volunteers for finding that google's behaviour killed their -Ofun for a bit | 19:16 | |
19:19
AlexDaniel joined
|
|||
MadcapJake | mst, not trying to bag on volunteers! Sorry! I wish I was involved six months ago to help! | 19:19 | |
19:19
john51 left
19:20
john51 joined
|
|||
mst | MadcapJake: the trick is to remember that TPF itself is a legal vehicle which exists to hold and distribute money - and then everything else done under its auspices is done by volunteers | 19:21 | |
at which point, you end up with more accurate expectations of what's possible :) | 19:22 | ||
MadcapJake | mst, sure, however I do think that part of the responsibility of existing as a legal vehicle is recognizing that you are (uncontrollably) going to be a cultural vehicle for Perl efforts and others will look to you for the current health and vitality of Perl 5/6. | 19:26 | |
mst | I'm sure the people involved are very much aware of that, but sadly knowing this fact does not magic volunteer time and motivation out of thin air | 19:28 | |
MadcapJake | unfortunately ;) | ||
19:30
sjoshi left
19:34
john51 left,
_dolmen_ joined,
john51 joined
19:38
gtbjj joined
19:40
yqt joined
19:42
Ben_Goldberg left
19:43
Ben_Goldberg joined
19:48
Ben_Goldberg is now known as BenGoldberg
19:51
kid51 left
20:00
Cabanossi left
|
|||
pmurias | MadcapJake: re having a global %context I don't have a good proposal for a replacement, it just doesn't seem very useful and seems to be something that's not strictly necessary | 20:01 | |
yoleaux | 17:16Z <MadcapJake> pmurias: the Ruby version has the helper method as a module, so the default_scientist_context lets you change the context for any time you use the science helper. I thought the best reflection of that in P6 would be a module-scoped hash. | ||
17:18Z <MadcapJake> pmurias: what would you see as a more Perl 6 reflection of that? Check here for some context (pun intended): github.com/github/scientist#adding-context | |||
MadcapJake | pmurias, but what do you find not useful about it? | 20:02 | |
20:02
donaldh left
|
|||
pmurias | MadcapJake: in ruby you can have a set of per class defaults | 20:03 | |
if I wanted to pass context stuff in globals instead of using a global %context hash I would just use a global | 20:04 | ||
20:04
Cabanossi joined
|
|||
MadcapJake | but the %Test::Lab::Context isn't global it's module-scoped | 20:04 | |
maybe another route would be to add a named argument `context` | 20:05 | ||
20:05
donaldh joined
|
|||
pmurias | you mean to the dsl-free &lab version | 20:05 | |
MadcapJake | right | 20:06 | |
pmurias | for the dsl using lab version you can just send things using $experiment.context | ||
just like in ruby | |||
MadcapJake: I plan on adding a context argument | |||
20:07
telex left
|
|||
pmurias | what I mean about %Test::Labl::context being useless is that in ruby it's per class, so in CuteWidget you can add a bunch of context that's shared for all experiments on cute widgets | 20:08 | |
20:08
telex joined
|
|||
MadcapJake | oh i see, you mean that in ruby the science helper is added by mixing a module in | 20:08 | |
and that module has the context method that you can change | 20:09 | ||
20:09
_dolmen_ left,
domidumont left
|
|||
pmurias | the class you are mixing things in can have a default_scientist_context | 20:09 | |
MadcapJake | but in my Test::Lab, it's module-scoped but really, since my module isn't a role, it's just the same as being globally scoped. is that what you mean? | ||
pmurias | yes | ||
if we had a role that we added it would make sense to also have a default_lab_context | 20:10 | ||
MadcapJake | ok i'm following, but i'm kind of against it being a role because unlike ruby, you'd have to call it as `self.lab` | 20:11 | |
pmurias | role Test::Lab::UseLabAsMethod {method lab(*%args) {lab(:context(self.default_lab_context), |%args}; method default_lab_context {...}} | 20:12 | |
maybe with a few tweaks and a better name ;) | 20:13 | ||
MadcapJake | so add that as an alternative? | ||
20:14
cdg joined,
average joined
|
|||
average | blog.garage-coding.com/2016/02/05/b...queue.html | 20:14 | |
anyone here want to skim through my blog post | 20:15 | ||
pmurias | I think it would be best to first simplify things and then maybe add frills latter | ||
20:15
cdg left
|
|||
pmurias | I have started working on a dsl-free lab, but wasn't sure how to deal with context | 20:15 | |
MadcapJake | pmurias, what's your current thinking on context then? | 20:17 | |
20:18
von_cheam joined,
cdg joined
|
|||
MadcapJake | also, was thinking another route to take for `try`, instead of having a named `:name` argument, we could allow the user to pass a named sub `.try: sub candidate1 { ... }` | 20:19 | |
20:20
_mg_ joined
20:21
cdg left
|
|||
von_cheam | Hello! Complete newbie question here. Is it possible to create a static-type array in Perl 6? I can't find anything online.. | 20:21 | |
20:21
cdg joined
|
|||
Skarsnik | static type? you mean an umutable Array? | 20:22 | |
20:22
darutoko left
|
|||
MadcapJake | von_cheam, what do you mean by static-type? | 20:22 | |
Skarsnik | List or Seq are unmutable | ||
MadcapJake | Skarsnik, do you mean immutable? | ||
Skarsnik | yes probably | ||
von_cheam | As in something like: | 20:23 | |
my Int @value; | |||
That'll only accept Integers as elements. | |||
MadcapJake | that's exactly how you do it von_cheam | ||
hippie1 | m: my Int @foo; @foo.push("steve") | ||
camelia | rakudo-moar 7010f3: OUTPUT«Type check failed in assignment to @foo; expected Int but got Str ("steve") in block <unit> at /tmp/_cGxzNDFjs line 1» | ||
von_cheam | Oh, okay, fantastic. Thanks very much! | 20:24 | |
hippie1 | Perl 6 is so good, you know it without even knowing you know it. | ||
von_cheam | Haha! | 20:25 | |
20:25
von_cheam left
20:26
ely-se joined
|
|||
MadcapJake | hippie1, that's going on twitter :D | 20:27 | |
twitter.com/perlhex/status/701503672547569664 | 20:28 | ||
Begi | We have to wake up the #perl6 hashtag ! | ||
20:28
rindolf left
|
|||
MadcapJake | Begi, there's a light use of it already, but surely not enough! | 20:28 | |
20:28
sufrostico left
|
|||
Begi | that's sure, not enough ! | 20:29 | |
20:29
john51 left
20:30
john51 joined,
sufrostico joined
|
|||
shadowpaste | "pmurias" at 217.168.150.38 pasted "how a DSL free &lab would work" (7 lines) at fpaste.scsys.co.uk/505999 | 20:31 | |
pmurias | MadcapJake: ^^ how &lab works in my working copy | 20:32 | |
MadcapJake: instead of having a bunch of "cute" pseudo accessor we could have &lab for the suger and make Test::Lab::Experiment a normal object | |||
20:33
rindolf joined
|
|||
MadcapJake | pmurias, i like that example, but there's no `use`, is that intentional? | 20:33 | |
pmurias, I think that's a great idea, do you have an example of what that would mean in practice? | 20:34 | ||
pmurias | I'll paste a version of use | ||
s/of/with/ | |||
shadowpaste | "pmurias" at 217.168.150.38 pasted "how a DSL free &lab would work" (23 lines) at fpaste.scsys.co.uk/506000 | 20:38 | |
pmurias | MadcapJake: ^^ a more complex example | ||
MadcapJake | part of me is still a bit hesitant to turn lab into a named-arg sub as the ruby version allows you to do anything you want inside the procedure block, while the named-arg perl6 routine would only allow you modify thing internal to each named arg or before called &lab. | ||
20:39
Begi left
|
|||
MadcapJake | what are your feelings on this pmurias? | 20:39 | |
pmurias | can we do anything inside the procedure block other than set the named arguments? | 20:40 | |
20:40
Begi joined
|
|||
MadcapJake | pmurias, currently you could do anything you want but really only for preparation as none of the tests are run until after the procedure finishes. | 20:41 | |
pmurias | you will be still be free to calculate the named arguments how you want outside the lab block | 20:42 | |
MadcapJake | but maybe you wanted to dynamically generate something, then you'd have to add that outside of the lab or do it inside each use/try/run-if etc. | ||
yeah true, the facility is still there but i can't decide what's a better interface | |||
pmurias | any use cases when you want to dynamically generate stuff inside the lab? | 20:43 | |
MadcapJake | the benefit of the DSL are (to me): 1) simple wrapping 2) less typing 3) a block to run anything you want when declaring your experiments | 20:44 | |
the benefits of named-args are: 1) more perlish 2) more readable 3) less indenting (and in some cases less typing) | 20:46 | ||
pmurias | what do you mean for simple wrapping? | 20:47 | |
MadcapJake | you only have to place one line before and a curly end after. whereas with a named-args design you would need to rewrite the code inside of a call to &lab | 20:48 | |
pmurias | don't you have to just type less to wrap? lab 'test', { .use: {...}} vs lab :name<test>, use => {...} | 20:52 | |
b2gills | (backlogging) Why does everyone use 「%hash.sort(*.key)」 instead of just 「%hash.sort」? | ||
pmurias | and we could also use lab 'test', use => {...} in the DSL-free version | ||
20:52
_mg_ left
|
|||
Skarsnik | sort call %hash.flat.sort ? | 20:52 | |
pmurias | so it would be lab 'test', { .use: {...}} vs lab 'test', use => {...} | 20:54 | |
MadcapJake | yeah that certainly is pretty close :P | 20:56 | |
20:58
john51 left,
john51 joined
|
|||
lizmat | fg | 20:59 | |
20:59
musiKk joined
|
|||
lizmat | oops :-) | 20:59 | |
spider-mario | I see that we have the same kind of problem :) | 21:00 | |
b2gills | I don't have that problem because my terminal is white on black, and Pidgin is by default black on white | ||
spider-mario | I occasionally type `ls` into my hangouts window with my “main” coworker | ||
promptly followed by “oops, sorry” | 21:01 | ||
to which she replies “np” | |||
moritz | :w | 21:02 | |
no vim bot around :-) | |||
spider-mario | :x | ||
21:08
geraud joined
21:09
dh7320 joined
|
|||
nine | timotimo: I guess the profiler just uses the <file> annotation of the MAST nodes? Those do now contain the requested module's name in parentheses in my branch. Should be somewhat trivial to extract that, shouldn't it? | 21:17 | |
21:18
Skarsnik left
21:19
Amendil left
21:20
ely-se left
|
|||
timotimo | oh. yeah, it uses that | 21:22 | |
21:23
kaare_ left
21:38
firstdayonthejob joined
|
|||
BenGoldberg | b2gills, %hash.sort(*.key) merely happens to be what's in Hash.pod. | 21:40 | |
m: my %vowels = 'a' => 1, 'e' => 2, 'i' => 3, 'o' => 4, 'u' => 5; for %vowels.sort -> (:key($vowel), :value($index)) { "$vowel: $index".say } | |||
camelia | rakudo-moar 7010f3: OUTPUT«a: 1e: 2i: 3o: 4u: 5» | ||
21:42
Ben_Goldberg joined
21:44
ely-se joined,
rpburkholder joined
|
|||
Begi | I'm a beginner with Perl 6 : is this code correct ? | 21:45 | |
pastebin.com/GPzwzu1y | |||
21:45
BenGoldberg left
|
|||
Begi | Can I improve it ? Thanks ! | 21:45 | |
MadcapJake | prepare doesn't need to be a multi if there's only one sub | 21:46 | |
personally, i would just inline that if you're not planning on using `prepare` anywhere else | 21:47 | ||
21:48
TEttinger left,
rburkholder left
|
|||
Begi | Oh yes, why not. | 21:48 | |
Hmm, I'm gonna use it ine the future in fact | |||
MadcapJake | also you don't need the `$_ eq` as `when` automatically checks a string for `eq` against the topic variable | 21:49 | |
21:50
TEttinger joined
|
|||
Begi | so, I can do something like when 'dec' {} ? | 21:50 | |
MadcapJake | instead of `say 'Invalid!'` maybe you want to use `die 'Invalid'` which will exit with an error code and a stack trace | ||
21:50
SCHAAP137 joined
|
|||
MadcapJake | `when 'dec' {...}` | 21:50 | |
Begi | nice idea ! and yes, that's it | 21:51 | |
thanks ! | |||
21:55
Begi left
|
|||
MadcapJake | also, the MAIN doesn't need multi, but you *could* separate the modes and do a different multi for each mode | 21:55 | |
e.g., «multi sub MAIN('enc', Int $n, Str $filename) { ... }» | 21:56 | ||
multi is only needed where you plan on supporting multiple Signatures i.e., different parameters per routine | 21:59 | ||
22:02
wamba joined
22:03
FROGGS left
22:04
sufrostico left
22:12
john51 left,
john51 joined
22:14
gtbjj left
22:15
dh7320 left
22:22
xnrand left,
xnrand joined
22:23
john51 left,
john51 joined
22:29
john51_ joined
22:31
_dolmen_ joined
22:33
john51 left
22:34
musiKk left
|
|||
dalek | osystem: 8b44800 | (Aurelio Sanabria)++ | META.list: Add RPI::Wiring::Pi to the ecosystem See github.com/Sufrostico/perl6-wiringpi/ |
22:39 | |
osystem: df996f8 | RabidGravy++ | META.list: Merge pull request #158 from Sufrostico/master Add RPI::Wiring::Pi to the ecosystem |
|||
RabidGravy | There are a goodly few raspberry pi modules getting in there | 22:40 | |
this is a good thing | |||
22:43
john51 joined
22:46
john51__ joined,
john51_ left
|
|||
AlexDaniel | “(b) it makes it darn clear you're not meant to be messing with those things by hand” – eh, too bad the easiest way to fix a module sometimes is to open the goddamn file and edit it… | 22:50 | |
22:51
john51_ joined,
john51 left
|
|||
AlexDaniel | it is a bad idea, yeah, whatever. It works | 22:51 | |
at least right now | 22:52 | ||
22:53
rindolf left
22:55
john51__ left
22:59
neilb joined
23:00
pmurias left
23:02
Ben_Goldberg left
23:04
ely-se left,
john51 joined
|
|||
AlexDaniel | average: hi! So I skimmed through your blog post | 23:05 | |
MadcapJake | AlexDaniel, that's why I wish for a «panda develop Module::Name» that would pull a module out of it's sha'd home for you to develop (but symlinked back into the sha'd dir) | ||
AlexDaniel | MadcapJake: yeah, that'd be great | 23:06 | |
my biggest problem right now is that stacktraces don't make any sense to human beings | |||
so I'm glad that we have mst++ | |||
MadcapJake | yep that's exactly where the discussion earlier came from | ||
AlexDaniel | that being said, when stacktraces are finally fixed I'll have other problems… :) | 23:07 | |
average: ok, so, since it is about bash… prepare for bash pitfalls! | |||
23:07
john51 left
|
|||
MadcapJake | honestly my two grievances right now are 1) stacktraces are practically useless and 2) hacking on modules is discouraged and difficult | 23:07 | |
23:08
john51 joined,
john51_ left
|
|||
AlexDaniel | average: a rule of thumb is to quote everything. E.g. here 「. $PWD/queue-samples/seq-stats.sh」 | 23:09 | |
average: or here: echo "$MESSAGE" >$FIFO | |||
average: or here: rmdir $CONSUMER_LOCK | |||
average: everywhere. Everything has to be quoted. Although unquoted things may work right now, there's no guarantee that a tiny space will never get in | 23:10 | ||
MadcapJake | what's the best way to run a p6 script in the background at intervals (on linux)? | ||
AlexDaniel | average: Okay, now this: 「read line」. read without -r does not make much sense | 23:11 | |
23:11
john51 left
|
|||
AlexDaniel | average: wiki.bash-hackers.org/commands/buil...without_-r | 23:11 | |
23:12
john51 joined
|
|||
AlexDaniel | average: ok, now this is probably not as safe as you might think: echo "$MSG" | 23:12 | |
23:13
RabidGravy left
|
|||
MadcapJake | oh nvm, «watchbb | 23:13 | |
lol oops, meant to say «watch» works | |||
AlexDaniel | average: I have no idea what could possibly be inside "$MSG" but try 「MSG='-n'」 and see how it breaks | ||
average: so yeah. In short: 1) always quote everything 2) always use read -r 3) use printf when printing arbitrary variables | 23:15 | ||
23:16
john51_ joined
23:17
lichtkind joined
|
|||
AlexDaniel | average: I might take another look when you fix these things | 23:17 | |
lichtkind | masak cheers | ||
23:17
john51_ left
23:18
cdg left,
donaldh left,
dh7320 joined,
john51_ joined
|
|||
AlexDaniel | average: also, this page is extremely useful in such cases: mywiki.wooledge.org/BashPitfalls | 23:19 | |
23:20
john51 left
|
|||
dalek | kudo/nom: 77581b1 | lizmat++ | / (3 files): Make @a.chrs 3x as fast, chrs(@a) 9x as fast |
23:25 | |
timotimo | damn. | 23:30 | |
lizmat | damn? | 23:32 | |
timotimo | that's good savings | 23:34 | |
japhb | lizmat++ # Lots of optimization commits | ||
timotimo | "damn those commits are good" | 23:35 | |
japhb | Very nice things to see on return from vacation. :-) | ||
lizmat | FWIW, I'll be glad to revert them once we have deeper optimizations making these obsolete | ||
but I came across this one while working in the p5 pack/unpack module | 23:36 | ||
which I hope to have ready by tomorrow | |||
23:37
pierrot joined
|
|||
japhb | oooh, nice | 23:38 | |
23:38
_dolmen_ left
|
|||
lizmat | github.com/lizmat/PackUnpack fwiw | 23:40 | |
23:41
kurahaupo_ left
|
|||
lizmat | preliminary set that will be supported: a A C h H I L n N Q S v V x Z | 23:41 | |
timotimo | oh, was there anything you could steal from FROGGS' v5? | ||
23:42
pierrot left
|
|||
lizmat | I've taken my inspiration from src/core/Buf | 23:43 | |
fwiw, I figured FROGGS would be using that in v5, was I wrong ? | |||
timotimo | no clue | 23:44 | |
i just guessed | |||
lizmat | hmmm... seems it is a different implementation altogether | 23:46 | |
will use that as further inspiration tomorrow :-) | |||
timotimo++ for reminding me, FROGGS++ for putting in the work so far | 23:47 | ||
23:47
pierrot joined
23:49
firstdayonthejob left
|
|||
timotimo | cool :) | 23:50 | |
23:50
pierrot left
|
|||
timotimo | i'm about to head to bed | 23:50 | |
lizmat too | 23:51 | ||
good night, #perl6! | |||
23:53
sufrostico joined,
pierrot joined
23:54
spider-mario left
23:58
pierrot left
|