GithubHelp home page GithubHelp logo

Comments (10)

mmontone avatar mmontone commented on June 3, 2024

Nope :(

from erudite.

mmontone avatar mmontone commented on June 3, 2024

This would cool to have. Add some special Erudite section tag, and connect to a Swank instance to evaluate the code and then print it.

from erudite.

mmontone avatar mmontone commented on June 3, 2024

I've started to implement code evaluation.

It is incomplete and needs refinement at the moment, but I will work on it in the next days.

Look at the @eval section.

@vindarel

a4bd593

from erudite.

mmontone avatar mmontone commented on June 3, 2024

Hi,

Is it possible (or the goal) in erudite to capture and print the output of a function, akin to org mode ?

I'm imagining:

#| The latest news are:

@capture
#|
(defun latest-news ()
  (…))
(latest-news)

Regards

So, now, the answer to this question is, yes!

from erudite.

mmontone avatar mmontone commented on June 3, 2024

TODO:

  • Implement a @local-eval tag that doesn't need to connect to a SWANK instance, and just evaluates code in the current Erudite image?
  • @code-and-eval tag, that prints code, and then prints the code evaluation result.
  • @code-and-local-eval ?
  • Add SWANK connection settings parameters to CLI and also ERUDITE function.
  • Improve evaluated code output format.

from erudite.

vindarel avatar vindarel commented on June 3, 2024

That's great!

from erudite.

vindarel avatar vindarel commented on June 3, 2024

Can you give the steps on how to setup this? By default, in the REPL, it didn't work. I tried setting erudite::*swank-port* to the current one, I tried creating a new swank server and telling erudite its port, but then the erudite:erudite command hangs. Do we have to set erudite::*swank-connection* manually? Thanks.

from erudite.

mmontone avatar mmontone commented on June 3, 2024

You need to start a SWANK server with (SWANK:CREATE-SERVER :DONT-CLOSE T).

Please pull from this repo, as I've improved the error message.

Expect changes going forward; this is work in progress.

from erudite.

vindarel avatar vindarel commented on June 3, 2024

OK got it. It was just a bad usage. I was trying this:

;; @eval
;; some comment
(+ 1 1)
;; @end eval

and the call to slime-eval was hanging,

where we need

;; @eval
;; (+ 1 1)
;; @end eval

or the same inside "#|".

from erudite.

mmontone avatar mmontone commented on June 3, 2024

Ok. I wish it didn't hang, and signal an error instead. I'll look into that later.

from erudite.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.