user-pic

Saif

  • Website: github.com/saiftynet
  • About: An Orthopaedic Surgeon, A Tissue Engineering Scientist, Lecturer, (and Hobbyist Programmer, Electronics Engineer and Roboticist)
  • Commented on Simple Linux Screenshot Application in Perl
    Thanks mate, Actually the clever people are the ones that make the back-ends available to Perl. The problem is that many of the back-ends are difficult to install some really not updated. The idea was to have a system that...
  • Posted Simple Linux Screenshot Application in Perl to Saif

    Shutter, a powerful application for taking screenshots is possibly soon to be removed from Debian, taking with it the last desktop Perl…

  • Commented on A very easy way to create XML
    I think this is very useful, well done. This may duplicate other XML generators/parsers, but seems much simpler to me. Can you retrospectively add attributes or elements to an existing XML?...
  • Posted Ducktaping The Internet To The Desktop to Saif

    Simple desktop applications are generally not what one considers a Perl specialization. Its expertise lies in generating processing and transforming textual data, hence its use in the web, and in tools like GUIDeFATE. This 'duct tape' manages…

  • Posted Websocket Extension for GUIDeFATE - Dialogs and File Operations to Saif

    GUIDeFATE, your favourite Quick-and-Dirty GUI designer for newbies is now acquiring a Web-socket interface. Now this is certainly not capable of competing with those genius applications Mojolicious, Catalyst, Dancer etc. Having only discovered…

  • Posted A new wobbly wheel for GUIDeFATE to Saif

    A couple of weeks ago a little misunderstanding about what GUIDeFATE was about led to an interesting comment. This tool had been designed to simplify GUI design using a text editor, and met the challenges of having a number of weakly supported potential targets to produce a semi consistent…

  • Commented on Four backends now for GUIDeFATE...but the struggle continues
    Hi Ron, This is excellent... I accept your comments about exponential increase of effort with complex scenarios. It is I guess important to try these out in "real-life" applications. A tool is only useful if it makes life easier, the...
  • Commented on Four backends now for GUIDeFATE...but the struggle continues
    Hi Ron, You are right about the issue that the graphical front-end has been done before (different toolkits, with different paradigms, most with little documentation, most...at least for Perl, quite old). And of-course a web front end is also a...
  • Commented on Four backends now for GUIDeFATE...but the struggle continues
    Hi Matthew, Thanks for your insight. Now that xdialog thingy sounds very interesting; presumably it is a built-in interface......
  • Commented on Four backends now for GUIDeFATE...but the struggle continues
    Hi Ron, Thanks for that. I agree re-inventing the wheel is not good, particularly as it is likely the vast majority of coders have superior insight to mine. Essentially...the problem I had related specifically to Qt where the subroutines called...
  • Posted Four backends now for GUIDeFATE...but the struggle continues to Saif

    Just as you are thinking you got the hang of something, believing you know how to work the system, imagining you have a problem licked, then you wake up to find out it was just a dream. That has been my experience in developing GUIDeFATE (A…

  • Commented on Guiding Fate
    @Mohammad, It's already there mate... saiftynet/GUIDeFATE....
  • Commented on Guiding Fate
    @Mohammad Thanks for your support mate, and nice to have met you at LPW....
  • Commented on Guiding Fate
    Thanks Matthew, I will try and put it up this weekend. I figured I would need to put in tests etc and write a decent pod. TBH I am not entirely sure of the process. Regarding TK, this was my...
  • Posted Guiding Fate to Saif

    Fate

    Somebody once said, that the power of a programming language is not what it lets you do, but what it lets you do easily. Might be Larry himself who said it, not sure, but I heard it at the London Perl Workshop. I started learning Perl from an old second hand book I found in a char…

Subscribe to feed Recent Actions from Saif

  • Toby Inkster commented on A very easy way to create XML

    No, I wouldn't recommend this module. There's a big problem with it, and XML::Simple, and any other module that lets you "treat XML as easily as JSON": XML is not JSON. XML and JSON have entirely different content models.

    <foo bar="baz" />

    and:

    <foo><bar>baz</bar></foo>
    

    … are different things in XML. But if I give a module like this a structure { foo => { bar => "baz" } }, it's pot luck which output I'll get. There may be some options I can tweak to get the output I want, but by the time I've figured it out, I might as wel…

  • karjala commented on A very easy way to create XML

    Toby, thanks for you input. Just so you know, [{foo => {bar => 'baz'}}] and [{foo => {bar => baz}} => undef] produce the first output, whereas {foo => {bar => baz}} produces the second.

    The idea is that each set of sibling elements (regardless of whether they're 1 or more than 1, and regardless of whether they're root or someone's children) are represented as key-value pairs inside a hashref-or-arrayref (your choice), where the key represents the tag or tag+attrs, and the valu…

  • karjala commented on A very easy way to create XML

    Saif, adding attributes in a particular element is easy by using the attr method once you create an XML::MyXML::Object object from your XML, as described in the xml_to_object function.

    Adding elements, and in general, manipulation, is harder (you might be able to achieve it if you have to, with the inner_xml method)

  • Salvador Fandiño commented on A very easy way to create XML

    Last year, also facing the problem of generating XML from Perl in a simple way I developed and released XML::FromPerl which is a very thin layer on top of XML::LibXML.

    Some code using it to generate complex XML can be seen here!

  • karjala commented on A very easy way to create XML

    I updated XML::MyXML with a tutorial that showcases the simple_to_xml function in every possible way.

    You can see it here: https://metacpan.org/pod/release/KARJALA/XML-MyXML-1.02/lib/XML/MyXML.pm#simple_to_xml($simple_array_ref)

Subscribe to feed Responses to Comments from Saif

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.