Fork me on GitHub
#admin-announcements
<
2016-01-03
>
eyelidlessness00:01:07

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

eyelidlessness00:01:43

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

eyelidlessness00:01:02

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

akhudek03:01:53

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

crocket06:01:33

DoS attacks on linode make leiningen unuseable.

crocket06:01:51

Even lein -o clean hangs.

seancorfield06:01:54

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

crocket06:01:56

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

crocket06:01:02

lein clean still hangs.

seancorfield06:01:37

Maybe go ask in #C0AB48493 then?

seancorfield06:01:46

(I use Boot so...)

nxqd06:01:35

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

nxqd06:01:00

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

andrel06:01:07

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

crocket06:01:49

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

andrel06:01:37

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

crocket06:01:24

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

andrel06:01:30

@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

seancorfield06:01:04

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

seancorfield06:01:24

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

crocket06:01:29

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

seancorfield06:01:45

Then it sounds like a bug in Leiningen.

seancorfield06:01:01

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

crocket06:01:14

No one answered in #C0AB48493 so far.

seancorfield06:01:55

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

crocket06:01:31

@seancorfield

crocket06:01:46

It is the above issue.

crocket07:01:15

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

seancorfield07:01:57

Yeah, bug in Leiningen, as I said.

seancorfield07:01:17

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

crocket07:01:17

Is boot immune from linode DoS attacks?

seancorfield07:01:20

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

crocket07:01:42

I'm basically frozen due to the above issue.

seancorfield07:01:52

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)

seancorfield07:01:34

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

crocket07:01:52

Even, a mirror didn't make it run.

seancorfield07:01:57

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.

seancorfield07:01:29

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

seancorfield07:01:51

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

kopasetik07:01:12

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

crocket07:01:55

Add take and drop.

kopasetik08:01:55

@crocket: Thanks

kopasetik08:01:32

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

kopasetik08:01:29

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

crocket08:01:35

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.

crocket08:01:25

The answer is most probably yes.

crocket08:01:12

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.

crocket08:01:07

Functional approach to algorithms is different from imperative approach.

crocket08:01:37

@kopasetik

crocket08:01:26

So, certain interviews can give advantages to imperative languages.

kopasetik08:01:16

Good call. Thank you simple_smile

kopasetik08:01:48

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

kopasetik08:01:01

*called for nested FOR loops

kopasetik08:01:34

Nested FOR loops are so confusing…so hard to follow

kopasetik08:01:49

But they’re usually faster

kopasetik08:01:00

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

crocket09:01:03

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

crocket09:01:00

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.

crocket09:01:38

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

crocket09:01:48

@kopasetik

crocket09:01:58

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

crocket09:01:02

A sequential data structure may contain lots of nil.

jaen10:01:25

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

crocket11:01:07

Malevolent DoS attackers deserve horrible death.

crocket11:01:15

I can't even upload my artifact to clojars.

jaen11:01:06

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

gdulus12:01:56

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

crocket12:01:42

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

jaen13:01:06

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

gdulus13:01:50

lein -o solved the issue for me

magomimmo13:01:58

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

jaen13:01:51

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

jaen13:01:23

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.

alexmiller14:01:40

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

magomimmo14:01:48

@alexmiller: thanks!

glenjamin14:01:30

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

alexmiller14:01:07

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

pesterhazy14:01:05

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

pesterhazy14:01:44

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

alexmiller14:01:20

There might be, dunno

alexmiller14:01:39

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

pesterhazy14:01:14

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