« Back to channel list

#ruby - 11 April 2014

« Back 1 day Forward 1 day »
[00:00:00] baweaver: Not seeing a problem with that, quite handy
[00:00:02] baweaver: only in pry
[00:00:16] timgauthier: I want/need to show an excerpt of .compiled_content
[00:00:25] shevy: ok but why do we need .compiled_content
[00:00:36] timgauthier: journal.compiled_content outputs the enterty of the rendered post
[00:00:55] timgauthier: we where trying to figure out how to apply :excerpt too it
[00:01:16] shinobi_one: if excerpt does not exist, how can you "apply" it to it?
[00:01:17] timgauthier: I assumed you knew where the ship was going when you started explaining variables and hashes :P
[00:01:27] timgauthier: thats what I am starting to realize shinobi_one :P
[00:01:43] timgauthier: which is why I said maybe I need to define that as a method, or find the one that this guy used http://irclog.whitequark.org/nanoc/2014-03-22
[00:01:49] zorak: i have this line
[00:01:49] zorak: dir = "~/Chrono Cross OST/Disc 1"
[00:01:51] shinobi_one: compiled_content, outputs all of the html? everything?
[00:01:56] timgauthier: he was using it to do something else lol
[00:01:59] zorak: the folder have spaces
[00:02:00] timgauthier: yes shinobi_one
[00:02:04] timgauthier: well, sort of. its a partial
[00:02:17] shinobi_one: is it the actual content of the blog post? or all of the html
[00:02:18] timgauthier: everything that would go in <%= yield %>
[00:02:25] zorak: and when i try to open a file from the folder the vlc just brock
[00:02:44] shinobi_one: timgauthier: so it has html tags in it, no?
[00:02:47] timgauthier: so not the header/footer/nav, but the entire HTML partial
[00:02:49] timgauthier: yes it has html tags
[00:02:54] zorak: and try to open Chrono, Cross, OST, Disc and 1 how they was diferent files
[00:02:56] shevy: zorak did you try: File.expand_path(dir)
[00:02:57] timgauthier: i see where you are going.
[00:03:07] baweaver: A Nanoc Item hits the attributes hash when it indexes, ie @item[:excerpt] is hitting @item.attrubutes[:excerpt]
[00:03:22] timgauthier: that would give me a possibility for bad or broken tags if i just cut the rendered content, i need to render the content AFTEr i truncate it
[00:03:22] baweaver: backslash the space
[00:03:32] zorak: already try this dir = "~/Chrono\ Cross\ OST/Disc\ 1"
[00:03:41] zorak: but have the same problem
[00:03:45] timgauthier: where do you find that baweaver ?
[00:03:55] baweaver: perusing the source code
[00:04:01] timgauthier: lol, of course ok :)
[00:04:18] baweaver: gem install pry, you can too
[00:04:36] baweaver: pry is irb on some serious steroids.
[00:05:04] timgauthier: then you type pry to get into it? (like irb)
[00:05:41] baweaver: Then just: show-source Nanoc::Item#[]
[00:06:00] baweaver: Ignore the content_for part
[00:06:04] shevy: I always want to type beaver
[00:06:05] timgauthier: i guess i probably should open pry in the folder that i have nanoc init on? or how would i get to nanoc in pry?
[00:06:14] baweaver: you only want the @attributes[key]
[00:06:22] shevy: timgauthier probably require 'nanoc' first
[00:06:23] baweaver: require 'nanoc'
[00:06:30] timgauthier: thats how i say it shevy
[00:06:40] shevy: yeah... beaver
[00:06:43] baweaver: Heh, that's my brothers typical handle.
[00:06:45] shevy: I'm gonna call him beaver
[00:06:49] timgauthier: yup its gibberish
[00:07:07] baweaver: brandon a weaver
[00:07:16] baweaver: github handle
[00:07:41] timgauthier: yah i have no idea how to get past the first screen in pry
[00:07:58] timgauthier: i am at a : prompt :P
[00:08:14] baweaver: It kills all new unix users
[00:08:24] timgauthier: srsly :P its not as bad as vim
[00:08:53] timgauthier: so... i need to figure out how to get the content, before it renders, truncate it, then send it to render..
[00:08:57] baweaver: with tmux and vslime, quite useful
[00:09:00] combusean: vim is awesome because it's everywhere
[00:09:10] timgauthier: i use sublime 3 again, atom has too much stuff missing
[00:09:14] baweaver: ex sysadmin, you get used to it.
[00:09:16] combusean: it's a good editor to know if you do systems work
[00:09:33] combusean: it's a common editor for ruby here too
[00:09:37] baweaver: enough headless servers and you want to bludgeon the guy who says nano is useful
[00:09:41] timgauthier: what does key.to_s mean?
[00:09:49] shevy: you invoke the to_s method
[00:09:51] baweaver: key is the arg
[00:09:58] timgauthier: key.to_s =~ /^content_for_(.*)$/ does what?
[00:10:04] shevy: it is usually a string representation
[00:10:09] baweaver: Note: def [](key)
[00:10:14] shevy: ok, the first part means "give us back a string object", ok?
[00:10:23] shevy: the =~ is a regex check
[00:10:31] shevy: regexes are complicated unfortunately
[00:10:38] shevy: ^ means "start of line"
[00:10:39] baweaver: I'd only pay attention to that last line
[00:10:42] baweaver: if I were you
[00:10:47] timgauthier: @attributes[key]
[00:10:48] shevy: so this regex checks for leading content_for
[00:11:04] baweaver: considering you only care about :excerpt
[00:11:38] baweaver: I do love line 174 though
[00:11:41] timgauthier: so @attributes[key] ?
[00:11:51] baweaver: 174: # Get captured content (hax)
[00:11:55] timgauthier: how do you have 174 lines? i ... don't have that many
[00:12:03] timgauthier: oh, i just don't have line numbers
[00:12:05] baweaver: ah, clarify a bit, show-source -l shows line number
[00:12:26] combusean: show-source?
[00:12:27] timgauthier: :P so how do i pry(open) the attributes[key]?
[00:12:31] baweaver: Pry is one of the most useful tools you can use
[00:12:35] combusean: i fucking love pry!
[00:12:46] baweaver: I'm doing a conference talk on it
[00:13:04] timgauthier: that sounds like a boring talk :P
[00:13:22] baweaver: Depends on how much Ruby you work with
[00:13:27] combusean: timgauthier, if it sounds boring your life as a rubyist might be boring
[00:13:46] timgauthier: so far its a lot of frustration and asking questions on IRC but YMMV :P
[00:13:50] baweaver: I routinely use Pry and guard as a REPL combination.
[00:14:05] combusean: that's how i learned php 14 years ago timgauthier
[00:14:11] baweaver: Then again I also like Lisp, so definitely not the usual case.
[00:14:16] timgauthier: yeah, i've had more success with understanding PHP :S
[00:14:22] combusean: baweaver guard?
[00:14:31] timgauthier: but thats because it was a simple app
[00:14:40] baweaver: auto test runner
[00:14:48] timgauthier: ok, so how do i pry open the @attributes[key]?
[00:14:49] shevy: timgauthier that's why you must keep ruby simple
[00:14:50] baweaver: or rather watches files of certain patterns and executes things
[00:14:51] shevy: tame the beast
[00:14:56] shevy: don't let it become too complicated
[00:15:15] timgauthier: sadly i didn't have any choice since i am only doing ruby again because i didn't want to use PHP to do my own damn portfolio
[00:15:19] baweaver: normally by sticking a binding.pry in the code
[00:15:22] timgauthier: *shakes fist*
[00:15:40] timgauthier: how do you do a binding.pry?
[00:15:41] baweaver: As soon as the interpreter hits it, it'll freeze and open a pry prompt
[00:15:47] baweaver: literally stick that in the code.
[00:15:55] timgauthier: like where i've been trying to run commands?
[00:16:09] baweaver: As soon as the script executes
[00:16:14] baweaver: and it hits a binding.pry
[00:16:21] baweaver: it'll work like a break point
[00:16:47] baweaver: I do a lot of TDD and RSPEC, guard is invaluable.
[00:16:56] baweaver: especially with a 4000+ test suite.
[00:17:15] combusean: so you can run tests super fast?
[00:17:23] timgauthier: @attributes[key].binding.pry didn't work, so i may need more ELI5
[00:17:23] combusean: without waiting for the fucker to init?
[00:17:26] baweaver: On a per file basis
[00:17:39] combusean: so rake spec wouldn't work?
[00:17:44] baweaver: No no, you'd put a new line there
[00:17:54] baweaver: it'd still work
[00:17:55] timgauthier: this is an erb file
[00:18:19] combusean: timgauthier, but the binding.pry in your controller before the view
[00:18:27] combusean: it's "binding.pry" on its own before the data you want to inspect
[00:18:30] baweaver: <%= binding.pry %>
[00:18:33] timgauthier: i don't have access to that
[00:18:37] timgauthier: ok thanx beavs
[00:18:57] combusean: ACTION has never put pry in a view
[00:19:15] baweaver: Hackish, I know
[00:19:28] combusean: if it works, it works
[00:19:51] baweaver: Though you could always be cheeky and do: edit Nanoc::Item#[]
[00:19:55] timgauthier: yah i'm trying to figure out nanoc combusean
[00:20:00] baweaver: Do note, don't do that tim
[00:20:09] baweaver: it actually modifies the source of the gem
[00:20:23] timgauthier: ok it makes guard pop up a guard(#<Nanoc::Context>)>
[00:20:24] baweaver: which is handy, assuming you put it back
[00:20:33] timgauthier: but i haven't a clue what to do :P
[00:20:33] baweaver: Now you can access any of the variables
[00:20:40] timgauthier: how do i tell it to list em?
[00:20:45] combusean: timgauthier, do you have a rails project?
[00:21:00] shevy: look at the sneaky folks here
[00:21:01] timgauthier: baweaver just blew my mind
[00:21:15] timgauthier: how do you list all the keys again?
[00:21:18] baweaver: Food time, I'll be back and forth
[00:21:25] baweaver: @items.keys
[00:21:30] timgauthier: you must be in NA its 2:20 am
[00:21:40] timgauthier: undefined metho
[00:21:59] baweaver: @items.attributes.keys
[00:22:02] timgauthier: => <Nanoc::Item identifier="/journal/" binary?=false>
[00:22:21] baweaver: That'll do it
[00:22:51] timgauthier: and then how would i see what those contain? those are hashes?
[00:23:06] timgauthier: yes.. yes i have a list of keys
[00:23:19] microdex: Using different versions of same gem in one ruby app, possible ?
[00:23:20] baweaver: @items.attributes
[00:23:37] baweaver: Not a good idea, and probably not microdex
[00:23:40] toretore: microdex: not in the same process
[00:23:45] microdex: thats horrible
[00:23:51] microdex: what a design flaw in the language
[00:24:23] microdex: seriously, if you have popular gems which share dependencies with your app your screwed
[00:24:23] timgauthier: ok, none of these contain the content of the file. soo
[00:24:31] baweaver: Well, you can, technically
[00:24:37] baweaver: using bundler
[00:24:42] baweaver: but that's really bad
[00:24:48] microdex: Even Node.JS solves this problem with directory precedence
[00:25:08] toretore: how would you suppose this would work microdex?
[00:25:11] microdex: you guys are telling me that if a gem has a shared dependency with your app, your toast ?
[00:25:21] toretore: stop your whining
[00:25:25] microdex: @toretore ?
[00:25:27] microdex: how do you mean ?
[00:25:28] baweaver: I fail to see how this is a Ruby issue
[00:25:29] toretore: and/or trolling
[00:25:36] microdex: its not trolling
[00:25:59] microdex: if you have a GEM which has the same dependency as your app, but a different version... then what?
[00:26:06] toretore: so do you have a suggestion for how this would work?
[00:26:21] baweaver: then you get versions that play well together
[00:26:26] baweaver: sucks, but sometimes comes up
[00:26:29] baweaver: rare though
[00:26:40] timgauthier: how would i get pry inside of a single instance of a .each ?
[00:26:53] microdex: the same way it works in node.js , the interpreter looks in module folder first to resolve dependency , if it doesn't exist there it looks up the chain until it hits global modules
[00:27:21] toretore: and how would ruby know which version your code is using?
[00:27:28] microdex: I'm so shocked this isn't accomodated in rugby
[00:27:39] toretore: see that there
[00:27:46] toretore: that's the whining i was talking about
[00:27:57] timgauthier: baweaver, how do i get myself into the instance of an .each if i put the pry point inside will it do that?
[00:28:04] microdex: @toretore , it simply loads the module it finds first
[00:28:33] toretore: and the other one that some other part of the code needs?
[00:28:39] microdex: two modules, with two different versions are treated by the interpreter as completely separate unique modules
[00:28:59] microdex: the other one gets loaded from global gem store
[00:29:07] toretore: into where?
[00:29:13] microdex: In memory they are two unique independent modules
[00:29:21] microdex: in the scope of your class
[00:29:57] microdex: even with FROZEN gems , this can't be accomodated ?
[00:30:19] microdex: I'm SO surprised , I'm surprised no one sees this as a problem
[00:30:31] PROXIMUS: im trying to install metasploit on my osx
[00:30:44] toretore: microdex: hindsight
[00:30:46] wallerdev: what are you guys talking about haha
[00:30:51] toretore: ruby is much older than node
[00:30:52] PROXIMUS: i get error message with could not locate gem file
[00:30:55] PROXIMUS: what should i do
[00:31:00] wallerdev: gems depending on different versions that have breaking changes between them?
[00:31:07] microdex: Java, Node.JS all have mechanisms to accomodate this
[00:31:15] baweaver: It's a problem of hoakey dependency versioning in gems
[00:31:21] toretore: how's it done in java?
[00:31:35] microdex: there are multiple ways to do it
[00:31:38] microdex: URLClassLoader is one way
[00:31:57] toretore: shut up proximus
[00:31:58] microdex: @baweaver , damn right its "hoakey"
[00:32:06] timgauthier: baweaver http://pastie.org/9071655 my source + the output from pry...
[00:32:20] PROXIMUS: toretore: talk to the hand, bitch
[00:32:28] microdex: Are you guys sure about this ?
[00:32:38] baweaver: I'd google it
[00:33:11] baweaver: I'd have to look into it more really
[00:33:54] toretore: you could conceivably hack together something that loads classes into separate modules
[00:34:12] microdex: Node.JS has a great mechanism for this. You have the option to just keep your dependencies in the module directory and those are used only in the scope of that module
[00:34:33] toretore: oh you don't say
[00:34:53] baweaver: Oi, toretore, MINASWAN
[00:35:00] microdex: I have a feeling that the Ruby community is just about Rails and just following "conventions" set forth by that framework , is this true ?
[00:35:02] microdex: I'm not trolling
[00:35:03] rankine: i'm learning Ruby and would like some feedback on this short function: https://gist.github.com/anonymous/10434404
[00:35:07] rankine: thanks in adv.
[00:35:13] wallerdev: i think in ruby the strategy is to keep your libraries working with the latest versions
[00:35:26] microdex: @wallerdev, I think you're right
[00:35:29] toretore: microdex: i have a feeling you don't know much about ruby
[00:35:59] microdex: @toretore , maybe thats true, but how is that a relevant or usefull statement ?
[00:36:00] wallerdev: usually if a gem hasnt been updated people just stop using it and use something that works
[00:36:09] havenwood: microdex: The Rails community follows Rails conventions. The Ruby community writes all the code that Node and other langs tend to copy.
[00:36:09] baweaver: Mute him....
[00:36:13] wallerdev: like if i saw a gem on github that had the last commit over a year ago i wouldnt use it haha
[00:36:35] toretore: rankine: are you doing this for curiosity or learning? because that stuff already exists
[00:37:02] microdex: @wallerdev, true, but a well blackboxed GEM could theoretically be useful for a long time
[00:37:15] toretore: microdex: you are making assumptions about something you don't know much about. do i really need to explain what's wrong with that?
[00:37:35] microdex: what assumptions am I making? all I'm doing is asking questions
[00:38:08] microdex: It might sound like I'm trolling but it sounds like other people in this channel agree with what I'm saying
[00:38:24] wallerdev: i dont know, there's always newer ways to do things, i mean ruby itself has made breaking changes between versions
[00:38:29] microdex: @toretore, there is no reason to silence technological discourse
[00:38:34] baweaver: There's really just not a need for it is what it comes down to
[00:38:45] baweaver: at least 99% of the time
[00:38:53] microdex: @toretore, no reason to bring got into it either
[00:38:56] havenwood: microdex: what is it you think is missing in Ruby?
[00:38:58] baweaver: rankine: str - str.chars.uniq.join > 0
[00:39:00] wallerdev: i think if you're looking for stability in libraries python has more of that
[00:39:08] wallerdev: ruby is more about using the latest and greatest
[00:39:10] timgauthier: i already hotmasked
[00:39:22] baweaver: >> str = 'aabbcc'; str - str.chars.uniq.join > 0
[00:39:22] eval-in: baweaver => undefined method `-' for "aabbcc":String (NoMethodError) ... (https://eval.in/135235)
[00:39:34] microdex: @havenwood, if a gem shares dependencies with your app and those dependencies go out of sync how do you deal ?
[00:39:35] baweaver: >> str = 'aabbcc'; str.length - str.chars.uniq.join.length > 0
[00:39:35] eval-in: baweaver => true (https://eval.in/135236)
[00:39:40] havenwood: microdex: bundler
[00:39:42] baweaver: >> str = 'aabbcc'; str.length - str.chars.uniq.join.length < 0
[00:39:42] eval-in: baweaver => false (https://eval.in/135237)
[00:39:51] havenwood: microdex: we resolve the dependencies using nice automated tools
[00:39:56] wallerdev: and you see that even now with python, python 3 comes out and no one uses it
[00:40:14] wallerdev: because people just want what works and stability
[00:40:16] rankine: baweaer: nice, thanks
[00:40:22] baweaver: fixed rankine
[00:40:26] baweaver: derped a bit
[00:40:29] microdex: @havenwood my original question ( to which I got a unanimous NO ) : Is it possible to use two different versions of the same gem in your app?
[00:40:31] baweaver: on the gist
[00:40:39] havenwood: microdex: no, we think that is bad practice
[00:40:51] havenwood: microdex: simpler tools do it, because they're too lazy for a proper solution
[00:40:58] havenwood: microdex: don't do that.
[00:41:01] toretore: it's not bad practice, it's just not possible
[00:41:05] baweaver: http://stackoverflow.com/questions/4333645/use-2-versions-of-gem-at-same-time
[00:41:16] baweaver: That's probably the best explanation
[00:41:16] havenwood: toretore: it would be trivial to make it possible, we don't want to
[00:41:24] microdex: havenwood: whats the alternative? rewrite 3rd party GEMS anytime this happens ?
[00:41:40] microdex: havenwood: I like your attitude
[00:41:43] timgauthier: baweaver @item and item are the same?
[00:41:49] toretore: monkey patch them. it's the rails way (???)
[00:42:00] microdex: havenwood: what is the solution to GEMS with overlaping dependencies which go out of sync ?
[00:42:01] baweaver: attr_ methods
[00:42:16] baweaver: attr_reader would define a method named item
[00:42:21] wallerdev: haha i think the ruby solution is to push a fix to the library so it works with the latest version
[00:42:43] microdex: havenwood: Are you suggesting the Ruby community expects the programmer to 'Fix' all the GEMS with outdated dependencies ?
[00:43:06] baweaver: microdex, s/GEMS/gems/g
[00:43:09] toretore: microdex: the "community" doesn't expect anything
[00:43:48] microdex: @toretore: All I'm trying to do is get answers, I'm not trying to cramp anyones style or troll, I apologize if thats what you think and feel free to ignore me.
[00:43:52] baweaver: timgauthier: post it on dreamincode.net and I can keep a few people on it
[00:43:53] toretore: havenwood: how would you make it possible, and why do you think it's a bad idea?
[00:44:02] havenwood: microdex: instead of tons and tons of duplicate gem versions, we resolve dependencies to ones that actually work. often gems use pessimistic versioning, and if gems start using incompatible stuff we file issue tickets so we have a nice, DRY, functioning ecosystem.
[00:44:11] timgauthier: post all of what i'm doing or just the last example?
[00:44:29] timgauthier: reading http://nanoc.ws/docs/basics/ makes more sense to me now...
[00:44:29] baweaver: all of it, I'm Lemur on there
[00:45:06] wallerdev: this seems like its only an issue if a gem is making breaking changes no?
[00:45:10] havenwood: microdex: you might like how perl6 is doing it, a combo of gem name, author name, and version. any one that differs is treated as a whole separate package.
[00:45:17] wallerdev: ive never ran into this issue in like 6 years haha
[00:45:33] microdex: havenwood: That makes sense
[00:45:42] baweaver: bundler lets you define such as: gem 'foo', '~> 1.0.0'
[00:45:58] microdex: At this point I really enjoy Ruby Syntax though
[00:45:58] toretore: bundler doesn't do what he's asking
[00:46:02] baweaver: microdex, it's a valid point, yes, but at the same time it seems like a non-issue to people using Ruby
[00:46:16] baweaver: ....until you find one of those rare gotchas
[00:46:17] microdex: baweaver: thanks
[00:46:20] baweaver: then it's a pain
[00:46:32] baweaver: We had one such thing at $WORK
[00:46:33] toretore: it's definitely not a non-issue with all these spider web dependency gems
[00:46:40] havenwood: microdex: The Ruby way really does work nicely in practice. But there is more than one way to do ti.
[00:46:52] microdex: @toretore: Thanks !
[00:46:53] baweaver: Not fun to find, but that's happened once in a few years
[00:48:07] microdex: So what you guys are saying is that all GEMS in Ruby are Globaly available per system and only 1 Version will be used by your application ?
[00:48:15] toretore: dependency management is important, and version mismatch happens, and it's not fun
[00:48:21] baweaver: and that's only because someone blitzed the gemfile.lock which keeps versions locked down
[00:48:24] toretore: stop writing GEMS plz
[00:48:43] microdex: Is that offensive or what? I'm new to RUBY
[00:48:53] microdex: ;OHHAHAHAHA
[00:48:54] wallerdev: you can have multiple versions of gems used by different applications
[00:49:03] baweaver: bundler can manage that
[00:49:12] microdex: @wallerdev: how ?
[00:49:14] timgauthier: toretore baweaver i don't think that they want help
[00:49:15] baweaver: rvm can manage multiple gemsets across the system
[00:49:21] toretore: HAHA maybe you should try out NODE i hear it uses JAVASCRIPT
[00:49:33] microdex: ;HAHAHFHAFHa
[00:49:46] timgauthier: isn't javascript that java stuff? I heard it is really insecure and I should turn it off in my browser
[00:49:52] wallerdev: microdex: each application can specify which version of a gem they want
[00:49:56] toretore: HAHAHAHAHAA ;D ;D ;D ;D LOLOLOLOL
[00:50:05] wallerdev: an application just can't really use two versions of a gem at the same time
[00:50:26] microdex: @wallerdev: thanks
[00:50:31] timgauthier: baweaver i don't really wanna join another community :S
[00:50:31] microdex: @toretore: thanks as well
[00:50:48] baweaver: This one tends to be nicer than SO on things
[00:51:12] timgauthier: man, running a rake into your face is nicer then SO :P
[00:51:18] Y3K: I'm using SASS 3.3.4, but watch doesn't seems to work.
[00:51:23] microdex: How does Bundler handle different versions of gems which are older?
[00:51:28] timgauthier: did you change the batteries?
[00:51:30] toretore: what do you mean by doesn't work y3k?
[00:51:31] microdex: Does it Remove new versions temporarily ?
[00:51:33] baweaver: Gemfile.lock
[00:51:38] timgauthier: thats what I did last time my watch didn't work
[00:51:39] Y3K: It compiles the .scss files the first time by then it doesn't detect any changes.
[00:51:43] baweaver: different environment
[00:51:45] toretore: it's not supposed to auto-compile
[00:51:49] wallerdev: it just loads it from the path on the system
[00:52:00] wallerdev: the gems are in like gems/my-cool-gem/4.3.4/thestuff
[00:52:04] wallerdev: and it loads that path
[00:52:21] baweaver: and by path, it first hits the projects gem cache
[00:52:21] microdex: I thought that gems were loaded at runtime by the interpreter ?
[00:52:37] baweaver: loaded, technically, downloaded, no
[00:52:49] Y3K: toretore: What do you mean? When I was using 3.2.15 it detected file changes and re-compiled the .scss
[00:52:55] baweaver: http://bundler.io/
[00:53:23] timgauthier: yea, i was under the impression that sass watch just did that..
[00:53:28] timgauthier: or was i using compass for that...
[00:53:37] toretore: it doesn't any more
[00:53:52] timgauthier: i wonder why? do you need to use guard for that now too?
[00:53:59] toretore: i was thinking of nanoc
[00:54:10] microdex: bundler.io: "Bundler will connect to rubygems.org (and any other sources that you declared), and find a list of all of the required gems that meet the requirements you specified."
[00:54:11] timgauthier: thats ok Tore... i'm the one breaking/lost in nanoc
[00:54:24] timgauthier: why would you take the watch out of something like nanoc though?
[00:54:27] microdex: so it Does actually download them
[00:54:37] wallerdev: microdex: that happens when you run bundle install, not when you run your app haha
[00:54:38] baweaver: each project has its' own set
[00:54:41] toretore: microdex: bundler is a tool, it's not ruby
[00:55:01] baweaver: Well, it's made in Ruby
[00:55:05] baweaver: and it's for Ruby
[00:55:12] timgauthier: ruby is the chicken and the egg :P
[00:55:16] wallerdev: bundler is actually written in python
[00:55:26] timgauthier: some say in the beginning there was nothing, and then ruby created itself
[00:55:55] timgauthier: wallerdev and jekyll is jekyllrb but the compiler is python :P
[00:55:57] baweaver: https://github.com/bundler/bundler
[00:56:04] Y3K: Any help?
[00:56:09] shevy: with what
[00:56:16] microdex: So if you have Multiple Ruby Apps on your system , which all use different versions of the same gem, do I have to run 'bundle install' every time I switch apps ?
[00:56:20] timgauthier: his sass isn't watching anymore
[00:56:23] havenwood: shevy: the Y3K bug
[00:56:27] shevy: lol havenwood
[00:56:30] baweaver: it manages its context
[00:56:37] wallerdev: just once per app
[00:56:39] baweaver: kinda like git
[00:56:40] microdex: 'context' ?
[00:56:46] toretore: Y3K: what did you run exactly?
[00:56:49] timgauthier: wallerdev well you can run bundle install again
[00:56:53] wallerdev: itll store in a local file the dependency info in the directory
[00:56:55] baweaver: when you're in an apps folder, you're in its context
[00:57:02] timgauthier: and it will update any changes you specify
[00:57:16] Y3K: toretore: sass --watch ../sources/m10-command/style.scss:m10-command.style.css --style compressed
[00:57:22] toretore: microdex: all this is written down somewhere
[00:57:26] Y3K: It does complie the first time, no errors.
[00:57:34] microdex: so you're saying you CAN have multiple versions of the same gem installed on one system, and load the appropriate version at runtime according to .gemfile spec ?
[00:57:54] havenwood: microdex: you can have every version of every gem installed if you'd like
[00:57:56] baweaver: Gemfile rather
[00:58:09] baweaver: Gemfile.lock tracks what's currently installed
[00:58:11] microdex: but you guys said bunlder was just 'a tool'
[00:58:13] wallerdev: yup, you just can't load two versions at once
[00:58:18] microdex: and that it didn't dictate what the interpeter did
[00:58:38] wallerdev: you don't need bundler to do that
[00:58:45] baweaver: It is a tool, a tool for dependency management
[00:58:46] wallerdev: you can also write gem 'mygem', '2.3.4'
[00:58:54] microdex: so Gemfile instructs the interpreter to load appropriate version of the Gem ?
[00:59:00] doxavore: Is there a way to see what is preventing a particular object from being garbage collected (in 2.1.1)? I can see what an object is holding references TO, but going the other direction seems to be problematic...
[00:59:07] toretore: *it* loads the gem
[00:59:09] havenwood: microdex: bundler does more than just what we're talking, but if you just want dependency resolution you can just use Gem to do it these days if you'd like.
[00:59:13] baweaver: Gemfile.lock
[00:59:20] havenwood: microdex: gem i -g Gemfile
[00:59:29] havenwood: gem install --file Gemfile
[00:59:53] timgauthier: toretore what would you call the stuff that gets output in <%= yield %> in nanoc?
[01:00:00] microdex: If you can install every version of a Gem, How does the interpreter know which version to load at runtime ?
[01:00:03] havenwood: microdex: bundler will eventually be merged into RubyGems, but not yet.
[01:00:10] toretore: timgauthier: in a layout?
[01:00:16] microdex: havenwood: :O
[01:00:20] baweaver: The same way git knows you're in a project directory
[01:00:30] Y3K: I'll just downgrade then, thanks.
[01:00:47] toretore: microdex: is it true that node doesn't have threads??
[01:00:53] timgauthier: when did that sass update come out?
[01:00:53] microdex: @baweaver: Git knows you're in project dir by looking at .git dir
[01:01:03] microdex: you're saying that the interpreter looks at .git dir ?
[01:01:12] baweaver: Similar, not the same
[01:01:20] microdex: so what does it look at ?
[01:01:20] baweaver: It looks at the Gemfile.lock
[01:01:31] baweaver: which is auto generated on a bundle install
[01:01:36] baweaver: containing the versions of the gems
[01:01:54] baweaver: you try and run something in that directory before you bundle install, and it'll say you don't have the gems installed
[01:02:03] microdex: Ok, I'm just gonna confirm this: Ruby Interpreter reads gemfile.lock to determine correct version of gem to load ?
[01:02:13] baweaver: pretty much
[01:02:21] microdex: pretty much = yes or no ?
[01:02:28] toretore: bundler does
[01:02:48] baweaver: for all practical purposes, it's irrelevant
[01:03:05] microdex: I apologize if I sound like a broken record but I'm getting mixed messages here
[01:03:17] toretore: it's not. `ruby file.rb` won't give a shit about your gemfile
[01:03:22] microdex: you guys just said Ruby Interpreter reads gemfile.lock
[01:03:31] toretore: no, it does not
[01:03:33] toretore: bundler does
[01:03:38] microdex: ok baweaver said that
[01:03:40] Renich: rubygems.org seems down
[01:03:51] havenwood: Renich: it isn't
[01:04:10] havenwood: http://status.rubygems.org/
[01:04:42] Renich: havenwood: dns poisoning maybe? I get the following: http://paste.fedoraproject.org/93369/78268139/
[01:04:58] wallerdev: blame heartbleed
[01:04:59] microdex: So. If one can install every version of a gem, how does Interpreter know which one to load?
[01:04:59] Renich: and it doesn't respond to ping... can somebody give me the IP please?
[01:05:13] wallerdev:
[01:05:15] toretore: the interpreter doesn't know what a gem is
[01:05:27] Renich: [renich@introlap ~]$ ping rubygems.org
[01:05:29] Renich: PING rubygems.org ( 56(84) bytes of data.
[01:05:31] Renich: no response...
[01:05:44] wallerdev: maybe you got banned
[01:05:50] Renich: let me check in LVS; currently in M??xico
[01:05:50] havenwood: Renich: RubyGems doesn't respond to icmp, ever.
[01:05:53] shevy: The address of rubygems.org was
[01:05:54] microdex: so the interpreter just knows "'Classes' right
[01:06:00] havenwood: Renich: That is expected.
[01:06:02] baweaver: You're making this far more complicated than it needs to be.
[01:06:08] microdex: I just want to understand
[01:06:10] Renich: havenwood: ok, what about the dig result?
[01:06:31] havenwood: Renich: hem
[01:06:43] Renich: ok, LVS seems to give a good dig result... this is odd... forget about it
[01:06:55] toretore: microdex: the interpreter only knows how to load files. when it loads a file, the classes and modules in that file are included in the global scope. rubygems adds a gem's path to ruby's $PATH so that the files can be loaded.
[01:07:16] zorak: there is a way to run irb like ruby 1.8??
[01:07:26] microdex: toretore: You guys said you can install ALL versions of a Gem, so how does your app know to load right file?
[01:07:46] toretore: rubygems will add the path of one version to $PATH
[01:07:48] microdex: toretore: if its all Global like you say, how does your app know which file to laod
[01:08:00] baweaver: Gemfile.lock
[01:08:10] toretore: forget about gemfile
[01:08:12] baweaver: then enlighten us...
[01:08:19] havenwood: microdex: A Gemfile is evaluated as a Ruby file. A Gemfile.lock is created that contains the resolved versions of the gems that work together. Bundler or RubyGems then installs/uses the locked versions that all play nice together.
[01:08:20] microdex: yes enlighten us
[01:08:34] toretore: gemfile is used by bundler, i'm not talking about bundler here
[01:09:10] toretore: microdex: if you have several versions of a gem, those will exist in different directories. rubygems will add *one* of those directories to the path
[01:09:19] havenwood: microdex: For apps, you then distribute the Gemfile.lock along with the Gemfile, so you're all working on the exact same set of gems.
[01:09:30] toretore: and when you do a require, the file is searched for in that directory
[01:09:50] havenwood: microdex: When you deploy, you do a `bundle --deployment` which puts the gems in a local /vendor file instead of in $GEM_HOME.
[01:10:02] microdex: havenwood: :O :O
[01:10:21] microdex: ok , well that changes everything
[01:10:33] havenwood: microdex: `require` goes down the load path till, ding
[01:10:51] microdex: havenwood: Thats exactly what I was tryign to figure out
[01:11:12] microdex: so the interpreter in Ruby does indeed have a search chain for resolving classes and modules
[01:11:33] microdex: directory precedence as configured by bundler and ruby gems
[01:11:38] havenwood: microdex: Well, there's the load path, then RubyGems (which is part of the language) also has a dependency resolver.
[01:12:22] havenwood: Gem::DependencyResolver
[01:12:37] havenwood: (in the stdlib)
[01:12:51] microdex: DependencyResolver
[01:13:20] microdex: Thats what I was after
[01:13:53] microdex: Seems there is a lot of confusion in here ( or in my head ) about the overlapping roles of DependencyResolver, Bundler and RubyGems
[01:14:12] shevy: rubygems is Gem
[01:14:21] toretore: dependencyresolver is part of rubygems
[01:14:21] shevy: bundler came after Gem
[01:14:22] havenwood: microdex: Gem *is* RubyGems (DependencyResolver is under its namespace).
[01:14:35] Renich: is there any particular reason why rubygems.org won't show anything to curl, but curl works on everything else (aka google.com, linuxfoundation.com, etc0
[01:14:40] shevy: and one day bundler and gem will unite!
[01:14:54] havenwood: microdex: Currently the traditional resolving role of bundler is being incorporated into RubyGems proper, so the story will become more clear in the future.
[01:15:01] baweaver: til then they sedate us with parallel installs
[01:15:20] shevy: the more parallel bytes the better
[01:15:24] timgauthier: oddball question, any ruby based customer/management systems out there?
[01:15:37] baweaver: Til it hits Nokogiri, then you're boned
[01:15:42] toretore: not for disk interfaces
[01:15:56] havenwood: microdex: The bundler and rubygems teams will merge, but right now the groundwork is just being laid.
[01:16:01] microdex: @havenwood So bundler is being integrated into the gem system ?
[01:16:20] shevy: it will be ripped to peaces, then the bundler skeleton will be dropped!
[01:16:24] havenwood: microdex: Bundler will go away (eventually, rumors of its death are premature), and only Gem will remain.
[01:16:30] shevy: pieces too
[01:16:44] havenwood: microdex: Years from now.
[01:16:46] shevy: didn't you watch highlander microdex
[01:16:48] shevy: there can only be one
[01:16:54] microdex: HAHHhhahahHA
[01:17:15] havenwood: microdex: But RubyGems is gaining power from the other immortals, it draws them toward itself.
[01:17:47] microdex: Still the problem remains: If your app shares different version dependencies with your gems you're toast.
[01:18:06] wallerdev: not toast, but you'll have to work around it
[01:18:08] shevy: update to the latest
[01:18:12] shevy: stop being so slow!
[01:18:21] microdex: good call shevy
[01:18:21] baweaver: I've seen that once in 3 years
[01:18:31] wallerdev: if you release a gem and don't update it, people will not use it haha
[01:18:36] microdex: I guess you're right this system does promote gem refreshes
[01:18:43] toretore: sometimes it's not your app, but two gems that depend on different versions
[01:18:44] shevy: I push new updates of my gems all the time
[01:18:47] havenwood: microdex: We really do favor latest-and-greatest. If it is old, End-of-Life it! :P
[01:18:48] shevy: so that bot-downloads can download
[01:18:50] toretore: and there's little you can do about that
[01:18:55] microdex: @toretore: precisely!
[01:19:09] shevy: easy solution
[01:19:11] shevy: drop the slow gem
[01:19:13] shevy: laugh at the author
[01:19:14] timgauthier: do you include hex encoded images in that shevy?
[01:19:18] baweaver: Just make sure not to bundle update
[01:19:19] havenwood: microdex: Also we use pessimistic versioning constraints and rely on semantic versioning practices.
[01:19:25] baweaver: unless it's on one gem at a time
[01:19:25] shevy: timgauthier that is way out of my league
[01:19:26] timgauthier: to waste bandwidth
[01:19:30] havenwood: microdex: Without semantic versioning it wouldn't really work. :O
[01:19:37] shevy: timgauthier I wrote a RgbToHex class converter :P
[01:19:45] havenwood: microdex: But it does work. :)
[01:20:00] havenwood: toretore: ;P
[01:20:02] timgauthier: but why would you want to use hex?
[01:20:18] microdex: Wow, so the verdict: Different versions of same gem in one app: Not Possible
[01:20:19] timgauthier: wait... irc bots
[01:20:29] toretore: one gem per process is like using global variables. you can make it work, but it's not ideal
[01:20:36] shevy: microdex well you have to decide which one you wanna use!
[01:20:50] toretore: *one version
[01:20:54] timgauthier: you can't expect the computer to do ALL the work for you
[01:21:00] shevy: lol timgauthier
[01:21:00] baweaver: Possible through wicked hackery, and bad things will happen
[01:21:19] toretore: it's a reasonable concern
[01:21:30] toretore: and node's solution is nice
[01:21:32] baweaver: Such as I can monkeypatch string to act like fixnum
[01:21:34] shevy: why only two gems
[01:21:35] shevy: why not ten
[01:22:46] timgauthier: ack! how do you comment out erb lines!
[01:23:25] timgauthier: oh, turns out it isn't easy ... ok
[01:23:37] toretore: <%# comment%>
[01:24:01] shevy: timgauthier erb is like ruby code, you only have to add stupid <> thingies
[01:24:09] timgauthier: so its like php code
[01:24:15] timgauthier: but a bit better
[01:24:20] timgauthier: but harder to host
[01:24:35] shevy: well don't worry
[01:24:40] shevy: one day you will have overcome erb
[01:24:48] shevy: for now you are stuck with it
[01:24:49] timgauthier: srsly.. my host HAS ruby... i can install things in it...
[01:24:50] havenwood: RubyGems II, The Quickening.
[01:24:59] timgauthier: but i don't see how since i can't push git too it
[01:25:01] shevy: Bundler 2000 - Terminator was nothing against it
[01:25:04] timgauthier: and i can't ssh into it
[01:25:46] timgauthier: is it even possible to deploy ruby apps via ftp? then somehow "run" the app from the web based cpanel console?
[01:26:11] shevy: probably depends on that host
[01:26:26] shevy: your setup gives me headache
[01:26:37] havenwood: timgauthier: Use git, mina, vlad the deployer, capistrano, anything but ftp.
[01:26:56] baweaver: sftp better
[01:26:57] timgauthier: yeah, but.. all of those require you to have the server use them
[01:27:09] timgauthier: when i say ftp i mean sftp
[01:27:13] timgauthier: but its not ssh
[01:27:26] baweaver: SFTP == FTP over SSH
[01:27:31] timgauthier: i use the little checkbox that says use sftp if availible
[01:27:40] baweaver: if available.
[01:27:51] timgauthier: my server has it as far as i know
[01:28:08] timgauthier: nope nm, i'm using good ol open ftp :|
[01:28:45] timgauthier: *sigh* i think its nearly time to start paying up money and go to a new web host.... but i'm so poor, and so cheap
[01:28:50] pipeep: Naw, you shouldn't use SFTP. You know, performance and stuff. Credentials submitted over plain-text are totally fine.
[01:29:28] baweaver: *whistles* tcpdump
[01:29:44] shevy: people are full of ideas
[01:29:57] pipeep: baweaver, It's not like there's some big government organization spying on all our internet traffic.
[01:30:04] timgauthier: sftp or not :P
[01:30:28] pipeep: timgauthier, I'm being sarcastic. Please use SFTP.
[01:30:35] shevy: they got openssl backdoors anyway
[01:30:44] timgauthier: just keep closing doors bro
[01:30:56] shevy: I never close the door to the toilet
[01:31:02] timgauthier: whatever, i use my own home brew encryption anyhow..
[01:31:10] timgauthier: i mean, i can't decrypt it, thats how good it is
[01:31:25] baweaver: sftp is ssh based
[01:31:43] baweaver: not openssl
[01:31:48] timgauthier: ssh based means you need an ssl cert ?
[01:31:54] timgauthier: no nm, ssh uses keys
[01:32:05] shevy: I use keys too
[01:32:09] baweaver: and Theo was kind enough to heckle the OpenSSL folks too about it
[01:32:29] timgauthier: i use the return key too much and the delete key too little
[01:32:32] baweaver: Theo De Raadt founded OpenBSD, which made OpenSSH
[01:32:57] timgauthier: it won't be long... they'll find an openssh backdoor too, the moles are all over yo
[01:33:07] baweaver: That's funny
[01:33:07] pipeep: timgauthier, you should try http://www.supersimplestorageservice.com/
[01:33:12] baweaver: good luck there
[01:33:14] timgauthier: i got some premium tinfoil if you want it. It has lead in it
[01:33:17] baweaver: it won't happen any time soon
[01:33:50] baweaver: OpenBSD is by and far the most secure OS
[01:34:16] timgauthier: read only... so i can't delete stuff?
[01:34:29] baweaver: well that is kinda what readonly infers
[01:34:35] baweaver: s/infers/means
[01:34:48] timgauthier: whats the % of read only? :P
[01:35:14] pipeep: baweaver, the most secure OS is one that doesn't interface with the outside world.
[01:35:14] baweaver: >> % readonly
[01:35:14] eval-in: baweaver => /tmp/execpad-014df933d7a5/source-014df933d7a5:3: syntax error, unexpected tCONSTANT, expecting keyword_end (https://eval.in/135244)
[01:35:25] pipeep: baweaver, but I agree.
[01:35:35] timgauthier: that price for s4 is nuts... but yeah.. i need to delete stuff sometimes :P
[01:35:36] baweaver: Used to be a SysAdmin
[01:35:46] baweaver: it's a pain to set up right, but dang that thing is a tank
[01:35:50] timgauthier: i avoid getting near sysadmin type work
[01:36:17] baweaver: RaptorJesus: are you Joseph?
[01:36:49] pipeep: timgauthier, I've started doing my own sysadmin for stuff like email, simply because I don't trust anyone else enough
[01:37:11] timgauthier: I've had a gmail since they exsisted
[01:37:15] timgauthier: and i know they spy on it
[01:37:31] timgauthier: and I have some self hosted email... but it doesn't work more then it works.
[01:37:31] pipeep: Yeah, I recently removed all my mail from gmail, and downloaded it to a mbox file.
[01:37:45] timgauthier: y'know it is a bit late for that... honestly removing it or deleting it..
[01:37:47] pipeep: Now gmail is a dumb forwarder for people that don't have my new email
[01:37:49] timgauthier: they already HAVE a copy
[01:37:57] lbwski: lol at s4
[01:38:16] pipeep: timgauthier, but at least this way it's harder.
[01:38:28] pipeep: Plus, I use GPG when I have a key for someone
[01:38:42] pipeep: (although GPG could be broken, who knows...)
[01:39:01] timgauthier: I just don't use email for stuff i don't want to be known or shared
[01:39:16] timgauthier: someone should update the email standard to include end to end encryption though
[01:39:22] timgauthier: automate the handshakes etc
[01:39:33] cout: I don't use any of that encrypted email stuff because I don't want to stand out when the NSA is sifting through internet traffic
[01:39:40] pipeep: And then I have a gpg signed file on my website with my OTR information, so I can use OTR with anyone who validates my GPG key: http://b.enjam.info/contact_info.asc
[01:40:14] pipeep: timgauthier, email is a lost cause. It's horribly broken in a ton of ways.
[01:40:29] timgauthier: i'm not going to look pip, because honestly i'll just complain about design, i sort of care less about security then i should :(
[01:40:45] timgauthier: yes it is broken in many ways, but thats not a reason to abandon it and not fix it...
[01:40:51] pipeep: Eg. there's no point in using a valid cert for email, as there are known MITM attacks to drop the cert
[01:41:08] pipeep: So just use self-signed, to prevent passive attacks
[01:41:11] baweaver: The horse carriage is broken in many ways, but that's not a reason to abandon it and not fix it...
[01:41:25] timgauthier: intact its a great reason to do just that... just a lot of parts to move and push forward. introduce it as a layered standard. "Email 2.0" is backwards compat but has secure futures for those who also have email 2.0 etc
[01:42:03] pipeep: timgauthier, I feel like it's beyond repair. It's too hard to get everyone to update to new standards.
[01:42:05] timgauthier: well no baweaver we did move on in our transportation methods... if it means moving from email to something else then by all means lets, but we have to actually DO that.. so far nothing has had traction enough to move us out of email land
[01:42:24] pipeep: timgauthier, by that logic, PGP is email 2.0
[01:42:32] baweaver: pipeep, like Windows XP :D
[01:42:34] timgauthier: you don't have to get everyone to update, you just start doing something and get a movement, when the market sees they'll move out of fear of losing the game
[01:43:05] pipeep: baweaver, I'm still using XP :)
[01:43:10] timgauthier: but PGP is hard to adopt because of how much work it is to implement, if the whole process was built into the standard and automatic then of course i'd sign up for your service and check that box
[01:43:20] pipeep: (on a VM that doesn't have network access, for some school work)
[01:43:47] baweaver: ...which is why I gave you a 30 second benefit of the doubt before I posted.
[01:44:24] pipeep: timgauthier, Because the MITM could say "I don't support email 2.0", the security could always be stripped.
[01:44:39] pipeep: The only ways to completely fix the security is to break the protocol.
[01:45:11] timgauthier: but if your email 2.0 has it set so that you KNOW if it breaks
[01:45:38] pipeep: timgauthier, that's not a bad idea.
[01:45:43] timgauthier: and have a service that offers good email with this feature built in. like lavabit was doing, that shit could have blown up in a good way if the gov didn't get invovled
[01:45:56] pipeep: Although most users probably will click "okay" anyways, like they do on sites with invalid https certs
[01:46:35] RaptorJesus: baweaver: nope
[01:46:49] pipeep: Actually, weren't the lavabit folks working on something like this?
[01:46:50] timgauthier: pipeep i am a designer, i have lots of ideas, i just can't build em
[01:47:10] timgauthier: this is basically exactly what lavabit was now that I think about it yea
[01:47:14] baweaver: timgauthier: I was a designer, I had lots of ideas, I couldn't build them
[01:47:24] baweaver: So I got ticked, learned code, and did it.
[01:47:30] timgauthier: now that your a dev, you have no ideas baweaver ;)
[01:47:52] baweaver: http://baweaver.deviantart.com/
[01:47:55] baweaver: I have plenty
[01:48:06] benzrf: if there is no out-of-band communcation at all, MITM is always theoretically perfect yes?
[01:48:29] pipeep: I'm a dev with plenty of ideas, but not enough time or energy to implement them all.
[01:49:16] pipeep: benzrf, well, that's what CAs or the WOT are meant to solve. They provide easy ways of out-of-band communication
[01:49:34] benzrf: just dblchecking
[01:49:49] timgauthier: you guys just lost me
[01:49:57] timgauthier: back to converting from liquid to erb
[01:50:29] timgauthier: what about haml?
[01:50:33] timgauthier: i can't even READ it
[01:50:37] baweaver: Better than ERB to me
[01:50:44] pipeep: (just trying to stir the pot)
[01:50:53] timgauthier: i'd love to learn handlebars
[01:50:56] timgauthier: cause i like the logo
[01:51:04] timgauthier: but i don't know how to get it running in nanoc
[01:51:17] baweaver: I use HAML / LESS for work
[01:51:38] baweaver: Well, before I moved to Java services and Big Data...
[01:51:45] pipeep: baweaver, I tried LESS, and ended up preferring SASS/SCSS in the end
[01:51:56] wallerdev: haml is awful
[01:52:02] timgauthier: haha wallerdev
[01:52:18] baweaver: I prefer SASS
[01:52:27] baweaver: $WORK just had LESS already
[01:52:37] wallerdev: scss is great because regular css is valid scss
[01:52:41] pipeep: ACTION Points finger at pskosinski_. Look, one of those "tor" nerds!
[01:52:43] combusean: i hate haml
[01:52:46] wallerdev: haml is awful because you paste html into it and it doesnt work
[01:53:10] baweaver: Keeps logic out of your views
[01:53:12] combusean: and its use of shift characters to do anything
[01:53:19] combusean: and its demands for whitespace
[01:53:22] combusean: masochists like haml
[01:53:33] baweaver: Eh, I prefer it.
[01:53:46] baweaver: Then again I don't have even if branches in my layouts
[01:53:59] wallerdev: haml is okay if you're the only one working on your application
[01:54:13] benzrf: combusean: fite me irl
[01:54:17] benzrf: haml is winny
[01:54:18] baweaver: Style guides
[01:54:28] timgauthier: wait.. you do ZERO logic in the view?
[01:54:37] timgauthier: what about like "if logged in A otherwise B" ?
[01:54:48] baweaver: dynamic rendering
[01:54:58] timgauthier: but if the logic is literally that one chunk of if logic?
[01:54:59] baweaver: render can take a splat array
[01:55:14] baweaver: render *presenter.users
[01:55:15] timgauthier: or the if logic is "put this class unless that state"?
[01:55:33] benzrf: combusean: later
[01:55:35] timgauthier: one day, i may learn these things like presenters etc
[01:55:41] combusean: benzrf, no now.
[01:55:46] benzrf: combusean: fine fine hold on
[01:55:49] baweaver: ...which hits the presenter.users method, which will give back an empty partial instead of one to loop users
[01:55:55] benzrf: ACTION rockets through the ceiling
[01:56:04] wallerdev: im okay with "if abc" in the view, but not "if x == 13" in the view
[01:56:12] combusean: ACTION uses a stinger missile and shoots benzrf down
[01:56:17] combusean: ACTION watches benzrf explode
[01:56:23] baweaver: I try and keep every bit of it possible out
[01:56:30] baweaver: easier to test, much faster
[01:56:47] timgauthier: i can understand in a fully dynamic site pulling most of it out
[01:56:53] timgauthier: but yeah wallerdev i'm wit you...
[01:56:55] benzrf: combusean: u fell into my ruse
[01:56:58] benzrf: combusean: that was a decoy
[01:56:59] timgauthier: that said... i make it pretty
[01:57:08] baweaver: like ~4250 tests in 1:32 fast
[01:57:10] timgauthier: and currently i try to also make it functional
[01:57:39] combusean: benzrf, that was my hologram operating the stinger system
[01:57:52] benzrf: combusean: pfft
[01:58:27] combusean: benzrf, do you work as a rubyist out in maine?
[01:59:05] timgauthier: <%= render "head", :title => "Foo" %> it says this will make a @title variable... how the heck would i call that...
[01:59:25] timgauthier: i want to pass a different variable! :P
[01:59:41] benzrf: combusean: i work as a high school student out of maine
[01:59:48] baweaver: That logic can be brought back to the presenter
[01:59:51] combusean: you're pretty smart :P
[02:00:18] benzrf: *out in derp
[02:00:22] timgauthier: baweaver yeah, thats not really an option in nanuc, plus this isn't going to a user, this just generates a static html for me
[02:00:47] baweaver: There's a point where you don't really worry about it
[02:00:53] baweaver: this is all in Rails
[02:00:59] baweaver: meaning I have the power to do things like that.
[02:01:22] timgauthier: is this really in rails?
[02:01:34] baweaver: Presenters can be added, yes
[02:01:50] baweaver: It's a pattern for abstraction in large apps
[02:01:56] timgauthier: i meant, is an app like nanoc that generates static html in client side for uploading in rails
[02:02:25] baweaver: Nanoc is seperate
[02:02:32] timgauthier: thats what i thought
[02:02:34] baweaver: I'm saying presenters and such are all things I do in Rails
[02:02:57] timgauthier: agh i see, my bad
[02:03:50] timgauthier: != is proper not equal in ruby right?
[02:04:00] benzrf: timgauthier: ew
[02:04:17] benzrf: sorry involuntary reaction to the letter sequence 'php' ew
[02:04:30] timgauthier: ah yeah, sorry, its what i sort of know
[02:04:39] combusean: ACTION does not miss his php days
[02:04:41] timgauthier: to be honest i was really just using it as a template engine :P
[02:05:02] benzrf: i should set my bouncer to autoreply to 'php' with a link to fractal
[02:05:49] timgauthier: what is fractal?
[02:05:57] benzrf: php: a fractal of bad design
[02:06:05] benzrf: definitive article on why php blows chunks
[02:06:41] combusean: yeah i know
[02:06:48] combusean: i can't believe i put up with that shit forever
[02:07:03] combusean: i guess it was just too easy to go to php.net/function to look up the order :P
[02:07:21] timgauthier: it may blow chunks.. but i didn't have to know much of it to be able to hack stuff together, and php.net is still amazing for looking stuff up AND having useful examples
[02:07:31] benzrf: [which are also often wrong]
[02:07:41] timgauthier: always worked for me :S
[02:07:51] timgauthier: ugh, i don't get how nanoc is "Creaiting" a variable...
[02:08:01] combusean: timgauthier, that's kind of the problem. you just hack stuff together, rather than use well tested tools to make it easier
[02:08:15] combusean: you're not just learning ruby right now you're learning the ecosystem.
[02:08:25] timgauthier: what about octopuses baweaver ?
[02:08:44] timgauthier: yes combusean because i just wanna get a website built today, i don't have ages to learn a language before i can do it
[02:09:01] baweaver: static generator
[02:09:05] baweaver: very useful
[02:09:06] timgauthier: and thats how i figured out as much php as i have, but hacking together the stuff i needed
[02:09:12] timgauthier: yes baweaver but its based on jekyll
[02:09:24] timgauthier: and has the exact same problem with it that makes it not work for me as jekyll
[02:09:32] timgauthier: which is what i'm trying to convert from :|
[02:09:48] baweaver: I know the author, you could just ping him on Twitter.
[02:10:06] timgauthier: the nanoc guy? he's in the irc room, but he's gone to sleep. which i should have done 4 hours ago
[02:10:23] baweaver: Jekyll author
[02:10:29] timgauthier: but this shit is eating at my brain
[02:10:54] timgauthier: the issue is not something you can "change" in jekyll.. its pretty core. I want to be able to do an include from more then just the _includes dir
[02:11:30] timgauthier: but thanks :)
[02:21:15] RubyPanther: if you don't have time to learn a language, just use what you know
[02:21:39] timgauthier: i want to learn, but i learn best hacking things together
[02:21:48] timgauthier: i want to know ruby
[02:22:05] timgauthier: but now i just want to get my site working and i'd prefer to not resort back to php
[02:22:55] RubyPanther: how fast can you read the pickaxe?
[02:24:43] benzrf: where does the Foo#bar 'syntax' come from?
[02:26:31] baweaver: Not sure, I'd venture to guess Smalltalk or Perl though
[02:26:52] benzrf: smalltalk seems to use >>
[02:27:16] benzrf: i.e. Foo>>bar
[02:27:16] baweaver: Perl uses the same :: for modules, so it's probably from there.
[02:27:25] benzrf: :: is a c++ism
[02:27:34] rankine: timgauthier: what kind of site? Rails, Sinatra, Jekyll, other?
[02:27:35] benzrf: the camel book even says that it is
[02:27:38] combusean: ACTION growls
[02:27:43] timgauthier: nanoc currently
[02:27:55] combusean: do i really want to use the github api for one damn command
[02:27:59] baweaver: Throwing guesses really at this point on that.
[02:28:36] timgauthier: converting from jekyll. and actually most of this nanoc stuff makes sense as is working. but spend far too many hours fretting over stuff i didn't understand and not figuring out how to do something like truncate some content for a blog index view
[02:29:08] rankine: why'd you leave Jekyll? I just made my site a couple weeks ago with Jekyll and liked it
[02:30:21] timgauthier: oh jekylls pretty awesome, but I have another part of the site that is about projects, those projects have working examples that are html or php documents. There are several examples on one page, I don't want all of that in one giant markdown file. I want to be able to include them in their respective modal popups... wasn't an option in jekyll
[02:55:29] timgauthier: would something like @item.children.first make sense?
[03:08:24] microdex: I'm surprised there is no better solution to deal with gem dependency version mismatch between gems which share dependencies
[03:11:29] microdex: There should be a way to import gems directly into the directory structure of gems folder and allow each gem to load its own version of the dependencies
[03:12:49] microdex: Even if you modify your own dependencies in accordance to the needs of your app you can always have it baked into your repository the way you like
[03:16:45] northfurr: How can I get around this? ERROR: While executing gem ... (Gem::FilePermissionError)
[03:16:46] northfurr: You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
[03:16:48] combusean: ACTION metaprograms a Sinatra settings module :>
[03:17:05] northfurr: Trying to get an octopress blog going
[03:17:39] combusean: northfurr, sudo whatever command you did?
[03:17:50] microdex: northfurr: have you tried to ls -ls the directory you're reading the files from and ensure the permissions aren't weird ?
[03:18:46] baweaver: Probably a C Extension or a Bin.
[03:18:57] microdex: How to import source code from gem and transplant into directory structure of my app ?
[03:20:11] combusean: why would you want to do that?
[03:20:34] microdex: to prevent dependency missmatch from some 3rd party gems I'm using
[03:20:57] microdex: if gems share dependency yet rely on different version of dependency, things don't work
[03:21:43] combusean: that's the that sucks face
[03:21:44] northfurr: read that it was unsafe to use sudo with installing a local version of ruby or something
[03:22:35] combusean: ACTION wishes OSs would stop fucking installing ruby and version managers were mandatory.
[03:23:01] microdex: yeah, still that woudn't fix the problem
[03:23:27] combusean: well, considering you have a local version of ruby, and you want to install gems, you have to use sudo
[03:23:43] ccham_: microdex: can you `bundle install --path vendor` and then move things around?
[03:23:49] microdex: one should be able to aggressively modify gem source code and not have to worry about it colliding with other gems and versions. Its just a missing construct int he system.
[03:24:12] microdex: ccham_: very interesting, ill peep that
[03:24:17] microdex: ccham_: thank you
[03:49:50] morenoh152: can I do 1..10.each do |num| blah?
[03:49:54] morenoh152: or is that wrong?
[03:50:27] centrx: morenoh152, That is good
[03:50:34] centrx: morenoh152, or 10.times do |num|
[03:50:54] centrx: (actually that would be 0..9 )
[03:52:30] zorak: mordocai: (1..10).each do { |num| blah }
[03:52:51] zorak: morenoh152: : (1..10).each do { |num| blah }
[03:53:54] centrx: Yes, otherwise it is read 1..(10.each) which is an error
[03:55:08] morenoh152: nah I'm running into a scoping error I think, I can't get my function to print to stdout
[03:55:20] morenoh152: does puts always print to stdout?
[03:55:46] morenoh152: very simple fizzbuzz https://gist.github.com/10440085
[03:56:07] morenoh152: I just can't get the function to print to this online tester's stdout
[03:56:09] centrx: morenoh152, puts is a method on Kernel, http://www.ruby-doc.org/core-2.1.1/Kernel.html#method-i-puts
[03:56:48] centrx: morenoh152, Maybe the online tester does not show stdout output?
[03:56:56] centrx: morenoh152, Does it work on your local machine?
[03:57:30] morenoh152: it does show std output. haven't tested on my machine this should be trivial
[03:58:18] combusean: ACTION uses define_singleton_method for the first time
[03:59:27] morenoh152: ack have to cast the input number to integer first doy
[04:11:59] morenoh152: how do I .map .to_i
[04:12:09] morenoh152: make run to_i on all elements of an array
[04:12:23] morenoh152: I tried .map(&.to_i)
[04:13:22] morenoh152: ah .map(&:to_i)
[04:54:37] combusean: ACTION writes a Settings module for sinatra in 11 lines that reads every yml in config/settings to make Settings.yaml_file_prefix['key'] available everywhere
[05:05:05] combusean: ACTION shrinks it to 10
[05:38:50] manacit: Has anyone dealt with
[05:38:50] manacit: DEBUG [b8a942d8] Bundler::GemNotFound: Could not find json-1.8.1.gem for installation
[05:39:05] manacit: It's a bone-stock rails app more or less, with capistrano-bundler and capistrano-rvm
[06:21:38] certainty: 2.times{ "moin" }
[06:38:19] leslie1: when defining a ruby class, It seems Ruby created 2 "class", one is nromal, the other is metaclass, right?
[06:43:13] art-solopov: leslie1: I think, since Ruby classes are singleton objects of class Class, they have their own eigenclasses (or metaclasses). Is that what you mean?
[06:46:23] leslie1: art-solopov There is some codes. puts ObjectSpace.count_objects[:T_CLASS]; class AAA; end ; puts ObjectSpace.count_objects[:T_CLASS]
[06:46:48] leslie1: in my machine, the result is 1263 and 1265
[06:47:54] leslie1: What I want to do is findint the 2 class out
[06:48:49] art-solopov: leslie1: Yeah, that'd probably be AAA's eigenclass. I think there are methods of finding it out...
[07:10:25] MrJiks: Trying to test a gem I am building using "bundle exec console"; but its failing reporting: "bundler: command not found: console"
[07:10:33] MrJiks: Any ideas?
[07:12:46] art-solopov: MrJiks: Try `bundle exec irb`
[07:14:42] MrJiks: I sec let me try
[07:15:35] MrJiks: Okay, cool it worked. But any ideas why the one before didn't?
[07:17:20] art-solopov: MrJiks: `bundle exec <script>` executes a script in the context of current bundle. There is no script (or program) called console in your machine, so it didn't work.
[07:18:41] MrJiks: But I was able to run that for a different gem 2 days back. Apparently that too stopped working now.
[07:20:55] art-solopov: MrJiks: Interesting. Maybe the gem installed "console" command?
[09:13:09] shevy: in ruby, do you guys break the line after 80 characters?
[09:13:31] jhass: I mostly use the enter key
[09:13:58] jhass: oh, somehow read a "how do you" there :P
[09:14:12] estaban: include ActionView::Helpers::TextHelper
[09:14:12] estaban: # or in a controller
[09:14:12] estaban: # helper :text
[09:14:12] estaban: word_wrap(@user.headline, :line_width => 80)
[09:14:30] ddv: estaban:?
[09:14:51] shevy: jhass yeah, I mean if anyone has a limit other than 80 for instance
[09:15:13] jhass: I've a ruler at 70, 80 and 100 currently
[09:15:21] shevy: why at 100?
[09:15:41] jhass: that's my hard limit I try to not break
[09:16:10] jhass: I try to keep the 80, the 70 acts more as a warning
[09:16:11] shevy: when it comes to code, I break at 80 99.5% of the time, but I sometimes (perhaps once or twice in a class at max) have # comments after the 80 chars limit
[09:16:48] jhass: but actually most of my code doesn't break the 70 either
[09:19:56] jhass: but then I'm not dogmatic about it. Sometimes the information exceeding the rulers is not crucial to understanding the code and trying to insert new lines would just make it look bad
[09:21:23] workmad3: what? you can write lines of code under 160 characters? I thought all lines had to be that long or the parser would cry!
[09:21:47] Hytosys: I never write about 80 (not even comments)??? just a habit
[09:22:32] Hytosys: only language I ever have to break that rule for is obj-c :( 120
[09:23:40] canton7-mac: hah! was going to say
[09:23:58] canton7-mac: so much verbosity
[09:24:37] Hytosys: I think it???s a good-looking language in its own right, but it sure isn???t a concise one
[09:25:21] workmad3: Hytosys: how do you cope in Java? I'm sure most java classes are > 80 characters on their own...
[09:25:38] canton7-mac: yeah, agreed with you there
[09:27:57] Hytosys: workmad3: yeah, I???m sure most javaists can???t do anything like 80 characters! I guess I don???t write enough to java to be forced to conform to ListObserverListenerNamingPattern
[09:28:32] workmad3: Hytosys: what about the ListObserverListenerNamingPatternFactoryDiscoveryServiceFactory ?
[09:29:07] Hytosys: ah, a classic out of JDK 6.1
[09:29:43] canton7-mac: that said, obj-c isn't exactly innocent of that either, but for different reasons. I'm working on an RXPTestDoseConnectionLostPopoverViewController at the moment...
[09:30:05] Hytosys: my favorite, AVCaptureVideoDataOutputSampleBufferDelegate
[09:31:44] jhass: what about AbstractSingletonProxyFactoryBean? (tell me what it does)
[09:32:05] Hytosys: haha I love the -Bean suffix pattern
[09:32:31] canton7-mac: why it's a factory which generates proxies for abstract singletons ;)
[09:32:50] jhass: "Convenient proxy factory bean superclass for proxy factory beans that create only singletons."
[09:33:23] Hytosys: that???s great
[10:16:04] kith: since the jruby channel is kinda dead-ish, i'd like to ask here - maybe someone on here knows: if my script uses gems like jdbc/postgres can i not compile to .class and run it via java?
[10:16:16] kith: i installed jruby-complete.jar and it still complains about missing requires
[10:27:58] troulouliou_dev: hi is there a verbise option to see the progress of bundle install ?
[10:31:55] workmad3: troulouliou_dev: -V also works
[10:32:15] troulouliou_dev: workmad3, yeah thanks :)
[10:35:56] grieg: hello. trying to use "Math." getting "undefined method 'Math'". Should i install some gem for that? just thought math was oob :)
[10:36:41] crome: >> Math::PI
[10:36:42] eval-in: crome => 3.141592653589793 (https://eval.in/135371)
[10:36:51] crome: you are doing something wrong :)
[10:40:07] grieg: http://pastebin.com/fd3JA916 this is what it was. then i closed the irb process and started it again, and it works.
[10:43:03] certainty: tagrudev: yolo
[11:06:56] _lazarevsky: what is the << command in ruby
[11:06:58] _lazarevsky: what does it mean?
[11:07:26] jhass: _lazarevsky: it's a method so it depends on what you're calling it. The general intention is "append"
[11:07:51] _lazarevsky: there's a piece of syntax I cannot understand
[11:07:54] _lazarevsky: check this out
[11:08:13] tobiasvl: is it class << self
[11:08:15] tobiasvl: just guessing
[11:09:12] _lazarevsky: ldap.search(base: "internal.com", filter: filter) { |entry| << {id: entry.uid.first, name: entry.gecos.first} }
[11:09:20] _lazarevsky: and after that it returns results
[11:09:29] _lazarevsky: so first it does
[11:09:35] _lazarevsky: then ldap.search(base: "internal.com", filter: filter) { |entry| << {id: entry.uid.first, name: entry.gecos.first} }
[11:09:40] _lazarevsky: then return results
[11:09:50] jhass: I don't think that's valid syntax
[11:09:52] _lazarevsky: what is |entry|?
[11:10:01] jhass: >> ldap.search(base: "internal.com", filter: filter) { |entry| << {id: entry.uid.first, name: entry.gecos.first} }
[11:10:02] eval-in: jhass => /tmp/execpad-ef1e0d6b28a4/source-ef1e0d6b28a4:2: syntax error, unexpected << ... (https://eval.in/135372)
[11:10:09] jhass: see, not valid syntax
[11:10:20] jhass: |entry| is the block argument
[11:10:34] _lazarevsky: but then how come result is popuylated?!
[11:10:40] crome: results << {id: entry.uid.first, name: entry.gecos.first}
[11:11:01] _lazarevsky: it's |entry| results <<
[11:11:05] _lazarevsky: that makes more sense..
[11:11:07] crome: surprise!
[11:11:17] jhass: so that appends the hash to the results array
[11:11:18] kith: is results an array then?
[11:11:32] _lazarevsky: is multiple arrays yea
[11:11:40] _lazarevsky: I wanna see what's in |entry|
[11:11:56] jhass: if search returns an enumerator it would be better to write results = ldap.seach(...).map {|entry| {...} }
[11:12:19] jhass: _lazarevsky: google what are blocks in ruby
[11:17:20] _lazarevsky: jhass: ok cool... in my particular example.. how can I check the value of |entry|
[11:17:21] Hanmac: jhass that what lazy is for
[11:19:23] gry: I have this issue. http://askubuntu.com/questions/81939/foreman-command-not-found. `rbenv rehash` does not solve it. Please suggest.
[11:25:34] user__: What's the equivalent of pythons "in" method in ruby?
[11:25:49] user__: or more generally a substring search
[11:26:03] Hanmac: user__: show us a python sample
[11:26:24] tobiasvl: "in" is not a method in python, it's a keyword (and it allows list comprehension, a feature ruby doesn't have but often uses blocks for instead)
[11:26:27] Hytosys: Array#include?
[11:27:03] user__: if "red" in "blueyellowredorange" do ...
[11:27:21] user__: right ill have to use type methods then
[11:27:23] Hytosys: String#include?
[11:27:33] Hanmac: >> !!"blueyellowredorange"["red"]
[11:27:33] eval-in: Hanmac => true (https://eval.in/135385)
[11:27:57] Hanmac: #[] is allmighty!
[11:28:01] tobiasvl: >> "blueyellowredorange".include? "red"
[11:28:02] eval-in: tobiasvl => true (https://eval.in/135386)
[11:29:12] user__: Hanmac: how does !!"string"["substring"] work?
[11:29:24] Hanmac: >> "string"["substring"]
[11:29:24] eval-in: Hanmac => nil (https://eval.in/135387)
[11:29:34] Hanmac: >> "blueyellowredorange"["red"]
[11:29:34] eval-in: Hanmac => "red" (https://eval.in/135388)
[11:30:16] Hytosys: bit of extra work returning the substring ;)
[11:30:25] tobiasvl: user__: ! is the negation of the boolean evaluation of the following expression
[11:31:15] tobiasvl: "red" is truthy (anything but nil and false is truthy in ruby), so !"red" is false, and !!"red" is true again (the actual true value, not just truthy this time around)
[11:31:25] tobiasvl: it's kinda hacky though ;)
[11:31:36] Hanmac: user__: read the docs http://www.ruby-doc.org/core-2.1.1/String.html#method-i-5B-5D "String#[] > str[match_str] -> new_str or nil > If a match_str is given, that string is returned if it occurs in the string."
[11:32:01] user__: thanks all
[11:32:22] tobiasvl: farewell young traveller
[12:09:41] timgauthier: really active in here today :P
[12:13:19] timgauthier: lets see how fighting with SSG's written in ruby goes today
[12:24:43] Renich: Hey guys; sorry to bother you again with this but: a) rubygems failing from some servers: http://prntscr.com/38z1ci, b) traceroute from them: http://prntscr.com/38yz81 and http://prntscr.com/38yzkn
[12:24:52] Renich: Been having trouble since yesterday with this
[12:25:10] timgauthier: wow, yeah i remember seeing you on yesterday with that
[12:25:34] Renich: timgauthier: yeah, I really think it's on Amazon's side
[12:25:54] timgauthier: i personally don't know anything about that stuff, and i'm completely new at ruby though so sorry :(
[12:26:08] Renich: timgauthier: no worries
[12:26:08] timgauthier: i was having problems yesterday with that stuff, but it was all local
[12:26:29] timgauthier: anyone here a middleman user?
[12:28:03] timgauthier: how do you pull current date from ruby?
[12:28:38] Renich: timgauthier: Time.now
[12:28:51] Renich: timgauthier: np
[12:29:15] timgauthier: how would you put variables on it like in php you can do Y or %Y
[12:29:55] Renich: timgauthier: http://ruby-doc.org/core-2.1.1/Time.html
[12:30:29] Jamo: I dont know pho but what are you trying to do?
[12:30:50] timgauthier: I want to display the time (year) in the copywriter at the bottom of my middleman app blog
[12:31:11] Jamo: Time.now.strftime("%Y")
[12:31:30] timgauthier: and i finally just scrolled to that part.. haha thanks man :D
[12:31:34] certainty: >> puts "The year is #{Date.today.year}"
[12:31:35] eval-in: certainty => undefined method `today' for Date:Class (NoMethodError) ... (https://eval.in/135411)
[12:31:45] certainty: >> puts "The year is #{Time.now.year}"
[12:31:45] eval-in: certainty => The year is 2014 ... (https://eval.in/135412)
[12:32:12] timgauthier: is it possible to pull to just get the 2014
[12:32:19] timgauthier: and not the "the year is" ?
[12:32:27] certainty: Time.now.year
[12:32:42] timgauthier: of course it would ... lol
[12:32:53] timgauthier: ruby is too easy sometimes
[12:33:16] timgauthier: you guys are always so nice when i ask such dumb questions
[12:33:44] timgauthier: now in theory that date will update when i build my middleman, so the html will always only have the year of when it was built
[12:33:47] certainty: we all do from time to time. So who's gonna throw the first stone
[12:34:15] Renich: repost: Hey guys; sorry to bother you again with this but: a) rubygems failing from some servers: http://prntscr.com/38z1ci, b) traceroute from them: http://prntscr.com/38yz81 and http://prntscr.com/38yzkn
[12:34:19] timgauthier: Gentlemans and Womans, I would be honoured to be stoned by you :P
[12:34:23] Hytosys: the trademark ???thank you??? emotional nerd moment
[12:36:00] timgauthier: trying to convert from jekyll to middleman or nanoc has literally caused me a loss of sleep... but i feel like i'm learning so theres that
[12:36:19] timgauthier: and that moment when your template loads in middleman properly is a pretty good payoff
[12:38:06] timgauthier: how do you set :variable ' ' empty?
[12:38:12] timgauthier: just like that?
[12:39:04] Renich: :i am a symbol ;)
[12:39:49] timgauthier: what if your symbol needed to be a relative url?
[12:40:20] Hanmac1: timgauthier: i think you using symbols wrong ...
[12:40:26] timgauthier: probably Hanmac
[12:41:04] timgauthier: in middleman i'm doing set :baseurl in the config.rb and then in my footer partial i'm calling a url with <%= config.baseurl %>url
[12:41:27] timgauthier: but it works... so there is that
[12:44:14] timgauthier: maybe.. i have no idea
[12:52:05] shevy: erb is so ugly
[12:52:13] timgauthier: so is your face shevy :P
[12:52:22] timgauthier: its not so bad though so far
[12:52:24] shevy: but I dont put my face out on the www!
[12:52:26] shevy: unlike erb
[12:52:33] timgauthier: I AM FINALLY ACTUALLY HAVE SUCCESS
[12:52:41] timgauthier: technically you don't put .erb on the web either..
[12:52:48] timgauthier: it gets turned into pretty (ugly) html
[12:53:30] Cork: is there a clean way to have multiple methods running the same code and passing the method name to a third party?
[12:54:11] Cork: def <names>; call(action: name); end
[12:54:36] canton7-mac: Cork, define them at runtime? define_method
[12:55:10] Cork: canton7-mac: and how would i get what name was called?
[12:55:16] Cork: in the function i mean
[12:56:24] Cork: canton7: or did you mean to dynamically create the duplicated functions?
[12:56:28] Cork: *canton7-mac:
[12:56:56] canton7-mac: the latter, yes
[12:57:03] canton7-mac: or, worse imo, define method_missing
[12:57:13] shevy: timgauthier I am kinda confused still though
[12:57:22] shevy: timgauthier how did you actually end up with ruby now?
[12:57:28] shevy: didn't you just want some static site generator...
[12:57:29] timgauthier: what do you mean?
[12:57:44] timgauthier: and so i was using jekyll
[12:57:46] timgauthier: and it was good
[12:57:52] timgauthier: until i wanted to do something that was impossible for jekyll
[12:57:55] shevy: jekyll uses erb?
[12:58:02] timgauthier: no it uses liquid, which is actually worse
[12:58:20] timgauthier: and then I was trying nanoc, but that wasn't so easy.. it is too extendible but doesn't have enough built it ;)
[12:59:00] timgauthier: and now i'm trying middle man, and i actually have most of a template working so far... haven't tackled the ridiculous blog index yet though. That was the point where nanoc was with us yesterday and it was very ... difficult.
[12:59:42] timgauthier: oi... now that i'm using middleman to compile my sass i guess i have to actually import bourbon correctly.. ughh now to look that up lol
[12:59:45] Hanmac: if everything fails i could write an HTTP server in C ;P
[13:00:06] timgauthier: do it in haskell
[13:00:51] timgauthier: wait! I can import bourbon as a gem now!
[13:01:13] timgauthier: ps, now i know why these big ruby sass libraries are all drinking related. . . :|
[13:02:40] timgauthier: *gasp* they updated/changed the bourbon.io site!
[13:06:19] timgauthier: hmm... something on my computer is playing an audio advertisement...
[13:07:12] timgauthier: sorry, verbal stream. i will recuse myself to only asking annoying ruby questions again
[13:07:39] timgauthier: actually, rails question, gem file, can i use 'quotes' and "quotes" interchangibly?
[13:09:36] shevy: timgauthier the way I read your corrent progress story
[13:09:44] shevy: you'll end up using either rails or writing your own framework from scratch
[13:10:02] shevy: http://imgs.xkcd.com/comics/standards.png
[13:10:22] shevy: Hanmac why can you write a HTTP server in C, I thought you don't even have time for rxw!
[13:10:48] shevy: timgauthier as for '' vs ""
[13:10:50] timgauthier: shevy oh man.. so true
[13:11:13] shevy: timgauthier ruby uses "" internally anyway as far as I know. but if you have a string with "", and you embed a variable in it, then you will process it, unlike '' which will never ever get processed
[13:11:23] shevy: puts "What is #{x}?"
[13:11:29] shevy: will always be different to
[13:11:32] shevy: puts 'What is #{x}?'
[13:12:08] ddv: yeah it's called string interpolation
[13:12:09] shevy: thus for the most part you can use 'quotes' and "quotes" interchangibly
[13:12:19] shevy: hmm ddv have you been ddd in the past?
[13:12:21] timgauthier: that makes sense to me
[13:12:27] ddv: shevy: no
[13:12:34] shevy: that guy that went into engineering in his late 40s
[13:12:52] ddv: I'm def not 40
[13:13:59] timgauthier: ugh my scss is a mess, i really should redo all ove it
[13:14:41] shevy: timgauthier see
[13:14:47] shevy: you didn't yet come to the zen of ruby
[13:14:48] timgauthier: but... that isn't new ;)
[13:14:58] timgauthier: what is that shevy?
[13:15:01] shevy: the zen of ruby means that beaty is hidden somewhere
[13:15:10] shevy: like if you sculpt a stone statue, and you start from a huge rock
[13:15:13] timgauthier: the beauty is the output
[13:15:25] shevy: you could use php with that attitude!
[13:15:28] timgauthier: but man it was like using TNT to scult
[13:15:34] shevy: well that is ok
[13:15:38] timgauthier: oh? sorry, i interrupted.. go on?
[13:15:38] shevy: there is more than one way to sculpt
[13:15:49] shevy: no, we brought the discussion down to php again :(
[13:15:55] shevy: I am depressed now
[13:16:12] shevy: http://www.tnx.nl/php.jpg
[13:16:38] timgauthier: am much better
[13:16:42] shevy: Hanmac, what is your name on rubygems.org?
[13:16:50] timgauthier: ok, so what is the zen, and am I missing it by wanting to delete my sass and resculpt?
[13:16:52] shevy: timgauthier well the point is the language that is used (the tool)
[13:17:01] shevy: if you use crappy tools, it's much harder to get great results
[13:17:13] timgauthier: are you saying i should write my css in erb!?
[13:17:18] shevy: I dont know how sass looks
[13:17:22] Hanmac: shevy hm i dont remember i need to look (because you see rwx is still not publisched as gem yet)
[13:17:29] shevy: but it strikes me as layers of layers of ugliness
[13:17:29] timgauthier: sass is css preprocessor in ruby
[13:17:33] MrPopinjay: Hi guys. Has anyone any experience with the roo spreadsheet reading gem? How long is it expected to take to read a xls file?
[13:17:38] shevy: just like coffeescript!
[13:17:50] timgauthier: and almost as pretty as it
[13:17:58] timgauthier: it does amazing things like assign VARIABLES TO CSS!
[13:18:05] shevy: MrPopinjay been a while since I last used it...
[13:18:07] timgauthier: and mixins which let you write DRY css
[13:18:29] Burgestrand: timgauthier: https://github.com/porada/middleman-autoprefixer
[13:18:42] timgauthier: thats what i think i am trying to use
[13:18:54] shevy: MrPopinjay, I use stuff like Spreadsheet::Workbook.new
[13:19:03] timgauthier: Burgestrand why would i need that? that is built into compass?
[13:19:08] shevy: http://spreadsheet.ch/
[13:19:13] MrPopinjay: Is spreasheet another gem? Does it read xls? :)
[13:19:30] MrPopinjay: It parsed ok this time. Not sure what happened
[13:19:36] shevy: not 100% sure if it can read, but 100% it can generate .xls, so I am rather convinced it should be able to understand it as well
[13:19:52] timgauthier: yah shevy, you just have to put it backwards right?
[13:20:03] timgauthier: no, php can create a lot of things that it can't read
[13:20:11] shevy: I used it to generate week dates for the coming week in .xls
[13:20:14] timgauthier: intact it often can't really read what it created in php for itself :|
[13:20:26] shevy: I meant the spreadsheet stuff, not php
[13:20:28] Burgestrand: timgauthier: in compass/bourbon you have to remember youself which properties require vendor prefixing, and use a mixin for it, e.g. @include border-radius(5)
[13:20:31] timgauthier: shevy you wanna get really depressed, i can show you what i had to deal with in my last php project..
[13:20:40] shevy: I would not know what php can do other than drive you insane
[13:20:49] timgauthier: border-radius doesn't need a prefix anymore, but yes
[13:20:50] shevy: no, I abandoned php
[13:20:52] Burgestrand: timgauthier: eventually, those properties become standardised and you no longer need to use mixins for it, (for example border-radius), and as such you should no longer use the mixin and update your code
[13:20:53] shevy: for python or ruby
[13:20:55] shevy: I chose ruby
[13:21:05] MrPopinjay: Ruby's just so nice <3
[13:21:07] shevy: I wouldn't go back to php; if ruby were to die, I would use python instead
[13:21:10] timgauthier: so this goes in and does all of those for you... hmm
[13:21:10] Burgestrand: timgauthier: autoprefixer makes it possible for you to just write border-radius: 5px, and never bother when you need to use the mixin, and when not to
[13:21:12] MrPopinjay: Especially once you find pry
[13:21:22] shevy: MrPopinjay, https://github.com/zdavatz/spreadsheet "The Spreadsheet Library is designed to read and write Spreadsheet Documents. As of version 0.6.0, only Microsoft Excel compatible spreadsheets are supported."
[13:21:43] timgauthier: MrPopinjay i never thought that id' still have to learn how to use a pry bar... i mean in RL i just smash stuff wit it
[13:21:56] shevy: timgauthier you could stick to irb too :>
[13:22:01] timgauthier: Burgestrand that.. actually makes a lot of sense, I'm just thinking in my head about how i would actually use it
[13:22:04] MrPopinjay: <3 pry <3 ruby
[13:22:17] shevy: <3 bugs <3 she-males
[13:22:21] Burgestrand: timgauthier: if you started using middleman, just follow the README ;)
[13:22:24] MrPopinjay: Those are good too
[13:22:33] shevy: I just wanted to put an opposite pole to pry and ruby
[13:22:45] shevy: perhaps it should have been programming... hmm
[13:22:50] benzrf: MrPopinjay: hows tricks
[13:22:50] shevy: <3 php <3 XML
[13:22:56] timgauthier: i've got middleman going, i'm just playing with the preprocessing to add in bourbon/neat/bitters
[13:22:57] Burgestrand: There???s an autoprefixer for rails as well
[13:23:00] benzrf: MrPopinjay: u should try out my new project o3o
[13:23:05] MrPopinjay: What's that?
[13:23:17] timgauthier: they're some sass modules
[13:23:24] benzrf: MrPopinjay: quick
[13:23:36] timgauthier: neat adds is a grids system
[13:23:41] benzrf: MrPopinjay: https://github.com/benzrf/quick/tree/master/demo <- download both files
[13:23:43] timgauthier: bitters is base styles and resets
[13:23:53] timgauthier: err, bourbon.io
[13:23:58] Burgestrand: timgauthier: both bourbon and neat have middleman gems for them, just FYI!
[13:24:00] benzrf: MrPopinjay: resize your terminal to at least 124 x 33
[13:24:00] timgauthier: bitters.bourbon.io
[13:24:07] timgauthier: wait. they have a separate gem for middleman?
[13:24:10] benzrf: MrPopinjay: scriptreplay timing -s typescript
[13:24:16] Burgestrand: timgauthier: https://github.com/railsjedi/middleman-bourbon
[13:24:20] Burgestrand: timgauthier: https://github.com/wibron/middleman-neat
[13:24:21] timgauthier: i shouldn't just use the gem "bourbon" ?
[13:24:24] Burgestrand: timgauthier: https://github.com/tarebyte/middleman-bitters
[13:24:35] Burgestrand: timgauthier: you can, but those gems hook the stuff up for you, less configuring more SCSSing
[13:24:39] timgauthier: what would a middleman specific gem do?
[13:24:49] timgauthier: you ninja answered my question before i asked it
[13:24:57] Burgestrand: timgauthier: it makes including bourbon just three lines of code
[13:25:11] Burgestrand: (one line, in three files)
[13:25:12] shevy: I wanna include vodka
[13:25:17] timgauthier: gem "middleman-bourbon" etc?
[13:25:24] shevy: gem "pizza-too"
[13:25:29] Burgestrand: timgauthier: have a look at the links, their README explain well how to add them
[13:25:38] timgauthier: oh man. yeah ok thanks
[13:25:48] Burgestrand: timgauthier: except maybe middleman-bitters
[13:25:49] MrPopinjay: benzrf: What's this now?
[13:26:06] timgauthier: bitters is a bit weird though so its ok
[13:26:07] Burgestrand: timgauthier: appears middleman-bitters wasn???t much worth having, sorry about that
[13:26:13] benzrf: MrPopinjay: did u do the resize and scriptreplay
[13:26:16] timgauthier: what do you mean?
[13:26:25] benzrf: MrPopinjay: https://github.com/benzrf/quick/tree/master/demo <- download both filse
[13:26:29] Burgestrand: timgauthier: it looks to be a generator for a middleman project, and not a gem for only including bitters like bourbon and neat
[13:26:32] benzrf: MrPopinjay: resize ur term to at least 124 x 33
[13:26:36] benzrf: MrPopinjay: $ scriptreplay timing -s typescript
[13:26:40] MrPopinjay: Sorry dude, am at work
[13:26:47] benzrf: it is a demo of the thing =3
[13:26:57] timgauthier: well bitters needs to be generated into a project, so it makes sense they'd do it that way
[13:27:15] Burgestrand: timgauthier: oh, even that was wrong, it appears it???s just a complete middleman project
[13:27:30] Burgestrand: timgauthier: where they just copied bitters
[13:27:43] slavapavlutin: Hi, guys! Does anyone knows the way to omit comments when initializing a new Rails project? Comments really distract me from the essence.
[13:28:22] Burgestrand: slavapavlutin: me too. I tend to remove most of them manually when I see them.
[13:28:44] Burgestrand: slavapavlutin: as far as I know, there???s no way to exclude them. I would assume they???re hard-coded into the template files.
[13:32:35] timgauthier: Burgestrand is the best
[13:32:42] timgauthier: and i keep thinking his name is Deutche
[13:32:46] timgauthier: there is a missing s in there
[13:33:13] Burgestrand: I used to hang out in here a lot a few years back. People used to call me burger.
[13:33:20] Burgestrand: People IRL still sometimes do.
[13:33:30] timgauthier: i probably was here a few years ago trying to learn rails :P
[13:34:10] Burgestrand: timgauthier: why deutsche?
[13:34:28] timgauthier: the town i lived in before had Burgestra??e
[13:34:36] timgauthier: Burg being mountain
[13:34:52] timgauthier: the fun part of that particular Burgstra??e is that there is no more Burg
[13:35:11] Burgestrand: Well, I???m a Swede so it???s not that far off.
[13:35:13] timgauthier: its just a bunch of communist built concrete flats at one end
[13:35:32] timgauthier: i'm a canadian in germany. so things like this fascinate me
[13:36:33] slavapavlutin: If somebody wants to deepen their Ruby understanding, I suggest reading "Ruby Under a Microscope" by Pat Shaughnessy. He's done an amazing work translating C code into a book that can help better understand Ruby and become a better programmer. :)
[13:36:57] timgauthier: that sounds good if you already understand C code i'm guessing?
[13:37:06] timgauthier: Can someone write Ruby ELI5 ?
[13:37:13] timgauthier: i'd read the crap out of that book :D
[13:38:01] Burgestrand: Pat makes a good job of explaining even the C code fairly well.
[13:38:49] slavapavlutin: The book doesn't require readere to be able to understand C code. The author explain all the details important to understanding so that noobs like me could learn something.
[13:39:17] timgauthier: cool, its called "ruby under a microscope" ?
[13:39:26] benzrf: slavapavlutin: dude i know ruby soo good
[13:39:31] slavapavlutin: The next step after reading Pat's book is learning C, I guess. :)
[13:39:35] benzrf: its like totally nuts how good i know RubyPanther
[13:39:49] Silex: hello, how about redirecting either #ruby or #ruby-lang to the other one? that way there's only one channel for everyone to use
[13:40:03] timgauthier: can you do that with irc?
[13:40:17] Silex: (I'm asking the same question in #ruby-lang)
[13:40:48] Silex: yes you can, just like #c++ redirects to ##c++
[13:41:07] timgauthier: those are the same thing..?
[13:41:26] Burgestrand: timgauthier: he???s made a series of blog posts that are good, too.
[13:41:57] timgauthier: ugh i hate atom.io :|
[13:41:58] atno: is there a list for rails specific gems?
[13:42:04] benzrf: timgauthier: y
[13:42:25] timgauthier: because it feels so broken..
[13:42:31] timgauthier: stuff lie no tag closing
[13:42:44] timgauthier: or doing things that are REALLY close to text mate or sublime but ... not quite
[13:43:13] slavapavlutin: Ugh? Atom.io? I thought every single Ruby programmer uses Vim...
[13:43:38] timgauthier: slavapavlutin :P
[13:44:01] Silex: who is operator of this chan?
[13:45:30] benzrf: vim is good all else fails emacs is ok
[13:45:58] timgauthier: what the sock... it isn't complain.. waiiit
[13:46:11] slavapavlutin: So, everybody knows that Ruby community exploits BDD/TDD a lot. Do you use Cucumber for your projects?
[13:46:37] timgauthier: your symbol should point at the right folder
[13:46:59] ddv: slavapavlutin: no Cucumber sucks for various reasons
[13:47:04] ddv: slavapavlutin: even DHH hates it
[13:47:09] slavapavlutin: I recently started considering Cucumber as a planning/documenting tool and it really fits into my mindset.
[13:47:33] timgauthier: shevy, IRC is distracting me again!!
[13:47:51] slavapavlutin: What reasons exactly? Various is too vague, I guess.
[13:47:52] ddv: http://www.rubyinside.com/dhh-offended-by-rspec-debate-4610.html
[13:48:23] aob: I'm trying to work out how to send a command to an object, where the command varies: http://lpaste.net/102561
[13:48:31] slavapavlutin: I don't consider DHH "the best guy" in the world nor in the Ruby community.
[13:48:40] aob: obv. not working... what am I doing wrong?
[13:48:55] benzrf: david heinemeier hansson more like david hasselhoff
[13:49:07] timgauthier: but i agree with DHH
[13:49:12] timgauthier: why would you have your clients reading tests...
[13:49:26] timgauthier: and testing in english is great, unless your site isn't nessarily english
[13:49:52] timgauthier: aob like an internal api?
[13:50:26] aob: timgauthier: what I'm actually trying to do is take an option from Thor and call a method accordingly
[13:50:54] slavapavlutin: Cucumber allows to write specifications in almost any language possible and use plain language as well. You're talking about RSpec exclusively, I assume.
[13:50:54] timgauthier: i'm the newb, but i'm just suggesting what i was thinking you where trying to do in a different term to spark creativity and learning. :P
[13:51:10] timgauthier: slavapavlutin i don't have a clue what i'm talking about
[13:51:10] aob: so if my command was mycommand print caps hello
[13:51:15] Burgestrand: slavapavlutin: I???ve stopped using Cucumber. I find that the separation of the steps and the code to be confusing when developing.
[13:51:22] timgauthier: someone make css work with colour spelt correctly and i'll be impressed
[13:51:23] slavapavlutin: Cucumber is an external DSL whereas RSpec is an internal one.
[13:51:25] aob: the 2 args thor sees re caps and hello
[13:51:27] timgauthier: hell, Farbe would be ok too
[13:51:37] aob: so I want to call the caps method with hello as an arg
[13:52:01] aob: so I'm trying to do thing.send(command) but that's not right, obvioulsy
[13:52:16] timgauthier: you guys distracted me, i was going to look up how to get active page variables in middleman.. *shakes fist vigerously
[13:52:45] slavapavlutin: Cucumber comes handy when you develop user-oriented projects where users are not programmers. In other words, it's useful when not writing libraries or simple frameworks.
[13:53:36] Burgestrand: slavapavlutin: I disagree. In the off chance that we???d show our test specification to our client, cucumber is not necessarily much more readable than plain rspec and capybara.
[13:54:21] timgauthier: shevy if current_page.data is a hash and i have a yaml front matter like title: "this is the title" why do call the key with current_page.data.title instead of current_page.data[:title] ?
[13:54:34] Burgestrand: I???ve found that most of the time the client doesn???t really care much about the test specification. They read the user story we???ve prepared in e.g. pivotal tracker, that is even one step further away from the code than cucumber.
[13:55:09] timgauthier: shevy, Burgestrand why does current_page.data.title work, I understand why current_page.data[:title] works...
[13:55:12] Burgestrand: I haven???t used cucumber for nearly two years now.
[13:55:22] slavapavlutin: Burgestrand: I think it depends on level of the technical details your clients exposed to. However, in most cases RSpec suffices, I agree.
[13:55:26] timgauthier: in my experience clients usually just want to know that it works
[13:55:30] Burgestrand: timgauthier: people sometimes write accessors like that because they find it prettier.
[13:55:33] Cope: aob: you didn't send your argument as a string
[13:55:45] timgauthier: which one does ruby consider prettier? the . ?
[13:56:05] Burgestrand: slavapavlutin: in the case where they don???t care about technical details, the way I write cucumber specs is still too technical.
[13:56:15] Burgestrand: timgauthier: ruby likes many things.
[13:56:43] Burgestrand: timgauthier: the beauty of ruby is that it is including, not excluding. In other words, pick the one you prefer, but don???t cheat.
[13:56:48] slavapavlutin: Burgestrand: Heh. :) Writing clear specfications is a skill on its own. :)
[13:56:59] arubincloud: It is not about making it prettier necessary.
[13:57:03] arubincloud: It is about uniform access.
[13:57:12] basichash: What's the ruby equivalent of os.system in python?
[13:57:21] arubincloud: http://en.wikipedia.org/wiki/Uniform_access_principle
[13:57:33] arubincloud: s/necessary/necessarily/
[13:58:00] Burgestrand: slavapavlutin: Indeed :)! I???ve just found that when using Cucumber the steps either become overly specific (Create an invoice) and unmaintainable, or too generic (Click ???Invoices???, Click ???Edit???, Fill in???) and not very useful for the client.
[13:58:08] timgauthier: whats the ruby equiv of phps isset? .nil?
[13:58:22] timgauthier: When I use a cucumber i get a rash
[13:58:25] benzrf: atom.io appears to be to ST as ST is to vim
[13:58:25] benzrf: this saddens me
[13:58:28] timgauthier: i couldn't stop myself anymore :(
[13:58:38] Burgestrand: timgauthier: has_key?
[13:58:56] timgauthier: so i could do an if has.has_hey?
[13:58:58] Burgestrand: timgauthier: sorry, I???m full of shit.
[13:59:01] benzrf: basichash: Kernel#system
[13:59:16] timgauthier: i wish you weren't :P
[13:59:17] Burgestrand: timgauthier: rails has a method for it, called #present? and #blank?
[13:59:21] benzrf: >> system 'ls /' # basichash
[13:59:21] eval-in: benzrf => (https://eval.in/135429)
[13:59:30] Burgestrand: timgauthier: vanilla ruby doesn???t, so you???d probably just check for something.nil?
[13:59:33] timgauthier: Burgestrand i'd be able to use those in middleman
[13:59:47] Burgestrand: timgauthier: I do believe so. I think they might pull in activesupport, i.e. half of rails.
[14:00:38] Burgestrand: Too bad that he left.
[14:00:45] Burgestrand: >> system ???ls???, ???/???
[14:00:45] eval-in: Burgestrand => undefined local variable or method `?ls?' for main:Object (NameError) ... (https://eval.in/135432)
[14:01:04] Burgestrand: Oh. Darn smart quotes.
[14:01:20] Burgestrand: >> system "ls", "/"
[14:01:20] eval-in: Burgestrand => (https://eval.in/135433)
[14:01:20] timgauthier: so i could do like if current_page.data[:title].present?
[14:01:26] Burgestrand: timgauthier: Yep!
[14:01:39] slavapavlutin: Burgestrand: It's the real point of Cucumber ot make your specifications easy to understand for your audience. If your audience is programmers, you don't actually need it because programmers can read code with ease. But in other cases it's better to use plain language to establish the requirements for your projects together with your clients. In the case of technically illiterate clients, you have to use language they can understand. Plain language allows
[14:01:52] Burgestrand: timgauthier: in some cases, you could also just do: current_page.data[:title].presence or "default value"
[14:01:59] timgauthier: so if i want it to show the title if there is one, but if not use a different variable in that place would i do
[14:02:18] timgauthier: oh.. so without an if?
[14:02:27] bhaak: we're using rspec for the usual unit tests and cucumber (combined with capybara) for the integration tests
[14:02:39] timgauthier: you'd just do an or and could "default value" be a different config[:title] ?
[14:02:46] Burgestrand: slavapavlutin: I understand where you're going. It used to be my reasoning ~3 years back.
[14:03:23] bhaak: I've just recently came onto this project as a programmer and it really helps having specifications that are detached from actual code. but I would never show them to the customer. they are just too detailed (of course, they are integration tests)
[14:03:58] slavapavlutin: Burgestrand: Yeah, personal experience is so personal. :) The most important point is to get things done not struggling at the same time. No matter actually what tools exactly you use. :)
[14:04:00] timgauthier: Burgestrand wow that works... so ruby!
[14:04:17] Burgestrand: I changed my opinion over time. I now consider that the value that Cucumber provides (executable specification) is better done separately; an explanation for your client that is easy to read, and an explanation for your developers that is easy to maintain.
[14:04:33] Burgestrand: I don't mix the two.
[14:04:57] Burgestrand: slavapavlutin: but I understand if you still feel that Cucumber is a nice idea. I can respect that.
[14:06:13] slavapavlutin: Burgestrand: Perhaps I will come to the same conclusion as you did, but now Cucumber helps me learn and develop better software, so there's no need for others to say that a tool should not exist if some people doesn't find it useful.
[14:07:00] Burgestrand: slavapavlutin: yes, I agree. Not everybody should have the same opinion as me, that would be awfully boring.
[14:07:29] timgauthier: Burgestrand ahh if the key is present then it returns true.. is there any way to make it return itself? or would i then do an if hash[:key].present? ; hash[:hey] ; otherhash[:key] end ?
[14:07:34] Burgestrand: slavapavlutin: regarding Cucumber, a colleague of mine wrote a gem to manage Cucumber steps in a different way a while ago: https://github.com/jnicklas/turnip
[14:07:57] slavapavlutin: Burgestrand: I'm familiar with Turnip.
[14:08:00] Burgestrand: slavapavlutin: if I were to use Cucumber and RSpec, I'd probably use that??? but as you already know I won't be using that. :p
[14:08:23] Burgestrand: ??? at least not by initial choice, but I'm open to bribery.
[14:08:33] slavapavlutin: How about Jim's rspec-given? :)
[14:08:38] Burgestrand: timgauthier: hash[:key].presence
[14:08:51] Burgestrand: timgauthier: it will return the value if it is present, or nil if the value is empty or nil
[14:09:05] Burgestrand: timgauthier: anything.presence || "default value"
[14:09:06] timgauthier: sersly... ruby.. why have i taken so long
[14:09:19] Burgestrand: timgauthier: for hashes specifically, you can also do: hash.fetch(:key, "default value")
[14:09:32] Burgestrand: timgauthier: it's slightly different, Hash#fetch will return the key if it exists, even if it is nil or false
[14:10:12] Burgestrand: slavapavlutin: I haven't had a look at it.
[14:10:12] slavapavlutin: How about little philosophy? What's the most important quality of Ruby that makes you a happy developer? :)
[14:10:38] timgauthier: slavapavlutin the fact that if hash.hey.presence does exactly what it does
[14:11:06] Burgestrand: slavapavlutin: hehe. I believe it's flexibility.
[14:11:32] shevy: timgauthier dunno how it does it, but if you have ie: object[:bla], you can also dynamically create methods if you want to in ruby, so that object.bla would also work
[14:11:40] slavapavlutin: For me, Ruby is a partially ugly language that allows to develop really beautiful APIs. And beautiful APIs written in Ruby make me happy. :)
[14:11:49] Burgestrand: slavapavlutin: Ruby can be contorted in so many ways, which makes development creative. The balance in using that flexibility while also making code not hard to maintain is the puzzle. Puzzles are fun.
[14:11:50] timgauthier: yah shevy it blows my mind
[14:11:55] shevy: slavapavlutin depends on how you use ruby really
[14:12:01] shevy: if you use lots of @@ and $ then yeah
[14:12:03] shevy: you end up with shit
[14:12:29] shevy: timgauthier that's bad, don't let it blow your mind, keep it simple
[14:12:31] Burgestrand: slavapavlutin: Hah, indeed. Ruby isn't always nice to you.
[14:12:48] shevy: just because a feature exists does not mean you have to use it
[14:12:49] timgauthier: it blows my mind because how convoluted it was in php or even liquid
[14:12:59] shevy: ruby code can be convoluted as well!
[14:13:05] timgauthier: no, I actually need to use it, just it is much easier then i expected
[14:13:07] shevy: ask jhass why it is bad to have a class with +3000 lines of code
[14:13:21] timgauthier: the whole hash.hey hash[:key] thing is black magic
[14:13:30] slavapavlutin: The thing is that from times to times Ruby is, in fact, a weird language with its weird syntax. But the end result is always beautiful (with enough refactoring and tests, of course). :)
[14:13:32] timgauthier: but i am using hash[:key] because that way i will learn that and understand it more
[14:16:29] shevy: timgauthier, well see
[14:16:41] baweaver: Still at it?
[14:16:43] shevy: timgauthier I can tell you that in like 98% of the cases, it is best to stick to core/main ruby idioms
[14:16:50] shevy: hash[] is common, hash.method not
[14:16:54] shevy: so prefer [] for a hash
[14:17:13] shevy: the only time when I violate that myself is for configuration object
[14:17:15] timgauthier: baweaver me? you bet!
[14:17:24] timgauthier: but today i'm using middleman and actually like... working
[14:17:25] shevy: config[:editor] # vim AND config.editor # same result
[14:17:32] benzrf: smalltalk is 3cool5me
[14:17:52] shevy: get over it already, smalltalk lost against the scripting languages
[14:18:35] benzrf: ur just jelly of our images
[14:18:37] baweaver: I'd wager there's no such thing as losing
[14:18:44] shevy: slavapavlutin ruby syntax can become quite complicated for newcomers
[14:18:44] baweaver: at least in that context.
[14:18:56] shevy: like when you can use {} and when not, yet it still means a hash
[14:19:10] shevy: benzrf the image idea is cool
[14:19:17] shevy: if it could be coupled with erlang!
[14:19:31] baweaver: ....elixir?
[14:19:46] shevy: baweaver I go with amount of new users usually
[14:20:04] shevy: if a programming language is unable to gain new people, it's dead in my eyes
[14:20:14] timgauthier: shevy example of why the base way of doing things is good. when you have #[:key] how would you write it the other way? #.key?
[14:20:31] baweaver: Perhaps, but if people still use it, it still lives
[14:20:40] shevy: timgauthier you can define methods on objects freely, or generate them programmatically
[14:20:41] Burgestrand: timgauthier: #key
[14:20:47] shevy: baweaver yeah, a semi-life
[14:20:51] slavapavlutin: shevy: syntax seems fine once you get familiar with it. What I really like about Ruby syntax is that it does what you expect it to do. Ruby's OO model is, in fact, really, really straightforward and simple.
[14:21:02] shevy: COBOL stone age
[14:21:10] shevy: Ada paradise
[14:21:16] benzrf: slavapavlutin: taken almost entirely wholesale from smalltalk
[14:21:30] shevy: slavapavlutin kinda
[14:21:34] benzrf: slavapavlutin: the only significant difference is that in smalltalk you have a predefined list of what ivars a class has
[14:21:38] baweaver: Lisp is by all definitions dead in its' original form, but it has a pretty nice grip on things and keeps reviving.
[14:21:52] baweaver: and it was made in the same era as RPG, COBOL, and the like
[14:22:01] benzrf: slavapavlutin: ruby is basically just smalltalk if it were perl
[14:22:03] shevy: I'd say lisp is much more alive than cobol
[14:22:08] slavapavlutin: benzrf: Dunno much about Smalltalk.
[14:22:15] benzrf: slavapavlutin: smalltalk is way Cooler_
[14:22:17] Burgestrand: I should be going. Maybe see yous later.
[14:22:20] deepy: COBOL is very much alive
[14:22:26] shevy: like where
[14:22:28] slavapavlutin: benzrf: To be more precise, I didn't program in it.
[14:22:51] benzrf: slavapavlutin: the big idea in smalltalk vs most other languages is that you do all of your programming within an environment which is itself a running smalltalk program
[14:22:51] baweaver: Financial institutes and businesses
[14:22:58] benzrf: and you can snapshot said program
[14:23:04] shevy: all the financial institutes here nearby use mostly java
[14:23:06] benzrf: so your program is always running
[14:23:10] benzrf: its ALIVE
[14:23:22] baweaver: in your area perhaps
[14:23:25] benzrf: it's like if you did all of your dev from pry, only practical
[14:23:31] shevy: some C++ too
[14:23:39] baweaver: I do do most all of my dev in pry
[14:23:42] slavapavlutin: benzrf: Nice. However, it's kinda dead?
[14:23:47] benzrf: slavapavlutin: possibly
[14:23:52] benzrf: slavapavlutin: you can still use it o=
[14:23:58] benzrf: the issue is that it is its own walled-off ecosystem
[14:24:01] benzrf: likemike:
[14:24:07] benzrf: to a ridiculous degree
[14:24:22] benzrf: you open pharo (version ive tried), it has its own windows within the program
[14:24:23] slavapavlutin: benzrf: I want to do what I want and get paid at the same time. :)
[14:24:27] benzrf: not integrated with WM
[14:24:42] benzrf: you open a new workspace, it's not a file, it's part of the existing program
[14:24:54] timgauthier: what is a more rubyrific way to write != ?
[14:24:54] benzrf: you cant use vim with it because it's all within an existing program
[14:25:01] benzrf: timgauthier: !=
[14:25:02] shevy: slavapavlutin in what area are you working?
[14:25:10] benzrf: it's like a sub OS
[14:25:26] slavapavlutin: shevy: Web development.
[14:25:34] shevy: slavapavlutin php?
[14:25:36] benzrf: slavapavlutin: anyway, i hear SLIME for CL works like this too
[14:25:40] benzrf: only more system integrated =D
[14:25:59] slavapavlutin: shevy: no... fu**ing... way...
[14:26:01] benzrf: slavapavlutin: and Quick, my current project, is to bring something like this to ruby
[14:26:11] shevy: timgauthier see php elicits a strong response usually
[14:26:30] benzrf: the reason is because:
[14:26:32] benzrf: PHP IS SUCK
[14:26:44] shevy: but tiobe says php is better than ruby
[14:26:44] timgauthier: how to make <% if menu != "off" %>
[14:26:44] timgauthier: Menu is not off
[14:26:44] timgauthier: <% end %> not break if menu isn't set ?
[14:26:48] slavapavlutin: PHP is a mess, basically.
[14:26:51] shevy: ack timgauthier
[14:26:55] timgauthier: sorry shevy :P
[14:27:08] shevy: do you really have to use one line per statement in erb?
[14:27:15] shevy: can't you put it all together?
[14:27:19] baweaver: PHP is frankensteins monster
[14:27:30] timgauthier: no you don't i did that for ease of understanding for me.. the "Menu is off" will actually be some html later
[14:27:30] baweaver: It's to keep logic out of views
[14:27:34] benzrf: timgauthier: dont use strings >.<
[14:27:39] shevy: well even in php
[14:27:40] shevy: I could do
[14:27:43] benzrf: timgauthier: use a boolean gosh
[14:27:47] shevy: # shit php code here, lots of lines
[14:27:52] timgauthier: but i have 3 states ;)
[14:27:58] shevy: or something like that, I forgot how to close it
[14:28:10] timgauthier: menu which is default, then menu is off, and masthead_only
[14:28:10] shevy: well that is simple timgauthier
[14:28:14] shevy: case variable
[14:28:16] shevy: when 'state 1'
[14:28:19] shevy: when 'state 2'
[14:28:21] shevy: when 'state 3'
[14:28:30] slavapavlutin: PHP doesn't DRY and SRP compatible. That's a problem for my perfectionist's mind.
[14:28:43] timgauthier: but i don't wanna have to call the partial with a variable all the time.. so really i guess its an if, elsif, else
[14:28:46] shevy: though for only 3 states, if/elsif/else might be shorter
[14:28:54] slavapavlutin: Single Responsibility Principle
[14:28:58] shevy: I love variables!
[14:29:03] timgauthier: but how do i make the whole thing not break if i don't have the variable assigned at all?
[14:29:04] shevy: _ is the best variable
[14:29:08] dagobah: re heartbleed, does one need to recompile ruby?
[14:29:17] shevy: what does that mean?
[14:29:34] shevy: timgauthier you can check whether a variable exists etc...
[14:29:49] shevy: for instance: if var.nil? ... or unless var.nil? ... or defined? var
[14:29:59] shevy: or ... Object.const_defined? :SomeModuleNameHere
[14:30:02] shevy: and so on
[14:30:23] timgauthier: const_defined ?
[14:30:27] shevy: and of course the old ruby trick: x = 'foo' || false
[14:30:34] shevy: timgauthier, only for constants
[14:30:36] dagobah: I don't understand how ruby itself can be vulnerable? https://www.ruby-lang.org/en/news/2014/04/10/severe-openssl-vulnerability/
[14:30:53] shevy: the web is vulnerable!
[14:30:56] shevy: thanks to backdoor programming
[14:31:05] timgauthier: it shouldn't be affecting ruby.. it should just affect the ssl modules?
[14:31:21] timgauthier: so ruby is ok
[14:31:30] timgauthier: but when you attach ruby to openSSL you are exposed
[14:32:05] dagobah: So I;ve upgraded openSSL but not ruby is that fine?
[14:32:29] timgauthier: use the test tool?
[14:33:04] baweaver: http://xkcd.com/1354/
[14:33:06] havenwood: dagobah: how'd you install Ruby?
[14:33:15] dagobah: compiled from source
[14:33:23] dagobah: The test tool now passes
[14:33:37] shevy: a brother!
[14:33:38] havenwood: then you're all good ;)
[14:33:40] shevy: welcome dagobah
[14:33:44] dagobah: but ruby -ropenssl -e 'puts OpenSSL::OPENSSL_VERSION' #=> OpenSSL 1.0.1 14 Mar 2012
[14:33:45] shevy: he also compiles from source
[14:34:05] baweaver: technically rvm compiles from source if it can't get a bin
[14:34:12] shevy: dagobah no error if you go into ext/openssl subdir?
[14:34:16] timgauthier: wait... why would your user account send a message saying "Hat 500 characters" ?
[14:34:38] timgauthier: is that what was wrong with openSSL?
[14:34:40] Mon_Ouie: The attacker would say that, and get extra data that happens to be in memory
[14:34:44] shevy: I just realized I can not test, I am on openssl 1.0.1c myself
[14:34:49] havenwood: dagobah: The OPENSSL_VERSION constant is only set at compile time, so it is likely dynamically linking correctly
[14:35:36] timgauthier: like open SSL had a bug where it would accidentally at some point ask for a short word but leave the character count too long so you'd just keep asking for the 500 characters until that vulnerability happenned?
[14:38:23] timgauthier: what the ... http://xkcd.com/1350/
[14:38:30] canton7-mac: timgauthier, so basically this particular "heartbeat" system worked by the client asking "server, are you there? if so, reply with *this* message, and *this* is the length of that message"
[14:38:45] canton7-mac: the problem is that the server trusted the user to state the correct length of that message
[14:39:10] canton7-mac: so the user could be malicious and make the message length not match up to the message
[14:39:17] timgauthier: i was thinking of it backwards
[14:39:37] canton7-mac: so the server would return the message, plus "garbage" to make up the length the user specified
[14:39:38] timgauthier: users wouldn't ever be malicious ;)
[14:39:48] canton7-mac: excep the garbage was recently-deallocated memory, and could contain sensitive stuff
[14:39:51] timgauthier: the problem was that the garbage was impo... yeah
[14:40:02] timgauthier: so the fix is to fence that out and only return the answer or an error?
[14:40:17] canton7-mac: yeah, if they don't match, handle that as an error case
[14:40:50] dagobah: How easy would it be to expose this vulnerability from within ruby? Making connections out rather than receiving connections?
[14:41:08] dagobah: (via ruby's openssl lib)
[14:41:18] timgauthier: shevy i'm now pondering my use case for that question i had... since it was sort of a template hack when i could do something different... *ponder*
[14:42:15] timgauthier: i was basically using liquid to add or remove class content to fix a css thing... which honestly isn't the smartest thing.. and now erg may make this actually better
[14:42:31] timgauthier: thats the benefit of redoing things. i think you guys call it "refactoring" :P
[14:42:59] timgauthier: ParanoidSP I've been watching you.. We are impressed with your progress. Proceed to the drop location.
[14:43:04] shevy: I dont refactor
[14:43:08] shevy: either it's perfect what I write
[14:43:10] shevy: or I must rewrite
[14:43:26] shevy: usually only when it is small is it perfect
[14:43:35] shevy: once it becomes large, it becomes very, very imperfect
[14:43:48] timgauthier: i rewrite everything usually once or twice
[14:44:03] timgauthier: well yah, or if you are designing and coding as you go, you do it one way, then you change a thing to make a new thing work
[14:44:18] timgauthier: and you do that a few times and the way you originally wrote it is crap. So you rewrite it and viola!
[14:44:32] shevy: I am losing overview when a project becomes large... like when it has +50 .rb files
[14:44:54] ddv: if you lose overview it means you need to refactor :P
[14:53:12] timgauthier: how would you write if menu.present? or != "off" ?
[14:54:13] timgauthier: if menu.present? and != 'off' or menu.nil?
[14:57:17] havenwood: timgauthier: 'off' <- always truthy
[14:57:33] timgauthier: not always... because sometimes i don't define menu
[14:57:50] eval-in: havenwood => /tmp/execpad-3ef77ab8bab4/source-3ef77ab8bab4:2: warning: string literal in condition ... (https://eval.in/135496)
[14:57:59] timgauthier: the problem i'm having isn't with the actual if logic, the problem i'm having is that sometimes i don't define menu
[14:58:01] havenwood: coffee time!
[14:58:15] timgauthier: haha yeah i've got coffee time waiting for me in a few moments too
[14:58:22] timgauthier: germans are funny about that i find
[14:58:31] timgauthier: what does !!'off' do?
[15:00:07] havenwood: timgauthier: just a quicky way to get truthiness, like: `!nil #=> true` but `!!nil #=> false`
[15:00:11] timgauthier: i think i'm just trying to do something in a weird way
[15:01:10] havenwood: timgauthier: present? already checks !blank?, maybe show some code?
[15:01:51] Mon_Ouie: I'm not sure what you're trying to do precisely. That code you showed is not valid so I'm not sure what you mean. Also it's rather ambiguous without parentheses around the operators you're using.
[15:01:56] timgauthier: https://gist.github.com/anonymous/10475958
[15:02:17] timgauthier: i'm trying to turn that into erg essentially
[15:02:38] timgauthier: include.menu is just a local variable in middleman so it is menu
[15:02:47] timgauthier: i've gotta run for coffee now though...
[15:13:23] tcstar: So, new to ruby ( and ROR )... have a working nginx setup -- what version of ruby should I install
[15:14:53] timgauthier: ok let me try and rephrase my earlier question, how do i check if a hash has been defined and is not a particular string value?
[15:15:04] havenwood: tcstar: 2.1.1
[15:15:36] certainty: timgauthier: i don't understand that question :)
[15:16:08] certainty: what is the thing you're referring to as a "hash"?
[15:16:23] timgauthier: i'm using middleman to render a partial erb file. I have the option of calling a local variable :locals => { :menu => "off" }
[15:16:42] timgauthier: when i do that, in my partial i can access that with menu != "off" and it works fine.
[15:17:21] timgauthier: but if I render the partial and i do not have the :locals => ... then i get a ruby failure. I don't want to have to always define the :menu and would like to have it handle no menu as part of the != "off"
[15:17:48] timgauthier: am not grasping how to do that with the if statement if !!menu != "off" or menu.nil?
[15:17:49] certainty: what kind of error do you get?
[15:18:02] timgauthier: NameError at /
[15:18:02] timgauthier: undefined local variable or method `menu' for #<Middleman::Application:0x70223129906360>
[15:18:25] certainty: you can't catch that one with a test like ! or .nil? :)
[15:18:44] timgauthier: i'm not entirely sure how to write that
[15:19:16] timgauthier: like how do i say if not .nill then check if it is not "string"
[15:19:16] certainty: you can write if defined?(menu) && menu != "off"
[15:19:25] certainty: not that it's particulary beautiful
[15:19:29] timgauthier: ah... thats ok :)
[15:19:44] timgauthier: ahhhhhh your doing and (&&) ok
[15:20:06] jhass: normally you should be able to avoid such constructs
[15:20:10] timgauthier: is there any form of like hash.nil? that checks if it isn't nill?
[15:20:25] jhass: unless hash.nil?
[15:20:35] timgauthier: jhass yeah, i have been trying to figure out in my head how to do that. but i'm newb
[15:20:46] timgauthier: I'm supposed to ask you about 3000 lines of code in a class jhass :P
[15:20:53] certainty: you could always pass the value for :menu :)
[15:20:56] jhass: you got one?
[15:21:16] jhass: then I'm not sure what to talk about
[15:21:19] timgauthier: yeah certainty i could... but i really don't wanna always do that :P
[15:21:31] certainty: timgauthier: how often is always?
[15:21:31] timgauthier: i don't either jhass, blame shevy :P
[15:21:49] jhass: I've to do that too often, it gets od
[15:22:12] timgauthier: well 90% of the time my menu will not have a variable passed, there are a few pages where i need to turn the menu off and a few others where I need to have menu only but not the rest of the masthead
[15:22:27] timgauthier: haha jhass :P
[15:22:32] timgauthier: shevy is helpful though
[15:23:36] timgauthier: basically certainty menu="off" is an edge case, but i have most of my pages with a full menu and masthead, but then some sections have menu="only" passed off and then the masthead is hidden.. which i did that way because of limitations in liquid... and i keep thinking that there is likely a better or different way to do that in erb.. but i haven't wrapped my head around it
[15:23:46] jottr: what is the best way to run a rake testtask when a file change occurs in a specified directory?
[15:24:41] timgauthier: is there a page for ruby that is like php.net? or i guess it would have to be ruby+rails?
[15:25:17] jhass: timgauthier: you're using rails?
[15:25:23] timgauthier: i'm using middleman
[15:25:31] jhass: then you're not using rails afaik
[15:25:34] timgauthier: i'm not "really" using ruby
[15:25:59] timgauthier: really jhass ? oh, cause i was told by burger that i could call rails methods (and so far it i thought i had)
[15:26:09] certainty: timgauthier: ruby-doc.org
[15:26:20] jhass: well, I've zero experience with middleman
[15:26:49] timgauthier: thats cool thanks :) (i'm still open to going to their IRC room if they have one and someone can direct me :S)
[15:26:58] timgauthier: most of my questions are currently erb though
[15:27:10] jhass: ah, seems to depend on activesupport
[15:27:26] certainty: active shoehorn
[15:28:17] timgauthier: i'm trying to wrap around my head to maybe use an unless instead of if, however ..
[15:28:21] timgauthier: i'll take a few moments
[15:28:33] tcstar: havenwood, thanks for that... i shall heed to your advice
[15:29:15] jhass: timgauthier: it seems to support multiple layouts, I'd look into that. Then you have 3 different layouts, probably just including some partials, and always specifying menu: 'bla' is no pain
[15:29:53] timgauthier: yeah, i'm including a partial, but i was wanting to not include the :menu unless it was different because somehow in m head that made more sense.
[15:30:08] jhass: it even supports nested layouts
[15:30:12] timgauthier: this if defined works so... i might keep that
[15:30:17] timgauthier: yeah i'm using those for blogs etc
[15:30:29] timgauthier: the template/rendering is very similar to jekyll which i love
[15:30:32] timgauthier: and what i'm converting from
[15:30:41] jhass: so you can have your common layout, one that is based on that and displays the menu and one that is based on the previous one and displays the masthead
[15:31:21] timgauthier: this is my half converted partial that calls another partial http://pastie.org/9073180
[15:31:26] jhass: and one that displays only the masthead (and so is based on the common one), if you need that
[15:31:35] certainty: timgauthier: any particular reasons to ditch jekyll?
[15:31:53] timgauthier: certainty yeah, I need to be able to render a partial that isn't in the _include folder
[15:32:04] timgauthier: literally.. that is the only reason certainty ... :|
[15:32:28] timgauthier: i see i can likely use an unless in this next part of the partial
[15:35:06] timgauthier: oh man i'm doing some mental logic acrobatics in my head... ouch this hurts..
[15:36:34] timgauthier: if the hash is nil and not "string" then do this thing
[15:36:41] |RicharD|: I'm doing a simple script in ruby(with active record)
[15:36:48] timgauthier: no that isn't right.. hmm
[15:36:55] |RicharD|: that remove the first char if is " " and then save in db
[15:37:09] |RicharD|: the problem is that , don't save in db!!! https://gist.github.com/anonymous/f811f5caad041b532797
[15:37:21] |RicharD|: if I try to save manually when I enter in binding.pry
[15:37:25] |RicharD|: it give me true
[15:37:42] |RicharD|: but then when I do NewProduct.find(id) , I see that the name isn't changed/saved
[15:38:47] mikecmpbll: |RicharD|: does it raise an exception?
[15:38:47] jottr: what is the best way to run a rake testtask when a file change occurs in a specified directory?
[15:38:56] timgauthier: if the hash is defined but isn't only then do the following is what this means correct : <% unless hash.nil? || == "only" %>
[15:39:12] timgauthier: how do i say its okay if its undefined or defined..
[15:39:17] timgauthier: i think the messy way works better
[15:39:38] mikecmpbll: |RicharD|: scrap that, that's the return value of @aproduct.save ? maybe a validation is failing or something
[15:39:57] mikecmpbll: for debugging purposes it's probably easier to stick a ! on the end of the save so that it'll raise an exception.
[15:40:07] |RicharD|: not raise exception
[15:40:13] mikecmpbll: yeah, ignore that.
[15:40:28] mikecmpbll: i thought you were using save!. save won't raise an exception for validation failures.
[15:40:38] |RicharD|: and when I enter in binding.pry
[15:40:44] |RicharD|: I try to save manually and give me tru
[15:41:41] jhass: timgauthier: no idea if that approach works with middleman, but here's an approach I use in a rails app to solve a similar issue, translated to middleman API http://paste.mrzyx.de/p3eda961a/
[15:41:56] timgauthier: wow, thanks for taking the time jhass
[15:43:16] mikecmpbll: |RicharD|: for all intents and purposes it should work, you'll have to do some more debugging
[15:43:51] mikecmpbll: uhm, using the rails console, just try do the exact same on a specific record
[15:43:59] mikecmpbll: the slice and save bits
[15:44:26] mikecmpbll: on one that it didn't work for with that code.
[15:45:05] cocotton: Hey all, I'm using vagrant and vbox to create an osx mavericks vm. Now when I boot my machine from the vagrant box, vagrant "waits" for the machine to boot. The machine actually boot without any problem according to vbox (in the preview, I can see it), yet vagrant doesn't seem to know that the booting phase is completed.
[15:45:14] cocotton: In the end, it times out, even thought the machine is up
[15:45:15] timgauthier: does this logic make sense? http://pastie.org/9073200
[15:46:45] cocotton: Maybe I could try to boot it headless
[15:46:52] timgauthier: jhass your example, you would have front matter that says something like header: masthead or masthead_menu ?
[15:47:59] jhass: timgauthier: http://middlemanapp.com/basics/templates/ says you set the layout in config.rb, which I would do with that approach
[15:48:30] timgauthier: ah you are routing areas with that.. o
[15:49:08] timgauthier: so in your partials for the masthead if you have no content_for :header then it just doesn't render that block ?
[15:50:29] jhass: i used partial calls in the content_for blocks there for demo purposes, you could as well fill in the code directly
[15:52:32] timgauthier: but i'm still correct in the assumption that basically if there is no content_for :header it just skips that do block and whatever is inside of that?
[15:52:59] jhass: which do block?
[15:53:12] timgauthier: <% content_for :header do %>
[15:53:17] timgauthier: under the layouts
[15:53:41] jhass: uhm, if you leave that off it's gone, there's nothing to skip?
[15:54:30] jhass: yield_content(:header)??if content_for? :header makes sure to only call yield_content :header if there is at least one content_for :header
[15:54:46] timgauthier: jhass what i meant is... in the layout you say <%= yield_content(:header) if content_for? :header %>
[15:56:31] timgauthier: ok sweet, yah that makes sense to me jhass
[16:01:15] jhass: timgauthier: actually yield_content doesn't raise if there's none defined, so you can just remove the guard https://github.com/padrino/padrino-framework/blob/b4802b239bf788dfdfb37f4ab7b15df0fc793e5a/padrino-helpers/lib/padrino-helpers/output_helpers.rb#L177
[16:02:55] timgauthier: <%= yield_content(:header) %> instead then?
[16:03:27] timgauthier: i should switch to what you have suggested, its a bit of a change but i think you are correct in saying that its a more appropriate way to do it
[16:04:45] jhass: as said I can't guarantee that it works in middleman though
[16:05:28] timgauthier: i don't see why it wouldn't
[16:05:37] timgauthier: and i'm pretty sure it would work in nanoc if i end up using that..
[16:05:45] timgauthier: I'm sort of running and trying out both side by side :S
[16:07:39] timgauthier: the only catch jhass is that my menu has to be called inside of my masthead partial.. because of where it sits in the html so that may be why i did it this way
[16:09:01] jhass: that's why I replicated it in my example. You can extend the approach though and define more yield_content blocks, you don't need to stick to :header as the only one
[16:10:20] jhass: or even decide to extract the menu to a partial and the masthead to a partial and define two layouts with render :masthead, menu: true and render :masthead, menu: false and have little to no duplication without the need for defined?
[16:11:21] timgauthier: how would you call those? with like yaml front matter or routing or?
[16:18:26] benzrf: ACTION is boredom
[16:20:13] benzrf: lethjakman: try quick
[16:20:20] benzrf: its p cool
[16:20:49] benzrf: currently working on setting up git-versioned checkpointing
[16:21:09] benzrf: after that ima add a command to simplify exporting code you write to an existing project dir
[16:21:12] benzrf: *static project dir
[16:21:16] benzrf: certainty: my current project o:
[16:21:34] benzrf: an attempt to bring something like a smalltalk/slime env to ruby
[16:21:47] timgauthier: jhass i don't understand the content for enough but thats cool i may just keep what i have for now
[16:21:57] certainty: benzrf: ah i remember. You have these images that can be serialized
[16:22:08] benzrf: i gave up on that :I
[16:22:16] benzrf: just gonna use dmtcp
[16:22:45] Rhainur: if I take a ruby script and run it under jruby, will there be any performance improvements? I'm a bit confused about how jruby works
[16:23:20] headius: Rhainur: if the script runs more than a few seconds and has something jruby can speed up...sure :-)
[16:23:22] certainty: it will magically be faster. That's true for every possible script =)
[16:23:31] Rhainur: well I know DB access is a separate issue
[16:25:05] benzrf: certainty:
[16:26:04] benzrf: scriptreplay <(curl -s https://raw.githubusercontent.com/benzrf/quick/master/demo/timing) -s <(curl -s https://raw.githubusercontent.com/benzrf/quick/master/demo/typescript)
[16:26:09] benzrf: certainty: run for a demo =3
[16:27:24] Rhainur: does jruby "just work"? I mean if I take a Ruby 1.9 script and run it under jruby, are there any issues with gems or something?
[16:28:04] headius: Rhainur: gems that have C extensions don't run on JRuby. Many have java versions that install transparently or have alternative gems with same API
[16:28:14] headius: otherwise, yes, should just work...if it doesn't it's a bug usually
[16:29:57] benzrf: certainty: y/n
[16:30:50] certainty: benzrf: i'm still watching it
[16:32:23] certainty: benzrf: heh that looks interesting indeed!
[16:39:56] benzrf: certainty: future intended usage is
[16:40:13] benzrf: certainty: u "require '/home/certainty/ur_project/main'"
[16:40:18] benzrf: then u write a buncha code in a live env
[16:40:55] benzrf: then u run 'quick export ~/ur_project/' and it scans it for files with matching classes and opens them one by one in ur $EDITOR after pasting each new code file into ur clipboard
[16:41:05] benzrf: also well have git-versioned snapshot
[16:45:52] certainty: benzrf: interesting idea
[17:03:54] timgauthier: ok... so i've got the one thing that i could not make work in jekyll working in middleman! i'm pretty excited.
[17:04:20] timgauthier: shevy maybe i won't have to write my own thing after all!
[17:04:27] timgauthier: ok, i am done for this week! see ya all later!
[17:07:49] selite: Given a string "{"a"=>"b"}" how do I convert it to Hash?
[17:08:14] jhass: selite: where's that string coming from? why isn't it a hash in the first place?
[17:08:23] selite: jhass: from file.
[17:08:39] jhass: do you create that file?
[17:08:41] selite: jhass: I don't wanna use reg exp unless I have to.
[17:08:45] selite: jhass: no I read from it.
[17:08:58] jhass: so you have no control over the creation?
[17:09:13] selite: jhass: no
[17:09:37] jhass: that's sad. Have a look at https://github.com/apeiros/literal_parser
[17:16:13] combusean: ACTION kicks datamapper.
[17:23:09] garndt: selite: you could also tray eval on the string. Might not work all the time depending on what should be in the hash
[17:23:52] garndt: of course you also need to trust what that string is
[17:23:58] jhass: ^ and you really really really really need to trust your input. really
[17:24:53] garndt: yup, what jhass said
[17:27:56] zorak: its normal dreaming with ruby?
[17:28:17] ccham_: i don't think it's normal dreaming of other things.
[17:28:49] zorak: a ruby/magic:the gathering dream
[17:30:53] zorak: i was trying to destroy a simbol with a Hero Downfall
[17:31:50] zorak: and since all simbols have the same ID i can destroy all the same symbols with only one spell
[17:37:49] shock_one: Hi, any ideas why line 22 generates an error "syntax error, unexpected '\n', expecting => (SyntaxError)" https://dl.dropboxusercontent.com/u/608214/scrn/1397237810.png
[17:38:53] toretore: too much whitespace, too little ( )
[17:43:09] toretore: has_many(:professionals, {through: :memberships}, ->{ order('memberships.leadership DESC') })
[17:44:17] wallerdev: screenshots of code, nice
[17:44:42] shock_one: toretore, I've tried that. It turned out I had to put lambda before the through option.
[17:44:50] RubyPanther: for shame. if you want pictures of your code, you're supposed to hand draw and color it.
[17:44:52] shock_one: Sorry about the screenshot.
[17:47:52] Guest77325: http://www.goaltycoon.com/bestfootballgame/galahad1st use this link to register on GoalTycoon, a free2play football manager online game, manage your team, improve your players and tactics to advance the leagues, upgrade your club park, all in order to earn profits and the virtual currency can be converted into real money. Join now! It's free:>
[17:49:38] shock_one: How about this one? http://instacod.es/89039
[17:55:35] RubyPanther: shock_one: a step forwards, for sure
[17:59:38] bricker: what ever happened to that RVM kickstarter? He didn't get all that money did he?
[18:01:19] RubyPanther: How to properly make code screenshots: https://akitaonrails.s3.amazonaws.com/assets/image_asset/image/385/243810939_3406e957ee.jpg
[18:03:32] bricker: I learned the hard way a few days ago, I no longer open images from IRC
[18:11:13] mattalexx: I have a long line that looks like this: $stderr.puts "Text Text Text Text Text Text Text Text Text Text Text Text Text"
[18:11:28] mattalexx: How can I wrap some onto a new line in the code without using another puts statement?
[18:11:49] mattalexx: ... which would add another new line, which is bad
[18:12:07] benzrf: Q: why did skrillex get fired from his sysadmin job
[18:12:08] benzrf: A: he kept dropping the database
[18:12:43] combusean: mattalexx, print might help you out
[18:13:05] combusean: instead of puts
[18:13:41] canton7: mattalexx, http://ideone.com/2NYFAH
[18:18:04] mattalexx: canton7: Thanks!
[18:35:16] zorak: what do you se to code? vim?
[18:35:32] zorak: i was using gedit, but im using geany now
[18:36:11] zorak: i like that keep memory of some functions and ask me to autocomplete when i have to write it again
[18:37:53] zorak: i dont like that dont have a diferent color for the constants
[18:40:57] Hanmac: zorak: depends on the project size ... for smaller, little edits i use gedit too, i tryed geany but it didnt worked as i wanted ... for bigger i use eclipse, because i would lose the orientation with gedit
[18:41:22] bricker: sublime text because it's 2014
[18:41:30] bricker: what have I done
[18:41:37] bricker: ACTION backs away
[18:42:26] zorak: Hanmac: but eclipse is for java, no?
[18:42:38] zorak: p eclipse - Extensible Tool Platform and Java IDE
[18:42:49] Hanmac: zorak: not only, i use eclipse for my Cpp projects too
[18:43:27] Hanmac: zorak: eclipse-cdt
[18:43:58] zorak: you can use ruby in eclipse?
[18:44:07] shevy: zorak it's an editor
[18:44:30] shevy: zorak Hanmac uses it because he has to keep open many many files at the same time
[18:44:42] zorak: and whats the difference between eclipse and gedit?
[18:44:54] Hanmac: shevy: moslty eclipse says i have "99+" files open
[18:44:58] shevy: gedit is like an enhanced notepad :)
[18:45:08] shevy: Hanmac that's a lot
[18:45:13] shevy: I usually have 5-25 files open at max
[18:46:30] Hanmac: zorak: i need reverences ... so when i have wrap(_self->GetItem(NUM2INT(val))); and it click onto the "GetItem" function i wanted to see where (in which header) this fuction was defined
[18:47:31] zorak: like hipertext?
[18:53:50] shevy: zorak I think locally only
[18:54:03] shevy: so that you can find the more important files quickly
[18:54:52] zorak: very nice for big projects
[18:58:59] shevy: but if you have only small projects
[18:59:02] shevy: it's not so useful
[18:59:14] shevy: AND it requires java
[18:59:39] toretore: and it's a fuken elephant
[19:01:26] Hanmac: shevy i didnt found an better IDE for C++ AND ruby jet that manages my massive file usage ;P
[19:02:41] zorak: and whats about sublime?
[19:05:32] Hanmac: zorak: i dont think sublime can handle this reverences ... and it might be not good enough for my projects
[19:06:04] zorak: but whats are the pros and the diference of sublime??
[19:06:56] benzrf: zorak: dont use sublime
[19:06:59] benzrf: it isnt even floss
[19:07:06] benzrf: it will fill u w/ vigor
[19:07:11] benzrf: or use vigor
[19:07:14] benzrf: itll fill u with vim
[19:10:04] Hanmac: zorak: like i said, sublime is not mighty enough ... first as i see yet, does it have version control? i need both git and mercury. can it resolve your uses Macros? eclipse can
[19:11:12] apeiros: Hanmac: sublime follows the unix approach
[19:11:27] apeiros: why build version control in if there's excellent things like git around?
[19:11:38] apeiros: and there are enough plugins to integrate git into sublime
[19:11:56] apeiros: macros: meh. but if you need it, you can have it in sublime too.
[19:12:43] Hanmac: apeiros: i mean i like it when my IDE has plugin for git/hg
[19:12:55] apeiros: Hanmac: as said, can have.
[19:12:58] Hanmac: apeiros: did you already see my C-macros? they come very handy
[19:13:26] apeiros: I doubt I'd understand them anyway :)
[19:16:18] Hanmac: apeiros: you know that the ruby C-API wants function pointers for the define methods? that mean i need to find a way to turn "T GetAttr(); void SetAttr(T);" from the C++ classes into "VALUE getAttr(VALUE); VALUE setAttr(VALUE,VALUE)" functions that i can bind into ruby ... my macros helps me to define this functions
[19:16:46] shevy: definitely advanced
[19:16:50] shevy: ACTION hugs notepad
[19:21:38] Hanmac: shevy this macros does many things for me ... they convert the types from Ruby into C++ and back (enums get extra macros because they are converted into Symbols), they have exception handling (but not all my c++ procjects use exceptions), also some has extra handling to catch bad values (like a GetTextCtrl function might assert() when no TextCtrl exist) ... and on weekends my macro would also wash my car --- if i had one ;P
[19:39:30] lagweezle: It's weird reading logs of a channel you are in...
[19:40:21] lagweezle: I'm not entirely sure, but it does feel weird to me.
[19:40:46] lagweezle: http://irclog.whitequark.org/ruby/2014-04-11#; <--- I stumbled onto this while hutning for a decently nice web UI for showing channel logs for use at work.
[20:12:26] shevy: lagweezle it shows who are highly prolific users here
[20:12:35] shevy: AND it happens in a live-stream \o/
[20:12:44] shevy: lagweezle likes girl clothes
[20:12:45] shevy: lagweezle likes girl clothes
[20:12:47] shevy: ACTION dances...
[20:13:00] shevy: the colours are quite annoying though
[20:13:19] lagweezle: The colors are annoying?
[20:13:24] shevy: a little, yeah
[20:13:31] lagweezle: Have you poked the yin/yang thing to swap between light/dark themes?
[20:13:33] shevy: but it's interesting, it looks very much like my xchat here
[20:13:44] shevy: no, I didn't poke it much at all
[20:13:53] shevy: it seemed as if I was reading with an echo, which confused me, so I closed it again :\
[20:36:37] combusean: ACTION reverts a revert
[20:37:34] benzrf: combusean: wenk wenk
[20:37:53] combusean: benzrf, wenk wenk?
[20:38:01] benzrf: kinda a duck-like noise
[20:38:13] combusean: ACTION giggles at your name
[20:38:19] benzrf: ive fallen into a habit of replying to everything with 'wenk wenk'
[20:38:40] shevy: benzrf wank wank?
[20:38:40] combusean: ACTION adjusts benzrf's drugs
[20:38:49] shevy: ACTION adjusts benzrf's pants
[20:39:02] combusean: i think he's too young for that :P
[20:39:08] shevy: stupid age requirements
[20:39:53] combusean: maybe his state is one of those weird ones where the age of consent is lower
[20:40:36] combusean: in that case have at it
[20:40:43] IceDragon: huh, what is going in here, is that time of day again?
[20:40:48] IceDragon: shevy: pls explain to me
[20:42:33] shevy: IceDragon yeah unfortunately
[20:42:36] shevy: it's time again
[20:42:43] shevy: everyone down with your pants and code faster!
[20:42:57] shevy: no wats, more code!
[20:43:01] benzrf: lagweezle: yo quick is being even better now
[20:43:04] shevy: code with attitude and style
[20:43:06] combusean: ACTION labors on a deployer
[20:43:17] lagweezle: benzrf: the chocolate drink?
[20:43:20] benzrf: lagweezle: https://github.com/benzrf/quick/ <- view the readme
[20:43:27] shevy: quick is slow
[20:43:28] IceDragon: ACTION fights with broken code that worked like 3 hours ago until updating some deps
[20:43:38] shevy: IceDragon why do you break your system?
[20:43:40] shevy: let me guess...
[20:43:49] IceDragon: Nope, Its Arch :D
[20:43:54] lagweezle: benzrf: I need to watch that thing at some point on my not-work-system.
[20:43:55] shevy: k then you are excused
[20:44:01] shevy: arch users are cleverer than debian users
[20:44:18] benzrf: no, arch users are skiddies more than debian users
[20:44:27] combusean: ACTION ponders his mac :P
[20:44:41] shevy: combusean you are the alien but there are many mac aliens here
[20:44:42] IceDragon: I want a mac...
[20:44:44] IceDragon: maybe a few months from now..
[20:44:54] shevy: damn, another one to be assimilated
[20:45:02] shevy: you will wear hipsters pants IceDragon
[20:45:04] combusean: shevy, they're like standard in san francisco
[20:45:10] shevy: combusean :(
[20:45:19] IceDragon: shevy: and turtle necks, don't forget
[20:45:21] combusean: besides, i occasionally do music and video production
[20:45:42] baweaver: I use Mac like it's FreeBSD
[20:46:35] combusean: and retina displays are too sweet :P
[20:46:39] combusean: plus build quality.
[20:46:39] baweaver: Vim, Tmux, Pianobar, etc etc. Very rarely do I leave a command line, and even more rarely do I use a mouse (Vimium in Chrome)
[20:47:12] shevy: combusean cool
[20:47:22] combusean: they hold their value for when you sell them again
[20:47:22] shevy: on my todo list is to invest time into ruby + audio creation
[20:47:32] shevy: to become the next hans zimmer programmatically
[20:48:19] IceDragon: shevy: You'll have ruby write your scores and make lots of $$$ correct?
[20:49:08] shevy: IceDragon kinda, save for the $
[20:49:18] shevy: I dont care enough to make $ through audio
[20:49:23] shevy: but I want awesome audio stuff
[20:49:35] IceDragon: hahaha, :P I understand
[20:49:36] shevy: the soundtrack to gladiator is a really good + fitting one
[20:49:53] IceDragon: Now I must raid my own kitchen, its a battle zone in there
[21:13:34] shevy: why aren't there more games written in ruby?
[21:15:06] baweaver: GUI selection kinda sucks
[21:19:21] shevy: but we would have GUIs no? gosu... perhaps rubygame/SDL bindings...
[21:20:44] IceDragon: shevy: the frameworks are under the table, Python stole that department from us
[21:23:52] banisterfiend: IceDragon what framework does python have?
[21:24:17] davidcelis: Don't suppose anybody here has some good resources on patterns for constructing a gem ecosystem? e.g. how rspec has `rspec-core` and then provides more gems to build on that core functionality
[21:24:34] IceDragon: Not sure of the specifics, but their pyGame is always recommended first to new developers
[21:24:46] benzrf: pygame is just basic sdl bindings
[21:24:52] benzrf: ive used it & i prefer gosu
[21:25:07] IceDragon: Exactly, but somehow python manages to munch up the new devs ;_;
[21:25:39] benzrf: its because python is a good language
[21:25:44] benzrf: and it is less messy than ruby
[21:25:54] benzrf: and has fewer concepts bouncing around at the same time
[21:25:56] IceDragon: ACTION throws shevy with a bomb @ benzrf
[21:26:10] benzrf: i think u mean '>> shevy * benzrf'
[21:26:24] IceDragon: O: INCEPTION
[21:26:29] shevy: pls don't use me with any calculations connected to benzrf
[21:26:29] baweaver: Python is also pedantic with style guides.
[21:26:40] benzrf: shevy's array
[21:26:42] shevy: baweaver perhaps that is a good thing
[21:26:48] shevy: if python attracts more people that way
[21:26:51] banisterfiend: IceDragon pygame is a joke, ruby's gosu is a lot better :)
[21:27:01] banisterfiend: IceDragon http://libgosu.org
[21:27:05] baweaver: If I wanted forced style, I'd use RPG
[21:27:40] banisterfiend: davidcelis you need to build a plugin architecture
[21:27:47] IceDragon: banisterfiend: somehow I find it difficult to use Gosu
[21:28:45] benzrf: banisterfiend: remind me have i gotten u to look at Quick since it wasnt a gem?
[21:28:46] banisterfiend: IceDragon i found it extremely easy, it's a great lib IMO
[21:28:54] banisterfiend: benzrf i dont have a linux system :)
[21:28:55] IceDragon: then again, I'm a SFML fanboy orz
[21:29:02] banisterfiend: i only have osx
[21:29:07] benzrf: banisterfiend: wenk wenk
[21:29:11] IceDragon: ACTION sighs of relief
[21:29:19] IceDragon: I thought I was gonna saw Windows...
[21:29:27] benzrf: banisterfiend: https://github.com/benzrf/quick/ <- view readme.md
[21:29:33] IceDragon: I thought he was gonna saw Windows...*
[21:30:50] IceDragon: I think the problem is, we don't have ruby pushers :O
[21:31:08] IceDragon: Like we don't go around shoving ruby down people's throat or something like that
[21:31:13] IceDragon: "USE RUBY, USE IT NOAH"
[21:31:20] benzrf: wenk wenk
[21:31:25] benzrf: o god i gotta stop
[21:31:31] apeiros: IceDragon: speak for yourself!
[21:31:36] apeiros: ACTION does that :D
[21:32:01] benzrf: banisterfiend: u watchin
[21:32:01] IceDragon: ACTION flexes
[21:38:34] banisterfiend: benzrf github makes your tabs a pain to read
[21:38:50] goleldar: /msg NickServ identify 11746
[21:39:10] apeiros: whatcha wanna bet he doesn't change his pw?
[21:39:42] IceDragon: ACTION is tempted to ghost
[21:43:24] goleldar: oops changed
[21:47:16] kenneth_: it seems like there should be an easy way to do this in ruby but i can't figure it out. any ideas? i have a regex, and want to find all the matches in a string; and get their ranges
[21:47:45] centrx: What are the "ranges" of matches in a string?
[21:48:43] IceDragon: like ruby "Range" ?
[21:52:02] bricker: centrx: character index
[21:52:12] bricker: >> "abcdef"[1..2]
[21:52:13] eval-in: bricker => "bc" (https://eval.in/135635)
[21:53:20] apeiros: kenneth_: can you show an example in-/output?
[21:57:09] kenneth_: yeah, i mean if i had the string "Hello World!"
[21:57:17] etqqkoiflwhb_: eval-in: don't rescue Exception
[21:57:36] etqqkoiflwhb_: rescue StandardError
[21:57:44] kenneth_: and the regex /[A-Z][a-z]/, i'd like the get the locations for the matches (He and Wo)
[21:59:06] kenneth_: string.scan will return the actual matches themselves. i can find out what the range is from MatchData
[21:59:25] kenneth_: but how can i get a list of the match data for every match?
[21:59:51] apeiros: kenneth_: https://gist.github.com/apeiros/9323149
[22:00:08] apeiros: string.match_all(regex).map { |m| a,b = m.offset(0); a..(b-1) }
[22:00:51] etqqkoiflwhb_: apeiros; doesn;t ruby give us MatchData
[22:00:57] etqqkoiflwhb_: `/y/.match('haystack')
[22:01:06] apeiros: etqqkoiflwhb_: that's only for a single match
[22:01:10] etqqkoiflwhb_: gives us a MatchData instance http://www.ruby-doc.org/core-2.1.1/MatchData.html#method-i-begin
[22:01:36] apeiros: and scan needs "convincing" to give matchdata (see gist)
[22:01:56] kenneth_: is this race-condition-safe?
[22:02:20] apeiros: kenneth_: no. if you share data, protect access.
[22:02:39] apeiros: only explicitly thread-safe datastructures are thread-safe in ruby. everything else is not.
[22:02:53] apeiros: (and thread-safe doesn't mean you can do whatever either)
[22:03:21] kenneth_: i'm wondering specifically about $~ being thread-safe (or not)
[22:03:32] kenneth_: what if two threads are using match_add at the same time
[22:04:34] apeiros: $~ is thread-local
[22:05:00] apeiros: (as all regex related $ vars actually)
[22:09:44] apeiros: kenneth_: well, not just nice but necessary. they'd be unusable otherwise :)
[22:25:08] bricker: While we're on the subject, what is $, ? Why does Rails use it here? https://github.com/rails/rails/blob/master/actionview/lib/action_view/helpers/output_safety_helper.rb#L31
[22:26:23] apeiros: bricker: the default separator
[22:27:14] shvelo: What's the best way of getting Ruby 2.1.1 on Fedora 20? It provides 2.0.0
[22:27:48] bricker: apeiros: er, I know that, I mean why use $,
[22:27:55] bricker: instead of just, you know, ","?
[22:28:14] apeiros: because that's the global default?
[22:28:25] apeiros: why use a custom default if there already is one?
[22:28:27] apeiros: http://www.zenspider.com/Languages/Ruby/QuickRef.html#pre-defined-variables
[22:28:37] apeiros: consistent with Array#join
[22:28:43] LiquidInsect: and if you for some reason override $, you probably actually want safe_join to work
[22:28:53] bricker: apeiros: I see now, thank you
[22:28:54] LiquidInsect: not saying you SHOULD change $,
[22:29:07] apeiros: IMO all globals are a terrible idea.
[22:29:38] apeiros: though, sometimes while there are better implementations, it's hard to get rid of the concept
[22:30:05] apeiros: e.g. you could move $LOAD_PATH into Ruby.load_path or similar - that'd be a better implementation, but still the same concept
[22:34:29] shevy: what would you guys put on a resume if you were working with ruby
[22:36:05] shevy: my half brother
[22:36:13] shevy: now we only need to snatch shlevy from #nixos
[22:36:19] shevy: then we are the big three again
[22:37:55] shvelo: and we can enslave the world
[22:38:24] arubin: ACTION wonders what is going on.
[22:39:56] LiquidInsect: shevy: Professional experience: Ruby, world domination
[22:40:09] shevy: LiquidInsect yeah but I assume they want specifics
[22:40:27] shevy: I am unsure how to word any "experience" I may (or may not) have
[22:40:45] LiquidInsect: Well, have you built a skull-shaped secret base yet?
[22:40:49] shevy: "I wrote a lot of useless gems and contributed to many useless projects"
[22:40:52] shevy: lol a what?
[22:41:02] shevy: I haven't built that yet
[22:41:15] LiquidInsect: you're not going to enslave the world without a secret base shaped like a skull
[22:41:24] apeiros: LiquidInsect, shevy: Ruby, everday at 17.00 world domination
[22:41:26] shvelo: require 'scull-shaped-secret-base'
[22:42:09] shevy: shvelo ewwww you use '-'
[22:42:10] LiquidInsect: SkullShapedSecretBase.hybrid_monkey_bats.each{|mb| mb.release!}
[22:42:16] apeiros: "Like all truly great IT projects, I created a lot of gems and abandoned them mid-work"
[22:42:28] shevy: lol apeiros
[22:42:29] combusean: how would one have a secret base shaped like a skull with building permits, public zoning information, and google maps revealing it all?
[22:42:38] shevy: that's actually kinda true, for like 70% of my gems
[22:42:45] shevy: or projects like butler! *wink*
[22:42:49] combusean: the architecture and design fees would be through the roof
[22:43:08] shevy: do google maps really cover 100% of the world yet?
[22:43:14] LiquidInsect: combusean: well, first you need your own personal island
[22:43:22] LiquidInsect: you can't take over the world if you can't take over an island
[22:43:41] combusean: great, now you have to ship construction workers in and provide onsite housing
[22:43:46] combusean: expenses, expenses, expenses.
[22:44:10] LiquidInsect: no, you invade an INHABITED island
[22:44:27] shvelo: shevy: you mean I should use '_'?
[22:44:29] combusean: ah, and enslave them
[22:44:40] LiquidInsect: right. If you can't enslave an island...
[22:44:47] combusean: what if they don't have concrete and carpentry skills?
[22:44:53] shevy: shvelo I prefer _ over - in requires, yes
[22:44:55] combusean: i need electricians and plumbers
[22:44:58] LiquidInsect: anyway, seriously, SOME of those projects have to be useful
[22:45:08] shevy: shvelo no idea if there is a convention in ruby though
[22:46:03] LiquidInsect: and you should list those, hell give your github account if it has code in it that doesn't totally embarass you
[22:47:41] shvelo: shevy: looked it up, yeah '_' is more common
[22:48:54] shvelo: I mostly use Ruby for scripting and automation, never actually built a web app in it
[22:49:15] shvelo: Ruby is the best thing for scripting
[22:51:04] shevy: how did you come to ruby shvelo?
[22:51:31] shevy: I myself use ruby for both scripting but also web-related stuff; I used perl for like a year then php for almost 3 years, then wanted a better language than php
[22:51:37] shevy: so it was python vs. ruby
[22:51:39] shvelo: I don't remember, I tried tryruby once and liked it
[22:51:43] shevy: I picked ruby after reading matz interview of 2003
[22:51:46] shvelo: and realized that PHP was pig crap
[22:51:47] shevy: shvelo I see
[22:51:51] shevy: yeah php is so awful
[22:51:59] shvelo: I was a PHP developer for a year or so
[22:52:00] mr_snowf1ake: anyone recommend a good bluetooth library for ruby?
[22:52:05] shevy: php actually makes javascript a saner language
[22:52:07] shevy: right centrx?
[22:52:23] mr_snowf1ake: shvelo: a year of php...? ew :P
[22:52:26] bricker: so much javascript hatred
[22:53:01] LiquidInsect: wouldn't hate it if it wasn't so awful
[22:53:02] shvelo: Javascript is awesome for async stuff, I use it for websockets
[22:53:13] slowthought: yeah isn't js kind necessary for async?
[22:53:21] apeiros: async, because: yolo!
[22:53:35] LiquidInsect: if you're talking about from a web browser, yes
[22:53:43] apeiros: other way round - due to singlethreadedness, async is kinda necessary in js
[22:53:47] LiquidInsect: if you mean, like, node.js... no
[22:53:50] shevy: bricker javascript is semi-ok
[22:53:59] shevy: I don't like it much at all but I also don't hate or dislike it that much either
[22:54:01] mr_snowf1ake: i think the main issue with js was just it's original use and evolution. especially since so much of the js you see on the internet is done by designers...
[22:54:07] shevy: I'd rather like to use ruby for the www though
[22:54:07] LiquidInsect: "1" == 1 ...sigh...
[22:54:15] bricker: shevy: I love it, it has some quirks, but so does every language. :/ I don't feel like having a JS flamewar right now though
[22:54:22] shvelo: [] + {} = wat
[22:54:27] apeiros: alternatives are non-blocking+polling (yay!) or blocking-all-the-shit (awesomeyay!)
[22:54:30] shevy: bricker :D
[22:54:49] shevy: mr_snowf1ake javascript evolution truly was weird
[22:54:58] shevy: I remember I read about javascript in tutorials back like in 1998 or something first
[22:55:06] shevy: then a couple years later, the language was no longer recognizable to me
[22:55:25] shevy: just look at how you use javascript in like jquery? $_()->click or whatever... I never saw that before in those javasceript tutorials
[22:55:27] shvelo: also it was created by a bigot
[22:55:28] shevy: *javascript
[22:55:51] shevy: the lolwat about javascript actually was cool
[22:55:54] shevy: the video
[22:56:00] shevy: good for some cheap laughs
[22:56:07] mr_snowf1ake: haha i'll be sure to check that out
[22:56:12] shvelo: NaNNaNNaNNaNNaN Batman!
[22:56:54] shevy: mr_snowf1ake https://www.destroyallsoftware.com/talks/wat
[22:57:08] shevy: only two years old
[22:57:13] shevy: thought it was like 5 years old or something :P
[22:57:13] mr_snowf1ake: shevy: thanks :)
[22:57:26] shevy: "let's talk about ruby" <big laughter in the audience>
[22:58:01] shvelo: <shevy> only two years old
[22:58:01] shvelo: <shevy> thought it was like 5 years old or something :P
[22:58:01] shvelo: <mr_snowf1ake> shevy: thanks :)
[22:58:01] shvelo: * yfeldblum (~yfeldblum@mpk-nat-4.thefacebook.com) has joined #ruby
[22:58:01] shvelo: <shevy> "let's talk about ruby" <bi
[22:58:12] shvelo: why does my IRC client copy stuff on it's own
[22:58:31] shevy: shvelo what irc client do you use?
[22:59:15] shevy: I do too!
[22:59:18] shevy: we are truly brothers
[22:59:30] shevy: though I actually don't have the problem of mispasting in xchat
[22:59:35] shevy: I also dont see joins or leaves or times
[22:59:50] shvelo: xchat is weird
[23:00:05] shevy: I tried to use irssi but I always mispasted
[23:00:48] shevy: shvelo what are you doing with ruby though? I mean like, what was the last larger script you wrote, what problem did you try to solve
[23:02:26] shvelo: shevy: last one I wrote was to process a large XML file and produce SQL
[23:03:01] tcurdt: I just did a fresh ruby-build 2.1.1 ~/.rubies/ruby-2.1.1 and now my first gem path points to /Library/Ruby/Gems/2.0.0 which of course make my gem installs fail as a normal user
[23:03:16] shvelo: shevy https://github.com/TbilisiBus/tbilisi-bus/blob/master/data/gen.rb
[23:03:26] tcurdt: any idea how to fix this?
[23:03:48] shevy: shvelo yeah, it looks similar in style how perl is/was used for this kind of tasks
[23:03:58] shevy: the people at work all used perl; I was the only ruby user out there
[23:04:05] shvelo: shevy: and the translit.rb in that folder transliterates Georgian to Latin script
[23:04:11] shvelo: I don't know perl
[23:04:36] shevy: perl and ruby are kind of similar in spirit. perl is harder to read though, lot of $ sigils and weird things like <>
[23:04:45] shevy: but if you remove the line noise, it looks a lot like ruby
[23:04:54] shvelo: so perl is where PHP got its $$$
[23:04:55] tcurdt: ah - that was the system ruby. (doh!)
[23:05:03] shevy: print "$bla" or die;
[23:05:04] tcurdt: still - a little odd
[23:05:06] dorei: perl is uglyness, ruby is beauty
[23:05:38] shvelo: $_GET['rich'] or die('tryin')
[23:05:47] mr_snowf1ake: shevy: just watched 'wat'. thank you for bringing that into my life.
[23:05:59] shvelo: gonna rewatch
[23:06:00] shevy: shvelo hehe not sure, I think $ is popular for variables... perl failed to conquer the web though... one thing is cool though; perl has webmin, ruby has no webmin-like standalone management system like t hat as far as I know... perhaps one in rails, but not one without rails I bet
[23:06:20] combusean: webmin? systems management over the web?
[23:06:26] combusean: is this like 2002? :P
[23:06:44] shevy: combusean I think the idea of webmin is cool
[23:06:52] combusean: it doesn't scale.
[23:06:53] shevy: make no separation between commandline + web
[23:07:21] shevy: combusean http://www.abdullahyahya.com/wp-content/uploads/2013/08/webmin.png
[23:07:25] shevy: I think it's quite nice as an idea
[23:07:32] combusean: i'm a chef fanatic and I use salt to do other shit
[23:07:43] shevy: looks indeed like the years before 2002
[23:07:51] shevy: salt n pepper!
[23:07:55] shevy: let's talk about sex
[23:07:57] combusean: saltstack.com
[23:08:30] combusean: ACTION wishes his terminal would stop freezing up
[23:08:37] combusean: ACTION blames shevy
[23:09:07] shevy: what terminal do you use?
[23:09:23] combusean: the mac terminal thing
[23:09:32] combusean: or it could be bash or aws that hates me too
[23:10:44] shevy: ah ok mac
[23:11:53] shvelo: use iTerm
[23:12:30] DouweM: shvelo: what useful features does it add?
[23:13:26] shevy: DouweM pink spacers
[23:14:41] shvelo: DouweM: blurred transparent background :D
[23:15:31] DouweM: shvelo: Terminal.app does that too ;)
[23:15:48] bricker: ew, transparency
[23:15:59] combusean: can you detach tabs and reattach them in iTerm?
[23:16:12] DouweM: I don't use a transparent bg either, but Terminal definitely supports that
[23:16:35] combusean: terminal.app does not support that, and it's annoying
[23:17:01] bricker: combusean: eh? You can totally detach a tab
[23:17:12] combusean: and reattach it to the same window?
[23:17:15] bricker: combusean: ohhh, no
[23:17:22] combusean: thus my mention of reattach :P
[23:17:45] DouweM: combusean: Terminal does kind of support that!
[23:18:01] combusean: it's not a kind of, it's a yes or no
[23:18:03] bricker: combusean: you can try Window > Merge All Windows, not exactly what you want but close
[23:18:05] DouweM: combusean: you just need to set the tabbar to always show
[23:18:21] bricker: DouweM: oohhh good call
[23:18:25] DouweM: combusean: so that's a "yes"
[23:19:29] combusean: how about that
[23:19:38] DouweM: By "kind of" I meant you can reattach a tab when you make sure the detached window has multiple tabs by adding a dummy tab, then I saw the Show Tabbar option
[23:19:53] DouweM: So, you're welcome combusean :p
[23:20:09] combusean: ACTION hugs DouweM
[23:20:13] combusean: thank you :)
[23:21:19] DouweM: shvelo: so, how about those cool iTerm features?
[23:23:14] combusean: lasdhjfksfladjsf
[23:23:17] combusean: terminal dies again
[23:25:46] DouweM: anything in the crashlog?
[23:26:05] combusean: no, its just freezing when connected to this host where my work is
[23:26:19] DouweM: sure it's terminal and not whatever it's running?
[23:26:29] combusean: it dies when i type in bash randomly.
[23:27:03] combusean: other terms are fine
[23:54:37] kenneth_: this is probably the messiest ruby code i have written in??? forever
[23:54:39] kenneth_: https://github.com/kballenegger/azurill/blob/master/lib/azurill/controller.rb
[23:55:24] kenneth_: there doesn't really seem to be any standard best practices for how to architecture code for long-lived graphical ruby apps, is there?
[23:55:38] kenneth_: something where you build the UI with ncurses, and keep a run loop
[23:56:06] wallerdev: is ncurses really considered graphical
[23:56:51] combusean: ACTION smiles
[23:57:49] combusean: wrote a settings module that can be dropped in anywhere in our sinatra/jobs app and used github's api for the first time
[23:59:38] benzrf: sup combusean
[23:59:58] combusean: scroll up two lines before your arrival