nyarum has quit [Remote host closed the connection]
smoon has joined #ponylang
aav has quit [Read error: Connection reset by peer]
aav has joined #ponylang
atk has quit [Ping timeout: 246 seconds]
atk has joined #ponylang
smoon has quit [Quit: smoon]
k0nsl has quit [Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”]
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has joined #ponylang
vaninwagen_ has joined #ponylang
papey_lap has quit [Quit: WeeChat 1.8]
papey_lap has joined #ponylang
endformationage has quit [Quit: WeeChat 1.7]
srenatus[m] has quit [Remote host closed the connection]
dtz has quit [Remote host closed the connection]
M-hrjet has quit [Remote host closed the connection]
irx[m] has quit [Remote host closed the connection]
buchanon[m] has quit [Read error: Connection reset by peer]
dom96 has quit [Ping timeout: 240 seconds]
aav has quit [Ping timeout: 240 seconds]
irx[m] has joined #ponylang
aav has joined #ponylang
dom96 has joined #ponylang
fluttershy_ has joined #ponylang
srenatus[m] has joined #ponylang
M-hrjet has joined #ponylang
dtz has joined #ponylang
buchanon[m] has joined #ponylang
rurban has joined #ponylang
fluttershy_ has quit [Quit: Page closed]
rurban has quit [Quit: Leaving.]
papey_la1 has joined #ponylang
papey_lap has quit [Ping timeout: 260 seconds]
rurban has joined #ponylang
_andre has joined #ponylang
rurban has quit [Ping timeout: 240 seconds]
srenatus[m] has quit [Remote host closed the connection]
M-hrjet has quit [Remote host closed the connection]
dtz has quit [Remote host closed the connection]
irx[m] has quit [Remote host closed the connection]
buchanon[m] has quit [Read error: Connection reset by peer]
Candle has quit [Ping timeout: 255 seconds]
buchanon[m] has joined #ponylang
irx[m] has joined #ponylang
dtz has joined #ponylang
srenatus[m] has joined #ponylang
M-hrjet has joined #ponylang
vaninwagen_ has quit [Ping timeout: 246 seconds]
nyarum has joined #ponylang
fluttershy_ has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 260 seconds]
Candle has joined #ponylang
nyarum has joined #ponylang
<fluttershy_>
is it only with arrays that I have to specify reference capabilities ?
fluttershy_ has quit [Quit: Page closed]
<SeanTAllen>
i dont understand the question fluttershy_. my default answer is "no". but i suspect you are asking something deeper. can you provide some code that will flesh out your question?
k0nsl has quit [Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”]
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has joined #ponylang
k0nsl has quit [Remote host closed the connection]
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has joined #ponylang
papey_la1 is now known as papey_lap
fluttershy_ has joined #ponylang
<fluttershy_>
SeanTAllen: because here is used different actors to calculate pi : https://is.gd/rBJfjc I never got the error that variable in not sendable or not a sub type of this or that. but when I started using arrays It got very complicated. so I put the errors in comments because I don't think you have dependencies installed, the code is just to do matrix multiplication : http://pony-playpen.lietar.net/?gist=3160f90a39e3a31b723d69619
<fluttershy_>
I fixed some of the bugs and still working on the other errors
k0nsl has quit [Quit: “If we don't believe in freedom of expression for people we despise, we don't believe in it at all — Noam Chomsky”]
k0nsl has joined #ponylang
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has quit [Remote host closed the connection]
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has joined #ponylang
k0nsl has quit [Excess Flood]
k0nsl has joined #ponylang
k0nsl has quit [Changing host]
k0nsl has joined #ponylang
<SeanTAllen>
i cant see the code right now due to github issues
<fluttershy_>
ok np
<SeanTAllen>
so
<SeanTAllen>
you get an error that a variable isnt sendable, yes?
<SeanTAllen>
and you are trying to send it to another actor?
<SeanTAllen>
can you recreate your playpen example fluttershy_ ?
<fluttershy_>
yes but it is apparently is fixed when I specify val or iso, this only occurred with me when I used arrays.
<SeanTAllen>
do you understand why val and iso work?
<fluttershy_>
ok I'll make a cleaner code
<SeanTAllen>
doesnt need to be cleaner
<SeanTAllen>
the link you sent doesnt work for me
<SeanTAllen>
it cant load the gist
<SeanTAllen>
the important question though is: do you understand why val and iso work whereas ref doesn't?
<SeanTAllen>
can you tell me what the difference between `ref`, `iso` and `val` are?
<SeanTAllen>
i'm not trying to quiz
<SeanTAllen>
just to establish how much i would tell you
<fluttershy_>
ref is mutable, val is immutable, iso is mutable but only one reference of iso can exist unlike ref I think
<SeanTAllen>
that is correct
<SeanTAllen>
so
<SeanTAllen>
you want to send mutable data from 1 actor to another but hold on to it in the first actor
<SeanTAllen>
that is what `ref` means when you try to send it to another actor
<SeanTAllen>
do you see how that is unsafe? if not, i can explain
<fluttershy_>
ah yes I see
<SeanTAllen>
so that is why you need to change your reference capability there
<SeanTAllen>
you have some options
<SeanTAllen>
you can keep a mutable reference in your first actor and make an immutable copy and send to the other actor
<SeanTAllen>
or you can use an iso, give up your alias to it and send to the other actor and replace the original iso in your first actor with a new iso
<SeanTAllen>
the iso method is what TCPConnection does with its read buffer
<fluttershy_>
yes I see.
<fluttershy_>
here I didn't have to specify iso : https://is.gd/rBJfjc, then I guess it is by default.
nyarum has quit [Remote host closed the connection]
<SeanTAllen>
what variable specifically are you saying you didnt have to specify `iso` on?
<fluttershy_>
for example sum in collect behavior is F64
<SeanTAllen>
F64 is a machine type. Its a primitive. There is only one "1.0" so there's no reference capability.
<SeanTAllen>
Reference capabilities apply to classes, not primitives.
<SeanTAllen>
Primitives are singletons.
<SeanTAllen>
So, its always safe to share because its immutable.
<fluttershy_>
ah ok I see.
<fluttershy_>
thank you for being patient :)
<SeanTAllen>
it's why were are here. glad to help.
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 240 seconds]
nyarum has joined #ponylang
fluttershy_ has quit [Quit: Page closed]
shee has joined #ponylang
shee has quit [Client Quit]
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
<cquinn>
here's a sort of related question: what if you wanted a mutable variant of a primitive that could be ref-shared within one actor. I know I could make an Array[T](1), but is there an easier way using existing stdlib types?
nyarum has quit [Remote host closed the connection]
<SeanTAllen>
what do you mean by a mutable variant of a primitive cquinn ?
<cquinn>
a class type for each of the primitives whose value could be mutated
<cquinn>
In Go you can use a *Int to have a reference to a variable that you could overwrite
<cquinn>
(or C/C++)
<cquinn>
I would like to make the cli parser easier to retrieve the results from, by allowing an indirection of some kind so that the parser can plug the results right into variables that the caller provided.
<cquinn>
using an Array of size 1 would work, but seems clumsy
<SeanTAllen>
So a pointer?
<cquinn>
yes, that would work
renato_ has joined #ponylang
renato_ is now known as Guest40221
<SeanTAllen>
i think you could use Pointer[U8] or whatever for that but I've never tried.
<cquinn>
I think that would work in theory, but the necessary _apply() method is private
TheLemonMan has joined #ponylang
<cquinn>
Another approach would be to accept a Lambda for each result that would then write the value to the variable. But that's a lot of boiler plate for the user to write I think
<cquinn>
like: `{(r: I64) => _updaters = r }`
Guest40221 has quit [Quit: Page closed]
taide has joined #ponylang
<taide>
Hi... I came here before and talked about helping start work on the language server for Pony. The first thing was to create a JSON-RPC library... any exiting work on that so far?
nyarum has joined #ponylang
nyarum has quit [Remote host closed the connection]
nyarum has joined #ponylang
nyarum has quit [Ping timeout: 246 seconds]
<aav>
taide: i heard nothing about json-rpc, but I currently work and i'm quite close to first version of Google Protobuf implementation for Pony
<aav>
which will also include json serialization for protobuf messages
<taide>
nice... but the LS uses JSON-RPC, it says on the docs.
<taide>
If no one is doing it, I will try to.
<cquinn>
wooo, protobufs
<cquinn>
will you be doing code-generation for the protobuf support?
TheLemon1an has quit [Remote host closed the connection]
<SeanTAllen>
taide: i dont think anyone is working on it
<SeanTAllen>
aav: nice!
katafrakt has joined #ponylang
<katafrakt>
Hello! I'm having troubles compiling anything with pony on arch linux since yesterday. Even when building from source, it does not work: https://slexy.org/view/s20kD8TP6V
_andre has quit [Quit: leaving]
vaninwagen_ has quit [Ping timeout: 272 seconds]
katafrakt[m] has joined #ponylang
katafrakt has quit [Quit: Page closed]
Matthias247 has quit [Read error: Connection reset by peer]