Are there Clojure meetups in NYC?

2022-07-30 Thread Lawrence Krubner
So, I just recently got back to going out to gatherings, post-pandemic. I live in New York City. I logged into Meetup.com, for the first time in 3 years, and I discovered that it is a ghost town. 99% of all the Meetups are gone. I am a bit heartbroken about this. It used to be there were 3 or 4

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Lawrence Krubner
7;t think plain strings in Clojure would be interpreted like this. Or is this how bash interprets it? On Friday, March 4, 2022 at 8:06:56 AM UTC-5 Lawrence Krubner wrote: > So, as a new way to test this, I've ssh'ed to an EC2 instance that is in > the same VCP as the RDS data

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Lawrence Krubner
t contains the values you expect it does. > > When you say “cli”, do you mean a mysql client? Double check the > credentials (dbname, user, password) that *it* uses. > > Best, > Orestis > > On 4 Mar 2022, at 13.27, Lawrence Krubner wrote: > > But, again, I can

Re: Why is next.jdbc using my IP address?

2022-03-04 Thread Lawrence Krubner
nied kinds of errors include the username > and the host the users connection came from. > > On Thu, Mar 3, 2022, 11:18 Lawrence Krubner wrote: > >> I just wrote a small app that needs to connect to a MySQL app. I was >> running it on my laptop, connecting to MySQL on the lapto

Why is next.jdbc using my IP address?

2022-03-03 Thread Lawrence Krubner
I just wrote a small app that needs to connect to a MySQL app. I was running it on my laptop, connecting to MySQL on the laptop, and everything was working fine. Then I wanted to connect to one of our test databases in RDS in AWS. I've a simple function that finds the environment variables and

common ways to run regex against either Hickory HTML or zippers?

2022-02-02 Thread lawrence...@gmail.com
Assume I've been cursed to scrape HTML. If I convert the pages to Hickory I end up with a big mass of data which, sadly, lacks many "class" or "id"s that would let me easily pick out the data I need. However, for the most part, the only thing I really need off this page is the CVEs, which look

Re: what is currently considered a good blog engine, written in Clojure?

2020-12-13 Thread lawrence...@gmail.com
Thank you everyone. On Sunday, December 13, 2020 at 12:05:01 PM UTC-5 stan@gmail.com wrote: > On 13.12.2020 10:11, Christopher Small wrote: > > Oz (in addition to being a dataviz tookit) has evolved into the realm of > > static site generation > >

what is currently considered a good blog engine, written in Clojure?

2020-12-12 Thread lawrence...@gmail.com
Hello everyone. I've been away from the Clojure community for the last 2 years (nowadays I do more managing than programming) but I'm starting a new blog. I tried to use Wordpress on the theory that it is "easy" and also because I've been told they fixed their old security flaws, but I installed

How should I debug a poorly performing small web app, using Jetty?

2019-01-19 Thread lawrence . krubner
I'm looking for advice about how to debug this. I wrote a small web app. It has about 1,200 lines of code. It is fairly standard for a Clojure app, it uses Jetty, and Compojure. It uses MongoDB. I'm just working on my MacBook Pro right now, so there is no issue such as using Nginx or load bala

Re: using durable-queue, works locally, get :time-out when moving to an EC2

2019-01-19 Thread lawrence . krubner
for Factual to make durable-queue to >> tell Leiningen that Java 11 is necessary? >> >> >> >> On Wednesday, January 16, 2019 at 3:17:49 PM UTC-5, lawrence...@gmail.com >> wrote: >>> >>> On the new EC2 instance, running Ubuntu: >>> >

Re: using durable-queue, works locally, get :time-out when moving to an EC2

2019-01-16 Thread lawrence . krubner
So, I upgraded to Java 11, and now everything works. So I guess this was a version conflict. Just curious, but is there a way for Factual to make durable-queue to tell Leiningen that Java 11 is necessary? On Wednesday, January 16, 2019 at 3:17:49 PM UTC-5, lawrence...@gmail.com wrote

Re: using durable-queue, works locally, get :time-out when moving to an EC2

2019-01-16 Thread lawrence . krubner
t durable-queue is looking for? I'm thinking this is some kind of version problem. On Wednesday, January 16, 2019 at 2:50:14 PM UTC-5, lawrence...@gmail.com wrote: > > Sorry, I'm an idiot. The real error was when I called put! > > I don't understand this error:

Re: using durable-queue, works locally, get :time-out when moving to an EC2

2019-01-16 Thread lawrence . krubner
r.java:624) java.lang.Thread.run (Thread.java:748) On Wednesday, January 16, 2019 at 1:47:21 PM UTC-5, lawrence...@gmail.com wrote: > > I was away from Clojure for a year and I missed it. I am pleased to be > back. But I've forgotten certain common errors. I feel like this is > s

using durable-queue, works locally, get :time-out when moving to an EC2

2019-01-16 Thread lawrence . krubner
c to AWS? An important clue, I think, is that I'm not getting an error on the put!, only on the take! Why would that be? --- lawrence -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@go

How does Executors/newScheduledThreadPool know how or where to parallelize work?

2019-01-02 Thread lawrence . krubner
I guess this is more of a JVM question than a Clojure question, unless Clojure exerts any special magic here. I'm open to a more Clojure approach than what I have now. Someone suggested I use Executors/newScheduledThreadPool for some recurring work, so I set it up like this: (def scheduler-a

Why did this compile? It's an obvious syntax mistake

2018-12-26 Thread lawrence . krubner
I'm wondering why this compiled? I was supposed to add this to my requirements: [environ.core :refer [env]] Instead I added this: [environ.core :refer [env] I rebuilt this, and it compiled. Then, in the cider REPL, I tried to call my "start" function. I was told it didn't exist, which was

Re: Exception: clojure.lang.ExceptionInfo thrown from the UncaughtExceptionHandler in thread "main"

2018-12-26 Thread lawrence . krubner
noying somebody, you're not really alive." > -- Margaret Atwood > > > ------ > *From:* clo...@googlegroups.com > on behalf of lawrence...@gmail.com < > lawrence...@gmail.com > > *Sent:* Monday, December 24, 2018 8:39:11 AM > *T

Exception: clojure.lang.ExceptionInfo thrown from the UncaughtExceptionHandler in thread "main"

2018-12-24 Thread lawrence . krubner
I'm not sure what I did, but suddenly I'm getting this: Exception: clojure.lang.ExceptionInfo thrown from the UncaughtExceptionHandler in thread "main" Exception: clojure.lang.ExceptionInfo thrown from the UncaughtExceptionHandler in thread "Thread-0" I had been using println to do some debugg

Re: What do Clojure developers use for recurring functions, other than at-at

2018-12-17 Thread lawrence . krubner
Laurens Van Houtven, good ideas, but then I'd also have to write some code to catch documents that got lost when a process died while trying to fetch a document from S3. If I simply check every 15 minutes, and grab everything that has not already been stored in the database, then I automatically

Re: What do Clojure developers use for recurring functions, other than at-at

2018-12-17 Thread lawrence . krubner
James Reeves, that does sound like the right way to go. I'll do that. On Monday, December 17, 2018 at 3:31:01 PM UTC-5, James Reeves wrote: > > > I'd use an executor: > > (ns example.main > (:import [java.util.concurrent Executors TimeUnit])) > > (def scheduler > (Executors/newSchedu

What do Clojure developers use for recurring functions, other than at-at

2018-12-17 Thread lawrence . krubner
I'm coming back to Clojure development after a year away. This is a fast moving community and it is hard to keep up when one is not working on it full time. I'm dusting off some code I wrote 2 years ago, and trying to bring all the dependencies up to their current versions. I have a function t

Re: Received fatal alert: protocol_version

2018-11-22 Thread lawrence . krubner
1 PM UTC-5, lawrence...@gmail.com wrote: > > I've been away from Clojure for a year and I'm just coming back to it. I > assume some of my dependencies are out of date. I'm working on a project > that is 90% Java with a Clojure wrapper. I tried this: > > lein uber

Re: Received fatal alert: protocol_version

2018-11-22 Thread lawrence . krubner
: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty On Thursday, November 22, 2018 at 3:37:31 PM UTC-5, lawrence...@gmail.com wrote: > > I've been away from Clojure for a year and I'm just coming back to it. I >

Received fatal alert: protocol_version

2018-11-22 Thread lawrence . krubner
I've been away from Clojure for a year and I'm just coming back to it. I assume some of my dependencies are out of date. I'm working on a project that is 90% Java with a Clojure wrapper. I tried this: lein uber I got a "protocol version" error which seems to have something to do with a new lev

Re: Officially support Vert.x

2018-01-16 Thread lawrence . krubner
James Gatannah, I apologize for hijacking this thread, but what did you mean here: > The one useful thing I could find that Vert.x provides out of the box > that clojure doesn't is the pub/sub messaging. That turned our > architecture into spaghetti, so I wouldn't call it a win. Was there som

Re: Russ olsen's Clojure Book

2018-01-16 Thread lawrence . krubner
Stuart Sierra wrote a bit about Functional Design Patters here: https://www.infoq.com/presentations/Clojure-Design-Patterns Michael Bevilacqua-Linn wrote "Functional Programming Patterns in Scala and Clojure": https://www.amazon.com/Functional-Programming-Patterns-Scala-Clojure/dp/1937785475/

Am I being stupid regarding how much memory I use?

2017-11-12 Thread lawrence . krubner
I recently worked on a minor project that nevertheless needed to use 10 gigs of RAM. It ran on a reasonably powerful server, yet it taxed that server. And I wondered, how are people scaling up such processes? If my approach was naive, what does the less naive approach look like? I wrote a simp

Re: Doc strings for complex cases?

2017-11-08 Thread lawrence . krubner
I'm curious if it would be enough to write a macro that replaces defn in your code? The macro would secretly generate a different function for every arity, and therefore it could have a different doc-string for every arity, but it wouldn't have to appear that way in your code. Is that enough, or

Feed predicates from clojure.spec to the inference engine/type checker from the Shen java port?

2017-10-27 Thread lawrence . krubner
This sounds like an interesting idea. Does anyone know if this could work? https://news.ycombinator.com/item?id=15569058 The allure of Shen is that it offers a type system that is, roughly speaking, very similar to what you get with clojure.spec. You construct "predicates", what Shen calls seq

Re: Nice screencast overview of Specter

2017-10-21 Thread lawrence . krubner
I surprised that I had never heard of this, despite following the other work that Nathan Marz has done. On Wednesday, October 18, 2017 at 11:01:24 AM UTC-4, Alan Thompson wrote: > > I just saw this on YouTube and thought you may enjoy it: > https://youtu.be/rh5J4vacG98 > > While there is lots

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-13 Thread lawrence . krubner
sql" "f") instead > > On Thu, Oct 12, 2017 at 6:34 PM > > wrote: > >> Nevermind. I found that this works, though I think it is ugly and >> inelegant: >> >> resolved-f (resolve (symbol (str "denormalize.pull-from-mysql/"

Re: possibly a Clojure question or possibly an AWS question: slow writes to durable-queue

2017-10-12 Thread lawrence . krubner
Following Daniel Compton's suggestion, I turned on logging for GC. I don't see it happening more often, but the slow down does seem related to the moment when the app hits the maximum memory allowed. It had been running with 4G, so I increased that to 7G, so it goes longer now before it hits 98

Re: (resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-12 Thread lawrence . krubner
Nevermind. I found that this works, though I think it is ugly and inelegant: resolved-f (resolve (symbol (str "denormalize.pull-from-mysql/" f))) On Thursday, October 12, 2017 at 9:27:06 PM UTC-4, lawrence...@gmail.com wrote: > > At the REPL, this works perfectly:

(resolve (symbol f)) works at the REPL but not in an uberjar

2017-10-12 Thread lawrence . krubner
At the REPL, this works perfectly: > (defn get-users [] [:susan :kwan]) > > (defn what-is-this-function [f] ((resolve (symbol f > (what-is-this-function "get-users") >[:susan :kwan] In an uberjar this does not work. I read somewhere that the runtime name-space is different than the

Re: possibly a Clojure question or possibly an AWS question: slow writes to durable-queue

2017-10-12 Thread lawrence . krubner
Daniel Compton, good suggestion. I've increased the memory to see if I can postpone the GCs, and I'll log that more carefully. On Wednesday, October 11, 2017 at 8:35:44 PM UTC-4, Daniel Compton wrote: > > Without more information it's hard to tell, but this looks a like it could > be a garbage

Re: possibly a Clojure question or possibly an AWS question: slow writes to durable-queue

2017-10-12 Thread lawrence . krubner
Justin Smith, thanks, I've created an Uberjar that I now run under Supervisord on an EC2 instance, and I set the JVM options via the command that Supervisord calls. On Wednesday, October 11, 2017 at 6:58:52 PM UTC-4, Justin Smith wrote: > > a small thing here, if memory usage is important you

possibly a Clojure question or possibly an AWS question: slow writes to durable-queue

2017-10-11 Thread lawrence . krubner
I can't figure out if this is a Clojure question or an AWS question. And if it is a Clojure question, I can't figure out if it is more of a general JVM question, or if it is specific to some library such as durable-queue. I can redirect my question elsewhere, if people think this is an AWS quest

Re: Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
Sorry, this is the problem with working all night. My sleep deprived eyes skipped over this line: old-field-value (get old-documents field-name []) I fetch the value from the wrong map. Such a basic error. On Wednesday, October 11, 2017 at 1:44:13 PM UTC-4, lawrence

Re: Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
document I only get: "final document: " {:company_profile_id ["2"], :topic :company, :url [" mikeshawauto.com"]} I want: "final document: " {:company_profile_id ["2" "2"], :topic :company, :url [" mikeshawauto.com"]} O

Re: Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
:url ["mikeshawauto.com"]}) What am I missing here? On Wednesday, October 11, 2017 at 12:28:59 PM UTC-4, lawrence...@gmail.com wrote: > > So I have this: > > ({:company_profile_id ["2"], :topic :company, :url ["mikeshawauto.com"]}) > > And then I get

Re: Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
I need: ({:company_profile_id ["2", "2"], :topic :company, :url ["mikeshawauto.com"]}) So perhaps I've misunderstood what (into) is for? How do I add another the values of these 2 vectors together? On Wednesday, October 11, 2017 at 12:20:55 PM UTC-4, lawrence.

Re: Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
d to the vector? I must be missing something obvious. On Wednesday, October 11, 2017 at 11:44:40 AM UTC-4, lawrence...@gmail.com wrote: > > I seem unable to figure out where I made a mistake, though this should be > simple. > > I have two SQL calls that bri

Re: Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
UTC-4, lawrence...@gmail.com wrote: > > I seem unable to figure out where I made a mistake, though this should be > simple. > > I have two SQL calls that bring back 5 fields: > > SELECT company_profile_id , reference_id, reference_source FROM > co

Does (into) ever combine 2 numbers into 1?

2017-10-11 Thread lawrence . krubner
I seem unable to figure out where I made a mistake, though this should be simple. I have two SQL calls that bring back 5 fields: SELECT company_profile_id , reference_id, reference_source FROM company_reference_idlimit 1 ; ++--+--+ |

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Margaret Atwood > > > -- > *From:* clo...@googlegroups.com > on behalf of lawrence...@gmail.com < > lawrence...@gmail.com > > *Sent:* Monday, October 9, 2017 11:23:05 AM > *To:* Clojure > *Subject:* Re: Can slingshot/try+ and then

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
EAN -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you're not annoying somebody, you're not really alive." > -- Margaret Atwood > > > ------ > *From:* clo...@googlegroups.com > on behalf of lawre

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Gary Verhaegen, thanks for that. The idea of buffers and threads dying is a good one and gives me something to look for. On Monday, October 9, 2017 at 2:23:05 PM UTC-4, lawrence...@gmail.com wrote: > > MatchingSocks, thanks for that. I think the pattern I followed everywhere

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
MatchingSocks, thanks for that. I think the pattern I followed everywhere was: (future (slingshot/try+ ;;; some code (catch Object o (println o So I think I do catch everything inside of each future that I launch. But I will check again. Perhaps I missed one somewhere. O

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Shantanu Kumar, thanks for that, I might try it. I assume you've never had the problem I'm talking about, of messages on background threads that disappear? On Monday, October 9, 2017 at 2:56:24 AM UTC-4, Shantanu Kumar wrote: > > >> >> I'm curious what others do for logging? >> > > At Concur w

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-09 Thread lawrence . krubner
Kumar, Just so you know, on this page: https://github.com/cambium-clojure/cambium.logback.core you link to here: https://cambium-clojure.github.io/ but I get a 404 when I go there. On Monday, October 9, 2017 at 2:56:24 AM UTC-4, Shantanu Kumar wrote: > > >> >> I'm curious what others do fo

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
;> } >>>> >>>> >>>> So clearly, the code has a problem with some of the documents, and so >>>> an error is thrown, and it is caught by the catch block. I would love to >>>> see the e

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
the code has a problem with some of the documents, and so an >> error is thrown, and it is caught by the catch block. I would love to see >> the error. I can not. If I put println in the catch block, the message >> never shows up in the terminal. Likewise if I use Timbre. >>

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
r. I can not. If I put println in the catch block, the message >> never shows up in the terminal. Likewise if I use Timbre. >> >> I would love to see the error object. My inability to see the error >> objects has crippled my productivity. >> >> Can anyone tell

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
, and so an >> error is thrown, and it is caught by the catch block. I would love to see >> the error. I can not. If I put println in the catch block, the message >> never shows up in the terminal. Likewise if I use Timbre. >> >> I would love to see the error object

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
e code has a problem with some of the documents, and so an >> error is thrown, and it is caught by the catch block. I would love to see >> the error. I can not. If I put println in the catch block, the message >> never shows up in the terminal. Likewise if I use Timbre. >> >

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
ity. Can anyone tell me what I need to do to see these errors? On Sunday, October 8, 2017 at 11:13:10 PM UTC-4, lawrence...@gmail.com wrote: > > I'm trying to use a Zach Tellman's durable-queue to pass information from > one part of my app to another. I have 3 queues

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
quot;\nStats about the from-topics-to-persistence-queue: " {}) Still, I feel like I've got everything wrapped in slingshot/try+ and catch and throw, yet I don't see the error that is killing the app. Is that because of (catch Object) doesn't catch all the errors that I shou

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
threads, but I have a bit of code, which I stole from a blog post by Stuart Sierra, and which I put in my core/main function, which should, I assumed, reveal to me errors thrown from background threads. On Sunday, October 8, 2017 at 11:13:10 PM UTC-4, lawrence...@gmail.com wrote: > > I&#

Re: Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
ctober 8, 2017 at 11:13:10 PM UTC-4, lawrence...@gmail.com wrote: > > I'm trying to use a Zach Tellman's durable-queue to pass information from > one part of my app to another. I have 3 queues. I also have a function that > runs every 30 seconds, that is suppose

Can slingshot/try+ and then catch Object really catch any error?

2017-10-08 Thread lawrence . krubner
I'm trying to use a Zach Tellman's durable-queue to pass information from one part of my app to another. I have 3 queues. I also have a function that runs every 30 seconds, that is suppose to report some statistics for me: (fn [] (future (slingsho

Re: How to get an error message from Elastisch?

2017-10-05 Thread lawrence . krubner
me weird kind of AWS thing. But if anyone has seen this pattern (slow until you get a Socket timeout, then fast) because of something you did in your Clojure code, I would love to hear about it. On Thursday, October 5, 2017 at 2:31:10 PM UTC-4, lawrence...@gmail.com wrote: > > Konstant

Re: How to get an error message from Elastisch?

2017-10-05 Thread lawrence . krubner
et timeout errors are surely some weird AWS or ElasticSearch thing. On Thursday, October 5, 2017 at 2:12:42 PM UTC-4, Lubomir Konstantinov wrote: > > Holding to a head somewhere perhaps? > > On Thursday, 5 October 2017 19:32:11 UTC+3, lawrence...@gmail.com wrote: >> >>

Re: How to get an error message from Elastisch?

2017-10-05 Thread lawrence . krubner
ggests this. On Thursday, October 5, 2017 at 12:32:11 PM UTC-4, lawrence...@gmail.com wrote: > > One last thing, I should mention, if I go through and add " LIMIT 100 " to > all the SQL queries, everything works great. That is, when dealing with a > few hundred docum

Re: How to get an error message from Elastisch?

2017-10-05 Thread lawrence . krubner
documents that things fall apart. I suspect some kind of contention arises... somewhere. Possibly in several locations. But I'm not yet sure what the problem is. On Wednesday, October 4, 2017 at 12:49:12 AM UTC-4, lawrence...@gmail.com wrote: > > This is probably a stupid question, b

Re: How to get an error message from Elastisch?

2017-10-05 Thread lawrence . krubner
f the same documents over again, but apparently I need to go back and look at that again. Still, I assume that error is separate from the SocketTimeout error. On Wednesday, October 4, 2017 at 12:49:12 AM UTC-4, lawrence...@gmail.com wrote: > > This is probably a stupid question, but is t

How to get an error message from Elastisch?

2017-10-03 Thread lawrence . krubner
This is probably a stupid question, but is there an obvious way to get an error message out of Elastisch? I had an app that was working with MongoDB and I was then told I had to use ElasticSearch instead (something about only using AWS for everything) so now I'm trying to get an error message,

Re: When does .getThreadCpuTime return nil?

2017-09-23 Thread lawrence . krubner
eption. I'm not sure it's possible for > (ManagementFactory/getThreadMXBean) to return nil, but if it does then > (.getThreadCpuTime mgr ...) would similarly fail. > > So best guess is, take a look at the implementation of "threads". > > > > > On Friday, Septembe

When does .getThreadCpuTime return nil?

2017-09-22 Thread lawrence . krubner
I've been using this code for years. I copy and pasted it from someone else on this group, someone much smarter than I am. I have never seen an error from this code. Now suddenly I get a null pointer exception at the last line of this code: (ns denormalize_mysql_to_mongodb.monitoring (:impor

Re: does each class need its own file when I include Java files?

2017-09-20 Thread lawrence . krubner
; I tested your example and it works pretty well - see here: > https://github.com/jumarko/clojure-repl-experiments/blob/master/src/clojure_repl_experiments/experiments.clj#L252 > > > > > On Tuesday, 19 September 2017 17:59:10 UTC+2, lawrence...@gmail.com wrote: >> >> I nee

does each class need its own file when I include Java files?

2017-09-19 Thread lawrence . krubner
I need to add something very much like this to my Clojure app: https://svn.apache.org/repos/asf/poi/trunk/src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java I currently have source paths set up as: src/ clojure/ java/ I believe I can copy-and-paste most of this code in

how to be notified when a Future is realized?

2017-08-02 Thread lawrence . krubner
I stumbled across this old post by Tomasz Nurkiewicz: http://www.nurkiewicz.com/2013/03/promises-and-futures-in-clojure.html He writes: "And here is where the greatest disappointment arrives: neither future nor promise

Re: What is juxt really doing?

2017-07-16 Thread lawrence . krubner
[2 0] [2 9]) > > On Sunday, July 16, 2017 at 5:52:44 AM UTC+2, lawrence...@gmail.com wrote: >> >> >> >> Does anyone use juxt in the real world, or is mostly for examples? >> >> >> > > -- You received this message because you are subs

What is juxt really doing?

2017-07-15 Thread lawrence . krubner
If I do this: ((juxt :who :what :when) {:who 1 :when 2} {:who 4 :what 99}) I get: [1 {:who 4, :what 99} 2] Why does a map come back instead of a number? Does anyone use juxt in the real world, or is mostly for examples? -- You received this message because you are subscribed to the Goo

Re: I can only get the first item of a lazyseq via a Manifold stream, and I can't get/find an Exception

2017-07-11 Thread lawrence . krubner
; On Wednesday, July 12, 2017 at 2:09:32 AM UTC-4, Sean Corfield wrote: > > What is the ‘fetch’ function here? > > > > Sean Corfield -- (970) FOR-SEAN -- (904) 302-SEAN > An Architect's View -- http://corfield.org/ > > "If you're not annoy

Re: I can only get the first item of a lazyseq via a Manifold stream, and I can't get/find an Exception

2017-07-11 Thread lawrence . krubner
lazy-seq to a >> Manifold Stream and simply have a function map over the stream? >> >> >> On Monday, July 10, 2017 at 11:25:43 PM UTC-4, lawrence...@gmail.com >> wrote: >>> >>> >>> Once again, my lack of knowledge of Java trips me up. Ma

Re: I can only get the first item of a lazyseq via a Manifold stream, and I can't get/find an Exception

2017-07-10 Thread lawrence . krubner
started. Why can't I give a lazy-seq to a Manifold Stream and simply have a function map over the stream? On Monday, July 10, 2017 at 11:25:43 PM UTC-4, lawrence...@gmail.com wrote: > > > Once again, my lack of knowledge of Java trips me up. Manifold relies on > Dirigiste

Re: I can only get the first item of a lazyseq via a Manifold stream, and I can't get/find an Exception

2017-07-10 Thread lawrence . krubner
se/8/docs/api/java/lang/Thread.UncaughtExceptionHandler.html> could work. " I suspect I'm facing something like that. On Monday, July 10, 2017 at 8:28:03 PM UTC-4, lawrence...@gmail.com wrote: > > By the way, this code works fine if I go into a (doseq) a level above > enqueue, and then put

Re: I can only get the first item of a lazyseq via a Manifold stream, and I can't get/find an Exception

2017-07-10 Thread lawrence . krubner
the stream. That is supposed to work, yes? On Monday, July 10, 2017 at 8:18:07 PM UTC-4, lawrence...@gmail.com wrote: > > I'm using Zach Tellman's excellent Manifold library, though I admit I > don't fully understand it. > > My code queries a MySQL database and th

I can only get the first item of a lazyseq via a Manifold stream, and I can't get/find an Exception

2017-07-10 Thread lawrence . krubner
I'm using Zach Tellman's excellent Manifold library, though I admit I don't fully understand it. My code queries a MySQL database and then needs to do some processing on each row retrieved. I copy-and-pasted some code from the documentation for Manifold: ;; 2017-07-10 -- we want a thread po

Re: java.lang.ClassNotFoundException: clojure.lang.Var

2017-07-09 Thread lawrence . krubner
Sorry, that was dumb. Obviously I meant to call with classpath. It works fine with standalone. On Monday, July 10, 2017 at 1:27:53 AM UTC-4, lawrence...@gmail.com wrote: > > I was trying to knock out a quick project today, and most of it was > copy-and-paste of another project th

java.lang.ClassNotFoundException: clojure.lang.Var

2017-07-09 Thread lawrence . krubner
I was trying to knock out a quick project today, and most of it was copy-and-paste of another project that I have. This isn't really a big project, despite the long list of dependencies (which I could trim somewhat). Anyway, if I run "lein clean" and then "lein uberjar" it seems to compile ju

Re: error in nrepl

2017-07-06 Thread lawrence . krubner
Thank you, Didier, but I'll wait till ProtoRepl is more stable. Also I'm not sure that I'm ready to step away from Emacs. I did try Spacemacs but I felt it was too much influenced by Vim. So now I'm using Prelude. On Thursday, June 29, 2017 at 1:46:11 PM UTC-4, Didier wrote: > > If you're

Re: Clojure versions used by java.jdbc users

2017-07-06 Thread lawrence . krubner
I have some old projects that ran Clojure 1.5 and jbcd. I wrote them before the era of Cider. Cider only supports Clojure => 1.7. I do have to now use those old projects, but I was planning on upgrading them anyway, so I could work on them in Cider. On Monday, July 3, 2017 at 7:12:19 PM UT

Re: error in nrepl

2017-06-29 Thread lawrence . krubner
Thank you for everyone's reply. Both Spacemacs and ProtoRepl sound very interesting. I am torn and am unsure which path to take. I suppose I'll give Spacemacs a try and see if that works out. I am very pleased to see progress being made regarding at least the DE of IDE for Clojure. That's alw

Re: error in nrepl

2017-06-23 Thread lawrence . krubner
Thank you. Maybe I can find some time to upgrade my whole Emacs setup next weekend. It is a bit out of date. I'm curious if folks think it is easier to work with Emacs on a Linux machine, or on a Mac? On Friday, June 23, 2017 at 5:39:42 PM UTC-4, Kevin Baldor wrote: > > Have you tried foll

Re: error in nrepl

2017-06-23 Thread lawrence . krubner
On Friday, June 23, 2017 at 4:29:24 PM UTC-4, lawrence...@gmail.com wrote: > > I'm using Emacs on my Mac. I ran "nrepl-jack-in" to load up the repl. I'm > iterating over a dataset from mysql. My code is very simple, I'm just > trying to count the words: &g

Re: error in nrepl

2017-06-23 Thread lawrence . krubner
Yes, sadly, I've never gotten Cider to work with Emacs. I keep thinking someday I'll take a weekend and work through all the errors and get it working, but I never seem to find the time. So I keep working with an old version of nrepl. But I take it, from your answer, you think this error would

error in nrepl

2017-06-23 Thread lawrence . krubner
I'm using Emacs on my Mac. I ran "nrepl-jack-in" to load up the repl. I'm iterating over a dataset from mysql. My code is very simple, I'm just trying to count the words: (reduce (fn [map-of-word-count next-name] (let [ words (clojure.string/split next-name #"\s") map-of-names-words-with-co

Re: [ANN] meet postagga, a new lib for natural language processing

2017-03-27 Thread lawrence . krubner
Thank you for this. I am excited to give this a try. On Monday, March 13, 2017 at 9:24:36 AM UTC-4, Rafik NACCACHE wrote: > > Hey guys, > I am pleased to share my new lib, capable of training models that help > parse natural language ! > My french-speaking friends will find it extremely useful

Re: Application silently shuts down by itself after running for some hours

2017-03-07 Thread lawrence . krubner
To catch OutOfMemoryError s: catch(OutOfMemoryError e) On Tuesday, March 7, 2017 at 5:18:44 PM UTC-5, JokkeB wrote: > > I'm under the impression that setDefaultExceptionHandler still catches OOM > errors. Some googling suggests this too. If not, how should I try to catch > it? > > I am runn

Re: Ensure more concurrency

2017-03-07 Thread lawrence . krubner
https://clojuredocs.org/clojure.core/ensure Must be called in a transaction. Protects the ref from modification by other transactions. Returns the in-transaction-value of ref. Allows for more concurrency than (ref-set ref @ref) This can be read in two contradictory ways. Protecting a ref dur

Re: If a Java function seems to never return, how do I test?

2015-11-04 Thread Lawrence Krubner
.com/javase/7/docs/api/java/lang/Thread.UncaughtExceptionHandler.html > > to capture it. > > > Rob. > > > On 2 Nov 2015, at 12:22, Lawrence Krubner > wrote: > > > Now there is a new error. > > Somehow, when the exception happens in our Java library, even tho

Re: If a Java function seems to never return, how do I test?

2015-11-04 Thread Lawrence Krubner
sible. > > If you you can connect with a debugger, you can set breakpoints based on > any thrown exception. > > On Monday, November 2, 2015 at 2:22:30 PM UTC-6, Lawrence Krubner wrote: >> >> >> Now there is a new error. >> >> Somehow, when the exception h

Re: If a Java function seems to never return, how do I test?

2015-11-04 Thread Lawrence Krubner
> flush twice, oracle is far far away? Are you saying this is so obvious I should be able to easily look it up? It might be obvious to you, but it is not obvious to me. That's why I'm asking. On Monday, November 2, 2015 at 3:25:36 PM UTC-5, raould wrote: > > flush twice, oracle is far far

Re: If a Java function seems to never return, how do I test?

2015-11-02 Thread Lawrence Krubner
System.out.println(). Can anyone think of another explanation? On Sunday, November 1, 2015 at 5:10:19 PM UTC-5, Lawrence Krubner wrote: > > So, we eventually fixed this. There were 2 bugs that worked together to > make this a mystery. I had to guess at what the problems were, and

Re: If a Java function seems to never return, how do I test?

2015-11-01 Thread Lawrence Krubner
So, we eventually fixed this. There were 2 bugs that worked together to make this a mystery. I had to guess at what the problems were, and fix them blind, since I could not see the Exceptions. I am curious about why I was not able to see the Exceptions. About this: > Exceptions are ALWAYS vis

If a Java function seems to never return, how do I test?

2015-10-30 Thread Lawrence Krubner
I am trying to figure out where this code might die, and why we don't se the Exception, if there is an Exception. Inside of a try/catch block, we have this, when calls a library written in Java: (timbre/log :trace " in parse-sentence fields-and-labels is: " fields-and-labels) (let [

is there a community "best practice" for including your co-workers libraries?

2015-10-16 Thread Lawrence Krubner
I know this question has been asked before, but when I went searching I mostly found old entries that were on a somewhat different topic, such as "How to add a java library (that is not in maven) as a dependency for a clojure library?" I wrote a Clojure app and my co-worker wrote a Java app. I

Re: "get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Lawrence Krubner
ming-message) "") > > > Or figure out why nil is written and prevent it? > > On Friday, October 16, 2015 at 1:33:29 PM UTC-5, Lawrence Krubner wrote: >> >> What am I doing wrong here? I want to call clojure.string/lower-case on >> the :incoming-

"get" returns nil even when "not-found" is supplied?

2015-10-16 Thread Lawrence Krubner
What am I doing wrong here? I want to call clojure.string/lower-case on the :incoming-message of this-users-conversation. If there is no message, I return an empty string. (defn discern-current-state [this-users-conversation] (cond (= (clojure.string/lower-case (get this-users-conversat

  1   2   >