I've grown to like erlang, and it's a great (cough) architectural fit to my problem. Meanwhile I still like to imagine that I can kludge erlang processes & asynchronous message passing in python (I am currently in therapy to rid myself of this obsession).
During a recent binge I came across 0MQ & I like its messaging features. These may...
Hi this is my first post here hope you all are well. So Im just starting erlang and I ran into a problem im not sure how to tackle yet.
So I have a binary I am recieving in the form of
<<56, 23, 67, 34, 45, 78, 01, 54, 67, 87, 45, 53, 01, 34, 56, 78>>
My goal is to split it into a sub list (or binary if more efficient) based on t...
Hi Everyone,
So this I just had one problem solved very quickly by a nice guy on my other post.
http://stackoverflow.com/questions/3464207/erlang-splitting-lists-into-sub-list
Now I am a beginner at Erlang and need a little help with the syntax of another function that does work on the result from my previous post.
For example, I now...
Hi Everyone,
I have a variable:
Data = [[<<>>,
[<<"10">>,<<"171">>],
[<<"112">>,<<"Gen20267">>],
[<<"52">>,<<"20100812-06:32:30.687">>]]
I am trying to pattern match for two specific cases..
One where anything that resembles the outside structure - simply []
Anything inside goes I have tried [ _ ] but no go?
The Second, for a ...
Ok now I think Im getting warmer, I have to pattern match whatever comes in.
So if I had say
Message = = [[<<>>],
[<<"10">>,<<"171">>],
[<<"112">>,<<"Gen20267">>],
[<<"52">>,<<"20100812-06:32:30.687">>]]
And I was looking to pattern match the field <<"112">>
Such as the 112 is always going to say 112, but the Gen2067 can change...
I did not think I would spent an hour trying to figure this one out... with all the headway I made today and such.
So I'm using what would seem to be - straight out the manual - erlang BIF
calender:universal_time().
But I get
35> calender:universal_time().
** exception error: undefined function calender:universal_time/0
Checked m...
Hi Everyone, guess its getting late, and Im a beginner, just need a little help..
Im trying to find the length of a list.. BUT NOT of the lists themselves, rather the length of the values within..
I take something like:
Other = [<<"366">>,0,
<<1>>,
<<"344">>,<<"Really"
<<1>>,
<<"9...
Whats the easy/efficient way of interleaving three data sets..
Data1 = [<<5>>,<<6>>,<<7>>],
Data2 = [<<5>>,<<6>>,<<7>>],
Data3 = [<<5>>,<<6>>,<<7>>].
End Result:
Final = [<<5>>, <<5>>, <<5>>, <<6>>, <<6>>, <<6>>, <<7>>, <<7>>, <<7>>]
Im sure its like
[X || X <- [Data1, Data2, Data3]]
...
Hi all,
I've run into a problem where I cannot stop mnesia within my program without causing the app to hang.
I'm presently doing prototyping of mnesia within my erlang app.
In my jaus_app.erl file the start() calls:
{atomic, ok} = mnesia:load_textfile("priv/mnesia_prototype.txt")
My stop() function calls:
mnesia:dump_to_textfile(...
Hi,
I am new to Erlang and trying to set two nodes on my laptop.
In one terminal I type:
eli@elimayost: ~/erlang_apps> erl -sname foo -setcookie secret
And in the second terminal:
eli@elimayost: ~/erlang_apps> erl -sname bar -setcookie secret
If I use the first terminal to ping the second:
(foo@elimayost)1> net_adm:ping(bar@elim...
Possible Duplicate:
Does Erlang work on any non-x86 processors?
Im having trouble finding a list of compatible CPU's for erlang. I have read its somewhere on the erlang site.. not an easy find so far.
Besides maybe a link does anyone recommend a certain server?
I am looking to run on as many cores as possible
An Intel Quad...
Ok I have been trying every which way to figure this out.
I need to get this table to be a global.. I have realized it is much less efficient to pass TableID around.. in the scope of my program.
So I tried creating a new table then looking it up:
TableID = ets:new(tb, [set,public]),
put({tableUniqueID}, TableID),
Then I used:
get({...
I am trying to split this list
List = [[<<"5">>, <<"54">>], [<<"00">>], [<<"35">>, <<"54">>, <<"45">>, <<"55">>], [<<"00">>],[ <<"5">>]]
into
List = [[<<"5">>, <<"54">>], [<<"35">>, <<"54">>, <<"45">>, <<"55">>], [<<"5">>]]
Basically based on the <<"00">>
What is the best BIF to go about this, I have some code, but its sloppy, an...
Can anyone enlighten me as to why this bit of code spits back that the X is unsafe in 'try', well I know why, but more so how to fix it.
try X = lists:append(lists:zipwith3(fun(X, Y, Z) -> [X, Y, Z] end, Data1, Data2, Data3)) of
MP -> X
catch K -> (X = 0)
end.
%MP = [lists:zipwith3(X, Y, Z...
I have an Erlang application that is deployed on a server with Windows Server 2008.
The way I do this:
Copy application folder in Erlang lib directory.
Open command line (cmd). Execute erl.
Execute application:start(app_name) in Erlang shell.
Are there any better approaches to launch the application? How to make the application to l...
I'm looking for an example of a simple FSM implemented in Erlang using the gen_fsm from OTP.
...
Hi everyone! I'm very excited to be starting my erlang journey, but I've been stuck on this for a few days now and I'm starting to get scared I won't meet my deadline.
I'm trying to create key, value pair tuples out of xml. I'd like to make a list out of any nested xml. It seems like a very common thing to do, but I can't find any ex...
I've just started learning about thread safety. This is making me code a lot more defensively, perhaps too defensively.
Would using a functional language like Erlang completely rid me of this concern?
...
For learning purposes I've written a simple TCP proxy in Erlang. It works but I experience an odd performance fall-off when I use ab (Apache Bench) to make many concurrent requests. It's not the performance fall-off per se that makes me wonder but the scale of the fall-off. The backend is nginx as a web server. My proxy sits inbetween ab...
Erlang is truncating the value of big long operations if one of the operands are not big enough.
Although it is not truncating if both operands are big enough.
199> 3656626623097354252900000 * 11111111111111111111111111.
40629184701081713921111110704819264100293971900000
200> 3656626623097354252900000 * 64.
2340241...