»ö« 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:01
mcmillhj left
00:04
mcmillhj_ left
00:10
kurahaupo left
00:11
kurahaupo joined
|
|||
SmokeMachine | m: bla { KEEP .say; 42 }; bla | 00:12 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: bla used at line 1 |
||
SmokeMachine | m: sub bla { KEEP .say; 42 }; bla | ||
camelia | (Any) | ||
SmokeMachine | should it print 42? | ||
00:13
sno joined
00:14
epony joined,
AlexDaniel left
00:16
epony left
00:17
epony joined
00:25
Zoffix joined
|
|||
Zoffix | SmokeMachine: it's a bug github.com/rakudo/rakudo/issues/1290 | 00:25 | |
In other news: CaR Grant is good to go :) news.perlfoundation.org/2018/04/mar...votes.html | |||
00:25
kurahaupo left
|
|||
timotimo | oh, was it important that it's not 2000 dollars? | 00:26 | |
00:26
kurahaupo joined
|
|||
SmokeMachine | Zoffix: thanks | 00:26 | |
Zoffix | I design marketing materials for a living.... I can't help it :) | 00:27 | |
timotimo | but why not 95 cents? | 00:28 | |
Zoffix | Because then the number looks longer (and bigger) :) | ||
00:29
Actualeyes joined
|
|||
timotimo | right, you want it to seem smaller than it is | 00:30 | |
because it's a cost to others | 00:31 | ||
00:31
markong left,
w_richard_w joined
00:34
epony left
|
|||
Zoffix | Another trick is to show a large number before the price (or show larger price first) to make smaller sums feels smaller than they are because our brains are wired to see stuff relative to each other. | 00:35 | |
timotimo | mhm, mhm | ||
Zoffix | So the title of my next grant will be "200000000000000000000e-20 Pieces of Work on [...]" :) | ||
timotimo | :D | 00:36 | |
MasterDuke | huh, my comment on the proposal never showed up | ||
(it was just a +1) | |||
but anyway, Zoffix++ | |||
00:36
epony joined
|
|||
Zoffix | :) | 00:36 | |
00:37
mcmillhj joined
00:38
Zoffix left,
Garland_g joined,
sno left
00:40
kurahaupo left,
kurahaupo joined
00:41
parsonsNose joined,
mcmillhj left
|
|||
parsonsNose | m: sub bar() { my Int $*global = 4 } ; bar() ; say $*global | 00:41 | |
camelia | Dynamic variable $*global not found in block <unit> at <tmp> line 1 |
||
parsonsNose | what did I misunderstand about $* ? | 00:42 | |
any fule no that you can declare a variable in a higher-level lexical scope and assign later. Cool. But, I thought with the $* stuff we could assign _and_ instantiate from an inner lexical scope :/ | 00:44 | ||
timotimo | it will only be available in things called by bar in your example | ||
parsonsNose | ahhh | ||
timotimo | i.e. it looks up the call stack | ||
parsonsNose | so it doesn't need to be passed explicitly, but it won't propogate out? | ||
thankee | |||
makes sense now | |||
Dunno how I misread that so badly :joy: | 00:45 | ||
Geth | doc: W4anD0eR96 self-assigned Document S05 treatment of alternations as atoms for ratchet github.com/perl6/doc/issues/1962 JJ self-assigned Put tests in some order github.com/perl6/doc/issues/1966 5e4e1960f1 | (JJ Merelo)++ | doc/Language/traps.pod6 Adds documentation for trap closes #1869 |
00:47 | |
parsonsNose | m: sub bar() { $*G = 4; foo } ; sub foo() { say $*G } ; bar(); | 00:49 | |
camelia | Dynamic variable $*G not found in sub bar at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
parsonsNose | ... yeah | ||
I'm still not getting it | 00:50 | ||
oops | |||
m: sub bar() { my $*G = 4; foo } ; sub foo() { say $*G } ; bar(); | |||
camelia | 4 | ||
parsonsNose | nah, we're all good here. Thanks again | ||
00:51
kurahaupo left,
mcmillhj joined,
kurahaupo joined
00:56
mcmillhj left
|
|||
parsonsNose | m: sub bar() { my Int $*G = 4; now < 10 ?? foo() !! baz } ; sub foo() { $*G = 'I will never work' } ; sub baz() { say $*G } ; bar | 00:58 | |
camelia | 4 | ||
parsonsNose | Is there no static typechecker at all? | 00:59 | |
timotimo | there is, but not for many things | ||
m: sub takes-a-string(Str $a) { say $a }; takes-a-string 99e0 | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling takes-a-string(Num) will never work with declared signature (Str $a) at <tmp>:1 ------> 3sub takes-a-string(Str $a) { say $a }; 7⏏5takes-a-string 99e0 |
||
lookatme | m: sub bar() { my Int $*G = 4; foo; baz; } ; sub foo() { $*G = 'I will never work' } ; sub baz() { say $*G } ; bar | 01:00 | |
camelia | Type check failed in assignment to $*G; expected Int but got Str ("I will never work") in sub foo at <tmp> line 1 in sub bar at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
parsonsNose | ahh | ||
guess that's a tradeoff we have to make for the gradual typing system | 01:01 | ||
lookatme | m: sub takes-a-string(Str $a) { say $a }; 1 < 0 ?? takes-a-string 99e0 !! say "Hi"; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling takes-a-string(Num) will never work with declared signature (Str $a) at <tmp>:1 ------> 3s-a-string(Str $a) { say $a }; 1 < 0 ?? 7⏏5takes-a-string 99e0 !! say "Hi"; |
||
lookatme | m: sub takes-a-string(Str $a) { say $a }; 1 < 0 ?? (takes-a-string 99e0) !! (say "Hi"); | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Calling takes-a-string(Num) will never work with declared signature (Str $a) at <tmp>:1 ------> 3-a-string(Str $a) { say $a }; 1 < 0 ?? (7⏏5takes-a-string 99e0) !! (say "Hi"); |
||
timotimo | well, dynamic variables are dynamic, which is the opposite of static :) | ||
parsonsNose | to allow us to define something that can be 'typed properly at runtime' | ||
yeah, fair. I'm just experimenting with them today :) | |||
and coming from scala | 01:02 | ||
slightly... different approach :D | |||
timotimo | any given sub can be called from 10 different subs that define the same name with different types | ||
parsonsNose | yeah | ||
fair enough TBH | |||
timotimo | m: sub AssignsTheThing { $*G = 99 }; sub NeedsAnInt { my Int $*G; AssignsTheThing; say $*G }; sub NeedsAString { my Str $*G; AssignsTheThing; say $*G }; NeedsAnInt(); | 01:03 | |
camelia | 99 | ||
timotimo | m: sub AssignsTheThing { $*G = 99 }; sub NeedsAnInt { my Int $*G; AssignsTheThing; say $*G }; sub NeedsAString { my Str $*G; AssignsTheThing; say $*G }; NeedsAString(); | ||
camelia | Type check failed in assignment to $*G; expected Str but got Int (99) in sub AssignsTheThing at <tmp> line 1 in sub NeedsAString at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
parsonsNose | oooh | ||
b2gills | Perl 6 is a static language that tries to be a dynamic one, and it does it to such an extent that some static things become harder | ||
lookatme | scala ? the Perl 8 ? | ||
parsonsNose | scala is one of the best 3 languages on the JVM if you count perl6 ;) | 01:04 | |
the other being clojure, Java sucks | |||
but i'm surprised by that last output | |||
that's actually kinda impressive | 01:05 | ||
timotimo | that was purely runtime, though | 01:06 | |
parsonsNose | .... I can't read the errors at all yet, can I? | ||
b2gills | m: sub foo () { my $*G = 99; bar; say $*G }; sub bar () { let $*G = 42; fail if Bool.pick }; foo xx 5 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Undeclared routine: xx used at line 1 |
||
01:06
kurahaupo left
|
|||
parsonsNose | ahh | 01:06 | |
lookatme | assignment seems like always check in runtime :) | ||
b2gills | m: sub foo () { my $*G = 99; bar; say $*G }; sub bar () { let $*G = 42; fail if Bool.pick }; foo() xx 5 | ||
camelia | 99 99 99 99 99 |
||
lookatme | m: sub f(Int) { }; sub z() { my Str $tr = 123; }; f(12) | ||
camelia | ( no output ) | ||
timotimo | they are rather not as easy to read on irc compared to the terminal where you have real newlines | ||
parsonsNose | Error while compiling vs something else | ||
welp, i'm stupes. | |||
01:07
kurahaupo joined
|
|||
timotimo | compile time errors usually have "===SORRY!==" in them= | 01:07 | |
b2gills | m: sub foo () { my $*G = 99; bar; say $*G }; sub bar () { let $*G = 42; Bool.pick && Nil }; foo() xx 5 | 01:08 | |
camelia | 99 42 99 42 42 |
||
01:11
mcmillhj joined
01:15
mcmillhj left
01:16
parsonsNose left
01:20
kurahaupo left,
kurahaupo joined
01:22
mcmillhj joined
01:26
mcmillhj left
01:27
Garland_g left
01:30
kurahaupo left
01:31
kurahaupo joined
01:32
mcmillhj joined
01:33
w_richard_w1 joined,
w_richard_w left
01:37
mcmillhj left,
kt_ joined
01:41
lookatme left
01:44
kurahaupo left
01:45
mcmillhj joined,
kurahaupo joined
01:46
ilbot3 left
01:49
ParsonsNose joined,
mcmillhj left
|
|||
ParsonsNose | m: sub bar() { say $*In ; sleep 1 ; say $*In };sub foo($assignation) { my $*In = $assignation ; start bar };my $A = foo('A');my $B = foo('B');await $A, $B | 01:50 | |
camelia | A B A B |
||
ParsonsNose | tbf | ||
that's pretty much rocking my socks right now | |||
There are whole libraries in java/scala using aspectJ magic all to basically emulate that functionality | 01:51 | ||
So. Cool. Yay | 01:52 | ||
01:56
ilbot3 joined,
ChanServ sets mode: +v ilbot3
01:57
kurahaupo left,
entonian joined,
kurahaupo joined
02:00
entonian left
02:02
sacomo joined
02:03
sno joined,
mcmillhj joined
02:04
luffysenpai joined
02:06
w_richard_w1 left
02:07
sno left
02:08
kurahaupo left,
mcmillhj left,
kurahaupo joined
02:12
w_richard_w joined
02:13
luffysenpai left
02:19
kurahaupo left
02:20
kurahaupo joined
02:21
mcmillhj joined
02:26
raynold left,
mcmillhj left,
Herby joined
|
|||
Herby | \o | 02:26 | |
yoleaux | 10 Oct 2017 01:26Z <AlexDaniel_> Herby: normally Gumbo ( github.com/Skarsnik/perl6-gumbo ), but see RT #131003 | ||
synopsebot | RT#131003 [open]: rt.perl.org/Ticket/Display.html?id=131003 [SEVERE][SEGV] Heap corruption when using Gumbo | ||
02:31
kurahaupo left,
kurahaupo joined
02:37
mcmillhj joined
02:40
ufobat_ joined
02:43
mcmillhj left,
athenot left,
ufobat___ left
02:44
athenot joined,
kurahaupo left,
kurahaupo joined
02:45
Herby left
02:46
BenGoldberg joined
02:54
mcmillhj joined
02:59
mcmillhj left,
kurahaupo left
03:00
kurahaupo joined,
cognominal joined
03:03
cog_ left
03:11
mcmillhj joined
03:14
kurahaupo left
03:15
kurahaupo joined,
mcmillhj left
03:26
kurahaupo left,
kurahaupo joined,
mcmillhj joined
03:31
mcmillhj left
03:33
pilne left,
pilne joined
03:35
eliasr left
03:36
skids left
03:37
kurahaupo left,
kurahaupo joined
03:43
mcmillhj joined
03:48
mcmillhj left
03:49
kurahaupo left
03:50
kurahaupo joined
03:51
sno joined
03:56
sno left
04:00
mcmillhj joined,
BenGoldberg left
04:01
kurahaupo left,
kurahaupo joined
04:05
mcmillhj left
04:10
w_richard_w1 joined
04:13
mcmillhj joined,
w_richard_w left,
kurahaupo left
04:14
kurahaupo joined
04:15
pilne left,
w_richard_w joined
04:18
khisanth__ left,
mcmillhj left
04:19
w_richard_w1 left
04:28
kurahaupo left,
kurahaupo joined
|
|||
Kaiepi | how would i be able to get the traits of a class? | 04:32 | |
04:32
mcmillhj joined,
khisanth__ joined
04:36
mcmillhj left
04:39
curan joined
04:43
kurahaupo left,
kurahaupo joined
04:45
mcmillhj joined
04:49
mcmillhj left
04:54
kurahaupo left,
kurahaupo joined
05:00
mcmillhj joined
05:05
mcmillhj left,
kurahaupo left
05:06
kurahaupo joined
05:09
jmerelo joined
05:19
mcmillhj joined
05:20
kaare_ joined
05:21
kurahaupo left,
kurahaupo joined
|
|||
05:24
mcmillhj left
05:27
troys left
05:31
kurahaupo left,
kurahaupo joined
|
|||
05:37
sauvin joined
|
|||
synopsebot | Link: doc.perl6.org/language/traps | ||
05:39
mcmillhj joined,
sno joined
05:43
kurahaupo left,
mcmillhj left,
kurahaupo joined
05:45
sno left
05:50
mcmillhj joined
05:53
kurahaupo left
05:54
mcmillhj left
05:55
robertle left
06:05
mcmillhj joined
06:10
mcmillhj left
06:16
domidumont joined
06:19
khw left
06:22
domidumont left
06:23
mcmillhj joined,
domidumont joined
06:27
mcmillhj left
06:30
sauvin left,
sauvin_ joined
06:31
jmerelo left
06:37
sno joined
06:39
rindolf joined,
mcmillhj joined
06:44
robertle joined,
mcmillhj left
06:52
mcmillhj joined
06:56
kurahaupo joined
06:57
mcmillhj left
06:59
darutoko joined
07:02
gfldex_ is now known as gfldex
07:11
mcmillhj joined
07:14
lizmat left
07:16
mcmillhj left
|
|||
stmuk | I think this is "new" (I thought the video was supposed to be lost) | 07:16 | |
www.youtube.com/watch?v=FP1IfvAUJnI | |||
arggg it's 50secs not mins | 07:17 | ||
:) | |||
07:17
jmerelo joined
07:18
lizmat joined
07:20
athenot left,
athenot joined
|
|||
El_Che | stmuk: good find, although short :) | 07:29 | |
07:29
mcmillhj joined
07:30
lizmat left
|
|||
stmuk | its just a pity its not the standing ovation of 1000s at the end :) | 07:30 | |
07:34
mcmillhj left
07:46
mcmillhj joined
07:49
lizmat joined
07:51
mcmillhj left
07:54
wamba joined
07:59
jmerelo left
08:01
mcmillhj joined
08:06
mcmillhj left
08:11
sauvin_ is now known as Sauvin
08:14
TEttinger left
08:21
mcmillhj joined
08:24
zakharyas joined
08:25
mcmillhj left
08:27
zakharyas left,
zakharyas joined
08:32
mcmillhj joined
08:38
mcmillhj left
08:47
mcmillhj joined
08:49
FROGGS joined
08:50
FROGGS left
08:51
FROGGS joined,
FROGGS left,
FROGGS joined
08:52
mcmillhj left
08:54
SCHAPiE left
09:01
SCHAPiE joined
09:06
mcmillhj joined
09:11
mcmillhj left,
HaraldJoerg joined
09:16
mcmillhj joined
09:18
epony left
|
|||
Geth | doc/master: 5 commits pushed by (Luca Ferrari)++ | 09:18 | |
09:19
epony joined
09:21
mcmillhj left
09:25
easyAnalyst joined,
easyAnalyst left
09:26
w_richard_w left
09:28
mcmillhj joined
09:30
HaraldJoerg1 joined,
HaraldJoerg1 left
09:31
HaraldJoerg left
|
|||
El_Che | "This type cannot unbox to a native string: P6opaque, Failure" <-- weirdest error so far (no line nr, nothing) | 09:31 | |
jnthn | Compile time error, or? | 09:33 | |
09:33
aindilis left,
mcmillhj left,
maettu left
|
|||
jnthn | Also, --ll-exception should give a stack trace | 09:33 | |
El_Che | looking at it, it comes from a class consuming a role (while an other loads fine) | ||
09:35
maettu joined
|
|||
El_Che | .. it's gone, whut why | 09:35 | |
09:36
epony left
09:46
markong joined
09:48
mcmillhj joined,
epony joined
09:53
mcmillhj left
10:01
mcmillhj joined
10:04
irco joined
10:06
epony left,
mcmillhj left
10:07
epony joined
10:09
domidumont left
10:16
mcmillhj joined
10:21
mcmillhj left
10:26
epony left
10:28
epony joined
10:33
zakharyas left
10:34
zakharyas joined
10:35
AlexDaniel joined
10:38
mcmillhj joined
10:43
mcmillhj left
10:47
epony left
10:52
wamba left
10:58
abraxxa left
|
|||
Geth | museum-items: a27a0af314 | (Zoffix Znet)++ (committed using GitHub Web editor) | 2015/Perl-6-release-announcement.md Add Larry's P6 release announcement vid |
11:04 | |
11:08
curan left
11:11
MasterDuke left
11:12
epony joined
11:24
zakharyas left
11:27
zakharyas joined
11:31
epony left
11:34
epony joined
|
|||
jkramer | Can the consumer of a Supply somehow tell the Supplier that it's done and it should stop supplying stuff? | 11:48 | |
moritz | you can cancle the tap | 11:51 | |
11:51
epony left
11:52
epony joined
11:54
athenot left
|
|||
jkramer | But the supplier won't know about that, right? | 11:55 | |
I mean it won't know there's no one listening | |||
I have a supplier in a thread with an infinite loop, I'd like to make it stop somehow from the Supply end when I'm done with its output | 11:56 | ||
11:59
domidumont joined
12:08
wamba joined
12:11
epony left
12:12
jmerelo joined
|
|||
jmerelo | Hi y'all. My university has just published a call for applications for a sabbatical program | 12:13 | |
so, I was wondering. | |||
Anyone would want to host me, be it in a company, university, research center or whatnot for some time starting Jan 2019? | 12:14 | ||
12:25
scimon joined
12:27
eliasr joined
12:32
jmerelo left
12:34
domidumont1 joined
12:37
domidumont left
12:38
Zoffix joined
|
|||
Zoffix | Do we have docs on core Numeric types? | 12:39 | |
Like, I guess /language docs, not just the type method reference | 12:40 | ||
12:41
athenot joined
12:44
mcmillhj joined
|
|||
Zoffix | .oO( wonder if every issue being labeled with "JJ TPF Grant: To label issues JJ will be working on during TPF grant" actually discourages other people fixing those issues ) |
12:44 | |
12:47
domidumont1 left,
domidumont joined
12:49
mcmillhj left,
mcmillhj joined
|
|||
jkramer | Zoffix: BTW maybe you want to update your cpan6 guide for beginners. :) The bit "select Perl6 in the select input" doesn't work for first-timers, as there's no select box until you've entered "Perl6" in the input box manually once | 12:53 | |
Not a big issue but it slightly confused me the first time :) | |||
Zoffix | There was when I wrote it :( | 12:58 | |
You could submit a PR to fix it: github.com/zoffixznet/perl6.party/...Is-Here.md | |||
(personally, I recognize that trying to keep old blog posts up-to-date is a futile effort) | |||
13:01
amalia___ joined,
DataLinkDroid joined
|
|||
Zoffix | What was the docs Issue number for the indexing breakage? Or was that resolved... | 13:02 | |
D#1894 | 13:03 | ||
synopsebot | D#1894 [open]: github.com/perl6/doc/issues/1894 [JJ TPF Grant][big][search] Some pages are not indexed. | ||
Geth | ¦ doc: zoffixznet self-assigned Some pages are not indexed. github.com/perl6/doc/issues/1894 | ||
13:11
brrt joined
13:12
comborico1611 joined
|
|||
Herby_ | \o | 13:19 | |
comborico1611 | Hello | 13:20 | |
Geth | doc/fix-indexing: 8a6207a3d8 | (Zoffix Znet)++ | assets/sass/style.scss Fix typo in property name |
13:21 | |
doc/fix-indexing: 1913294142 | (Zoffix Znet)++ | assets/sass/style.scss Fix incorrect property value |
13:23 | ||
13:29
comborico1611_ joined,
skids joined
|
|||
Geth | doc/fix-indexing: 32e15f6c33 | (Zoffix Znet)++ | template/search_template.js Smartify method name search detection Fixes missing results for all ops that start with a dot. |
13:30 | |
comborico1611_ | I'm wondering why there is a space here ( if) control flow with orwith without§ | 13:37 | |
docs.perl6.org/syntax/with%20orwith%20without | 13:38 | ||
Or is it just a typo? | |||
Geth | doc: ee2f3cd9d8 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/control.pod6 Remove unwanted space irclog.perlgeek.de/perl6/2018-04-27#i_16102496 |
13:40 | |
synopsebot | Link: doc.perl6.org/language/control | ||
Zoffix | (probably fixes that) | ||
13:47
wamba left,
mcmillhj left,
mcmillhj joined
13:50
vcv_ joined
14:03
brrt left
14:04
luffysenpai joined,
luffysenpai left
|
|||
El_Che | hi | 14:07 | |
jkramer | gist.github.com/jkramer/cd9492abf2...2d0f04e9e6 | ||
14:08
wamba joined
|
|||
jkramer | Any ideas how I can solve that supply problem here? I want a way to stop the thread/loop in read-keys from the outside so it can recover the original termios flags and stop reading from $*IN | 14:08 | |
A completely different approach would be fine too :) | 14:09 | ||
moritz | the obvious thing to do would be to replace the loop { ... } with a while $should-read { ... } | 14:12 | |
jnthn | Well, `return $supplier.Supply.on-close({ ...code here... });` gives you a way to run a callback when the supply is closed | ||
moritz | and then set $should-read = 0 if you want it to stop | ||
jnthn | Uh, tap is closed | ||
The `done` automatically cuases all taps to be closed | 14:13 | ||
Then combine that with what moritz said :) | |||
14:13
zakharyas left
|
|||
jkramer | jnthn: Oh I think I misunderstood on-close then. I thought it's executed when the Supplier is closed | 14:14 | |
jnthn | There's no such thing as a Supplier being closed | 14:15 | |
What get closed is a tap on the Supply | |||
Thus why the .on-close comes after the .Supply | |||
jkramer | Woah, works perfectly! :) Thanks moritz & jnthn | 14:17 | |
14:20
kaare_ left
|
|||
jnthn | Now, can anybody explain why it works perfectly? :-) | 14:20 | |
jkramer | I already moved on to other problems ¯\_(ツ)_/¯ | 14:22 | |
What's nicer? 'whenever read-keys', 'whenever key-press' or 'whenever key-pressed'? | 14:24 | ||
I think it should be one of the latter two, but can't decide :) | |||
Zoffix | 'cause the on-close callback that closed over $should-read var changes it to not read it anymore when done is called (and tap is closed) and the thing ends | ||
jnthn | Events are things that have undisputably happened, so past tense makes most sense to me | ||
(key-pressed) | |||
jkramer | Yup, agreed | ||
jnthn | Zoffix: Yes; also `emit` runs the code in the downstream `whenever`, which calls `done`, which will `close`, which in turn means that it's false reliably before that loop test runs again :) | 14:26 | |
Zoffix | :) | 14:27 | |
14:27
domidumont1 joined
|
|||
mcmillhj | Can someone explain to me why this: gist.github.com/mcmillhj/57a4e81cf...bcf4563da1 returns a Seq and not a List? I expected it to return a List | 14:28 | |
yoleaux | 26 Apr 2018 20:34Z <Zoffix> mcmillhj: You can use Arrays for hash keys, but it's likely to be pain, since they're not value types (so you'd have to use the same Array object to do the lookup, not one that just has the same values). Also, you need to place it into a Scalar container to tell the compiler you want to treat it as one item (the key) instead of a list of keys. Lastly, by default hashes stringigfy keys, so you'll need to | ||
26 Apr 2018 20:34Z <Zoffix> mcmillhj: use object hashes: m: my @a = <a b c>; (my %h{Array}){$@a} = 42; %h{$@a}.say | |||
Zoffix | mcmillhj: because reverse returns a Seq | 14:29 | |
jkramer | m: 'ẞ'.codes.say | ||
camelia | 1 | ||
jkramer | m: say 'ß'.uc; say 'ẞ'.lc | ||
camelia | SS ß |
||
Zoffix | mcmillhj: @path.reverse.List.return | ||
jkramer | What | 14:30 | |
Zoffix | jkramer: that's what the uppercase of that letter is | ||
14:30
domidumont left
|
|||
Zoffix | m: say 'ß'.fc | 14:30 | |
camelia | ss | ||
Zoffix | ^ use that if you need to compare it case insensitvely | ||
jkramer | m: say 'ẞ'.fc | ||
camelia | ss | ||
jkramer | Shouldn't uppercase ß be ẞ? | 14:31 | |
I know it's quite new but still | |||
jnthn | Not according to Unicode :) | ||
jkramer | :( I like that character | ||
Zoffix | u: ßẞ | ||
unicodable6 | Zoffix, U+00DF LATIN SMALL LETTER SHARP S [Ll] (ß) | ||
Zoffix, U+1E9E LATIN CAPITAL LETTER SHARP S [Lu] (ẞ) | |||
jnthn | m: say "Unicode ist scheiße".uc | ||
camelia | UNICODE IST SCHEISSE | ||
jnthn | :P | ||
Zoffix | :) | ||
jkramer | Oh well I guess there's a difference between "uppercase" and "capital" | 14:32 | |
Since uppercase ß doesn't exist in the wild, just as capital in titles or whatever | |||
mcmillhj | Zoffix: oooh, that will teach me not to look at reverse's signature. :\ Thanks | 14:33 | |
14:36
caa51h joined
|
|||
jnthn | Things that can lazily produce the result will tend to return a Seq. In this case, it means `for @million-element-thing.reverse { }` doesn't need to create a second million-element thing in memory to iterate in reverse, and can just go through the existing thing backwards. | 14:37 | |
14:50
HaraldJoerg joined
14:54
troys joined
|
|||
El_Che | f* perl6. I am writing ~ all over the place in perl 5 :) | 14:55 | |
Zoffix | / is writing `-` all over instead of `_` | 14:56 | |
Zoffix is writing `-` all over instead of `_` | |||
jnthn | Ah, the 5/6 switching fun :) | 14:59 | |
mcmillhj | jnthn: how does that work with things like infinite lists? | 15:00 | |
jnthn | I managed to write . for concat in Perl 6 a few times earlier this week :) | ||
15:00
TimToady joined
|
|||
jnthn | I noticed pretty quick though...was dogfooding Comma and it stuck a nice red underline under it for me. :) | 15:01 | |
Zoffix | mcmillhj: it doesn't :) | ||
m: (1…Inf).reverse | |||
camelia | Cannot reverse a lazy list in block <unit> at <tmp> line 1 |
||
Zoffix | jnthn: nice :) | ||
mcmillhj | Zoffix: reverse 1..* returns an infinite list | ||
FROGGS | jnthn: and I'll be able to buy comma next week? | 15:02 | |
mcmillhj | Zoffix: I figured, was just wondering | ||
15:02
Herby_ left
|
|||
Zoffix | mcmillhj: in that case, the source is a Range, so it knows how to produce the reverse of it | 15:02 | |
Range object, I mean | |||
TimToady | yoleaux: .botsnack | ||
yoleaux | 26 Apr 2018 13:50Z <Zoffix> TimToady: are language mutations supposed to propagate to EVAL (e.g. sub infix:<♥> { say $^a + $^b }; 'say 2 ♥ 42'.EVAL) ? I see &EVAL tries to find LANG, but dumping it even at begin time seems to always show Nil: github.com/rakudo/rakudo/blob/29b0...m6#L54-L66 | ||
mcmillhj | ah I see, the result is similarly not useful though :) | 15:03 | |
jnthn | FROGGS: Not quite that soon, but "sometime in May" is still looking good. | ||
FROGGS | awww | ||
TimToady | Zoffix: yes, EVAL is supposed to use the current language | 15:04 | |
comborico1611_ | I'm finding perl6intro.com to be exactly what I needed. Someone tell hankache he needs to write a Perl6 book! | ||
jnthn | I thought `EVAL` did use the current language in the past :S | ||
FROGGS | jnthn: because if when I'm quite happy with the IDEs I use, it kinda sucks when they see a .y method call and format it like P5's y/// | ||
jnthn | I'm sure I did the stuff to make that work even | ||
TimToady | /metoo | ||
FROGGS | which means it takes whatever comes after the .y as delim -.- | 15:05 | |
jnthn | (Poke stuff into %?LANG) | ||
FROGGS: argh, yes | |||
TimToady | well, we use $?LANG now, but yes | ||
jnthn should keep up :) | |||
Zoffix | uhh | 15:06 | |
TimToady | the braid is now internal to the current language object | ||
Zoffix | m: sub infix:<♥> { say $^a + $^b }; q|say 2 ♥ 42|.EVAL | ||
camelia | 44 True |
||
Zoffix | ... seems to work now :/ | ||
m: sub infix:<♥> { say $^a + $^b }; 'say 2 ♥ 42'.EVAL | |||
camelia | 44 True |
15:07 | |
Zoffix | m: sub put(|) { say "no say for you!" }; try q|put 42|.EVAL; say $!.^name; | ||
camelia | no say for you! Any |
||
TimToady | "O see, can you say, by the dawn's early light..." | 15:08 | |
well, it's still early here, but maybe not in Canada | 15:09 | ||
Zoffix | Don't see any bugs in the original log either, so I guess that was just a brainfart :) | ||
TimToady | I'd think a whole bunch of tests would fail if that brake | 15:12 | |
operator-overloading.t uses plenty of EVALs | 15:13 | ||
that's not to say we might not have spots where we still lose track of the current language, but I doubt it's pervasive | 15:14 | ||
Zoffix | comborico1611_: you can tell yourself. Just use the .tell bot command (or twitter) | 15:15 | |
comborico1611_ | I don't follow. | 15:16 | |
Zoffix | .tell comborico1611_ Use the bot, Luke! | ||
yoleaux | Zoffix: I'll pass your message to comborico1611_. | ||
comborico1611_ | Heh. Why would I need to tell myself? | ||
yoleaux | 15:16Z <Zoffix> comborico1611_: Use the bot, Luke! | ||
Zoffix | and twitter.com/hankache | ||
comborico1611_ | No Twitter account. | 15:17 | |
Zoffix | comborico1611_: that was in response to "comborico1+│ I'm finding perl6intro.com to be exactly what I needed. Someone tell hankache he needs to write a Perl6 book!" | ||
TimToady | he meant "you can tell him yourself", but he accidentally a word | ||
comborico1611_ | I see. | ||
But I don't have much influence. | 15:18 | ||
.tell hankache I'm finding perl6intro.com to be exactly what I needed. You need to write a Perl6 book!" | |||
yoleaux | comborico1611_: I'll pass your message to hankache. | ||
15:19
robertle left
|
|||
comborico1611_ | TimToady: Top 5 most readable programming languages? Please reserve only one slot for snide remark. | 15:19 | |
Just curious on your opinion. Readable doesn't take into account unknowledgeable. As in, this is the easiest to read if a person doesn't actually know the coding system. | 15:20 | ||
TimToady | you just contradicted yourself :) | 15:21 | |
comborico1611_ | I don't think so. Perl people consider to not be readable, but it is readable to those who know it. | ||
TimToady | oh, I read "doesn't take into account" the other way | 15:22 | |
comborico1611_ | Perl -- people consider.. | ||
Zoffix | Same with python | ||
mcmillhj | I find it difficult to read most things I don't know :) | ||
Zoffix | Compare this Python to the Perl 6 version below :) en.wikipedia.org/wiki/C3_lineariza..._in_Python | 15:23 | |
TimToady | I'd say there are languages that have the reputation of being readable because they're made more out of words, but that just means the misunderstandings are misunderstood more :) | ||
comborico1611_ | mcmillhj: Of the coding systems (languages) you do know, which are the easiest to read? | ||
TimToady | just people people think they know what a word means doesn't mean that they actually know what the word means to the computer | ||
so in some sense it's more deceptive | |||
Zoffix | Yeah, and would still need to look up: arguments, return types, special cases | ||
TimToady | (to have misleading words) | 15:24 | |
jnthn | Curiously, Perl is easiest on my (not very good) eyes, because differnet things look different, rather than being a wall of words. :) | ||
comborico1611_ | Yes, when I was studying Common Lisp recently, I opted to put $ sigil before parameters and variables, because everything is a word in CL. | ||
TimToady | well, that's one of our design principles, but people seem to like words even when they are getting fooled | ||
*some people | |||
whereas we think that if you don't understand something, it should look like you don't understand it :) | 15:25 | ||
15:34
khw joined
15:35
wamba left
15:37
kaare_ joined
15:41
jmerelo joined
15:44
domidumont1 left
15:47
kaare_ left
15:51
robertle joined
15:54
kaare_ joined
15:55
ufobat_ left
|
|||
El_Che | today was a fun day. Writing snippets in a language you don't really know. Trial and error to the max (Jenkins pipeline in a DSL as subset of groovy) | 16:02 | |
16:02
mcmillhj left
16:03
Zoffix left
|
|||
jmerelo | groovy looks like a groovy language | 16:03 | |
El_Che | it's a java beverages with grinded rubies at the bottom (they don't say on top) | 16:04 | |
-s | |||
thing is that when you program-by-stackoverflow you end up adding groovy stuff that the DSL doesn't allow (it's a sandbox as well) | 16:05 | ||
jmerelo | I bet rubies don't make java beverages any better | ||
El_Che | you get a sexy voice | ||
that must count for something | |||
jmerelo | El_Che: :-) | ||
El_Che | Bonnie Tyler-husky points | 16:06 | |
besides that Ubuntu 18.04 came out and it discourages my implemented type of home encryption | 16:07 | ||
backup home, reinstall, rinse it looks like :) | 16:08 | ||
jmerelo | I am for LTS. Still running 14.04 here. | ||
"Optimized for machine learning" What's that even supposed to mean? | 16:09 | ||
El_Che | jmerelo: it was written by an AI | 16:10 | |
it knows what it writes about :) | |||
I like more blood on my desktops | |||
jmerelo | El_Che: "You know AI? I KNOW AI!" | 16:11 | |
You start to type and Ubuntu 18.04 goes: whoa, whoa, you know what cher doin'? Let me finish that for you... | |||
[Coke] | /win 3 | 16:19 | |
buggable | [Coke], Thank you for entering Accidental /win Lottery! The next draw will happen in 3 days, 7 hours, 40 minutes, and 22 seconds | ||
16:22
domidumont joined
16:30
scimon left
16:34
mcmillhj joined
16:36
athenot left
16:37
comborico1611_ left
16:39
mcmillhj left
17:02
mcmillhj joined
|
|||
jmerelo | Slow evening, so let's year your opinion on this issue github.com/perl6/doc/issues/1970 raised by Zoffix | 17:17 | |
And while you're at that, take a look at this github.com/perl6/doc/issues/1966 proposed by YT | 17:18 | ||
Geth | doc: JJ self-assigned /language/contributors hasn't been updated in ages github.com/perl6/doc/issues/1970 9dfce1096b | (JJ Merelo)++ | 3 files And some exceptions in the author tests that referenced it. Closes #1970 |
17:33 | |
17:40
athenot joined
17:44
comborico1611 left
|
|||
Geth | doc/fix-indexing: fa7985ffc5 | (Zoffix Znet)++ | htmlify.p6 Get rid of fatal error silencers - Get rid of all Promise.alloffs - Catch the error that currently kills indexing and make it spew full details (likely can remove the catcher in later commits; catching right now to not abort the build and weed out all the things that make it throw) |
17:46 | |
doc/fix-indexing: db44916e95 | (Zoffix Znet)++ | htmlify.p6 Don't crash on empty X<> text In many places we insert an invisible indexing marker, for which .content[0] is an Any and it crashes when we try to stick that Any into a place that expects a Str:D |
17:49 | ||
jmerelo | Wow, that's big | 17:50 | |
Zoffix++ | 17:51 | ||
.tell zoffix to remember and refer to the different htmlify.p6 issues when merging | 17:52 | ||
yoleaux | jmerelo: I'll pass your message to zoffix. | ||
jmerelo | .tell zoffix also that [Coke] is working on that same file on coke/build. Far as I can tell, not touching the same lines, but better be aware of that. | 17:56 | |
yoleaux | jmerelo: I'll pass your message to zoffix. | ||
18:04
epony joined
18:16
mcmillhj left
|
|||
Geth | doc/fix-indexing: 35dd2eec16 | (Zoffix Znet)++ | htmlify.p6 Use more robust X<> unpacker We might have nested pod codes inside; don't assume it's just text |
18:16 | |
18:17
ChoHag joined,
ChoHag left
|
|||
jmerelo | The last remaining http testing site, httpbin, now redirects to HTTPS. Here's a request for help stackoverflow.com/questions/441316...requestbin | 18:18 | |
Geth | doc/fix-indexing: 147536af82 | (Zoffix Znet)++ | htmlify.p6 Don't assume we'll always have meta text in X<> |
18:21 | |
doc/fix-indexing: fbf0c0af38 | (Zoffix Znet)++ | htmlify.p6 Use more robust textifier in one more branch |
18:22 | ||
rindolf | hi all | ||
jmerelo | hi! | 18:23 | |
rindolf | jmerelo: sup? | ||
jmerelo | Well, httpbin has moved to https-only and we're dealing with the fallout in modules testing here. Just your average Friday evening. | ||
rindolf | jmerelo: ah | 18:24 | |
El_Che | everything I open github I see a notification with pod6 problems. Maybe time to move to md | ||
El_Che ducks | |||
jmerelo | El_Che: and use only vim for edits. | ||
El_Che: man, that error in your travis... error: pathspec '2018.05' did not match any file(s) known to git. | 18:25 | ||
El_Che | jmerelo: any capable editor/ide in the planet has good md support | ||
rindolf | El_Che: heh | ||
El_Che | jmerelo: found the workaround | ||
jmerelo | El_Che: you werere future-proofing your stuff, right? | ||
rindolf | El_Che: i have a hate/love relationship with markdown | ||
El_Che | jmerelo: it's not for me, but for rakudo's release manager. A canary | ||
jmerelo | El_Che: nice birds. | 18:26 | |
El_Che | rindolf: the only format I seem to like is yaml :) | ||
but documenting code in pod[56] is a pain | |||
18:26
espadrine_ joined,
Sauvin left
|
|||
El_Che | I can understand java and code documentation just above a method, that's nice | 18:27 | |
in Perl you get to right a book | |||
and it breaks the code flow for me | |||
so it ends in an other file | |||
18:27
TEttinger joined
|
|||
jmerelo | That's literate programming. Haskell has it. We have to do one better. | 18:27 | |
El_Che | and since it's in an other file, it can be md | ||
jmerelo: you don't need to document haskell | 18:28 | ||
the code represent the natural state of all things | |||
what was, what is, what will e | |||
be | |||
jmerelo | El_Che: :-) | 18:29 | |
18:29
Exodist joined
|
|||
jmerelo | But I don't see you panicking nearly enough. LWP::Simple is going to have to be installed using --force all over again | 18:33 | |
That will break every single test in perl6/doc. Luckily we have the docker and package working | 18:34 | ||
18:34
dwarring joined
18:35
comborico1611 joined
|
|||
El_Che | is it broken? | 18:35 | |
18:35
mcmillhj joined
|
|||
jmerelo | travis-ci.org/perl6/doc/jobs/372146999 | 18:36 | |
El_Che | IO::Socket::SSL | 18:37 | |
jmerelo | That's not the problem. The tests were changed to http-only. But now httpbin redirects to httpbin | ||
El_Che | looks like a missing dep? | ||
(or a broken test that tests it anyway while it knows it's missing?) | 18:38 | ||
jmerelo | you look at the code, it's http. It's changed, well, a couple of hours ago. | ||
El_Che | pinning versions is maybe a good idea | 18:39 | |
jmerelo | El_Che: we did that a few days ago, after tests were changed, if you mean lwp::Simple versions. | ||
El_Che | I mean can lw::simple version be pinned | 18:40 | |
and do this include tests | |||
(not very clear on how perl6 pinning works) | |||
(my impression: badly) | |||
jmerelo | El_Che: it was pinned by me and unpinned later on. It works well, but that's not the problem. We simply need to use another server for testing. And I'm not sure there is any server with HTTP only left | 18:43 | |
18:43
kt__ joined
18:44
kt__ left,
kt__ joined
|
|||
El_Che | jmerelo: start one on localhost? | 18:44 | |
jmerelo | That will have to be the thing, probably. | 18:45 | |
El_Che | cro may have a one liner | ||
18:45
amalia___ left
|
|||
El_Che | - nohup $cro_onliner & | 18:45 | |
jmerelo | El_Che: for a full REST server? | ||
18:45
abraxxa joined
|
|||
El_Che | jmerelo: a rest service can be put in 1 file | 18:46 | |
it is nice | |||
jmerelo | El_Che: there's this modules.perl6.org/dist/PowerNap:cpan:SAMGWISE | ||
El_Che | if you don't want the deps, we could drop a go program as well | 18:47 | |
jmerelo | El_Che: not really. | ||
kt__ | I made my first real submission to: rosettacode.org/wiki/Distributed_pr...ing#Perl_6 | ||
jmerelo | kt__: congrats! | ||
El_Che | jmerelo: if we package Cro in the deb, it's not a biggie anyway | 18:48 | |
kt__++ | |||
lizmat | kt__ : I would have used elsif's for the second/third if | ||
jmerelo | El_Che: it's probably the best if we just add something like this github.com/perl6/perl6-lwp-simple/...-unsized.t to the rest of the http tests | 18:49 | |
lizmat | kt__ ++ # good work ! | ||
El_Che | jmerelo: nice | ||
lizmat | kt__: OOC, why "resonse" instead of "response" ? | ||
18:49
abraxxa left
|
|||
kt__ | lizmat: becasue I cannot spell, and should have uses case and added a delete command | 18:51 | |
lizmat | :-) | ||
Geth | Pod-To-HTML: zoffixznet self-assigned Crash when using node2html with L<> github.com/perl6/Pod-To-HTML/issues/37 1ef6aa072e | (Zoffix Znet)++ | 3 files Fixes github.com/perl6/Pod-To-HTML/issues/37 Otherwise, if the user uses one of the exported routines but never calls pod2html, we end up with Callable:U in the &url which causes an explosion. |
||
18:52
darutoko left
18:54
jmerelo left
|
|||
18:59
aindilis joined
|
|||
Geth | doc/fix-indexing: 128a5f4924 | (Zoffix Znet)++ | htmlify.p6 Remove helper exception catcher |
18:59 | |
El_Che | 19:04 | ||
Geth | doc/fix-indexing: a7fe99b861 | (Zoffix Znet)++ | htmlify.p6 Fix more explosions with nested formatting codes |
19:05 | |
19:06
abraxxa joined
|
|||
kt__ | lizmat: I fixed the spelling error, thanks | 19:20 | |
lizmat | kt_++ | ||
19:21
Kaiepi left
19:23
Kaiepi joined
19:28
abraxxa left
|
|||
lizmat | ++Zoffix # news.perlfoundation.org/2018/04/mar...votes.html | 19:36 | |
19:41
domidumont left
19:50
Kaiepi left
19:51
Kaiepi joined
19:53
Kaiepi left
19:56
aindilis` joined
19:58
aindilis left
|
|||
lizmat | kt_++ # two questions though | 20:01 | |
kt__: in the case of 'dump', shouldn't that also have a 'status' field ? This now gets eradicated | 20:02 | ||
Geth | doc/fix-indexing: 8cf19ccff7 | (Zoffix Znet)++ | htmlify.p6 Textify, not HTMLify X<> guts The rendered stuff still appears to be HTML, but this avoids sticking escaped HTML tags into search box |
||
lizmat | kt_: $msg<function> is more idiomatic Perl 6 than $msg{'function'} | 20:03 | |
Geth | doc: da36e4f71d | (Elizabeth Mattijsen)++ | doc/Language/5to6-perlfunc.pod6 Some more P5 to P6 hints - got to pos |
20:04 | |
synopsebot | Link: doc.perl6.org/language/5to6-perlfunc | ||
buggable | New CPAN upload: P5push-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz | 20:06 | |
20:06
vike left
20:07
Kaiepi joined
|
|||
Geth | doc/fix-indexing: bf6523614a | (Zoffix Znet)++ | doc/Language/operators.pod6 Add subst ops to index |
20:12 | |
20:13
raynold joined,
mcmillhj left
|
|||
Geth | doc: d3db402005 | (Zoffix Znet)++ | 4 files Fix search indexer Fixes github.com/perl6/doc/issues/1894 D#1894 Fixes github.com/perl6/doc/issues/1959 D#1959 Fixes github.com/perl6/doc/issues/1936 D#1936 Fixes github.com/perl6/doc/issues/1922 D#1922 Fixes github.com/perl6/doc/issues/1893 D#1893 ... (10 more lines) |
20:15 | |
synopsebot | D#1894 [closed]: github.com/perl6/doc/issues/1894 [JJ TPF Grant][big][search] Some pages are not indexed. | ||
D#1959 [closed]: github.com/perl6/doc/issues/1959 [JJ TPF Grant][bug] S/// not indexed | |||
synopsebot | D#1936 [closed]: github.com/perl6/doc/issues/1936 [JJ TPF Grant][bug][build] Z operator not found with search | ||
D#1922 [closed]: github.com/perl6/doc/issues/1922 [JJ TPF Grant][docs][search] bitwise operators are hard to find, have no examples | |||
D#1893 [closed]: github.com/perl6/doc/issues/1893 [JJ TPF Grant][search] 'andthen', 'orelse', defined-or (//) missing from search | |||
doc: 452aba1d37 | (Zoffix Znet)++ | app-start Make dev app watch for changes in search.js |
20:16 | ||
comborico1611 | Can someone explain to me what is the purpose of restricting return types to either defined or undefined. Does this mean the variable the sub returns me always have been defined? | 20:17 | |
...the sub returns *must* always have previous been defined. | |||
El_Che | my Str $var | 20:18 | |
lizmat | m: sub a(--> Int:D) { 42 }; a # ok | ||
camelia | ( no output ) | ||
El_Che | it's not defined yet | ||
lizmat | m: sub a(--> Int:D) { Int }; a # ok | ||
camelia | Type check failed for return value; expected return type Int cannot be itself (perhaps returning a :D type object?) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
lizmat | m: sub a(--> Int:D) { Int }; a # NOT ok | ||
camelia | Type check failed for return value; expected return type Int cannot be itself (perhaps returning a :D type object?) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
El_Che | lizmat: while you're at it | ||
lizmat | m: sub a(--> Int:D) { my Int $a }; a # also NOT ok | ||
camelia | Type check failed for return value; expected return type Int cannot be itself (perhaps returning a :D type object?) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
El_Che | can you return a typed List ? | 20:19 | |
lizmat | El_Che: at what ? | ||
El_Che | explaining stuff :) | ||
lizmat | El_Che: I seem to recall that's in NYI / not working correctly area | 20:20 | |
moritz | m: sub a(--> List[Int]) { my Int @a = (1, 2, 3) }; say a() | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> An exception occurred while parameterizing List at <tmp>:1 Exception details: 5===SORRY!5=== Error while compiling <tmp> List cannot be parameterized at <tmp>:1 ------> 3sub a(-… |
||
lizmat | yeah, that's what I tried :-) | ||
moritz | m: sub a(--> Array[Int]) { my Int @a = (1, 2, 3) }; say a() | ||
camelia | [1 2 3] | ||
lizmat | ok, but that's not technically a List :-) | 20:21 | |
20:21
Zoffix joined
|
|||
comborico1611 | lizmat: Is there a difference between 2nd and 3rd one? | 20:21 | |
timotimo | hm, are we going to have typed lists at all? | ||
lizmat | well, one begs to wonder :-) | ||
not sure what overhead that would bring | 20:22 | ||
timotimo | it'll be especially fun when you lazily iterate over a list and suddenly the type check fails inside the iterator and the exception just happens Right There | ||
comborico1611 | Let me ask this, is it rare to use :D :U features? | ||
20:22
rindolf left
|
|||
kt__ | lizmat: I do miss bare words for hash keys. I'm still getting used to the <bareword> for barewords and {$key} for keys. | 20:22 | |
Zoffix | comborico1611: it's nit "defined" it's "DEFINITE", i.e an object instance rather than a type object. | ||
yoleaux | 17:52Z <jmerelo> Zoffix: to remember and refer to the different htmlify.p6 issues when merging | ||
17:56Z <jmerelo> Zoffix: also that [Coke] is working on that same file on coke/build. Far as I can tell, not touching the same lines, but better be aware of that. | |||
Zoffix | s/nit/not/ | 20:23 | |
20:23
Kaiepi left
|
|||
comborico1611 | Zoffix: Thanks! | 20:24 | |
lizmat | kt__: once you get used to it, you never wanna go back :-) | ||
especially when you realize you can also use it for slices | |||
m: my %h = foo => 42, bar => 666; dd %h<foo bar> | |||
camelia | (42, 666) | ||
20:25
Kaiepi joined
20:27
kaare_ left
|
|||
kt__ | lizmat: yes in proper protocal the {"status":""} would be the only required response. I will soon have to make a repo for this rapidly evolving nosql database server. next it will need save and read from disk. push and pop functions | 20:27 | |
20:29
kaare_ joined
|
|||
jnthn | Nice in github.com/perl6/doc/commit/d3db40...8dbc79fe24 how the fix was to delete code - that is, the shorter thing is the more correct one. :-) | 20:29 | |
Zoffix++ | |||
lizmat | m: my %h = a => 42; my %b = b => 666; %h ,= %b; dd %h # kt_ merging 2 hashes | ||
camelia | Hash %h = {:a(42), :b(666)} | ||
kt__ | and I put an excessive amount of #'s to document the code ;) | 20:31 | |
El_Che | lizmat: sorry, I was away | ||
lizmat | m: sub a(--> Array[Int]) { my Int @a = (1, 2, 3) }; say a() # moritz answer, alas, no parameterizable Lists | 20:32 | |
camelia | [1 2 3] | ||
El_Che | so returning a typed array would do? | ||
it looks too specific (I remember that from java) | 20:33 | ||
always return a Generic type | |||
lizmat | m: sub a(--> Array[Int]) { [1, 2, 3] }; say a() | ||
camelia | Type check failed for return value; expected Array[Int] but got Array ($[1, 2, 3]) in sub a at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
lizmat | yeah, but you would have to parameterize the Array | ||
El_Che | I ask because I have multisubs where the the one accepting and returning a List is not type and the one accepting an scalar is (The List one dispatch everything to the scalar one, so everything is type, but not reflected on the signature) | 20:35 | |
20:37
aindilis` left
20:38
mcmillhj joined,
aindilis joined
20:40
rindolf joined
|
|||
lizmat | El_Che: not sure I'm following, show us the code :-) | 20:41 | |
El_Che | lizmat: I am upgrading 3 pc's to the latest ubuntu | 20:42 | |
including this one | |||
not a lot is responsive :) | |||
lizmat | :-) no pb | ||
skids | ,,,, ,»ö«n Have a good weekend all! | 20:54 | |
comborico1611 | skids: You, too! | 21:01 | |
21:03
skids left
21:04
comborico1611 left
21:06
kt__ left,
mcmillhj left
21:18
Herby_ joined
|
|||
Herby_ | o/ | 21:18 | |
21:25
mcmillhj joined
21:27
MasterDuke joined
21:30
mcmillhj_ joined,
mcmillhj left
21:35
mcmillhj_ left
21:36
mcmillhj joined
21:37
HaraldJoerg left
21:38
perler joined,
Herby_ left
21:40
perler left
21:43
athenot left
|
|||
buggable | New CPAN upload: P5readlink-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz | 21:46 | |
21:53
mcmillhj left
22:01
pilne joined
22:03
vike joined
22:07
zachk joined
22:09
guifa joined
|
|||
guifa | Hi everyone. I had a question about using promises. Is there any reason that a promise could permanently stall a program, if when not using them code runs fine? | 22:12 | |
The promises are made in a function that is recursive, so maybe that could be part of the problem, but I'm not entirely sure. | 22:13 | ||
timotimo | you may want to "use v6.d.PREVIEW" to opt in to your code being switched around between threads | 22:14 | |
otherwise every task (i.e. something start-ed) that is awaiting something else would block a "real" thread | |||
the ThreadPoolScheduler can spawn new threads, if it thinks no progress is being made | 22:16 | ||
it does have a limit, iirc | |||
guifa | Is there prebuilt version of the 6.d? Or will I need to install from source for that? | 22:17 | |
timotimo | you don't need to do anything, just put that line in the very beginning of your code | ||
asking for the preview version of 6.d is supported for the last bunch of releases, not sure when it started, but maybe half a year ago? | |||
guifa | I figured as much but it kicked back "No compiler available for Perl v6.d.PREVIEW" | 22:19 | |
timotimo | oh, can you run perl6 --version please? | ||
guifa | Oh, oops. I just realized I'm an idiot and hadn't updated it on this machine in a while =P (I'm at the office and have been doing most work on my home computer) | 22:20 | |
timotimo | well, that's good news :) | ||
better than a nasty bug hiding somewhere | |||
Zoffix | releases: m: use v6.d.PREVIEW; await ^100 .map: { start { await ^100 .map: { start { Promise.in: 1 } } } }; say "done" | ||
timotimo | Zoffix: wouldn't that still take about 100 seconds? isn't that longer than the timeout? | 22:21 | |
committable6 | Zoffix, gist.github.com/643ed693d4d41e2398...6ffda74045 | ||
Zoffix | It'd take 100 seconds | ||
err | |||
1 second | |||
timotimo | i missed a word in the code %) | ||
OK, so it's actually been available for more than a year, nice. | 22:22 | ||
guifa | Gah. My office computer apparently hates me. "This type cannot unbox to a native string: P6opaque, Failure" | 22:24 | |
timotimo | you can try passing --ll-exception to perl6 if you don't get a backtrace for that | 22:25 | |
Zoffix | Also what perl6 version are you using and what's the code that's causing that error? | 22:27 | |
guifa | Zoffix: I just installed now a fresh copy of p6. This is the trace timotimo mentioned: pastebin.com/92zX9nVb | 22:30 | |
timotimo | oh, that's curious. perhaps the compunit repo is stumbling over an incompatible, older format? though i thought it's versioned | ||
Zoffix | guifa: but which version? | 22:31 | |
guifa | 2018.01 | 22:32 | |
Zoffix | guifa: are you on Windows by any chance? | 22:35 | |
timotimo | than looks like osx | ||
Zoffix | yeah, just noticed the paths. | ||
timotimo | the paths to the truths | ||
Zoffix | :) | ||
guifa | OS X 10.13.3 | ||
Zoffix has no idea about the problem | |||
Maybe try nuking precomp... the lib/.precomp or ~/.precomp dir if you have one | 22:36 | ||
Zoffix & | |||
22:36
Zoffix left
22:37
mcmillhj joined
|
|||
guifa | ding ding ding, we have a winner from Zoffix | 22:37 | |
guifa notes to clean out precomp when upgrading | |||
22:41
BenGoldberg joined
|
|||
guifa | So when running it without promises (a) dang it sped up by a lot compared to 2017.01, and (b) it now dies with the error "Segmentation fault: 11" | 22:43 | |
the (b) is when using promises | 22:44 | ||
timotimo | you may be accessing arrays or hashes from multiple threads at the same time without locking | ||
buggable | New CPAN upload: P5seek-0.0.1.tar.gz by ELIZABETH cpan.metacpan.org/authors/id/E/EL/...0.1.tar.gz | 22:46 | |
MasterDuke | i could have sworn there was a recent change to print a link to the web page instead of the tar.gz | 22:47 | |
22:48
mcmillhj left
|
|||
MasterDuke | guifa: you shouldn't have to clean out your .precomp anymore, i believe needing to do that was fixed in the past year or so | 22:48 | |
kt_: this is just a nitpick, but you can probably do `$conn.say <...>` instead of `$conn.print <...> ~ "\n"` | 22:50 | ||
guifa | Hm, each new promise gets its own fresh Array to work with. The only thing that could be accessed by all the threads is my progress indicators. I'll try to commenting out all that and see it runs on sans updates. Is there a quick way to set them up to autolock/unlock? | 22:51 | |
timotimo | no, but maybe you'd be interested in atomic compare-and-swap or increment instead | ||
well, there is OO::Monitors, which give you classes that lock and unlock around method calls + more nice magic | |||
but that's a bit much | |||
i mean it's not a light-weight approach | 22:52 | ||
22:56
rindolf left
22:58
wamba joined
|
|||
guifa | Alright, so I killed any access to variables across threads. Now there's no segmentation faults, but it just stalls out (moar drops suddenly from 370+% CPU to <3) | 22:58 | |
timotimo | gist.github.com/jnthn/25349dee44f2...dbe504c39e - you can drop this code in your code (you'll have to install OO::Monitors with zef for this, however) | 22:59 | |
lizmat | sleep& | ||
timotimo | that'll show you what "await" pieces don't seem to progress | ||
guifa | It shows up quite a few pieces but that's somewhat expected (each promise spawns two more promises, which in turn spawns two more...) | 23:08 | |
When I finally killed it, it was showing 44 pieces | 23:09 | ||
23:09
stan7 joined
|
|||
timotimo | hmm | 23:15 | |
guifa | Actually, I think it was just accumulating previous ones | ||
So I changed the note line to note "There are {@bts.elems} `await`s with age greater than 5 seconds:"; and it went for 44 seconds with one thread, and then made it two seconds with 3 | 23:16 | ||
And then Segmentation faulted | |||
MasterDuke | guifa: can you share the code somewhere so we can try it? | 23:18 | |
timotimo | btw, we should all push the binder stuff more | 23:19 | |
MasterDuke | binder stuff? | 23:20 | |
timotimo | basically hosting for jupiter notebooks | 23:21 | |
with perl6 support by using bduggan's excellent stuff | |||
just look for the perl6 jupyter kernel | |||
on github | |||
there's a little icon fro "binder" or something | |||
there is so much potential in there | |||
also find his talk about this on youtube | |||
guifa | Yes. No judging the the uncleanliness of it, though. One sec and I'll zip it up | 23:22 | |
23:25
skids joined
|
|||
kt_ | MasterDuke: sockets do not have a 'say' method. $conn.write or $conn.print often \n is expected at the end of a message. The print method takes a string so had to use ~ as comma does not work. | 23:30 | |
guifa | drive.google.com/open?id=1geIhsPdZ...tSEcX2Q_Nv | 23:31 | |
MasterDuke | kt_: huh, i would have expected a say method | 23:32 | |
guifa | The main script is called "compare.p6". The problematic parallel methods are at the bottom of lib/DiplDiff.pm6, in diff-bisect-split() | 23:35 | |
MasterDuke | it ran for a while with 1 awaits longer than 5 sec, then 3, then 7, then 8, then 14, then 23, then 42, and now it's been 63 for a while | 23:38 | |
guifa | It seems to want to go up to 46 for me but then it hangs there | 23:41 | |
Is it possible that it's exhausted a thread count and won't create any new threads, and since each previous one relies on newer ones, it's just caught in an intractable waiting period? | 23:42 | ||
timotimo | you can get debug output for that | ||
MasterDuke | maybe, it's not using any cpu | ||
timotimo: how? | 23:43 | ||
timotimo | RAKUDO_SCHEDULER_DEBUG and if you want really much spam also set RAKUDO_SCHEDULER_DEBUG_STATUS | ||
23:44
mcmillhj joined
|
|||
MasterDuke | [SCHEDULER 6138] Will not add extra worker; hit 64 thread limit [branch with 0 total completed] | 23:47 | |
guifa | Hm, guess that's what it is then. | 23:49 | |
23:49
wamba left,
mcmillhj left
|
|||
MasterDuke | same with v6.d.PREVIEW | 23:50 | |
but i haven't had a segv yet | 23:51 | ||
23:51
mtj_ joined
|
|||
guifa | The seg faults have been sporadic for me, sometimes I get them, sometimes it just hangs. | 23:52 | |
Perhaps I can put in a promise limit for that block, and only spawn new ones so long as it's well below the max amount of threads | 23:56 | ||
23:57
mcmillhj joined
|