klipse

practicalli-john 2016-11-19T18:01:54.000744Z

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

Yehonathan Sharvit 2016-11-19T18:02:58.000745Z

yeah!

Yehonathan Sharvit 2016-11-19T18:03:21.000746Z

I’m automatically removing the comments from last lines

practicalli-john 2016-11-19T18:03:23.000747Z

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

Yehonathan Sharvit 2016-11-19T18:03:32.000748Z

is that causing you troubles?

practicalli-john 2016-11-19T18:03:54.000749Z

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>

practicalli-john 2016-11-19T18:04:25.000750Z

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

practicalli-john 2016-11-19T18:04:39.000751Z

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

practicalli-john 2016-11-19T18:05:01.000752Z

I guess I can put the uncommented code last 🙂

Yehonathan Sharvit 2016-11-19T18:05:13.000753Z

yeah - that will do it

Yehonathan Sharvit 2016-11-19T18:05:24.000754Z

but anyway, I’m curious about your use case

Yehonathan Sharvit 2016-11-19T18:05:33.000755Z

why do you need all those comments?

practicalli-john 2016-11-19T18:08:55.000756Z

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

Yehonathan Sharvit 2016-11-19T18:09:41.000757Z

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

Yehonathan Sharvit 2016-11-19T18:09:53.000758Z

the workaround is to put the expressions in an array

Yehonathan Sharvit 2016-11-19T18:10:06.000759Z

But i think the best is to have separate snippets

Yehonathan Sharvit 2016-11-19T18:10:19.000760Z

with a introductory text for each snippet

practicalli-john 2016-11-19T18:10:27.000761Z

Ah, probably...

practicalli-john 2016-11-19T18:11:49.000762Z

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

practicalli-john 2016-11-19T18:12:14.000763Z

rather than have 6 snippet boxes...

Yehonathan Sharvit 2016-11-19T18:12:27.000764Z

try to put all of them in an array

practicalli-john 2016-11-19T18:12:47.000765Z

this is before introducing arrays 😞

Yehonathan Sharvit 2016-11-19T18:12:52.000766Z

ah

Yehonathan Sharvit 2016-11-19T18:13:29.000768Z

why not having several snippets?

Yehonathan Sharvit 2016-11-19T18:13:58.000769Z

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

practicalli-john 2016-11-19T18:14:36.000770Z

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

Yehonathan Sharvit 2016-11-19T18:14:48.000771Z

makes sense

practicalli-john 2016-11-19T18:15:23.000772Z

thanks