Fork me on GitHub
#clojure-uk
<
2016-11-28
>
paulspencerwilliams08:11:27

Really enjoying Lambda Island. I'd not really played with Luminus but the first part of the intro is great.

jonpither09:11:18

Be good to hear how you get on with Luminus @paulspencerwilliams

acron09:11:38

@paulspencerwilliams what's the date of the next Hydrahack? /lazy

paulspencerwilliams09:11:34

@acron Tuesday, December 13, 2016

acron09:11:51

Bummer 😕 My son's birthday lol

otfrom09:11:42

acron surely your son likes HydraHack 😉

acron09:11:52

one day 😎

otfrom10:11:38

acron I think it only took agile_geek 23 yrs to introduce his daughter to coding

korny10:11:38

(UAGT - Universal Antipodean Greeting Time)

agile_geek10:11:49

@ofrom yeah...always been a bit slow 😉

dominicm11:11:07

Also my birthday. Spooooky.

dominicm11:11:31

I meant on 13th December 😳

gjnoonan11:11:10

happy Early birthday then 😛

practicalli-johnny11:11:26

Happy holidays.... oh, perhaps a bit too early... just thinking about what pull request I can do for http://24pullrequests.com/

practicalli-johnny11:11:53

What Clojure projects would you suggest contributing pull requests too... or what clojure projects do you run that have pull requests, especially for those new to your project ?

gjnoonan12:11:27

@jr0cket I’m intending to help out with clojars, clojars-server-config, cider, and onyx, cljsjs. Perhaps a few others time depending as contributing to a few non clojure projects also

gjnoonan12:11:46

Also intending to find the time to finally get the clojurians website up 😕

martinklepsch12:11:14

@gjnoonan you have something in the works for the website already? would be happy to collaborate/help

practicalli-johnny12:11:59

@gjnoonan if you have something in mind for http://londonclojurians.org, lets talk as I was also planning to give it a major overhaul. Or if its a different site, would be interested to see if there are any things we can collaborate on...

gjnoonan12:11:53

@jr0cket I was meaning the http://clojurians.net site, but yes it would be good to collaborate on both 🙂 @martinklepsch I have a few ideas 🙂

thomas13:11:28

silly question... is it possible for a key in a map to have no value? I wouldn't have thought so...

thomas13:11:08

but I do get this on a println in the browser: ... :question 1, :answer nil, :season-id }

thomas13:11:28

notice the , be fore the :season-id

korny13:11:51

I love the idea of 24 pull requests - but my december is going to be mad busy 🙂 Might see if I can find a few small ones to squeeze some work in on.

Rachel Westmacott13:11:47

@thomas is it not an empty string value?

agile_geek13:11:47

yeah it could be "" as that may just render as nothing in js console

Rachel Westmacott13:11:18

note the space after the :season-id

thomas13:11:53

aah yes... that could be it, let me check

agile_geek13:11:30

I just tried empty string and it could give you that result

Rachel Westmacott13:11:44

it appears that you can have a nil key, but it will print as nil

Rachel Westmacott13:11:58

(as in :answer above)

Rachel Westmacott13:11:24

is there a REPL attached to this slack?

agile_geek13:11:33

Actually it's the value for the key :answer that's nil

Rachel Westmacott13:11:58

yes, sorry, that’s what I meant

thomas13:11:59

I get a nil value later on

agile_geek13:11:32

Same in a CLJS repl BTW

agile_geek13:11:37

as I just tried it

thomas13:11:35

yes... that looks like it...

thomas13:11:38

yes.. if I println string? I get true...

thomas13:11:42

thanks guys!

agile_geek13:11:49

Yeah I'd expect nil keys to print nil as demonstrated

thomas13:11:30

ok... now I all have to do it find out where the empty string comes from....

thomas13:11:52

so style question... This is a reagent app and there is an atom declared in one namespace... (used and updated) but also req in a different namespace where is is also updated.

thomas13:11:02

Not the prettiest IMHO.

agile_geek13:11:41

Not uncommon unless you use re-frame

glenjamin14:11:39

how weird, I’d expect empty strings to prn with quotes

mccraigmccraig14:11:09

@glenjamin empty strings do prn with quotes... but they print blank

glenjamin14:11:33

aha, I didn’t spot it was println rather than prn

glenjamin14:11:41

bloody “smart quotes” 😞

thomas14:11:24

(= "" (str nil)) equals true ....

mccraigmccraig14:11:41

what was the problem you had @thomas ?

thomas14:11:28

it started out with me not understanding why a key in my map didn't have a value... turned out to be a "" and println....

thomas14:11:21

but now it looks like I start with a nil ... turned into a "" as per above. and that messes up the logic further down the line

mccraigmccraig14:11:03

ah, so str is turning your nils into "" ?

thomas15:11:48

yes I believe that is the case... I have a nil as a value in a map... that gets added to a URI as an query-param and then turned into a "" and that is not falsey... while nil is.

mccraigmccraig15:11:51

@thomas not-empty is useful for turning empty strings back in to nils

thomas15:11:21

thanks @mccraigmccraig I'll have a look at that

thomas15:11:27

@mccraigmccraig That function did the trick! thank you!!!

korny16:11:29

that seems ugly to me though - I understand why for consistency, (str nil) might want to return ”” - but it feels a bit javascript-y

glenjamin16:11:44

what else should it return?

korny16:11:28

I don’t know 🙂

glenjamin16:11:49

it’s worse in JS, String(null) === “null"

korny17:11:57

that’s true, that’s worse. And the whole “throw NullPointerException” java approach is not something I’d like to go back to.

korny18:11:30

Really, even without strong typing, I’d like some way to have maybe monads in the non-type-system. The one thing I really miss from Scala.

korny18:11:21

Maybe (str nil) could return nil? That would probably break many things, but make me happier.