0:15 AM
johannbestowrous has quit
0:27 AM
flyboarder joined the channel
0:31 AM
hayohayo has quit
0:31 AM
flyboarder has quit
0:31 AM
hayohayo joined the channel
1:00 AM
robink_ joined the channel
1:27 AM
jjmojojjmojo has quit
1:29 AM
jjmojojjmojo joined the channel
1:42 AM
johannbestowrous joined the channel
1:54 AM
hayohayo has quit
2:07 AM
hayohayo joined the channel
2:19 AM
johannbestowrous has quit
2:25 AM
zerokarmaleft has quit
2:51 AM
hayohayo has quit
3:25 AM
johannbestowrous joined the channel
3:30 AM
johannbestowrous has quit
3:34 AM
johannbestowrous joined the channel
4:30 AM
alchemis7 has quit
4:35 AM
onetom joined the channel
5:10 AM
robink_ joined the channel
5:12 AM
jjttjj has quit
5:38 AM
flyboarder joined the channel
5:38 AM
flyboarder
Anyone available that can give some advice about boot filesets?
5:40 AM
specifically how do I specify using the :target-path
5:52 AM
dm3 joined the channel
6:06 AM
jumblerg joined the channel
6:17 AM
alchemis7 joined the channel
6:18 AM
anyone can help with boot questions?
6:42 AM
mynomoto has quit
6:48 AM
dm3 has quit
6:58 AM
flyboarder has quit
7:19 AM
johannbestowrous has quit
8:17 AM
piranha joined the channel
8:20 AM
johannbestowrous joined the channel
8:24 AM
johannbestowrous has quit
9:36 AM
dm3 joined the channel
10:01 AM
piranha has quit
10:08 AM
johannbestowrous joined the channel
10:13 AM
johannbestowrous has quit
10:47 AM
piranha joined the channel
11:01 AM
daemian has quit
11:24 AM
daemian joined the channel
11:57 AM
johannbestowrous joined the channel
12:02 PM
johannbestowrous has quit
12:41 PM
piranha has quit
12:46 PM
dm3 has quit
12:47 PM
dm3 joined the channel
12:51 PM
dm3 has quit
13:06 PM
johannbestowrous joined the channel
13:08 PM
mynomoto joined the channel
13:15 PM
dm3 joined the channel
13:41 PM
johannbestowrous has quit
13:42 PM
dm3 has quit
13:43 PM
dm3 joined the channel
13:47 PM
dm3 has quit
13:58 PM
jjttjj joined the channel
14:22 PM
dm3 joined the channel
15:03 PM
johannbestowrous joined the channel
15:21 PM
piranha joined the channel
15:21 PM
dm3 has quit
15:34 PM
johannbestowrous has quit
15:35 PM
jjmojojjmojo has quit
15:38 PM
jjmojojjmojo joined the channel
15:51 PM
piranha has quit
15:51 PM
piranha joined the channel
16:23 PM
dm3 joined the channel
16:24 PM
piranha has quit
16:40 PM
flyboarder joined the channel
16:40 PM
jjttjj has quit
16:41 PM
can anyone shed some light on boot filesets?
16:41 PM
Guest29403
flyboarder: what's up?
16:43 PM
flyboarder
Guest29403: Im tryng to understand why I cannot write to a clojure.java.io/file im using code from the wiki and boot-copy but it doesnt seem to be working, im trying ti understand how the fileset works
16:44 PM
Guest29403
16:45 PM
is there something in particular that you are wanting to know?
16:45 PM
flyboarder
Guest29403: I have read that a bunch but the example isnt working at the bottom of that page
16:45 PM
Guest29403: I am trying to figure out how to write to a fileset file
16:45 PM
Guest29403
you don't probably want to do that
16:46 PM
the fileset is immutable
16:46 PM
so what you want to do is write a new file in a temp directory, then add that temp directory to the fileset
16:46 PM
this will get you a new fileset with your file replacing the preexisting one
16:47 PM
if you add a directory to the fileset via add-resource say, the files in there will overwrite files that are already in the fileset
16:49 PM
flyboarder
that part I got working eventually, but im calling (doto <file>) and I cannot use a java.io file, is this correct? the examples seem to do it
16:49 PM
I had to use (tempd/path <file>)
16:49 PM
Guest29403
can you paste your code please?
16:49 PM
flyboarder
16:50 PM
Guest29403
that looks correct
16:51 PM
flyboarder
how come I cannot use out-file instead of out-path?
16:51 PM
Guest29403
oh i see
16:51 PM
you should be able to do that
16:52 PM
what happens if you use out-file?
16:52 PM
flyboarder
but it fails with a no key value error
16:52 PM
1 sec I will rerun now
16:53 PM
hmmmm.... now I cam very confused as it is working
16:53 PM
oh no its not
16:55 PM
Guest29403
what happens when it fails?
16:55 PM
flyboarder
ok yes that is working
16:55 PM
sometimes I get a getPath error
16:56 PM
Guest29403
there are functions in boot.core to do yaml and json stuff btw
16:56 PM
boot.core/json-parse boot.core/yaml-parse, boot.core/json-generate, etc
16:57 PM
johannbestowrous joined the channel
16:57 PM
flyboarder
I originally tried those and it wasnt working so I opted for the original libraries, ill condense it once I sort out my logic problems
16:57 PM
Guest29403
ah i see
16:59 PM
flyboarder
since I am converting the file ext to .json i get both the original and new file, how can I clean up the original?
17:04 PM
Guest29403
there is a boot.core/rm function for that
17:04 PM
17:04 PM
flyboarder
ok and I just pass in the original file
17:05 PM
Guest29403
well you do like
17:06 PM
the argument isn't a java.io file
17:06 PM
it's a tmpfile
17:06 PM
which is one of the things you get from the fileset
17:06 PM
flyboarder
ok, so I can just call that once the conversion is complete
17:06 PM
Guest29403
i mean the argument is a vector of tmpfiles
17:07 PM
yeah but before commit! though
17:07 PM
naturally
17:07 PM
flyboarder
right
17:07 PM
Guest29403
(-> fileset (add-resource tmp) (rm [in-path]) commit!)
17:07 PM
or something like that
17:07 PM
oops, i guess not in-path
17:08 PM
but you get the idea
17:08 PM
dm3 has quit
17:08 PM
in-tmpfile
17:08 PM
dm3 joined the channel
17:09 PM
flyboarder
is that the file I get from tempd/file?
17:09 PM
Guest29403
(-> fileset (add-resource tmp) (rm yml) commit!)
17:09 PM
in your case
17:09 PM
flyboarder
ah so it's the entire fileset
17:09 PM
which was filtered to yaml files
17:09 PM
Guest29403
well a sequence of tmpfile objects
17:10 PM
right, that's what yml is there
17:10 PM
you could also use the sift task
17:11 PM
i guess the problem with using boot.core/rm there is that you're only getting the diff files
17:12 PM
so i think perhaps composing your task with sift is the best way
17:12 PM
like instead of (with-pre-wrap ...) in your task
17:12 PM
you can do
17:12 PM
flyboarder
not quite sure what you mean, i tried adding rm and it cannot resolve yml from that location
17:13 PM
Guest29403
(comp (with-pre-wrap ...) (sift :invert true :include #{ #"\.yaml$" }))
17:14 PM
oh, you just need to have the last expression there inside the let expression
17:14 PM
so it can see the let-bound yml
17:15 PM
flyboarder
ah ok
17:16 PM
Guest29403
but rm won't work in your case, because yml is only getting yaml files that have changed
17:16 PM
so it won't remove json files that haven't changed
17:16 PM
so i think sift is your best bet
17:17 PM
flyboarder
and my final annoying question :P O can specify :target-path on the env, how do I specify sub folders for different file types?
17:17 PM
Guest29403
or you could make a different binding like [all-yml (->> fileset input-files (by-ext [".yaml"])]
17:18 PM
andn then do (rm all-yml)
17:18 PM
flyboarder
how does that change the bindings?
17:18 PM
seems fairly similar
17:18 PM
Guest29403
you need to have a variable that holds the sequence of tmpfile objects for *all* .json files, not just .json files that changed just now
17:19 PM
the difference is that there is no fileset-diff in that one
17:20 PM
flyboarder
ok makes sense