#clojure logs

2017-01-06

00:03cemerickhow much travel do the keys have?
00:06deadghost_any bidi users around?
00:08deadghost_my blah/new route request gets captured by blah/:id
00:08deadghost_and reordering doesn't seem to do anything
00:11cemericktechnomancy: ^
00:11deadghost_>The patterns for the remaining path can be specified in a map (or vector of pairs, if order is important).
00:11deadghost_ok that seems to be my issue
00:19justin_smithdeadghost_: that would make sense, given that maps are not ordered and they are unordered on a reader level, before code sees the literal
00:19deadghost_right
00:19deadghost_too used to compojure magic
00:20justin_smithheh
00:20dysfuncompojure isn't magic
00:21dysfunalso 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
00:21dysfun(with `routes`)
00:34technomancycemerick: 3.5mm total, but the actuation point is pretty high
00:34technomancyhttps://deskthority.net/wiki/Matias_switch
00:35cemerickok
00:35cemerickI'll need to look up what I'm used to
00:35technomancyhigher than cherry, which is the most common mech type
00:35dysfunooh, clicky keyboard switches
00:35technomancycemerick: if you know early apple mechs, it's the same feel
00:36technomancy*early 90s apple
00:36dysfuntechnomancy: the transparent ones?
00:37technomancydysfun: that would be late 90s
00:37technomancy(1st imac era)
00:37dysfunah
00:38cemerickheh, I used an ADB Extended II for years
00:39cemerickI've used short-travel chiclet stuff like the macbook and now thinkpad keyboards since then tho
00:40technomancythe transparent ones were mushy rubber junk
00:40dysfuni'm also pretty sure that taking my unicomp to a client site stopped me getting renewed once
00:40technomancycemerick: yeah the apple extended II was classic
00:40dysfunno, there is one particular transparent one that's very good
00:40technomancyit's a similar feel on the quiet boards
00:40technomancydysfun: pre-imac?
00:40dysfunnot the coloured ones, the ones finished off with white trim
00:40dysfuni want to say "emac"
00:41dysfunbut i can't remember precisely what it came from
00:41dysfuni haven't even seen one in years
00:41dysfunthis modern apple kb is mushy junk
00:42technomancyit's the beige era that uses the switches I'm talking about
00:42dysfunno, this was definitely not beige
00:42dysfunit was mostly seethrough with a little bit of white trim
00:42dysfunit wasn't the coloured ones that came with the coloured imacs
00:43SeyleriusOkay, 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?
00:44Seyleriuss/and/any/
00:44dysfunhttps://en.wikipedia.org/wiki/File:Apple_Pro_Keyboard_black.jpg # "apple pro keyboard"
00:45dysfunflatten?
00:45clojurebotflatten 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.
00:46dysfungood job clojurebot
00:46technomancythe 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
00:46technomancymad respect
00:46dysfunnice
00:46dysfununicomp was much the same - they bought the modem m rights
00:46dysfunmodel m*
00:47dysfunbut they seem to have been aggressively cost-cutting recently so the new ones are shit
00:47SeyleriusGot it: (map (partial apply hash-map) (map (partial mapcat clean-orig-zips) test-record-data))
00:48dysfuni 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
00:48technomancy=\
00:48dysfunwhen 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
00:49dysfunmine has a cracking bug though
00:49dysfunhttp://www.pckeyboard.com/mm5/graphics/00000001/Header%20980x350.png # see the "shelf" at the top?
00:50dysfunif you rest something slightly heavy on it, like a mobile phone, it randomly types
00:50dysfuntook me forever to realise it was me causing it
00:51dysfunanyway, it isn't a true model m because it failed the dishwasher test
00:52dysfunand the use stupid screws to hold it together so i haven't gotten around to fixing it
00:54cemerickdysfun: oh no, that "pro" keyboard? yikes ;-P
00:54itissidI 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?
00:54dysfuncemerick: looks like shit but the keys are alright
00:54dysfunitissid: you mean do we draw pictures of how stuff fits together?
00:55cemerickdysfun: we'll have to agree to disagree. those were in our labs in college. did you ever use an ADB extended II?
00:56dysfuncemerick: 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
00:56itissiddysfun: 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.
00:57cemerickdysfun: possible, I guess. My dad had an original imac, and that thing was definitely trash
00:57dysfuncemerick: no argument from me there :)
00:58itissidThe 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..
00:58dysfunit's also possible i've found the wrong picture to show you, i'm working off vague memories here :)
00:59dysfunitissid: 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
00:59dysfuni would say my most used skill is finding the information i can't remember
00:59cemerickI 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!?
00:59itissiddysfun: Isn't that a drain on productivity?
00:59dysfunand no, i have not used the ADBEII
01:00dysfunitissid: nah, the thinking is the slowest bit for most people
01:00itissiddysfun: So like coming up with the design from abstract concepts you remember..?
01:01itissidThats the hardest part
01:01dysfuni 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
01:01dysfunwell, i'm fortunate to have a career of many languages and paradigms to fall back on
01:02dysfunthe problem i have isn't "how do i do this?" it's "which way should i choose?"
01:04dysfunbecause i program so many things, i do not typically remember most of the apis i need for a given project
01:04dysfunbut i know where to find the docs
01:05dysfunbecause clojure apis are much simpler on average than e.g. java apis, it's not as inefficient as you'd think
01:06itissiddysfun: Ty
01:06dysfunyw
01:06dysfunat the end of the day you have to develop *your* way of being productive
01:07dysfuni can tell you what works for me, but i make no guarantees it will work for you
01:07itissiddysfun: 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..
01:07dysfunyes, a real project is a great way to learn
01:12technomancycemerick: you can retrofit an AEII with USB; it's actually not terribly difficult
01:12technomancywell, a bit tedious
01:13cemericktechnomancy: sheesh, I *just* read that a moment ago
01:14cemerickI'll have to see if I still have one of those keyboards in the attic
01:14technomancyI 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
01:14cemerickit'd have some absurd mileage on it at this point
01:15technomancythey last a lot longer than rubber dome boards
01:15cemerickyup
01:15cemerickin a former life, I made money by buying used macs in bulk and reselling them one at a time
01:16technomancynice!
01:16technomancynow that I have a place with a ton of storage I am really tempted to scavenge craigslist for vintage hardware
01:17cemerickvery familiar with all the parts from ~IIvx through maybe the mid-life quadras IIRC?
01:17cemerickanother friend of mine does that
01:17cemerickfocuses on mobile stuffs
01:17cemerickhas 3 newtons, etc
01:18cemerickI had a newton 2000 for a while, that was a nice machine
01:18technomancyI'd go back a bit further for Apple ][s
01:18technomancyApple //c with a hardware dvorak switch awww yissss
01:18dysfunbe careful of vintage hardware
01:18dysfuna TRS-whatever turned up the other week
01:19cemerick"vintage" is always whatever you grew up with :-)
01:19dysfuni don't want any of the hardware i grew up with, i can emulate it just fine
01:19technomancyI saw a C64 at a thrift store but it was $300
01:19technomancysomeone knew they had a treasure on their hands
01:21dysfuni dunno, anything that takes tapes just doesn't feel worth it
01:23technomancywell, the higher the challenge to get it to speak TCP/IP and then connect to IRC, the greater the reward
01:23technomancybut I probably wouldn't try that stunt with an altair 8800
01:23dysfuna friend of a friend runs a *prestel* server on an acorn archimedes
01:24technomancyI lurves me some thocky toggle switches but I have my limits
01:24technomancyoh no I just discovered http://www.altairkit.com/ send help
01:25dysfunand i dunno, if i want a challenge i just write another clojure library
01:25cemerickI'm pretty sure my C64 is still in my dad's basement
01:26dysfunwell, send it to technomancy and he'll return it with a modem and an irc client
01:29technomancyaaaaaaaaaahhhhh http://www.brielcomputers.com/wordpress/?cat=17
01:31donomatici'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
01:33dysfunin core that's going to be slightly complex
01:33dysfunspecter might make it a bit easier
01:34dysfunbut my first stab would be reduce, mapv and update
01:37donomaticthanks dysfun. i'll bookmark the specter link. but i'll give it an attempt without it first
01:37dysfun(into {} (map (fn [[k v]] [k (mapv #(update % :b inc) v)])) data)
01:37dysfunthat's my second go
01:39dysfunnot tested at all, etc. etc.
01:41donomaticgotcha.
01:43tolstoyYou people and your clicky keyboards........
01:45tolstoydysfun Well, I've been trying out an EAV table in postgres, with the "V" being an array type. It's ... interesting.
01:45arrdemo/
01:46dysfuntolstoy: EAV is always interesting
01:46dysfuni've seen a table with a column for every datatype, that's a common one
01:46dysfunand hello arrdem, how goes?
01:46tolstoyQueries are a challenge, but I only have one type of entity, so it's not so bad.
01:47tolstoyI 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.
01:48dysfunit doesn't work yet
01:48tolstoyWould be nice.
01:48dysfun(mostly because i still haven't gotten an intuitive understanding of how to build recursive queries)
01:49dysfunfucking sql
01:49arrdemy'all having too much fun with these keyboards
01:49arrdemcherry blues, o-rings maybe some custom keycaps and move on
01:49dysfunodd how noone misses the spectrum keyboard
01:49tolstoyIsn't the Model M the very first IBM PC keyboard? The one no one makes any more? Metal thingies rather than plastic?
01:50itissidIs Joy of clojure considered good for an intro to concurrency and parallelism?
01:50tolstoyTyped on a non-new-apple keyboard at one point: felt like I was pushing down plungers.
01:50arrdemI was issued a mac keyboard in my first week of work ... and was really not happy
01:51dysfuntolstoy: unicomp make clones, see backlog
01:51arrdemtoo used to the click and the travel of a real keyboard
01:51dysfunchrist, it's just a keyboard
01:52dysfunso it doesn't feel nice to type on, well, i'm sure you'll live
01:52arrdemehhhhh
01:52dysfunit's no wonder bill hicks thinks we're a virus in shoes
01:52tolstoyI think I'm the one person Apple makes keyboards for. ;)
01:52arrdemI spend literally all day pounding on the thing
01:52arrdemit's worth putting some effort and thought into
01:53arrdemlike standing desk &c
01:53arrdempicked up an ergodox infinity when it was on massdrop, looking forwards to that project
01:54tolstoydysfun 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.)
01:57tolstoyAh, it was the Model F keyboard.
01:58cemerickarrdem: I don't grok the massdrop sort of things
01:58arrdemcemerick: eh massdrop makes sense for keyboards and other relatively small batch things that have to be manufactured and have significant ecconomies of scale
01:59arrdemfor most things massdrop isn't able to offer better prices than normal wholesalers
01:59cemerickI think you linked to this before: https://www.massdrop.com/buy/minivan-keyboard?mode=guest_open
02:00cemerickit's hilarious that mech keyboards are a whole category
02:00cemerickthere must be a population with 15 of em in their closet
02:00arrdemI mean... I own... four? at this point
02:01arrdemsoon to be fice
02:01arrdem*five
02:02arrdemhttps://www.massdrop.com/buy/25590 was the last one I went in on
02:03cemerickoh no, I've stepped on the hive now
02:03arrdemexpecting that and this ... febuary sometime https://www.massdrop.com/buy/26194
02:03algernonthey are surprisingly addictive.
02:03arrdemalgernon: oooh prototypes?
02:03algernonand my addiction started with clojure, after watching the Dactyl talk at one of the Conjs
02:03algernonarrdem: UHK & keyboardio, both to work on firmware stuff
02:04arrdemI could see getting addicted to making artisinal keyboards
02:04arrdemalgernon: cool!
02:04arrdemspeaking of boiling oceans cemerick I totally brought my FPGAs back from Austin
02:05arrdemso I may be yak shaving down to a microarchitecture before I actually do anything useful
02:05arrdem#justforfun
02:05dysfunthe thought of you writing verilog fills me with terror
02:05cemerickexotic dirt target!
02:06arrdemI do things that actually have to work at work
02:06arrdemthis means I can do nonsense at home :P
02:07dysfuni thought you just pissed about "devops"ing at work? :p
02:08arrdemheh my role on the team is to be the pissed off dev among ops. it's nice.
02:08dysfunso practically the devil's advocate in their eyes then?
02:08arrdemnot really, more the voice of discontent with fixing it by hand and moving on
02:09dysfunand there was me thinking it sounded like a perfect job for you
02:09arrdemthanks for the vote of confidence I appreciate it
02:09dysfun:)
02:10dysfungot any clojure projects on?
02:10arrdemI wrote a transpiler for work in Clojure within a month of joining
02:10arrdembut nothing since
02:11dysfunnot for work, i mean
02:11arrdemoh
02:11arrdemnah
02:11dysfun:/
02:11arrdemmost of my hobby coding has been in C on dirt
02:12arrdemas cemerick likes to heckle me for not using something with a real metaprogramming system
02:12dysfunyeah, i've been experimenting with a lisp macro layer that expands to c
02:13dysfunbut i might just give up and use pony
02:13dysfun(not lisp, but a lot more useful than c)
02:13cemerickarrdem: gotta start somewhere, but you do seem to enjoy wallowing
02:14dysfuncemerick: it's web scale performant, yo
02:15arrdemYeah. Back in school I met reactormonk who was big into... Nim
02:15dysfunnim looked promising
02:16dysfunthen somebody figured out it was actually silly unsafe
02:16arrdemhar
02:16arrdemYeah. I'm really enjoying wallowing in c as cemerick put it.
02:16arrdemIf I was more serious about making headway I'd probably look at Rust
02:17dysfunhttp://funroll-loops.info/
02:17dysfunoh damnit it's down
02:17arrdemI 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
02:17cemerick*llvm-klaxon*
02:18dysfunlet us know how it goes
02:18dysfuni've been thinking about what's practical for dispatch recently
02:19koriflatten?
02:19clojurebotflatten 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.
02:20arrdemI was enjoying playing with Racket for a bit
02:21arrdemdidn't get nearly as much out of realm of racket as I had hoped to
02:21dysfunwell i think there's a degree to which it's just scheme
02:22dysfunsure, they've built some nice libraries in it and it has a few twists, but it's just scheme
02:22cemerickdon't say that, they have spies everywhere
02:23arrdemheh
02:24arrdemIt is "just" scheme
02:24arrdembut it's got enough tooling and library support I can take it somewhat seriously
02:24dysfunright
02:24dysfunbut if you expected a revelation, well you already knew scheme
02:25arrdemwhich is not a thing I've said about Guile or any othe rnrs I've looked at
02:25cemerickok, I'll do it
02:25arrdemIt's been interesting the extent to which I struggle with decomposing programs to the extent required for a scheme
02:25arrdemeven given being used to a Clojure
02:26cemerick#lang racket is just a scheme, but the thing is far more than that
02:26dysfuni know what you mean
02:26dysfuncemerick: eh, nobody cares about all the non-scheme langs, all the innovating is with stuff like typed racket
02:27cemerickwhoo, you'd get a lot of pushback on that from the core devs and most serious users
02:27arrdemhttps://lexi-lambda.github.io/blog/2017/01/05/rascal-is-now-hackett-plus-some-answers-to-questions/
02:27arrdemthis I do wanna play with
02:29dysfunguile also does the multiple langs thing, albeit differently
02:30dysfunguile is also just a massive disappointment compared to racket
02:30dysfunthough they have done some impressive reengineering recently
02:30arrdemback in school I was thrown a zip file of the previous researcher's guile/scheme.
02:30arrdemthat was about two weeks before I seriously started trying to learn clojure
02:31arrdemyeah the guile-emacs thing will be awesome if it ever happens
02:31dysfunit won't. because the emacs community pushed back too hard
02:31dysfunmostly old gits afraid of change i think
02:32dysfunso it would only ever be a fork, and then you have to get users...
02:32dysfunand then why not just use a better lisp to begin with?
02:32arrdemyeah
02:33arrdemI've written ~trivial elisp, but a lot more of it of late and haven't been impressed
02:36dysfunthe 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
02:36dysfunelisp is just not a good language for that
02:36dysfunnor is the emacs interface intuitive
02:37arrdemwhat is this? nix in scheme under the fsf?
02:37dysfunpretty much
02:37dysfunthat's why i've been looking at guile again
02:38arrdemInteresting
02:38dysfunin concept, sure. in implementation, no
02:38arrdemYeah. Something like Nix/Guix is the future IMO
02:38arrdemDirtOS may take longer
02:39dysfunyes, i think the nix model will become widespread soon
02:39dysfunbut it won't be nix that makes it happen
02:39arrdemYeah
02:39dysfunbecause it's just not loveable
02:39arrdemI was talking to Chris Martin a few days ago and he expressed this really interesting idea -
02:40arrdemsolve package management and versoning by not letting people suubmit arbitrary package names and versions
02:40arrdemlet people submit arbitrary artifacts and refer to them by shasum
02:40arrdemand then maintain a very tightly controlled package name and version/compatibility registry
02:40dysfunfantastic. now you just need a means of translating from a convenient name and version into a shasum
02:41arrdemright, that's the tightly controlled and revisioned mapping
02:41arrdemwhich can also be vendored and have alternatives
02:41dysfunor just tightly control and revision map packages
02:41dysfuni hate to say this, but maven is actually alright
02:41dysfunas a model, anyway
02:41arrdemmaven is actually alright
02:42arrdemthe advantage of this is that you have a 3rdparty signing off on the compatability asseritions of versions
02:42dysfunclojars "just works" as far as i'm concerned. terribly annoying gpg integration of clojure build tools aside
02:42arrdemI've never really had much of a problem with the GPG stuff
02:42arrdemand I'm glad it's there
02:42dysfunoh i'm glad it's there
02:43dysfunand when the gpg integration works, it works great
02:43dysfunbut i've had lots of faffing
02:43dysfunand i'm not the only one
02:43arrdemIunno. 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
02:44dysfunright. i've moved machines and OSes a lot
02:44arrdemsounds like a personal problem :P
02:44dysfunwell i was trying linux distros
02:44dysfunthen i settled on freebsd
02:45arrdemlol
02:45dysfuni have learned that most people still think it's a fringe thing and don't bother to build on it
02:48arrdemhttps://github.com/eratosthenesia/lispc
02:48arrdemthis is interesting....
02:50tolstoyWould you be able to make an emacs-alike using embeddable JavaScriptCore like mfikes is doing for plank?
02:54arrdemOne probably could
02:55arrdemBut would that really be a win over something like Atom or embedding clojurescript in Atom as a plugin
02:56tolstoyI think you could do the primitives in C rather than Electron/Chromium, then script it up from there.
02:57tolstoyWhat he has is cross platform, but I don't really know if self-hosted ClojureScript is reasonable in that use case.
03:00ragepandemicdysfun, but isn't freebsd a fringe thing?
03:00TEttingerragepandemic: from what I understand it's one of the most reliable OSes for serverss
03:01ragepandemicTEttinger, no doubt, but dysfun said he was using it for his dev machine
03:01TEttingerit might be fringe for dev, but somebody's gotta dev what goes on the servers
03:02ragepandemiccouldn't you do that in docker or something?
03:02ragepandemic(does docker have freebsd images?)
03:02TEttingerless forced unplanned downtime is a plus for an OS
03:02TEttingerregardless of usage
03:03TEttingerI'd suggest the OpenSolaris forks as actual fringe OSes that see some tiny amount of use
03:03ragepandemichttps://hub.docker.com/r/amontalban/freebsd/
03:03dysfuntolstoy: i've been thinking of an emacs based on lumo
03:03TEttingerOpenSolaris has ZFS, which was way before its time, and a bunch of dev tools meant for actually writing code on that OS
03:04dysfunragepandemic: no, it's not fringe anymore. not *quite* mainstream either
03:04ragepandemicTEttinger, don't get me wrong, I like freebsd but I don't even think I could get it to work on my computer
03:04tolstoyWhat's lumo?
03:04TEttingerZFS still I think has a minimum recommended RAM for your machine of 8 GB, but it came out around 2006 or so
03:04dysfunfreebsd has zfs. it's the acceptable OS for ZFS
03:04ragepandemicI'll probably be stuck with no wifi
03:04dysfunlumo is a cljs repl based on nodejs
03:04tolstoyAh.
03:05TEttingerragepandemic: I'd be surprised actually
03:05ragepandemicTEttinger, I tried to install it on my macbook once, that didn't go well. IIRC it didn't even boot
03:05ragepandemicmaybe I did something wrong
03:06TEttingerwhen 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
03:06TEttingerrebooted, airplane mode is on
03:06TEttingeras in, linux has better hardware drivers than windows 7 at this point
03:07TEttingernot sure about BSD though
03:07dysfunFreeBSD mostly works
03:07dysfunit's a little behind on high end graphics and hardware
03:07arrdema coworker successfully ran his previous startup entirely on freebsd
03:07TEttingerwoah
03:08ragepandemicTEttinger, maybe for your case, but I still have issues with the WIFI and the sound card > 2 years later
03:09dysfunbut things get ported from linux reasonably quickly
03:12TEttingerragepandemic, hm, macs are likely an odd case because of more proprietary stuff in the hardware
03:12TEttingeraren't the graphics cards somehow apple-branded?
03:12ragepandemicyea, lesson learned. not buying a mac again
03:12ragepandemicI bought it with the intent of using linux (like thorvalds does), but nope
03:13TEttingerlinus can probably leverage apple into supporting his particular use case by threatening a boycott of techies from apple products
03:13TEttingernot like he'd support MS or google either
03:14TEttingeris the firefox phone still a thing?
03:15tdammersff phone is dead afaik
03:16dysfunthat's cause it was shit, hth
03:16ragepandemictdammers, ah shame, I wanted that to work out
03:17dysfunreally? cause i can't think of a worse idea
03:17ragepandemicI liked the idea of a no-proprietary mainstream OS
03:17dysfunsure, sailfish
03:17ragepandemicis that still a thing?
03:18dysfunyes. russia is adopting it
03:18dysfunbecause they're concerned about US backdoors
03:19TEttingerah, ubuntu edge is what I was thinking of. never launched
03:20ragepandemicdysfun, I might actually consider buying one
03:26dysfunnot for the reasons they state mostly, but a good idea nonetheless
03:27arrdemThere is a very very short list of people who I trust to run code which will run at pid0
03:27dysfunsure
03:27dysfuni hope i never make it onto your list :p
03:27arrdemlol
03:28dysfunand let's just say i'm going to let the libraries mature a bit before i actually do anything with them
03:28ragepandemicis this the part where someone jumps in and says we should write an OS in lisp (I know its been done)
03:28ragepandemic?
03:28dysfunit's not much fun being so far ahead of the curve
03:29arrdemalso I've literally been threatening dysfun with various attempts at that for... a year now?
03:29dysfunlonger
03:29dysfuntwo years at least
03:29arrdemwell at least I'm consistent
03:30dysfuni still think you should do it
03:30dysfuni still feel it's unlikely i'd use it :p
03:30dysfunmaybe if i like where you're going with it i'll jump on board
03:30dysfunin the meantime i'm trying to avoid falling down the OS-building hole again and just using posix
03:31arrdemIf I ever nail down dirtvm's type system and dispatch model booting to dirt will be on the todo list
03:32arrdembut not holding my breath on that
03:32dysfuni'm always happy to have ideas bounced off me
03:33dysfuncontinuations is very high up the list
03:34arrdemLast time I was working on dirt I got stuck thinking about how I want to represent gads, and fully applied instances of them
03:34arrdemOnce I figure that out I've got the algorithm for a naive implementation of the dispatch type matcher down
03:36dysfunanother thing i really want is to be able to make sure i'm safely interoping with the FFI
03:36ragepandemicarrdem, what's dirt?
03:37dysfunfor example, this string this c function returns, i want to mark that the gc should free() it
03:37dysfunthat 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
03:38arrdemragepandemic: 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
03:38arrdemhttps://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
03:39arrdemdysfun: I've been playing with something very close to linear types for exactly that reason
03:42dysfunwell, keep me updated :)
03:42dysfunit sounds interesting from the post
03:44arrdemI'm about as happy with that module system design as I could possibly be
03:44arrdemJust because of the versioning and isolation properties it provides
03:45arrdemStill playing with ideas for what the VM representation of functions and types is.
03:45dysfunyeah, me too
03:46dysfunone thing i find interesting is pony
03:46dysfunit's a practical language, not a beautiful one
03:46dysfunit makes some awful mistakes
03:46dysfunbut it's got a lot of interesting things about it
03:47dysfunsort of erlang meets c++ meets rust
03:48arrdemhummmmm
03:48arrdemhere's an idea
03:49arrdemwhat if I were to use Racket to host an implementation just of Dirt's namespace semantics.
03:49dysfunumm? bully for you?
03:49arrdemwell 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
03:50arrdemmaybe. idk.
03:50dysfunoh, you mean prototype? yes you should do that
03:50arrdemI'm gonna pack it in. Happy hacking and a belated happy new year.
03:50dysfunracket makes it easy i suppose
03:50dysfunyou too
03:51dysfunand sleep well
04:08tdammersdysfun: out of interest, what do you think the stated and real reasons are as to why unikernels are good?
04:09tdammersdysfun: my assumption was that the advantages are fast boot times and low attack surface
04:09dysfunthose are what i think is good yes
04:09dysfunbut the part i'm mocking is all the people who are obsessing about performance
04:10tdammersuhm, that's not really how it works though
04:10tdammersa decent kernel is usually written such that stuff you don't use doesn't impact performance much
04:10tdammersand if you want to fine-tune your kernel, you don't need a unikernel for that
04:10dysfuni didn't say they were logical
04:10tdammersyeah
04:11tdammersoh, also, ease of deployment
04:11dysfunone day i'll agree they have that, but it's not today
04:11tdammersand if you build them right, easier to get good fault tolerance through redundant setups
04:12tdammersnuke a VM, point it to new version, restart
04:13dysfunsure, when you've actually made that work
04:13dysfunwhat i mean is "you can do it, but it's far from as easy as they claim"
04:13tdammersoh sure
04:13tdammersbut the alternatives aren't easy either
04:14tdammersor, if they are, it's by virtue of lots of people having banged at it for a long time
04:14dysfunright
04:14dysfunin future, it'll deliver everything they promise
04:14tdammersthere are bigger problems than those though
04:15tdammersyou 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
04:15dysfunright
04:16tdammersalso, how the fuck do we do persistence :O
04:16ragepandemictdammers, always send everything to S3? /s
04:16dysfunwell you just pull in the filesystem
04:17dysfunat that point you may as well just use posix
04:17tdammersbut then you need to manage the interface between the unikernel and the filesystem
04:17tdammersI'd probably rather just use traditional servers for persistence, and make the unikernel conceptually stateless
04:19dysfunwell at that point there's not much that can go wrong on top of posix
04:19dysfunand y'know, it's much easier to program :p
04:51gkoIs there an idiom for (-> (-> x f 1) f 2) ?
04:51gkoOh, it's reduce, of course...
05:01sobelhehe
05:01sobelwhen you're already thinking correctly
05:08craftybonesI have an expression: (or (pred1? x) (pred2? x)....)
05:08craftybonesI can simplify it to use some
05:08craftybonesIs there a better way?
05:08craftybones(some #(%1 x) coll-of-preds)
05:09craftybonesI can't do a reduce or
05:09craftybonesbecause or is a macro of course
05:10craftybonesIn some sense, I want the inverse of condp, where I have many predicates and one test-expr
05:11osfabibisimap the predicates over x, get some result of that?
05:12craftybonesosfabibisi: I just saw some-fn
05:13craftybonessome-fn is exactly what I need.
05:13craftybonesThanks
05:18dysfunread the docstring carefully though
05:18dysfunit's a bit funny with more than one arg
10:09TimMcosfabibisi: "ZonedDateTime"?
10:09TimMcRelatedly, try M-x zone
10:10osfabibisithat's a zoned *datetime*
10:10osfabibisiM-x zone?
10:12TimMcIn emacs. :-)
10:12TimMcOh I see, just a date... hmm...
10:12osfabibisiah, I'm in vim here, but I couldn't see how running an emacs command would be useful (and I was right! ;-P)
10:13TimMcM-x zone-when-idle is a fun prank.
10:15TimMcYeah, I'm not entirely sure if a zoned date makes sense.
10:17ridcullywe clearly need a "datezone" to make things simpler!
10:17osfabibisiwhy wouldn't a zoned date make sense though?
10:18TimMcWhat operations would you do on a zoned date that you couldn't on a non-zoned date?
10:18osfabibisifrom 0:00-23:59 UTC is a specific day *in utc*
10:18osfabibisihmm, that might be the point, yeah
10:18osfabibisiI guess the difference would be that e.g. (.atStartOfDay zonedDate) would return a zonedDateTime instead of a LocalDateTime
10:19TimMcI think all the timezone stuff only becomes relevant when you say things like "this date at midnight" or "the interval of this date"
10:19TimMcyeah
10:19TimMcIt might make some code more convenient to write, I suppose.
10:28osfabibisiinterestingly, XML seems to have the concept
10:29osfabibisie.g. in XQuery* xs:date(fn:current-dateTime()) gives 2016-01-06Z
10:29osfabibisi* or at least MarkLogic's implementation thereof
10:32TimMcYeah, I think it's not *wrong*, just... redundant, maybe? Which is not always a bad thing in making fluent APIs.
10:32TimMc(I still haven't convinced myself, though)
10:41dysfundiagnosis for "simple :on-click events aren't firing under rum"?
10:43dysfunlike #(.log js/console "hello") is not firing
10:49osfabibisitoo much rum?
10:50dysfunnot enough, clearly
10:50MJB47if you look at the html
10:50MJB47is the on click event actually there on the dom node?
10:51dysfunno
10:51MJB47well thats why they arent firing
10:51MJB47now to find out why they arent there
10:52dysfundoes it actually set onclick though?
10:52dysfuni thought it was handled through the eventlistener framework under the hood
10:53TimMcsetting .onclick is so 2000s
10:54MJB47oh i guess thats possible
10:55MJB47i would have just assumed it would use onclick
10:55MJB47thats what reagent/react do iirc
10:55MJB47check the event listeners on the node then
10:55dysfunnvm, found my bug
10:56dysfunthat was driving me crazy for too long
10:56TimMcHmm. :reload-all doesn't seem to always reload everything.
10:57TimMcIf 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:00dysfunit should. it managing to do that is why the project i'm hacking on now can't be used with :reload-all
11:02TimMcIf I do (require 'app.main :reload-all :verbose) I just see (clojure.core/load "/app/main")
11:02dysfunit appears that it uses the event listener framework under the hood
11:03TimMcIf I put verbose on lower nses, I see a big pile of load, in-ns, and alias log messages.
11:06TimMcMaybe it's only reloading if it detects changes. :-(
11:09TimMc(This is Clojure 1.6.0 incidentally.)
11:12devnaw, i missed the keyboard chat with technomancy and cemerick -- pity
11:17cemerickdevn: surely more where that came from
11:17cemerickwhen I burn a hole in my atreus, you can laugh at me here
11:32devnha!
11:33devnIt's good to see people in IRC
11:33devndown with slack
11:33TimMc++
11:34osfabibisiboo! hiss!
11:34osfabibisidown with walled gardens, etc
11:37TimMcOK, 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:37TimMcand it really does seem to be related to which namespaces I have modified.
11:38TimMc...fine
11:38TimMcfind server/ -name '*.clj' -exec touch '{}' \;
11:38TimMc>:-(
11:38TimMc(That works, sadly.)
12:03osfabibisihrmpf! (get :foo {:foo nil} :eek) ;;=> :eek
12:03osfabibisisemi-predicate-problem-mungous
12:04amalloyosfabibisi: an important feature, not a bug
12:04osfabibisifeature how?
12:05osfabibisias opposed to distinguishing it from (get :foo {} :eek) somehow
12:06ridcullyget on a keyword will always be nil?
12:06ridcullydo you want to show the fact, that it works also the other way around or have you swapped the params by accident here?
12:07osfabibisiaha, yes, I've swapped the params by accident. that's also not good :D
12:08ridcullyand yes, that is for the case, when the map does not contain the key you are looking for
12:08osfabibisiok, so the feature works as expected with default, yay
12:08technomancysilently hiding mistakes is an important feature for sure
12:08osfabibisiyes, 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:08amalloyoh, ha, i didn't notice you'd swapped the params
12:08amalloyun-feature
12:09osfabibisibut yes, silently hiding mistakes is very annoying. it seems to do it *more* than Perl even...
12:09TimMcmis-bug
12:09technomancyosfabibisi: it's a high bar but clojure is up for the challenge =)
12:10TimMcLet's make all functions total so we can do it even more.
12:11dysfunlet's total TimMc's car
12:14osfabibisiso 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:14osfabibisiall the rest of it is great though :D
12:15dysfuni have come to peace with the confusing error messages
12:16osfabibisisure. I mean "I guess the error must be in the stuff in `git diff` somewhere" usually gets you fairly far
12:16dysfunassuming you are a diligent committer
12:16technomancyosfabibisi: not bad; you just need to add `contains?' and the use of jira and you'll be well on your way
12:17osfabibisithe use of jira?
12:17amalloy,(contains? '(1 2 3) 2)
12:17clojurebot#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:17amalloytechnomancy: much has changed while you were away
12:17osfabibisioh dear god http://dev.clojure.org/jira/browse/CLJ
12:17technomancyamalloy: yeah I was going to put the CLA on that list but I wasn't sure it was still relevant
12:18osfabibisibut yes, contains? has bitten us, but that's an easy one to remember once it's bitten you
12:18amalloyit's been quite a while since CLAs have needed to be on dead trees
12:18osfabibisijust randomly getting stuff wrong and not getting help from compiler is harder
12:18technomancyamalloy: we're living in the future
12:25technomancyosfabibisi: I love the imagery here of a magic genie that is always trying to murder you https://mobile.twitter.com/peterb/status/816120822674948096
12:27osfabibisiheh
12:27osfabibisiit's interesting that clojure is considered more mathsy
12:27technomancyyeah the problem with that graph is it's 1-dimensional
12:31technomancyusing 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:32osfabibisiheh
12:32technomancyand in erlang the genie murders me and it's OK; I just respawn and keep going!
12:33TimMc^_^
13:13dysfuntechnomancy: the genie doesn't murder you, you failed a pattern match
13:24cemericktechnomancy: this is a very useful analogy
13:34amalloywhat more do they need?
13:36dysfunthey should look like puppies and smell of exotic fruit
13:55TimMclike durians!
14:34winklol
14:37dysfunwell i've never confused boot's pom task before today
14:37dysfunjava.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
14:38dysfunany ideas? none of the pom options are vectors
14:51hiredman_you have an extra level of nesting somewhere
14:51hiredman_[foo/bar "1.0.0" [baz/bleep "1.0.0"]]
15:09dysfunthat was my first guess as well
15:09dysfunhowever, it's not
15:22ragepandemicdysfun, how's your build tool coming along?
15:22dysfunit's paused
15:23ragepandemicto work on something more awesome?
15:24dysfunno, to swear at boot while i get a client site out
15:24dysfunand then while i decide whether i really want to sink a lot of time into nodejs
15:25ragepandemicdysfun, i like the idea of a lightweight clojure, a lot
15:25dysfundon't we all? but there's no such thing
15:26dysfunthe main thing i'm umming over is the threading situation
15:26ragepandemicwhats made you question nodejs?
15:26dysfunthere are hacks, but i don't like it
15:27ragepandemicyou mean the lack of a threading situation
15:27dysfunwell there's like webworker-threads
15:27dysfunbut oh geez the entire async model makes me want to scream
15:27dysfuni did promises for it and then decided i hated it
15:28ragepandemicdoesn't the latest JS have support for await, etc.?
15:28ragepandemicI guess we already have that, kinda, with <!
15:28dysfunnot on lumo you don't
15:28ragepandemicyea, I recall you saying
15:28dysfuncore.async will only compile on the clojure-hosted cljs
15:28ragepandemicany news on the issue?
15:29dysfunnone
15:29dysfunapart from discovering it's far from the only core.* module that doesn't
15:29ragepandemicits still early days though
15:30dysfunsure. and i might change my mind when support improves
15:30dysfunbut for now, it just seems a bit tedious
15:31ragepandemicthat's a fair point, in the meanwhile I avoid running clojure as a microservice
15:34ragepandemicor am I wrong thinking that the JVM isn't suitable for micro-services?
15:34SeyleriusWhat'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:34dysfuni don't think microservices are a great idea personally
15:35dysfunSeylerius: group-by
15:35ragepandemici think the extend of micro depends on who you ask
15:35ragepandemicextent*
15:35Seyleriusdysfun: Perfect, thanks.
15:35dysfunyw
15:36ragepandemicdysfun, so do you subscribe to the monolithic app or something in the middle?
15:36TimMcragepandemic: JVM is fine for microservices.
15:36TimMcThe problems with microservices, in my experience, tend to be with how you manage the fleet or avoid excessive server usage.
15:36sobel"Please stop calling nanoservices 'functions'"
15:37ragepandemicso, I guess something in the middle makes sense? Larger services, but not one huge app
15:38TimMcMonoliths suck even more. :-)
15:40ragepandemicat my job we split a monolith down to API, compute, file upload, websocket. I consider that reasonably sane
15:40sobeli think it has more to do with the context than the impl
15:40ragepandemici don't see why I'd make it any more granular than that
15:41sobellike, 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:41TimMcThat's a good point.
15:42sobeli realized the social problem in nomenclature
15:42sobelpeople think it implies implementation
15:44osfameronah, so saying "Project X" is the same kind of thing as drawing your designs in pencil on a napkin?
15:44technomancyjust make it serverless
15:44technomancythen your problems of using poorly-thought-out names will seem minor by comparison!
15:45dysfuntechnomancy: i watched a mildly famous developer embarrass themselves about serverless on twitter this week
15:45sobeldo not underestimate the power of babel
15:45technomancydysfun: you mean they used the term non-ironically?
15:45TimMc"Our application is hosted over torrents served between the browsers of our users."
15:46dysfuntechnomancy: they're developing a serverless framework!
15:46sobeli'm sorry, $customer. we will try harder, next time.
15:46dysfunso i figured out *why* everyone is going mad on serverless
15:46dysfunit's because amazon is giving away shittons of free lambda time
15:46sobelour most technically advanced client is opting for hosted services, finally admitting they don't really have the IT chops to host >2 servers
15:46sobel(our app spans 3-5)
15:46technomancyI 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:46dysfunyou *will* like it, even if we have to give you it for free to make you like it
15:47technomancydysfun: it worked so well with windows
15:47dysfunright
15:47sobeldysfun: that's how i could afford most of the software tools i love today!
15:47dysfunthat's why we all use windows
15:47TimMcayyy
15:47sobelthe. entire. gnu. toolchain.
15:47sobelj/s
15:48sobelwe didn't always have clojure
15:50osfameronthe idea of not having to worry about servers is lovely
15:51osfameronif you think of them like e.g. memory management, it seems rather sensible to let someone else worry about them
15:53ragepandemicosfameron, isn't not worrying about servers what docker is trying to do?
15:54technomancyosfameron: yeah but we don't call GC'd runtimes "memoryless"/
15:55TimMcWe run our service directly on macbooks, and technically those aren't "servers".
15:58ragepandemicthe idea that everything is moving over to AWS freaks me out a little to be honest
16:00technomancywell as far as monopolies go moving off AWS is easier than moving off GitHub
16:01ridcullyhow is that? to me github is some git-service on the web. moving somewhere else is basically some ssh-account away?
16:01Empperi technomancy depends on how much of the github integrations you use
16:01technomancyridcully: oh, for private code, sure
16:01technomancytry moving an OSS project and watch them reach for pitchforks
16:01Empperiand if one uses only ec2 servers then it's easy to go away from AWS
16:02Empperibut the second you start to use redshift, lambda etc you're fucked if you want away from AWS
16:02ridcullybinding customers
16:02ragepandemicthere's not much to be freaked out about, you have your OSS code open to the public on their servers
16:03ragepandemicwhereas with AWS, I'm concerned about privacy of things I may not want to have open to the public
16:04ragepandemicand vendor lock-in ofcourse
16:06dysfuntechnomancy: oh, did you try moving some OSS off github?
16:07technomancydysfun: no, but I've started several off github, and I've only ever really gotten one contributor
16:08dysfunoh sure, projects just don't get found if they're not on github
16:08technomancyanyway you should hack on my project to prove me wrong =)
16:08dysfunwhat's it written in?
16:08technomancylua and lisp
16:08dysfunwhich lisp?
16:08ragepandemicwhere do you host it now?
16:09technomancydysfun: https://github.com/meric/l2l
16:09dysfunNO
16:09technomancyragepandemic: https://gitlab.com/technomancy/bussard
16:10dysfuni thought you meant a real lisp
16:10ragepandemicnice, gitlab is pretty cool, we recently switched at my company
16:10technomancydysfun: there is a scheme->lua compiler but it's much worse
16:10ragepandemicpipelines, docker registry, all the nice stuff
16:10TimMc"This language is a superset of Lisp and Lua." D-:
16:10dysfunwell, lua is alright, but meh
16:10technomancydysfun: I'm not actually writing the game in it
16:10technomancydysfun: it's used for pedagogical purposes
16:10technomancyor, that's the plan anyway
16:11ragepandemicits funny, I was gonna start working on a game exactly like this...
16:11osfamerontechnomancy: heh, "memoryless" is quite nice though ;-P
16:12ridcullycpuless would be great
16:12dysfunanyway, i think the real way to solve the github problem is to seamlessly interop with it
16:13technomancyragepandemic: ...but?
16:13ragepandemicstill working on it
16:13ragepandemicits just super early stages
16:18ragepandemicthe difference is that mine is supposed to be multiplayer
16:38SeyleriusIf 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:40tolstoy-reduce-kv?
16:41justin_smith,(into {} (map (fn [[k v]] [k (peek v)])) {:foo [{:bar :baz}], :bar [{:baz :bop}]})
16:41clojurebot{:foo {:bar :baz}, :bar {:baz :bop}}
16:41justin_smithpop instead of peek would just give you []
16:43tolstoy-,(reduce-kv (fn [a k v] (assoc a k (first v))) {} {:foo [{:bar :baz}], :bar [{:baz :bop}]})
16:43clojurebot{:foo {:bar :baz}, :bar {:baz :bop}}
16:44tolstoy-,(reduce-kv #(assoc %1 %2 (first %3)) {} {:foo [{:bar :baz}], :bar [{:baz :bop}]})
16:44clojurebot{:foo {:bar :baz}, :bar {:baz :bop}}
16:45justin_smith,(into {} (map (fn [[k [v]]] [k v])) {:foo [{:bar :baz}], :bar [{:baz :bop}]})
16:45clojurebot{:foo {:bar :baz}, :bar {:baz :bop}}
16:47tolstoy-Some tasty destructuring soup!
16:48tolstoy-,(reduce-kv (fn [a k [v]] (assoc a k v)) {} {:foo [{:bar :baz}], :bar [{:baz :bop}]})
16:48clojurebot{:foo {:bar :baz}, :bar {:baz :bop}}
16:50SeyleriusThanks, justin_smith, tolstoy-!
16:52justin_smithSeylerius: also, the version using specter would be more concise (and likely faster)
16:53ridcullysince 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:57justin_smith,((fn hash-by [f coll] (into {} (map (juxt f identity)) coll)) inc (range 5))
16:57clojurebot{1 0, 2 1, 3 2, 4 3, 5 4}
16:58justin_smithalternatively (zip-map (map f coll) coll)
16:59justin_smith*zipmap
17:10ragepandemici'm trying out rum, but I'm having difficulty with a basic example. https://www.refheap.com/124521
17:10ragepandemicAccording to the README this should run fine
17:10ragepandemicI don't get a date printed, I just get "The mount time is"
17:11tolstoy-Try (str (::time state))?
17:12ridcullyi wonder if there will ever be a question or statement about rum, i have not to giggle
17:12ragepandemictolstoy, no luck
17:13ragepandemicif I add a (println "State:" state) before [:div...] it doesn't contain the time state
17:13ragepandemicbut, the :did-mount function runs
17:14tolstoy-The example here suggests a rum/local mixin.
17:14tolstoy-https://github.com/tonsky/rum#components-local-state
17:14ragepandemictolstoy, I was reading this one: https://github.com/tonsky/rum#writing-your-own-mixin
17:15ragepandemic4th example down
17:18ragepandemici'm using the latest release 0.10.7
17:19tolstoy-Maybe the example is wrong.
17:20tolstoy-When you print state in the did-mount section, what is it?
17:20tolstoy-s/section/function
17:20ragepandemic{:rum/args (The mount time is), :rum/react-component #object[Object [object Object]]}
17:21ragepandemicand 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:23tolstoy-Try will-mount?
17:23tolstoy-Maybe it doesn't re-render because you've called mount only once?
17:24ragepandemicrror: 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:25tolstoy-Put str around date?
17:25ragepandemicYou mean (str (::time state))? Already did that
17:25ragepandemicI tried mounting twice too
17:25tolstoy-Yeah. Oh, hm.
17:26tolstoy-add the rum/reactive mixin?
17:26tolstoy-Alas, you can't just try these things at a repl.
17:26ragepandemicstill nothing
17:26tolstoy-Yeah, that's probably not right (the reactive suggestion).
17:27ragepandemicare you replicating the same behaviour or is it just me?
17:27tolstoy-No, I can't set up a CLJS project on the fly. Otherwise I'd try it!
17:31tolstoy-let me see if I can put something together
17:31ragepandemicthanks
17:38tolstoy-Ok. I can repro it.
17:39ragepandemici was thinking its the latest release
17:39ragepandemicI'm trying it with 0.10.6
17:39ragepandemicnah, same thing
17:40tolstoy-[:div label ": " (str (::time state))]
17:40tolstoy-That solved it for me.
17:40tolstoy-The html data structures can't handle a raw date.
17:40ragepandemicno, its still not working for me
17:40ragepandemicmaybe its my browser
17:41tolstoy-Refresh?
17:41ragepandemicI refreshed, restarted figwheel
17:41tolstoy-(I'm using Safari. But I've seen that kind of thing a lot. It's a sablono thing.
17:41ragepandemicnot working on chrome either
17:41tolstoy-)
17:41ragepandemicI was using firefox
17:42tolstoy-Works on all three four me.
17:42tolstoy-Oy with the typos.
17:42ragepandemicdid I make a typo?
17:43tolstoy-No, I have been though.
17:43tolstoy-rum 0.10.7
17:43ragepandemicsame, I tried 0.10.6 too
17:46tolstoy-I pasted your code straight from refheap, add the `str` around the time, and it works.
17:47ragepandemicI copy pasted from refheap again and added `str`, still no luck
17:47ragepandemicI'm thinking it might be something to do with my environment, but I dunno. I'm not getting any console errors
17:48ragepandemicI can paste my project.clj if it helps?
17:49tolstoy-Ship the whole project somewhere?
17:49ridcullymaybe better to share the whole project?
17:51ragepandemicok
17:53tolstoy-Are you seeing the label at all? Is there really an element with id="app" in the index.html file?
17:53ragepandemichttps://gitlab.com/kalouantonis/sound-app/
17:53ragepandemicYea, I'm seeing the label
17:54ragepandemicthis is the output https://www.refheap.com/124522
18:01ragepandemicits basically just a luminus template with +cljs and a rum dependency
18:02ragepandemici've already gone ahead and re-created the target/cljsbuild directory
18:02tolstoy-And init! is called from somewhere?
18:04ragepandemicYea, I don't remember where from, but if you add a (println "Initializing...") in init!, it prints just fine
18:04tolstoy-luminous seems quite the framework
18:05tolstoy-Anyway, if the actual label is printing out, it seems like the rest of the project is ok.
18:05tolstoy-What happens if you (str (js/Date.))?
18:06rhg136when did luminus go from template to framework?
18:07tolstoy-Oh. Did I use the wrong terminology?
18:07rhg136I'm not sure
18:07ragepandemictolstoy-, it works in that case
18:08rhg136luminus.X namespaces exist iirc
18:08ragepandemicclearly the problem is that the return value from :did-mount is being ignored
18:08ragepandemicrhg135, they do
18:09rhg136that's not just a template then
18:09ragepandemicrhg135, its a tiny wrapper over immutant
18:10rhg136wrapper /= template or framework
18:10rhg136library it is
18:10tolstoy-ragepandemic Maybe just erase that whole component and retype it. ;)
18:10ragepandemicyea, i'll do that
18:12ragepandemicnope, I even broke the first rule of programming and copy pasted
18:13ridcullythat's not "first rule". it's just about being above mediocre
18:15tolstoy-Hm. Maybe just start up a brand-new luminous template, and see if you can get it working there?
18:15ragepandemicalright
18:16osfameronthe docs suggested they couldn't (by insisting on specifying it's a zipper for *nested* or hierarchical vectors)
18:18tolstoy-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:19ragepandemicI'll try both of them and if neither work, I'm just going to go to bed
18:19hiredman_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:21ragepandemictolstoy-, even starting a new project doesn't solve it for me
18:21osfameronI 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:22hiredman_erm
18:22hiredman_why would you want a zipper not on a tree?
18:22osfameronbut I think it's worth it, I'm not sure the builtin zipper stuff is useful for my use-case
18:22osfameronhiredman_: because you want to traverse a list and edit it
18:22osfameronexactly the same reason you'd zip over any data structure
18:22technomancymoving left and right over a turing tape
18:23osfameronyeah
18:23osfameronanywhere that an imperative programmer would think about a doubly linked list
18:24ragepandemictolstoy-, clean doesn't work either...
18:24osfameronI've just realised that I actually want to zip over a reduction
18:24osfameronoh my...
18:24osfameronanyway, nn &
18:24tolstoy-ragepandemic: I guess maybe upload the stock project (+ your additions) and submit an issue to luminous?
18:25ragepandemiclet me try a bare bones run project first
18:25ragepandemicjust to make sure
18:25ragepandemicrum*
18:28ragepandemictolstoy-, ok, so it works with vanilla rum. I'll submit an issue to luminous tomorrow
18:28ragepandemicthanks for all your help
18:29tolstoy-Oh, good! It's not you! Now you can sleep easily. ;)
18:29ragepandemicyea, I was worried I did something stupid this whole time :D
18:30ragepandemici'll let you know when I find the cause
18:34ragepandemictolstoy-, Haha! I've found the cause
18:36ragepandemicluminus uses clojurescript 1.9.293, but the working version uses clojurescript 1.9.229
18:36ragepandemicrum breaks on 1.9.293 for the previously working configuration
18:46ragepandemicanyway, I'm off to bed. gonna file an issue tomorrow
18:49rhg136blame rum! or cljs!
18:52tolstoy-Rum is always to blame.
18:52justin_smithwhy is the rum gone
18:53ridcullyomg
18:53justin_smith~ram
18:53TimMc*RAM
18:53ridcully~rum
18:53TimMc~why
18:53clojurebotwhy is the ram gone is <reply>I blame UTF-16. http://www.tumblr.com/tagged/but-why-is-the-ram-gone
18:53ridcully~kranken
18:53ridcullywem
18:53justin_smithwe could compromise on raum
18:54ridcullyi expect the next framework to be called gin
18:54justin_smithIn demonology, Raum is a Great Earl of Hell
18:54ridcullyblackbird raum?
18:55ridcullyin german raum means space/room
19:02hiredman_~kraken
19:02clojurebotNo entiendo
19:02ridcullythanks
19:02hiredman_clojurebot: hiredman
19:03clojurebotmap is *LAZY*
19:03ridcully~hiredman
19:03clojurebothiredman is a rubber duck
19:03ridcullythere ya go
19:05rhg136~rhg135
19:05clojurebotrhg135 is oh hi im rhg135
19:05rhg136cool
19:05rhg136I'm popular
19:05ridcullywhee
19:11ziltiI'm currently fighting with the proxy macro - can I somehow access variables of the class I'm overriding?
19:12rhg136~this
19:12clojurebotthis is very easy to do with loop
19:12rhg136no, really. this is the object
19:13rhg136so (.m this)
19:13ziltiI tried (.rootNode this) but the compiler complains that there is "No matching field found".
19:13zilti"java.lang.IllegalArgumentException: No matching field found: rootNode for class cljgame.core.proxy$com.jme3.app.SimpleApplication$ff19274a"
19:14rhg136can't access non-public fields without reflection
19:15ziltiNot even class-local ones?
19:15ziltihmm.
19:17hiredman_https://github.com/arohner/clj-wallhack
19:18rhg136~reflection
19:18clojurebotGabh mo leithscéal?
19:18ziltiThanks!
19:18rhg136aww
19:19rhg136clojurebot: reflection is great sometimes
19:19clojurebotAck. Ack.
19:19hiredman_Java Reflection in Action is on the clojure bookshelf
19:19hiredman_~bookshelf
19:19clojurebotbookshelf is http://www.amazon.com/Clojure-Bookshelf/lm/R3LG3ZBZS4GCTH
19:22ridcullyugh not even assosiated that link
19:22zilti...though that isn't solving my problem :( (Access violation...)
19:23ridcullyclojurebot is not ripping us off
19:24ziltiThere goes my plan of "Eh, let's just write that JMonkeyEngine example in Clojure instead"
19:25rhg136gen-class
19:43ziltirhg136: ...and how do I access class fields there? The documentation for gen class is... lacking.
19:48rhg136I wish I knew, zilti
19:48ziltiOh well then. *buries idea* Thanks anyway.
19:49rhg136np
19:53zilti(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:55rhg136horrible
19:55rhg136~api
19:55clojurebotthe website api refers to last release
20:01ridcullyclojurebot: is my sunshine
20:01clojurebotexcusez-moi
20:02rhg136clojurebot: you got an admirer lol
20:02clojurebotIt's greek to me.
20:02rhg136yup
22:12TimMcCool, 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:12TimMcLet me know if you see any horrible path traversal bugs.
23:12craftybonesHas anybody worked on telescope control software/
23:12craftybones?
23:26technomancyI've downloaded light curve data from the Kepler telescope and plotted it; does that count?
23:27craftybones@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:28craftybonesbtw @technomancy - thank you for Leiningen :)
23:28technomancyglad you like it
23:28craftybonesI use it, no doubt, but I always get the feeling that I can do more with it, but never get around to that
23:29craftyboneslike writing some plugins that help me setup some basic scaffolds.
23:29jeayeIs there a way to disallow a key in a map, using spec? Like, the opposite of s/keys with :req
23:29jeayeI have a function which takes a map and does a dissoc, basically, and I'd like to spec it.
23:30technomancycraftybones: scipy seems to have helped make python one of the go-to tools for scientific work
23:30technomancyI hope julia is able to unseat it
23:30jeayeI can write a manual predicate for it, but using something in spec would be ideal; I just don't see it.
23:31craftybones@technomancy - Yeah, scipy seems to have a chokehold on scientific work for sure
23:43TEttingerand torch is another big thing these days. tensor anything, like google's tensorflow stuff