Fork me on GitHub
#beginners
<
2016-06-25
>
zane00:06:17

Thank you!

renan14:06:13

Hi guys, anyone have a simple project in Clojure that need help/contributors? 😁

alexmiller15:06:52

Particularly the ones marked beginner friendly

plexus16:06:22

what's the difference between regular type annotations and those with an extra #?

plexus16:06:43

saw this in the refactor-nrepl source and hadn't seen it before

(defmethod path-class-files :dir
  ;; Dispatch directories and files (excluding jars) recursively.
  [#^File d #^File loc]

bronsa16:06:38

#^ is old syntax

bronsa16:06:05

very old. Don't use it but there's no difference between ^Foo and #^Foo at all

plexus16:06:32

I see, that's good to know

bronsa16:06:07

in ancient times ^something used to be syntax for (meta something) IIRC and #^Foo something for (with-meta something {:tag Foo}), the former was later changed to be the preferred version of writing the latter

tungsten18:06:29

anyone here have experience with low level socket programming in clojure?

tungsten18:06:04

if i have a 500 byte buffer... how do i remove the first 4 bytes and write out the rest to a file?

alexmiller19:06:52

Lookup the Java ways to do that and use interop

tungsten19:06:29

in C if I open a socket I have a persistent file descriptor

tungsten19:06:39

Im conceptually confused about how this works in clojure

tungsten19:06:55

like I can open a socket, but after that function call returns doesnt it go out of scope?

alexmiller19:06:05

Usually you pass it around

alexmiller19:06:05

Or you pull something off of it and that maintains a reference to it so doesn't gc

tungsten19:06:51

is passing it around like defining it in a "let" and then referring to whatever it was defined as later in the function?

tungsten19:06:58

thanks for your help

alexmiller19:06:26

Yes or passing it to functions that use it