Re: [ANN] proxy-plus: Faster and more usable replacement for "proxy"

2020-01-13 Thread John Newman
Bravo  Are there any differences in behavior to be aware of? AOT, Graal, consuming proxy+ classes from vanilla clojure classes? On Mon, Jan 13, 2020, 11:47 AM Nathan Marz wrote: > proxy+ is a replacement for Clojure's proxy that's faster and more usable. > proxy has a strange

Re: [ANN] cpython bindings for clojure

2019-06-05 Thread John Newman
 On Wed, Jun 5, 2019 at 12:59 PM Jonah Benton wrote: > Wow, that is incredibly cool. Eager to check it out. > > > On Wed, Jun 5, 2019, 12:41 PM Chris Nuernberger > wrote: > >> Good morning Clojurians, >> >> About 2 months ago during a talk about the tech.ml systems the point was >> made

Re: The magic of Lisps

2019-04-28 Thread John Newman
I like Eric Normand's take here: https://lispcast.com/magical-leverage-languages/ On Sun, Apr 28, 2019 at 9:46 AM wrote: > I agree Erik, macros and the dsl idea are edge cases imho. Having written > clojure for 4 years now (and with 30 as a professional developer) I’ve only > written a few

Re: Any way to replace function body?

2019-01-19 Thread John Newman
dispacio has a shadow-extend-like capability: (defp assoc string? [s i c] (str (subs s 0 i) c (subs s (inc i And then (assoc "abc" 2 'x);#_=> "abx" Using alter-var-root in dispacio correctly would prevent var replacement warnings I

Understanding tap

2018-12-19 Thread John Newman
Not sure why two wouldn't compose. You should probably wrap values in namespaced maps and dispatch with multimethods for your add-tap handlers. You could probably do pub sub pretty easy over that. But I'd like to see more examples with tap too. What alternative design were you thinking of? --

[ANN] dispacio

2018-12-13 Thread John Newman
dispacio is an experimental, simple, predicate stack dispatch system. Predicates are tested in the order they are defined and the first truthy match wins. Features being worked on: - similar interface to `defmethod` - `isa?` hierarchies, similar to `defmethod` - `prefer` a la `prefer-method` -

Re: Efficient Predicate Dispatch [was ANN: Logos v0.6]

2018-11-19 Thread John Newman
Update the example to leverage isa? hierarchies and allow prefer-poly, a la prefer-method: https://stackoverflow.com/questions/53329709/dispatching-function-calls-on-different-formats-of-maps/53354967#53354967 V/r John On Saturday, November 17, 2018 at 5:09:09 PM UTC-5, John Newman wrote

Re: Efficient Predicate Dispatch [was ANN: Logos v0.6]

2018-11-17 Thread John Newman
In order to answer a SO question I ended up whipping up a quick and dirty implementation of predicate dispatch here . (unless I'm misunderstanding the definition of

Re: [ANN] clj-new -- creating new Clojure projects using the clj CLI

2018-04-19 Thread John Newman
These are nice ideas... Sort of like nmp. But you could implement this yourself as a lib and stick it behind a `clj -A:install ...` tool. @dominicm (on clojurians.slack) has build an "injector" tool into pack, which you could reimplement into something that you're describing:

Re: [ANN] Schism, a set of CRDTs for Clojure and ClojureScript

2018-04-19 Thread John Newman
Alex, yeah that explains it for me. I'll probably want to use a fully connected address space, via a mesh or a hub and spoke topology, that I fully manage - so this is the perfect level of abstraction for me. I'd like to see that ZQ implementation though. So, to be clear, if node A sends

Re: [ANN] Schism, a set of CRDTs for Clojure and ClojureScript

2018-04-18 Thread John Newman
Wow, this is really cool! Could you describe how one might go about using this to implement, say, a crdt chat room using maps and sets? Can I for instance just push crdts between clients in a serverless fashion? Perhaps some examples would be instructive, but I've been hoping for something just

Re: what does future do after fn finish ?

2018-01-31 Thread John Newman
Ah, he's using one agent, I see. On Jan 31, 2018 9:15 PM, "John Newman" <john...@gmail.com> wrote: > Multiple sen-doffs to one agent will serialize it's calls, but spawning > agents on each new task will spawn threads on a bounded thread pool, I > believe. > > O

Re: what does future do after fn finish ?

2018-01-31 Thread John Newman
cers are all potentially useful. If > parallelization leads to complex coordination needs, core.async can help > too. > > On Wed, Jan 31, 2018 at 5:18 PM John Newman <john...@gmail.com> wrote: > >> Agents manage a pool of threads for you. Try doing it without the future >>

Re: what does future do after fn finish ?

2018-01-31 Thread John Newman
Agents manage a pool of threads for you. Try doing it without the future call and see if that works (unless you're trying to do something else). John On Wed, Jan 31, 2018 at 7:31 PM, Jacek Grzebyta wrote: > Thanks a lot. I will check it tomorrow. > > J > > On 1 Feb 2018

Re: Simulations in Clojure/Clojurescript

2018-01-27 Thread John Newman
You might want to look into Chris Granger's work on component entity systems in clojurescript: http://www.chris-granger.com/2012/12/11/anatomy-of-a-knockout/ Light Table went on to have a similar component-entity layout internally. On Jan 10, 2018 6:12 PM, "Michael Nardell"

Re: Immutable names of things?

2017-12-11 Thread John Newman
What if the code segments were hashed by zipper coordinates instead of line-column location? I like this idea of structurally navigating the code as an AST of EDN :) John On Mon, Dec 11, 2017 at 7:55 PM, John Newman <john...@gmail.com> wrote: > This might be a step towards a more cl

Re: Immutable names of things?

2017-12-11 Thread John Newman
This might be a step towards a more clojury way: http://blog.datomic.com/2012/10/codeq.html John On Mon, Dec 11, 2017 at 7:53 PM, Didier wrote: > I'll have a look at all these other projects, its very interesting. Unison > seems to embody the spirit or Richs talk about never

Re: [core.spec] Stricter map validations?

2017-11-16 Thread John Newman
Great conversation! I'm still catching up on Spec, but it seems like there's a correlation here to type systems. Type systems can introduce a certain kind of technical debt - type debt? It seems that leaving maps open here is also attempting to avoid that sort of type debt - parochial maps

Re: Doc strings for complex cases?

2017-11-09 Thread John Newman
Way back when - when Rich was fielding suggestions for how to do doc strings - I made the offhand comment that every arity could have it's own doc string. He didn't like the idea back then. Doubtful he will now. I'm glad he went the route he did. I believe the discussion took place on this mail

Re: Contribute Specter to Clojure core?

2017-03-05 Thread John Newman
The "language" Specter introduces "specific"ally navigates the "domain" of Clojure data structures. Regexes also provide a DSL that navigate or operate over the string/text domain and that's often considered a large, generic, unstructured domain. What matters is the semantic surface area the

Re: Contribute Specter to Clojure core?

2017-03-05 Thread John Newman
Okay, let's call it a Context Specific Vocabulary (CSV) ;) Every function is at least a mini DSL, IMO. And as promising as Spec sounds, I still haven't trained up on it because of the size of the new vocabulary (or DSL or whatever you want to call it) it introduces. Adding semantics is expensive

Re: What makes Clojure Clojure?

2017-03-04 Thread John Newman
Yeah, only Rich can really answer that question, right? :) But for me, Clojure is increasingly becoming cljc. When a library advertises compatibility in both clj and cljs, it just looks shinier to me. Feels like a trend for Clojure libraries in general. And if agents and STM were on cljs, I'd

Re: Contribute Specter to Clojure core?

2017-03-04 Thread John Newman
quot; <d...@mobileink.com> wrote: > > > > On Mar 3, 2017 6:27 PM, "John Newman" <john...@gmail.com> wrote: > > I think the path navigator DSL feels slightly un-Clojurey. But other than > that, I think Specter is pure magic and Nathan is right that editing

Re: Contribute Specter to Clojure core?

2017-03-03 Thread John Newman
I think the path navigator DSL feels slightly un-Clojurey. But other than that, I think Specter is pure magic and Nathan is right that editing deeply nested data structures in Clojure is a point of deficiency, especially for people coming from mutable languages/data structures. To that extent, I

Re: Two suggestions re: core.spec, `ns`, and clojure 1.9alpha11

2016-08-20 Thread John Newman
I'd prefer getting rid of the symbol option. Some kind of deprecation warning for a version or two might be an idea though. On Sat, Aug 20, 2016, 10:51 PM Sean Corfield wrote: > Or keep the stricter compiler and: > > 1. People who want to port to clojurescript will incur

Re: How to do functional programming

2016-08-08 Thread John Newman
So I've been hammocking it up recently on this subject. Just to add more philosophical perspective - you could look at the universe in two different ways: from the _inside_, where a thing subjectively experiences the flow of time, as the world mutates around it; and from the _outside_, where

Re: http-client and ignoring ssl errors

2011-09-02 Thread John Newman
Maybe I should just build the SSL logic into http-client.core/request and have request instantiate a different DefaultHttpClient based on the value of :noauth in the request map? Will try when I get home. John On Thu, Sep 1, 2011 at 4:31 PM, John Newman john...@gmail.com wrote: Hello All

http-client and ignoring ssl errors

2011-09-01 Thread John Newman
Hello All, I am trying to add some functionality to http-client. Basically, I need the ability to do get requests on a server while ignoring ssl errors. Once I figure out how to get it working, I'll put it up on github and people can pull it if they'd like. I am working from a fork of

Re: Simple things should be simple

2010-09-10 Thread John Newman
Finally, cat - /usr/local/www/apache22/cgi-bin/hello-world #!/usr/local/bin/clj (println Content-type: text/plain\n) (println Hello, World!) ^D I can start using Clojure again :) John -- You received this message because you are subscribed to the Google Groups Clojure group. To post

Re: Simple things should be simple

2010-09-09 Thread John Newman
(use '[clojure.contrib.server-socket :only (create-server)] '[clojure.contrib.duck-streams :only (read-lines)]) (create-server 8080 (fn [in out] (when-not (empty? (read-lines in)) (spit out Hello, World!\n 4/0/0 John On Thu, Sep 9, 2010 at 9:21 PM, Matt macourt...@gmail.com wrote:

Re: misunderstanding collection

2010-08-28 Thread John Newman
Don't forget destructuring: (for [[a b c] signal] (map (partial reduce +) [a b c])) and, ((fn [[[a b c][d e f]]] (map (partial reduce +) [a b c d e f])) signal) While messing around with that, I was wondering if there were some function that allowed you to destructure on-demand. Like, =

Re: misunderstanding collection

2010-08-28 Thread John Newman
A reader macro for destructuring might be nifty, like #[...]. So you could do things like: (#(map (partial reduce +) #a b c][d e f]]] %]) signal) Not sure if that'd be the right syntax, but you get the point. On Sat, Aug 28, 2010 at 12:08 PM, John Newman john...@gmail.com wrote: Don't

Re: misunderstanding collection

2010-08-28 Thread John Newman
, Aug 28, 2010 at 2:55 PM, Mike Meyer m...@mired.org wrote: On Sat, 28 Aug 2010 12:23:04 -0400 John Newman john...@gmail.com wrote: A reader macro for destructuring might be nifty, like #[...]. I don't think so. But first, we already have an on-demand destructuring facility: let. So you

Re: Clojure development environments

2009-12-04 Thread John Newman
+1 for Waterfront I was hoping it would be what IDLE is to Python. On Fri, Dec 4, 2009 at 8:43 AM, Wilson MacGyver wmacgy...@gmail.com wrote: I want to add another vote for using La Clojure plugin for IntelliJ. I use it on both OSX and windows. works pretty well for me. -- Omnem crede

Re: Seq wrappers for arrays can morph

2009-10-30 Thread John Newman
When someone knowingly dips into arrays, though, aren't doing so because they require java's semantics? For speed, interop, or whatever? We want to champion functional programming, but on the other hand we want to preserve the smooth java-interop use-cases. Not an easy balancing act, I suppose.

Re: Load Bitmap

2009-10-03 Thread John Newman
I don't know much about it, but Yann N. Dauphin's Mona Lisa program might use what you're looking for: Clojure: Genetic Mona Lisa problem in 250 beautiful lineshttp://npcontemplation.blogspot.com/2009/01/clojure-genetic-mona-lisa-problem-in.html Here's the relevant code: 1. ; grab-pixels

Re: Load Bitmap

2009-10-03 Thread John Newman
) pixels (make-array (Integer/TYPE) (* w h))] (.grabPixels (PixelGrabber. image 0 0 w h pixels 0 w)) pixels)) On Sun, Oct 4, 2009 at 3:52 AM, John Newman john...@gmail.com wrote: I don't know much about it, but Yann N. Dauphin's Mona Lisa program might use what you're looking

Re: immutable defs?

2009-10-02 Thread John Newman
From what I've seen, people never redef vars in source code. In general, you shouldn't have to worry about users of your code redefing your vars as it's against common convention, non-idiomatic. The exception, as Stuart Sierra said, is when writing interactively from the REPL, where you'd like

Re: immutable defs?

2009-10-02 Thread John Newman
Also, I'm not sure if your understanding of binding is correct. because within any lexical scope inside a function, I can pretty much count on my bindings to never change. binding is actually like a lexical re-def: user= (def x 1) #'user/x user= (binding [x 2] (pr x) (binding [x 3] (pr x))

Re: Getting REPL transcript

2009-09-25 Thread John Newman
I'm still learning, myself, so I could be wrong, but you might be able to use clojure.contrib.server-socket and tweak it's binding for *in*, *out*, and *err*, like another PushbackInputStream for *in* and copy the lines to a file before sending it into the repl. Or use a pipe perhaps? -- John

Re: Managing Clojure project files

2009-09-22 Thread John Newman
Sweet! I'd like to try it out. Wondering, though, might blogspot have a feature of some sort to render the code in something more palatable? I'd like to review it but it's a pain. Thanks, On 9/22/09, Emeka emekami...@gmail.com wrote: Hello All, Please make out time and check the below

Re: Single method interface proxies

2009-09-18 Thread John Newman
I agree though, proxy is off-putting. It just looks so much less clean than the rest of Clojure. On Fri, Sep 18, 2009 at 6:43 PM, CuppoJava patrickli_2...@hotmail.comwrote: Hi Nikolay, In my opinion it's hard to reduce the verbosity of proxy without sacrificing some of its generality. For

Distributed b-tree

2009-09-16 Thread John Newman
Hello All, I thought this might interest the group: http://highscalability.com/paper-practical-scalable-distributed-b-tree An interesting bit: *Moreover, our algorithm is conceptually simple: we use transactions to manipulate B-tree nodes so that clients need not use complicated concurrency and

Re: Another Clojure Box - Version 1.4

2009-09-04 Thread John Newman
I like Scite but I also use Linux. Any guidance on what steps I would need to take to port just the Scite part of ACV to linux? What specific config files? Thanks, On Fri, Sep 4, 2009 at 7:30 PM, Shantanu Kumar kumar.shant...@gmail.comwrote: Not sure if I am the only one - I was not able to

Re: Another Clojure Box - Version 1.4

2009-09-04 Thread John Newman
to compile it. If you don't want to compile it I can send the properties files in order to use the lisp lexer with your standard scite version. Let me know what you want! On Sep 4, 12:06 pm, John Newman john...@gmail.com wrote: I like Scite but I also use Linux. Any guidance on what steps I

Re: Improving the documentation

2009-08-18 Thread John Newman
I believe http://en.wikibooks.org/wiki/Clojure_Programming is the intended central location for contributing documentation. I've heard complaints about it's openness though. Is it a pain to try to contribute there? On Tue, Aug 18, 2009 at 4:52 AM, Seth seth.schroe...@gmail.com wrote: I'm

Re: A funny thing happened on the way to running Clojure

2009-08-16 Thread John Newman
In general, when writing documentation about software, you have to ask your self what if the user downloaded 0.9? or what if the user downloaded 1.1? How do you know what other docs someone might have written, that might have led the user to have downloaded one version or another? So the doc's

Re: Transient Data Structures

2009-08-07 Thread John Newman
(def transhashmap (transient {}) (assoc transhashmap a 1) (assoc transhashmap b 2) etc Isn't that what Rich was talking about, about not bashing in place? On Fri, Aug 7, 2009 at 6:45 PM, Patrick Sullivan wizardofwestma...@gmail.com wrote: I don't have the EXACT code handy to c/p (at

Re: Clojure as a First Language

2009-08-07 Thread John Newman
Thanks for all the responses, both on the list and off. Many good counter-arguments were given, but I think the most compelling one was the issue of Java-interop. Without a doubt, at least some knowledge of Java is necessary to really do much of anything interesting. It's unfortunate that such a

Re: Package manager proposal

2009-08-07 Thread John Newman
I like this idea too, because if you end up wanting to port this package manager to CLR, Parrot, or JS, you're less tied down to the package formats of specific platforms. Heck, even if Clojure was ported to Ruby (not that there'd be any point to do that), you could wrap the Gems framework. On

Clojure as a First Language

2009-08-05 Thread John Newman
First of all, sorry that this post is so long-winded. I don't have a blog, so this seems like the best place to put to words something I've been thinking about for a while. One subject I haven't seen discussed is that of Clojure as a first language. By that I mean, the programming language that

Re: Package manager proposal

2009-08-04 Thread John Newman
Meikel said, I think, clojure context is underestimating things. The high integration of external Java libraries makes it necessary that such dependencies can be handled in the same way. On the other hand, will this package system be able to stradle and accommodate future platforms for

Re: Transient Data Structures

2009-08-04 Thread John Newman
I'm a noob, so this is probably a dumb question but, how does this work with closures? Can transients be closed over? Like, (defn make-transient-counter [init-val] (let [acounter (transient [init-val])] (fn [add-val] (assoc! acounter 0 (+ add-val (nth acounter 0)) Is that

Re: Website down?

2009-07-27 Thread John Newman
Yea, false alarm. I guess my network at work is just jacked up. On Mon, Jul 27, 2009 at 2:21 PM, Glen Stampoultzis gst...@gmail.com wrote: Seems to be up. http://downforeveryoneorjustme.com/clojure.org http://downforeveryoneorjustme.com/clojure.org 2009/7/27 John Newman john...@gmail.com

Re: gen-class bytecode for method implementation

2009-07-27 Thread John Newman
I'm new to Clojure so bare with me, but I'm trying to figure out what it does... Is it doing something like this: user= (apply pr (.split #\n (str hello\n world\n))) hello worldnil Or do you want those concatenated? Or is that too slow? On Tue, Jul 28, 2009 at 12:07 AM, Mark Addleman

Re: gen-class bytecode for method implementation

2009-07-27 Thread John Newman
Clojure! Not *'clothier.'* :) On Tue, Jul 28, 2009 at 5:05 AM, wlr geeked...@gmail.com wrote: On Jul 27, 8:25 pm, John Newman john...@gmail.com wrote: I'm new to Clojure so bare with me, Sorry, can't resist... you must be seeking the naked truth. :-) -- John

Re: ants.clj and render thread starvation

2009-07-05 Thread John Newman
I'm on an hp mini. It runs on an Atom processor. I ran ants.clj and it was frozen for a little while. Then after maybe 30 seconds it looked normal -- a tick every second or half second or so. I'm running a lot of applications though. On Ubuntu here too. On Sun, Jul 5, 2009 at 11:17 PM, B

Re: ants.clj and render thread starvation

2009-06-30 Thread John Newman
I think I remember running the ants.clj demo on my netbook and it running normally. I'll check again this evening. On Tue, Jun 30, 2009 at 12:40 PM, Daniel B Lucraft d...@fluentradical.comwrote: I didn't think it was possible for the render agent to be interrupted like that. Isn't the point

Re: Poll for a new name for clojure eclipse plugin 'clojure-dev'

2009-06-23 Thread John Newman
How 'bout eclj? On Tue, Jun 23, 2009 at 9:01 PM, Meikel Brandmeyer m...@kotka.de wrote: Hi, Am 23.06.2009 um 18:00 schrieb Laurent PETIT: clojure-eclipse This one has the merit to clearly state that it relates to clojure and eclipse (even more cleary than eclojure). Looks like an

Re: Clojure at JavaOne

2009-05-21 Thread John Newman
Speaking of walking/filtering code, what about walking _actual_ code? The only thing off the top of my mind would be an example of, say, a Hello World function, but with the code represented as a JTree. Say, in the function (pr (.toLowerCase Hello World)), you'd see .toLowerCase as a node.

Re: 3d viewer

2009-05-20 Thread John Newman
Including import statements at the top would make it easier for me to try it out. Thanks, On Wed, May 20, 2009 at 4:09 AM, kyle smith the1physic...@gmail.com wrote: I have uploaded 3d-viewer.clj to the files section. If anyone finds it useful, I would appreciate some feedback. -- John

Re: 3d viewer

2009-05-20 Thread John Newman
Thanks. On my setup I had to add '(javax.swing JFrame) too. Pretty neat. On Wed, May 20, 2009 at 3:12 PM, kyle smith the1physic...@gmail.com wrote: Import statements added. Example usage: (def coords [[0 0 0] [1 1 1] [2 2 2]]);etc (g3d coords) That should pop open the viewer. Left

Re: Clojure at JavaOne

2009-05-18 Thread John Newman
I believe it was the presentation you gave on the ants simulation, where you updated the program while it was running. I'm not sure if the other languages in the shootout can do that, but I thought that was pretty awesome. I think a display of building an application while it's running in front

Re: What is Contrib?

2009-05-13 Thread John Newman
I'm a novice, myself, but Clojure got me reading up on Scheme and, what about the PLaneT thing (require (planet blah ... (where dependencies are automatically pulled from a repository?) Maybe it's not applicable here, but I thought it was pretty neat. On Wed, May 13, 2009 at 11:41 AM, Konrad

Re: The Path to 1.0

2009-04-18 Thread John Newman
Well, perhaps if str-utils becomes the universal standard for string operations, it would be rolled into Clojure come 2.0? On Sat, Apr 18, 2009 at 2:58 PM, Konrad Hinsen konrad.hin...@laposte.netwrote: On 18.04.2009, at 12:15, John Newman wrote: 2) One way to maintain Clojure's flexibility

Re: The Path to 1.0

2009-04-18 Thread John Newman
I do not agree with John Newman that the Java standard library should be the Clojure standard library. I'm not saying that. I'm saying that: 1) Requiring Java's standard library on every system is unfortunate enough -- it's too big for some of the smaller devices coming out now. And, 2) One

Re: The Path to 1.0

2009-04-17 Thread John Newman
I vote for 1.0 as soon as possible. Seems stable to me. I'm working on a chat application and when we moved to fully lazy sequences, still none of my code broke. I vote no on making contrib the Standard Library. The Java Standard Library is large enough. I would like contrib to be easier to

Re: [Discuss] Contribs with dependencies

2009-04-15 Thread John Newman
How 'bout something like Ruby Gems? Having to svn and build the clojure-contrib sources is a hassle for some of us. On Thu, Apr 16, 2009 at 7:41 AM, Stu Hood stuh...@gmail.com wrote: I agree. I think the breaking into modules approach is the only scalable solution. Someone else mentioned

Re: In core structure editor, anyone?

2008-12-10 Thread John Newman
Some Noobian critique: Thread-local bindings also allow us to monkey-patch for the span of a local context. Say we have a function *cat* which calls a function stored in a Var; if a function *goat* is root-bound to the Var, then *cat* will normally call *goat*; however, if we call *cat* in a