Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Record metadata
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  11 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
dmitry kolesnikov  
View profile  
 More options Mar 27 2012, 2:58 am
From: dmitry kolesnikov <dmkolesni...@gmail.com>
Date: Tue, 27 Mar 2012 09:58:56 +0300
Local: Tues, Mar 27 2012 2:58 am
Subject: [erlang-questions] Record metadata
Hello,

Let say I do have a record definition:
-record(my, {
 a :: atom(),
 b :: binary()

}).

Are there any possibility to extract a metadata of record elements
during run-time? E.g call_some_magic_fun that says R#my.a is atom,
R#my.b is binary...

Thanks for any advice!

Best Regards,
Dmitry >-|-|-*>
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Tim Watson  
View profile  
 More options Mar 27 2012, 6:49 am
From: Tim Watson <watson.timo...@gmail.com>
Date: Tue, 27 Mar 2012 11:49:56 +0100
Local: Tues, Mar 27 2012 6:49 am
Subject: Re: [erlang-questions] Record metadata
You'd need the abstract code available and then you can call
dialyzer_utils:get_record_and_type_info/1 which returns a dict
containing the type information. You can then pass this dict to
various functions in the erl_types module to get back information
about type specs.

If you don't want to rely on dialyzer at runtime, you'll need to
copy-paste the code from dialyzer_utils AFAICT. Also the erl_types
module is part of hipe.

On 27 March 2012 07:58, dmitry kolesnikov <dmkolesni...@gmail.com> wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Erlang record accessors (set/get)" by Zabrane Mickael
Zabrane Mickael  
View profile  
 More options Aug 14 2012, 9:04 pm
From: Zabrane Mickael <zabra...@gmail.com>
Date: Wed, 15 Aug 2012 03:04:14 +0200
Local: Tues, Aug 14 2012 9:04 pm
Subject: [erlang-questions] Erlang record accessors (set/get)

Hi guys,

We want to provide a simple API to one of our customers not very familiar with Erlang.
This API involves records manipulations (set/get operations) and you know what I mean.

Before re-writing the wheel, I'd like to know is someone already used "recbird" before:
http://blogtrader.net/blog/recbird_an_erlang_dynamic_record

Any use case? Is it stable? Better alternatives?
Feedbacks welcome!

Regards,
Zabrane

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Loïc Hoguin  
View profile  
 More options Aug 14 2012, 9:10 pm
From: Loïc Hoguin <es...@ninenines.eu>
Date: Wed, 15 Aug 2012 03:10:54 +0200
Local: Tues, Aug 14 2012 9:10 pm
Subject: Re: [erlang-questions] Erlang record accessors (set/get)
Val = element(#myrec.fieldname, Rec).
Rec2 = setelement(#myrec.fieldname, Rec, NewVal).

Or something approximating that.

On 08/15/2012 03:04 AM, Zabrane Mickael wrote:

--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Truog  
View profile  
 More options Aug 14 2012, 9:20 pm
From: Michael Truog <mjtr...@gmail.com>
Date: Tue, 14 Aug 2012 18:20:24 -0700
Local: Tues, Aug 14 2012 9:20 pm
Subject: Re: [erlang-questions] Erlang record accessors (set/get)
It may seem a bit silly, but you could wrap element and setelement in macros that relate to the record name with short get/set names.  That would probably make it simpler for those that are addicted to get/set.

On 08/14/2012 06:10 PM, Loïc Hoguin wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Juan Jose Comellas  
View profile  
 More options Aug 14 2012, 10:08 pm
From: Juan Jose Comellas <jua...@comellas.org>
Date: Tue, 14 Aug 2012 23:08:03 -0300
Local: Tues, Aug 14 2012 10:08 pm
Subject: Re: [erlang-questions] Erlang record accessors (set/get)

We developed a similar parse transform that you can find here:

https://github.com/Erlymob/emob/blob/master/src/dynarec.erl

It's very simple to use. The explanation is at the beginning of the file.
There's also Ulf Wiger's exprecs module from his parse_trans application:

https://github.com/uwiger/parse_trans/blob/master/src/exprecs.erl

Hope it helps,

Juanjo

On Tue, Aug 14, 2012 at 10:04 PM, Zabrane Mickael <zabra...@gmail.com>wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zabrane Mickael  
View profile  
 More options Aug 15 2012, 5:00 am
From: Zabrane Mickael <zabra...@gmail.com>
Date: Wed, 15 Aug 2012 11:00:59 +0200
Local: Wed, Aug 15 2012 5:00 am
Subject: Re: [erlang-questions] Erlang record accessors (set/get)

Thanks for your feedbacks guys.

Regards,
Zabrane

On Aug 15, 2012, at 4:08 AM, Juan Jose Comellas wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Michael Uvarov  
View profile  
 More options Aug 15 2012, 5:34 am
From: Michael Uvarov <free...@gmail.com>
Date: Wed, 15 Aug 2012 13:34:16 +0400
Local: Wed, Aug 15 2012 5:34 am
Subject: Re: [erlang-questions] Erlang record accessors (set/get)
Something like this (but for multiple fields) is used here:
https://github.com/freeakk/rum#example-2
_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zabrane Mickael  
View profile  
 More options Aug 15 2012, 9:49 am
From: Zabrane Mickael <zabra...@gmail.com>
Date: Wed, 15 Aug 2012 15:49:09 +0200
Local: Wed, Aug 15 2012 9:49 am
Subject: Re: [erlang-questions] Erlang record accessors (set/get)

Hi Juan,

What's the current emob's license (GPL, BSD...)?

Regards,
Zabrane

On Aug 15, 2012, at 4:08 AM, Juan Jose Comellas wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Zabrane Mickael  
View profile  
 More options Aug 15 2012, 9:51 am
From: Zabrane Mickael <zabra...@gmail.com>
Date: Wed, 15 Aug 2012 15:51:04 +0200
Local: Wed, Aug 15 2012 9:51 am
Subject: Re: [erlang-questions] Erlang record accessors (set/get)

Sorry, just found it inside the code: New BSD, right?

Regards,
Zabrane

On Aug 15, 2012, at 3:49 PM, Zabrane Mickael wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mahesh Paolini-Subramanya  
View profile  
 More options Aug 15 2012, 10:08 am
From: Mahesh Paolini-Subramanya <mah...@dieswaytoofast.com>
Date: Wed, 15 Aug 2012 10:08:57 -0400
Local: Wed, Aug 15 2012 10:08 am
Subject: Re: [erlang-questions] Erlang record accessors (set/get)

yup...

Cheers
Mahesh Paolini-Subramanya
That Tall Bald Indian Guy...
Blog   |   Twitter   |   Google+

On Aug 15, 2012, at 9:51 AM, Zabrane Mickael wrote:

_______________________________________________
erlang-questions mailing list
erlang-questi...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »