Live data from Hacker News

Clojure REBL [video]

youtube.com

21–30 of 101 posts

Re: Clojure REBL [video]

#21
post #20

This is very similar to my own work for the last many years, and I'm sad and delighted he's managed to pull it off in such a clojure-native, slick looking way. Well done. I haven't finished watching the video yet, but it's a little deflating. Still though, if others had been doing this years ago I wouldn't have been scratching that itch.

It sounds like you'd easily be able to extend your work to the datify/nav protocols so your work wouldn't really be a waste. His viewer seems more a proof-of-concept.

Re: Clojure REBL [video]

#22

I really, really like Clojure. I just wish I had something to use it for. I've done lots of Common Lisp development previously and REPL-based programming is just great. I can't really do it in Python and it makes me sad.

I use ipython with auto reload and it works really well in general. Not sure how anyone lives without it.

I made a video to demonstrate it some time ago. Apologies for the dreadful sound quality. https://youtu.be/k-mAuNY9szI

Re: Clojure REBL [video]

#23
What is "not data" that can be the result of eval; at first I thought he was talking about side effects, but 5 minutes after he first said that I'm still not sure what he was talking about.

Re: Clojure REBL [video]

#24
post #4

Earlier quoted context omitted.

> I can't really do it in Python and it makes me sad. That really bugs me with a great many popular languages. There's a REPL, but the libraries and tooling don't really embrace it.

The only tools I've found with decent support for Python and other languages are all emacs based. Same goes for the Clojure and CL ones, actually. It's no surprise, I suppose, because this style of programming is so natural to an emacs user. But it's difficult with Python as soon as you try to do anything beyond a single module. CL and Clojure have proper packages and namespaces so it works fine. But in Python you're…

> But in Python you're limited to working on the context of a single module. If you modify a module that was imported then you have to restart the REPL because you can't reload modules. It just doesn't work.

This is so frustrating, the Python REPL does some kind of module caching, and I haven't found how to disable it. When I asked on IRC a few years ago, I was told that I was using the REPL for the wrong purpose.

Re: Clojure REBL [video]

#25
post #23

What is "not data" that can be the result of eval; at first I thought he was talking about side effects, but 5 minutes after he first said that I'm still not sure what he was talking about.

Clojure has facilities for seamless interop with Java (or whatever platform it's hosted on). A lot of times when inter-operating with Java libraries, you get back an opaque Object with associated methods when you'd normally expect a transparent Clojure map or some other pure data structure if you were interacting with a purely Clojure library. Datafy is just a protocol that allows you to transform those opaque Objects into transparent data structures.

Clojure separates data from the functions that operate on it. In contrast, Objects intertwine those two things. You can roughly think of the "data" part of an Object as its attributes, and the "function" part its methods.

Re: Clojure REBL [video]

#26
post #20

This is very similar to my own work for the last many years, and I'm sad and delighted he's managed to pull it off in such a clojure-native, slick looking way. Well done. I haven't finished watching the video yet, but it's a little deflating. Still though, if others had been doing this years ago I wouldn't have been scratching that itch.

It sounds like you'd easily be able to extend your work to the datify/nav protocols so your work wouldn't really be a waste. His viewer seems more a proof-of-concept.

Doesn't feel like a waste ;) The time spent investigating different GUIs in Clojure or integrating languages with better GUIs with Clojure feels does like a waste. I eventually settled on plain ol Swing but JavaFX looks quite nice.

clojure.spec was a nice step up to natively dealing with data 'shapes', I'm hoping the datify/nav protocols will be a step up to what I'm doing as well. It's basically a generalised browser over data with different print representations, collection handling, publishing, muxing, etc. The REBL will hopefully raise consciousness of just how abysmal the representation and navigation of the web is today.

Re: Clojure REBL [video]

#27
post #9

From the license: > You may not use REBL for commercial use.

Sometimes it seems as if Cognitect just doesn't want people to use Clojure. It's like they looked at the results from the survey[0], created a tool that appears to address some of the main gripes that people have, and then proceeded to say "screw you" to all of the people that use Clojure commercially and may actually pay for Datomic... [0]: https://danielcompton.net/2018/03/28/clojure-survey-2018

[deleted]

Re: Clojure REBL [video]

#28
I need a Clojure job, their technology seems like it's from the year 3000 and I'm over here in PHP land banging rocks together

Their idiomatic database can travel through time, they focus intently on composition, referential integrity, immutability to the database level

They have specs which can validate things typically better than types and they compose

They focus on shared protocols which gives them amazing leverage, like the internet works because we all cooperate via the http protocol

I've been looking quite closely at datomic recently and that database looks ducking magic

Now datafy and nav will give rise to generalised browsers of anything Clojure can touch, conceptually it's kind of like my file system, my SQL browser, my web browser, my profilers, my debuggers and any number of other things I haven't imagined, all merged into one

Re: Clojure REBL [video]

#29
post #23

What is "not data" that can be the result of eval; at first I thought he was talking about side effects, but 5 minutes after he first said that I'm still not sure what he was talking about.

Clojure has facilities for seamless interop with Java (or whatever platform it's hosted on). A lot of times when inter-operating with Java libraries, you get back an opaque Object with associated methods when you'd normally expect a transparent Clojure map or some other pure data structure if you were interacting with a purely Clojure library. Datafy is just a protocol that allows you to transform those opaque Object…

I'm not entirely sure I get the distinction you are making. Sounds like you are just saying that not everything prints well. Which, yeah, that is true. As noted in the speech, sometimes it is just cumbersome to see printed.

Re: Clojure REBL [video]

#30
post #23

What is "not data" that can be the result of eval; at first I thought he was talking about side effects, but 5 minutes after he first said that I'm still not sure what he was talking about.

Clojure has facilities for seamless interop with Java (or whatever platform it's hosted on). A lot of times when inter-operating with Java libraries, you get back an opaque Object with associated methods when you'd normally expect a transparent Clojure map or some other pure data structure if you were interacting with a purely Clojure library. Datafy is just a protocol that allows you to transform those opaque Object…

I still fail to see how methods are not data in the general sense, but while trying to answer my own question, it seems that "data" in clojure means roughly "Either an atomic type[1] or a collection"

1: an "atom" in clojure is not what it is in traditional lisp lingo; is there a name in clojure for type that is roughly the union of: symbol, number, character, boolean ? perhaps "primitive"?

Post reply on HN