#clojure logs

2016-01-01

00:03ben_vulpesi mean it's way at the bottom.
00:03ben_vulpesin the doc string for let, huh?
00:03justin_smithben_vulpes: I know it's weird but I go around reading docs for things even though I think I already know them
00:04justin_smithkind of like how some people read cereal boxes
00:04ben_vulpesinterestingly, it's in there for clj, but not cljs
00:04ben_vulpesnot that i'm going to blame that for my missing it.
00:04justin_smithoh, that's odd
00:05ben_vulpesi'm much more inclined to pull the docs up now that i have cider all wired together
00:09justin_smith,0x1bad1dea
00:09clojurebot464330218
00:09kenrestivowhat's a bad idea about the docs?
00:09kenrestivodocs are awesome
00:10justin_smithnothing, I just randomly wanted to see what number that was, totally unrelated
00:10kenrestivo(inc docs)
00:10amalloy,0xcafebabe
00:10clojurebot3405691582
00:10kenrestivo,inc docs
00:10clojurebot#object[clojure.core$inc 0x2478afba "clojure.core$inc@2478afba"]
00:10kenrestivo~inc docs
00:10clojurebotHuh?
00:10kenrestivowhatever, whichevver bot keeps the karma, and however it does it, that.
00:11justin_smith,(- 0xdeadbeef 0x1bad1dea)
00:11clojurebot3271598341
01:16justin_smith,(.toString (BigInteger. "3824053620879447910461354") 36)
01:16clojurebot"happynewyear2016"
02:02TEttinger,(.toString 3824053620879447910461354N 36)
02:02clojurebot#error {\n :cause "No matching method found: toString for class clojure.lang.BigInt"\n :via\n [{:type java.lang.IllegalArgumentException\n :message "No matching method found: toString for class clojure.lang.BigInt"\n :at [clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 53]}]\n :trace\n [[clojure.lang.Reflector invokeMatchingMethod "Reflector.java" 53]\n [clojure.lang.Reflector in...
02:02TEttingerdamn!
02:02TEttingerint and integer
02:03ikfb_I stduy clojure on braveclojure.com. Here is a str (swap! fred increase-cuddle-hunger-level 10) but the author said swap! need two args . It passed three !
02:03TEttingerswap! needs at least two args, it passes the rest to the fn
02:03tolstoyIs that tutorial written by Aphyr?
02:03TEttinger,(def adam (atom 0))
02:03clojurebot#'sandbox/adam
02:03TEttinger,(swap! adam inc)
02:04clojurebot1
02:04TEttinger,(swap! adam + 1)
02:04clojurebot2
02:04TEttinger,(swap! adam + 3 3 3)
02:04clojurebot11
02:04ikfb_I see
02:05ikfb_func is first class . pass like a var . but action like fun
02:09tolstoyswap takes an atom a function and any args. Kinda like (reset! atom (apply f @atom args)).
02:14ikfb_I have a question. swap mean exchange. the meaning show only update atom value . where is old value , it can't give to a func i think.
02:16tolstoyThe function you have to swap takes the old value and returns a new value to be stored on the atom.
02:16tolstoy(swap! atom (fn [old-value] (+ old-value 10)))
02:18tolstoys/have/give/
02:19tolstoyIf you want the old value, you just deref the atom.
02:20tolstoy(let [old-val @atom] (swap! atom #(+ % 10)))
02:20tolstoythe swap! function itself returns the new value when the function is applied.
04:46ikfb_Hi I translate https://bpaste.net/show/d9540131efbf to in python https://bpaste.net/show/6662ba8eec39 about 1 minute. When I want implement by clojure. ( First I should directly translate Then I use clojure's idea method to replace it) But I meet simple problem. Which var should be use atom or rel ?
06:59ikfb_ /msg NickServ identify nickjiamo
07:10ishake-uhi
07:10ishake-uwhich country is this channel
07:13beakyhello
07:30ikfb_Ok find a website compare python and clojure on some syntax, http://jkkramer.com/sudoku.html
08:32engblomikfb_: Somehow I find that site biased towards making Python look more simple. They seem to pick a more complicated way for Clojure, like (def digits (set (range 1 10))) for clojure and digits = '123456789 for Python
08:37ikfb_New to clojure. While the generally language something like equal turling. Every one have its best idiom to describe somethings. I am familiar python (more or less) I wish I can have some resource to see a complicated problem by clojure and python. (May be there have different domain)
08:41AimHereRosetta Stone is a good resource for that sort of thing
08:41AimHereRosetta Code
08:41AimHerehttp://rosettacode.org/wiki/Rosetta_Code
08:42AimHereIt's a website with a series of programming tasks, and the code for it in *lots* of languages
08:44AimHereWhether the code for any given tasks is idiomatic clojure (or idiomatic python), I'll leave as an exercise for you to guess
08:45ikfb_thanks. I find a guys in 4clojure for last or list like : (reduce #(-> %2) [1 2 3 4]) and python may be a[-1]
08:45AimHereWell clojure has 'last' built-in.
08:46AimHereSome of the 4clojure exercises are to replicate clojure builtins without using them
08:46AimHere,(last [1 2 3 4 5])
08:46clojurebot5
08:46AimHereSo when they have those sorts of constraints, they'll clearly not be idiomatic
08:51ikfb_Hi Aimhere . http://rosettacode.org/ is really what I want to see now. Wish more clojure programmer give their beautiful code on it. This may attract new people.
08:51ikfb_People will see which language is their taste.
09:43irctcHi
13:04Frozenlockclojars is down again :-(
13:47ZimaBlueYEAH!
13:48ZimaBlueclojars IS down!! Is this an ongoing problem?
13:48ZimaBlueI'm trying to set up a new laptop/workstation and thought I'd just done something wrong -_-
13:51gfredericksZimaBlue: linode keeps getting DOS'd, which affects clojars since it's hosted there
13:55justin_smithsounds like it's time for redundancy
13:55ZimaBluethat sucks :( is there a workaround to get leiningen up and running?
13:56justin_smithZimaBlue: if you need a specific package, you can check out from github and run lein install
13:56gfredericksif toby hasn't gotten alex to give him some control over dns at least then I'm not sure how to get that redundancy working
13:56gfredericksunless we wanna all switch to clojars2.org
13:56justin_smithbut if you need to bootstrap a whole lein install... maybe you can copy your ~/.m2/ from another machine?
13:58gfredericksI'm Gary Fredericks And I Wish Clojars Was Up.™©☺®
14:01amalloywe should all just share one network-mounted .m2
14:02amalloyput it someplace central
14:02justin_smith:)
14:02amalloywhat would we call our central maven?
14:02amalloy(happy 2016)
14:03justin_smithgfredericks: well, instead of switching to clojars2.org, we could just ensure that clojars2, clojars3, clojars4 all exist and stay synced with clojars, and then add them all to the default repos
14:04justin_smithand separate orgs could sponsor mirrors, especially if there was a turnkey "run this jar to run a clojars mirror" download
14:04justin_smiththe failover checking already exists in the maven logic
14:07gfredericksthis reminds me that my server log says I've been getting requests for nonexistent subdomains of googlegooglegooglegooglegoogle.com
14:07gfredericksand I'm curious how that happens
14:07justin_smithgfredericks: the server log on googlegooglegooglegooglegoogle.com which you own, or the logs on some other server?
14:08gfredericksthe former
14:08gfredericksin particular I've logged 2 requests to each of ww{38,41}.googlegooglegooglegooglegoogle.com, and 12 requests to ww1.googlegooglegooglegooglegoogle.com
14:09amalloythe least sophisticated port-scanning of all time
14:10justin_smithhell, I get requests for domains that aren't even subdomains http://24x7-allrequestsallowed.com/?PHPSESSID=aab45f4f00143PRWJTUGYC%40_JESX HTTP/1.1" - they are trying to see if I am running a proxy, basically
14:10gfredericksI've gotten 2 requests for www.baidu.com
14:10justin_smithI get a lot of those
14:11justin_smithgfredericks: if it was wwwwwwwwwwwwwww.googlegooglegooglegooglegoogle.com that they sent a request to, I would congratulate them for their wit
14:11gfredericksI should put something special there
14:12justin_smithgfredericks: you could blatantly copy the behavior of "telnet skelnet.club"
14:13gfredericksha
14:13justin_smithgfredericks: what amazes me is that they made a recognizable ascii version of that dude at that resolution
14:13justin_smithI mean I know *exactly* the gif they are quoting
14:13gfredericksI don't know who that dude is
14:14gfredericksI only had two gif classes in college
14:14gfredericksnever even made it to the end of that big textbook
14:14justin_smithoh wait never mind, not that one
14:15justin_smithfalse memory syndrome strikes again
14:17justin_smithgfredericks: I was thinking of this guy, but the costume is wrong https://nicoladallasen.files.wordpress.com/2014/09/tumblr_ncqys2nrbb1qe8i7ko7_r1_250.gif
14:17gfredericksoh I'm familiar with that guy actually
14:18gfredericksa coworker once took it upon himself to play that on his auxiliary monitor for the entire month of October or something
14:19gfrederickshttp://status.linode.com/
14:20gfredericksI used to run my primary personal server in linode atlanta, which made these outages a lot more annoying
14:21justin_smithgfredericks: does linode allow serving one site from multiple regions?
14:21gfredericks"ugh, my server's down; fine I'll just develop this clojure code locally. ugh, clojars is down; fine, I'll just"
14:21gfredericksjustin_smith: can you do that purely with DNS?
14:21justin_smithdunno
14:22amalloyi hope to someday learn that dns is turing complete
14:23justin_smithgfredericks: I mean there's the low tech way of having a backup server and propagating a new dns to point to that one when the other one goes down - but there are fancier things out there too (that linode might not support)
14:40gfredericksI meant having one domain name point to several IPs
14:40gfrederickse.g., `dig google.com` lists 11 or so
14:42justin_smithgfredericks: I only know so much about this stuff, seems like it should be doable
14:43gfredericks~this |could be due| to a typo in :dependencies or network issues.
14:43clojurebotc'est bon!
14:43gfredericks~this
14:43clojurebotthis is not allegro
14:43gfredericks~this
14:43clojurebotthis is an outrage!
14:43gfredericks~this
14:43clojurebotthis has been another episode of gfredericks in wonderland
14:44amalloytruer than you know, clojurebot
14:44gfredericks~that
14:44gfredericks~what
14:44amalloygfredericks banned from clojurebot for spamming
14:44gfredericks~it
14:45gfredericksconsarnit
14:45gfredericksthat's never happened before
14:45clojurebotthat is pretty cool
14:54ZimaBluethanks for the .m2 advice btw it worked
15:03rhg135I don't like 'em script kiddies attacking servers. By now it's not serving a purpose.
15:38lokienHow to use "and" on a vector? I have a vector of booleans
15:39luma(every? true? v)
15:40lokienwhat about "or"?
15:41luma(some true? v)
15:41lokienohh, I tried to use some?, that's why it didn't work
15:41lokienthanks
15:41luma(some? x) is (not (nil? x))
15:42lokiennot-empty? would be a better name, in my opinion
15:42lokienoh, it can be empty
15:43lokiennever mind
15:43lokien,(some? [])
15:43clojurebottrue
16:04danielglauserIs clojars down for other folks? Can't pull up the web interface and I'm having trouble pulling down deps too.
16:06featheredtoastdanielglauser: yeah, down for me currently too :(
16:08danielglauserI wonder if there's someone we should ping to be nice.
16:09TEttingerdanielglauser: linode is still being DDoSed
16:09TEttingerat least that's what I gathered
16:09featheredtoastthat'd do it then
16:09danielglauserTEttinger: Ah...that makes sense. Didn't know about that.
16:10danielglauserCurious, any idea why it's being DDoSed?
16:10TEttingerhttps://twitter.com/clojars
16:10danielglauserSweet, didn't know about that. Thanks!
16:11danielglauserLuckily I'm able to build the deps I'm looking for from source.
16:16TEttingerhttps://twitter.com/jonknee/status/682974714935947266
16:21TEttingerI wonder how big clojars is
16:34benjyz1clojars.org is down?
16:34benjyz1http://downforeveryoneorjustme.com/clojars.org
16:35MJB47may i suggest updating the topic?
16:37Trioxinfinally 1 clojure course makes it onto lynda
16:44jonathanjcan i map with an xform?
16:44archimedespilol, yeah, might want to just add "CLOJARS IS DOWN SINCE LINODE IS UNDER DDOS" to the beginning of the topic :)
16:44jonathanjlike (let [xf (comp (map get-foo) (filter bar?)) objs (map xf things)])
16:47jonathanji guess maybe that's just (sequence xf things)
17:03kenrestivoyikes, linode got piled on? yuck.
17:06mr-It might just be back (for now..)
17:10archimedespiit's been going up and down, linode is playing whack-a-mole with their various regions
17:20kenrestivothe couple client linodes i checked seem to be up
17:27gfredericksjustin_smith: who is the photo of?
17:27justin_smithgfredericks: the man who famously rejected resolution in music
17:28justin_smithArnold Shoenberg
17:28justin_smith(father of serialism, which rejects melodic movement, harmony, melody, etc.)
17:29gfredericksTIL
17:29gfredericksso he didn't want music to have any music in it
17:30justin_smith*schoenberg ftfm https://www.youtube.com/watch?v=A-fyWc6Mpd8
17:31justin_smithgfredericks: he claimed (right or wrong) music was possible without those things
17:31justin_smithabove link is a good example
17:33justin_smithgfredericks: anyway pun on new years resolution etc. etc.
17:40gfredericksright right
17:41justin_smithgfredericks: music theory has some wild fringes - I knew a guy ages ago who developed scales based on sets of frequencies that were all relatively prime (ensuring that no audible harmonics would line up between any two notes in the scale)
17:44justin_smithgfredericks: I'd compare schoenberg in music to the expressionists in painting - still very traditional in many ways, derived quite logically (all to logically) from the preceding craft, but crucially rejecting the expectation that the result be beautiful (at least by preceding standards)
17:45gfredericksmusic is a series of developments that were each the dennis rodman of the previous development
17:45justin_smithheh
17:48justin_smithgfredericks is the dennis rodman of declaring things are dennis rodmans of things
18:01gfredericksof course the main problem in this area is to figure out what michael jordan is the dennis rodman of
18:09randomcharheregood reference for beginning programing in clojure?
18:09justin_smithrandomcharhere: if you literally mean a reference sheet, check out http://conj.io
18:10randomcharhereprobaly bad choice of words not looking for a list of clojure cammonds more on basics of programming clojure
18:11randomcharheremost book/website been more of a list of commands and not about how to program in clojure
18:12daphrandomcharhere: Have you tried Clojure for the Brave and True? http://www.braveclojure.com/
18:12justin_smithrandomcharhere: there are a few good intros online- clojure for the brave and true and clojure from the ground up are two good examples
18:14randomcharherealready got repl installed and have a really basic understanding of clojure
18:16randomcharherehttp://www.braveclojure.com/ have to check out. What I'm looking for is more programing by example starting simple and getting more complicated
18:17randomcharheremost of what I've found is more along he lines of a list of commands and descriptions kinda like learning a languauge reading a dictioanry ...
19:53justin_smith,\ಾ
19:53clojurebot\ಾ
19:53rhg135yay for unicode!
19:53pontikiwhat is happening? netsplit?
19:54rhg135doesn't seem so
19:55rhg135usually it would say in the quit message
20:17calanyone here familiar with joplin? every command i run i get a message says that the migrations table already exists.
20:54tcrawleygfredericks: justin_smith: I've been giving some thought today on what it would take to have a turnkey clojars mirror. I'm writing up my thoughts now, and will post to the clojars-maintainers list tonight
20:54tcrawleyif'n y'all want to contribute to the discussion
20:55gfrederickstcrawley: cool
21:00zerokarmaleftdanielglauser: https://twitter.com/clojars/status/683010552608722944
21:00zerokarmaleftoops
21:01tcrawleyI think you just earned some karma back!
21:27justin_smithtcrawley: awesome!
21:45gfredericksI wonder if linode achieved two 9's of uptime in 2015
21:50daphtwo nines gives them a yearly downtime of 3 days and 15 hours. Depending on how you define 'downtime', they could still good on two nines, since it seems like some of their DCs have remained un-attacked.
22:57justin_smithdaph: but clojars specifically, hosted on linode, has had 10 hrs down just today
22:57tcrawleyclojars is up at the moment. get your deps while they are hot
23:07daphjustin_smith: true, I'm not debating that
23:51kenrestivofor i in `find . -type d`; do (cd $i; lein check); done