Polos Ruetz | 11 Dec 19:11 2014
Picon

EQL (ECL + Qt) in Slime: how it works

Hi,

this might be of common interest for ECL users, so please see attached
file if you want to know more.

Cheers,

Paul

EQL (ECL + Qt) in Slime -- how does it work?

  • Start swank using the EQL executable, running the swank server in an ECL thread, and using the main thread for the Qt main event loop.

  • Wrap every internal EQL function in a macro, which will call the function either directly (if called from GUI/main thread), or, if called from another ECL thread, will wrap the function call in a closure.

  • This closure will be passed to a queued, blocking Qt function running in the GUI thread, which will in turn call the closure.

The crucial part is passing a Lisp closure from an ECL thread to Qt and calling it from C++ in the GUI/main thread.

This is trivial in ECL/Qt, since both ECL and Qt use/wrap native C threads, and Qt offers a nice utility with Q_INVOKABLE.

First let's wrap the actual Lisp function, e.g. (foo x y) in a closure, so we only need to pass one ECL closure pointer to C++.

No need to pass Lisp arguments to C++, they are in the closure; no return value needed from C++, Lisp return values will be assigned in the closure:

(Continue reading)

Didier Verna | 5 Dec 08:24 2014
Face
Picon
Picon
Picon
Picon

[CfP] ELS 2015, 8th European Lisp Symposium, Apr. 20-21, London


		 ELS'15 - 8th European Lisp Symposium
		    Goldsmiths College, London, UK

			  April 20-21, 2015

	       http://www.european-lisp-symposium.org/

	  Sponsored by EPITA, Franz Inc. and Lispworks Ltd.

The purpose of the European Lisp Symposium is to provide a forum for
the discussion and dissemination of all aspects of design,
implementation and application of any of the Lisp and Lisp-inspired
dialects, including Common Lisp, Scheme, Emacs Lisp, AutoLisp, ISLISP,
Dylan, Clojure, ACL2, ECMAScript, Racket, SKILL, Hop and so on. We
encourage everyone interested in Lisp to participate.

The 8th European Lisp Symposium invites high quality papers about
novel research results, insights and lessons learned from practical
applications and educational perspectives. We also encourage
submissions about known ideas as long as they are presented in a new
setting and/or in a highly elegant way.

Topics include but are not limited to:

- Context-, aspect-, domain-oriented and generative programming
- Macro-, reflective-, meta- and/or rule-based development approaches
- Language design and implementation
- Language integration, inter-operation and deployment
- Development methodologies, support and environments
(Continue reading)

Arto Bendiken | 15 Oct 16:45 2014
Picon

Coverity Scan defect report for ECL

Good afternoon,

As noted to Matt in the other thread, I've registered the ECL project
with the Coverity Scan [1] static analysis cloud service—offered free
of charge to open-source projects—and have had them crunch through the
C portions of the code base.

Submitting a first build of HEAD to them yesterday, Coverity reported
639 defects [2]. I've triaged a number of the defects and thus far
eliminated or mitigated 23 of them through various means; see the
recent commits to HEAD. Note that in commit messages, CID means
Coverity ID—the identifier for a defect report in Coverity Scan.

The breakdown by category for the remaining 616 outstanding defect
reports is as follows:

• Control flow issues: 249
• API usage errors: 233
• Memory - illegal accesses: 83
• Uninitialized variables: 20
• Integer handling issues: 8
• Error handling issues: 8
• Code maintainability issues: 7
• Memory - corruptions: 3
• Insecure data handling: 1
• Null pointer dereferences: 1
• Incorrect expression: 1
• Security best practices violations: 1
• Resource leaks: 1

(Continue reading)

Matthew Mondor | 15 Oct 00:44 2014
Picon

NUL-termination bug in SOCKET-BIND and SOCKET-CONNECT


> Fixed a NUL-termination bug in SOCKET-BIND and SOCKET-CONNECT. by Arto Bendiken http://sourceforge.net/p/ecls/ecl/ci/fa48714dd86d4bf2c3c1f0210cca3e7875771e92/
>
> http://sourceforge.net/p/ecls/ecl/ci/fa48714dd86d4bf2c3c1f0210cca3e7875771e92/tree/contrib/sockets/sockets.lisp?diff=633c3a5f63a602ce18c54bfe88922d8644cbe619
>
> The backslash in '\0' got lost on the way to the generated C file
> (build/ext/sockets.c). There may be more of these issues elsewhere
> in the code base.
> This resolves CIDs 66405 and 66413 (Buffer not null terminated).

Hmm this is quite peculiar...  it makes me wonder if it's not a
compiler issue.

I couldn't find bugs 66405/66413, where can I read these?  Thanks.

And thanks for working on improving ECL,
--

-- 
Matt

------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
Picon

Link .o or .so to a running ECL program

Hello all,

I am wondering if it is possible to link a pure C compiled file, in .o
or .so (or .dll) formats, into a running Lisp process and how I can do that.

The case is a am running ECL via Emacs+Slime and it would be very useful
to link some modules written in C to bind then via uffi or native ffi.

Regards,

JRM

------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
Arto Bendiken | 21 Sep 16:38 2014
Picon

Patch queue housecleaning

Howdy,

In preparation for submitting some ECL patches of my own, I triaged
each of the patches currently in open/accepted state over at
SourceForge's patch tracker:

https://sourceforge.net/p/ecls/patches/

Looks like the patch queue could use some housecleaning, as the oldest
ticket has been open since 2010. My conclusions are as follows:

Tickets that can be closed as wont-fix, lacking a response from the
submitter for the past two years:

https://sourceforge.net/p/ecls/patches/8/

Tickets that can be closed because their attached patches have already
been merged previously:

https://sourceforge.net/p/ecls/patches/29/
https://sourceforge.net/p/ecls/patches/30/
https://sourceforge.net/p/ecls/patches/31/
https://sourceforge.net/p/ecls/patches/34/

Patches that ought to be merged, being trivial and obviously correct:

https://sourceforge.net/p/ecls/patches/33/
https://sourceforge.net/p/ecls/patches/37/

Patches that probably ought to be merged, but I'm not qualified to say:
(Continue reading)

daiyanh | 18 Sep 09:42 2014
Picon

Runtime bug in compiled code

ECL version: GIT of sometime in July, 2014
Platform: Windows 8.1, MSVC 2010 compiler, EMACS 24.3, SLIME 2014-8-1

The following code converts SRT subtitle file to SAMI format.
It works when eval'ed as is in the REPL or C-x C-e.
However, when (compile 'baz), it gives STORAGE-EXHAUSTED error
and stops.

(defun baz (f &key (format :iso-8859-1) (left 29) (right 29) (size 24) (align :center) (font "Meiryo") (weight :bold) (color :white) &aux p)
  (labels ((tr (c &aux (b (char-code c)))
      (if (< b 128) c (format nil "&#x~x;" b)))
    (tx (s)
      (setq s (mapcar (lambda (s) (format nil "~{~a~}" (map 'list #'tr s))) s))
      (apply
       #'concatenate 'string
       (mapl (lambda (s) (if (cdr s) (rplacd s (push "<br>" (cdr s))))) s)))
    (foo (x) (if x (+ (car x) (* 60 (foo (cdr x)))) 0))
    (ms (s) (round (foo (reverse (read-from-string s))) 1/1000))
    (bar (r &aux b e x)
      (setq r (cdr (reverse r)))
      (setq x (tx (cdr r)))
      (setq b (substitute #\space #\: (car r)))
      (setq b (substitute #\. #\, b))
      (setq e (format nil "(~a)" (subseq b (1+ (position #\> b)))))
      (setq b (format nil "(~a)" (subseq b 0 (position #\- b))))
      (format nil "<SYNC START=~a>~%<P CLASS=SUBTTL>~a~%<SYNC START=~a>~%" (ms b) x (ms e))))
    (with-open-file (s (format nil "../../desktop/~a.srt" f))
      (setf (stream-external-format s) format)
      (do ((l (read-line s) (read-line s nil))) ((not l) (setq p (reverse p)))
 (do ((m l (read-line s nil)) q)
     ((zerop (length m)) (if q (push (bar q) p)))
   (push m q)))))
  (push (format nil "<SAMI>~%<HEAD>~%<STYLE TYPE=\"Text/css\">~%<!--~%P {margin-left: ~dpt; margin-right: ~dpt; font-size: ~dpt; text-align: ~a; font-family: ~a; font-weight: ~a; color: #FFFFFF; background-color: #000000;}~%.SUBTTL {Name: 'Subtitles'; Lang: ja; SAMIType: CC;}~%-->~%</STYLE>~%</HEAD>~%<BODY>~%" left right size align font weight color) p)
  (rplacd (last p) (list (format nil "</BODY>~%</SAMI>~%")))
  ;;(rplacd (cdddr p) nil)
  (with-open-file (s (format nil "../../desktop/~a.smi" f) :direction :output)
    ;;(setf (stream-external-format s) '(:utf-8 :crlf))
    (format s "~{~a~}" p)))

Sent from Windows Mail

------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ecls-list mailing list
Ecls-list@...
https://lists.sourceforge.net/lists/listinfo/ecls-list
Morgon Kanter | 11 Sep 22:36 2014
Picon

Stack saving: any interest?

I've been working on a resource project for developing lightweight ("green") threads in Common Lisp, without needing ahead-of-time code walking like in the green-threads library. Part of the project has necessitated adding the ability to save and restore the stack as part of the underlying Common Lisp implementation. I've chosen to use ECL for the project as it is a small and more easily understood codebase.

My question is -- would there be any interest in merging this functionality back into ECL proper once I've completed it? The proposed interface is simply:

(mp:save-stack) -- returns a stack object (can be used as a first-class lisp variable, garbage collected normally, etc.).
(mp:restore-stack stack-object) -- restores the stack to that given by stack-object. This function does not return.

Cheers,
-- Morgon
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
Ecls-list mailing list
Ecls-list@...
https://lists.sourceforge.net/lists/listinfo/ecls-list
cm | 1 Sep 03:39 2014
Picon

new Ecl 13.5.1 crash when build

Hello
I build the Ecl 13.5.1 with  msvc 2012 on Win7 SP1. 
It report a error info:

        date /t > BUILD-STAMP
        set ECLDIR=./
        ecl_min < compile.lsp
NMAKE : fatal error U1077: 'ecl_min' : return code '0xc00000fd'
Stop.

Thank for some help!
------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ecls-list mailing list
Ecls-list@...
https://lists.sourceforge.net/lists/listinfo/ecls-list
Colin Gilbert | 24 Aug 22:44 2014
Picon

C standard in use?

Hi,

I was wondering as to which standard of C that ECL conforms. Does it make use of any extensions such as Gnu-C or specific coding styles that may interrupt a compiler? When I generate code to embed, will it require any specific options? I checked the FAQ and docs, but to no avail.

Thanks,
Colin

------------------------------------------------------------------------------
Slashdot TV.  
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Ecls-list mailing list
Ecls-list@...
https://lists.sourceforge.net/lists/listinfo/ecls-list
Fausto Saporito | 14 Aug 11:37 2014
Picon

Re: quite successfull build Tru64 (ev68) 5.1 with gcc 4.2.3

Hello all,

eventually I completed the build.

In order to avoid some arbitrary change in the code, I adopted a
different solution.
So, just to recap:

1) build gmp outside the process (using native compiler but using the
source provided in the package). I found some asm errors compiling
within the building process. So I preferred to build separately with
the Compaq CC.

2) some missing definition : UULONG_MAX, etc. I added in src/c/main.d
the following lines (borrowed by INTERNET ... if I remember well they
are from Bruno Haible)

# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))

# define TYPE_MAXIMUM(t) \
    ((t) (! TYPE_SIGNED (t) \
      ? (t) -1 \
     : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))

# ifndef ULONG_LONG_MAX
#  define ULONG_LONG_MAX TYPE_MAXIMUM (unsigned long long)
# endif
# ifndef LONG_LONG_MAX
#  define LONG_LONG_MAX TYPE_MAXIMUM (long long int)
# endif
# ifndef LONG_LONG_MIN
#  define LONG_LONG_MIN TYPE_MINIMUM (long long int)
# endif

3) setup these env variable, before to run configure:

   a) LIBS="-lpthread -lrt"
   b) CFLAGS="-D_POSIX_PII_SOCKET -DAF_LOCAL=AF_UNIX"

then I used this parameters to configure:

./configure --without-x --disable-shared --enable-c99complex

The item 2) should be fixed in a different way, but I don't know how
to do this... i.e. create a new include file ? or modify source.d in a
permanent way with some #ifdef.

regards,
Fausto

2014-08-13 21:31 GMT+02:00 Fausto Saporito <fausto.saporito@...>:
> Hello all,
>
> just to say I was quite able to build ecl-13.5.1
>
> some changes to the standard build process:
>
> 1) build gmp outside the process (using native compiler but using the
> source provided in the package). I found some asm errors compiling
> within the building process. So I preferred to build separately with
> the Compaq CC.
>
> 2) ecl_min building: is missing -lpthread and -lrt otherwise we have
> undefined symbols
>
> 3) some missing definition : UULONG_MAX, etc. I added in src/c/main.d
> the following lines (borrowed by INTERNET ... if I remember well they
> are from Bruno Haible)
>
> # define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
>
> # define TYPE_MAXIMUM(t) \
>     ((t) (! TYPE_SIGNED (t) \
>       ? (t) -1 \
>      : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
>
> # ifndef ULONG_LONG_MAX
> #  define ULONG_LONG_MAX TYPE_MAXIMUM (unsigned long long)
> # endif
> # ifndef LONG_LONG_MAX
> #  define LONG_LONG_MAX TYPE_MAXIMUM (long long int)
> # endif
> # ifndef LONG_LONG_MIN
> #  define LONG_LONG_MIN TYPE_MINIMUM (long long int)
> # endif
>
> quite at end I have a serious error, compiling ext/socket.c
> complaining that socklen_t is not defined... so I added
>
> typedef unsigned long socklen_t; /* 64-bits */ in ecl-cmp.h
>
> but now, running again the make I have an error:
>
> ;;; Compiling #<concatenated stream 0000000144c36e60>
> (compile-file "ext:sockets;sockets.lisp" :output-file
> #P"BUILD:EXT;SOCKETS.O.NEWEST" :SYSTEM-P T :C-FILE T :DATA-FILE T
> :H-FILE T)
> ;;;
> ;;; Compiling EXT:SOCKETS;SOCKETS.LISP.
> ;;; OPTIMIZE levels: Safety=2, Space=1, Speed=1, Debug=1
> ;;;
>
> Condition of type: SIMPLE-PACKAGE-ERROR
> There exists no package with name "SB-BSD-SOCKETS"
>
> Should I delete build directory and make again everything ?
>
> I used --without-x and --enable-c99complex options, the other ones are
> the default ones.
>
> regards
> Fausto

------------------------------------------------------------------------------

Gmane