#clojure logs

2015-02-10

00:55tomjackI remember people saying "oh yeah Joda-Time!" about tagged literals
00:55tomjackbut DateTime, at least, is not suitable for inst, is it
00:57DreighGuess this is the time everything goes quiet huh?
00:57ykzrtjKind of, yeah.
00:57ykzrtjHaha.
00:59DreighWow, one other person who is alive! :D
00:59ykzrtjHi there Dreigh! :D
01:00tomjackI guess Instant is better
01:00DreighWhat's the time where you're at? I can never figure it out for people on the other side of the world...
01:00ykzrtjIt’s 2 in the afternoon, man.
01:00ykzrtjUnfortunately my timezone doesn’t sync with the majority of the chatroom. Haha, yours?
01:01DreighDude, no way! 7pm over here, but that's all part of being ahead of the rest of the world's timezones
01:02ykzrtjHaha yeah that’s true too :)
01:04DreighGuessing it's winter over there, man?
01:04ykzrtjNope it never snows here. Tropical weather.
01:04kaplanHi! Can anyone explain atoms to me, I read the clojure.org page but understood nothing
01:05DreighNiiiiice.
01:05ykzrtjDreigh, winter over there?
01:06ghoulehey kaplan
01:06ghoulean atom is an element that you can update
01:06kaplanghoule, ah
01:06DreighNah, it's the summertime. Pretty sweet though, even if you get burned to a crisp!
01:06ghoulebasically it isn't immutable
01:06kaplanghoule, so, any easy to understand examples?
01:06ghouleeee
01:07ghouleyeah ill try to post 1 or 2
01:07ghouleuser=> (def my-atom (atom 0))
01:07ghoule#'user/my-atom
01:07ghouleuser=> @my-atom
01:07ghoule0
01:07ghouleuser=> (swap! my-atom inc)
01:07ghoule1
01:07ghouleuser=> @my-atom
01:07ghoule1
01:07ghouleuser=> (swap! my-atom (fn [n] (* (+ n n) 2)))
01:07ghoule4
01:07ykzrtjDreigh, New Zealand?
01:08kaplanghoule, ah, that explains it
01:08DreighYeah man- did some google research huh?
01:08ghouleyou can then use clojure ! functions on atoms
01:08ghouleto update and mod the atom element
01:08ykzrtjDreigh, haha no I only know two countries that have summer in the southern hemisphere
01:08ykzrtjAustralia and New Zealand
01:08kaplanghoule, what does swap! do?
01:09DreighWell, it's already a victory that you don't think New Zealand is part of Australia. No kidding. It happens.
01:09ykzrtjHaha, true. I’m from Singapore. Quite near NZ.
01:09ykzrtjNot exactly near. But yeah.
01:09DreighIt's like saying Canada or Mexico is a part of the US @_@
01:10ykzrtjOr that Singapore is part of China.
01:10ghouleok kaplan
01:10ghouleso
01:10DreighNear enough. Sheesh, now the tropical weather comment makes sense!
01:10ghouleatom is basically a reference to an immutable element
01:10ghoulelike a list
01:10ghouleand functions like swap
01:10ykzrtjWhat a fun game, guessing everyone’s country of origin :)
01:10ghoulebasically tries to modify the element referenced by the atom
01:11ghouleit is done synchronosly
01:11ghoulewhich means that it might retry to modify the element referenced by atoms multiple times
01:11DreighI wonder where ghoule and kaplan are from for them to active at this time...
01:11ghouleif the element is being accessed and modified by another thread
01:12scottjsingapore and new zealand are apparently ~5100 miles apart :)
01:12ghouleso the function call on an atom must be free of side effects (something that happens that isnt input/output to the function)
01:12ghoule@dreigh im from canada its 1 am here
01:12ghoule#coderlife
01:12DreighSo, not so close, eh scottj?
01:13ykzrtjscottj, Haha good one.
01:13scottjrelatively close compared to the rest of the world :)
01:13ykzrtjghoule, Nice :)
01:13kaplanDreigh, I am from India, 11:40 AM here
01:13scottjapparently there are parts of chile that are closer to new zealand than singapore
01:13ykzrtjghoule, also, is it freezing?
01:14DreighNew Zealand is in its own little world. Its isolated little world.
01:14ghouleykzrtj fuck yeah.. my balls almost dropped today
01:14ghouleit's been crazy cold in the past few days
01:14ykzrtjDamn, haha must be real cozy to be at home now.
01:15ghouleyeah
01:15ghoulea few days ago it was -38 celsius
01:15ghouleo.O
01:15DreighI'm going to be one of those assholes who say 'I'd kill to be in some snow right now' and have no understanding of how much it sucks balls over a long period of time :D
01:15ghouledreigh
01:15ghouleyou have no clue
01:15ghoulelike.
01:15ykzrtjghoule: Woah haha. I’ve never experienced long term coldness before
01:15ghoulesnow is cool
01:16ghoulebut in cities its fucking slush
01:16ykzrtjIt’s about 32-35 celsius here.
01:16ghouleand gross dirt
01:16ghouleetc. :D
01:16ykzrtjOh wait, google says 31
01:16ghoulelike 3 meter snow storm is awesome
01:16DreighHaha!
01:16ghouleyou go skiing
01:16ghoulepowder
01:16ghoulebut 95% of the time
01:16kaplanghoule, Thanks for your help
01:16DreighI do know this- NEVER eat yellow snow. Or just snow in general.
01:16ghouleits -20 celsius with brown dirty snow and terrible wind :D
01:16ghoulelol
01:17ghoulenever eat snow ull get super sick
01:17ghouleby the way kaplan
01:17ghoulewhen you code in clojure in general you try to use and write functions free from side effects
01:18kaplanghoule, I am just a beginner to programming, dunno why I picked up a clojure book
01:18ghouleclojure is amazing thought
01:18ykzrtjYou’ll be glad you did, kaplan.
01:18DreighPretty sure that's where the black plague is hiding out- Nasty nasty snow..
01:18ykzrtjI came over from python and ruby.
01:18ghoulebut you shoul definitly learn clojure, but also something like pthon or ruby
01:18ykzrtjAnd Java.
01:18ghoulepython
01:19ghoulejava ugh *shudders*]
01:19ykzrtjClojure is a different beast altogether
01:19ghouleYeah
01:19ghoulekaplan
01:19ghoulewhat you should do honestyl
01:19ghouleis learn
01:19ykzrtjReally fun
01:19kaplanghoule, I know Python, Java, Javascript and Swift
01:19ghouleClojure (functional prog) C++ (Object oriented) Python (Interpreted awesomeness)
01:19ghoulekaplan ahh ! cool :)
01:19ykzrtjkaplan, how do you find Swift? I was pretty excited when Apple released it.
01:20ykzrtjghoule, agreed :)
01:20kaplanykzrtj, It is pretty awesome, wish it was available on my platform of choice(Linux)
01:21ghouleI know C/C++ Python Clojure Java learning JS and node.js I've had exposure to PHP SQL OpenMPI
01:21ykzrtjkaplan, imho, Linux is better for dev than mac
01:21ghoulekaplan, get a mac, honestly awesome for programming (big linux geek here)
01:21ykzrtjI dual booted my mbp just for that.
01:21ghouleykzrtj, I would disagree
01:22ykzrtjghoule, yeah I think it’s a personal choice
01:22ghouleim definitely not the reference though haha still very much in the learning phase
01:22ghouleDont get me wrong i love unix/linux
01:22ykzrtjI love Mac for its aesthetics but package management is kind of difficult and messy at times.
01:22ghouleykz get homebrew
01:22ghoule<3
01:22ghouleMac generally just works so for dev, there is an inherent plus value to it
01:22ghouleit's fast to be ready to go
01:22ykzrtjghoule, yeah I have it totally changes the game.
01:23ghouleyou have terminal power of unix
01:23ykzrtjghoule, but when I was developing python before homebrew … no. Haha
01:23ghoulehomebrew which is, in some way, better than aptitude or apt.. but in some way worse :P
01:23ghoulehshs yeah :P
01:23ghoulehaha*
01:23ykzrtjI tried macports
01:23ghoulehomebrew is amazing
01:23ykzrtjUninstalled it twice
01:23ykzrtjYeah definitely agree
01:24kaplanghoule, I will buy a macbook pro if I get into a US university
01:24ykzrtjAnd it’s written in ruby!
01:24ghoulebut ykzrtj i think the osx landscape of programming is changing
01:24ykzrtjghoule, really, why do you say so?
01:24ghoulebecause
01:24kaplanghoule, Trying this year to get into top schools like UC Berkeley
01:24ghouleso many devs are migrating to mac in the recent past
01:24DreighWhat for kaplan?
01:24ghoulepeople are building tools and apps to use on macs
01:24ghoulekaplan, nice man! I hope you will get in!
01:25ghoulekaplan, you shoul def try to get into MIT if you wanna be a part of the top :P
01:25ghouleMIT is amazing o.O
01:25kaplanDreigh, Computer Science + Linguistics
01:25ghouleIm in university atm
01:25ghouleSoftware engineering
01:25DreighOh sweet!
01:26DreighI have a feeling I'm the most computer illiterate person here with software... v.v
01:26ghouleykzrtj, Basically.. so many devs are switching over to mac laptop for development, the amount of software that seems to be created from and for macs is quite astonishing
01:26ykzrtjghoule that’s encouraging I was pretty convinced to leave the OS X platform for linux
01:26ghouleand you also get the advantage of great support
01:26ghouledriver wise
01:26ykzrtjYeah, and display support lol
01:26ghoulebecause apple has a very limited set of hardware to support
01:26ykzrtjConfiguring xrand can be tedious
01:27ghoulethe issue with linux is that you are very often debugging and using hacks
01:27ghouleto make your hardware and drivers work properly with certain software
01:27ghouleit's very fun
01:27ykzrtjIt’s fun in a way.
01:27ghoulebut when you just wanna be set up and ready to code
01:27ghouleit's annoying
01:27ghoule:D
01:27ykzrtjYeah, I mean I’m using mac now lol :)
01:27ghouleso the point i was going to make is :
01:27ghouleif you wanna use linux for all that messing around awesomeness, you just buy Parallels (the VM software)
01:28ghouleand run Virtual Machines of your distro of choice
01:28ghoule(even windows for when you wanna use visual studio)
01:28ykzrtjYou wouldn’t multi boot?
01:28ghouleNa
01:28ghouleNo need
01:28ghoulethe hardware is so good now
01:28ghouleVM's are amazing
01:28ghouleand no bios/boot partition issues
01:28ghoulei mean dual boot is fun and all
01:28ykzrtjI took 3 days to configure my mac to triple boot windows, linux and mac
01:28ghoulebut might as well just use VM software
01:28ghouleyeah.. :P
01:28ykzrtjYeah true.
01:29ghouleParallels is very nice
01:29ykzrtjDoes VirtualBox still work though>
01:29ykzrtj*?
01:29ghouleand .... I was a "apple" hater
01:29clojurebot* is just for when you are lazy and sloppy
01:29ghoulefor the past 5 years
01:29ghouleI just bought a Mac last november
01:29ghoulemmmmm
01:29ghoulevirtual box works
01:29ykzrtjI guess you were converted :)
01:29ghoulebut I prefer to pay for Parallels..
01:29ghouleI'm a student
01:29ghouleat university
01:29ghoulethey give me a big discount
01:29ghoulelike... instead of 80$ (i think) i paid like 40
01:29ykzrtjUh huh no wonder
01:30ykzrtjWoah
01:30kaplanghoule, I am applying to MIT as well, but I don't think I have any chance of getting in against the chinese students with perfect academic records
01:30ykzrtjReally good discount
01:30ghouleyeah a lot of dev software give hidden discounts etc..
01:30ghouleEverytime I buy software for development now
01:30ghouleI email their support
01:30ykzrtjDid you get a discount for your mac hardware though?
01:30ghouleand say I'm an undergrad student
01:31ghouleand they just email me back with a discount if I can send them a University ID
01:31ykzrtjNice :D
01:31ghoulelike 20%, 40%, 50% etc.
01:31ghoule:D
01:31ghouleEhh for my mac hardware no
01:31ghoulebecause i bought it through a company
01:31elvis4526Hello, I am trying to understand macros. I think I do but I fail to see a case where they could be useful compared to a plain function.
01:31elvis4526Someone has a cool example to help me see their use?
01:32ghoule@elvis4526, From what I understand of macros... once you get a hang of them..they are super useful and will transcend your use of functional programming
01:32ghoulebut until you really get the hang of it... it's like a mystery
01:32ghoulewrap with kilometers of paper wrap
01:32ghoule<3
01:32ghoulelol
01:32elvis4526hehe
01:32ghoulesorry can't really help you there :P my clojure-fu isn't good enough
01:33ghoulekaplan, i really wish you the best.. if you get into MIT i'll be very jealous
01:33SegFaultAXghoule: Nonsense.
01:33ghouleHahaha segfaultax
01:33SegFaultAXThere's nothing mysterious going on.
01:33ghoulei was just kidding :P
01:34SegFaultAXelvis4526: If you're just learning, I'd say ignore macros entirely.
01:35ghoulehey SegFaultAX
01:35ghouledo you know if I can link somethng in here?
01:35ghouleto help elvis out
01:35SegFaultAXghoule: If it's Clojure related, sure.
01:36ghoulekk
01:36ghoulehttp://www.braveclojure.com/writing-macros/
01:36SegFaultAXIf it's not clojure related, meh.
01:36ykzrtjBrave Clojure is really good.
01:36ghoulebraveclojure is a very useful resource for when you are learning clojure. The link I provided is about macros @elvis4526
01:36ghouleyo ykzrtj
01:36ghoulewhich client do you use for irc?
01:36ykzrtjColloquy
01:37elvis4526ghoule: thanks i'll look into it
01:37ghouleSegFaultAX, what platform do you dev from?
01:37ghoulehows colloquy?
01:37SegFaultAXghoule: OSX and Linux.
01:37ghoulei'm using limechat
01:37ykzrtjghoule: I just came over from limechat
01:37ghouleSegFaultAX, sweet same here
01:37ghouleWould you say its better than limechat?
01:37SegFaultAXOk, gotta run. Later.
01:37ykzrtjghoule: Yeah, I prefer the interface layout.
01:37ghoule@Seg : Cya gn!
01:37ghoulewhats the diff?
01:38ghoulei love full screen limechat <3
01:39ykzrtjghoule: There user list isn’t at the right
01:39ykzrtjghoule: and also, I don’t use it full screen
01:39ghouletheir
01:39ghouleGRAMMAR NAZI
01:39ghoulelol
01:39ghouleah okok
01:40ykzrtjYeah *their hahaha
01:40ghouleyour on linux atm?
01:40ykzrtjNope using mac now
01:40ghoulebetween Im a french mothertongue speaker.. i was messing with you about grammar
01:40ghoule:P
01:40ykzrtjNice! I was trying to learn french lol
01:40ghoulehaha kk
01:41ghouleyo yk
01:41ykzrtjBut ... gave up after the spelling didn’t conform to pronunciation
01:41ghouleon mac, do you know about spectacle / fantastical / iTerm
01:41ykzrtjghoule: Acquainted but I don’t really use them. I use the main mac emulator
01:42ykzrtjTERMINAL
01:42ghoulewhats mac emulator?
01:42ghouleah lol
01:42ykzrtjHaha yeah
01:42ghouleiTerm is a mutex version of terminal
01:42ghoulereally nice
01:42ykzrtjI’ll try it out
01:42ghouleand spectacle is a window manager.. like splitting etc.
01:42ghouleand fantastical is #1 reminder/calendar app
01:43ghoulecheck them out... really amazing
01:43ykzrtjAh splitting terminal has really weird splitting I never split my windows in terminal
01:43ghoulecan't live without them now hahaha
01:43jyuhow does corssinfo parse the source code? and seems it is different with the implementation of clojuredocs?
01:43ykzrtjghoule: which editor do you use? I use light table
01:43ghouleykz, if you use spectacle the splitting is amazing
01:43ghoulelight table is so amazing with clojure <3
01:43ykzrtjOh man thanks for the recommendation spectacle looks amazing
01:43ghoulei tried coding clojure on sublime text
01:44ykzrtjNO that does not work at all
01:44ykzrtjHahaha
01:44ykzrtjIt’s good for python though
01:44ghoulei was like... GIVE ME INLINE FEEDBACK
01:44ghoulelol
01:44ghoulesublime text 3 is my fav editor
01:44ykzrtjWith anaconda it’s really powerful.
01:44ghoulei really like emac and vim.. didnt get to really put the time into learning them though
01:45ykzrtjYeah haha emacs, vi and vim are all real OG
01:45ykzrtjOld school hahaha
01:46ghouleyeah
01:46ghoulethey are super productive thought
01:46ghouleonce you get the muscle memory for the hotkeys
01:46ghouleetc..
01:47ghouleyo by the way : i used a macro extensively without knowing it LOL
01:47ghoule-> the threading macro
01:47ghoulehahaha
01:47ykzrtjWow spectacle is really great man
01:47ghouleyeah..
01:47ghoulespectacle is freacking amazing :D
01:48ykzrtjMy mac has a new lease of life!
01:48ghoulehonestly its a worthy buy
01:48ghoulehaha yeah :D
01:48ghoulecheck out fantastical calendar also
01:48ghouleits amazing
01:48ghouleuntil you use it you dont understand how incredible it is :D
01:48ghoulelol
01:48ghouleby the way ykz
01:48ghoulewhats your background?
01:48ykzrtjYeah I’ll check it out too thanks :)
01:48ghoulestudent? soft dev? engineer?
01:48ykzrtjStudent
01:48ghoulebegineer ? master ? etc.
01:49ghouleokok
01:49ghouleuniversity?
01:49ykzrtjAwaiting
01:49ghouleokok
01:49ykzrtjKind of like kaplan I guess
01:49ghoulegoing into soft eng?
01:49ykzrtjHopefully
01:49ghouleare you from US/Can?
01:49ghoulei didnt pick up whererr you are from
01:50ykzrtjHaha, I told Dreigh just now
01:50ykzrtjSingapore
01:50ghouleoh wow
01:50ghouleim jealus
01:50ykzrtjHahaha, been here before?
01:50ghouleive been to singapore
01:50ghouleits amazing
01:50ykzrtjReally hot all year long
01:50ykzrtjHahaha
01:50ghouleyeah.. o.o so lucky
01:50ykzrtjI guess if I were in a cold country I would say that too
01:50ghoulewbhere in sngapore are you?
01:51ghouleOrchard road is so beautiful man
01:51ykzrtjHaha, I live near the east
01:51ghoulethe zoo is awesome too :D
01:51ykzrtjYeah it’s our main shopping district
01:51ghoulei remember the night zoo was super fun
01:52ghouleand dirt cheap food on the street but so delicious :D
01:52ghoulei wanna go back
01:52ykzrtjYeah our food is real good
01:52ghouleare you applying fot National Singapore University?
01:53ykzrtjI’m hoping to go overseas
01:54ghouleif you can go to NSU thought
01:54ghouledo it
01:54ghouleits one of the top university in the world for software
01:54kaplanykzrtj, US?
01:55ghouleunless you get into harvard / MIT / carnegie melon / UBC / etc. :P but its .... 50+k a year.
01:55ykzrtjkaplan, yeah hoping to get into Caltech or something
01:55ghouleCaltech supposed to be amazing
01:55ghouleyou guys are highrollers :P
01:55ykzrtjIs it?
01:55ghouleso expensive
01:55ykzrtjHahaha
01:55kaplanykzrtj, I am trying for caltech as well
01:56ykzrtjkaplan, all the best man :)
01:56ykzrtjkaplan, so it’s UC Caltech
01:56ykzrtj*or
01:56kaplanghoule, Top private universities like MIT and Caltech are not so expensive after financial aid
01:57ghoulei guess so :P
01:57ghoulehere in canada taxes pays for university...
01:57ghouleso 1 year in college is 4000$
01:57kaplanykzrtj, I have a chance at UC Berkeley
01:57ghoulewithout financial aid :D
01:57kaplanykzrtj, 2100+ SAT score and 4.0 GPA
01:57ykzrtjWoah that’s really fantastic, ghoule
01:58ghoulehow old are you @kap and yk
01:58ykzrtj!
01:58kaplanI'm 18
01:58ghouleim 23
01:58ghoulekk
01:58ykzrtj18 too
01:58ghouleim graduating soon
01:58ghoulestill feel like i have everything to learn gaahh
01:58ykzrtjghoule: are you planning to go into startup?
01:58ghouleyeah
01:58ghoulei hope so
01:58ykzrtjNice :)
01:59ghouleIm also applying at big companies like Microsoft, Yelp, Fb, Google etc.
01:59ghoulefor internship
01:59kaplanykzrtj, But it'll cost me $200K for 4 year at UC
01:59kaplanykzrtj, My dad earns $10K per year lol
01:59ykzrtjkaplan, oh no
01:59ykzrtjkaplan, scholarships, no?
02:00kaplanykzrtj, scholarships would help a bit
02:00kaplanykzrtj, I'll still need to take a $120K loan at least
02:00ghoulekaplan
02:01ghoule10k a year o.O
02:01ghouleyou are from India you said right?
02:01kaplanYep
02:01ghouleah okok
02:01ghouleIs 10k considered low, mid or high in india for local population?
02:01ghoulehonestly wondering
02:01kaplanMid
02:01ghoulecost of living is much lower in india then here..
02:02ghouleokok
02:02ghoulewhat does he do, your father?
02:02kaplanBut he lives in a small town so expenses are like $2K per year
02:02ghouleyeah
02:03kaplanghoule, He works as an engineer in a cement factory
02:03ghouleykzrtj, by the way you need to install : alfred (on mac) if you haventalready. its awesome
02:03ghouleokok
02:03ghouleHe has a engineering degree?
02:04kaplanghoule, engineering degree + MBA
02:04ghoulekk
02:04ykzrtjghoule, thanks I’ll try it out!
02:04ghoule10k a year for somebody with eng degree + MBA is so awkward to me
02:04ghouleBut, as you said, he only gets 2k expenses a year
02:05kaplanghoule, Pay is less but stuff like electricity and everything is free
02:05ghoulebut.. its crazy if you travel to the western country
02:05ghouleyeah
02:05kaplanthe company pays for everything
02:05ghouleah okok
02:05ghoulethats cool
02:05ghoulewhere do you live in india/
02:05ghoulewhich part*
02:05kaplanNorth India
02:06ghoulelike rajastan?
02:07kaplanMadhya Pradesh
02:07ghouleokok
02:07ghoulesweet
02:08ykzrtjghoule: Is the free version of Alfred good enough>
02:08ykzrtj*?
02:08clojurebot* is just for when you are lazy and sloppy
02:08kaplanghoule, Very low expense state + very sparsely populated
02:09ghouleyeah yk thats what im using
02:09ghoulekaplan, nice :)
02:09ykzrtjghoule, okay seems pretty awesome already
02:09ghouleyeah much better than spotlight imo
02:10kirghoule : mind a general question about your time at Uni? (btw I'm alittle older, degree in molecular biology)
02:10ghoulemy top apps for mac: 1password, fantastical, alfred, dropbox, spectacle, sublimetext3, parallels, Tower, iTerm, homebrew :D
02:11ghoulekir, no prob ask awAY :D
02:11ykzrtjghoule, hoho Tower is great
02:12ghouleTower is awesome
02:12ykzrtjTried it before
02:12kirghoule : To what extent do you think you actually needed it - in your intellectual development(rather then reputational)?
02:13ghoulekir, I believe that university is not essential, but a huge advantage. Especially for technical degrees. If we disregard networking, reputation, etc. I believe a university (software/compsci) is amazing because it helps you focus on important theorical concern/subjects/paradigms that you probably wouldn't focus on by self learning programming
02:14ghouleI believe programming is a creative way to put your ideas born from logic to work
02:15ghouleIt's a tool that allows logical malleability
02:15ghouleBy self learning computer science, I believe you will learn the technologies and some of the theory
02:16ghoulebut the importance of good theorical background and help in focusing on the important material is invaluable
02:16ykzrtjHey ghoule, kaplan, I gotta run. Nice chat we had. See you guys soon! :)
02:16ghouleSoftware engineering/IT/compsci require knowledge of algorithms, data structures, etc. to really write great code imho
02:17ghouleykzrtj, great talking to you!! :)
02:17ghouleIm off to sleep soontoo :P
02:17ghoulekir, why were you asking? :)
02:17kirghoule: I see. My experience is the opposite.
02:18ghoulekir, i didn't see this at first but over time I think about it and I feel it is somewhat invaluable. but it's especially amazing if you take part of the student life, social networking and meet new people
02:18ghoulekir, how is that? :) if you do not mind talking about it?
02:18kirghoule: Perhaps it varies based on universities, but I've found, with rare acception, that I've had to fight to overcome the poorly explained dogma, taught to me.
02:18ghouleIf you mind sharing about your background / age / etc.. would help me get a sense of were you are coming from
02:20ghouleI feel like university definitely isn't the end, but the means. a professor probably wont show or explain to you the theory the right/best way, but the curriculum usually points you in the right direction of were you should investigate etc. imho
02:20ghoulekir, definitely vary with universities, professors, etc. :P
02:21kirghoule: I won't add beyond what I included initially; I was just curious to see what others thought several years after my graduation. Thx
02:21ghouleah kk :)
02:21ghouleno issues
02:21ghouleare you from North america?
02:21kirIn Australia
02:21ghouleokok
02:22ghoulePS: you graduated in molecular biology; are you working in the field or software? (asking because you are in a clojure IRC, i'm curious :D )
02:22ghouleor in software*
02:24kirInitially in bioinformatics, now I work in mobile and web-dev
02:25ghoulekir, ah awesome! :)
02:25ghouleI'm currently looking for a summer internship myself :)
02:26ghoulewhat languages/technology do you work with at work? :)
02:26kaplanghoule, How much do summer internships pay?
02:26kirjava + php + go, and soon clojure :)
02:27ghoulekaplan, wildly depends on the company and the country honestly :P
02:27kiralso since they are close cousins, erlang
02:27ghoulekir, wow D: clojure at your work environment! thats awesome !!!
02:27ghoulekir, how do you live PHP and java?
02:28kirghoule : if I can convince them about clojure :)
02:28ghoulekir, haha :D gogo you!
02:28kirghoule: how do I live?
02:28ghoulekir, i wish i found an internship that works with clojure/common lisp
02:28ghoulekir, like**
02:29ghoulekaplan, like..from 15$ an hour to 30+
02:29kirI've had it upto my ears with OO :)
02:29kirGo was refreshing - clojure is a revelation :)
02:29ghoulekaplan, and some pays for your housing etc.. but usually you do an internship to learn. I personally don't mind about the wage
02:30codestorm77757 years later, LISP is mainstream
02:30kaplanghoule, I see
02:30ghoulekir, Iwas doing a project for school (information retrieval)
02:30ghoulewe could use any languages
02:30ghoulei decided to use clojure
02:30kaplankir, as a beginner programmer I hate OOP
02:30ghoulehuge overhead but OMG so worth it
02:30ghouleim in love with clojure haha
02:31montyxcantsincodestorm777 better late than never
02:31ghoulecodestorm777, haha yeah lisp / clojure <3
02:31ghoulekaplan, honestly for me it depends on the language
02:31ghouleI hate Java oop, i love C++ oop
02:32ghoulenot hate... too strong a word
02:32ghoulebut i do not like it :P
02:32kaplanghoule, I have Java but love Swift
02:32ghoulekaplan, never tried swift :P
02:32kaplanghoule, must try if you have a Mac
02:33ghoulecodestorm777 & montyxcantsin how are you guys/girls doing? are you still students or working in the industry or other? :D
02:33montyxcantsinindustry
02:33ghoulekir, how's Go ? never tried it
02:33ghoulemonty, if you don't mind sharing, what's your background etc.? :)
02:34codestorm777ghoule: I'm doing fine. I've been in the biz for... too long to admit
02:34montyxcantsinbeen programming nearly 20 years, 15 professionally past 3 full time in clojure
02:34ghoulewow
02:35montyxcantsinand for all of the years before these past 3 I had been longing for that mythical full time lisp/smalltalk/apl gig
02:35ghouleWhere are you guys based off? I'm in Canada, in Montreal
02:35ghoulehaha monty :D
02:35codestorm777los angeles
02:35ghouleYeah i keep telling my friends that I wish i found an internship with lisp/clojure/etc.
02:36ghoulethey are telling me : I don't get functional programming and the interest in lisp etc.
02:36ghouleAnd I'm like... just try it you'll be a cnvert :D
02:36ghouleconvert*
02:36montyxcantsinjust keep pushing and building things
02:37montyxcantsinthat is the most important thing there is - build things you care about constantly
02:37codestorm777link them to some paul graham articles
02:37kirghoule: Its very attractive(go) : you get the C-style syntax(lisp is a huge leap for me), great performance, concurrencey with minimal intellectual bagage, much reduced emphasis on OO much like clojure
02:37ghoule@code, do you work at a startup or a bigger company? how's your experience? any pointers for a somewhat soon to be graduating university student thats extremely passionate with software? :)
02:38ghoule@codestorm777 graham convinced me. o.O i read a few articles and the same night i was picking up clojure and lisp :D
02:38kirghoule: ... however you still have to manage mutability manually and it is far less expressive in its syntax...
02:38ghoulekir, ah neat :)
02:39codestorm777ghoule: my company is a mix of startup culture and corporate funding
02:39ghoule@codestorm, kk :) venture capital funding?
02:41ghoule@codestorm777: What languages/technologies do you use at work? :)
02:41codestorm777pointers? i dunno, keep learning, never be a slacker, never just collect a paycheck, be the guy who "owns" the code, in production, etc
02:42codestorm777ghoule: no VC funding, privately funded
02:42ghouleokok
02:42codestorm777we use nodejs, backbone, native mobile
02:42ghoulekk
02:42ghoulewhat product/services does your company produce?
02:43ghoule^ rereading the previous question.. pretty bad formulation sorry
02:44codestorm777slipknot: outside the nine is the first launch of our curent product
02:44ghoulelike, the app?
02:45codestorm777yes
02:45ghouleVixlet is the company?
02:45codestorm777yes
02:45ghoulenice :)
02:45ghoulei'll download for support :P
02:45ghouleis it your company?
02:45ghouleco-owner? or you've been working there?
02:45codestorm777i work for the company
02:45ghouleSorry for all the questions :D I'm super curious
02:46ghouleif it bothers you, let me know haha
02:46ghoulekk
02:46codestorm777np
02:47ghouledo you guys take interns? :D
02:47ghoule*shamelessly plugin myself*
02:47ghoulehaha
02:47montyxcantsindo you have a github account?
02:48codestorm777you're a little far from LA, no?
02:48ghouleyes, however I haven't posted much to it overall, Most of the school projects aren't allowed to be posted and I'm currently working on a closed app that integrates with githubs api for agile development :) i
02:48ghoulei'll link my github and linkedin
02:48ghouleYes, but I am willing to intern in the USA
02:49kirghoule: I have a general suggestion, if you don't mind : Find a part time position not in the programming field and observe the businesses carefully, try to understand their processes...
02:50ghoulekir: I definitely don't mind, I like hearing other perspectives and receiving advices
02:50ghoulehttps://github.com/gregrtw
02:50kirghoule:.. you will be amazed how little utilitized is software, and how little understanding they are of its possiblities -- then offer them a solution.
02:50kirthere is*
02:50ghoulehttps://www.linkedin.com/profile/preview?locale=en_US&amp;trk=prof-0-sb-preview-primary-button
02:51ghoulemy github & linkedin
02:51codestorm777bbl all
02:51kaplancodestorm777, how hard is it to get funding?
02:51ghoulecya codestorm :) thanks for the advices and the talk
02:52ghoulettyl
02:52codestorm777kaplan: i have no idea, I've never worked for a VC funded company
02:52ghoulekir, thank you for the advice! I think you are right, there is opportunities all over the place
02:53codestorm777bye for now
02:53kirghoule: trully, and your next employer will be thirsty for real-world experience - that is if you haven't already formed your own company.
02:53ghouleyes
02:54ghouleappreciate the advice a lot!
02:55ghoulemontyxcantsin: i posted my github/linkedin info above :)
02:57ghouleSo I was wondering, maybe you guys could help me shed a light on the issue
02:58ghouleIm really passionate about new technologies and languages, I love experimenting with different languages and paradigms.. so sometimes it makes it a bit hectic:
02:58ghouleI
02:59ghouleI'm wondering, now that I have some experience in a few languages etc. should I stick to a language or 2 and become proefficient at these and then learn new ones aftet
03:00ghouleor just keep working with 4-6 languages and trying to learn them all at a slower pace etc.
03:01ghouleSHould I just focus on 1 or 2 languages for a while? like C++, Clojure &/or Python or keep learning about new languages etc.
03:03kirghoule: atm I'm learning Clojure and Erlang because I see there is a greater need for high-performance, highly-scalable, fault-tolerant services -- and code of that sort which can be efficiently managed
03:04mercwithamouthso lispers... SICP or Land Of Lisp first?
03:04kirghoule: My choice is determined by practical application/need. I suggest you make your decision in a similar way.
03:05ghoulekir, kk thanks for the insight
03:05mercwithamouthahh i'm on the same page as ghoule it seems
03:05ghoulemercwithamouth :D what do you mean? :)
03:06mercwithamouthi'm trying to decide what to focus on since I don't have any project ideas...i'm a language 'browser'
03:06ghoulehaha yes
03:06ghouleso many languages are interesting.. hard to settle down to get ot really grasp a language fully
03:07ghoulei'm rly rly digging python C/C++ and clojure.
03:07kirghoule: If I had the inclination/time, I'd study up on coding for robotics - what industries do you see emerging and or in high demand for programmers?
03:07acron^ghoule: i find comitting to a language for a particular project is a great way to test drive it
03:07mercwithamouthi'm decent with ruby...i can jump back into python within a day or so...some OLD experience with C++
03:08hyPiRionwhat acron^ said.
03:08mercwithamouthright now i'm finding lisp and javascript 'learning' go well together since i'm very interested in web development and soon AI
03:08ghoule@acron^ Yeah :) i'm thinking of doign just that. Would you recommend working on OSS or just some mid sized projects from scratch?
03:09mercwithamouthi say 'lisp' because the many dialects seem similar enough that I can tackle a few of them and just take it as mastering lisp as a whole..or well becoming very familiar
03:09acron^ghoule: anything really. I meant professionally, but OSS or personal stuff works too
03:10ghouleokok :)
03:10hyPiRionghoule: whatever you're more comfortable with.
03:10acron^I just wrote a command line tool here, using Clojure
03:10ghoulewhat is the tool ? :)
03:11acron^just converts and edits an internal filetype
03:11ghouleokok
03:11acron^I could have done it in a day in C++ but took about 3 days to do it in clojure
03:11acron^was a fun experience
03:11ghouleacron^, hypirion: are you guys students or in the industry now? :)
03:11acron^definitely going to use it again
03:12acron^I'm a salaried developer
03:12ghouleyeah.. i'm trying to think of a project idea that I could complete in a few days just for python experience
03:12acron^as my first dip into a language, i love to write scrapers
03:12hyPiRionghoule: was student, now ~7 months in the industry
03:13ghouleI'm interviewing for a few companies for a summer internship that work with python so I'm trying to improve my knowledge of it, I like it a lot
03:13acron^Python is super
03:13hyPiRionghoule: I tend to play around with a lang for small private projects before going OSS.
03:13acron^Yeah definitely
03:13ghouleyeah hypi, i think i wanna do the same so im not lost or anything
03:13ghoulewhere do you guys work? :)
03:14ghoulehow the general experience so far in the ndustry, so close after your graduation hypi? :)
03:15ghouleacron^ : scraper, like a web spider/scraper?
03:15acron^ghoule: yep
03:15ghoulekk
03:16ghouleive done that on python.. litteraly 20-40 lines do the trick, i should probably try to reimplement one and add some features to it :)
03:17acron^games are another fun project for trying a language
03:18hyPiRionghoule: Hard to say in general, as I work on compiler construction. But I find it fun, and it's easier to stay focused on one project at a time.
03:19ghouleyeah i did the classic battleship & tic tac toe games in c++ and python :D I'm currently implementing Risk in C++ for a course.
03:19hyPiRionIt's easier to get sidetracked when doing hobby projects, which I feel is the bane of most of them
03:19ghouleyeah :(
03:19ghouleyou work on compiler design?
03:20ghoulewhich compiler do you work on hyp?
03:20ghoulewhat about you acron, what do you work on ? :)
03:21acron^I am dogsbody software dev at a copany that make themepark rides
03:21acron^company*
03:22ghouledogsbody
03:22ghoulewhat is that?
03:22hyPiRionOh, it's an internal compiler for an old ISO standard we have to use for data modelling.
03:22ghoulenice!
03:23ghoulewhich company do you work for hypi? if you dont mind me asking
03:24hyPiRionghoule: Rendra. "Startup" visualising 3D-models for the building industry.
03:24ghouleoh dogsbody is an expression meaning : "menial work" from google :P
03:25acron^dogsbody is a perjorative :) but i just mean i do a bit of everything
03:25ghouleah okok :D
03:25ghoulei'm first language french, even though im fluent in english some expressions escape me
03:25ghoule:D
03:25Glenjamina bit like a servant
03:25acron^heh sure, no problem
03:25ghoulemother tongue french*
03:26ghouleah nice :) i googled rendra
03:27ghouleso you are based in norway hypi?
03:27hyPiRionyeah
03:27ghoulebetween, if you guys want to work a side project for fun in Clojure / C++ / Python, hit me up :) i'm all for it
03:28ghouleor even OSS and you need help implementing a feature etc.
03:28ghoulethank you so much guys, thanks for bearing with my millions of questions :D]
03:28ghouleI'm off to sleep 3am here and classes tomorrow
03:29acron^ok :)
03:29ghouleI'll start a python project tomorrow to learn. If somebody wants to join in and/or as an idea you can private message me :D
03:29ghouleI have experience with Git (using Tower) btw
03:29kirhyPiRion: Thanks kindley for your series of articles, starting with : http://hypirion.com/musings/understanding-persistent-vector-pt-1
03:30hyPiRionkir: oh, you're welcome – glad they are of value =)
03:32kirhyPiRion: Reading through them now. One of the burdens of working with a more abstract/declarative language is a need to understand what is being abstracted away for you - this type of reading is therefore very valuable!
03:35hyPiRionyeah. I had the same problem, and figured I could probably make it more accessible for others
03:37Empperioh how I wish I had time for freetime projects
03:38Empperihave gazillion things I'd like to do
03:38acron^I feel the same Empperi
03:38ghouleempperi!
03:38ghoulelet me know about it :)
03:38ghouleif you wanna do a side project with me :P
03:38ghouleacron too :D
03:38ghoule<3
03:39ghoulei'm supercharged with workload, etc. but i really want to improve my python/c++/clojure skills
03:39Empperiunfortunately I don't want to. Nothing personal, I just don't have the time
03:39mercwithamouthEmpperi: well don't be afraid to throw ideas my way
03:39ghouleYeah its all good :P
03:39EmpperiI have a 4 month old baby, and my apartment is having a full renovation going on
03:39ghoulebut you could throw ideas at us ;)
03:39Empperiand I have a day job
03:39ghoulewow empperi!
03:39ghoulegrats on the kid
03:39Empperithanks.
03:39ghoulei hope you are having a blast
03:39mercwithamouthi want to make an intelligent wiki/crawler combination...BUT i think i'm going to jump into SICP a little first
03:39Empperibut anyway, I have zero extra time on my hands :D
03:40Empperireally, left home for work yesterday at 8am, got at home 22pm
03:40ghoule:P
03:40ghoulewhere/what do you work in
03:40ghoulehey merc
03:40Empperiat Solita
03:40Empperiin Finland
03:40ghouleI'd be interested in working on wiki/crawler
03:41ghouleif you want to do that :)
03:41mercwithamouthi do but not just yet
03:41ghoulekk
03:41Empperibeen there done that
03:41Empperiwikis and crawlers
03:41Emppericrawlers are easy to do but where it gets hard is what you do with the data you crawled
03:41mercwithamouthi'll be in here regularly...i wanted to start at the beginning of march. i've been sitting on SICP for a while now
03:42ghouleeempperi, yeah
03:42mercwithamouthEmpperi: well thats where my idea gets cool. =P It goes through your wiki notes...picks up on the subject matter and goes crawling for additional info for you =P
03:42Empperieg. you want to do a crawler that crawls arbitrary websites and extracts the meaningful article information out of it and indexes it so you can search for it
03:42Empperilike what google does
03:42Empperithe crawling part is easy :)
03:42ghoulemerc, ill hang around the irc as well :) we can talk about ideas etc.
03:42mercwithamouthdefinitely
03:42ghouleyeah @Empperi, for my information retrieval course
03:43ghoulewe implemented a webcrawler, indexed whole websites and made their content searchable through a u/i. Then we modified the ranking algorithm to rank based on sentiment analisys of the text
03:44ghoulewas super interesting
03:44ghoulewe also implemented lossy/lossless compression algorithms for the index :)
03:46kir"sentiment analysis" - does sound interesting.
03:46ghouleyes
03:46ghoulemuch more complicated then we first assumed
03:47Glenjaminsarcasm is pretty hard to detect that way afaik
03:47ghouleif you want to have a ranking that's usefull :P
03:47kirghoule: Did you use any speicific theory of psychology as a starting point?
03:47ghouleyeah, we didn't have enough time to really get deep into it
03:47ghoulewe were ranking on a spectrum of negativity vs. positivity
03:48ghouleusing weights on words
03:48ghoulefrom a compiled list of terms/slang/words of the english language and their values
03:48ghouleit was a list provided by a scholar, a linguist I believe
03:48ghoulesentiments like sarcasm etc.. are really hard to detect
03:49ghoulekir, we didn't dwelve into the psychological part of the analysis
03:50ghouleWe "assumed" that the compiled list of weights on terms etc.. previously considered psychological theories for their weight
03:50kirI see. This area is very interesting because it brings together epistemology, linguistics and psychology - I'm amazed how well facebook does sometimes in choosing which posts to show me.
03:50ghouleyes..
03:50ghouleit's impressive
03:51kirAlong with voice recognition, I think this will be the next big industry - since it can be applied across all spheres of software
03:51kirAt least the human-facing side
03:52ghouleyes
03:52ghoulethere's a lot of academia research in sentiment analysis and voice recognition
03:52ghouleat least from the discussions I had my professor, it seemed this way
03:54kir...and I hear clojure is rather well suited to this sort of work ;)
03:56ghouleyep :D
03:56ghoulesince I picked up on Clojure and Python a lot more
03:57ghoulei'm having a really hard time enjoying coding in java at all
04:00ghoulekk now I really need to go sleep :
04:00ghoule:P haha
04:00ghoulei'll be dead tomorrow otheriwse!
04:00ghoule(4 am here o.O but this talk is far too interesting)
04:00ghouleCya guys! ttyl
05:31noncomwhat is the most idiomatic way to pick the longest string from a vector of strings ?
05:32noncomi can think of a reduce with an acc holding the current longest string and the max length, but maybe there is a better way
05:33schmirnoncom: max-key
05:33noncomoh
05:33noncomwow, never seen this before
05:44ssiderisschmir: nice! news to me as well :-)
05:50borkdudewith lib-noir, how can I set a cookie field for CSRF that will be recognized as the token?
05:56noncomdoes anyone here use ccw ?
05:56noncom(counterclockwise)
05:59raspasovwas that a plugin for IntelliJ>
05:59raspasov?
05:59augustlccw is for eclipse afaik
06:00raspasovlast I heard (I think, not sure) it wasn't maintained, I'd recommend you try out Cursive cursiveclojure.com , I use it everyday and it's great
06:00raspasovevery day*
06:01cflemingYeah, CCW is for Eclipse, it's still maintained. La Clojure is the old one for IntelliJ that's not maintained any more.
06:01raspasovcfleming: thanks, good to know :)
06:34noncomyeah, i know about cursive.. just installed it a few days ago too.. however, i think it still misses some important parts...
06:35cflemingnoncom: Anything in particular?
06:35noncomanyways, my original question was: can i have more than 1 repl running in ccw? or is it maybe possible in cursive?
06:35cflemingnoncom: It's definitely possible in Cursive, I'm not sure about CCW
06:35noncomwell, it is missing project creation.. at least.. not sure what else. all in all it proved to be a rather smooth experience, though i did not spend much time with it
06:35noncomdo you think i could use it for everyday job?
06:36cflemingnoncom: Yeah, project creation is a problem, especially on Windows
06:36cflemingnoncom: Sure, lots of people do.
06:36noncomheh, why is it a problem? (just curious)
06:36cflemingnoncom: I'm biased of course because I develop it, but a lot of Cursive users work all day in it.
06:36cflemingnoncom: It's a problem because I haven't implemented it yet :)
06:37noncomah))
06:37cflemingnoncom: Especially on Windows it would be very useful so people didn't have to install lein, which is annoying
06:37kaplanHi, can anyone explain what a closure is?
06:38noncomwell, then i can ask you one more qustion: what about hybrid java/clojure projects? and also multiproject clojure/java projects.. can i develop these in cursive ok today?
06:39noncomkaplan: a closure is a piece of code (typically a function) thank locks in itself one or more references to values defined outside it.
06:39cflemingnoncom: Absolutely, I'd say Cursive is probably the best environment for that at the moment - it's got great multi-module lein or Maven support, and the Java support is good because it comes via IntelliJ
06:39noncomit can also happen that all other references to these values are lost, but they still remain in a closure
06:40kaplanah, thanks noncom
06:42cflemingnoncom: I'll be improving that soon to use type inference, which will really improve symbol resolution accuracy for interop
06:42noncomcfleming: oh, very good. i am going to try moving one of my projects to Cursive then. will be just fine to experience how it works and feels i think :)
06:42noncomwow
06:43cflemingnoncom: Cool, let me know if you have issues, either here or drop me a mail
06:43noncomyes, auto-suggestions and all that stuff were always great in intellij
06:43noncomsure :)
06:43cflemingYeah, they're good for Clojure right now, interop is still a bit hit and miss
06:43noncomand if you make all that intelligent thing work for clojure, its symbols and interop, it'll be super-cool!
06:49noncomcfleming: hmm, interesting, the dark theme for cursive/intellij is rather immersive, but eclipse has problems with it.. afaik eclipse problems come out of it using SWT.. isn't intellij based on SWT ?
06:49cflemingnoncom: No, it's Swing
06:49noncomi see..
06:54noidinoncom, CCW does support multiple REPLs
07:06noncomnoidi: but only remote ones.. i can't find a way to load two different files in two different repls
07:17julianlevistonHehe ok so I have a REALLY weird problem: In the middle of a let block binding in my cljs code, I have a side-effecting function call to a function named worker which I’ve passed in to the function. When I write it like this: (when worker (worker)) it doesn’t run… but when I write it with a newline between worker and (worker), it runs… any idea why that would happen?
07:17AeroNotixhttps://github.com/AeroNotix/sajens
07:17julianlevistonAeroNotix: ?
07:17justin_smithjulianleviston: if changing a space to a newline makes it work, I'd call that a cljs bug (if that is really what is happening)
07:17julianlevistonOh you’re just mentioning it. Soz.
07:17julianlevistonjustin_smith: hm… ok. Thansk… I’ll see if I can replicate it in a simpler context and file a bug if I can.
07:17AeroNotixjulianleviston: yeah, I thought that clojure-metrics was missing a spiral type
07:17AeroNotixwhich was a count over time which expired entries,
07:17AeroNotixthere are a couple of other things which I believe it's missing, too and I'll be adding them over time.
07:19julianlevistonjustin_smith: thanks… gotta get back to it.
07:23julianlevistonjustin_smith: turns out it was actually a safari caching issue! :)
07:24justin_smithaha, that's much more sensible
07:24julianlevistonjustin_smith: yeah… was doing my head in tho becaus I was alternating… every second req, safari was caching, which happened to align with when I had the code newlined or not. lol.
07:41dnolenjust released ClojureScript 0.0-2816, only change is eliding reader meta from `reify` emission (kind of a bad bug due to :source)
07:43AeroNotixughhhh why do I get 401 deploying to clojars when logging into the webpage allows me to login with the same details!
07:43AeroNotixthis always happens :(
07:43justin_smithAeroNotix: are you trying to use ssh or https?
07:43AeroNotixjustin_smith: https
07:56AeroNotixjustin_smith: are you involved with Clojars?
07:56jcromartiehello
07:56AeroNotixjcromartie: yo
07:57jcromartiehowdy
07:57jcromartiebeen a loooong time since I've been in here!
07:57jcromartieand it's usually only when Cider starts acting up
07:57jcromartieand this time's no different :)
07:57jcromartiebut I'll stick around and be friendly instead of just bailing after I get tech support :D
07:58AeroNotixtl;dr
07:59AeroNotixjustin_smith: changed my password and now it's working
07:59AeroNotix:/
08:01jcromartieI updated Cider to 0.8.2 and now it just opens a blank *cider-error* buffer on failures, and running tests with C-c , just sits there saying "Testing..." and never does anything else
08:01jcromartieI have the matching cider-nrepl in my lein profile
08:01AeroNotixjcromartie: first rule of using CIDER, don't update CIDER.
08:02AeroNotixis there a feature you really need to update for?
08:02jcromartieyou mean remove it and install it again?
08:02AeroNotixI mean downgrade to the previous whatever version you were using
08:02AeroNotix#clojure-emacs
08:02jcromartiebleh
08:02AeroNotixI update about once every 3 months with it, it's very unstable.
08:02jcromartieyeah
08:03AeroNotixI'm using 0.9.0 snapshot, fwiw
08:03AeroNotixand it works flawlessly, though I know that's temporary.
08:03AeroNotix:)
08:04jcromartiehm
08:05AeroNotixjcromartie: there's a lot of small timing bugs with CIDER/nrepl
08:19dagda1_I'm trying to translate this to clojure (n*(Math.log(n) + Math.log(Math.log(n)))), would this be a good fit for the threading macro?
08:19opqdonutI'd just type it out
08:20opqdonutthreading is nice for expressions like f(g(h(x),y),z)
08:20opqdonutbut if you want the exercise sure, you can write that using ->
08:22dagda1_opqdonut: do you think it would be more readable without?
08:23opqdonutyes
08:24Glenjaminpossibly extracting the common term into a local might help
08:24jcromartieI've done it, and it is much more readable. But I won't spoil it for you :)
08:25Glenjaminactually i think it's clearer without the extraction
08:25jcromartieyeah I didn't do an extraction
08:26opqdonuta shorter name for Math/log _might_ be apropos
08:26opqdonutdepending on your tastes
08:26jcromartieI think Math/log is perfectly clear
08:26opqdonutyeah it's not horrible
08:27jcromartieso long as you remember it's the natural log
08:28jcromartiethough I like to have a variadic log function that does the natural log on one arg, and arbitrary base with two args
08:48justin_smithI wonder - would JIT reliably optimize the two calls to Math.log(n) ?
08:48dnolenhrm when was the last time Clojure broke binary compatibility?
08:48justin_smithor clojure compiler might even do that I guess (but unlikely)
08:51tcrayford____justin_smith: almost definitely not the clojure compiler
08:51Bronsadnolen: 1.7.0-alpha5 actually
08:51tcrayford____unlikely that the JIT would either
08:51justin_smithtcrayford____: that was my suspicion
08:51tcrayford____justin_smith: you can always turn on the print assembly flag on the jvm and find out for yourself
08:51justin_smithright
08:52dnolenBronsa: is breakage expected to be reverted? Or that's part of a more important fix?
08:52justin_smithdagda1_: so yeah, use a let to avoid doing the floating point trig twice
08:52Bronsadnolen: http://dev.clojure.org/jira/browse/CLJ-1638
08:53michaelr`dnolen: i just upgraded from 760 to 816 and something broke with core.async, is there a known problem with or I should maybe use some newer core.async? (i'm on 0.1.346.0-17112a-alpha)
08:55michaelr`dnolen: ah, ignore that..
08:55michaelr`it's always easy to blame my bugs on the new release ;)
08:57dagda1_justin_smith: thanks
08:57dnolenmichaelr`: we do a reasonable amount of testing, some things inevitably slip through
08:58dnolenmichaelr`: been a long time since we introduced problems for core.async though
09:00Bronsadnolen: given that both clojure & datomic are distributed AOT compiled I'm pretty sure keeping binary compatibility is a priority
09:04ykzrtjHi all, anyone here uses the fantastic LightTable editor?
09:05kaplanykzrtj, I do, but I can only get the python evaluator to work
09:05ykzrtjkaplan, hey what’s up man (:
09:05kaplanhi ykzrtj
09:06ykzrtjkaplan, I installed leiningen to get the repl to work
09:06ykzrtjAnyway does anyone have an idea how to change the theme of LightTable to a light one instead of the dark one? Thanks.
09:06dnolenBronsa: right does that issue fix the regression?
09:11AeroNotixis it possible when uberjaring that my top-level forms will be evaluated more than once?
09:12justin_smithAeroNotix: I wouldn't be surprised. And if your top level forms break if evaluated more than once, then they would likely not work very well when being uberjarred either
09:13AeroNotixjustin_smith: well that's what's happening, they're being evaluated more than once. I would expect a top-level form to be evaluated once and only once. Is that not something I should expect?
09:16justin_smithI don't think so, no
09:17justin_smithanything that has side effects should not be in a top level form, or should at least be wrapped in a delay
09:17AeroNotixhmm, good call with the delay
09:18justin_smiththe issue of course is that you don't actually want those side effects to be there at all at compile time
09:19AeroNotixIndeed. I don't want top-level forms but sometimes it's convenient
09:19justin_smithAeroNotix: sometimes it's useful to have an "init" function in the namespace that gets called by the user of the namespace
09:20justin_smithor gets called inside -main as the case may be
09:20AeroNotixjustin_smith: but then you have to forward declare stuff with empty def
09:20AeroNotixI'd prefer to just restructure properly using a component-like arch
09:20justin_smithAeroNotix: (declare a b c d)
09:20justin_smithno need for empty defs
09:20AeroNotixthat's what I mean^
09:21AeroNotixThat kind of stuff seems like a hack
09:22AeroNotixjustin_smith: using components makes this trivial.
09:22justin_smithOK
09:22AeroNotixNo top-level forms, but everything has it's own self-contained environment
09:22AeroNotixbut I'm working on some of my older code where I did use top-level forms
09:23justin_smithwell, I mean, you don't have a namespace at all without top level forms
09:23AeroNotixthe other thing with top-level forms is that they can stop compilation altogether if they use futures et al.
09:23justin_smithyou mean top level side effects?
09:23AeroNotixyeah]
09:34neilnihi guys, i'm new to clojure and has been trying to set up intelliJ to debug leningen project, does anyone has a good tutorial link to it?
09:35justin_smithneilni: I assume you are using cursive?
09:35justin_smithneilni: if not, first steps would be cursive and leiningen
09:35neilniyes, i'm using cursive
09:36neilnii have both setup, and was able to run the leningen project inside intelliJ
09:36neilnibut i'm having a hard to figurout out how to debuge
09:36neilnidebug
09:37CookedGr1phonis it possible to make input/outputstreams nicer with core async/transducers? Or does the model sort of fall down
09:37CookedGr1phonwhen it comes to streams of bytes
09:45dnolenCookedGr1phon: should work
09:49CookedGr1phonI suppose if you pass along byte-arrays there's no real issue. I might have a go at turning GZIPOutputStream into a gzip-chan and make some file-output channels, though it would surprise me if nobody has already done it...
10:02naiquevinI want to understand the internals of clojure.test by adding some print statements in the source code. What is the best way to do this? I tried adding the clojure source code in checkouts directory but it isn't considered by leiningen since there's no project.clj file
10:03Glenjaminhttps://github.com/clojure/tools.trace might be suitable?
10:03gfredericksnaiquevin: do you use a text editor with an integrated repl?
10:04naiquevingfredericks: yes, using emacs with cider
10:04gfredericksnaiquevin: just open the file and start evaling it
10:04gfredericksI do this all the time with libs, no need for checkouts or anything
10:08naiquevingfredericks: I can jump to definition in emacs but the resulting buffer is readonly. Or do you mean something else?
10:09justin_smithnaiquevin: if you visit the actual file for the ns it won't be read only
10:09justin_smithby default it probably gives you a view of the file inside the jar
10:09justin_smithyou can also do this the "low tech way", by going into the clojure.test ns and just running the definitions in the repl
10:11justin_smiththere are also libs like core.trace and robert.hooke that are designed to wrap existing functions in other namespaces
10:11atyzHi all, does http-kit have some kind of connection pool or do I need to write my own
10:11atyz??
10:11clojurebotBOT FIGHT!!!!!111
10:11justin_smithatyz: like, a client connection pool?
10:11stuartsierranaiquevin: Be aware, clojure.test is quite old at this point and I do not recommend following it as a guide for writing good Clojure code.
10:11naiquevinjustin_smith: ah ok! got it. Thanks
10:11justin_smithis a connection pool even a thing for servers?
10:12thhellercfleming: is there a way in cursive to display a clojure.test assertion somewhere other than on mouseover? its nice that the line that fails is highlighted but I'd like to see the error
10:12atyzjustin_smith: Yes, sorry I should have specified
10:12atyzA client connection pool
10:13justin_smithatyz: I'm not sure what an http server connection pool would be. SQL client connection pools make sense because you have multiple requests to the same server, some in parallel, so you can pre-allocate and reuse those connections.
10:14justin_smithbut when a client is making connections to your server, what can you meaningfully pool and/or reuse?
10:15justin_smithor wait, you mean clj-http.client?
10:16justin_smithatyz: maybe you want make-reusable-conn-manager https://github.com/dakrone/clj-http/blob/master/src/clj_http/conn_mgr.clj#L153
10:17justin_smithatyz: clj-http.client has a "with-connection-pool" macro
10:17naiquevinstuartsierra: ok. To add some more context, I wanted to look at the per-ns fixtures code in clojure.test to see if either similar can be implemented for expectations or the fixturex lib (https://github.com/RyanMcG/fixturex) can be used with expectations.
10:17atyzjustin_smith: similar to clj-http but with http-kit
10:18atyzI have a library that will be making requests to the same server, sometimes in parallel
10:18justin_smithatyz: maybe persistent connections http://www.http-kit.org/client.html#reuse
10:19justin_smithatyz: that doc says it's there for 120s at a time by default
10:22atyzjustin_smith: you're the best, thanks
10:22justin_smithI assure you there are better, but np
10:23stuartsierranaiquevin: Fixtures are one of the features I don't recommend imitating. :)
10:23billyJoeclojure should have this
10:23billyJoehttps://www.youtube.com/watch?v=UBKlU6HCJbs
10:40brackiHow do I get lein repl to load/require my namespace?
10:41naiquevinstuartsierra: ok, will keep that in mind :-). But why do you not recommend it? Is it the approach of using ns meta data to hold fixture functions?
10:42stuartsierranaiquevin: No, the whole idea of per-ns fixtures leaks state between tests.
10:43stuartsierraAnd they rely on dynamic scope.
10:43stuartsierrabracki: `(require 'your.namespace)`
10:50swiHello.
10:50naiquevinstuartsierra: makes sense. thanks
10:51swiI've try to connect to Sybase SQL server with net.sf.jtds driver. Connection says 'Login failed'. Where can i look for more details about 'why'?
11:14gzmaskHow do I get rid of the namespaces in defmacro ? I wanna use local vars and defmacro is giving me namespaces automatically
11:16gfredericks`(let [foo# 34] (inc foo#))
11:16gfredericks,`(let [foo# 34] (inc foo#))
11:16clojurebot(clojure.core/let [foo__25__auto__ 34] (clojure.core/inc foo__25__auto__))
11:17gzmaskcool, but my foo is defined outside of the macro?
11:18gzmaskso gensym won't work for my situation
11:21samfloresis there a built-in (or more lispy) way of doing this: (def make-vec [x] (if (vector? x) x (vector x)))
11:22samfloresgiven an argument return a seq containing the argument or the argument itself if it's already a seq
11:23TimMcgzmask: Are you trying to build a reify or proxy expression or something?
11:27gzmaskTimMc: I am just trying to reduce the duplicated code without using too much functions -- https://github.com/gzmask/embodier.stl.slicer/blob/master/src/slicer/flood.clj#L158
11:30gzmaskso basically I want to use macro as hiccup with outside variable names
11:31danielglausergzmask: just glancing at the code you posted, are you familiar with partial? http://clojuredocs.org/clojure.core/partial
11:32TimMcgzmask: Macros will make you sad here.
11:33gzmaskpartial will probably work! never heard of this feature before, thanks.
11:33TimMcWhy not (let [make #(make-leaf (split-aabb aabb :upper-left) a-slice % nozzle-diameter)] ... (make :upper-left) ...)
11:34danielglausergzmask: or if you swap the pos and nozzle-diameter arguments to make-leaf you could do something like this:
11:34gzmaskTimMc: I know a function will do. I am just been thinking "man I haven't touch macros for a long time, why is that or is macro no longer relevant in clojure?"
11:35danielglauser(let [split-result (split-aabb aabb :upper-left) make-leaf-fn (partial make-leaf split-result a-slice nozzle-diameter)] ... (make-leaf-fn ...))
11:36TimMcgzmask: Macros are rarely the right answer. I've written like... 10 macros that turned out to be a good idea.
11:36TimMcThey're powerful but very fragile for most purposes, and they infect reliant code.
11:37gzmaskTimMc: right, but isn't the whole Homoiconicity thing just makes lisp better than others?
11:38TimMcSure, but a little goes a long way.
11:40TimMcFor example, it means you could have done (defmacro cond-> ...) before that was added to clojure.core. That doesn't mean you want *lots* of macros, just that you can create them in the few places where it makes a difference.
11:40gzmaskdanielglauser: partial will probably makes my code simpler. I don't know why I keep thinking partial as the clojure version of haskell currying. ..
11:41TimMcOpen-heart surgery with anaesthesia is a pretty cool thing but you generally want to keep it in reserve for when other things don't work. :-P
11:42gzmaskTimMc: I agree. I guess macro is for DSL stuff and partial is better for templates
11:43TimMcEven DSLs are often best done up as functions or data structures.
11:44danielglausergzmask: Some good advice I got was use macros for differed execution, when you need to make a decision before the inner parts of an expression are evaluated.
11:45danielglausergzmask: not as familiar with Haskell but I believe that partial is pretty close
11:45TimMchttp://www.slideshare.net/cgrand/dsl-5537797 <-- talk on macros and when not to use them (answer: almost always)
11:45brackiCan anybody recommend a sane logging config when working with Java code?
11:45TimMcspecifically focused on DSLs
11:48brackiAlso, how do I convert a java.nio.ByteBuffer into an []byte?
11:48xemdetiabracki, .array()?
11:56justin_smithyeah (.array BB) should do it
12:20sdegutisWould it be accurate to say that Om uses the same technique to manage data as Cortex[1] does? [1]: https://github.com/mquan/cortex
12:21djamessdegutis: have you compared the implementations? cortex is new to me. it isn't clear to me if it is using cursors.
12:21sdegutisdjames: the readme seems to indicate it uses something very similar to cursors
12:22sdegutisI can't tell how different they are though, not understanding cursors too well, but thinking cursors are basically "x-path"-like things for use with clojure.core/update-in
12:22Glenjaminsdegutis: from what i recall of cortex, it attempts to use the same model as Om
12:22sdegutisGlenjamin: oh, neat
12:22sdegutisThat's the same technique I ended up trying to develop myself, both in ClojureScript and then in LiveScript.
12:23sdegutisSo Om and Cortex seem like validation that my idea is actually probably the best way to go about it.
12:23sdegutisThus, yay.
12:23djamessdegutis: did you see this discussion? https://groups.google.com/forum/#!search/cortex$20clojure/reactjs/ljsZLaPX_s0/Afz9WgngRiwJ
12:23sdegutisdjames: only now
12:24sdegutisOh wow.
12:24sdegutisSo that means all three of us came up with the same idea independently.
12:25djamessdegutis: do you have an open source project in the same spirit?
12:25Glenjamini had always assumed cortex was directly inspired by Om, neat to see it was independant
12:25sdegutisdjames: no, quickly into development I figured I'd research to see if it was already done, or perhaps a better solution already existed, and found Cortex, and then Om
12:26roland__hi, quick question: is the order of the :source-paths vector significant in clj(s) builds? I find that if i have :source-paths [path1 path2] then any reference to a namespace in path2 from path1 does not get resolved
12:26djamessdegutis: what was you path / pain point? what led you in this direction? JS first? then CLJS?
12:26djames*your
12:28sdegutisdjames: I started in ClojureScript and had this: https://github.com/sdegutis/simplebudget/blob/master/client.cljs
12:29sdegutisdjames: and I realized it was pretty awful so I started researching alternatives and found Cortex and realized mine was a step in that direction, just much hackier than Cortex
12:29sdegutisSince then, I've moved away from ClojureScript and am now using LiveScript.net + PreludeLS.com
12:30sdegutisIt's the best of Clojure (even the decent syntax) without ditching JavaScript's syntax when needed.
12:31djamessdegutis: interesting. Just curious what about Om or other alternatives wasn't to your liking.
12:33sdegutisdjames: In general I prefer not to use software that proudly describes itself as "opinionated".
12:34sdegutisOh wait, it was seancorfield who described Om as opinionated.
12:58crash_epIs there some sort of `core.async/assert` that operates on values passing through channels?
13:08djamessduckett: there are plenty of ways to use React, certainly: Om, Reagant, etc, as discussed on the Clojure Google group
13:10djamessduckett: do you use Linux? Git? both are pretty "opinionated". I think the label is about as valuable as "big data".
13:10djamesmeaning that it is not a very good indicator of "is this useful for my purposes"
13:12gfrederickscrash_ep: what would it do?
13:12{blake}Opinionated is fine when it's my opinions. =)
13:12joshhartiganI’m very new to Clojure. How would i join the two chars I’ve defined here: http://git.io/NTAL into a string?
13:12crash_epgfredericks: throw an exception if a value passing through a channel does not meet some expectation
13:13gfrederickscrash_ep: how do you throw an exception with core.async?
13:13AimHere,(str \a \b)
13:13crash_epgfredericks: now you ask – "on which thread?" :)
13:13clojurebot"ab"
13:13AimHerejoshhartigan, use 'str'
13:13joshhartiganAimHere: thank you. Is there anything else I’ve done badly in the file?
13:14AimHereNothing stands out as being wrong
13:14crash_epgfredericks: good point, there is no first-class vehicle for communicating errors in core.async, is there.
13:14gfredericksnope
13:14joshhartiganok, thanks for your help
13:14gfredericksevery time I've used core.async I end up agonizing over error handling for most of the time
13:15crash_epgfredericks: how did you relieve that anguish?
13:15crash_eps/anguish/agony/
13:15gfrederickscrash_ep: denial
13:16crash_epgfredericks: hahahah
13:16gfredericksI haven't used it for nearly a year now so maybe the community has settled on some useful approach and I didn't notice
13:16SegFaultAXgfredericks: What are you using instead?
13:17SegFaultAXOr did you just stop writing concurrent code?
13:17gfredericksmost of the concurrent code I've been writing works okay with just thread pools I think
13:19hyPiRiongfredericks: Idea: like core.async, but it actually a wrapper around an Erlang VM.
13:19hyPiRionnow you can do that error handling in peace
13:19SegFaultAXhyPiRion: I think that's called "Erlang"
13:20gfredericksI spend most of my core.async time fantasizing about erlang.clj
13:20gfredericksor something mildly similar
13:20SegFaultAXHave you tried Elixir? I've been meaning to give it a go.
13:20SegFaultAXI /love/ Erlang.
13:21gfredericksno
13:30gzmaskwhen doing mutual recursion with trampolining, is have anonymous functions return by both function really necessary? I think having one in one of the function is enough.
13:30clojurebotOk.
13:30SegFaultAXWhat do you mean "having one in one of the function is enough"?
13:31SegFaultAXAssuming the trampoline uses the simple predicate "if the thing I got back is callable, continue, else break"
13:31hyPiRionclojurebot: when doing mutual recursion with trampolining,?
13:32clojurebotwhen doing mutual recursion with trampolining, is have anonymous functions return by both function really necessary
13:32hyPiRionthat bot catches too many random things
13:32SegFaultAXIt would cease to recurse if one of the functions didn't return a continuation.
13:32SegFaultAXHaha
13:32gzmasklet's say there is an even? function and odd? function, I don't think both functions need to return #(...). only ons returns #(...) will be good enough
13:33hyPiRiongzmask: I think that should be sufficient, yes. Unless the mutually recursive function can also call itself
13:33hyPiRion(directly)
13:34SegFaultAXCare to show an example of what you mean?
13:34gzmaskyes, as long as there is a break point to prevent the loop
13:36gzmask(def even? #(if (zero? %) true #(odd? (dec %)))) (def odd? #(if (zero? %) false #(even? (dec %))))
13:38gzmaskboth function return anonymous function
13:38gzmaskbut only one is needed actually. makes sense?
13:40SegFaultAXgzmask: Sure, in a trivial case like that.
13:50justin_smithso I make a POST request with clj-http and it prints something about status 400 and exceptioninfo but the return value is null - how do I get at the actual error response from the server, or even just that ExceptionInfo object? try/catch isn't helping
13:51justin_smithit isn't setting *e either...
13:51gfredericksjustin_smith: huh what?
13:52gfrederickswhat's the context here
13:52gfredericksclj-http doesn't do anything super weird with exceptions
13:52gfredericksthe return value from clj-http directly is null? I've never seen that happen
13:52justin_smithgfredericks: my bad, it was my own goofy setup, but it was only printing the shit in my server window, not my client window
13:52justin_smithgotta live dynamic binding of *out* :P
13:53justin_smith*love
13:53mmitchelli figured something like (Oid. (into-array Oid [oid1 oid2])) would work for this https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-auth/src/main/java/org/apache/hadoop/security/authentication/server/KerberosAuthenticationHandler.java#L360
13:54mmitchellbut no luck - anyone know what I'm doing wrong there?
13:55justin_smithmmitchell: so you want to provide an array of Oid as the constructor arg to an Oid?
13:55gfredericksyeah I think the outer form is unnecessary
13:55gfredericksjust the into-array call should do it
13:55mmitchelldo'h! i think i just realized ... that's a "new" array of Oids, not a new Oid with an array of Oids
13:55mmitchellyeah! ok :) thanks
13:55justin_smithexactly
14:01gfredericks,(make-array Object 82828773)
14:01clojurebot#<OutOfMemoryError java.lang.OutOfMemoryError: Java heap space>
14:02justin_smithhaha
14:02drojasjajajaja
14:02TimMcclojurebot: gfredericks is boss
14:02clojurebotOk.
14:03justin_smithgfredericks: when the singularity happens, you'll be regretting those shenanigans
14:04gfredericks ,(->> (range 10000) (iterate shuffle) (take 10000) (last) (last))
14:04clojureboteval service is offline
14:05gfredericks~iterate shuffle is the only way to be sure
14:05clojurebotYou don't have to tell me twice.
14:10SegFaultAXgfredericks: Please tell me you saw that somewhere in production.
14:10tcrayford____clojurebot: gfredericks
14:10clojurebotgfredericks is polluting your memory and must be destroyed
14:10tcrayford____thanks gary
14:12gfredericksSegFaultAX: nope
14:14gfrederickstcrayford____: hey no probalo
14:16gfredericksI think I might finally completely understand how the ^:dynamic stuff in Var.java works
14:17tcrayford____gfredericks: gonna write a blerg?
14:17gfredericksI wonder if rich regrets anything about vars
14:17gfrederickstcrayford____: well I'm preparing a talk, so you just need to come to chicago in a couple weeks
14:17gfredericksit's like a time-and-location-sensitive blogpost
14:17tcrayford____ah ok
14:19gfredericksthe thing I hadn't fully internalized is that there's three different ways to mutate a var
14:19gfredericksalter-var-root, binding, and set! do three different kinds of things
14:20SegFaultAXChange root binding for all threads, change binding for a scope, and change binding for current thread. Is that close?
14:20gfredericksdepends on whether the last two correspond to binding and set! respectively
14:21SegFaultAXYes
14:21gfrederickswhen you use binding you're making a new thread-local box for the var's value; normal uses of binding don't mutate that box at all, but set! does
14:24gfredericks~a var is a box and a collection of stacks of boxes
14:24clojurebotA nod, you know, is as good as a wink to a blind horse.
14:49hyPiRiongfredericks: As long as the tests pass, you play a bit with it and can't find any issues, you're free to bump deps
14:58ghoulehello everyone
14:58ghoulehey acron^ good day :D
15:07gfrederickshyPiRion: oh wow that verison number was in more places than I thought
15:08hyPiRionYeah, the repl dependencies are scattered all over the place
15:15gfrederickshyPiRion: it seemed like something to be careful about because, in some senses, bumping the dep number in leiningen constitutes more of an nrepl release than the release itself does
15:19hyPiRionyeah
15:26ghoulehyPiRion: yo!
15:26ghoulehyPiRion: how's your day mate?
15:27hyPiRionsurprisingly average, actually
15:30ghoule:P
15:32sdegutisHere are the results of my investigation into using Haskell to build web apps, compared to Clojure: http://sdegutis.github.io/
15:34amalloythat is an unusually mild and reasonable comparison of two languages
15:36sdegutisamalloy: sorry :(
15:41agarmansdegutis: not a bad quick comparison, you have any code comparisons?
15:47sdegutisagarman: thanks
15:48sdegutisagarman: I wouldn't know what to write for an example of comparison
15:48martinklepschsdegutis: I think amalloy's comment was positive, in case that sorry :( wasn't a joke :)
15:48sdegutismartinklepsch: :)
15:48martinklepschsdegutis: ok, I see :D
15:49sdegutisamalloy, martinklepsch: originally I wrote this to my boss and then realized it could be generally useful to anyone
15:49sdegutisso it's a blog post now
15:49martinklepsch:thumbsup:
15:50martinklepschAlways wish I'd be good at something as hipster as haskell or ocaml :D
15:50sdegutismartinklepsch: they're basically the same as Clojure tbh
15:50sdegutismartinklepsch: main difference is syntax, and also the fact that pattern matching is built-in
15:51martinklepschmaybe I should revisit that stuff
15:51profilsdegutis: I agree with the pro haskell points (such as error propagation, pattern matching), but clojure is much more readable, real world code is much easier to write in clojure
15:52sdegutisprofil: see The Bad point #1
15:52agarmansdegutis: we tried hard to use Haskell at the Weather Channel in 2009-2010. It was either too pedantic or too MVar
15:53sdegutisagarman: pedantic how? and MVar = ?
15:53profilsdegutis: yeah exactly, just wanted a discussion :D
15:53amalloyhaskell is only pedantic because it loves you and doesn't want to see you making bad choices, hanging out with the wrong types
15:54agarmansdegutis: in order to remain pure in anything real, we were using StateMonad, StateT, existential types all over the place. Or we could just punt on typing our effects and have unpack MVars as needed
15:55agarmanMVars are basically saying, making specific types for every code path that has an effect is a pain, so we're giving up
15:55agarmanat least that was our experience
15:56agarmanand 4 years ago so I'm pretty dated on that stuff
15:57agarmanfor reference: http://hackage.haskell.org/package/base-4.7.0.2/docs/Control-Concurrent-MVar.html https://ghc.haskell.org/trac/haskell-prime/wiki/ExistentialQuantification
15:59sdegutisprofil: oh ok
16:00dnolenonce again Cursive save my butt even w/ 16 threads I can find the exception
16:00sdegutisamalloy: https://twitter.com/_sdegutis/status/565253233489498112
16:00{blake}Cursive is good.
16:00dnolensdegutis: one thing about Haskell which no one seems to understand is the inference bit
16:01sdegutisagarman: oh wow that sounds awful
16:01dnolenmost Clojure would need Higher Ranked Polymorphism
16:01dnolentype inference for that is undecideable
16:01dnolenyou need local type hints using a mechanism devised by ...
16:01dnolenMartin Ordersky!
16:01sdegutisdnolen: heh
16:02_KryDos_Hi guys. I'm trying to use ServerSocket lib in my clojure app. Is any body tried to use it? I'm came from Node.JS world and there I had special event like "connection closed". I can't find something similar in SocketServer library. I'm storing all connection in special array and if connection is closed then I need to detect it and remove this connection from special array (list). I need to know which connection was close
16:02_KryDos_d. Could you please help me?
16:03sdegutisWhere's agarman?
16:03sdegutisI was gonna respond.
16:04_KryDos_I"m also found (using netcat) that when connection is closed my socket server receives "nil". I'm checking if message is nil then this is kind of disconnection event. But server not always receives nil...
16:27ggherdovIn the quest for a clojure-aware profile (i.e. not a java profiler), I got to https://github.com/ptaoussanis/timbre
16:27ggherdovLooks like I need to pollute my code with a "probing" macro everywhere I want profiling, like (foo 42) becomes (p :lets-profile-foo (foo 42)).
16:27ggherdovBut I could also write a macro that walks recursively my program and put the "probes" for me, right?
16:29TimMcIt wouldn't be a macro unless you wanted to wrap entire namespaces in it.
16:30TimMcand even then you'd have to distinguish function call forms from other forms.
16:30TimMce.g. where in (letfn [(foo [] 5)] (foo)) is it appropriate to include a probe?
16:34chouserggherdov: a more feasible approach might be to examine a namespace after its been defined and swap in definitions of function vars to wrap them in (p ...)
16:34TEttingerredefining defn?
16:34ggherdovTimMc: my naive idea was to have somewhere a list of the 20 functions I want to instrument, and my recursive macro would look for them in the tree and replace them with the probe.
16:35TEttingerchouser, I haven't seen you here in a while!
16:35chouserTEttinger: yeah, not here much anymore.
16:35TEttinger(inc chouser)
16:35TEttingerlazybot ded
16:36chouseroh dear.
16:36ggherdovTEttinger: that's probably too aggressive (redefine defn). I really care about 20 or so functions. I like that all... clojure.core stay silent (no probing)
16:37TEttingerah, yeah I was just thinking it would rebind it within an ns
16:37ggherdovah ok
16:37chouserSo no, not so much redefining defn, as (alter-var-root! #'fn-to-profile (fn [old-fn] (fn [& args] (p :foo (apply old-fn args)))))
16:39ggherdovchouser: ahah thanks. You've basically done it for me :)
16:39chouseruntested! :-)
16:39ggherdov:)
16:40chousernow, "apply" is going to cost you perf-wise, so you might want to avoid that by getting clever with the argument count or something.
16:41ggherdovI see
16:44stuartsierraInjecting code all over the place is going to cost you perf-wise too.
16:48justin_smith(inc amalloy)
16:48cflemingthheller: You mean like in the REPL window?
16:48justin_smith; for the "haskell doesn't want you hanging out with the wrong types" thing
16:48cflemingthheller: A few people have requested that, yeah
16:50tvanhensAnyone know of any tricks to debug data_readers.clj woes? I am able to bind data readers to clojure.core functions but nothing from any of my namespaces
16:50tvanhensgetting java.lang.IllegalStateException
16:50stuartsierratvanhens: The namespace has to be loaded before you read code containing your custom reader.
16:51tvanhensstuartsierra: I've tried manually evaluating the functions and using the readers in the ns with the finction definitions just after loading with no luck
16:52tvanhensand when I call the fully ns qualified function names the functions evaluate
16:52justin_smithggherdov: strictly speaking, even the "java profilers" are profiling the jvm, which is what clojure compiles down to. Don't give up on them entirely, they'll give you useful info that's a lot harder to get out of something like timbre. But you do need to learn more about interop and clojure's implementation for them to be useful.
16:54tvanhensstuartsierra: anything that could cause that error other than loading the ns ahead of time because it appears to be loaded
16:54stuartsierratvanhens: Dunno, the name resolution of data readers is opaque.
16:54stuartsierratvanhens: On the upside, there's never any reason to use data readers in code.
16:54stuartsierraI wrote that stuff and I don't even remember how it works.
16:55tvanhenshaha fair enough. Was tring to use it to compress down my datomic schema definitions into data that was a bit easier to read
16:55tvanhenscan work around it though
16:56stuartsierratvanhens: That's easy, then. Put your schemas in an .edn file and call clojure.edn/read, passing in your custom tagged literals as a map arg.
16:56winkhello. any one of you got a ".lein-classpath" file and would be able to tell me if it was manually created and where it lives relative to your project and what contents it has?
16:56justin_smithtvanhens: there is a schema lib for datomic that I've found useful https://github.com/Yuppiechef/datomic-schema - I got pulled into a project where it was already being used and I think it's pretty helpful
16:56stuartsierraTagged literals in EDN files: good. In Clojure code: bad.
16:56tvanhensoh interesting didn't know you could do that. That will definitely suit the bill. Thanks stuart
16:57justin_smithtvanhens: it makes a bunch of the more common specifications much less verbose
16:57tvanhensjustin_smith: I'll give that a try too thanks
17:14dagda1_I blogged about my toils with trying to get fast prime number generation in clojure http://www.thesoftwaresimpleton.com/blog/2015/02/07/primes/
17:22TEttingerdagda1_: check for reflection in math
17:22TEttingerit's a big slowdown cause
17:22jimboslice_Could anyonw help a noob figure out what #_ means in clojure? I've seen it a few times in this codebase I'm working with. Is it just a way to comment out a statement?
17:23TEttinger$google ztellman primitive-math
17:23TEttingerjimboslice_: #_ means ignore
17:23kwladykai am reading value from $scope using angular.element("#gallery").scope().galleryIndex. But when i writing new value using angular.element("#gallery").scope().galleryIndex = 123; the <div class="item-index">{{ galleryIndex+1 }}</div> is not refreshing!
17:23kwladykahow to solve that?
17:23kwladykadamn not this channel
17:23kwladykasorry
17:23jimboslice_Awesome, thanks
17:23TEttingerit's like ; to ignore a line, but #_(blah blah) ignores form (blah blah) and doesn't compile it
17:24dbaschjimboslice_: and it’s a reader macro, see http://clojure.org/cheatsheet
17:25TEttingerjimboslice_: http://yobriefca.se/blog/2014/05/19/the-weird-and-wonderful-characters-of-clojure/ is also handy for unusual symbols
17:25TEttingerdagda1_: https://github.com/ztellman/primitive-math
17:25jimboslice_Cool, I've been looking for something like this
17:26AeroNotixdagda1_: I'm surprised you wrote so much and didn't do any reflection checks.
17:26justin_smithyeah, it allows nested or multi-line comments
17:26amalloystuartsierra: what, there's never a reason to use data readers in code? isn't that exactly what datomic uses them for? #db/id and so on?
17:27stuartsierraamalloy: #db/id in code is likely a mistake.
17:27stuartsierraE.g. (defn make-foo [] {:db/id #db/id[:db.part/user]}) only generates the ID once, at read-time.
17:28stuartsierra`d/tempid` is the function to call in code; #db/id is just for EDN files.
17:29TimMcData readers in code are probably why I hate data readers.
17:29TimMc(Which is to say, I've only seen them abused.)
18:15gfredericks,(defn make-list [] (promise))
18:15clojurebot#'sandbox/make-list
18:16gfredericks,(defn add-to-list [list x] (or (deliver list x) (recur (second @list) x)))
18:16clojurebot#'sandbox/add-to-list
18:17gfredericks,(defn list->seq [list] (lazy-seq (when (delivered? list) (cons (first @list) (list->seq (second @list))))))
18:17clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: delivered? in this context, compiling:(NO_SOURCE_PATH:0:0)>
18:17gfredericks,(defn list->seq [list] (lazy-seq (when (realized? list) (cons (first @list) (list->seq (second @list))))))
18:17clojurebot#'sandbox/list->seq
18:17gfredericks,(def my-list (make-list))
18:17clojurebot#'sandbox/my-list
18:18gfredericks,(doto my-list (add-to-list "one") (add-to-list "two") (add-to-list "three"))
18:18clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>
18:20gfrederickspromise lists are a new type of terrible mutable data structure with awful performance characteristics; they're probably threadsafe though.
18:20gfredericksoh add-to-list was bad
18:21gfredericks,(defn add-to-list [list x] (or (deliver list [x (promise)]) (recur (second @list) x)))
18:21clojurebot#'sandbox/add-to-list
18:21gfredericks,(doto my-list (add-to-list "one") (add-to-list "two") (add-to-list "three"))
18:21clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>
18:21hiredman_well, they are just prolog lists
18:21hiredman_(not really new)
18:21gfredericksprolog uses promises?
18:22hiredman_gfredericks: not really, but if squint a promise is just a logic variable that hasn't been unified
18:23hiredman_there is some word for lists where the car is something, but the cdr is a logic var that hasn't been unified yet, but I forget what it is
18:23gfredericksthat's a mighty squint
18:23patchworkWhat is the best way to do a random variable in clojure? Say I want :a 5% of the time, :b 20% etc etc
18:23TEttinger,(add-to-list my-list "whee")
18:23clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>
18:23TEttinger,(add-to-list my-list #(str "maybe? " %))
18:23clojurebot#<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>
18:23gfredericksoh I know why
18:24gfredericksmy-list is corrupt
18:24gfredericks,(def my-list (make-list))
18:24clojurebot#'sandbox/my-list
18:24TEttinger,(add-to-list my-list "whee")
18:24clojurebot#<core$promise$reify__6709@740f1890: ["whee" #<core$promise$reify__6709@b15d177: :pending>]>
18:24TEttingeragh
18:24gfredericks,(list->seq my-list)
18:24clojurebot("whee")
18:24gfredericks,(add-to-list "heyo")
18:24clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox/add-to-list>
18:24gfredericks,(add-to-list my-list "heyo")
18:24clojurebot#<core$promise$reify__6709@b15d177: ["heyo" #<core$promise$reify__6709@528c4c14: :pending>]>
18:24gfredericks,(list->seq my-list)
18:24clojurebot("whee" "heyo")
18:24gfredericksshould change add-to-list to return :void
18:25TEttingerbut that's unclojuresque
18:25TEttinger,(conj [] 1)
18:25clojurebot[1]
18:35gfredericksthis is all about mutability though
18:37hiredman_gfredericks: someone in #prolog was nice enough to jog my memory, difference lists are what I was thinking of
18:37hiredman_http://homepages.inf.ed.ac.uk/pbrna/prologbook/node180.html
18:45gfredericksoh right minikanren does that I think
18:46uptowndoes om emit react-canvas yet?
18:46uptown(i'm kidding)
19:25Guest9000Does io.pedestal/pedestal.immutant use immuntant 1 or 2?
19:26Guest9000Or is it like a wrapper?
19:41irctc_Hi I have a clojurescript project that is generating warnings at compile time for core.async I think this maybe due to dependencies having different versions of core.async
19:41justin_smithGuest9000: https://github.com/pedestal/pedestal/blob/master/immutant/project.clj#L19 that shows the latest version using 2
19:41irctc_Is this common?
19:42irctc_WARNING: Use of undeclared Var cljs.core.async/do-alts at line 62 file:/home/stu/.m2/repository/org/clojure/core.async/0.1.303.0-886421-alpha/core.async-0.1.303.0-886421-alpha.jar!/cljs/core/async/impl/ioc_helpers.cljs WARNING: Bad method signature in protocol implementation, impl/Handler does not declare method called lock-id at line 214 file:/home/stu/.m2/repository/org/clojure/core.async/0.1.303.0-886421-alpha/core.async-0.1.303.0-
19:42Guest9000justin_smith: thanks
19:43Guest9000irctc_: Are you using a chestnut project?
19:44justin_smithirctc_: you can use "lein deps :tree" to see if there are any conflicts in your deps
19:44irctc_As a follow up question is scope="provided" in the :dependencies section of project.clj meant to help with this problem
19:45irctc_@Guest9000 no it is lein
19:48irctc_@justin_smith thanks that command highlighted a lot of issues
19:50thearthuranyone know (or know where I sould ask) how to call the amazonica.aws.route53/change-resource-record-sets successfully? I'm lost in AWS documentation XML hell
22:44bdruthquick question ... how can I create a list/set of strings that are appended by a range of numbers
22:45bdruthwithout using #()
22:45gfrederickseh?
22:45gfredericksmaybe an example?
22:45bdruthe.g. - alternative form of (set (map #(str "mystring" %) (range 1 9)))
22:45mgaareuse partial instead of #()
22:45bdruthah, thank you!
22:46TEttinger,(map (partial str "mystring ") (range 10))
22:46clojurebot("mystring 0" "mystring 1" "mystring 2" "mystring 3" "mystring 4" ...)
22:46bdruthawesome, ty
22:47TEttingerbdruth: you can also always use (fn [arg1 arg2] (str arg1 arg2)) style explicitly
22:47TEttingereven in another #() or fn
22:47bdruthright, right ...
22:47mgaareI'm always on the lookout for opportunities to use partial and/or comp instead of #() or fn :D
22:47bdruth2nd-year clojure n00b here, so .. still learning ;-)
22:47bdruththank you!
22:47TEttingerno prob
22:48TEttingerI'd (inc mgaare) but lazybot is dead
22:48sdegutisI've slightly updated my blog post comparing Haskell to Clojure especially when writing web apps.
22:49mgaaresometimes I wish there was a form of -> and ->> that returned partials
22:49mgaaresdegutis: link?
22:49crash_epsometimes i wish the language supported curried fns
22:50sdegutisI had a conversation in private earlier today with an anonymous member of this channel (hi raek) who responded to my points, and I hope he publishes his response within a few weeks.
22:50sdegutismgaare: http://sdegutis.github.io/
22:50sdegutiscrash_ep: why?
22:50sdegutiscrash_ep: it does via clojure.core/partial btw
22:50TEttingernot quite the same, but transducers are close in a way
22:51sdegutismgaare: I really like Haskell's & operator which is similar to Clojure's ->> but until GHC 7.10 comes out you have to define it yourself
22:51sdegutisTEttinger: also clojure.core/partial is similar (i.e. exactly the same)
22:52TEttingerheh, I think language support of curried functions usually means curried by default
22:52amalloysdegutis: what is (&)?
22:52TEttingercan you have a partial fn that fills the first of 3 arguments?
22:52mgaaresure
22:52crash_epI should have said "curried by default". But I do understand why Clojure isn't curried by default.
22:52sdegutisamalloy: this is the exact Haskell code to define it: a & b = b a
22:52TEttingerand if you give it 1 arg will it return a new partial fn or what?
22:53amalloyit's just (flip ($)) then?
22:53sdegutisamalloy: after defining it as such, you can do this: [1, 2, 3] & map (+4)
22:53sdegutisamalloy: I hadn't thought of it that way. Maybe?
22:53sdegutisamalloy: also, since when do you know Haskell?
22:53sdegutisamalloy: you're full of surprises, my tiny friend
22:53amalloyi talk about haskell all the time, man
22:54TEttingeramalloy stares unblinking into the eye of knowledge
22:54mgaareTEttinger: no, throws an exception
22:54mgaare,((partial reduce +) 10 [1 2 3])
22:54amalloyanyway yeah i can see how having an operator like that would look a lot like ->>
22:54clojurebot16
22:54sdegutisamalloy: except more type-safe and less flexible (cuz no varargs)
22:54amalloyright
22:55mgaare,((partial (fn [a b c] (+ a b c)) 1) 2)
22:55clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: sandbox/eval73/fn--74>
22:56sdegutisI am highly considering reverting back to ClojureScript and just using Om.
22:56TEttingerso I see why you wish the language supported curried fns by default sometimes, crash_ep :)
22:56TEttingersdegutis, from haskell?
22:56sdegutisTEttinger: From LiveScript (currently).
22:56TEttingeroh!
22:56TEttingerI know that one
22:57sdegutisI really want to avoid JavaScript's semantics, so I've been trying to find a decent alt-JS language.
22:57sdegutisAt first it was ClojureScript because I'm an expert at Clojure, so it was natural.
22:57TEttingerI don't think livescript tries to avoid being java too much
22:57TEttinger*script
22:57sdegutisTEttinger: hence my looking to move away from it again
22:58TEttingerOm probably has more users
22:58sdegutisI considered learning PureScript or maybe GHCJS, but I want to just get this app written already and not experiment too much.
22:58sdegutisYeah definitely.
22:59sdegutisI like how mature Om is compared to the others.
22:59mgaareOm is pretty magic
22:59sdegutisI'm okay with magic right now, as long as it *works*.
22:59sdegutisI mean, I'm already using React.JS which is pure magic.
23:00sdegutisAlso, CortexJS is broken.
23:00mgaareom is more magic :D
23:00sdegutis(https://github.com/mquan/cortex -- in their example, cortex.a returns undefined; ugh!)
23:00sdegutismgaare: can't be much more than using reactjs + cortexjs?
23:01mgaaredon't know enough about cortex to comment
23:02sdegutismgaare: it's basically just a way to mutate a (usually giant) JSON data structure while getting callbacks any time any change happens (so you can re-render react)
23:03sdegutisHonestly I think I just ought to learn JS already.
23:03sdegutisAlthough I was hoping to get by long enough where it's not necessary, like with Assembly.
23:03sdegutis*long enough until
23:43amalloyvas: caps->ctrl
23:44vasamalloy: I WILL HAVE TO TRY THAT
23:50amalloyi could map ctrl->caps as well but like...then i might accidentally hit caps lock
23:50sdegutismgaare: um, who are you resopnding to?
23:50mgaaresdegutis: your blog
23:50sdegutismgaare: my blog post, right?
23:50sdegutisok
23:50sdegutismgaare: I like not having to type parens all the time
23:51sdegutismgaare: but I'm on the fence about custom operators
23:51sdegutismgaare: and I don't like memorizing things, operator precedence/associativity is no exception
23:51mgaareI don't like having to think about which thing I'm going to type, or precedence/associativity
23:52sdegutismgaare: me neither, but I still have these in Clojure (to some extent)
23:53mgaarethe number of those kinds of little syntax decisions are admittedly a bit greater in clojure than in most lisps, but quite a bit less than other languages
23:54ianhedoesitsdegutis: link to blog/blog post?
23:59sdegutisianhedoesit: http://sdegutis.github.io/