#clojure logs

2012-09-22

00:00LajjlaI feel I stay on roaches for too long, costs too much supply
00:00casionjust got off from playing, #1 in divison right now
00:00LajjlaBut I find the timing to tech to brood lords hard to estimate.
00:00LajjlaNot bad
00:00LajjlaI'm like #13 or something.
00:00LajjlaBut I'm playing only Zerg for a while because it's my weakest race, I will come to get you once I get my ZvP up to snuff.
00:01LajjlaI actually don't believe at all that ZvZ and PvP are 'coinflips', theyre just hard to understand.
00:01casionit's easy when you apply some common sense and programming skills ;)
00:01LajjlaFriend of mine is platinum league, I was watching her play a ZvZ, I can understand it feels like a coinflip if you don't have so much as overlords over the enemy's natural mineral line...
00:01casionI've been slowly coverting evo chamber over to clojure
00:02aperiodicman, starcraft...
00:02LajjlaOr don't run in with lings to see if enemy is still mining gas.
00:02Lajjlacasion, you were the person behind evo chamber?
00:02LajjlaI had no idea
00:02aperiodicwhat is evo chamber?
00:02casionone of two, yes
00:02LajjlaHonestly, I just randomly addressed a random person with something completely offtopic to see how they would react
00:02casiongenetic algorith for determining optimial build orders in starcraft 2
00:02Lajjlaaperiodic, genetic algorithm
00:02aperiodicooh, i've had that idea
00:02LajjlaWhere 'optima' means 'useless because it will die to anything and look extremely suspcisious'
00:02aperiodicglad someone actually did it!
00:03casionwe got write ups in a few major magazines
00:03casionit was neat
00:03casionno Lajjla
00:03casionyou need to learn to use waypoints in it
00:03LajjlaOh, that's fixed now/
00:03aperiodicdo you have an official site? it isn't ddg-ing well
00:03LajjlaWell, I haven't been keeping up with it.
00:03casionI don't know what the fuck works on the google code repo
00:03aperiodicah, found it
00:03luxbockcasion, that sounds really exciting, where can I read about that?
00:03LajjlaI typically don't know or use builds, they make some sense for T but very hard to pull of with P and Z
00:03casionscbuildorder is the best working one atm
00:04casionluxbock: search Evolution Chamber Build Order
00:04casionor just ask me questions directly
00:04casionlomilar did most of the base code, and I did a metric ton of optimization and feature implementation
00:05casionand since the repo died I've been slowly redoing it in clojure as I learn clojure and get time
00:05casionyeah, I played a lot of BW too :)
00:05Lajjlacasion, why?
00:05casionLajjla: why what?
00:06LajjlaWhy port it to clojure?
00:06casionconcurrency, and learning
00:06aperiodici didn't play as much as i followed the korean scene very closely
00:07LajjlaMost people seem to watch more SC than play.
00:07casionaperiodic: I still follow stuff closely
00:07casiontasteless still casting for gom
00:07LajjlaOne moment I don't play at all, then one week I'm pretty much grinding games, like now.
00:07LajjlaYeah
00:07casionflash probably the best SC2 players now
00:07casionplayer* (plural maybe appropriate lol)
00:07LajjlaProbably absolutely not.
00:07aperiodicdo you mean lee young ho, or is that a team now?
00:08LajjlaFlash has just switched.
00:08casionLajjla: he just qualified for GSJ...
00:08LajjlaNo, Lee Young Ho.
00:08casionand he did not lose a single game
00:08LajjlaSo do many startale B teamers
00:08luxbockRain looked scary good in his Code S games
00:08LajjlaQualifying without losing a single game is less impressive than it seems because only the last 2 rounds of the qualifier are typically versus really notable people
00:08aperiodiccasion: what is the fitness function for evo chamber?
00:08LajjlaRain looked very impressive.
00:09luxbockhe made playing protoss look much more entertaining as well
00:09casionaperiodic: it uses unit value, current resources, and a huge mutliplier for time
00:09luxbockmore multitasking and less deathballing
00:09aperiodiccasion: do you just simulate playing the game essentially as solitaire?
00:09LajjlaFlash beat two notable people in his qwualification, Horror and soO
00:09LajjlaApart from that beat one other teamless player and got one bye.
00:09ChongLiLee Jae Dong ftw!
00:09casionLajjla: there's more to it than just that
00:10LajjlaI don't think you can estimate 'best player probably' from that
00:10Lajjlacasion, what ore?
00:10casionjaedong was knocked out of code S and Code A
00:10casionaperiodic: no, you're only working with asingle player
00:10ChongLiyeah, I know
00:10casionLajjla: he's been playing practice games with IM and TSL
00:10LajjlaInori also didn't lose a single game qualifying for code A for instance
00:10ChongLiI'm liking Lee Seung Hyun at the moment
00:10ChongLihe's showing some strong play
00:10LajjlaInori next Zerg Bonjwa?
00:10ChongLifor a kid
00:11LajjlaOr 4B
00:11aperiodiccasion: how accurately do you have to model things like unit movement acceleration curves in order to get good signal?
00:11casionhwanni, IM coach and revival have said in interviews flash is extremely good
00:11LajjlaI wonder how much the result varies based on spawn point there.
00:11casionand they don't expect him to lose a single match, if game, in his first code A run
00:11aperiodiche is, you know, flash
00:12LajjlaWe'll see honestly.
00:12casionaperiodic: only for workers, and maynards
00:12LajjlaI believe everyone who makes such a proclamation about sC2 is being a bit foolish, because the game can be quite volatile.
00:12casionaperiodic: the version on the repo atm is fucked, but I have one I could push with complete worker simulation
00:12aperiodiccasion: word, nothing else is really relevant
00:12LajjlaI also don't 'expect' MMA or Mvp to do that, but in the end, it's possible that either will.
00:12aperiodiccasion: is the clojure code in a usable state?
00:12casionwhat's up there now just goes a very simple 'workers do X per X'
00:12casionaperiodic: not even close
00:13aperiodicaw, darn
00:13LajjlaAs Artosis basically caught himself saying 'Yeah, I keep saying all these guys are going to get back into code S no doubt, but I realize that I've already said that of more people that technically can get back into code S. It's just so stacked'
00:13casionaperiodic: I have a basic determinate BO optimizer for protoss kinda working
00:13casionit's missing significan things like chroho, warpgates, upgrades, accurate worker sim
00:14Lajjlaaperiodic, he is Flash, he may become the best SC2 player, but most certainly he isn't yet.
00:14casionright now I'm focusing most of my time on clj-audiofile… and speaking of that I should commit what I have locally tomorrow
00:14ChongLiLajjla: yeah, I always find it funny when he says that
00:14aperiodicLajjla: yeah, and think about where the BW metagame was at the equivalent point in its history. there's so much room left in the metagame (especially after expansions)
00:14ChongLithe standards for staying in code S are constantly increasing
00:14aperiodicLajjla: oh yeah, i'm probably biased because i started watching BW around the beginning of his reign
00:14LajjlaCase in point: Jaedong is almost as good as Flash at BW, if Flash isn't there, JD is named Bonjwa, but JD went out 0-2 in the GSL and then to an MVP-B teamer in the Ro48 of Code A
00:14casionLajjla: I think you miss something about korean culture
00:15casion'best' is simple who is winning, nothing more
00:15LajjlaYap
00:15casionthey operate on a meritocracy, 'best' has very little to do with overall skill
00:15LajjlaBut Flash isn't yet per se.
00:15LajjlaHe won his qualifier without losing a game, a lot more people like Inori and 4B did for instance
00:15casionand right now in practice, and in public, flash is losing very very little
00:15Lajjlawhich are not extremely remarkable players.
00:16casioniirc flash has only lost 1 game in OSL as well
00:16casionand he beat DRG in a korean showmatch
00:16LajjlaHe didn't lose to soO and HorroR, not sure if that counts at all to say he's the best player in the world right now.
00:16aperiodiccasion: can you set goals, like "i'm trying to make a lot of unit x ASAP, or i want to get to unit mixture 30% x 30% y 10% z w/50 units"?
00:16casionbut DRG is kinda slacking
00:16casionaperiodic: yes
00:16LajjlaSo didn't Polt, Polt isn't the best player in the world either.
00:16casionthat's call waypoints
00:16casionLajjla: <3 polt
00:16aperiodicah, got it
00:17LajjlaI'm pretty sure that if Flash wasn't Flash from BW no one would have said these things, he would be a good up and coming player and people would be interested, but that was it, no one would dare to call him the best player.
00:17LajjlaI like how Polt sort of showed Taeja how it was done versus Rain
00:17Lajjlahe didn't win, but like, Taeja can't split his army properly it seems
00:17casionaperiodic: you can't do unit mixturers by % exactly, but you can set manual waypoints for "I want n of X by this time" and have many many of those
00:17casionLajjla: taeja had been traveling
00:17LajjlaRain continually storm dropped him to death, Polt was like 'Okay, so I build turrets and leave marinse at home and suddenly I win because I am left with more than 7 scvs'
00:18Lajjlacasion, he shows this weakness in other games as well.
00:18aperiodicLajjla: which is not to say that being demonstrably the best player in the world at a closely related game is not a useful signal
00:18LajjlaHe's one of those Terrans which Artosis called 'addicted to orbitals', he just refuses to make a planetary, a bunker, turrets, any defence at home.
00:19Lajjlaaperiodic, how skill translates from BW to WoL is not that linear, the best KeSPA player at this point seems to be rain by a long shot.
00:19casionLajjla: like winning asus rog, all-killing IM, code S ro8 3 seasons in a row?
00:19casion:P
00:19muhoois there any workable way to compare equality of two nested maps in clojure?
00:19LajjlaWho couldn't compare to JAedong and Flash at any margin in BW. Jaedong went out in the first round, Rain has been looking extremely impressive.
00:19Lajjlacasion, indeed, but now a weakness in his play has been found and people are going to see if they can exploit it I guess.
00:20LajjlaRain's PvT is pretty darn sexy to be honest.
00:20aperiodicmuhoo: i don't understand. = should do the job
00:20casionof course it is, lim yo-hawn is his coach
00:20LajjlaAll his attacks have a reason it seems, to draw an army there to gain a position here etcera, and his storm drops are very effective.
00:21LajjlaI used to do storm drops a lot before I had my phoenix phase in which I've been stuck since forever now.
00:21aperiodicmuhoo: ##(= {:a {:b :c}, {:d :e} :f} {:a {:b :c}, {:d :e} :f})
00:21lazybot⇒ true
00:22muhooaperiodic: yep, that works, thanks. i must have something else broken, because two maps that should be equal, = says they aren't. probably my bad.
00:24LajjlaWhat is this, clojure instead of starcraft strategy?
00:24LajjlaAlso, well, Bisu
00:24Lajjlahe's not been doing too well in WoL
00:24LajjlaBut it could be argued that he wasn't doing to well in BW since MSL closed, ololololol.
00:24casionnew topic, DH valencia… winner?
00:24casionand who's over the grubby line
00:25LajjlaNot sure, I think making a praediction on who's going to win a tournament has a very low shot at accuracy honestly.
00:25SgeoMy computer is such a piece of garbage I'm scared to attempt to open Eclipse
00:25casionSgeo: 2gb ram… I wouldn't
00:25muhooaperiodic: aha! ##(= {"foo" "bar", "baz" {:quuz 99}} {"foo" "bar" "baz" {"quuz" 99}})
00:25lazybot⇒ false
00:26casionLajjla: I think you get a pretty good chance if you guess stephano
00:26Sgeo:(
00:26muhooi had a key instead of name
00:26aperiodicyup, that'll do it
00:26LajjlaBiggest shot is going to be Taeja, Stephano or HerO I guess
00:26LajjlaViOLet too of course
00:27LajjlaI guess ViOLet has the biggest shot at taking Stephano out though.
00:27LajjlaHe seems to have Stephano's number in some way
00:27casionI disagree
00:27casionhe beat stephano recently…
00:27casionand thusly stephano went and did nothing but practice zvz
00:27casionand then won wcs eu off it
00:27LajjlaWell, he beats Stephano in general, I don't think Stephano has ever won a series against him
00:28casionand: https://twitter.com/EGStephanoRC/status/244332444399054848
00:28LajjlaYeah, against Vortix, and losing the first set 1-2.
00:28LajjlaNot against ViOLeT
00:28muhoowat, #clojure has gone way OT
00:28LajjlaWell, Stephano's ZvZ isn't bad by any stretch even though it's his worst matchup, but ViOLet has amazing ZvZ and seems to perform even better than usual against Stephano
00:29casionLajjla: stephano is 2-3 in series against violet
00:29LajjlaREally?
00:29LajjlaWhat series did he win?
00:29casionyes
00:29LajjlaI thought he was 0-3
00:29casionred bull, IPL
00:29LajjlaAhh
00:29Lajjlawell
00:29LajjlaTHen I guess theyŕ e about even
00:29casionand he lost MLG 1-4, and onog 2-3
00:30casionoverall record in games is 8-9
00:30LajjlaHe also lost to him at an MLG arena right?
00:30LajjlaOr was that Symbol?
00:30casionyes
00:30casion0-3 at mlg
00:30LajjlaWell, I guess I count the extended sereis at the MLG championship as 2 series.
00:31LajjlaSeriously, extended series rule, I don't think there's anyone who likes it except Lee Nelson
00:31casionI like it :|
00:31casionwithout it, double elim makes no sense
00:31casionround robin is crap for games, swiss is awful, single-elim is no fun to watch
00:32casiondouble elim is the best for spectators and gives a good representation of current playing level in results
00:32LajjlaMLG is the only double elin tournament ever in the world that uses it.
00:32casionand for DE you need extended series
00:32LajjlaYou don't?
00:32LajjlaWhy would you need it.
00:32casionextended series doesn't just mean carrying over results
00:32LajjlaMLG pretty much invented extended series
00:32LajjlaIt does in the MLG case
00:32casionI don't know why people mis-appropriate that term :|
00:32LajjlaExtended series can be argued to in fact remove it from being double elim
00:33LajjlaBecause there's no longer the rule 'if you lose 2 series, you are out, you get 1 life'
00:34LajjlaLike basically, if you meet someone again in the lower bracket and you lose to him say 4-2 in that form, you have lost _one_ series in that sense, you are out even though you lost one, he lost no series at all at that point, so why doesn't he go back to the upper bracket?
00:34Lajjlacasion, are you sure you know how MLG applies ext. series? As in, it's not just reserved to the finals, you know that right?
00:34Lajjla(and technically, what could happen is that the person coming from the lower bracket into the finals gets an extended series in his favour)
00:35casionI'm not sure why you're talking about MLG, extended series does not explicitly require carry-over results
00:36casionif you're talking about that call it the mlg system, or carryover
00:36Lajjlacasion, well, this is the 'MLG extended series' rule, which no one likes
00:36LajjlaYou know how that works right?
00:36casionnot for sc2, it's not very good there I agree
00:37LajjlaIt's never good, it just randomly hands out advantages based on bracket luck
00:37casionfor FG and halo it works OK
00:37casionmore so for FG
00:37LajjlaAs in, if you happen to meet the person in the lower bracket you knocked down to the lower bracket yourself, purely by bracket luck, you start of with an advantage, otherwise you start even.
00:37LajjlaAs in, last Arena, STephano beats Ryung so Oz starts of 2-1 against Stephano, had Ryung beaten Stephano, Oz would start 0-0 against Ryung
00:38casionbrackets don't always work that way, in some tournaments (like some FG tourneys), brackets are manually balanced
00:38casionand some events let competitors choose their own brackets
00:38casionwhich actually ends up working remarkable well
00:38LajjlaPretty silly, it's outside of Oz' control entirely, but if Stephano wins he gets that advantage, otherwise he doesn't.
00:38casionmostly due to the culture I think
00:38LajjlaIn the end, there's still an element of bracket luck of who beats whom.
00:38LajjlaIn any case, there can most certainly be double elmin without any form of extended series and most tournaments don't use it.
00:39LajjlaThey just say in the final that the winner's bracket finalist has to only win one series, lower bracket finalist has to win 2
00:39LajjlaWhich makes every bit of sense in the idea that everyone gets 1 life, the person coming from the lower bracket has already lost his life, the person from the upper didn't so he still has one life.
00:39casioneveryone gets 2 lives
00:40LajjlaDepends on definition of 'life'
00:40LajjlaIn mario, if you have 1 life, that means you're game over if you die 2 times from there
00:41casionspeaking of mario, I just finished new super mario bros 2 today
00:41casionit was fun
00:41LajjlaThere's a remake or something?
00:42casionno, new game for 3ds
00:42LajjlaI don't know, IO always thought sonic was better than mario in basically every way.
00:42casionI agree 100%
00:42LajjlaYeah
00:42casionhowever, my mother decided to buy me a 3ds...
00:42Lajjlathe level design is less of a line, more of a square.
00:42casionwhich was awkward but very appreciated
00:42LajjlaAnd they tend to have so many more routes.
00:42casion30 year old guy sitting at a christmas party with a nintendo handheld lol
00:46uvtcI'm using clojure.java.shell/sh with a little test script. It works for me in the repl, but when running my program via `lein run`, I'm not seeing the output to stdout.
00:48uvtcIn my `-main` I've got a `(println "hi")`, the call to shell out `(shell/sh "tester.sh" "hi")`, then `(println "bye")`. I get the first "hi" and the last "bye", but nothing in between...
00:50casionwhat if you print the map returned by shell/sh
00:51uvtcAh. Good idea, casion. I get the output now.
00:51uvtcIncidentally, the test script sleeps for 3 seconds.
00:52uvtcAh. Wait. The clojure program prints out the map. The script's output goes into the value for :out in that map.
00:53casionyou can just do (:out (shell/sh blah)) can't you?
00:54uvtcYes. That works. Thanks.
00:55uvtcI'd expected shell/sh to take std while it was running.
00:55uvtcIs there any way to babysit shell/sh? Sit there and block until it finishes?
00:56casionif you have to wait for it to finish, I don't know what else you could do
00:59Raynesuvtc: I have a library for that.
00:59Raynesuvtc: https://github.com/Raynes/conch
00:59Raynesuvtc: It is designed for babysitting processes. I'm also writing an interface similar to that Python 'sh' library.
00:59casionoh cool rayne, I could use this
00:59casionthanks
01:00RaynesThat isn't insane like the one that was posted earlier today.
01:01uvtcI was trying to test to see if `(shell/sh ...)` blocks... The examples for it at clojuredocs mention it uses futures, so I'd assumed that it does not block.
01:01RaynesIt uses futures internally.
01:01RaynesIt doesn't return a future.
01:01uvtcRight.
01:02uvtcOh. I noticed it uses futures internally.
01:02uvtcBut I see that you're correct. Of course it's not returning a future.
01:02Raynesclojure.shell is really good for the limited things it can do, but I prefer conch in most cases. Once that sh-like interface is written, it'll be teh awesomeness.
01:03uvtcWell, after making a few tests, it seems to do things in order, and doesn't just spawn my script a bunch of times all at the same time.
01:03iDesperadOis there any function that call tell and relation in a collection of value like (true false true ...)
01:04uvtcRaynes: I don't have needs at the moment beyond just doing `(apply shell/sh a-bunch-of-args)`. Will take a look at conch at some point. Thanks.
01:04iDesperadOin another way, is there any clojure function that tell me about the final truth of AND/OR/XOR of a collection of values?
01:06iDesperadOah...sorry and macro is exactly my want
01:07iDesperadO...
01:07iDesperadO,(and '(true false))
01:07clojurebot(true false)
01:10iDesperadOit seems every is my want
01:10iDesperadO,(every? true? '(true false))
01:10clojurebotfalse
01:44SgeoiDesperadO, note that there's an identity function
01:45Sgeo,(every? identity '(true 5 "hi"))
01:45clojurebottrue
01:45Sgeo,(every? identity '(true 5 "hi" nil))
01:45clojurebotfalse
01:45SgeoWhich lets you do it based on the truthiness of the values
01:45Sgeo(In this case. identity may be useful elsewhere)
01:53lanastasovhi
01:54uvtchi, lanastasov .
01:59lanastasovI just wonder. So many people and no one is writing
02:00rbxbx'ello
02:02lanastasovI have used only the repl. lein repl
02:03lanastasovhow do I run some saved files
02:03lanastasovI know there is (load-file 'file.clj")
02:03lanastasovI know there is (load-file "file.clj")
02:04tomojlein help run
02:06lanastasovlein run
02:06clojurebotupgrading to leiningen 2 is easy with this handy upgrade guide: https://github.com/technomancy/leiningen/wiki/Upgrading
02:10uvtclanastasov: you can run standalone clojure files using the lein exec plug-in: https://github.com/kumarshantanu/lein-exec
02:11uvtclanastasov: I wrote up a brief beginner's guide that you might find useful: http://www.unexpected-vortices.com/clojure/brief-beginners-guide/
02:14lanastasovthx for the guide
02:14uvtcy/w :)
02:36Rayneslanastasov: It is late in the USA.
02:38lanastasov9:30 am here
02:38shokyisrael?
02:38lanastasoveurope
02:39shokyturkey
02:41lanastasovbulgaria
02:41shokyneato
10:28ifesdjeenmpenet: just for a record, it's me (ifesdjeen on twi)
10:33mpenetifesdjeen: noted :)
10:34mpenetifesdjeen: I can't really talk right now (the lady would kill me), but feel free to hit my email or pm/dm if you have questions
10:35ifesdjeenmpenet: absolutely. thanks for hitting ground, hope it would bring to some productive collaboration, have a nice weekend!
10:37mpenetifesdjeen: Thanks, you too! I am certain it will.
10:37ifesdjeenkk
12:31devn_,(let [my-atom (atom {:0 1})] (:0 my-atom))
12:31clojurebotnil
12:32devn_,(let [my-atom (atom {:0 1})] (:0 @my-atom))
12:32clojurebot1
12:32devn_Does that make sense?
12:32devn_Could someone explain?
12:36metellus,(map class (atom {:0 1}) @(atom {:0 1}))
12:36clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Atom>
12:36metellus,(map class [(atom {:0 1}) @(atom {:0 1})])
12:36clojurebot(clojure.lang.Atom clojure.lang.PersistentArrayMap)
12:37metellusmy-atom is a reference to a map, not a map
12:48devnmetellus: yeah, i guess i understand they're different, just wondering if that behavior made sense for an atom
12:48devnmetellus: is that behavior similar elsewhere?
12:49devn,(:a (ref {:a 1}))
12:49clojurebotnil
12:49devnshort answer: yes. :)
12:49devni guess i sort of expected it to get angry with me
12:50devnbut no, nevermind...
12:50devn,(:a '100 23)
12:50clojurebot23
12:50metellus,(:a '100)
12:50clojurebotnil
12:50devn*nod*
12:51devnwas just playing to see that it returned "not-found" for refs and atoms as well
12:51devn,(:a '100 "not-found")
12:51clojurebot"not-found"
12:51devn,(:a (atom []) "not-found")
12:51clojurebot"not-found"
12:52metellus,(:a {:a 1 :b 2} "not-found")
12:52clojurebot1
12:54metellusI didn't realize you could specify a default for get
12:54devni didnt either honestly until the other day when someone wrote that in here
12:55devnit's very clever and im not sure how i like it -- err i mean, i guess i knew you could specify not-found for get, but not when using the kw as the fn
12:55devn(:a {:b 'q} 43) is handy, just not sure I like the way it reads in practice
12:55gfredericks,(:a (atom {:a 2}))
12:55clojurebotnil
12:56gfredericks,(:a 38)
12:56clojurebotnil
12:56devngfredericks: im jealous
12:56gfredericksdevn: crap!
12:58gfrederickswell go to the conj and then I'll be jealous and we'll be even
12:58devni am! :)
12:58devnenjoy
13:04devnanyone have overtone skills? experience with TouchOSC?
13:05devnI'm trying to figure out if I can ask TouchOSC about the value of a path
13:07casiondevn: PM me, I can help
13:07casionI've tone a few complex templates with supercollider and touchosc, but it's a bit off-topic here
13:08casiontone=done
14:31ivan*** Some tests failed ***
14:35ivanoh, yes, Windows with its \r\n breaks the new pprint tests
15:05Hodappoddball observation that makes me want to use Lisp more: I don't have to deal with the question of whether I'm turning something into a scene graph, or into API calls that visualize it.
15:05HodappI can make it generate a scene graph that is executable.
15:14Hodapphow evil is 'eval' considered?
15:17amalloyif you're not implementing a clojure repl, eval is probably wrong
15:21gtrakbooooo
15:21Hodappright now, I'm transforming some input (basically just a tree) eventually into a graphical output and I am looking for ways to target different backends for this
15:21HodappI know how I'd do it in OOP fairly well, but I'd rather not shoehorn that mess into here
15:22antares_Hodapp: you can use polymorphic functions with protocols or multimethods
15:39davidbehi, I'm trying out some clojure. It's going pretty well, but (I guess) the lack of Java-knowledge (or jvm-knowledge) is bugging me. What am I doing wrong? http://pastebin.com/TUDmic62
15:40davidbeI want to use lobos on h2-database, but with this code (paste split in three parts), I get a FileNotFoundException, but I've no idea what to do
15:40davidbethe h2-database gets created in ./db/
15:42davidbeand the file not found was the lobos - h2 - backend
15:46antares_davidbe: the file not found was h2:file.clj
15:46antares_and there is no such file in the lobos codebase
15:46antares_:subprotocol "h2:file" probably has to be :subprotocol "h2"
15:46xeqidavidbe: try :subprotocol "h2"
15:47davidbeantares_, xeqi : ok, I'll try that out
15:48davidbeantares_, xeqi : the repl gave no error :) - now checking out db
16:16davidbexeqi, it worked! thanks!
16:40mpanI have a problem which looks oddly like tree traversal/modification; is this a good use-case for zippers?
16:42mpanalso, is it supposed to be that fns don't compare for equality in the expected way?
16:43mpanas in ##(= #(+ 1 %) #(+ 1 %))
16:43lazybot⇒ false
16:44metelluswhat would be the expected way?
16:45metellus,(= + +)
16:45clojurebottrue
16:45SgeoIn theory, there's no way to determine that two functions do the same exact thing
16:45aperiodicmpan: depends on what sort of modifications. i get a lot of mileage out of straightforward functions that recurse over the tree, but if i find myself wanting to talk about siblings or grandparent nodes then i reach for zippers
16:45metellusexcept exhaustively testing every input
16:46Sgeometellus, there's a countably infinite number of inputs.
16:46SgeoIf the two functions are the same, the comparision will never halt
16:46mpanSgeo, if they were black boxes, but don't we have the internal repr of the fn from when it was built?
16:46metellusin Clojure, sure
16:47metellusin something with a type system, sometimes there are finite inputs
16:47mpanaperiodic, like what I want to do is evolve trees of operators representing some weird complicated computation
16:48mpanlike, I would have expected ##(#(+ 1 %)) to compile to the same thing both times
16:48lazybotclojure.lang.ArityException: Wrong number of args (0) passed to: sandbox64117$eval99507$fn
16:48Sgeompan, how do you determine if two different internal representations do the same thing or not?
16:48aperiodicmpan: how exactly do you want to change the trees at each mutation step?
16:48mpansorry, I didn't mean "do the same thing"
16:48mpanI meant "were defined with the same source"
16:49mpanaperiodic: I dunno; that's the hard question
16:49SgeoI think there's an evolutionary algorithm thing for Clojure
16:50mpanI think the assignment is to write my own
16:50Sgeohttps://github.com/lspector/Clojush
16:50SgeoOh
16:50mpanthey were a bit vague but still
16:50mpanthe other question related to this assignment: anyone know a good library to plot implicit eqns?
16:50mpanas in, f(x, y) = 0
16:50cgagis it not possible to see if two functions compile to the same byte code ors omething along those lines?
16:51SgeoYou could always make a macro to take the place of fn or defn that stores the code as metadata or something
16:51mpancgag, I would have expected = to have the semantics of "came from the same source code" but I suppose that's not what it does
16:51metellusit's possible but that doesn't seem like a great test for equality to me
16:51aperiodicmpan: you might be able to hack something together with serializible-fn, by comparing the source that saves in the metadata, but who knows if that source makes any effort to conform to the equality classes you'd expect (hey technomancy, is this an awful idea?)
16:52mpanaperiodic: sounds like I'd rather just use keywords and double parameters, and pick out a fn from a lookup table at the moment I actually need to eval
16:52cgagmetellus, agreed, that was his expected way though, i was just wondering if there was any reason it couldn't work that way
16:52grettkeWhat is the correct way to shutdown the nREPL instance before exiting emacs?
16:53aperiodicmpan: if you want to step through the tree, look at each node, and make a decision to modify that node based on the same relative structure to each node, then zippers would work nicely
16:53michaelr525hey
16:53aperiodicmpan: that is a much better way to get what you want
16:54mpanwhat if I wanted to select a nonterminal according to some probability?
16:54aperiodicmpan: at each step in the traversal you can ask if it's a nonterminal, and if so, move to the next node in the traversal with some probability
16:55mpanthe thing is, each subtree may be severely imbalanced, and I would like to assign probabilities to nonterminal nodes
16:55mpanor do you mean, traverse the tree to get a flat repr and select from that?
16:56aperiodicthe traversal is essentially flat, yeah
16:56mpanthat sounds cool
16:56mpanthanks for the idea!
16:56aperiodicsure thing
16:59Sgeo,(require 'clojure.core.logic)
16:59clojurebot#<RuntimeException java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/core/logic__init.class or clojure/core/logic.clj on classpath: >
16:59SgeoAww
17:00casionusing zippers for managing trees in GA…
17:00casionthat sounds fun
17:00mpanfor which definition of fun?
17:01casionI guess my own warped defitinion?
17:01casionexcept not mistyped
17:01mpanbecause, I swear, my classmates use "sounds fun" as a code word for "you're f---ed"
17:01casionI meant I'm going to mess with that this evening, it sounds very useful
17:02mpancool
17:02mpanI dunno how I can generate visualizations though
17:02mpanlike I could write a great algo and I'd never realize it
17:03casionright now I keep a map of leaves
17:03casionso I have a separate data structure that gives me terminal nodes and their parent's location
17:04casionI thought it was kind of clever… which always leads me to think it's probably wrong :)
17:04mpanI mean, matlab has what I want
17:04mpanbut I can't even shell out to matlab
17:04mpanI'd have to use text files and sneakernet
17:05casionisn't there an octave package somewhere?
17:05mpanoh damn, octave has it
17:05mpannice
17:05casion:)
17:05mpannice catch
17:06mpanstill nontrivial, but at least it's localized to one machine now
17:06casionaperiodic: I'm dealing with contextual fitness :(
17:07mpanwhat about some xform of fitness rank?
17:07aperiodicin that you need an opponent's build order in order to define the fitness?
17:07mpanfor my previous project in this class, I did exponential-decay-with-rank
17:07mpanwait, are you optimizing starcraft build-orders?
17:07casionyes
17:07mpanwhoo
17:07casionaperiodic: I'm trying to allow the user to 'fuzzy match' based on resources
17:07mpanthat's one of the things that got me into the field
17:08casionmpan: evo chamber?
17:08mpanwell, the hype surrounding it
17:08casionahaha ;)
17:08casionwell neat
17:08mpanfrom the human player perspective, that is a scary build to see
17:09casionaperiodic: so all absolute fitness is relative to any other build generated that may have generated more resources
17:09mpanhow do you define a "fuzzy match"?
17:09casionI can't use time as a massive fitness multiplier to give a near absolute goal anymore like was done in evo chamber
17:09mpansounds like you may be able to have an absolute fitness nonetheless
17:10mpanif you just have a tradeoff between resource goal satisfaction vs time
17:10casionmpan: from the user's perspective they can ask essentially 'give me a build order that's fast… or gives me X resources weighted against the fastest build's time'
17:10casionI had that sort of working in evo chamber with worker production constraints
17:10mpanas in "a build order that achieves given goal G"?
17:10casionbut it was sloppy
17:11mpanbut add in "and allow extra time if I can get resources X"?
17:11casionmpan: the goal is weighted against the fastest generated build
17:11mpancasion: is that necessary though?
17:11casionso in that case, all fitness becomes relative to the nodes with the fastest times
17:11casionyes
17:12mpanI mean, there's a similar metric of just penalizing time in general?
17:12casionin game context, a player may want to ask 'give me the fastest time to 32 drones'… but there maybe a build that's just over the horizon which is better in the long term
17:12mpanand the fastest naturally win that metric, because everything scoring even better gets penalized for feasibility
17:13casionto deal with that and not explicitly require going over the horizon, you can weigh against earned and potentially earned resources
17:14mpanI had an idea but I think it degenerates
17:14casionmore or less just trying to deal with the horizon effect creeping in… which is weird I guess
17:15mpanbecause my idea would almost always answer "fast build that satisfies minimum" or "keep building indefinitely until food cap"
17:15casionyeah
17:15Hodapphmm, are deftype and defrecord fairly well the same if I've no interest in mutable fields?
17:15mpanHodapp: someone showed me http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ the other day
17:16mpancasion: also, fastest time to 32 drones is solvable greedily
17:16mpanit's only when you introduce military vs economy tradeoffs that it becomes a difficult problem
17:17casionmpan: yes, but the problem is that the user is not asking the question they want answered
17:17mpanhm?
17:17Hodappmpan: Hmm, thanks
17:18Hodapphowever I'm stuck at the diamond between deftype and defrecord along the top path because I'm not sure what I want, hah
17:18mpanit's possible you may be happy with both in a given use case
17:18mpanwith either*
17:18casionmpan: I'm trying to take into account that when a user asks for anything regarding economy (drones for instance), they likely want the most economic build, not the fastest time...
17:19dnolenHodapp: defrecord is easier to use since it implements a bunch of things out of the box.
17:19mpandefine "most economic build"
17:19dnolenHodapp: deftype comes w/ very little.
17:19casionmpan: you can't without very explicit goals… that's exactly the problem I'm trying to solve
17:19HodappI suppose I'll use defrecord and just see how things go
17:21casionmpan: let's take something like the user asking for 2 hatch, 48 drones. This is constrained by the game to be a bad request due to saturation limits. So I want the user to have a default option that allows weighing resources against time
17:22casionit would ideally return a slower 3 hatch build that has a weighted fitness greater than the fastest 2 hatch build
17:22mpancasion: that sounds like you're getting deep into domain knowledge as well as situational decisions
17:22casionbut not fail slow if they asked for 44 drones (which is ideal)
17:23casionmpan: yes, but I'm trying to solve it in a more general way
17:23casionwhich maybe a mistake? but it seems worth trying
17:23mpanlet me ask you, as a player: why is 2 hatch 48 drone bad?
17:23casionmaximum saturation occurs at 22 workers per base
17:23mpansadly the answer is domain knowledge
17:23casionyes
17:24mpantaking that to the extreme
17:24mpanrequires not just game knowledge but metagame knowledge
17:24mpanI mean, would you consider 14cc to be "bad"?
17:25casionwe're getting out of clojure land… should probably move channels or PM :)
17:25mpanoops
17:25mpansorry, I was just trying to give a concrete example
17:25mpanof why I feel like you're stepping into "encoding domain knowledge" land
17:25mpanif you want to continue in PM that would be fine
17:26casionlast 2 times this came up I had requestes to spam the channel with it when it goes out into general discussion
17:26casionto NOT spam* haha :)
17:26mpanaha
17:28SgeoHmm, Delay is implemented in Java. Any particular reason?
17:28SgeoMore efficient I guess?
17:39SgeoI'm sure I've asked, but what does the :static metadata do?
17:40dnolenSgeo: nothing anymore
17:41raek_I think it was used in some development version between clojure 1.2 and 1.3
17:41Sgeoo.O what did it used to do?
17:41SgeoBecause I still see it in the Clojure source on Github
17:41raek_I think it did what :dynamic now inhibits
17:42SgeoWait, :dynamic inhibits rather than allows?
17:43SgeoAnd I still don't understand why arglists is metadata on a var rather than the fn
17:43RaynesSgeo: He is saying that the normal state of vars is to be static, and dynamic makes them… dynamic and no longer static.
17:44raek_what Raynes said... :)
17:45SgeoHmm, butlast isn't lazy
17:45Sgeo?
17:46RaynesSgeo: See drop-last.
17:46Raynes&(drop-last [1 2 3 4])
17:46lazybot⇒ (1 2 3)
17:46RaynesAnd is lazy.
17:46RaynesWhy both versions exist is beyond my realm of expertise.
17:47SgeoCan I claim that no Clojure functions are lazy (erm, technically, that they're all strict) because for any Clojure function f, (f (throw (Exception. "_|_"))) throws an exception?
17:49raek_Sgeo: the laziness is not in the function application.
17:50raek_only sequences can be lazy and such a sequence is made using the 'lazy-seq' macro
17:51raek_,(first (lazy-seq (cons 1 (lazy-seq (throw (Exception. "_|_"))))))
17:52clojurebot1
17:53Sgeo,((fn [&env] &env))
17:53clojurebot#<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: sandbox$eval57$fn>
17:53Sgeo,((fn [&env] &env) 5)
17:53clojurebot5
17:53SgeoBlah?
17:54raek_&env only has special meaning in macros
17:54lazybotjava.lang.RuntimeException: Unable to resolve symbol: env in this context
17:54Sgeo,(macrolet [(getenv [&env] env)] (getenv))
17:54clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: macrolet in this context, compiling:(NO_SOURCE_PATH:0)>
17:55Sgeo,(use 'clojure.tools.macros)
17:55clojurebot#<RuntimeException java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/tools/macros__init.class or clojure/tools/macros.clj on classpath: >
17:55ScriptorSgeo: for lazy function application you'd use delay
17:55Sgeo,(use 'clojure.tools.macro)
17:55clojurebot#<RuntimeException java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/tools/macro__init.class or clojure/tools/macro.clj on classpath: >
17:55Goshis there a way to check if loading a namespace was successful?
17:55Scriptorwhich is basically a fancy way to wrap something in an anonymous function
17:55Sgeo&(use 'clojure.tools.macro)
17:55lazybot⇒ nil
17:55Sgeo&(macrolet [(getenv [&env] env)] (getenv))
17:55lazybotjava.lang.RuntimeException: Unable to resolve symbol: env in this context
17:56Sgeo&(macrolet [(getenv [&env] &env)] (getenv))
17:56lazybotclojure.lang.ArityException: Wrong number of args (-2) passed to: sandbox64117$eval99553$getenv
17:56Sgeo...-2?
18:00Sgeo&(macrolet [(getenv [] &env)] (getenv))
18:00lazybotjava.lang.RuntimeException: Unable to resolve symbol: &env in this context
18:02SgeoWhat am I missing here?
18:02Sgeo&(macrolet [(getenv [&env] &env)] (getenv 5))
18:02lazybot⇒ 5
18:03Sgeo:/
18:03Goshdoes anyone use maven?
18:10FrozenlockIs there a more idiomatic way to get back data from the local storage than using cljs.reader/read-string?
18:18SgeoI'm going to go ahead and start using Notepad++ to write simple Clojure stuff, because so far one of the more off-putting things about Clojure is that I still don't have a workable environment. If I can... survive with Notepad++ in other languages, why not Clojure?
18:20mpanthe ability to eval an expr from a part of a file into a repl is very convenient
18:20mpanidk how you want to replicate that
18:22SgeoHmm, yeah, especially considering that that's one of the reasons I'm moving away from Haskell (the other is easy macros)
18:23mpanif you find something convenient and graphically-oriented, I'd love to know about it
18:24SegFaultAXSgeo: Are vim or emacs (or even light table) not good enough?
18:24Sgeonrepl.el and clojure-mode don't seem to put menus in Emacs, implying that I'd have to memorize the relevent keybindings
18:25SgeoNever used vim except when I had to in class
18:25SgeoI was under the impression that light table isn't really production ready yet
18:25mpanyea I'd personally prefer something more graphical and mouse-based
18:25xeqiemacs w/ counterclockwise?
18:26xeqiblah
18:26xeqi* eclipse w/ clounterclockwise
18:26sunkencityrylehdoes any of the vim plugs work with nrepl?
18:26SgeoI'm on 2GB of RAM, and stuff has a tendency to freeze and crash
18:27SegFaultAXsunkencityryleh: vimclojure+nailgun is a sweet combo.
18:29mpenetSgeo: if you need menus you could use clojure-mode with slime
18:30SegFaultAXI didn't know emacs had menus.
18:30sunkencityrylehSegFaultAX: I tried vimclojure and nailgun and it was sort of ok, but some stuff felt a little weird to me, I'd prefer something very similar to slime
18:30Sgeompenet, is that more difficult to set up than nrepl.el?
18:31SegFaultAXI should clarify that I'm a vim user. I've used emacs for less than 10 hours in my entire life.
18:31mpenetSegFaultAX: almost nobody uses them but you can have them from a gtk setup if you run menu-mode or somethign
18:31sunkencityrylehit kept moving windows around and popping new windows etc
18:31mpenetSgeo: yes, kind of
18:31Sgeo:/
18:32mpenetSgeo: if I was you I would just learn the half dozen useful shortcuts instead
18:32mpenetand be done with it
18:32mpenetI mean to use nrepl/clojure-mode, then spend the next 10 years learning more and loving emacs
18:34SegFaultAXI just assumed all the hardcore emacs users used keyboard shortcuts for /everything/
18:35SgeoWho said I was hardcore?
18:35Iceland_jackSegFaultAX: sometimes the menu is nice to get an overview of the most "important" commands for new modes
18:35SegFaultAXIceland_jack: Don't all emacs plugins come with online documentation though?
18:35SgeoI know the keyboard shortcuts for saving, loading, closing, what M-x is, new windows, close windows, switch windows, and that's pretty much it
18:35mpenetSegFaultAX: or when you kb config is borked for whatever reason (foreign layout)
18:36Iceland_jackSegFaultAX: They do, sometimes it's nice to get a nice overview of though
18:36Iceland_jackI sometimes use it for agda-mode since I can't for the life of me remember all those whacky commands
18:36mpenetSgeo: just grab a started kit, such as technomancy's and you can go from there. it is really worth the effort
18:36mpenetstarter*
18:37SgeoI already have emacs installed (from the website), how will the starter interfere?
18:37SegFaultAXIceland_jack: Oh yea, that's pretty useful!
18:37SgeoI think I have too many Emacs copies on this system
18:37SegFaultAXSgeo: It's probably just a bunch of additional configuration.
18:37zoldarSegFaultAX: unless you're doing something extremely fancy with vim, viper-mode is quite a decent substitude in emacs environment. I was using it along slime/swank as well as nrepl without problems. I don't even remember basic emacs key combos :]
18:37SegFaultAXSgeo: Really though, it would behoove you to really learn one of the standard *nix editors.
18:38SegFaultAXzoldar: It's better than the inverse: vile. :)
18:39mpenetSgeo: it is an investement that will probably be usefull for you whole career, emacs/vim aren't likely to disapear anytime soon and are constantly improved
18:39zoldarSegFaultAX: from what I see, that's a completely separate, hybrid-like editor
18:40SegFaultAXI've never worked on a nix machine that didn't have some form of vi. Emacs is common enough, but also generally easy to get from repos if it's not already available.
18:40Scriptoris there any integration of viper-mode with paredit?
18:41zoldarSgeo: and most popular IDEs have support/emulation for either emacs or vim or both in terms of behavior and key bindings
18:41zoldarScriptor: for me it just worked without any additional fiddling
18:41SegFaultAXvi bindings are considerably more rare than emacs bindings, though.
18:41SegFaultAXvi being a modal editor, and all.
18:42Rayneszoldar: Why not evil-mode?
18:42mpenetemacs bindings are also used in terminals, also almost everywhere on osx I believe
18:42mpenetwell, at least some of them
18:42SegFaultAXmpenet: bash is set to emacs mode by default on most systems, but can be toggled to vi mode.
18:42zoldarSegFaultAX: true, hovewer in most cases there are some third party additions at least that attempt supporting it
18:42SegFaultAXzoldar: Yup.
18:42mpenetSegFaultAX: oh, I didn't know
18:43zoldarRaynes: didn't know about this one, thanks!
18:43Rayneszoldar: I've been using evil-mode for a long time. It's pretty great.
18:44ToxicFrogevil-mode?
18:44SegFaultAXSgeo: But as others have said, even if emacs or vim doesn't become your main editor, having a good working knowledge of either or both of them is incredibily beneficial.
18:44RaynesIt's the successor of all previous vi-emulation modes.
18:44SgeoWhat I listed doesn't count as good working knowledge?
18:44RaynesI got into both Emacs and Vim.
18:44SegFaultAXSgeo: That's tutorial page 1 knowledge.
18:45ToxicFrogMy experiences with emacs have indicated that it would be amazing if I were willing to spend more time editing my editor than editing my code, but I'm not. :/
18:45RaynesFWIW, I haven't touched my configuration in a good 2 months.
18:45RaynesAnd then it was to add a new plugin.
18:46SegFaultAXSame
18:46mpenetidem
18:46SegFaultAXhttps://github.com/SegFaultAX/vim-dotfiles
18:46SegFaultAXYou'll notice almost all the action is in bundle/ which is my plugin directory.
18:47hoover_dammin my experience people care too much about their editors and how they look
18:47ToxicFrogvim I haven't used in much longer than emacs. Possibly I should give it another try at some point.
18:47zoldarthat reminds what a mess my emacs configuration is and that I should eventually do something with it but well...
18:47SegFaultAXhoover_damm: It becomes an obsession, I'll admit. :)
18:47ToxicFrogOf late I've just been using IDEA, which is nice if you have 2-3GB of free memory.
18:47hoover_dammSegFaultAX, then curb it
18:47SegFaultAXhoover_damm: Why?
18:48hoover_dammSegFaultAX, well obsession is bad... having a passion is good follow it
18:48SegFaultAXhoover_damm: I enjoy it and I feel it makes me more productive. What difference does it make?
18:48SegFaultAXhoover_damm: Don't be pedantic, you know what I meant. I enjoy tuning up my editor, is all.
18:49devnheh zoldar -- dont waste any time on your emacs config
18:49hoover_dammmost people tweek and tune their editor before they understand what they're tuning
18:49devnive been there too many times now. just make a mess and keep working
18:49hoover_dammor what they hope to achieve
18:49ScriptorI'm still on a quest to be good at both
18:49casionhoover_damm: people do that do everything
18:49hoover_dammindeed they do
18:49Scriptorif people can master different instruments, why not editors?
18:50hfaafb_Are editors instruments?
18:50hoover_dammif you master an editor, and it changes... are you still a master?
18:50hfaafb_Or tools...
18:50SegFaultAXhfaafb_: What's the difference?
18:50Scriptorhfaafb_: in this case, it's about the application of muscle memory, I think
18:50RaynesThey are toolstruments.
18:50mpenetnice
18:50SegFaultAX(inc Raynes)
18:50lazybot⇒ 18
18:51devni use vim and emacs. im fairly mediocre at both. i can write elisp way better than I can write vimscript (pukes blood)
18:52Raynesdevn: You and I are like hybrid werewolves and vampires.
18:52devnvim for ruby and rails because, well, the plugin support is just 10x better
18:52SegFaultAXdevn: In fairness, vimscript is a remarkably ugly language.
18:52devnemacs for pretty much everything else
18:52devnvim pukes on big files, emacs has no trouble, etc.
18:53devnRaynes: i howl at the moon in elisp
18:53hoover_dammdevn, I've been using unix for over 20 years... started with ed, learned vi, progressed to vim... learned emacs
18:53RaynesYou're old.
18:53hoover_dammdevn, it's better to have a good general skill level and then build up in most things
18:53SegFaultAXhoover_damm: Then you'll appreciate this: http://www.gnu.org/fun/jokes/ed-msg.html
18:53hoover_dammdevn, that way when things change it's easier to adapt
18:53ScriptorI wonder if * -> vimscript compilers would have ever been popular
18:53hoover_dammRaynes, nah
18:53devnyeah, hoover_damm -- when i hop on a remote machine, vi all the way
18:53RaynesScriptor: You can write plugins in Ruby, Python, etc.
18:54SegFaultAXScriptor: There's an idea. Clojurescript to vimscript.
18:54RaynesScriptor: My refheap vim plugin is mostly ruby.
18:54ScriptorRaynes: true, but are the bindings for those widespread?
18:54hoover_dammdevn, well when it comes to pairing (remote) i'm a big fan of tmux + emacs
18:54nybbles_anyone know if clojurescript One has a way of generating a fresh project? i want a blank slate!
18:54hoover_dammdevn, there really isn't anything better
18:54devnthat's my issue with writing vimscript that requires i compile vim myself or with support for another lang or something
18:55devnit begins to feel like im writing ruby in clojure or something
18:55devnit just feels sort of wrong
18:55SegFaultAXdevn: Huh?
18:55devnSegFaultAX: vim is not always compiled with ruby support
18:55hoover_dammit is wrong actually
18:55hoover_dammbut most people don't see it
18:55SegFaultAXdevn: What does that have to do with vimscript?
18:56hoover_dammand with ruby 2.0 ...
18:56devnSegFaultAX: Raynes was mentioning that you can write vimscript with ruby
18:56hoover_dammruby support's gonna be even more fun
18:56SegFaultAXdevn: You can write vim plugins with Ruby.
18:56devnheh, i know
18:56devnim saying that it's not universal
18:56casionyou can write emacs plugins with a mixture of any language...
18:56casionassuming liberal demented use of org-babel
18:57devnhaha oh man
18:57devnthat's wrong too
18:57devnplain elisp or plain vimscript or nothing for me
18:57SegFaultAXdevn: The problem with that (in the case of vimscript) is it makes some things a lot more challenging.
18:58casionwhat kind of monster would cut up a cow, butcher it, grind it, cook it, and combine it with 30 other ingredients
18:58devnSegFaultAX: right. but the problem with removing that challenge is that your work is far less portable
18:58casionthat sounds awful
18:58casion(or like a hamburger)
18:58SegFaultAXdevn: Command-t comes to mind as something that would be impossibly hard to write im vimscript.
18:58devnyeah, but why even use that? there are other vimscript plugins that have been written
18:58SegFaultAXdevn: vim compiled with --enable-pythoninterp and/or --enable-rubyinterp is common enough.
18:59devnSegFaultAX: not on remote machines i dont have control over
18:59SegFaultAXdevn: Then build it yourself and install locally?
18:59devnim for customization, but there's a limit to how far im personally willing to take it
18:59SegFaultAXdevn: Or disable those plugins?
18:59Raynesdevn: How about I put it this way: if I Ruby/Python support didn't exist, refheap.vim would not exist because I would not have written it.
18:59RaynesWould not have even tried.
18:59RaynesNot that many people use it or care about it.
18:59RaynesBut it'd be a loss for those who do use it.
19:00RaynesThis is nazi stuff. Master race crap, no interbreeding.
19:00Raynes:p
19:00devnRaynes: yeah, maybe im not being clear: I get why people use ruby to write their vimscript, and I use some of those plugins, but I don't push it to my .vim git repo
19:00SgeoWhat's Command-t?
19:00casionwe're in #clojure, complaining about language intermingling is incredibly ironic
19:00RaynesI bet you write your HTML in CSS, devn.
19:01SegFaultAXSgeo: Emulation of a very cool feature from TextMate.
19:01devnbecause when i go to clone it on some remote machine im booting up, it's bitten me
19:01SgeoWhat does the feature do?
19:01SegFaultAXSgeo: Google is your friend here.
19:01Raynesdevn: If those plugins don't have the standard 'if ruby support exists, do…" you should open an issue.
19:02SegFaultAXSgeo: https://wincent.com/products/command-t
19:02RaynesIt does google.
19:02Raynes:P
19:02devncasion: fair point
19:02casionSgeo: ido-mode is more or less the same
19:02RaynesExcept not at all.
19:03Raynesido-mode is way more useful. It lets you interactively browse the whole file system. command-t works from where you are in the file system down and uses fuzzy searching.
19:03casionwhat's that other one…. icicle?
19:03Raynescommand-t is very useful for its specific purpose, which is finding files in a project directory or similar.
19:03casionI use ido-mode, but I know there's another thing that contains similar stuff
19:03Raynesido-mode is more generally useful for navigation.
19:03Raynesicicle iirc
19:04devncasion: yeah i think Raynes is right, icicle
19:04SegFaultAXRaynes: I've never used it. Is it something like command-t + nerdtree?
19:04devnthere might be another one as well
19:04casiondevn: you mean I'm right ;)
19:04devnSegFaultAX: you hit command+t, it shows you a list of files and has fancy auto-complete
19:04RaynesSegFaultAX: It's really hard to explain. Maybe find a screencast that shows how it works?
19:05devnthe files are specific to the project you're working in
19:05Raynesdevn: He meant ido-mode.
19:05devnoh, ido-mode is a lot of stuff
19:05RaynesDon't try to explain it! Only screencasts and first hand experience does it justice.
19:05Raynes:p
19:05mpenetyou can do the same with ido-mode + some elisp, plenty of modes that allow to do more or or less the same
19:05cgagwhat's the idiomatic way of removing nil's from a seq? I'm doing (keep identity seq) right now, just wondering if there's a way most people use
19:06devn(remove empty? seq) i think
19:06RaynesEither of those is fine.
19:06mpenet(filter identity something) also
19:06Raynescgag: Best is to not get nils in there in the first place, if possible.
19:07SegFaultAXAh, so it's similar to command-t, if it was also extended over buffers.
19:07SegFaultAXAnd commands, apparently.
19:08Sgeompenet, filter identity will remove falses also
19:08mpenettrue
19:08Sgeo,(filter identity [nil false 5])
19:08clojurebot(5)
19:08devn,(remove empty? ["" nil "hello"])
19:08clojurebot("hello")
19:08SegFaultAXI use a combination of 2 plugins to do this. command-t and fuzzy finder.
19:08devn,(remove empty? ["" nil 1])
19:08clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long>
19:08devn:(
19:09Sgeo,(filter (complement nil?) [nil false 5])
19:09clojurebot(false 5)
19:09devn,(remove nil? ["" nil "hello"])
19:09clojurebot("" "hello")
19:09devn,(remove nil? ["" nil "hello" 1])
19:09clojurebot("" "hello" 1)
19:09SegFaultAX,(remove boolean ["" nil "hello" 0 1])
19:09clojurebot(nil)
19:09devninteresting :)
19:10SegFaultAX,(remove (complement boolean) ["" nil "hello" 0 1])
19:10clojurebot("" "hello" 0 1)
19:10Sgeo,(doc boolean)
19:10clojurebot"([x]); Coerce to boolean"
19:10SegFaultAX,(remove not ["" nil "hello" 0 1])
19:10clojurebot("" "hello" 0 1)
19:11devnRaynes: refheap is cool btw
19:11Raynesdevn: o/
19:12casionare there public language usage stats on refheap?
19:12RaynesNo, but that is planned. It'd be easy enough to pull that info from the db if someone were so inclined to add it.
19:23SgeoI'm going to see if maybe Eclipse won't cause me as much RAM pain as I'm afraid of
19:26zoldarSgeo: I'm afraid you me be disappointed...
19:27zoldar*may
19:29SegFaultAXEclipse is pretty RAM hungry.
19:29zoldarbut a lot in that regard depends on third party additions, so not all is lost
19:30SegFaultAXVanilla eclipse is pretty RAM hungry. For only 2gigs, that might be tight.
19:30pandeirohow can i specify an empty string for the :quote value with clojure.data.csv/read-csv ?
19:31mpenetSgeo: just curious, what editor did you use for Haskell?
19:31SgeoI think Notepad++ or JEdit. I remember using JEdit when I was working on a Haskell project on campu
19:32Sgeocampus
19:32SgeoDon't really remember what I used at home, but I was on Linux then
19:32SgeoSo probably gedit or something similar like that
19:34SgeoWell, this is not encouraging in terms of ability to use Eclipse
19:34SgeoMade the project, but nothing showed up under it in the thing on the left
19:34casionSgeo: why can't you just use linux?
19:35SegFaultAXGave up on eclipse in 30 seconds. Wow.
19:35casionSegFaultAX: that's not even a record ;)
19:35SgeoBecause Windows makes playing various games easier. WINE doesn't work with everything. And also, on this POS machine, Linux can't show a battery meter
19:36casionand dual boot is not possible?
19:36SgeoIt is I guess, but I'm lazy
19:36SegFaultAXOr running Linux inside of windows?
19:36zoldarSgeo: there's always something like gaikai.com ;)
19:37casionSgeo: not lazy enough to avoid all this hassle getting a working environment ;)
19:39aperiodici'm dumb
19:40SegFaultAXaperiodic: It happens.
19:40Frozenlockaperiodic: Stop being me.
19:46SegFaultAXIf I wanted to write a 2d game, what are good libraries to look into?
19:46SegFaultAXParticularly for doing 2d graphics.
19:48zoldarSegFaultAX: ... Quil? (wrapper for processing) - just guessing, I haven't done anything with it yet
19:49aperiodici would not recommend quil for games
19:49SegFaultAXaperiodic: What would you recommend?
19:51aperiodicquil is fine as a 2D drawing API, but it doesn't provide much beyond the drawing API, so you'd be doing a lot yourself. it's also not very fun to try to build any sort of GUI in
19:52aperiodicSegFaultAX: honestly, the LWJGL, using openGL with z=0 everywhere
19:53SegFaultAXaperiodic: Are their GUI toolkits for LWJGL?
19:53SegFaultAXArgh, there.
19:53zoldaraperiodic: ztellman's penumbra provided nice wrapper for ljwgl, but from what I see, it's not longer maintained
19:53aperiodiczoldar: oh, i thought penumbra was just for drawing
19:54SgeoOh wait, even without emacs with a nice REPL, I could require reload namespaces, right?
19:54zoldaraperiodic: well example apps are tetris and asteroids ;)
19:54aperiodicSegFaultAX: http://lwjgl.org/wiki/index.php?title=Game_Engines_and_Libraries_Using_LWJGL#GUI_Libraries
19:54SgeoAnd I assume it keeps things that I've done in the REPL, as long as there isn't a collision of namespaces?
19:55SgeoThat's still better than what I'm used to in Haskell, even though I think it's improving in recent GHCi
19:55aperiodici don't actually have any experience using LWJGL/penumbra to build things, just some poor experiences using quil/processing to try to build simple games
19:55aperiodicwhich could just be my own incompetence!
20:07SgeoDo I need to install some sort of Java EE JDK or JRE to use Immutant?
20:15Sgeo,(class '(1 2 3))
20:15clojurebotclojure.lang.PersistentList
20:15Sgeo,(isa? '(1 2 3) IPersistantList)
20:15clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: IPersistantList in this context, compiling:(NO_SOURCE_PATH:0)>
20:16Sgeo,(isa? '(1 2 3) clojure.lang.IPersistantList)
20:16clojurebot#<CompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.lang.IPersistantList, compiling:(NO_SOURCE_PATH:0)>
20:16Sgeo,(isa? '(1 2 3) clojure.lang.IPersistentList)
20:16clojurebotfalse
20:16Sgeo??
20:16lazybotSgeo: What are you, crazy? Of course not!
20:16Sgeo,(satisfies? '(1 2 3) clojure.lang.IPersistentList)
20:16clojurebot#<NullPointerException java.lang.NullPointerException>
20:17Sgeo,(class (map identity '(1 2 3)))
20:17clojurebotclojure.lang.LazySeq
20:18Sgeohttps://github.com/clojure/algo.generic/blob/1381315259c3c5ca8b8deec9e094bcf70742fbb9/src/main/clojure/clojure/algo/generic/functor.clj#L19
20:18SgeoSomeone want to tell Konrad Hinsen that the result of map is not an IPersistentList?
20:21SegFaultAXSgeo: Huh?
20:22zoldar,(type (seq (map identity '(1 2 3)))
20:22clojurebot#<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading>
20:22zoldar,(type (seq (map identity '(1 2 3))))
20:22clojurebotclojure.lang.Cons
20:22Sgeofmap is, according to the docstring, supposed to reutrn a structure of the same kind as the second argument. The version for IPersistentList returns a LazySeq
20:22SgeoNot sure if Konrad might consider that the same "kind", though, which I guess might make some sense?
20:24unlinkI would really appreciate something in the core equivalent to #(every? identity %)
20:25Sgeo(partial every? identity)
20:27unlinkYes, that would be nice to have in core.
20:39SgeoIs JEdit any good with Clojure?
20:39uvtcSgeo: When I tried it, indentation didn't work as I wanted it to.
20:47amalloyunlink: core is cluttered like mad already. there's no need to add to the hundreds of names for some function that can be written in three seconds if you need it
20:49unlinkamalloy: Yes, ball of mud is exactly the clojure philosophy. Glom more on when it makes the common case clearer and more explicit.
20:50unlinkamalloy: Witness if, when, if-not, when-not, if-let, when-let. Highly non-orthogonal, yet I use all of them frequently.
20:52SgeoThere's a pattern to the naming
20:53SegFaultAXunlink: I'm sort of ok with that example (perhaps due to newness to Clojure). If and unless (if-not) are common enough. Wanting an if without an else is also a common enough when if is an expression (instead of syntax). The let versions introduce a binding.
20:54unlinkSegFaultAX: But surely you don't need when given that if lets you omit its else form!
20:55cheburakshais it possible to do live programming in Eclipse?
20:55SegFaultAXunlink: That doesn't sit well with me. When 'if' is an expression, it should act like one, eg always return a value. Having a conditional without an alternative doesn't make sense to me.
20:56SegFaultAXIn other words, omitting the else for an if expression should be invalid.
20:57cheburakshaanyone heard of live programming in clojure?
21:02antares_cheburaksha: live means in the REPL? that's basically how most people work with Clojure
21:18SgeoIs it reasonable to use a fairly vanilla text editor and just require :reload repeatly in the REPL?
21:18jkkramersounds tedious
21:20jkkramervanilla text editors tend to be bad at lisp indentation
21:24amalloySgeo: entirely reasonable
21:25amalloyit's not the best, but it avoids having to learn and configure thirty new things at once
21:25SgeoAnd I imagine that it's still better than GHCi was?
21:25SgeoSince bindings at the REPL should continue living?
21:35xeqiahh, cyclic requires = sad
22:08SgeoDoes Clooj have any intention whatsoever of working with Leiningen?
22:12clj_newb_2345what is the state of the art for webkit in swt in clojure on osx? is this possible yet?
22:12clj_newb_2345i love clojure, but not clojurescript all that much; I love css + svg; but not the java gui all taht much
22:13clj_newb_2345so I'd really like to do clojure programming but with a css + svg gui
22:29dbaschanyone here using noir? I'm trying to follow the "get started" guide but get an error
22:30gtuckerkelloggthere was a very recent blog series of noir tutorials
22:56SgeoAbout nREPL.el: Why is evaluating the form preceding point C-x C-e and not C-c C-e
22:56SgeoIt seems like a weird exception
22:57scottjyou mean (+ 2 2)| C-x C-e? that's how slime and emacs lisp modes behave.
22:58SgeoHmm, any reason for starting it with C-x?
22:59SgeoI've been under the impression that C-x is usually for things that aren't dependent on mode, and C-c is for things that are, such as doing language-related stuff
22:59scottjnot sure the exact conventions, C-c C-_ might be for users.
23:00scottjSgeo: or maybe only C-c _ is for users. could be that C-x C-e works in all modes, and lisp-mode/slime overloaded that
23:01amalloyscottj: C-c <letter>
23:01clj_newb_2345how do I include org.eclipse/swt-*** as a lein dependency for osx ?
23:02SgeoIs there any chance that SLIME might be _easier_ to use than nREPL?
23:02amalloymy guess is that C-c C-e is already used, and they thought the "e for eval" was important
23:03scottjI think nrepl uses it because slime does, and slime does because that's how you eval emacs lisp.
23:04SgeoDoes point have to be after the entire form, or can it be in the middle if it?
23:04scottjmaybe there's a lisp-mode/inferior-lisp step in there
23:04scottjSgeo: C-M-x evals top level form
23:05scottjSgeo: I use C-M-S-x to eval form my point is in
23:05scottjnot top-level ones that is
23:05SgeoWith emacs, to get into some lein project, I'm expected to run lein repl from the shell and connect to that?
23:05SgeoOr what's the typical workflow?
23:06Sgeo(and nREPL.el)
23:06SgeoAnd are there any breakpointing features? Or resume-from-exception features?
23:07scottjmaybe nrepl-jack-in. I think ritz supports breakpoints with nrepl
23:09scottjI haven't switched to nrepl, I'm pretty happy with slime
23:09SgeoI thought nrepl-jack-in was for making a new REPL independent of lein stuff
23:10scottjif it's like slime-jack-in, you go to the project.clj and it will create a repl for that project
23:12SgeoNot entirely clear. But there is an option to give it a project root if given a prefix argument
23:14amalloySgeo: it can't do anything without lein
23:17SgeoI still don't want to memorize keystrokes :(
23:17SgeoHmm, if I wished, could I start nREPL independently of lein, and connect to that?
23:19SgeoOh cool, the emacs tutorial detects changed keybindings
23:19SgeoWait, why is C-z undo? I pressed it out of habit...
23:20scottjwhy isn't it? or maybe you have cua-mode on
23:21scottjor rather, C-z isn't undo by default, but cua-mode makes it that.
23:21SgeoOh, thought cua was just C-v and C-x and C-C
23:22Sgeo(And the latter two just when region is selected)
23:30amalloySgeo: by default undo is bound to C-/ and C-_
23:30SgeoI had CUA mode enabled, must have enabled it in .emacs a while ago
23:31SgeoIs there a way to make mouse-wheel scrolling smooth?
23:31SgeoI should really just google things like that
23:31casionor use #emacs
23:35clj_newb_2345how do I put -XstartOnFirstThread ito project.clj ?
23:35SgeoWait, if C-c C-r evalulates region, but CUA mode turns C-c into copy when a region exists...
23:36SgeoSeems like a conflict :(
23:39amalloySgeo: cua is one giant conflict-introducer
23:39amalloy$google leiningen sample project.clj
23:39lazybot[leiningen/sample.project.clj at master · technomancy/leiningen ...] https://github.com/technomancy/leiningen/blob/master/sample.project.clj
23:39Sgeoamalloy, :(
23:40scottjSgeo: you can just rebind the eval-region(?) comamnd
23:40amalloyotoh, i don't think i've ever used eval-region in my life
23:40SgeoI could disable CUA
23:40scottjeven better :)
23:41SgeoMeans I'm going to actually need to do the tutorial, since I have no idea what cut/copy/paste are like in emacs, except some sort of "kill ring" thing
23:42amalloySgeo: don't worry about the kill ring. just pretend it's cut/copy/paste
23:42amalloyC-w to cut, M-w to copy, C-y to paste
23:42amalloyyou can do some slightly more sophisticated stuff but rarely need to