2012-09-22
| 00:00 | Lajjla | I feel I stay on roaches for too long, costs too much supply |
| 00:00 | casion | just got off from playing, #1 in divison right now |
| 00:00 | Lajjla | But I find the timing to tech to brood lords hard to estimate. |
| 00:00 | Lajjla | Not bad |
| 00:00 | Lajjla | I'm like #13 or something. |
| 00:00 | Lajjla | But 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:01 | Lajjla | I actually don't believe at all that ZvZ and PvP are 'coinflips', theyre just hard to understand. |
| 00:01 | casion | it's easy when you apply some common sense and programming skills ;) |
| 00:01 | Lajjla | Friend 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:01 | casion | I've been slowly coverting evo chamber over to clojure |
| 00:02 | aperiodic | man, starcraft... |
| 00:02 | Lajjla | Or don't run in with lings to see if enemy is still mining gas. |
| 00:02 | Lajjla | casion, you were the person behind evo chamber? |
| 00:02 | Lajjla | I had no idea |
| 00:02 | aperiodic | what is evo chamber? |
| 00:02 | casion | one of two, yes |
| 00:02 | Lajjla | Honestly, I just randomly addressed a random person with something completely offtopic to see how they would react |
| 00:02 | casion | genetic algorith for determining optimial build orders in starcraft 2 |
| 00:02 | Lajjla | aperiodic, genetic algorithm |
| 00:02 | aperiodic | ooh, i've had that idea |
| 00:02 | Lajjla | Where 'optima' means 'useless because it will die to anything and look extremely suspcisious' |
| 00:02 | aperiodic | glad someone actually did it! |
| 00:03 | casion | we got write ups in a few major magazines |
| 00:03 | casion | it was neat |
| 00:03 | casion | no Lajjla |
| 00:03 | casion | you need to learn to use waypoints in it |
| 00:03 | Lajjla | Oh, that's fixed now/ |
| 00:03 | aperiodic | do you have an official site? it isn't ddg-ing well |
| 00:03 | Lajjla | Well, I haven't been keeping up with it. |
| 00:03 | casion | I don't know what the fuck works on the google code repo |
| 00:03 | aperiodic | ah, found it |
| 00:03 | luxbock | casion, that sounds really exciting, where can I read about that? |
| 00:03 | Lajjla | I typically don't know or use builds, they make some sense for T but very hard to pull of with P and Z |
| 00:03 | casion | scbuildorder is the best working one atm |
| 00:04 | casion | luxbock: search Evolution Chamber Build Order |
| 00:04 | casion | or just ask me questions directly |
| 00:04 | casion | lomilar did most of the base code, and I did a metric ton of optimization and feature implementation |
| 00:05 | casion | and since the repo died I've been slowly redoing it in clojure as I learn clojure and get time |
| 00:05 | casion | yeah, I played a lot of BW too :) |
| 00:05 | Lajjla | casion, why? |
| 00:05 | casion | Lajjla: why what? |
| 00:06 | Lajjla | Why port it to clojure? |
| 00:06 | casion | concurrency, and learning |
| 00:06 | aperiodic | i didn't play as much as i followed the korean scene very closely |
| 00:07 | Lajjla | Most people seem to watch more SC than play. |
| 00:07 | casion | aperiodic: I still follow stuff closely |
| 00:07 | casion | tasteless still casting for gom |
| 00:07 | Lajjla | One moment I don't play at all, then one week I'm pretty much grinding games, like now. |
| 00:07 | Lajjla | Yeah |
| 00:07 | casion | flash probably the best SC2 players now |
| 00:07 | casion | player* (plural maybe appropriate lol) |
| 00:07 | Lajjla | Probably absolutely not. |
| 00:07 | aperiodic | do you mean lee young ho, or is that a team now? |
| 00:08 | Lajjla | Flash has just switched. |
| 00:08 | casion | Lajjla: he just qualified for GSJ... |
| 00:08 | Lajjla | No, Lee Young Ho. |
| 00:08 | casion | and he did not lose a single game |
| 00:08 | Lajjla | So do many startale B teamers |
| 00:08 | luxbock | Rain looked scary good in his Code S games |
| 00:08 | Lajjla | Qualifying 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:08 | aperiodic | casion: what is the fitness function for evo chamber? |
| 00:08 | Lajjla | Rain looked very impressive. |
| 00:09 | luxbock | he made playing protoss look much more entertaining as well |
| 00:09 | casion | aperiodic: it uses unit value, current resources, and a huge mutliplier for time |
| 00:09 | luxbock | more multitasking and less deathballing |
| 00:09 | aperiodic | casion: do you just simulate playing the game essentially as solitaire? |
| 00:09 | Lajjla | Flash beat two notable people in his qwualification, Horror and soO |
| 00:09 | Lajjla | Apart from that beat one other teamless player and got one bye. |
| 00:09 | ChongLi | Lee Jae Dong ftw! |
| 00:09 | casion | Lajjla: there's more to it than just that |
| 00:10 | Lajjla | I don't think you can estimate 'best player probably' from that |
| 00:10 | Lajjla | casion, what ore? |
| 00:10 | casion | jaedong was knocked out of code S and Code A |
| 00:10 | casion | aperiodic: no, you're only working with asingle player |
| 00:10 | ChongLi | yeah, I know |
| 00:10 | casion | Lajjla: he's been playing practice games with IM and TSL |
| 00:10 | Lajjla | Inori also didn't lose a single game qualifying for code A for instance |
| 00:10 | ChongLi | I'm liking Lee Seung Hyun at the moment |
| 00:10 | ChongLi | he's showing some strong play |
| 00:10 | Lajjla | Inori next Zerg Bonjwa? |
| 00:10 | ChongLi | for a kid |
| 00:11 | Lajjla | Or 4B |
| 00:11 | aperiodic | casion: how accurately do you have to model things like unit movement acceleration curves in order to get good signal? |
| 00:11 | casion | hwanni, IM coach and revival have said in interviews flash is extremely good |
| 00:11 | Lajjla | I wonder how much the result varies based on spawn point there. |
| 00:11 | casion | and they don't expect him to lose a single match, if game, in his first code A run |
| 00:11 | aperiodic | he is, you know, flash |
| 00:12 | Lajjla | We'll see honestly. |
| 00:12 | casion | aperiodic: only for workers, and maynards |
| 00:12 | Lajjla | I believe everyone who makes such a proclamation about sC2 is being a bit foolish, because the game can be quite volatile. |
| 00:12 | casion | aperiodic: the version on the repo atm is fucked, but I have one I could push with complete worker simulation |
| 00:12 | aperiodic | casion: word, nothing else is really relevant |
| 00:12 | Lajjla | I also don't 'expect' MMA or Mvp to do that, but in the end, it's possible that either will. |
| 00:12 | aperiodic | casion: is the clojure code in a usable state? |
| 00:12 | casion | what's up there now just goes a very simple 'workers do X per X' |
| 00:12 | casion | aperiodic: not even close |
| 00:13 | aperiodic | aw, darn |
| 00:13 | Lajjla | As 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:13 | casion | aperiodic: I have a basic determinate BO optimizer for protoss kinda working |
| 00:13 | casion | it's missing significan things like chroho, warpgates, upgrades, accurate worker sim |
| 00:14 | Lajjla | aperiodic, he is Flash, he may become the best SC2 player, but most certainly he isn't yet. |
| 00:14 | casion | right now I'm focusing most of my time on clj-audiofile… and speaking of that I should commit what I have locally tomorrow |
| 00:14 | ChongLi | Lajjla: yeah, I always find it funny when he says that |
| 00:14 | aperiodic | Lajjla: 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:14 | ChongLi | the standards for staying in code S are constantly increasing |
| 00:14 | aperiodic | Lajjla: oh yeah, i'm probably biased because i started watching BW around the beginning of his reign |
| 00:14 | Lajjla | Case 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:14 | casion | Lajjla: I think you miss something about korean culture |
| 00:15 | casion | 'best' is simple who is winning, nothing more |
| 00:15 | Lajjla | Yap |
| 00:15 | casion | they operate on a meritocracy, 'best' has very little to do with overall skill |
| 00:15 | Lajjla | But Flash isn't yet per se. |
| 00:15 | Lajjla | He won his qualifier without losing a game, a lot more people like Inori and 4B did for instance |
| 00:15 | casion | and right now in practice, and in public, flash is losing very very little |
| 00:15 | Lajjla | which are not extremely remarkable players. |
| 00:16 | casion | iirc flash has only lost 1 game in OSL as well |
| 00:16 | casion | and he beat DRG in a korean showmatch |
| 00:16 | Lajjla | He 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:16 | aperiodic | casion: 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:16 | casion | but DRG is kinda slacking |
| 00:16 | casion | aperiodic: yes |
| 00:16 | Lajjla | So didn't Polt, Polt isn't the best player in the world either. |
| 00:16 | casion | that's call waypoints |
| 00:16 | casion | Lajjla: <3 polt |
| 00:16 | aperiodic | ah, got it |
| 00:17 | Lajjla | I'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:17 | Lajjla | I like how Polt sort of showed Taeja how it was done versus Rain |
| 00:17 | Lajjla | he didn't win, but like, Taeja can't split his army properly it seems |
| 00:17 | casion | aperiodic: 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:17 | casion | Lajjla: taeja had been traveling |
| 00:17 | Lajjla | Rain 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:18 | Lajjla | casion, he shows this weakness in other games as well. |
| 00:18 | aperiodic | Lajjla: 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:18 | Lajjla | He'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:19 | Lajjla | aperiodic, 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:19 | casion | Lajjla: like winning asus rog, all-killing IM, code S ro8 3 seasons in a row? |
| 00:19 | casion | :P |
| 00:19 | muhoo | is there any workable way to compare equality of two nested maps in clojure? |
| 00:19 | Lajjla | Who 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:19 | Lajjla | casion, 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:20 | Lajjla | Rain's PvT is pretty darn sexy to be honest. |
| 00:20 | aperiodic | muhoo: i don't understand. = should do the job |
| 00:20 | casion | of course it is, lim yo-hawn is his coach |
| 00:20 | Lajjla | All 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:21 | Lajjla | I used to do storm drops a lot before I had my phoenix phase in which I've been stuck since forever now. |
| 00:21 | aperiodic | muhoo: ##(= {:a {:b :c}, {:d :e} :f} {:a {:b :c}, {:d :e} :f}) |
| 00:21 | lazybot | ⇒ true |
| 00:22 | muhoo | aperiodic: 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:24 | Lajjla | What is this, clojure instead of starcraft strategy? |
| 00:24 | Lajjla | Also, well, Bisu |
| 00:24 | Lajjla | he's not been doing too well in WoL |
| 00:24 | Lajjla | But it could be argued that he wasn't doing to well in BW since MSL closed, ololololol. |
| 00:24 | casion | new topic, DH valencia… winner? |
| 00:24 | casion | and who's over the grubby line |
| 00:25 | Lajjla | Not sure, I think making a praediction on who's going to win a tournament has a very low shot at accuracy honestly. |
| 00:25 | Sgeo | My computer is such a piece of garbage I'm scared to attempt to open Eclipse |
| 00:25 | casion | Sgeo: 2gb ram… I wouldn't |
| 00:25 | muhoo | aperiodic: aha! ##(= {"foo" "bar", "baz" {:quuz 99}} {"foo" "bar" "baz" {"quuz" 99}}) |
| 00:25 | lazybot | ⇒ false |
| 00:26 | casion | Lajjla: I think you get a pretty good chance if you guess stephano |
| 00:26 | Sgeo | :( |
| 00:26 | muhoo | i had a key instead of name |
| 00:26 | aperiodic | yup, that'll do it |
| 00:26 | Lajjla | Biggest shot is going to be Taeja, Stephano or HerO I guess |
| 00:26 | Lajjla | ViOLet too of course |
| 00:27 | Lajjla | I guess ViOLet has the biggest shot at taking Stephano out though. |
| 00:27 | Lajjla | He seems to have Stephano's number in some way |
| 00:27 | casion | I disagree |
| 00:27 | casion | he beat stephano recently… |
| 00:27 | casion | and thusly stephano went and did nothing but practice zvz |
| 00:27 | casion | and then won wcs eu off it |
| 00:27 | Lajjla | Well, he beats Stephano in general, I don't think Stephano has ever won a series against him |
| 00:28 | casion | and: https://twitter.com/EGStephanoRC/status/244332444399054848 |
| 00:28 | Lajjla | Yeah, against Vortix, and losing the first set 1-2. |
| 00:28 | Lajjla | Not against ViOLeT |
| 00:28 | muhoo | wat, #clojure has gone way OT |
| 00:28 | Lajjla | Well, 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:29 | casion | Lajjla: stephano is 2-3 in series against violet |
| 00:29 | Lajjla | REally? |
| 00:29 | Lajjla | What series did he win? |
| 00:29 | casion | yes |
| 00:29 | Lajjla | I thought he was 0-3 |
| 00:29 | casion | red bull, IPL |
| 00:29 | Lajjla | Ahh |
| 00:29 | Lajjla | well |
| 00:29 | Lajjla | THen I guess theyŕ e about even |
| 00:29 | casion | and he lost MLG 1-4, and onog 2-3 |
| 00:30 | casion | overall record in games is 8-9 |
| 00:30 | Lajjla | He also lost to him at an MLG arena right? |
| 00:30 | Lajjla | Or was that Symbol? |
| 00:30 | casion | yes |
| 00:30 | casion | 0-3 at mlg |
| 00:30 | Lajjla | Well, I guess I count the extended sereis at the MLG championship as 2 series. |
| 00:31 | Lajjla | Seriously, extended series rule, I don't think there's anyone who likes it except Lee Nelson |
| 00:31 | casion | I like it :| |
| 00:31 | casion | without it, double elim makes no sense |
| 00:31 | casion | round robin is crap for games, swiss is awful, single-elim is no fun to watch |
| 00:32 | casion | double elim is the best for spectators and gives a good representation of current playing level in results |
| 00:32 | Lajjla | MLG is the only double elin tournament ever in the world that uses it. |
| 00:32 | casion | and for DE you need extended series |
| 00:32 | Lajjla | You don't? |
| 00:32 | Lajjla | Why would you need it. |
| 00:32 | casion | extended series doesn't just mean carrying over results |
| 00:32 | Lajjla | MLG pretty much invented extended series |
| 00:32 | Lajjla | It does in the MLG case |
| 00:32 | casion | I don't know why people mis-appropriate that term :| |
| 00:32 | Lajjla | Extended series can be argued to in fact remove it from being double elim |
| 00:33 | Lajjla | Because there's no longer the rule 'if you lose 2 series, you are out, you get 1 life' |
| 00:34 | Lajjla | Like 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:34 | Lajjla | casion, 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:34 | Lajjla | (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:35 | casion | I'm not sure why you're talking about MLG, extended series does not explicitly require carry-over results |
| 00:36 | casion | if you're talking about that call it the mlg system, or carryover |
| 00:36 | Lajjla | casion, well, this is the 'MLG extended series' rule, which no one likes |
| 00:36 | Lajjla | You know how that works right? |
| 00:36 | casion | not for sc2, it's not very good there I agree |
| 00:37 | Lajjla | It's never good, it just randomly hands out advantages based on bracket luck |
| 00:37 | casion | for FG and halo it works OK |
| 00:37 | casion | more so for FG |
| 00:37 | Lajjla | As 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:37 | Lajjla | As 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:38 | casion | brackets don't always work that way, in some tournaments (like some FG tourneys), brackets are manually balanced |
| 00:38 | casion | and some events let competitors choose their own brackets |
| 00:38 | casion | which actually ends up working remarkable well |
| 00:38 | Lajjla | Pretty silly, it's outside of Oz' control entirely, but if Stephano wins he gets that advantage, otherwise he doesn't. |
| 00:38 | casion | mostly due to the culture I think |
| 00:38 | Lajjla | In the end, there's still an element of bracket luck of who beats whom. |
| 00:38 | Lajjla | In any case, there can most certainly be double elmin without any form of extended series and most tournaments don't use it. |
| 00:39 | Lajjla | They 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:39 | Lajjla | Which 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:39 | casion | everyone gets 2 lives |
| 00:40 | Lajjla | Depends on definition of 'life' |
| 00:40 | Lajjla | In mario, if you have 1 life, that means you're game over if you die 2 times from there |
| 00:41 | casion | speaking of mario, I just finished new super mario bros 2 today |
| 00:41 | casion | it was fun |
| 00:41 | Lajjla | There's a remake or something? |
| 00:42 | casion | no, new game for 3ds |
| 00:42 | Lajjla | I don't know, IO always thought sonic was better than mario in basically every way. |
| 00:42 | casion | I agree 100% |
| 00:42 | Lajjla | Yeah |
| 00:42 | casion | however, my mother decided to buy me a 3ds... |
| 00:42 | Lajjla | the level design is less of a line, more of a square. |
| 00:42 | casion | which was awkward but very appreciated |
| 00:42 | Lajjla | And they tend to have so many more routes. |
| 00:42 | casion | 30 year old guy sitting at a christmas party with a nintendo handheld lol |
| 00:46 | uvtc | I'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:48 | uvtc | In 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:50 | casion | what if you print the map returned by shell/sh |
| 00:51 | uvtc | Ah. Good idea, casion. I get the output now. |
| 00:51 | uvtc | Incidentally, the test script sleeps for 3 seconds. |
| 00:52 | uvtc | Ah. Wait. The clojure program prints out the map. The script's output goes into the value for :out in that map. |
| 00:53 | casion | you can just do (:out (shell/sh blah)) can't you? |
| 00:54 | uvtc | Yes. That works. Thanks. |
| 00:55 | uvtc | I'd expected shell/sh to take std while it was running. |
| 00:55 | uvtc | Is there any way to babysit shell/sh? Sit there and block until it finishes? |
| 00:56 | casion | if you have to wait for it to finish, I don't know what else you could do |
| 00:59 | Raynes | uvtc: I have a library for that. |
| 00:59 | Raynes | uvtc: https://github.com/Raynes/conch |
| 00:59 | Raynes | uvtc: It is designed for babysitting processes. I'm also writing an interface similar to that Python 'sh' library. |
| 00:59 | casion | oh cool rayne, I could use this |
| 00:59 | casion | thanks |
| 01:00 | Raynes | That isn't insane like the one that was posted earlier today. |
| 01:01 | uvtc | I 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:01 | Raynes | It uses futures internally. |
| 01:01 | Raynes | It doesn't return a future. |
| 01:01 | uvtc | Right. |
| 01:02 | uvtc | Oh. I noticed it uses futures internally. |
| 01:02 | uvtc | But I see that you're correct. Of course it's not returning a future. |
| 01:02 | Raynes | clojure.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:03 | uvtc | Well, 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:03 | iDesperadO | is there any function that call tell and relation in a collection of value like (true false true ...) |
| 01:04 | uvtc | Raynes: 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:04 | iDesperadO | in another way, is there any clojure function that tell me about the final truth of AND/OR/XOR of a collection of values? |
| 01:06 | iDesperadO | ah...sorry and macro is exactly my want |
| 01:07 | iDesperadO | ... |
| 01:07 | iDesperadO | ,(and '(true false)) |
| 01:07 | clojurebot | (true false) |
| 01:10 | iDesperadO | it seems every is my want |
| 01:10 | iDesperadO | ,(every? true? '(true false)) |
| 01:10 | clojurebot | false |
| 01:44 | Sgeo | iDesperadO, note that there's an identity function |
| 01:45 | Sgeo | ,(every? identity '(true 5 "hi")) |
| 01:45 | clojurebot | true |
| 01:45 | Sgeo | ,(every? identity '(true 5 "hi" nil)) |
| 01:45 | clojurebot | false |
| 01:45 | Sgeo | Which lets you do it based on the truthiness of the values |
| 01:45 | Sgeo | (In this case. identity may be useful elsewhere) |
| 01:53 | lanastasov | hi |
| 01:54 | uvtc | hi, lanastasov . |
| 01:59 | lanastasov | I just wonder. So many people and no one is writing |
| 02:00 | rbxbx | 'ello |
| 02:02 | lanastasov | I have used only the repl. lein repl |
| 02:03 | lanastasov | how do I run some saved files |
| 02:03 | lanastasov | I know there is (load-file 'file.clj") |
| 02:03 | lanastasov | I know there is (load-file "file.clj") |
| 02:04 | tomoj | lein help run |
| 02:06 | lanastasov | lein run |
| 02:06 | clojurebot | upgrading to leiningen 2 is easy with this handy upgrade guide: https://github.com/technomancy/leiningen/wiki/Upgrading |
| 02:10 | uvtc | lanastasov: you can run standalone clojure files using the lein exec plug-in: https://github.com/kumarshantanu/lein-exec |
| 02:11 | uvtc | lanastasov: I wrote up a brief beginner's guide that you might find useful: http://www.unexpected-vortices.com/clojure/brief-beginners-guide/ |
| 02:14 | lanastasov | thx for the guide |
| 02:14 | uvtc | y/w :) |
| 02:36 | Raynes | lanastasov: It is late in the USA. |
| 02:38 | lanastasov | 9:30 am here |
| 02:38 | shoky | israel? |
| 02:38 | lanastasov | europe |
| 02:39 | shoky | turkey |
| 02:41 | lanastasov | bulgaria |
| 02:41 | shoky | neato |
| 10:28 | ifesdjeen | mpenet: just for a record, it's me (ifesdjeen on twi) |
| 10:33 | mpenet | ifesdjeen: noted :) |
| 10:34 | mpenet | ifesdjeen: 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:35 | ifesdjeen | mpenet: absolutely. thanks for hitting ground, hope it would bring to some productive collaboration, have a nice weekend! |
| 10:37 | mpenet | ifesdjeen: Thanks, you too! I am certain it will. |
| 10:37 | ifesdjeen | kk |
| 12:31 | devn_ | ,(let [my-atom (atom {:0 1})] (:0 my-atom)) |
| 12:31 | clojurebot | nil |
| 12:32 | devn_ | ,(let [my-atom (atom {:0 1})] (:0 @my-atom)) |
| 12:32 | clojurebot | 1 |
| 12:32 | devn_ | Does that make sense? |
| 12:32 | devn_ | Could someone explain? |
| 12:36 | metellus | ,(map class (atom {:0 1}) @(atom {:0 1})) |
| 12:36 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Atom> |
| 12:36 | metellus | ,(map class [(atom {:0 1}) @(atom {:0 1})]) |
| 12:36 | clojurebot | (clojure.lang.Atom clojure.lang.PersistentArrayMap) |
| 12:37 | metellus | my-atom is a reference to a map, not a map |
| 12:48 | devn | metellus: yeah, i guess i understand they're different, just wondering if that behavior made sense for an atom |
| 12:48 | devn | metellus: is that behavior similar elsewhere? |
| 12:49 | devn | ,(:a (ref {:a 1})) |
| 12:49 | clojurebot | nil |
| 12:49 | devn | short answer: yes. :) |
| 12:49 | devn | i guess i sort of expected it to get angry with me |
| 12:50 | devn | but no, nevermind... |
| 12:50 | devn | ,(:a '100 23) |
| 12:50 | clojurebot | 23 |
| 12:50 | metellus | ,(:a '100) |
| 12:50 | clojurebot | nil |
| 12:50 | devn | *nod* |
| 12:51 | devn | was just playing to see that it returned "not-found" for refs and atoms as well |
| 12:51 | devn | ,(:a '100 "not-found") |
| 12:51 | clojurebot | "not-found" |
| 12:51 | devn | ,(:a (atom []) "not-found") |
| 12:51 | clojurebot | "not-found" |
| 12:52 | metellus | ,(:a {:a 1 :b 2} "not-found") |
| 12:52 | clojurebot | 1 |
| 12:54 | metellus | I didn't realize you could specify a default for get |
| 12:54 | devn | i didnt either honestly until the other day when someone wrote that in here |
| 12:55 | devn | it'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:55 | devn | (:a {:b 'q} 43) is handy, just not sure I like the way it reads in practice |
| 12:55 | gfredericks | ,(:a (atom {:a 2})) |
| 12:55 | clojurebot | nil |
| 12:56 | gfredericks | ,(:a 38) |
| 12:56 | clojurebot | nil |
| 12:56 | devn | gfredericks: im jealous |
| 12:56 | gfredericks | devn: crap! |
| 12:58 | gfredericks | well go to the conj and then I'll be jealous and we'll be even |
| 12:58 | devn | i am! :) |
| 12:58 | devn | enjoy |
| 13:04 | devn | anyone have overtone skills? experience with TouchOSC? |
| 13:05 | devn | I'm trying to figure out if I can ask TouchOSC about the value of a path |
| 13:07 | casion | devn: PM me, I can help |
| 13:07 | casion | I've tone a few complex templates with supercollider and touchosc, but it's a bit off-topic here |
| 13:08 | casion | tone=done |
| 14:31 | ivan | *** Some tests failed *** |
| 14:35 | ivan | oh, yes, Windows with its \r\n breaks the new pprint tests |
| 15:05 | Hodapp | oddball 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:05 | Hodapp | I can make it generate a scene graph that is executable. |
| 15:14 | Hodapp | how evil is 'eval' considered? |
| 15:17 | amalloy | if you're not implementing a clojure repl, eval is probably wrong |
| 15:21 | gtrak | booooo |
| 15:21 | Hodapp | right 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:21 | Hodapp | I know how I'd do it in OOP fairly well, but I'd rather not shoehorn that mess into here |
| 15:22 | antares_ | Hodapp: you can use polymorphic functions with protocols or multimethods |
| 15:39 | davidbe | hi, 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:40 | davidbe | I 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:40 | davidbe | the h2-database gets created in ./db/ |
| 15:42 | davidbe | and the file not found was the lobos - h2 - backend |
| 15:46 | antares_ | davidbe: the file not found was h2:file.clj |
| 15:46 | antares_ | and there is no such file in the lobos codebase |
| 15:46 | antares_ | :subprotocol "h2:file" probably has to be :subprotocol "h2" |
| 15:46 | xeqi | davidbe: try :subprotocol "h2" |
| 15:47 | davidbe | antares_, xeqi : ok, I'll try that out |
| 15:48 | davidbe | antares_, xeqi : the repl gave no error :) - now checking out db |
| 16:16 | davidbe | xeqi, it worked! thanks! |
| 16:40 | mpan | I have a problem which looks oddly like tree traversal/modification; is this a good use-case for zippers? |
| 16:42 | mpan | also, is it supposed to be that fns don't compare for equality in the expected way? |
| 16:43 | mpan | as in ##(= #(+ 1 %) #(+ 1 %)) |
| 16:43 | lazybot | ⇒ false |
| 16:44 | metellus | what would be the expected way? |
| 16:45 | metellus | ,(= + +) |
| 16:45 | clojurebot | true |
| 16:45 | Sgeo | In theory, there's no way to determine that two functions do the same exact thing |
| 16:45 | aperiodic | mpan: 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:45 | metellus | except exhaustively testing every input |
| 16:46 | Sgeo | metellus, there's a countably infinite number of inputs. |
| 16:46 | Sgeo | If the two functions are the same, the comparision will never halt |
| 16:46 | mpan | Sgeo, if they were black boxes, but don't we have the internal repr of the fn from when it was built? |
| 16:46 | metellus | in Clojure, sure |
| 16:47 | metellus | in something with a type system, sometimes there are finite inputs |
| 16:47 | mpan | aperiodic, like what I want to do is evolve trees of operators representing some weird complicated computation |
| 16:48 | mpan | like, I would have expected ##(#(+ 1 %)) to compile to the same thing both times |
| 16:48 | lazybot | clojure.lang.ArityException: Wrong number of args (0) passed to: sandbox64117$eval99507$fn |
| 16:48 | Sgeo | mpan, how do you determine if two different internal representations do the same thing or not? |
| 16:48 | aperiodic | mpan: how exactly do you want to change the trees at each mutation step? |
| 16:48 | mpan | sorry, I didn't mean "do the same thing" |
| 16:48 | mpan | I meant "were defined with the same source" |
| 16:49 | mpan | aperiodic: I dunno; that's the hard question |
| 16:49 | Sgeo | I think there's an evolutionary algorithm thing for Clojure |
| 16:50 | mpan | I think the assignment is to write my own |
| 16:50 | Sgeo | https://github.com/lspector/Clojush |
| 16:50 | Sgeo | Oh |
| 16:50 | mpan | they were a bit vague but still |
| 16:50 | mpan | the other question related to this assignment: anyone know a good library to plot implicit eqns? |
| 16:50 | mpan | as in, f(x, y) = 0 |
| 16:50 | cgag | is it not possible to see if two functions compile to the same byte code ors omething along those lines? |
| 16:51 | Sgeo | You could always make a macro to take the place of fn or defn that stores the code as metadata or something |
| 16:51 | mpan | cgag, 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:51 | metellus | it's possible but that doesn't seem like a great test for equality to me |
| 16:51 | aperiodic | mpan: 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:52 | mpan | aperiodic: 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:52 | cgag | metellus, agreed, that was his expected way though, i was just wondering if there was any reason it couldn't work that way |
| 16:52 | grettke | What is the correct way to shutdown the nREPL instance before exiting emacs? |
| 16:53 | aperiodic | mpan: 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:53 | michaelr525 | hey |
| 16:53 | aperiodic | mpan: that is a much better way to get what you want |
| 16:54 | mpan | what if I wanted to select a nonterminal according to some probability? |
| 16:54 | aperiodic | mpan: 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:55 | mpan | the thing is, each subtree may be severely imbalanced, and I would like to assign probabilities to nonterminal nodes |
| 16:55 | mpan | or do you mean, traverse the tree to get a flat repr and select from that? |
| 16:56 | aperiodic | the traversal is essentially flat, yeah |
| 16:56 | mpan | that sounds cool |
| 16:56 | mpan | thanks for the idea! |
| 16:56 | aperiodic | sure thing |
| 16:59 | Sgeo | ,(require 'clojure.core.logic) |
| 16:59 | clojurebot | #<RuntimeException java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/core/logic__init.class or clojure/core/logic.clj on classpath: > |
| 16:59 | Sgeo | Aww |
| 17:00 | casion | using zippers for managing trees in GA… |
| 17:00 | casion | that sounds fun |
| 17:00 | mpan | for which definition of fun? |
| 17:01 | casion | I guess my own warped defitinion? |
| 17:01 | casion | except not mistyped |
| 17:01 | mpan | because, I swear, my classmates use "sounds fun" as a code word for "you're f---ed" |
| 17:01 | casion | I meant I'm going to mess with that this evening, it sounds very useful |
| 17:02 | mpan | cool |
| 17:02 | mpan | I dunno how I can generate visualizations though |
| 17:02 | mpan | like I could write a great algo and I'd never realize it |
| 17:03 | casion | right now I keep a map of leaves |
| 17:03 | casion | so I have a separate data structure that gives me terminal nodes and their parent's location |
| 17:04 | casion | I thought it was kind of clever… which always leads me to think it's probably wrong :) |
| 17:04 | mpan | I mean, matlab has what I want |
| 17:04 | mpan | but I can't even shell out to matlab |
| 17:04 | mpan | I'd have to use text files and sneakernet |
| 17:05 | casion | isn't there an octave package somewhere? |
| 17:05 | mpan | oh damn, octave has it |
| 17:05 | mpan | nice |
| 17:05 | casion | :) |
| 17:05 | mpan | nice catch |
| 17:06 | mpan | still nontrivial, but at least it's localized to one machine now |
| 17:06 | casion | aperiodic: I'm dealing with contextual fitness :( |
| 17:07 | mpan | what about some xform of fitness rank? |
| 17:07 | aperiodic | in that you need an opponent's build order in order to define the fitness? |
| 17:07 | mpan | for my previous project in this class, I did exponential-decay-with-rank |
| 17:07 | mpan | wait, are you optimizing starcraft build-orders? |
| 17:07 | casion | yes |
| 17:07 | mpan | whoo |
| 17:07 | casion | aperiodic: I'm trying to allow the user to 'fuzzy match' based on resources |
| 17:07 | mpan | that's one of the things that got me into the field |
| 17:08 | casion | mpan: evo chamber? |
| 17:08 | mpan | well, the hype surrounding it |
| 17:08 | casion | ahaha ;) |
| 17:08 | casion | well neat |
| 17:08 | mpan | from the human player perspective, that is a scary build to see |
| 17:09 | casion | aperiodic: so all absolute fitness is relative to any other build generated that may have generated more resources |
| 17:09 | mpan | how do you define a "fuzzy match"? |
| 17:09 | casion | I can't use time as a massive fitness multiplier to give a near absolute goal anymore like was done in evo chamber |
| 17:09 | mpan | sounds like you may be able to have an absolute fitness nonetheless |
| 17:10 | mpan | if you just have a tradeoff between resource goal satisfaction vs time |
| 17:10 | casion | mpan: 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:10 | casion | I had that sort of working in evo chamber with worker production constraints |
| 17:10 | mpan | as in "a build order that achieves given goal G"? |
| 17:10 | casion | but it was sloppy |
| 17:11 | mpan | but add in "and allow extra time if I can get resources X"? |
| 17:11 | casion | mpan: the goal is weighted against the fastest generated build |
| 17:11 | mpan | casion: is that necessary though? |
| 17:11 | casion | so in that case, all fitness becomes relative to the nodes with the fastest times |
| 17:11 | casion | yes |
| 17:12 | mpan | I mean, there's a similar metric of just penalizing time in general? |
| 17:12 | casion | in 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:12 | mpan | and the fastest naturally win that metric, because everything scoring even better gets penalized for feasibility |
| 17:13 | casion | to deal with that and not explicitly require going over the horizon, you can weigh against earned and potentially earned resources |
| 17:14 | mpan | I had an idea but I think it degenerates |
| 17:14 | casion | more or less just trying to deal with the horizon effect creeping in… which is weird I guess |
| 17:15 | mpan | because my idea would almost always answer "fast build that satisfies minimum" or "keep building indefinitely until food cap" |
| 17:15 | casion | yeah |
| 17:15 | Hodapp | hmm, are deftype and defrecord fairly well the same if I've no interest in mutable fields? |
| 17:15 | mpan | Hodapp: someone showed me http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ the other day |
| 17:16 | mpan | casion: also, fastest time to 32 drones is solvable greedily |
| 17:16 | mpan | it's only when you introduce military vs economy tradeoffs that it becomes a difficult problem |
| 17:17 | casion | mpan: yes, but the problem is that the user is not asking the question they want answered |
| 17:17 | mpan | hm? |
| 17:17 | Hodapp | mpan: Hmm, thanks |
| 17:18 | Hodapp | however I'm stuck at the diamond between deftype and defrecord along the top path because I'm not sure what I want, hah |
| 17:18 | mpan | it's possible you may be happy with both in a given use case |
| 17:18 | mpan | with either* |
| 17:18 | casion | mpan: 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:19 | dnolen | Hodapp: defrecord is easier to use since it implements a bunch of things out of the box. |
| 17:19 | mpan | define "most economic build" |
| 17:19 | dnolen | Hodapp: deftype comes w/ very little. |
| 17:19 | casion | mpan: you can't without very explicit goals… that's exactly the problem I'm trying to solve |
| 17:19 | Hodapp | I suppose I'll use defrecord and just see how things go |
| 17:21 | casion | mpan: 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:22 | casion | it would ideally return a slower 3 hatch build that has a weighted fitness greater than the fastest 2 hatch build |
| 17:22 | mpan | casion: that sounds like you're getting deep into domain knowledge as well as situational decisions |
| 17:22 | casion | but not fail slow if they asked for 44 drones (which is ideal) |
| 17:23 | casion | mpan: yes, but I'm trying to solve it in a more general way |
| 17:23 | casion | which maybe a mistake? but it seems worth trying |
| 17:23 | mpan | let me ask you, as a player: why is 2 hatch 48 drone bad? |
| 17:23 | casion | maximum saturation occurs at 22 workers per base |
| 17:23 | mpan | sadly the answer is domain knowledge |
| 17:23 | casion | yes |
| 17:24 | mpan | taking that to the extreme |
| 17:24 | mpan | requires not just game knowledge but metagame knowledge |
| 17:24 | mpan | I mean, would you consider 14cc to be "bad"? |
| 17:25 | casion | we're getting out of clojure land… should probably move channels or PM :) |
| 17:25 | mpan | oops |
| 17:25 | mpan | sorry, I was just trying to give a concrete example |
| 17:25 | mpan | of why I feel like you're stepping into "encoding domain knowledge" land |
| 17:25 | mpan | if you want to continue in PM that would be fine |
| 17:26 | casion | last 2 times this came up I had requestes to spam the channel with it when it goes out into general discussion |
| 17:26 | casion | to NOT spam* haha :) |
| 17:26 | mpan | aha |
| 17:28 | Sgeo | Hmm, Delay is implemented in Java. Any particular reason? |
| 17:28 | Sgeo | More efficient I guess? |
| 17:39 | Sgeo | I'm sure I've asked, but what does the :static metadata do? |
| 17:40 | dnolen | Sgeo: nothing anymore |
| 17:41 | raek_ | I think it was used in some development version between clojure 1.2 and 1.3 |
| 17:41 | Sgeo | o.O what did it used to do? |
| 17:41 | Sgeo | Because I still see it in the Clojure source on Github |
| 17:41 | raek_ | I think it did what :dynamic now inhibits |
| 17:42 | Sgeo | Wait, :dynamic inhibits rather than allows? |
| 17:43 | Sgeo | And I still don't understand why arglists is metadata on a var rather than the fn |
| 17:43 | Raynes | Sgeo: He is saying that the normal state of vars is to be static, and dynamic makes them… dynamic and no longer static. |
| 17:44 | raek_ | what Raynes said... :) |
| 17:45 | Sgeo | Hmm, butlast isn't lazy |
| 17:45 | Sgeo | ? |
| 17:46 | Raynes | Sgeo: See drop-last. |
| 17:46 | Raynes | &(drop-last [1 2 3 4]) |
| 17:46 | lazybot | ⇒ (1 2 3) |
| 17:46 | Raynes | And is lazy. |
| 17:46 | Raynes | Why both versions exist is beyond my realm of expertise. |
| 17:47 | Sgeo | Can 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:49 | raek_ | Sgeo: the laziness is not in the function application. |
| 17:50 | raek_ | only sequences can be lazy and such a sequence is made using the 'lazy-seq' macro |
| 17:51 | raek_ | ,(first (lazy-seq (cons 1 (lazy-seq (throw (Exception. "_|_")))))) |
| 17:52 | clojurebot | 1 |
| 17:53 | Sgeo | ,((fn [&env] &env)) |
| 17:53 | clojurebot | #<ArityException clojure.lang.ArityException: Wrong number of args (0) passed to: sandbox$eval57$fn> |
| 17:53 | Sgeo | ,((fn [&env] &env) 5) |
| 17:53 | clojurebot | 5 |
| 17:53 | Sgeo | Blah? |
| 17:54 | raek_ | &env only has special meaning in macros |
| 17:54 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: env in this context |
| 17:54 | Sgeo | ,(macrolet [(getenv [&env] env)] (getenv)) |
| 17:54 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: macrolet in this context, compiling:(NO_SOURCE_PATH:0)> |
| 17:55 | Sgeo | ,(use 'clojure.tools.macros) |
| 17:55 | clojurebot | #<RuntimeException java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/tools/macros__init.class or clojure/tools/macros.clj on classpath: > |
| 17:55 | Scriptor | Sgeo: for lazy function application you'd use delay |
| 17:55 | Sgeo | ,(use 'clojure.tools.macro) |
| 17:55 | clojurebot | #<RuntimeException java.lang.RuntimeException: java.io.FileNotFoundException: Could not locate clojure/tools/macro__init.class or clojure/tools/macro.clj on classpath: > |
| 17:55 | Gosh | is there a way to check if loading a namespace was successful? |
| 17:55 | Scriptor | which is basically a fancy way to wrap something in an anonymous function |
| 17:55 | Sgeo | &(use 'clojure.tools.macro) |
| 17:55 | lazybot | ⇒ nil |
| 17:55 | Sgeo | &(macrolet [(getenv [&env] env)] (getenv)) |
| 17:55 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: env in this context |
| 17:56 | Sgeo | &(macrolet [(getenv [&env] &env)] (getenv)) |
| 17:56 | lazybot | clojure.lang.ArityException: Wrong number of args (-2) passed to: sandbox64117$eval99553$getenv |
| 17:56 | Sgeo | ...-2? |
| 18:00 | Sgeo | &(macrolet [(getenv [] &env)] (getenv)) |
| 18:00 | lazybot | java.lang.RuntimeException: Unable to resolve symbol: &env in this context |
| 18:02 | Sgeo | What am I missing here? |
| 18:02 | Sgeo | &(macrolet [(getenv [&env] &env)] (getenv 5)) |
| 18:02 | lazybot | ⇒ 5 |
| 18:03 | Sgeo | :/ |
| 18:03 | Gosh | does anyone use maven? |
| 18:10 | Frozenlock | Is there a more idiomatic way to get back data from the local storage than using cljs.reader/read-string? |
| 18:18 | Sgeo | I'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:20 | mpan | the ability to eval an expr from a part of a file into a repl is very convenient |
| 18:20 | mpan | idk how you want to replicate that |
| 18:22 | Sgeo | Hmm, yeah, especially considering that that's one of the reasons I'm moving away from Haskell (the other is easy macros) |
| 18:23 | mpan | if you find something convenient and graphically-oriented, I'd love to know about it |
| 18:24 | SegFaultAX | Sgeo: Are vim or emacs (or even light table) not good enough? |
| 18:24 | Sgeo | nrepl.el and clojure-mode don't seem to put menus in Emacs, implying that I'd have to memorize the relevent keybindings |
| 18:25 | Sgeo | Never used vim except when I had to in class |
| 18:25 | Sgeo | I was under the impression that light table isn't really production ready yet |
| 18:25 | mpan | yea I'd personally prefer something more graphical and mouse-based |
| 18:25 | xeqi | emacs w/ counterclockwise? |
| 18:26 | xeqi | blah |
| 18:26 | xeqi | * eclipse w/ clounterclockwise |
| 18:26 | sunkencityryleh | does any of the vim plugs work with nrepl? |
| 18:26 | Sgeo | I'm on 2GB of RAM, and stuff has a tendency to freeze and crash |
| 18:27 | SegFaultAX | sunkencityryleh: vimclojure+nailgun is a sweet combo. |
| 18:29 | mpenet | Sgeo: if you need menus you could use clojure-mode with slime |
| 18:30 | SegFaultAX | I didn't know emacs had menus. |
| 18:30 | sunkencityryleh | SegFaultAX: 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:30 | Sgeo | mpenet, is that more difficult to set up than nrepl.el? |
| 18:31 | SegFaultAX | I should clarify that I'm a vim user. I've used emacs for less than 10 hours in my entire life. |
| 18:31 | mpenet | SegFaultAX: almost nobody uses them but you can have them from a gtk setup if you run menu-mode or somethign |
| 18:31 | sunkencityryleh | it kept moving windows around and popping new windows etc |
| 18:31 | mpenet | Sgeo: yes, kind of |
| 18:31 | Sgeo | :/ |
| 18:32 | mpenet | Sgeo: if I was you I would just learn the half dozen useful shortcuts instead |
| 18:32 | mpenet | and be done with it |
| 18:32 | mpenet | I mean to use nrepl/clojure-mode, then spend the next 10 years learning more and loving emacs |
| 18:34 | SegFaultAX | I just assumed all the hardcore emacs users used keyboard shortcuts for /everything/ |
| 18:35 | Sgeo | Who said I was hardcore? |
| 18:35 | Iceland_jack | SegFaultAX: sometimes the menu is nice to get an overview of the most "important" commands for new modes |
| 18:35 | SegFaultAX | Iceland_jack: Don't all emacs plugins come with online documentation though? |
| 18:35 | Sgeo | I 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:35 | mpenet | SegFaultAX: or when you kb config is borked for whatever reason (foreign layout) |
| 18:36 | Iceland_jack | SegFaultAX: They do, sometimes it's nice to get a nice overview of though |
| 18:36 | Iceland_jack | I sometimes use it for agda-mode since I can't for the life of me remember all those whacky commands |
| 18:36 | mpenet | Sgeo: just grab a started kit, such as technomancy's and you can go from there. it is really worth the effort |
| 18:36 | mpenet | starter* |
| 18:37 | Sgeo | I already have emacs installed (from the website), how will the starter interfere? |
| 18:37 | SegFaultAX | Iceland_jack: Oh yea, that's pretty useful! |
| 18:37 | Sgeo | I think I have too many Emacs copies on this system |
| 18:37 | SegFaultAX | Sgeo: It's probably just a bunch of additional configuration. |
| 18:37 | zoldar | SegFaultAX: 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:37 | SegFaultAX | Sgeo: Really though, it would behoove you to really learn one of the standard *nix editors. |
| 18:38 | SegFaultAX | zoldar: It's better than the inverse: vile. :) |
| 18:39 | mpenet | Sgeo: 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:39 | zoldar | SegFaultAX: from what I see, that's a completely separate, hybrid-like editor |
| 18:40 | SegFaultAX | I'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:40 | Scriptor | is there any integration of viper-mode with paredit? |
| 18:41 | zoldar | Sgeo: and most popular IDEs have support/emulation for either emacs or vim or both in terms of behavior and key bindings |
| 18:41 | zoldar | Scriptor: for me it just worked without any additional fiddling |
| 18:41 | SegFaultAX | vi bindings are considerably more rare than emacs bindings, though. |
| 18:41 | SegFaultAX | vi being a modal editor, and all. |
| 18:42 | Raynes | zoldar: Why not evil-mode? |
| 18:42 | mpenet | emacs bindings are also used in terminals, also almost everywhere on osx I believe |
| 18:42 | mpenet | well, at least some of them |
| 18:42 | SegFaultAX | mpenet: bash is set to emacs mode by default on most systems, but can be toggled to vi mode. |
| 18:42 | zoldar | SegFaultAX: true, hovewer in most cases there are some third party additions at least that attempt supporting it |
| 18:42 | SegFaultAX | zoldar: Yup. |
| 18:42 | mpenet | SegFaultAX: oh, I didn't know |
| 18:43 | zoldar | Raynes: didn't know about this one, thanks! |
| 18:43 | Raynes | zoldar: I've been using evil-mode for a long time. It's pretty great. |
| 18:44 | ToxicFrog | evil-mode? |
| 18:44 | SegFaultAX | Sgeo: 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:44 | Raynes | It's the successor of all previous vi-emulation modes. |
| 18:44 | Sgeo | What I listed doesn't count as good working knowledge? |
| 18:44 | Raynes | I got into both Emacs and Vim. |
| 18:44 | SegFaultAX | Sgeo: That's tutorial page 1 knowledge. |
| 18:45 | ToxicFrog | My 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:45 | Raynes | FWIW, I haven't touched my configuration in a good 2 months. |
| 18:45 | Raynes | And then it was to add a new plugin. |
| 18:46 | SegFaultAX | Same |
| 18:46 | mpenet | idem |
| 18:46 | SegFaultAX | https://github.com/SegFaultAX/vim-dotfiles |
| 18:46 | SegFaultAX | You'll notice almost all the action is in bundle/ which is my plugin directory. |
| 18:47 | hoover_damm | in my experience people care too much about their editors and how they look |
| 18:47 | ToxicFrog | vim I haven't used in much longer than emacs. Possibly I should give it another try at some point. |
| 18:47 | zoldar | that reminds what a mess my emacs configuration is and that I should eventually do something with it but well... |
| 18:47 | SegFaultAX | hoover_damm: It becomes an obsession, I'll admit. :) |
| 18:47 | ToxicFrog | Of late I've just been using IDEA, which is nice if you have 2-3GB of free memory. |
| 18:47 | hoover_damm | SegFaultAX, then curb it |
| 18:47 | SegFaultAX | hoover_damm: Why? |
| 18:48 | hoover_damm | SegFaultAX, well obsession is bad... having a passion is good follow it |
| 18:48 | SegFaultAX | hoover_damm: I enjoy it and I feel it makes me more productive. What difference does it make? |
| 18:48 | SegFaultAX | hoover_damm: Don't be pedantic, you know what I meant. I enjoy tuning up my editor, is all. |
| 18:49 | devn | heh zoldar -- dont waste any time on your emacs config |
| 18:49 | hoover_damm | most people tweek and tune their editor before they understand what they're tuning |
| 18:49 | devn | ive been there too many times now. just make a mess and keep working |
| 18:49 | hoover_damm | or what they hope to achieve |
| 18:49 | Scriptor | I'm still on a quest to be good at both |
| 18:49 | casion | hoover_damm: people do that do everything |
| 18:49 | hoover_damm | indeed they do |
| 18:49 | Scriptor | if people can master different instruments, why not editors? |
| 18:50 | hfaafb_ | Are editors instruments? |
| 18:50 | hoover_damm | if you master an editor, and it changes... are you still a master? |
| 18:50 | hfaafb_ | Or tools... |
| 18:50 | SegFaultAX | hfaafb_: What's the difference? |
| 18:50 | Scriptor | hfaafb_: in this case, it's about the application of muscle memory, I think |
| 18:50 | Raynes | They are toolstruments. |
| 18:50 | mpenet | nice |
| 18:50 | SegFaultAX | (inc Raynes) |
| 18:50 | lazybot | ⇒ 18 |
| 18:51 | devn | i use vim and emacs. im fairly mediocre at both. i can write elisp way better than I can write vimscript (pukes blood) |
| 18:52 | Raynes | devn: You and I are like hybrid werewolves and vampires. |
| 18:52 | devn | vim for ruby and rails because, well, the plugin support is just 10x better |
| 18:52 | SegFaultAX | devn: In fairness, vimscript is a remarkably ugly language. |
| 18:52 | devn | emacs for pretty much everything else |
| 18:52 | devn | vim pukes on big files, emacs has no trouble, etc. |
| 18:53 | devn | Raynes: i howl at the moon in elisp |
| 18:53 | hoover_damm | devn, I've been using unix for over 20 years... started with ed, learned vi, progressed to vim... learned emacs |
| 18:53 | Raynes | You're old. |
| 18:53 | hoover_damm | devn, it's better to have a good general skill level and then build up in most things |
| 18:53 | SegFaultAX | hoover_damm: Then you'll appreciate this: http://www.gnu.org/fun/jokes/ed-msg.html |
| 18:53 | hoover_damm | devn, that way when things change it's easier to adapt |
| 18:53 | Scriptor | I wonder if * -> vimscript compilers would have ever been popular |
| 18:53 | hoover_damm | Raynes, nah |
| 18:53 | devn | yeah, hoover_damm -- when i hop on a remote machine, vi all the way |
| 18:53 | Raynes | Scriptor: You can write plugins in Ruby, Python, etc. |
| 18:54 | SegFaultAX | Scriptor: There's an idea. Clojurescript to vimscript. |
| 18:54 | Raynes | Scriptor: My refheap vim plugin is mostly ruby. |
| 18:54 | Scriptor | Raynes: true, but are the bindings for those widespread? |
| 18:54 | hoover_damm | devn, well when it comes to pairing (remote) i'm a big fan of tmux + emacs |
| 18:54 | nybbles_ | anyone know if clojurescript One has a way of generating a fresh project? i want a blank slate! |
| 18:54 | hoover_damm | devn, there really isn't anything better |
| 18:54 | devn | that's my issue with writing vimscript that requires i compile vim myself or with support for another lang or something |
| 18:55 | devn | it begins to feel like im writing ruby in clojure or something |
| 18:55 | devn | it just feels sort of wrong |
| 18:55 | SegFaultAX | devn: Huh? |
| 18:55 | devn | SegFaultAX: vim is not always compiled with ruby support |
| 18:55 | hoover_damm | it is wrong actually |
| 18:55 | hoover_damm | but most people don't see it |
| 18:55 | SegFaultAX | devn: What does that have to do with vimscript? |
| 18:56 | hoover_damm | and with ruby 2.0 ... |
| 18:56 | devn | SegFaultAX: Raynes was mentioning that you can write vimscript with ruby |
| 18:56 | hoover_damm | ruby support's gonna be even more fun |
| 18:56 | SegFaultAX | devn: You can write vim plugins with Ruby. |
| 18:56 | devn | heh, i know |
| 18:56 | devn | im saying that it's not universal |
| 18:56 | casion | you can write emacs plugins with a mixture of any language... |
| 18:56 | casion | assuming liberal demented use of org-babel |
| 18:57 | devn | haha oh man |
| 18:57 | devn | that's wrong too |
| 18:57 | devn | plain elisp or plain vimscript or nothing for me |
| 18:57 | SegFaultAX | devn: The problem with that (in the case of vimscript) is it makes some things a lot more challenging. |
| 18:58 | casion | what kind of monster would cut up a cow, butcher it, grind it, cook it, and combine it with 30 other ingredients |
| 18:58 | devn | SegFaultAX: right. but the problem with removing that challenge is that your work is far less portable |
| 18:58 | casion | that sounds awful |
| 18:58 | casion | (or like a hamburger) |
| 18:58 | SegFaultAX | devn: Command-t comes to mind as something that would be impossibly hard to write im vimscript. |
| 18:58 | devn | yeah, but why even use that? there are other vimscript plugins that have been written |
| 18:58 | SegFaultAX | devn: vim compiled with --enable-pythoninterp and/or --enable-rubyinterp is common enough. |
| 18:59 | devn | SegFaultAX: not on remote machines i dont have control over |
| 18:59 | SegFaultAX | devn: Then build it yourself and install locally? |
| 18:59 | devn | im for customization, but there's a limit to how far im personally willing to take it |
| 18:59 | SegFaultAX | devn: Or disable those plugins? |
| 18:59 | Raynes | devn: 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:59 | Raynes | Would not have even tried. |
| 18:59 | Raynes | Not that many people use it or care about it. |
| 18:59 | Raynes | But it'd be a loss for those who do use it. |
| 19:00 | Raynes | This is nazi stuff. Master race crap, no interbreeding. |
| 19:00 | Raynes | :p |
| 19:00 | devn | Raynes: 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:00 | Sgeo | What's Command-t? |
| 19:00 | casion | we're in #clojure, complaining about language intermingling is incredibly ironic |
| 19:00 | Raynes | I bet you write your HTML in CSS, devn. |
| 19:01 | SegFaultAX | Sgeo: Emulation of a very cool feature from TextMate. |
| 19:01 | devn | because when i go to clone it on some remote machine im booting up, it's bitten me |
| 19:01 | Sgeo | What does the feature do? |
| 19:01 | SegFaultAX | Sgeo: Google is your friend here. |
| 19:01 | Raynes | devn: If those plugins don't have the standard 'if ruby support exists, do…" you should open an issue. |
| 19:02 | SegFaultAX | Sgeo: https://wincent.com/products/command-t |
| 19:02 | Raynes | It does google. |
| 19:02 | Raynes | :P |
| 19:02 | devn | casion: fair point |
| 19:02 | casion | Sgeo: ido-mode is more or less the same |
| 19:02 | Raynes | Except not at all. |
| 19:03 | Raynes | ido-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:03 | casion | what's that other one…. icicle? |
| 19:03 | Raynes | command-t is very useful for its specific purpose, which is finding files in a project directory or similar. |
| 19:03 | casion | I use ido-mode, but I know there's another thing that contains similar stuff |
| 19:03 | Raynes | ido-mode is more generally useful for navigation. |
| 19:03 | Raynes | icicle iirc |
| 19:04 | devn | casion: yeah i think Raynes is right, icicle |
| 19:04 | SegFaultAX | Raynes: I've never used it. Is it something like command-t + nerdtree? |
| 19:04 | devn | there might be another one as well |
| 19:04 | casion | devn: you mean I'm right ;) |
| 19:04 | devn | SegFaultAX: you hit command+t, it shows you a list of files and has fancy auto-complete |
| 19:04 | Raynes | SegFaultAX: It's really hard to explain. Maybe find a screencast that shows how it works? |
| 19:05 | devn | the files are specific to the project you're working in |
| 19:05 | Raynes | devn: He meant ido-mode. |
| 19:05 | devn | oh, ido-mode is a lot of stuff |
| 19:05 | Raynes | Don't try to explain it! Only screencasts and first hand experience does it justice. |
| 19:05 | Raynes | :p |
| 19:05 | mpenet | you can do the same with ido-mode + some elisp, plenty of modes that allow to do more or or less the same |
| 19:05 | cgag | what'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:06 | devn | (remove empty? seq) i think |
| 19:06 | Raynes | Either of those is fine. |
| 19:06 | mpenet | (filter identity something) also |
| 19:06 | Raynes | cgag: Best is to not get nils in there in the first place, if possible. |
| 19:07 | SegFaultAX | Ah, so it's similar to command-t, if it was also extended over buffers. |
| 19:07 | SegFaultAX | And commands, apparently. |
| 19:08 | Sgeo | mpenet, filter identity will remove falses also |
| 19:08 | mpenet | true |
| 19:08 | Sgeo | ,(filter identity [nil false 5]) |
| 19:08 | clojurebot | (5) |
| 19:08 | devn | ,(remove empty? ["" nil "hello"]) |
| 19:08 | clojurebot | ("hello") |
| 19:08 | SegFaultAX | I use a combination of 2 plugins to do this. command-t and fuzzy finder. |
| 19:08 | devn | ,(remove empty? ["" nil 1]) |
| 19:08 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Long> |
| 19:08 | devn | :( |
| 19:09 | Sgeo | ,(filter (complement nil?) [nil false 5]) |
| 19:09 | clojurebot | (false 5) |
| 19:09 | devn | ,(remove nil? ["" nil "hello"]) |
| 19:09 | clojurebot | ("" "hello") |
| 19:09 | devn | ,(remove nil? ["" nil "hello" 1]) |
| 19:09 | clojurebot | ("" "hello" 1) |
| 19:09 | SegFaultAX | ,(remove boolean ["" nil "hello" 0 1]) |
| 19:09 | clojurebot | (nil) |
| 19:09 | devn | interesting :) |
| 19:10 | SegFaultAX | ,(remove (complement boolean) ["" nil "hello" 0 1]) |
| 19:10 | clojurebot | ("" "hello" 0 1) |
| 19:10 | Sgeo | ,(doc boolean) |
| 19:10 | clojurebot | "([x]); Coerce to boolean" |
| 19:10 | SegFaultAX | ,(remove not ["" nil "hello" 0 1]) |
| 19:10 | clojurebot | ("" "hello" 0 1) |
| 19:11 | devn | Raynes: refheap is cool btw |
| 19:11 | Raynes | devn: o/ |
| 19:12 | casion | are there public language usage stats on refheap? |
| 19:12 | Raynes | No, 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:23 | Sgeo | I'm going to see if maybe Eclipse won't cause me as much RAM pain as I'm afraid of |
| 19:26 | zoldar | Sgeo: I'm afraid you me be disappointed... |
| 19:27 | zoldar | *may |
| 19:29 | SegFaultAX | Eclipse is pretty RAM hungry. |
| 19:29 | zoldar | but a lot in that regard depends on third party additions, so not all is lost |
| 19:30 | SegFaultAX | Vanilla eclipse is pretty RAM hungry. For only 2gigs, that might be tight. |
| 19:30 | pandeiro | how can i specify an empty string for the :quote value with clojure.data.csv/read-csv ? |
| 19:31 | mpenet | Sgeo: just curious, what editor did you use for Haskell? |
| 19:31 | Sgeo | I think Notepad++ or JEdit. I remember using JEdit when I was working on a Haskell project on campu |
| 19:32 | Sgeo | campus |
| 19:32 | Sgeo | Don't really remember what I used at home, but I was on Linux then |
| 19:32 | Sgeo | So probably gedit or something similar like that |
| 19:34 | Sgeo | Well, this is not encouraging in terms of ability to use Eclipse |
| 19:34 | Sgeo | Made the project, but nothing showed up under it in the thing on the left |
| 19:34 | casion | Sgeo: why can't you just use linux? |
| 19:35 | SegFaultAX | Gave up on eclipse in 30 seconds. Wow. |
| 19:35 | casion | SegFaultAX: that's not even a record ;) |
| 19:35 | Sgeo | Because 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:36 | casion | and dual boot is not possible? |
| 19:36 | Sgeo | It is I guess, but I'm lazy |
| 19:36 | SegFaultAX | Or running Linux inside of windows? |
| 19:36 | zoldar | Sgeo: there's always something like gaikai.com ;) |
| 19:37 | casion | Sgeo: not lazy enough to avoid all this hassle getting a working environment ;) |
| 19:39 | aperiodic | i'm dumb |
| 19:40 | SegFaultAX | aperiodic: It happens. |
| 19:40 | Frozenlock | aperiodic: Stop being me. |
| 19:46 | SegFaultAX | If I wanted to write a 2d game, what are good libraries to look into? |
| 19:46 | SegFaultAX | Particularly for doing 2d graphics. |
| 19:48 | zoldar | SegFaultAX: ... Quil? (wrapper for processing) - just guessing, I haven't done anything with it yet |
| 19:49 | aperiodic | i would not recommend quil for games |
| 19:49 | SegFaultAX | aperiodic: What would you recommend? |
| 19:51 | aperiodic | quil 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:52 | aperiodic | SegFaultAX: honestly, the LWJGL, using openGL with z=0 everywhere |
| 19:53 | SegFaultAX | aperiodic: Are their GUI toolkits for LWJGL? |
| 19:53 | SegFaultAX | Argh, there. |
| 19:53 | zoldar | aperiodic: ztellman's penumbra provided nice wrapper for ljwgl, but from what I see, it's not longer maintained |
| 19:53 | aperiodic | zoldar: oh, i thought penumbra was just for drawing |
| 19:54 | Sgeo | Oh wait, even without emacs with a nice REPL, I could require reload namespaces, right? |
| 19:54 | zoldar | aperiodic: well example apps are tetris and asteroids ;) |
| 19:54 | aperiodic | SegFaultAX: http://lwjgl.org/wiki/index.php?title=Game_Engines_and_Libraries_Using_LWJGL#GUI_Libraries |
| 19:54 | Sgeo | And I assume it keeps things that I've done in the REPL, as long as there isn't a collision of namespaces? |
| 19:55 | Sgeo | That's still better than what I'm used to in Haskell, even though I think it's improving in recent GHCi |
| 19:55 | aperiodic | i 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:55 | aperiodic | which could just be my own incompetence! |
| 20:07 | Sgeo | Do I need to install some sort of Java EE JDK or JRE to use Immutant? |
| 20:15 | Sgeo | ,(class '(1 2 3)) |
| 20:15 | clojurebot | clojure.lang.PersistentList |
| 20:15 | Sgeo | ,(isa? '(1 2 3) IPersistantList) |
| 20:15 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: IPersistantList in this context, compiling:(NO_SOURCE_PATH:0)> |
| 20:16 | Sgeo | ,(isa? '(1 2 3) clojure.lang.IPersistantList) |
| 20:16 | clojurebot | #<CompilerException java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.lang.IPersistantList, compiling:(NO_SOURCE_PATH:0)> |
| 20:16 | Sgeo | ,(isa? '(1 2 3) clojure.lang.IPersistentList) |
| 20:16 | clojurebot | false |
| 20:16 | Sgeo | ?? |
| 20:16 | lazybot | Sgeo: What are you, crazy? Of course not! |
| 20:16 | Sgeo | ,(satisfies? '(1 2 3) clojure.lang.IPersistentList) |
| 20:16 | clojurebot | #<NullPointerException java.lang.NullPointerException> |
| 20:17 | Sgeo | ,(class (map identity '(1 2 3))) |
| 20:17 | clojurebot | clojure.lang.LazySeq |
| 20:18 | Sgeo | https://github.com/clojure/algo.generic/blob/1381315259c3c5ca8b8deec9e094bcf70742fbb9/src/main/clojure/clojure/algo/generic/functor.clj#L19 |
| 20:18 | Sgeo | Someone want to tell Konrad Hinsen that the result of map is not an IPersistentList? |
| 20:21 | SegFaultAX | Sgeo: Huh? |
| 20:22 | zoldar | ,(type (seq (map identity '(1 2 3))) |
| 20:22 | clojurebot | #<ExecutionException java.util.concurrent.ExecutionException: java.lang.RuntimeException: EOF while reading> |
| 20:22 | zoldar | ,(type (seq (map identity '(1 2 3)))) |
| 20:22 | clojurebot | clojure.lang.Cons |
| 20:22 | Sgeo | fmap 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:22 | Sgeo | Not sure if Konrad might consider that the same "kind", though, which I guess might make some sense? |
| 20:24 | unlink | I would really appreciate something in the core equivalent to #(every? identity %) |
| 20:25 | Sgeo | (partial every? identity) |
| 20:27 | unlink | Yes, that would be nice to have in core. |
| 20:39 | Sgeo | Is JEdit any good with Clojure? |
| 20:39 | uvtc | Sgeo: When I tried it, indentation didn't work as I wanted it to. |
| 20:47 | amalloy | unlink: 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:49 | unlink | amalloy: Yes, ball of mud is exactly the clojure philosophy. Glom more on when it makes the common case clearer and more explicit. |
| 20:50 | unlink | amalloy: Witness if, when, if-not, when-not, if-let, when-let. Highly non-orthogonal, yet I use all of them frequently. |
| 20:52 | Sgeo | There's a pattern to the naming |
| 20:53 | SegFaultAX | unlink: 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:54 | unlink | SegFaultAX: But surely you don't need when given that if lets you omit its else form! |
| 20:55 | cheburaksha | is it possible to do live programming in Eclipse? |
| 20:55 | SegFaultAX | unlink: 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:56 | SegFaultAX | In other words, omitting the else for an if expression should be invalid. |
| 20:57 | cheburaksha | anyone heard of live programming in clojure? |
| 21:02 | antares_ | cheburaksha: live means in the REPL? that's basically how most people work with Clojure |
| 21:18 | Sgeo | Is it reasonable to use a fairly vanilla text editor and just require :reload repeatly in the REPL? |
| 21:18 | jkkramer | sounds tedious |
| 21:20 | jkkramer | vanilla text editors tend to be bad at lisp indentation |
| 21:24 | amalloy | Sgeo: entirely reasonable |
| 21:25 | amalloy | it's not the best, but it avoids having to learn and configure thirty new things at once |
| 21:25 | Sgeo | And I imagine that it's still better than GHCi was? |
| 21:25 | Sgeo | Since bindings at the REPL should continue living? |
| 21:35 | xeqi | ahh, cyclic requires = sad |
| 22:08 | Sgeo | Does Clooj have any intention whatsoever of working with Leiningen? |
| 22:12 | clj_newb_2345 | what is the state of the art for webkit in swt in clojure on osx? is this possible yet? |
| 22:12 | clj_newb_2345 | i love clojure, but not clojurescript all that much; I love css + svg; but not the java gui all taht much |
| 22:13 | clj_newb_2345 | so I'd really like to do clojure programming but with a css + svg gui |
| 22:29 | dbasch | anyone here using noir? I'm trying to follow the "get started" guide but get an error |
| 22:30 | gtuckerkellogg | there was a very recent blog series of noir tutorials |
| 22:56 | Sgeo | About nREPL.el: Why is evaluating the form preceding point C-x C-e and not C-c C-e |
| 22:56 | Sgeo | It seems like a weird exception |
| 22:57 | scottj | you mean (+ 2 2)| C-x C-e? that's how slime and emacs lisp modes behave. |
| 22:58 | Sgeo | Hmm, any reason for starting it with C-x? |
| 22:59 | Sgeo | I'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:59 | scottj | not sure the exact conventions, C-c C-_ might be for users. |
| 23:00 | scottj | Sgeo: 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:01 | amalloy | scottj: C-c <letter> |
| 23:01 | clj_newb_2345 | how do I include org.eclipse/swt-*** as a lein dependency for osx ? |
| 23:02 | Sgeo | Is there any chance that SLIME might be _easier_ to use than nREPL? |
| 23:02 | amalloy | my guess is that C-c C-e is already used, and they thought the "e for eval" was important |
| 23:03 | scottj | I think nrepl uses it because slime does, and slime does because that's how you eval emacs lisp. |
| 23:04 | Sgeo | Does point have to be after the entire form, or can it be in the middle if it? |
| 23:04 | scottj | maybe there's a lisp-mode/inferior-lisp step in there |
| 23:04 | scottj | Sgeo: C-M-x evals top level form |
| 23:05 | scottj | Sgeo: I use C-M-S-x to eval form my point is in |
| 23:05 | scottj | not top-level ones that is |
| 23:05 | Sgeo | With emacs, to get into some lein project, I'm expected to run lein repl from the shell and connect to that? |
| 23:05 | Sgeo | Or what's the typical workflow? |
| 23:06 | Sgeo | (and nREPL.el) |
| 23:06 | Sgeo | And are there any breakpointing features? Or resume-from-exception features? |
| 23:07 | scottj | maybe nrepl-jack-in. I think ritz supports breakpoints with nrepl |
| 23:09 | scottj | I haven't switched to nrepl, I'm pretty happy with slime |
| 23:09 | Sgeo | I thought nrepl-jack-in was for making a new REPL independent of lein stuff |
| 23:10 | scottj | if it's like slime-jack-in, you go to the project.clj and it will create a repl for that project |
| 23:12 | Sgeo | Not entirely clear. But there is an option to give it a project root if given a prefix argument |
| 23:14 | amalloy | Sgeo: it can't do anything without lein |
| 23:17 | Sgeo | I still don't want to memorize keystrokes :( |
| 23:17 | Sgeo | Hmm, if I wished, could I start nREPL independently of lein, and connect to that? |
| 23:19 | Sgeo | Oh cool, the emacs tutorial detects changed keybindings |
| 23:19 | Sgeo | Wait, why is C-z undo? I pressed it out of habit... |
| 23:20 | scottj | why isn't it? or maybe you have cua-mode on |
| 23:21 | scottj | or rather, C-z isn't undo by default, but cua-mode makes it that. |
| 23:21 | Sgeo | Oh, thought cua was just C-v and C-x and C-C |
| 23:22 | Sgeo | (And the latter two just when region is selected) |
| 23:30 | amalloy | Sgeo: by default undo is bound to C-/ and C-_ |
| 23:30 | Sgeo | I had CUA mode enabled, must have enabled it in .emacs a while ago |
| 23:31 | Sgeo | Is there a way to make mouse-wheel scrolling smooth? |
| 23:31 | Sgeo | I should really just google things like that |
| 23:31 | casion | or use #emacs |
| 23:35 | clj_newb_2345 | how do I put -XstartOnFirstThread ito project.clj ? |
| 23:35 | Sgeo | Wait, if C-c C-r evalulates region, but CUA mode turns C-c into copy when a region exists... |
| 23:36 | Sgeo | Seems like a conflict :( |
| 23:39 | amalloy | Sgeo: cua is one giant conflict-introducer |
| 23:39 | amalloy | $google leiningen sample project.clj |
| 23:39 | lazybot | [leiningen/sample.project.clj at master · technomancy/leiningen ...] https://github.com/technomancy/leiningen/blob/master/sample.project.clj |
| 23:39 | Sgeo | amalloy, :( |
| 23:40 | scottj | Sgeo: you can just rebind the eval-region(?) comamnd |
| 23:40 | amalloy | otoh, i don't think i've ever used eval-region in my life |
| 23:40 | Sgeo | I could disable CUA |
| 23:40 | scottj | even better :) |
| 23:41 | Sgeo | Means 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:42 | amalloy | Sgeo: don't worry about the kill ring. just pretend it's cut/copy/paste |
| 23:42 | amalloy | C-w to cut, M-w to copy, C-y to paste |
| 23:42 | amalloy | you can do some slightly more sophisticated stuff but rarely need to |