tag:blogger.com,1999:blog-5135517.post6892414729734765154..comments2023-11-05T03:54:44.710-08:00Comments on Making it stick.: Morse Codes in ErlangPatrick Loganhttp://www.blogger.com/profile/02088461489050417591noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-5135517.post-51031919358245366022007-09-09T09:18:00.001-07:002007-09-09T09:18:00.001-07:00'Properly transmitted morse code has an inter-char...'Properly transmitted morse code has an inter-character "space"'<BR/><BR/>Yeah, but that's no fun. :-)Patrick Loganhttps://www.blogger.com/profile/02088461489050417591noreply@blogger.comtag:blogger.com,1999:blog-5135517.post-23991884076812903152007-09-09T09:18:00.000-07:002007-09-09T09:18:00.000-07:00"For some reason I didn't think you could do f(g()..."For some reason I didn't think you could do f(g()) in Erlang."<BR/><BR/>The one place, oddly, that function calls do not work at all is the "if" expression. That uses "guards" which cannot be function calls. So...<BR/><BR/>B = function_returning_boolean(Foo),<BR/>if<BR/> B -> <BR/> do_something_true();<BR/> true -><BR/> do_something_false()<BR/>end.<BR/><BR/>I don't like that so much, which is why I used the "case" expression in the morse code example.Patrick Loganhttps://www.blogger.com/profile/02088461489050417591noreply@blogger.comtag:blogger.com,1999:blog-5135517.post-4472633115926889352007-09-09T07:24:00.000-07:002007-09-09T07:24:00.000-07:00"All possible decodings"That's the assumption whic..."All possible decodings"<BR/><BR/>That's the assumption which is incorrect. Properly transmitted morse code has an inter-character "space" which prevents, operator (or computerized sender) willing, two characters from being interpreted as a third, i.e.<BR/><BR/>. <STRONG>+</STRONG> .. <STRONG>!=</STRONG> ...<BR/><BR/>de VE7WVAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5135517.post-49369276942538199852007-09-08T23:53:00.000-07:002007-09-08T23:53:00.000-07:00Interesting! I wish I'd known of the lists:prefix ...Interesting! I wish I'd known of the lists:prefix method - that would have made life easier for me. For some reason I didn't think you could do f(g()) in Erlang. I've been writing X = g(), f(X). The -import syntax is handy too.Curious Attempt Bunnyhttps://www.blogger.com/profile/04654980649772473807noreply@blogger.com