Fork me on GitHub
#announcements
<
2023-06-29
>
tatut05:06:23

REPLey: a web REPL made with Ripley https://github.com/tatut/REPLey

🎉 14
tatut05:06:59

“Language: CSS” 😄 I need to minify the CSS because there’s more of it than Clojure code here

clojure-spin 8
😄 4
Michaël Salihi18:06:06

If minifying CSS is not suffisant, you can also put a .`gitattributes` file excluding some language like I did on this project. https://github.com/prestancedesign/pingcrm-clojure/blob/main/.gitattributes

thanks 2
tatut11:07:20

I made an intro video to better see what it is about https://youtu.be/UiRq97HZctQ

zeitstein20:07:25

I've been playing around with various similar tools this week and REPLey is definitely an interesting project. Implementing navigation (with breadcrumbs!) similar to https://github.com/phronmophobic/viscous is really cool. Thank you! Some thoughts/comments: • Is CLJS support planned? • I like how toggle state and truncation works by default. You get enough of a sense of the tapped value, then FULL gives you all info without having to unfold nested values. (Something that bugs me about Portal.) • Ability to reference and manipulate tapped values from the REPL box would be cool. • Button to clear all tapped values. • More prominently displaying the time and origin of the tap would be nice. shadow's inspect does this and I quite like 'logs' from Portal (see attached img; though ms precision would be better). Ability to "label" taps could be a nice addition. BTW, I tried b85a1f0ccd80215919d941a7e7fe488dac082694 over the weekend. However, the latest commit as of now, throws:

; Syntax error macroexpanding h/html at (repley/main.clj:106:5).
; No garden compiler found, add garden to deps to support CSS compilation

tatut20:07:52

Thanks for trying it out.

tatut20:07:21

Cljs is not planned as ripley, the underlying ui library ia strictly server side rendering

zeitstein20:07:11

Perhaps I should've phrased it more clearly. I meant the ability to add a tap on CLJS side. I wonder if that is doable. A quick glance at https://github.com/djblue/portal/tree/master/src/portal/shadow, it seems that taps basically send HTTP requests to the server.

tatut20:07:35

That sounds doable.

👍 1
tatut10:07:59

added a timestamp (and duration if value was evaluated by REPLey)... can be configured with :timestamp-format (nil to disable)

👍 1
tatut10:07:38

the latest commit should start, added a badge showing latest github actions test status

zeitstein11:07:25

Still seeing the garden-related error with latest commit.

tatut11:07:47

by running clj -M:dev ?

tatut11:07:23

Ripley supports garden styling, but doesn't provide the dependency (so that's why you can get that, but REPLey isn't using those)

zeitstein11:07:08

I included it as a library. Requiring repley.main throws.

tatut11:07:33

ok, accidentally had 1 garden style there... can you try with the latest commit? committed just now

tatut11:07:47

great, thanks for reporting it

zeitstein12:07:56

Are you aware of any limitations with the EDN visualisation navigation? Simple stuff like {:foo {:bar 1}} works, but with a larger map from my server it doesn't 🙂

tatut12:07:49

yes, edn stuff needs to have the key read able

tatut12:07:12

if you have minimal samples of what fails in navigation, it would be useful if you can report that as an issue in github

zeitstein12:07:48

I'm trying to find out know, will report.

thanks 1
zeitstein12:07:07

It seems to work before I press "full".

tatut12:07:10

yes, seems to be missing the id when rerendering without truncation

tatut12:07:19

that should be a quick fix

👍 1
zeitstein12:07:28

Fixed, thanks. A thought: maybe navigation should not reset the truncation?

tatut12:07:55

currently the truncation is component local state and thus navigation removes and creates a new component... could be moved to another place

tatut12:07:28

I agree, it certainly could remember that you expanded a given result already

zeitstein12:07:28

Just a thought. Quite feasible others would like it to reset 🙂

zeitstein12:07:57

I could probably quibble about minor details of the UI, but that's not important at this point. I'll try to look into what it would take to support CLJS taps. I'd quite like to use REPLey for my projects 🙂

tatut12:07:54

would just an HTTP endpoint to receive edn formatted values be enough? that should be then easy to integrate into a cljs project

zeitstein12:07:18

I think that's how Portal does it, yeah.

tatut12:07:39

I can add the endpoint at least, I'm not currently doing cljs so don't have a shadow build to test with

zeitstein12:07:34

Great. With the endpoint in place, I could play around.

tatut12:07:28

added a receive endpoint, you can call it like

% curl -X POST -d "{:hello \"there\" :meaning-of-life 42}" 
it returns 204 no content always

awesome 1
zeitstein13:07:58

I have it working. Are you interested in a PR? (There's not much to it.)

zeitstein13:07:11

One issue I'm encountering now: No reader function for tag gdb/ident.

tatut13:07:13

Well that is the problem with a generic edn parsing, dont have any specific reader tags installed

zeitstein13:07:59

Can we add edn readers to the repley-handler config or is this more of a userland concern?

tatut13:07:57

I think it would be good to have in the config

phronmophobic05:06:06

https://github.com/phronmophobic/clong: A wrapper for libclang and a generator that can turn c header files into clojure apis. Version 1.0 • Use javacpp for pulling native dependencies via maven • Bug fix for structs with bitfields • Simplify def-api into smaller pieces I've been using clong for several different projects and I think it's ready for the 1.0 release 🎉

🎉 31
👀 5
🙀 2
Kelvin19:06:43

https://github.com/yetanalytics/pathetic version 0.5.0 is now out: • Remove Clojure(Script) and data.json as library dependencies, and update core.match and Instaparse dependencies • Update the apply-value function to support the following optional args: ◦ :wildcard-append?: Dictates if wildcard values should be appended to the end of existing seqs. Default false (this is a breaking change from the previous default behavior). ◦ :wildcard-limit: Dictates how many wildcard paths should be generated. If it is not present then the entire coll gets overwritten at each wildcard location if :wildcard-append? is false; if it’s true, one new path gets appended. • Add an apply-multi-value function that is similar to apply-value, except that it must accept a collection of values that will be applied in order. Returns once the values or the available path seqs runs out. Also accepts :wildcard-append? and :wildcard-limit. • Add a speculate-paths function that acts like get-paths but is not stopped by missing values. Also accepts :wildcard-append? and :wildcard-limit. • Various internal namespace changes and implementation refactors

🎉 12