2014-01-01
| 00:00 | KeithPM | Right... |
| 00:01 | justin_smith | there is even this popular sneaky trick: ##(let [a 0 _ (println a) b 1] (* 3 b)) |
| 00:01 | lazybot | ⇒ 0 3 |
| 00:01 | justin_smith | _ being a conventional name for a thing you are using in a binding place, but the value is ignored |
| 00:02 | justin_smith | that comes up when you have stateful stuff in the let bindings, and you want to print out what is happening in the middle of a series of bindings |
| 00:05 | johnwalkergh | happy new year |
| 00:05 | binski | :D |
| 00:07 | KeithPM | Let destructuring... Cool stuff!!! I read up the special forms in the docs. Sooo much good stuff :) |
| 00:08 | KeithPM | Hey Justin, thanks a lot, I finally got the recursion method to work. I bound the result of the update to a new variable and used that in the recursive call |
| 00:08 | KeithPM | Thanks everyone... It's a struggle, but I think clojure is so worth the effort!!!! |
| 00:09 | justin_smith | destructuring is another thing, works in function args, let bindings, doeseq and for bindings... |
| 00:09 | TEttinger | KeithPM heh indeed. it took me about a year of on-and-off clojure use before it kinda clicked. using it more would have made it faster heh |
| 00:10 | justin_smith | KeithPM: agreed, definitely worth the effort, a marvelous language |
| 00:10 | TEttinger | the way you can manipulate data in clojure is really fantastic |
| 00:11 | KeithPM | Yes, so empowering, you get so much done with so little |
| 00:12 | justin_smith | and instead of it being so little thanks to cryptic sigils, it is so little because you have composible operations that do the things you need to your data |
| 00:12 | KeithPM | Absolutely. I love that if I can't figure the whole thing out, I could work out little pieces and compose them. |
| 00:13 | KeithPM | And I think what you were referring to, is the absemce of squiggles in the language. I feel that the scarcity of syntax is so helpful to clear thinking |
| 00:14 | justin_smith | I was thinking of perl |
| 00:14 | justin_smith | which is concise and expressive in a much different way |
| 00:16 | TEttinger | APL is concise but I wouldn't think of it as expressive |
| 00:17 | justin_smith | yeah, maybe not so much the "expressive" part with perl either actually |
| 00:18 | KeithPM | Yes, I missed the perl boat, I am from the awk days :) . I like APL but the problem with many of these they tended to be incomplete. I feel I could do anything with clojure, from the data base to the web page to the calculation... That is what makes it worth my time and effort. |
| 00:18 | justin_smith | agreed, in my experience so far that is true |
| 00:19 | justin_smith | as long as you don't need low memory usage or quick start up time, clojure's your guy |
| 00:19 | TEttinger | in clojure, unless your task involves pretty heavy mutable state, you can use your choice of solutions rather than contorting your code to fit the language's patterns. APL, everything's an array. |
| 00:20 | KeithPM | Yes... a matrix of as many dimensions as your brain could keep track of :) |
| 00:20 | TEttinger | KeithPM, heh |
| 00:21 | TEttinger | I prefer to use 1D arrays in clojure when I need speed, even for 2D data (using the (mod idx width) trick) |
| 00:23 | KeithPM | Oh I understand, that's like the C array... A one D that you could shape to your heart's desire |
| 00:25 | brandon` | is clojure's macro system closer to common lisps' than scheme's? |
| 00:25 | amalloy | yes |
| 00:33 | UltimateEyePatch | brandon`, I was asking this today and they refused to answer me |
| 00:33 | UltimateEyePatch | Because they think I'm troll, they can hunt for I can take it |
| 00:33 | UltimateEyePatch | As I'm the hero clojure deserive,s but not the one it needs right now |
| 01:22 | bitemyapp | ucb: !!! |
| 01:22 | bitemyapp | ucb: happy new year, have some fucking black metal! http://www.youtube.com/watch?v=aIQgwFcush0 |
| 01:23 | bitemyapp | ucb: http://www.youtube.com/watch?v=hzMeU8tuvNE and something not black metal! |
| 01:24 | bitemyapp | TEttinger: that's a pretty good trick. |
| 01:24 | TEttinger | mod and quot by width man, all you really need |
| 01:25 | bitemyapp | TEttinger: is that adaptable to three dimensions? |
| 01:25 | TEttinger | I think so. it may be multiple calls |
| 01:25 | TEttinger | think of 3d tic-tac-toe |
| 01:31 | justin_smith | I was just playing with conch, and it makes it easy to treat an arbitrary shell command as a lazy-seq of lines |
| 01:31 | justin_smith | which has some really nice potential |
| 01:32 | bitemyapp | Raynes: ^^ he likes your milkshakes. |
| 01:33 | abaranosky | mmmm, milkshakes |
| 01:33 | bitemyapp | abaranosky: hey man! Happy New Year :) |
| 01:33 | abaranosky | bitemyapp: happy new year to you as well :) |
| 01:33 | bitemyapp | abaranosky: I'm reading the Yesod book right now, funny to see the patterns/ideas I was using in Ring pop up in their neck of the woods. |
| 01:33 | abaranosky | happy new year all of you guys too :) |
| 01:33 | justin_smith | (inc Raynes) |
| 01:33 | lazybot | ⇒ 40 |
| 01:34 | abaranosky | just had to google Yesod. Cool. I'm looking forward to making some real application in Haskell sometime |
| 01:35 | bitemyapp | abaranosky: been futzing around with a Haskellization of Frak with noprompt. |
| 01:35 | bitemyapp | abaranosky: I'm tinkering with Simonides at the moment. |
| 01:36 | abaranosky | bitemyapp: I'm looking through your public activity on Github at the moment. |
| 01:37 | bitemyapp | abaranosky: Simonides isn't public yet :( |
| 01:37 | bitemyapp | the original Clojure repo was private and I haven't pushed my Haskell experimentations. |
| 01:37 | abaranosky | bitemyapp: other than working on a private project of mine, I've been doing abunch of elisp lately |
| 01:38 | abaranosky | I'm definitely succombing to the Emacs addiction, severely |
| 01:38 | bitemyapp | abaranosky: most of my public activity will probably be Berossus, which is actually a work project. |
| 01:38 | bitemyapp | abaranosky: making that Yak nice and bald? |
| 01:39 | abaranosky | bitemyapp: I'd like to even contrbute to cider and stuff... It's a yak, but a really important one to the community |
| 01:39 | justin_smith | is there such thing as yak-electrolysis? |
| 01:39 | abaranosky | I've done a little work on clj-refactor too |
| 01:39 | abaranosky | justin_smith: there is now! |
| 01:39 | bitemyapp | justin_smith: good idea. |
| 01:39 | bitemyapp | abaranosky: that's intriguing - what's the idea there? |
| 01:39 | abaranosky | just add it to the URban Disctionary |
| 01:40 | abaranosky | bitemyapp: cider, or clj-refactor? |
| 01:40 | bitemyapp | abaranosky: clj-refactor |
| 01:40 | bitemyapp | abaranosky: how would that even work? heuristics and prayers? |
| 01:41 | bitemyapp | part of what was interesting for me in comparing my approaches in Ring to what the Yesod people are doing is that they're basically taking what I was doing via maps and implicit coercions and making it into an explicit Type. |
| 01:41 | bitemyapp | especially surrounding REST and content negotiation. |
| 01:42 | abaranosky | bitemyapp: it can't do that much.. but some things are useful. IT can rename files, and replace the usages in ns statements throughout the project. It can thread and unthread, and can add ns form to the top of each new cfile I make |
| 01:43 | abaranosky | To do more interesting things it needs a nrepl conneciton and analyzer. |
| 01:43 | bitemyapp | abaranosky: that's still very cool :) |
| 01:43 | abaranosky | I really like reading elisp projects like those though, because I'm learning a lot |
| 01:44 | abaranosky | For example, trying to setup my erc right now to notify me when I'm mentioned, or get a private message |
| 01:45 | abaranosky | bitemyapp: re: Yesod, I'd really need to see some example code to make what you're saying more concrete |
| 01:45 | bitemyapp | abaranosky: http://www.yesodweb.com/book/restful-content |
| 01:45 | bitemyapp | abaranosky: I changed the way I was doing my Ring handlers. |
| 01:45 | bitemyapp | abaranosky: they all return maps with a template name and the actual data. |
| 01:46 | bitemyapp | abaranosky: then content negotiation decides whether you get a rendered HTML template with the injected context, a straight-up Clojure map, or JSON. |
| 01:46 | bitemyapp | abaranosky: makes your handlers highly testable too. |
| 01:46 | abaranosky | how were you doing them before? |
| 01:48 | bitemyapp | abaranosky: just directly rendering HTML or JSON or something. |
| 01:48 | bitemyapp | which is how I've seen most other people do it - having separate JSON and HTML handlers. No need for it though. |
| 01:48 | bitemyapp | your web app is the API. |
| 01:49 | bitemyapp | abaranosky: it's a little ghetto but you can see an example here: https://github.com/bitemyapp/berossus/blob/master/src/berossus/rocks/your/data/api.clj |
| 01:49 | abaranosky | bitemyapp: that makes sense. I never get to that level of decoupling because for the crappy APIs I work with we're not serving various content-types... pretty much every routes serves one content-type per route |
| 01:50 | abaranosky | if I wanted to accept various content-types per route I'd want there to be a canonical data shape, that coudl then be rendered to JSON/XML/EDN/CSV/etcetc |
| 01:53 | bitemyapp | abaranosky: it's not just for the various content types |
| 01:54 | bitemyapp | abaranosky: it's for easy debugging and testing. |
| 01:54 | abaranosky | bitemyapp: looking at yoru link... In some more ivory tower universe, it'd be nice to have a map from content-type to serializer-fn, and then the route would compute the data and switching on the content-type pick a serialization |
| 01:54 | bitemyapp | because then I can treat my handlers like vanilla Clojure or Haskell functions. |
| 01:54 | bitemyapp | abaranosky: https://github.com/bitemyapp/berossus/blob/master/src/berossus/rocks/your/data/middleware.clj#L32-L51 |
| 01:55 | abaranosky | bitemyapp: cool, I just learned you can do #L32-L51 in github |
| 01:55 | bitemyapp | abaranosky: I do this partly because I had some pretty serious issues with getting Liberator to do what I wanted, so I did what I always do...and wrote my own fucking Ring middleware. |
| 01:55 | abaranosky | bitemyapp: nice, great minds think alike they say |
| 01:55 | bitemyapp | grump grump grump |
| 01:56 | bitemyapp | abaranosky: this is why I'm suspicious of things like Liberator - it invariably becomes easier for me to write my own Ring middleware than futz around with their pseudo-framework. |
| 01:56 | abaranosky | basically, keep everything as data as long as possible... it's the best way to do everything in Clojure |
| 01:56 | abaranosky | frameworks stink |
| 01:56 | bitemyapp | I'm willing to play in Yesod land (a framework) because I don't fully know the lay of the land in Haskell web dev yet and want to learn the patterns from them first before I do everything myself in WAI. |
| 01:56 | abaranosky | I haven't messed with liberator enough |
| 01:57 | bitemyapp | abaranosky: well, for experienced users they can sometimes. But I needed to learn how Haskell people were doing it and learning from frameworks initially seemed and okay way to do that. |
| 01:57 | abaranosky | the solution might just be that liberator needs to have its design put to the decoupling / flexibility challenge |
| 01:57 | bitemyapp | abaranosky: and I know many experienced Haskell users who are happy using Yesod and Snap (also a framework) |
| 01:57 | bitemyapp | abaranosky: that's part of the problem. You basically can't change the content negotiation behavior / dispatch easily in Liberator without resorting to the sort of evil hacks I am notorious for. |
| 01:58 | abaranosky | bitemyapp: oh, I"m all for copying the patterns that seem to work "ok" when learning the ropes... It's the only way really. |
| 01:58 | bitemyapp | AOP / alter-var-root / robert.hooke - that sort of thing. |
| 01:58 | abaranosky | That's why I'd like to hack in Haskell with someone who knows better, like yourself |
| 01:58 | bitemyapp | abaranosky: well it's that or make a lot of silly mistakes while groping blindly around in WAI land. |
| 01:58 | bitemyapp | WAI is roughly equivalent to Ring. |
| 01:58 | bitemyapp | the reason I'm using Yesod is that Snap and Happstack haven't fully embraced WAI yet. |
| 01:59 | bitemyapp | they're older, which is part of the reason. |
| 01:59 | abaranosky | these are all very new and funny words to me |
| 01:59 | abaranosky | ;) |
| 01:59 | abaranosky | there is one Ring to rul them all.... don't need those other ones |
| 01:59 | bitemyapp | abaranosky: I really don't know that much, I've got a knack for explaining some of the more basic concepts like monads and I'm good at reading documentation. |
| 02:00 | abaranosky | good, then you won't know so much that my relative ignorance drives you nuts |
| 02:00 | bitemyapp | Also I am wired for fucking sound. Perhaps drinking a whole pot of moka espresso wasn't a good idea. |
| 02:00 | abaranosky | I've written one 100 line Haskell application to read files and sort and output them to txt files. |
| 02:00 | bitemyapp | abaranosky: Haskell happens to be exceptional at unixy things like that. |
| 02:00 | abaranosky | ... its a code puule from from an old job of mine |
| 02:01 | bitemyapp | puule? |
| 02:01 | abaranosky | oh, sorry. "puzzle" |
| 02:02 | bitemyapp | ah okay. |
| 02:05 | bitemyapp | abaranosky: part of the Yesod rabbit-hole and a lot of why it had to be done as a framework is that Snoyman extended the concept of "type-safe" beyond just the controllers and persistence layer. It covers URLs and templates too. |
| 02:05 | bitemyapp | abaranosky: the templates get type-checked as part of the build. lol. |
| 02:05 | bitemyapp | the individual components are library-ized, you can use any part of it you want individually, but you won't benefit from the build process as much unless you use it in the way prescribed. |
| 02:05 | bitemyapp | so I'm trying to get a feel for whether or not the added hotness is worth using the framework atm. |
| 02:06 | abaranosky | bitemyapp: that's the stuff I want to get real-world-hands-on-experience with... because I don't know if I think it rocks, or instead is over-restrictive feeling to have the type system involved in the urls and templates like that |
| 02:06 | abaranosky | ... not saying one way or the other... just not sure if it will legitimately make me more productive |
| 02:06 | bitemyapp | abaranosky: it's pretty lightweight from what I'm experiencing so far. |
| 02:06 | abaranosky | at the end of the day I want my programmign language to make me faster |
| 02:07 | bitemyapp | or at least on the template/URLs side it is. |
| 02:07 | bitemyapp | but he's using macros and other things to hide the boilerplate :) |
| 02:07 | abaranosky | yeah, not so sure about macros in Haskell :\ |
| 02:07 | bitemyapp | abaranosky: http://www.yesodweb.com/book/shakespearean-templates |
| 02:07 | bitemyapp | abaranosky: the macros in Haskell are similar to the ones in Lisp. You get an AST and return an AST. |
| 02:07 | abaranosky | I need more experience. |
| 02:08 | bitemyapp | abaranosky: take a quick look at the examples in that link. |
| 02:08 | abaranosky | interesting, so they're not horrific |
| 02:08 | bitemyapp | yeah, I can smell color now. That was too much coffee. |
| 02:08 | TEttinger | I want to smell color |
| 02:09 | abaranosky | bitemyapp: any good links on haskell's macros? |
| 02:10 | bitemyapp | abaranosky: just the Template Haskell tutorials. |
| 02:10 | bitemyapp | I don't know of a particularly good one, the ones I found through googling seemed fine to me. |
| 02:11 | bitemyapp | ucb: annnnd uhhhh http://morthylla.bandcamp.com/album/morthylla |
| 02:11 | bitemyapp | also R is an obnoxious language. |
| 02:12 | abaranosky | an obnoxious language for those obnoxious, smug Data Science weenies |
| 02:12 | abaranosky | ^^^ I"m kidding ;) |
| 02:12 | abaranosky | ... seriously, the machine learning guys at work make good use of R |
| 02:13 | bitemyapp | abaranosky: I'm trying to decide if I want to continue reading through this Machine Learning for Hackers book just by reading the examples or by translating the code to Haskell. |
| 02:13 | abaranosky | but as a developer, I don't like it so much |
| 02:13 | bitemyapp | I get that R is effective, but it's really not superior to Clojure or Haskell for me. |
| 02:13 | bitemyapp | it's also got a filthy and terrible notion of how package management should work. |
| 02:13 | abaranosky | Haskell isn't your ideal ML language is it? I have yet to meet a data guy who mentioned using Haskell for their work |
| 02:14 | abaranosky | bitemyapp: you are correct R is *not* a good langueg imo... just an easy/convenient one |
| 02:14 | bitemyapp | yeah, good way of putting it. |
| 02:14 | bitemyapp | abaranosky: uh, depends on the problem. Clojure has nice tools for some things, Haskell has better ones for others. |
| 02:14 | abaranosky | "it has a lot odf good libraries" is something I've heard a billion times |
| 02:14 | abaranosky | same thing about Python |
| 02:14 | bitemyapp | abaranosky: if I was performance constrained or I had to write something larger than a 100 line program I'd lean towards Haskell to keep me sane. |
| 02:18 | abaranosky | bitemyapp: I'm excited to learn more Haskell for the new year |
| 02:22 | abaranosky | bitemyapp: was just looking at frak... I wonder when a library like that becomes something you need to use? |
| 02:22 | bitemyapp | abaranosky: noprompt is one of those people that harness regex for eldritch purposes. |
| 02:22 | bitemyapp | abaranosky: I think the original use-case was improving the syntax highlighting in vim-clojure and they wanted something close to the ideal (performance) regex from a list of inputs. |
| 02:23 | bitemyapp | now he just uses it as a command line application. |
| 03:16 | ddellacosta | bitemyapp: Happy New Year! |
| 03:18 | bitemyapp | ddellacosta: happy new year! I found an excellent interactive course written by a prominent Haskeller. |
| 03:18 | bitemyapp | ddellacosta: let me know if you'd like to pair up on it :) |
| 03:18 | ddellacosta | bitemyapp: definitely interested...is there a link? |
| 03:19 | bitemyapp | ddellacosta: https://github.com/NICTA/course |
| 03:19 | bitemyapp | I'm doing some preliminary exploration of it right now. |
| 03:21 | abaranosky | bitemyapp: how much of the stuff in your emacs.d on github do you use regularly? I'm always interested in seeing how people use Emacs to rock |
| 03:22 | bitemyapp | abaranosky: anything Clojure, Python, or Haskell related is used pretty regularly. |
| 03:23 | abaranosky | is alembic working for you? Last time I tried to use it it didn't work. But I'm going to try it again. |
| 03:23 | bitemyapp | abaranosky: it worked fine for me the last time I used it. |
| 03:23 | bitemyapp | it's pretty critical when I'm beginning to hammer out a new project. |
| 03:23 | bitemyapp | I used it when I started getting berossus rolling. |
| 03:24 | abaranosky | bitemyapp: yeah it is really annoying to keep calling cider-restart |
| 03:24 | ddellacosta | bitemyapp: also, Fogus linked to this: http://en.wikibooks.org/wiki/Write_Yourself_a_Scheme_in_48_Hours in this twitter thread: https://twitter.com/bodil/status/418037143014227968 ...seemed pretty interesting. |
| 03:25 | ddellacosta | bitemyapp: my goal for tonight is simple breadth-first search in Haskell. I might try it in Clojure too to compare and contrast.. |
| 03:25 | bitemyapp | ddellacosta: laff @ the people recommending RWH and R. jesus christ. |
| 03:26 | TEttinger | ddellacosta, is that dijkstra's algo? |
| 03:26 | bitemyapp | ddellacosta: Write Yourself a Scheme in 48 Hours is how I originally got going with Haskell. It's pretty good but I'd still recommend doing Yann Esposito's tutorial first. |
| 03:27 | bitemyapp | ddellacosta: http://en.m.wikibooks.org/wiki/Haskell this is pretty good too. |
| 03:27 | bitemyapp | the only reason I don't recommend WYaSi48H is it's only fun for a certain sort of person. |
| 03:27 | TEttinger | https://github.com/tommyettinger/dungeon-kingpin/blob/master/src/dk/core.clj#L170-L225 there's some improvements to be made, like the piece of global state I use |
| 03:28 | bitemyapp | and not at all, "to the point" of what makes Haskell different to somebody who has used a Lisp/Scheme before. |
| 03:28 | bitemyapp | that's my opinion though, I'm sure some disagree. |
| 03:28 | ered | i've been meaning to do the yann esposito one |
| 03:28 | TEttinger | I'd like to see your version of a breadth-first search, ddellacosta |
| 03:28 | bitemyapp | ered: it's brief. You should just do it. |
| 03:28 | ddellacosta | bitemyapp: yeah, I'm mostly through learn haskell the hard way, which I've been augmenting with the book you linked too, with occasional forays into "learn you a haskell..." I find that last one kind of overly verbose but there are some good explanations and examples here and there. |
| 03:29 | ddellacosta | TEttinger: okay, will let you know when I'm done! |
| 03:29 | TEttinger | also, mine is in the link, highlighted |
| 03:29 | bitemyapp | ddellacosta: that's exactly how I feel about LYAH. Verbose, but has good explanations - works well as a reference. |
| 03:29 | TEttinger | I'm sure ours will diverge just based on my usage of arrays for performance reasons |
| 03:30 | ered | i just can't get through LYAH |
| 03:30 | ered | it feels way too slow for me |
| 03:30 | ddellacosta | ered: yeah, that was part of my problem too. |
| 03:30 | bitemyapp | ered: that's why I recommend the Esposito tutorial... |
| 03:31 | ddellacosta | ered: conversely, I find the Esposito one to gloss over some things too much at times, but if you augment it it's great--when I need to I just look something up in one of the many other tutorials or references, and it's perfect. |
| 03:32 | bitemyapp | ddellacosta: that's a good way of putting it. Haskell Hard & Fast lays out the map, if you need to zoom in - divert to the other resources temporarily. |
| 03:32 | ddellacosta | yeah, exactly |
| 03:32 | bitemyapp | no reason to plod all the way through LYAH though. It's so stretched thin it's hard to remember what the point of something is. |
| 03:33 | abaranosky | ered: speed reading :) |
| 03:33 | ddellacosta | bitemyapp: yeah. For anyone coming from Clojure (or any other functional language I imagine) it's needlessly verbose. |
| 03:35 | bitemyapp | abaranosky: LYAH is pretty content-sparse, even speed reading isn't enough. |
| 03:35 | bitemyapp | I find people learn Haskell best when they're promptly confronted with what they don't know, and then investigate and probe that thing they don't understand |
| 03:35 | bitemyapp | reading a bunch of stuff they vaguely understand won't go very far. |
| 03:36 | bitemyapp | ddellacosta: now that you've gotten the IoC explanation of monads, I'd like to reel it back and take a more type-oriented approach next time we learn together. |
| 03:36 | ddellacosta | bitemyapp: cool. |
| 03:52 | ddellacosta | TEttinger: I didn't realize you were linking to a graph algo above, cool... |
| 03:53 | TEttinger | haha sorry |
| 03:53 | TEttinger | I use it for pathfinding |
| 03:53 | TEttinger | it actually operates on an array of doubles |
| 03:53 | TEttinger | 1d, emulating 2d |
| 03:54 | abaranosky | testing abaranosky |
| 03:54 | TEttinger | I'm actually going to modify it to find choke points on maps |
| 03:54 | abaranosky | can someone plz mention me? I'm testing my elisp erc hacking :) |
| 03:54 | TEttinger | abaranosky |
| 03:54 | TEttinger | abaranosky: ping ping |
| 03:54 | ddellacosta | abaranosky: it works...? |
| 03:55 | abaranosky | thanks comrades. that helped |
| 03:55 | ddellacosta | TEttinger: cool, will check it out, just learning dijkstra's algorithm now, so very useful. |
| 03:55 | ddellacosta | abaranosky: anyt ime |
| 03:55 | ddellacosta | *any time |
| 03:58 | TEttinger | bitemyapp: learn the story behind the shibe http://www.theverge.com/2013/12/31/5248762/doge-meme-rescue-dog-wow |
| 03:58 | cheesus | ugh |
| 03:59 | cheesus | awful meme |
| 03:59 | TEttinger | such envy. much fan doge. wow. |
| 03:59 | bitemyapp | TEttinger: awesome, thanks :) |
| 04:06 | TEttinger | so is there an equivalent to reset! for transients? |
| 04:06 | TEttinger | I'm rewriting some relatively inefficient atom-based code |
| 04:06 | TEttinger | (yes it's what ddellacosta is reading...) |
| 04:07 | abaranosky | ddellacosta: I think I got my erc notification hook working. :) I'll know if I get you to mention me again. |
| 04:07 | TEttinger | abaranosky! |
| 04:07 | abaranosky | can you put some text in there? |
| 04:07 | TEttinger | any luck, abaranosky? |
| 04:07 | bitemyapp | abaranosky: blahhhhh |
| 04:07 | amalloy | abaranosky, i usually just ask lazybot to mention me if i need to test something |
| 04:07 | abaranosky | nice |
| 04:07 | amalloy | ,'amalloy |
| 04:07 | clojurebot | amalloy |
| 04:08 | TEttinger | ,"abaranosky is the baron of sky" |
| 04:08 | clojurebot | "abaranosky is the baron of sky" |
| 04:08 | ddellacosta | abaranosky: okay. :-) |
| 04:08 | abaranosky | that is very regal sounding |
| 04:11 | TEttinger | so can I use set! |
| 04:16 | sm0ke | how do you compare characters in clojure? ## (filter #(< 'A' % 'B') "AbCdEfGh") ; doesnt works |
| 04:16 | lazybot | java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.Number |
| 04:16 | TEttinger | gah, it isn't reset, it isn't set... |
| 04:17 | TEttinger | '' is not a string or char |
| 04:17 | TEttinger | chars are \A |
| 04:17 | sm0ke | oooh |
| 04:17 | sm0ke | ## (filter #(< \A % \B) "AbCdEfGh") |
| 04:17 | lazybot | java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number |
| 04:18 | TEttinger | what are you trying to do there? |
| 04:18 | TEttinger | that wouldn't find any letters anyway |
| 04:18 | abaranosky | I think you can (int \A) |
| 04:18 | abaranosky | ,(int \A) |
| 04:18 | clojurebot | 65 |
| 04:18 | TEttinger | or compare |
| 04:18 | sm0ke | ## (filter #(< (int \A) % (int \B)) "AbCdEfGh") |
| 04:18 | lazybot | java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number |
| 04:18 | TEttinger | ,(compare \A \C) |
| 04:18 | clojurebot | -2 |
| 04:18 | TEttinger | A comes before C |
| 04:19 | abaranosky | sm0ke: in Clojure < and > only work with numbers |
| 04:19 | TEttinger | int the % as well |
| 04:19 | sm0ke | ## (filter #(< (int \A) % (int \Z)) "AbCdEfGh") |
| 04:19 | lazybot | java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number |
| 04:19 | sm0ke | ## (filter #(< (int \A) (int %) (int \Z)) "AbCdEfGh") |
| 04:19 | TEttinger | ## (filter #(< (int \A) (int %) (int \B)) "AbCdEfGh") |
| 04:19 | lazybot | ⇒ (\C \E \G) |
| 04:19 | lazybot | ⇒ () |
| 04:19 | TEttinger | heyyy |
| 04:19 | sm0ke | ## (filter #(< (int \A) (int %) (int \Z)) "AbCdEfGh") |
| 04:19 | lazybot | ⇒ (\C \E \G) |
| 04:19 | sm0ke | yes!! |
| 04:19 | abaranosky | sm0ke TEttinger I'd use compare over the (int \A) approach. Less wonky imo. |
| 04:19 | TEttinger | yep |
| 04:20 | TEttinger | also, there's .isUpper or a regex |
| 04:20 | sm0ke | yes there is regex |
| 04:20 | sm0ke | but why cant i compare chars! |
| 04:20 | TEttinger | because encoding |
| 04:20 | sm0ke | ,(< "A" "B") |
| 04:20 | clojurebot | #<ClassCastException java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number> |
| 04:21 | TEttinger | some chars are (this is crazy) two ints |
| 04:21 | sm0ke | ,(comapre "A" "B") |
| 04:21 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: comapre in this context, compiling:(NO_SOURCE_PATH:0:0)> |
| 04:21 | sm0ke | ,(compare "A" "B") |
| 04:21 | clojurebot | -1 |
| 04:21 | TEttinger | which is correct, the -1 |
| 04:21 | TEttinger | ,(sort ["A" " " "B"] ) |
| 04:21 | clojurebot | (" " "A" "B") |
| 04:22 | sm0ke | i see no reason why comparing is limited to ints |
| 04:22 | TEttinger | well <> are |
| 04:22 | sm0ke | i mean by < > |
| 04:22 | TEttinger | it is odd. I think it's likely a performance thing |
| 04:22 | sm0ke | how does this doesnt makes sense ? ##(< \A \B \C) |
| 04:22 | lazybot | java.lang.ClassCastException: java.lang.Character cannot be cast to java.lang.Number |
| 04:23 | TEttinger | compare is probably much slower than < for numbers |
| 04:23 | amalloy | you say you see no reason, as if that means there is no reason |
| 04:23 | TEttinger | sm0ke, here's where it gets tricky |
| 04:23 | sm0ke | bleh |
| 04:24 | amalloy | clojure works hard to give you access to the speed and power of the underlying platform |
| 04:24 | sm0ke | i dont think clojures aim is to be the fastest language on planet |
| 04:24 | sm0ke | but rather being expressive |
| 04:24 | amalloy | if < did the slow-slow-slow thing that compare does, numeric algorithms in clojure would be much slower |
| 04:24 | TEttinger | ,\😸 |
| 04:24 | clojurebot | #<RuntimeException java.lang.RuntimeException: Unsupported character: \??> |
| 04:24 | TEttinger | ,"😸" |
| 04:24 | clojurebot | "??" |
| 04:24 | TEttinger | it seems like one char, but clojurebot shows 2 |
| 04:25 | TEttinger | that's part of the whole mess of string comparisons |
| 04:25 | sm0ke | wth! unicode support is something without which a language is usless imo |
| 04:26 | TEttinger | sm0ke, try it on lazybot |
| 04:26 | TEttinger | what's more, some encodings put e with hook accent in the first 256 chars. other put it a thousand+ codepoints later |
| 04:26 | TEttinger | VISCII is still in use |
| 04:27 | TEttinger | &"😸" |
| 04:27 | lazybot | ⇒ "😸" |
| 04:27 | TEttinger | lazybot can handle the unicode, but it won't treat it as one char. because it kinda is kinda isn't |
| 04:27 | TEttinger | &(map int "😸") |
| 04:27 | lazybot | ⇒ (55357 56888) |
| 04:28 | TEttinger | string handling, especially in java's style of unicode, is very very challenging to do right |
| 04:29 | TEttinger | I think clojure's ability to treat strings as special kinds of seqs is the right way |
| 04:29 | TEttinger | however, if you want to do < > comparisons on strings, you can do something like |
| 04:31 | TEttinger | err well actually this method is probably terrible, nvm |
| 04:31 | TEttinger | but it does result in alphabetized order... |
| 04:36 | TEttinger | ,(let [<c #(apply < (mapv int %&))] (filter #(<c \A % \Z) "AbCdEfGh")) |
| 04:36 | clojurebot | (\C \E \G) |
| 04:37 | abaranosky | bitemyapp: I haven't been using my profiles.clj! Reading your setup gave me the kick in the pants to set it up. Should be nice playing with all these libs. |
| 04:38 | TEttinger | oh yeah, my question still stands. bitemyapp, do you know an equivalent to reset! for transients instead of atoms? |
| 04:39 | bitemyapp | abaranosky: :) good! |
| 04:40 | abaranosky | bitemyapp: lein-ancient is a nice convenicen to not have to probe clojars manually |
| 04:40 | bitemyapp | abaranosky: yap. |
| 04:41 | abaranosky | anyone tried troncle? https://github.com/coventry/troncle |
| 04:41 | abaranosky | and does anyone use ritz ? |
| 04:43 | bitemyapp | I talked to coventry about Troncle, it's pretty nice but I still use my Emacs macros. |
| 04:45 | abaranosky | bitemyapp: seems like the kind of thing I use my print-foo library for |
| 04:47 | abaranosky | coventry2: that's annoying troncle.el just sucked down nrepl.el, when I'm on cider |
| 04:49 | TEttinger | I'm just... I have no idea how I should do this. set! and reset! both need things that a transient is not |
| 04:50 | TEttinger | I could maybe use let to rebind it? |
| 04:52 | TEttinger | https://gist.github.com/tommyettinger/8206530#file-gistfile1-clj-L22 this line is what needs changing |
| 04:55 | abaranosky | TEttinger: doseq - https://gist.github.com/tommyettinger/8206530#file-gistfile1-clj-L11 |
| 04:56 | TEttinger | right, this is old code, just looking at that line now, cringed |
| 04:57 | amalloy | TEttinger: a transient is "just" a data structure that is allowed to perform mutation for performance reasons; there are no operations that let you perform mutation on it |
| 04:57 | amalloy | this whole thing looks like a loop/recur on open, instead of this while/mutation malarkey |
| 04:58 | TEttinger | yeah, I should probably do that |
| 04:58 | TEttinger | when I wrote this I didn't really grasp loop/recur |
| 05:11 | TEttinger | amalloy, good eye, I rewrote as a loop and it seems fine |
| 05:16 | amalloy | TEttinger: i don't know what the algorithm is doing, but https://gist.github.com/amalloy/8206664 seems like more or less what you meant. i suspect it's not quite a perfect translation, though - too much meddling in things i don't understand |
| 05:16 | amalloy | happy 2014, by the way, #clojure |
| 05:19 | bitemyapp | amalloy: happy new year! |
| 05:22 | abaranosky | happy new years 2 u as well |
| 05:31 | ddellacosta | amalloy: Happy New Year! |
| 05:36 | TEttinger | amalloy, thank you clojure jeebus. you are the savior of my code. |
| 05:37 | TEttinger | (inc amalloy) |
| 05:37 | lazybot | ⇒ 81 |
| 05:37 | amalloy | i was close then, TEttinger? |
| 05:37 | TEttinger | very |
| 05:37 | TEttinger | there were some references to n that needed to be changed to dir |
| 05:37 | amalloy | ah |
| 05:38 | TEttinger | other than that, it runs faster and seems not to have the issues of "not going where it should" the other version had |
| 05:38 | TEttinger | I'll put it through its paces now |
| 05:38 | amalloy | also the other version didn't work at all? on account of trying to reset! a transient? |
| 05:39 | TEttinger | yeah |
| 05:39 | TEttinger | that's why I highlighted that line |
| 05:39 | TEttinger | I rewrote my own loop/recur |
| 05:39 | TEttinger | that was the other version that was behaving oddly |
| 05:39 | amalloy | oh, the version that you just wrote. right |
| 05:40 | amalloy | incidentally i suspect my version will be more readable if some of the inner lambdas are lifted out and given names. they don't close over anything important iirc |
| 05:42 | TEttinger | and oh well. there's still a logic bug... I think I found an infinite loop |
| 05:56 | TEttinger | oh my god. |
| 05:56 | TEttinger | doing this dijkstra debugging was handy |
| 05:57 | TEttinger | because it let me track down an infinite loop in an unrelated area, related to dungeon re-gen in case of bad generation the first time |
| 05:57 | ddellacosta | TEttinger: nice. |
| 05:57 | TEttinger | it happened so rarely that I thought it was a memory issue or something |
| 05:57 | TEttinger | but I knew that the game would lock up forever on rare occasions |
| 06:53 | Jarda | how do I transform a record to map? |
| 08:13 | gfredericks | (into {} the-rec) |
| 08:15 | hyPiRion | A record is a map of sorts already, though |
| 08:16 | gfredericks | clojurebot: A record is a map of sorts already, though |
| 08:16 | clojurebot | c'est bon! |
| 08:21 | bitemyapp | ddellacosta: do you have a moment? |
| 08:23 | ddellacosta | bitemyapp: sure, what's up? |
| 08:24 | bitemyapp | ddellacosta: want to show you something really clever the type system caught, a mistake I was making. |
| 08:24 | bitemyapp | ddellacosta: I'm going through the course I linked you. |
| 08:53 | daGrevis | ,(= '(1 2 3) `(1 2 ~(+ 1 2))) |
| 08:53 | clojurebot | true |
| 08:53 | daGrevis | just learned about macros. guys, i'm blown-away |
| 08:54 | TEttinger | daGrevis, haha that's a fun snippet |
| 08:55 | TEttinger | &(clojure.string/join " "(repeatedly 2000(fn [](apply str(concat[(rand-nth ["rh""s""z""t""k""ch""n""th""m""p""b""l""g""phth"])](take(+ 2(* 2(rand-int 2)))(interleave(repeatedly #(rand-nth ["a""a""o""e""i""o""au""oi""ou""eo"]))(repeatedly #(rand-nth ["s""p""t""ch""n""m""b""g""st""rst""rt""sp""rk""f""x""sh""ng"]))))[(rand-nth ["os""is""us""um""eum""ium""iam""us""um""es""anes""eros""or""ophon""on""otron"])]))))) |
| 08:55 | lazybot | ⇒ "motus sirstipanes thoutus thaupouxus loufum boicheotiam leoneorkiam thogoitor souspes boustes berstaurstium zamefis koifobeum kaufum morkoushis seomum mouteros larkiam neosaurkanes meopochanes chitium zoumonum mortoirkum baumes tochotron torstauxus choitaufanes soim... https://www.refheap.com/22367 |
| 09:02 | mnvesdfkl20 | Hi everyone. I have a question about db connections, does having too many open MongoDB(with the monger lib) lead to too much memory usage? I'm running 3 processes 1."lein ring server" 2."lein repl" and 3."lein cljsbuild auto" and my computer slows to a crawl |
| 09:03 | mnvesdfkl20 | * mongodb connections |
| 09:04 | mullr | mnvesdfkl20: I know nothing about mongodb, but I'd start by firing up JVisualVM to see what's going on and go from there |
| 09:08 | mnvesdfkl20 | mullr: thanks for the pointer, i'll see what JVisualVM shows |
| 09:08 | shock_one | Hi. Is there a way to put a macro inside another macro call and have the inner one expanded first? Like (macro arg (inner-macro-expanded-first)) |
| 09:27 | blackbear | ? |
| 09:28 | blackbear | exit |
| 09:28 | blackbear | quit |
| 09:33 | justin_smith | I was going to thell shock_one yeah that is how macros work, but he is gone |
| 09:48 | mnvesdfkl20 | mullr: it looks like there's no problem having too many connections. it looks likekons 'lein cljsbuild auto' |
| 09:50 | mnvesdfkl20 | ,might be the problem, it starts multiple processes |
| 09:50 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: might in this context, compiling:(NO_SOURCE_PATH:0:0)> |
| 09:53 | dimsuz | hey guys. still learining, I can't understand why this code gives 'wrong number of arguments (2) to assoc', can anyone explain? docs say that swap will do 'apply f atom args', so it should be ok, why it isnt? :) http://pastebin.com/iwLHbfKn |
| 09:55 | AimHere | dimsuz, when you pass a variable parameter in like [& args] then args is mapped to a list of all the arguments |
| 09:56 | AimHere | So you have (assoc atom args) when what you want is (assoc atom arg1 arg2) |
| 09:58 | AimHere | There's a few ways of dealing with it, One obvious way is to replace assoc with something like #(assoc %1 (first %2) (first %3)) but there are likely neater ways still of doing that |
| 09:58 | dimsuz | AimHere: ah, so 'args' is list. apply expects a vector there and would work (just checked). any way I could convert or unroll that 'args' list? :) |
| 09:59 | dimsuz | yeah, i would like to find a solution which does not rely on how many items is in 'args' |
| 10:00 | gfredericks | dimsuz: you want (apply swap! state assoc args) |
| 10:01 | mnvesdfkl20 | mullr: after some experimentation, iv'e found that there's nothing wrong with the processes, only that I need to upgrade my ram, courtesy the jvm |
| 10:02 | AimHere | gfredericks, does apply take more than two arguments? |
| 10:02 | dimsuz | gfredericks: hurray. thanks! that thought floated around, but never touched my mind fully :) |
| 10:08 | Fatalnix | Anyone happen to know how I would implement the annotations provided here: http://pastebin.com/n5qKKHxL into clojure? |
| 10:10 | nmeum | is it possible to execute a function n times? |
| 10:11 | nmeum | or to be more specific: I want to read from stdin n times using (read) and get the result as a list |
| 10:13 | lumafi | ,(doc repeatedly) |
| 10:13 | clojurebot | "([f] [n f]); Takes a function of no args, presumably with side effects, and returns an infinite (or length n if supplied) lazy sequence of calls to it" |
| 10:16 | nmeum | thanks |
| 10:21 | gfredericks | AimHere: sure does; works great for cases like this one :) |
| 10:32 | gfredericks | ,(* 2 19 53) |
| 10:32 | clojurebot | 2014 |
| 11:10 | logic_prog | is there anyway to write an OSX (desktop, not ipad) app in javascript/HTML, using Chrome (rather than safari) as the browser? |
| 11:12 | logic_prog | wrong channel |
| 11:12 | logic_prog | sorry |
| 11:22 | dnolen | logic_prog: have you seen node-webkit? |
| 11:22 | logic_prog | dnolen: no |
| 11:22 | logic_prog | can I build things that go into the mac app store with node-webkit ? |
| 11:26 | dnolen | logic_prog: no idea, I would look around there's a mailing list |
| 11:26 | logic_prog | dnolen: yeah, https://groups.google.com/forum/#!topic/node-webkit/qP_x9Z0lEO4 seems to suggest "it's doable" |
| 11:27 | masondesu | happy new year, all |
| 11:43 | daGrevis | ,(vec nil) |
| 11:43 | clojurebot | [] |
| 11:43 | daGrevis | ,(vec nil nil) |
| 11:43 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: core/vec> |
| 11:43 | daGrevis | ,(vec '(nil)) |
| 11:43 | clojurebot | [nil] |
| 12:03 | augustl | semi on-topic.. Anyone know if there are any C implementations of persistent vectors, sets, hashmaps, etc? |
| 12:06 | levinm | I have [vlad "1.1.0"] in my project.clj. (https://github.com/logaan/vlad). I interpret the documentation at github to say vlad.core is what I should (require). When I do: (require 'vlad.core), I get "FileNotFoundException Could not locate vlad/core__init.class...". However if I do (require 'vlad) that works. Is documentation wrong or am I using it wrong? |
| 12:06 | Bodil | augustl: https://github.com/chaelim/HAMT if C++ counts. |
| 12:12 | jkax | I'm trying to extend clojure vectors to build a richer datatype and I find myself writing lots of boilerplate implemenations of the protocols vector already supports. Is there a way to inherit? |
| 12:25 | augustl | Bodil: guess it does, tnx :) |
| 12:30 | ToxicFrog | Argh what the hell is this |
| 12:30 | ToxicFrog | lein run --a --bunch --of --arguments: works perfectly |
| 12:30 | ToxicFrog | lein clean && lein uberjar |
| 12:30 | ToxicFrog | java -jar target/...jar --a --bunch --of --arguments: silently does nothing |
| 12:31 | philll | Do the lein profiles specify different 'main' classes? |
| 12:31 | ToxicFrog | I have no profiles, just a single :main entry |
| 12:31 | ToxicFrog | Also, it looks like some of the features work in the jar |
| 12:32 | ToxicFrog | But this specific one does nothing |
| 12:33 | ToxicFrog | No error messages or anything, just exits with no output |
| 12:33 | ToxicFrog | I am baffles |
| 12:34 | justin_smith | ToxicFrog: does lein run with the production profile work? |
| 12:34 | ToxicFrog | I'm not sure if I should be blaming lein or java or my code here |
| 12:34 | ToxicFrog | justin_smith: how do I check that? I've never used lein profiles for anything. |
| 12:34 | justin_smith | it could be something does not work without your dev dependencies |
| 12:34 | justin_smith | lein with-profile ... |
| 12:34 | ToxicFrog | I don't have seperate dev and production dependencies, just :dependencies |
| 12:35 | justin_smith | lein profile -dev run --arg --arg |
| 12:35 | justin_smith | no dev profile in your profiles.clj? |
| 12:35 | justin_smith | make that lein with-profile above of course |
| 12:35 | ToxicFrog | Where would I find profiles.clj? There's none in the project directory. |
| 12:36 | justin_smith | it is your universal profile for lein projects ~/.lein/profiles.clj |
| 12:36 | ToxicFrog | Aha. |
| 12:36 | justin_smith | usually used for things that you want in every repl but not in projects |
| 12:36 | ToxicFrog | No profiles, just the lein-droid plugin. |
| 12:36 | ToxicFrog | lein with-profile -dev run ... says "performing task 'run' with profile 'default'" and then works fine. |
| 12:36 | justin_smith | try lein with-profile -dev run ... |
| 12:37 | justin_smith | oh o |
| 12:37 | justin_smith | k |
| 12:37 | ToxicFrog | Maybe I should see if there's a more recent lein before spending too much time on this. |
| 12:41 | ToxicFrog | Latest lein. It's still not working. |
| 12:42 | justin_smith | is -main starting a bunch of agents or threads? |
| 12:42 | ToxicFrog | No. Singlethreaded program. |
| 12:46 | ToxicFrog | Hmm |
| 12:46 | ToxicFrog | Upon further investigation, it's generating the right output files |
| 12:46 | ToxicFrog | What it's not doing is generating any sort of terminal output |
| 12:55 | ToxicFrog | Aha! |
| 12:55 | ToxicFrog | justin_smith: so, in the uberjar, (println) works, (printf) does not. |
| 12:55 | justin_smith | weird |
| 12:57 | justin_smith | try adding calls to (flush) |
| 12:58 | justin_smith | println calls prn which calls flush |
| 12:58 | justin_smith | printf calls print, which calls pr, which does not call flush |
| 13:04 | ToxicFrog | justin_smith: all the printfs end with \n, I'm used to this stuff being line buffered |
| 13:05 | ToxicFrog | I have had issues in the past with stuff on the JVM not flushing when it should (or in some cases not flushing at all ever and the buffers being silently discarded at program exit!) |
| 13:06 | lsdafjklsd | is there something in clojure where I want a namespace to export just 1 function, and it is imported automatically when I require it? Like (:require [app.header :as header]), and then in my code I can run the fn like (header) ? |
| 13:07 | justin_smith | absolutely not |
| 13:07 | philll | but (:require [app.header :refer [header]]) |
| 13:08 | hyPiRion | lsdafjklsd: what do you mean by "imported automatically"? |
| 13:08 | justin_smith | lsdafjklsd: one of the central ideas behind namespaces is that you don't get anything inserted into the requiring namespace that you did not explicitly ask for in the requiring namespace |
| 13:09 | hyPiRion | you could probably do (:require [app.header :refer [my-func] :rename {my-func header}]), but I'm not sure what it would give you |
| 13:09 | lsdafjklsd | hyPiRion: Just thinking of node.js where I can export one function and require it like 'header = require('./header')' |
| 13:09 | hyPiRion | Hm, not used node.js, so I'm not sure if there's any equivalent in Clojure |
| 13:10 | lsdafjklsd | it's no biggie, was just wondering. |
| 13:10 | lsdafjklsd | thanks :) |
| 13:10 | ToxicFrog | justin_smith: ok, if I explicitly (flush) just before program exit, all the output appears. |
| 13:10 | justin_smith | ToxicFrog: cool |
| 13:11 | justin_smith | ToxicFrog: for future reference I figured it out by looking at (source printf) (source println) and then looking at source of the things they each called |
| 13:13 | ToxicFrog | justin_smith: it looks like System.out can be created either with autoflushing enabled or disabled. I wonder if 'lein' creates it with it enabled and 'java' creates it with it disabled or something. |
| 13:14 | pyrtsa | ,(doc *flush-on-newline*) |
| 13:14 | clojurebot | "; When set to true, output will be flushed whenever a newline is printed. Defaults to true." |
| 13:15 | justin_smith | pyrtsa: that is used by prn |
| 13:15 | justin_smith | but it is not even referenced by pr |
| 13:15 | justin_smith | so printf does not hit that var |
| 13:15 | pyrtsa | Ah, right. So printf ignores it. Never mind. :) |
| 13:17 | ToxicFrog | Blargh. |
| 13:17 | ToxicFrog | I'm going to have to wrap printf or something. |
| 13:18 | ToxicFrog | I do want these messages flushed as soon as they're written, since they're progress reports for a long-running operation |
| 13:19 | pyrtsa | Why not just something like (defn writef [& args] (apply printf args) (flush))? |
| 13:19 | ToxicFrog | Well, yes, that's what I'm going to end up doing most likely |
| 13:19 | ToxicFrog | A shame that it's necessary, though |
| 13:20 | pyrtsa | I'd say buffering by default is a win in the bigger perspective. It's not always that you want to flush every 30 characters or so. |
| 13:21 | ToxicFrog | Historically, the behaviour for stuff connected to a terminal has been to line buffer |
| 13:22 | ToxicFrog | Aggravatingly, the autoflush property on System.out can only be set at creation time |
| 13:37 | jajaja | Newb question. What is approx. JVM memory footprint for a basic Clojure web app? |
| 13:37 | jajaja | Single-threaded |
| 13:45 | seangrove | dnolen: Working with om, few questions. Typically, where should om/transact!, om/update! happen? Also, does it matter if the initial app-state is passed in as an atom or an immutable data-structure? It seems both are wrapped in a Cursor anyway. |
| 13:50 | dnolen | seangrove: if you give om.core/root an atom then you can build multiple React root components off it that will stay in sync. |
| 13:50 | dnolen | seangrove: om.core/transact! and om.core/update! should generally be called from event handlers, i.e. stuff outside the render phase. |
| 13:50 | dnolen | seangrove: updating the app-state from inside the render phrase doesn't make sense |
| 13:53 | seangrove | dnolen: And it loots like (om/set-state! owner :key val) doesn't immediately set the state - it's presumably slated as a pending state value? |
| 13:54 | dnolen | seangrove: yes existing issue for that, there should be a way to read the pending state. |
| 13:55 | seangrove | dnolen: So when you set :comm here https://github.com/swannodette/todomvc/blob/gh-pages/labs/architecture-examples/om/src/todomvc/app.cljs#L133, will render see it on the first render call here https://github.com/swannodette/todomvc/blob/gh-pages/labs/architecture-examples/om/src/todomvc/app.cljs#L152 ? |
| 13:56 | dnolen | seangrove: yes because that's done before IWillUpdate when pending state gets merged in |
| 13:56 | dnolen | seangrove: I really recommend just reading the source for Pure in om.core |
| 13:57 | dnolen | seangrove: there's not much there and it clarifies when things happen. |
| 13:57 | seangrove | dnolen: I have several tabs open on the om source, definitely going through it |
| 13:57 | seangrove | I'll check out Pure specifically |
| 13:59 | bitemyapp | seangrove: exciting stuff eh? |
| 13:59 | seangrove | bitemyapp: Yeah, has a lot of potential |
| 14:00 | bitemyapp | seangrove: I'm neck-deep in some Haskell. Been thinking about tinkering with a Fay wrapper for React if I find occasion to do frontend. |
| 14:00 | seangrove | Wow, that could be pretty cool indeed |
| 14:07 | bitemyapp | seangrove: of particular interest to me is that registering callbacks could be respun as monadic binds. |
| 14:07 | bitemyapp | seangrove: http://www.yesodweb.com/blog/2012/10/yesod-fay-js Skip down to the Fay section. |
| 14:07 | bitemyapp | Purdy *_* |
| 14:32 | gfredericks | I did not know about this new clojure.api.API |
| 14:40 | justin_smith | gfredericks: got a link? not finding it in the github repo for clojure/clojure |
| 14:40 | justin_smith | never mind, just found it |
| 14:41 | gfredericks | justin_smith: I was reading the 1.6 changelog, which has a lot of examples |
| 14:41 | justin_smith | cool, yeah, I should have expected it to be a java file |
| 15:19 | gfredericks | ,(map #(/ 1.0 %) [0.0 -0.0]) |
| 15:19 | clojurebot | (Infinity -Infinity) |
| 15:43 | coventry | What should I read to get a rough idea of what an om cursor represents? |
| 15:44 | seangrove | coventry: Best I can tell, this line: https://github.com/swannodette/om/blob/master/src/om/core.cljs#L274 |
| 15:47 | coventry | Thanks, so roughly speaking it's the DOM tree and a pointer to a path down that tree? |
| 15:48 | coventry | s/a pointer to// I guess. |
| 16:31 | seangrove | dnolen: https://github.com/swannodette/todomvc/blob/gh-pages/labs/architecture-examples/om/src/todomvc/app.cljs#L128 app should be a MapCursor, but will todos just be a normal vector, or a vector wrapped in a cursor as well? |
| 16:34 | pandeiro | i tried to output marginalia docs for om today, didn't work, but fortunately the fix was easy |
| 16:34 | pandeiro | i sent in a pr; hopefully om will be `lein marg`able soon, b/c the src is well documented |
| 16:57 | theseb | does targeting the JVM automatically solve the age old problem of new languages not having decent documented libraries?...seems that's a HUGE advantage for clojure and scala |
| 16:58 | justin_smith | theseb: interop is so easy that we have a huge number of documented libraries, that are written in java |
| 16:59 | theseb | justin_smith: is it so transparent that they appear to be written in clojure? if so that is amazing...the only downside i can see is you are forced to have all same APIs as Java stdlib....assuming that is pretty good clojure is all set |
| 17:00 | lsdafjklsd | dnolen: hey man, I'm trying to get routing to work with secretary, but the route only fires on page load, not when the hash changes but I can't figure out why... Following the code on todo MVC, does anything stand out? https://gist.github.com/lsdafjklsd/8211908 |
| 17:00 | justin_smith | theseb: no, they don't appear to be written in clojure, but they are very easy to use from clojure |
| 17:01 | justin_smith | ,(.length "hello") |
| 17:01 | theseb | justin_smith: thanks..is there no way to somehow wrap the java libraries so they appear to be clojure libraries? |
| 17:01 | clojurebot | 5 |
| 17:01 | justin_smith | theseb: if you really want to, usually there is no need |
| 17:01 | justin_smith | but it is done |
| 17:01 | justin_smith | ,(Object.) |
| 17:01 | clojurebot | #<Object java.lang.Object@1d6aae> |
| 17:02 | justin_smith | interop is mostly very easy |
| 17:02 | theseb | justin_smith: ok thanks |
| 17:04 | danlentz | Does AutoDoc actually still work? Is there a current howto that might help me get it going? |
| 17:06 | danlentz | or, more specifically, does anyone have any pointers on the errer Error: Could not find or load main class autodoc.autodoc |
| 17:06 | danlentz | is it something I'm being stiupid not to know? |
| 17:07 | justin_smith | danlentz: how are you resolving the autodoc dependency? |
| 17:07 | danlentz | well i did mvn install |
| 17:07 | danlentz | is that not the weay? |
| 17:07 | justin_smith | OK, how did you tell clojure where that was? |
| 17:08 | danlentz | clearly not i guess |
| 17:08 | justin_smith | are you using lein? I think you should be if you aren't |
| 17:08 | danlentz | yes i normally do |
| 17:08 | justin_smith | if so, you can add autodoc as a dep in project.clj, and lein takes care of the rest |
| 17:08 | danlentz | so lein autodoc should do it? |
| 17:08 | justin_smith | mvn install makes things available to lein without a download, but does not automatically make them visible to a project |
| 17:08 | justin_smith | no |
| 17:09 | justin_smith | you add autodoc to your dependencies |
| 17:09 | danlentz | ok |
| 17:09 | danlentz | figured it was something stupid |
| 17:09 | danlentz | thks |
| 17:09 | justin_smith | not stupid, it is a common entry level mistake |
| 17:10 | justin_smith | other languages don't handle dependencies / libraries the way clojure does, nothing to be ashamed of not knowing |
| 17:10 | danlentz | y there every so often occurs a situation where it would be quite helpful if I had better Java exp |
| 17:12 | gdev | danlentz, that may be true, but the tradeoff is you would've had to spend all that time using Java =/ |
| 17:12 | gdev | stubbing your toes every now and then is way less painful than trying to get Java exp |
| 17:13 | justin_smith | danlentz: looking again, you should be able to use autodoc as a standalone |
| 17:13 | justin_smith | danlentz: I thought it was a library you would use in your project, but it looks more like a tool you run against your repo |
| 17:14 | justin_smith | http://tomfaulhaber.github.io/autodoc/ Now I see |
| 17:14 | justin_smith | go to the above link, search for lein-autodoc |
| 17:14 | justin_smith | it shows how to get the lein-autodoc plugin and run it |
| 17:34 | lsdafjklsd | anyone else run into issues with clojure.browser.repl breaking client side routing? |
| 17:38 | pandeiro | lsdafjklsd: i was having issues w/ that too, didn't investigate yet |
| 17:38 | pandeiro | seems weird that browser.repl would interfere though |
| 17:38 | lsdafjklsd | yea, im debating weather to open an issue on austin |
| 17:38 | lsdafjklsd | trying vanilla js |
| 17:39 | lsdafjklsd | instead of the good history |
| 17:39 | pandeiro | lsdafjklsd: do you know where to find externs for react 0.8.0? |
| 17:41 | lsdafjklsd | pandeiro: hmm no I had them at some point... just working with no optimization |
| 17:43 | lsdafjklsd | pandeiro: actually, just go to the .m2 directory |
| 17:44 | lsdafjklsd | pandeiro: com/facebook and unzip the jar, there is an externs file in there |
| 17:44 | marcopolo` | anyone have any jclouds experience? I think it's silly I need core.incubator to run one of their examples |
| 17:45 | marcopolo` | lsdafjklsd: what browser are you using? |
| 17:45 | lsdafjklsd | marcopolo`: chrome |
| 17:45 | marcopolo` | lsdafjklsd: do you have a minimal project that reproduces that? |
| 17:45 | marcopolo` | I wonder why that would happen |
| 17:45 | marcopolo` | does it happen in ff? |
| 17:46 | lsdafjklsd | marcopolo`: I'm not sure, does austin work with FF? |
| 17:46 | lsdafjklsd | marcopolo`: I can put the thing im working on in git if you're curious |
| 17:48 | pandeiro | lsdafjklsd: nice one thanks |
| 17:48 | danlentz | justin_smith: got it. much appreciated |
| 17:48 | pandeiro | i noticed om is pulling react in as a jar, but the examples don't use it... |
| 17:48 | justin_smith | danlentz: cool |
| 17:49 | marcopolo` | lsdafjklsd: It should work with ff; I've always had better luck with the brepl on ff |
| 17:49 | marcopolo` | pandeiro: Om, I believe, is built on top of react |
| 17:50 | lsdafjklsd | marcopolo`: here is the code if you want to take a quick look https://github.com/lsdafjklsd/puree |
| 17:50 | lsdafjklsd | marcopolo`: it's basically nothing except a playground |
| 17:50 | lsdafjklsd | how do I use it with FF? |
| 17:51 | lsdafjklsd | I'd much rather develop in chrome though :( |
| 17:52 | pandeiro | lsdafjklsd: where are you connecting in your cljs code? |
| 17:53 | lsdafjklsd | pandeiro: huh? |
| 17:53 | pandeiro | you pulled clojure.browser.repl into your core ns right? |
| 17:53 | lsdafjklsd | ya |
| 17:53 | lsdafjklsd | in src/cljs |
| 17:53 | pandeiro | right, and where are you connecting? |
| 17:54 | lsdafjklsd | well, some work get's done in src/clj/puree.core |
| 17:54 | lsdafjklsd | then I launch lein repl, (run) |
| 17:54 | juxovec | hi there, I have a dilemma. I develop small library usable in 2 projects. now I sync source codes between projects. of course it would be much better to put clojar to project.clj file. but how can I edit source code of my shared library directly in project folder? |
| 17:54 | pandeiro | you need to (clojure.browser.repl/connect "http://localhost:9000/repl") somewhere, is what i am saying |
| 17:54 | marcopolo` | pandeiro: austin is being injected in src/clj/puree.core |
| 17:55 | lsdafjklsd | ty marc |
| 17:55 | marcopolo` | pandeiro: here: https://github.com/lsdafjklsd/puree/blob/master/src/clj/puree/core.clj#L18 |
| 17:55 | pandeiro | lsdafjklsd: (the above sexp is cljs, obviously) |
| 17:55 | pandeiro | cljs |
| 17:55 | pandeiro | the client needs to connect to the browser repl server |
| 17:56 | lsdafjklsd | yea, enlive appends the script tag in the index.html |
| 17:56 | lsdafjklsd | (enlive/html [:script (browser-connected-repl-js)]) |
| 17:56 | marcopolo` | juxovec: I think lein checkouts might be what you are looking for |
| 17:57 | juxovec | thanks I will check it out :) |
| 17:57 | lsdafjklsd | pandeiro: is this not how you do it? |
| 17:57 | lsdafjklsd | pandeiro: I just followed the austin example |
| 17:57 | marcopolo` | lsdafjklsd: That's how you would normally do it without austing |
| 17:58 | marcopolo` | you can still do it that way, but austin changes ports more frequently. So you'd have to update your code accordingly |
| 17:58 | marcopolo` | I'm not a fan of having a webserver just to tell the client how to connect to the brepl though :/ |
| 17:58 | pandeiro | lsdafjklsd: sorry i don't know austin, i just normally connect manually in the cljs code itself |
| 17:58 | pandeiro | it seems like what you are doing would work, if austin is set up correctly |
| 17:59 | pandeiro | does it make the xhr request to localhost:9000/repl? in the browser console? |
| 17:59 | marcopolo` | lsdafjklsd: have you been able to connect to the brepl at all? |
| 17:59 | lsdafjklsd | yea it all works fine |
| 17:59 | lsdafjklsd | just breaks routing |
| 18:00 | lsdafjklsd | https://github.com/cemerick/austin/tree/master/browser-connected-repl-sample |
| 18:00 | lsdafjklsd | I just modified this... :P |
| 18:03 | marcopolo` | so routing works without the brepl? |
| 18:07 | lsdafjklsd | yea when I comment out [clojure.browser.repl] it all works |
| 18:09 | marcopolo` | I don't think you need to require clojure.browser.repl, do you? |
| 18:13 | lsdafjklsd | yea, but I don tknow why |
| 18:13 | lsdafjklsd | what's this I hear about CLJS having it's own brepl? |
| 18:13 | lsdafjklsd | is austin even necessary |
| 18:13 | coventry | Is `(swap! state# #(~f % ~@args)) faster in clojurescript than `(swap! state# ~f ~@args)? (Wondering about this: https://github.com/swannodette/om/blob/master/src/om/core.clj#L40) |
| 18:16 | bbloom | coventry: 1) i wouldn't assume that's intentional |
| 18:18 | bbloom | coventry: 2) the presence of the function actually changes the semantics of that macro slightly... if the path is empty, then the args will be evaluated during the swap, rather than before it. which probably doesn't matter in cljs, b/c there are no threads to synchronize atoms with, nor any reason to retry a swap or anything like that |
| 18:20 | coventry | Ah, OK. Thanks. |
| 18:20 | pandeiro | lsdafjklsd: i don't think you need to worry about austin if you just use `lein trampoline cljsbuild repl-listen` and then include clojure.browser.repl/connect call somewhere in your cljs |
| 18:20 | lsdafjklsd | pandeiro: cool, i'll look into that |
| 18:21 | pandeiro | lsdafjklsd: fwict using austin would be mostly if you wanted to connect to the browser repl via nrepl |
| 18:22 | pandeiro | which did not work in the original browser repl |
| 18:22 | lsdafjklsd | pandeiro: the pro there being editor support? |
| 18:22 | lsdafjklsd | pandeiro: I just use the repl from the command line |
| 18:27 | justin_smith | lsdafjklsd: how barbaric! I bet you eat with your hands too |
| 18:27 | justin_smith | :) |
| 18:27 | lsdafjklsd | holy crap |
| 18:27 | lsdafjklsd | lol |
| 18:28 | justin_smith | just kidding |
| 18:28 | lsdafjklsd | I know, I laughed haha |
| 18:28 | lsdafjklsd | need to look into fireside though |
| 18:28 | lsdafjklsd | fireplace* |
| 18:30 | coventry | Wow the om todomvc git repository is enormous (33 MB). |
| 18:32 | pandeiro | lsdafjklsd: yeah basically editor support imo; dunno, maybe there are other reasons |
| 18:33 | marcopolo` | fireside sounds a little nicer |
| 18:34 | marcopolo` | come, sit, let's chat for a bit... fireside |
| 18:34 | justin_smith | marcopolo`: do you know the history of the name? |
| 18:35 | justin_smith | https://github.com/tpope/vim-foreplay |
| 18:37 | coventry | Where should I look to understand clojurescript's #js? I roughly get what it's doing, just want to nail it down. |
| 18:38 | pandeiro | coventry: cljs.tagged-literals |
| 18:38 | coventry | pandeiro: Thanks. |
| 18:39 | pandeiro | np |
| 19:18 | marcopolo` | justin_smith: yeah :) |
| 19:19 | rads | dnolen: with the new om that has the cursor checks in it, is it possible to pass a child map from a cursor to an event handler as raw data, not a cursor? |
| 19:20 | rads | before the update I had a child map that would change as a whole, so there's no need for it to throw an error when checking one of its properties. it seems like the simplest workaround would be to make a new defrecord for the child |
| 19:25 | rads | looks like (into {} cursor) works as long as the map is only one level |
| 19:40 | rads | my workaround using a defrecord instead of a regular map doesn't work since (map? (MyRecord.)) is true |
| 19:43 | rads | it seems like there should be a way to say "this is an opaque data structure, not part of the reactive stuff", otherwise you have to create new maps every time you want to use the data structure stored as part of the ui state |
| 20:28 | necronian | lmao |
| 20:53 | devn | hi everyone |
| 20:55 | justin_smith | hello |
| 21:00 | jleclanche | any advice on a good clojure book for someone with a strong python/lua/c++ background? |
| 21:00 | justin_smith | the orielly clojure programming book |
| 21:00 | justin_smith | http://shop.oreilly.com/product/0636920013754.do |
| 21:01 | jleclanche | aight |
| 21:07 | devn | jleclanche: you can also check out tbaldridge's https://github.com/halgari/clojure-py |
| 21:07 | devn | it's not a book, just source, but it might help you reason about the more java-ey things |
| 21:10 | coventry | Do you know anyone who's taken that approach to learning clojure? It sounds really inefficient. |
| 21:13 | seangrove | coventry: Yeah, I think the traditional 4clojure/hack on projects is probably a better way to go |
| 21:16 | akurilin | Man, does anybody else miss a composable if statement in other languages? |
| 21:17 | akurilin | Feeling pretty spoiled by clojure. |
| 21:17 | justin_smith | akurilin: clearly because what they wanted was a composible if *expression |
| 21:18 | justin_smith | and they don't understand expressions I guess? |
| 21:19 | coventry | A lot of languages have ternary expressions, which is what I think of when I think about the composability of (if). http://en.wikipedia.org/wiki/%3F: |
| 21:19 | akurilin | It's surprisingly hard to imagine a better world if you've never got a taste of something like Clojure |
| 21:21 | akurilin | coventry: that's true, I guess that covers 80% of the cases where you need only two branches. |
| 21:22 | akurilin | I think you should be able to compose the ternary operator arbitrarily deep, not that it would be at all readable. |
| 21:24 | devn | coventry: are you talking to me? |
| 21:24 | coventry | I was, yeah. |
| 21:24 | devn | RE: "anyone who has taken that approach" |
| 21:25 | devn | i have used things like that to help me here and there. i didn't have a lot of java experience. i remember feeling like reading clojure-py was a little bit easier for me to grok initially |
| 21:26 | devn | actually what i should say is that, when it came around, it was a nice way for me to A/B between java and python. having an additional perspective was nice. same thing goes for clojurescript. |
| 21:27 | devn | different perspectives, implementations, not always feature complete, but at least another way of looking at what is /mostly/ the same thing |
| 21:28 | devn | coventry: so to answer your question, i don't know anyone who has picked up clojure-py alone, but it is enlightening and a fair bit better to read than Java |
| 21:28 | devn | clojure by using clojure-py* |
| 21:28 | coventry | Oh, I bet it's better than reading the clojure java sources, yeah. :-) |
| 21:29 | coventry | (Actually, they're not hard to read, just messily formatted.) |
| 21:37 | bitemyapp | akurilin: I miss being able to write conditions without macros when I use Clojure :P |
| 21:38 | bitemyapp | conditionals* |
| 21:43 | ksaua | Is there a function that takes n sequences which are all m long and returns m sequences which are n long where the first sequence contains the first elements from each sequence? (this-func [1 2 3] [4 5 6] [7 8 9]) => [[1 4 7] [2 5 8] [3 6 9]] ? |
| 21:43 | mullr | ksaua: like a matrix transpose? |
| 21:44 | ksaua | sure, that'd work |
| 21:44 | mullr | don't know if it would work, but http://stackoverflow.com/questions/10347315/matrix-transposition-in-clojure |
| 21:44 | justin_smith | ,(map vector [1 2 3] [4 5 6] [7 8 9]) |
| 21:44 | clojurebot | ([1 4 7] [2 5 8] [3 6 9]) |
| 21:44 | justin_smith | ,(mapv vector [1 2 3] [4 5 6] [7 8 9]) |
| 21:44 | clojurebot | [[1 4 7] [2 5 8] [3 6 9]] |
| 21:45 | ksaua | nice, thanks, that works |
| 21:45 | justin_smith | (the latter if you needed the enclosing thing to be a non-lazy vector too) |
| 21:48 | akurilin | bitemyapp: please explain. |
| 22:10 | bitemyapp | akurilin: non-strict languages eliminate the necessity of macros where you just want a function that doesn't force eval of its arguments. |
| 22:11 | bitemyapp | $seen noprompt |
| 22:11 | lazybot | noprompt was last seen quitting 5 days and 18 hours ago. |
| 22:24 | arrdem | bitemyapp: http://i.imgur.com/KNltlZW.jpg |
| 22:34 | bitemyapp | arrdem: :) |
| 22:34 | coventry | "Stay testy, my friends." |
| 22:35 | bitemyapp | (inc coventry) |
| 22:35 | lazybot | ⇒ 6 |
| 22:35 | bitemyapp | arrdem: cntext> |
| 22:36 | zerokarmaleft | how are constructors for static inner classes invoked via interop? |
| 22:37 | zerokarmaleft | (SomeClass$InnerClass. args)? |
| 22:41 | coventry | zerokarmaleft: http://stackoverflow.com/a/7140967/1941213 |
| 22:43 | zerokarmaleft | coventry: thanks, that covers it |
| 22:46 | arrdem | bitemyapp: writing tests for my processor simulators |
| 22:46 | TEttinger | $karma zerokarmaleft |
| 22:46 | lazybot | zerokarmaleft has karma 0. |
| 22:46 | TEttinger | indeed |
| 22:46 | arrdem | bitemyapp: the single cycle simulator is blatantly correct, but the other more interesting sims (some of which I still have to write) have interesting internal issues |
| 22:52 | akurilin | bitemyapp: ah interesting, never heard that term before, had to wikipedia for it. |
| 22:52 | akurilin | bitemyapp: does that actually make a big difference in practice in everyday work? I don't quite know how to relate to that since I've never worked in that paradigm. |
| 22:55 | marcopolo` | (karma zerokarmaleft) |
| 22:56 | justin_smith | $karma zerokarmaleft |
| 22:56 | lazybot | zerokarmaleft has karma 0. |
| 22:56 | marcopolo` | (inc zerokarmaleft) |
| 22:56 | lazybot | ⇒ 1 |
| 22:56 | marcopolo` | not anymore :P |
| 22:57 | arrdem | (dec zerokarmaleft) ;; ballance must be maintained |
| 22:57 | lazybot | ⇒ 0 |
| 23:00 | bitemyapp | akurilin: non-strictness makes me so happy on a regular basis. and TCO. |
| 23:01 | bitemyapp | akurilin: about half of the Haskellers I know would react to a "Haskell goes strict" announcement by hoisting the black flag and slitting throats. |
| 23:02 | akurilin | Interesting. |
| 23:02 | coventry | I had no idea Haskellers could be such a nasty bunch. :-) |
| 23:02 | akurilin | Every interesting tech person I know seems to either already know Haskell or has had Haskell on their todo list for a while :P |
| 23:03 | arrdem | bitemyapp: haha haskell mod lazy would be just a typechecked lisp :/ |
| 23:04 | bitemyapp | arrdem: it'd be better than that you bastard. |
| 23:05 | arrdem | bitemyapp: still not doing work? it's duck dynasty time again and I'm hiding |
| 23:05 | bitemyapp | arrdem: frick. |
| 23:05 | bitemyapp | arrdem: doters? |
| 23:05 | arrdem | bitemyapp: anything that isn't this :P |
| 23:05 | bitemyapp | Okay. |
| 23:08 | devn | haskellites |
| 23:10 | devn | i love 'em, but i grow tired. typed urls! yeah! the solution to all of my problems! |
| 23:10 | gtrak | the hindley-milner internet |
| 23:11 | seancorfield | hmm, who did a presentation recently that said H-M was one of the worst things ever? |
| 23:12 | scottj | seancorfield: gilad bracha |
| 23:12 | seancorfield | ah yes, that was it! |
| 23:14 | coventry | The only possible explanation for that is that he's a willful ignoramus with no understanding of programming language design. :-) |
| 23:15 | danlentz | somebody talking about me? :) |
| 23:16 | seancorfield | "Deconstructing Functional Programming"... that was the talk... |
| 23:16 | seancorfield | http://www.infoq.com/presentations/functional-pros-cons |
| 23:17 | danlentz | because anyone can see i'm not a will full ignoramus. i am just an ignoramus byn default |
| 23:21 | danlentz | is anyone aware of a means to limit the scope ofautodoc to only a set of public api? |
| 23:21 | danlentz | or at least separate the public from internal symbols? |
| 23:22 | danlentz | by namespace only i think |
| 23:23 | devn | danlentz: i thought it only showed publics by default? |
| 23:33 | seancorfield | yeah, there's some metadata you can add to tell it to ignore vars |
| 23:34 | seancorfield | can't remember off the top of my head |
| 23:34 | seancorfield | skip-wiki |
| 23:34 | seancorfield | http://tomfaulhaber.github.io/autodoc/ |
| 23:35 | rlb | did clojure.java.shell/sh change its behavior from 1.2 to 1.5? |
| 23:35 | rlb | In a project I'm getting 'No value supplied for key: {"LD_LIBRARY_PATH" "..."}', but from a 1.5 prompt, it's fine |
| 23:35 | rlb | . |
| 23:36 | rlb | (the same command is fine) |
| 23:36 | rlb | The project I'm poking at was on 1.2 (hence my suspicion). |
| 23:36 | rlb | sorry -- was on "1.4.0" rather |
| 23:45 | marcopolo` | Clojure just blew my mind... again |
| 23:45 | gtrak | seancorfield: fun bracha talk |
| 23:45 | marcopolo` | I found the proxy macro thing |
| 23:48 | TEttinger | proxy is neat |
| 23:49 | gtrak | 'Once you understand monads, you immediately become incapable of explaining them to anyone else' |
| 23:50 | TEttinger | comonoid endofunctor category of *head explodes* |
| 23:56 | marcopolo` | Here's a question: let's say the class I'm using doesn't have a public constructor. Instead it has a method that calls it's private constr. How can make that work with proxy? |
| 23:58 | warz | no public constructor? |
| 23:58 | marcopolo` | nope, just a public method that calls the public constructor |
| 23:59 | TEttinger | like a factory? |