is speclj abandonware? i'm seeing PRs and major issues ignored for many months...
if it is abandonware, is there a preferred BDDish clj/cljs test framework?
i'm being bitten by this https://github.com/slagyr/speclj/issues/133 which seems odd to ignore for so long
@nxqd: lein deps :tree
now includes the same functionality
DoS attacks on linode make leiningen unuseable.
Even lein -o clean
hangs.
There's a mirror for Clojars now that you can use.
With my ~/.lein/profiles.clj
{:user {:plugins [[lein-license "0.1.3"]
[cider/cider-nrepl "0.10.0"]]
:dependencies [[org.clojure/tools.nrepl "0.2.12"]]
:mirrors {#"clojars"
{:name "clojars mirror"
:url "<https://clojars-mirror.tcrawley.org/repo/>"}}}}
lein clean
still hangs.
Maybe go ask in #C0AB48493 then?
(I use Boot so...)
@akhudek: yeah, it would be a way. Because most of the time, I need to resolve the dependencies manually based on the suggestion from pedantic of lein.
btw, is there anyway to enable server log ( aleph ) to log out to console or nRepl so we can debug the incoming request
@crocket this happened to me, solved adding :mirrors {...} to the project.clj I was working on
I just want to work with the local repository ~/.m2/repository
, but leiningen doesn't.
@crocket so add :offline? true
to your project.clj
I did
$ lein cljsbuild once prod or lein clean
The repository system is offline but the artifact lein-cljsbuild:lein-cljsbuild:jar:1.1.1 is not available in the local repository.
The repository system is offline but the artifact lein-figwheel:lein-figwheel:jar:0.5.0-2 is not available in the local repository.
The repository system is offline but the artifact lein-license:lein-license:jar:0.1.3 is not available in the local repository.
The repository system is offline but the artifact cider:cider-nrepl:jar:0.10.0 is not available in the local repository.
This could be due to a typo in :dependencies or network issues.
If you are behind a proxy, try setting the 'http_proxy' environment variable.
@crocket I'm sorry but I can't try to reproduce it now, 4:47am here :/ But for me both (Clojar's mirror and offline flag) worked fine
@crocket: If you don't already have the artifact locally, I don't think you can use the offline flag. However, the mirror setting should be enough, since lein
should fetch those dependencies from the mirror.
But you should check your local .m2/repository
and see what it actually has.
I actually have them in ~/.m2/repository
.
Then it sounds like a bug in Leiningen.
Did you get any luck asking about it in the #C0AB48493 channel?
No one answered in #C0AB48493 so far.
Well, if you really do have them locally then that's a bug in Leiningen and you should probably open an issue on its GitHub repo...
It is the above issue.
I guess I'll just have to wait until clojars goes up.
Yeah, bug in Leiningen, as I said.
I'm glad I switched to Boot two weeks ago :simple_smile:
Is boot immune from linode DoS attacks?
Boot uses the mirror for all dependencies. Lein seems not to use the mirror for plugins.
I'm basically frozen due to the above issue.
Although Boot 2.5.x can't use the mirror to update itself -- that's available in Boot 2.6.0-SNAPSHOT tho' (via environment variables)
Yeah, we can't update from Boot 2.5.2 to 2.5.5 right now but we can still use mirrors for all builds and tasks
Even, a mirror didn't make it run.
Right, because of a bug in Leiningen. A bug Boot doesn't have because it uses the same system for tasks as for your other project dependencies.
Anyways, it's late here so I'm off to bed.
Hopefully http://clojars.org will be back up tomorrow. Linode is making some progress.
"I haven’t yet seen a loop that can’t be decomposed into a combination of map, filter, reduce." - @dustingetz
Agree?
Add take
and drop
.
@crocket: Thanks
I’m basically concerned that many coding interview/challenge questions are very loop-oriented
You could look for jobs on https://functionaljobs.com/
Thanks
but functional programming techniques should be able to solve the same code/whiteboard problems that you encounter in interviews, right?
Unless it's writing a kernel in functional programing language, you'd be able to do almost anything in a functional programming languge. Functional programming languages are not good at handling low-level hardware input/output.
The answer is most probably yes.
If your interview requires an array index, you can turn arrays into something else suitable for functional programming, but it wouldn't be trivial to do in a few hours.
Functional approach to algorithms is different from imperative approach.
So, certain interviews can give advantages to imperative languages.
Good call. Thank you :simple_smile:
I had an interview with an e-commerce site that called for nested loops
*called for nested FOR loops
Nested FOR loops are so confusing…so hard to follow
But they’re usually faster
I’ll take nested forms over nested loops any day :simple_smile:
If you refactor data structures, you may need less nested forms.
Instead of representing a field as
[[nil nil nil :on]
[nil nil :on nil]
[nil :on nil nil]
[:on nil nil nil]]
I can represent it as [[1, 4], [2,3], [3,2], [4,1]]
. I just refacted a 2D data structure into a 1D data structure.Now, you don't have to iterate over nested arrays.
Refactor linear data structures such as nested arrays into non-linear(?) ones for clojure.
A sequential data structure may contain lots of nil
.
@kopasetik: yeah, I can agree with that - unless your loop is sideffectful you can usually achieve the same data transformation effect using a combination map
/`filter`/`fold`/`for` (`for` is not a loop, but more like list comprehension from Haskell or Python) and such. And if something seems to be more easily expressed using a loop, then maybe you can structure the data differently to handle it easier with sequence transformation functions or if you really need in Clojure you always have doseq
and loop
for more loop-y behaviour or you can just write recursive functions by hand.
Malevolent DoS attackers deserve horrible death.
I can't even upload my artifact to clojars.
Maybe it's the Scala community being afraid of Clojure catching up? D :
is there a solution how to bypass this issues (lein + clojars down). there was discussion on clojure channel but I can't find anything that is proved to works
@gdulus: You can download arfitacts from a mirror for now. But, you can't upload artifacts to mirrors.
Yeah, the mirrors seem to work, as described here - https://github.com/clojars/clojars-web/wiki/Mirrors
lein -o solved the issue for me
Yeah, not being able to upload artifacts is the real pain point
But I've just plopped what it says into ~/.boot/boot.profile
and it worked when I downloaded a gem I didn't have locally to try it out.
There are more hoops but you could publish to Maven Central instead
@alexmiller: thanks!
you could spin up a nexus OSS install on the LAN fairly easily
Or if you are just looking for a company level repo, it's pretty easy to make one on s3
I've had experiences with S3 wagon repositories (from boot
) being very slow
it'd be great if there was a hosted maven repo
There might be, dunno
Cloudbees used to support that, not sure if they still do
jitpack seems to support leiningen: https://jitpack.io/docs/BUILDING/