Fork me on GitHub
#unrepl
<
2017-11-27
>
pesterhazy09:11:16

@cgrand what's the issue with quoting? I feel I'm lacking some context

cgrand10:11:21

my pain with quoting impl is due to a bad decoupling between print-on and ednize

cgrand10:11:16

Quoting is about the fact that when I work on unrepl I do have #unrepl/xxx as data and don’t want them handled by the client

cgrand10:11:16

@pesterhazy you see what I mean?

pesterhazy10:11:18

@cgrand, your edn printer needs to handle those "specials" in a special way?

cgrand10:11:46

which printer, the unrepl one?

pesterhazy10:11:02

I'm trying to summarize to see if I understand

cgrand10:11:16

Excert from unravel:

user=> [(tagged-literal ’unrepl/... nil)]
[#__1]

cgrand10:11:38

I would expect [#unrepl/... nil]

cgrand10:11:01

but it’s a super niche issue affecting mostly me

pesterhazy10:11:00

so the issue is you can't distinguish between "fake" unrepl defrecords (tagged literals) generated by client code and the genuine ones?

pesterhazy10:11:16

that does seem like a niche issue 🙂 def not a release blocker

volrath10:11:41

@cgrand @pesterhazy question: do any of you have like a set of tests that you use to check border cases / printing /etc, when working on unravel? I have a file with a couple of things that I use to test everything is displaying correctly, but I'm sure there might be more interesting types of "tests"

volrath10:11:50

this is what I have so far:

volrath10:11:55

(+ 1 1)
{:a 1}

(def square #(* % %))
(square 5)

(list
 (range 100)
 (into [] (range 100))
 (into #{} (range 100)))


(def letters (map char (range 97 (+ 97 26))))
(zipmap letters (range 20))
(zipmap letters (repeatedly #(range 100)))

(apply str (repeat 100 "a"))
(print "hi")
(println "hi")
(print (apply str (repeat 100 "a")))
(println (apply str (repeat 100 "a")))


(/ 1 0)
x

(future
  (Thread/sleep 5000)
  (println "delayed 5 secs"))

volrath10:11:49

(I'm also testing objects, like printing functions, atoms, etc)

pesterhazy10:11:46

@volrath there's scripts/tests

volrath10:11:43

ah, perfect 🙂

pesterhazy11:11:09

it would be fantastic to add these as a further test case

volrath11:11:18

maybe it'd be nice to have a collection of these expresions, so that we could use unrepl's output for them and test

pesterhazy11:11:35

don't judge me for my homegrown "unit testing" framework

pesterhazy11:11:04

more like end-to-end tests I guess

volrath11:11:24

so I'm thinking maybe do a collection of this files with their corresponding unrepl edn outputs as edn files, and every client could use those edn files to reproduce entire repl sessions

volrath11:11:05

hey, if it works.. I wonder, how do you use those?

volrath11:11:20

what command do you run to test the regex?

pesterhazy11:11:30

scripts/tests

pesterhazy11:11:18

for each "FILE" it sends "FILE.clj" to the repl and expects "FILE.ought" or "FILE.ought.regex"

pesterhazy11:11:12

but that can be easily turned into a glob

pesterhazy11:11:56

maybe EDN would be better but I just went with the simplest thing that worked

volrath11:11:15

edn is easier to setup in something like travisci

volrath11:11:33

I guess it's possible to run a repl in travis, but way slower

pesterhazy11:11:33

you mean, get nicer test output? as in JUnit?

pesterhazy11:11:48

this should work well on travis

pesterhazy11:11:18

just haven't gotten around to set up CI

volrath11:11:23

i mean just automating it.. I haven't run any clojure tests con travis, I'm guessing they have images for that.. so it'd be just running a socket repl on the container, upgrading and sending the files

volrath11:11:49

i thought edn because then you don't have to do any of that, it's faster, but it's not end-to-end

volrath11:11:37

but now that i think about it, it's better to run the repl in every test

volrath11:11:50

because that way you could also test your own blob customization, if any

pesterhazy11:11:38

the script already does some of this, like starting the clojure server in the bg: https://github.com/Unrepl/unravel/blob/master/scripts/tests#L6

pesterhazy11:11:16

On circle, we only need to install yarn and download the clojure jar - then I think it should be good to go

pesterhazy11:11:57

hmm. can't figure out how to add circleci through the github org

pesterhazy11:11:28

figured it out 🙂

cgrand12:11:59

@pesterhazy parfix ready to merge; --flag parfix to try it

volrath13:11:38

cool, I'll probably do something similar for unrepl.el soon