mit szoltok a nubank-cognitect aquisition-hoz?
felmerult bennem, hogy lehet erdemes lenne megtanulni portugalul 🙂
tobb felol is hallottam h erre a kovetkeztetesre jutottak az emberek 🙂 fonokom portugal amugy... ;D
Babashka-t probalta mar valaki elesben? https://github.com/borkdude/babashka nekunk mar nagyon viszket a tenyerunk h lecsereljuk a mindenfele bash script-jeinket meg makefile-jainkat babashka script-ekre inkabb...
anyway, masik dolog amivel a napokban probalkoztam, az a Reveal, avagy Read Eval Visualize Loop https://github.com/vlaaad/reveal a fejlesztoje segitsegevel hekkeltem bele egy egyszeru deep-diff supportot https://github.com/lambdaisland/deep-diff2
sajnos a kulonbozo hatterszin hasznalatahoz meg kellett valtoztatni a renderelo rutint a vlaaad.reveal.layout/draw
-ban:
(dotimes [i drawn-line-count]
(transduce
(mapcat :segments)
(completing
(fn [x {:keys [text width style]}]
(if (< x canvas-width)
(let [end (+ x width)
y (-> (* i font/line-height)
(+ font/ascent)
(- scroll-y-remainder))]
(if (<= end 0)
end
(do
(when-let [bg-color (:bg style)]
(doto ctx
(.setFill (fx.coerce/color bg-color))
(.fillRect x (- y font/ascent)
width font/line-height)))
(.setFill ctx (fx.coerce/color
(if-let [fill (:fill style)]
(get style/style fill fill)
"#000")))
(.setFont ctx font/font)
(.fillText ctx text x y)
end)))
(reduced nil))))
scroll-x
(lines (+ i dropped-line-count))))
de ennelkul is mukodik. itt a teszt kod aminek a kimenetet screenshot-oltam:
(let [inserted-color {:bg "#0F04"}
deletion-color {:bg "#F004"}]
(require '[vlaaad.reveal.stream :refer :all]
'[lambdaisland.deep-diff :as ddiff])
(defmethod emit lambdaisland.deep_diff.diff.Insertion [diff]
(horizontal
(raw-string "+" inserted-color)
(emit (:+ diff))
(raw-string "+" inserted-color)))
(defmethod emit lambdaisland.deep_diff.diff.Deletion [diff]
(horizontal
(raw-string "-" deletion-color)
(emit (:- diff))
(raw-string "-" deletion-color)))
(defmethod emit lambdaisland.deep_diff.diff.Mismatch [diff]
(horizontal
(raw-string "<-" deletion-color)
(emit (:- diff))
(raw-string ">" deletion-color)
(raw-string " ")
(raw-string "<+" inserted-color)
(emit (:+ diff))
(raw-string ">" inserted-color)))
(let [d (ddiff/diff {:removed 123
:common "data"
:changed {:value "old value"}}
{:common "data"
:added 456
:changed {:value "new value"}})]
(just (emit d))))
a Clojure/north conferencian volt egy erdekes talk az editscript library-rol. https://github.com/juji-io/editscript az editscript szerzoje nem ismerte a deep-diff-et, de miutan rakerdeztem youtube kommenten keresztul, irt egy osszehasonlito cikket a kerdesrol es a readme-hez is hozzaadott egy deep-diff referenciat: https://youtu.be/n-avEZHEHg8
tudom javasolni ezeket a megoldasokat, mert rengeteget tudnak segiteni teljesen kulonbozo helyzetekben is.