2008-03-28
| 02:23 | vagif | Hello, need help |
| 02:24 | vagif | running clojure repl |
| 02:24 | vagif | typing (strcat "bla" "bla") |
| 02:24 | vagif | Says: Unable to resolve symbol: strcat in this context |
| 02:25 | vagif | what is strcat ? is this a clojure function ? Could not find it anywhere in clj files |
| 02:50 | vagif | Anyone home ? |
| 03:02 | hoeck | yes, but going to work soon |
| 03:03 | vagif | I have an error running (strcat "bla" "bla") |
| 03:03 | vagif | Says: Unable to resolve symbol: strcat in this context |
| 03:03 | vagif | is strcat a clojure function ? |
| 03:04 | hoeck | yes, wich version of clojure are you running? |
| 03:04 | vagif | downloaded from main web site |
| 03:05 | vagif | 20080213 |
| 03:05 | vagif | i searched all clj files |
| 03:05 | hoeck | oh, thats kind of old |
| 03:05 | vagif | there's no such function as strcat |
| 03:05 | hoeck | oh, sorry, that was a function from my own library |
| 03:06 | hoeck | yes you're right |
| 03:06 | vagif | oh i see |
| 03:06 | vagif | webjure is using that function |
| 03:06 | vagif | but it is not included in it |
| 03:06 | vagif | are you a webjure maintainer ? |
| 03:07 | hoeck | no, but its a pretty trivial function to write |
| 03:07 | hoeck | (defn strcat |
| 03:07 | hoeck | ([] "") |
| 03:07 | hoeck | ([s] s) |
| 03:07 | hoeck | ([f & s] (. f (concat (apply strcat s))))) |
| 03:07 | hoeck | |
| 03:08 | vagif | damn. Yes i know. I'm just trying to run webjure and i get this error. Looks like they are missing some files |
| 03:11 | vagif | hoeck: thx, it helped |
| 10:21 | Chouser | hoeck: I think strcat has been replaced with just str |
| 10:21 | Chouser | so next time vagif shows up and asks, we can tell him. ;-) |
| 10:30 | hoeck | yeah, he also asked on the mailinglist |
| 10:31 | hoeck | i guess we need some kind of symbol-index |
| 10:32 | rhickey | I'm adding a page to the site that is an html rendition of the in-source docs, and will reflect the SVN version |
| 10:32 | hoeck | thats fine |
| 10:34 | Chouser | I wonder if it'd be worth having a wiki page of the history of symbol names. Their such easy problems to fix if you can just find the right name, but that can completely hobble existing libs that are out there. |
| 10:36 | rhickey | there have been very few, but yes, would be good wiki addition |
| 10:36 | rhickey | go for it |
| 10:36 | Chouser | "They're". Sorry. Ok, I'm on it. ;-) |
| 10:36 | rhickey | :) |
| 10:42 | cgrand | rhickey: thanks, it works fine now. |
| 10:52 | rhickey | cgrand: great |
| 11:01 | Chouser | rhickey: your SVN comments are so good, it might almost be worth automating the rename list. |
| 11:01 | Chouser | http://en.wikibooks.org/wiki/Clojure_Programming#Where_did_the_x_function_go.3F |
| 11:03 | Chouser | I hope everyone feels free to add updates, corrections, reformat, put it in a better location, whatever... |
| 11:04 | rhickey | Thanks! yes, might be automated... hmm... appl is now partial |
| 11:04 | Chouser | oh, missed that. hang on |
| 11:04 | Chouser | there |
| 11:05 | rhickey | I have to stop renaming things, trying to do so only when important |
| 11:06 | Chouser | you'll have to stop eventually, but better to do it early than late. |
| 11:08 | rhickey | it seems a fair number of people are tracking svn, vs release |
| 11:08 | rhickey | providing docs for both is tricky |
| 11:08 | Chouser | yeah. as if providing docs wasn't painful enough by itself. |
| 11:09 | rhickey | yup |
| 11:49 | hoeck | http://en.wikibooks.org/wiki/Clojure_Programming#Where_did_the_x_func\ |
| 11:49 | hoeck | tion_go.3F |
| 11:49 | hoeck | can't find that |
| 12:16 | albino | link worked for me |
| 12:25 | cgrand | albino: cache problem, I had to hit CTRL+F5 |
| 14:30 | Chouser | I should be able to do prn from inside an agent action, and still see the output, right? |
| 14:31 | rhickey | with flush, yes |
| 14:33 | Chouser | hm. well when I do (f) I see f's output, but when I do (send (agent nil) f), I see nothing. |
| 14:35 | Chouser | and if I do (let [a (agent nil)] (send a f) (await a)) it appears to hang. |
| 14:35 | nsinghal_ | ;I am defining this function. but to define this function i am needing to connect to socket and get the input output stream. |
| 14:35 | nsinghal_ | ;How can i avoid this? |
| 14:35 | nsinghal_ | (defn run-remote [exp] |
| 14:35 | nsinghal_ | (binding [*out* *socket-out*] |
| 14:35 | nsinghal_ | (prn exp) |
| 14:35 | nsinghal_ | (flush)) |
| 14:36 | nsinghal_ | (read-wait *socket-in*)) |
| 14:36 | rhickey | (send (agent nil) #(do (prn "hello") (flush) %)) |
| 14:36 | rhickey | chouser: does that work? |
| 14:37 | Chouser | rhickey: yep. It's the % |
| 14:37 | Chouser | I was using #() with no %, so the function wasn't accepting the param. |
| 14:37 | rhickey | your action must be a function of the agent's state |
| 14:38 | rhickey | right, and got an exception, which is cached on the agent, but you don't retain the agent |
| 14:38 | Chouser | right. |
| 14:38 | Chouser | thanks! |
| 14:38 | rhickey | sure |
| 14:40 | rhickey | nsinghal: not sure I understand your question |
| 14:40 | nsinghal_ | sorry my mistake |
| 14:40 | nsinghal_ | user malfunction |
| 14:41 | nsinghal_ | thx |
| 15:24 | nsinghal_ | Using refs transaction - awesome - simple and elegant |
| 17:23 | abrooks | rhickey: Do you have any thoughts about path relative file loading? Currently I have files with absolute paths to .clj library files which makes the sources non-portable. |
| 17:24 | rhickey | yes, it's a good idea that has been discussed but not yet implemented |
| 17:24 | abrooks | rhickey: Actually, I guess this brings up another question. Are packages brought in by import purely Java or would import bring in .clj files from some path as well? |
| 17:25 | rhickey | import is just about Java |
| 17:26 | abrooks | Right. Looking at the current sources I see that. Is it ever intended to be expanded to clojure libraries or is the notion of import the wrong sense to make that fit. |
| 17:26 | abrooks | ^fit.^fit? |
| 17:26 | rhickey | and refer doesn't trigger any loading |
| 17:26 | rhickey | but could |
| 17:27 | rhickey | load-file is really just for repl or some system definition file |
| 17:27 | abrooks | Is any of the previous discussion recorded (Google Group?) or was it all ephemeral in IRC? |
| 17:27 | rhickey | on group |