{"id":1339,"date":"2014-10-01T17:58:00","date_gmt":"2014-10-01T17:58:00","guid":{"rendered":"http:\/\/blog.filipesaraiva.info\/?p=1339"},"modified":"2014-10-01T17:58:00","modified_gmt":"2014-10-01T17:58:00","slug":"cantor-new-features-in-kde-4-14","status":"publish","type":"post","link":"https:\/\/filipe.saraiva.tec.br\/blog\/?p=1339","title":{"rendered":"Cantor: new features in KDE 4.14"},"content":{"rendered":"<p><a href=\"kde.org\/announcements\/4.14\/\" target=\"_blank\">KDE 4.14<\/a> was released in August 2014 but I did not have time to write about new features in Cantor for that release.<\/p>\n<p>So, let&#8217;s fix it now!<\/p>\n<h2>New backend: Lua<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/ss1.png\" alt=\"\" width=\"693\" height=\"473\" \/><\/p>\n<p style=\"text-align: justify;\">Cantor family of backends have a new member: <a href=\"http:\/\/www.lua.org\/\" target=\"_blank\">Lua<\/a>, using <a href=\"http:\/\/luajit.org\/luajit.html\" target=\"_blank\">luajit<\/a> implementation.<\/p>\n<p style=\"text-align: justify;\">This backend have a lot of features: syntax highlighting, tab complete, figures in worksheet, script editor, and more.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/ss3.png\" alt=\"\" width=\"783\" height=\"667\" \/><\/p>\n<p style=\"text-align: center;\"><em>Cantor + Lua in action<\/em><\/p>\n<p style=\"text-align: justify;\">Lua backend was developed by <a href=\"http:\/\/oproj.tuxfamily.org\/\" target=\"_blank\">Lucas Negri<\/a>, a Brazilian guy,\u00a0and this is a reason for me to be very happy. Welcome aboard Lucas!<\/p>\n<p style=\"text-align: justify;\">You can read more about this backend in a <a href=\"http:\/\/oproj.tuxfamily.org\/math\/lua\/kde\/2014\/08\/04\/cantor.html\" target=\"_blank\">text of Lucas blog<\/a>.<\/p>\n<h2 style=\"text-align: justify;\">Use utf8 on LaTeX entries<\/h2>\n<p style=\"text-align: justify;\">When you to export the worksheet to LaTeX, utf8 will be used as default. This improvement\u00a0was developed by Lucas.<\/p>\n<h2>Support to packaging extension in Sage and\u00a0Octave backends<\/h2>\n<p>Now these backends have an assistant to import packages\/modules\/libraries.<\/p>\n<h2 style=\"text-align: justify;\">Support to auto run scripts<\/h2>\n<p><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_autorun.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1340\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1340\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_autorun.png\" data-orig-size=\"586,493\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"python2_autorun\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_autorun-300x252.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_autorun.png\" class=\"aligncenter size-full wp-image-1340\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_autorun.png\" alt=\"python2_autorun\" width=\"586\" height=\"493\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_autorun.png 586w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_autorun-300x252.png 300w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Auto run scripts\/commands in Python 2 backend<\/em><\/p>\n<p style=\"text-align: justify;\">Now\u00a0Python 2, Scilab, Octave, Sage, Maxima, Qalculate, and KAlgebra backends have support to auto run scripts. You can configure a set of scripts or commands and they\u00a0will run automatically after the\u00a0worksheet launch!<\/p>\n<h2 style=\"text-align: justify;\">Add CTRL+Space as alternative default code completion to worksheet<\/h2>\n<p style=\"text-align: justify;\">Default code completion command in worksheet is <strong>TAB\u00a0<\/strong>key, but now we have an alternative command too:\u00a0<strong>CTRL + Space<\/strong>. It will maintain consistence between script editor (where the default code completion is\u00a0<strong>CTRL + Space<\/strong>) and worksheet.<\/p>\n<h2 style=\"text-align: justify;\">Initial support to linear algebra and plot assistants in\u00a0Python 2<\/h2>\n<p>I developed the\u00a0initial support to 2 amazing plugins in Python 2 backend: the linear algebra plugin and the plot plugin.<\/p>\n<p>First, let&#8217;s see the linear algebra plugin. In menu bar go to <em>Linear Algebra &gt; Create Matrix<\/em>. A window to matrix creation will be open, as below. You must to put the values in the cells.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python3_linearalgebra.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1341\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1341\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python3_linearalgebra.png\" data-orig-size=\"355,295\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"python3_linearalgebra\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python3_linearalgebra-300x249.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python3_linearalgebra.png\" class=\"aligncenter size-full wp-image-1341\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python3_linearalgebra.png\" alt=\"python3_linearalgebra\" width=\"355\" height=\"295\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python3_linearalgebra.png 355w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python3_linearalgebra-300x249.png 300w\" sizes=\"auto, (max-width: 355px) 100vw, 355px\" \/><\/a><em>Matrix creation assistant<\/em><\/p>\n<p style=\"text-align: justify;\">After push &#8216;Ok&#8217; button, the matrix command from <em>numpy<\/em>\u00a0 module will be loaded in the worksheet, automatically.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1342\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1342\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result.png\" data-orig-size=\"513,394\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"python2_linearalgebra_result\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result-300x230.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result.png\" class=\"aligncenter size-full wp-image-1342\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result.png\" alt=\"python2_linearalgebra_result\" width=\"513\" height=\"394\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result.png 513w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_linearalgebra_result-300x230.png 300w\" sizes=\"auto, (max-width: 513px) 100vw, 513px\" \/><\/a><em>New matrix created<\/em><\/p>\n<p style=\"text-align: justify;\">For now this plugin have implemented just the matrix creation.<\/p>\n<p style=\"text-align: justify;\">Let&#8217;s see the plot plugin now. You can use it to create 2D and 3D plot. Let&#8217;s to do\u00a0<em>x = numpy.arange(0.0, 2.0, 0.01)<\/em> and, in menu bar, go to <em>Graphics &gt; Graphics 2D<\/em>. The window below will be open.<\/p>\n<p style=\"text-align: center;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_graphic.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1343\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1343\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic.png\" data-orig-size=\"279,214\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"python2_graphic\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic.png\" class=\"aligncenter size-full wp-image-1343\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_graphic.png\" alt=\"python2_graphic\" width=\"279\" height=\"214\" \/><\/a><em>Ploting 2D assistant<\/em><\/p>\n<p style=\"text-align: justify;\">You can set some expression to be the Y axis (in this case I am using\u00a0<em>numpy.sin<\/em>) and a variable name to X axis (this case,\u00a0<em>2 * x * numpy.pi<\/em>). You could to put just\u00a0<em>x<\/em> in variable name to do a plot with the\u00a0values of <em>x<\/em>.<\/p>\n<p style=\"text-align: justify;\">After push &#8216;Ok&#8217; button, the command using <em>pylab<\/em> will be load in worksheet to make the graphic.<\/p>\n<div style=\"text-align: justify;\"><a href=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_graphic_result.png\"><img loading=\"lazy\" decoding=\"async\" data-attachment-id=\"1344\" data-permalink=\"https:\/\/filipe.saraiva.tec.br\/blog\/?attachment_id=1344\" data-orig-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic_result.png\" data-orig-size=\"957,655\" data-comments-opened=\"1\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"python2_graphic_result\" data-image-description=\"\" data-image-caption=\"\" data-medium-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic_result-300x205.png\" data-large-file=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic_result.png\" class=\"aligncenter  wp-image-1344\" src=\"http:\/\/blog.filipesaraiva.info\/wp-content\/uploads\/2014\/09\/python2_graphic_result.png\" alt=\"python2_graphic_result\" width=\"689\" height=\"471\" srcset=\"https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic_result.png 957w, https:\/\/filipe.saraiva.tec.br\/blog\/wp-content\/uploads\/2014\/09\/python2_graphic_result-300x205.png 300w\" sizes=\"auto, (max-width: 689px) 100vw, 689px\" \/><\/a>3D plotting assistant have a similar way to create the pictures.<\/div>\n<p style=\"text-align: justify;\">How you can see, to use this assistants\u00a0we need to have some python modules in the workspace, and they must to have the same name used in the plugins. There are a lot of ways to import modules in python environment (<em>import foo; import foo as [anyname]; from foo import *;\u00a0<\/em>etc), so to do a generic way to use it is impossible (well, if you have some idea I would like to hear it).<\/p>\n<p style=\"text-align: justify;\">My choice was to import\u00a0<em>numpy, scipy, matplotlib\u00a0<\/em>and\u00a0<em>pylab<\/em> when Python 2 backend is loaded by Cantor. Well, I intent to change it because that modules will be mandatory to use Python 2 backend correctly, and\u00a0<em>pylab<\/em> is not <a href=\"http:\/\/matplotlib.org\/faq\/usage_faq.html#matplotlib-pyplot-and-pylab-how-are-they-related\" target=\"_blank\">longer recommended in recent matplotlib version<\/a>. So, wait for some changes in this plugin soon.<\/p>\n<p style=\"text-align: justify;\">In any case, I would like to hear the opinions of scientific python community about this features.<\/p>\n<h2 style=\"text-align: justify;\">Future<\/h2>\n<p style=\"text-align: justify;\">For now we are working in Cantor port to Qt5\/KF5. You can follow the work in &#8216;<a href=\"https:\/\/projects.kde.org\/projects\/kde\/kdeedu\/cantor\/repository\/show?rev=frameworks\" target=\"_blank\">frameworks<\/a>&#8216; branch on Cantor repository.<\/p>\n<h2 style=\"text-align: justify;\">Donations<\/h2>\n<p style=\"text-align: justify;\">If you use or appreciate my work in Cantor or another free software project, please consider to <a href=\"http:\/\/blog.filipesaraiva.info\/?page_id=1349\" target=\"_blank\">make a donation for me<\/a>, then I can to continue my contributions to improve Cantor.<\/p>\n<p style=\"text-align: justify;\">You can consider <a href=\"https:\/\/www.kde.org\/community\/donations\/\" target=\"_blank\">make a donation to KDE<\/a> too, and help with the maintenance of this great free software community and their products.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>KDE 4.14 was released in August 2014 but I did not have time to write about new features in Cantor for that release. So, let&#8217;s fix it now! New backend: Lua Cantor family of backends have a new member: Lua, using luajit implementation. This backend have a lot of features: syntax highlighting, tab complete, figures&hellip;&nbsp;<a href=\"https:\/\/filipe.saraiva.tec.br\/blog\/?p=1339\" class=\"\" rel=\"bookmark\">Continue a ler &raquo;<span class=\"screen-reader-text\">Cantor: new features in KDE 4.14<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":0,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":"","jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[9],"tags":[58,11,26,51,109,104,52,108,80],"class_list":["post-1339","post","type-post","status-publish","format-standard","hentry","category-software-livre","tag-cantor","tag-desenvolvimento","tag-kde","tag-planet-mageia-english","tag-planet-python","tag-planet-scipy","tag-planetkde-english","tag-python","tag-python-backend"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p1p2Jh-lB","jetpack_sharing_enabled":true,"jetpack_likes_enabled":false,"_links":{"self":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1339","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1339"}],"version-history":[{"count":2,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1339\/revisions"}],"predecessor-version":[{"id":1379,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1339\/revisions\/1379"}],"wp:attachment":[{"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1339"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1339"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/filipe.saraiva.tec.br\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1339"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}