Live data from Hacker News

Clojure REBL [video]

youtube.com

51–60 of 101 posts

Re: Clojure REBL [video]

#51

Earlier quoted context omitted.

Can you say more about what makes it “far from perfect” besides the error messages? What are its other weaknesses? I’m still in the honeymoon phase and want to hear more from folks who have shipped code.

I personally hate the startup time. Mainly because it prevents me from using it in places I really want it. It's gotten a lot better over the years, but it's still pretty bad.

Now you can use GraalVM (with a few caveats) to native-compile Clojure code, though. It's still in its early stages, but it's possible.

Re: Clojure REBL [video]

#52
post #42

While we're talking about this conference, rich hickey just changed how I think about domain modelling forever with this talk, released about an hour ago: https://m.youtube.com/watch?v=YR5WdGrpoug Strongly recommend a watch particularly if you're modelling something in a typed language

I was thinking of the exact same thing when writing my new project in Python, and implemented a poor-man's version using typing.NamedTuple. But my idea was mainly from the extensive records from Elm. Although Elm also have Maybe, but the idioms of "making impossible things unrepresentative" eliminates a lot of unwanted usage.

Re: Clojure REBL [video]

#54
post #24

Earlier quoted context omitted.

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.

I stumbled upon importlib.reload(module_name) in the Spyder IPython console, which I use as a REPL alongside the code editor in Spyder. REPL based programming has spoiled me and I find myself drifting towards lispy things like Clojure for the REPL alone, nevermind all the other good things.

Re: Clojure REBL [video]

#55
post #24

Earlier quoted context omitted.

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.

Have you considered using ipython as your REPL? I use ipython and in my profile, I have the following setting. This enables auto-reload and it works almost all the time.

Here is the option I have in my profile file. You can run this command inside the ipython session as well:

%autoreload 2

The times I have seen auto-reload fail is when there is lot of class creation magic going on or while dealing with global connection objects which sql alchemy might be creating. But, other than that it works very nicely.

Re: Clojure REBL [video]

#56
Cool stuff! HATEOAS [1] for REPLs?

"A [REST] (REBL) client enters a [REST application] (REBL browser) through a [simple fixed URL] (initial EDN [2] data). [All] future actions the client may take are discovered within [resource representations] (metadata) returned [from the server]. The media types used for these representations, and the link relations they may contain, are standardized. The client transitions through application states by selecting from [the links within a representation] (the annotated data) or by manipulating the representation in other ways afforded by its media type. In this way, [RESTful] (REBL) interaction is driven by [hypermedia] (metadata), rather than out-of-band information.

1: https://en.wikipedia.org/wiki/HATEOAS , the one thing that makes REST REST but nobody implements in their "RESTful APIs".

2: https://github.com/edn-format/edn

Re: Clojure REBL [video]

#57
post #9

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

Honest question, how do we interpret "commercial use"?

I'd assume it means you cannot sell REBL itself or a derivative, not that you cannot use it as a developer tool to build your project, which kind of makes sense.

Re: Clojure REBL [video]

#59

Given that this is pretty much an inferior version of the Pharo Glamorous Toolkit [1], which has been available for years, it is very disappointing to not see a reference/attribution. Especially taking into account that the - pioneering - research happened in the Smalltalk camp. If I wanted to be cynical I would say that presenting half-assed re-implementations of good ideas found in non-popular projects (Smalltalk,…

I interpreted the talk as the tool viewer was a proof-of-concept in order to advocate the benefits of using the nav and datafy protocols. I believe Stu is not claiming its particularly novel, but instead wants to inspire tool makers to use the protocols and make better tools, hence his mentioning of his curiosity of what the Clojurescript guys could make. I mean I had the idea of a data viewer with some partial implementation with no knowledge of GT, and another person in this thread has been working on a similar idea, the tool concept isn't that novel (based on the features you describe). On the other hand, Clojure being a dynamic language by default makes any open source dataviewer written in Clojure automatically "moldable". Further, because of the protocols, its easy to swap between different people's implementations of the viewers. Clojurescript in particular is at an advantage because of the vast web resources and Clojurescript can compile itself.

Re: Clojure REBL [video]

#60
post #42

While we're talking about this conference, rich hickey just changed how I think about domain modelling forever with this talk, released about an hour ago: https://m.youtube.com/watch?v=YR5WdGrpoug Strongly recommend a watch particularly if you're modelling something in a typed language

Agreed, just finished watching, and that's an amazing talk.
Post reply on HN