37,790 karma · joined Sep 7, 2019 (7y ago) · 9,208 submissions
comment 6y ago · link · parent
comment 6y ago · link · parent
But Clojure is also built on top of immutable data structure, recursion and more, but also provides features for mutation of various things, both for pragmatism and sometimes performance. Clojure also lives like a hosted language (on top of JVM/browser engines/more), most of them being mutable by default, so providing those constructs help with interop as well.
comment 6y ago · link · parent
So if it's performant, it's not "janky" (again, in web-dev circles) but it could still be a "hacky" implementation, even without any jank. It's also different from "robust", so something can be not-janky but also not-robust.
comment 6y ago · link · parent
Let's cool it down with trying to start up some heated argument around this, no one is interested in that.
comment 6y ago · link · parent
In both scenarios, just filling the issue yourself is faster
8411.
726 points · by capableweb · 6y ago · 228 comments
comment 6y ago · link · parent
The lesson I carry is that the more secret it something is, the closer to my brain it is. Top-secret = only in my head, little bit secret = encrypted on my harddrive, little less secret = encrypted in the cloud, not secret at all = just dumped in a Google Drive account
comment 6y ago · link · parent
Absolutely, I agree with that as well! I would not rewrite something to a different languages unless there is a damn good reason for it. I'm not a person who generally rewrite stuff "for fun", so I think you're spot on here.
And I agree with you on the architecture/language comment as well, it's way more important. But I do think that the common practices of a language either helps/slows you down as well, so doing the same thing in two different languages can be implemented in different speeds.
> The language choice mostly just comes down to syntax preferences
Here is where I kind of disagree, but not fully. Yes, Java and C# are basically the same, in the end. Details are different, but mostly the same. Same goes for all languages in the Algol-group of languages, which C, JavaScript, Java, Python and more belongs to.
Then we have the Lisp-family of languages. They are very similar, within the group, but compared Lisp-like languages with Algol-like languages, the differences become way larger. Add languages like Erlang, which are way different, and you get some more differences.
So yeah, most of the language choices people do today, mostly come down to things around the language (ecosystem etc) rather than the language itself, because most people limit their choice to Algol-like languages.
In the end, I could not care less about the language you use, I'm not trying to force anyone to use what I find most productive. We all have preferences that speaks for us. But I wish someone tried to get me to dive into Lisp/Clojure earlier, and I think there are others who will feel the same, but again, I don't really care what others use.
comment 6y ago · link · parent
In general I agree with you, but I think this is taking it a bit too far. My journey was similar, except PHP was my starting language and I was doing frontend (so HTML+CSS+JS) at the same time.
But, now I'm doing Clojure full-time. But not until I spent 2-3 years on-off learning it. It wasn't until 1.5 year ago I actually sat down and started writing things in Clojure.
But if I had the "only if it provides me immediate value" mindset, I would never have learned Clojure. It's not until now I'm more productive than I ever been, but that required a bit of uphill fighting.
But I'm so glad I stuck with it, now I can't imagine programming in something else. Which has ruined me a bit, but I'm happy with that.
comment 6y ago · link · parent
I think the use case for this library is less about saving things locally for reuse later and more about communication between multiple different services/runtimes.
comment 6y ago · link · parent
That seems to indeed be one of the use cases.
> If so, why can't I just assign the function to a variable directly?
Clojure doesn't really have variables as you're used to it (I'm assuming your experience here). Instead, Clojure has Var, Refs, Bindings and more constructs. You can read about them here: https://clojure.org/reference/vars
> In the short-description it says "Function serialization between Clojure processes and dialects" but I can't find any example of using this cross-process-border in the readme.
It doesn't just have to be cross-process but cross-dialect. As Clojure has multiple runtimes (like JVM [most popular], JavaScript and CLR). So one use case of this library could be to have a frontend made in ClojureScript that dynamically requests behavior (functions) from a Clojure (JVM or CLR) backend in a nicer way than just sending the text of the function then calling `read` (that reads text into actual code).
> Though I applaud you for writing with an interesting vibe, I can't seem to get what you're describing.
But in the end, I agree with you. The author could make the use cases more clear and interesting, as that seems to be missing from the readme currently. What would be most interesting is not all the possible use cases, but the specific use case the author had in mind when writing this. What kind of interesting thing is the author building?
comment 6y ago · link · parent
Statements like this makes it seem like while you probably have dabbled in Clojure and other lisps, you haven't used them substantially, as if you're using Clojure, you still make your changes in your favorite editor and code is still tracked in version control. It's not REPL _or_ code editor, it's code editor + repl backing.
Redefining functions on the fly is not a hack to lessen the pain, it's a defined workflow that makes you be able to work faster. If you're using it and it feels like something to lessen the pain, you're using it wrong.
> Sure, and with Go in VSCode, I just click 'run' above the test I just wrote. It isn't any more difficult.
This assumes a lot of things around the code that you're executing. First, you've already setup a test and it's already isolated enough. With a powerful repl + idioms, you don't need to do that, as you can execute parts of a function just to introspect that part, kind of like a debugger but works anywhere automatically.
In the end, I'm not gonna try to convince you to try something if you don't want to try it. But if you're anything like me, finding more productive ways of working is always interesting, even if they end up not being as productive as we first thought. With that in mind, since you seem to not have super much experience with a powerful repl, if you try it I'm sure you'll find what I say to be helping you be a better programmer.
comment 6y ago · link · parent
comment 6y ago · link · parent
I don't know if it has a different word, but a repl for Clojure using a repl-workflow is very different from a repl for Golang with the normal "save -> compile -> run" workflow you have with Go.
For example, using a repl-workflow in Clojure doesn't mean you don't write code in your editor. I use vim + vim-fireplace to write my code, then highlight the parts I want to evaluate. So I get both in one. The repl is running in the background, and vim-fireplace communicates with it. Combine this with a SPA and I can have something like `(.alert js/window @username)`, highlight it and evaluate, then have an alert prompt in my browser window, which is next to my editor. Saves me a ton of time.
comment 6y ago · link · parent
comment 6y ago · link · parent
comment 6y ago · link · parent
I prefer my own package manager (pacman) over snaps for the following reasons:
1) I like to upgrade on my own schedule. I use my computer for work, and I cannot have things break in the middle of the day or in the morning, just as I get started with work. I usually save upgrades for when I less things to do, so that in case stuff breaks, I can spend time fixing it. This has happened twice during the last 2 years, or something like that. One time Firefox got broken (or rather, the version upgrade broke an extension I use) and second time some API in neovim changes to a couple of plugins broke. If this breakage would just happen by itself, it would break the two most common tools I use on a day-to-day basis.
I've used both Windows and OSX for my professional work and while Windows is the worst offender when it comes to automatic updates, OSX is pretty horrible as well. At least with Windows you can expect some sort of backwards compatibility, while on OSX, one day you have to upgrade your entire OS, otherwise Notes or some stupid application won't launch. On the other hand, Windows eventually forces you to upgrade no matter if you like it or not. So both of them suck equally, but in different ways.
2) snap seems to create mountpoints for the applications and never removes them. When trying snap apps I always end up with bunch of pollution in my environment. Could be that I'm using snap/snapd wrong, but left a sour taste in my mouth, as I saw snap as something that wants to solve a problem that existed for a long time. Instead, they look a bit amateurish because of this.
comment 6y ago · link · parent
Heh, you should try a language that comes with a repl and allows you to evaluate code directly from your editor in any context and get the results back. Then you'll have experienced "instant feedback". Until then, I can agree that Golang compiles faster than other languages, but it's nowhere near instant. In some other languages, you don't really care how fast it compiles as you only do it for deployments anyways (like Clojure).
comment 6y ago · link · parent
Could also be that I'm reading it too favorably, but I guess that's better than the opposite.
comment 6y ago · link · parent
comment 6y ago · link · parent
Seems the inspiration for the name comes from The Good Place, and the logo seems different enough that they won't sue the owner of the project, as the face in the logo is not that similar to Janet from the TV show.
> Why Janet? Janet is named after the almost omniscient and friendly artificial being in The Good Place
comment 6y ago · link · parent
So doing `export JANET_PATH=$pwd/packages` would put them into `./packages` from your current working directory.