Fork me on GitHub

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

Yehonathan Sharvit18:11:21

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.

Yehonathan Sharvit18:11:32

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)


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 🙂

Yehonathan Sharvit18:11:13

yeah - that will do it

Yehonathan Sharvit18:11:24

but anyway, I’m curious about your use case

Yehonathan Sharvit18:11:33

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..

Yehonathan Sharvit18:11:41

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

Yehonathan Sharvit18:11:53

the workaround is to put the expressions in an array

Yehonathan Sharvit18:11:06

But i think the best is to have separate snippets

Yehonathan Sharvit18:11:19

with a introductory text for each snippet


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...

Yehonathan Sharvit18:11:27

try to put all of them in an array


this is before introducing arrays 😞

Yehonathan Sharvit18:11:29

why not having several snippets?

Yehonathan Sharvit18:11:58

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...