00:40 Ven joined 02:25 Ven joined 02:49 ilbot3 joined 03:32 zakharyas joined 03:57 Ven joined 04:41 Ven joined 05:25 Ven joined 08:26 Ven joined 08:42 Ven joined
samcv jnthn, i think we need an indexic some way to index a string case insensitively 09:18
not totally sure how it does it now but i'm pretty sure it uses index with uc and lc things? not 100% sure
09:27 Ven joined 09:42 Ven joined 10:41 IRCFrEAK joined 10:45 IRCFrEAK joined 11:02 Ven joined 11:10 domidumont joined
jnthn samcv: Not sure off hand either, but sounds like something we'd reasonably want, yeah 11:18
samcv yeah
jnthn Particularly if we implement optimized /:i foo/ where we just scan for foo
samcv was suprised it didn't exist
and it seems to search really oddly now or something
github.com/perl6/nqp/blob/master/s...#L252-L258 like this, and then uh. not sure what happens after this 11:19
but am i right it's having uppercase and lowercase alternates
and does it run index for all alternates? how do we even implement character clases?
11:20 domidumont joined 11:22 Ven joined
jnthn Declarative regex constructs are both compiled into VM ops and have an NFA produced which is evaluated by MVM_nfa_run or some such 11:25
The NFA being used for LTM purposes
samcv LTM? 11:26
jnthn And yeah, the code you linked is presuming that for x..y, lc(x)..lc(y) and uc(x)..uc(y) will be sensible ranges
Longest Token Matching
samcv oh yes
yeah. i thought that looked uh. kind of ugly
and they could be totally off
and include loads of unwanted characters 11:27
jnthn Perhaps, do you have a concrete case where they are? :)
I can totally believe they exist, just didn't see one
samcv yeah
jnthn Oh, also
The thing you're looking at is the NFA compiler
Not the regex compiler
So this is the part making the NFA
samcv m: say abs('a'.uc - 'a'.lc) 11:28
camelia Cannot convert string to number: base-10 number must begin with valid digits or '.' in 'āA' (indicated by ā)
in block <unit> at <tmp> line 1

Actually thrown at:
in block <unit> at <tmp> line 1
samcv m: say abs('a'.uc.ord - 'a'.lc.ord)
camelia 32
samcv yeah i get that part jnthn
jnthn But char classes turn into various node types depending what is in them 11:29
So <[abc]> becomes iirc an enumcharlist
samcv kk
jnthn While <[a..z]> becomes a charrange
And <[a..z-_]> would iirc become an alt on a charrange and an enumcharlist
*of a 11:30
--target=ast will reveal all
But yeah, for :i <[a..z]> then it's producing the equivalent of <[a..z]> | <[A..Z]> 11:31
Which is obviusly correct for this case :)
But foo..bar where lc(foo)..lc(bar) and uc(foo)..uc(bar) don't make sense would be an issue
(We don't end up with a..A) 11:32
(or z..A)
samcv yeah gotta see if there's any cases where it could screw things up
m: 'a'.ord.uc.say 11:34
camelia 97
samcv that. is wrong
m: 'a'.ord.uc.WHAT.say
camelia (Str)
samcv hmm oh i guess. i can see why that happens
cause Cool
jnthn aye 11:35
Though then the interesting question becomes what alternatives we have :) 11:36
samcv jnthn, ok i'm finding loads that span at least 100
jnthn, see #perl6dev 11:37
jnthn I can't understand what you're checking there?
samcv things with over 100 cp different between uppercase and lotwercase 11:38
is this a problem? idk. maybe not a problem
i have not decided
jnthn I don't know that's a problem per se
samcv i mean is that what the programmer expects? maybe 11:39
jnthn I think the problem is more like, what happens if we have foo..bar and uc(foo)..uc(bar) or lc(foo)..lc(bar) don't form valid ranges
samcv would be interested. cause they have to start with a lower cp right
jnthn Or more practically, do their exist alphabets in Unicode where if I wrote the equivalent of A..Z, then uc(A)..uc(Z) and lc(A)..lc(Z) are something crazy 11:40
samcv ok there's a lot 11:41
like 'Āµ'
jnthn But yeah, the trouble I guess is that .. is defiend in terms of a codepoint range, when what in many cases people *mean* is "the lowercase letters of script X"
samcv 200 codpoints
yeah that seems more useful
11:42 Ven joined
jnthn And I think we give them a way to write such things? 11:42
I guess char ranges to specify alphabets kinda come from an over-simplified view of the world that worked in ASCII :) 11:43
samcv heh 11:44
jnthn I do seriously wonder what, if anything, we can do about it, though. 11:48
I mean, I don't know we can reasonably infer alphabets that people meant...
samcv of course not
jnthn And it's not clear there's a fc-based solution
Though maybe there is :)
samcv possible 11:49
jnthn Though given fc can produce multiple codepoints that would also become very...interesting.
samcv yeah
jnthn Oh, this bring up that classic German sharp s in a case-insensitive regex, don't it... o.O
samcv maybe best to just leave it as
jnthn Maybe, though if there is an obviously right-in-more-cases answer that isn't nuts to implement/explain then I'm good with that also :) 11:50
samcv yea. there are more important things though. like case insensitive index or something 11:51
also NFA and some of the grammar stuff is pretty complex. i wish i magically understood it all 11:52
jnthn Yeah, that was one of the areas of Rakudo that took me longest to get into 11:55
dogbert17 m: say expmod(1, -1, 1) 11:56
camelia (timeout)
jnthn Hm, thought that got fixed yesterday... 11:57
dogbert17 well it works locally
m: say 'Hi'
camelia Hi
dogbert17 locally I have 'This is Rakudo version 2017.02-232-g1e246665c built on MoarVM version 2017.02-38-g58457845' 11:58
jnthn Oh, maybe the bot got stuck 'cus of the recent submodule switcheroo 11:59
samcv yeah i think it did
i think people who don't have seperate dinrectiories for moarvm and nqp and rakudo are getting it 12:00
jnthn I forget who runs camelia
dogbert17 .botsnack
yoleaux2 :D
synopsebot6 om nom nom
dogbert17 moritz? 12:01
jnthn Or maybe nine
12:01 Ven joined
dogbert17 does any of you have a recent perl on your local machines 12:02
samcv me 12:03
dogbert17 if so could you try this: 'say expmod(3, -1, 3)'
samcv perl5?
dogbert17 perl6 :)
samcv ok
i have both
uh oh
it just. doesn't do anything 12:04
and hangs sorta
dogbert17 yeah, it seems as if github.com/libtom/libtommath/issues/67 is inclomplete
samcv what version are we using for moarvm? 12:05
dogbert17 'expmod(1, -1, 1)' works
samcv i have 1.0 installed on my computer and i think i'm using the local version
let me try with the moarvm provided libs 12:07
dogbert17 cool
samcv uhm still hanging 12:08
dogbert17 expmod(3, -1, 3) ? 12:09
samcv hold on i purged libtommath folder and then had it pull it in again just to double check 12:10
yeah still hang
dogbert17 expmod(1, -1, 1) should work though 12:11
samcv yeah that works
was it broken before?
dogbert17 yes
MasterDuke i get the same thing, works with 1, hangs with 3 12:13
dogbert17 the libtommatch patch above only seem to fix the case when the last parameter to p6 expmod is 1
dogbert17 wonders if it's time to look at some C code 12:19
12:21 Ven joined 12:42 Ven joined 13:01 Ven joined 13:21 Ven joined
moritz I'm cleaning out some stuff now and triggering a rebuild of rakudo-moar for camelia 13:36
m: say 42 13:41
camelia 42
13:41 Ven joined 14:01 Ven joined 14:21 Ven joined 14:38 agentzh joined 14:41 Ven joined 15:01 Ven joined 15:21 Ven joined
dogbert17 m: say expmod(1, -1, 1) 15:30
camelia 0
dogbert17 cool 15:31
m: say expmod(42, -1, 7)
camelia (timeout)
15:41 Ven joined
timotimo i'm wondering what i'd best change about the gdb plugin to make it less unbearably slow 15:44
because ... god damn, it's so fucking slow
probably ought to profile it 15:48
and figure out the exact semantics of running C code from the target binary while the whole thing is stopped 15:49
maybe introduce a few helper functions in moar that do all their stuff on the stack rather than touching global program state like malloc would
dogbert17 sounds cool 15:50
timotimo oh, if you're into that kind of stuff, you could do it instead of me :D :D
dogbert17 ha :) trying to look into libtommath atm ... 15:51
dogbert17 which might turn out to be a fiasco, we'll see 15:52
timotimo oh, that's brave
well, at least all the big int algorithms are described in perhaps excruciating detail in many many papers from the early 80s
MasterDuke some of you people better versed in C and signed vs unsigned number representations might have better luck than me with github.com/MoarVM/MoarVM/issues/513 15:53
dogbert17 one way to fix our problem is to always use 'mp_invmod_slow'. The name however makes me suspect we'll suffer a performance loss by doing so 15:54
timotimo um
are you trying to fix the bug that's already fixed?
or is the fix i committed somehow not good enough? 15:55
dogbert17 m: say expmod(42, -1, 7)
camelia (timeout)
dogbert17 it's good but there are some cases it does not catch
timotimo oh
dogbert17 seems to me that if the second param is negative, the third odd and at the same time evenly divisable with the first the call will habn 15:57
s/habn/hang/
so expmod(42, -1, 5) will work but expmod(42, -1, 7) or expmod(42, -1, 21) or expmod(42, -1, 3) will not 15:59
timotimo now to have some fun trying to make gdb auto load my gdb-python-script ... 16:01
16:02 Ven joined
dogbert17 m: say say 42 <</>> (3,5,7,21) 16:02
camelia (14 8.4 6 2)
True
timotimo ugh, i remember now why gdb's python support is so utterly atrocious 16:04
it won't give you tracebacks or anything like that when you get an exception inside your script 16:06
set python print-stack
By default, GDB will print only the message component of a Python exception when an error occurs in a Python script. This can be controlled using set python print-stack: if full, then full Python stack printing is enabled; if none, then Python stack and message printing is disabled; if message, the default, only the message component of the error is printed.
jesus thank god holy fuck why is this not the default
17:11 agentzh joined 18:02 agentzh joined 20:08 Ven joined 21:07 Ven joined 21:09 Ven joined 22:54 agentzh joined