#clojure log - Feb 10 2015

The Joy of Clojure
Main Clojure site
Google Group
List of all logged dates

0:55 tomjack: I remember people saying "oh yeah Joda-Time!" about tagged literals

0:55 but DateTime, at least, is not suitable for inst, is it

0:57 Dreigh: Guess this is the time everything goes quiet huh?

0:57 ykzrtj: Kind of, yeah.

0:57 Haha.

0:59 Dreigh: Wow, one other person who is alive! :D

0:59 ykzrtj: Hi there Dreigh! :D

1:00 tomjack: I guess Instant is better

1:00 Dreigh: What's the time where you're at? I can never figure it out for people on the other side of the world...

1:00 ykzrtj: It’s 2 in the afternoon, man.

1:00 Unfortunately my timezone doesn’t sync with the majority of the chatroom. Haha, yours?

1:01 Dreigh: Dude, no way! 7pm over here, but that's all part of being ahead of the rest of the world's timezones

1:02 ykzrtj: Haha yeah that’s true too :)

1:04 Dreigh: Guessing it's winter over there, man?

1:04 ykzrtj: Nope it never snows here. Tropical weather.

1:04 kaplan: Hi! Can anyone explain atoms to me, I read the clojure.org page but understood nothing

1:05 Dreigh: Niiiiice.

1:05 ykzrtj: Dreigh, winter over there?

1:06 ghoule: hey kaplan

1:06 an atom is an element that you can update

1:06 kaplan: ghoule, ah

1:06 Dreigh: Nah, it's the summertime. Pretty sweet though, even if you get burned to a crisp!

1:06 ghoule: basically it isn't immutable

1:06 kaplan: ghoule, so, any easy to understand examples?

1:06 ghoule: eee

1:07 yeah ill try to post 1 or 2

1:07 user=> (def my-atom (atom 0))

1:07 #'user/my-atom

1:07 user=> @my-atom

1:07 0

1:07 user=> (swap! my-atom inc)

1:07 1

1:07 user=> @my-atom

1:07 1

1:07 user=> (swap! my-atom (fn [n] (* (+ n n) 2)))

1:07 4

1:07 ykzrtj: Dreigh, New Zealand?

1:08 kaplan: ghoule, ah, that explains it

1:08 Dreigh: Yeah man- did some google research huh?

1:08 ghoule: you can then use clojure ! functions on atoms

1:08 to update and mod the atom element

1:08 ykzrtj: Dreigh, haha no I only know two countries that have summer in the southern hemisphere

1:08 Australia and New Zealand

1:08 kaplan: ghoule, what does swap! do?

1:09 Dreigh: Well, it's already a victory that you don't think New Zealand is part of Australia. No kidding. It happens.

1:09 ykzrtj: Haha, true. I’m from Singapore. Quite near NZ.

1:09 Not exactly near. But yeah.

1:09 Dreigh: It's like saying Canada or Mexico is a part of the US @_@

1:10 ykzrtj: Or that Singapore is part of China.

1:10 ghoule: ok kaplan

1:10 so

1:10 Dreigh: Near enough. Sheesh, now the tropical weather comment makes sense!

1:10 ghoule: atom is basically a reference to an immutable element

1:10 like a list

1:10 and functions like swap

1:10 ykzrtj: What a fun game, guessing everyone’s country of origin :)

1:10 ghoule: basically tries to modify the element referenced by the atom

1:11 it is done synchronosly

1:11 which means that it might retry to modify the element referenced by atoms multiple times

1:11 Dreigh: I wonder where ghoule and kaplan are from for them to active at this time...

1:11 ghoule: if the element is being accessed and modified by another thread

1:12 scottj: singapore and new zealand are apparently ~5100 miles apart :)

1:12 ghoule: so the function call on an atom must be free of side effects (something that happens that isnt input/output to the function)

1:12 @dreigh im from canada its 1 am here

1:12 #coderlife

1:12 Dreigh: So, not so close, eh scottj?

1:13 ykzrtj: scottj, Haha good one.

1:13 scottj: relatively close compared to the rest of the world :)

1:13 ykzrtj: ghoule, Nice :)

1:13 kaplan: Dreigh, I am from India, 11:40 AM here

1:13 scottj: apparently there are parts of chile that are closer to new zealand than singapore

1:13 ykzrtj: ghoule, also, is it freezing?

1:14 Dreigh: New Zealand is in its own little world. Its isolated little world.

1:14 ghoule: ykzrtj fuck yeah.. my balls almost dropped today

1:14 it's been crazy cold in the past few days

1:14 ykzrtj: Damn, haha must be real cozy to be at home now.

1:15 ghoule: yeah

1:15 a few days ago it was -38 celsius

1:15 o.O

1:15 Dreigh: I'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

1:15 ghoule: dreigh

1:15 you have no clue

1:15 like.

1:15 ykzrtj: ghoule: Woah haha. I’ve never experienced long term coldness before

1:15 ghoule: snow is cool

1:16 but in cities its fucking slush

1:16 ykzrtj: It’s about 32-35 celsius here.

1:16 ghoule: and gross dirt

1:16 etc. :D

1:16 ykzrtj: Oh wait, google says 31

1:16 ghoule: like 3 meter snow storm is awesome

1:16 Dreigh: Haha!

1:16 ghoule: you go skiing

1:16 powder

1:16 but 95% of the time

1:16 kaplan: ghoule, Thanks for your help

1:16 Dreigh: I do know this- NEVER eat yellow snow. Or just snow in general.

1:16 ghoule: its -20 celsius with brown dirty snow and terrible wind :D

1:16 lol

1:17 never eat snow ull get super sick

1:17 by the way kaplan

1:17 when you code in clojure in general you try to use and write functions free from side effects

1:18 kaplan: ghoule, I am just a beginner to programming, dunno why I picked up a clojure book

1:18 ghoule: clojure is amazing thought

1:18 ykzrtj: You’ll be glad you did, kaplan.

1:18 Dreigh: Pretty sure that's where the black plague is hiding out- Nasty nasty snow..

1:18 ykzrtj: I came over from python and ruby.

1:18 ghoule: but you shoul definitly learn clojure, but also something like pthon or ruby

1:18 ykzrtj: And Java.

1:18 ghoule: python

1:19 java ugh *shudders*]

1:19 ykzrtj: Clojure is a different beast altogether

1:19 ghoule: Yeah

1:19 kaplan

1:19 what you should do honestyl

1:19 is learn

1:19 ykzrtj: Really fun

1:19 kaplan: ghoule, I know Python, Java, Javascript and Swift

1:19 ghoule: Clojure (functional prog) C++ (Object oriented) Python (Interpreted awesomeness)

1:19 kaplan ahh ! cool :)

1:19 ykzrtj: kaplan, how do you find Swift? I was pretty excited when Apple released it.

1:20 ghoule, agreed :)

1:20 kaplan: ykzrtj, It is pretty awesome, wish it was available on my platform of choice(Linux)

1:21 ghoule: I know C/C++ Python Clojure Java learning JS and node.js I've had exposure to PHP SQL OpenMPI

1:21 ykzrtj: kaplan, imho, Linux is better for dev than mac

1:21 ghoule: kaplan, get a mac, honestly awesome for programming (big linux geek here)

1:21 ykzrtj: I dual booted my mbp just for that.

1:21 ghoule: ykzrtj, I would disagree

1:22 ykzrtj: ghoule, yeah I think it’s a personal choice

1:22 ghoule: im definitely not the reference though haha still very much in the learning phase

1:22 Dont get me wrong i love unix/linux

1:22 ykzrtj: I love Mac for its aesthetics but package management is kind of difficult and messy at times.

1:22 ghoule: ykz get homebrew

1:22 <3

1:22 Mac generally just works so for dev, there is an inherent plus value to it

1:22 it's fast to be ready to go

1:22 ykzrtj: ghoule, yeah I have it totally changes the game.

1:23 ghoule: you have terminal power of unix

1:23 ykzrtj: ghoule, but when I was developing python before homebrew … no. Haha

1:23 ghoule: homebrew which is, in some way, better than aptitude or apt.. but in some way worse :P

1:23 hshs yeah :P

1:23 haha*

1:23 ykzrtj: I tried macports

1:23 ghoule: homebrew is amazing

1:23 ykzrtj: Uninstalled it twice

1:23 Yeah definitely agree

1:24 kaplan: ghoule, I will buy a macbook pro if I get into a US university

1:24 ykzrtj: And it’s written in ruby!

1:24 ghoule: but ykzrtj i think the osx landscape of programming is changing

1:24 ykzrtj: ghoule, really, why do you say so?

1:24 ghoule: because

1:24 kaplan: ghoule, Trying this year to get into top schools like UC Berkeley

1:24 ghoule: so many devs are migrating to mac in the recent past

1:24 Dreigh: What for kaplan?

1:24 ghoule: people are building tools and apps to use on macs

1:24 kaplan, nice man! I hope you will get in!

1:25 kaplan, you shoul def try to get into MIT if you wanna be a part of the top :P

1:25 MIT is amazing o.O

1:25 kaplan: Dreigh, Computer Science + Linguistics

1:25 ghoule: Im in university atm

1:25 Software engineering

1:25 Dreigh: Oh sweet!

1:26 I have a feeling I'm the most computer illiterate person here with software... v.v

1:26 ghoule: ykzrtj, 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

1:26 ykzrtj: ghoule that’s encouraging I was pretty convinced to leave the OS X platform for linux

1:26 ghoule: and you also get the advantage of great support

1:26 driver wise

1:26 ykzrtj: Yeah, and display support lol

1:26 ghoule: because apple has a very limited set of hardware to support

1:26 ykzrtj: Configuring xrand can be tedious

1:27 ghoule: the issue with linux is that you are very often debugging and using hacks

1:27 to make your hardware and drivers work properly with certain software

1:27 it's very fun

1:27 ykzrtj: It’s fun in a way.

1:27 ghoule: but when you just wanna be set up and ready to code

1:27 it's annoying

1:27 :D

1:27 ykzrtj: Yeah, I mean I’m using mac now lol :)

1:27 ghoule: so the point i was going to make is :

1:27 if you wanna use linux for all that messing around awesomeness, you just buy Parallels (the VM software)

1:28 and run Virtual Machines of your distro of choice

1:28 (even windows for when you wanna use visual studio)

1:28 ykzrtj: You wouldn’t multi boot?

1:28 ghoule: Na

1:28 No need

1:28 the hardware is so good now

1:28 VM's are amazing

1:28 and no bios/boot partition issues

1:28 i mean dual boot is fun and all

1:28 ykzrtj: I took 3 days to configure my mac to triple boot windows, linux and mac

1:28 ghoule: but might as well just use VM software

1:28 yeah.. :P

1:28 ykzrtj: Yeah true.

1:29 ghoule: Parallels is very nice

1:29 ykzrtj: Does VirtualBox still work though>

1:29 *?

1:29 ghoule: and .... I was a "apple" hater

1:29 clojurebot: * is just for when you are lazy and sloppy

1:29 ghoule: for the past 5 years

1:29 I just bought a Mac last november

1:29 mmmmm

1:29 virtual box works

1:29 ykzrtj: I guess you were converted :)

1:29 ghoule: but I prefer to pay for Parallels..

1:29 I'm a student

1:29 at university

1:29 they give me a big discount

1:29 like... instead of 80$ (i think) i paid like 40

1:29 ykzrtj: Uh huh no wonder

1:30 Woah

1:30 kaplan: ghoule, 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

1:30 ykzrtj: Really good discount

1:30 ghoule: yeah a lot of dev software give hidden discounts etc..

1:30 Everytime I buy software for development now

1:30 I email their support

1:30 ykzrtj: Did you get a discount for your mac hardware though?

1:30 ghoule: and say I'm an undergrad student

1:31 and they just email me back with a discount if I can send them a University ID

1:31 ykzrtj: Nice :D

1:31 ghoule: like 20%, 40%, 50% etc.

1:31 :D

1:31 Ehh for my mac hardware no

1:31 because i bought it through a company

1:31 elvis4526: Hello, 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.

1:31 Someone has a cool example to help me see their use?

1:32 ghoule: @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

1:32 but until you really get the hang of it... it's like a mystery

1:32 wrap with kilometers of paper wrap

1:32 <3

1:32 lol

1:32 elvis4526: hehe

1:32 ghoule: sorry can't really help you there :P my clojure-fu isn't good enough

1:33 kaplan, i really wish you the best.. if you get into MIT i'll be very jealous

1:33 SegFaultAX: ghoule: Nonsense.

1:33 ghoule: Hahaha segfaultax

1:33 SegFaultAX: There's nothing mysterious going on.

1:33 ghoule: i was just kidding :P

1:34 SegFaultAX: elvis4526: If you're just learning, I'd say ignore macros entirely.

1:35 ghoule: hey SegFaultAX

1:35 do you know if I can link somethng in here?

1:35 to help elvis out

1:35 SegFaultAX: ghoule: If it's Clojure related, sure.

1:36 ghoule: kk

1:36 http://www.braveclojure.com/writing-macros/

1:36 SegFaultAX: If it's not clojure related, meh.

1:36 ykzrtj: Brave Clojure is really good.

1:36 ghoule: braveclojure is a very useful resource for when you are learning clojure. The link I provided is about macros @elvis4526

1:36 yo ykzrtj

1:36 which client do you use for irc?

1:36 ykzrtj: Colloquy

1:37 elvis4526: ghoule: thanks i'll look into it

1:37 ghoule: SegFaultAX, what platform do you dev from?

1:37 hows colloquy?

1:37 SegFaultAX: ghoule: OSX and Linux.

1:37 ghoule: i'm using limechat

1:37 ykzrtj: ghoule: I just came over from limechat

1:37 ghoule: SegFaultAX, sweet same here

1:37 Would you say its better than limechat?

1:37 SegFaultAX: Ok, gotta run. Later.

1:37 ykzrtj: ghoule: Yeah, I prefer the interface layout.

1:37 ghoule: @Seg : Cya gn!

1:37 whats the diff?

1:38 i love full screen limechat <3

1:39 ykzrtj: ghoule: There user list isn’t at the right

1:39 ghoule: and also, I don’t use it full screen

1:39 ghoule: their


1:39 lol

1:39 ah okok

1:40 ykzrtj: Yeah *their hahaha

1:40 ghoule: your on linux atm?

1:40 ykzrtj: Nope using mac now

1:40 ghoule: between Im a french mothertongue speaker.. i was messing with you about grammar

1:40 :P

1:40 ykzrtj: Nice! I was trying to learn french lol

1:40 ghoule: haha kk

1:41 yo yk

1:41 ykzrtj: But ... gave up after the spelling didn’t conform to pronunciation

1:41 ghoule: on mac, do you know about spectacle / fantastical / iTerm

1:41 ykzrtj: ghoule: Acquainted but I don’t really use them. I use the main mac emulator


1:42 ghoule: whats mac emulator?

1:42 ah lol

1:42 ykzrtj: Haha yeah

1:42 ghoule: iTerm is a mutex version of terminal

1:42 really nice

1:42 ykzrtj: I’ll try it out

1:42 ghoule: and spectacle is a window manager.. like splitting etc.

1:42 and fantastical is #1 reminder/calendar app

1:43 check them out... really amazing

1:43 ykzrtj: Ah splitting terminal has really weird splitting I never split my windows in terminal

1:43 ghoule: can't live without them now hahaha

1:43 jyu: how does corssinfo parse the source code? and seems it is different with the implementation of clojuredocs?

1:43 ykzrtj: ghoule: which editor do you use? I use light table

1:43 ghoule: ykz, if you use spectacle the splitting is amazing

1:43 light table is so amazing with clojure <3

1:43 ykzrtj: Oh man thanks for the recommendation spectacle looks amazing

1:43 ghoule: i tried coding clojure on sublime text

1:44 ykzrtj: NO that does not work at all

1:44 Hahaha

1:44 It’s good for python though

1:44 ghoule: i was like... GIVE ME INLINE FEEDBACK

1:44 lol

1:44 sublime text 3 is my fav editor

1:44 ykzrtj: With anaconda it’s really powerful.

1:44 ghoule: i really like emac and vim.. didnt get to really put the time into learning them though

1:45 ykzrtj: Yeah haha emacs, vi and vim are all real OG

1:45 Old school hahaha

1:46 ghoule: yeah

1:46 they are super productive thought

1:46 once you get the muscle memory for the hotkeys

1:46 etc..

1:47 yo by the way : i used a macro extensively without knowing it LOL

1:47 -> the threading macro

1:47 hahaha

1:47 ykzrtj: Wow spectacle is really great man

1:47 ghoule: yeah..

1:47 spectacle is freacking amazing :D

1:48 ykzrtj: My mac has a new lease of life!

1:48 ghoule: honestly its a worthy buy

1:48 haha yeah :D

1:48 check out fantastical calendar also

1:48 its amazing

1:48 until you use it you dont understand how incredible it is :D

1:48 lol

1:48 by the way ykz

1:48 whats your background?

1:48 ykzrtj: Yeah I’ll check it out too thanks :)

1:48 ghoule: student? soft dev? engineer?

1:48 ykzrtj: Student

1:48 ghoule: begineer ? master ? etc.

1:49 okok

1:49 university?

1:49 ykzrtj: Awaiting

1:49 ghoule: okok

1:49 ykzrtj: Kind of like kaplan I guess

1:49 ghoule: going into soft eng?

1:49 ykzrtj: Hopefully

1:49 ghoule: are you from US/Can?

1:49 i didnt pick up whererr you are from

1:50 ykzrtj: Haha, I told Dreigh just now

1:50 Singapore

1:50 ghoule: oh wow

1:50 im jealus

1:50 ykzrtj: Hahaha, been here before?

1:50 ghoule: ive been to singapore

1:50 its amazing

1:50 ykzrtj: Really hot all year long

1:50 Hahaha

1:50 ghoule: yeah.. o.o so lucky

1:50 ykzrtj: I guess if I were in a cold country I would say that too

1:50 ghoule: wbhere in sngapore are you?

1:51 Orchard road is so beautiful man

1:51 ykzrtj: Haha, I live near the east

1:51 ghoule: the zoo is awesome too :D

1:51 ykzrtj: Yeah it’s our main shopping district

1:51 ghoule: i remember the night zoo was super fun

1:52 and dirt cheap food on the street but so delicious :D

1:52 i wanna go back

1:52 ykzrtj: Yeah our food is real good

1:52 ghoule: are you applying fot National Singapore University?

1:53 ykzrtj: I’m hoping to go overseas

1:54 ghoule: if you can go to NSU thought

1:54 do it

1:54 its one of the top university in the world for software

1:54 kaplan: ykzrtj, US?

1:55 ghoule: unless you get into harvard / MIT / carnegie melon / UBC / etc. :P but its .... 50+k a year.

1:55 ykzrtj: kaplan, yeah hoping to get into Caltech or something

1:55 ghoule: Caltech supposed to be amazing

1:55 you guys are highrollers :P

1:55 ykzrtj: Is it?

1:55 ghoule: so expensive

1:55 ykzrtj: Hahaha

1:55 kaplan: ykzrtj, I am trying for caltech as well

1:56 ykzrtj: kaplan, all the best man :)

1:56 kaplan, so it’s UC Caltech

1:56 *or

1:56 kaplan: ghoule, Top private universities like MIT and Caltech are not so expensive after financial aid

1:57 ghoule: i guess so :P

1:57 here in canada taxes pays for university...

1:57 so 1 year in college is 4000$

1:57 kaplan: ykzrtj, I have a chance at UC Berkeley

1:57 ghoule: without financial aid :D

1:57 kaplan: ykzrtj, 2100+ SAT score and 4.0 GPA

1:57 ykzrtj: Woah that’s really fantastic, ghoule

1:58 ghoule: how old are you @kap and yk

1:58 ykzrtj: !

1:58 kaplan: I'm 18

1:58 ghoule: im 23

1:58 kk

1:58 ykzrtj: 18 too

1:58 ghoule: im graduating soon

1:58 still feel like i have everything to learn gaahh

1:58 ykzrtj: ghoule: are you planning to go into startup?

1:58 ghoule: yeah

1:58 i hope so

1:58 ykzrtj: Nice :)

1:59 ghoule: Im also applying at big companies like Microsoft, Yelp, Fb, Google etc.

1:59 for internship

1:59 kaplan: ykzrtj, But it'll cost me $200K for 4 year at UC

1:59 ykzrtj, My dad earns $10K per year lol

1:59 ykzrtj: kaplan, oh no

1:59 kaplan, scholarships, no?

2:00 kaplan: ykzrtj, scholarships would help a bit

2:00 ykzrtj, I'll still need to take a $120K loan at least

2:00 ghoule: kaplan

2:01 10k a year o.O

2:01 you are from India you said right?

2:01 kaplan: Yep

2:01 ghoule: ah okok

2:01 Is 10k considered low, mid or high in india for local population?

2:01 honestly wondering

2:01 kaplan: Mid

2:01 ghoule: cost of living is much lower in india then here..

2:02 okok

2:02 what does he do, your father?

2:02 kaplan: But he lives in a small town so expenses are like $2K per year

2:02 ghoule: yeah

2:03 kaplan: ghoule, He works as an engineer in a cement factory

2:03 ghoule: ykzrtj, by the way you need to install : alfred (on mac) if you haventalready. its awesome

2:03 okok

2:03 He has a engineering degree?

2:04 kaplan: ghoule, engineering degree + MBA

2:04 ghoule: kk

2:04 ykzrtj: ghoule, thanks I’ll try it out!

2:04 ghoule: 10k a year for somebody with eng degree + MBA is so awkward to me

2:04 But, as you said, he only gets 2k expenses a year

2:05 kaplan: ghoule, Pay is less but stuff like electricity and everything is free

2:05 ghoule: but.. its crazy if you travel to the western country

2:05 yeah

2:05 kaplan: the company pays for everything

2:05 ghoule: ah okok

2:05 thats cool

2:05 where do you live in india/

2:05 which part*

2:05 kaplan: North India

2:06 ghoule: like rajastan?

2:07 kaplan: Madhya Pradesh

2:07 ghoule: okok

2:07 sweet

2:08 ykzrtj: ghoule: Is the free version of Alfred good enough>

2:08 *?

2:08 clojurebot: * is just for when you are lazy and sloppy

2:08 kaplan: ghoule, Very low expense state + very sparsely populated

2:09 ghoule: yeah yk thats what im using

2:09 kaplan, nice :)

2:09 ykzrtj: ghoule, okay seems pretty awesome already

2:09 ghoule: yeah much better than spotlight imo

2:10 kir: ghoule : mind a general question about your time at Uni? (btw I'm alittle older, degree in molecular biology)

2:10 ghoule: my top apps for mac: 1password, fantastical, alfred, dropbox, spectacle, sublimetext3, parallels, Tower, iTerm, homebrew :D

2:11 kir, no prob ask awAY :D

2:11 ykzrtj: ghoule, hoho Tower is great

2:12 ghoule: Tower is awesome

2:12 ykzrtj: Tried it before

2:12 kir: ghoule : To what extent do you think you actually needed it - in your intellectual development(rather then reputational)?

2:13 ghoule: kir, 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

2:14 I believe programming is a creative way to put your ideas born from logic to work

2:15 It's a tool that allows logical malleability

2:15 By self learning computer science, I believe you will learn the technologies and some of the theory

2:16 but the importance of good theorical background and help in focusing on the important material is invaluable

2:16 ykzrtj: Hey ghoule, kaplan, I gotta run. Nice chat we had. See you guys soon! :)

2:16 ghoule: Software engineering/IT/compsci require knowledge of algorithms, data structures, etc. to really write great code imho

2:17 ykzrtj, great talking to you!! :)

2:17 Im off to sleep soontoo :P

2:17 kir, why were you asking? :)

2:17 kir: ghoule: I see. My experience is the opposite.

2:18 ghoule: kir, 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

2:18 kir, how is that? :) if you do not mind talking about it?

2:18 kir: ghoule: 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.

2:18 ghoule: If you mind sharing about your background / age / etc.. would help me get a sense of were you are coming from

2:20 I 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

2:20 kir, definitely vary with universities, professors, etc. :P

2:21 kir: ghoule: I won't add beyond what I included initially; I was just curious to see what others thought several years after my graduation. Thx

2:21 ghoule: ah kk :)

2:21 no issues

2:21 are you from North america?

2:21 kir: In Australia

2:21 ghoule: okok

2:22 PS: 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 )

2:22 or in software*

2:24 kir: Initially in bioinformatics, now I work in mobile and web-dev

2:25 ghoule: kir, ah awesome! :)

2:25 I'm currently looking for a summer internship myself :)

2:26 what languages/technology do you work with at work? :)

2:26 kaplan: ghoule, How much do summer internships pay?

2:26 kir: java + php + go, and soon clojure :)

2:27 ghoule: kaplan, wildly depends on the company and the country honestly :P

2:27 kir: also since they are close cousins, erlang

2:27 ghoule: kir, wow D: clojure at your work environment! thats awesome !!!

2:27 kir, how do you live PHP and java?

2:28 kir: ghoule : if I can convince them about clojure :)

2:28 ghoule: kir, haha :D gogo you!

2:28 kir: ghoule: how do I live?

2:28 ghoule: kir, i wish i found an internship that works with clojure/common lisp

2:28 kir, like**

2:29 kaplan, like..from 15$ an hour to 30+

2:29 kir: I've had it upto my ears with OO :)

2:29 Go was refreshing - clojure is a revelation :)

2:29 ghoule: kaplan, and some pays for your housing etc.. but usually you do an internship to learn. I personally don't mind about the wage

2:30 codestorm777: 57 years later, LISP is mainstream

2:30 kaplan: ghoule, I see

2:30 ghoule: kir, Iwas doing a project for school (information retrieval)

2:30 we could use any languages

2:30 i decided to use clojure

2:30 kaplan: kir, as a beginner programmer I hate OOP

2:30 ghoule: huge overhead but OMG so worth it

2:30 im in love with clojure haha

2:31 montyxcantsin: codestorm777 better late than never

2:31 ghoule: codestorm777, haha yeah lisp / clojure <3

2:31 kaplan, honestly for me it depends on the language

2:31 I hate Java oop, i love C++ oop

2:32 not hate... too strong a word

2:32 but i do not like it :P

2:32 kaplan: ghoule, I have Java but love Swift

2:32 ghoule: kaplan, never tried swift :P

2:32 kaplan: ghoule, must try if you have a Mac

2:33 ghoule: codestorm777 & montyxcantsin how are you guys/girls doing? are you still students or working in the industry or other? :D

2:33 montyxcantsin: industry

2:33 ghoule: kir, how's Go ? never tried it

2:33 monty, if you don't mind sharing, what's your background etc.? :)

2:34 codestorm777: ghoule: I'm doing fine. I've been in the biz for... too long to admit

2:34 montyxcantsin: been programming nearly 20 years, 15 professionally past 3 full time in clojure

2:34 ghoule: wow

2:35 montyxcantsin: and for all of the years before these past 3 I had been longing for that mythical full time lisp/smalltalk/apl gig

2:35 ghoule: Where are you guys based off? I'm in Canada, in Montreal

2:35 haha monty :D

2:35 codestorm777: los angeles

2:35 ghoule: Yeah i keep telling my friends that I wish i found an internship with lisp/clojure/etc.

2:36 they are telling me : I don't get functional programming and the interest in lisp etc.

2:36 And I'm like... just try it you'll be a cnvert :D

2:36 convert*

2:36 montyxcantsin: just keep pushing and building things

2:37 that is the most important thing there is - build things you care about constantly

2:37 codestorm777: link them to some paul graham articles

2:37 kir: ghoule: 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

2:37 ghoule: @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? :)

2:38 @codestorm777 graham convinced me. o.O i read a few articles and the same night i was picking up clojure and lisp :D

2:38 kir: ghoule: ... however you still have to manage mutability manually and it is far less expressive in its syntax...

2:38 ghoule: kir, ah neat :)

2:39 codestorm777: ghoule: my company is a mix of startup culture and corporate funding

2:39 ghoule: @codestorm, kk :) venture capital funding?

2:41 @codestorm777: What languages/technologies do you use at work? :)

2:41 codestorm777: pointers? i dunno, keep learning, never be a slacker, never just collect a paycheck, be the guy who "owns" the code, in production, etc

2:42 ghoule: no VC funding, privately funded

2:42 ghoule: okok

2:42 codestorm777: we use nodejs, backbone, native mobile

2:42 ghoule: kk

2:42 what product/services does your company produce?

2:43 ^ rereading the previous question.. pretty bad formulation sorry

2:44 codestorm777: slipknot: outside the nine is the first launch of our curent product

2:44 ghoule: like, the app?

2:45 codestorm777: yes

2:45 ghoule: Vixlet is the company?

2:45 codestorm777: yes

2:45 ghoule: nice :)

2:45 i'll download for support :P

2:45 is it your company?

2:45 co-owner? or you've been working there?

2:45 codestorm777: i work for the company

2:45 ghoule: Sorry for all the questions :D I'm super curious

2:46 if it bothers you, let me know haha

2:46 kk

2:46 codestorm777: np

2:47 ghoule: do you guys take interns? :D

2:47 *shamelessly plugin myself*

2:47 haha

2:47 montyxcantsin: do you have a github account?

2:48 codestorm777: you're a little far from LA, no?

2:48 ghoule: yes, 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

2:48 i'll link my github and linkedin

2:48 Yes, but I am willing to intern in the USA

2:49 kir: ghoule: 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...

2:50 ghoule: kir: I definitely don't mind, I like hearing other perspectives and receiving advices

2:50 https://github.com/gregrtw

2:50 kir: ghoule:.. you will be amazed how little utilitized is software, and how little understanding they are of its possiblities -- then offer them a solution.

2:50 there is*

2:50 ghoule: https://www.linkedin.com/profile/preview?locale=en_US&trk=prof-0-sb-preview-primary-button

2:51 my github & linkedin

2:51 codestorm777: bbl all

2:51 kaplan: codestorm777, how hard is it to get funding?

2:51 ghoule: cya codestorm :) thanks for the advices and the talk

2:52 ttyl

2:52 codestorm777: kaplan: i have no idea, I've never worked for a VC funded company

2:52 ghoule: kir, thank you for the advice! I think you are right, there is opportunities all over the place

2:53 codestorm777: bye for now

2:53 kir: ghoule: trully, and your next employer will be thirsty for real-world experience - that is if you haven't already formed your own company.

2:53 ghoule: yes

2:54 appreciate the advice a lot!

2:55 montyxcantsin: i posted my github/linkedin info above :)

2:57 So I was wondering, maybe you guys could help me shed a light on the issue

2:58 Im really passionate about new technologies and languages, I love experimenting with different languages and paradigms.. so sometimes it makes it a bit hectic:

2:58 I

2:59 I'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

3:00 or just keep working with 4-6 languages and trying to learn them all at a slower pace etc.

3:01 SHould I just focus on 1 or 2 languages for a while? like C++, Clojure &/or Python or keep learning about new languages etc.

3:03 kir: ghoule: 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

3:04 mercwithamouth: so lispers... SICP or Land Of Lisp first?

3:04 kir: ghoule: My choice is determined by practical application/need. I suggest you make your decision in a similar way.

3:05 ghoule: kir, kk thanks for the insight

3:05 mercwithamouth: ahh i'm on the same page as ghoule it seems

3:05 ghoule: mercwithamouth :D what do you mean? :)

3:06 mercwithamouth: i'm trying to decide what to focus on since I don't have any project ideas...i'm a language 'browser'

3:06 ghoule: haha yes

3:06 so many languages are interesting.. hard to settle down to get ot really grasp a language fully

3:07 i'm rly rly digging python C/C++ and clojure.

3:07 kir: ghoule: 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?

3:07 acron^: ghoule: i find comitting to a language for a particular project is a great way to test drive it

3:07 mercwithamouth: i'm decent with ruby...i can jump back into python within a day or so...some OLD experience with C++

3:08 hyPiRion: what acron^ said.

3:08 mercwithamouth: right now i'm finding lisp and javascript 'learning' go well together since i'm very interested in web development and soon AI

3:08 ghoule: @acron^ Yeah :) i'm thinking of doign just that. Would you recommend working on OSS or just some mid sized projects from scratch?

3:09 mercwithamouth: i 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

3:09 acron^: ghoule: anything really. I meant professionally, but OSS or personal stuff works too

3:10 ghoule: okok :)

3:10 hyPiRion: ghoule: whatever you're more comfortable with.

3:10 acron^: I just wrote a command line tool here, using Clojure

3:10 ghoule: what is the tool ? :)

3:11 acron^: just converts and edits an internal filetype

3:11 ghoule: okok

3:11 acron^: I could have done it in a day in C++ but took about 3 days to do it in clojure

3:11 was a fun experience

3:11 ghoule: acron^, hypirion: are you guys students or in the industry now? :)

3:11 acron^: definitely going to use it again

3:12 I'm a salaried developer

3:12 ghoule: yeah.. i'm trying to think of a project idea that I could complete in a few days just for python experience

3:12 acron^: as my first dip into a language, i love to write scrapers

3:12 hyPiRion: ghoule: was student, now ~7 months in the industry

3:13 ghoule: I'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

3:13 acron^: Python is super

3:13 hyPiRion: ghoule: I tend to play around with a lang for small private projects before going OSS.

3:13 acron^: Yeah definitely

3:13 ghoule: yeah hypi, i think i wanna do the same so im not lost or anything

3:13 where do you guys work? :)

3:14 how the general experience so far in the ndustry, so close after your graduation hypi? :)

3:15 acron^ : scraper, like a web spider/scraper?

3:15 acron^: ghoule: yep

3:15 ghoule: kk

3:16 ive done that on python.. litteraly 20-40 lines do the trick, i should probably try to reimplement one and add some features to it :)

3:17 acron^: games are another fun project for trying a language

3:18 hyPiRion: ghoule: 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.

3:19 ghoule: yeah i did the classic battleship & tic tac toe games in c++ and python :D I'm currently implementing Risk in C++ for a course.

3:19 hyPiRion: It's easier to get sidetracked when doing hobby projects, which I feel is the bane of most of them

3:19 ghoule: yeah :(

3:19 you work on compiler design?

3:20 which compiler do you work on hyp?

3:20 what about you acron, what do you work on ? :)

3:21 acron^: I am dogsbody software dev at a copany that make themepark rides

3:21 company*

3:22 ghoule: dogsbody

3:22 what is that?

3:22 hyPiRion: Oh, it's an internal compiler for an old ISO standard we have to use for data modelling.

3:22 ghoule: nice!

3:23 which company do you work for hypi? if you dont mind me asking

3:24 hyPiRion: ghoule: Rendra. "Startup" visualising 3D-models for the building industry.

3:24 ghoule: oh dogsbody is an expression meaning : "menial work" from google :P

3:25 acron^: dogsbody is a perjorative :) but i just mean i do a bit of everything

3:25 ghoule: ah okok :D

3:25 i'm first language french, even though im fluent in english some expressions escape me

3:25 :D

3:25 Glenjamin: a bit like a servant

3:25 acron^: heh sure, no problem

3:25 ghoule: mother tongue french*

3:26 ah nice :) i googled rendra

3:27 so you are based in norway hypi?

3:27 hyPiRion: yeah

3:27 ghoule: between, if you guys want to work a side project for fun in Clojure / C++ / Python, hit me up :) i'm all for it

3:28 or even OSS and you need help implementing a feature etc.

3:28 thank you so much guys, thanks for bearing with my millions of questions :D]

3:28 I'm off to sleep 3am here and classes tomorrow

3:29 acron^: ok :)

3:29 ghoule: I'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

3:29 I have experience with Git (using Tower) btw

3:29 kir: hyPiRion: Thanks kindley for your series of articles, starting with : http://hypirion.com/musings/understanding-persistent-vector-pt-1

3:30 hyPiRion: kir: oh, you're welcome – glad they are of value =)

3:32 kir: hyPiRion: 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!

3:35 hyPiRion: yeah. I had the same problem, and figured I could probably make it more accessible for others

3:37 Empperi: oh how I wish I had time for freetime projects

3:38 have gazillion things I'd like to do

3:38 acron^: I feel the same Empperi

3:38 ghoule: empperi!

3:38 let me know about it :)

3:38 if you wanna do a side project with me :P

3:38 acron too :D

3:38 <3

3:39 i'm supercharged with workload, etc. but i really want to improve my python/c++/clojure skills

3:39 Empperi: unfortunately I don't want to. Nothing personal, I just don't have the time

3:39 mercwithamouth: Empperi: well don't be afraid to throw ideas my way

3:39 ghoule: Yeah its all good :P

3:39 Empperi: I have a 4 month old baby, and my apartment is having a full renovation going on

3:39 ghoule: but you could throw ideas at us ;)

3:39 Empperi: and I have a day job

3:39 ghoule: wow empperi!

3:39 grats on the kid

3:39 Empperi: thanks.

3:39 ghoule: i hope you are having a blast

3:39 mercwithamouth: i want to make an intelligent wiki/crawler combination...BUT i think i'm going to jump into SICP a little first

3:39 Empperi: but anyway, I have zero extra time on my hands :D

3:40 really, left home for work yesterday at 8am, got at home 22pm

3:40 ghoule: :P

3:40 where/what do you work in

3:40 hey merc

3:40 Empperi: at Solita

3:40 in Finland

3:40 ghoule: I'd be interested in working on wiki/crawler

3:41 if you want to do that :)

3:41 mercwithamouth: i do but not just yet

3:41 ghoule: kk

3:41 Empperi: been there done that

3:41 wikis and crawlers

3:41 crawlers are easy to do but where it gets hard is what you do with the data you crawled

3:41 mercwithamouth: i'll be in here regularly...i wanted to start at the beginning of march. i've been sitting on SICP for a while now

3:42 ghoule: eempperi, yeah

3:42 mercwithamouth: Empperi: 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

3:42 Empperi: eg. 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

3:42 like what google does

3:42 the crawling part is easy :)

3:42 ghoule: merc, ill hang around the irc as well :) we can talk about ideas etc.

3:42 mercwithamouth: definitely

3:42 ghoule: yeah @Empperi, for my information retrieval course

3:43 we 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

3:44 was super interesting

3:44 we also implemented lossy/lossless compression algorithms for the index :)

3:46 kir: "sentiment analysis" - does sound interesting.

3:46 ghoule: yes

3:46 much more complicated then we first assumed

3:47 Glenjamin: sarcasm is pretty hard to detect that way afaik

3:47 ghoule: if you want to have a ranking that's usefull :P

3:47 kir: ghoule: Did you use any speicific theory of psychology as a starting point?

3:47 ghoule: yeah, we didn't have enough time to really get deep into it

3:47 we were ranking on a spectrum of negativity vs. positivity

3:48 using weights on words

3:48 from a compiled list of terms/slang/words of the english language and their values

3:48 it was a list provided by a scholar, a linguist I believe

3:48 sentiments like sarcasm etc.. are really hard to detect

3:49 kir, we didn't dwelve into the psychological part of the analysis

3:50 We "assumed" that the compiled list of weights on terms etc.. previously considered psychological theories for their weight

3:50 kir: I 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.

3:50 ghoule: yes..

3:50 it's impressive

3:51 kir: Along with voice recognition, I think this will be the next big industry - since it can be applied across all spheres of software

3:51 At least the human-facing side

3:52 ghoule: yes

3:52 there's a lot of academia research in sentiment analysis and voice recognition

3:52 at least from the discussions I had my professor, it seemed this way

3:54 kir: ...and I hear clojure is rather well suited to this sort of work ;)

3:56 ghoule: yep :D

3:56 since I picked up on Clojure and Python a lot more

3:57 i'm having a really hard time enjoying coding in java at all

4:00 kk now I really need to go sleep :

4:00 :P haha

4:00 i'll be dead tomorrow otheriwse!

4:00 (4 am here o.O but this talk is far too interesting)

4:00 Cya guys! ttyl

5:31 noncom: what is the most idiomatic way to pick the longest string from a vector of strings ?

5:32 i can think of a reduce with an acc holding the current longest string and the max length, but maybe there is a better way

5:33 schmir: noncom: max-key

5:33 noncom: oh

5:33 wow, never seen this before

5:44 ssideris: schmir: nice! news to me as well :-)

5:50 borkdude: with lib-noir, how can I set a cookie field for CSRF that will be recognized as the token?

5:56 noncom: does anyone here use ccw ?

5:56 (counterclockwise)

5:59 raspasov: was that a plugin for IntelliJ>

5:59 ?

5:59 augustl: ccw is for eclipse afaik

6:00 raspasov: last 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

6:00 every day*

6:01 cfleming: Yeah, CCW is for Eclipse, it's still maintained. La Clojure is the old one for IntelliJ that's not maintained any more.

6:01 raspasov: cfleming: thanks, good to know :)

6:34 noncom: yeah, i know about cursive.. just installed it a few days ago too.. however, i think it still misses some important parts...

6:35 cfleming: noncom: Anything in particular?

6:35 noncom: anyways, my original question was: can i have more than 1 repl running in ccw? or is it maybe possible in cursive?

6:35 cfleming: noncom: It's definitely possible in Cursive, I'm not sure about CCW

6:35 noncom: well, 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

6:35 do you think i could use it for everyday job?

6:36 cfleming: noncom: Yeah, project creation is a problem, especially on Windows

6:36 noncom: Sure, lots of people do.

6:36 noncom: heh, why is it a problem? (just curious)

6:36 cfleming: noncom: I'm biased of course because I develop it, but a lot of Cursive users work all day in it.

6:36 noncom: It's a problem because I haven't implemented it yet :)

6:37 noncom: ah))

6:37 cfleming: noncom: Especially on Windows it would be very useful so people didn't have to install lein, which is annoying

6:37 kaplan: Hi, can anyone explain what a closure is?

6:38 noncom: well, 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?

6:39 kaplan: a closure is a piece of code (typically a function) thank locks in itself one or more references to values defined outside it.

6:39 cfleming: noncom: 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

6:39 noncom: it can also happen that all other references to these values are lost, but they still remain in a closure

6:40 kaplan: ah, thanks noncom

6:42 cfleming: noncom: I'll be improving that soon to use type inference, which will really improve symbol resolution accuracy for interop

6:42 noncom: cfleming: 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 :)

6:42 wow

6:43 cfleming: noncom: Cool, let me know if you have issues, either here or drop me a mail

6:43 noncom: yes, auto-suggestions and all that stuff were always great in intellij

6:43 sure :)

6:43 cfleming: Yeah, they're good for Clojure right now, interop is still a bit hit and miss

6:43 noncom: and if you make all that intelligent thing work for clojure, its symbols and interop, it'll be super-cool!

6:49 cfleming: 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 ?

6:49 cfleming: noncom: No, it's Swing

6:49 noncom: i see..

6:54 noidi: noncom, CCW does support multiple REPLs

7:06 noncom: noidi: but only remote ones.. i can't find a way to load two different files in two different repls

7:17 julianleviston: Hehe 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?

7:17 AeroNotix: https://github.com/AeroNotix/sajens

7:17 julianleviston: AeroNotix: ?

7:17 justin_smith: julianleviston: if changing a space to a newline makes it work, I'd call that a cljs bug (if that is really what is happening)

7:17 julianleviston: Oh you’re just mentioning it. Soz.

7:17 justin_smith: hm… ok. Thansk… I’ll see if I can replicate it in a simpler context and file a bug if I can.

7:17 AeroNotix: julianleviston: yeah, I thought that clojure-metrics was missing a spiral type

7:17 which was a count over time which expired entries,

7:17 there are a couple of other things which I believe it's missing, too and I'll be adding them over time.

7:19 julianleviston: justin_smith: thanks… gotta get back to it.

7:23 justin_smith: turns out it was actually a safari caching issue! :)

7:24 justin_smith: aha, that's much more sensible

7:24 julianleviston: justin_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.

7:41 dnolen: just released ClojureScript 0.0-2816, only change is eliding reader meta from `reify` emission (kind of a bad bug due to :source)

7:43 AeroNotix: ughhhh why do I get 401 deploying to clojars when logging into the webpage allows me to login with the same details!

7:43 this always happens :(

7:43 justin_smith: AeroNotix: are you trying to use ssh or https?

7:43 AeroNotix: justin_smith: https

7:56 justin_smith: are you involved with Clojars?

7:56 jcromartie: hello

7:56 AeroNotix: jcromartie: yo

7:57 jcromartie: howdy

7:57 been a loooong time since I've been in here!

7:57 and it's usually only when Cider starts acting up

7:57 and this time's no different :)

7:57 but I'll stick around and be friendly instead of just bailing after I get tech support :D

7:58 AeroNotix: tl;dr

7:59 justin_smith: changed my password and now it's working

7:59 :/

8:01 jcromartie: I 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

8:01 I have the matching cider-nrepl in my lein profile

8:01 AeroNotix: jcromartie: first rule of using CIDER, don't update CIDER.

8:02 is there a feature you really need to update for?

8:02 jcromartie: you mean remove it and install it again?

8:02 AeroNotix: I mean downgrade to the previous whatever version you were using

8:02 #clojure-emacs

8:02 jcromartie: bleh

8:02 AeroNotix: I update about once every 3 months with it, it's very unstable.

8:02 jcromartie: yeah

8:03 AeroNotix: I'm using 0.9.0 snapshot, fwiw

8:03 and it works flawlessly, though I know that's temporary.

8:03 :)

8:04 jcromartie: hm

8:05 AeroNotix: jcromartie: there's a lot of small timing bugs with CIDER/nrepl

8:19 dagda1_: 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?

8:19 opqdonut: I'd just type it out

8:20 threading is nice for expressions like f(g(h(x),y),z)

8:20 but if you want the exercise sure, you can write that using ->

8:22 dagda1_: opqdonut: do you think it would be more readable without?

8:23 opqdonut: yes

8:24 Glenjamin: possibly extracting the common term into a local might help

8:24 jcromartie: I've done it, and it is much more readable. But I won't spoil it for you :)

8:25 Glenjamin: actually i think it's clearer without the extraction

8:25 jcromartie: yeah I didn't do an extraction

8:26 opqdonut: a shorter name for Math/log _might_ be apropos

8:26 depending on your tastes

8:26 jcromartie: I think Math/log is perfectly clear

8:26 opqdonut: yeah it's not horrible

8:27 jcromartie: so long as you remember it's the natural log

8:28 though I like to have a variadic log function that does the natural log on one arg, and arbitrary base with two args

8:48 justin_smith: I wonder - would JIT reliably optimize the two calls to Math.log(n) ?

8:48 dnolen: hrm when was the last time Clojure broke binary compatibility?

8:48 justin_smith: or clojure compiler might even do that I guess (but unlikely)

8:51 tcrayford____: justin_smith: almost definitely not the clojure compiler

8:51 Bronsa: dnolen: 1.7.0-alpha5 actually

8:51 tcrayford____: unlikely that the JIT would either

8:51 justin_smith: tcrayford____: that was my suspicion

8:51 tcrayford____: justin_smith: you can always turn on the print assembly flag on the jvm and find out for yourself

8:51 justin_smith: right

8:52 dnolen: Bronsa: is breakage expected to be reverted? Or that's part of a more important fix?

8:52 justin_smith: dagda1_: so yeah, use a let to avoid doing the floating point trig twice

8:52 Bronsa: dnolen: http://dev.clojure.org/jira/browse/CLJ-1638

8:53 michaelr`: 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)

8:55 dnolen: ah, ignore that..

8:55 it's always easy to blame my bugs on the new release ;)

8:57 dagda1_: justin_smith: thanks

8:57 dnolen: michaelr`: we do a reasonable amount of testing, some things inevitably slip through

8:58 michaelr`: been a long time since we introduced problems for core.async though

9:00 Bronsa: dnolen: given that both clojure & datomic are distributed AOT compiled I'm pretty sure keeping binary compatibility is a priority

9:04 ykzrtj: Hi all, anyone here uses the fantastic LightTable editor?

9:05 kaplan: ykzrtj, I do, but I can only get the python evaluator to work

9:05 ykzrtj: kaplan, hey what’s up man (:

9:05 kaplan: hi ykzrtj

9:06 ykzrtj: kaplan, I installed leiningen to get the repl to work

9:06 Anyway does anyone have an idea how to change the theme of LightTable to a light one instead of the dark one? Thanks.

9:06 dnolen: Bronsa: right does that issue fix the regression?

9:11 AeroNotix: is it possible when uberjaring that my top-level forms will be evaluated more than once?

9:12 justin_smith: AeroNotix: 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

9:13 AeroNotix: justin_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?

9:16 justin_smith: I don't think so, no

9:17 anything that has side effects should not be in a top level form, or should at least be wrapped in a delay

9:17 AeroNotix: hmm, good call with the delay

9:18 justin_smith: the issue of course is that you don't actually want those side effects to be there at all at compile time

9:19 AeroNotix: Indeed. I don't want top-level forms but sometimes it's convenient

9:19 justin_smith: AeroNotix: sometimes it's useful to have an "init" function in the namespace that gets called by the user of the namespace

9:20 or gets called inside -main as the case may be

9:20 AeroNotix: justin_smith: but then you have to forward declare stuff with empty def

9:20 I'd prefer to just restructure properly using a component-like arch

9:20 justin_smith: AeroNotix: (declare a b c d)

9:20 no need for empty defs

9:20 AeroNotix: that's what I mean^

9:21 That kind of stuff seems like a hack

9:22 justin_smith: using components makes this trivial.

9:22 justin_smith: OK

9:22 AeroNotix: No top-level forms, but everything has it's own self-contained environment

9:22 but I'm working on some of my older code where I did use top-level forms

9:23 justin_smith: well, I mean, you don't have a namespace at all without top level forms

9:23 AeroNotix: the other thing with top-level forms is that they can stop compilation altogether if they use futures et al.

9:23 justin_smith: you mean top level side effects?

9:23 AeroNotix: yeah]

9:34 neilni: hi 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?

9:35 justin_smith: neilni: I assume you are using cursive?

9:35 neilni: if not, first steps would be cursive and leiningen

9:35 neilni: yes, i'm using cursive

9:36 i have both setup, and was able to run the leningen project inside intelliJ

9:36 but i'm having a hard to figurout out how to debuge

9:36 debug

9:37 CookedGr1phon: is it possible to make input/outputstreams nicer with core async/transducers? Or does the model sort of fall down

9:37 when it comes to streams of bytes

9:45 dnolen: CookedGr1phon: should work

9:49 CookedGr1phon: I 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:02 naiquevin: I 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:03 Glenjamin: https://github.com/clojure/tools.trace might be suitable?

10:03 gfredericks: naiquevin: do you use a text editor with an integrated repl?

10:04 naiquevin: gfredericks: yes, using emacs with cider

10:04 gfredericks: naiquevin: just open the file and start evaling it

10:04 I do this all the time with libs, no need for checkouts or anything

10:08 naiquevin: gfredericks: I can jump to definition in emacs but the resulting buffer is readonly. Or do you mean something else?

10:09 justin_smith: naiquevin: if you visit the actual file for the ns it won't be read only

10:09 by default it probably gives you a view of the file inside the jar

10:09 you can also do this the "low tech way", by going into the clojure.test ns and just running the definitions in the repl

10:11 there are also libs like core.trace and robert.hooke that are designed to wrap existing functions in other namespaces

10:11 atyz: Hi all, does http-kit have some kind of connection pool or do I need to write my own

10:11 ??

10:11 clojurebot: BOT FIGHT!!!!!111

10:11 justin_smith: atyz: like, a client connection pool?

10:11 stuartsierra: naiquevin: 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:11 naiquevin: justin_smith: ah ok! got it. Thanks

10:11 justin_smith: is a connection pool even a thing for servers?

10:12 thheller: cfleming: 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:12 atyz: justin_smith: Yes, sorry I should have specified

10:12 A client connection pool

10:13 justin_smith: atyz: 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:14 but when a client is making connections to your server, what can you meaningfully pool and/or reuse?

10:15 or wait, you mean clj-http.client?

10:16 atyz: maybe you want make-reusable-conn-manager https://github.com/dakrone/clj-http/blob/master/src/clj_http/conn_mgr.clj#L153

10:17 atyz: clj-http.client has a "with-connection-pool" macro

10:17 naiquevin: stuartsierra: 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:17 atyz: justin_smith: similar to clj-http but with http-kit

10:18 I have a library that will be making requests to the same server, sometimes in parallel

10:18 justin_smith: atyz: maybe persistent connections http://www.http-kit.org/client.html#reuse

10:19 atyz: that doc says it's there for 120s at a time by default

10:22 atyz: justin_smith: you're the best, thanks

10:22 justin_smith: I assure you there are better, but np

10:23 stuartsierra: naiquevin: Fixtures are one of the features I don't recommend imitating. :)

10:23 billyJoe: clojure should have this

10:23 https://www.youtube.com/watch?v=UBKlU6HCJbs

10:40 bracki: How do I get lein repl to load/require my namespace?

10:41 naiquevin: stuartsierra: 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:42 stuartsierra: naiquevin: No, the whole idea of per-ns fixtures leaks state between tests.

10:43 And they rely on dynamic scope.

10:43 bracki: `(require 'your.namespace)`

10:50 swi: Hello.

10:50 naiquevin: stuartsierra: makes sense. thanks

10:51 swi: I'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:14 gzmask: How do I get rid of the namespaces in defmacro ? I wanna use local vars and defmacro is giving me namespaces automatically

11:16 gfredericks: `(let [foo# 34] (inc foo#))

11:16 ,`(let [foo# 34] (inc foo#))

11:16 clojurebot: (clojure.core/let [foo__25__auto__ 34] (clojure.core/inc foo__25__auto__))

11:17 gzmask: cool, but my foo is defined outside of the macro?

11:18 so gensym won't work for my situation

11:21 samflores: is there a built-in (or more lispy) way of doing this: (def make-vec [x] (if (vector? x) x (vector x)))

11:22 given an argument return a seq containing the argument or the argument itself if it's already a seq

11:23 TimMc: gzmask: Are you trying to build a reify or proxy expression or something?

11:27 gzmask: TimMc: 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:30 so basically I want to use macro as hiccup with outside variable names

11:31 danielglauser: gzmask: just glancing at the code you posted, are you familiar with partial? http://clojuredocs.org/clojure.core/partial

11:32 TimMc: gzmask: Macros will make you sad here.

11:33 gzmask: partial will probably work! never heard of this feature before, thanks.

11:33 TimMc: Why not (let [make #(make-leaf (split-aabb aabb :upper-left) a-slice % nozzle-diameter)] ... (make :upper-left) ...)

11:34 danielglauser: gzmask: or if you swap the pos and nozzle-diameter arguments to make-leaf you could do something like this:

11:34 gzmask: TimMc: 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:35 danielglauser: (let [split-result (split-aabb aabb :upper-left) make-leaf-fn (partial make-leaf split-result a-slice nozzle-diameter)] ... (make-leaf-fn ...))

11:36 TimMc: gzmask: Macros are rarely the right answer. I've written like... 10 macros that turned out to be a good idea.

11:36 They're powerful but very fragile for most purposes, and they infect reliant code.

11:37 gzmask: TimMc: right, but isn't the whole Homoiconicity thing just makes lisp better than others?

11:38 TimMc: Sure, but a little goes a long way.

11:40 For 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:40 gzmask: danielglauser: partial will probably makes my code simpler. I don't know why I keep thinking partial as the clojure version of haskell currying. ..

11:41 TimMc: Open-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:42 gzmask: TimMc: I agree. I guess macro is for DSL stuff and partial is better for templates

11:43 TimMc: Even DSLs are often best done up as functions or data structures.

11:44 danielglauser: gzmask: 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:45 gzmask: not as familiar with Haskell but I believe that partial is pretty close

11:45 TimMc: http://www.slideshare.net/cgrand/dsl-5537797 <-- talk on macros and when not to use them (answer: almost always)

11:45 bracki: Can anybody recommend a sane logging config when working with Java code?

11:45 TimMc: specifically focused on DSLs

11:48 bracki: Also, how do I convert a java.nio.ByteBuffer into an []byte?

11:48 xemdetia: bracki, .array()?

11:56 justin_smith: yeah (.array BB) should do it

12:20 sdegutis: Would 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:21 djames: sdegutis: have you compared the implementations? cortex is new to me. it isn't clear to me if it is using cursors.

12:21 sdegutis: djames: the readme seems to indicate it uses something very similar to cursors

12:22 I 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:22 Glenjamin: sdegutis: from what i recall of cortex, it attempts to use the same model as Om

12:22 sdegutis: Glenjamin: oh, neat

12:22 That's the same technique I ended up trying to develop myself, both in ClojureScript and then in LiveScript.

12:23 So Om and Cortex seem like validation that my idea is actually probably the best way to go about it.

12:23 Thus, yay.

12:23 djames: sdegutis: did you see this discussion? https://groups.google.com/forum/#!search/cortex$20clojure/reactjs/ljsZLaPX_s0/Afz9WgngRiwJ

12:23 sdegutis: djames: only now

12:24 Oh wow.

12:24 So that means all three of us came up with the same idea independently.

12:25 djames: sdegutis: do you have an open source project in the same spirit?

12:25 Glenjamin: i had always assumed cortex was directly inspired by Om, neat to see it was independant

12:25 sdegutis: djames: 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:26 roland__: 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:26 djames: sdegutis: what was you path / pain point? what led you in this direction? JS first? then CLJS?

12:26 *your

12:28 sdegutis: djames: I started in ClojureScript and had this: https://github.com/sdegutis/simplebudget/blob/master/client.cljs

12:29 djames: 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:29 Since then, I've moved away from ClojureScript and am now using LiveScript.net + PreludeLS.com

12:30 It's the best of Clojure (even the decent syntax) without ditching JavaScript's syntax when needed.

12:31 djames: sdegutis: interesting. Just curious what about Om or other alternatives wasn't to your liking.

12:33 sdegutis: djames: In general I prefer not to use software that proudly describes itself as "opinionated".

12:34 Oh wait, it was seancorfield who described Om as opinionated.

12:58 crash_ep: Is there some sort of `core.async/assert` that operates on values passing through channels?

13:08 djames: sduckett: there are plenty of ways to use React, certainly: Om, Reagant, etc, as discussed on the Clojure Google group

13:10 sduckett: do you use Linux? Git? both are pretty "opinionated". I think the label is about as valuable as "big data".

13:10 meaning that it is not a very good indicator of "is this useful for my purposes"

13:12 gfredericks: crash_ep: what would it do?

13:12 {blake}: Opinionated is fine when it's my opinions. =)

13:12 joshhartigan: I’m very new to Clojure. How would i join the two chars I’ve defined here: http://git.io/NTAL into a string?

13:12 crash_ep: gfredericks: throw an exception if a value passing through a channel does not meet some expectation

13:13 gfredericks: crash_ep: how do you throw an exception with core.async?

13:13 AimHere: ,(str \a \b)

13:13 crash_ep: gfredericks: now you ask – "on which thread?" :)

13:13 clojurebot: "ab"

13:13 AimHere: joshhartigan, use 'str'

13:13 joshhartigan: AimHere: thank you. Is there anything else I’ve done badly in the file?

13:14 AimHere: Nothing stands out as being wrong

13:14 crash_ep: gfredericks: good point, there is no first-class vehicle for communicating errors in core.async, is there.

13:14 gfredericks: nope

13:14 joshhartigan: ok, thanks for your help

13:14 gfredericks: every time I've used core.async I end up agonizing over error handling for most of the time

13:15 crash_ep: gfredericks: how did you relieve that anguish?

13:15 s/anguish/agony/

13:15 gfredericks: crash_ep: denial

13:16 crash_ep: gfredericks: hahahah

13:16 gfredericks: I 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:16 SegFaultAX: gfredericks: What are you using instead?

13:17 Or did you just stop writing concurrent code?

13:17 gfredericks: most of the concurrent code I've been writing works okay with just thread pools I think

13:19 hyPiRion: gfredericks: Idea: like core.async, but it actually a wrapper around an Erlang VM.

13:19 now you can do that error handling in peace

13:19 SegFaultAX: hyPiRion: I think that's called "Erlang"

13:20 gfredericks: I spend most of my core.async time fantasizing about erlang.clj

13:20 or something mildly similar

13:20 SegFaultAX: Have you tried Elixir? I've been meaning to give it a go.

13:20 I /love/ Erlang.

13:21 gfredericks: no

13:30 gzmask: when 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:30 clojurebot: Ok.

13:30 SegFaultAX: What do you mean "having one in one of the function is enough"?

13:31 Assuming the trampoline uses the simple predicate "if the thing I got back is callable, continue, else break"

13:31 hyPiRion: clojurebot: when doing mutual recursion with trampolining,?

13:32 clojurebot: when doing mutual recursion with trampolining, is have anonymous functions return by both function really necessary

13:32 hyPiRion: that bot catches too many random things

13:32 SegFaultAX: It would cease to recurse if one of the functions didn't return a continuation.

13:32 Haha

13:32 gzmask: let'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:33 hyPiRion: gzmask: I think that should be sufficient, yes. Unless the mutually recursive function can also call itself

13:33 (directly)

13:34 SegFaultAX: Care to show an example of what you mean?

13:34 gzmask: yes, as long as there is a break point to prevent the loop

13:36 (def even? #(if (zero? %) true #(odd? (dec %)))) (def odd? #(if (zero? %) false #(even? (dec %))))

13:38 both function return anonymous function

13:38 but only one is needed actually. makes sense?

13:40 SegFaultAX: gzmask: Sure, in a trivial case like that.

13:50 justin_smith: so 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:51 it isn't setting *e either...

13:51 gfredericks: justin_smith: huh what?

13:52 what's the context here

13:52 clj-http doesn't do anything super weird with exceptions

13:52 the return value from clj-http directly is null? I've never seen that happen

13:52 justin_smith: gfredericks: my bad, it was my own goofy setup, but it was only printing the shit in my server window, not my client window

13:52 gotta live dynamic binding of *out* :P

13:53 *love

13:53 mmitchell: i 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:54 but no luck - anyone know what I'm doing wrong there?

13:55 justin_smith: mmitchell: so you want to provide an array of Oid as the constructor arg to an Oid?

13:55 gfredericks: yeah I think the outer form is unnecessary

13:55 just the into-array call should do it

13:55 mmitchell: do'h! i think i just realized ... that's a "new" array of Oids, not a new Oid with an array of Oids

13:55 yeah! ok :) thanks

13:55 justin_smith: exactly

14:01 gfredericks: ,(make-array Object 82828773)

14:01 clojurebot: #<OutOfMemoryError java.lang.OutOfMemoryError: Java heap space>

14:01 * gfredericks just reminding clojurebot who's boss

14:02 justin_smith: haha

14:02 drojas: jajajaja

14:02 TimMc: clojurebot: gfredericks is boss

14:02 clojurebot: Ok.

14:03 justin_smith: gfredericks: when the singularity happens, you'll be regretting those shenanigans

14:04 gfredericks: ,(->> (range 10000) (iterate shuffle) (take 10000) (last) (last))

14:04 clojurebot: eval service is offline

14:05 gfredericks: ~iterate shuffle is the only way to be sure

14:05 clojurebot: You don't have to tell me twice.

14:10 SegFaultAX: gfredericks: Please tell me you saw that somewhere in production.

14:10 tcrayford____: clojurebot: gfredericks

14:10 clojurebot: gfredericks is polluting your memory and must be destroyed

14:10 tcrayford____: thanks gary

14:12 gfredericks: SegFaultAX: nope

14:14 tcrayford____: hey no probalo

14:16 I think I might finally completely understand how the ^:dynamic stuff in Var.java works

14:17 tcrayford____: gfredericks: gonna write a blerg?

14:17 gfredericks: I wonder if rich regrets anything about vars

14:17 tcrayford____: well I'm preparing a talk, so you just need to come to chicago in a couple weeks

14:17 it's like a time-and-location-sensitive blogpost

14:17 tcrayford____: ah ok

14:18 * tcrayford____ steals ure slides and turns it into a yeller post

14:19 gfredericks: the thing I hadn't fully internalized is that there's three different ways to mutate a var

14:19 alter-var-root, binding, and set! do three different kinds of things

14:20 SegFaultAX: Change root binding for all threads, change binding for a scope, and change binding for current thread. Is that close?

14:20 gfredericks: depends on whether the last two correspond to binding and set! respectively

14:21 SegFaultAX: Yes

14:21 gfredericks: when 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:24 ~a var is a box and a collection of stacks of boxes

14:24 clojurebot: A nod, you know, is as good as a wink to a blind horse.

14:49 hyPiRion: gfredericks: 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:58 ghoule: hello everyone

14:58 hey acron^ good day :D

15:07 gfredericks: hyPiRion: oh wow that verison number was in more places than I thought

15:08 hyPiRion: Yeah, the repl dependencies are scattered all over the place

15:15 gfredericks: hyPiRion: 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:19 hyPiRion: yeah

15:26 ghoule: hyPiRion: yo!

15:26 hyPiRion: how's your day mate?

15:27 hyPiRion: surprisingly average, actually

15:30 ghoule: :P

15:32 sdegutis: Here are the results of my investigation into using Haskell to build web apps, compared to Clojure: http://sdegutis.github.io/

15:34 amalloy: that is an unusually mild and reasonable comparison of two languages

15:36 sdegutis: amalloy: sorry :(

15:41 agarman: sdegutis: not a bad quick comparison, you have any code comparisons?

15:47 sdegutis: agarman: thanks

15:48 agarman: I wouldn't know what to write for an example of comparison

15:48 martinklepsch: sdegutis: I think amalloy's comment was positive, in case that sorry :( wasn't a joke :)

15:48 sdegutis: martinklepsch: :)

15:48 martinklepsch: sdegutis: ok, I see :D

15:49 sdegutis: amalloy, martinklepsch: originally I wrote this to my boss and then realized it could be generally useful to anyone

15:49 so it's a blog post now

15:49 martinklepsch: :thumbsup:

15:50 Always wish I'd be good at something as hipster as haskell or ocaml :D

15:50 sdegutis: martinklepsch: they're basically the same as Clojure tbh

15:50 martinklepsch: main difference is syntax, and also the fact that pattern matching is built-in

15:51 martinklepsch: maybe I should revisit that stuff

15:51 profil: sdegutis: 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:52 sdegutis: profil: see The Bad point #1

15:52 agarman: sdegutis: we tried hard to use Haskell at the Weather Channel in 2009-2010. It was either too pedantic or too MVar

15:53 sdegutis: agarman: pedantic how? and MVar = ?

15:53 profil: sdegutis: yeah exactly, just wanted a discussion :D

15:53 amalloy: haskell is only pedantic because it loves you and doesn't want to see you making bad choices, hanging out with the wrong types

15:54 agarman: sdegutis: 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:55 MVars are basically saying, making specific types for every code path that has an effect is a pain, so we're giving up

15:55 at least that was our experience

15:56 and 4 years ago so I'm pretty dated on that stuff

15:57 for reference: http://hackage.haskell.org/package/base- https://ghc.haskell.org/trac/haskell-prime/wiki/ExistentialQuantification

15:59 sdegutis: profil: oh ok

16:00 dnolen: once again Cursive save my butt even w/ 16 threads I can find the exception

16:00 sdegutis: amalloy: https://twitter.com/_sdegutis/status/565253233489498112

16:00 {blake}: Cursive is good.

16:00 dnolen: sdegutis: one thing about Haskell which no one seems to understand is the inference bit

16:01 sdegutis: agarman: oh wow that sounds awful

16:01 dnolen: most Clojure would need Higher Ranked Polymorphism

16:01 type inference for that is undecideable

16:01 you need local type hints using a mechanism devised by ...

16:01 Martin Ordersky!

16:01 sdegutis: dnolen: 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 d. Could you please help me?

16:03 sdegutis: Where's agarman?

16:03 I 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:27 ggherdov: In the quest for a clojure-aware profile (i.e. not a java profiler), I got to https://github.com/ptaoussanis/timbre

16:27 Looks 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:27 But I could also write a macro that walks recursively my program and put the "probes" for me, right?

16:29 TimMc: It wouldn't be a macro unless you wanted to wrap entire namespaces in it.

16:30 and even then you'd have to distinguish function call forms from other forms.

16:30 e.g. where in (letfn [(foo [] 5)] (foo)) is it appropriate to include a probe?

16:34 chouser: ggherdov: 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:34 TEttinger: redefining defn?

16:34 ggherdov: TimMc: 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:35 TEttinger: chouser, I haven't seen you here in a while!

16:35 chouser: TEttinger: yeah, not here much anymore.

16:35 TEttinger: (inc chouser)

16:35 lazybot ded

16:36 chouser: oh dear.

16:36 ggherdov: TEttinger: 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:37 TEttinger: ah, yeah I was just thinking it would rebind it within an ns

16:37 ggherdov: ah ok

16:37 chouser: So 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:39 ggherdov: chouser: ahah thanks. You've basically done it for me :)

16:39 chouser: untested! :-)

16:39 ggherdov: :)

16:40 chouser: now, "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:41 ggherdov: I see

16:44 stuartsierra: Injecting code all over the place is going to cost you perf-wise too.

16:48 justin_smith: (inc amalloy)

16:48 cfleming: thheller: You mean like in the REPL window?

16:48 justin_smith: ; for the "haskell doesn't want you hanging out with the wrong types" thing

16:48 cfleming: thheller: A few people have requested that, yeah

16:50 tvanhens: Anyone 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:50 getting java.lang.IllegalStateException

16:50 stuartsierra: tvanhens: The namespace has to be loaded before you read code containing your custom reader.

16:51 tvanhens: stuartsierra: 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:52 and when I call the fully ns qualified function names the functions evaluate

16:52 justin_smith: ggherdov: 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:54 tvanhens: stuartsierra: anything that could cause that error other than loading the ns ahead of time because it appears to be loaded

16:54 stuartsierra: tvanhens: Dunno, the name resolution of data readers is opaque.

16:54 tvanhens: On the upside, there's never any reason to use data readers in code.

16:54 I wrote that stuff and I don't even remember how it works.

16:55 tvanhens: haha fair enough. Was tring to use it to compress down my datomic schema definitions into data that was a bit easier to read

16:55 can work around it though

16:56 stuartsierra: tvanhens: 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:56 wink: hello. 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:56 justin_smith: tvanhens: 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:56 stuartsierra: Tagged literals in EDN files: good. In Clojure code: bad.

16:56 tvanhens: oh interesting didn't know you could do that. That will definitely suit the bill. Thanks stuart

16:57 justin_smith: tvanhens: it makes a bunch of the more common specifications much less verbose

16:57 tvanhens: justin_smith: I'll give that a try too thanks

17:14 dagda1_: 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:22 TEttinger: dagda1_: check for reflection in math

17:22 it's a big slowdown cause

17:22 jimboslice_: 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:23 TEttinger: $google ztellman primitive-math

17:23 jimboslice_: #_ means ignore

17:23 kwladyka: i 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:23 how to solve that?

17:23 damn not this channel

17:23 sorry

17:23 jimboslice_: Awesome, thanks

17:23 TEttinger: it's like ; to ignore a line, but #_(blah blah) ignores form (blah blah) and doesn't compile it

17:24 dbasch: jimboslice_: and it’s a reader macro, see http://clojure.org/cheatsheet

17:25 TEttinger: jimboslice_: http://yobriefca.se/blog/2014/05/19/the-weird-and-wonderful-characters-of-clojure/ is also handy for unusual symbols

17:25 dagda1_: https://github.com/ztellman/primitive-math

17:25 jimboslice_: Cool, I've been looking for something like this

17:26 AeroNotix: dagda1_: I'm surprised you wrote so much and didn't do any reflection checks.

17:26 justin_smith: yeah, it allows nested or multi-line comments

17:26 amalloy: stuartsierra: 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:27 stuartsierra: amalloy: #db/id in code is likely a mistake.

17:27 E.g. (defn make-foo [] {:db/id #db/id[:db.part/user]}) only generates the ID once, at read-time.

17:28 `d/tempid` is the function to call in code; #db/id is just for EDN files.

17:29 TimMc: Data readers in code are probably why I hate data readers.

17:29 (Which is to say, I've only seen them abused.)

18:15 gfredericks: ,(defn make-list [] (promise))

18:15 clojurebot: #'sandbox/make-list

18:16 gfredericks: ,(defn add-to-list [list x] (or (deliver list x) (recur (second @list) x)))

18:16 clojurebot: #'sandbox/add-to-list

18:17 gfredericks: ,(defn list->seq [list] (lazy-seq (when (delivered? list) (cons (first @list) (list->seq (second @list))))))

18:17 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: delivered? in this context, compiling:(NO_SOURCE_PATH:0:0)>

18:17 gfredericks: ,(defn list->seq [list] (lazy-seq (when (realized? list) (cons (first @list) (list->seq (second @list))))))

18:17 clojurebot: #'sandbox/list->seq

18:17 gfredericks: ,(def my-list (make-list))

18:17 clojurebot: #'sandbox/my-list

18:18 gfredericks: ,(doto my-list (add-to-list "one") (add-to-list "two") (add-to-list "three"))

18:18 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>

18:18 * gfredericks gives up

18:20 gfredericks: promise lists are a new type of terrible mutable data structure with awful performance characteristics; they're probably threadsafe though.

18:20 oh add-to-list was bad

18:21 ,(defn add-to-list [list x] (or (deliver list [x (promise)]) (recur (second @list) x)))

18:21 clojurebot: #'sandbox/add-to-list

18:21 gfredericks: ,(doto my-list (add-to-list "one") (add-to-list "two") (add-to-list "three"))

18:21 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>

18:21 hiredman_: well, they are just prolog lists

18:21 (not really new)

18:21 gfredericks: prolog uses promises?

18:22 hiredman_: gfredericks: not really, but if squint a promise is just a logic variable that hasn't been unified

18:23 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:23 gfredericks: that's a mighty squint

18:23 patchwork: What is the best way to do a random variable in clojure? Say I want :a 5% of the time, :b 20% etc etc

18:23 TEttinger: ,(add-to-list my-list "whee")

18:23 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>

18:23 TEttinger: ,(add-to-list my-list #(str "maybe? " %))

18:23 clojurebot: #<ClassCastException java.lang.ClassCastException: java.lang.Character cannot be cast to clojure.lang.IFn>

18:23 gfredericks: oh I know why

18:24 my-list is corrupt

18:24 ,(def my-list (make-list))

18:24 clojurebot: #'sandbox/my-list

18:24 TEttinger: ,(add-to-list my-list "whee")

18:24 clojurebot: #<core$promise$reify__6709@740f1890: ["whee" #<core$promise$reify__6709@b15d177: :pending>]>

18:24 TEttinger: agh

18:24 gfredericks: ,(list->seq my-list)

18:24 clojurebot: ("whee")

18:24 gfredericks: ,(add-to-list "heyo")

18:24 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (1) passed to: sandbox/add-to-list>

18:24 gfredericks: ,(add-to-list my-list "heyo")

18:24 clojurebot: #<core$promise$reify__6709@b15d177: ["heyo" #<core$promise$reify__6709@528c4c14: :pending>]>

18:24 gfredericks: ,(list->seq my-list)

18:24 clojurebot: ("whee" "heyo")

18:24 gfredericks: should change add-to-list to return :void

18:25 TEttinger: but that's unclojuresque

18:25 ,(conj [] 1)

18:25 clojurebot: [1]

18:35 gfredericks: this is all about mutability though

18:37 hiredman_: gfredericks: someone in #prolog was nice enough to jog my memory, difference lists are what I was thinking of

18:37 http://homepages.inf.ed.ac.uk/pbrna/prologbook/node180.html

18:45 gfredericks: oh right minikanren does that I think

18:46 uptown: does om emit react-canvas yet?

18:46 (i'm kidding)

19:25 Guest9000: Does io.pedestal/pedestal.immutant use immuntant 1 or 2?

19:26 Or is it like a wrapper?

19:41 irctc_: 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:41 justin_smith: Guest9000: https://github.com/pedestal/pedestal/blob/master/immutant/project.clj#L19 that shows the latest version using 2

19:41 irctc_: Is this common?

19:42 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:42 Guest9000: justin_smith: thanks

19:43 irctc_: Are you using a chestnut project?

19:44 justin_smith: irctc_: you can use "lein deps :tree" to see if there are any conflicts in your deps

19:44 irctc_: As a follow up question is scope="provided" in the :dependencies section of project.clj meant to help with this problem

19:45 @Guest9000 no it is lein

19:48 @justin_smith thanks that command highlighted a lot of issues

19:50 thearthur: anyone 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:44 bdruth: quick question ... how can I create a list/set of strings that are appended by a range of numbers

22:45 without using #()

22:45 gfredericks: eh?

22:45 maybe an example?

22:45 bdruth: e.g. - alternative form of (set (map #(str "mystring" %) (range 1 9)))

22:45 mgaare: use partial instead of #()

22:45 bdruth: ah, thank you!

22:46 TEttinger: ,(map (partial str "mystring ") (range 10))

22:46 clojurebot: ("mystring 0" "mystring 1" "mystring 2" "mystring 3" "mystring 4" ...)

22:46 bdruth: awesome, ty

22:47 TEttinger: bdruth: you can also always use (fn [arg1 arg2] (str arg1 arg2)) style explicitly

22:47 even in another #() or fn

22:47 bdruth: right, right ...

22:47 mgaare: I'm always on the lookout for opportunities to use partial and/or comp instead of #() or fn :D

22:47 bdruth: 2nd-year clojure n00b here, so .. still learning ;-)

22:47 thank you!

22:47 TEttinger: no prob

22:48 I'd (inc mgaare) but lazybot is dead

22:48 sdegutis: I've slightly updated my blog post comparing Haskell to Clojure especially when writing web apps.

22:49 mgaare: sometimes I wish there was a form of -> and ->> that returned partials

22:49 sdegutis: link?

22:49 crash_ep: sometimes i wish the language supported curried fns

22:50 sdegutis: I 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:50 mgaare: http://sdegutis.github.io/

22:50 crash_ep: why?

22:50 crash_ep: it does via clojure.core/partial btw

22:50 TEttinger: not quite the same, but transducers are close in a way

22:51 sdegutis: mgaare: 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:51 TEttinger: also clojure.core/partial is similar (i.e. exactly the same)

22:52 TEttinger: heh, I think language support of curried functions usually means curried by default

22:52 amalloy: sdegutis: what is (&)?

22:52 TEttinger: can you have a partial fn that fills the first of 3 arguments?

22:52 mgaare: sure

22:52 crash_ep: I should have said "curried by default". But I do understand why Clojure isn't curried by default.

22:52 sdegutis: amalloy: this is the exact Haskell code to define it: a & b = b a

22:52 TEttinger: and if you give it 1 arg will it return a new partial fn or what?

22:53 amalloy: it's just (flip ($)) then?

22:53 sdegutis: amalloy: after defining it as such, you can do this: [1, 2, 3] & map (+4)

22:53 amalloy: I hadn't thought of it that way. Maybe?

22:53 amalloy: also, since when do you know Haskell?

22:53 amalloy: you're full of surprises, my tiny friend

22:53 amalloy: i talk about haskell all the time, man

22:54 TEttinger: amalloy stares unblinking into the eye of knowledge

22:54 mgaare: TEttinger: no, throws an exception

22:54 ,((partial reduce +) 10 [1 2 3])

22:54 amalloy: anyway yeah i can see how having an operator like that would look a lot like ->>

22:54 clojurebot: 16

22:54 sdegutis: amalloy: except more type-safe and less flexible (cuz no varargs)

22:54 amalloy: right

22:55 mgaare: ,((partial (fn [a b c] (+ a b c)) 1) 2)

22:55 clojurebot: #<ArityException clojure.lang.ArityException: Wrong number of args (2) passed to: sandbox/eval73/fn--74>

22:56 sdegutis: I am highly considering reverting back to ClojureScript and just using Om.

22:56 TEttinger: so I see why you wish the language supported curried fns by default sometimes, crash_ep :)

22:56 sdegutis, from haskell?

22:56 sdegutis: TEttinger: From LiveScript (currently).

22:56 TEttinger: oh!

22:56 I know that one

22:57 sdegutis: I really want to avoid JavaScript's semantics, so I've been trying to find a decent alt-JS language.

22:57 At first it was ClojureScript because I'm an expert at Clojure, so it was natural.

22:57 TEttinger: I don't think livescript tries to avoid being java too much

22:57 *script

22:57 sdegutis: TEttinger: hence my looking to move away from it again

22:58 TEttinger: Om probably has more users

22:58 sdegutis: I considered learning PureScript or maybe GHCJS, but I want to just get this app written already and not experiment too much.

22:58 Yeah definitely.

22:59 I like how mature Om is compared to the others.

22:59 mgaare: Om is pretty magic

22:59 sdegutis: I'm okay with magic right now, as long as it *works*.

22:59 I mean, I'm already using React.JS which is pure magic.

23:00 Also, CortexJS is broken.

23:00 mgaare: om is more magic :D

23:00 sdegutis: (https://github.com/mquan/cortex -- in their example, cortex.a returns undefined; ugh!)

23:00 mgaare: can't be much more than using reactjs + cortexjs?

23:01 mgaare: don't know enough about cortex to comment

23:02 sdegutis: mgaare: 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:03 Honestly I think I just ought to learn JS already.

23:03 Although I was hoping to get by long enough where it's not necessary, like with Assembly.

23:03 *long enough until

23:43 amalloy: vas: caps->ctrl

23:44 vas: amalloy: I WILL HAVE TO TRY THAT

23:50 amalloy: i could map ctrl->caps as well but like...then i might accidentally hit caps lock

23:50 sdegutis: mgaare: um, who are you resopnding to?

23:50 mgaare: sdegutis: your blog

23:50 sdegutis: mgaare: my blog post, right?

23:50 ok

23:50 mgaare: I like not having to type parens all the time

23:51 mgaare: but I'm on the fence about custom operators

23:51 mgaare: and I don't like memorizing things, operator precedence/associativity is no exception

23:51 mgaare: I don't like having to think about which thing I'm going to type, or precedence/associativity

23:52 sdegutis: mgaare: me neither, but I still have these in Clojure (to some extent)

23:53 mgaare: the 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:54 ianhedoesit: sdegutis: link to blog/blog post?

23:59 sdegutis: ianhedoesit: http://sdegutis.github.io/

Logging service provided by n01se.net