#clojure logs

2014-02-01

00:00akurilinUnrelated question: is it possible to step through a list two elements at a time, in a rolling fashion? As in, there's an overlap of 1 element between each step? Sounds like partition is a bad fit, but maybe one could use for with two lists, the second with (rest) applied to it
00:00akurilinNot sure I want nesting though.
00:01Raynes&(partition 2 1 [1 2 3 4 5 6])
00:01lazybot⇒ ((1 2) (2 3) (3 4) (4 5) (5 6))
00:02brainproxydnolen: could you push mori 0.2.5 to clojars sometime?
00:03akurilinRaynes: that would work too, let me try :D
00:10TEttingerman... I really have no idea what I'm doing for profiling my clojure.
00:10TEttingerJVisualVM reports a massive amount of time (50% total?) devoted to a TCP thread that I think is just checking for java updates.
00:11TEttingerI tried Timbre but wasn't really sure how to make it work
00:18TEttingeris there some kind of guide to profiling clojure... preferably not using commercial tools?
00:19TEttingerI found a few but couldn't really figure out why profile was sometimes enabled, sometimes not?
00:19orionhIs it kosher to ask questions about clojurescript here?
00:19TEttingersure, orionh
00:20orionhI'm noticing my cljsbuild auto incremental builds jump from subsecond to 7 seconds if I have clj files in the src directory along with cljs files
00:20orionhthis is... unanticipated
00:20orionhis there a workaround?
00:21carkorionh: you're probably refering to it like a cljs file ?
00:21orionhthe clj file is in the :source-paths vector
00:21orionhif that's what you mean
00:21carknope, in one of your cls files you have a refer close to it
00:22carkcljs
00:22carkinstead of refer-macros
00:22orionhoh, you know, there's no refer, but they use the name namespace, so I'm sure that's it
00:22carkat least that's how i sometimes had problems
00:23orionhI just saw some libraries doing it, so I assumed it was what I should do
00:23carki think you may do it, but you have to use ...erm let me find out
00:26orionhyeah, I just have two files client.cljs and server.clj, both are just empty ns declarations
00:26orionhand it's a 7 second incremental build
00:27orionhI can just split it out so instead of src/projectname/files.clj[s] it's client/projectname/file.cljs and server/projectname/file.clj
00:27orionhbut it seems like that's unnecessary, based on what I'm seeing elsewhere
00:27carkah better
00:28carkwell, that's usually to provide macros for clojurescript
00:28orionhfair, but, I mean, both files are blank
00:29carkthat's for the case you do this : (:require [om.core :as om :include-macros true])
00:29carkthen it will look for the same file with clj extention
00:29orionhright
00:30orionhokey-dokey, I think I was just confused about how code is organized
00:30carkbetter to separate clinet and server anyways =)
00:30orionhis it?
00:30carki don't know, i naturally do it this way
00:31carkif you want to share code, you might want to have a look at cljx
00:31orionhI thought cljx was a crazy hack, I just assumed someone would figure out another client/server story for clojure
00:32carki don't know, there are quite a few people using it
00:35orionhthanks for your help
00:48seangrov`I don't suppose with-redefs is going to work very well with go blocks
00:55seangrov`It almost does, but the original definitions never get put back
00:58hiredmanseangrov`: if they don't, that is a bug
00:59hiredmanthe original definitions are put back in a finally, an go blocks are supposed to run finallys
00:59seangrov`hiredman: Good, good. I'll track it down then
00:59seangrov`Definitely somewhere in my code
01:04seangrov`hiredman: This look like the right usage? https://www.refheap.com/5015fd931bc3d0f6e30cafec9
01:05seangrov`This is in cljs by the way, possibly it's something funky
01:05seangrov`"Replay block finished" is logged to the console, but the original defs are never run
01:08hiredmanseangrov`: clojurescript, all bets are off
01:08carkthere are no vars in clojurescript
01:09carkwhich is seriously annoying
01:09carktho binding works
01:10carkbut that might explain some bugs
01:10hiredmanI imagine with-redefs and binding are synonymous in clojurescript
01:11carkyes but core.async is full of trickery afaik
01:11carkmight be trying to do something that's a noop or something
01:15seangrov`bbloom: Anything ever come of http://dev.clojure.org/display/design/Dynamic+Binding ?
01:33akurilinRaynes: anyways, yes, that was pretty cool and worked :)
02:00elarsonwould someone mind shedding some light on why I get always get nil with this multimethod? https://www.refheap.com/30874
02:04carkprintln returns nil ?
02:05elarsonI'll try removing my debugging statements
02:06elarsonno change. I updated the essential code on the paste here
02:06elarsonhttps://www.refheap.com/30874
02:07carkthere are still print statements in your methods
02:07hiredmancark: look at the dispatch fn arity
02:08elarsoncark: sorry if I wasn't very clear. my issue is that dispatch function seems to always return nil
02:08hiredmanelarson: add (def come-out nil)
02:09carkthe first version has correct arity
02:09elarsonhiredman: just a def ? I do have a defmethod come-out nil for debugging
02:09carkthe problem is the print statements
02:09carkyou're returning nothing from your call
02:09elarsoncark: even in the latest version of the paste?
02:10hiredmancark: but if he isn't getting exceptions with the second, it is likely his real dispatch function is never called
02:10elarsonthe come-out-result only wraps a cond
02:10hiredmanelarson: I assume you are testing this in repl?
02:10elarsonhiredman: that seems to be what I've been seeing b/c after adding print statements in my dispatch function I never saw the output
02:10carkhiredman: but look how he calls it, there are 2 parameters
02:10elarsonhiredman: yes
02:11hiredmanelarson: defmulti acts like defonce, so you need to clear it out to redefine it with a new dispatch function
02:11carkah indeed
02:11elarsonah ok
02:11elarsonah ok
02:12carkfirst version is best though, but it will return nil no matter what
02:12elarsonthen I did get the arity issue which I assume is b/c my dispatch function only takes on parameter
02:12hiredmanyep
02:12elarsonawesome
02:13elarsonthanks for the help!
02:13elarsondo you guys have any suggestions as to how to avoid the repl going stale?
02:13hiredmanI will often put a (def … nil) above a defmulti
02:14elarsonhiredman: how did you find out that the defmulti needed the def nil?
02:15hiredmanbecause I am on the mailing list and saw the discusion that lead to it doing that
02:15hiredmanand subsequently have cursed the day about once a month
02:15elarsonok, cool. wanted to make sure I didn't miss something obvious in the docs or anything
02:16hiredmanyeah, amazing the docs still don't mention it
02:16elarsonit is not the most obvious IMO
02:16hiredmanit was changed years ago
02:17hiredmanit was changed to be that way because people were complaining that if you had you defmethods spread across different files, if you reloaded the file with the defmulti, you would lose the methods unless you also reloaded those files
02:18elarsonah I could see that being an issue
02:18hiredmanhttp://dev.clojure.org/jira/browse/CLJ-900
02:18hiredmanhah
02:18elarsonbut seeing as I'm new here I'll complain really loudly as though I know better :P
02:40amalloya popular pastime, elarson
03:08luxbockhi, what's wrong with the follwing: https://gist.github.com/8749459 ?
03:09hiredmanyou don't know how to write/use macros
03:09luxbockthis is true
03:09hiredmanyou want apply, not a macro anyway
03:09luxbockah right, think I've made this mistake before
03:41mkuituneGood weekend! Is anyone using Clojure with OpenGL and perhaps some font support to boot?
03:41mkuituneI'm mainly interested in setting up a geometry/graphics workbench for myself (in Clojure of course, heh)
03:42mkuituneI have 0 experience in Java so if anyone has any working setup I'd be glad if you could share tips
03:43mkuituneNote: I have background in realtime graphics, not just used Java at all
03:43mkuituneTrying to figure out the leat head-achy way to get an OpenGL context running
03:44mkuituneIs LWJGL a good first step?
03:44mkuitune... although this is a bit discouraging https://github.com/rogerallen/hello_lwjgl
03:44john2xother than restarting the repl, is there a way to refresh dependencies? e.g. I already have the repl running with a bunch of stuff def'd, but I forgot to add a dependency to project.clj..
03:45john2xor a typo in the dep's version
03:52hiredmanhttps://github.com/pallet/alembic
03:55fitzohmkuitune: I have no idea, but I feel like that big of a question/intro at least deserves a response :p
03:55mkuitunefitzoh: :D
03:57carkhum >>= is bind, what was the name of >> again ?
03:59john2xhiredman: cool, thanks
04:18cark,(require 'clojure.core.async :as async)
04:18clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: async in this context, compiling:(NO_SOURCE_PATH:0:0)>
04:18cark,(require 'clojure.core.async :as 'async)
04:18clojurebot#<FileNotFoundException java.io.FileNotFoundException: Could not locate clojure/core/async__init.class or clojure/core/async.clj on classpath: >
04:19carkhttps://gist.github.com/cark/8749982
04:20carkwhy would this block instead of printing nil ?
04:20carkisn't async/map supposed to close its channel when there is nothing left ?
04:20carksince there are no channels, there is nothing left
04:29TEttingergeez... apparently, the ^"[[F" type hint for 2D float arrays does not help in the slightest with performance. reflection on the many 2D aget calls I made was taking up about half the time used by my program.
04:30TEttingermake that about 70%, just checked related methods
04:31hiredmanthere are no 2d arrays in java, [[F is an array of arrays
04:31TEttingerI removed it, converted everything to flat arrays, and used ^floats
04:31hiredmanTEttinger: you where most likely typehinting the wrong places
04:31TEttingeryeah
04:32TEttingerI was typehinting before agets
04:32TEttingererr, the arrays in an aget
04:32hiredmantype hinting pulling the float array out of the array of arrays, instead of type hinting the actual pulling out of floats
04:33TEttingereh?
04:33TEttinger(aget ^"[[F" floatfloat-arr x y)
04:34hiredman,(let [^"[[F" ff … f (aget ff 0)] (+ (aget f 0) 1.0))
04:34TEttinger(aget floatfloat-arr x y) would warn on reflection
04:34clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: ? in this context, compiling:(NO_SOURCE_PATH:0:0)>
04:35hiredmanoh
04:35TEttingeranyway, I didn't know that type hints in strings needed reflection but wouldn't warn on it
04:35hiredmanwell, there you go, using multiple indices like that is not going to be inlined properly
04:36TEttingerso you think it was just the multiple indices?
04:36hiredmanyes
04:36TEttingerinteresting
04:37TEttingeryou're probably right, I wonder if this affects vectorz-clj at all
04:37hiredmananything more than one in a call like that will be reflective
04:38hiredmanif you have one index (and it is not used in a higher order way) aget is inlined as a static method call, then the static method call can be replaced by a bytecode intrinsic in the compiler
04:40TEttingerhiredman, so do you think that the arrays of arrays would be slower in java (not clojure I mean) than 1D arrays?
04:41TEttingeris it a JVM thing that makes 1D array access faster?
04:41hiredmanno, just the way you accessed them in clojure was slow
04:42hiredmanwell, actually, 1d might be faster regardless, but you would have to benchmark
04:43TEttingerthanks hiredman, that explains a lot
04:45hiredmanif you look at the source for aget, it has a inline for 1 index, you can look for similar things on other functions
05:01logic_progwhat is a good cljs library for rendering excel like spread sheets in cljs?
05:15Sorellalogic_prog, not quite for rendering, but: https://github.com/tailrecursion/javelin
05:15logic_progah, reactive clojure
05:51nezHi
06:19sobelis Julia lisp?
06:20jack_rabbitlink?
06:20sobelhttp://julialang.org/
06:21jack_rabbitNo, that's not lisp.
06:22sobelbecause it can call into C/Python?
06:22jack_rabbitnot at all.
06:23jack_rabbitIt's because it's not made of forms, or s-expressions.
06:23jack_rabbitDenoted by parenthesis.
06:24sobeloops, i meant to ask, is Julia a lisp
06:24jack_rabbitYou did. And it's not.
06:24sobeli asked a slightly different question
06:24jack_rabbitThe Julia language is not a lisp.
06:48AeroNotixThe Python language is not a lisp.
06:49coffeeyespleaseHi all, quite newb here.
06:49AeroNotixAren't we all
06:49coffeeyespleasejust started learning clojure and got myself a copy of clojure cookbook (early release)
06:50coffeeyesplease:)
06:50AeroNotixok
06:50coffeeyespleasebut I was wondering if anyone has tips (links) for some other resources for an introduction to clojure
06:51scottj_coffeeyesplease: clojurebook.com is the most frequently recommended resource.
06:51AeroNotixcoffeeyesplease: 4clojure gives a set of good functional programming problems
06:51AeroNotixyou can also see how other people implemented the answers
06:51coffeeyesplease(for people not only unfamiliar with clojure, but with functional programming as a whole)
06:53AeroNotixcoffeeyesplease: "Purely Functional Datastructures" is pretty mindblowing
06:53AeroNotixbut somewhat academic
06:53AeroNotixLike i said, though, 4clojure is pretty good for functional programming problem
06:53AeroNotixs
06:53AeroNotixcoffeeyesplease: there's also clojure-koans, interactive tutorial to walk through some basic clojuer features.
06:54rue_Hm. Is vim-clojure-static + vim-fireplace still the way to go for heathens?
06:54AeroNotixIt also uses lein, which is never too early to start using
06:54coffeeyesplease@ AeroNotix I was hoping of getting a more hands experience before getting the "serious stuff" :)
06:54coffeeyespleasechecking out the 4clojure site, looks quite promising
06:55xiaqhi there, is there a successor to clojuredocs.org? it seems stuck at 1.3.0 forever...
06:57scottj_xiaq: I don't think so.
06:59xiaqscottj: :(
07:14riz_hi
07:14jack_rabbithi
07:14insamniacsup
07:14riz_4:11 am here!
07:15riz_can't sleep
07:15insamniaca/s/l?
07:15riz_let me guess, you're a '90s child
07:15riz_or possibly an 80s child
07:15insamniacHah
07:15riz_a male
07:15insamniac'81
07:15riz_me too
07:16riz_did your humble internet beginnings originate on AOL?
07:16insamniacOf course.
07:16insamniacinsamniac@aol.com lulz
07:16riz_haha
07:17riz_i honestly don't remember my "screen name"
07:17insamniacYou in California?
07:17riz_norther
07:17riz_BC
07:17insamniaco
07:18riz_i'm starting out with clojure
07:18insamniacYeah me too. It's been rough.
07:18riz_it's very painful
07:19riz_what are you adept with?
07:19riz_*in?
07:19insamniacI dunno, I'm not great at anything. I do a lot of python and groovy for work.
07:19riz_ah ok
07:19insamniacsome XSLT and javascript.
07:19riz_i do c# and .net
07:19insamniaclots of bash
07:19insamniacNothing close to a lisp though.
07:19riz_me neither
07:20riz_nothing close to functional, except javascript
07:20insamniacYeah, same.
07:20riz_although c# does have lambda expressions
07:20riz_so maybe you have come across the answer to this question
07:21insamniacAnd there's no way anyone at my work would want to use clojure. I could barely get them to adopt groovy as a replacement for simple java stuff.
07:21riz_is clojure suitable for large scale projects?
07:21riz_will it produce maintainable code?
07:21insamniacwell Rich Hickey says that's all he works on
07:22riz_I dunno much about him
07:22insamniacI think that's kinda the point of it
07:22riz_does he work on large scale?
07:22insamniacyeah, he said that in one of the videos i watched
07:22riz_well i know that clojure reduces line count
07:22insamniacThe hard part is having people that can maintain it because no one knows clojure!
07:22riz_but it's not necessarily the same as being maintainable over 5-10 years
07:23riz_I think that will change if people can be convinced that it's sustainable
07:23riz_like doing javascript on serverside
07:23insamniacI have a lot of books and have watched a lot of talks, and reusable/maintainable is a big selling point.
07:23riz_hmmm
07:24riz_because from the examples and tutorials I've worked with, I find it difficult to see that it would be maintainable over long periods of time
07:24insamniacBut there are lots of smart people in this channel that can discuss this sort of thing way more in depth than me.
07:24riz_but that's fine because I'm a beginner
07:24insamniacYeah I still feel like I'm doing everything wrong.
07:25riz_also the other thing is taht I'm not that familiar with the toolset
07:25insamniaceven just trying to write simple utilities to replace things I've already done in other languages
07:25riz_especially debugging
07:25insamniachave you seen light table?
07:25riz_yeah i use it for clojure
07:25riz_and i find insta repl handy
07:26insamniacI've just been using vim with xterm windows all over the place
07:26riz_i'm just not as productive with REPL when trying to debug something
07:27riz_I'm used to putting breakpoints and hovering over variables
07:27riz_but maybe it's because it's such a huge paradigm shift too
07:27riz_maybe in clojure world there's no breakpoints
07:28insamniacYeah.. i mean since stuff isn't supposed to run sequentially
07:28insamniacI don't even have the vocabulary to talk about this stuff without sounding retarded.
07:28riz_lol
07:29riz_have you ever used emacs?
07:29insamniacI remember using visual studio back when i started like 9 years ago... I loved it.
07:29insamniacnah
07:29riz_yeah well if you use visual studio now, it's fucking mind blowing
07:29sobeldebugging declarative/functional code is just different. i hit the same wall when i figured out i would never get the "debugger" type view or single step through how my query is executed
07:29sobel(in sql)
07:29insamniaccemerick is one of the smart guys
07:30insamniacseize him
07:30riz_commencing seizure
07:31insamniaci just use vim now because of my job.. i get put in situations lots of times where all I have is putty/ssh
07:31riz_yeah i did vim back in school
07:31riz_I gravitated towards it
07:32riz_I tried emacs, it was too complicated for me at the time
07:32riz_so was lisp lol
07:32riz_I didn't see the point
07:32insamniacIf you see someone who always uses an IDE, and then they don't have it... they're lost
07:32insamniacI didn't want to be like that
07:32riz_true
07:32insamniacI should probably use light table at least though
07:33insamniacReally I need to start coding, and stop talking about clojure!
07:33riz_I've had situations where I've had to just work with a simple editor and command line
07:33insamniacI've been doing too much video watching and book reading... hoping to have some Aha! moment
07:33riz_lol
07:34riz_have you gone through koans?
07:34insamniacEven though I know the only way it's gonna happen is if i start coding
07:34insamniacI've done a lot of 4clojure problems.
07:34insamniacI think koans are more involved?
07:34riz_i haven't done 4clojure
07:34riz_but koans get insane later on
07:34riz_you'll get through first few easily
07:34riz_but the good thing is that they have youtube videos on each one
07:35riz_because they stop becoming self-explanatory after a few
07:35riz_I think the last one I did was 15 or something
07:35insamniacI need a computer that has no internet access so i stop getting distracted
07:35riz_and then I joined school!
07:35insamniacyou do clojurekoans.com?
07:36riz_yep
07:36riz_koans are awesome
07:36riz_they keep you going
07:36insamniac4clojure is cool because you can see other users' answers after you finish... but it's crazy how many ways there are to do the same exact thing
07:37insamniacthat makes me think it would be really tough working with other peoples code..
07:37riz_i'll try it when i have some free time next
07:37riz_hmmm
07:37insamniacand makes me think i'm always doing things wrong
07:37riz_unless you're well versed in it
07:37riz_I think it's like starting out fresh to programming with c++
07:37insamniacyeah i think i just need to keep at it.. keep reading and writing lispy stuff
07:38riz_it's a mindfuck for first 6 months
07:38riz_yeah u kno what I think even if you don't end up using it, it'll make you a better imperative programmer
07:39riz_already I like to think functionally when doing oop stuff now
07:39riz_anyway, i hope you're already doing your first koan
07:39insamniacalmost!
07:40riz_lein is pretty nice
07:41insamniacWe shall contemplate truth by testing reality, via equality
07:41insamniacI already like this
07:41sobelinteresting... the Koans site is published by 8th Light
07:42sobeli work with a team that we more or less poached from 8th
07:42sobelbut they are all rubyists
07:42RickInAtlantais 8th light Bob Martin's company?
07:43insamniacRickInAtlanta: are you the Rick that's organizing the Parkour talk?
07:43riz_hi sobel
07:44riz_Parkour the sport?
07:44insamniacheh
07:44RickInAtlantaParkour the map reduce library
07:44insamniaccan't we do both?
07:44riz_oh ok hadn't heard of it
07:44riz_parkour while doing parkour
07:44RickInAtlantathat is llarsam, he is the co-organizer of the atlanta group.
07:45insamniacI wish there was a high speed train connecting augusta to atlanta.
07:45RickInAtlantahe is doing the presentation, and I believe he is also the author of parkour
07:46RickInAtlantaJust as well you missed the meeting last month
07:46insamniacno good?
07:46RickInAtlantaThe presenter missed it, he had an emergency come up
07:46insamniacoh, that would have sucked
07:46RickInAtlantaI thought of you... glad he didn't drive up from augusta
07:47insamniacHeh
07:47RickInAtlantaAre you going to Dev Nexus? Stuart Sierra is going to be doing a couple of sessions there
07:47insamniacYeah I saw that.
07:47insamniacAnd yeah, I got my boss to bless off on it.
07:48RickInAtlantahttp://www.meetup.com/Atl-Clj/events/163247862/
07:48insamniacDefinitely gonna hit all the clojure stuff. I'm interested in the pair programming thing too, since I've never encountered that in the wild.
07:50insamniacGood stuff. That's one I will be able to attend.
07:50insamniacI might even try to come up for Parkour, since I might be starting on a hadoop project here shortly.
07:51jdtanybody up?
07:51insamniacIt's just hard to do things on weeknights 'cause I go to work at 4:30 AM
07:51RickInAtlantallasrm aka Marshall, is a good person to talk to. He uses haddop every day. I know he has used cascading in the past.
07:51insamniacjdt: whatup
07:52riz_a hadoop project?
07:52jdtAnybody now how to bind *data-readers* in ~/.lein/profiles.clj so that spyscope will work?
07:52riz_you work for a large scale company?
07:52insamniacI work for a defense contractor
07:52jdtthe current clojure/lein doesn't let me use spyscope in lein repls
07:52insamniac:(
07:52jdtit's not finding data-readers.clj in the ~/.m2/...spyscope.jar I guess
07:53riz_I've never had the opportunity to deal with something that scale
07:53riz_*of
07:54insamniacMe neither.. kind of sucks because i can't really try stuff out at home..
07:54riz_haha yeah true
07:54insamniaci mean i have a single node hadoop cluster VM..
07:54insamniacplus we do things on closed networks for the Army.. it's really a pain
07:55insamniachaving no access to the outside world is just getting trickier and trickier because everything expects you to be able to pull down dependencies from all around the internets
07:56RickInAtlantaif you have no experience with hadoop and want a gentle introduction, the udacity course is pretty good (and free)
07:56insamniaca guy on my team is doing the cloudera training next week.. $3k for 4 days
07:57insamniacI had no idea training cost so much... since absurd.
07:57insamniacer
07:57insamniacseems
07:59riz_ya i don't see the value of going to train at a seminar vs. buying a vid subscription
07:59riz_or doing something like udacity
08:00riz_except maybe you get to network with other professionals
08:00insamniacYeah, networking
08:00insamniacsomething I don't do at all..
08:01insamniacwell I guess this counts as networking
08:01insamniacbut i have extremely limited interaction with other programmers in person.
08:03riz_yeah there's not much need to
08:04riz_anymore...
08:04insamniacWell, I would have liked to work with someone much better than me at some point in the last 9 years.
08:05insamniacBut it's like everywhere I go, I know the most... even though I don't know that much.
08:05insamniacThat's why I come here, because this channel makes me feel really dumb.
08:06insamniacKeeps me humble, because at work they think I know everything.
08:08riz_reading tech news keeps me humble
08:09riz_makes me feel everybody else has a startup and mad coding skillz
08:09insamniacor stackoverflow
08:10insamniacon to koan 2!
08:11RickInAtlantawoot
08:11daGrevisWhat's the difference between println and prn?
08:12yakcchi
08:13insamniacdaGrevis: println appends a newline
08:13insamniacdaGrevis: I think there's a difference between prn and print though
08:14RickInAtlantaprn appends new line too
08:14RickInAtlanta,(doc prn)
08:14clojurebot"([& more]); Same as pr followed by (newline). Observes *flush-on-newline*"
08:14insamniacdaGrevis: oh yeah pr doesn't
08:14RickInAtlanta,(doc pr)
08:14clojurebot"([] [x] [x & more]); Prints the object(s) to the output stream that is the current value of *out*. Prints the object(s), separated by spaces if there is more than one. By default, pr and prn print in a way that objects can be read by the reader"
08:15insamniac,(doc print)
08:15clojurebot"([& more]); Prints the object(s) to the output stream that is the current value of *out*. print and println produce output for human consumption."
08:15RickInAtlanta(prn "x")
08:15RickInAtlanta,(prn "x")
08:15clojurebot"x"\n
08:15RickInAtlanta,(println "x")
08:15clojurebotx\n
08:19sobeli'm about to find out how well clojure+jdbc+postgresql array types play together
08:21daGrevisthis is funny https://github.com/rplevy/swiss-arrows
08:26riz_ok i might sleep a few winks
08:26riz_see you later insamniac and good luck with koans
08:33michaniskinswiss-arrows are great
08:33RickInAtlantawhat are they?
08:34michaniskinextension of the -> and ->> threading macros basically
08:34RickInAtlantaoh, cool
08:34michaniskinlike -<> for instance
08:34michaniskinwith -> you can only thread things through the first arg "hole"
08:34RickInAtlantamy first thought when I clicked on the link was that it was ascii art
08:34michaniskinbut if you want like
08:35RickInAtlantathen the examples didn't seem to fit that
08:35michaniskin(-> [1 2] (conj 3) (map inc)) you're in trouble
08:35michaniskinbecause map takes the collection in the last arghole
08:35michaniskinwith -<> you can do like
08:36michaniskin(-<> [1 2] (conj 3) (map inc <>))
08:36RickInAtlantainteresting
08:36michaniskinwhere <> is the placeholder for where you want it to thread
08:36michaniskinbut there are all kinds of interesting threading ideas in there beyond that
08:37rue_Eek, here I hoped we were finally rid of inscrutable symbols
08:37borkdudeisn't -<> very similar to as-> then?
08:37michaniskini like inscrutible symbols
08:38gfredericksborkdude: yes
08:38gfredericksborkdude: michaniskin: I use <> as the name whenever I use as->
08:38borkdude,(as-> [1 2] x (conj x 3) (map inc x))
08:38clojurebot(2 3 4)
08:38borkdudeI would have turned around the name and expression in as-> if I would have chosen it though
08:39michaniskinborkdude: me too
08:39borkdudearghole... hehe
08:39michaniskinborkdude: i'd probably have done (as-> [x [1 2]] ...)
08:39expezWhy doesn't this short Liberator test do what I expect? https://gist.github.com/expez/8752384
08:40michaniskinborkdude: one thing that i don't 100% like about clojure idioms is the "false tree"
08:40michaniskinlike i kind of prefer scheme style let and cond, where binding pairs are enclosed in parens
08:40michaniskinand so on
08:41michaniskinespecially when you have to make macros around them
08:41michaniskinit simplifies the parsing phase of the macro
08:42borkdudemichaniskin let binding syntax? what would (as-> [a 1, b 2] (inc a) (inc b) (inc a)) mean then? ;)
08:42michaniskinalso getting editors to pprint false-tree expressions nicely is complicated
08:42borkdudewow 707 users here
08:43borkdudeit's growing steadily
08:43michaniskinborkdude: lol that seems insane
08:43daGrevishello! how could I make this work faster using all cores? http://vpaste.net/z2Ao1
08:44thesaskwatchhello
08:44thesaskwatchwhere can I find some guid on how to use paredit?
08:44michaniskindaGrevis: reducers?
08:44borkdudeI heard in the mostly lazy podcast about some 'new' web framework like pedestal, luminus, starting with the letter k, but forgot it's name. What was it?
08:45borkdudethesaskwatch google
08:45RickInAtlantathe paredit cheatsheet is good http://www.emacswiki.org/emacs/PareditCheatsheet
08:45daGrevismichaniskin, I tried to wrap it into future and then deref but it didn't help
08:45borkdudethesaskwatch the paredit cheat sheet is particularly helpful
08:45michaniskinborkdude: do you mean Caribou?
08:45thesaskwatchborkdude: haven't found anything good, I did google first
08:45borkdudemichaniskin probably yeah
08:46borkdudemichaniskin you know it?
08:46thesaskwatchRickInAtlanta: thanks
08:46michaniskindaGrevis: with regular lazy seqs (which filter, map, etc use) you process items sequentially. with reducers you can process them in parallel
08:47michaniskinclojurebot: reducers
08:47clojurebotreducers are http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html
08:47daGrevisokay, thanks
08:48michaniskinborkdude: i've looked at it. i haven't used it though
08:49borkdudemichaniskin yet another one I guess
08:49michaniskinborkdude: it appears to be a framework in the spirit of Ruby on Rails, more or less
08:50RickInAtlantaI keep planning to look at the hoplon web framework
08:51borkdudeRickInAtlanta it's amazing if you like Excel (:P)
08:51michaniskinRickInAtlanta: join us in #hoplon if you have any hoplon issues :)
08:51michaniskinjust released 5.0.0 yesterday, so you're at a good place to start!
08:51borkdudeversion 5 already?
08:52michaniskini want to keep the versions semantic as faithfully as possible, so i incr when necessary
08:52michaniskinso if anything that worked in aprevious version could possibly not work in the new version i'll incr the major number
08:53borkdudeyeah ok
08:53michaniskinthe last change was to the build process, which is (imho) part of the program, so i did it
08:53michaniskineven tho the actual project source is backwards compatible
08:53dsrxi think semver allows breaking changes on minor versions until 1.0.0
08:54borkdudemichaniskin so does (a :style some-cell) work now? ;)
08:54michaniskinborkdude: not yet :) it could go in for 5.1.0 though
08:55borkdudehihi
08:55michaniskinwe'd keep the existing stuff too
08:55michaniskinshould i do it?
08:55borkdudemichaniskin up to you, I am not yet a seasoned hoplon user, so who am I to decide ;)
08:56michaniskinit's a little complicated because of the way properties on DOM elements work, especially style
08:56borkdudemichaniskin don't worry about it then
08:56michaniskinlike should it be a map? probably
08:57michaniskin(a :style (cell= {:background-color color-cell})) for example
08:58borkdudemichaniskin would that only update one attribute of the style attribute and leave the rest of it intact?
08:58michaniskinit would be updating the style property instead of the attribute
08:58michaniskinelem.style.backgroundColor = "red"
08:58borkdudemichaniskin I think that's cool. And maybe just (cell= some-cell) would update the whole attribute?
08:59borkdudeneh
08:59borkdudeI like yours
08:59michaniskini suppose if the cell contained a string it could update the attr, too
08:59borkdudeit's the same as now, except with the ommission of a :do-attr right
08:59michaniskinyes
08:59michaniskinyeah you're right
09:00michaniskinok it's going in there :)
09:01sritchieambrosebs: hey dude - what do you think it would take to get schema properly emitting core.typed annotations?
09:02sritchieambrosebs: we've gone pretty bonkers with schema, but I want to start using your stuff too
09:03ambrosebssritchie: there's this wip https://github.com/circleci/schema-typer
09:04sritchienice
09:06sritchiecool, I'll look into it
09:07michaniskinborkdude: speaking of Excel, alan's bacwn datalog app demonstrates the advantages of spreadsheet consistency stuff
09:07michaniskinit would be hard or impossible to do that managing the order of evaluation explicitly
09:12sobelanyone handy with jdbc? i'm trying to figure out if there's an execute many or if i need to just use map
09:13sritchieman, I've been hitting the circular dependencies thing lately...
09:14sritchieI thought I had a good webapp structure figure out, but it's pretty rough to avoid circular deps when two models in a webapp depend on one another
09:14sritchieyou almost need a namespace for each model, then a namespace for every edge
09:15sobelwhy do the models depend on eachother?
09:16sritchieso, say you have a User and an EventEntry - an event entry has a user ID,
09:16sritchieso that's one way.
09:16sritchiebut then when you delete a user,
09:16sritchieyou need to remove that user from all event entries
09:16sritchie(since an event entry may have many users)
09:16sritchieso user needs to call the "remove-user!" function back in the evententry namespace
09:16sritchiesobel: now, I could have the caller just handle the coordination
09:17sritchie(do (delete-user) (delete-event-entry))
09:17sritchiebut to hide that, I need an edge namespace, really
09:17john2xanybody tried `lein eastwood`? I'm wondering if I can trigger it from within a repl? So it doesn't have to start up the jvm every time.
09:17sritchiethat can make that transactional
09:17sobel2 models for 2 tables?
09:18sritchiesobel: a model for each table, right
09:18sobelit sounds like you really have 1 domain and that's why your models depend on eachother
09:18sritchiewell, doc type (this is CouchDB)
09:18sritchiewhat do you mean by 1 domain
09:19michaniskinsritchie: seems like you need a "manager" to coordinate access to tightly coupled but separate resources
09:19sobelUser and EventEntry are related
09:19sritchieyeah, so that's the "edge" namespace, I guess
09:19sritchieso you guys are recommending just embracing that, and for coordination between resources,
09:19sobelwhat's the practical use case? do you want events destroyed as a necessary side-effect of deleting a user?
09:19sritchiemoving any functions that coordinate resources into their own spot
09:20sritchiesobel: yeah, that's right
09:20sobelwrite a trigger in your database
09:20sritchiewell, not destroyed, actually -
09:20sobeldon't make this a concern of the client/front-end app
09:20sobelarchived?
09:20sritchieEventEntry has a list of athletes -
09:20sritchiehas-many
09:20sobelstorage logic should be able to do the right thing there for you, or you need a better database
09:20sritchieso I want to remove the deleted user from EventEntry
09:20sritchie:) that's probably try
09:20sritchietrue*
09:21sritchieabout the DB
09:21michaniskinin general you're going to need to have some kind of manager layer above the db tables anyway, because the real world can't be divided cleanly into tables :)
09:21sritchieyeah, I was trying to stick to models + API + view (no controller)
09:21michaniskinlike what if you wanted to send emails or something
09:21sritchiebut the "api" layer might be this coordination thing
09:21michaniskinsritchie: precsely
09:21sobelmichaniskin: so true, but domains are a somewhat better object to model. tables are too granular for much practical use, by themselves.
09:22michaniskinalso tables complect perf issues with api design issues
09:22sritchieyeah, this proj that I've been working on jammed a lot of the coordination into the "view" layer, with the enlive code
09:22sobeli didn't understand 'complect perf issues with api design issues'
09:23sobeloh performance
09:23michaniskinsobel: how you normalize your data affects both performance and how you make queries
09:23sobelsure
09:24michaniskinyeah so i always plan on having a coordination layer
09:24sobelis this aka a DAO?
09:24michaniskinyeah basically
09:24sobeldistinct from something resembling an 'active record'
09:24sritchiemichaniskin: easier Q - any naming conventions for your coordination layer?
09:25sritchiemichaniskin: or do you segment based on functionality,
09:25michaniskinsritchie: well i try to think of it as a state machine
09:25sobelcool, DAO is the pattern that has worked best for me.
09:25sobelit's state machines all the way down
09:25sobelso i endorse this view
09:26michaniskinyeah i think the state machine fits well with functional programming, and the object/class less so
09:26michaniskini mean imho
09:27sobelwell, when i say DAO the object is a collection of sexprs that interact with data in a particular domain
09:28sobelin OO it would be a class, but...not here
09:28sritchiemichaniskin: okay, yeah, convinced… that of course makes sense.
09:28sritchiebut as far as project org,
09:29sritchiestate transitions that affect multiple models are state transitions on some subgraph of the system,
09:29sritchieso I guess the art is just jamming all state transitions that concern certain groupings of tables, or models, into one spot
09:30michaniskinyeah i think that's the artistic part of the process :)
09:31sritchieand I'll know it's right when I can sell prints of the graph at the local coffee shop
09:31michaniskini'll buy one
09:33michaniskinit would be awesome if you could buy large e-ink posters that could be configured via bluetooth or something
09:33michaniskinor e-ink wallpaper
09:34scape_i'm trying to wrap a macro call and am not sure what I am missing
09:34scape_(defmacro with-data [v body] `(fn with-data#[d#] (let [~v d#] ~@body)))
09:34scape_((with-data mydata (prn "data:" mydata)) "the data")
09:34scape_never prints
09:35michaniskin(defmacro with-data [v & body] ...) ?
09:36scape_well shit
09:36scape_:D
09:36scape_thanks michaniskin
09:36michaniskinhah i do that all the time
09:39thesaskwatchborkdude: RickInAtlanta: thanks .. I'm starting to "get" paredit now :)
09:56sobeloh, here's a nice use of the spreadsheet cell model: http://hoplon.io/
10:03rue_Is this spreadsheet cell model something like reactive programming? *stabs in dark*
10:17sobeli don't know what is meant by reactive
10:19sobeli guess it's like an island of reactive programming
10:19sobelmakes good sense for browsers/GUIs
10:19RickInAtlantasobel: have you read http://www.reactivemanifesto.org/
10:19rue_Reactive programming focuses on data flow, basically.
10:19sobelno, i didn't read the manifesto
10:20sobeldoes a SQL trigger count?
10:45luxbockis there a better way than this to convert a ratio in string form to an actual ratio?
10:45luxbock(defn str-to-ratio [sr] (apply #(/ (Integer. %1) (Integer. %2)) (str/split sr #"/")))
10:48gfredericksluxbock: read-string would work, if you trust the input
10:48gfredericksprobably a bit slower
10:49luxbockhmm think I prefer this to that
10:49rue_Hm, no bundled number parsing?
10:50gfredericks,(let [[_ s1 s2] (re-matches #"(-?\d+)/(\d+)" "17/18"] (/ (Integer. s1) (Integer. s2)))
10:50clojurebot#<RuntimeException java.lang.RuntimeException: Unmatched delimiter: ]>
10:50gfredericks,(let [[_ s1 s2] (re-matches #"(-?\d+)/(\d+)" "17/18")] (/ (Integer. s1) (Integer. s2)))
10:50clojurebot17/18
10:50gfredericksrue_: well most stuff can be done via the jvm; I guess ratios are the main exception
10:51gfredericks,(clojure.edn/read-string "17/18")
10:51clojurebot#<ClassNotFoundException java.lang.ClassNotFoundException: clojure.edn>
10:51gfredericks,(require 'clojure.edn)
10:51clojurebotnil
10:51gfredericks,(clojure.edn/read-string "17/18")
10:51clojurebot17/18
10:51gfredericksluxbock: ^ that works w/o the trust part
10:51luxbockah nice
11:29winkanyone at fosdem?
11:34untypedhi, I am wondering how probable it is to find a remote Clojure job. Is anyone you know looking for Clojure devs (or has been looking recently) ?
11:56jballancuntyped: have you looked at http://functionaljobs.com ?
11:56jballanclast I checked there were some that were remote
11:57untypedI have
11:57jballancalso, it never hurts to just ask
11:58untypedsure, thx. I have done some research and it doesn't look good. On the other hand there may be companies that complain for lack of people.
11:59bbloomseangrov`: nope. still no reified vars or binding frames of any kind in cljs
12:01bbloomseangrov`: i'm pretty sure that with the new constant table support, we could easily handle the #'syntax which i think would still be super useful for (comp #'var whatever) during development and for add-watch uses too. but bound-fn and friends is unlikely to happen any time soon
12:03untypedanyways, just in case someone is interested please drop me an email untyped@yahoo.com (+12 yrs mostly in Java, and 2 yrs in Clojure and Scala)
12:21jcromartiedoes anybody know of a library or technique for doing a number of complex operations with side effects that can be rolled back if any part fails?
12:22tmcivergit. ;)
12:23jkjjcromartie: just put the world with the side effects in a box and you don't have side effects
12:23jkjor are they real side effects causing changes in physical reality outside your sw?
12:25jcromartiejkj: real side effects in like 6 different external systems
12:25jcromartielike, I might need to create a project here, create a wiki there, update a user there, and if any one of them fails, then roll back the others that did succeed, and do some of those in parallel
12:25jcromartienow, I already have something to do this, but I want to see if there's any model for it that's already out there :)
12:28jkjjcromartie: when your side effects have finalized, you have a system (think map) with some of the parts failed. then you verify it, and decide to roll back... which rolls back the parts that have not failed and you end up with empty system?
12:28jkjor something
12:29Sosacekjcromartie: normally your middleware would do that
12:29jcromartiemiddleware?
12:29jkjjcromartie: don't know specific lib or methodology, but modeling the outside world's tate there might help
12:29jcromartieyeah, I've looked at this from a couple of different angles
12:29jcromartiebut we can't know the outside state ahead of time since it's changing all the time
12:29mkuitunejcromartie: I have no idea what your use case is but it sounds a bit like multi level transaction management?
12:29jcromartiemkuitune: that sounds like a useful term to describe it
12:30jcromartiemy specific use case is imposing a higher level management interface on a bunch of disparate custom/COTS services
12:30mkuitunejcromartie: at leat for me googling for the term provides a bunch of references :)
12:30jcromartieso we have our own concept of a "project" and "roles" which translate to a whole slew of complex tasks in various other systems
12:31jcromartieJIRA, Confluence, Stash, Bamboo, Jama, LDAP
12:31jcromartieat least!
12:31mkuitunephew
12:31Sosacekusually, there's a middleware that can do something like that
12:31jcromartieSosacek: you don't mean Ring middleware, right?
12:32jkjSosacek: give an example
12:32jkjSosacek: which kind of middleware?
12:32jcromartiewe've already got the API calls worked out
12:32jcromartieand some non-API calls (like navigating the HTML forms for tools that don't have APIs)
12:32jcromartieit's kinda nuts
12:32jcromartiewell I guess HTML is an API transport :)
12:33jkjluckily atlassian sw has apis
12:33jcromartiesome of them
12:33jcromartieand for some tasks
12:33jcromartie:|
12:33jkjmm. true
12:33jcromartiewe have a weird set of versions and have to do a couple of things outside the scope of the APIs
12:33Sosaceklike, you're opening account on in a bank, and the branch system calls CRM to create a user profile, security system to validate credit score, saves the signed contract to document storage, etc
12:34jcromartieSosacek: and you're saying there's magic software that does that?
12:34jcromartieSosacek: I'm writing *that*
12:34Sosacekand instead of calling each system by it's own api, it happens over middleware
12:34jcromartieyeah, I'm the middleware
12:34Sosacekusually it's ridiculously expensive, in Java, byt Oracle and uses xml
12:34Sosacekthe smarter ones can do distributed rollbacks and stuff. at my job ... we don't have the smarten one
12:35jcromartiehah hah
12:35jcromartiewell I'm trying to arrange the smart one
12:35jcromartie:P
12:35SosacekI'm not sure there's something like this for Clojure, and usually, it's the responsibility of the target system to implement it, which is probably not going to happen with you :)
12:37Sosacekwell, good luck :)
12:38mkuitunejcromartie: I just remembered this paper. It's not in your domain per se but discusses undoable side effect to linked systems a bit
12:39mkuitunehttp://homes.cs.washington.edu/~lamarca/pubs/templogic-uist00.pdf
12:39jcromartiethanks mkuitune, you keep delivering :)
12:40mkuitunejcromartie: You're welcome, not sure if it helps but perhaps they give some perspective :)
12:40jcromartieyes, definitely
12:43jcromartieI'm thinking that I can simplify this down to fns that return their own inverse
12:44jcromartiewell, not inverse, but undo
12:45Sosacekthat's interesting
12:45gfredericks,(def count (atom 0))
12:45clojurebot#<CompilerException java.lang.SecurityException: denied, compiling:(NO_SOURCE_PATH:0:0)>
12:46gfredericks,(def c (atom 0))
12:46clojurebot#'sandbox/c
12:46gfredericks,(defn inc-c [] (swap! c inc) #(swap! c dec))
12:46clojurebot#'sandbox/inc-c
12:46gfredericks,(do (inc-c) @c)
12:46clojurebot1
12:46gfredericks,(do (inc-c) @c)
12:46clojurebot2
12:46gfredericks,(do ((inc-c)) @c)
12:46clojurebot2
12:47gfredericksshould the undo fn return a redo fn?
12:48Sosacekactually, it does sound like an awesome idea
12:49Sosacekthat's the deal with promises/futures and infinite sequences, right? you can do infinite sequence as a pair (value fn-that-computes-next-value) and future/promise as pair (false fn-to-do-it) or (true value)
12:50Sosacek"action" could be fn that does something and then returns pair (result fn-to-redo)
12:53coventryUntyped: These guys were hiring seriously in December, and may still be. https://groups.google.com/forum/#!topic/clojure/WgEG5woJDvw
13:07silasdavisI have a protocol P which defines a method foo for String
13:08silasdavisI want to extend-protocol in another module, and within the body of my override for foo, call the original foo defined elsewhere
13:08silasdavisI tried other-module/foo within extend protocol but this causes a stack overflow
13:08silasdaviswhat is the best way to do this?
13:09silasdavisam I using extend-protocol correctly if I want to override the default implementation of foo for String within my module?
13:18grehi
13:18greis clojure good for neural networks
13:18greis clojure good for neural networks
13:18gre?
13:20coventry /join shitfire!!!
13:20coventryHeh. From here: https://news.ycombinator.com/item?id=7161604
13:28gfrederickssilasdavis: um
13:28gfrederickswhat do you mean by "the body of my override for foo"?
13:29gfredericksyou're trying to extend the same protocol to String in two different namespaces?
13:31gfredericksrereading, I think my understanding is correct; and what you're trying to do is not possible
13:31gfredericksprotocol implementations are global
13:32gfredericksif you want a function to behave differently in a different namespace what you really want is a different function; or a more general function
13:34silasdavisgfredericks, hm, thanks, are you familiar with liberator?
13:36gfrederickssilasdavis: no
13:53seangrov`Really seeing some of the brilliance of the pedestal approach. We're definitely working on a substandard re-implementation of a lot of their ideas.
14:05eggheadsilasdavis: I love liberator! so nice
14:09eggheadanyone in here know how you'd go about testing om apps?
14:18llasraminsamniac: (going through channel scrollback) I'm totes up for chatting about Hadoop and Clojure (Parkour or Cascalog/Cascading) some time
14:18llasraminsamniac: If you decided to go the Cascalog route, sritchie is here frequently too, an there is a #cascalog
14:20silasdavisegghead, well perhaps you might have some thoughts on: https://github.com/clojure-liberator/liberator/issues/99
14:25eggheadhmm silasdavis i've yet to tackle auth on the project I'm using liberator with, I was hoping to integrate with friend but I haven't crossed that bridge yet
14:25eggheadhopefully you'll figure it out for me :p
14:25silasdavisgfredericks, so should I really not extend-protocol someone else's protocol in one of modules to override it?
14:26silasdavisegghead, shouldn't be a problem, just used the :authorized? decision function, return [true, {:auth-token auth-token}] or the like
14:26silasdavisto indicate request is authorized, and to merge relevant information into the context
14:26silasdavisyou can used :allowed? to check specific access permissions
14:27silasdavismy problem is about passing that auth-token to a middleware
14:27eggheadright, but it's an interesting considerating that if friends annotates the ring request I wouldn't be able to easily get to it?
14:27silasdavisyou can get at the request
14:27silasdavisyou just can't write out to the ring response from within liberator
14:28silasdavisactually that's no true
14:28silasdavisyou can do that fine from a handler with: (reify lib-rep/Representation (as-response [this ctx] <write your ring response>))
14:29eggheadooo, you need to modify liberators responses to add an extra header of yr auth token or something?
14:29silasdavismy problem is I would have to do that for every handler to get something generic (i.e. that does not relate to specific path through the decision graph) out to the ring response
14:29silasdavisegghead, yeah that kind of thing
14:30silasdavisif I could override the default as-response functions, but I'm lead to believe that's not kosher
14:31eggheadya interesting silasdavis https://github.com/clojure-liberator/liberator/issues/46 looks like that is an option too
14:32silasdavisah okay that's easier than providing as-response for that case
14:32silasdavisstill for me it's a problem of doing that for every handler
14:33eggheadya
14:33eggheadyou could use a higher order fn or something to abstract it if it's boilerplatey, maybe, I don't know
14:33egghead:)
14:40silasdavisI guess
14:41silasdavisit would mean I couldn't easily use defresource
14:41silasdavisalso I'd have to manually maintain a list of all handle functions
14:41silasdavisthat could conceivably change with liberator
14:41silasdavisit smells pretty bad
14:42silasdavisalthough I'm not seeing a good way round it
14:43silasdavisthis: http://stackoverflow.com/questions/3589569/whats-the-rationale-behind-closed-records-in-clojure convinces me that I shouldn't be overriding the extending done by the extend-protocol in liberator.representation
14:43silasdavisI could pass some callback into my resource
14:44silasdavisand return a promise that gives the auth token
14:44silasdavisbut that is a horrible work around
14:45silasdavisno I'm going to have to extract the authorization to before liberator
14:46silasdavisthat's actually reasonably clean
14:46silasdavisthanks for the rubber ducking egghead :)
14:51eggheadof course silasdavis
15:15seangrov`dnolen: This look like an ok usage of with-redefs in cljs? https://www.refheap.com/5015fd931bc3d0f6e30cafec9
15:16dnolenseangrov`: that looks a bit sketchy since go blocks are async
15:17dnolenseangrov`: if this something simple probably ok, but that's likely to result in very weird bugs if you're doing that in several places
15:18seangrov`dnolen: Just doing it in one place for replays, but the functions are never returned to their original defs
15:19seangrov`It's not the end of the world since we'll just throw them away the page after running it more or less anyway, but it would be nice to have it be slightly more robust, to be able to play up to a point and then resume manual interaction
16:17coventry`LT question: I just built light table on OSX 10.9 using the OSX script in the README.md. It starts after a complaint that "Breakpad initializaiton failed" and a few complaints of "Internals of CFAllocator not known." (https://www.refheap.com/31194) But it is then completely unresponsive. Any suggestions for how to get it working? I gather the second warning is benign, the first can be caused by conflicting LT processes, which I don't
16:17coventry`think I have. https://groups.google.com/d/msg/light-table-discussion/QohEDkf-TP8/kcBivkT1iToJ
18:05davidchambersWhat's the thinking behind `=` requiring at least one arg?
18:09AeroNotixdavidchambers: wat
18:09davidchambers,(= 1 1 1)
18:09clojurebottrue
18:09davidchambers,(= 1 1)
18:09clojurebottrue
18:09davidchambers,(= 1)
18:09clojurebottrue
18:10davidchambers,(=)
18:10clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: core/=>
18:10gratimaxHmm
18:10AeroNotixdavidchambers: and the problem you're trying to solve is?
18:10gratimax,(= false)
18:10clojurebottrue
18:10amalloyAeroNotix: (apply = coll)
18:11davidchambersAeroNotix: I'm wondering what the default value of equality is. The default value of addition, for example, is zero.
18:11amalloya perfectly reasonable thing to want to do, but it breaks on empty collections
18:11davidchambers,(+)
18:11clojurebot0
18:11amalloydavidchambers: it should be true, but it's not :P
18:11gratimaxdavidchambers: If you think about the definition of =, it checks if all the arguments are equal. In the case of one argument, it is equal to itself. Problem solved
18:12amalloygratimax: i feel like you've missed the point
18:12AeroNotixhmm
18:12amalloyhe's asking why it doesn't work for 0 args, not why it does work for 1
18:12gratimaxah
18:12RickInAtlantayou cant have a default value for equality
18:12RickInAtlantaif you apply the identity to addtion, 0 it doesn't change anything
18:12goodgerif this were PHP, we would assume truth and be done, damn it
18:12davidchambersRickInAtlanta: Can you point me to a Wikipedia entry or something similar? I'm interested in reading about this.
18:13amalloyyou can't have a default argument, RickInAtlanta, but you can have a default return value
18:13RickInAtlantabut what + and * return is the identity that applies to their operation
18:14amalloysure, so = can't be a monoid, but it can still do something useful when called with no args
18:14AeroNotixamalloy: but is it true or fale
18:14RickInAtlantawhether it is useful or not depends on what you want to do with it.
18:14AeroNotixfalse
18:14gratimaxgood point. = has no 'identity element'
18:15coventryShould a set of no objects all be equal to each other? Should they not be equal to each other? Seems like a good thing to punt on. :-)
18:15AeroNotixcoventry: exactly
18:15gratimaxset theory would answer that for you
18:15amalloycoventry: easy, they're all equal
18:15AeroNotix,(= #{} #{})
18:15clojurebottrue
18:15amalloyif you can find a counterexample from that empty set, i'd be happy to hear it
18:15gratimaxthe empty set is a subset of itself, therefore it is equal
18:16amalloyfor the same reason a collection of one element is/are all equal
18:16coventryThey're also all not equal.
18:19amalloycoventry, that's true, but nobody asked that. (every? f []) is true, as is (not-any? f []), for any f; that's no contradiction that needs to be punted on, just the way empty lists are
18:25coventryOK, I guess it makes sense for (=) and (not=) to return true by the same logic.
18:26coventryI've certainly abused every? that way.
18:26amalloyit's not an abuse at all
19:11danleiin cider, I don't get completion for namespace-qualified symbols. any ideas? (I'm on emacs 23.3.50 cider 0.6.0snapshot, clojure 1.5.1, nrepl 0.2.3, without ac-nrepl)
19:24technomancydanlei: do you mean vars?
19:29danleitechnomancy: yes -- my clojure terminology is a little rusty
19:43deevusIs SICP still a great reference for learning a lisp?
19:44AimHereI don't think it ever was. It's a great reference for learning computer science.
19:45AimHereIt's there as a survey of programming concepts, and it certainly doesn't hurt anyone to go through it
19:45AimHereYou won't learn everything there is to know about scheme from it; it's very light on macros, for instance
19:46technomancydeevus: I think the Little Schemer is much better for learning the essence of lisp
19:51danleihm, no error message, nothing to find via google. I think I'll just give up on completion for now and call it a night.
19:52devnbest way to do bulk inserts with korma?
19:52devni think im paying for autocommit right now
19:55devnnevermind
19:55danleiseems to be some weird interaction with another package. anyway, good night
20:09deevusThanks AimHere, technomancy
20:10deevusI'm beginning my 2nd year CS in March. Thought it might augment my studies.
20:15AimHereI reckon it will; it's also free online by the way, so if you're worried about blowing your textbook budget on a book you don't like, you can check first
20:15AimHereJust don't expect it to be a Lisp programming manual
20:16deevusYeah okay
20:16deevusIs there a free e-book version online, or just HTML?
20:17AimHereI think it's html, but I'd guess that it's likely been pdfed by now
20:17AimHereI do vaguely remember a texinfo version
22:21sdegutisI found this cool article on recursion:
22:21sdegutishttps://news.ycombinator.com/item?id=7164655
22:26sdegutis v