Lime fails to build to html5. Compiling gives many errors that I do not know how to fix - haxe

Sorry if this is poorly formatted I am new to discussion threads.
I am following the directions to make a hello world with HaxeFixel and lime listed here.
When I attempt to build to html5 I get these errors. I made sure the haxe, flixel, and lime were all up to date.
I am on Windows 10
There was similiar post here that described a similar issue but I have no system variable defined with the name hl and I am unsure of any other ones that could be causing an issue.
These are the errors.
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/_internal/backend/html5/HTML5Window.hx:321: characters 5-26 : lime._internal.backend.html5.HTML5WebGL2RenderContext should be lime.graphics.WebGLRenderContext
C:/HaxeToolkit/haxe/lib/flixel/4,8,1/flixel/group/FlxGroup.hx:473: characters 80-91 : Type not found : ObjectClass
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Could not find a suitable overload, reasons follow
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : Array<Float>, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be Array<Float>
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Int8Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Int8Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Uint8Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Uint8Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Uint8ClampedArray, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Uint8ClampedArray
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Int16Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Int16Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Uint16Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Uint16Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Int32Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Int32Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Uint32Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Uint32Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Float32Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Float32Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : js.lib.Float64Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be js.lib.Float64Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : Overload resolution failed for (array : Array<Int>, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : lime.math.ColorMatrix should be Array<Int>
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/ColorMatrix.hx:117: characters 3-18 : End of overload failure reasons
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/utils/src/openfl/utils/ByteArray.hx:750: characters 3-30 : openfl.utils.ByteArray should be lime.utils._Bytes.LimeBytes
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/stage3d/src/openfl/display3D/VertexBuffer3D.hx:113: characters 41-45 : openfl.utils.ByteArray should be Null<Int>
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/stage3d/src/openfl/display3D/VertexBuffer3D.hx:113: characters 41-45 : ... For optional function argument 'elements'
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/stage3d/src/openfl/display3D/VertexBuffer3D.hx:113: characters 41-45 : ... For function argument 'data'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Could not find a suitable overload, reasons follow
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : Array<Float>, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be Array<Float>
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Int8Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Int8Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Uint8Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Uint8Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Uint8ClampedArray, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Uint8ClampedArray
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Int16Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Int16Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Uint16Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Uint16Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Int32Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Int32Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Uint32Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Uint32Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Float32Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Float32Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : js.lib.Float64Array, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be js.lib.Float64Array
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : Overload resolution failed for (array : Array<Int>, ?offset : Null<Int>) -> Void
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : lime.math.Matrix4 should be Array<Int>
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 12-17 : ... For function argument 'array'
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/math/Matrix4.hx:235: characters 3-18 : End of overload failure reasons
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/media/openal/AL.hx:1307: characters 3-11 : Int should be lime.media.openal.ALBuffer
C:/HaxeToolkit/haxe/lib/lime/7,8,0/src/lime/media/OpenALAudioContext.hx:573: characters 3-40 : lime.media.openal.ALBuffer should be Int
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/sound/src/openfl/media/Sound.hx:591: characters 37-42 : openfl.utils.ByteArray should be Null<Int>
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/sound/src/openfl/media/Sound.hx:591: characters 37-42 : ... For optional function argument 'elements'
C:/HaxeToolkit/haxe/lib/flixel/4,8,1/flixel/group/FlxGroup.hx:852: characters 19-30 : Type not found : ObjectClass
C:/HaxeToolkit/haxe/lib/flixel/4,8,1/flixel/system/frontEnds/PluginFrontEnd.hx:47: characters 19-28 : Type not found : ClassType
C:/HaxeToolkit/haxe/lib/flixel/4,8,1/flixel/system/frontEnds/PluginFrontEnd.hx:94: characters 20-29 : Type not found : ClassType
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/bitmapdata/src/openfl/display/BitmapData.hx:1885: characters 45-54 : openfl.utils.ByteArray should be lime.utils.BytePointer
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/bitmapdata/src/openfl/display/BitmapData.hx:1885: characters 45-54 : ... For function argument 'bytePointer'
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/assets/src/openfl/utils/AssetLibrary.hx:47: characters 52-57 : openfl.utils.ByteArray should be lime.utils.Bytes
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/assets/src/openfl/utils/AssetLibrary.hx:47: characters 52-57 : ... For function argument 'bytes'
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/assets/src/openfl/utils/AssetLibrary.hx:293: characters 38-43 : openfl.utils.ByteArray should be lime.utils.Bytes
C:/HaxeToolkit/haxe/lib/openfl/9,0,2/packages/assets/src/openfl/utils/AssetLibrary.hx:293: characters 38-43 : ... For function argument 'bytes'
Thank you for any help :)

Update: OpenFL 9.1.0 and Lime 7.9.0 are available by now, and compatible with Haxe 4.2.x.
It looks like you have installed the latest Haxe release 4.2.0. You need to downgrade it to 4.1.5 or lower for now, as the current Haxelib releases of OpenFL (9.0.2) and Lime (7.8.0) don't support 4.2.0 yet.
On Windows, you can simply run the 4.1.5 installer over the previous installation.

Related

ANTLR v4 grammar fails to parse due to mismatched EOF

Follows a simple grammar with ANTLR v4. This grammar when walked produces a error message
**line 1:14 mismatched input '' expecting DimensionName*
for trivial input such as "sdarsfd integer" (without quotation marks).
SO has mention f similar errors and a bug perhaps were filed in 4.3 timeframe.
I have been using ANTLR 4.5.
Any help/pointer/solution?
/**
A simple parser for a dimension declaration
*/
grammar Simple;
definition : dim;
dim : DimensionName DataType;
DimensionName : LETTER (LETTER)*; // greedy
DataType: 'integer' | 'decimal';
LETTER : [a-zA-Z];
DIGIT : [0-9];
WS: [ \t\n\r]+ -> skip;
You just have to switch the two lexer rules DataType and DimensionName
...
DataType: 'integer' | 'decimal';
DimensionName : LETTER (LETTER)*; // greedy
...
As DimensionName matches every chars, 'integer' is typed as a DimensionName instead of a DataType. For "sdarsfd integer", the lexer produces two DimensionName token, so the dim rule cannot be matched. By switching the two lexer rules, the lexer produces a DimensionName token and a DataType token which match the dim rule.
Also, you can define LETTER and DIGIT as fragment:
fragment LETTER : [a-zA-Z];
fragment DIGIT : [0-9];
Unless you want them to be matched as independent token (in your grammar, "a" will be typed as a LETTER).

Parsing fortran-style .op. operators

I'm trying to write an ANTLR4 grammar for a fortran-inspired DSL. I'm having difficulty with the 'ole classic ".op." operators:
if (1.and.1) then
where both "1"s should be intepreted as integer. I looked at the OpenFortranParser for insight, but I can't make sense out of it.
Initially, I had suitable definitions for INTEGER and REAL in my lexer. Consequently, the first "1" above always parsed as a REAL, no matter what I tried. I tried moving things into the parser, and got it to the point where I could reliably recognize the ".and." along with numbers around it as appropriately INTEGER or REAL.
if (1.and.1) # INT/INT
if (1..and..1) # REAL/REAL
...etc...
I of course want to recognize variable-names in such statements:
if (a.and.b)
and have an appropriate rule for ID. In the small grammar below, however, any literals in quotes (ex, 'and', 'if', all the single-character numerical suffixes) are not accepted as an ID, and I get an error; any other ID-conforming string is accepted:
if (a.and.b) # errs, as 'b' is valid INTEGER suffix
if (a.and.c) # OK
Any insights into this behavior, or better suggestions on how to parse the .op. operators in fortran would be greatly appreciated -- Thanks!
grammar Foo;
start : ('if' expr | ID)+ ;
DOT : '.' ;
DIGITS: [0-9]+;
ID : [a-zA-Z0-9][a-zA-Z0-9_]* ;
andOp : DOT 'and' DOT ;
SIGN : [+-];
expr
: ID
| expr andOp expr
| numeric
| '(' expr ')'
;
integer : DIGITS ('q'|'Q'|'l'|'L'|'h'|'H'|'b'|'B'|'i'|'I')? ;
real
: DIGITS DOT DIGITS? (('e'|'E') SIGN? DIGITS)? ('d' | 'D')?
| DOT DIGITS (('e'|'E') SIGN? DIGITS)? ('d' | 'D')?
;
numeric : integer | real;
EOLN : '\r'? '\n' -> skip;
WS : [ \t]+ -> skip;
To disambiguate DOT, add a lexer rule with a predicate just before the DOT rule.
DIT : DOT { isDIT() }? ;
DOT : '.' ;
Change the 'andOp'
andOp : DIT 'and' DIT ;
Then add a predicate method
#lexer::members {
public boolean isDIT() {
int offset = _tokenStartCharIndex;
String r = _input.getText(Interval.of(offset-4, offset));
String s = _input.getText(Interval.of(offset, offset+4));
if (".and.".equals(s) || ".and.".equals(r)) {
return true;
}
return false;
}
}
But, that is not really the source of your current problem. The integer parser rule defines lexer constants effectively outside of the lexer, which is why 'b' is not matched to an ID.
Change it to
integer : INT ;
INT: DIGITS ('q'|'Q'|'l'|'L'|'h'|'H'|'b'|'B'|'i'|'I')? ;
and the lexer will figure out the rest.

Remove unwanted text string with strange hex character?

I have a program that reads in hex strings, and returns text based on the parameters of the string. A hex string goes as follows:
A : B : C
A - Length of B
B - Name of interface
C - Unimportant
so for example;
0465746830010000 =
04 : 65746830 : 010000 =
4 : eth0 : __________
Now, I want to process the hex strings so that if there is a character that isn't in the alphabet, 0-9, or '-' , it lets me know somehow.
Such as here :
0266010000
02 : 6601 : _______
2 : f[unreadable] : _______
Any ideas on how would I process this so that it lets me know if any of the characters outside of these parameters arise?
A quick regex can do that, for instance in java:
myString.matches([0-9a-fA-F]*)
will return true if the entire string consists of hex digits, and will return false if there are other characters.
Also, why would you want to accept the - character? These strings should (if properly designed) contain the unsigned representations of the numbers. If they are out of your control, then I guess you just gotta deal with it, but still.

How to return a string from a function in C++/CLI?

I try the following
String ^displayEmail(void){return (^Registration_List[0]);};
The VC++ 2010 compiler shows the following:
Error 1 error C3192: syntax error : '^' is not a prefix operator (did you mean '*'?) c:\users\marco\desktop\cs351\hw3\project3\CRegistration.h 43 1 Project3
Error 2 error C2440: 'return' : cannot convert from 'System::String' to 'System::String ^' c:\users\marco\desktop\cs351\hw3\project3\CRegistration.h 43 1 Project3
What is the type of Registration_List?
The first ^ seems ok but the second one is not ok.
– akhisp Mar 9 '12 at 3:03
bazaar. ^ is the bitwise XOR operator
You can't use it in a definition

how to change my hostname in erlang

this is my kvs.erl :
-module(kvs).
-export([start/0, store/2, lookup/1]).
start() -> register(kvs, spawn(fun() -> loop() end)).
store(Key, Value) -> rpc({store, Key, Value}).
lookup(Key) -> rpc({lookup, Key}).
rpc(Q) ->
kvs ! {self(), Q},
receive
{kvs, Reply} ->
Reply
end.
loop() ->
receive
{From, {store, Key, Value}} ->
put(Key, {ok, Value}),
From ! {kvs, true},
loop();
{From, {lookup, Key}} ->
From ! {kvs, get(Key)},
loop()
end.
when i startup erlang using :erl -name zhao -setcookie abc
and then : rpc:call(fifar#huihua.sohu-inc.com,kvs,store,[weather,cold]).
it show error:
(zhao#zjm1126.sohu-inc.com)1> rpc:call(fifar#huihua.sohu-inc.com,kvs,store,[weather,cold]).
** exception error: bad argument in an arithmetic expression
in operator -/2
called as 'fifar#huihua.sohu' - 'inc.com'
i think it is about linux hostname ,
but i use this linux shell : hostname -a
it cant show "huihua.sohu-inc.com"
so what can i do ,
thanks
Looking at the error description you have an error on the binary operator "-". you would only require to change the
(zhao#zjm1126.sohu-inc.com)1> rpc:call(fifar#huihua.sohu-inc.com,kvs,store,[weather,cold]).
to
(zhao#zjm1126.sohu-inc.com)1> rpc:call('fifar#huihua.sohu-inc.com',kvs,store,[weather,cold]).
And you will get your code running. Erlang console is seeing fifar#huihua.sohu and inc.com as two distinct atoms and seeing fifar#huihua.sohu-inc.com as a difference operation between two atoms. I advice you to follow this quote from erlang reference manual:
An atom is a literal, a constant with name. An atom should be enclosed in single quotes (') if it does not begin with a lower-case letter or if it contains other characters than alphanumeric characters, underscore (_), or #.

Resources