github.com/moarvm/moarvm | IRC logs at colabti.org/irclogger/irclogger_logs/moarvm
Set by AlexDaniel on 12 June 2018.
MasterDuke .tell brrt some previous comments/etc about a template for sp_findmeth github.com/MoarVM/MoarVM/pull/787/ 01:57
yoleaux MasterDuke: I'll pass your message to brrt.
Zoffix 😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍 03:07
Announcing: Raku Perl 6 'Diwali' 6.d Specification Release: blogs.perl.org/users/zoffix_znet/20...lease.html
😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍😍
Geth MoarVM: Kaiepi++ created pull request #993:
[WIP] Implement getsockopt/setsockopt support
07:41
brrt \o 16:04
yoleaux 01:57Z <MasterDuke> brrt: some previous comments/etc about a template for sp_findmeth github.com/MoarVM/MoarVM/pull/787/
brrt see, I knew there was something 16:05
oh, that's no longer true
nine So my ignorance was a good thing :) 16:25
dogbert17 oh, valgrind is angry 17:35
nine: are you around? 17:40
here's the gist of the matter: gist.github.com/dogbert17/a5a294ab...60b17ae10e 17:42
nine dogbert17: now 19:47
yoleaux 19:13Z <cygx> nine: does this sound viable to you: gist.github.com/cygx/de15015296c90...3bd1df526c
dogbert17 nine: and I didn't see it until now :) 20:17
there's reason to believe that one nasty bug is still left in the material you merged the other day 20:18
I think the gist above shows it quite well but there are also a couple of reports by MasterDuke (among the Moarvm issues) 20:20
nine dogbert17: I'm stumped. That would mean that there's uninitialized data in a place where a label should be. That could only happen if there's a hole in the bytecode.
dogbert17 perhaps the was another commit with, i.e. not your work, which caused this 20:21
*there 20:22
also, the 32 bit build is broken, it just hangs
nine I'd still guess that both are caused by my merge. It was a very intrusive change after all 20:24
dogbert17 I have actually seen an error with the message mentioning a label problem 20:25
nine: in case I have messed up, can you repro the problem? 20:27
nine yep 20:28
dogbert17 now I got: ===SORRY!=== 20:29
Duplicate label at 154624
dogbert17 running MVM_SPESH_DISABLE=1 ./perl6-valgrind-m --target=ast -e '' doesn't lead to any complaints. Running with --target=mast shows one complaint 20:52
Kaiepi will writing code like this run across all compilers? 20:55
void *foo; int bar = 1; foo = &(int){ bar }
brrt Kaiepi: not sure what the meaning of the brackets is? 21:12
but in general a void pointer can point to any other pointer
and any other pointer can be 'taken' out of a void pointer 21:13
so:
int bar = 1; void * foo = &bar; /* this is meaningful and legal C */
Kaiepi ah 21:16
thanks
brrt .tell mst that 'raku' perl 6 on MoarVM does have the ability to fork() ;-)
yoleaux brrt: I'll pass your message to mst.
Kaiepi wait that's not the issue i was having 21:17
brrt wait, waitpid, etc. and the whole shebang, that's something different
Kaiepi the code i'm dealing with looks more like this:
brrt now the monkey is coming out of the sleeve
:-)
Kaiepi MVMint64 option = SO_BROADCAST; void *value = &(int){ option };
brrt yeah, I really don't see what that syntax means 21:18
what's the meaning of &(int) { option }; ?
Kaiepi it casts option to an int, then makes a reference to it 21:19
brrt but why the brackets?
Kaiepi i'm not sure
brrt hmmm
Kaiepi i'll test without them to see if it works
brrt so, where did you dig up this code? 21:20
well, it's probably possible, I just don't like it very much, tbh
what is wrong with just taking the reference to option?
or doint 'int option = (int) SO_BROADCAST; void * value = *option;'
Kaiepi option's an MVMint64 argument to the function 21:21
hold on i'll link you the code
Kaiepi hastebin.com/kizikoxogi.cs 21:23
brrt well, I'm not sure, tbh, but I find that code suspect 21:25
I'm not sure a cast-to-int-then-address will work correctly on a bigendian system 21:26
I can be wrong about that, but why write code like that when you can do the sane thing, and either pass a correctly sized int to begin with, or cast to a variable and take the address of that? 21:27
(and, where did you dig up this code?) 21:28
Kaiepi it's part of the pullreq i'm making on implementing getsockopt/setsockopt support
it still needs a lot of work
brrt yes, I saw that 21:29
the reason I'm asking is because, if this code was entirely your design, you'd know why you put the brackets there. If this code comes from some other place, like, say, stackoverflow, then I'm inclinded to ask further about licenses etc 21:30
I'm sorry for being difficult about this but someone has to
Kaiepi fair
Kaiepi idr where i saw it, it could've been elsewhere in moar 21:31
i'll try grepping for it
brrt thanks 21:32
cygx brrt Kaiepi: &(int){ option } applies the address operator to a compund literal, a C99 feature 21:48
yoleaux 19:49Z <nine> cygx: I've been thinking about that for years actually :) The trick is to find the end of the v5 block. If you can do that, the rest seems easy. metacpan.org/pod/PPR seems to be the best bet for that
19:50Z <pmurias> cygx: yes it's doable
20:05Z <pmurias> cygx: I remember I managed to get Perl 5 to give me the end of the block with the pluggable keyword mechanisms in the past
20:06Z <pmurias> cygx: but it was a super long time ago and I don't rememember
cygx *compound literal
Kaiepi damn, guess i can't use it
but yeah i should refactor my code so i don't have to cast so many variables like that 21:49
cygx it's not really any different than taking the address to a local variable 21:50