[erlang-questions] [ANN] yaml loader

43 views
Skip to first unread message

Daniel Goertzen

unread,
May 23, 2012, 11:31:21 PM5/23/12
to Erlang Questions
I'm pleased to announce an application for loading YAML files into
Erlang. This implementation supports:

- Detailed errors on yaml load failures (line, column, reason)
- Anchors and aliases
- Merge tags
- The tag !atom for explicitely tagging values as atoms.
- An implicit_atoms mode to interpret values that look atom-ish as atoms.
- Customizable schemas via callback modules.
- Loading only, but perhaps it will also emit YAML in the future.

This application embeds the C yaml parser "libyaml" which is compiled as a NIF.

Details at https://github.com/goertzenator/yaml

For those unfamiliar with YAML, it is similar to JSON with a strong
focus on human readability and writeability. If you need to type in
lots of structured data, YAML is a decent choice.


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

Tim McNamara

unread,
May 23, 2012, 11:38:11 PM5/23/12
to Erlang Questions
This is really great. Having an Erlang implementation is excellent.
Strongly suggest changing the project name from "yaml" though.

YAML does have a few (IMO) advantages over JSON apart from readability:

- comment syntax
- named entities
- supports streaming more easily*


* Although it looks like yaml:load_file/1 loads everything into memory.

Daniel Goertzen

unread,
May 24, 2012, 9:42:58 AM5/24/12
to Erlang Questions
You're right, that's a terrible name for this project. I wanted the
main module to be "yaml" but that doesn't mean the application or
project has to be called that. This project is now at:

https://github.com/goertzenator/goyaml

Apologies for those who already watched or forked.

Regarding streaming, libyaml forced me to go with an all-at-once
approach. Erlang native processes would help overcome this, as would
a parser written in Erlang.

Dan.
--
Daniel Goertzen | Senior Software Engineer
Office: 828.610.4596 | Fax: 828.322.5294 | da...@networkintegritysystems.com
Network Integrity Systems | We Bring Security To Light™

1937 Tate Blvd. SE

Hickory, North Carolina, USA 28602

Network Integrity Systems’ INTERCEPTOR™ Optical Network Security
System is a Smart-PDS™ that ensures superior protection and cost
effectiveness of classified networks.  For more information, visit our
website at:www.networkintegritysystems.com.


__________________________________________
INTERCEPTOR™ Optical Network Security System is made in the USA for
the USA. Although not an export controlled item, because of the role
it plays in the assurance of the safety and integrity of National
Security Information, Network Integrity Systems (NIS) is committed to
compliance with the U.S. Export Administration Act. Accordingly, NIS
will not ship INTERCEPTOR products to certain foreign government end
users without U.S. government approval and will refuse transactions
with individuals or entities that have been denied export privileges.

Gleb Peregud

unread,
May 24, 2012, 9:46:27 AM5/24/12
to Daniel Goertzen, Erlang Questions
On Thu, May 24, 2012 at 3:42 PM, Daniel Goertzen
<da...@networkintegritysystems.com> wrote:
> You're right, that's a terrible name for this project.  This project is now at:
>
> https://github.com/goertzenator/goyaml

I'm afraid people using Go programming language will be stumbling upon
your project now :)

Michael Turner

unread,
May 25, 2012, 1:26:56 AM5/25/12
to Gleb Peregud, Daniel Goertzen, Erlang Questions
Then ... "yamerl"?

-michael turner

Max Bourinov

unread,
May 25, 2012, 2:41:47 AM5/25/12
to Michael Turner, Daniel Goertzen, Erlang Questions
Eyaml or erlyaml?

Sent from my iPhone

Tilman Holschuh

unread,
May 25, 2012, 3:23:32 AM5/25/12
to Max Bourinov, Erlang Questions
yamler

André Graf

unread,
May 25, 2012, 3:27:46 AM5/25/12
to Tilman Holschuh, Erlang Questions
+1 for yamler

Zabrane Mickael

unread,
May 25, 2012, 8:03:40 AM5/25/12
to André Graf, Erlang Questions
+1 yamler


Regards,
Zabrane

Daniel Goertzen

unread,
May 25, 2012, 9:26:14 AM5/25/12
to Erlang Questions
Lol, I love it! It is done...

https://github.com/goertzenator/yamler

Thanks for the input,
Dan.
Reply all
Reply to author
Forward
0 new messages