<SeanTAllen>
we open issues for requests to create a RFC
<SeanTAllen>
perhaps that was your intent
<SeanTAllen>
in which case, you are basically saying "someone please think about this and create a RFC for it"
<SeanTAllen>
vs creating the RFC yourself and having to work through any issues
<SeanTAllen>
if the former is what you intended then you are good
<SeanTAllen>
just want to make sure that was your intent
<zevlg>
SeanTAllen: I'm not that confident in the topic in order to create RFC, I think jemc could do much better. I can intensively test the implementation or help in any kind
<zevlg>
that was my intention in creating that issue
<SeanTAllen>
sounds good then
<SeanTAllen>
^5
jemc has joined #ponylang
jemc has quit [Quit: WeeChat 1.4]
jemc has joined #ponylang
amclain has joined #ponylang
<zevlg>
jemc: hey, I wrote https://github.com/ponylang/rfcs/blob/master/README.md I'm not so confident about creating RFC for this issue, could you please consider making RFC for this thing? I could test the implementation and help in as I can
<SeanTAllen>
zevlg: i dont think that is the link you intended
prettyvanilla has quit [Ping timeout: 260 seconds]
<dougmacdoug>
just curious.. what is the problem with just putting the data in the struct yourself? what use case do you have where you need multiple ways to access a data from union ? that seems like it would only be the concern of the internal C api.. you could even write a pony union type with a simple let match to populate the correct U8 tuple ..
<zevlg>
dougmacdoug: adhoc solution is of course possible right now, you just calculate biggest field in union and add it as field, and then just cast to type you need. It does not feels natural however, having builtin union type doing all that work for you - that is feels natural :)
<jemc>
dougmacdoug: many C libraries have unions as part of their public interface, so being able to deal with them from Pony would be a prerequisite to using thoe from FFI
<jemc>
also, bitcasting isn't possible in Pony without using a lot of C hackery
<jemc>
zevlg: I'll bring it up for discussion on today's sync call, to get some basic feedback on the idea and what pitfalls we might run into with it
<dougmacdoug>
well, i've only done a few things with ffi so far, but it just seemed to me you could write a wrapper class that would convert a pony union type to the correct collection of U8 tuples to pass to the C call and reverse
<dougmacdoug>
ah, nvm.. i see the issue now..
Matthias247 has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
<jemc>
zevlg: which C library are you trying to bind to, by the way?
<aav>
if I have Array[U8] ref - how is it possible to create Array[U8] val out of it? (obviosly it must be a copy)
<aav>
but it will not work, if source array would be a class member (cannot be consumed)
<SeanTAllen>
aav: you need to copy from the one to the other
Matthias247 has joined #ponylang
aav- has joined #ponylang
Matthias247 has quit [Read error: Connection reset by peer]
aav- has quit [Client Quit]
Matthias247 has joined #ponylang
aav- has joined #ponylang
<jemc>
aav: we have a solution for making `Array.clone` work better with capabilities, but it requires this RFC (which has already been accepted) to be implemented: https://github.com/ponylang/rfcs/pull/62
<jemc>
for now the workaround is to do a loop and copy one element at a time with `push`
aav- has quit [Client Quit]
lisael has joined #ponylang
wizeman has quit [Quit: Connection closed for inactivity]
SparkySparkyBoom is now known as flippant
Matthias247 has quit [Read error: Connection reset by peer]