00:45 bisectable6 joined 01:48 ilbot3 joined
samcv soooooooooo 02:19
samcv-- ;)
pretty sure i fixed the bug though. for indexic
really suprised that testing didn't catch it, but it only shows up in certain cases in perl6 02:20
but it's pretty bad of a bug
m: say "aaaaaaaabcd" ~~ m:i/abcd111111/;
camelia 「abcd」
samcv :(
bbs 02:34
Zoffix gives samcv the club membership card
TimToady has two membership cards already, though I haven't activated the second one yet 03:03
mst Zoffix: welp, travis completely ignored my attempt to help 03:53
twitter.com/shadowcat_mst/status/8...2088591360
I suppose I'll have to email them 04:55
mst grumbles 04:56
samcv ok. got tests in nqp suite and roast. now to finalize patch 05:37
Geth MoarVM/indexic_rescue: 21bfb7ef30 | (Samantha McVey)++ | src/strings/ops.c
Fix bug in index ignorecase and equal at ignorecase

This bug occurred when the entire length of the haystack was searched and all of the graphemes matched the needle.
If the needle exceeded the length of the haystack past that point, it would erroneously think there was a match there, as it only checked ... (18 more lines)
05:54
samcv indexic rescue! 05:55
Geth MoarVM: samcv++ created pull request #586:
Fix bug in index ignorecase and equal at ignorecase
05:56
samcv actually just thought of one ridiculous scenario i haven't planned for. heh. if the haystack is composed 1/2 or more of 'st', and the string is at the maximum length for a 32bit signed integer. 05:57
it could have some odd behavior..
Geth MoarVM/indexic_rescue: a507af5c4b | (Samantha McVey)++ | src/strings/ops.c
Made h_expansion able to hold integers 3x larger than MVMStringIndex

Ensure return value can hold numbers at least 3x higher than MVMStringIndex. Theoretically if the string has all ffi ligatures and 1/3 the max size of MVMStringIndex in length, we could have some weird results.
06:06
samcv on travis i get "Unrecognized revision specifier '9999-please-do-not-use-these-8-g0f25317'" when this is run perl Configure.pl --prefix=$MOAR_PREFIX --backends=moar; 06:09
Geth MoarVM/indexic_rescue: 49c93fe2b9 | (Samantha McVey)++ | src/strings/ops.c
Made h_expansion able to hold integers 3x larger than MVMStringIndex

Ensure return value can hold numbers at least 3x higher than MVMStringIndex. Otherwise, theoretically, if the haystack has all ffi ligatures and was 1/3 the max size of MVMStringIndex in length, we could have some weird results.
06:20
samcv timotimo, you broke travis :( 06:29
or it broke itself aronud the time you merged that PR 9 hours ago
or maybe it was a nqp change. hm 06:31
Geth MoarVM: b57075e8bd | (Samantha McVey)++ | .travis.yml
Add some more debugging to try and fix the Travis CI build
06:36
samcv timotimo, you broke build on appveyor... src\profiler\telemeh.c(3) : fatal error C1083: Cannot open include file: 'pthread.h': No such file or directory 06:43
Geth MoarVM: de3e5cfbee | (Samantha McVey)++ | .travis.yml
More travis debug
07:03
07:15 domidumont joined
Geth MoarVM: 21bfb7ef30 | (Samantha McVey)++ | src/strings/ops.c
Fix bug in index ignorecase and equal at ignorecase

This bug occurred when the entire length of the haystack was searched and all of the graphemes matched the needle.
If the needle exceeded the length of the haystack past that point, it would erroneously think there was a match there, as it only checked ... (18 more lines)
07:18
MoarVM: 49c93fe2b9 | (Samantha McVey)++ | src/strings/ops.c
Made h_expansion able to hold integers 3x larger than MVMStringIndex

Ensure return value can hold numbers at least 3x higher than MVMStringIndex. Otherwise, theoretically, if the haystack has all ffi ligatures and was 1/3 the max size of MVMStringIndex in length, we could have some weird results.
MoarVM: 8a3deb9b7b | niner++ (committed using GitHub Web editor) | src/strings/ops.c
Merge pull request #586 from MoarVM/indexic_rescue

Fix bug in index ignorecase and equal at ignorecase
07:21 domidumont joined
Geth MoarVM: b25147278b | (Stefan Seifert)++ | Configure.pl
Ignore the bogus 9999-please-do-not-use-these tag when generating version

Someone seems to have created a bogus tag. Luckily it's a so called lightweight tag, which we can easily ignore by not telling git describe to include those. We really only want to use tags with author information anyway.
07:32
08:16 domidumont joined
Geth MoarVM: 96ad4de25d | (Samantha McVey)++ | .travis.yml
Travis: readlink doesn't have `-f` on MacOS so make our own solution
08:19
timotimo samcv: i threw out the 9999 tag 09:06
samcv telemetry is failing on win 09:07
trying to use ifdefs so it doesn't compile on windows
appveyor building now
timotimo oh, thanks 09:10
samcv ack
still not
maybe it's trying to include the .h from the makefile? idk 09:11
i #if !defined(_WIN_32)
timotimo how do we do thread stuff in other parts of moarvm? all with libuv, i guess?
samcv in moar.h where the .h file is included
yes
timotimo don't you mean __WIN32__?
or ... __WIN_32__?
samcv MABYE
___________WIN32_________
idk i use #if defined(_WIN32) in memmem.h 09:12
and it works
timotimo fwiw i put the "please do not use these" tag in so that the release page on moarvm's github has an indication that you shouldn't use it
i used to delete all the releases manually
but every single release popped up when a new one was made
samcv maybe we should just revert it
so that we can bump NQP to get the string fix
more point releases! yay 09:13
timotimo now the question becomes: do we bump versions of moar and nqp by just .01 09:14
samcv but yeah see text here github.com/MoarVM/MoarVM/pull/586 how it works now. nothing is changed with what the ops returned but internal loop returns different values now
...
timotimo or do we make it "catch up" to rakudo's point release version?
samcv idk
i think we should bump it all together for less confusion
timotimo yeah
samcv but yeah we need a way for the indexic op to return not just position, but how many graphemes got expanded in the search 09:15
for equatic it's more simple because it only is boolean response
so the internal loop returns -1 for no match, and 0 or more for a positive match 09:16
0 if no expanded characters and then more depending on how many haystack graphs expanded
but idk what api to use if we want rakudo and nqp to know about this info
cause
m: say "abstaa" ~~ m:i/st/ 09:17
camelia 「sta」
timotimo i'll change telemeh to use uv_thread_create
samcv it has no clue about expand/unexponding chars
only knows the offset
idk can we bitshift it? and return a 64 bit value bitshifted :P
haha
or any other fancier things? 09:18
i mean we could retun an object not an integer but that seems like more work...
or array or whatever
thx timotimo
timotimo, uv handles arll the platform specific stuff for us. so super nice 09:20
abstraction ftw 09:21
timotimo yeah 09:22
it looks like uv_thread and friends are basically just pthreads
except it also works on windows
Geth MoarVM: 5fde54c608 | (Timo Paulssen)++ | src/profiler/telemeh.c
use uv threads instead of pthread for windows' sake
09:26
timotimo there we go 09:27
samcv well not pthreads on windows. but yeah 09:43
timotimo, have you tested on appveyor?
timotimo i have not :< 09:44
i'll run it now, though
it's going now
samcv timotimo, i see pthread there 09:48
in telemetry_finish
uv_thread_join(&backgroundSerializationThread);
pthread_join(backgroundSerializationThread, NULL);
timotimo oh lord 09:50
i forgot to delete the second line
Geth MoarVM: 5d13af660b | (Timo Paulssen)++ | src/profiler/telemeh.c
remove accidentally left-over pthread line
09:51
timotimo i should have done this in a branch and had you code-review
then i could have amended the commit and not have a shameful fix commit like that
src\profiler\telemeh.c(5) : fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
no way!
samcv yes 09:52
timotimo oh it's actually a posix thing?
samcv many issues
yep
why do you even need it?
timotimo seems like sleep uses it
i bet uv has a sleep function, too
samcv yes
timotimo it does not 09:53
the examples just use sleep(1)
gist.github.com/luoyetx/6b86f8b2732eca09177f - that seems easy enough? 09:55
samcv did you include libuv
timotimo yeah
otherwise how would the uv_ functions or the structs work? 09:56
samcv we don't use sleep anywhere
except telemeh
they have timers 09:57
timotimo, uv_sleep 09:58
or maybe uh
there is uv_sleep 09:59
try that
void uv_sleep(int msec);
timotimo why didn't i find it in the docs? >_< 10:00
samcv it doesn't exist
well it does in the tests
timotimo m)
samcv in libuv/test
timotimo fantastic
samcv so it's somewhere
oh
test/runner-win.c and test/runner-unix.c 10:01
timotimo ./libmoar.so: undefined reference to `uv_sleep'
samcv yeah
timotimo gr8
samcv it's in the test folder
void uv_sleep(int msec) { 10:02
Sleep(msec);
}
timotimo is that from windows.h?
samcv or for windows void uv_sleep(int msec) {
usleep(msec * 1000);
}
uhm
look at task.h
timotimo yeah ... 10:03
but i meant Sleep
samcv oh
timotimo maybe this is it. 10:05
Geth MoarVM/telemeh_windows_port: 15fce67770 | (Timo Paulssen)++ | src/profiler/telemeh.c
steal uv_sleep from their test suite

need proper attribution somewhere, still.
timotimo look, i made it a branch this time
samcv woo
timotimo so how do i ask appveyor to run that branch? 10:06
samcv you forgot
usleep(msec * 1000);
Sleep(ms)
timotimo oh? damn
samcv ye
Geth MoarVM/telemeh_windows_port: 7838868737 | (Timo Paulssen)++ | src/profiler/telemeh.c
steal uv_sleep from their test suite

need proper attribution somewhere, still.
10:07
timotimo look, i could amend and forcepush!
samcv see test/runner-win.c vs test/runner-unix.c
timotimo ok i got appveyor to start it
samcv put uv_sleep into platform or something 10:08
timotimo can do that later
samcv yeah ofc
timotimo i'll go turn on the sauna so i can have some relax today, too. and not only frustration :)
samcv i think windows.h is already included when you include libuv 10:09
not 100% sure tho
but i think so
timotimo looks like it compiles at least 10:11
samcv oh it complains
timotimo seriously 10:12
that's not an external symbol, that's an internal symbol
oh
i might have forgotten an #endif? 10:13
nope, it's in there
apparently windows has snprintf as _snprintf 10:14
wow, that's already in moar.c, too 10:15
samcv what is?
Geth MoarVM/telemeh_windows_port: aef495131d | (Timo Paulssen)++ | src/profiler/telemeh.c
snprintf is _snprintf on windows
timotimo ^- but that doesn't fix the missing telemetry symbols
samcv oh i see
yeha we have sprintf on windows
on main.c 10:16
timotimo yeah
platform.h will become 3x as big soon
samcv but windows has sprintf in stdio.h
timotimo well, yeah, but i want snprintf :) 10:17
samcv or is it erroring FROM moar.c having sprintf
uh site shows that snprintf is availible though?
did you try it?
without the _
timotimo what site? 10:18
samcv msdn.microsoft.com/en-us/library/2ts7cx93.aspx
timotimo src/moar.c
5:#define snprintf _snprintf
this is what i meant
samcv snprintf, _snprintf, _snprintf_l etc etc
timotimo could we concentrate on why it's seeming to miss the functions from telemeh.c? 10:19
in fact 10:20
stdio.h is already included there
and it gave the error
oh wtf it's still complaining about snprintf 10:21
samcv about _snprintf? 10:23
yeah
timotimo no, it's complaining about snprintf 10:24
i #define snprintf _snprintf but it's complaining that snprintf can't be found by the *linker*
uh, telemeh.c doesn't even use snprintf anywhere 10:25
what gives
it only uses fprintf
timotimo force-pushed over the unnecessary snprintf commit 10:26
oh crap, geth dieded 10:28
Zoffix: got a clue what i did to geth? perhaps it's because i forcepushed over that branch a bunch? 10:29
samcv timotimo, libuv uses snprintf
uhm 10:30
see
timotimo it seems like it could be the snprintf was put in by unrelated commits in a different part of moarvm
(also by me)
samcv 3rdparty/libuv/snprintf.c
see that file
timotimo i don't have that file 10:31
samcv src/win/snprintf.c
3rdparty/libuv/src/win/snprintf.c
10:31 Geth joined
timotimo jesus christ 10:31
we can't just use _snprintf 10:32
samcv no fun allowed
also
hm
Zoffix timotimo: the death was 'cause I killed it.. And I think I didn't detach screen right or something so it didn't come back right away
timotimo oh, ok!
samcv src/uv-common.h
timotimo ok so with uv-common.h we'd get their sprintf implementation
samcv uv-common.h has it
timotimo (if required)
samcv try including it and see if it works 10:34
timotimo first i must find the file that is using snprintf and is exploding because of it
because the linker sure as hell won't tell me which object file is trying to pull that in
samcv uhm
timotimo oh main.c could be
samcv we have in src/core/coerce.c
#define snprintf _snprintf
dunno tho 10:35
timotimo we have it in all manner of files
samcv oh moar.c has
timotimo but not in all files where it's used
samcv the same def
timotimo main.c doesn't
samcv yes it does
timotimo bytecodedump.c doesn't, either
samcv err moar.c i mean
bytecodedump has vsnprintf 10:36
not sprintf
timotimo ah, indeed
samcv maybe we should try using libuv's snprintf instead of the define's?
timotimo but src/core/exceptions.c defines vsnprintf _vsnprintf
samcv yes i see
timotimo but why? another file uses vsnprintf without the define and the linker isn't complaining about that 10:37
samcv idk
Zoffix mst: Seesm they did ignore it indeed. Thanks for trying to fix the travis stuff.
samcv so it doesn't complain
timotimo, just copy and paste it in somewhere
idk. moar.h or something silly
Geth MoarVM/telemeh_windows_port: 2c03c435e1 | (Timo Paulssen)++ | src/main.c
define some more snprintfs

if all of this works, we'll try getting libuv's snprintf-for-windows.
samcv the stuff in snprintf.c
timotimo tell me, am i incompetent, or is this actually an unreasonable amount of shit msvc is putting us through ...? 10:38
samcv uhm it is unreasonable but
i would steal their function since it should work everywhere
timotimo why steal it? we should get it from uv with includes somehow … 10:39
samcv well not if you don't include uv-common.h explicitly? dunno
#if !defined(snprintf) && defined(_MSC_VER) && _MSC_VER < 1900
extern int snprintf(char*, size_t, const char*, ...);
#endif
so idk
timotimo yeah
samcv i would just take try it
timotimo are you watching my appveyor? 10:40
samcv no
timotimo i'll go look if the sauna's ready and if so, i'll spend some time in it; afterwards i'll try to figure out why the MVM_telemetry functions are magically disappearing
samcv watching now
generating code 10:41
maybe it worked? hasn't failed yet. still maybe linking
timotimo generating code takes ages
that's the step before it complains with linker stuff
cool, snprintf works now 10:42
it was really the other files, not telemetry
but telemetry also gives us trouble
samcv failed
no snprintf errors tho
timotimo yup
samcv timotimo, include telemetry.h or whatever it's called in all of the files that use telemetry things
timotimo it would be very strange if that was the problem 10:43
samcv it's not always enough to put in moar.h
not a perfect world
where mscv doesn't suck
timotimo everything that includes moar.h also has telemeh.h included
BBIAB/BBL 10:44
samcv one would hope so. but the linker is having issues
i will try that i guess
timotimo i do see telemeh.c in the compiler output
and if it weren't in the commandline of the linker in the makefile, it wouldn't possibly work on linux either 10:45
but it definitely does work there
10:48 colomon joined
samcv ok well trying to add include all the places it's used ci.appveyor.com/project/samcv/moar...k5u2n7hne7 10:49
will be back in a bit
timotimo it still got that error, huh 11:13
can we perhaps get appveyor to cat the Makefile it generated? 11:15
well, we can just put that in there for everything and just run it on appveyor
Geth MoarVM/telemeh_windows_port: 41a5d7de21 | (Timo Paulssen)++ | .appveyor.yml
dear appveyor, tell us what makefile contents we generated
11:21
MoarVM/telemeh_windows_port: 408efabe9b | (Timo Paulssen)++ | .appveyor.yml
maybe NOISY=1 will help us figure out what's wrong
11:33
timotimo i think i know what's wrong 11:39
Geth MoarVM/telemeh_windows_port: 6140253446 | (Timo Paulssen)++ | src/profiler/telemeh.h
use MVM_PUBLIC for telemetry functions
timotimo it's tough to figure stuff like this out if you're developing on linux, because (if i remember correctly) there MVM_PUBLIC is just the empty string 11:41
21:#define MVM_DLL_IMPORT __attribute__ ((visibility ("default"))) 11:42
22:#define MVM_DLL_EXPORT __attribute__ ((visibility ("default")))
23:#define MVM_DLL_LOCAL __attribute__ ((visibility ("hidden")))
this is what MVM_PUBLIC is
if i had started with a mvm file already, i'd've immediately noticed i'd have to put MVM_PUBLIC, but since i was adapting code from a friend, i started with nothing mvm-related m) 11:43
BBIAB 11:47
12:05 MasterDuke_ joined 12:29 AlexDaniel joined
Geth MoarVM: b7627e1035 | (Timo Paulssen)++ | 2 files
put _snprintf in place where snprintf was carelessly introduced
12:33
MoarVM: f606d56098 | (Timo Paulssen)++ | src/profiler/telemeh.c
throw out old sleep from unistd, alias Sleep and usleep to MVM_sleep
MoarVM: 134d8f2075 | (Timo Paulssen)++ | 2 files
make MVM_telemetry_* functions MVM_PUBLIC
12:42 colomon_ joined
Geth MoarVM: 43beb32b66 | (Timo Paulssen)++ | src/profiler/telemeh.c
we abstain from anonymous unions in this town.
15:24
16:53 domidumont joined 20:40 zakharyas joined
Geth MoarVM: f0db8822f5 | (Samantha McVey)++ | src/strings/ops.c
Fix all known remaining bugs in indexic and eqatic

Better logic for determining if we have traversed the whole length of the needle. Use this logic in MVM_string_equal_at_ignore_case in addition to MVM_string_index_ignore_case
Also better naming of a variable for the INTERNAL loop.
20:47
samcv timotimo, you think anyone will be against naming h_graphs to H_graphs because h's kind of look like n's 21:07
and we use n_graphs for needles.
h_g and n_g look pretty similar. so i may change them. it'd make me happy 21:09
probably a good idea if it can lead to less mistakes and clearer code 21:11
timotimo maybe s_graphs vs n_graphs? 21:15
for "stack"?
samcv :S
i just replaced all h with H
and it really is nice to look at
way easier to visually parse
timotimo yeah, i don't think it'd be a problem 21:16
i should probably rename local variables and parameters in telemeh to use foo_bar instead of fooBar 21:17
samcv github.com/samcv/MoarVM/blob/Hayst...#L203-L220 see this 21:18
way nicer i think
timotimo yeah, not bad 21:19
21:19 ilmari joined
timotimo what is bad is that C won't let us use unicode or emoji in identifiers 21:19
.u needle
yoleaux No characters found
timotimo .u hay
yoleaux U+0DC4 SINHALA LETTER HAYANNA [Lo] (හ)
timotimo :\
samcv you sure?
it can use it in strings though
timotimo mhm
samcv variable names are not bundles of bytes?
timotimo don't know
samcv ack i lost my atom settings 21:20
i moved my backup'd folder back to original location while it was still open
and it hosed it 21:21
since it wrote to it before it quit
timotimo whoops
that's bad :(
samcv i have a backup from a while ago, may be good enough. cause i had perl 5 and C templates 21:22
so i could do quick ad hoc C code tests
with includes and main etc all setup already
timotimo right
samcv oh. i have a backup on an external drive. maybe will use that
timotimo nice. 21:23
samcv YAY 21:24
has my templates
that's the only thing i really cared about... easy to just install missing packages easily
22:24 ggoebel joined 23:13 Ven joined
mst Zoffix: we can probably email them 23:35
samcv jnthn, that i assume all your modules are Artistic-2.0? 23:48
if no license listed?
and submit PR's for adding metadata to META6.json
TimToady I added Artistic-2.0 to Grammar::Debugger and he didn't go ballistic :) 23:52
mst <3 GPL2+ + AL 2+
MasterDuke_ TimToady: is there a way to create variables with spaces in their name? i thought i'd seen you do it before 23:54
TimToady would have to be with term: somehow 23:56
MasterDuke_ ah, no ::('.*') magic or anything like that? 23:57
TimToady though it might scan the word for space to disallow it, don't remember
::() could only be used to describe a type that is in a compile-time value, otherwise would be a run-time thing 23:59