Fork me on GitHub
#off-topic
<
2019-11-29
>
jaide07:11:33

I've got a string like [[[a, 1], [b, 2]], [[a, 4], [b, 5]]] what's the most lightweight way to turn that into a map?

vemv07:11:28

what map do you seek to obtain? My first shot would be

(->> "[[[a, 1], [b, 2]], [[a, 4], [b, 5]]]"
     read-string
     (apply concat)
     (into {}))
But that would create a map w/ only 2 entries, given the a / b keys would be duplicate

☝️ 4
jaide08:11:20

Ack! That's an issue with my example let's pretend I wrote: [[[a, 1], [b, 2]], [[c, 4], [d, 5]]]

jaide08:11:17

I think your example mostly works except that I'm not sure if it would interpret a-d as either strings or keywords and might error. I'll try it to be sure though.

jaide08:11:56

Nevermind! That totally works, wow!

vemv08:11:32

✌️happy to help!

💯 4
jaide08:11:58

Thanks! Now I just gotta figure out how to adapt a solution like that into JS given that it doesn't have a magic read-string function 😭

vemv08:11:35

JSON.parse? Good luck with adapting the rest ;p

danielstockton10:11:16

cljs.reader/read-string is available in cljs

jaide22:11:18

Right, and what a treat it would be if I were working in ClojureScript 😛

Lone Ranger13:11:04

Dragan made it to front page of hacker news!!! https://news.ycombinator.com/item?id=21659724

parrot 20
😎 4
jjttjj22:11:54

anyone happen to know any mind mapping (or alternatively diagram/tree drawing) software that has good clients for both android as well as linux or web? (I suppose a good mobile website client would be acceptable instead of an android app, if necessary)

jjttjj22:11:59

Hmmm mindmeister seems decent so far

jjttjj22:11:05

I really liked "mimind" on android but there's no way to use it on desktop linux

nmkip22:11:26

Android emulator (?)

bananadance 4
jjttjj22:11:15

good idea. Any experience? Are they fairly seamless to use?

nmkip22:11:33

No, no experience at all. It might work though 🙂 I'll google xD

jjttjj22:11:10

Thanks! I saw that and tried a few but my impression so far is that one with real clients might be preferable 🙂

nmkip23:11:00

Yes, of course

3Jane23:12:09

Late to the party; I really liked xmind https://www.xmind.net/ but it seems to have made itself subscription-funded, which annoys me

andy.fingerhut23:11:17

This talk by Rich Hickey on YouTube: https://www.youtube.com/watch?v=P76Vbsk_3J0 says it was given to the NYC Java Study Group. It was definitely before 2012, and I would guess it was given in 2008 or perhaps even 2007. If anyone knows what month and year it was given, and where, or especially some announcement message about the meeting with time and group and location, that would be of interest to me, to record with the transcript of the talk.

sogaiu23:11:26

@andy.fingerhut if that's "clojure for java programmers part 1", the following page suggests 2008 june -- https://github.com/tallesl/Rich-Hickey-fanclub

andy.fingerhut23:11:52

@sogaiu . Thanks. Somehow I was forgetting about that page, which I have seen before. June 2008 sounds plausible. In the introduction he mentions a talk he plans to give later in Europe, and in the Clojure for Lisp Programmers talk that was in Sep 2008, he mentions having given that talk in Europe earlier, so the timeline fits.

seancorfield23:11:20

Amazing to watch that talk in the context of it being eleven and a half years ago...

andy.fingerhut23:11:05

Yeah, while a lot has changed in Clojure, so much is the same as it was originally.

sogaiu23:11:37

thanks for mentioning this talk -- i'd seen the lisp set, but not the java set 🙂

andy.fingerhut23:11:04

There should be a published transcript within a week or so, if you prefer reading over listening.

sogaiu23:11:43

wow -- i appreciate your transcript work. thanks so much!

seancorfield23:11:20

I'm definitely in the transcript-over-video camp -- and I really appreciate those transcripts! Thank you!

jjttjj23:11:23

did you know you can get a youtube generated transcript, which at least might be a good starting point to build a more accurate one?

jjttjj23:11:08

if you click the "..." below the bottom right of the video there's an "open transcript" option

andy.fingerhut00:11:45

Thanks for the tip. I have taken a quick look at that, and while it takes me a while to type in the transcripts, it isn't clear to me that starting point would speed things up significantly. So many corrections to make.

sogaiu23:11:36

i use that to search for particular spots - it can be fun to see some of the results :)