Re: [rust-dev] Dynamic in Rust

2013-08-22 Thread Abhijeet Gaiha
these types there. > > > On Fri, Aug 23, 2013 at 7:54 AM, Abhijeet Gaiha > wrote: > >> You could define an enum that encapsulates all known types. >> >> enum monster { >> Integer(int), >> Float(float), >> >> } >> &

Re: [rust-dev] Dynamic in Rust

2013-08-22 Thread Abhijeet Gaiha
You could define an enum that encapsulates all known types. enum monster { Integer(int), Float(float), } Then use a container for this type. On Aug 23, 2013 10:20 AM, "Oren Ben-Kiki" wrote: > Is it possible to implement something like Haskell's Dynamic value holder > in Rust? (Th

Re: [rust-dev] Static initialisation of LinearMap

2013-07-02 Thread Abhijeet Gaiha
the same? -- Abhijeet Gaiha http://about.me/abhijeet.gaiha On Tuesday, 2 July 2013 at 7:10 PM, Corey Richardson wrote: > On Tue, Jul 2, 2013 at 9:26 AM, Abhijeet Gaiha (mailto:abhijeet.ga...@gmail.com)> wrote: > > Hi Folks, > > > > Is there a way to statically initia

[rust-dev] Static initialisation of LinearMap

2013-07-02 Thread Abhijeet Gaiha
Hi Folks, Is there a way to statically initialise a LinearMap in code? Something like you can do with a vector. Any other suggestions to save time for inserting a fixed set of values into a hash map? Thanks, Abhijeet -- Abhijeet Gaiha http://about.me/abhijeet.gaiha

Re: [rust-dev] Memory pool for C lib malloc calls

2013-06-06 Thread Abhijeet Gaiha
un 6, 2013 at 12:29 PM, Abhijeet Gaiha > wrote: > > Hi, > > > > Servo uses several c libraries through Rust wrappers. In such a > situation, > > I'm curious as to where is the memory for malloc calls inside these > > libraries allocated from? This doesn't

[rust-dev] Memory pool for C lib malloc calls

2013-06-06 Thread Abhijeet Gaiha
Hi, Servo uses several c libraries through Rust wrappers. In such a situation, I'm curious as to where is the memory for malloc calls inside these libraries allocated from? This doesn't seem to fit into the standard locations viz. Task Heap, Exchange Heap and Local stack. In C programs there is a

Re: [rust-dev] Mutability and borrowing

2013-06-01 Thread Abhijeet Gaiha
The 'copy' parameter is the most generic way for the client to handle this situation. -- Abhijeet Gaiha http://about.me/abhijeet.gaiha On Sunday, 2 June 2013 at 10:32 AM, Ziad Hatahet wrote: > Thanks everyone. I actually thought about the two suggestions before posting. >

Re: [rust-dev] Mutability and borrowing

2013-06-01 Thread Abhijeet Gaiha
Trying to concurrently borrow a value twice is never going to work. You could write a function like "double" for such a situation. -- Abhijeet Gaiha http://about.me/abhijeet.gaiha On Sunday, 2 June 2013 at 10:03 AM, Ziad Hatahet wrote: > I have the following function: >

[rust-dev] String Internment Library

2013-04-25 Thread Abhijeet Gaiha
There is an issue on Servo #282, which talks about having a uniform string internment strategy across Rust, Spidermonkey and NetsurfCSS. Is there any existing string internment library in Rust? If not, any plans to provide one? ___ Rust-dev mailing list

Re: [rust-dev] Cloning RWARC

2013-04-17 Thread Abhijeet Gaiha
Try data.clone() instead. On Wednesday, April 17, 2013, Alexander Stavonin wrote: > Hi, > > I'd like to clone RWARC object. For example: > > let data = arc::RWARC(get_data()); > > How can I do it? I tried next: > > let read_data = arc::clone(&data); > > But looks like I have to write somethin

[rust-dev] TCP Library Selection

2012-12-10 Thread Abhijeet Gaiha
Hi, Looks like there are three different libraries for TCP socket functionality: Net_tcp Uv_ll Net::tcp Could someone enlighten me as to which one is the recommended library to use? Thanks very much! Regards, Abhijeet ___ Rust-dev mailing list Rust-dev