admin-announcements

Announcements from the Clojurians Admin Team (@U11BV7MTK @U077BEWNQ @U050TNB9F @U0ETXRFEW @U04V70XH6 @U8MJBRSR5 and others)
2016-01-03T00:32:07.002851Z

is speclj abandonware? i'm seeing PRs and major issues ignored for many months...

2016-01-03T00:32:43.002852Z

if it is abandonware, is there a preferred BDDish clj/cljs test framework?

2016-01-03T00:34:02.002853Z

i'm being bitten by this https://github.com/slagyr/speclj/issues/133 which seems odd to ignore for so long

2016-01-03T03:00:53.002856Z

@nxqd: lein deps :tree now includes the same functionality

2016-01-03T06:04:33.002859Z

DoS attacks on linode make leiningen unuseable.

2016-01-03T06:04:51.002860Z

Even lein -o clean hangs.

seancorfield 2016-01-03T06:05:54.002861Z

There's a mirror for Clojars now that you can use.

seancorfield 2016-01-03T06:06:12.002862Z

https://github.com/clojars/clojars-web/wiki/Mirrors

seancorfield 2016-01-03T06:06:23.002864Z

https://github.com/clojars/clojars-web/blob/master/MIRRORS

2016-01-03T06:08:56.002866Z

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/>"}}}}

2016-01-03T06:09:02.002867Z

lein clean still hangs.

seancorfield 2016-01-03T06:10:37.002872Z

Maybe go ask in #C0AB48493 then?

seancorfield 2016-01-03T06:10:46.002873Z

(I use Boot so...)

jimmy 2016-01-03T06:19:35.002874Z

@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.

jimmy 2016-01-03T06:20:00.002875Z

btw, is there anyway to enable server log ( aleph ) to log out to console or nRepl so we can debug the incoming request

2016-01-03T06:40:07.002877Z

@crocket this happened to me, solved adding :mirrors {...} to the project.clj I was working on

2016-01-03T06:40:49.002878Z

I just want to work with the local repository ~/.m2/repository, but leiningen doesn't.

2016-01-03T06:43:37.002879Z

@crocket so add :offline? true to your project.clj

2016-01-03T06:43:43.002880Z

I did

2016-01-03T06:44:24.002881Z

$ 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.

2016-01-03T06:46:26.002883Z

@andrel

2016-01-03T06:49:30.002885Z

@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

seancorfield 2016-01-03T06:56:04.002886Z

@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.

seancorfield 2016-01-03T06:56:24.002887Z

But you should check your local .m2/repository and see what it actually has.

2016-01-03T06:56:29.002888Z

I actually have them in ~/.m2/repository.

seancorfield 2016-01-03T06:56:45.002889Z

Then it sounds like a bug in Leiningen.

seancorfield 2016-01-03T06:57:01.002890Z

Did you get any luck asking about it in the #C0AB48493 channel?

2016-01-03T06:57:14.002891Z

No one answered in #C0AB48493 so far.

seancorfield 2016-01-03T06:57:55.002892Z

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...

2016-01-03T06:59:31.002896Z

@seancorfield

2016-01-03T06:59:46.002897Z

It is the above issue.

2016-01-03T07:02:15.002898Z

I guess I'll just have to wait until clojars goes up.

seancorfield 2016-01-03T07:03:57.002899Z

Yeah, bug in Leiningen, as I said.

seancorfield 2016-01-03T07:04:17.002900Z

I'm glad I switched to Boot two weeks ago :simple_smile:

2016-01-03T07:05:17.002901Z

Is boot immune from linode DoS attacks?

seancorfield 2016-01-03T07:09:20.002902Z

Boot uses the mirror for all dependencies. Lein seems not to use the mirror for plugins.

2016-01-03T07:09:42.002903Z

I'm basically frozen due to the above issue.

seancorfield 2016-01-03T07:09:52.002904Z

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)

seancorfield 2016-01-03T07:10:34.002905Z

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

2016-01-03T07:10:52.002906Z

Even, a mirror didn't make it run.

seancorfield 2016-01-03T07:11:57.002907Z

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.

seancorfield 2016-01-03T07:12:29.002908Z

Anyways, it's late here so I'm off to bed.

seancorfield 2016-01-03T07:12:51.002909Z

Hopefully http://clojars.org will be back up tomorrow. Linode is making some progress.

2016-01-03T07:58:12.002912Z

"I haven’t yet seen a loop that can’t be decomposed into a combination of map, filter, reduce." - @dustingetz

2016-01-03T07:58:19.002913Z

Agree?

2016-01-03T07:59:55.002914Z

Add take and drop.

2016-01-03T08:02:55.002915Z

@crocket: Thanks

2016-01-03T08:03:32.002916Z

I’m basically concerned that many coding interview/challenge questions are very loop-oriented

2016-01-03T08:03:57.002917Z

You could look for jobs on https://functionaljobs.com/

2016-01-03T08:04:09.002919Z

Thanks

2016-01-03T08:08:29.002920Z

but functional programming techniques should be able to solve the same code/whiteboard problems that you encounter in interviews, right?

2016-01-03T08:09:35.002921Z

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.

2016-01-03T08:10:25.002923Z

The answer is most probably yes.

2016-01-03T08:12:12.002925Z

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.

2016-01-03T08:14:07.002929Z

Functional approach to algorithms is different from imperative approach.

2016-01-03T08:14:37.002930Z

@kopasetik

2016-01-03T08:19:26.002932Z

So, certain interviews can give advantages to imperative languages.

2016-01-03T08:24:16.002933Z

Good call. Thank you :simple_smile:

2016-01-03T08:24:48.002934Z

I had an interview with an e-commerce site that called for nested loops

2016-01-03T08:25:01.002935Z

*called for nested FOR loops

2016-01-03T08:25:34.002936Z

Nested FOR loops are so confusing…so hard to follow

2016-01-03T08:25:49.002937Z

But they’re usually faster

2016-01-03T08:52:00.002938Z

I’ll take nested forms over nested loops any day :simple_smile:

2016-01-03T09:15:03.002939Z

If you refactor data structures, you may need less nested forms.

2016-01-03T09:23:00.002941Z

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.

2016-01-03T09:23:38.002943Z

Now, you don't have to iterate over nested arrays.

2016-01-03T09:23:48.002944Z

@kopasetik

2016-01-03T09:27:58.002947Z

Refactor linear data structures such as nested arrays into non-linear(?) ones for clojure.

2016-01-03T09:51:02.002948Z

A sequential data structure may contain lots of nil.

jaen 2016-01-03T10:58:25.002951Z

@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.

2016-01-03T11:50:07.002953Z

Malevolent DoS attackers deserve horrible death.

2016-01-03T11:51:15.002955Z

I can't even upload my artifact to clojars.

jaen 2016-01-03T11:58:06.002956Z

Maybe it's the Scala community being afraid of Clojure catching up? D :

2016-01-03T12:32:56.002960Z

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

2016-01-03T12:39:42.002962Z

@gdulus: You can download arfitacts from a mirror for now. But, you can't upload artifacts to mirrors.

jaen 2016-01-03T13:03:06.002967Z

Yeah, the mirrors seem to work, as described here - https://github.com/clojars/clojars-web/wiki/Mirrors

2016-01-03T13:07:50.002970Z

lein -o solved the issue for me

magomimmo 2016-01-03T13:07:58.002971Z

@jaen: it has been a real mess, and still getting pain for not be able to upload artifacts as @crocket said

jaen 2016-01-03T13:08:51.002972Z

Yeah, not being able to upload artifacts is the real pain point

jaen 2016-01-03T13:09:23.002973Z

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.

alexmiller 2016-01-03T14:07:40.002974Z

There are more hoops but you could publish to Maven Central instead

magomimmo 2016-01-03T14:09:48.002975Z

@alexmiller: thanks!

glenjamin 2016-01-03T14:30:30.002976Z

you could spin up a nexus OSS install on the LAN fairly easily

alexmiller 2016-01-03T14:42:07.002977Z

Or if you are just looking for a company level repo, it's pretty easy to make one on s3

alexmiller 2016-01-03T14:43:20.002978Z

https://github.com/technomancy/s3-wagon-private

pesterhazy 2016-01-03T14:44:05.002980Z

I've had experiences with S3 wagon repositories (from boot) being very slow

pesterhazy 2016-01-03T14:44:44.002981Z

it'd be great if there was a hosted maven repo

alexmiller 2016-01-03T14:51:20.002982Z

There might be, dunno

alexmiller 2016-01-03T14:51:39.002983Z

Cloudbees used to support that, not sure if they still do

pesterhazy 2016-01-03T14:52:14.002984Z

jitpack seems to support leiningen: https://jitpack.io/docs/BUILDING/