»ö« 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. |
|||
AlexDaniel | m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56; my %b = %a.map: { .key.lc => .value }; dd %a; dd %b | 00:00 | |
camelia | Hash %a = {:A(1), :B(2), :Ef(56), :cD(34)} Hash %b = {:a(1), :b(2), :cd(34), :ef(56)} |
||
AlexDaniel | m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56; my %b = %a.map: { .key.fc => .value }; dd %a; dd %b # probably | ||
camelia | Hash %a = {:A(1), :B(2), :Ef(56), :cD(34)} Hash %b = {:a(1), :b(2), :cd(34), :ef(56)} |
||
ugexe | now what about when you have A and a? | 00:01 | |
00:01
rba_ joined
00:03
rba__ left
|
|||
AlexDaniel | oh, right | 00:05 | |
m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.categorize({.key.fc}) | 00:08 | ||
camelia | {a => [a => 56 A => 1], b => [B => 2], cd => [cD => 34]} | ||
AlexDaniel | almost | ||
m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.categorize({.key.fc}, as => {.value}) | 00:09 | ||
camelia | {a => [56 1], b => [2], cd => [34]} | ||
AlexDaniel | there | ||
m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.classify({.key.fc}, as => {.value}) | |||
camelia | {a => [56 1], b => [2], cd => [34]} | ||
AlexDaniel | m: my %a = 'A' => 1, 'B' => 2, 'cD' => 34, 'a' => 56; say %a.classify: *.key.fc, as => *.value | 00:11 | |
camelia | {a => [56 1], b => [2], cd => [34]} | ||
00:13
Rawriful left
00:16
rba__ joined
00:17
Actualeyes left
00:18
rba_ left
00:29
ipatrol joined
|
|||
ipatrol | is the named captures syntax actually an interpolated form of assignment, or does it just look that way? | 00:30 | |
00:31
rba_ joined
00:32
Exodist left
00:33
silug left,
Exodist joined,
rba__ left
00:34
Cabanossi left
|
|||
raschipi | ipatrol: It looks like an asignement on purpose, but it's special syntax not really related to asignments. | 00:35 | |
ipatrol | raschipi: I'm not sure if I'm a big fan of it, since it puts the name outside of the group instead of as a flag within it | 00:37 | |
00:37
Cabanossi joined
00:39
pierre_ joined,
ryu0 left,
ryu0 joined
|
|||
ipatrol | in other notes, is there anything we could really call a "Perl 6 editor/IDE" available yet? | 00:40 | |
00:40
pierre_ left,
pierre_ joined
00:41
enheh joined
|
|||
raschipi | There's a plugin for padre and for intelij, I think. Don't know if they are any good. | 00:45 | |
00:46
rba__ joined
00:48
rba_ left
|
|||
ipatrol | raschipi: what about one that gives you an extra pallet for unicode operators? | 00:49 | |
00:50
nuk9 joined
|
|||
raschipi | you mean an on-screen keyboard? I don't think there's any. | 00:51 | |
You don't need to use them anyway. | |||
00:52
pilne joined
|
|||
ipatrol | raschipi: It might be nice to have them anyway. Mathematica does this with a "Basic Math Pallet" to the side of the editor window | 00:52 | |
raschipi | Most people use xcompose on linux, it's an input method that would work for any ide | 00:53 | |
ipatrol | raschipi: yes, but then you have to remember the sequences. I think a pallet would be a nice feature | 00:54 | |
raschipi | Well, I don't think it belongs in the IDE, but go ask them if you think it would be a good feature. | 00:55 | |
00:57
astj joined
|
|||
ipatrol | raschipi: as far as I know, Mathematica is the only other language that by default makes use of Unicode operators (it also has an ASCII syntax for them, FYI). We could do a lot worse than cribbing a few ideas from them :-) | 00:59 | |
teatime | and then there's APL... | 01:00 | |
ipatrol | but that was pre-Unicode, technically | ||
teatime | yar | 01:01 | |
ipatrol | the symbols later got mapped to Unicode codepoints, but by the time that happened, I'm not sure if anyone was even using APL on a production level anymore. | ||
01:02
rba_ joined
|
|||
mspo | hm | 01:03 | |
01:03
rba__ left
|
|||
MasterDuke | ipatrol: i think the closest to an IDE is Atom | 01:04 | |
github.com/perl6/Atom-as-a-Perl6-IDE | 01:05 | ||
01:05
Cabanossi left
01:07
Cabanossi joined
|
|||
Xliff | What is the best way to lowercase all keys in Hash? | 01:12 | |
(Or would I need to create a new hash with lowercased keys?) | |||
Juerd | my @keys = %hash.keys».lc; | 01:13 | |
Xliff | m: my %a = ( 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56 \; my @keys = %hash.keys».lc; dd %a; | 01:14 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Confused at <tmp>:1 ------> 3' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 567⏏5 \; my @keys = %hash.keys».lc; dd %a; expecting any of: infix infix stopper statement … |
||
AlexDaniel | huggable: xy | ||
huggable | AlexDaniel, You want to do X, but don't know how. You think you can solve it using Y, but don't know how to do that, either. So, you ask about Y in order to solve X, which doesn't make sense. You should ask about X. | ||
Juerd | Oh, in the existing hash? Keys can't be changed afterwards. You'd need to create a new hash. | ||
AlexDaniel | Xliff: what are you trying to do? | ||
Xliff | m: my %a = ( 'A' => 1, 'B' => 2, 'cD' => 34, 'Ef' => 56 ); my @keys = %hash.keys».lc; dd %a; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '%hash' is not declared. Did you mean any of these? &hash Hash at <tmp>:1 ------> 032, 'cD' => 34, 'Ef' => 56 ); my @keys = 7⏏5%hash.keys».lc; dd %a; |
||
AlexDaniel | Xliff: I mean, why do you need lowercased keys? | ||
Xliff | Juerd: Yes, exactly. | ||
AlexDaniel: There is no why. I just wanted to if I could do that in perl6. | 01:15 | ||
Juerd | Xliff: So, if you need lowercased keys, why did you put uppercased letters in there in the first place? :) | ||
Xliff | And I think your xy thing is oversimplifying a lot of things. | ||
Sometimes we ask for Y because it is a simplified version of X. | |||
Think golfing. | |||
AlexDaniel | :/ | 01:16 | |
Xliff | Well, here's the whole use case | ||
1) I have a routine with named parameters | |||
01:16
rba__ joined
|
|||
Xliff | But I don't want to create an overly complex signature | 01:16 | |
Mainly because I want flexible usage and that means programmatic parameter validation in-sub. | 01:17 | ||
raschipi | Create a new type that's a hash but lowercases keys. | ||
Xliff | So in that situation, creating a new hash is a valid option. | ||
But then I got sidetracked and wondered if %hash.keys would give me something I could assign to. | |||
And it doesn't. Question answered | |||
AlexDaniel | also, .fc is technically more correct (although you're not going to have unicodey parameters I suppose) | 01:18 | |
Xliff | AlexDaniel: Now that would be ridiculous. ;) | ||
ipatrol | I'd say the only major design difference of opinion I have with perl6, is the fact that subroutine and class identifiers don't generally have sigils | ||
01:18
rba_ left
|
|||
raschipi | They had in Perl4, but it was taken out ages ago. It looks too ugly. | 01:19 | |
ipatrol | because in my experience (Python), that makes it easy for new versions of the language to break old code | ||
raschipi | And remember that in Perl6 there's no difference between built-ins and user-defined. | 01:20 | |
01:21
pierre_ left,
pierre_ joined
|
|||
ipatrol | raschipi: in theory. in practice some operators are "special cased" by the compiler | 01:21 | |
AlexDaniel | Xliff: maybe it'd be a better idea to have a hash with default values, and then just set the values in that hash with whatever you got from the args | 01:22 | |
Xliff | AlexDaniel: Default values is not the issue though. | ||
The names of the arguments are. | |||
raschipi | Having the compiler cheats doesn't mean they're any different. Go look at the code, they have just normal definitions. | 01:23 | |
Juerd | m: class LCHash is Hash { method ASSIGN-KEY(Str:D $key, $val) { nextwith $key.lc, $val }; method STORE_AT_KEY(Str:D $key, $val) { nextwith $key.lc, $val }; method AT-KEY(Str:D $key) { nextwith $key.lc }; method DELETE-KEY (Str:D $key) { nextwith $key.lc } }; my %lch is LCHash; %lch<FOO> = 'bar'; say %lch<Foo>; dd %lch; | ||
camelia | bar {:foo("bar")} |
||
Juerd cringes at the underscores in STORE_AT_KEY... | |||
Xliff | Oooh! | ||
Juerd++ # I was already thinking about that approach. | 01:24 | ||
Juerd | Xliff: I think flexibility in named arguments is a bad design decision. | ||
Xliff | That's not the question I am trying to answer, though. | ||
Juerd | I'd rather have mixed styles between several APIs than within a single API. | ||
[Coke] | bah. looks like another node issue blocking the doc build. | ||
Xliff | What if I am not the person making the design? | ||
ipatrol | raschipi: I don't know how those compiler shortcuts interact with user-defined operators | ||
Xliff | But I want to work with said design (read: add on to) | 01:25 | |
Juerd | Xliff: Then please send the designer my regards and comments. I'll happily discuss the issue with them. | ||
Xliff | :P | ||
01:25
mcmillhj joined
|
|||
Juerd | Grepability is important. Try not to have two names for the same thing. | 01:25 | |
01:25
pierre_ left
|
|||
raschipi | ipatrol: it's not completely implemented yet. | 01:25 | |
Xliff | What is design-appropriate, and the reality are two different things. | 01:26 | |
mspo | I've seen plenty of perl5 code with &sub() | ||
ipatrol | If all operators are simply part of the environment, then it shouldn't be an issue if the user defines an operator that is already a builtin; the later user definition simply overwrite's the language's | ||
Juerd | You're the programmer, you get to fix your part of reality. | ||
Xliff | Juerd: Aaand... now this conversation has devolved into noise. ;) | 01:27 | |
Your points are well received, but it is not the question I asked. | |||
Juerd | Xliff: It was noise when STORE_AT_KEY came along with its underscores, next to ASSIGN-KEY, AT-KEY, and DELETE-KEY which have hyphens... | 01:28 | |
Xliff | And whose fault is that??! | ||
Aren't you a P6 dev? | |||
ipatrol | hey, play nice children ;-P | ||
Juerd | Xliff: I'm not here to answer questions. If I happened to answer your question while trying to have a conversation, then consider yourself lucky :P | ||
Xliff | <Juerd> You're the programmer, you get to fix your part of reality. | ||
Juerd: I do. Believe me. | |||
ipatrol | raschipi: what parts of user-defined operators are still NYI in Rakudo? | 01:29 | |
MasterDuke | ipatrol: you can define your own versions of operators and the builtins will get overwritten (in the lexical scope i believe) | ||
raschipi | ipatrol: macros | ||
Xliff | Should I submit a bug report asking for consistency between STORE_AT_KEY et al. :) | 01:30 | |
01:30
mcmillhj left
|
|||
ipatrol | MasterDuke: assuming none of them are special cased. If any of them are, I don't know what happens | 01:30 | |
raschipi | But traits are already available. | ||
Xliff | (that was semi-joking) | ||
(and how much code would I need to rewrite?) | |||
raschipi | ipatrol: And it's always cheating: it should be transparent or it's buggy. | ||
MasterDuke | Xliff: sure | ||
ipatrol | Xliff: s:g/STORE_AT_KEY/STORE-AT-KEY/ | 01:31 | |
01:32
rba_ joined
|
|||
Xliff | MasterDuke | 01:33 | |
...ask me next week. Pizza is being served!! ^_^ | |||
MasterDuke | heh | ||
01:33
rba__ left
|
|||
ipatrol | raschipi: one of the problems I've noticed that Python had, historically, was that since it forbids variable names from being the same as language operators, which are AYK typically English words, minor versions that were supposed to be backward compatible, weren't, because given a large enough codebase, some variable would inevitably clash with the new operator | 01:35 | |
AlexDaniel | Juerd: I think it is from older times when most things had underscores | ||
Juerd: since then all user-facing things were changed to use dashes, except for some of the internal stuff that you shouldn't use anyway | 01:36 | ||
Juerd: but STORE_AT_KEY is simply a leftover from these times I think | |||
Juerd: maybe ask lizmat about it, or submit a ticket | |||
01:36
Cabanossi left
|
|||
Juerd | m: role TranskeyHash[&transformation] is Hash { method ASSIGN-KEY(Str:D $key, $val) { nextwith transformation($key), $val }; method STORE_AT_KEY(Str:D $key, $val) { nextwith transformation($key), $val }; method AT-KEY(Str:D $key) { nextwith transformation($key) }; method DELETE-KEY (Str:D $key) { nextwith transformation($key) } }; class LCHash does TranskeyHash[*.lc] { }; class UCHash does TranskeyHash[*.uc] | 01:36 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse class definition at <tmp>:1 ------> 3 }; class UCHash does TranskeyHash[*.uc]7⏏5<EOL> |
||
ugexe | m: sub class { 42 }; say class # ipatrol ? | 01:37 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Unable to parse class definition at <tmp>:1 ------> 3sub class { 42 }; say class # ipatrol ?7⏏5<EOL> expecting any of: generic role |
||
Juerd | { }; my %lc is LCHash; my %uc is UCHash; %lc<Foo> = "bar"; %uc<fOo> = "bar"; say %lc<FOo>, %uc<fOO>, %lc.keys, %uc.keys; | ||
Aw shit, doesn't fit on a line | |||
ugexe | m: sub class { 42 }; say class; # ipatrol ? | ||
camelia | 42 | ||
01:38
Cabanossi joined,
pierre_ joined
|
|||
ipatrol | ugexe: ok, that shows the class operator is relatively well-behaved | 01:38 | |
ugexe | it shows user defined operators cant be replaced by newer versions magically | 01:39 | |
01:39
cdg joined
|
|||
Juerd | m: role TKH[&tr] is Hash { method ASSIGN-KEY(Str:D $k, $v) { nextwith tr($k), $v }; method STORE_AT_KEY(Str:D $k, $v) { nextwith tr($k), $v }; method AT-KEY(Str:D $k) { nextwith tr($k) }; method DELETE-KEY (Str:D $k) { nextwith tr($k) } }; class LCHash does TKH[*.lc] { }; class UCHash does TKH[*.uc] { }; my %lc is LCHash; my %uc is UCHash; %lc<Foo> = "bar"; %uc<fOo> = "bar"; dd %lc, %uc; | 01:39 | |
camelia | {:foo("bar")} {:FOO("bar")} |
||
Juerd | ^ golfed to fit on a line. | ||
ipatrol | right, because code in the script itself takes precedence over the implicit code loaded by the interpreter | ||
Juerd | I can think of other useful transformations, such as underscores to kebab case for MIME headers. | 01:40 | |
ipatrol | Juerd: "kebab case" sounds vaguely racist, for some reason :-P | ||
Juerd | ipatrol: What's racist about meat on a skewer? | ||
ipatrol | it's a slur for Turks | 01:41 | |
Juerd | It's also delicious | ||
01:41
mcmillhj joined
|
|||
ugexe | there is a tutorial for http headers | 01:42 | |
docs.perl6.org/language/subscripts...pe_example | |||
01:42
enheh left
01:43
cdg left
|
|||
Juerd | Heh, I probably should have added EXISTS-KEY to my example :) | 01:43 | |
01:45
ilbot3 left
|
|||
ipatrol | A more minor design disagreement: the way the Cool class and the IO role are used | 01:45 | |
01:45
mcmillhj left
|
|||
Juerd | ugexe: I'm not sure HTTP is a good base for such an example, because in HTTP, the same header can be used multiple times (e.g. Set-Cookie) | 01:46 | |
ipatrol | p6: say 'kitten'.atan; | ||
camelia | Cannot convert string to number: base-10 number must begin with valid digits or '.' in '3⏏5kitten' (indicated by ⏏) in block <unit> at <tmp> line 1 |
||
Juerd | lizmat: Do you happen to know why STORE_AT_KEY isn't kebab cased? | ||
01:46
rba__ joined
|
|||
AlexDaniel | greppable6: STORE_AT_KEY | 01:47 | |
greppable6 | AlexDaniel, gist.github.com/a67a16b12e07808765...cc23d2fad6 | ||
AlexDaniel | greppable6: DELETE-KEY | 01:48 | |
01:48
rba_ left
|
|||
greppable6 | AlexDaniel, gist.github.com/4763ee26d33e8f6ab1...e4a609ac79 | 01:48 | |
ugexe | so throw an error if they do that | 01:50 | |
01:51
ilbot3 joined,
ChanServ sets mode: +v ilbot3
|
|||
ipatrol | I know Perl* historically likes to treat various things as interchangeable with strings, but in practice I've found that coercing values to and from strings is often prone to hard-to-debug errors, and I'm inclined to say that such conversions should never be implicit unless a meaningful result is always possible | 01:52 | |
ugexe | so write multi methods with type constraints | 01:54 | |
ryu0 | ipatrol: converting to string is usually non-issue. not so for from so much. | ||
ipatrol | ryu0: yes, most things have some kind of string representation, even if it's only useful for printing messages | 01:55 | |
ugexe | multi method AT-KEY(Str $key) {...} multi method AT-KEY(|c) { ... } | 01:56 | |
ipatrol | ugexe: that doesn't "fix" the builtin methods. Now, one can enforce a coding style where all conversions must be explicitly laid out, and thankfully Perl6 does, of course, support such a system | ||
p6: '3.14159'.Int.tan; | |||
camelia | ( no output ) | ||
ipatrol | p6: say '3.14159'.Int.tan; | 01:57 | |
camelia | -0.142546543074278 | ||
01:57
mcmillhj joined
|
|||
ugexe | you can store objects as hash keys | 01:57 | |
Juerd | ipatrol: I disagree, I used Perl 5 a lot and almost never run into this. The only weird thing in this area is "0" being false, really... | ||
raschipi | say so "0" | ||
evalable6 | True | ||
Juerd | ipatrol: The best (unintended) feature in Perl 5 is also a very hard one if you don't know what you're doing: byte strings and text strings are the same thing and can be used interchangably. I really miss that in Perl 6. | 01:58 | |
Juerd very regularly uses regexes on binary strings of around 100 MB. | 01:59 | ||
Writing the same thing without regexes is a lot of work. | |||
ipatrol | Juerd: Python made the same change in v3 | ||
Juerd: you can't coerce the binary to utf-8? | 02:00 | ||
Juerd | ipatrol: Encoding and decoding would be very slow. | ||
02:01
rba_ joined,
mcmillhj left
|
|||
raschipi | ipatrol: If you want to ensure some variable can only hold Numeric data, declare it Numeric. | 02:02 | |
ipatrol | Juerd: does Perl6 actually need to do any converting to store a byte string as utf-8? | ||
02:03
rba__ left
|
|||
ipatrol | Juerd: only thing to be aware of is that you should use utf8-c8 to avoid hitting problems with invalid byte sequences | 02:05 | |
Juerd | ipatrol: I don't understand the question. What's "storing as utf-8" exactly? And even then I probably couldn't answer your question because I don't know much about Perl 6 internals. | 02:06 | |
raschipi | ipatrol: Str in P6 is normalized and stored in strands, so it doesn't have much in common with a sequence of bytes. | 02:07 | |
ipatrol | Juerd: if they are stored as utf-8, that implies that whatever array in the RAM that the variable ultimately references consists of a sequence of bytes that form the UTF-8 representation of the string | 02:08 | |
raschipi | ipatrol: Perl6 will also create syntetic codepoints to represent utf-8 chords as one single thing. | 02:09 | |
Geth | doc: 357e6e2f18 | (Will "Coke" Coleda)++ | doc/Type/Date.pod6 Fix sample output Closes #1463 |
||
ipatrol | raschipi: do regexes work on Uni objects? | ||
raschipi | Not yet. | 02:10 | |
ipatrol | but they're planned to be? | ||
raschipi | Yes, that's why I said 'yet'. | 02:11 | |
ipatrol | ok, so Juerd just needs to wait for that | ||
02:11
Actualeyes joined
|
|||
Geth | doc: aeddc020bb | (Douglas L. Schrag)++ | doc/Language/operators.pod6 Add documentation of loose xor operator |
02:12 | |
doc: 3186181df0 | (Douglas L. Schrag)++ | doc/Language/operators.pod6 Expand documentation of loose xor Add links in loose or / xor to strict sections Summarize chaining behavior |
|||
doc: 3fc8e26fb6 | (Will Coleda)++ (committed using GitHub Web editor) | doc/Language/operators.pod6 Merge pull request #1460 from dmaestro/xor-operator Add documentation of loose xor operator |
|||
raschipi | No, he will use utf-c8, it's not really difficult. | ||
02:12
mcmillhj joined
|
|||
ipatrol | raschipi: I thought you just said Str does unicode normalization? | 02:13 | |
raschipi | utf8-c8 doesn't. | ||
ipatrol | ah, ok | ||
02:16
rba__ joined
02:17
mcmillhj left
02:19
rba_ left
|
|||
ipatrol | Interestingly, Python 3's `re` module allows regexes to be used on binary data, so long as the pattern is also a binary sequence. | 02:19 | |
raschipi: doing so changes the semantics of some of the operators. Perhaps we could implement an adverb to make a blob regex? | 02:21 | ||
raschipi | ipatrol: Yes, that's the idea, but it's not implemented yet. | 02:22 | |
ipatrol | raschipi: sounds like the setup to a joke | 02:23 | |
"How do you know Perl 6 is the language of the future?" "Because that's when all the best features will be implemented!" | |||
raschipi | Why should implementers concentrate on something Perl5 does well, since one can always call Perl5 code. | 02:25 | |
ipatrol | raschipi: I thought what Perl 5 does well is being a shell replacement | 02:26 | |
raschipi | No, never seen Perl5 work in any way as a shell replacement. | ||
ipatrol | I even compiled it for my wireless router so I can make administration scripts in Perl | ||
02:27
pierre_ left
|
|||
ipatrol | raschipi: not interactively, but for shell scripts | 02:27 | |
raschipi | It's not good as an interactive language. | ||
Perl5 is a multipurpose language. | |||
ipatrol | raschipi: that it is, but that doesn't answer what it's best at | ||
raschipi | Well, where it's "best" is bioinfomatics, just like Perl6 is specially well suited for commercial analysis. | 02:29 | |
ipatrol | the backtick inlining, the -n, -p, and -a switches, the diamond operator, the fact that most file system operations are builtins; to me that suggests a language for system administration and gluing programs together | 02:30 | |
02:30
mcmillhj joined
|
|||
raschipi | It's also good for that, yes. Perl6 is even better as a glue language in my opinion. | 02:31 | |
mspo | perl -00 ++ :) | ||
02:31
rba_ joined
|
|||
ipatrol | raschipi: I'd actually dispute Perl5's suitability for bioinfomatics somewhat. I don't think it's OO enough, which is why Python has been eating away at it in that arena | 02:31 | |
raschipi | It's "eating away" because it's trendy and taught by default. Perl is the exchange format in bioinformatics, just like Tex is the exchange format of math. | 02:33 | |
02:34
rba__ left
|
|||
ipatrol | raschipi: the exchange formats are a set of file formats, none of which have anything to do with Perl or Python. | 02:34 | |
02:34
mcmillhj left
|
|||
raschipi | Nope, if you publish code in an academic setting, it better be in Perl or otherwise everyone will ignore you. | 02:35 | |
02:35
pierre_ joined
|
|||
raschipi | Same thing as math, if it's not in Tex, it might as well not exist. | 02:35 | |
02:35
Cabanossi left,
mcmillhj joined
|
|||
ipatrol | raschipi: no, I think Perl became prominent because at the time of the Human Genome Project, it was the only really mature language that could efficiently process the text-based formats in use at the time like FASTA | 02:36 | |
02:37
Cabanossi joined
|
|||
Geth | doc: 6252e3d6f7 | (Will "Coke" Coleda)++ | doc/Type/Cool.pod6 use OUTPUT: tags |
02:38 | |
doc: 0eb07d333d | (Will "Coke" Coleda)++ | 2 files fix trim usage |
|||
raschipi | Right, so you know what it's good for. | ||
02:38
noganex joined
|
|||
ipatrol | raschipi: yes, it's also very good for text processing, though I think Perl 6 is even better for that | 02:39 | |
02:40
mcmillhj left
02:41
noganex_ left
02:46
rba__ joined
|
|||
ipatrol | I think Perl6 will really excel in the parsing and linguistic realms | 02:48 | |
02:49
rba_ left
|
|||
b2gills | m: class ::('☠') { method state { "DEAD" } }; constant term:<☠> = ::('☠'); ☠.new.state.say | 02:49 | |
camelia | DEAD | ||
02:51
mcmillhj joined
02:54
john_parr joined,
pierre_ left
02:56
mcmillhj left,
mcmillhj joined,
Actualeyes left
03:00
Actualeyes joined
|
|||
ipatrol | raschipi: hey, I have some data to parse where the order of tokens is generally unimportant, but each token when present only has one meaning, and is not used for anything else. What would be a good way to construct a grammar for this? | 03:00 | |
03:01
mcmillhj left
03:02
rba_ joined
03:03
rba__ left
|
|||
raschipi | I don't think a grammar would be the right tool, I would use split to separate the tokens and them put them into a Hash. | 03:04 | |
03:04
Cabanossi left
|
|||
ipatrol | raschipi: the data is such that split would not work. That's why it's defied all my attempts to parse it so far, as it doesn't really lex cleanly | 03:06 | |
03:06
Cabanossi joined
|
|||
ipatrol | I was thinking just go down the list of tokens, s///'ing each of them out | 03:07 | |
03:07
BenGoldberg joined
|
|||
raschipi | right, a grammar would be easier to use, then. | 03:07 | |
ipatrol | raschipi: using the proto-regexen? | 03:08 | |
raschipi | define a grammar with a token rule which has all the tokens as an alternation and a rule TOP that calls for a sequence of tokens. | 03:09 | |
03:11
char_var[buffer] left
03:12
mcmillhj joined
|
|||
ipatrol | raschipi: would having TOP be a single [<proto><ws>?]* work? | 03:12 | |
raschipi | The only thing you need there is to capture it, I think. | 03:13 | |
ipatrol | raschipi: in some cases, I may want to swap the match out with something else | 03:14 | |
03:16
rba__ joined,
mcmillhj left
|
|||
raschipi | right, the match will return a list of tokens and can substitute whatever then. | 03:17 | |
03:18
rba_ left
03:19
Actualeyes left
|
|||
ipatrol | raschipi: since regexes are now considered grammar, does interpolating strings into them still work? | 03:24 | |
raschipi | There's special syntax for it. | ||
03:24
snarkyboojum joined
|
|||
ipatrol | raschipi: and it is...? | 03:25 | |
raschipi | don't remember | ||
ipatrol | raschipi: does it work with the regex operators too? | 03:26 | |
raschipi | yes, why wouldn't it? | ||
03:28
mcmillhj joined
03:31
rba_ joined
|
|||
ipatrol | m: my $patt = <spam camel butterfly>.join('|'); 'camelfly spam' ~~ /$patt/ and say ~$/; | 03:32 | |
camelia | ( no output ) | ||
03:33
rba__ left,
mcmillhj left
|
|||
ipatrol | m: say <spam camel butterfly>.join('|'); | 03:35 | |
camelia | spam|camel|butterfly | ||
ipatrol | m: 'camelfly spam' ~~ /spam|camel|butterfly/ and say ~$/; | ||
camelia | camel | ||
ipatrol | raschipi: evidently it does not | 03:36 | |
raschipi | right, but you're no using the necessary incantations. | 03:37 | |
which I don't remember. | 03:38 | ||
ipatrol | abracadabra? :-P | ||
03:39
cdg joined
|
|||
ipatrol | m: my $patt = <spam camel butterfly>.join('|'); 'camelfly spam' ~~ / <$patt> / and say ~$/; | 03:44 | |
camelia | camel | ||
03:44
cdg left
|
|||
ipatrol | raschipi: found the incantation. It's angle brackets :-P | 03:44 | |
03:45
mcmillhj joined
03:46
rba__ joined
|
|||
ipatrol | presumably it forces the string being referenced to be treated as a regex subrule | 03:48 | |
03:48
rba_ left
|
|||
teatime | m: my @patt = <spam camel butterfly>; 'camelfly spam' ~~ / @patt / and say ~$/; | 03:48 | |
camelia | camel | ||
teatime | I guess I should have renamed @patt to something else. | 03:49 | |
03:49
mcmillhj left
|
|||
ipatrol | teatime: oh that's even more interesting, but where is it documented? | 03:49 | |
teatime | couple of places | 03:50 | |
when you interpolate a string by default it's treated as a literal to match against rather than pattern, as you established | 03:51 | ||
if it's a @ of strings instead it matches like an alternation | |||
03:52
llfourn joined
|
|||
ipatrol | teatime: how can I negate a portion of a regex? | 03:55 | |
teatime | can you give more details / an example | 03:59 | |
ipatrol | teatime: what's the P6 equivalent of (?!pattern) ? | 04:00 | |
*from P5 | |||
04:00
mcmillhj joined
04:01
rba_ joined
|
|||
teatime | (?!pattern) would be negative lookahead, so <!before pattern> | 04:02 | |
ipatrol | ah, ok | ||
teatime | docs.perl6.org/language/regexes is pretty exhaustive, I think. | 04:03 | |
04:03
rba__ left,
Cabanoss- joined,
Cabanossi left
|
|||
ipatrol | teatime: it didn't explain either of those two interpolation tricks | 04:04 | |
04:04
Cabanoss- is now known as Cabanossi
04:05
mcmillhj left
|
|||
ipatrol | teatime: actually, looking at it, it doesn't explain interpolation in regexes at all | 04:08 | |
teatime | fair enough. | 04:09 | |
raschipi | time to sleep, bye everyone | 04:13 | |
04:13
raschipi left
|
|||
ipatrol | teatime: it is described in design.perl6.org/S05.html#Extensib...%3C...%3E) where it says "A leading $ indicates an indirect subrule call. The variable must contain either a Regex object (really an anonymous method--see above), or a string to be compiled as the regex. The string is never matched literally." | 04:13 | |
teatime | yes. | 04:15 | |
ipatrol | teatime: and the array syntax is explained in design.perl6.org/S05.html#Variable...erpolation | 04:16 | |
04:17
rba__ joined
|
|||
teatime | so I'm not 100% sure, but I'm thinking the fact that you interpolated your string into the pattern with < > was kindof an accident | 04:17 | |
like, it doesn't interpolate into the pattern, it is interpreted as a standalone subpattern | 04:18 | ||
and perhaps this is how to say what you really meant: | |||
m: my $patt = <spam camel butterfly>.join('|'); 'camelfly spam' ~~ / <{ $patt }> / and say ~$/; | |||
camelia | camel | ||
ipatrol | teatime: yeah, that's what I said. It coerces it into a subrule | ||
04:19
rba_ left
|
|||
teatime | I think you'll find you don't need/want this behavior as often as you seem to be expecting, though | 04:19 | |
instead of building a pattern up out of strings it's more natural to just build with regex objects / subrules | 04:20 | ||
ipatrol | teatime: I wanted to store the information as a hash, so the list interpolation allows me to use the keys method of the hash to build the regex | 04:21 | |
because I might later move the information out of the code and into a config file | 04:22 | ||
04:23
araraloren_fake joined
|
|||
araraloren_fake | good noon | 04:23 | |
ipatrol | araraloren_fake: you live in East Asia then I take it? | 04:25 | |
araraloren_fake | yeah, in China | ||
teatime | o/ | ||
araraloren_fake | o/ | 04:26 | |
ipatrol | \o/ | ||
araraloren_fake | \o| | 04:27 | |
ipatrol | At work the other day I had a group of 32 Chinese people show up. They were with some company. For where I work, that's a rather large group, so I jokingly asked the lady in charge if she was bringing the whole country with her | 04:29 | |
but anyway, </noise>. So, araraloren_fake, what can we help you with? | |||
04:31
rba_ joined
|
|||
araraloren_fake | no, I'm come here often. | 04:31 | |
04:33
rba__ left
|
|||
araraloren_fake | :) And I can help others, I'm not newbie of Perl 6 | 04:33 | |
teatime lols at the new ⚛ operators | |||
araraloren_fake | What is the atomicint for ? | 04:37 | |
teatime | atomic/safe operations on native ints when multiple threads may be doing the operation | 04:38 | |
don't have to acquire a lock first before making the modification | |||
ipatrol | araraloren_fake: in that case, since I am a newbie, what can you help me with? :-P | 04:39 | |
araraloren_fake | oh, so it's aim for safe operator on native int, not for Perl6 object type ? | ||
ipatrol, :) you can ask me, if I know I'll tell you or where it can found in document. | 04:40 | ||
04:41
mcmillhj joined
|
|||
araraloren_fake | teatime, I see, it's just like a Atomic integer of C/C++ | 04:41 | |
ipatrol | araraloren_fake: ok, how can I set a hash, or else create a custom subtype thereof, that when a key is not found in the mapping, simply returns the requested key as a value? | ||
04:44
Actualeyes joined,
BenGoldberg left
|
|||
araraloren_fake | ipatrol, you can mixin a role with custome AT-KEY method | 04:45 | |
04:45
mcmillhj left
04:46
rba__ joined
|
|||
araraloren_fake | m: my %hash; %hash does role :: { method AT-KEY($key, |c) { return $key unless self.{$key}:exists; nextwith(|c); }; }; say %hash{2}; | 04:48 | |
camelia | 2 | ||
araraloren_fake | It's just like ^^^ | ||
04:48
xtreak joined
04:49
rba_ left
|
|||
ipatrol | araraloren_fake: what does nextwith(|c) do? | 04:49 | |
araraloren_fake | ipatrol, it'll call next method in inheritance chains | 04:50 | |
in there, it'll call same name method AT-KEY of Hash | |||
ipatrol | araraloren_fake: what exactly does the |c stand for? | ||
araraloren_fake | It is a argument Capture | 04:51 | |
m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { return $key unless self.{$key}:exists; nextwith($key, |c); }; }; say %hash{2}; say %hash<f>; | 04:52 | ||
camelia | 2 42 |
||
araraloren_fake | I forget pass $key to nextwith, that's the final version | 04:53 | |
ipatrol | araraloren_fake: so like python's asterisk operator? | ||
araraloren_fake | IDK python | ||
ipatrol | captures a variable number of arguments and returns them as a list | 04:54 | |
04:54
xtreak left
|
|||
araraloren_fake | m: sub foo(|c) { dd c; }; foo(1, 2, "23", :f(3), "z" => "w"); | 04:54 | |
camelia | \(1, 2, "23", :z("w"), :f(3)) | ||
araraloren_fake | ipatrol, it's Capture object here | ||
04:54
xtreak joined
|
|||
araraloren_fake | m: sub foo(|c) { say c.WHAT; }; foo(1, 2, "23", :f(3), "z" => "w"); | 04:55 | |
camelia | (Capture) | ||
ipatrol | which docs say gives you a list for positional arguments and a hash for named ones | ||
04:56
xtreak left
|
|||
araraloren_fake | It's *@ and *% | 04:56 | |
04:56
xtreak joined
|
|||
ipatrol | or a method-based conversion likewise | 04:56 | |
04:57
mcmillhj joined
|
|||
araraloren_fake | m: sub foo(|c, *%nas) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w"); | 04:58 | |
camelia | \(1, 2, "23", :z("w"), :f(3)) {f => 3} |
||
araraloren_fake | m: sub foo(Int, |c, *%nas) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w"); | 04:59 | |
camelia | \(2, "23", :z("w"), :f(3)) {f => 3} |
||
araraloren_fake | m: sub foo(Int, *%nas, |c) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w"); | ||
camelia | \(2, "23", :z("w")) {f => 3} |
||
araraloren_fake | m: sub foo(Int $z, *%nas, |c) { say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w"); | 05:00 | |
camelia | \(2, "23", :z("w")) {f => 3} |
||
araraloren_fake | m: sub foo(Int $z, *%nas, |c) { say $z; say c; say %nas; }; foo(1, 2, "23", :f(3), "z" => "w"); | ||
camelia | 1 \(2, "23", :z("w")) {f => 3} |
||
05:01
Cabanossi left,
mcmillhj left
|
|||
teatime | sooo... there is this giant angry hornet nest (maybe 12" around and 14" tall) that I have to attempt to remove this morning | 05:01 | |
05:01
rba_ joined
|
|||
teatime | once more unto the breach, dear friends | 05:01 | |
05:01
skids left
|
|||
ipatrol | teatime: did you try using smoke? | 05:01 | |
teatime | like a beekeeper? I don't have any equipment like that, heh | 05:02 | |
ipatrol | teatime: all you need is a can with some holes in it | 05:03 | |
05:03
rba__ left
|
|||
ipatrol | araraloren_fake: why is the . needed between self and {$key}? | 05:03 | |
05:04
Cabanossi joined
|
|||
ipatrol | m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { return $key unless self{$key}:exists; nextwith($key, |c); }; }; say %hash{2}; say %hash<f>; | 05:04 | |
camelia | 2 42 |
||
teatime | I wish I had the suit though, I'm pretty scared heh | 05:05 | |
ipatrol | teatime: the other option is to kill them all with chemistry and then remove the thing | ||
teatime | yeah that's the plan | 05:06 | |
ipatrol | if you're fine being fairly unspecific, burning some sulfur in a can underneath the hive will work quite well. Otherwise there are various insecticides, of course. | 05:08 | |
araraloren_fake: I'm not even sure why it worked with the dot. I thought calling obj.{$var} would try to return you a method with the name of whatever $var is once coerced to a strign | 05:09 | ||
*string | |||
araraloren_fake | ipatrol, oh that's like dereference in Perl 5 | 05:10 | |
docs.perl6.org/language/5to6-nutsh...eferencing | |||
ipatrol | araraloren_fake: your version treated self as a reference to a hash, whereas mine treated it as the hash itself | 05:12 | |
05:12
mcmillhj joined
|
|||
araraloren_fake | yeah, cause self is sigilless variable, I prefer dereferencing it and call method on it | 05:14 | |
sigilless variable is not in any context | |||
05:14
xtreak left,
pilne left
05:16
kannan joined,
rba__ joined
05:17
mcmillhj left
|
|||
ipatrol | araraloren_fake: whereas I'm inclined to think of self as representing the actual object | 05:18 | |
05:19
rba_ left
|
|||
ipatrol | m: say Any.defined; | 05:20 | |
camelia | False | ||
ipatrol | m: say Any // 'pie'; | 05:21 | |
camelia | pie | ||
ipatrol | m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { nextwith($key, |c) // $key; }; }; say %hash{2}; say %hash<f> | 05:22 | |
camelia | (Any) 42 |
||
ipatrol | hm | 05:23 | |
05:27
wamba joined
|
|||
araraloren_fake | ipatrol, maybe and the docs said it represent invocant(docs.perl6.org/routine/self). And you can custom the method invocant | 05:27 | |
ipatrol | m: my %hash = {'f' => 42}; %hash does role :: { method AT-KEY($key, |c) { return callsame // $key; }; }; say %hash{2}; say %hash{'f'}; | 05:28 | |
camelia | 5===SORRY!5=== Null regex not allowed at <tmp>:1 ------> 3od AT-KEY($key, |c) { return callsame //7⏏5 $key; }; }; say %hash{2}; say %hash{'f' Other potential difficulties: Useless use of hash composer on right side of hash assignm… |
||
ipatrol | m: my %hash = {'f' => 42}; %hash does role :: { method AT-KEY($key, |c) { return callsame() // $key; }; }; say %hash{2}; say %hash{'f'}; | ||
camelia | Potential difficulties: Useless use of hash composer on right side of hash assignment; did you mean := instead? at <tmp>:1 ------> 3my %hash = {'f' => 42}7⏏5; %hash does role :: { method AT-KEY($ke 2 42 |
||
araraloren_fake | m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { callwith($key, |c) // $k }; }; say %hash<2>; say %hash<f>; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable '$k' is not declared at <tmp>:1 ------> 3T-KEY($key, |c) { callwith($key, |c) // 7⏏5$k }; }; say %hash<2>; say %hash<f>; |
||
araraloren_fake | m: my %hash = f => 42; %hash does role :: { method AT-KEY($key, |c) { callwith($key, |c) // $key }; }; say %hash<2>; say %hash<f>; | 05:29 | |
camelia | 2 42 |
||
ipatrol | m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { return callsame() // $key; }; }; say %hash{2}; say %hash{'f'}; | ||
camelia | 2 42 |
||
ipatrol | I think the braces with a lone pair confused it | ||
araraloren_fake | yeah, call* with return to current method when call over | ||
next* will never return to current method | 05:30 | ||
ipatrol | similar to system versus exec | 05:31 | |
araraloren_fake | yeah | ||
ipatrol | from p5 | ||
araraloren_fake | callsame use same argument of current method, and same like nextsame | ||
05:31
rba_ joined
|
|||
ipatrol | which makes the expression a bit shorter | 05:32 | |
I wonder if the return is actually necessary | 05:33 | ||
araraloren_fake | ipatrol, not necessary | ||
ipatrol | m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { callsame() // $key; }; }; say %hash{2}; say %hash{'f'}; | ||
camelia | 2 42 |
||
05:34
rba__ left
|
|||
ipatrol | yay! a birdie! | 05:34 | |
araraloren_fake | :P | 05:35 | |
ipatrol | why does it think it's a null regex though? | ||
m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { callsame // $key; }; }; say %hash{2}; say %hash{'f'}; | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3 { method AT-KEY($key, |c) { callsame //7⏏5 $key; }; }; say %hash{2}; say %hash{'f' |
||
araraloren_fake | cause // is like a null regex | ||
m: say // | 05:36 | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3say //7⏏5<EOL> |
||
araraloren_fake | m: say /123/; | ||
camelia | /123/ | ||
ipatrol | but I'm using it with two operands and not with a matching operator | ||
m: say Mu // 2; | |||
camelia | 2 | ||
araraloren_fake | callsame is a method name, and //, $key is argument | 05:37 | |
just like `say // $key' | |||
m: say // $key | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3say //7⏏5 $key |
||
ipatrol | so it's putting commas in there? | 05:38 | |
m: say(//,'key'); | |||
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3say(//7⏏5,'key'); |
||
ipatrol | m: say('key'); | ||
camelia | key | ||
araraloren_fake | so you can use say without parentheses | ||
ipatrol | m: say(Mu // 'key'); | ||
camelia | key | ||
ipatrol | m: my %hash = 'f' => 42; %hash does role :: { method AT-KEY($key, |c) { (callsame // $key); }; }; say %hash{2}; say %hash{'f'}; | 05:39 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3{ method AT-KEY($key, |c) { (callsame //7⏏5 $key); }; }; say %hash{2}; say %hash{'f |
||
araraloren_fake | m: say( say // $key )); # like this | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3say( say //7⏏5 $key )); # like this |
||
ipatrol | m: say(&say // 'key'); | ||
camelia | sub say (| is raw) { #`(Sub|36908248) ... } | ||
05:40
pierre_ joined
|
|||
araraloren_fake | yeah, use & get the sub | 05:40 | |
ipatrol | or use () to call it | ||
araraloren_fake | and without & will call it | ||
05:40
cdg joined
|
|||
ipatrol | what does &meth() do? | 05:40 | |
araraloren_fake | m: say; # this will call say | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Unsupported use of bare "say"; in Perl 6 please use .say if you meant to call it as a method on $_, or use an explicit invocant or argument, or use &say to refer to the function as a noun at <tmp>:1 --… |
||
araraloren_fake | m: &say; # this will call say | 05:41 | |
camelia | WARNINGS for <tmp>: Useless use of &say in sink context (line 1) |
||
araraloren_fake | this not | ||
ipatrol | nopu | ||
araraloren_fake | m: &say(); # this will call say | ||
camelia | |||
05:41
rba_ left
|
|||
ipatrol | m: &say('kitten'); | 05:41 | |
camelia | kitten | ||
ipatrol | I prefer "kitten" to "foo" :-P | 05:42 | |
araraloren_fake | m: say &say; | ||
camelia | sub say (| is raw) { #`(Sub|60094056) ... } | ||
ipatrol | or rather, "cat" is foo, and "kitten" is foobar | ||
05:43
mcsnolte left
|
|||
araraloren_fake | haha | 05:43 | |
05:43
pierre_ left,
pierre_ joined
05:45
cdg left
05:48
nadim joined
|
|||
ipatrol | araraloren_fake: can a hash literal contain a trailing comma? | 05:50 | |
m: my %hash = {'cat'=>'kitten','foo'=>'foobar',}; | 05:51 | ||
camelia | Potential difficulties: Useless use of hash composer on right side of hash assignment; did you mean := instead? at <tmp>:1 ------> 3ash = {'cat'=>'kitten','foo'=>'foobar',}7⏏5; |
||
05:51
nuk9 left
|
|||
ipatrol | m: my %hash = {'cat'=>'kitten','foo'=>'foobar',}; say %hash.gist; | 05:51 | |
camelia | Potential difficulties: Useless use of hash composer on right side of hash assignment; did you mean := instead? at <tmp>:1 ------> 3ash = {'cat'=>'kitten','foo'=>'foobar',}7⏏5; say %hash.gist; {cat => kitten, foo => foobar} |
||
ipatrol | m: my %hash = 'cat'=>'kitten','foo'=>'foobar',; say %hash.gist; | 05:52 | |
camelia | {cat => kitten, foo => foobar} | ||
05:52
brrt joined
|
|||
ipatrol | I don't understand why choosing to use the optional braces is considered a "potential difficulty" | 05:52 | |
05:53
araraloren_fake left,
brrt left
05:54
Skarsnik joined
|
|||
Skarsnik | Hello | 05:55 | |
ipatrol | anyway, I need to go to bed. It's like 2AM here. Night all. | 05:56 | |
05:56
ipatrol left
|
|||
Skarsnik | AlexDaniel, did you try connecting some of your bot on ipv6 to bypass the 10 connections limits? | 05:56 | |
05:58
Skarsnik left
06:02
Cabanossi left
06:04
Cabanossi joined
06:12
kannan left
06:14
espadrine joined
06:33
Cabanossi left
06:34
Cabanossi joined
06:36
andrzejku joined
06:43
espadrine left
06:46
ChoHag left
06:53
TEttinger left
06:57
nadim left
06:59
domidumont joined
07:02
astj_ joined,
astj left
07:03
domidumont left
07:05
parv joined,
robertle left
07:07
domidumont joined
07:11
snarkyboojum_ joined,
snarkyboojum left,
snarkyboojum_ is now known as snarkyboojum
07:13
llfourn left,
darutoko joined,
ChoHag joined
07:15
nadim joined
07:28
domidumont left,
domidumont joined
07:36
ChoHag left
07:40
zakharyas joined
07:41
cdg joined
07:42
jferrero left
07:43
wamba left
07:45
cdg left
07:47
dakkar joined
07:48
Dunearhp left,
Dunearhp joined
07:59
mcmillhj joined
08:01
Cabanossi left
08:02
jonas1 joined
08:03
ChoHag joined,
Cabanossi joined
08:04
mcmillhj left
08:06
rindolf joined
08:08
snarkyboojum left
08:15
mcmillhj joined
08:16
melezhik joined
|
|||
melezhik | Hi Perl6 gurus! | 08:16 | |
How can I know the time my script is working at the moment ? | |||
a special variable ... | 08:17 | ||
nadim | docs.perl6.org/routine/now | 08:19 | |
08:21
mcmillhj left
08:22
araraloren_fake joined
|
|||
araraloren_fake | :) | 08:22 | |
08:24
wigner joined,
snarkyboojum joined
08:26
pierre_ left
08:31
melezhik left
08:32
xtreak joined,
mcmillhj joined
|
|||
lizmat | Juerd: I see STORE_AT_KEY as an implementation detail that may not survive in the future | 08:34 | |
yoleaux | 00:43Z <japhb> lizmat: re: rakudo 5db5b1db , couldn't you test for being concrete or being Any? That would only leave the much smaller number of type objects that are Mu but not Any. Not perfect, but an improvement I think. | ||
08:36
pazitiff joined,
snarkyboojum left
08:38
wamba joined
08:39
pierre_ joined,
mcmillhj left
|
|||
lizmat clickbaits p6weekly.wordpress.com/2017/08/21/...ng-atomic/ | 08:42 | ||
araraloren_fake | lizmat++ | 08:48 | |
08:50
ambs joined
08:51
mcmillhj joined
08:54
samcv left
08:58
robertle joined,
mcmillhj left
09:00
samcv joined
|
|||
pazitiff | Hello! | 09:02 | |
09:02
parv left
|
|||
pazitiff | Some useing Perl6 in prodcation? | 09:02 | |
I am just looking to Perl6. Grammars is realy great idea | 09:03 | ||
09:05
nuk9 joined
09:06
xtreak left
09:10
nattefrost joined
|
|||
araraloren_fake | pazitiff, hi | 09:12 | |
09:12
melezhik joined
|
|||
araraloren_fake | yeah, I like Grammar too :) | 09:12 | |
09:13
lowbro joined,
lowbro left,
lowbro joined
|
|||
melezhik | HI nadim: , thanks. I need indeed time elapsed my script has been running , not current time | 09:13 | |
moritz | pazitiff: I'm liking grammars so much that I'm writing a book about them :-) | 09:14 | |
if you want to be informed when it (or other Perl 6 books) come out, sign up for the mailing list at perl6book.com/ | 09:15 | ||
</ad type="blatant"> | |||
melezhik | How to know the time elapsed from the begining till now my script has been running ... ? | 09:19 | |
El_Che | moritz: how far are you on the book? | 09:20 | |
moritz: and aren't you tired from the last one? | 09:21 | ||
moritz | melezhik: now - INIT now | 09:22 | |
melezhik: there's also $*INITTIME | 09:23 | ||
El_Che: I've written about 95 pages in A4 | |||
El_Che | melezhik: or use "time" from the shell | ||
moritz | El_Che: so volume-wise about 80% done | ||
El_Che | moritz: you're inspired | ||
nice | |||
moritz | El_Che: and I had a break during the time that the production team did all their magic | 09:24 | |
El_Che | I have been keeping an eye for your book on safari, not there yet | ||
melezhik | guys, thanks for options, will take a look | ||
El_Che | Think Perl 6 was recently changed from Early Cut to Final | ||
moritz | will there be a Director's Cut also? :-) | 09:27 | |
09:28
lizmat left
|
|||
El_Che | hehe | 09:28 | |
I started browsing the book | |||
(in the hope the author will get paid) | 09:29 | ||
interesting beginners book | |||
moritz | aye; I proof-read the first 100 pages or so | 09:31 | |
(and then got bogged down in my own book) | |||
El_Che | yes, I saw your name there | ||
and liz | |||
09:32
jmerelo joined
|
|||
jmerelo | Hi :-) | 09:33 | |
moritz | \o jmerelo | ||
El_Che | jota-jota | ||
09:34
wigner left
|
|||
jmerelo | @el_che I loved your meta-analysis of the issues in the TPCiA chat :-) | 09:34 | |
moritz | speaking of jmerelo -- yesterday I started creating a docker image for the regexes/grammar book, based on the perl6-alpine docker image | ||
El_Che | jmerelo: haha, I have an audiance | ||
jmerelo | I am having trouble with it now... | ||
El_Che climbs on a box | |||
jmerelo | I am trying to update it to the latest version of Rakudo Perl and it fails to build. | 09:35 | |
moritz: glad it helps :-) If you need anything, just let me now | |||
El_Che | jmerelo: gave alpine a go again, and still ruby-musl problems. Wanted to send a PR for your img to use pkgs (so it builds inmediately). Not there yet | 09:36 | |
moritz | jmerelo: will do, thanks :-) | ||
jmerelo | El_che I don't know if this is related to that. Check out the error: | ||
um | 09:37 | ||
This is the problem twitter.com/jjmerelo/status/899928919570305026 | 09:39 | ||
It core dumps in stage1 | |||
El_Che | mmm | 09:40 | |
jmerelo: I'll sping the new release for my packages and see if I have it as well | |||
jmerelo | Thanks | ||
El_Che | I also have a alpine branch were rakudo gets built, but fails at packaging | ||
09:41
wamba left
|
|||
jmerelo | Here's the Dockerfile github.com/JJ/alpine-perl6/blob/ma...Dockerfile | 09:41 | |
09:41
cdg joined
|
|||
jmerelo | El_che: how does it fail? Size problems? | 09:42 | |
09:43
lizmat joined
09:45
wamba joined
09:46
cdg left
|
|||
Ulti | out of curiosity does anyone here use windows not 10? | 09:49 | |
installing R* and the WWW stuff just worked for me apart from some failing tests unrelated to OpenSSL problems | 09:50 | ||
jmerelo | 2017.01 builds correctly in Alpine. There must be some change after that... | 09:58 | |
El_Che | 2017.07 builds fine on alpine on my side | 10:00 | |
(sorry, I was afk) | |||
jmerelo | Checking that now. No problem. | 10:01 | |
So it must be something in 2017.08 and a completely unrelated thing in v6.c | 10:02 | ||
It's building now in Docker Hub hub.docker.com/r/jjmerelo/alpine-p...yhxpjl22c/ | 10:03 | ||
El_Che | building 2017.07 with travis: travis-ci.org/nxadm/rakudo-pkg | ||
I'll create pkgs if ok | 10:04 | ||
jmerelo | Great :-) | ||
El_Che | I should look into creating release automatically with travis | ||
haven't had the time | |||
jmerelo: I'll run my alpine container manually to here if it build | 10:05 | ||
jmerelo | It does locally. | 10:06 | |
Guess there will be no problem in Docker Hub | |||
El_Che | I am confused. You fixed the 2017.08 build problem? | 10:08 | |
araraloren_fake | Is the last release of rakudo rpm released ? | 10:09 | |
El_Che | Ulti: my ubuntu pkg works on the Linux Subsystem of windows 10. I ran some tests, but don't use win10 much | ||
10:09
nuk9 left
|
|||
El_Che | araraloren_fake: I you refer to 2017.08 and my pkgs, they are being built. If you refer to distro's own pkgs, probably on their "unstable/rawhide/dev" branch. If you mean Rakudo Star, no (the lastest is 2017.07) | 10:10 | |
===SORRY!=== | 10:12 | ||
Found /opt/rakudo/bin/moar version 2017.08, which is too old. Wanted at least 2017.08.1 | |||
agh | 10:13 | ||
again the version mismatch | |||
10:20
Actualeyes left
|
|||
jmerelo | Built new perl6 docker image hub.docker.com/r/jjmerelo/alpine-p...yhxpjl22c/ | 10:20 | |
El_Che: I didn't fix it. I checked it worked with 2017.07, as you said. It's still not working with 2017.08, and I have no idea how to fix it. | 10:21 | ||
araraloren_fake | El_Che, I mean rakudo not Rakudo Star | ||
10:24
xinming_ joined
10:27
xinming left
10:28
xtreak joined
|
|||
stmuk | I believe alpine linux has exec stack protection of some sort, there have been some changes to do with that in .08 so maybe related | 10:28 | |
does dmesg display anything odd? | |||
10:31
xtreak_ joined
10:34
xtreak left
10:36
xtreak_ left
10:37
xinming_ left
10:39
xinming joined,
cdg joined
10:40
leont joined
10:42
sena_kun joined
10:44
cdg left,
DarthGandalf joined
|
|||
sena_kun | arnsholt, ping. | 10:44 | |
10:51
cog_ joined
10:54
masak left,
brimonk left,
masak joined,
epony left,
shadoxx_ joined,
shadoxx left,
masak is now known as Guest34959,
cognominal left,
cosimo left
10:55
brimonk joined,
itaylor57 left
10:56
cosimo joined
10:57
Voldenet left
11:00
jmerelo left,
john_parr left,
maettu left,
maettu joined,
jmerelo joined,
El_Che left,
incredible left,
El_Che joined
11:01
leedo_ left,
kubrat left,
leedo_ joined,
teatime left,
pm51 left,
cgfbee left,
tinita left,
teatime joined
11:02
pm51 joined,
tinita joined,
eythian left,
Voldenet joined,
Voldenet left,
Voldenet joined
11:03
kubrat joined
11:05
incredible joined,
cgfbee joined
11:07
eythian joined
11:09
leont left
|
|||
jmerelo | stmuk: I would have to check from the Docker image itself. What kind of things should I look for? | 11:14 | |
11:26
leont joined
|
|||
El_Che | jmerelo: rakudo 2018.08 build fails on alpine (this is new), and builds fine on other distors | 11:26 | |
distros | |||
11:26
rindolf left
|
|||
jmerelo | Timo is telling me in Twitter that there seems to be a problem with that particular version. | 11:27 | |
2018.08.1 should be available soon. | |||
s/2018/2017/ | |||
El_Che | jmerelo: gist.github.com/nxadm/ea6a2aa2965c...2d1dd7353a | ||
jmerelo | Correct, same problem I had. | 11:28 | |
El_Che | it does build fine however on Ubuntu, Debian, Fedora and Centos: travis-ci.org/nxadm/rakudo-pkg/builds/267123623 | ||
jmerelo: I am building again moarvm 2018.08.1 | 11:29 | ||
11:30
pierre_ left,
lizmat left
|
|||
jmerelo | I had a problem also with building latest version in ubuntu 14.04 github.com/tadzik/rakudobrew/issues/119 | 11:30 | |
timotimo | jmerelo: 2017.08.1 is already available | 11:31 | |
in git | |||
AFAIK rakudobrew doesn't build from tarballs | |||
El_Che | timotimo: rakudo 2017.08.1 or moarvm? | ||
timotimo | moarvm | 11:32 | |
jmerelo | does not show up in rakudobrew list-available. Which might be my fault, since that part of rakudobrew is mine... | ||
timotimo | rakudo 2017.08 should depend on moarvm 2017.08.1 | ||
El_Che | timotimo: in that case, it doesn't fix it | ||
timotimo: my output is with that version | |||
11:32
haukex joined,
haukex left
|
|||
timotimo | where do i have to look for the output? | 11:33 | |
El_Che | 13:27 < El_Che> jmerelo: gist.github.com/nxadm/ea6a2aa2965c...2d1dd7353a | ||
timotimo | thanks | ||
El_Che | I can paste a larger part if needed, shell still open | ||
timotimo | can you also get moar --version? | ||
11:35
zakharyas left
11:37
ggoebel left
|
|||
timotimo | what do i do on my local docker to get the same exact setup you have? | 11:37 | |
stmuk | jmerelo: errors about stack something or other | 11:38 | |
jmerelo | stmuk: errors are not too informative. Just the line and an error code. But I'll look for that if I can find it. Thanks! | 11:39 | |
El_Che | timotimo: do you want to build one from a Dockerfile or do you want one from the hub? | 11:40 | |
stmuk | oh alpine doesn't use glibc either | ||
timotimo | whatever lets me go in there and run the command via gdb | ||
so i can figure out why it segfaults | |||
11:41
melezhik left
|
|||
stmuk | " it appears that Alpine Linux (and specifically the musl-libc library it uses) has a very limited stack size by default" | 11:42 | |
El_Che | timotimo: gist.github.com/anonymous/bd1e3572...54eed8c1e7 | 11:44 | |
11:44
basket left
|
|||
timotimo | El_Che: need to switch the checkout and the cd :) | 11:46 | |
11:46
jmerelo left
|
|||
El_Che | timotimo: if you create the alpine container (skip the create pkg command) from the gist, you can just do: docker run -ti --rm --entrypoint=/bin/bash rakudo/pkgrakudo-alpine-amd64 | 11:46 | |
from there you can do the needed steps manually | 11:47 | ||
timotimo | the "create pkg command" is "pkg_rakudo.pl"? | ||
El_Che | that's a wrapper for passing the version information to the packager script in the image | 11:48 | |
timotimo | mhm | ||
El_Che | github.com/nxadm/rakudo-pkg/blob/3...64-3.5#L21 | ||
that copy there puts "pkg_rakudo" in the / of the image | |||
with the download and build instructions | |||
github.com/nxadm/rakudo-pkg/blob/a...pkg_rakudo | 11:49 | ||
11:49
ggoebel joined
|
|||
El_Che | it's a just simple distro-agnostic script that download the sources, compiles them and packages them | 11:50 | |
timotimo | i can't do the docker run command | ||
"Unable to find image 'rakudo/pkgrakudo-alpine-amd64:latest' locally" | |||
El_Che | yes, you need to build it first | ||
timotimo: let us do something else | |||
I'll prepare an image with the sources in place and gdb | |||
timotimo | i ran create_container.pl, shouldn't that do it? | 11:51 | |
El_Che | upload it to the docker hub and let you run that | ||
timotimo: yes, it should | |||
timotimo | Successfully built 3dc7ded9a64f | 11:52 | |
Successfully tagged rakudo/pkgrakudo-alpine-amd64:3.5 | |||
i probably have to put the version at the end to be able to ues it? | |||
El_Che | yes | ||
timotimo | that was easy | ||
the tarball for moarvm's point release is already up, btw | 11:54 | ||
i can't run it under gdb: warning: Error disabling address space randomization: Operation not permitted | 11:56 | ||
During startup program terminated with signal SIGSEGV, Segmentation fault. | |||
El_Che | yes | ||
musl | 11:57 | ||
I think stmuk commented about that a few weeks ago | |||
(the randomization stuff, not gdb) | |||
timotimo | oh, docker threw everything i did away, okay | 12:00 | |
is that what --rm odes? | |||
El_Che | timotimo: I created a sandbox for you: | 12:02 | |
docker run -ti nxadm/timoalpine bash | |||
in the container you can run /pkgrakudo with no params | |||
timotimo | too late, i'm already in gdb now :) | ||
El_Che | it will download the rakudo, nqp and moarvm dists and unpack them on / | 12:03 | |
then you can build them however you like it | |||
12:04
leont left
|
|||
timotimo | i wonder if rr works inside there | 12:04 | |
El_Che | apk is your friend if you need extra packages | 12:05 | |
12:05
ggoebel left
|
|||
timotimo | yup | 12:05 | |
apk doesn't have rr though | |||
El_Che | and --rm, yes ;) | ||
timotimo | #0 0x00007ffff7d95dc6 in malloc () from /lib/ld-musl-x86_64.so.1 | 12:06 | |
#1 0x0000000000000000 in ?? () | |||
fantastic backtrace | |||
El_Che | timotimo: while you're at it, fix the fpm crash so I can create rakudo packages on alpine :) | 12:07 | |
(to illustrate that a lot of soft seems to have trouble with musl) | |||
timotimo | i'm running it through valgrind right now | 12:09 | |
that'll potentially take a long while | |||
12:10
wigner joined
|
|||
timotimo | ==3532== Bad permissions for mapped region at address 0x4089F68 | 12:11 | |
==3532== at 0x54DD1C6: build_cfg (graph.c:102) | |||
the what now? | |||
12:16
raschipi joined
12:18
P6steve joined
|
|||
timotimo | well, gdb recording is out | 12:18 | |
araraloren_fake | Why I can use `is export` on variable declared with my, but can apply it on `my sub` ? | ||
12:18
wigner left,
ggoebel joined
12:19
colomon joined
|
|||
moritz | araraloren_fake: are you missing a negation somewhere in there? | 12:19 | |
timotimo | [Inferior 1 (process 3541) exited normally] | 12:20 | |
graaahhh | |||
araraloren_fake | m: module Foo { my $x is export; }; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Can't apply trait 'is export' on a my scoped variable. Only our scoped variables are supported. at <tmp>:1 ------> 3module Foo { my $x is export7⏏5; }; expecting any of: constrain… |
||
araraloren_fake | m: module Foo { my sub x() of Int is export { 42 } }; | ||
camelia | ( no output ) | ||
araraloren_fake | moritz, I'm not get you mean | 12:21 | |
colomon | is there a way to get the process’s exit code from Proc::Async? I need to figure out how to detect it when the process segfaults… | 12:22 | |
jnthn | colomon: the Promise returned by .start will be kept with an object that has a .exitcode method | ||
araraloren_fake | or maybe can someone explain something about symbol table of PACKAGE ? | 12:23 | |
I notice this question talk about some about public symbol table of PACKAGE: stackoverflow.com/questions/457701...-namespace | 12:24 | ||
Is there a private symbol table ,or it called lexical symbol table ? | |||
timotimo | "lexical pad" usually | ||
araraloren_fake | oh lexical pad, I got it | 12:25 | |
so we can too table or pad. But I can not get why we can export a sub declared with my? | 12:26 | ||
timotimo | El_Che: a quick google search shows how the alpine people patched mpd to set the stack size to 1024*1024 for threads created with pthread_create | ||
El_Che: they used to get the exact same error, now they don't any more | |||
araraloren_fake | s/too/two/ :) | 12:27 | |
moritz | araraloren_fake: in first approximation, scoping and exporting are orthogonal | ||
12:27
wigner joined
|
|||
araraloren_fake | yeah, I see | 12:28 | |
El_Che | timotimo: I can bump the image to 3.6 | ||
should be out by now | |||
12:29
domidumont left
|
|||
colomon | jnthn: is there an example for it somewhere? I am having a hard time figuring out how to make it work. | 12:32 | |
timotimo | libuv has a piece of code to set the stack size to RLIMT_STACK when creating a new thread | ||
maybe this is necessary on alpine linux as well for whatever reason? | 12:33 | ||
12:33
zakharyas joined,
Cabanossi left
12:34
Cabanossi joined
|
|||
jnthn | colomon: say (await $proc.start).exitcode | 12:34 | |
timotimo | El_Che: how do you feel about patching moarvm for the alpine image? | 12:35 | |
12:35
pazitiff left
|
|||
El_Che | timotimo: docker run -ti nxadm/pkgrakudo-alpine-amd64:3.6 bash | 12:35 | |
timotimo: as long as I cant get fpm to create packages, it won't do much | 12:36 | ||
12:36
OtherNick joined
|
|||
timotimo | ? | 12:36 | |
El_Che | timotimo: I think jj merelo is closer to the issue | ||
12:36
OtherNick left
|
|||
El_Che | timotimo: jjmerelo's image == rakudo on alpine | 12:36 | |
mine == an alpine image for creating alpine packages. The package part does not work yet as fpm as trouble as well | 12:37 | ||
in short, my img is a short-live build environment for native packages | |||
timotimo | ok i have the image, where's th sources? | 12:38 | |
El_Che | timotimo: but If you want me to patch that image, sure | ||
timotimo | i mean literally include a piece of C code in there | ||
El_Che | This are my images: github.com/nxadm/rakudo-pkg/tree/master/docker , this is jj's: github.com/JJ/alpine-perl6/blob/ma...Dockerfile | 12:39 | |
timotimo | i mean i'm inside the image, where are moar, nqp, and rakudo extracted to? | ||
El_Che | root | ||
/ | |||
timotimo | i only see the three scripts there for zef and pkg_rakudo | 12:40 | |
El_Che | ok | ||
in the regular image you need to run pkg_rakudo with env variables | |||
timotimo | oh | ||
El_Che | on the one I built from you I hardcoded those | ||
so it downloaded and extracted them automatically | 12:41 | ||
but that was 3.5 | |||
do you want me to create one like that for 3.6? | |||
colomon | jnthn++ | ||
timotimo | what do i need REVISION for? | ||
colomon will figure this out sooner or later. | |||
El_Che | put 01 | ||
it's a pkg thing | |||
timotimo | ok | 12:42 | |
El_Che | you can repkg the same version of the software with changes on the pkg | ||
12:43
AnotherNick joined
12:44
AnotherNick left
12:45
Ven`` joined
12:46
lizmat joined,
AnotherNick joined
|
|||
timotimo | i don't think libuv lets us tell them a stack size | 12:47 | |
Ven`` | twitter.com/coetry/status/896169863684792320 if coetry comes around, he might want to check out #6macros :). | ||
timotimo | so we'd have to patch 3rdparty/libuv inside the alpine package | ||
12:47
domidumont joined,
leont joined
|
|||
colomon | jnthn: so it’s the .result of the Promise which has an exitcode, yes? | 12:48 | |
jnthn | Yes | ||
colomon may be starting to undertand | |||
\o/ | |||
El_Che | timotimo: that's ok for a self contained pkg as mine (if I fix the ruby prob), but distro's won't like tha | ||
t | |||
12:48
AnotherNick left,
AnotherNick joined
|
|||
timotimo | "distros"? | 12:49 | |
oh | |||
El_Che | alpine, debian, centos | ||
timotimo | well, alpine will have to Deal With It | ||
El_Che | they don't like the include-3rd-party-libs | ||
timotimo | or offer us a magical stack compression library or something | 12:50 | |
El_Che | yeah, my enthousiasm for alpine (see, 5mb images!) is somewhat cooled | ||
timotimo | i don't even think reducing default stack size for new threads helps with making small images | 12:51 | |
El_Che | no, that's unrelated | ||
timotimo | well i guess it makes programs a little bit smaller? if they only ever use a kilobyte of the stack for every new tread | ||
Ven`` | well if they're OS threads, then they're a least a page big | ||
El_Che | I mean the idea of small images is very nice until you meet real world apps | ||
Ven`` | .oO( Always detect EVAL ) |
12:52 | |
timotimo | with MVM_SPESH_DISABLE=yes i can build nqp, but it won't test because "prove" is not installed | ||
that's only a matter of a single apk add, though | |||
how do i ask apk what package provides a given binary? | 12:53 | ||
oh, second google search result | |||
12:53
mcmillhj joined
|
|||
timotimo | apkfind() {wget -q --no-check-certificate -O - pkgs.alpinelinux.org/contents\?file=$1 | sed -e '1,119d' -e '/panel-footer/,$ d' -e 's/]*>//g' -e 's/\&\#x2F\;/\//g' -e '/^ *$/d' | xargs -n 5 | awk '{ printf("%-20s %-7s %-11s %-13s %s\n",$2,$3,$4,$5,$1)}' } | 12:53 | |
Operations | |||
cool. | |||
El_Che | oh crap | ||
Ven`` | beautiful, glorious sed. | 12:54 | |
timotimo | that output is disgusting | 12:55 | |
12:55
nuk9 joined
|
|||
timotimo | it's perl-utils | 12:56 | |
12:58
DarthGandalf left
|
|||
timotimo | El_Che: looks like spesh is the only thing that blows the stack limit, and you can just disable that and still build your packages | 12:58 | |
El_Che | timotimo: I am stuck at the packaging level. Until this release, rakudo built fine on alpine. | 12:59 | |
timotimo: jjmerelo is stuck on his rakudo img | |||
the question is why this release needs the workaround and previous don't | 13:00 | ||
timotimo | spesh changed significantly between the previous and the current release | ||
it got pushed to its own thread | |||
i'll tweet our results at him | 13:01 | ||
13:02
cosimo left
13:03
Cabanossi left,
Cabanossi joined,
cdg joined
|
|||
jnthn | Also, basic block walking recurses on the C stack, and spesh graphs split up into more basic blocks, so it can end up deeper. There's an upper limit on the code size we'll specialize. | 13:06 | |
But it assumes a stack size of around a meg | |||
lizmat | seems like someone referred to the latest P6W on HN: news.ycombinator.com/item?id=15071037 | ||
no comments yet, though | 13:07 | ||
:-) | |||
raschipi | Reddit has comments: www.reddit.com/r/perl6/comments/6v...nd_perl_6/ | ||
13:08
cdg_ joined
13:09
cosimo joined
13:10
cdg left
|
|||
ilmari | nobody tell tektektektektek that all ASCII characters are UTF-8... | 13:13 | |
nor that "UTF-8 character" isn't a thing, for that matter | 13:14 | ||
timotimo | jnthn: it already crashes inside build_cfg :) | 13:15 | |
at least it looked like it from valgrind's output | |||
jnthn | timotimo: haha | ||
Wow | |||
I wonder what recurses there | 13:16 | ||
timotimo | i wonder if the interp_run stackframe is a big part of the blame | ||
why is that even on there for just the spesh worker? :P | |||
colomon has rebuilt his crash testing script to recognize the difference between crashes, hangs, returned no output, and success. o/ | |||
timotimo | initial_invoke, surely | ||
jnthn | timotimo: Just so we can have it set up as a normal thread | ||
timotimo: So it plays the same way with GC as everything else | 13:17 | ||
It's hard enough to get threads and GC right without two kinds of thread :) | |||
It's possible we could still have that and avoid the run stack frame though | |||
Just was expedient to do it this way | |||
timotimo | right | 13:19 | |
i'm still not sure how big the stackframe for interp_run even is | 13:20 | ||
probably not terribly bug | |||
big* | |||
13:23
gfldexwork joined
|
|||
jnthn | Dunno | 13:23 | |
timotimo | hey google, how do i measure stack frame size? - here's a whole bunch of info about how to find the right sized bike for you | ||
jnthn | Anyway, time to start heading towards Switzerland... | ||
o/ | |||
13:23
gfldexwork left
|
|||
timotimo | have a good trip! | 13:24 | |
AlexDaniel | .tell Skarsnik ipv6 or not, how would I choose the ip unless the ticket is resolved? | ||
yoleaux | AlexDaniel: I'll pass your message to Skarsnik. | ||
timotimo | oooh -fstack-usage | 13:28 | |
13:29
wamba left,
DarthGandalf joined
13:34
pierre_ joined
|
|||
timotimo | interp_run: 1312 dynamic,bounded | 13:35 | |
bounded means that number is a reliable upper limit | 13:37 | ||
leont | I should have finished my PR Before 2017.8 came out :-/ | 13:40 | |
lizmat | leont: there's always 2017.09 ? | ||
leont | Can't make TAP::Harness parse subtests until Test.pm outputs them correctly, there's a chain effect :-/ | 13:42 | |
fg | 13:44 | ||
Test::_diag looks rather optimized (I mean, it's using nqp directly), and I'm not sure how to fix the issue without unoptimizing it | 13:50 | ||
The easiest way is just to remove the empty-line-removing line entirely | 13:51 | ||
Geth | doc: 36251c6ecf | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6 List Texas atomics - Create a separate table (following format of the first one with all the ops got kinda messy) P.S.: Some of the subs appear to be undocumented P.P.S: the docs for Texas/Unicode versions are duplicated; Wouldn't be easier to just list both variants with one description? P.P.S.: Shouldn't ⚛+= and ⚛-= be called atomic-add-assign and atomic-sub-assign instead of atomic-add-fetch and atomic-sub-fetch, since ⚛= is atomic-assign, not atomic-fetch, which is just prefix:<⚛> |
13:54 | |
13:54
domidumont left
13:56
raiph joined
13:57
skids joined
13:58
lizmat left,
domidumont joined
14:00
epony joined
|
|||
Ven`` | I love it. | 14:01 | |
araraloren_fake | :) | 14:02 | |
Geth | doc: e5cadaedaa | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6 Remove accidentally duped line |
14:03 | |
14:03
ShalokShalom joined
|
|||
nadim | What's the format of the rakudo release tags that are considered stable? yyyy.mm(.v)? | 14:03 | |
moritz | that is the format of release tags | 14:04 | |
we don't have a separate syntax for those we consider "stable" | |||
nadim | release is good enough | ||
moritz | that's something that we typically can only tell after the fact | ||
nadim | :) | ||
El_Che | ha | 14:05 | |
14:06
Skarsnik joined
|
|||
Skarsnik | Hello | 14:06 | |
yoleaux | 13:24Z <AlexDaniel> Skarsnik: ipv6 or not, how would I choose the ip unless the ticket is resolved? | ||
Skarsnik | AlexDaniel, if you put a ipv6 addr as dest it will be forced to use an interface with an ipv6 addr on it | 14:07 | |
araraloren_fake | Skarsnik, Hello | ||
timotimo | can you also supply an interface name that way? | ||
Skarsnik | I am not 100% sure. but I am pretty sure that will work | ||
timotimo | or is that for outgoing addresses? | ||
AlexDaniel | Skarsnik: oh, so I can double the amount of bots by simply connecting to different hosts? | ||
Skarsnik | I don't think you can bind your socket on a an interface | 14:08 | |
14:08
rindolf joined
14:09
cosimo left
|
|||
Skarsnik | AlexDaniel, it's my guess since I can't bind a socket on a ipv4 address if I try to connect to a ipv6 address | 14:09 | |
14:09
newb2 joined
|
|||
AlexDaniel | I'll try it now | 14:09 | |
El_Che | new linux packages: github.com/nxadm/rakudo-pkg/releas...ag/2017.08 | ||
Xliff | I'm bored. Can someone suggest a Perl6 project to work on? | 14:10 | |
14:10
cosimo joined
|
|||
Skarsnik | (I have to go somewhere in 5 min, I will check more later) | 14:10 | |
timotimo | Xliff: how do you like Terminal::Print? | ||
Xliff | I've worked with Terminal::Print /some/ | ||
moritz | Xliff: you could implement <commit> in regexes. That would be very helpful :-) | 14:11 | |
Xliff | moritz: Linky? | ||
I think that might be a bit more than I can chew, atm | |||
Plus, I have not found a good way to test nqp changes in rakudo. | |||
THAT would be good to know, TBH | 14:12 | ||
moritz | Xliff: design.perl6.org/S05.html search for <commit> | ||
timotimo | bailador is getting a bunch of attention & traction, perhaps that's interesting to you? | ||
with <commit> you can alreday test it in nqp without building rakudo | |||
Xliff | timotimo: That also is on my roadmap. | ||
timotimo: Ah. I will look into how to do that. Any hints? | |||
14:14
quotable6 joined,
ChanServ sets mode: +v quotable6
|
|||
newb2 | I want to import Readline.pm from drforr/perl6-readline into the perl6 RPL but | 14:14 | |
14:14
quotable6 left,
quotable6 joined,
statisfiable6 joined,
ChanServ sets mode: +v statisfiable6
|
|||
AlexDaniel | Skarsnik: it works XDDD | 14:15 | |
Xliff | Re: <commit> -- Ah... such a small description implies such.... complexity. :P | ||
So a <commit> assertion accepts either a Code block or a string argument? | 14:16 | ||
AlexDaniel | anyway, time to update rakudo… | ||
AlexDaniel hides | |||
14:16
Actualeyes joined,
committable6 left,
evalable6 left,
releasable6 left,
quotable6 left,
statisfiable6 left,
greppable6 left
|
|||
Xliff | AlexDaniel: I just did that. LOL! | 14:16 | |
timotimo | Xliff: i don't know :< | 14:17 | |
Xliff | Are there test cases written for <commit> ? | ||
AlexDaniel | Skarsnik: (‘chat.freenode.net’, ‘185.30.166.38’).pick # :D | ||
Xliff | S05 isn't anywhere near as clear on it. | ||
Ven`` | wasnt <commit> spelt :: ? | ||
I think we had :, :: and :::. I remember FROGGS talking about it | |||
AlexDaniel | Skarsnik: now the limit is effectively 20 bots, so I have some room for 8 more or something | 14:18 | |
Xliff | I am working on the "<commit>" assertion, as written between quotes. | ||
newb2 | I want to import Readline.pm from drforr/perl6-readline into the perl6 REPL for testing | ||
14:19
silug joined
|
|||
newb2 | but "use lib '/home/cvs/.zef/tmp/perl6-readline.git/lib'; use Readline" hangs up on the 2nd use pragma | 14:19 | |
So obviously there's something here Cover looked | |||
.. here I overlooked | 14:20 | ||
timotimo | you are using "zef look"? | ||
newb2 | PS it doesn't work as a perl6 script either | ||
OK will try .. | |||
timotimo | no, don't | ||
newb2 | OK | 14:21 | |
timotimo | the REPL will try to load readline itself to provide line editing if it's installed | ||
14:21
bloatable6 joined,
ChanServ sets mode: +v bloatable6,
quotable6 joined,
evalable6 joined,
coverable6 joined,
committable6 joined,
ChanServ sets mode: +v evalable6,
ChanServ sets mode: +v coverable6,
ChanServ sets mode: +v committable6,
bisectable6 joined,
releasable6 joined,
greppable6 joined,
unicodable6 joined,
benchable6 joined,
ChanServ sets mode: +v benchable6,
statisfiable6 joined,
pierre_ left
|
|||
newb2 | yes but Iwant to do testing | 14:21 | |
timotimo | i'm not sure if it'll work to load readline inside the repl, because you'll be using a readline inside a readline | ||
newb2 | such as adding or changing bindings or setting vars | 14:22 | |
Xliff | Ven: If I am reading this correctly: "::", "::>" and ":::" have to do with alternation. | ||
14:22
wamba joined
|
|||
timotimo | the REPL is quite wobbly in general. if at all possible, you should prefer a script somehow | 14:22 | |
newb2 | Right - but it also doesn't work with a regular p6 script | ||
timotimo | gotta go AFK for a bit | ||
newb2 | check | ||
AlexDaniel | Skarsnik: thanks :) | ||
newb2 | So my question is "if the module is in the directory from the use lib statement | 14:23 | |
14:23
lizmat joined
|
|||
newb2 | which returns nil - what does that mean? | 14:23 | |
14:23
pierre_ joined,
pierre_ left
|
|||
newb2 | then why does it hang up on 'use Readline'? | 14:23 | |
14:23
Kyo91 joined
|
|||
newb2 | INSIDE a script | 14:23 | |
timotimo | you can set the RAKUDO_MODULE_DEBUG (or something?) environment variable and see what it tries at the time it starts hanging | 14:24 | |
newb2 | SHOULD "use lib '/home/cvs/.zef/tmp/perl6-readline.git/lib'; use Readline" work unless I have made a typo? | 14:25 | |
From inside a script? | 14:26 | ||
OK time will try ... | |||
s/time/tim/ | |||
moritz | uhm, did you install it? | 14:27 | |
newb2 | "zef install' | ||
moritz | then you shouldn't need a "use lib..." | ||
newb2 | but it's placed in a ~/.zef directory NOT in the expected path | 14:28 | |
moritz | that's where the sources are | ||
14:28
andrzejku_ joined
|
|||
moritz | installing it should place it in other places too, potentially with file names you wouldn't expect | 14:28 | |
newb2 | OK so when I do 'find / | grep Readline.pm" that's the only thing that is found | 14:29 | |
AHA so how would I find it and what difference does it make if I do 'use lib .." | 14:30 | ||
moritz | why would you want to find it? isn't it enough if rakudo finds it? | ||
14:31
araraloren_fake left
|
|||
ugexe | zef locate lib/Readline.pm | 14:31 | |
newb2 | I have to import the Module in order to use it if its not in @INC or whatever in perl 6 | ||
14:31
wigner left
|
|||
newb2 | ugexe will try .. | 14:31 | |
14:31
araraloren_fake joined
|
|||
ugexe | but you wouldnt use that result of that in a `use lib "..."` | 14:31 | |
14:31
wigner joined
|
|||
moritz | newb2: if you installed it with 'zef install Readline', there is no need to do anything manually with paths to be able to use it | 14:32 | |
just "use Readline;" | |||
newb2 | : "Readline => /opt/share/perl6/site/sources/D8BAC826F02BBAA2CCDEFC8B60D90C2AF8713C3F" Thanks! | 14:33 | |
14:34
newb2 left
14:36
andrzejku_ left
14:49
raschipi left
14:56
smls joined
|
|||
smls | m: role R [::T] { has T $.a }; say R[Int].new.a; | 15:01 | |
camelia | No such method 'gist' for invocant of type 'T' in block <unit> at <tmp> line 1 |
||
smls | ^^ Is this supposed to work? | ||
Ven`` | no, AFAIK, because T is not available at that time. There's no "instantiation" type | 15:04 | |
s/type/time/ | |||
smls | m: role R [::T] { has T $.a = T}; say R[Int].new.a; | ||
camelia | (Int) | ||
smls | Hm, like that it works... | 15:05 | |
Ven`` | m: role R [::T] { my constant T $.a = T}; say R[Int].new.a; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing initializer on constant declaration at <tmp>:1 ------> 3role R [::T] { my constant T7⏏5 $.a = T}; say R[Int].new.a; |
||
Ven`` | m: role R [::T] { my constant $.a = T}; say R[Int].new.a; | ||
camelia | 5===SORRY!5=== Error while compiling <tmp> Variable $.a used where no 'self' is available at <tmp>:1 ------> 3role R [::T] { my constant $.a7⏏5 = T}; say R[Int].new.a; |
||
Ven`` | whoops | ||
m: role R [::T] { my constant $a = T}; say R[Int].new; | 15:06 | ||
camelia | R[Int].new | ||
Ven`` | not sure then :) | ||
araraloren_fake | m: role R [::T] { has T $.a }; say R[Int].new(a => 42).a; | ||
camelia | 42 | ||
15:07
araujo joined,
araujo left,
araujo joined
|
|||
araraloren_fake | Of course it works | 15:07 | |
Ven`` | m: role R [::T] { has T $.a }; say WHAT R[Int].new.a; | ||
camelia | No such method 'gist' for invocant of type 'T' in block <unit> at <tmp> line 1 |
||
Ven`` | right | 15:08 | |
araraloren_fake | That error is not about generic role | ||
Ven`` | m: role R [::T] { has T $.a }; # well | ||
camelia | ( no output ) | ||
araraloren_fake | m: m: role R [::T] { has T $.a; }; say R[Int].new.a.WHAT; | 15:09 | |
camelia | No such method 'gist' for invocant of type 'T' in block <unit> at <tmp> line 1 |
||
araraloren_fake | Hmm, but that's strange here.. | ||
Ven`` | funnily enough, removing the `.a` gives a slightly different error message: | 15:10 | |
m: role R [::T] { has T $.a; }; say R[Int].new | |||
camelia | No such method 'perl' for invocant of type 'T' in block <unit> at <tmp> line 1 |
||
Ven`` | it's just recursively calling `.perl`, surely? | ||
smls | m: role R [::T] { has T $.a }; say R[Int].new.a.HOW; | 15:11 | |
camelia | Perl6::Metamodel::GenericHOW.new | ||
smls will RT. | 15:12 | ||
araraloren_fake | m: role R [::T] { has T $.a }; say R[Int].new.HOW; | ||
camelia | Perl6::Metamodel::ClassHOW.new | ||
Ven`` | smls: I'm really not sure it's not how it's supposed to be. It's just that a GenericHOW has no .gist? | 15:14 | |
I know I had similar questions 1-2 years back, and jnthn++ explained that it was meant to be that way | 15:15 | ||
smls | Oh? | ||
Couldn't `has T $.a;` be made to do the same thing as `has T $.a = T;` ? | 15:16 | ||
araraloren_fake | m: m: role R [::T] { has T $.a = T; }; say R[Int].new.a; | ||
camelia | (Int) | ||
araraloren_fake | m: role R [::T] { has $.a }; say R[Int].new.HOW; | 15:17 | |
camelia | Perl6::Metamodel::ClassHOW.new | ||
araraloren_fake | m: role R [::T] { has $.a }; say R[Int].new.a; | ||
camelia | (Any) | ||
araraloren_fake | I think it should be | ||
15:20
kannan joined
15:21
domidumont left
15:22
domidumont joined,
zakharyas left
15:29
devmikey joined
15:30
devmikey left
15:31
Cabanossi left
15:33
Cabanossi joined
15:36
P6steve left
|
|||
timotimo | damnit! i forgot about plug adapters for going to switzerland | 15:38 | |
i had one and i knew exactly where it was ... then i moved to a different place | |||
15:44
lizmat_ joined,
ufobat joined
|
|||
Skarsnik | btw does IO::Socket::Async::SSL is installable? it fails test with rakud 17.08 | 15:45 | |
15:45
lizmat left
|
|||
jnthn | What does it fail? I installed it fine on my laptop last night | 15:48 | |
timotimo | worked for me just now, too | 15:49 | |
15:50
cdg_ left
|
|||
Skarsnik | (btw the binding does provide an abi version so the dev package is needed x) | 15:50 | |
+does not | |||
ilmari | openssl version difference? | ||
jnthn | Skarsnik: Patches welcome :) | 15:51 | |
kannan | my laptop failed due to hardware probelm. now i am re-installing on a debian 9 VM. i get the following error. Killed | ||
15:51
P6steve joined
|
|||
kannan | Makefile:492: recipe for target 'CORE.setting.moarvm' failed | 15:51 | |
make[1]: *** [CORE.setting.moarvm] Error 137 | |||
make[1]: Leaving directory '/usr/src/perl6/rakudo-star-2017.07/rakudo' | |||
Makefile:43: recipe for target 'rakudo/perl6-m' failed | |||
make: *** [rakudo/perl6-m] Error 2 | |||
15:52
lowbro left
|
|||
Skarsnik | libssl1.0.0: /usr/lib/x86_64-linux-gnu/libssl.so.1.0.0 | 15:52 | |
kannan | ah ok, thanks | ||
i will try | |||
15:53
cdg joined
|
|||
Skarsnik | ilmari, ABI version, not just version :) | 15:53 | |
ugexe | install works on osx here as well | ||
araraloren_fake | good night! | 15:54 | |
15:54
araraloren_fake left
|
|||
kannan | oop, i thought maybe i am missing the libssl-dev package, but i read wrongly. not sure why install failed. | 15:54 | |
Skarsnik | jnthn, I don't patch nc lib finding stuff anymore. I think github.com/rakudo/rakudo/pull/716 need to be discussed/pushed. I am actually not sure how to handle libxml2 without that x) | ||
ilmari tries on debian stable (which has libssl 1.1.0f) | |||
Skarsnik | Original exception: | 15:55 | |
Could not find symbol '&SSL_ctrl' | |||
in block at /root/.zef/store/p6-io-socket-async-ssl.git/62212cdbb1940ea5d3dd4b8824aa10c83aa4e1d9/lib/IO/Socket/Async/SSL.pm6 (IO::Socket::Async::SSL) line 176 | |||
should have use gist maybe | |||
ilmari | Cannot locate symbol 'SSL_load_error_strings' in native library 'libssl.so' | 15:56 | |
is my error | |||
Skarsnik | yeah libssl.so is in libssl-devel | ||
ilmari | yes, I know | ||
libssl-dev:amd64: /usr/lib/x86_64-linux-gnu/libssl.so | |||
Skarsnik | that why the abi version should be here when it's possible (not like libmysqlclient) | ||
ugexe | but OpenSSL installs? thats where the bindings are | 15:57 | |
ilmari | yes | ||
15:57
cdg left,
Ven`` left
|
|||
ugexe | OpenSSL has one spot where it checks for some interface change by trying one method and if that fails, some other | 15:57 | |
ilmari | it's only available if OPENSSL_API_COMPAT < 0x10100000L | 15:58 | |
and deprecated and a no-op in 1.1.0 | |||
Skarsnik | I am not sure if the error come from the module or just my perl6 install | ||
ugexe | github.com/sergot/openssl/commit/7...0ca1c67R38 | ||
Skarsnik | I already had a 2016 rakudo an /opt and I installed the last release on top of it | 15:59 | |
ilmari | ugexe: but on libssl 1.1.0 SL_load_error_strings isn't a symbol, it's a conditional macro | 16:00 | |
#if OPENSSL_API_COMPAT < 0x10100000L | |||
# define SSL_load_error_strings() \ | |||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \ | |||
| OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL) | |||
#endif | |||
Skarsnik | well we can't really call MACRO from NC ^^ | ||
16:01
robertle left,
nhywyll joined
|
|||
Xliff | I thought there was a provided fix in the comments. I don't know if that was ever excepted. | 16:01 | |
I remember because I ran into that macro problem myself. | |||
16:02
bdmatatu joined
|
|||
ilmari | OPENSSL_init_ssl() is only necessary if you need non-default settings | 16:03 | |
16:03
Cabanossi left,
Cabanossi joined
16:05
lizmat_ left
16:06
brimonk left,
brimonk joined
|
|||
timotimo | kannan: that sounds like you don't have enough ram to build the core setting | 16:08 | |
it takes quite a bit of resources, since it's a multiple hundred thousand lines of code file | |||
or is it just multiple tens of thousands? | |||
sorry, it's just 60 thousand lines of code | 16:09 | ||
kannan | timotimo , makes sense, i spin up the cheapest thing at 4 $ / mo has 0.6 mb ram, | ||
timotimo | i hope you mean 0.6 GB ram :) | ||
kannan | i did | ||
0.6 gb ram | |||
Skarsnik | that expensive for 0.6GB | ||
kannan | really? , its in google cloud... | 16:10 | |
i will wait for my laptop to get repaired i guess. | 16:11 | ||
i had one day adevnture now in perl6, lol. | |||
Skarsnik | Dunno I pay a vps for like 3€/month and has 2Gbytes | ||
kannan | but successfully ran helloworld... written in atom editor. | ||
El_Che | kannan: use pkgs | 16:12 | |
mspo | use swap | ||
El_Che | kannan: github.com/nxadm/rakudo-pkg/releases | ||
kannan: fresh from today | |||
kannan | El_Che : thank you, i will trythis | 16:14 | |
16:15
domidumont left,
mcmillhj left
16:17
leont left
16:18
andrzejku_ joined
|
|||
stmuk | hmm don't read reddit | 16:20 | |
16:21
lizmat joined
|
|||
mspo | yeah ⚛ renders a little weird for me too | 16:22 | |
I mean it's cute and all | 16:23 | ||
El_Che | stmuk: that sounds like good advice even without context :) | ||
ilmari hasn't reddit | 16:26 | ||
kannan | El_Che : gr8 , it worked | 16:27 | |
El_Che | people complaining that the ascci variant of atom is a lot less expressive and more typing ($var ⚛= $value (aka atomic-assign($var,$value))) do have a point though | 16:29 | |
kannan: great to hear | |||
ugexe | no they dont | ||
mspo | yeah are there other places where "texas" is not in the same position? | ||
ugexe | how often do you think this gets used? | ||
mspo | ⚛ also renders wide | 16:30 | |
16:30
mcsnolte joined
|
|||
El_Che | raiph's answer was pretty useful, showing .A++ | 16:30 | |
ugexe | it people looking for a reason to complain without thinking about the use case | ||
timotimo | i just wrote a little reddit | 16:31 | |
El_Che | I am just at the top, but that comment didn't struck to me as just-commplainig-because | ||
timotimo | www.reddit.com/r/perl6/comments/6v...6/dlyyfgs/ - this is what i wrote | 16:32 | |
kannan | well, zef will not install and says memory not enough. i guess i will wait a day or so to resume | 16:33 | |
El_Che | kannan: really? | ||
16:33
domidumont joined
|
|||
kannan | yes, the vm is pretty costly for me, and my laptop is in service | 16:34 | |
El_Che | kannan: give it a swapfile in the meanwhile? | 16:35 | |
timotimo: good point | |||
kannan | ok i can try that also. | ||
AlexDaniel | propdump: a⚛ | ||
16:35
itaylor57 joined
|
|||
unicodable6 | AlexDaniel, gist.github.com/57e1344fe924fa6786...c3efea6a23 | 16:35 | |
El_Che | I am not a mac user, so I haven't done much configuration on this machine, but the atom operator looks awful in vim | 16:36 | |
mspo | like why isn't the texas of "÷" divide(num,dem)? | 16:37 | |
El_Che: oh osx it renders as a purple icon for me | |||
El_Che | double wide (partly on top of =) and it looks like a pink emoji | ||
mspo | El_Che: and eats the next character | ||
El_Che | agh | ||
16:37
P6steve left
|
|||
AlexDaniel | “Strictly speaking, it makes no sense to talk of narrow and wide for neutral characters, but because for all practical purposes they behave like Na, they are treated as narrow characters (the same as Na) under the recommendations below.” | 16:37 | |
mspo | yep yep | ||
AlexDaniel | “Narrow (and neutral) Unicode characters always map to halfwidth characters.” | 16:38 | |
so if I'm reading this correctly, ⚛ should be halfwidth | |||
“⚛ also renders wide” is likely a problem with your system, or font, or editor, or something… | 16:39 | ||
El_Che | ok, it's not a mac thing. Same results on vim on Ubuntu | ||
AlexDaniel: you mean fixed width fonts? What kind of heretic would other something else in the terminal? | 16:40 | ||
geekosaur | I suspect it's a font substitution | ||
AlexDaniel | ah, actually the last quote was from the wrong place | ||
geekosaur | your current font doesn't have that glyph so a fallback font is used to render it, and the character metrics don't match up | 16:41 | |
AlexDaniel | El_Che: how can you possibly render 本 as a halfwidth character? | ||
El_Che: it's fullwidth both in my terminal and emacs | |||
El_Che | AlexDaniel: that's kind of my point | ||
not a big fan of cute-but-a-lot-readable | 16:42 | ||
16:42
dakkar left
|
|||
El_Che | I takes effort to get someone to try perl6 (and most of the time they like it) | 16:44 | |
AlexDaniel | actually, it doesn't really say what should be done with neutral characters | ||
so ⚛ could be anything? I don't know… | |||
El_Che | guess what is the chance people in my surrounding will try it if they need to change their font | ||
AlexDaniel | samcv: ↑ ? Maybe you do? | ||
geekosaur | terminals can't generally deal with this, sadly | 16:45 | |
El_Che | I am not trying to troll, I think it's an issue | ||
geekosaur: we have zero IDE support | |||
and some editors | |||
geekosaur | this is a big part of why you don't see much unicode in practice | ||
El_Che | so a lot of people will use a terminal | ||
AlexDaniel | El_Che: typically it's not about changing their font, but about fixing their system | 16:46 | |
El_Che: if it can't render ⚛ then chances are it can't render emoji and a bunch of other stuff | |||
El_Che | AlexDaniel: sure, but that won't happen if tehy don't see it as broken | ||
AlexDaniel | 🤷 | 16:47 | |
El_Che | I am a linux user and have years of experience of tweaking stuff, it's a second nature | ||
how many mac and win users will do that? | |||
16:47
mcmillhj joined
|
|||
AlexDaniel | .tell moritz speaking of unicode… I know that I am probably being very annoying, sorry, I don't know how to help… but want it to be fixed anyway… Any news regarding unicode in irc log? Or some info or something so that I can be more useful? :/ | 16:49 | |
yoleaux | AlexDaniel: I'll pass your message to moritz. | ||
moritz | AlexDaniel: Unicode in IRC logs seems fine, for the BMP | 16:50 | |
yoleaux | 16:49Z <AlexDaniel> moritz: speaking of unicode… I know that I am probably being very annoying, sorry, I don't know how to help… but want it to be fixed anyway… Any news regarding unicode in irc log? Or some info or something so that I can be more useful? :/ | ||
16:50
nattefrost left
|
|||
El_Che | besides the emoji discussion, great addition for having thread-safe libs | 16:50 | |
16:51
robertle joined
|
|||
moritz | AlexDaniel: and due to the mysql backings, getting non-BMP Unicode is probably quite a journey... | 16:51 | |
AlexDaniel | moritz: that I know, but even the output from camelia is broken | ||
moritz | AlexDaniel: irclog.perlgeek.de/perl6/2017-08-22#i_15052699 looks fine here | ||
AlexDaniel | (because every single message has at least  in it) | ||
moritz | huh, the N/L is broken, the «..» look fine | 16:52 | |
wtf? | |||
AlexDaniel | propdump: «» | ||
unicodable6 | AlexDaniel, gist.github.com/4cacf070d5962466ef...632d12e16f | ||
AlexDaniel | m: ‘’.ords.say | 16:54 | |
camelia | (10) | ||
moritz | AlexDaniel: if you want, I can give you shell access to the box so that you do your own debugging | ||
AlexDaniel | camelia: that's not what I meant | ||
moritz: I can try, but do you have any clues? | |||
moritz: like where should I look approximately | 16:55 | ||
github.com/AlexDaniel.keys ← first one | |||
moritz | AlexDaniel: probably in the logger, since it comes out as a question mark in the direct DB output | ||
AlexDaniel: ssh [email@hidden.address] | |||
AlexDaniel | worked | 16:56 | |
moritz | AlexDaniel: 'mysql moritz5' gives you the DB prompt | ||
and the sources are nextgen-ilbot, systemd service file in /etc/systemd/system/ilbot@.service | |||
config in ~/nextgen-ilbot/config/*.conf | 16:57 | ||
I tend to test by creating a copy of ilbot2.pl and give it a config that joins #bottest | 16:58 | ||
16:58
mr_ron joined
|
|||
geekosaur | sometimes my irc mapping confuses things. this discussion would probably make more sense if I weren't rendering U+0010 as  + newline | 17:00 | |
17:01
Cabanossi left
17:04
Cabanossi joined
|
|||
mr_ron | m: say [so "\c[CR]\c[LF]" ~~ / \x[0D] /, so "\c[CR]\c[LF]" ~~ / \x[0A] /, so "\c[CR]" ~~ / \x[0D] /, so "\c[LF]" ~~ / \x[0A] /]; say "\c[CR]\c[LF]".encode | 17:04 | |
camelia | [False False True True] utf8:0x<0d 0a> |
||
timotimo | m: say "\n".encode("utf8", :!translate-nl); say "\n".encode("utf8", :translate-nl) | 17:05 | |
camelia | utf8:0x<0a> utf8:0x<0a> |
||
mr_ron | Is there a good document someplace on p6 on dos newlines? | 17:08 | |
17:08
cdg joined
17:09
cdg_ joined
|
|||
timotimo | m: say "\r\n".encode("utf8", :!translate-nl); say "\r\n".encode("utf8", :translate-nl) | 17:09 | |
camelia | utf8:0x<0d 0a> utf8:0x<0d 0a> |
||
timotimo | maybe only on windows | ||
mr_ron | I am running on ubuntu | 17:10 | |
kannan | El_Che : everything is good. i upgraded the VM, and re-installed rakudo-star 2017.07 from source. | 17:11 | |
17:13
cdg left
|
|||
El_Che | kannan: great to hear | 17:15 | |
mr_ron | m: say so "\c[CR]\c[LF]" ~~ / \x[0D] /; say so "\c[CR]\c[LF]" ~~ / \x[0A] / # new RT ?? | 17:18 | |
camelia | False False |
||
17:26
mr-fooba_ joined,
stmuk_ joined
17:28
mr-foobar left
17:29
stmuk left
17:32
Cabanossi left
17:34
Cabanossi joined
17:38
itaipu joined,
devmikey joined
17:40
pierre_ joined
17:45
pierre_ left
17:48
kannan left
17:56
MilkmanDan left
18:03
MilkmanDan joined
18:10
setty1 joined
|
|||
jnthn | mr_ron: CRLF is a single grapheme, regexes match at grapheme level, so no, wouldn't expect those to match | 18:11 | |
Working as designed. | |||
18:12
wigner left
|
|||
Geth | doc: 489cc2d6c7 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6 "Fix" display of atomic ops The POD parser chokes due to ops having `=` in them, which are things to draw the table with. Fixed by wrapping them in C<>, but the parser doesn't parse those in tables :( |
18:12 | |
18:12
zakharyas joined
|
|||
mr_ron | jnthn: ABNF Core ( tools.ietf.org/html/rfc5234 ) does matching for CR, LF and CRLF. Any way for CRLF to match single ASCII CR / LF ? | 18:14 | |
jnthn | No | 18:15 | |
mr_ron | OK - will just document in US-ASCII module. Thanks. | 18:16 | |
18:19
geekosaur left
18:20
geekosaur joined
18:22
Kyo91 left
18:23
zakharyas left
18:24
DerAlex joined
18:29
lostinfog joined,
konsolebox left
18:30
Kyo91 joined
18:32
Cabanossi left
18:34
Cabanossi joined,
nuk9 left
18:36
konsolebox joined
18:37
cdg joined
18:40
cdg_ left
|
|||
ryu0 | grapheme? | 18:41 | |
18:42
cdg left
18:47
itaipu left
|
|||
timotimo | "something the user would call 'a single thing'" | 18:47 | |
18:48
Kyo91 left
|
|||
moritz | or a base character + combining characters also lumped into a single character | 18:48 | |
mr_ron | maybe: stackoverflow.com/questions/273318...a-grapheme | 18:49 | |
timotimo | also series of emoji joined with the zero-width-joiner, like the family emoji | ||
18:49
Kyo91 joined
18:50
devmikey left
18:51
devmikey joined
|
|||
ryu0 | I see. | 18:51 | |
18:51
darutoko left
|
|||
ryu0 | a grapheme is a single letter or so, as a human would see it. | 18:51 | |
i've only really dealt with English/ASCII so the distinction is largely irrelevant to what i write... | 18:52 | ||
timotimo | english has words like "naive" which is supposed to have two dots on the i instead of just 1 :) | 18:53 | |
sena_kun | arnsholt, re-ping. | ||
18:53
itaipu joined
18:57
smls left,
smls joined
18:59
domidumont left
|
|||
AlexDaniel | m: say ‘i’ ~ ‘̈’ | 18:59 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Missing required term after infix at <tmp>:1 ------> 3say ‘i’ ~7⏏5 ‘̈’ expecting any of: prefix term |
||
AlexDaniel | m: say ‘ixCCx88xE2x80x99 | 19:00 | |
camelia | ï | ||
AlexDaniel | timotimo: ↑ this does not feel right | 19:01 | |
it normalizes to ï, but shouldn't it have three dots in the end? :) | |||
timotimo | got no clue :) | 19:02 | |
[Coke] | AlexDaniel: why? | 19:03 | |
oh. a funny. | |||
AlexDaniel | m: say ‘ı̈’ | 19:04 | |
camelia | ı̈ | ||
geekosaur | that may be up to font metrics | 19:05 | |
Geth | doc: e610ddb097 | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6 Clarify Texas atomics are just subs |
||
AlexDaniel | so dotless i (ı) + diaeresis does not normalize into ï, but normal i does :) | ||
Geth | doc: 1ee4ec3a2c | (Zoffix Znet)++ (committed using GitHub Web editor) | doc/Language/unicode_texas.pod6 Fix typo in sub name |
19:06 | |
19:06
domidumont joined
19:12
domidumont left
19:13
espadrine joined
|
|||
smls | m: say foo List; sub foo (::T --> T) { T.new: |<a b c> } | 19:16 | |
camelia | Died with X::TypeCheck::Return in sub foo at <tmp> line 1 in block <unit> at <tmp> line 1 |
||
smls | ^^ Should this succeed ? | 19:17 | |
El_Che | fyi, on my home ubuntu machine, the atom is not wide and noet emoji like. On the other hand, it's not very readable, more like a badly printed asterisk | 19:19 | |
19:22
jonas1 left
|
|||
El_Che | it looks like this: claudio.ulyssis.be/var/tmp/atom_vim_ubuntu.png | 19:23 | |
the size of it should be dependant of the font then | |||
19:30
|oLa| left
19:31
|oLa| joined
|
|||
[Coke] | I think they're subbing in the other symbol, looks like. | 19:33 | |
19:35
brrt joined
|
|||
[Coke] | ... or maybe I'm crazy. nevermind. :) | 19:35 | |
Geth | ecosystem: 2936c63286 | (Brian Duggan)++ | META.list Add p6-jupyter-kernel to the ecosystem |
19:37 | |
19:39
ccntrq left
19:40
ccntrq joined
19:44
Kyo91 left
19:55
bdmatatu left
|
|||
timotimo | yes!!! | 20:06 | |
finally <3 | 20:07 | ||
20:07
cdg joined
|
|||
Skarsnik | Good night people ^^ | 20:08 | |
lizmat | Skarsnik: good night | ||
20:08
Skarsnik left,
itaipu left
20:09
cdg_ joined
20:10
Kyo91 joined,
andrzejku_ left
20:12
cdg left
20:29
mr_ron left,
AnotherNick left,
khw joined
|
|||
Xliff | timotimo: why so excited over... what looks to be python bindings (?) for other languages? | 20:30 | |
Well... other than it makes them available to P6 (which is really cool now that I think about it) | 20:31 | ||
20:31
char_var[buffer] joined
|
|||
Xliff | Ooor... that I miss the fact that there are notebooks using this thing. | 20:34 | |
Xliff googles further. | |||
lizmat | m: my %h = :1a, :2b; for %h -> (:$key,:$value) { dd $key, $value } # isn't that almost like magic ? | 20:35 | |
camelia | Str $key = "a" Int $value = 1 Str $key = "b" Int $value = 2 |
||
lizmat | just something I realized when looking at a very old P6Weekly report | ||
20:36
Sgeo joined
|
|||
Xliff | lizmat: Yes, that is cool, once you learn it. | 20:36 | |
However I've always found that initialization format to be confusing. | |||
:<Value><Key> | 20:37 | ||
Breaks my haid. | |||
From: try.jupyter.org/: "ts = ts.cumsum()" | 20:39 | ||
Which proves that with a little thought, sometimes the obvious shortening is not a good idea. | 20:40 | ||
];-) | |||
20:42
mr-foobar joined
|
|||
Xliff | Probably better to use this link: tmp59.tmpnb.org/user/08yVC3UsZc5j/...thon.ipynb | 20:42 | |
Which may not work after a bit. | |||
20:44
mr-fooba_ left
20:45
cdg_ left
20:47
Cabanossi left
|
|||
Xliff extemporizes: "Where notebooks == Cool google doc like pages that can run code like an online MatLab" | 20:47 | ||
20:49
Cabanossi joined
20:51
colomon left
20:54
cog_ left
|
|||
timotimo | Xliff: .sumcumlaude | 20:56 | |
223002 Xliff │ :<Value><Key> | 20:57 | ||
oops | |||
Xliff | timotimo: .sumcumlaude.graduate | 21:03 | |
But I don't think ".cumsum.graduate" will do what you expect. :P | 21:04 | ||
Mainly because I have a gutter brain. That's my story and I'm sticking to it!! | |||
21:05
mcmillhj left
|
|||
Xliff is still waiting for "zef install ." to complete. | 21:05 | ||
21:05
cdg joined
|
|||
Xliff | I've since gone and: smoked cigarette, and diagnosed a wireless problem. It's "still going" | 21:06 | |
21:07
TEttinger joined
21:08
cdg left,
cdg joined
21:20
skids left
21:23
ufobat left
21:27
wamba left
21:31
Guest29805 left
21:32
giraffe joined,
giraffe is now known as Guest54652
21:33
lostinfog left
21:37
brrt left
21:38
cpage_ left
21:41
espadrine left
21:46
Cabanossi left
21:48
cdg_ joined
21:49
Cabanossi joined
21:51
cdg left
21:52
rindolf left
21:56
setty1 left
22:04
DerAlex left,
Kyo91 left
22:05
cpage_ joined
22:06
nadim left
22:10
Peter_R joined
22:18
ggoebel left
22:19
nhywyll left
22:23
snarkyboojum joined
|
|||
Xliff | "zef install Net::ZMQ" - hangs rakudo | 22:37 | |
22:37
smls left
|
|||
sena_kun | Xliff, do you use arnsholt's master? | 22:38 | |
Xliff | I use whatever is in META6.json | ||
22:38
snarkyboojum left
|
|||
sena_kun | Seems like it then, well. | 22:39 | |
Xliff | Using panda now, and at least it installs the dependencies. | ||
sena_kun | Xliff, you can try my fork out: github.com/Altai-man/Net-ZMQ - git clone, git checkout revitalize, zef --verbose install . | ||
Xliff | Still, no response from the Net::ZMQ tests. | ||
sena_kun | it works good with zmq 4.1, but 4.2 is... Yet to work, yes. | 22:40 | |
Xliff | Crud. I think I am on zmq 5 | ||
sena_kun | I am trying to contact arnsholt to merge update into master. | ||
Xliff | No. 4.2.1 | ||
sena_kun | But still no luck. | ||
Xliff, can you downgrade to 4.1 somwhow? Stable work for 4.2 is, ugh, a hard thing to talk about. | 22:41 | ||
Xliff, for what package do you need this library? | |||
Xliff | Trying to install Net::ZMQ from clone | ||
Worked. | 22:42 | ||
p6-jupyter-kernel | |||
sena_kun | ah, okay. | ||
the thing is. | |||
22:43
mcmillhj joined
|
|||
Xliff | # Could not find Net::ZMQ::Constants at line 6 | 22:43 | |
sena_kun | Net::ZMQ was started on 2013 when zmq version was 2. And since then many things were changed. Some time ago I've updated it, wrote some docs, made api easier, etc. And broke API, of course. | ||
Xliff, ^ | |||
Xliff | Oh. Shuks. | 22:44 | |
sena_kun | I can help you to port to my version. | ||
It should be SO HARD. | |||
I mean. | |||
Xliff | p6-jupyter-kernel doesn't realize that Net::ZMQ is now Net::ZMQ4 | ||
sena_kun | s/Net::ZMQ::Constants/Net::ZMQ4::Constants/ | ||
Yeah. | |||
Only in my fork though. :) | |||
And some obsolete constants may be used too. | 22:45 | ||
Xliff | :( | ||
This sounds bad. | |||
sena_kun | Actually, it is possible to write a compatibility layer for older zmq realizations, but I thought it is more important to support actual version in conditions of manpower lack. | ||
Xliff, not SO bad, I think. I can try to run this module and write a update patch tomorrow or on weekends. Will it be merged? :) | 22:46 | ||
Xliff | So downgrading is also not an option then? | ||
sena_kun | Downgrading what? | ||
Xliff | zmq to 4.1 | ||
ugexe | sena_kun: your fork can be installed via `zef install github.com/Altai-man/Net-ZMQ.git` | 22:47 | |
Xliff | I have not analyzed p6-jupyter-kernel yet. I don't know how the changes in your Net::ZMQ branch will react to it. | ||
timotimo | i found it a bit difficult to understand what version and what api version of zmq i'd be on | ||
sena_kun | downgrade to 4.1 will make you safe from very persistent errors I'm getting on 4.2. But constatns are constants. | ||
timotimo | from any given package version | ||
22:47
Cabanossi left
|
|||
Xliff | I blame timotimo | 22:47 | |
He started it. | |||
22:47
mcmillhj left
|
|||
sena_kun | timotimo, well, Net::ZMQ used a mixture of versions API as I looked on it. | 22:48 | |
ugexe, thanks, it's fine, but I anyway want this changes be in the main repo. | |||
22:48
Cabanossi joined
|
|||
sena_kun | If arnsholt is against... The fork will get a different name or something. :/ | 22:49 | |
and zef won't change installation branch of the repo for me. :P | 22:50 | ||
Xliff | This blows the docs for p6-jupyter-kernel and it was just added to the ecosystem, today. | 22:51 | |
Methinks they tested with an older version of Net::ZMQ | |||
sena_kun | Sure they were. | ||
Looking on p6-jupyter-kernel sources right now... | 22:53 | ||
22:54
mcmillhj joined
|
|||
sena_kun | I see some obsolete pieces, but it is not really a disaster, just to easy-fix 5-10 lines of code. | 22:56 | |
ugexe | you can give it a commit id then, zef install github.com/Altai-man/Net-ZMQ@a317944 | ||
er zef install github.com/Altai-man/Net-ZMQ.git@a317944 | |||
sena_kun | ugexe, oh, cool. didn't know about it. Still doesn't look enterprisey enough to just write a "Net::ZMQ" for everyone in meta file dependencies and go. :) | 22:58 | |
but I will use it next time. | |||
ugexe | no, but it lets other people test your fork with less steps | ||
sena_kun | sure. | ||
22:59
mcmillhj left
|
|||
Xliff | LOL | 23:00 | |
Undeclared name: | |||
ZMQ_FORWARDER used at line 113 | |||
So yes. This is now becoming an effort in futility. | |||
Not to denegrate your efforts, sena_kun. | 23:01 | ||
But now I would need to look in to what ZMQ_FORWARDER was, its intended purposes, and a workaround. | |||
And I was so hoping to play with this tonight. | |||
ugexe | do you have an old version of Net::ZMQ installed? | 23:02 | |
sena_kun | Xliff, forwarder is a piece of zmq_device, which was killed years ago. Now you just use zmq_proxy. | 23:04 | |
Xliff, should I write you a guide about an update? I'd more like to: 1)merge my fork with master; 2)create an issue for p6-jupyter-kernel with an explanations about how to port it to modern means. But it can easily take more than one night. :/ | 23:06 | ||
Xliff | Only used in one line: "try zmq_device(ZMQ_FORWARDER, $!socket, $!socket);" | ||
I don't have the strength tonight for "more than one night" | |||
Not even: "More than 20 minutes tbh." | |||
Xliff looks up zmq_proxy | |||
sena_kun | use Net::ZMQ4::Proxy; | 23:07 | |
Then zmq_proxy(First_socket, Second_socket, Pointer[void]). | |||
But I didn't test it. :) | |||
23:07
mcmillhj joined
|
|||
Xliff | What does the poiner do? | 23:08 | |
Looks like a callback. | |||
k... looks like I can do a NULL equiv. | |||
sena_kun | It's the "intermediate" you can stick in if you sant to sniff all packages that are forwarded from both sides. | 23:09 | |
See api.zeromq.org/4-2:zmq-proxy | |||
s/sant/want/ | |||
Xliff | Undeclared routine: | 23:10 | |
zmq_proxy used at line 115 | |||
sena_kun | did you add an import? | 23:11 | |
Xliff | Nope. You didn't imply one. :P | ||
sena_kun | :) | ||
Try it. iirc it should work with `our` even without explicit "is export". If now I'll commit a patch quickly. | 23:12 | ||
23:12
mcmillhj left
|
|||
sena_kun | *If not | 23:12 | |
I probably need to go to sleep already... | |||
Xliff | Shouldn't you be able to selectively import symbols even if not marked "is export" | 23:16 | |
23:17
skids joined,
devmikey left
|
|||
sena_kun | There is more than one way to do it... :) I yet to remember everything about importing/exporting. | 23:17 | |
ugexe | with `our` you use the full name: My::Module::sub_name(...) | ||
Xliff | kk | ||
sena_kun | Patches are welcome, btw. :) I am sure my perl 6 skills have a long way to go. | 23:18 | |
Xliff | t/02-sandbox.t .. ok | 23:20 | |
Cannot resolve caller AUTOGEN(Net::ZMQ4::Socket: Net::ZMQ4::Message, Int); none of these | |||
signatures match: | |||
kk... consider that. I got past the first test with changes to Jupyter::Kernel::Service.pm6 | |||
23:20
mcmillhj joined
|
|||
sena_kun | What I dislike about this message is that it doesn't say you the actual subroutine name... | 23:20 | |
anyway, it seems like `send`-related trouble. | 23:21 | ||
Xliff | Yeah. And that is the limit of my strength ATM. | ||
sena_kun | or not. :/ | ||
Xliff | Gotta crash. Or at least take a break. | ||
sena_kun | Xliff, while you're still here. | ||
Xliff | nooooooo | ||
:) | |||
sena_kun: ga | 23:22 | ||
sena_kun | I'll go to sleep now and be back in 10-12 hours or so. Then ping me with yoleaux or something, I will help you further with everything I can. | ||
Regarding my fork, of course. :) | |||
Xliff | You ping ME with yoleaux. If I am active, I will respond. | 23:23 | |
I don't know what I will be doing in 10-12 hours. | |||
Heck... I don't know what I am doing in the next 20 minutes..... maybe sleep. | |||
Mmmm......sleeep | |||
sena_kun | Ah, okay. | ||
Xliff | Have a good night! | ||
sena_kun | o/ | 23:25 | |
timotimo | i'll go to sleep | ||
have a good one! | |||
23:25
mcmillhj left
23:29
BenGoldberg joined
|
|||
BenGoldberg | m: say // ~~ Method; | 23:34 | |
camelia | 5===SORRY!5=== Error while compiling <tmp> Null regex not allowed at <tmp>:1 ------> 3say //7⏏5 ~~ Method; |
||
BenGoldberg | m: say /./ ~~ Method; | 23:35 | |
camelia | True | ||
23:35
ggherdov joined
23:38
cdg joined
23:40
mcmillhj joined
23:41
cdg_ left
23:44
sena_kun left
23:45
mcmillhj left
23:47
cdg left
23:50
cdg joined
23:55
cdg left,
mcmillhj joined
|
|||
Xliff | .tell sena_kun You're right. It's .send related. | 23:59 | |
yoleaux | Xliff: I'll pass your message to sena_kun. |