Forum

  • Feb 16
    Re: [eiffel-users] Calling close on a closed file causes a segmentation fault
    On 18.07, I get segfaults regularly because of memory allocation failures.
  • Feb 15
    Re: [eiffel-users] Calling close on a closed file causes a segmentation fault
    https://github.com/EiffelSoftware/EiffelStudio/blob/master/Src/library/base/elks/kernel/file.e The precondition is inherited from IO_MEDIUM. -- Eric Bezault mailto:er...@gobosoft.com http://www.gobosoft.com
  • Feb 15
    Re: [eiffel-users] Calling close on a closed file causes a segmentation fault
    I forgot FILE is not top of the hierarchy.
  • Feb 15
    Calling close on a closed file causes a segmentation fault
    Calling close on a closed file causes a segmentation fault Wondering if anyone else has run into this problem on gcc. I am surprised that I seem to be the first person to have reported it.I figure that if I was not the first then there would already be a precondition on `close' "not is_closed"
  • Feb 13
    Re: Project PF_HP with two targets classic and test
    Can somebody please investigate my error in running F_code/finish_freezing: ------------------------- In file included from big_file_C37_c.c:4:0: cu1842.c:10:25: fatal error: eiffel_curl.h: No such file or directory compilation terminated. Makefile:35: recipe for target 'big_file_C37_c.o' failed
  • Feb 12
    Re: [eiffel-users] Re: 3 small questions
    What about: implication alias "implies", implication_unicode alias "⇒" ... with synonyms? Ugly, but that would with the current Eiffel standard. -- Eric Bezault mailto:er...@gobosoft.com http://www.gobosoft.com On 12/02/2019 12:55, 'Alexander Kogtenkov' via Eiffel Users wrote: > The
  • Feb 12
    Re: [eiffel-users] Re: 3 small questions
    A proper meta-model for that would be to consider that 'implies' etc is not just a name alias for 'implication' but instead as the name for an 'operator' which can be used in syntax instead of the function call form. Then, if an operator is an entity, it can have a name, and a symbolic alias. In
  • Feb 12
    RE: Re[2]: [eiffel-users] Re: 3 small questions
    Perhaps, as these math-like expressions seem very much like extensions, they should look like extensions - and be obvious about it. That way, the object- (class-)oriented model is not corrupted and the language doesn't become like C++ with a slide rule. It has, from where I'm sitting, always
  • Feb 12
    Re: [eiffel-users] Re: 3 small questions
    This is quite sensible! It's obvious by this example, I have not encountered all of the good, bad, and ugly of use cases where semicolon use is or is not sensible and improves readability. I find the code below to be concise. > > multiple lines on the same line separated by semicolons is a
  • Feb 12
    RE: Re[2]: [eiffel-users] Re: 3 small questions
    Indeed. But if we wanted to lift that restriction I think we could. Does not seem like a big deal to implement. The question is whether it’s worth it or we fear it would lead to a baroque explosion of multiple names for the same thing. As to me in the absence of clear counter-arguments I would
  • Feb 12
    Re[2]: [eiffel-users] Re: 3 small questions
    The ability to enter Unicode without switching from the usual keyboard input is on our radar. However, adding Unicode Boolean and set operators for kernel classes might become problematic because multiple aliases are not allowed. For example, one cannot change the class BOOLEAN to have:
  • Feb 12
    Re: [eiffel-users] Re: 3 small questions
    related: prior to across thing_list as thing_csr loop | some | all ... I was doing from thing_list.start until thing_list.off loop on a single line for many years now. Much clearer. No semi-colons though... On making programming expressions more like maths, I completely agree. I
  • Feb 12
    RE: [eiffel-users] Re: 3 small questions
    Dear Philippe, > multiple lines on the same line separated by semicolons is a "code smell". Here our tastes differ. I prefer this if x > y then -- Swap t := x ; x := y ; y := t end to the version using
  • Feb 12
    Re: No automatic extraction RE: [eiffel-users] 3 small questions
    Dear Bertrands, please see below On Friday, February 8, 2019 at 12:40:55 PM UTC+3, Bertrand Meyer wrote: > > Dear Alexey, > > > > If I understand you right you are saying that my example is bad style. In > fact I think that the example, not itself but as an abstraction of things > that people
  • Feb 11
    Re: [eiffel-users] Need a small project done in Eiffel
    The link is here: https://www.freelancer.ca/projects/computer-science/Small-Project-Eiffel-Language/?w=f#/proposals Please contact me here. Thank you.
  • Feb 11
    Re: [eiffel-users] Need a small project done in Eiffel
    The link is here: https://www.freelancer.ca/projects/computer-science/Small-Project-Eiffel-Language/?w=f#/proposalshttps Please contact me here. Thank you.
  • Feb 11
    AW: AW: [eiffel-users] Re: Project PF_HP with two targets classicandtest
    I have: - Added override for es-curl.ecf to Project ecf - Added vtd-xml.ecf to Project ecf - Used launch_estudio and ec, both yield the following when finish_freezing: leder@DESKTOP-M6L5EDG:~/Source/Eiffel/pfhp-PF_HP-mt/EIFGENs/classic/F_code$ finish_freezing Eiffel C/C++
  • Feb 11
    Re: [eiffel-users] Re: Project PF_HP with two targets classic and test
    launch_estudio and scons build call a common function to setup the correct environ. This saves a lot of work and does not unnecessarily polllute your env space. The trade off is you cannot use ES commands directly. The el_build_finalized.py command has some cool features that i will explain when
  • Feb 11
    Re: AW: [eiffel-users] Re: Project PF_HP with two targets classic andtest
    Check env vars mentioned in http-client.pecf try a clean build. Did you use launch_estudio? OK, now I finalize in ES and get the eiffel_curl.h error again:
  • Feb 11
    AW: [eiffel-users] Re: Project PF_HP with two targets classic andtest
    OK, now I finalize in ES and get the eiffel_curl.h error again: cu1842.c:11:25: fatal error: eiffel_curl.h: No such file or directory compilation terminated. Makefile:35: recipe for target 'big_file_C37_c.o' failed make[1]: *** [big_file_C37_c.o] Error 1 Makefile:178: recipe for target
  • Feb 11
    Re: [eiffel-users] Re: Project PF_HP with two targets classic and test
    You cannot use any ES command like ec etc directly unless you first set up the environment. EL scons system does this automatically. Also scons build creates an archive of F_code as a build target to facilitate cross platform dev. Thats why you get that messgae. The ES and EL build systems are
  • Feb 11
    AW: [eiffel-users] Re: Project PF_HP with two targets classic andtest
    OK, waiting for your return. But launch_estudio does the same for me: finalize gives an error and execution of W_code binary immediately Returns to command line… Gesendet von Mail für Windows 10 Von: fin...@eiffel-loop.com Gesendet: Montag, 11. Februar 2019 15:31 An: eiffel...@googlegro
  • Feb 11
    Re: Project PF_HP with two targets classic and test
    P. S. Eiffel-Loop library and PF_HP project will both compile with eiffel compiler ec 16.05: ------------------------- leder@DESKTOP-M6L5EDG:~/Source/Eiffel/pfhp-PF_HP-mt$ ec -config pf_hp.ecf -target classic Eiffel Compilation Manager Version 16.05.9.8969 GPL Edition - linux-x86-64 Degree 6:
  • Feb 11
    Project PF_HP with two targets classic and test
    My new project setup compiles W_code fine. But when executing the binary for both targets classic and test the execution immediately returns w/o output: -----------------Schnipp: leder@DESKTOP-M6L5EDG:~/Source/Eiffel/pfhp-PF_HP-mt/EIFGENs/classic/W_code$ ls pf_hp leder@DESKTOP-M6L5EDG:~/Source/Ei
  • Feb 11
    Eiffel: how do I set the command line arguments of an autotest?

    Some of my tests needs something like

    {EXECUTION_ENVIRONMENT}.arguments.separate_character_option_value ('l')
    

    to be attached (not Void), how do I set commandline arguments to eiffel autotest?

  • Feb 11
    Eiffel: a proper way to inherit from a class and convert Current object to it

    It's not the first time I'm trying to inherit from a class and convert an object to it, in this case extend functionalities of HTTP_CLIENT_RESPONSE with valid_http_response => response.status = 200, valid_http_json_body => validate json content, etc...

    For that, I'd like to inherit from HTTP_CLIENT_RESPONSE and add features and create my custom DB_ENTITY_HTTP_CLIENT_RESPONSE from an HTTP_CLIENT_RESPONSE

    test_case
        local
            l_http_client_r: HTTP_CLIENT_RESPONSE
            l_db_entity_http_client_r: DB_ENTITY_HTTP_CLIENT_RESPONSE
        do
            l_http_client_r := execute_get("someURL") -- returns an HTTP_CLIENT_RESPONSE
            l_db_entity_http_client_r := l_http_client_r
            assert("valid response", l_db_entity_http_client_r.valid_response)
        end
    

    it seems I've difficulties having the internal properties set... what would be the best way to do this? I had the same case trying to create a WATT class inheriting from NATURAL_32 which is an expanded.

    In my strategy, I tried to call in creator

    • a parent creation procedure
    • then call a deep_copy

    Here is the rest of my class attempt:

    class
        DB_ENTITY_HTTP_CLIENT_RESPONSE
    
    inherit
        HTTP_CLIENT_RESPONSE
    
    create
        make_from_http_client_response
    
    convert
        make_from_http_client_response ({HTTP_CLIENT_RESPONSE})
    
    feature -- Initialization
    
        make_from_http_client_response (a_client_response: HTTP_CLIENT_RESPONSE)
            do
                make (a_client_response.url)
                deep_copy (a_client_response)
            end
    
    feature -- Status report
    
        valid_response: BOOLEAN
            do
                Result := status = 200
            end
    

    The only way I found working for now is by setting all attributes to other which is the semantic of deep_copy normally...

    make_from_http_client_response (a_client_response: HTTP_CLIENT_RESPONSE)
        do
            make (a_client_response.url)
            set_body (a_client_response.body)
            set_http_version (a_client_response.http_version)
            set_error_occurred (a_client_response.error_occurred)
            set_error_message (a_client_response.error_message)
            set_raw_header (a_client_response.raw_header)
            set_status_line (a_client_response.status_line)
            ... I surely forgot something...
        end
    
  • Feb 10
    Eiffel: is there a way with do_all or do_if to search for an element in a collection without having to write a whole feature?
    across
        collection as l_item
    until 
        Result /= Void
    loop
        if l_item.item.name.is_equal ("foo") then
            Result := l_item.item
        end
    end
    

    is there a way and if so which one to do something like

    collection.do_if (agent ...)
    

    an example of use can be:

    search_item_with_id (an_id: INTEGER)
            -- Moves items cursor if not found is_after
        local
            l_found: BOOLEAN
        do
            from
                items.start
            until
                items.after or l_found
            loop
                l_found := items.item.primary_key = an_id
                if not l_found then
                    items.forth
                end
            end
        ensure
            cursor_on_element_if_found: not items.after implies items.item.primary_key = an_id
        end
    
  • Feb 10
    Re: [eiffel-users] Need a small project done in Eiffel
    I am interested, Vänligen Anders Persson BSharp AB Linked in profile +46 763 17 23 25 On Sat, 9 Feb 2019 at 16:50, wrote: > Hi, > I need a small project done in Eiffel on freelancer. Looking for people > familiar with Eiffel. > > Thank you. > > -- > You received this
  • Feb 10
    Re: [eiffel-users] Need a small project done in Eiffel
    Hi, could you tell a bit more of what you expect? Thx On Sun, Feb 10, 2019 at 5:22 AM wrote: > Hi, > I need a small project done in Eiffel on freelancer. Looking for people > familiar with Eiffel. > > Thank you. > > -- > You received this message because you are
  • Feb 10
    Need a small project done in Eiffel
    Hi, I need a small project done in Eiffel on freelancer. Looking for people familiar with Eiffel. Thank you.
  • Feb 08
    Re: [eiffel-users] How do you convert a dynamic type_id to an abstract type_id?
    I think it would make more sense to put `abstract_type' in INTERNAL rather than SED_UTILITIES. For Eiffel-Loop I have created class EL_INTERNAL inherit INTERNAL SED_UTILITIES export {ANY} abstract_type end end accessible via {EL_MODULE_EIFFEL}.Eiffel
  • Feb 08
    Re: [eiffel-users] How do you convert a dynamic type_id to an abstract type_id?
    Hi Manu, I don't why you didn't just say {SED_UTILITIES}.abstract_type because this function is precisely what I need.
  • Feb 08
    Re: [eiffel-users] How do you convert a dynamic type_id to an abstract type_id?
    Thanks Manu, I can do that, but I am kind of surprised there isn't one as the reflector constants can be used in an inspect branch. regards Finnian
  • Feb 01
    Eiffel: ODBC Dealing with BIGINT

    Eiffel

    Seems I'm getting an INTEGER_32_REF from a BIGINT from ODBC with Eiffel DB_SELECTION.cursor. Sometimes I seem to have the adecuate value, but sometimes not...

    946383958 => good INTEGER_32_REF (id->4 of following table)
    9475984837 => 886050245 WRONG INTEGER_32_REF (id->4 of following table)
    
    646383958 => good INTEGER_32_REF (id->3 of following table)
    6475984837 => -2113949755 WRONG INTEGER_32_REF (id->4 of following table)
    
    ...
    

    It seems to behave like not treating the BIGINT and giving the INTEGER_32_REF value directly interpreted from the DB value, typical case passing over the 2^32

    Postgresql

    Having a table with following data as electricity_amount BIGINT NOT NULL DEFAULT 0

    id |   a_date   |  amount   | electricity_amount | consumption_sector_id | electricity_rate_id
    ----+------------+-----------+--------------------+-----------------------+---------------------
    1 | 2019-01-01 | 746383958 |         7475984837 |                     1 |                   1
    2 | 2019-02-01 | 846383958 |         8475984837 |                     1 |                   1
    3 | 2019-03-01 | 646383958 |         6475984837 |                     1 |                   1
    4 | 2019-04-01 | 946383958 |         9475984837 |                     1 |                   1
    

    enter image description here

  • Jan 31
    Eiffel: non-compatible actual argument in feature call

    I don't understand why it is so.

    • If I say attached {G} it works
    • If I say nothing which would be the expected behavior for me calling_entity: detachable RELATED_DB_ENTITY should be conform (once attached) to G which is -> DB_ENTITY
    • If I say DB_ENTITY it doesn't
    • If I say RELATED_DB_ENTITY either does it pass

    Why do I have to specify {G}???

    SIT_HANDLER

    class
        SIT_HANDLER[G -> DB_ENTITY create default_create, make_from_db_service, make_from_json end]
    
    feature --
    
        some_feature
            do
                if attached {G} l_rest_request.calling_entity as l_calling_entity then
                    db_service.set_item_prototype (l_calling_entity) -- Complains here!!!!!!!!!!!!
                    db_service.load_with_relationships (l_rest_request)
                ...
            end
    end -- class
    

    REST_REQUEST

    class
        REST_REQUEST
    
    feature -- Access
        calling_entity: detachable RELATED_DB_ENTITY -- RELATED_DB_ENTITY inherits DB_ENTITY
    ...
    end -- class
    

    DB_SERVICE

    class
        DB_SERVICE [G -> DB_ENTITY create default_create, make_from_db_service, make_from_json end]
    
    feature -- Status setting
    
        item_prototype: G
    
        set_item_prototype (v: like item_prototype)
            do
                item_prototype := v
            ensure
                item_prototype = v
            end
    
    ...
    end -- class
    

    enter image description here

  • Jan 30
    Eiffel: setting a constant with reference to other class constant

    How to set a constant refering to another class constant in Eiffel?

    Something like that doesn't compile unfortunately

    Default_log_level: like {MY_LOGGER}.log_level = {MY_LOGGER}.Log_level_info
    
  • Jan 27
    Eiffel: REAL_32.to_double gives a strange value

    Trying to transform a real_32 to real_64, I'm getting

    real_32: 61.55
    real_64: 61.54999923706055 
    

    Am I wrong with the to_double function?

    enter image description here

  • Jan 26
    Eiffel: multilines string formating

    Didn't find a better way to format a multiline string than this way... seems complicated. What would be the best way to format this type of code?

    l_qry := "SELECT%
        %    * %
        %FROM %
        %    enumerate %
        %WHERE %
        %    " + {like item_prototype}.Primary_key_db_column_name + " = " + l_category_id + " %
        %UNION %
        %   SELECT %
        %       e.* %
        %   FROM %
        %       enumerate e %
        %INNER JOIN  %
        %   enumerates_leaves s ON s." + {like item_prototype}.Primary_key_db_column_name + " = e." + {like item_prototype}.Category_db_column_name + " %
        %) SELECT * FROM enumerates_leaves WHERE enumerates_leaves." + {like item_prototype}.Category_db_column_name + " IS NOT NULL;"
    
  • Jan 26
    eiffel: does the across structure move the cursor of current iterable structure?

    I was wondering if the across structure uses an own cursor or a separated one? does it ensure that cursor hasn't moved and if so how can it be expressed for other examples?

  • Jan 25
    Eiffel: how to use old keyword in ensure contract clause with detached

    How to use the old keyword into ensure clause of a feature, the current statement doesn't seem to be valid at runtime

    relationships: CHAIN -- any chain
    
    some_feature
        do
        (...)
        ensure
            relationship_added: attached relationships as l_rel implies
                attached old relationships as l_old_rel and then
                l_rel.count = l_old_rel.count
        end
    

    For the whole case, following screenshots demonstrate the case

    start of routine execution enter image description here end of routine execution enter image description here

  • Jan 24
    Eiffel: void safety, a concise way to test if an object exists and then call its feature

    I was wondering if there is a clearer statement then

    if not attached foo then
        create foo
    end
    if attached foo as l_foo then
        l_foo.bark
    end
    

    as

    if not attached foo then
        create foo
        foo.bark
    else
        foo.bark
    end
    

    would repeat the foo.bark and obviously I want to avoid it... and even the last statement won't compile with void-safety as foo on else could be void...

  • Jan 24
    Eiffel: a way to ensure db_cursor: DB_RESULT has not moved

    I'm looking for a way to ensure that cursor: detachable DB_RESULT from DB_SELECTION class hasn't moved. I didn't find any method to get access to it. Does the following statement ensure it?

        ensure
            cursor_not_moved: a_db_service.cursor.is_equal(old a_db_service.cursor)
    

    The item method for example doesn't seem to ensure that even if it is only consulting a value of a given row index

  • Jan 13
    Eiffel: Error: variable is not properly set. in make calling default_create or any parent calling/redefining default_create

    Not sure exactly, but it makes various time I got a Error: variable is not properly set. in creation procedures' calling order. I figured out that creating class attributes before calling default_create seemed to solve the problem. Why is that so? It doesn't seem that default_create calls something in my make routine??!!!

    Try to make an example even if I don't think I can reproduce it with a simple example...

    Working

    class A
    
    feature
    
        attr: B
    
        make
            do
                create attr
                default_create
            end
    
    end
    

    Error: variable is not properly set.

    class A
    
    feature
    
        attr: B
    
        make
            do
                default_create
                create attr
            end
    
    end
    
  • Jan 13
    Eiffel: change the signature of a inherited feature

    How is the correct way to change the signature of a feature in Eiffel if any? if there is no option as I understood, how would be the correct way to define in a parent class that there will be a feature to be able to select but still don't know arguments number and types (types are resolvable with polymorphism...)

    Is the only available playing with polymorphism having an argument into class a to select of type ANY?

    class SELECTABLE

    class SELECTABLE
    
        select
            deferred 
            end
    
    end -- class
    

    class DB_SERVICE

    class DB_SERVICE
    
    inherit
        SELECTABLE
            (...)
    
    feature -- Status setting
    
    
        select (a_db_connection: DB_CONNECTION)
            local
                l_qry: STRING
            do
                item := first_item_from_qry (l_qry)
            end
    
    end -- class
    
  • Jan 11
    Eiffel: Error: type is based on unknown class

    Trying to implement some test cases on EWF application with rest web services and JSON objects, I'm gettint a Error: type is based on unknown class. after adding my first class inheriting from EQA_TEST_SET

    Seems pretty complicated to implement test cases for a simple curl -v --header "Content-Type: application/json" --request POST --data '{"id":11,"name":"someName","enumerate":{"id":5}}' http://localhost:9997/someEntity curl command! How can I do that? Where is there some example? I'm trying to copy-paste the example from $ISE_LIBRARY/contrib/library/web/framework/ewf/wsf/tests/src/test_wsf_request.e as a base, but for the moment....

    I can find the class when browsing the dependencies as shown in screenshot, but the compiler not! strange behaviour!

    My app_ewf_app.ecf

    <?xml version="1.0" encoding="ISO-8859-1"?>
    <system xmlns="http://www.eiffel.com/developers/xml/configuration-1-19-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-19-0 http://www.eiffel.com/developers/xml/configuration-1-19-0.xsd" name="sit_ewf_app" uuid="0AB55F0B-014A-4775-B93F-ACC31C9300D5">
        <target name="common" abstract="true">
            <file_rule>
                <exclude>/CVS$</exclude>
                <exclude>/EIFGENs$</exclude>
                <exclude>/\.svn$</exclude>
            </file_rule>
            <option warning="true">
                <assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
            </option>
            <capability>
                <catcall_detection support="none"/>
                <concurrency support="scoop"/>
                <void_safety support="all" use="all"/>
            </capability>
            <library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
            <library name="http" location="$ISE_LIBRARY\contrib\library\network\protocol\http\http-safe.ecf"/>
            <library name="json" location="$ISE_LIBRARY\contrib\library\text\parser\json\library\json.ecf"/>
            <library name="lexical" location="$ISE_LIBRARY\contrib\library\gobo\library\lexical\library.ecf"/>
            <library name="logging" location="$ISE_LIBRARY\library\runtime\logging\logging.ecf"/>
            <library name="odbc" location="$ISE_LIBRARY\library\store\dbms\rdbms\odbc\odbc.ecf"/>
            <library name="store" location="$ISE_LIBRARY\library\store\store.ecf"/>
            <library name="time" location="$ISE_LIBRARY\library\time\time.ecf"/>
            <library name="wsf" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf-safe.ecf"/>
            <library name="wsf_extension" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\wsf_extension.ecf"/>
            <cluster name="database" location=".\database\" recursive="true"/>
            <cluster name="entity" location=".\entity\" recursive="true"/>
            <cluster name="error" location=".\error\" recursive="true"/>
            <cluster name="handler" location=".\handler\" recursive="true"/>
            <cluster name="logger" location=".\logger\" recursive="true"/>
            <cluster name="misc" location=".\misc\" recursive="true"/>
            <cluster name="relationship" location=".\relationship\" recursive="true"/>
            <cluster name="rest" location=".\rest\" recursive="true"/>
            <cluster name="service" location=".\service\" recursive="true"/>
            <cluster name="sit-json" location=".\sit-json\" recursive="true"/>
            <!-- TESTS -->
            <cluster name="tests" location=".\tests\" recursive="true"/>
        </target>
        <target name="ewf_app_any" extends="common">
            <root class="EWF_APP" feature="make_and_launch"/>
            <capability>
                <concurrency support="scoop"/>
            </capability>
            <library name="cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\cgi-safe.ecf"/>
            <library name="libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\libfcgi-safe.ecf"/>
            <library name="standalone" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\connector\standalone-safe.ecf"/>
            <cluster name="launcher" location=".\launcher\">
                <cluster name="any_launcher" location="$|any\"/>
            </cluster>
            <cluster name="src" location=".\src\" recursive="true"/>
        </target>
        <target name="ewf_app_standalone" extends="common">
            <root class="EWF_APP" feature="make_and_launch"/>
            <capability>
                <catcall_detection support="none"/>
                <concurrency support="scoop"/>
                <void_safety support="all"/>
            </capability>
            <variable name="httpd_ssl_disabled" value="true"/>
            <library name="default_standalone" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\standalone-safe.ecf"/>
            <library name="eel" location="$ISE_LIBRARY\contrib\library\text\encryption\eel\eel.ecf"/>
            <library name="ewsgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\ewsgi\ewsgi.ecf"/>
            <library name="http_client" location="$ISE_LIBRARY\contrib\library\network\http_client\http_client.ecf"/>
            <library name="testing" location="$ISE_LIBRARY\library\testing\testing-safe.ecf"/>
            <cluster name="launcher" location=".\launcher\">
                <cluster name="default_launcher" location="$|default\"/>
            </cluster>
            <cluster name="src" location=".\src\" recursive="true"/>
        </target>
        <target name="ewf_app_cgi" extends="common">
            <root class="EWF_APP" feature="make_and_launch"/>
            <capability>
                <concurrency support="scoop" use="none"/>
            </capability>
            <library name="default_cgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\cgi-safe.ecf"/>
            <cluster name="launcher" location=".\launcher\">
                <cluster name="default_launcher" location="$|default\"/>
            </cluster>
            <cluster name="src" location=".\src\" recursive="true"/>
        </target>
        <target name="ewf_app_libfcgi" extends="common">
            <root class="EWF_APP" feature="make_and_launch"/>
            <capability>
                <concurrency support="scoop" use="none"/>
            </capability>
            <library name="default_libfcgi" location="$ISE_LIBRARY\contrib\library\web\framework\ewf\wsf\default\libfcgi-safe.ecf"/>
            <cluster name="launcher" location=".\launcher\">
                <cluster name="default_launcher" location="$|default\"/>
            </cluster>
            <cluster name="src" location=".\src\" recursive="true"/>
        </target>
        <target name="ewf_app" extends="ewf_app_any">
        </target>
    </system>
    

    My error

    enter image description here

  • Jan 11
    Eiffel: unknown identifier `cursor` on LINKED_LIST[STRING]

    I have an unknown identifier on the local like some_values.cursor, I really don't understand why!

    qry_update_set_fields (some_keys, some_values, some_unstored_field_names: LINKED_LIST[STRING]): STRING
        require
            same_some_keys_some_values_count: some_keys.count = some_values.count
        local
            l_val_c: like some_values.new_cursor
        do
            Result := ""
            l_val_c := some_values.new_cursor
            across
                some_keys as l_key_c
            loop
                Result := l_key_c.item + "=" + l_val_c.item + ","
                l_val_c.forth
            end
            if Result.ends_with (",") then
                Result.remove_tail (1)
            end
        ensure
            dont_modify_parameters: old some_keys.is_equal (some_keys) and old some_values.is_equal (some_values)
        end
    

    working

    l_val_c: LINKED_LIST_CURSOR [STRING]
    

    Neither working

    l_val_c: LINKED_LIST_CURSOR [like some_values.item]
    
  • Jan 11
    Eiffel: Call use obsolete feature. Call to feature `to_string_8': Use `name_32' instead

    I have a warning I cannot get rid of neither understand:

    Eiffel: Call use obsolete feature. Call to feature `to_string_8': Use 'name_32' instead

    item_prototype is a DB_SERVICE where I redefine out

    if attached {APP_CONFIGURATION}.application_instance.selected_entity_primary_key ({SIT_UTIL}.class_name_lowercase ({like item_prototype})) as l_pk then
    

    enter image description here enter image description here

    One more point is that I wasn't able to copy the warning msg to my clipboard, how do I do that? if there is a way into EiffelStudio.

  • 2018, Dec 26
    Eiffel Web Framework, app run on linux raises `Address already in use: IO_FAILURE raised`

    After stopping an EWF app and starting it again in a Address already in use: c_bind Address already in use: IO_FAILURE raised

    enter image description here

    As explained here, it seems that TCP socket timeout is not available for some time before being released by OS.

  • 2018, Dec 20
    Eiffel library: JSON_OBJECT.item and common method to get content

    If I want to have the content value as string of a JSON_OBJECT.item ("key") without having to

    some_json_value_as_string: STRING
        do
            if attached {JSON_STRING} l_json_o as l_s then
                Result := l_s.unescaped_string_8
            elseif attached {JSON_NUMBER} l_json_o as l_n then
                Result := l_n.item.out
            else
                check
                    you_forgot_to_treat_a_case: False
                end
            end
        end
    

    for a json object like

    {
    |       |       "datasource_name": "DODBC",
    |       |       "datasource_username": "dev_db_usr",
    |       |       "datasource_password": "somePassword",
    |       |       "ewf_listening_port": 9997,
    |       |       "log_file_path": "/var/log/ewf_app.log",
    |       |       "default_selected_company": 1,
    |       |       "default_selected_branch": 1,
    |       |       "default_selected_consumption_sector": 1,
    |       |       "default_selected_measuring_point": 1,
    |       |       "default_selected_charge_unit": -1
    |       }
    

    the {JSON_VALUE}.representation with io.putstring is:

    datasource_username=dev_db_usr
    

    and not the value only!!!

    is there a way to do that? I didn't find intuitive the different methods of JSON_VALUE: values as the out method gives the class and pointer address, which is really far from a string representation of the associated json object for me...

  • 2018, Dec 20
    How do I initialize and fill a linked list in Eiffel?

    Here's what I have so far.

    create {LINKED_LIST[INTEGER]} list.make
    from
        i := 0
        list.start
    until
        i = 11
    loop
        list.put(i)
        i := i + 1
        list.forth
    end
    

    The debugger points to line list.put(i). I think the problem is that list is not properly initialized? I'm having a bit of an issue with figuring out how to use linked_list because I can't find any proper tutorial to help with. As you can see, I am just trying to write a LINKED_LIST program that adds numbers [0,10] in a linked list. Not a school project. Just practicing ahead of an upcoming course. Please help!

  • 2018, Dec 17
    Eiffel: How do I handle timezones?

    I didn't find any notion of timezone DATE_TIME class and TIME class. Am I wrong?

    How do I handle timezones with Eiffel library?

    Is there a way to specify it from the {DATE_TIME}.formated_out ("YYYY-MM-DD [0]hh:[0]mi:[0]ss")

    Is there a setter for timezone?

    I already got this problem with the logger which is logging with UTC...

    The only workaround I found was l.hour_add (-3) before the formated_out which is really dirty

  • 2018, Dec 17
    How to check if file exists in Eiffel
    feature 
    
        open_file_sample
            local
                l_file: UNIX_FILE_INFO
                l_path: STRING
            do
                make
                l_path := "/var/log/syslog"
                l_file.update (l_path)
                if l_file.parent_directory.exists and then l_file.parent_directory.is_writtable then
                    create l_file.make
                end
                 -- AS the above statement doesn't exist!
                check
                    syslog_file_exists_and_is_readable: l_file.exists and then l_file.is_readable
                end
            end
    

    Is this the proper way to check for file existence in Eiffel?

    I was wondering if there is a way not to create 2 objects. I'll complete my check with following statement:

    • define path `l_file_path := "/some/path/with_file.log"
    • check if parent directory exists and has rights to write into
    • create log file
  • 2018, Dec 13
    Eiffel compilation through Makefile and `dpkg-buildpackage -us -uc` generating an error
  • 2018, Dec 10
    How to use CURSOR_TREE class in Eiffel?

    Does this work for removing first two children from a node?

    remove_children(current_node : CURSOR_TREE[EXPRESSION]) 
            do
                current_node.down (1)
                current_node.remove
                current_node.forth
                current_node.remove
            end
    

    Or does that only remove the current_node?

  • 2018, Dec 09
    Is it possible to enforce Design by Contract checks at compile time?

    Reading Design by Contract tutorial I stumbled upon the following line:

    Contracts in Eiffel are not just wishful thinking. They can be monitored at run time under the control of compilation options.

    followed by explanations that they will throw exceptions when fail. It makes me think that all the require ensure invariant all checks can be either performed at runtime or turned off. Is this correct? Or they can be enforced at compile time as well using appropriate compiler options?

  • 2018, Dec 09
    eiffel c compilation failure: error LNK2001: unresolved external symbol
  • 2018, Dec 03
    Eiffel: are the convert methods working in case of agent call arguments?

    I'm calling a procedure with an argument which is an integer_64. I implemented a WATT class which can create it from an INTEGER_64 and it seems the execution stops when reached this point, where am I wrong?

    Catcall detected for argument#1args': expected TUPLE [!WATT] but got TUPLE [INTEGER_64]`

    code_and_situation

    Attached case (Update)

    Actually when checking with syntax

    attached {INTEGER_64} my_watt_object as l_int
    

    enter image description here

    it doesn't pass either... is it the expected behaviour?

    Actually it seems for me that the semantic cases are the same which have to validate the conformity step... for me (but seems not to be the case for the definition of the language between conformance/conformity) which says

    Conformance and convertibility are exclusive of each other, p.87

    Is the conformance rule valid for a type which defines as convert a type to another which is my case from WATT to INTEGER_64?

  • 2018, Dec 03
    Eiffel: how do I get the type of a particular operand of a procedure

    As I can see into the debugger it's possible to get the operands, and name of procedure, is there a way to get it?

    • PROCEDURE=>operands returns a detachable that seems return the operands only when they have been setted into the agent
    • Do I have pass through any REFLECTOR class because the PROCEDURE class doesn't have this function and in this case why?

    enter image description here

    Seems that estudio has access to informations as ROUTINE client don't have, why is he a privileged one? is he cheating?

  • 2018, Nov 15
    Eiffel: What's the difference between an "eiffel" library and a gobo library?

    Eiffel: What's the difference between an "eiffel" library and a gobo library? for example with xml, which should I choose and why?

    enter image description here

  • 2018, Nov 12
    How would one read space separated input in Eiffel?

    I can't really use Io.read_integer as that just ignores everything except the first number.

    I can use Io.read_line to get something like 15 14 59 86. How would I split these into integers now?

    Javascript has split(), C++ has stringstream, something similar would be ideal.

  • See more ...