Ari King

Greenhorn
+ Follow
since Apr 22, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ari King

Thanks for sharing your experiences/insights. As a follow-up to the original question, was it difficult to get developer/management buy-in with FP and/or Scala when re-writing clarifi? While FP (via Scala) made the code base more manageable (i.e. testable) did it increase complexity as you were still learning FP/Scala?
10 years ago

Ari King wrote:Hi Paul & Runar,

I believe you both at some point worked at Capital IQ and used FP (via Scala) to implement data processing apps. Could you expound, to the degree possible, on how FP helped in implementing those algorithms/tools? Could you also share why the chosen language was Scala as opposed to Java or other FP languages like Clojure & Groovy? Thanks.

Best,
Ari



Most of the threads here discuss how/when FP is a better implementation choice than OO. Are there any circumstance where the opposite holds?
10 years ago
Hi Paul & Runar,

I believe you both at some point worked at Capital IQ and used FP (via Scala) to implement data processing apps. Could you expound, to the degree possible, on how FP helped in implementing those algorithms/tools? Could you also share why the chosen language was Scala as opposed to Java or other FP languages like Clojure & Groovy? Thanks.

Best,
Ari
10 years ago

Sean Corfield wrote:I saw you'd posted this question on the Clojure mailing list and Phil Hagelberg had responded.



Yes, Phil and Feng were kind enough to share their helpful insights. I posted to this forum as well when it appeared my question in its entirety would not get answered.

Sean Corfield wrote:I'm mostly using the jetty ring adapter so deployment has not been an issue for me. I guess I don't understand why you don't want to use the standard Clojure tools for this (i.e., Leiningen and the appropriate plugins) so you're best asking follow up questions on the Clojure mailing list - or the Ring mailing list - at this point.



I believe we have a misunderstanding here. Firstly, I'd prefer to use "standard" clojure tools -- since they're made by knowledgeable clojurians, much like yourself. I essentially am interested in learning how I could package alternative adapter based web apps and how I could customize the package. As per your advice, I'll followup on the clojure and ring lists respectively.

Lastly, I believe there was also some confusion when you referenced "leiningen war"; I thought you were referencing the now deprecated plugin. Thanks.

Best,
Ari
11 years ago

Sean Corfield wrote:The standard ways are to use Leiningen with the war, uberwar, jar or uberjar tasks. Leiningen manages your dependencies so it's well placed to create these packages.

Or am I missing something in your question?



The lein ring plugin generates both the deployment descriptor and a namespace that is "gen-classed" into a HttpServlet; how does one do that using only leiningen? Where does one put the web.xml file in a lein-based clojure web app? What are the requirements of the namespace that will be gen-classed and how is this namespace identified as the entry point of the app in the project.clj? Hopefully, my question is clearer. Thanks.

Best,
Ari
11 years ago
Hi,

In my limited experience with Clojure based web apps that are comprised of jetty + ring + compojure I've used the lein-ring plugin to create jars or wars depending on deployment needs. I'm curious to learn:

  • How can I create a deployable jar or war manually (or at least in a less auto-magically way), i.e. without the lein-ring (or lien-war) plugin?
  • How can I create a deployable jar or war -- with or without lein-ring/lein-war -- when the app relies on an alternative adapter such as aleph, http-kit, etc?


  • Thanks.

    -Ari
    11 years ago
    As I try to learn more about Clojure, should I bother to learn more about other Lisp dialects? Will it help me with Clojure? If yes, which dialect(s) should I look into?
    12 years ago
    Chas, thanks for the insight and various perspectives. It was very helpful.

    Sean, thanks for the macro example. Do you also happen to have an example demonstrating Clojure's DSL capabilities via macros?
    12 years ago
    When is it best to use macros? From what I've seen macros are mostly used in DSL situations and it is (seemingly) generally recommended to use functions. Insights appreciated.
    12 years ago
    From the table of contents of Clojure Programming I noticed there is a section on "the Web". However, I was not able to discern if security -- authentication/authorization -- is covered. Are these topics covered in the book? If not, could you kindly suggestion some other resources? Thanks.

    -Ari
    12 years ago
    Does anyone know how to configure maven so that specific directories and the property files within them are added to the classpath when the "jetty:run" command is executed?
    12 years ago
    I've put together a solution (see below) that collapses nested maps into a sequence of flat maps with composite keys. Unfortunately, the solution wraps the result within another list, anyone know why? Thanks.

    12 years ago
    How I can collapse a nested map with "n" number of keys (tiers) to create a sequence of flat maps which are comprised of composite keys and a values.

    For example, let's say we have:



    I'd like to collapse the nest into a sequence of flat maps like:

    12 years ago

    Ari King wrote:The code below is supposed to group and nest values as key value pairs, while it does that it also encapsulates the pairs in lists; does anyone know why? See below for code and example (notice the embolden parentheses):

    ({"a" ({"dan" [["a" 2011 "dan"] ["a" 2010 "dan"]]})} {"b" ({"jon" [["b" 2011 "jon"]]})})



    I figured it out, I had to add "into {} ...". From what I understand, I had to do this because "for" returns a lazy sequence hence the parentheses; thus I need to transform the sequence into a map.

    12 years ago
    The code below is supposed to group and nest values as key value pairs, while it does that it also encapsulates the pairs in lists; does anyone know why? See below for code and example (notice the embolden parentheses):

    ({"a" ({"dan" [["a" 2011 "dan"] ["a" 2010 "dan"]]})} {"b" ({"jon" [["b" 2011 "jon"]]})})

    12 years ago