#clojure log - Jan 06 2017

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

0:03 cemerick: how much travel do the keys have?

0:06 deadghost_: any bidi users around?

0:08 my blah/new route request gets captured by blah/:id

0:08 and reordering doesn't seem to do anything

0:11 cemerick: technomancy: ^

0:11 deadghost_: >The patterns for the remaining path can be specified in a map (or vector of pairs, if order is important).

0:11 ok that seems to be my issue

0:19 justin_smith: deadghost_: that would make sense, given that maps are not ordered and they are unordered on a reader level, before code sees the literal

0:19 deadghost_: right

0:19 too used to compojure magic

0:20 justin_smith: heh

0:20 dysfun: compojure isn't magic

0:21 also a thing i've found useful this week in compojure is not to wrap my routes with an auth check, but to just put an auth check first in the routes that require auth - if it doesn't return, you're logged in

0:21 (with `routes`)

0:34 technomancy: cemerick: 3.5mm total, but the actuation point is pretty high

0:34 https://deskthority.net/wiki/Matias_switch

0:35 cemerick: ok

0:35 I'll need to look up what I'm used to

0:35 technomancy: higher than cherry, which is the most common mech type

0:35 dysfun: ooh, clicky keyboard switches

0:35 * dysfun has a unicomp buckling spring model m clone somewhere

0:35 technomancy: cemerick: if you know early apple mechs, it's the same feel

0:36 *early 90s apple

0:36 dysfun: technomancy: the transparent ones?

0:37 technomancy: dysfun: that would be late 90s

0:37 (1st imac era)

0:37 dysfun: ah

0:38 cemerick: heh, I used an ADB Extended II for years

0:39 * dysfun is currently on a shite modern apple kb because my flatmate was being driven crazy by my clicking at night

0:39 cemerick: I've used short-travel chiclet stuff like the macbook and now thinkpad keyboards since then tho

0:40 technomancy: the transparent ones were mushy rubber junk

0:40 dysfun: i'm also pretty sure that taking my unicomp to a client site stopped me getting renewed once

0:40 technomancy: cemerick: yeah the apple extended II was classic

0:40 dysfun: no, there is one particular transparent one that's very good

0:40 technomancy: it's a similar feel on the quiet boards

0:40 dysfun: pre-imac?

0:40 dysfun: not the coloured ones, the ones finished off with white trim

0:40 i want to say "emac"

0:41 but i can't remember precisely what it came from

0:41 i haven't even seen one in years

0:41 this modern apple kb is mushy junk

0:42 technomancy: it's the beige era that uses the switches I'm talking about

0:42 dysfun: no, this was definitely not beige

0:42 it was mostly seethrough with a little bit of white trim

0:42 it wasn't the coloured ones that came with the coloured imacs

0:43 Seylerius: Okay, so I've got (map (partial map clean-orig-zips) test-record-data), which produces data structured like this: (([1 {...}] [2 {...}]) ([2 {...}] [3 {...}])). I want to modify that form to produce data like this: ({1 {...}, 2 {...}} {2 {...}, 3 {...}}). And tips?

0:44 s/and/any/

0:44 dysfun: https://en.wikipedia.org/wiki/File:Apple_Pro_Keyboard_black.jpg # "apple pro keyboard"

0:45 flatten?

0:45 clojurebot: flatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.

0:46 dysfun: good job clojurebot

0:46 technomancy: the company I get my switches from was founded by someone who was so mad that apple stopped makinhg good keyboards that he bought the factory and kept it running

0:46 mad respect

0:46 dysfun: nice

0:46 unicomp was much the same - they bought the modem m rights

0:46 model m*

0:47 but they seem to have been aggressively cost-cutting recently so the new ones are shit

0:47 Seylerius: Got it: (map (partial apply hash-map) (map (partial mapcat clean-orig-zips) test-record-data))

0:48 dysfun: i have a customizer from a few years ago, it's lovely. but a friend got a spacesaver a couple of years later and it's all cheap and nasty

0:48 technomancy: =\

0:48 dysfun: when i've pissed off everyone with the noise, they can club me to death with it and it'll still be usable by my next of kin

0:49 mine has a cracking bug though

0:49 http://www.pckeyboard.com/mm5/graphics/00000001/Header%20980x350.png # see the "shelf" at the top?

0:50 if you rest something slightly heavy on it, like a mobile phone, it randomly types

0:50 took me forever to realise it was me causing it

0:51 anyway, it isn't a true model m because it failed the dishwasher test

0:52 and the use stupid screws to hold it together so i haven't gotten around to fixing it

0:54 cemerick: dysfun: oh no, that "pro" keyboard? yikes ;-P

0:54 itissid: I had a slightly odd Q to ask. There is no right answer to this. But do some folks use "Pictures" as a memorization tool to remember APIs?

0:54 dysfun: cemerick: looks like shit but the keys are alright

0:54 itissid: you mean do we draw pictures of how stuff fits together?

0:55 cemerick: dysfun: we'll have to agree to disagree. those were in our labs in college. did you ever use an ADB extended II?

0:56 dysfun: cemerick: are you sure they weren't the very similar looking ones that didn't feel good at all? i've had this confusion with other people before

0:56 itissid: dysfun: Actually not just draw but pictures but attach APIs to elements in pictures one can remember. Like for me a memorable picture is something I have seen before, like a wedding or a batman movie.

0:57 * dysfun tries not to remember weddings or hollywood movies

0:57 cemerick: dysfun: possible, I guess. My dad had an original imac, and that thing was definitely trash

0:57 dysfun: cemerick: no argument from me there :)

0:58 itissid: The idea is that when I am practicing in a new language I can quickly supplement my short term memory with what ever I have learnt so far..

0:58 dysfun: it's also possible i've found the wrong picture to show you, i'm working off vague memories here :)

0:59 itissid: in general, use whatever technique works for you to remember. i'm not a visual person and i spend most of my time looking things up in the docs rather than memorising

0:59 i would say my most used skill is finding the information i can't remember

0:59 cemerick: I simply can't believe I pulled "ADB extended II" off the top of my head. Why isn't my brain that efficient about things I care about even a little!?

0:59 itissid: dysfun: Isn't that a drain on productivity?

0:59 dysfun: and no, i have not used the ADBEII

1:00 itissid: nah, the thinking is the slowest bit for most people

1:00 itissid: dysfun: So like coming up with the design from abstract concepts you remember..?

1:01 Thats the hardest part

1:01 dysfun: i keep a clojure cheatsheet open most of the time in my browser and i've gotten very good at navigating to github repos i use

1:01 well, i'm fortunate to have a career of many languages and paradigms to fall back on

1:02 the problem i have isn't "how do i do this?" it's "which way should i choose?"

1:04 because i program so many things, i do not typically remember most of the apis i need for a given project

1:04 but i know where to find the docs

1:05 because clojure apis are much simpler on average than e.g. java apis, it's not as inefficient as you'd think

1:06 itissid: dysfun: Ty

1:06 dysfun: yw

1:06 at the end of the day you have to develop *your* way of being productive

1:07 i can tell you what works for me, but i make no guarantees it will work for you

1:07 itissid: dysfun: Still trying to grok this stuff. I am thinking I need to pick a real project to work on and move on from toy problems. Though they have taught me a lot..

1:07 dysfun: yes, a real project is a great way to learn

1:07 * dysfun is currently preparing a site release

1:12 technomancy: cemerick: you can retrofit an AEII with USB; it's actually not terribly difficult

1:12 well, a bit tedious

1:13 cemerick: technomancy: sheesh, I *just* read that a moment ago

1:14 I'll have to see if I still have one of those keyboards in the attic

1:14 technomancy: I actually scavenged one of these from a thrift store for keycaps on a prototype http://www.ebay.com/itm/Apple-Mac-Keyboard-II-VINTAGE-Computing-No-Cable-M0487-/192049323489?hash=item2cb7081de1:g:g00AAOSw44BYSyeo

1:14 cemerick: it'd have some absurd mileage on it at this point

1:15 technomancy: they last a lot longer than rubber dome boards

1:15 cemerick: yup

1:15 in a former life, I made money by buying used macs in bulk and reselling them one at a time

1:16 technomancy: nice!

1:16 now that I have a place with a ton of storage I am really tempted to scavenge craigslist for vintage hardware

1:17 cemerick: very familiar with all the parts from ~IIvx through maybe the mid-life quadras IIRC?

1:17 another friend of mine does that

1:17 focuses on mobile stuffs

1:17 has 3 newtons, etc

1:18 I had a newton 2000 for a while, that was a nice machine

1:18 technomancy: I'd go back a bit further for Apple ][s

1:18 Apple //c with a hardware dvorak switch awww yissss

1:18 dysfun: be careful of vintage hardware

1:18 a TRS-whatever turned up the other week

1:19 cemerick: "vintage" is always whatever you grew up with :-)

1:19 dysfun: i don't want any of the hardware i grew up with, i can emulate it just fine

1:19 technomancy: I saw a C64 at a thrift store but it was $300

1:19 someone knew they had a treasure on their hands

1:21 dysfun: i dunno, anything that takes tapes just doesn't feel worth it

1:23 technomancy: well, the higher the challenge to get it to speak TCP/IP and then connect to IRC, the greater the reward

1:23 but I probably wouldn't try that stunt with an altair 8800

1:23 dysfun: a friend of a friend runs a *prestel* server on an acorn archimedes

1:24 technomancy: I lurves me some thocky toggle switches but I have my limits

1:24 oh no I just discovered http://www.altairkit.com/ send help

1:25 dysfun: and i dunno, if i want a challenge i just write another clojure library

1:25 cemerick: I'm pretty sure my C64 is still in my dad's basement

1:26 dysfun: well, send it to technomancy and he'll return it with a modem and an irc client

1:29 technomancy: aaaaaaaaaahhhhh http://www.brielcomputers.com/wordpress/?cat=17

1:31 donomatic: i'm pretty new to clojure and im struggling to figure out how to update a map with a similar structure to https://www.refheap.com/124509 . For example say i want to inc all the values for the :b keyword . it seems simple enough but I cant quite get it

1:33 dysfun: in core that's going to be slightly complex

1:33 specter might make it a bit easier

1:34 but my first stab would be reduce, mapv and update

1:37 donomatic: thanks dysfun. i'll bookmark the specter link. but i'll give it an attempt without it first

1:37 dysfun: (into {} (map (fn [[k v]] [k (mapv #(update % :b inc) v)])) data)

1:37 that's my second go

1:39 not tested at all, etc. etc.

1:41 donomatic: gotcha.

1:43 tolstoy: You people and your clicky keyboards........

1:44 * tolstoy awaits the pure glass keyboard

1:45 tolstoy: dysfun Well, I've been trying out an EAV table in postgres, with the "V" being an array type. It's ... interesting.

1:45 arrdem: o/

1:46 dysfun: tolstoy: EAV is always interesting

1:46 i've seen a table with a column for every datatype, that's a common one

1:46 and hello arrdem, how goes?

1:46 tolstoy: Queries are a challenge, but I only have one type of entity, so it's not so bad.

1:47 I even tackled a recursive query, but I can't filter out some of the array values in any useful way, and I'm not sure it's any faster than just running multiple queries and keeping some tracking state.

1:48 * dysfun has a side project to turn datalog into postgres recursive queries

1:48 dysfun: it doesn't work yet

1:48 tolstoy: Would be nice.

1:48 dysfun: (mostly because i still haven't gotten an intuitive understanding of how to build recursive queries)

1:49 fucking sql

1:49 arrdem: y'all having too much fun with these keyboards

1:49 cherry blues, o-rings maybe some custom keycaps and move on

1:49 * arrdem types grudgingly on a laptop keyboard

1:49 dysfun: odd how noone misses the spectrum keyboard

1:49 tolstoy: Isn't the Model M the very first IBM PC keyboard? The one no one makes any more? Metal thingies rather than plastic?

1:50 itissid: Is Joy of clojure considered good for an intro to concurrency and parallelism?

1:50 tolstoy: Typed on a non-new-apple keyboard at one point: felt like I was pushing down plungers.

1:50 arrdem: I was issued a mac keyboard in my first week of work ... and was really not happy

1:51 dysfun: tolstoy: unicomp make clones, see backlog

1:51 arrdem: too used to the click and the travel of a real keyboard

1:51 dysfun: christ, it's just a keyboard

1:52 so it doesn't feel nice to type on, well, i'm sure you'll live

1:52 arrdem: ehhhhh

1:52 dysfun: it's no wonder bill hicks thinks we're a virus in shoes

1:52 tolstoy: I think I'm the one person Apple makes keyboards for. ;)

1:52 arrdem: I spend literally all day pounding on the thing

1:52 it's worth putting some effort and thought into

1:53 like standing desk &c

1:53 picked up an ergodox infinity when it was on massdrop, looking forwards to that project

1:54 tolstoy: dysfun I think the recursive queries are pretty easy, but I bet they're too limited for data log. (Not that I really understand datalog theory.)

1:57 Ah, it was the Model F keyboard.

1:58 cemerick: arrdem: I don't grok the massdrop sort of things

1:58 arrdem: cemerick: eh massdrop makes sense for keyboards and other relatively small batch things that have to be manufactured and have significant ecconomies of scale

1:59 for most things massdrop isn't able to offer better prices than normal wholesalers

1:59 cemerick: I think you linked to this before: https://www.massdrop.com/buy/minivan-keyboard?mode=guest_open

2:00 it's hilarious that mech keyboards are a whole category

2:00 there must be a population with 15 of em in their closet

2:00 arrdem: I mean... I own... four? at this point

2:01 soon to be fice

2:01 *five

2:02 https://www.massdrop.com/buy/25590 was the last one I went in on

2:02 * algernon currently owns 2 mechs, 1 more incoming, and 2 prototypes, and plans to have at least one more.

2:03 cemerick: oh no, I've stepped on the hive now

2:03 arrdem: expecting that and this ... febuary sometime https://www.massdrop.com/buy/26194

2:03 algernon: they are surprisingly addictive.

2:03 arrdem: algernon: oooh prototypes?

2:03 algernon: and my addiction started with clojure, after watching the Dactyl talk at one of the Conjs

2:03 arrdem: UHK & keyboardio, both to work on firmware stuff

2:04 arrdem: I could see getting addicted to making artisinal keyboards

2:04 algernon: cool!

2:04 * algernon knows nothing about hardware, and that's good so :P

2:04 arrdem: speaking of boiling oceans cemerick I totally brought my FPGAs back from Austin

2:05 so I may be yak shaving down to a microarchitecture before I actually do anything useful

2:05 #justforfun

2:05 dysfun: the thought of you writing verilog fills me with terror

2:05 cemerick: exotic dirt target!

2:05 * arrdem broad smile

2:06 arrdem: I do things that actually have to work at work

2:06 this means I can do nonsense at home :P

2:07 dysfun: i thought you just pissed about "devops"ing at work? :p

2:08 arrdem: heh my role on the team is to be the pissed off dev among ops. it's nice.

2:08 dysfun: so practically the devil's advocate in their eyes then?

2:08 arrdem: not really, more the voice of discontent with fixing it by hand and moving on

2:09 dysfun: and there was me thinking it sounded like a perfect job for you

2:09 arrdem: thanks for the vote of confidence I appreciate it

2:09 dysfun: :)

2:10 got any clojure projects on?

2:10 arrdem: I wrote a transpiler for work in Clojure within a month of joining

2:10 but nothing since

2:11 dysfun: not for work, i mean

2:11 arrdem: oh

2:11 nah

2:11 dysfun: :/

2:11 arrdem: most of my hobby coding has been in C on dirt

2:12 as cemerick likes to heckle me for not using something with a real metaprogramming system

2:12 dysfun: yeah, i've been experimenting with a lisp macro layer that expands to c

2:13 but i might just give up and use pony

2:13 (not lisp, but a lot more useful than c)

2:13 cemerick: arrdem: gotta start somewhere, but you do seem to enjoy wallowing

2:14 dysfun: cemerick: it's web scale performant, yo

2:15 arrdem: Yeah. Back in school I met reactormonk who was big into... Nim

2:15 dysfun: nim looked promising

2:16 then somebody figured out it was actually silly unsafe

2:16 arrdem: har

2:16 Yeah. I'm really enjoying wallowing in c as cemerick put it.

2:16 If I was more serious about making headway I'd probably look at Rust

2:17 dysfun: http://funroll-loops.info/

2:17 oh damnit it's down

2:17 arrdem: I also have like.... six papers on type classes and their implementation that I need to chug through before I have real confidence on the method dispatch model for dirt

2:17 cemerick: *llvm-klaxon*

2:18 dysfun: let us know how it goes

2:18 i've been thinking about what's practical for dispatch recently

2:19 kori: flatten?

2:19 clojurebot: flatten is rarely the right answer. Suppose you need to use a list as your "base type", for example. Usually you only want to flatten a single level, and in that case you're better off with concat. Or, better still, use mapcat to produce a sequence that's shaped right to begin with.

2:20 arrdem: I was enjoying playing with Racket for a bit

2:21 didn't get nearly as much out of realm of racket as I had hoped to

2:21 dysfun: well i think there's a degree to which it's just scheme

2:22 sure, they've built some nice libraries in it and it has a few twists, but it's just scheme

2:22 cemerick: don't say that, they have spies everywhere

2:23 arrdem: heh

2:24 It is "just" scheme

2:24 but it's got enough tooling and library support I can take it somewhat seriously

2:24 dysfun: right

2:24 but if you expected a revelation, well you already knew scheme

2:25 arrdem: which is not a thing I've said about Guile or any othe rnrs I've looked at

2:25 cemerick: ok, I'll do it

2:25 arrdem: It's been interesting the extent to which I struggle with decomposing programs to the extent required for a scheme

2:25 even given being used to a Clojure

2:26 cemerick: #lang racket is just a scheme, but the thing is far more than that

2:26 dysfun: i know what you mean

2:26 cemerick: eh, nobody cares about all the non-scheme langs, all the innovating is with stuff like typed racket

2:27 cemerick: whoo, you'd get a lot of pushback on that from the core devs and most serious users

2:27 arrdem: https://lexi-lambda.github.io/blog/2017/01/05/rascal-is-now-hackett-plus-some-answers-to-questions/

2:27 this I do wanna play with

2:29 dysfun: guile also does the multiple langs thing, albeit differently

2:30 guile is also just a massive disappointment compared to racket

2:30 though they have done some impressive reengineering recently

2:30 arrdem: back in school I was thrown a zip file of the previous researcher's guile/scheme.

2:30 that was about two weeks before I seriously started trying to learn clojure

2:31 yeah the guile-emacs thing will be awesome if it ever happens

2:31 dysfun: it won't. because the emacs community pushed back too hard

2:31 mostly old gits afraid of change i think

2:32 so it would only ever be a fork, and then you have to get users...

2:32 and then why not just use a better lisp to begin with?

2:32 arrdem: yeah

2:33 I've written ~trivial elisp, but a lot more of it of late and haven't been impressed

2:36 dysfun: the guix talks are interesting because they talk about what emacs was supposed to be - a thing where ordinary computer users would be able to tap into advanced features

2:36 elisp is just not a good language for that

2:36 nor is the emacs interface intuitive

2:37 arrdem: what is this? nix in scheme under the fsf?

2:37 dysfun: pretty much

2:37 that's why i've been looking at guile again

2:38 arrdem: Interesting

2:38 dysfun: in concept, sure. in implementation, no

2:38 arrdem: Yeah. Something like Nix/Guix is the future IMO

2:38 DirtOS may take longer

2:39 dysfun: yes, i think the nix model will become widespread soon

2:39 but it won't be nix that makes it happen

2:39 arrdem: Yeah

2:39 dysfun: because it's just not loveable

2:39 arrdem: I was talking to Chris Martin a few days ago and he expressed this really interesting idea -

2:40 solve package management and versoning by not letting people suubmit arbitrary package names and versions

2:40 let people submit arbitrary artifacts and refer to them by shasum

2:40 and then maintain a very tightly controlled package name and version/compatibility registry

2:40 dysfun: fantastic. now you just need a means of translating from a convenient name and version into a shasum

2:41 arrdem: right, that's the tightly controlled and revisioned mapping

2:41 which can also be vendored and have alternatives

2:41 dysfun: or just tightly control and revision map packages

2:41 i hate to say this, but maven is actually alright

2:41 as a model, anyway

2:41 arrdem: maven is actually alright

2:42 the advantage of this is that you have a 3rdparty signing off on the compatability asseritions of versions

2:42 dysfun: clojars "just works" as far as i'm concerned. terribly annoying gpg integration of clojure build tools aside

2:42 arrdem: I've never really had much of a problem with the GPG stuff

2:42 and I'm glad it's there

2:42 dysfun: oh i'm glad it's there

2:43 and when the gpg integration works, it works great

2:43 but i've had lots of faffing

2:43 and i'm not the only one

2:43 arrdem: Iunno. I've followed the READMEs and with ~15min of mucking per new dev machine I stand up it just works till that machine / os install gets terminated

2:44 dysfun: right. i've moved machines and OSes a lot

2:44 arrdem: sounds like a personal problem :P

2:44 dysfun: well i was trying linux distros

2:44 then i settled on freebsd

2:45 arrdem: lol

2:45 dysfun: i have learned that most people still think it's a fringe thing and don't bother to build on it

2:48 arrdem: https://github.com/eratosthenesia/lispc

2:48 this is interesting....

2:50 tolstoy: Would you be able to make an emacs-alike using embeddable JavaScriptCore like mfikes is doing for plank?

2:54 arrdem: One probably could

2:55 But would that really be a win over something like Atom or embedding clojurescript in Atom as a plugin

2:56 tolstoy: I think you could do the primitives in C rather than Electron/Chromium, then script it up from there.

2:57 What he has is cross platform, but I don't really know if self-hosted ClojureScript is reasonable in that use case.

3:00 ragepandemic: dysfun, but isn't freebsd a fringe thing?

3:00 TEttinger: ragepandemic: from what I understand it's one of the most reliable OSes for serverss

3:01 ragepandemic: TEttinger, no doubt, but dysfun said he was using it for his dev machine

3:01 TEttinger: it might be fringe for dev, but somebody's gotta dev what goes on the servers

3:02 ragepandemic: couldn't you do that in docker or something?

3:02 (does docker have freebsd images?)

3:02 TEttinger: less forced unplanned downtime is a plus for an OS

3:02 regardless of usage

3:03 I'd suggest the OpenSolaris forks as actual fringe OSes that see some tiny amount of use

3:03 ragepandemic: https://hub.docker.com/r/amontalban/freebsd/

3:03 dysfun: tolstoy: i've been thinking of an emacs based on lumo

3:03 TEttinger: OpenSolaris has ZFS, which was way before its time, and a bunch of dev tools meant for actually writing code on that OS

3:04 dysfun: ragepandemic: no, it's not fringe anymore. not *quite* mainstream either

3:04 ragepandemic: TEttinger, don't get me wrong, I like freebsd but I don't even think I could get it to work on my computer

3:04 tolstoy: What's lumo?

3:04 TEttinger: ZFS still I think has a minimum recommended RAM for your machine of 8 GB, but it came out around 2006 or so

3:04 dysfun: freebsd has zfs. it's the acceptable OS for ZFS

3:04 ragepandemic: I'll probably be stuck with no wifi

3:04 dysfun: lumo is a cljs repl based on nodejs

3:04 tolstoy: Ah.

3:05 TEttinger: ragepandemic: I'd be surprised actually

3:05 ragepandemic: TEttinger, I tried to install it on my macbook once, that didn't go well. IIRC it didn't even boot

3:05 maybe I did something wrong

3:06 TEttinger: when this windows laptop couldn't disable the hardware switch that kept airplane mode on, I actually needed to USB boot xubuntu to get access to hardware windows didn't have drivers for, and turn it on that way

3:06 rebooted, airplane mode is on

3:06 as in, linux has better hardware drivers than windows 7 at this point

3:07 not sure about BSD though

3:07 dysfun: FreeBSD mostly works

3:07 it's a little behind on high end graphics and hardware

3:07 arrdem: a coworker successfully ran his previous startup entirely on freebsd

3:07 TEttinger: woah

3:08 ragepandemic: TEttinger, maybe for your case, but I still have issues with the WIFI and the sound card > 2 years later

3:09 dysfun: but things get ported from linux reasonably quickly

3:12 TEttinger: ragepandemic, hm, macs are likely an odd case because of more proprietary stuff in the hardware

3:12 aren't the graphics cards somehow apple-branded?

3:12 ragepandemic: yea, lesson learned. not buying a mac again

3:12 I bought it with the intent of using linux (like thorvalds does), but nope

3:13 TEttinger: linus can probably leverage apple into supporting his particular use case by threatening a boycott of techies from apple products

3:13 not like he'd support MS or google either

3:14 is the firefox phone still a thing?

3:15 tdammers: ff phone is dead afaik

3:16 dysfun: that's cause it was shit, hth

3:16 ragepandemic: tdammers, ah shame, I wanted that to work out

3:17 dysfun: really? cause i can't think of a worse idea

3:17 ragepandemic: I liked the idea of a no-proprietary mainstream OS

3:17 dysfun: sure, sailfish

3:17 ragepandemic: is that still a thing?

3:18 dysfun: yes. russia is adopting it

3:18 because they're concerned about US backdoors

3:19 TEttinger: ah, ubuntu edge is what I was thinking of. never launched

3:20 ragepandemic: dysfun, I might actually consider buying one

3:26 dysfun: not for the reasons they state mostly, but a good idea nonetheless

3:27 arrdem: There is a very very short list of people who I trust to run code which will run at pid0

3:27 dysfun: sure

3:27 i hope i never make it onto your list :p

3:27 arrdem: lol

3:28 dysfun: and let's just say i'm going to let the libraries mature a bit before i actually do anything with them

3:28 ragepandemic: is this the part where someone jumps in and says we should write an OS in lisp (I know its been done)

3:28 ?

3:28 dysfun: it's not much fun being so far ahead of the curve

3:29 arrdem: also I've literally been threatening dysfun with various attempts at that for... a year now?

3:29 dysfun: longer

3:29 two years at least

3:29 arrdem: well at least I'm consistent

3:30 dysfun: i still think you should do it

3:30 i still feel it's unlikely i'd use it :p

3:30 maybe if i like where you're going with it i'll jump on board

3:30 in the meantime i'm trying to avoid falling down the OS-building hole again and just using posix

3:31 arrdem: If I ever nail down dirtvm's type system and dispatch model booting to dirt will be on the todo list

3:32 but not holding my breath on that

3:32 dysfun: i'm always happy to have ideas bounced off me

3:32 * dysfun has been having ideas here recently about what i want from a VM

3:33 dysfun: continuations is very high up the list

3:34 arrdem: Last time I was working on dirt I got stuck thinking about how I want to represent gads, and fully applied instances of them

3:34 Once I figure that out I've got the algorithm for a naive implementation of the dispatch type matcher down

3:36 dysfun: another thing i really want is to be able to make sure i'm safely interoping with the FFI

3:36 ragepandemic: arrdem, what's dirt?

3:37 dysfun: for example, this string this c function returns, i want to mark that the gc should free() it

3:37 that bit can't be automatic obviously, but once you've established through source diving what the contract is, you should be able to encode that in the type

3:38 arrdem: ragepandemic: right now it's not much, just the label I've given to a bunch of ideas about what a better VM would look like

3:38 https://www.arrdem.com/2016/10/06/a_better_vm/https://www.arrdem.com/2016/10/06/a_better_vm/ is the only thing I've written explicity about it so far

3:39 dysfun: I've been playing with something very close to linear types for exactly that reason

3:42 dysfun: well, keep me updated :)

3:42 it sounds interesting from the post

3:44 arrdem: I'm about as happy with that module system design as I could possibly be

3:44 Just because of the versioning and isolation properties it provides

3:45 Still playing with ideas for what the VM representation of functions and types is.

3:45 dysfun: yeah, me too

3:46 one thing i find interesting is pony

3:46 it's a practical language, not a beautiful one

3:46 it makes some awful mistakes

3:46 but it's got a lot of interesting things about it

3:47 sort of erlang meets c++ meets rust

3:48 arrdem: hummmmm

3:48 here's an idea

3:49 what if I were to use Racket to host an implementation just of Dirt's namespace semantics.

3:49 dysfun: umm? bully for you?

3:49 arrdem: well the idea is that it lets me smoke test the whole idea of versioned libraries and modules without having to actually build a bytecode interpreter or anything else

3:50 maybe. idk.

3:50 dysfun: oh, you mean prototype? yes you should do that

3:50 arrdem: I'm gonna pack it in. Happy hacking and a belated happy new year.

3:50 dysfun: racket makes it easy i suppose

3:50 you too

3:51 and sleep well

4:08 tdammers: dysfun: out of interest, what do you think the stated and real reasons are as to why unikernels are good?

4:09 dysfun: my assumption was that the advantages are fast boot times and low attack surface

4:09 dysfun: those are what i think is good yes

4:09 but the part i'm mocking is all the people who are obsessing about performance

4:10 tdammers: uhm, that's not really how it works though

4:10 a decent kernel is usually written such that stuff you don't use doesn't impact performance much

4:10 and if you want to fine-tune your kernel, you don't need a unikernel for that

4:10 dysfun: i didn't say they were logical

4:10 tdammers: yeah

4:11 oh, also, ease of deployment

4:11 dysfun: one day i'll agree they have that, but it's not today

4:11 tdammers: and if you build them right, easier to get good fault tolerance through redundant setups

4:12 nuke a VM, point it to new version, restart

4:13 dysfun: sure, when you've actually made that work

4:13 what i mean is "you can do it, but it's far from as easy as they claim"

4:13 tdammers: oh sure

4:13 but the alternatives aren't easy either

4:14 or, if they are, it's by virtue of lots of people having banged at it for a long time

4:14 dysfun: right

4:14 in future, it'll deliver everything they promise

4:14 tdammers: there are bigger problems than those though

4:15 you know how it's already a chore to find suitable libraries for all your programming tasks; well, now you also need to find libraries for all your systems problems

4:15 dysfun: right

4:16 tdammers: also, how the fuck do we do persistence :O

4:16 ragepandemic: tdammers, always send everything to S3? /s

4:16 dysfun: well you just pull in the filesystem

4:17 at that point you may as well just use posix

4:17 tdammers: but then you need to manage the interface between the unikernel and the filesystem

4:17 I'd probably rather just use traditional servers for persistence, and make the unikernel conceptually stateless

4:19 dysfun: well at that point there's not much that can go wrong on top of posix

4:19 and y'know, it's much easier to program :p

4:51 gko: Is there an idiom for (-> (-> x f 1) f 2) ?

4:51 Oh, it's reduce, of course...

5:01 sobel: hehe

5:01 when you're already thinking correctly

5:08 craftybones: I have an expression: (or (pred1? x) (pred2? x)....)

5:08 I can simplify it to use some

5:08 Is there a better way?

5:08 (some #(%1 x) coll-of-preds)

5:09 I can't do a reduce or

5:09 because or is a macro of course

5:10 In some sense, I want the inverse of condp, where I have many predicates and one test-expr

5:11 osfabibisi: map the predicates over x, get some result of that?

5:12 craftybones: osfabibisi: I just saw some-fn

5:13 some-fn is exactly what I need.

5:13 Thanks

5:18 dysfun: read the docstring carefully though

5:18 it's a bit funny with more than one arg

10:09 TimMc: osfabibisi: "ZonedDateTime"?

10:09 Relatedly, try M-x zone

10:10 osfabibisi: that's a zoned *datetime*

10:10 M-x zone?

10:12 TimMc: In emacs. :-)

10:12 Oh I see, just a date... hmm...

10:12 osfabibisi: ah, I'm in vim here, but I couldn't see how running an emacs command would be useful (and I was right! ;-P)

10:13 TimMc: M-x zone-when-idle is a fun prank.

10:15 Yeah, I'm not entirely sure if a zoned date makes sense.

10:17 ridcully: we clearly need a "datezone" to make things simpler!

10:17 osfabibisi: why wouldn't a zoned date make sense though?

10:18 TimMc: What operations would you do on a zoned date that you couldn't on a non-zoned date?

10:18 osfabibisi: from 0:00-23:59 UTC is a specific day *in utc*

10:18 hmm, that might be the point, yeah

10:18 I guess the difference would be that e.g. (.atStartOfDay zonedDate) would return a zonedDateTime instead of a LocalDateTime

10:19 TimMc: I think all the timezone stuff only becomes relevant when you say things like "this date at midnight" or "the interval of this date"

10:19 yeah

10:19 It might make some code more convenient to write, I suppose.

10:28 osfabibisi: interestingly, XML seems to have the concept

10:29 e.g. in XQuery* xs:date(fn:current-dateTime()) gives 2016-01-06Z

10:29 * or at least MarkLogic's implementation thereof

10:32 TimMc: Yeah, I think it's not *wrong*, just... redundant, maybe? Which is not always a bad thing in making fluent APIs.

10:32 (I still haven't convinced myself, though)

10:41 dysfun: diagnosis for "simple :on-click events aren't firing under rum"?

10:43 like #(.log js/console "hello") is not firing

10:49 osfabibisi: too much rum?

10:50 dysfun: not enough, clearly

10:50 MJB47: if you look at the html

10:50 is the on click event actually there on the dom node?

10:51 dysfun: no

10:51 MJB47: well thats why they arent firing

10:51 now to find out why they arent there

10:52 dysfun: does it actually set onclick though?

10:52 i thought it was handled through the eventlistener framework under the hood

10:53 TimMc: setting .onclick is so 2000s

10:54 MJB47: oh i guess thats possible

10:55 i would have just assumed it would use onclick

10:55 thats what reagent/react do iirc

10:55 check the event listeners on the node then

10:55 dysfun: nvm, found my bug

10:56 that was driving me crazy for too long

10:56 TimMc: Hmm. :reload-all doesn't seem to always reload everything.

10:57 If I do :reload-all for the top ns, it doesn't reload a transitively required ns. I confirm this by then doing :reload-all on the lower ns and seeing the changed code take effect.

11:00 dysfun: it should. it managing to do that is why the project i'm hacking on now can't be used with :reload-all

11:02 TimMc: If I do (require 'app.main :reload-all :verbose) I just see (clojure.core/load "/app/main")

11:02 dysfun: it appears that it uses the event listener framework under the hood

11:03 TimMc: If I put verbose on lower nses, I see a big pile of load, in-ns, and alias log messages.

11:06 Maybe it's only reloading if it detects changes. :-(

11:09 (This is Clojure 1.6.0 incidentally.)

11:12 devn: aw, i missed the keyboard chat with technomancy and cemerick -- pity

11:17 cemerick: devn: surely more where that came from

11:17 when I burn a hole in my atreus, you can laugh at me here

11:32 devn: ha!

11:33 It's good to see people in IRC

11:33 down with slack

11:33 TimMc: ++

11:34 osfabibisi: boo! hiss!

11:34 down with walled gardens, etc

11:37 TimMc: OK, this is just weird, doing a reload-all on *some* of my namespaces will do a multi-level reload (A -> B -> C) but some don't incur *any* transitive reloads. :-(

11:37 and it really does seem to be related to which namespaces I have modified.

11:38 ...fine

11:38 find server/ -name '*.clj' -exec touch '{}' \;

11:38 >:-(

11:38 (That works, sadly.)

12:03 osfabibisi: hrmpf! (get :foo {:foo nil} :eek) ;;=> :eek

12:03 semi-predicate-problem-mungous

12:04 amalloy: osfabibisi: an important feature, not a bug

12:04 osfabibisi: feature how?

12:05 as opposed to distinguishing it from (get :foo {} :eek) somehow

12:06 ridcully: get on a keyword will always be nil?

12:06 do you want to show the fact, that it works also the other way around or have you swapped the params by accident here?

12:07 osfabibisi: aha, yes, I've swapped the params by accident. that's also not good :D

12:08 ridcully: and yes, that is for the case, when the map does not contain the key you are looking for

12:08 osfabibisi: ok, so the feature works as expected with default, yay

12:08 technomancy: silently hiding mistakes is an important feature for sure

12:08 osfabibisi: yes, that's what I was expecting. and I thought "ooo, that's a way to solve the semi-predicate problem!" and then failed to demonstrate that because I got the arguments wrong

12:08 amalloy: oh, ha, i didn't notice you'd swapped the params

12:08 un-feature

12:09 osfabibisi: but yes, silently hiding mistakes is very annoying. it seems to do it *more* than Perl even...

12:09 TimMc: mis-bug

12:09 technomancy: osfabibisi: it's a high bar but clojure is up for the challenge =)

12:10 TimMc: Let's make all functions total so we can do it even more.

12:11 dysfun: let's total TimMc's car

12:14 osfabibisi: so basically, thus far my main complaints about Clojure are a) error messages, b) boot, c) silently doing the wrong thing like it's 1980

12:14 all the rest of it is great though :D

12:15 dysfun: i have come to peace with the confusing error messages

12:16 osfabibisi: sure. I mean "I guess the error must be in the stuff in `git diff` somewhere" usually gets you fairly far

12:16 dysfun: assuming you are a diligent committer

12:16 * dysfun isn't

12:16 technomancy: osfabibisi: not bad; you just need to add `contains?' and the use of jira and you'll be well on your way

12:17 osfabibisi: the use of jira?

12:17 amalloy: ,(contains? '(1 2 3) 2)

12:17 clojurebot: #error {\n :cause "contains? not supported on type: clojure.lang.PersistentList"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "contains? not supported on type: clojure.lang.PersistentList"\n :at [clojure.lang.RT contains "RT.java" 829]}]\n :trace\n [[clojure.lang.RT contains "RT.java" 829]\n [clojure.core$contains_QMARK_ invokeStatic "core.clj" 1489]\n [clojure.core$contain...

12:17 amalloy: technomancy: much has changed while you were away

12:17 osfabibisi: oh dear god http://dev.clojure.org/jira/browse/CLJ

12:17 technomancy: amalloy: yeah I was going to put the CLA on that list but I wasn't sure it was still relevant

12:18 osfabibisi: but yes, contains? has bitten us, but that's an easy one to remember once it's bitten you

12:18 amalloy: it's been quite a while since CLAs have needed to be on dead trees

12:18 osfabibisi: just randomly getting stuff wrong and not getting help from compiler is harder

12:18 technomancy: amalloy: we're living in the future

12:25 osfabibisi: I love the imagery here of a magic genie that is always trying to murder you https://mobile.twitter.com/peterb/status/816120822674948096

12:27 osfabibisi: heh

12:27 it's interesting that clojure is considered more mathsy

12:27 technomancy: yeah the problem with that graph is it's 1-dimensional

12:31 using Lua I have the genie constantly trying to murder me but he only has one or two tricks. in Clojure the genie is less aggressive but he has many more weapons he can use.

12:32 osfabibisi: heh

12:32 technomancy: and in erlang the genie murders me and it's OK; I just respawn and keep going!

12:33 TimMc: ^_^

13:13 dysfun: technomancy: the genie doesn't murder you, you failed a pattern match

13:24 cemerick: technomancy: this is a very useful analogy

13:29 * devn wonders if transients will ever get some more love

13:34 amalloy: what more do they need?

13:36 dysfun: they should look like puppies and smell of exotic fruit

13:55 TimMc: like durians!

13:57 * dysfun almost said "except durian", stopped himself

14:34 wink: lol

14:37 dysfun: well i've never confused boot's pom task before today

14:37 java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named

14:38 any ideas? none of the pom options are vectors

14:51 hiredman_: you have an extra level of nesting somewhere

14:51 [foo/bar "1.0.0" [baz/bleep "1.0.0"]]

15:09 dysfun: that was my first guess as well

15:09 however, it's not

15:22 ragepandemic: dysfun, how's your build tool coming along?

15:22 dysfun: it's paused

15:23 ragepandemic: to work on something more awesome?

15:24 dysfun: no, to swear at boot while i get a client site out

15:24 and then while i decide whether i really want to sink a lot of time into nodejs

15:25 ragepandemic: dysfun, i like the idea of a lightweight clojure, a lot

15:25 dysfun: don't we all? but there's no such thing

15:26 the main thing i'm umming over is the threading situation

15:26 ragepandemic: whats made you question nodejs?

15:26 dysfun: there are hacks, but i don't like it

15:27 ragepandemic: you mean the lack of a threading situation

15:27 dysfun: well there's like webworker-threads

15:27 but oh geez the entire async model makes me want to scream

15:27 i did promises for it and then decided i hated it

15:28 ragepandemic: doesn't the latest JS have support for await, etc.?

15:28 I guess we already have that, kinda, with <!

15:28 dysfun: not on lumo you don't

15:28 ragepandemic: yea, I recall you saying

15:28 dysfun: core.async will only compile on the clojure-hosted cljs

15:28 ragepandemic: any news on the issue?

15:29 dysfun: none

15:29 apart from discovering it's far from the only core.* module that doesn't

15:29 ragepandemic: its still early days though

15:30 dysfun: sure. and i might change my mind when support improves

15:30 but for now, it just seems a bit tedious

15:31 ragepandemic: that's a fair point, in the meanwhile I avoid running clojure as a microservice

15:34 or am I wrong thinking that the JVM isn't suitable for micro-services?

15:34 Seylerius: What's the best way to sort a seq of maps into a map by a key in each map? Each map contains an `:input_id`, and there may be multiple maps with the same one.

15:34 dysfun: i don't think microservices are a great idea personally

15:35 Seylerius: group-by

15:35 ragepandemic: i think the extend of micro depends on who you ask

15:35 extent*

15:35 Seylerius: dysfun: Perfect, thanks.

15:35 dysfun: yw

15:36 ragepandemic: dysfun, so do you subscribe to the monolithic app or something in the middle?

15:36 TimMc: ragepandemic: JVM is fine for microservices.

15:36 The problems with microservices, in my experience, tend to be with how you manage the fleet or avoid excessive server usage.

15:36 sobel: "Please stop calling nanoservices 'functions'"

15:37 ragepandemic: so, I guess something in the middle makes sense? Larger services, but not one huge app

15:38 TimMc: Monoliths suck even more. :-)

15:40 ragepandemic: at my job we split a monolith down to API, compute, file upload, websocket. I consider that reasonably sane

15:40 sobel: i think it has more to do with the context than the impl

15:40 ragepandemic: i don't see why I'd make it any more granular than that

15:41 sobel: like, if a little API only served one app, i'd call it "the server" but if it served the whole company, and is not the only API my department serves the company, i'd call it a "microservice"

15:41 TimMc: That's a good point.

15:42 sobel: i realized the social problem in nomenclature

15:42 people think it implies implementation

15:44 osfameron: ah, so saying "Project X" is the same kind of thing as drawing your designs in pencil on a napkin?

15:44 technomancy: just make it serverless

15:44 * TimMc makes technomancy serverless

15:44 technomancy: then your problems of using poorly-thought-out names will seem minor by comparison!

15:45 dysfun: technomancy: i watched a mildly famous developer embarrass themselves about serverless on twitter this week

15:45 sobel: do not underestimate the power of babel

15:45 technomancy: dysfun: you mean they used the term non-ironically?

15:45 TimMc: "Our application is hosted over torrents served between the browsers of our users."

15:46 dysfun: technomancy: they're developing a serverless framework!

15:46 sobel: i'm sorry, $customer. we will try harder, next time.

15:46 dysfun: so i figured out *why* everyone is going mad on serverless

15:46 it's because amazon is giving away shittons of free lambda time

15:46 sobel: our most technically advanced client is opting for hosted services, finally admitting they don't really have the IT chops to host >2 servers

15:46 (our app spans 3-5)

15:46 technomancy: I guess I can't really make too much fun of serverless since I used to work at a software company whose mascot was a big "no software" sign

15:46 dysfun: you *will* like it, even if we have to give you it for free to make you like it

15:47 technomancy: dysfun: it worked so well with windows

15:47 dysfun: right

15:47 sobel: dysfun: that's how i could afford most of the software tools i love today!

15:47 dysfun: that's why we all use windows

15:47 TimMc: ayyy

15:47 sobel: the. entire. gnu. toolchain.

15:47 j/s

15:48 we didn't always have clojure

15:50 osfameron: the idea of not having to worry about servers is lovely

15:51 if you think of them like e.g. memory management, it seems rather sensible to let someone else worry about them

15:53 ragepandemic: osfameron, isn't not worrying about servers what docker is trying to do?

15:54 technomancy: osfameron: yeah but we don't call GC'd runtimes "memoryless"/

15:55 TimMc: We run our service directly on macbooks, and technically those aren't "servers".

15:58 ragepandemic: the idea that everything is moving over to AWS freaks me out a little to be honest

16:00 technomancy: well as far as monopolies go moving off AWS is easier than moving off GitHub

16:01 ridcully: how is that? to me github is some git-service on the web. moving somewhere else is basically some ssh-account away?

16:01 Empperi: technomancy depends on how much of the github integrations you use

16:01 technomancy: ridcully: oh, for private code, sure

16:01 try moving an OSS project and watch them reach for pitchforks

16:01 Empperi: and if one uses only ec2 servers then it's easy to go away from AWS

16:02 but the second you start to use redshift, lambda etc you're fucked if you want away from AWS

16:02 ridcully: binding customers

16:02 ragepandemic: there's not much to be freaked out about, you have your OSS code open to the public on their servers

16:03 whereas with AWS, I'm concerned about privacy of things I may not want to have open to the public

16:04 and vendor lock-in ofcourse

16:04 * ragepandemic is just paranoid

16:06 dysfun: technomancy: oh, did you try moving some OSS off github?

16:07 technomancy: dysfun: no, but I've started several off github, and I've only ever really gotten one contributor

16:08 dysfun: oh sure, projects just don't get found if they're not on github

16:08 technomancy: anyway you should hack on my project to prove me wrong =)

16:08 dysfun: what's it written in?

16:08 technomancy: lua and lisp

16:08 dysfun: which lisp?

16:08 ragepandemic: where do you host it now?

16:09 technomancy: dysfun: https://github.com/meric/l2l

16:09 dysfun: NO

16:09 technomancy: ragepandemic: https://gitlab.com/technomancy/bussard

16:10 dysfun: i thought you meant a real lisp

16:10 ragepandemic: nice, gitlab is pretty cool, we recently switched at my company

16:10 technomancy: dysfun: there is a scheme->lua compiler but it's much worse

16:10 ragepandemic: pipelines, docker registry, all the nice stuff

16:10 TimMc: "This language is a superset of Lisp and Lua." D-:

16:10 dysfun: well, lua is alright, but meh

16:10 technomancy: dysfun: I'm not actually writing the game in it

16:10 dysfun: it's used for pedagogical purposes

16:10 or, that's the plan anyway

16:11 ragepandemic: its funny, I was gonna start working on a game exactly like this...

16:11 osfameron: technomancy: heh, "memoryless" is quite nice though ;-P

16:12 ridcully: cpuless would be great

16:12 dysfun: anyway, i think the real way to solve the github problem is to seamlessly interop with it

16:13 technomancy: ragepandemic: ...but?

16:13 ragepandemic: still working on it

16:13 its just super early stages

16:18 the difference is that mine is supposed to be multiplayer

16:38 Seylerius: If I've got a map of {:foo [{:bar :baz}], :bar [{:baz :bop}]}, how do I pop the sequences to produce {:foo {:bar :baz}, :bar {:baz :bop}}?

16:40 tolstoy-: reduce-kv?

16:41 justin_smith: ,(into {} (map (fn [[k v]] [k (peek v)])) {:foo [{:bar :baz}], :bar [{:baz :bop}]})

16:41 clojurebot: {:foo {:bar :baz}, :bar {:baz :bop}}

16:41 justin_smith: pop instead of peek would just give you []

16:43 tolstoy-: ,(reduce-kv (fn [a k v] (assoc a k (first v))) {} {:foo [{:bar :baz}], :bar [{:baz :bop}]})

16:43 clojurebot: {:foo {:bar :baz}, :bar {:baz :bop}}

16:44 tolstoy-: ,(reduce-kv #(assoc %1 %2 (first %3)) {} {:foo [{:bar :baz}], :bar [{:baz :bop}]})

16:44 clojurebot: {:foo {:bar :baz}, :bar {:baz :bop}}

16:45 justin_smith: ,(into {} (map (fn [[k [v]]] [k v])) {:foo [{:bar :baz}], :bar [{:baz :bop}]})

16:45 clojurebot: {:foo {:bar :baz}, :bar {:baz :bop}}

16:47 tolstoy-: Some tasty destructuring soup!

16:48 ,(reduce-kv (fn [a k [v]] (assoc a k v)) {} {:foo [{:bar :baz}], :bar [{:baz :bop}]})

16:48 clojurebot: {:foo {:bar :baz}, :bar {:baz :bop}}

16:50 Seylerius: Thanks, justin_smith, tolstoy-!

16:52 justin_smith: Seylerius: also, the version using specter would be more concise (and likely faster)

16:53 * justin_smith keeps meaning to use specter in his production app.

16:53 ridcully: since this looks like the result of group-by, you might also consider doing that in the first place instead of group-by. ymmv of course

16:57 justin_smith: ,((fn hash-by [f coll] (into {} (map (juxt f identity)) coll)) inc (range 5))

16:57 clojurebot: {1 0, 2 1, 3 2, 4 3, 5 4}

16:58 justin_smith: alternatively (zip-map (map f coll) coll)

16:59 *zipmap

17:10 ragepandemic: i'm trying out rum, but I'm having difficulty with a basic example. https://www.refheap.com/124521

17:10 According to the README this should run fine

17:10 I don't get a date printed, I just get "The mount time is"

17:11 tolstoy-: Try (str (::time state))?

17:12 ridcully: i wonder if there will ever be a question or statement about rum, i have not to giggle

17:12 ragepandemic: tolstoy, no luck

17:13 if I add a (println "State:" state) before [:div...] it doesn't contain the time state

17:13 but, the :did-mount function runs

17:14 tolstoy-: The example here suggests a rum/local mixin.

17:14 https://github.com/tonsky/rum#components-local-state

17:14 ragepandemic: tolstoy, I was reading this one: https://github.com/tonsky/rum#writing-your-own-mixin

17:15 4th example down

17:18 i'm using the latest release 0.10.7

17:19 tolstoy-: Maybe the example is wrong.

17:20 When you print state in the did-mount section, what is it?

17:20 s/section/function

17:20 ragepandemic: {:rum/args (The mount time is), :rum/react-component #object[Object [object Object]]}

17:21 and the return value is correctly {:rum/args (The mount time is), :rum/react-component #object[Object [object Object]], :whatever.core/time #inst "2017-01-06T22:21:21.626-00:00"}

17:23 tolstoy-: Try will-mount?

17:23 Maybe it doesn't re-render because you've called mount only once?

17:24 ragepandemic: rror: Objects are not valid as a React child (found: Sat Jan 07 2017 00:24:30 GMT+0200 (EET)). If you meant to render a collection of children, use an array instead or wrap the object using createFragment(object) from the React add-ons. Check the render method of `time-label`.

17:25 tolstoy-: Put str around date?

17:25 ragepandemic: You mean (str (::time state))? Already did that

17:25 I tried mounting twice too

17:25 tolstoy-: Yeah. Oh, hm.

17:26 add the rum/reactive mixin?

17:26 Alas, you can't just try these things at a repl.

17:26 ragepandemic: still nothing

17:26 tolstoy-: Yeah, that's probably not right (the reactive suggestion).

17:27 ragepandemic: are you replicating the same behaviour or is it just me?

17:27 tolstoy-: No, I can't set up a CLJS project on the fly. Otherwise I'd try it!

17:31 let me see if I can put something together

17:31 ragepandemic: thanks

17:38 tolstoy-: Ok. I can repro it.

17:39 ragepandemic: i was thinking its the latest release

17:39 I'm trying it with 0.10.6

17:39 nah, same thing

17:40 tolstoy-: [:div label ": " (str (::time state))]

17:40 That solved it for me.

17:40 The html data structures can't handle a raw date.

17:40 ragepandemic: no, its still not working for me

17:40 maybe its my browser

17:41 tolstoy-: Refresh?

17:41 ragepandemic: I refreshed, restarted figwheel

17:41 tolstoy-: (I'm using Safari. But I've seen that kind of thing a lot. It's a sablono thing.

17:41 ragepandemic: not working on chrome either

17:41 tolstoy-: )

17:41 ragepandemic: I was using firefox

17:42 tolstoy-: Works on all three four me.

17:42 Oy with the typos.

17:42 ragepandemic: did I make a typo?

17:43 tolstoy-: No, I have been though.

17:43 rum 0.10.7

17:43 ragepandemic: same, I tried 0.10.6 too

17:46 tolstoy-: I pasted your code straight from refheap, add the `str` around the time, and it works.

17:47 ragepandemic: I copy pasted from refheap again and added `str`, still no luck

17:47 I'm thinking it might be something to do with my environment, but I dunno. I'm not getting any console errors

17:48 I can paste my project.clj if it helps?

17:49 tolstoy-: Ship the whole project somewhere?

17:49 ridcully: maybe better to share the whole project?

17:51 ragepandemic: ok

17:53 tolstoy-: Are you seeing the label at all? Is there really an element with id="app" in the index.html file?

17:53 ragepandemic: https://gitlab.com/kalouantonis/sound-app/

17:53 Yea, I'm seeing the label

17:54 this is the output https://www.refheap.com/124522

18:01 its basically just a luminus template with +cljs and a rum dependency

18:02 i've already gone ahead and re-created the target/cljsbuild directory

18:02 tolstoy-: And init! is called from somewhere?

18:04 ragepandemic: Yea, I don't remember where from, but if you add a (println "Initializing...") in init!, it prints just fine

18:04 tolstoy-: luminous seems quite the framework

18:05 Anyway, if the actual label is printing out, it seems like the rest of the project is ok.

18:05 What happens if you (str (js/Date.))?

18:06 rhg136: when did luminus go from template to framework?

18:07 tolstoy-: Oh. Did I use the wrong terminology?

18:07 rhg136: I'm not sure

18:07 ragepandemic: tolstoy-, it works in that case

18:08 rhg136: luminus.X namespaces exist iirc

18:08 ragepandemic: clearly the problem is that the return value from :did-mount is being ignored

18:08 rhg135, they do

18:09 rhg136: that's not just a template then

18:09 ragepandemic: rhg135, its a tiny wrapper over immutant

18:10 rhg136: wrapper /= template or framework

18:10 library it is

18:10 tolstoy-: ragepandemic Maybe just erase that whole component and retype it. ;)

18:10 ragepandemic: yea, i'll do that

18:12 nope, I even broke the first rule of programming and copy pasted

18:13 ridcully: that's not "first rule". it's just about being above mediocre

18:15 tolstoy-: Hm. Maybe just start up a brand-new luminous template, and see if you can get it working there?

18:15 * osfameron just discovered that clojure.zip can handle vectors

18:15 ragepandemic: alright

18:16 osfameron: the docs suggested they couldn't (by insisting on specifying it's a zipper for *nested* or hierarchical vectors)

18:18 tolstoy-: ragepandemic The only other thing I can think of is to make sure you've run "clean" and start it all up again. Touch problem!

18:19 ragepandemic: I'll try both of them and if neither work, I'm just going to go to bed

18:19 hiredman_: well, it likely depends what you mean by handle, if you are using the seq-zipper and edit a child of a vector it will likely be rebuilt as a seq

18:21 ragepandemic: tolstoy-, even starting a new project doesn't solve it for me

18:21 osfameron: I guess I mostly mean "I seem to have just written a zipper implementation because I had no idea clojure.zip even attempted to do anything with non-hierarchical datastructures" ;-)

18:22 hiredman_: erm

18:22 why would you want a zipper not on a tree?

18:22 osfameron: but I think it's worth it, I'm not sure the builtin zipper stuff is useful for my use-case

18:22 hiredman_: because you want to traverse a list and edit it

18:22 exactly the same reason you'd zip over any data structure

18:22 technomancy: moving left and right over a turing tape

18:23 osfameron: yeah

18:23 anywhere that an imperative programmer would think about a doubly linked list

18:24 ragepandemic: tolstoy-, clean doesn't work either...

18:24 osfameron: I've just realised that I actually want to zip over a reduction

18:24 oh my...

18:24 anyway, nn &

18:24 tolstoy-: ragepandemic: I guess maybe upload the stock project (+ your additions) and submit an issue to luminous?

18:25 ragepandemic: let me try a bare bones run project first

18:25 just to make sure

18:25 rum*

18:28 tolstoy-, ok, so it works with vanilla rum. I'll submit an issue to luminous tomorrow

18:28 thanks for all your help

18:29 tolstoy-: Oh, good! It's not you! Now you can sleep easily. ;)

18:29 ragepandemic: yea, I was worried I did something stupid this whole time :D

18:30 i'll let you know when I find the cause

18:34 tolstoy-, Haha! I've found the cause

18:36 luminus uses clojurescript 1.9.293, but the working version uses clojurescript 1.9.229

18:36 rum breaks on 1.9.293 for the previously working configuration

18:46 anyway, I'm off to bed. gonna file an issue tomorrow

18:49 rhg136: blame rum! or cljs!

18:52 tolstoy-: Rum is always to blame.

18:52 justin_smith: why is the rum gone

18:53 ridcully: omg

18:53 justin_smith: ~ram

18:53 TimMc: *RAM

18:53 ridcully: ~rum

18:53 TimMc: ~why

18:53 clojurebot: why is the ram gone is <reply>I blame UTF-16. http://www.tumblr.com/tagged/but-why-is-the-ram-gone

18:53 ridcully: ~kranken

18:53 wem

18:53 justin_smith: we could compromise on raum

18:54 ridcully: i expect the next framework to be called gin

18:54 justin_smith: In demonology, Raum is a Great Earl of Hell

18:54 ridcully: blackbird raum?

18:55 in german raum means space/room

19:02 hiredman_: ~kraken

19:02 clojurebot: No entiendo

19:02 ridcully: thanks

19:02 hiredman_: clojurebot: hiredman

19:03 clojurebot: map is *LAZY*

19:03 ridcully: ~hiredman

19:03 clojurebot: hiredman is a rubber duck

19:03 ridcully: there ya go

19:05 rhg136: ~rhg135

19:05 clojurebot: rhg135 is oh hi im rhg135

19:05 rhg136: cool

19:05 I'm popular

19:05 ridcully: whee

19:11 zilti: I'm currently fighting with the proxy macro - can I somehow access variables of the class I'm overriding?

19:12 rhg136: ~this

19:12 clojurebot: this is very easy to do with loop

19:12 rhg136: no, really. this is the object

19:13 so (.m this)

19:13 zilti: I tried (.rootNode this) but the compiler complains that there is "No matching field found".

19:13 "java.lang.IllegalArgumentException: No matching field found: rootNode for class cljgame.core.proxy$com.jme3.app.SimpleApplication$ff19274a"

19:14 rhg136: can't access non-public fields without reflection

19:15 zilti: Not even class-local ones?

19:15 hmm.

19:17 hiredman_: https://github.com/arohner/clj-wallhack

19:18 rhg136: ~reflection

19:18 clojurebot: Gabh mo leithscéal?

19:18 zilti: Thanks!

19:18 rhg136: aww

19:19 clojurebot: reflection is great sometimes

19:19 clojurebot: Ack. Ack.

19:19 hiredman_: Java Reflection in Action is on the clojure bookshelf

19:19 ~bookshelf

19:19 clojurebot: bookshelf is http://www.amazon.com/Clojure-Bookshelf/lm/R3LG3ZBZS4GCTH

19:22 ridcully: ugh not even assosiated that link

19:22 zilti: ...though that isn't solving my problem :( (Access violation...)

19:23 ridcully: clojurebot is not ripping us off

19:24 zilti: There goes my plan of "Eh, let's just write that JMonkeyEngine example in Clojure instead"

19:25 rhg136: gen-class

19:43 zilti: rhg136: ...and how do I access class fields there? The documentation for gen class is... lacking.

19:48 rhg136: I wish I knew, zilti

19:48 zilti: Oh well then. *buries idea* Thanks anyway.

19:49 rhg136: np

19:53 zilti: (How idiotic of an API design is that anyway. Having to subclass a weird baseclass to access its protected member fields to create an application)

19:55 rhg136: horrible

19:55 ~api

19:55 clojurebot: the website api refers to last release

20:01 ridcully: clojurebot: is my sunshine

20:01 clojurebot: excusez-moi

20:02 rhg136: clojurebot: you got an admirer lol

20:02 clojurebot: It's greek to me.

20:02 rhg136: yup

22:12 TimMc: Cool, in about half an hour I got my photo gallery onto HTTPS, just by passing through requests for the /.well-known/acme-challenge directory: https://github.com/timmc/pellucida/commit/2845459a187dac525e6b32b994c8bae8764d87c2

22:12 Let me know if you see any horrible path traversal bugs.

23:12 craftybones: Has anybody worked on telescope control software/

23:12 ?

23:26 technomancy: I've downloaded light curve data from the Kepler telescope and plotted it; does that count?

23:27 craftybones: @technomancy hee he. It does, but not for what I was thinking of. I know someone working on large array telescopes and they're using Python at the moment. Nothing wrong with it, but they were also suggested Clojure at one point and I was wondering if anybody had any experience on that front, that's all

23:28 btw @technomancy - thank you for Leiningen :)

23:28 technomancy: glad you like it

23:28 craftybones: I use it, no doubt, but I always get the feeling that I can do more with it, but never get around to that

23:29 like writing some plugins that help me setup some basic scaffolds.

23:29 jeaye: Is there a way to disallow a key in a map, using spec? Like, the opposite of s/keys with :req

23:29 I have a function which takes a map and does a dissoc, basically, and I'd like to spec it.

23:30 technomancy: craftybones: scipy seems to have helped make python one of the go-to tools for scientific work

23:30 I hope julia is able to unseat it

23:30 jeaye: I can write a manual predicate for it, but using something in spec would be ideal; I just don't see it.

23:31 craftybones: @technomancy - Yeah, scipy seems to have a chokehold on scientific work for sure

23:43 TEttinger: and torch is another big thing these days. tensor anything, like google's tensorflow stuff

Logging service provided by n01se.net