Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-06 Thread Juraj Martinka
rotocols/fn >>>>> protocols.clj: 75 clojure.core.protocols/fn >>>>> protocols.clj: 13 clojure.core.protocols/fn/G >>>>> core.clj: 6828 clojure.core/reduce >>>>> core.clj: 6810 cloj

Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-05 Thread Juan Monetta
>>scanner.clj: 309 clindex.scanner/merge-namespaces >>>>scanner.clj: 358 clindex.scanner/scan-namespaces >>>> scanner.clj: 346 clindex.scanner/scan-namespaces >>>>api.clj: 142 clindex.api/ind

Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-05 Thread Juan Monetta
REPL: 11 >>> clojure-experiments.parsers.clindex/eval22438 >>> >>> It looks like the `meta` on `ns-decl` returns nil here: >>> https://github.com/jpmonettas/clindex/blob/master/src/clindex/scanner.clj#L278 >>> >

Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-05 Thread Juraj Martinka
api.clj: 128 clindex.api/index-project! >>> REPL: 11 >>> clojure-experiments.parsers.clindex/eval22438 >>> >>> It looks like the `meta` on `ns-decl` returns nil here: >>> https://github.com/

Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-05 Thread Juraj Martinka
blob/master/src/clindex/scanner.clj#L278 >> >> Is that something that's a result of my setup (using leiningen)? >> >> >> >> On Monday, 4 November 2019 13:37:49 UTC+1, Juan Monetta wrote: >>> >>> https://github.com/jpmonettas/clindex >>&g

Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-05 Thread Juan Monetta
x/scanner.clj#L278 > > Is that something that's a result of my setup (using leiningen)? > > > > On Monday, 4 November 2019 13:37:49 UTC+1, Juan Monetta wrote: >> >> https://github.com/jpmonettas/clindex >> >> Clindex is a general and extensible Cloju

Re: [ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-04 Thread Juraj Martinka
leiningen)? On Monday, 4 November 2019 13:37:49 UTC+1, Juan Monetta wrote: > > https://github.com/jpmonettas/clindex > > Clindex is a general and extensible Clojure[Script] source file indexer. > > It scans a Clojure[Script] project together with all its dependencies and > g

[ANN] clindex 0.2.3 - a Clojure[Script] source file indexer

2019-11-04 Thread Juan Monetta
https://github.com/jpmonettas/clindex Clindex is a general and extensible Clojure[Script] source file indexer. It scans a Clojure[Script] project together with all its dependencies and generates a datascript database with facts about them. It is intended to be used as a platform for building

How to generate debug info (source file name) in protocol classes?

2015-01-14 Thread fabiot
Hi all, through javap -v I can find Clojure-generated debug information in datatype classfiles but not in protocol ones. I'm especially interested in the name of the source file. Does a way currently exist to get this information for protocols? Thanks - Fabio -- You received this message

Unable to save the source file which loads repl

2013-01-06 Thread Alice
c:\hello.clj: (clojure.main/repl) C:\java -jar clojure-1.4.0.jar hello.clj user= And then the file becomes read-only. I'm launching repl myself to avoid threading issue in my wpf project. (https://gist.github.com/3062194) -- You received this message because you are subscribed to the

Re: Unable to save the source file which loads repl

2013-01-06 Thread Stephen Compall
On Jan 6, 2013 10:22 PM, Alice dofflt...@gmail.com wrote: C:\java -jar clojure-1.4.0.jar hello.clj user= And then the file becomes read-only. I'm launching repl myself to avoid threading issue in my wpf project. (https://gist.github.com/3062194) It's how Windows works. You'll have to do

Re: Error message specifies wrong line # in source file if function lacks argvec.

2010-11-19 Thread Jason Wolfe
a vector that caused them. 2. The line numbers specified are not only not in general the actual location of the error in the source file, they aren't even a deterministic function of the input file and its dependencies. If the Clojure compiler were implemented in C I'd suspect an uninitialized

Re: Error message specifies wrong line # in source file if function lacks argvec.

2010-11-19 Thread Chris Perkins
On Nov 18, 11:09 pm, Ken Wesson kwess...@gmail.com wrote: I got this oddity while debugging a Clojure sourcefile today: user= right click load file in netbeans #CompilerException java.lang.IllegalArgumentException: Parameter declaration loop should be a vector (io.clj:55) user= You're

Re: Error message specifies wrong line # in source file if function lacks argvec.

2010-11-19 Thread Ken Wesson
On Fri, Nov 19, 2010 at 1:59 PM, Chris Perkins chrisperkin...@gmail.com wrote: On Nov 18, 11:09 pm, Ken Wesson kwess...@gmail.com wrote: I got this oddity while debugging a Clojure sourcefile today: user= right click load file in netbeans #CompilerException java.lang.IllegalArgumentException:

Error message specifies wrong line # in source file if function lacks argvec.

2010-11-18 Thread Ken Wesson
messages. The error messages appear to contain two errors, then: 1. They specify a loop lacks a vector when it's a defn lacking a vector that caused them. 2. The line numbers specified are not only not in general the actual location of the error in the source file, they aren't even a deterministic

How to :use a defrecord from another source file and namespace?

2010-09-07 Thread Chris Jenkins
)) What's the reason for this? Is it intended to work like this and what can I do in order to define a type in one source file (and namespace) and use it in another? Cheers, Chris -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send

Re: How to :use a defrecord from another source file and namespace?

2010-09-07 Thread Michał Marczyk
Types created by deftype defrecord are Java classes and you'd have to use :import to bring them into another namespace: (ns ... (:import my-project.other.huss)) Or if you have multiple types, (:import [foo.bar Wibble Wobble]) It might be simpler to define a factory function and use that

Re: How to :use a defrecord from another source file and namespace?

2010-09-07 Thread Michał Marczyk
On 7 September 2010 23:56, Chris Jenkins cdpjenk...@gmail.com wrote: why don't I fall back on defstruct and defmulti, at least until performance becomes important I believe defrecord was meant to supersede defstruct, but apparently defstruct is not (yet?) marked as deprecated in 1.2, so sure,

Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread CuppoJava
Hi everyone, I'm writing a simple lisp for educational purposes, and I can't figure out how to do compilation. In particular, I can't figure out how I can get a compiled file to run in the same way as if it were loaded. I read on the webpage that Clojure can do this. Does anyone know how Clojure

Re: Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread Stuart Sierra
Clojure compiles sources to Java .class files. To create a .class file that can be run at the command line, you need a namespace with a (:gen-class) directive and a function named -main. Here's an example: (ns com.example.myapp (:gen-class)) (defn -main [] (println Hello,

Re: Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread Daniel Gagnon
On Sun, Sep 5, 2010 at 5:11 PM, Stuart Sierra the.stuart.sie...@gmail.comwrote: Clojure compiles sources to Java .class files. To create a .class file that can be run at the command line, you need a namespace with a (:gen-class) directive and a function named -main. Here's an example: I

Re: Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread Michał Marczyk
On 5 September 2010 18:46, CuppoJava patrickli_2...@hotmail.com wrote: I'm writing a simple lisp for educational purposes, and I can't figure out how to do compilation. The final chapter of SICP [1] deals with compilation of Scheme code down to a kind of assembly language (also introduced in

Re: Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread CuppoJava
Thanks for all the replies! SICP is one of my favorite books actually, I have read through it many times already. My question is particularly concerning expanding macros during compilation. If your source has NO use of macros. Then it's trivial to compile. Just compile each form one by one. The

Re: Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread Michał Marczyk
In the presence of macros, it's best to think Lisp compilation = evaluation of all forms. So, you do two things at the same time: (1) accumulate object code to be output as the result of the compilation and (2) actually execute the programme, so that you can call functions and examine variables

Re: Can Clojure compile a source-file? How does it do it?

2010-09-05 Thread CuppoJava
Ah that makes sense! Thanks Michal! I have looked through Lisp in Small Pieces, and didn't find it very well written. I think a lot was lost through the translation. Besides SICP, the other great lisp book I read was actually The Scheme Programming Language. The chapter on continuations is

Re: Problem reloading source file with imports

2010-08-31 Thread Chris Jenkins
Thanks Robert. That makes a lot of sense and I was able to follow your advice last night and get my source file to reload successfully by adding :only [indexed] to my :use clause (because indexed was the only function that I was using in this case). The thing that still confuses me is that I can

Re: Problem reloading source file with imports

2010-08-31 Thread Meikel Brandmeyer
Hi, On 31 Aug., 12:00, Chris Jenkins cdpjenk...@gmail.com wrote: The thing that still confuses me is that I can successfully load a source file that imports the whole of clojure.contrib.seq once (with warnings) but an attempt to reload that source file then fails - even if I edit the source

Problem reloading source file with imports

2010-08-30 Thread Chris Jenkins
Since I switched to Clojure 1.2, I see an error message whenever I try to reload a source file that imports anything. The error message is of the form already refers to xxx, as though it is complaining that it can't import the same thing twice. For example, I have a minimal source file

Re: Problem reloading source file with imports

2010-08-30 Thread Robert McIntyre
. --Robert McIntyre On Mon, Aug 30, 2010 at 5:54 AM, Chris Jenkins cdpjenk...@gmail.com wrote: Since I switched to Clojure 1.2, I see an error message whenever I try to reload a source file that imports anything. The error message is of the form already refers to xxx, as though

Re: Problem reloading source file with imports

2010-08-30 Thread Chris Jenkins
How would using the :only keyword help here? Just to be clear, the problem here is that attempting to load my source file the second time fails (loading the first time having succeeded, albeit with a few warnings about replacing symbols from clojure.core), which makes it very difficult for me

Re: Problem reloading source file with imports

2010-08-30 Thread Meikel Brandmeyer
Hi, Am 30.08.2010 um 20:43 schrieb Chris Jenkins: How would using the :only keyword help here? Just to be clear, the problem here is that attempting to load my source file the second time fails (loading the first time having succeeded, albeit with a few warnings about replacing symbols

Re: Problem reloading source file with imports

2010-08-30 Thread Phil Hagelberg
On Mon, Aug 30, 2010 at 3:05 AM, Robert McIntyre r...@mit.edu wrote: Yeah, they changed that from clojure 1.1 and it's really annoying --- as far as I know, your only options right now are to either select exactly which functions from seq-utils you want using the :only keyword, or if you

Re: Problem reloading source file with imports

2010-08-30 Thread Chris Jenkins
by all this. When I was loading in the whole of clojure.contrib.seq-utils, it was perfectly possible to load partition-by once (albeit with a warning) but trying to reload the source file, causing partition-by to be loaded a second time, failed. Does that sound right? Cheers, Chris On 30 August 2010

Re: Problem reloading source file with imports

2010-08-30 Thread Robert McIntyre
McIntyre On Mon, Aug 30, 2010 at 2:43 PM, Chris Jenkins cdpjenk...@gmail.com wrote: How would using the :only keyword help here? Just to be clear, the problem here is that attempting to load my source file the second time fails (loading the first time having succeeded, albeit with a few warnings

Re: Problem reloading source file with imports

2010-08-30 Thread John Sanda
, Aug 30, 2010 at 2:43 PM, Chris Jenkins cdpjenk...@gmail.com wrote: How would using the :only keyword help here? Just to be clear, the problem here is that attempting to load my source file the second time fails (loading the first time having succeeded, albeit with a few warnings about

Re: no source file

2010-02-26 Thread Matthias von Rohr
From where or how did you start you REPL? I copied you source into c: \sqrs.clj and started a REPL: C:\clojure Clojure 1.1.0 user= (load-file sqrs.clj) #'user/square-of-sum user= (square-of-sum (range 10)) 2025 user= Clojure can't find your file in the classpath. Matt -- You received this

no source file

2010-02-25 Thread Glen Rubin
))) whenever I try (load-file sqrs.clj) i get a no source file exception. I have tried placing this file on my desktop, c:\, and clojure directory, but always get a no source file exception. Where should I put it? thx! -- You received this message because you are subscribed to the Google Groups

Re: no source file

2010-02-25 Thread Stephen C. Gilardi
On Feb 25, 2010, at 8:21 PM, Glen Rubin wrote: whenever I try (load-file sqrs.clj) i get a no source file exception. Does (load-file sqrs.clj) work? --Steve -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email

Re: no source file

2010-02-25 Thread Konrad Hinsen
On 26 Feb 2010, at 02:21, Glen Rubin wrote: Here is the code I wrote, sqrs.clj: (use '[clojure.contrib.generic.math-functions :only (sqr)]) (defn square-of-sum [coll] adds up collection of numbers and then squares it (sqr (reduce + coll))) A different point: if you can

Re: find source file for namespace?

2009-12-28 Thread Emeka
Hello nchubrich, I thinking that you can do this with easy using namespace which would lead you to resolve the file name and then figure out the path. Emeka On Mon, Dec 28, 2009 at 2:43 AM, nchubrich nicholas.chubr...@gmail.comwrote: Does anyone know how to dynamically access the pathname for

Re: find source file for namespace?

2009-12-28 Thread nchubrich
But finding the source path from the namespace is what I can't figure out. You can look at metadata on a var, and this has a :file field, but typically :file says NO_SOURCE_PATH. On Dec 28, 12:33 am, Emeka emekami...@gmail.com wrote: Hello nchubrich, I thinking that you can do this with easy

find source file for namespace?

2009-12-27 Thread nchubrich
Does anyone know how to dynamically access the pathname for a particular piece of code? I.E., I'd like to be able to write a function that can be called in any context and returns the pathname for the code it was called in. (My intended use for this is to develop a testing package; I want to

Re: Adding source file information to compiler exceptions

2009-06-25 Thread vseguip
Ok the SCA agrrement says we can actually print/sign/scan the agreement ans den it via e-mail. Is this a possibility for Clojure or postal mail is the only one and true way? Cheers, V.Seguí On 18 jun, 09:28, vseguip vseg...@gmail.com wrote: Thanks for the link, I hadn't seen it. It seems like

Re: Adding source file information to compiler exceptions

2009-06-18 Thread vseguip
Thanks for the link, I hadn't seen it. It seems like an overkill for what is in an essence a 4 line patch to have to sign the CA send it to Rich via postal mail, specially considering I'm from Spain and wait for his approval. I can do it if there isn't any other option though. Cheers, V. Seguí

Adding source file information to compiler exceptions

2009-06-17 Thread vseguip
Currently Clojure adds source and line information in the cause string to exceptions thrown when compiling. This makes it difficult for slime to highlight this errors as it actually has to parse the cause message to get the source and file. This regex parsing fails in my system (I have fixed the

Re: Adding source file information to compiler exceptions

2009-06-17 Thread J. McConnell
On Wed, Jun 17, 2009 at 2:55 PM, vseguip vseg...@gmail.com wrote: or is there a preferred way to communicate patches? This is new: http://clojure.org/patches - J. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

How To Load Source File

2009-01-14 Thread Onorio Catenacci
Hi all, I'm new to Clojure and new to Lisp but not new to software development. And I feel very dumb for having to ask what seems like a very noob question but I can't seem to figure this out. If I want to load a source file into REPL it seems that I should be able to do this: (load-file

Re: How To Load Source File

2009-01-14 Thread Tom Ayerst
to Lisp but not new to software development. And I feel very dumb for having to ask what seems like a very noob question but I can't seem to figure this out. If I want to load a source file into REPL it seems that I should be able to do this: (load-file filename) but when I try

Re: How To Load Source File

2009-01-14 Thread Onorio Catenacci
On Jan 14, 9:56 am, Tom Ayerst tom.aye...@gmail.com wrote: This works for me in every configuration I could think of (at worst I get java.io.FileNotFoundException).   Are you running a plain cmd prompt? (not MSys or cygwin)   How did you launch clj? Hi Tom, Thanks for the response. I'm

Re: How To Load Source File

2009-01-14 Thread Greg Harman
/1/14 Onorio Catenacci catena...@gmail.com Hi all, I'm new to Clojure and new to Lisp but not new to software development.  And I feel very dumb for having to ask what seems like a very noob question but I can't seem to figure this out. If I want to load a source file into REPL

Re: How To Load Source File

2009-01-14 Thread Tom Ayerst
Glad to help. If you haven't found it yet the wiki is very helpful, especialyy: http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started If you want to spend some money Stuart Halloway's book is excellent http://www.pragprog.com/titles/shcloj/programming-clojure Cheers Tom 2009/1/14

Re: How To Load Source File

2009-01-14 Thread Onorio Catenacci
On Jan 14, 10:50 am, Greg Harman ghar...@gmail.com wrote: For more than just experimentation with one file, you might also want to look into lib packaging so that you can 'require' or 'use' rather than have to go down to the level of 'load' or 'load-file'. Quick summary, if your file has