{"id":22890,"date":"2015-09-28T23:14:10","date_gmt":"2015-09-28T23:14:10","guid":{"rendered":"http:\/\/ahay.org\/blog\/?p=22890"},"modified":"2015-11-01T22:43:23","modified_gmt":"2015-11-01T22:43:23","slug":"julia","status":"publish","type":"post","link":"https:\/\/ahay.org\/blog\/2015\/09\/28\/julia\/","title":{"rendered":"Julia"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/ahay.org\/blog\/wp-content\/uploads\/2015\/09\/julia.png\" alt=\"\" title=\"\" \/><\/p>\n<p><a href=\"http:\/\/julialang.org\/\">Julia<\/a> is a new open-source programming\/scripting language designed for high-performance scientific computing. The goal is to combine the simplicity of Python with the performance approaching that of statically-compiled languages like C. <\/p>\n<p><strong>Julia<\/strong> has a number of other attractive features including:<\/p>\n<ul>\n<li>Dynamic type system<\/li>\n<li>Powerful shell-like capabilities for managing other processes<\/li>\n<li>Designed for parallelism and distributed computation<\/li>\n<li>Automatic generation of efficient, specialized code for different argument types<\/li>\n<li>Elegant and extensible conversions and promotions for numeric and other types<\/li>\n<\/ul>\n<p>A simple <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/api\/julia\/m8r.jl\">interface to Julia<\/a> has been added to Madagascar. It can be easily extended to include other functions from the Madagascar library. An <a href=\"https:\/\/github.com\/ahay\/src\/blob\/master\/api\/julia\/test\/clip.jl\">example test script<\/a> is shown below:<\/p>\n<div class=\"code-box\"><div class=\"code-title\"><i class=\"fa fa-code\"><\/i> <div class=\"pull-right\"><a href=\"#\" class=\"btn btn-default btn-xs toggle-code\" data-toggle=\"tooltip\" title=\"Toggle code\"><i class=\"fa fa-toggle-up\"><\/i><\/a><\/div><\/div><pre ><code class=\"julia\">#!\/usr\/bin\/env julia\n\nusing m8r\n\nm8r.init()\ninp = m8r.input(\"in\")\nout = m8r.output(\"out\")\n\nn1 = m8r.histint(inp,\"n1\")\nn2 = m8r.leftsize(inp,1)\n\nclip = m8r.getfloat(\"clip\")\n\ntrace = Array(Float32,n1)\n\nfor i2 in 1:n2\n    m8r.floatread(trace,n1,inp)\n    trace = clamp(trace,-clip,clip)\n    m8r.floatwrite(trace,n1,out)\nend\n<\/code><\/pre><\/div>\n<p>Compare it with <a href=\"\/wiki\/Guide_to_madagascar_API\">scripts or programs in other languages<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Julia is a new open-source programming\/scripting language designed for high-performance scientific computing. The goal is to combine the simplicity of Python with the performance approaching that of statically-compiled languages like C. Julia has a number of other attractive features including: Dynamic type system Powerful shell-like capabilities for managing other processes Designed for parallelism and distributed [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_import_markdown_pro_load_document_selector":0,"_import_markdown_pro_submit_text_textarea":"","activitypub_content_warning":"","activitypub_content_visibility":"local","activitypub_max_image_attachments":4,"activitypub_interaction_policy_quote":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-22890","post","type-post","status-publish","format-standard","hentry","category-systems"],"_links":{"self":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/22890","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/comments?post=22890"}],"version-history":[{"count":4,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/22890\/revisions"}],"predecessor-version":[{"id":22934,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/posts\/22890\/revisions\/22934"}],"wp:attachment":[{"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/media?parent=22890"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/categories?post=22890"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahay.org\/blog\/wp-json\/wp\/v2\/tags?post=22890"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}