Skip to content

Instantly share code, notes, and snippets.

@luxbock
Created January 16, 2014 04:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save luxbock/8449766 to your computer and use it in GitHub Desktop.
Save luxbock/8449766 to your computer and use it in GitHub Desktop.
06:18 *** luxbock JOIN
06:18 *** TOPIC Clojure, the language http://clojure.org |
Currently at 1.5.1; top analysts expect this to be
followed by newer versions with still higher
numbers:
https://github.com/clojure/clojure/blob/master/changes.md
| discussion:
http://groups.google.com/group/clojure | Trying to
convince others to use Haskell is permitted between
0200 and 0500 UTC. (technomancy on Tue Jan 14
06:12:54 2014)
06:18 *** NAMES @ChanServ [1]brian_ [Neurotic] _1126 _5kg _eric
_janne _Vi `calebmadrigal_ `cbp abaker abeaumont_
aconbere actionshrimp adamhill adammh Adeon
adhollander AdmiralBumbleBee AeroNotix aftershave
ahihi AimHere aka akhudek aking akl akurilin alew
alexbaranosky algernon Alina-malina alindeman also
alxlit amackera amalloy_ ambroff_ amro andersf
andrewstewart anekos__ anhall_ apetresc Arafangion
arbscht arcatan ari` arkh arohner arrdem arubin Ash
aspotashev__ audaxion augustl avdi averell
awalters_ AWizzArd babilen bakedb balpert bass3m
bbloom bdash benzap beppu_ bgilbert binski
Biohazard birryree bitemyapp bjorkintosh
BlankVerse_ blk Blkt blooberr__ bmath BobSchack
bobwilliams Bodil boodle boogie bostonou_ boyscared
brackets brainproxy brettweavnet brianwong brixen
Bronsa broquaint bruceadams bufferloss bunzen_
bwreilly canassa cannedprimates cantsin cespare
charliekilo|away Chasm chavezgu chewbranca
ChiralSym choas ChongLi chouser_log Chousuke
chrisrossi chriswk ck- cldwalker___ clojurebot
Clome cmbntr cmn coaxmeta1 codejury codelahoma
coffeejunk cojennin conan ConstantineXVI
CookedGryphon corecode cored coventry cow-orker Cr8
cross cYmen_ d0c0nnor daekano Daeken daemian
dakrone dan danielglauser danlarkin danlentz
danlucraft danoyoung danvet darthdeus davidbe__
dcolish ddima deadghost dean|away demolith1 deni
Deraen Derander_ DerGuteMoritz dermatthias devinus
devn divyansr__ djjolicoeur djljr djsecilla dnolen
dobladez dobry-den DomKM dotemacs dsantiago dsrx
dyreshark dziga eagleflo edoloughlin edoloughlin2
edw eevar effy_ efjboss egghead egosum ehd eigenjoy
eigenlicht elasticdog emacsnw_ Ember- emlyn ered
erewhon eric_normand Ernestas EToS Excurio expez
EzeQL FatsDT Fauxgrammer_ fbernier felipe` fen_
fgallina fikusz firesofmay Fitzsimmons fmu foolano
ForNeVeR Foxboron fpk^away fractastical
frankgerhardt__ fuziontech gcmalloc_ gdev genehack_
geoffeg geoffh gerard0 gf3 gfredericks ggherdov
gideonite gigetoo gilliard gko gluegadget Gooder`
gozala grandy gravity_ gregoriokusowski
gregorstocks grim_radical grncdr groot ground4
gstamp guilleiguaran hakvroot_ halorgium
hanDerPeder hash heath Hebo helgikrs hfaafb hhenkel
hiredman hlprmnky honkfestival honza housejester2
hsalokor hugod hyperboreean hyPiRion i_s ianeslick
ibdknox icedp ieure igorw ikitommi_ imkmf_ indigo
insamniac ior3k ipostelnik irq0 itruslove ivan
ivan\ ivan` iwilcox j0ni jack_rabbit jaimef jamiei
janelwang_ Janiczek jarpiain jave jayne jaywatt
jcromartie jcrossley3 jcsims jdag JDShu jergason
jetlag jgmize Jii_ jjl`_ jjttjj jkj_ jleclanche
jlewis jlouis jml jocrau jodaro_ joegallo_ jonasac
jonasw jonathanj JonMR Joreji joshskidmore josteink
jpn jql jschairb_ JStoker jtoy jumblerg
justicefries justin_smith justinjaffray justinmcp_
jweiss jwieringa jzelinskie Kallikrate Kallikrates
kandinski kanja karbak karls kategeek_ katratxo kaw
KDr2 keen__ KeithPM kephale kgerman kizzx21 kliph`
klobucar_ kludge` kmicu Kneferilis knyon
knyppeldynan koalalla1a konr_ koreth_ kraft
kristian- kristof Kruppe ktsuji kylev_ kyrre l1x
l2x l3dx l4u- lancepantz_ leathekd leechbook leifw_
lemonodor lenstr Leonidas leptonix lfranchi
Licenser llasram lluchs lmarburger lnostdal
lobotomy locks lokydor looper lopex lpvb lstc
lucian luigy lumafi lunk_ luxbock Luyt lv_ ly- m0g
m_3_ m_m17 mabes_ MacCoaster MacDaddy machuga
madscientist_ magnars maio majoh malyn Mandus
maravillas marsam matko matt444 matt_c matthavener
mattrepl mawuli mcav_ mccraig mdrogalis Mendor|s1r
mercwithamouth metadaddy metellus mgaare mheld
michaniskin microamp` Mikalv mikerod mimieux miql
mischanix mischov mjc mknoszlig mlb- mmitchell
mmullis mnemnion mocker Morgawr mpereira mrb_bk
mrBliss mrcheeks mrhanky mrowe msassak msgodf mtd
musicalchair Myk267 mysamdog n_b Natch navgeet_
nDuff necronian nicley nighty^_ ninjudd nlew nmeum
noidi noncom noonian noplamodo normanrichards
nseger nuclearsandwich nullman numberten octe
Oddman Odin- Odinodin ohcibi OlegYch omarkj
onthestairs ontoillogical opqdonut ordnungswidrig
orkaa ormiret Orva oubiwann ozzloy patchwork
patrickod paulweb515 pcarrier pcn pdurbin
pel_daniel pepijndevos peregrin_ peregrine81
petehunt peterdon pisketti pjstadig poggio poikon_
pradeepc prip Profpatsch progo pyrtsa pyykkis qrada
quizdr qz racycle radix raek rafl Ragnor rainbyte
raiskaillaan ranek raoul rasmusto Raynes Raynos
rbanffy rbolkey rboyd_ rdd redinger reeses
reiddraper replicant retzkek rgrinberg rhg135 rhoml
riley526 rippy rjknight rkneufeld rlb rlr robink_
rotty_ rovar rowth_ rplaca rs0 rsenior rtl ruff
rufoa runningskull rurumate1 rxe3 ryanf
ryanflorence ryland_ s4muel saiam samflores_
saolsen saurik_ scape scgilardi schmir schwap_
scizo Scorchin scottj scttnlsn seancorfield
seangrove sebastianb sebber SegFaultAX septomin
sethalves seubert sghai_afk shadower Shambles_
shaungilchrist shep-home shep-werk shiney shira
shiranaihito SHODAN shoky si14 silven simcop2387
sinemetu1 sjl Slackwise slpsys sluukkonen smiler
snikkers so sobel socksy solussd sorabji5252
Sorella_ sorenmacbeth SparkySparkyBoom SpiderByte
spjt splunk srcerer sritchie sross07 ssedano
ssfrr_afk stain statonjr steerio stevenfx sturner
subbyyy_ sundbp sw1nn swart sxn synfinatic TakeV
talios tbaldrid_ tcrawley-away tcrayford
technomancy Ted telex tephra terjesb terom
teslanick1 testclo TEttinger TEttinger2 tfnico
ThaDon the-kenny TheBusby TheMoonMaster_
ThePawnBreak thorstadt ticking TimMc tmarble tobyp
Tolstoy tomaw tomhs_ tomjoro tomku tos9 ToxicFrog
tpatja_ tpope Tristam TristamWrk troezen Tuna-Fish
turtil twem2 Uatec ucb unsymbol uris77_ uruviel_
ustunozgur vdm VFe_ Viesti vili vilmibm vixns
vizant0 voldyman vsync waf wafflepilot wdouglas`
wedr whee whilo_ whoahbot whr Wild_Cat wilfredh
willb wink wjlroe wkelly wolfes wolfes1 wormphlegm
wunki WWWest1 xeqi xian xnil Xorlev xuser yacin_
Yamazaki-kun yarou yazirian yedi yeshuah
yogthos|away yumike zaiste zakwilson zaphar_p1
Zariel zby_ zenoli zeroem zerokarmaleft zerowidth
zeroz_ zilti zmansiv zoldar ztellman zz_anildigital
zz_karupanerura
06:18 <***> Buffer Playback...
06:18 <xuser> 06:08 bitemyapp: yes
06:18 <bitemyapp> 06:08 xuser: if you use something named "dev" in
production you deserve what'll come to you.
06:18 <bitemyapp> 06:08 xuser: it's H2.
06:18 <bitemyapp> 06:08 you do not...want to use H2 in
production-anything.
06:18 <jjl`_> 06:08 to be fair, it refers to it as 'transactor
local', as opposed to 'dev'
06:18 <bitemyapp> 06:09 jjl`_: the config file says "dev"
06:18 <bitemyapp> 06:09 when people ask questions, I check my code,
not their godforsaken website.
06:18 <bitemyapp> 06:09 their documentation has not historically
helped us much.
06:18 <jjl`_> 06:09 :)
06:18 <bitemyapp> 06:09 working code and pestering them via support
went much further.
06:18 <technomancy> 06:10 sritchie: I think it might have been a
workaround for a bug in older lein versions; is
it still around?
06:18 <sritchie> 06:10 just showed up on heroku
06:18 <technomancy> 06:10 sritchie: on a recently-deployed app?
06:18 <sritchie> 06:10 yeah, just a minute ago
06:18 <sritchie> 06:11 technomancy: I had to do some really funky
build stuff to get around these issues with Austin
destroying my AOT compilation...
06:18 <technomancy> 06:11 ok, means I forgot to do some cleanup is
all
06:18 <sritchie> 06:11 so, liberal use of ^:replace
06:18 <technomancy> 06:11 should be able to safely ignore it
06:18 <sritchie> 06:12 okay, cool
06:18 <matt444> 06:13 If you right a function that uses chans
internally, does a function that uses it need to
know that chans are being used, need to use any
special syntax?
06:18 <matt444> 06:13 They have to use take!, right?
06:18 <matt444> 06:16 or no, you use <!
06:18 <***> Playback Complete.
06:18 *** scalabl3 JOIN
06:18 *** leifw_ NICK leifw
06:18 *** konr_ NICK konr
06:18 *** aspotashev__ QUIT Ping timeout: 260 seconds
06:18 *** saint_cypher JOIN
06:19 *** devinus QUIT
06:19 *** SpiderByte QUIT Ping timeout: 245 seconds
06:19 *** Sorella_ NICK Sorella
06:19 <shaungilchrist> like function that returns a chan you mean?
06:21 <xuser> bitemyapp: you are worried about aws lock-in but not
datomic lock-in?
06:21 <scape> :)
06:22 *** lemonodor QUIT Quit: lemonodor
06:22 *** subbyyy_ QUIT Ping timeout: 248 seconds
06:22 [technomancy hands xuser a copy of who_we_hate_today.csv]
06:22 <technomancy> see, no datomic
06:22 <scape> lol
06:22 <technomancy> carry on; nothing to see here =)
06:23 *** nlew_ JOIN
06:23 *** bkearns JOIN
06:24 *** mrevil JOIN
06:24 <justin_smith> regarding aws lockin, who good an option is
openstack, and how hard is it to target
openstack as an aws replacement?
06:24 *** piranha JOIN
06:24 *** mrcheeks QUIT Quit: ERC Version 5.3 (IRC client for
Emacs)
06:24 <alew> I heard openstack isn't doing so well
06:25 *** nlew QUIT Ping timeout: 272 seconds
06:25 *** ranek QUIT Quit: Leaving.
06:25 *** zby JOIN
06:25 <scape> I was rather happy with Linode, AWS pricing fluxuates
too easily
06:25 *** mabes_ QUIT Remote host closed the connection
06:25 <nDuff> justin_smith: *shrug*. Depends on how much AWS
infrastructure you're using.
06:25 *** Joreji QUIT Remote host closed the connection
06:26 <nDuff> justin_smith: ...Amazon is certainly adding new APIs
faster than they're being implemented elsewhere.
06:26 *** lemonodor JOIN
06:26 *** mabes JOIN
06:26 *** zby_ QUIT Ping timeout: 276 seconds
06:26 *** ranek JOIN
06:26 *** thenovices JOIN
06:26 *** marr JOIN
06:26 *** wolfes1 QUIT Quit: Leaving.
06:27 *** danoyoung QUIT Quit: danoyoung
06:27 *** lucian QUIT Remote host closed the connection
06:28 *** lucian JOIN
06:29 *** bgilbert QUIT Quit: My MacBook has gone to sleep. ZZZzzz…
06:29 *** kalloc JOIN
06:29 *** piranha QUIT Ping timeout: 248 seconds
06:30 <luxbock> I'm trying to solve Project Euler problem 3 without
looking at other peoples solutions and I'm stuck
06:30 <luxbock> https://gist.github.com/8446851
06:30 *** kliph` QUIT Ping timeout: 265 seconds
06:30 *** mabes QUIT Ping timeout: 246 seconds
06:30 *** pdk JOIN
06:30 *** ranek QUIT Client Quit
06:30 *** sinemetu1 NICK sgarrett|afk
06:30 <luxbock> the number presented in the problem is so large
that it jams my repl
06:30 *** tcrawley-away NICK tcrawley
06:31 *** thenovices QUIT Ping timeout: 246 seconds
06:31 *** gws JOIN
06:31 <bitemyapp> xuser: I'm pretty grumpy about the fact that it's
not open source.
06:31 <bitemyapp> xuser: but I don't have a great alternative at
the moment for a historical database.
06:31 <arrdem> luxbock: you can write a better primality test than
that...
06:31 <arrdem> luxbock: also memoization would be nice here
06:32 <hyPiRion> luxbock: remember that factors are not the same as
prime factors
06:32 *** egosum QUIT Remote host closed the connection
06:32 <luxbock> ah, what algorithm should I be using? I got this
one from SO
06:32 <arrdem> luxbock: this is good, you can just tune it some
06:32 <luxbock> oh yeah the factors function isn't really used for
anything
06:32 <arrdem> luxbock: also hyPiRion hit this nail on the head
06:32 *** ranek JOIN
06:33 *** lucian QUIT Ping timeout: 272 seconds
06:33 *** TheMoonMaster_ NICK TheMoonMaster
06:33 <arrdem> luxbock: really what you want to do is build a cache
of {a | (prime? a) && (zero? (n % a))}
06:33 <luxbock> I had it there from an earlier attempt that was
doomed to fail
06:33 <arrdem> luxbock: which is trivial if you just compute all
prime factors up to (sqrt n)
06:34 <arrdem> sorry. just primes. no factor requirement.
06:34 *** tmciver JOIN
06:34 <arrdem> then the largest n \in that set is your largest
prime factor
06:34 *** kalloc QUIT Ping timeout: 248 seconds
06:34 *** riotonthebay JOIN
06:34 <luxbock> alright, I'll check out memoize as well
06:35 <arrdem> luxbock: memoize is really gonna help if you do this
counting up thing.
06:35 <luxbock> but shouldn't the way I was doing it be even
faster? although I now realize that starting at
half of n is far too high
06:35 *** mmitchell QUIT Quit: Leaving...
06:35 [arrdem wishes he could just hack on Project Euler rather
than do coursework]
06:35 <luxbock> do I really have to calculate all the primes
between 2 to n, when I only need the highest?
06:36 <arrdem> luxbock: not [8,n), [8,(sqrt n)]
06:36 <arrdem> well... I guess it's really [4,sqrt(n)]
06:37 *** teslanick1 QUIT Quit: Leaving.
06:37 <hyPiRion> luxbock: it's sufficient to calculate up to
sqrt(n), if you divide the number with the primes
you've found so far
06:37 <arrdem> the point is that if you count _up_ you have this
O(1) primality table lookup from memoize on your
side.
06:38 *** sgarrett|afk NICK sinemetu1
06:38 *** WWWest1 QUIT Ping timeout: 252 seconds
06:38 *** ranek QUIT Quit: Leaving.
06:38 <luxbock> ah, so I should be counting up and not down
06:38 *** mabes JOIN
06:38 <arrdem> luxbock: yes, and the table of known primes is
crucial to doing this really fast.
06:39 *** nighty^ JOIN
06:39 <arrdem> luxbock: retaining a table known primes will be much
more efficient than memoizing the entire prime?
function.
06:40 *** cgag JOIN
06:41 <hyPiRion> It's not that critical for this one, actually.
06:41 <luxbock> so what would be a better test for primality?
06:41 <luxbock> http://en.literateprograms.org/Miller-Rabin_primality_test_%28Clojure%29
06:41 <luxbock> I found this but it seems like an overkill
06:42 <hyPiRion> luxbock: the primality test you already got is
sufficient for this problem
06:42 <luxbock> ok
06:42 *** tupi JOIN
06:43 <hyPiRion> (Shameless self-plug: If you need a more
performant one later,
https://github.com/hyPiRion/primes is pretty fast
and is thread-safe)
06:43 *** ChiralSym QUIT Read error: Connection reset by peer
06:44 *** ChiralSym JOIN
06:44 <luxbock> cool
06:44 *** juxovec JOIN
06:45 *** kanja QUIT Ping timeout: 260 seconds
06:45 *** jumblerg QUIT Quit: My MacBook Pro has gone to sleep.
ZZZzzz…
06:46 *** und3rt JOIN
06:47 *** nighty^ QUIT Read error: Connection reset by peer
06:47 *** onthesta1rs JOIN
06:48 <koreth_> For what it's worth, I found 4clojure and
exercism.io to be better Clojure learning tools
than Project Euler. PE is great for testing your
computational mathematics skills but its problems
are mostly pretty far removed from anything you'd
actually do in real life (well, unless you are a
mathematician!)
06:48 *** rsenior QUIT Remote host closed the connection
06:48 *** brettweavnet QUIT Quit: Bye
06:48 *** kanja JOIN
06:49 *** roflcopter JOIN
06:49 *** roflcopter QUIT Remote host closed the connection
06:49 *** rsenior JOIN
06:49 <luxbock> yeah I know, I'm kind of learning how to use
simple-check at the same time
06:49 *** juxovec QUIT Ping timeout: 252 seconds
06:49 *** eric_normand QUIT Quit: eric_normand
06:49 <hyPiRion> luxbock: In this case, it's sufficient to find the
prime numbers below sqrt(n) dividing n. That can
be done through `(filter (fn [num] (and (prime?
num) (divides? n num))) (range (Math/sqrt n)))`
06:49 *** cemerick JOIN
06:50 *** michaniskin QUIT Quit: michaniskin
06:50 <luxbock> oh duh, and here I was writing a loop
06:50 *** masondesu JOIN
06:51 *** chrisrossi QUIT Ping timeout: 272 seconds
06:51 *** ior3k QUIT Remote host closed the connection
06:52 *** mrevil QUIT Ping timeout: 246 seconds
06:52 <hyPiRion> it's one of the things which comes with training
in functional languages
06:52 *** sinemetu1 QUIT Quit: afk
06:52 *** ne-on JOIN
06:52 *** chrisrossi JOIN
06:53 <luxbock> I think that's how I would usually write it, but I
had this idea in my head that loops are more
efficient
06:54 <bitemyapp> luxbock: why?
06:54 *** zbyte64 JOIN
06:54 *** riotonthebay QUIT Remote host closed the connection
06:54 <luxbock> from reading Mikera's posts on core.matrix, but
that level of optimization is far above my skill
level
06:54 <bitemyapp> luxbock: some of that might have more to do with
the limitations of Clojure than anything
involving FP.
06:55 *** kanja QUIT Ping timeout: 272 seconds
06:55 <bitemyapp> luxbock: there are languages that do things like
loop and stream fusion of higher order functions
like fold.
06:55 *** masondesu QUIT Ping timeout: 246 seconds
06:55 <luxbock> actually the other purpose for playing with project
Euler problems for me was to do micro benchmarks
with criterium for different approaches
06:55 *** awalters_ QUIT Ping timeout: 276 seconds
06:55 *** lstc QUIT
06:55 <luxbock> yeah I don't doubt that at all
06:56 <luxbock> for me compilers are pure black box magic though
06:56 *** solussd QUIT Quit: solussd
06:56 <luxbock> so I go by bits and pieces of what I read here and
there
06:56 *** SparkySparkyBoom QUIT Quit: Leaving
06:57 <zbyte64> Anyone know how to write an om component (reactjs)
that returns a string as html? (the string is
generated by a 3rd party js library)
06:57 *** kanja JOIN
06:57 <luxbock> but this is actually exactly what I wanted to do..
I'll write the loop version next and then compare
them
06:57 <zbyte64> returning a function or a string creates an
invariant exception
06:58 *** tomjoro QUIT Remote host closed the connection
06:58 *** oubiwann QUIT Ping timeout: 260 seconds
06:59 *** patchwork1 JOIN
07:00 *** noonian QUIT Remote host closed the connection
07:01 *** em-dash JOIN
07:02 *** lucian JOIN
07:03 *** em-dash QUIT Client Quit
07:03 *** arubin QUIT
07:03 *** federkasten JOIN
07:03 *** patchwork QUIT Ping timeout: 272 seconds
07:04 *** danoyoung JOIN
07:04 *** onthesta1rs QUIT Ping timeout: 252 seconds
07:05 *** adamhill QUIT Quit: adamhill
07:05 *** audaxion QUIT Quit: My MacBook Pro has gone to sleep.
ZZZzzz…
07:07 *** gregoriokusows-1 JOIN
07:07 *** gregoriokusowski QUIT Ping timeout: 260 seconds
07:08 *** ly- QUIT Remote host closed the connection
07:08 *** danvet QUIT Ping timeout: 260 seconds
07:08 *** mmitchell JOIN
07:08 *** ustunozgur QUIT Remote host closed the connection
07:08 *** ustunozgur JOIN
07:08 *** bja JOIN
07:09 *** kovasb JOIN
07:10 *** yogthos|away NICK yogthos
07:10 *** ly- JOIN
07:11 *** john2x JOIN
07:11 *** jtdowney JOIN
07:14 *** matt444 QUIT Remote host closed the connection
07:14 *** thickey JOIN
07:15 *** riotonthebay JOIN
07:15 *** subbyyy_ JOIN
07:16 *** riotonthebay QUIT Remote host closed the connection
07:16 *** infynyxx JOIN
07:17 *** rohni JOIN
07:17 *** aconbere QUIT Remote host closed the connection
07:17 *** marcopolo` JOIN
07:17 *** tbaldrid_ QUIT Remote host closed the connection
07:18 *** kschrader JOIN
07:18 *** teslanick JOIN
07:19 *** ambrosebs JOIN
07:19 *** kschrader QUIT Read error: Connection reset by peer
07:19 *** kschrade_ JOIN
07:19 *** michaniskin JOIN
07:19 *** cemerick QUIT Ping timeout: 252 seconds
07:22 *** riotonthebay JOIN
07:22 *** marcopolo` QUIT Ping timeout: 272 seconds
07:23 <alew> are there any good instrumentation solutions for
clojure ala new relic?
07:23 <technomancy> new relic works with clojure
07:24 *** und3rt_ JOIN
07:24 <alew> not automatically
07:24 <alew> you have to provide annotations
07:25 <technomancy> it does a bunch of stuff without annotations
07:25 *** piranha JOIN
07:25 *** und3rt QUIT Ping timeout: 245 seconds
07:25 *** und3rt_ NICK und3rt
07:25 <technomancy> maybe with annotations it does more though
07:25 *** infynyxx QUIT Remote host closed the connection
07:25 *** mabes QUIT Remote host closed the connection
07:26 *** itruslove QUIT Remote host closed the connection
07:26 <alew> Throwing it up on heroku with just the default setup
only shows me memory usage, nothing else
07:26 *** danielglauser QUIT Remote host closed the connection
07:26 <technomancy> hm; I have seen it do a pretty thorough
profiling without changing any source
07:26 <technomancy> this was 2 years ago though
07:26 *** piranha QUIT Read error: Connection reset by peer
07:26 *** thenovices JOIN
07:26 <alew> apparently one of the versions they released had
accidently support for ring instrumentation
07:27 *** piranha JOIN
07:27 <quizdr> is there a practical limit to the number of args you
can send to apply? in common lisp, this limit can be
very low dependent on the implementation
07:28 *** abaker QUIT Quit: My MacBook Pro has gone to sleep.
ZZZzzz…
07:29 <rasmusto> quizdr: there's a limit to the number of arguments
that a fn can take, but you can do [blah & more]
to get the rest
07:29 *** tomjoro JOIN
07:29 <nDuff> quizdr: in general, Clojure falls back to being
inefficient if you're using a really large number, as
opposed to just not working.
07:30 <nDuff> (err, number of args)
07:30 <cgag> https://github.com/clojure/clojure/blob/master/src/clj/clojure/core.clj#L612
07:30 *** squidz JOIN
07:30 <cgag> if you're curious
07:30 *** vixns QUIT Quit: vixns
07:30 *** kalloc JOIN
07:31 <nDuff> quizdr: ...though there _are_ some fairly low limits
on how many args a function can take if you're using
primitive data types.
07:31 *** ambrosebs QUIT Remote host closed the connection
07:31 *** yarou QUIT Quit: This computer has gone to sleep
07:31 *** piranha QUIT Ping timeout: 272 seconds
07:31 *** ambrosebs JOIN
07:31 <quizdr> ok, i was reading about how some functions use apply
in their implementation, such as join.
07:31 *** surrealanalysis JOIN
07:32 *** jumblerg JOIN
07:32 *** Sgeo JOIN
07:32 <nDuff> quizdr: *nod*. In general, that'll fall back to an
implementation that passes an Object[] as the last
argument (which is how Java's varargs work in
general), and can thus handle an arbitrary length.
07:33 *** und3rt QUIT Quit: Colloquy for iPhone -
http://colloquy.mobi
07:33 *** zz_karupanerura NICK karupanerura
07:34 *** ddellacosta JOIN
07:34 *** ambroseb_ JOIN
07:34 *** tbaldridge JOIN
07:35 *** ambrosebs QUIT Read error: Connection reset by peer
07:35 *** `cbp QUIT Ping timeout: 272 seconds
07:36 *** kalloc QUIT Ping timeout: 252 seconds
07:38 *** tomjoro QUIT Ping timeout: 276 seconds
07:40 *** rfarrjr JOIN
07:40 *** AdmiralBumbleBee QUIT Quit: AdmiralBumbleBee
07:40 *** riotonthebay QUIT Remote host closed the connection
07:40 *** vky JOIN
07:40 *** jtdowney QUIT Read error: Connection reset by peer
07:41 *** und3rt JOIN
07:41 *** sturner PART #clojure
07:42 *** ustunozgur QUIT Remote host closed the connection
07:43 *** jaimef QUIT Excess Flood
07:43 *** lsdafjklsd JOIN
07:43 *** ChiralSym QUIT Read error: Connection reset by peer
07:43 <lsdafjklsd> Anyone using lightable to develop clojurescript
apps and know how to hook up a browser repl?
07:43 <john2x> anybody using revise? I was wondering on what's the
standard way of creating the database and tables..
would an arbitrary "script" (that's not part of the
main project's namespace?) that creates it suffice?
07:43 *** ChiralSym JOIN
07:43 *** sturner_ JOIN
07:44 *** mklappstuhl JOIN
07:44 *** juxovec JOIN
07:45 *** zby_ JOIN
07:46 *** zby QUIT Ping timeout: 245 seconds
07:46 *** edoloughlin QUIT Ping timeout: 245 seconds
07:46 *** edoloughlin2 QUIT Ping timeout: 246 seconds
07:47 *** jaimef JOIN
07:47 *** mklappstuhl QUIT Remote host closed the connection
07:47 *** Kallikrate QUIT Quit: Leaving.
07:48 <technomancy> clojurebot: clojars migrations?
07:48 <clojurebot> Cool story bro.
07:48 *** aconbere JOIN
07:48 <technomancy> aw come on
07:48 *** matt444 JOIN
07:48 <technomancy> I know I've taught you that before
07:48 <matt444> What is the difference between a chan and port?
07:48 <matt444> Seem to the same
07:48 *** ruff QUIT Quit: ChatZilla 0.9.90.1 [Firefox
26.0/20131206145143]
07:48 *** thickey QUIT Quit: thickey
07:49 <technomancy> clojurebot: clojars migrations |are| just a
namespace with functions:
https://github.com/ato/clojars-web/blob/master/src/clojars/db/migrate.clj
07:49 <clojurebot> Ack. Ack.
07:49 <technomancy> john2x: ^ check that out
07:49 *** juxovec QUIT Ping timeout: 272 seconds
07:49 *** thickey JOIN
07:49 *** EzeQL__ JOIN
07:49 *** yarou JOIN
07:52 *** blk QUIT Ping timeout: 276 seconds
07:52 *** firesofmay QUIT Ping timeout: 252 seconds
07:52 *** aconbere QUIT Ping timeout: 252 seconds
07:52 *** thenovices QUIT Remote host closed the connection
07:53 *** EzeQL QUIT Ping timeout: 245 seconds
07:53 *** john2x QUIT Read error: Connection timed out
07:54 *** john2x JOIN
07:54 *** dobladez QUIT Ping timeout: 260 seconds
07:54 *** sturner_ QUIT Remote host closed the connection
07:55 *** thickey QUIT Quit: thickey
07:55 *** teslanick QUIT Quit: Leaving.
07:56 *** mikerod QUIT Ping timeout: 272 seconds
07:56 *** peregrin_ QUIT
07:56 <lsdafjklsd> clojurebot: clojars migrations?
07:56 <clojurebot> clojars migrations are just a namespace with
functions:
https://github.com/ato/clojars-web/blob/master/src/clojars/db/migrate.clj
07:56 *** safety JOIN
07:57 *** lsdafjklsd QUIT
07:58 *** tcrawley NICK tcrawley-away
07:58 *** bkearns QUIT Quit: Leaving.
07:58 *** john2x_ JOIN
07:59 *** john2x QUIT Read error: Connection reset by peer
07:59 *** lstc JOIN
08:00 *** OscarZ JOIN
08:01 *** Wild_Cat QUIT Quit: Leaving
08:01 *** noonian JOIN
08:01 *** yedi QUIT Remote host closed the connection
08:02 *** mercwithamouth QUIT Ping timeout: 265 seconds
08:02 *** patchwork JOIN
08:04 *** patchwork1 QUIT Ping timeout: 252 seconds
08:04 *** ne-on QUIT Remote host closed the connection
08:04 *** nlew_ QUIT Remote host closed the connection
08:05 *** ne-on JOIN
08:05 *** nlew JOIN
08:05 *** eric_normand JOIN
08:06 *** subbyyy_ QUIT Ping timeout: 245 seconds
08:06 *** Excureo JOIN
08:06 *** riotonthebay JOIN
08:06 *** JanxSpirit JOIN
08:06 *** benzap QUIT Ping timeout: 260 seconds
08:07 *** cored QUIT Ping timeout: 276 seconds
08:07 *** Excurio QUIT Ping timeout: 272 seconds
08:08 *** boogie QUIT Remote host closed the connection
08:08 *** _adie JOIN
08:09 *** firesofmay JOIN
08:09 *** bkearns JOIN
08:09 *** ne-on QUIT Ping timeout: 252 seconds
08:10 *** jackdanger JOIN
08:10 *** keen__ QUIT Ping timeout: 272 seconds
08:10 *** bmath QUIT Quit: Leaving.
08:10 *** statonjr QUIT Quit: statonjr
08:11 *** jcrossley3 NICK jcrossley3-away
08:12 *** federkasten QUIT Remote host closed the connection
08:12 *** schmir QUIT Remote host closed the connection
08:13 *** shiranaihito QUIT Remote host closed the connection
08:13 <arrdem> technomancy: does clojurebot not provide inference
engine responses to arbitrary channel text?
08:13 <arrdem> I'm looking at the inference engine and it doesn't
look like arbitrary patterns can be matched...
08:14 <technomancy> arrdem: I feel like if I dove into the source
it would take away the mystery
08:15 *** G0SUB JOIN
08:15 *** dacc JOIN
08:15 <technomancy> arrdem: that said I think for every line
there's a 1% chance he'll interpret it as being
addressed to him
08:15 <arohner> when parsing some XML w/ clojure.data.xml, I'm
hitting https://gist.github.com/arohner/8448042 I
think it has something to do w/ XML namespaces?
08:15 *** thickey JOIN
08:16 <technomancy> "Namespaces? But XML doesn't have namespaces."
--every XML library author, at first
08:16 *** zeroem PART #clojure
08:16 <arohner> :-)
08:16 *** nlew QUIT Remote host closed the connection
08:17 <arrdem> technomancy: ok. I was kinda looking for a way to
make clojurebot match "*.pastebin*."
08:17 *** OscarZ QUIT Read error: Connection reset by peer
08:18 *** nlew JOIN
08:18 *** jackdanger QUIT Quit: Leaving.
08:19 *** G0SUB QUIT Ping timeout: 246 seconds
08:19 *** kalloc JOIN
08:21 *** kanja QUIT Ping timeout: 272 seconds
08:21 *** matt444 QUIT Ping timeout: 245 seconds
08:22 *** kalloc_ JOIN
08:22 *** jonhinson JOIN
08:23 *** marr QUIT Ping timeout: 253 seconds
08:24 *** thenovices JOIN
08:24 *** kanja JOIN
08:24 *** tbaldridge QUIT Remote host closed the connection
08:24 *** EzeQL JOIN
08:24 *** kalloc QUIT Ping timeout: 248 seconds
08:24 <squidz> is there a good way to profile clojurescript
performance?
08:24 *** bkearns QUIT Ping timeout: 265 seconds
08:25 *** WWWest JOIN
08:26 <bbloom> squidz: w/ source maps, standard js profilign tools
apply
08:26 <squidz> bbloom: okay thanks
08:26 *** lucian QUIT Remote host closed the connection
08:27 *** kalloc_ QUIT Ping timeout: 248 seconds
08:27 *** fractastical QUIT Quit: fractastical
08:27 *** lucian JOIN
08:27 *** _adie QUIT Quit: Computer has gone to sleep.
08:27 *** piranha JOIN
08:27 *** bkearns JOIN
08:27 *** nlew QUIT Remote host closed the connection
08:28 *** ka2u JOIN
08:28 *** EzeQL__ QUIT Ping timeout: 276 seconds
08:28 *** nlew JOIN
08:28 *** adamhill JOIN
08:29 *** thenovices QUIT Ping timeout: 272 seconds
08:29 *** kalloc JOIN
08:29 *** john2x_ QUIT Read error: Connection timed out
08:30 *** tbaldridge JOIN
08:30 *** john2x JOIN
08:31 *** _adie JOIN
08:32 *** lucian QUIT Ping timeout: 265 seconds
08:32 *** piranha QUIT Ping timeout: 272 seconds
08:33 *** davorb JOIN
08:33 <davorb> hey. i'm new to clojure, but i've used common lisp
before. can i use slime with clojure or something
similar?
08:33 <jack_rabbit> nrepl
08:34 <jack_rabbit> davorb, it's about the same.
08:34 <davorb> thanks jack_rabbit
08:34 <jack_rabbit> np :)
08:34 *** tomjoro JOIN
08:34 *** und3rt QUIT Quit: Colloquy for iPhone -
http://colloquy.mobi
08:34 *** vizant0 QUIT Quit: Leaving.
08:34 *** riotonthebay QUIT Remote host closed the connection
08:35 *** kalloc QUIT Ping timeout: 276 seconds
08:35 *** matt444 JOIN
08:35 <AimHere> davorb, there IS clojure slime. But everyone
stopped using it when they discovered nrepl
08:35 *** und3rt JOIN
08:36 *** assia_t JOIN
08:36 *** riotonthebay JOIN
08:37 <davorb> and can someone explain to me what leiningen is? is
it like ruby gems or is it like javascript's yeoman?
08:37 <davorb> or is it sort of like grunt?
08:37 <davorb> i've looked at it, and it feels like you've got a
bunch of grunt tasks and then you run them
08:37 <bja> davorb, sorta like grunt. it's a nicer interface to
maven
08:38 <davorb> ah, okay. so it's basically a build manager?
08:38 <bja> yes, but it has a lot of development-related
functionality too
08:38 <AimHere> Something like that. Basically if you're doing
anything in clojure, you want it, and you want it
bad
08:38 <bja> AimHere, if you do stuff in other languages you want it
and want it bad too.
08:39 <bja> want to kill myself when I use pip/virtualenv
08:39 <AimHere> It's clojure's swiss-army build tool
08:39 *** tomjoro QUIT Ping timeout: 272 seconds
08:39 *** tbaldridge QUIT Remote host closed the connection
08:40 <bitemyapp> davorb: Clojure is just a library.
08:40 <bitemyapp> davorb: Leiningen and nrepl are your interfaces
to the language-that-is-a-library
08:40 <davorb> bitemyapp: okay, i think i get it. thanks.
08:41 *** solussd JOIN
08:41 *** nlew QUIT Remote host closed the connection
08:42 *** i_s QUIT Remote host closed the connection
08:43 *** dobladez JOIN
08:43 *** ChiralSym QUIT Read error: Connection reset by peer
08:43 *** `cbp JOIN
08:43 *** assia_t QUIT
08:44 *** ChiralSym JOIN
08:44 *** arubin JOIN
08:44 *** juxovec JOIN
08:47 *** petehunt QUIT Quit: petehunt
08:47 *** echo-area JOIN
08:48 *** adhollander QUIT Quit: Leaving
08:48 *** pel_daniel PART #clojure
08:48 *** juxovec QUIT Ping timeout: 245 seconds
08:49 *** aconbere JOIN
08:49 *** rohni QUIT Quit: Leaving.
08:49 *** chare JOIN
08:49 <chare> ok bad news
08:49 <chare> I had discussion with friends
08:49 *** keen__ JOIN
08:49 <chare> they want ruby on rails
08:49 <chare> tell me that clojure has something I can counter with
08:50 *** mnemnion QUIT Remote host closed the connection
08:50 <cgag> that's a hard battle to win
08:50 <locks> there’s pedestal…
08:51 *** mmullis QUIT Quit: mmullis
08:51 *** nlew JOIN
08:51 <cgag> immutability by default, much better performance,
actual concurrency support
08:51 <bitemyapp> guys
08:51 <bitemyapp> don't waste your time on this person.
08:51 *** racycle QUIT Remote host closed the connection
08:51 *** bgilbert JOIN
08:52 <locks> that’s harsh
08:52 <bitemyapp> He's a troll or at minimum not quite
psychotypical.
08:52 <bitemyapp> locks: he's been trolling this channel since last
year.
08:52 <AimHere> Nothing wrong with a little light trolling
08:52 <bitemyapp> locks: he's the whole reason we had to bring
active ops back.
08:52 <bitemyapp> single-handedly.
08:52 *** ztellman QUIT Quit: Computer has gone to sleep.
08:52 <AimHere> Especially since all it'll get him is a salespitch
for clojure!
08:52 <locks> maybe he just needs love
08:52 <bitemyapp> I'm not exaggerating.
08:52 <bitemyapp> locks: we uh, tried that. He never stops language
trolling. Ever.
08:52 <bitemyapp> locks: months and months on end.
08:52 <bitemyapp> Please stop polluting the channel with this.
08:53 <bitemyapp> If you really want to help him, have him query
you.
08:53 <chare> bitemyapp why dho you hate me
08:53 *** solussd QUIT Quit: solussd
08:53 *** aconbere QUIT Read error: Operation timed out
08:53 <bitemyapp> chare: you don't code.
08:53 <bitemyapp> chare: you waste the time of people that do.
08:53 <chare> you are overexaggerating
08:53 <chare> and what is pedestal
08:54 *** vky QUIT Ping timeout: 246 seconds
08:54 <bitemyapp> you don't need to prefix 'exaggerating' with
'over'.
08:54 <bitemyapp> Exaggeration is exaggeration. Overexaggeration is
redundant.
08:54 <bitemyapp> And I'm not exaggerating.
08:54 <locks> chare: pedestal is a web framework for clojure, it is
very similar to ruby on rails
08:54 <AimHere> overexaggerating is a pretty good self-referential
term.
08:54 <chare> how similar is similiar
08:55 *** calumet JOIN
08:55 *** S11001001 JOIN
08:55 *** mmullis JOIN
08:55 <rkneufeld> locks: wut
08:56 *** S11001001 QUIT Changing host
08:56 *** S11001001 JOIN
08:56 <bja> chare, they are both web frameworks
08:56 [bitemyapp snorts and laughs]
08:56 <locks> chare: they both show HTML in your browser
08:56 <bitemyapp> rkneufeld: but the real question is, do you
*really* want to dive in?
08:56 *** nlew_ JOIN
08:56 *** EzeQL QUIT Ping timeout: 272 seconds
08:57 *** bbloom QUIT Ping timeout: 252 seconds
08:57 *** mmullis QUIT Read error: Connection reset by peer
08:57 *** x4i JOIN
08:57 <bitemyapp> locks: I don't think you've used Pedestal mate.
It's quite nice, but I don't think I'd call it
similar, let alone 'very', to Rails at all. It's
the closest thing Clojure has to a fully
integrated web stack though, which is possibly
desirable if you don't like more componentized
approaches like Ring/Compojure/et al.
08:57 <quizdr> i'm a little confused by the arguments list that
starts out this function, is it a destructing form?
(fn primes-from [n [f & r]] .....
08:58 <bitemyapp> locks: there's a big emphasis in Pedestal on
things that Rails, frankly, can't even do at all.
08:58 <bja> bitemyapp, caribou looks framework-ish
08:58 *** mmullis JOIN
08:58 <locks> bitemyapp: I was suppose to counter-troll him, not
troll you
08:58 <bja> I haven't seen any other frameworks that are being
maintained
08:59 <arrdem> why isn't /ignore working on chare...
08:59 <bja> unless you count immutant
08:59 <locks> I was about to say datomic is a clojure library for
mysql but, well
08:59 *** nlew QUIT Read error: Operation timed out
08:59 <bitemyapp> locks: this isn't trolling and you're propagating
inaccurate information in a public channel and
adding to the pollution. Just stop.
08:59 <AimHere> quizdr, yes, that's what it seems to do
08:59 <bitemyapp> bja: Luminus is what I usually recommend to
people that want a shake-n-bake way to get
started.
08:59 <luxbock> there's also http://hoplon.io/
09:00 <bitemyapp> bja: Caribou is half-way point between the
template-y Luminus and the framework approach.
09:00 <bitemyapp> this is information that could go on the
wiki....hmmm.
09:00 *** daito JOIN
09:00 <chare> what are these supposed things that pedestal can do
but rails can't
09:01 *** nlew_ QUIT Ping timeout: 272 seconds
09:02 <bitemyapp> chare: learn to google, wastrel.
09:02 *** dongchao JOIN
09:03 <chare> bitemyapp: you're the expert so I defer to your
expertise
09:03 *** rbolkey QUIT Quit: My MacBook has gone to sleep. ZZZzzz…
09:03 *** subbyyy_ JOIN
09:03 *** zbyte64 QUIT Quit: Ex-Chat
09:03 *** patchwork1 JOIN
09:04 <bitemyapp> chare: I want some evidence that you're going to
stop wasting peoples' time and start writing code
before I lift a finger on your behalf. You've
wasted countless hours already.
09:04 *** thickey QUIT Quit: View my work at http://tomhickey.com
09:04 *** patchwork1 QUIT Client Quit
09:04 <kristof> "If you don't like componentized appraoches like
Ring/Compojure/et al"
09:04 <bitemyapp> kristof: what?
09:04 *** darthdeus QUIT Quit: Leaving...
09:05 <kristof> You know, once I read somewhere that component mix
and match web development was "the Clojure Way". I
think that was someone justifying the lack of a
full web stack floating around.
09:05 <seubert> it used to be a fuller web stack, this is
intentional
09:05 <quizdr> if I want a function to accept a vector as an
argument, I must use & to access all the elements in
the vector, right? Because just binding the whole
vector to a single argument variable doesn't seem to
do this: (defn gsg [j [r]] [ j r]) returns (gsg 1
[2 4 5 6]) --> [1 2]
09:05 <kristof> Probably.
09:05 <bitemyapp> seubert: not fuller, just more integrated.
09:05 <arrdem> bitemyapp: if one was so inclined you could probably
compute the average response time per word of
#clojure, count the number of words ever sent to
chare/chord and then compute the USD price of wasted
developer time...
09:05 <kristof> What's the equivalent of Rack for Clojure?
09:05 <seubert> right, sorry bitemyapp
09:05 <bitemyapp> kristof: we atomized Noir on purpose.
09:05 <cgag> quizdr: yeah, looks like that takes a number and a
seq, and binds the first element of that seq to f and
the rest of it to r
09:05 <ddellacosta> kristof: ring
09:05 <cgag> oh wow
09:05 <cgag> woops
09:06 <kristof> Oh, that's right
09:06 <bitemyapp> kristof: in Haskell that'd be WAI.
09:06 <bitemyapp> arrdem: tempting.
09:06 *** patchwork QUIT Ping timeout: 252 seconds
09:06 <kristof> Yes, I remember reading about WAI
09:06 <bitemyapp> arrdem: I should invoice the motherfucker.
09:06 *** bgilbert QUIT Quit: My MacBook has gone to sleep. ZZZzzz…
09:06 <bitemyapp> arrdem: and put up a trust fund for learning
Clojure developers that disburses money for
books.
09:06 <bitemyapp> books*
09:06 *** peregrin_ JOIN
09:06 <bitemyapp> you only get reimbursed if you actually read the
book.
09:07 <chare> bitemyapp: if we want clojure to beat ruby then we
need you to be working on the nextgen framework for
clojure
09:07 <kristof> bitemyapp: the funds would go directly to No Starch
Press
09:07 <arrdem> kristof: I find this outcome acceptable
09:07 *** m00nlight JOIN
09:08 <bitemyapp> kristof: LYAH?
09:08 *** masondesu JOIN
09:08 <kristof> chare: I believe he just said not 3 minutes "start
writing code before I lift a finger on your behalf"
09:08 *** jcromartie QUIT Quit: Leaving.
09:08 <kristof> bitemyapp: I wasn't aware that NSP was the one that
published the LYAH book
09:08 <locks> my LYAH book arrived with the spine unglued :(
09:09 *** khaled JOIN
09:09 <locks> hazards of mail
09:09 <kristof> locks: less starch that way
09:09 <bitemyapp> locks: yeowch.
09:09 <bja> chare, I don't know that anyone is looking to beat ruby
09:09 <bitemyapp> kristof: LYSE too.
09:09 <bitemyapp> chare: I don't write that much Clojure outside of
work anymore.
09:09 <kristof> Learn You Some Erlang?
09:09 *** jcromartie JOIN
09:09 <bitemyapp> kristof: yis.
09:10 <locks> I re-started reading joy of clojure 2ed today
09:10 <bitemyapp> locks: still MEAP?
09:10 *** rfarrjr QUIT Remote host closed the connection
09:10 <locks> bitemyapp: yup
09:10 <locks> think so
09:10 *** john2x QUIT Read error: Operation timed out
09:10 <kristof> Did they push the release date on that one?
09:10 *** rfarrjr JOIN
09:10 <quizdr> ah i figured out my brain fry on the destructing
thanks cgag and AimHere
09:10 <bitemyapp> I think I'm already on that. Saw an email update
about it.
09:11 <locks> last update was somewhere last week
09:11 <chare> why is there no learn you a clojure book
09:11 *** EzeQL JOIN
09:11 <locks> kristof: "Expected publication Winter 2014"
09:11 *** jimduey JOIN
09:11 <kristof> locks: Guess I was thinking about something else.
09:11 *** und3rt QUIT Quit: Colloquy for iPhone -
http://colloquy.mobi
09:12 <ddellacosta> chare: Clojure Programming works for that
(http://www.clojurebook.com/)
09:12 <bitemyapp> ddellacosta: and then some.
09:12 *** jackdanger JOIN
09:12 <chare> ddellacosta: not paying
09:12 <quizdr> chard a new book on Web development in Clojure was
just released today
09:13 <quizdr> i meant chare not chard
09:13 <bitemyapp> whatever, that's been one of his names too.
09:13 <quizdr> ha ha
09:13 *** s4muel QUIT Quit: ZNC - http://znc.in
09:14 <ddellacosta> chare: if you need free resources to learn
Clojure, you can start the way I did, with
4clojure and the Clojure core API reference.
That combined with stack overflow and asking
meaningful questions on IRC is a great way to
learn.
09:14 <locks> http://en.wikibooks.org/wiki/Clojure_Programming
09:14 <locks> clojurescriptkoans.com
09:14 <locks> etc
09:14 <ddellacosta> locks: yeah, great links
09:14 <ddellacosta> forgot about clojurescriptkoans
09:15 <locks> the koans aren’t for everyone
09:15 *** s4muel JOIN
09:15 *** ThePawnBreak QUIT Ping timeout: 252 seconds
09:15 *** EzeQL__ JOIN
09:15 *** rfarrjr QUIT Ping timeout: 272 seconds
09:16 <quizdr> wait did chare say there is no clojure book out
there? by last count there are at least 8 or 9 solid
Clojure books in publication
09:16 *** Blackavar JOIN
09:17 <chare> FREE BOK
09:17 <quizdr> chard did you ever go to the cinema?
09:17 <quizdr> chare
09:17 <quizdr> do you go to the cinema ever, or sometimes stop for
a meal at a restaurant?
09:17 <arrdem> bitemyapp: so this dropbox thing worked out pretty
well...
09:18 *** jweiss QUIT Ping timeout: 272 seconds
09:18 <arrdem> bitemyapp: now I have ~/doc/org/* sync magically
across mobile, laptop and desktop :D
09:18 <xuser> chare: http://www.braveclojure.com/
09:18 *** darthdeus JOIN
09:18 <ddellacosta> chare, are you finding any of these links
useful to you?
09:18 <bitemyapp> arrdem: eggscellent :)
09:19 <chare> ddellacosta: I haven't started yet still reading
erlang book
09:19 <ddellacosta> chare: your point?
09:19 <luxbock> arrdem: are you using MobileOrg?
09:20 *** gja JOIN
09:20 <`cbp> clojure cookbook is free
09:21 *** TEttinger QUIT Ping timeout: 246 seconds
09:21 *** john2x JOIN
09:21 *** Blackavar QUIT Ping timeout: 272 seconds
09:23 *** cgag QUIT Quit: Leaving
09:23 <quizdr> there are some great links here, interesting books
i've never heard of and that are free, sweet, thanks
guys. chare hope you are paying attention.
09:24 *** gja QUIT Client Quit
09:24 <jcromartie> http://www.youtube.com/watch?v=XluovrUA6Bk
09:24 *** chronno JOIN
09:24 <ddellacosta> quizdr: glad someone is getting something out
of it. :-)
09:25 *** thenovices JOIN
09:25 <chare> so clojure needs to kill ruby and python thats all I
care about eventually
09:25 <ddellacosta> jcromartie: I think he's holding a copy of "The
Internet Gazette" at the top, excellent
09:26 *** bbloom JOIN
09:26 *** jumblerg QUIT Quit: My MacBook Pro has gone to sleep.
ZZZzzz…
09:26 *** tbaldridge JOIN
09:26 <ddellacosta> chare: alright, I tried to give you the benefit
of the doubt. I wish you adieu and good luck.
09:26 *** Oddman QUIT Quit: I need to do something.. not on IRC.
09:26 *** chavezgu QUIT Read error: Operation timed out
09:26 <quizdr> my first clojure book was the OReilly book. it was a
bit intimidating for someone totally new to this
kind of programming, let alone the language. after
150 pages, i switched to Halloway's book, much more
accessible to a newcomer
09:26 *** David JOIN
09:26 *** darthdeus QUIT Read error: Connection reset by peer
09:27 <quizdr> i look forward to the OReilly book after I have a
few thousand lines of Clojure under my belt
09:27 *** darthdeus JOIN
09:27 <chare> ddellacosta admit it you want python and ruby to die
too
09:27 *** lucian JOIN
09:28 *** ystael JOIN
09:28 *** piranha JOIN
09:28 *** jumblerg JOIN
09:28 *** gja JOIN
09:29 *** kalloc JOIN
09:29 <kristof> chare: Such a hard stance. You fighter! Why do you
feel this way?
09:29 *** thenovices QUIT Ping timeout: 245 seconds
09:30 <chare> kristof I'm just saying what I think not hiding the
politically incorrect view that you're afraid to say
09:30 <quizdr> no kidding. his thinking is very black and white. in
his defense, this is a typical perception for many
with a programmer's mind. but those who appreciate
the grey areas will get more out of programming, and
of life. i think clojure was created with such
perception
09:30 *** DrNex JOIN
09:30 <kristof> chare: You remind me of Napoleon "liberating"
Europe.
09:30 *** ianeslick QUIT Ping timeout: 272 seconds
09:30 *** piranha QUIT Read error: Operation timed out
09:31 <kristof> Anyway, I am too busy enjoying my life to embark on
a crusade.
09:31 <chare> quizdr why do you fight the urges to say you hate
python and ruby
09:31 *** bbloom QUIT Ping timeout: 245 seconds
09:31 <quizdr> chard no one here is "afraid" to say "python must
die." why do you think that? who wants them to
"die"? who has the energy to waste on such nonsense?
you are a troll man.
09:31 *** gregoriokusows-1 QUIT Quit: gregoriokusows-1
09:32 *** jumblerg QUIT Client Quit
09:32 *** lucian QUIT Ping timeout: 248 seconds
09:32 *** amalloy_ NICK amalloy
09:32 <ddellacosta> now that we've established that, let us let the
troll starve and encourage it to move on to
seek more bountiful pastures
09:33 <quizdr> ddellacosta agreed my brother
09:33 <ddellacosta> quizdr: :-)
09:33 *** doomlord_ JOIN
09:34 <quizdr> i'm going to go get some biryani now and satisfy my
taste buds with some spicy curry
09:34 <kristof> Oh! You lucky duck.
09:34 *** jfc JOIN
09:34 <quizdr> i'd say you should join me but i suspect that's not
practical or likely.
09:34 *** kalloc QUIT Ping timeout: 276 seconds
09:34 <kristof> I will travel the world over for spicy foods.
09:35 <quizdr> as do i
09:35 *** tomjoro JOIN
09:35 <kristof> Oh, that's actually a good idea. I wonder if my
girlfriend would go for that...
09:35 <matt444> Any hint at what I'm doing wrong here?
https://www.refheap.com/24088
09:35 <quizdr> anyone else in here from Singapore?
09:35 <arrdem> luxbock: yep :D
09:35 <arrdem> luxbock: haven't used it for anything yet but I just
got the import/export crud set up.
09:35 *** ticking QUIT
09:36 <quizdr> there's a big Haskell group here in Singapore but
I'd love to get some Clojure meet ups going too.
Heck I've never even used Haskell.
09:36 *** JanxSpirit QUIT Quit: JanxSpirit
09:37 <ddellacosta> quizdr: you are in Singapore? Are you doing
Clojure there? I worked there for a short
period when I was at my last company (based in
Tokyo).
09:37 *** JanxSpirit JOIN
09:37 *** yedi JOIN
09:37 *** ticking JOIN
09:37 *** divyansr JOIN
09:37 <quizdr> i'm in Singapore for about 2 years now. but my work
is in C++ (unfortunately). Clojure is strictly a
hobby for now
09:38 <quizdr> see yalls later
09:38 <chare> don't fight the anger I let out all the rage
09:38 *** divyansr QUIT Client Quit
09:38 <luxbock> arrdem: hmm it's never worked for me for some
reason, but my org-setup is fairly customized so
might be because of that
09:39 *** ToBeReplaced JOIN
09:39 *** VFe JOIN
09:39 <ddellacosta> quizdr: gotcha, enjoy
09:39 <arrdem> luxbock: it turns out that mobile-org has some
import-export work that needs to be done
09:39 *** sgarrett|afk JOIN
09:39 *** VFe_ QUIT Read error: Operation timed out
09:39 <arrdem> luxbock: it initially wasn't working for me either
but after some bludgeoning it submitted
09:40 *** tomjoro QUIT Ping timeout: 276 seconds
09:40 <ddellacosta> matt444: what happens if you get rid of the
close! ?
09:40 <luxbock> maybe I'll give it another go later today
09:40 *** dacc QUIT Ping timeout: 245 seconds
09:40 <matt444> @ddellacosta: same result
09:40 *** JanxSpirit QUIT Client Quit
09:40 *** demon386 JOIN
09:41 *** JanxSpirit JOIN
09:41 <arrdem> luxbock:
http://stackoverflow.com/questions/8432108/how-to-automatically-do-org-mobile-push-org-mobile-pull-in-emacs
09:41 <arrdem> luxbock:
http://orgmode.org/manual/MobileOrg.html#MobileOrg
09:41 *** calumet QUIT Quit: Leaving.
09:41 <ddellacosta> matt444: what result do you get by the way?
09:41 [arrdem takes off his emacs pusher hat]
09:41 <matt444> ddellacosta: 3
09:42 *** tbaldridge QUIT Remote host closed the connection
09:42 *** _adie QUIT Quit: Computer has gone to sleep.
09:42 *** ne-on JOIN
09:42 <luxbock> are you storing your org-files in Dropbox only or
are you using symlinks?
09:43 <arrdem> luxbock: I have everything treed out in ~/doc and
symlinked from ~/Dropbox to whatever I wanted DB to
sync for me
09:43 <arrdem> worked a treat
09:43 *** bkearns QUIT Quit: Leaving.
09:43 <arrdem> once I set up matching symlinks on all my boxes
09:43 <luxbock> alright, I'll give it another go later today,
thanks for the links
09:43 *** josephwilk JOIN
09:44 *** ticking QUIT
09:44 *** lazybot JOIN
09:44 *** juxovec JOIN
09:44 *** jimduey QUIT Quit: jimduey
09:45 <ddellacosta> matt444: not positive but I suspect you'll have
to call <! multiple times to get all the values
out of the merged channel. You may try to put
that last line in a (while true ...) loop.
09:45 *** jimduey JOIN
09:45 <matt444> ddellacosta: yes, i think you're right
09:45 *** marcopolo` JOIN
09:46 *** bufferloss QUIT Quit: Leaving
09:46 *** subbyyy_ QUIT Ping timeout: 245 seconds
09:46 *** yedi QUIT Remote host closed the connection
09:47 <ddellacosta> matt444: ah, except by just looping through it,
you'll just call map over and over, so that
won't work. You probably will need to merge
the channels outside of a while loop, then try
pulling from the merged channel inside the
loop.
09:48 *** josephwilk QUIT Ping timeout: 245 seconds
09:48 <ddellacosta> again, not positive; haven't used merge much
and not confident I grasp the semantics of it
fully
09:48 <ddellacosta> not much = not at all
09:49 *** juxovec QUIT Ping timeout: 265 seconds
09:50 *** aconbere JOIN
09:50 *** mrevil JOIN
09:52 *** wolfes1 JOIN
09:53 *** kovasb QUIT Read error: Connection reset by peer
09:53 *** ne-on QUIT Remote host closed the connection
09:53 *** ne-on JOIN
09:54 *** kovasb JOIN
09:54 *** sgarrett|afk QUIT Quit: afk
09:54 *** aconbere QUIT Ping timeout: 245 seconds
09:54 *** Sorella QUIT Quit: It is tiem!
09:55 *** ewnd9 JOIN
09:56 *** SparkySparkyBoom JOIN
09:56 *** codelahoma QUIT Ping timeout: 272 seconds
09:56 *** jackdanger QUIT Quit: Leaving.
09:57 *** codelahoma JOIN
09:57 *** seancorfield NICK seanaway
09:57 *** teslanick JOIN
09:58 *** gja QUIT Quit: This computer has gone to sleep
09:58 *** ne-on QUIT Ping timeout: 260 seconds
09:59 *** s4muel QUIT Quit: ZNC - http://znc.in
09:59 *** s4muel JOIN
09:59 *** calumet JOIN
09:59 *** calumet QUIT Max SendQ exceeded
10:00 *** calumet JOIN
10:01 *** looper QUIT Ping timeout: 246 seconds
10:01 *** divyansr JOIN
10:01 *** Gooder` QUIT Remote host closed the connection
10:02 *** chare QUIT Quit: Page closed
10:02 *** masondesu QUIT Remote host closed the connection
10:02 *** lucian JOIN
10:03 *** calumet QUIT Client Quit
10:03 *** looper JOIN
10:03 *** rsenior QUIT Ping timeout: 252 seconds
10:04 *** carif JOIN
10:04 *** jimduey QUIT Quit: jimduey
10:04 <squidz> i'm trying to make a function faster in
clojurescript. The funciton uses assoc which seems
to slowing it down. Does anybody know a faster way
to implement this? Here is the funciton
https://www.refheap.com/24094
10:05 *** jimduey JOIN
10:05 *** S11001001 QUIT Quit: ERC Version 5.3 (IRC client for
Emacs)
10:06 *** KeithPM QUIT Quit: KeithPM
10:07 *** lucian QUIT Ping timeout: 246 seconds
10:07 *** nlew JOIN
10:08 *** jimduey QUIT Client Quit
10:08 <squidz> it takes a map and one of the maps keys(group key),
then returns a new map where every key is combined
with the selected 'group key'
10:08 <AimHere> squidz, I don't know if it'll be faster, but you
tried zipmap?
10:09 *** teslanick QUIT Quit: Leaving.
10:09 *** carif QUIT Read error: Connection reset by peer
10:09 <AimHere> Something like (zipmap (map #(str k group-name)
(keys m)) (vals m))
10:09 <dnolen> squidz: also might be faster to use (into {} ...) as
that will use transients
10:09 <AimHere> You might need to change the name of the 'map'
argument
10:10 *** carif JOIN
10:10 *** jweiss JOIN
10:10 <squidz> i'll try it with into and zipmap to see if that
helps
10:10 <dnolen> squidz: how big is the map?
10:11 *** jimduey JOIN
10:11 <squidz> around 15-20 key values, but that is being called
around 700 times
10:11 *** mnemnion JOIN
10:12 *** nlew QUIT Ping timeout: 272 seconds
10:13 <AimHere> Oh, note that there's a 'reduce-kv' function for
the sort of job you're doing
10:13 *** jimduey QUIT Client Quit
10:13 <AimHere> (reduce-kv (fn [m k v] ... ) instead of the syntax
you were using
10:13 *** jonhinson QUIT Ping timeout: 246 seconds
10:14 <AimHere> Hang on, calling a function 700 times on 20 sets of
keys?
10:14 *** mercwithamouth JOIN
10:15 <AimHere> So each time this is happening, you're morphing a
key and then associng it back in place, taking
whatever performance penalties for deleting and
inserting a key?
10:15 *** calumet JOIN
10:16 <AimHere> For each key, can you fix it that you're doing all
the mutations at once? You'd be saving 680 hash
lookups
10:17 *** ttkk JOIN
10:18 <dnolen> squidz: how long is that taking (and under what
circumstances?)
10:19 *** firesofmay QUIT Ping timeout: 252 seconds
10:19 <egghead> dnolen: you should link to kioo in the om readme :)
10:19 <dnolen> egghead: thx for the reminder will do
10:20 *** Clome QUIT Read error: Operation timed out
10:21 *** seangrov` JOIN
10:21 *** jonhinson JOIN
10:22 *** firesofmay JOIN
10:22 *** seangrove QUIT Read error: Connection reset by peer
10:24 *** KeithPM JOIN
10:24 <squidz> dnolen: right now it is taking around 3 seconds.
What I am actually trying to do is given an array of
maps, I want to transform so that the array shortens
and the maps gain extra keys. I basicallly group by
a key then for each of those gorups I output a map
with combinations of that key with the remaining
keys in the map. Here is all the code for an example
https://www.refheap.com/24096
10:25 <dnolen> squidz: 3 seconds? on what browser?
10:25 <dnolen> squidz: I just made a map of 20 keys and I could run
your function 700 times in ~45ms
10:25 *** teslanick JOIN
10:25 *** thenovices JOIN
10:27 *** thoughtmanifest JOIN
10:28 <squidz> on chrome. Let me give you a cljsfiddle
http://cljsfiddle.net/fiddle/beandipper.datameld
10:29 <squidz> it may be the other funcitons that call it
10:29 *** piranha JOIN
10:29 *** kalloc JOIN
10:29 *** ystael QUIT Read error: Connection reset by peer
10:29 <dnolen> squidz: even using your last refheap it takes < 30ms
for 700 runs of meld-data
10:29 *** rsenior JOIN
10:30 *** mabes JOIN
10:30 *** nicley QUIT Ping timeout: 245 seconds
10:30 *** marcopolo` QUIT Remote host closed the connection
10:30 *** rfarrjr JOIN
10:30 *** thenovices QUIT Ping timeout: 252 seconds
10:31 *** ananthakumaran JOIN
10:32 <squidz> dnolen: here is chromes flame chart
http://imgur.com/GLnb580
10:33 *** tbaldridge JOIN
10:33 *** danielglauser JOIN
10:33 *** piranha QUIT Ping timeout: 246 seconds
10:33 *** firesofmay QUIT Ping timeout: 252 seconds
10:34 *** miql NICK watsgoo
10:34 <squidz> for me the input for meld-data has 672 maps, each
map having the length 13
10:35 *** kalloc QUIT Ping timeout: 272 seconds
10:35 <dnolen> squidz: that's not a particularly informative flame
chart w/o more information
10:35 *** rfarrjr_ JOIN
10:35 *** rfarrjr QUIT Read error: Connection reset by peer
10:35 *** tomjoro JOIN
10:36 <squidz> dnolen: do you want the input data?
10:36 <dnolen> squidz: that would help considerably
10:36 <dnolen> squidz: what optimization settings here? advanced?
10:37 *** G0SUB JOIN
10:38 *** kizzx21 QUIT Quit: Leaving.
10:38 *** warz JOIN
10:39 *** yedi JOIN
10:39 *** tomjoro QUIT Read error: Operation timed out
10:39 *** rfarrjr_ QUIT Read error: Connection reset by peer
10:40 *** rfarrjr JOIN
10:40 *** jleclanche QUIT Read error: Connection reset by peer
10:40 *** jleclanche JOIN
10:40 *** ne-on JOIN
10:40 <squidz> dnolen: simple optimization here is the data
http://pastebin.com/5TTxj2rm
10:41 *** awalters_ JOIN
10:41 *** divyansr QUIT Remote host closed the connection
10:42 *** tupi QUIT Remote host closed the connection
10:42 <jcromartie> dear god, I've been trying to make this huge
refactor all day and I'm just now finally
getting the REPL to start…? maybe?
10:42 <jcromartie> I suck
10:42 <dnolen> squidz: that's not EDN, are you calling clj->js
inside the loop?
10:42 *** jweiss QUIT Ping timeout: 252 seconds
10:42 *** ztellman JOIN
10:42 <dnolen> squidz: er js->clj
10:42 <warz> hi all. new to clojure here. when writing a lib, like
clj-http, is everything in `client.clj` visible to my
app, or is there a way to export only certain
functions, etc?
10:42 <warz> looks like everything is public, if you will
10:43 <squidz> I am feeding the data like data -> js->clj ->
meld-data
10:43 <squidz> so only once before the call of meld-data
10:43 <dnolen> squidz: k trying it out here
10:44 *** juxovec JOIN
10:46 <jcromartie> phew, it compiles finally
10:46 <jcromartie> I know I should have done it in bite-size pieces
10:46 <jcromartie> but, records...
10:47 *** G0SUB QUIT Read error: Connection reset by peer
10:47 *** thoughtmanifest QUIT Quit: Leaving.
10:47 <jcromartie> if I could just listen to technomancy...
10:47 [technomancy warns jcromartie about stairs]
10:47 *** G0SUB JOIN
!!! b3bai.com: connection broken by remote peer (closed)
>
@pipster12345
Copy link

Hi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment