klipse 2016-11-19

@viebel has something changed that stops commented code being shown in klipse code sections ?

yeah!

I’m automatically removing the comments from last lines

I have several expressions as separate lines of code that I would like to group together in one klipse code section.

is that causing you troubles?

I have been doing the following

<pre><code class="language-klipse" data-eval-context="expr">
(= 1 1)
;; (= "Hello" "Clojure")
;; (< 3 4)
;; (> 3 4)
;; (odd? 3)
;; (even? 7)
</code></pre>

Is it possible to now show the output of all these expressions ?

I can always create a section for each one...

I guess I can put the uncommented code last 🙂

yeah - that will do it

but anyway, I’m curious about your use case

why do you need all those comments?

If I had more than one expression, I was only getting one result. I will try it again without comments..

you are getting one expression because of data-eval-context=”expr"

the workaround is to put the expressions in an array

But i think the best is to have separate snippets

with a introductory text for each snippet

Ah, probably...

I was showing different examples of conditions, so there wouldnt be any other text for each snippet... hence the idea to put them into one. I guess I could get students to copy/paste them into klipse

rather than have 6 snippet boxes...

try to put all of them in an array

this is before introducing arrays 😞

ah

why not having several snippets?

then you’ll have a direct connection between source code and its evaluation

Septerate snippets would take up a lot of space on the page... I think copy / paste from some examples into a klipse box would work well and would allow the students to guess if something was true or false before they pasted it...

makes sense

thanks