apeiros changed the topic of #ruby to: Ruby 2.1.0; 2.0.0-p353; 1.9.3-p484: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
angusiguess has quit [Ping timeout: 252 seconds]
burlyscudd has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
* apeiros just missed an insider there…
razibog has quit [Quit: Leaving.]
_root has joined #ruby
jhass is now known as jhass|off
pfg has joined #ruby
burgess has joined #ruby
derek_c has joined #ruby
mercwithamouth has joined #ruby
[gmi] has quit [Quit: Leaving]
maximski has joined #ruby
black0ut has quit []
lxsameer has quit [Quit: Leaving]
zz_karupanerura is now known as karupanerura
burgess has quit [Ping timeout: 264 seconds]
danshultz has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
_root has quit [Quit: Leaving]
julia has joined #ruby
julia has quit [Client Quit]
_root has joined #ruby
v0n has joined #ruby
eflynn has quit [Quit: eflynn]
danshultz has quit [Ping timeout: 260 seconds]
lkba has joined #ruby
stryek has joined #ruby
_root_ has joined #ruby
srji_ has joined #ruby
Xeago has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
_root_ has quit [Client Quit]
Xeago has quit [Read error: Connection reset by peer]
<benzrf> is there some kind of lib for ruby that represents the fs as an object tree
Xeago has joined #ruby
srji has quit [Ping timeout: 252 seconds]
predator217 has joined #ruby
<RubyPanther> benzrf: you mean like Dir in the stdlib?
FScottFitzgerald has quit [Ping timeout: 265 seconds]
<benzrf> Dir does that?
_root has quit [Ping timeout: 260 seconds]
<RubyPanther> I dunno, you only said "object tree"
derek_c has quit [Ping timeout: 245 seconds]
<benzrf> i mean like
<RubyPanther> Everything is an object, and the fs is already a tree.
rico_sta_cruz has quit [Read error: Connection reset by peer]
rstacruz- has joined #ruby
<centrx> hyuk
<benzrf> PWD.codes.ruby.old.paint_thing.read => 'some code'
<RubyPanther> seriously
<benzrf> or some such
<diegoviola> is there a way to see objects with a tree/list, like to see their dependencies and parents, etc?
<diegoviola> similar to filesystems or the tree command
rstacruz- is now known as rstacruz
ASC2014 has joined #ruby
cashnguns has joined #ruby
<RubyPanther> there are various tools that output dot files for graphviz
kayloos has joined #ruby
<waxjar> do you mean what classes they inherit from or what kind of objects are stored in the instance variables of an object?
<RubyPanther> diegoviola: depends on what you mean by "see"
<diegoviola> waxjar: sure
predator117 has quit [Ping timeout: 264 seconds]
<waxjar> diegoviola: that doesn't answer my question :p
rico_sta_cruz has joined #ruby
<diegoviola> i want to see a uml-like thing/schema of the objects and what their methods are and the classes they inherit from, etc, but in a ascii way
<diegoviola> like, in my terminal
<diegoviola> do you guys know the tree command on linux?
<diegoviola> something like that
<diegoviola> sorry if i'm not making sense
<diegoviola> i think uml would work also
sambao21 has joined #ruby
<centrx> diegoviola, Custom classes, or Ruby?
<waxjar> im afraid you're gonna have to write that tool yourself. #ancestors and #inspect are useful if you're working with a repl and jsut wanna see whats up
<benzrf> diegoviola: well, ls in pry is useful
<diegoviola> centrx: i'd like to see everything really
<diegoviola> custom classes, ruby classes, etc
<diegoviola> benzrf: ok thanks
<benzrf> is this anything like what you want?
rstacruz has quit [Ping timeout: 245 seconds]
kayloos has quit [Ping timeout: 265 seconds]
rico_sta_cruz is now known as rstacruz
ccooke has quit [Quit: Changing server]
<centrx> diegoviola, Here is a good one for the Ruby core classes: https://lh4.googleusercontent.com/e_Eml6aYg1udItOLjQCzUKF1L2K1JcjyZTnzYwcP7A%3Dw1530-h800-no
<diegoviola> benzrf: yes that works
<diegoviola> thanks
<diegoviola> centrx: that's nice, how do you generate those?
<centrx> diegoviola, I generated it by remembering that I saw it before, then I searched on Google Images for it.
hetre85 has joined #ruby
ccooke has joined #ruby
sambao21 has quit [Ping timeout: 252 seconds]
Aryasam_ has joined #ruby
chrisseaton has quit [Read error: Connection reset by peer]
ASC2014 has quit [Ping timeout: 248 seconds]
<diegoviola> sure but is there any gems to generate that sort of thing
<benzrf> diegoviola: write yor own
<benzrf> you could even use graphviz to simplify it
aspiers has quit [Ping timeout: 264 seconds]
<slowcon> hey benzrf, having trouble getting this download to work
<slowcon> could you suggest a method to generate the download link for this website http://www4.zippyshare.com/v/87173820/file.html
<slowcon> its the big orange "Download Now" button
Aryasam has quit [Ping timeout: 265 seconds]
charliesome has joined #ruby
jerius has joined #ruby
ASC2014 has joined #ruby
charliesome has quit [Client Quit]
<centrx> slowcon, URI.encode(str)
mojjojo has quit [Quit: mojjojo]
dingus_khan has quit [Remote host closed the connection]
bitness64 has quit [Ping timeout: 252 seconds]
figgleberry has joined #ruby
evilbug has left #ruby ["Leaving"]
dingus_khan has joined #ruby
Aryasam_ has quit [Quit: Bye]
slowcon has quit [Quit: slowcon]
ASC2014 has left #ruby [#ruby]
slowcon has joined #ruby
<slowcon> centrx: even if the link is generated?
fgo has joined #ruby
Aryasam has joined #ruby
francisfish has joined #ruby
<centrx> slowcon, I am not sure what you are looking for. URI.encode is good for converting spaces and special characters into %20 and so forth
<slowcon> centrx: trying to do browser automation to get my script to download a file. will pull entries from a database(all zippy share links) and download the files from those links. to download the file you have to click on the orange "download now" button which has a link that is generated through javascript. ex url: http://www4.zippyshare.com/v/87173820/file.html
<centrx> On that Zippy page the link is in: <a id="dlbutton" href="/d/87173820/1059794/EH!DE%20-%20Creckotomon%20%28Original%20Mix%29.mp3"><img src="/images/download.png" alt="Download" border="0"></a>
z has joined #ruby
<benzrf> whoa nice nick
<benzrf> how do you even get a nick like that are you like from 10 years ago or something
<centrx> He must have sniped it from someone
francisfish has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
<slowcon> centrx: if i turn javascript off on my browser, it doesn't show a link
Aquilo_ has joined #ruby
<slowcon> centrx: I'm pretty sure the /d/THIS PART/ AND THIS PART/ are generated by javacsript
apeiros_ has joined #ruby
angusiguess has joined #ruby
ultraflash3 has quit [Read error: Connection reset by peer]
<centrx> I see
ultraflash3 has joined #ruby
figgleberry has quit [Ping timeout: 245 seconds]
<centrx> And OpenURI does not handle that?
Aryasam_ has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
Aquilo has quit [Ping timeout: 252 seconds]
pixelgremlins_ba has joined #ruby
<centrx> slowcon, Try http://mechanize.rubyforge.org/
<benzrf> centrx: i think s/he said that it uses js
burlyscudd has joined #ruby
<centrx> oh right
<centrx> Phantom JS
Aryasam has quit [Ping timeout: 265 seconds]
pixelgremlins has quit [Ping timeout: 252 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
venkat has quit [Remote host closed the connection]
<slowcon> centrx: yeah i have phantomjs
gnephiak has joined #ruby
venkat has joined #ruby
angusiguess has quit [Ping timeout: 260 seconds]
sepp2k1 has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
nihils has joined #ruby
xaq has joined #ruby
sdwrage has joined #ruby
venkat_ has joined #ruby
venkat has quit [Read error: Connection reset by peer]
burlyscudd has quit [Ping timeout: 265 seconds]
figgleberry has joined #ruby
xaq has quit [Remote host closed the connection]
m00nlight has joined #ruby
marcdel has joined #ruby
nichtdiebohne has quit [Ping timeout: 260 seconds]
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
guest12214 has left #ruby [#ruby]
stryek has quit [Read error: Connection reset by peer]
robustus has quit [Ping timeout: 252 seconds]
cburyta has joined #ruby
CpuID has quit [Ping timeout: 265 seconds]
derek_c has joined #ruby
robustus has joined #ruby
marcdel has quit [Ping timeout: 245 seconds]
sparrovv has quit [Remote host closed the connection]
stryek has joined #ruby
rstacruz has quit [Ping timeout: 252 seconds]
kenndel has joined #ruby
barebackbear has joined #ruby
<barebackbear> is lisp a gay programming language?
sparrovv has joined #ruby
<benzrf> barebackbear: wow, that's pretty stereotyping of you
<benzrf> barebackbear: i wonder what it says about you that you find that funny?
<barebackbear> i don't find it funny
<benzrf> mhm
<barebackbear> i'm gay and i'm curious how lisp started
<barebackbear> alan turing was a fag ;)
<barebackbear> i love that guy, such a hottie
<benzrf> i feel like im being trolled
<benzrf> any ops here?
axl_ has joined #ruby
marcdel has joined #ruby
sski has joined #ruby
<benzrf> yes i know about alan turing
<benzrf> that does not mean that you aren't a troll
tjr9898 has joined #ruby
<barebackbear> a troll lives under a bridge, benzrf, i live in my mother's basement
<benzrf> well, mythical trolls do
alexherbo2 has quit [Quit: WeeChat 0.4.2]
<benzrf> internet trolls are well-known to live in mothers' basements
<barebackbear> trolls don't exist
<barebackbear> that's like believing in the tooth fairy or santa clause
<barebackbear> wishful thinking doesn't get people anywhere
<benzrf> hmm just wondering if this is you http://i.imgur.com/xdPNNVN.gif
<barebackbear> it's like saying i wish people with african descent were more human, but the fact of the matter is negroes chimpout more than any other race combined
<benzrf> hmm quick q
<benzrf> have you previously gone by the nick 'giantdildo
saarinen has quit [Read error: Connection reset by peer]
<benzrf> i remember somebody by that name linking to chimpout and getting banned from ##programming
saarinen has joined #ruby
<benzrf> yo apeiros_ u there?
seelaman has joined #ruby
<barebackbear> you can't link to chimpout, you can only chimpout
<barebackbear> and niggers chimpout all the time
<benzrf> dang what a fucking racist
<benzrf> i wonder if you actually believe this shit or if youre just trying to provoke people
<benzrf> im not sure which would be sadder
<centrx> Radar, Clean up in Aisle 2
<havenwood> banister: ping
<apeiros_> benzrf: nope
<benzrf> apeiros_: can you ban barebackbear
seelaman has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<barebackbear> die juden wir mussen ausrotten :)
<benzrf> youre an op right?
<havenwood> apeiros_: ah, an op ;)
barebackbear has quit [Quit: Page closed]
<benzrf> hooray
<apeiros_> what an unpleasant subject…
michael_greeves has joined #ruby
michael_greeves was kicked from #ruby by apeiros_ [sorry, but changing your nick doesn't work]
<platzhirsch> wow, just missed all the fun
Jdubs has quit [Remote host closed the connection]
gcds has joined #ruby
saarinen has quit [Client Quit]
<TigerWolf> I saw that octokit.rb (https://github.com/octokit/octokit.rb) uses Sawyer instead of Hashie for the api response, not sure if I should use Sawyer. Anyone have a suggestion?
gcds has quit [Client Quit]
<apeiros> benzrf: thanks for pinging
<benzrf> yep :]
gcds has joined #ruby
<gcds> Hello, I have bad time trying to figure out the logic for one algorithm. I need to calculate price for rentals, the prices are presented for range of time and for specific amount of persons. The logic behind price calculation for persons is that for specific amount of persons is if there is prices that matches exact count of persons the lowest would be returned. If no such prices found then the lower amount of persons price is selected only if pric
<gcds> has fee for additional person the lowest price returned. If no prices found then the lowest count of persons price is returned but not lower than person count selected the lowest price selected. The biggest problem is that price could be calculated for range in between two prices this causes problems that i could find the prices which matches range between two prices but the persons count is not matched as should be. If someone could help me on thi
<gcds> will try to not be owing for this help.
<bnagy> slow down there Charles Dickens
lukec has joined #ruby
<apeiros> well, give him credit for trying to describe his problem
<gcds> I stuck on this thing for really good day :(
<bnagy> gcds: sounds like you have the algorithm
xcv has joined #ruby
<bnagy> do you have an actual specific issue?
<gcds> bnagy: I have in mind but not in code...
<bnagy> or the code you have so far?
<gcds> I dont know how to write ti
x1337807x has joined #ruby
<bnagy> ok well my advice then is to write it out in pseudocode first
<bnagy> or even just numbered steps
<bnagy> that will then be a basis for useful help
<gcds> I could try
<gcds> But I dont know how to integrate also the person selection login in date range selection
<benzrf> see ya people
benzrf has left #ruby [#ruby]
<Radar> centrx: I have no power here.
<havenwood> TigerWolf: I don't see where ioctokit is using sawyer. It doesn't seem to be in the Gemfile or gemspec, can you elaborate? How would a Faraday wrapper and hashie be interchangeable? I'm confused what you're wanting to do.
IceDragon has quit [Quit: Space~~~]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby-help has quit [Quit: Page closed]
eliasp has quit [Remote host closed the connection]
joelroa has joined #ruby
<TigerWolf> octokit.rb
<havenwood> centrx: /msg ChanServ ACCESS #ruby LIST # TL;DR: sepp2k, fflush, apeiros, banisterfiend, seanstickle and Mon_Ouie
<havenwood> TigerWolf: aha, i just missed it
<havenwood> TigerWolf: oops ;)
<centrx> This channel is on the precipice of total chaos!
qubit has joined #ruby
<Radar> pretty much how #rubyonrails used to be
<TigerWolf> Sawyer uses Faraday which returns a faraday object here: https://github.com/octokit/octokit.rb/blob/master/lib/octokit/client.rb#L217 This acts like a Hashie
eliasp has joined #ruby
<Radar> apeiros: When are we able to put someone else on the access list for this channel in say an Australian timezone?
<bnagy> o/
evangeline has quit [Ping timeout: 264 seconds]
<qubit> are there any http client gems that support using unix sockets and streaming requests?
randomnick_ has quit [Quit: Leaving]
eliasp has quit [Remote host closed the connection]
<havenwood> TigerWolf: Ah, okay I see what you're saying. I don't know which is best. Sawyer looks interesting but I've not used it.
<gcds> here is the basic version which has many bugs like missing other between two prices matches and whole person counting logic
<Radar> coolVariableNamesBro
senayar has quit [Remote host closed the connection]
Es0teric has quit [Ping timeout: 252 seconds]
<gcds> I really need help with this. If someone could spend some time helping me with this i will pay for help :(
senayar has joined #ruby
<Radar> gcds: how much?
<TigerWolf> thanks havenwood
<gcds> I dont know how much... It's for my studies I dont have much money
<TigerWolf> I will use Hashie for now - can always refactor later
Lewix has quit [Remote host closed the connection]
<gcds> until tomorrow morning I need to finish this... Otherwise I will lose scholarship :(
Es0teric has joined #ruby
<centrx> :(
senayar_ has joined #ruby
<gcds> Anyone?
<apeiros> Radar: you have to talk to fflush, he's the owner
<Radar> apeiros: When is fflush around?
<havenwood> gcds: You need a crash course in Ruby variables, Arrays and iteration.
<apeiros> Radar: barely ever
<centrx> fflush -NickServ- Last seen : Dec 13 17:13:48 2013 (9 weeks, 2 days, 08:28:48 ago)
<Radar> gcds: So you want someone to do your homework?
<Radar> apeiros: Fantastic.
<havenwood> Radar: pinged the other day when i couldn't find an op and no response
<apeiros> Radar: indeed :(
<gcds> Radar: not homework I need just the logic part... It's 3.40 Am here...
<Radar> apeiros: Any other way of contacting?
<Radar> gcds: What should this code do?
<gcds> just to get me on the road
<gcds> It's for calculation of holiday apartment rent
<apeiros> Radar: no idea. might try with freenode staff to get an email?
meatherly has joined #ruby
sambao21 has joined #ruby
<gcds> biggest chalange is that price could be calculated between two prices
figgleberry has quit [Ping timeout: 260 seconds]
senayar has quit [Ping timeout: 246 seconds]
<bnagy> gcds: I still don't understand the logic you're trying for. Try making your pseudocode more pseudo
<gcds> and price depends on different prices for different people count
<bnagy> another useful thing is to have example inputs and desired outputs
<gcds> bnagy: Ok I will try
nfk has quit [Quit: yawn]
tjr9898 has quit [Remote host closed the connection]
<gcds> bnagy: I know it would be easier but I have only description in my language and no examples at all
<bnagy> well write some examples?
<bnagy> that will help you get the logic in your head, as well
tjr9898_ has joined #ruby
<bnagy> example driven development (tm)
agent_white has quit [Read error: Connection reset by peer]
eliasp has joined #ruby
x1337807x has quit [Quit: Textual IRC Client: www.textualapp.com]
cmoylan_ has joined #ruby
sambao21 has quit [Ping timeout: 265 seconds]
RoxasShadowRS has quit [Read error: Connection reset by peer]
maroloccio has joined #ruby
<Radar> apeiros: Doubt they would give out personal information.
<apeiros> they might delegate
<gcds> bnagy: my profesor gave me this website as his logic example https://www.frosch-ferienhaus.de/index.php?id=106
<Radar> apeiros: Do you know what nationality fflush is?
<apeiros> no
<Radar> I have a brazillian email here
fuhgeddaboudit has joined #ruby
cmoylan_ has quit [Ping timeout: 245 seconds]
joelroa has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
venkat_ has quit [Remote host closed the connection]
venkat has joined #ruby
vpretzel has joined #ruby
<bnagy> gcds: that's not really useful
angusiguess has joined #ruby
<gcds> I know...
<gcds> It's 4 AM here... 5 hours till deadline
<gcds> my head is not working
cburyta has quit [Remote host closed the connection]
<bnagy> unless you can clearly state your logic and provide input/output pairs I don't see how you're going to be able to put it in code
LaPetiteFromage has joined #ruby
marcdel has quit []
<gcds> Ok I will try
<bnagy> sounds like you're going to miss this one. Write pseudocode as best you can and hope they're merciful
burlyscudd has joined #ruby
charliesome has joined #ruby
nichtdiebohne has joined #ruby
Salve has quit [Ping timeout: 265 seconds]
venkat has quit [Ping timeout: 265 seconds]
cburyta_ has joined #ruby
angusiguess has quit [Ping timeout: 265 seconds]
burlyscudd has quit [Ping timeout: 245 seconds]
marcdel has joined #ruby
sparrovv has quit [Remote host closed the connection]
marcdel has quit [Client Quit]
nihils has quit [Ping timeout: 265 seconds]
binaryhat has joined #ruby
bklane has joined #ruby
marcdel has joined #ruby
cburyta_ has quit [Client Quit]
dingus_khan has quit []
rpbertp13 has joined #ruby
rpbertp13 has quit [Client Quit]
Wolland has joined #ruby
baroquebobcat has joined #ruby
<bnagy> apeiros: I'm usually on utc+12, and idle in here a lot. I could op, although I'd need to actually learn how. It's just for emergencies, right?
xjiujiu has joined #ruby
<apeiros> bnagy: problem is that I don't have sufficient access rights to grant anybody op status :-/
<Radar> apeiros: You can grant them temporary op
<Radar> apeiros: You can +o yourself and +o someone else
<apeiros> I'm not sure I want to do that without permission
<Radar> You have my permission ;)
Jdubs has joined #ruby
<Radar> Who else's permission do you need? Our founder-in-absentia?
<apeiros> that'd be the one
<bnagy> I wouldn't feel happy wearing the hat on a permanent basis - I think it looks bad
<Radar> plz
<slowcon> can anyone take a look at this code I'm using to try to download a file with a link dynamically generated by javascript. http://pastebin.com/ct9mA8pK
<Radar> apeiros: You don't need their permission.
<apeiros> I tried to get him to give me more privileges. given that I'm here a lot and for years. he didn't react.
<bnagy> you can't really argue with people when you're wearing the hat
<Radar> apeiros: You're in here more often than they are and so you know the situation
<Radar> bnagy: you can, but it's difficult for it to not go to your head
<bnagy> well it's also a chilling effect which is unfair
<apeiros> Radar: it's also difficult for other people to not get it to their head…
Liothen has joined #ruby
<bnagy> ^^
<Radar> So let's get in contact with fflush and get him to elevate apeiros's permissions
<apeiros> I've had people kicked because they insulted me and of course the first thing they do is scream "abuse! you just kicked me because you don't like my 'opinion'"
<bnagy> slowcon: is there a problem, cause I'm looking btu not really seeing anything
<Radar> apeiros: that happens all the time in #rubyonrails
<bnagy> I don't use selenium though
<bnagy> slowcon: insofar as I have done scraping I have used capybara and celerity for JS support
<apeiros> anyway, 0300 here, should get to bed. I certainly wouldn't mind either of you, Radar or bnagy, to get ops. I wouldn't mind either to get my privs elevated.
* apeiros afk
gcds has quit [Quit: gcds]
<Radar> byebye
maximski has quit []
binaryhat has quit [Quit: Leaving]
fuhgeddaboudit has quit [Ping timeout: 245 seconds]
figgleberry has joined #ruby
havenwood has quit [Read error: Connection reset by peer]
dx7 has quit [Remote host closed the connection]
<slowcon> bnagy: yeah its not finding the attribute
havenwood has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
dx7 has joined #ruby
Jdubs has quit [Remote host closed the connection]
<bnagy> slowcon: does selenium have something to tell it to wait for the page to fully render or something?
dx7 has quit [Read error: No route to host]
dx7 has joined #ruby
<bnagy> manually inspect browser.text
supersym has joined #ruby
axl_ has quit [Quit: axl_]
apeiros has joined #ruby
BrianJ has joined #ruby
xcv has quit [Remote host closed the connection]
OhMyGoshJosh has joined #ruby
OhMyGoshJosh has quit [Max SendQ exceeded]
sensen has joined #ruby
digifiv5e has joined #ruby
xcv has joined #ruby
digifiv5e is now known as Guest97698
Guest97698 has quit [Changing host]
Guest97698 has joined #ruby
Guest97698 is now known as guyz
OhMyGoshJosh has joined #ruby
OhMyGoshJosh has quit [Max SendQ exceeded]
rafaelmagu has quit [Quit: Textual IRC Client: www.textualapp.com]
Vivekananda has quit [Remote host closed the connection]
centrx has quit [Quit: Leaving]
c3ntrx has joined #ruby
c3ntrx has quit [Remote host closed the connection]
kayloos has joined #ruby
tungd has joined #ruby
centrx has joined #ruby
Shidash has joined #ruby
S0da has joined #ruby
Hobogrammer_ has quit [Ping timeout: 260 seconds]
Wolland has quit [Remote host closed the connection]
dtcrshr has quit [Quit: Saindo]
kayloos has quit [Ping timeout: 260 seconds]
krisbulman is now known as [krisbulman]
ultraflash3 has quit [Remote host closed the connection]
marr has quit [Ping timeout: 245 seconds]
gwz has joined #ruby
<gwz> hey, is there a function present which will convert string "+3" to integer
pushpak has quit [Quit: Linkinus - http://linkinus.com]
<qubit> "+3".to_i
figgleberry has quit [Ping timeout: 245 seconds]
CaptainJet has quit [Ping timeout: 260 seconds]
Xiti has quit [Quit: Leaving]
Xiti has joined #ruby
kennym has quit [Ping timeout: 260 seconds]
kennym has joined #ruby
<pontiki> ***\o/***
fuhgeddaboudit has joined #ruby
havenwood has quit [Remote host closed the connection]
endash_ has quit [Read error: No route to host]
krz has joined #ruby
jerius has quit []
Mousse_ has quit [Quit: Computer has gone to sleep.]
endash_ has joined #ruby
ace_striker has joined #ruby
ace_striker is now known as Guest81645
v0n has quit [Ping timeout: 245 seconds]
parzo has quit []
wwalker has joined #ruby
francisfish has joined #ruby
danshultz has joined #ruby
CaptainJet has joined #ruby
michael_lee has quit [Ping timeout: 272 seconds]
Jdubs has joined #ruby
Jdubs has quit [Remote host closed the connection]
CaptainJet has quit [Read error: Connection reset by peer]
francisfish has quit [Ping timeout: 265 seconds]
marcdel has quit []
Guest81645 has quit [Ping timeout: 245 seconds]
hello_world has joined #ruby
LexicalScope has joined #ruby
sumark has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 260 seconds]
iliketurtles has joined #ruby
angusiguess has joined #ruby
gwz has quit [Quit: Page closed]
maletor has joined #ruby
iliketurtles has quit [Client Quit]
havenwood has joined #ruby
tkuchiki has joined #ruby
Hanmac1 has joined #ruby
angusiguess has quit [Read error: Operation timed out]
Hanmac has quit [Ping timeout: 272 seconds]
CaptainJet has joined #ruby
Wolland has joined #ruby
figgleberry has joined #ruby
dx7 has quit [Remote host closed the connection]
iamsean has joined #ruby
bklane has quit [Remote host closed the connection]
axl_ has joined #ruby
Wolland has quit [Client Quit]
senayar_ has quit [Remote host closed the connection]
bklane has joined #ruby
senayar has joined #ruby
Hobogrammer has joined #ruby
jtdowney has joined #ruby
tacos1de has quit [Remote host closed the connection]
Vivekananda has joined #ruby
tacos1de has joined #ruby
YourBestFriend has quit [Ping timeout: 265 seconds]
endash has quit [Quit: endash]
endash_ is now known as endash
senayar has quit [Ping timeout: 246 seconds]
bklane has quit [Ping timeout: 260 seconds]
marcdel has joined #ruby
YourBestFriend has joined #ruby
jonah_k has joined #ruby
[krisbulman] is now known as krisbulman
Hobogrammer has quit [Ping timeout: 252 seconds]
rom_ has quit [Quit: rom_]
catepillar has quit [Ping timeout: 265 seconds]
catepillar has joined #ruby
Jdubs has joined #ruby
jobewan has quit [Ping timeout: 245 seconds]
Andrevan has joined #ruby
geggam has quit [Quit: Leaving]
LaPetiteFromage has quit [Quit: LaPetiteFromage]
sdwrage has joined #ruby
meatherly has quit [Remote host closed the connection]
oso|away is now known as oso96_2000
meatherly has joined #ruby
razibog has joined #ruby
jonah_k has quit [Remote host closed the connection]
sumark has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
endash has quit [Read error: No route to host]
stkowski has quit [Quit: stkowski]
ENDERSON has joined #ruby
endash has joined #ruby
dx7 has joined #ruby
<ENDERSON> HELLOOOO HOLAA
echevemaster has joined #ruby
jonah_k has joined #ruby
fgo has quit [Remote host closed the connection]
ENDERSON has left #ruby [#ruby]
Vivekananda has quit [Read error: Connection reset by peer]
xcv has quit [Remote host closed the connection]
Jdubs has quit [Remote host closed the connection]
mehlah has quit [Quit: Leaving...]
Zunonia_ has joined #ruby
Zunonia_ has quit [Remote host closed the connection]
figgleberry has quit [Ping timeout: 272 seconds]
Kricir has quit [Remote host closed the connection]
Zunonia has joined #ruby
sivoais has quit [Ping timeout: 252 seconds]
kayloos has joined #ruby
Vivekananda has joined #ruby
rh1n0 has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
PLejeck has quit [Read error: Connection reset by peer]
nichtdiebohne has quit [Quit: Leaving...]
radic has quit [Disconnected by services]
danshultz has quit [Remote host closed the connection]
radic_ has joined #ruby
razibog has quit [Quit: Leaving.]
Vivekananda has quit [Read error: No route to host]
krisbulman is now known as [krisbulman]
marcdel has joined #ruby
Vivekananda has joined #ruby
fridim_ has quit [Quit: Leaving]
alx- has quit [Read error: Connection reset by peer]
Alex_ has joined #ruby
Tomasso has joined #ruby
sivoais has joined #ruby
mushky has quit [Quit: mushky]
PLejeck has joined #ruby
Vivekananda has quit [Quit: Ex-Chat]
vpretzel has quit [Remote host closed the connection]
RealMarc is now known as Marc
vpretzel has joined #ruby
Marc is now known as Guest33899
jtdowney has quit []
michael_lee has joined #ruby
<platzhirsch> Jesus, how can I add static files to my gem?
<platzhirsch> They are not pushed, although inside the lib folder
gnephiak has quit [Quit: Konversation terminated!]
fijimunkii has joined #ruby
joshwlewis has joined #ruby
vpretzel has quit [Ping timeout: 252 seconds]
towski_ has quit [Read error: Connection reset by peer]
Salve has joined #ruby
rh1n0 has quit [Quit: im out!]
razibog has joined #ruby
angusiguess has joined #ruby
razibog has quit [Client Quit]
CaptainKnots has quit [Ping timeout: 246 seconds]
Lewix has joined #ruby
<platzhirsch> nevermind, found the problem
IceDragon has joined #ruby
hello_world has quit [Quit: Page closed]
iamsean has quit [Quit: iamsean]
angusiguess has quit [Ping timeout: 264 seconds]
[krisbulman] is now known as krisbulman
petey has joined #ruby
Opettaja has quit [Remote host closed the connection]
CaptainKnots has joined #ruby
mushky has joined #ruby
meatherly has quit [Remote host closed the connection]
LexicalScope` has joined #ruby
Kricir has joined #ruby
LexicalScope has quit [Ping timeout: 252 seconds]
LexicalScope` has quit [Read error: Connection reset by peer]
LexicalScope` has joined #ruby
hamakn has joined #ruby
petey has quit [Remote host closed the connection]
petey has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
andy has quit [Read error: Connection reset by peer]
LexicalScope` has quit [Read error: Connection reset by peer]
andy has joined #ruby
LexicalScope` has joined #ruby
kayloos has quit [Remote host closed the connection]
dx7 has quit [Remote host closed the connection]
fuhgeddaboudit has quit [Quit: Ex-Chat]
rico_sta_cruz has joined #ruby
petey has quit [Ping timeout: 260 seconds]
mushky has quit [Quit: mushky]
mushky has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
kayloos has joined #ruby
Kricir has quit [Ping timeout: 252 seconds]
snuffeluffegus has joined #ruby
MatthewsFace has joined #ruby
<centrx> Ruby
dukz has joined #ruby
mushky has quit [Quit: mushky]
<poutine> You guys want to know the most interesting part about ruby?
<centrx> Definitely
<popl> Wait
<popl> Is it the edifying interaction within the community?
stryek has quit [Ping timeout: 272 seconds]
<popl> No, that can't be it…
<popl> ;P
clindsay is now known as xBradPittx
dukz has quit [Read error: Connection reset by peer]
dukz has joined #ruby
krisbulman is now known as [krisbulman]
Hobogrammer has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
pu22l3r_ has joined #ruby
tharindu has joined #ruby
meatherly has joined #ruby
derek_c has quit [Ping timeout: 252 seconds]
bklane has joined #ruby
coldmethod has joined #ruby
pu22l3r has quit [Ping timeout: 272 seconds]
Atrumx has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
meatherly has joined #ruby
dukz_ has joined #ruby
dukz has quit [Ping timeout: 265 seconds]
vpretzel has joined #ruby
mrbrant has joined #ruby
meatherly has quit [Ping timeout: 265 seconds]
<coldmethod> Zzzzz
<centrx> Quack quack
sdwrage has quit [Quit: This computer has gone to sleep]
<popl> poutine: Is your lack of response meant to indicate that there isn't a most interesting part about ruby?
francisfish has joined #ruby
<centrx> poutine was so fascinated by it, he left
<mrbrant> Ohaiyo coldmethod :)
<coldmethod> hmm, there are quite a few
<coldmethod> hi mrbrant
danshultz has joined #ruby
<coldmethod> I am fascinated by the blocks
<coldmethod> and tons of methods available on my hand lol
maroloccio has quit [Quit: WeeChat 0.4.2]
nszceta_ has joined #ruby
yasushi has joined #ruby
mrbrant has quit [Quit: Leaving.]
francisfish has quit [Ping timeout: 252 seconds]
sdwrage has joined #ruby
jonah_k has quit [Remote host closed the connection]
danshultz has quit [Ping timeout: 260 seconds]
angusiguess has joined #ruby
vpretzel has quit [Ping timeout: 272 seconds]
pfg has quit [Quit: Textual IRC Client: www.textualapp.com]
jack_rabbit has quit [Ping timeout: 265 seconds]
alx- has joined #ruby
Alex_ has quit [Read error: Connection reset by peer]
jonah_k has joined #ruby
nszceta_ has quit [Read error: Connection reset by peer]
nszceta has quit [Remote host closed the connection]
BackEndCoder has quit [Read error: Connection reset by peer]
snuffeluffegus has quit [Quit: Leaving]
angusiguess has quit [Ping timeout: 272 seconds]
z has quit [Quit: Lost terminal]
Vovko has joined #ruby
deadlock has joined #ruby
z has joined #ruby
Aquilo_ is now known as Aquilo
Cache_Money has joined #ruby
Vovko has quit [Remote host closed the connection]
parduse has quit [Ping timeout: 272 seconds]
tanema has quit [Remote host closed the connection]
parduse has joined #ruby
tanema has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
yasushi has quit [Remote host closed the connection]
Aryasam_ has quit [Ping timeout: 245 seconds]
jack_rabbit has joined #ruby
rico_sta_cruz has quit [Quit: rico_sta_cruz]
Aryasam has joined #ruby
tanema has quit [Ping timeout: 252 seconds]
Kricir has joined #ruby
dx7 has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
OdNairy has joined #ruby
ace_striker has joined #ruby
Kricir has quit [Ping timeout: 265 seconds]
dx7 has quit [Ping timeout: 245 seconds]
ace_striker is now known as Guest13480
dukz has joined #ruby
OdNairy has quit [Client Quit]
Zunonia has quit [Quit: Computer has gone to sleep.]
Okt has left #ruby ["WeeChat 0.4.1"]
kwatz has joined #ruby
kwatz is now known as destructure
dukz_ has quit [Ping timeout: 260 seconds]
kevinykc_ has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
<slowcon> hey centrx have you used watir or selenium before?
papito has joined #ruby
Tomasso has quit [Read error: Connection reset by peer]
<centrx> A little
pu22l3r_ has quit [Remote host closed the connection]
Shidash has quit [Ping timeout: 245 seconds]
pu22l3r has joined #ruby
kevinykchan has joined #ruby
recurrence has quit [Ping timeout: 265 seconds]
kevinykc_ has quit [Ping timeout: 252 seconds]
derek_c has joined #ruby
Vovko has joined #ruby
pu22l3r has quit [Ping timeout: 265 seconds]
tjr9898_ has quit []
JasmeetQA has joined #ruby
Naoe-Kanno has quit [Quit: ネウロイを負かさなきゃならないね]
parduse has quit [Ping timeout: 272 seconds]
meatherly has joined #ruby
parduse has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
tharindu has quit [Quit: Leaving...]
phansch has joined #ruby
phansch has quit [Remote host closed the connection]
iliketurtles has joined #ruby
alx- has quit [Quit: Linkinus - http://linkinus.com]
meatherly has quit [Ping timeout: 272 seconds]
LiquidInsect has quit [Quit: leaving]
ndrei has quit [Ping timeout: 260 seconds]
fgo has joined #ruby
b00stfr3ak has joined #ruby
LiquidInsect has joined #ruby
vpretzel has joined #ruby
earthquake has joined #ruby
<slowcon> centrx: i want to write a script that downloads files from this website. http://www4.zippyshare.com/v/87173820/file.html
<slowcon> centrx: big orange "download now" button has a js dynamically generated link
Liothen has quit [Quit: System of a down……]
<slowcon> centrx: can you tell me if this is in the right direction, http://pastebin.com/0SYK7sKh
Zunonia has joined #ruby
<centrx> Seems reasonable
<centrx> I prefer CSS, but assuming that is the right XPath
Andrevan has quit [Quit: WeeChat 0.4.2-rc1]
<centrx> You could also (maybe) simply extract the URL from the element, rather than simulating a click and (downloading to to somewhere?)
Vovko has quit [Remote host closed the connection]
<centrx> But maybe you want it to be downloaded anyway
<slowcon> yeah thats the end result
mushky has joined #ruby
<slowcon> centrx: in the final script i want it to download the file and rename the file to a scraped song title in a database, but first i want to try to figure out how to just get them to download
kevinykchan has quit [Read error: Connection reset by peer]
<centrx> Good engineering practice, split it up into segments and test as you go
<slowcon> centrx: i was using css at first, just can't get the script to recognize the download button
dik_dak has quit [Quit: Leaving]
<slowcon> so i tried xpath
kevinykchan has joined #ruby
<slowcon> (Selenium::WebDriver::Error::NoSuchElementError)
angusiguess has joined #ruby
axl_ has quit [Quit: axl_]
Hobogrammer has quit [Read error: Connection reset by peer]
m104 has joined #ruby
firefly20131 has quit [Quit: Leaving.]
xcv has joined #ruby
nichtdiebohne has joined #ruby
vpretzel has quit [Ping timeout: 260 seconds]
angusiguess has quit [Ping timeout: 245 seconds]
nopolitica has joined #ruby
Jetchisel has joined #ruby
marcdel_ has joined #ruby
sensen_ has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
sensen has quit [Ping timeout: 265 seconds]
CaptainJet has quit []
m104 has quit [Quit: bye]
kevinykchan has quit [Read error: Connection reset by peer]
Vovko has joined #ruby
kevinykchan has joined #ruby
bklane has quit [Quit: Leaving...]
Atrumx has quit [Quit: Leaving]
mushky has quit [Quit: mushky]
mushky has joined #ruby
_tpavel has joined #ruby
browndawg has joined #ruby
dukz_ has joined #ruby
xcv has quit [Remote host closed the connection]
OdNairy has joined #ruby
stkowski has joined #ruby
Kricir has joined #ruby
dukz has quit [Ping timeout: 260 seconds]
Salve_ has joined #ruby
Salve has quit [Read error: Connection reset by peer]
sensen_ has quit [Ping timeout: 245 seconds]
Kricir has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
Atrumx has joined #ruby
yasushi has joined #ruby
nichtdiebohne has quit [Quit: Leaving...]
Kricir has quit [Ping timeout: 260 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
lemonsparrow has joined #ruby
kevinykchan has quit [Read error: Connection reset by peer]
Hobogrammer has joined #ruby
<Nilium> Writing event propagation is boring.
kevinykchan has joined #ruby
monkegjinni has joined #ruby
cmoylan has quit [Ping timeout: 245 seconds]
monkegjinni has quit [Remote host closed the connection]
<centrx> Bummer
yasushi has quit [Ping timeout: 265 seconds]
tgkokk_ has joined #ruby
tgkokk_ is now known as tgkokk
Stabic has joined #ruby
venkat has joined #ruby
* Stabic Does someone have a mobile phone i can use for registration verification ? (my is not working) Please i really need it! Pm me thx!
Stabic has quit [Killed (idoru (Spam is off topic on freenode.))]
<Nilium> Indeed.
<Nilium> Hahahaha.
<Nilium> That cheered me up. Thanks.
gtech_ has joined #ruby
yacks has joined #ruby
nopolitica has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
tonni has joined #ruby
ktosiek_ has joined #ruby
ktosiek has quit [Ping timeout: 245 seconds]
<gtech_> I'm importing a class from a library and I'd like to give it the ability to call another class instance method after the second class has been initialized, what's the best way to do this?
newleaf has quit [Remote host closed the connection]
chipotle has joined #ruby
jlebrech has joined #ruby
<gtech_> I'm importing a class from a library and I'd like to give it the ability to call a second class's instance method after the second class has been initialized, what's the best way to do this?(edited for clarity)
<centrx> Not really clear what you mean
lotherk has left #ruby [#ruby]
<centrx> When you instantiate a class, it's instance methods are accessible
tonni has quit [Ping timeout: 245 seconds]
stkowski has quit [Quit: stkowski]
<gtech_> Class A has a handler who's behavior is defined at instantiation, I'd like to give that handler more functionality
<gtech_> class B has that functionality but must be initialized first
Guest13480 has quit [Ping timeout: 245 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
<bnagy> pass B ( the class itself ) to A and have A instantiate a B for use in its thing
venkat has quit []
sensen has joined #ruby
<bnagy> classes are first class ( hur hur ) variables
noop has joined #ruby
<gtech_> I'm importing Class A from a library, how do I add to it like that?
<bnagy> I don't know what 'importing' means in ruby
<gtech_> "require"
<bnagy> can reopen any class and add or redefine methods
<bnagy> hrm first half of that sentence went Elsewhere
<bnagy> honestly it's still kind of guesswork without looking at some actual code
meatherly has joined #ruby
tharindu has joined #ruby
<gtech_> Ah, should I dig into the library, copy the existing code from new() or initialize() then add my code in?
kayloos has quit []
decoponio has joined #ruby
<bnagy> maybe? Who knows?
<bnagy> you haven't really explained your problem, tbf, so I'm just making guesses
<gtech_> kk, I'll give it a shot and throw up a pastie if I get stuck
<gtech_> thanks for your help
<bnagy> np
meatherly has quit [Ping timeout: 265 seconds]
francisfish has joined #ruby
gja has joined #ruby
Jdubs has joined #ruby
heftig has quit [Quit: Quitting]
parduse has quit [Ping timeout: 245 seconds]
ayaz has joined #ruby
razibog has joined #ruby
fgo has quit [Remote host closed the connection]
parduse has joined #ruby
parduse has left #ruby [#ruby]
parduse has joined #ruby
tonni has joined #ruby
parduse has quit [Changing host]
parduse has joined #ruby
francisfish has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
pixelgremlins has joined #ruby
thomasxie has joined #ruby
vpretzel has joined #ruby
angusiguess has joined #ruby
razibog has quit [Quit: Leaving.]
pixelgremlins_ba has quit [Ping timeout: 272 seconds]
Cache_Money has quit [Quit: Cache_Money]
jonah_k has quit [Remote host closed the connection]
<gtech_> Okay here
<gtech_> on line 334 initialize takes a block
carter1 has joined #ruby
vpretzel has quit [Ping timeout: 264 seconds]
<gtech_> doesn't that mean I can Cinch::Bot.new a block to instiantiate another class and set to to an instance variable?
<gtech_> I can send Cinch::Bot*
bleak2 has joined #ruby
<bnagy> what are you actually trying to do?
<bnagy> but I mean, yeah the block gets instance_eval'd
angusiguess has quit [Ping timeout: 272 seconds]
earthquake has quit [Quit: earthquake]
gja has quit [Quit: This computer has gone to sleep]
jonah_k has joined #ruby
Cache_Money has joined #ruby
<carter1> if you have an array of hashes, each hash containing a string as a key and an integer as a value, what's the best way to sort them by value?
browndawg has quit [Quit: Leaving.]
<bnagy> carter1: ary.sort_by {|hsh| hsh.values.last} or something
<carter1> ah, thank you
<bnagy> assuming they have exactly one value
<carter1> I've been playing with this for a half-hour
bleak has quit [Ping timeout: 272 seconds]
dx7 has joined #ruby
<carter1> each hash only has a single key/value pair
koell has quit [Read error: Connection reset by peer]
Vovko_ has joined #ruby
bklane has joined #ruby
<carter1> ah, that did the trick
<gtech_> bnagy: I'm trying to send that class into Cinch::Bot in order to send key strokes to a GUI on my computer when certain messages appear
<carter1> thank you = )
parduse has quit [Ping timeout: 245 seconds]
<gtech_> user message to channel -> IRC bot reads -> sends keystroke to GUI
parduse has joined #ruby
<bnagy> gtech_: just make an instance of it and refer to that instance in the block you register
parduse has quit [Changing host]
parduse has joined #ruby
<bnagy> blocks are closures, so the block will 'remember' the local variable that is the instance of the commandthingy
Vovko has quit [Ping timeout: 245 seconds]
Vovko_ has quit [Remote host closed the connection]
lukeholder has joined #ruby
dx7 has quit [Ping timeout: 245 seconds]
CourtJesterG has joined #ruby
<gtech_> what am I missing?
<CourtJesterG> hi how come when I go to do gem install rails, I get this: /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin13/rbconfig.rb:212: warning: Insecure world writable dir /Developer/NVIDIA/CUDA-6.0/bin in PATH, mode 040777
Vovko has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<gtech_> CourtJesterG: your rails install looks like it sees a folder with bad permissions
<CourtJesterG> Fetching: i18n-0.6.9.gem (100%)
<CourtJesterG> You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
<CourtJesterG> ERROR: While executing gem ... (Gem::FilePermissionError)
<CourtJesterG> Well am using MacPorts and use that to install Ruby
klaut has joined #ruby
<coldmethod> CourtJesterG: On Linux, you mainly have to use sudo if you are installing system-wide
<CourtJesterG> perhaps Sudo?
<gtech_> NO
<gtech_> not when using rvm
<coldmethod> yup
<gtech_> if you're doing it via the package manager you may hav eto
sski has quit [Remote host closed the connection]
<gtech_> but rvm makes things much easier anyway
bal has joined #ruby
<CourtJesterG> well which way is better?
sski has joined #ruby
<bnagy> install via ruby-install as a user, not ports
<bnagy> or rvm if you really want, but imho chruby is just better
Xeago has quit [Read error: Connection reset by peer]
jlebrech has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<havenwood> +1 ruby-install/chruby :)
<CourtJesterG> okay
Xeago has joined #ruby
<bnagy> ruby-install will use ports for dependencies, if needed
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tonni has quit [Read error: Connection reset by peer]
<CourtJesterG> and that is a bad thing? I want to learn ruby so am a newbiee
<bnagy> no it's a good thing
<CourtJesterG> so your saying install it with Macports
<bnagy> it'll pick up lib dependencies more or less however you've installed them ( port, brew, manually... )
<havenwood> CourtJesterG: Install ruby-install and use it to install the Rubies of your choice. The tool is smart and will fetch dependencies with your package manager without you having to bother.
carter1 has quit [Remote host closed the connection]
sski has quit [Ping timeout: 272 seconds]
Kricir has joined #ruby
fgo has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 265 seconds]
<havenwood> CourtJesterG: Then chruby will select the current Ruby you'd like to be using. (For example right now even though you've installed a macports Ruby you are using Mavericks system Ruby. Environment variables should be configured for each Ruby you select and chruby sets them properly for you.)
marcdel_ has quit []
<bnagy> gtech_: bot = Bot.new(blah); cs = CommandSender.new; bot.on(/whatever/) {|e| cs.do_something}
<havenwood> CourtJesterG: RVM does the jobs of ruby-install and chruby as well as other things, so of course not as light of a tool but good support for crazy legacy systems.
Cache_Money has quit [Quit: Cache_Money]
echevemaster has quit [Remote host closed the connection]
<CourtJesterG> okay, but doesn't the macports select command handle this as well when chosing a ruby version to use, and than the --set command to set it as the default
ndrei has joined #ruby
<CourtJesterG> unless your talking about gem usage
Kricir has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
amclain has quit [Quit: Leaving]
Salve has joined #ruby
tonni has joined #ruby
Salve_ has quit [Read error: Connection reset by peer]
<havenwood> CourtJesterG: If you opt to use macport's Ruby, then using --set sounds right (you may also need to configure some env vars).
<havenwood> bnagy: Is using macports Ruby a good path? (If you only need one Ruby.)
phansch has joined #ruby
yeticry_ has quit [Read error: Connection reset by peer]
<bnagy> never tried. I doubt it, though
Cache_Money has joined #ruby
andy has quit [Remote host closed the connection]
yeticry has joined #ruby
<CourtJesterG> yeah, i always come to this RVM pack yet I always notice that it really isn't so much secure, since they lost funding
<bnagy> hard to work out how you'd install gems without sudo, for a start
andy has joined #ruby
<bnagy> I guess you could use chgems or something :<
<bnagy> but anyway, it all sounds like a pain in the butt when you can just install as a user
<CourtJesterG> Am the only user on the mac, and most things that I have to install anyway I have to sudo
Cache_Money has quit [Client Quit]
<bnagy> I'm honestly not interested in a debate about it
<CourtJesterG> I'll have to look into this more, I moved away from github unless I really have to, do to the fact of homebrew and how much it intergrates with the OS X with its rules and such of be less unix
IceDragon has quit [Quit: Space~~~]
<havenwood> CourtJesterG: RVM asked and received community funding to work on RVM2 (which is written in Ruby instead of Shell).
<havenwood> <3 Githubs
<bnagy> I have no idea what github has to do with homebrew
Vovko has quit [Read error: Connection reset by peer]
<CourtJesterG> when I was using homebrew I noticed formulas and such would get screwed up from it being so open and people pushing
<havenwood> bnagy: me neither! :O
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
<gtech_> bnagy: awesome, thanks, you demistified a lot with that single line
predator217 has quit [Ping timeout: 264 seconds]
<havenwood> Any thoughts on this? :O https://gist.github.com/havenwood/9046302
<bnagy> CourtJesterG: if you are asking for advice, then it's 'use ruby-install and chruby'
andy has quit [Ping timeout: 245 seconds]
<bnagy> CourtJesterG: if you're trying to persuade me that using macports is as good / better then 'no'
<bnagy> and I'll file all the stuff about brew and github and being less unix under 'wtf'
ayaz has joined #ruby
freezey has joined #ruby
Vovko has joined #ruby
freezey has quit [Read error: Connection reset by peer]
<CourtJesterG> Am new to MacPorts so am not persuadeing anybody, just pointing out the facts, I like github, but yet when thousands of people are helping a project stuff gets screwed up
<bnagy> gtech_: that's what I mean about closures - the block can 'see' that cs instance, forever now. Just note the lib comments about thread safety
freezey has joined #ruby
tgkokk has quit [Ping timeout: 265 seconds]
<bnagy> CourtJesterG: github projects are not open, it's not wikipedia
freezey has quit [Read error: Connection reset by peer]
<CourtJesterG> With homebrew anybody can push
<bnagy> again, github has nothing to do with homebrew
freezey has joined #ruby
<CourtJesterG> for instance I needed help the other night and the reason I switch cause of a troll
tonni has quit [Ping timeout: 260 seconds]
<CourtJesterG> he went ahead did a forumla fix and pushed it. It got screwed up even more and it was for boost
bigkevmcd has joined #ruby
<havenwood> CourtJesterG: You can opt to only use Homebrew-pulled formula if you'd like.
<bnagy> that is a cool story, but not related to hosting projects on github
<bnagy> if you don't like brew ( and I don't, for example ) don't use it, use ports
<CourtJesterG> than I got outta irc chat where I meant him, posted the issue on homebrew and he comes along and says something that is already known and we talked about than he closes the issue, wtf is that? The issue wasn't even fixed
<havenwood> the sieves ^ algorithm seems to be fast ;) wonder if it is correct >.>
Zunonia has quit [Read error: Connection reset by peer]
<havenwood> Those pesky maintainers!
<shevy> CourtJesterG file again!
bklane has quit [Quit: Leaving...]
<bnagy> havenwood: that is a little dense for this late in the afternoon :) What's it for?
<shevy> but osx users are lost anyway really :)
Zunonia has joined #ruby
abra_ has joined #ruby
pwh_ has quit []
nfk has joined #ruby
nfk has quit [Changing host]
nfk has joined #ruby
<bnagy> havenwood: it's a weird lazy enummy prime sieve?
timonv has joined #ruby
<havenwood> bnagy: yeah, based on a non-traditional approach i ran across today that this guy implemented in Erlang (i based mine on algo not his so i don't know if same): https://github.com/videlalvaro/erlang-prime-sieve
<supersym> \q
supersym has quit [Quit: WeeChat 0.4.3]
<bnagy> havenwood: huh, cool
meatherly has joined #ruby
abra has quit [Ping timeout: 260 seconds]
<bnagy> I wish I had a copy of TAOCP so I could look it up :(
ndrei has quit [Ping timeout: 260 seconds]
<havenwood> bnagy: was just pleased it seems fast (and *seems* to work) but my maths are fail so who knows! ;P
jprovazn has joined #ruby
LexicalScope` has quit [Ping timeout: 260 seconds]
<bnagy> it's not clear to me that it's exhaustive
<bnagy> but I have a rule about doing number theory once I open my first beer
<bnagy> but you could brute it quickly
tvw has joined #ruby
tonni has joined #ruby
<havenwood> bnagy: i'd certainly worry it isn't... and just finished code spike so haven't really tested it out
tgkokk has joined #ruby
<havenwood> bnagy: i'm tired so probably will look at it with fresh eyes and boggle at my insanity >.> oh well, had fun!
<bnagy> you wouldn't have to do much to beat prime.rb though, it's horrid code
Vovko has quit [Ping timeout: 265 seconds]
meatherly has quit [Ping timeout: 260 seconds]
<bnagy> it's definitely interesting though, I'll look at it tomorrow :)
evangeline has joined #ruby
jonah_k has quit [Remote host closed the connection]
axsuul has joined #ruby
AlexRussia has quit [Ping timeout: 260 seconds]
mengu has joined #ruby
mengu has joined #ruby
axsuul has quit [Max SendQ exceeded]
shredding has joined #ruby
<havenwood> bnagy: oh my, not exhaustive is an understatement, not even close :O
tvw has quit []
shredding has quit [Client Quit]
axsuul has joined #ruby
ndrei has joined #ruby
<bnagy> ok that makes sense then
Aryasam has quit [Ping timeout: 272 seconds]
user258467 has joined #ruby
vpretzel has joined #ruby
axsuul has quit [Read error: No route to host]
arctaruz has joined #ruby
angusiguess has joined #ruby
centrx has quit [Quit: Leaving]
Jdubs has quit [Remote host closed the connection]
yarou_ has quit [Remote host closed the connection]
BrianJ has quit [Quit: Computer has gone to sleep.]
jackneill has joined #ruby
relix has joined #ruby
vpretzel has quit [Ping timeout: 245 seconds]
coldmethod has quit [Remote host closed the connection]
P1RATEZ has joined #ruby
tungd has quit [Read error: Connection reset by peer]
angusiguess has quit [Ping timeout: 245 seconds]
zeade has quit [Quit: Leaving.]
claymore has joined #ruby
<CourtJesterG> So RVM Uses MacPorts by default it says
<havenwood> CourtJesterG: Correct. If you don't have a package manager and are on OS X, it will install macports and use that to install dependencies.
axsuul has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood> CourtJesterG: Though if Homebrew is installed it will use that instead.
<CourtJesterG> I heard you could actually run both side by side
<CourtJesterG> brew and ports
leonidlm has joined #ruby
zigomir has joined #ruby
<havenwood> CourtJesterG: Not advised to do so.
lxsameer has joined #ruby
<havenwood> CourtJesterG: Pick your poison.
arturaz has quit [Remote host closed the connection]
<CourtJesterG> umm Fink
<CourtJesterG> nah am joking am doing MacPorts
<havenwood> CourtJesterG: RVM actually supports chruby. :O MRVM ships with RVM but only installs Rubies and defers to chruby for version switching. Again, I'd pick one of the other though.
poulson has joined #ruby
usse has joined #ruby
<havenwood> one *or
<CourtJesterG> whats MRVM?
<havenwood> CourtJesterG: I shouldn't have mentioned it. >.> mini-RVM: http://rvm.io/workflow/chruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
usse has quit [Remote host closed the connection]
monkegjinni has joined #ruby
tharindu has quit [Quit: Leaving...]
<havenwood> CourtJesterG: chruby works with Rubies you build yourself, install with ruby-install, ruby-build or RVM
timonv has quit [Remote host closed the connection]
dawkirst has joined #ruby
fysaen has quit [Read error: No route to host]
lemonsparrow has quit [Ping timeout: 245 seconds]
tonni has quit [Remote host closed the connection]
<CourtJesterG> okay so now I have to figure which is the best way to uninstall Ruby21 out of MacPorts, cause they have so many ways. Last time I uninstalled alot of stuff
tonni has joined #ruby
coldmethod has joined #ruby
tonni has quit [Read error: Connection reset by peer]
<CourtJesterG> well screwed that out
<CourtJesterG> I didn't even do port in the command
<CourtJesterG> I went sudo uninstall ruby21 and it just took out CUDA
<CourtJesterG> WEIRD
dubios has quit [Excess Flood]
dubios_ has joined #ruby
Kricir has joined #ruby
twiceaday has joined #ruby
hamakn has quit [Remote host closed the connection]
tvw has joined #ruby
fgo has joined #ruby
maoko has joined #ruby
banister has joined #ruby
andikr has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
slowcon has quit [Quit: slowcon]
ephemerian has joined #ruby
ahawkins has joined #ruby
einarj has joined #ruby
twiceaday has quit [Ping timeout: 252 seconds]
aganov has joined #ruby
derek_c has quit [Quit: Leaving]
twiceaday has joined #ruby
sk87 has joined #ruby
freezey has quit [Remote host closed the connection]
stonevil has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
slowcon has joined #ruby
senayar has joined #ruby
timonv has joined #ruby
Macaveli has joined #ruby
ndrei has joined #ruby
greenarrow has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sassamo has joined #ruby
JasmeetQA1 has joined #ruby
tonni has joined #ruby
nvrch has joined #ruby
JasmeetQA has quit [Ping timeout: 245 seconds]
andy has joined #ruby
msuszczy has joined #ruby
sassamo has quit [Remote host closed the connection]
sassamo has joined #ruby
firefly2013 has joined #ruby
sassamo has quit [Read error: Connection reset by peer]
sassamo has joined #ruby
meatherly has joined #ruby
corehook has joined #ruby
andy has quit [Ping timeout: 252 seconds]
ndrei has quit [Ping timeout: 264 seconds]
maoko has joined #ruby
ikaros has joined #ruby
sparrovv has joined #ruby
corehook has quit [Client Quit]
stonevil has quit [Quit: Computer has gone to sleep.]
meatherly has quit [Ping timeout: 265 seconds]
sparrovv has quit [Remote host closed the connection]
Xeago has joined #ruby
havenwood has quit []
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<CourtJesterG> Well I went and did the install, it wants me to add to my bash profile but before that it was already prompting me for a password to do an update
<CourtJesterG> during that it went to go make a directory and of course the permission was denied also for openssl, its going through the update
blaxter_ has joined #ruby
ndrei has joined #ruby
platzhirsch has left #ruby [#ruby]
oso96_2000 is now known as oso|away
Hanmac has joined #ruby
<_tpavel> Hi, if I have a string of words separated by commas "foo,bar,baz" how would I concisely and beautifully remove one word from the string?
<_tpavel> I need a method that works for "foo", "bar" and "baz" in my example
dx7 has joined #ruby
obs_ has joined #ruby
heftig has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
<apeiros> _tpavel: a) String#sub with a good regex, b) split, delete and join
phansch has quit [Quit: Leaving]
MrBy has joined #ruby
olivier_bK has joined #ruby
<_tpavel> apeiros, thanks. I tried with slice, but it's no good. I think I'll try with split+delete+join
vpretzel has joined #ruby
Xeago has quit [Remote host closed the connection]
dx7 has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
Xeago has joined #ruby
lukeholder has quit [Ping timeout: 245 seconds]
noop has quit [Ping timeout: 265 seconds]
rubyracer has joined #ruby
coldmethod has quit [Ping timeout: 272 seconds]
tesuji has joined #ruby
vpretzel has quit [Ping timeout: 260 seconds]
Xeago has quit [Ping timeout: 246 seconds]
angusiguess has quit [Ping timeout: 260 seconds]
stonevil has joined #ruby
nichtdiebohne has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
<_tpavel> Ok, two problems: 1) delete returns the deleted element and this means I can't chain them and 2) If I remove a middle word, two commas remain next to each other
roolo has joined #ruby
camilasan has joined #ruby
tharindu has joined #ruby
klaut has quit [Remote host closed the connection]
h0lyalg0rithm has joined #ruby
<_tpavel> sorry, 2 is not a problem, ignore that :)
maasha has joined #ruby
elaptics`away is now known as elaptics
<maasha> Hey
Hanmac1 has joined #ruby
Jdubs has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
lxsameer has quit [Ping timeout: 252 seconds]
<maasha> I was wondering why String.match is way slower than String.index with a regexp?
hamakn has joined #ruby
malcolmva has quit [Ping timeout: 272 seconds]
<maasha> (~6 times diff)
<_tpavel> but it's weird in the docs, the beginning examples show that #delete returns the remaining array: http://www.ruby-doc.org/core-2.0.0/Array.html#class-Array-label-Removing+Items+from+an+Array
jwang has quit [Ping timeout: 272 seconds]
<_tpavel> while at #delete it shows it returns the removed item
Hanmac has quit [Ping timeout: 265 seconds]
<tobiasvl> hmm, yeah, that's wrong
noop has joined #ruby
kenndel_ has joined #ruby
Xeago has joined #ruby
<apeiros> _tpavel: documentation bug. the intention was probably to have a third line: `arr #=> [1, 3]`
<_tpavel> for 2.1, they've fixed the API doc for this
<apeiros> ah, indeed. just the way I'd have done it. nice :)
<_tpavel> hehe, yep :)
kenndel has quit [Ping timeout: 265 seconds]
<apeiros> maasha: because String#match has a lot more work to do
<apeiros> maasha: if you only want to check whether something matches, use String#=~
diegoviola has quit [Quit: WeeChat 0.4.3]
charliesome has joined #ruby
<_tpavel> but changing the return value of delete doesn't allow chaining like I need. It's a weird decision...
<apeiros> maasha: or rather, Regexp#=~ - a literal, uninterpolated regex on the LHS iirc gets treated specially by the parser and is the fastest.
<apeiros> _tpavel: changing the return value of delete to what you need will break others needs
<apeiros> _tpavel: if you need something specific, add it
oracal has joined #ruby
Ziarkaen has joined #ruby
<apeiros> _tpavel: but IMO you should just wrap your comma-separated string into a proper class.
Jetchisel has quit [Ping timeout: 256 seconds]
dubios_ is now known as dubios
dubios has quit [Changing host]
dubios has joined #ruby
<maasha> apeiros: what extra work is that match does?
<apeiros> maasha: construct a MatchData object
h0lyalg0rithm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lxsameer has joined #ruby
<maasha> apeiros: heavy task apperently
alex88 has joined #ruby
<apeiros> maasha: you've just measured it.
stonevil has joined #ruby
<apeiros> you can always check the source too
jwang has joined #ruby
<alex88> http://pastie.org/pastes/8741495/text?key=8z9tsfitas853y2agfhyw isn't too much for a redis connection error? :D
Paradox has quit [Remote host closed the connection]
bidigo has joined #ruby
stonevil has quit [Read error: Connection reset by peer]
h0lyalg0rithm has joined #ruby
stonevil has joined #ruby
h0lyalg0rithm has quit [Client Quit]
asmodlol has joined #ruby
Kricir has joined #ruby
nichtdiebohne has quit [Ping timeout: 264 seconds]
slowcon has quit [Quit: slowcon]
Paradox has joined #ruby
b00stfr3ak has quit [Ping timeout: 260 seconds]
tagrudev has joined #ruby
freezey has joined #ruby
[gmi] has joined #ruby
malcolmva has joined #ruby
Atw has quit [Ping timeout: 272 seconds]
Kricir has quit [Ping timeout: 245 seconds]
<maasha> apeiros: I was just wondering if a simple substring was used in a regex; would Ruby use some optimized string matching algorithm or the slower regex engine?
TMM has joined #ruby
<apeiros> maasha: check the source
tjr9898 has joined #ruby
<maasha> apeiros: right
<apeiros> maasha: though regex engines are quite sophisticated. some can recognize simple expressions and fast substring search
<maasha> apeiros: It would be a logical optimirazation
<apeiros> *and use a fast…
h0lyalg0rithm has joined #ruby
yasushi has joined #ruby
akemrir has joined #ruby
francisfish has joined #ruby
j416 has joined #ruby
<j416> o/ if my class contains only class methods and I will never need to instantiate it (i.e. it works more like a kind of namespace), would it be common practice to use a module instead?
browndawg has joined #ruby
yasushi has quit [Ping timeout: 245 seconds]
axsuul has quit [Ping timeout: 260 seconds]
Lewix has quit [Remote host closed the connection]
troessner has joined #ruby
jlebrech has joined #ruby
<apeiros> j416: best practice would be to make it a module, define them as instance methods and declare them module_function
<apeiros> j416: you can use module_function the same way as e.g. private. that is, you write it on top and all subsequently defined methods become module functions.
<apeiros> (that's how e.g. Math does it)
<j416> apeiros: I'll google that. Thanks.
Nowaker has quit [Ping timeout: 245 seconds]
<apeiros> it's a method. no need for google. you can use ordinary API docs.
<apeiros> it's Module#module_function
<j416> (that's what I googled to find :)
Lewix has joined #ruby
<apeiros> you really shouldn't use google to find API docs.
kt has joined #ruby
Nowaker has joined #ruby
<j416> well, it worked.
Jetchisel has joined #ruby
<apeiros> you'll find docs not matching your version
h0lyalg0rithm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
popl_ has joined #ruby
popl_ has joined #ruby
popl_ has quit [Changing host]
hamakn has quit [Remote host closed the connection]
h0lyalg0rithm has joined #ruby
<j416> and other useful things that are not the API reference :)
<j416> but yes, I do have the api docs for the right version, easily searchable
stonevil has quit [Quit: Computer has gone to sleep.]
h0lyalg0rithm has quit [Client Quit]
rdark has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
mojjojo has joined #ruby
tharindu has quit [Quit: Leaving...]
abra has joined #ruby
rickz has joined #ruby
Hiall has quit [Quit: hiall]
rickz has left #ruby [#ruby]
Xeago_ has joined #ruby
popl has quit [Ping timeout: 264 seconds]
Xeago__ has joined #ruby
hamakn has joined #ruby
abra_ has quit [Ping timeout: 260 seconds]
Salve has quit [Remote host closed the connection]
kt has quit [Quit: Textual IRC Client: www.textualapp.com]
<j416> apeiros: it seems like a class is a module that can be instantiated. Instead of using module_function, would I not be better of simply defining my methods as class (module) methods, extend self?
<j416> seems cleaner.
klaut has joined #ruby
kt has joined #ruby
shaunbaker has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
Salve has joined #ruby
aryaching has joined #ruby
Xeago has quit [Ping timeout: 246 seconds]
<apeiros> j416: no. it's a common practice but bad.
Xeago_ has quit [Ping timeout: 245 seconds]
abra has quit [Read error: Operation timed out]
<apeiros> j416: your methods make no use of self, so if added (through include/extend) should be private. module_function gives you that.
<apeiros> extend self does not.
ndrei has joined #ruby
<apeiros> you can get it with extend self too, but you have to jump through hoops for it.
<j416> I'm not quite following. Would you care to elaborate or give me a link with more info?
kung has joined #ruby
<apeiros> I have no link. what part do you have difficulties with?
<j416> if added (through include/extend) should be private.
<apeiros> also note that module_function is how Kernel and Math work
<j416> that part
<j416> :)
kt has quit [Client Quit]
<apeiros> class Foo; include Math; end; Foo.new.sin(12) # makes no sense, since it's not really Foo#sin, and sin doesn't make use of the Foo instance
phansch has joined #ruby
axsuul has joined #ruby
<apeiros> and methods that should not be callable from the outside should be private. a) because it makes it easy for code users to understand that those methods aren't part of the public API
<apeiros> and b) because it enables method_missing to work as intended
<apeiros> there may be more reasons I'm not remembering just right now
Salve has quit [Ping timeout: 260 seconds]
abra has joined #ruby
heftig has quit [Read error: Operation timed out]
heftig has joined #ruby
shtirlic has quit [Ping timeout: 260 seconds]
verto has quit [Ping timeout: 246 seconds]
gwb3 has quit [Ping timeout: 245 seconds]
Davey has quit [Ping timeout: 272 seconds]
sk87 has joined #ruby
gstamp has quit [Ping timeout: 256 seconds]
* apeiros off, cya guys & girls
gstamp has joined #ruby
<j416> apeiros: thanks, good arguments.
<j416> apeiros: o/
<apeiros> yw
yeltzooo has quit [Ping timeout: 252 seconds]
relix has joined #ruby
yeltzooo has joined #ruby
Davey has joined #ruby
maxmanders_ has quit [Ping timeout: 264 seconds]
vpretzel has joined #ruby
yeltzooo has quit [Max SendQ exceeded]
P1RATEZ has quit []
shtirlic has joined #ruby
angusiguess has joined #ruby
noop has quit [Ping timeout: 245 seconds]
yeltzooo has joined #ruby
Xeago__ has quit [Remote host closed the connection]
defrag has quit [Ping timeout: 252 seconds]
verto has joined #ruby
gwb3 has joined #ruby
Xeago has joined #ruby
lurch_ has joined #ruby
AlSquirikou has joined #ruby
maxmanders has joined #ruby
vpretzel has quit [Ping timeout: 272 seconds]
TheOnlyJoey has left #ruby ["Leaving"]
ultraflash3 has joined #ruby
Squarepy has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
papito has quit [Remote host closed the connection]
Quintus_q has joined #ruby
papito has joined #ruby
sed_life_better has joined #ruby
akemrir has quit [Read error: Connection reset by peer]
noop has joined #ruby
Hiall has joined #ruby
mojjojo has quit [Quit: mojjojo]
kitak has quit [Read error: Connection reset by peer]
kitak has joined #ruby
coderhs has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
gbt has joined #ruby
timonv has quit [Remote host closed the connection]
stonevil has joined #ruby
mikecmpbll has joined #ruby
freezey has quit [Remote host closed the connection]
tgkokk has quit [Quit: WeeChat 0.4.3]
pabloh has joined #ruby
TigerWol_ has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
deadlock has quit [Read error: Connection reset by peer]
bal has quit [Quit: bal]
nomenkun has joined #ruby
tgkokk has joined #ruby
bal has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
Kricir has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
phansch_ has joined #ruby
nomenkun_ has joined #ruby
timonv has joined #ruby
stonevil has quit [Quit: Lingo - http://www.lingoirc.com]
<Quintus_q> Hi there
<Quintus_q> for those of you reading the German Ruby forums at https://forum.ruby-portal.de we have created an accompanying IRC channel at #ruby-portal here on Freenode.
phansch has quit [Ping timeout: 252 seconds]
<Quintus_q> It is intended to be a more serious alternative to #ruby-de and should focus on support in German and general Ruby stuff, but of course OT is welcome :-)
<Quintus_q> According to the forum admin at https://forum.ruby-portal.de/viewtopic.php?f=7&t=26347#p96579 we’ll get the channel advertised on the forums webpage, so that some users hopefully will find their way from there either.
<Quintus_q> Hope to see some German Rubyists there :-)
nomenkun has quit [Ping timeout: 265 seconds]
mushky has quit [Quit: mushky]
Lewix has quit [Remote host closed the connection]
phansch has joined #ruby
CourtJesterG has quit [Quit: Please Donate: Litecoin payments: LUJnwfYNhNVNeP7DCxrewbJD9zZNR1nZ3E]
ndrei has joined #ruby
phansch_ has quit [Ping timeout: 252 seconds]
monkegjinni has quit [Remote host closed the connection]
ruisanto1 is now known as ruisantos
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marr has joined #ruby
dx7 has joined #ruby
Lewix has joined #ruby
RoxasShadowRS has joined #ruby
meatherly has joined #ruby
dx7 has quit [Ping timeout: 245 seconds]
meatherly has quit [Read error: Operation timed out]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
prc has joined #ruby
Guest62825 is now known as Caius
Caius has quit [Changing host]
Caius has joined #ruby
gregz has joined #ruby
<omegahm> Is it possible to use a rspec formatter that ins't in my Gemfile, but still running rspec with `bundle exec rspec`?
h0lyalg0rithm has joined #ruby
<gregz> hi, i'm trying to build a code that gets text and extract wikipedia keywords out of it. any idea what should i use? or if there are open source project that already doing it?
Zai00 has joined #ruby
<gregz> i thought of using treat, but i'm missing the wikipedia ingredient
lkba has quit [Ping timeout: 252 seconds]
h0lyalg0rithm has quit [Client Quit]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
Salve has joined #ruby
sski has joined #ruby
kaliya has joined #ruby
vpretzel has joined #ruby
sk87 has joined #ruby
angusiguess has joined #ruby
tgkokk has quit [Quit: WeeChat 0.4.4-dev]
blaxter_ is now known as blaxter
himsin has joined #ruby
Salve has quit [Ping timeout: 245 seconds]
akemrir has joined #ruby
sensen has quit [Quit: leaving]
<akemrir> Is there an option to pipe data from ruby to app like dialog/Xdialog?
braincrash has joined #ruby
vpretzel has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 265 seconds]
Zunonia has quit [Quit: Computer has gone to sleep.]
AlexRussia has joined #ruby
kitak has quit [Remote host closed the connection]
angusiguess has quit [Ping timeout: 245 seconds]
platzhirsch has joined #ruby
<platzhirsch> man... what a night
ndrei has joined #ruby
horrror has joined #ruby
horrror has quit [Client Quit]
<certainty> good? bad? short? long? dark?
dkamioka has joined #ruby
<platzhirsch> rough and shot, published my gem https://github.com/platzhirsch/aquanaut
<platzhirsch> short, as well
zigomir has quit [Remote host closed the connection]
aryaching has quit [Quit: sayonara! ^_^]
aryaching_ has joined #ruby
shredding has joined #ruby
<certainty> platzhirsch: typo in the README "... assets and how they are interlinke."
<platzhirsch> certainty: thanks
h0lyalg0rithm has joined #ruby
gregz has quit [Read error: Connection reset by peer]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aryaching_ is now known as aryaching
<certainty> looks good
<certainty> bbl
kitak has joined #ruby
AlSquirikou has quit [Quit: This computer has gone to sleep]
browndawg has quit [Ping timeout: 260 seconds]
h0lyalg0rithm has quit [Quit: Textual IRC Client: www.textualapp.com]
kevinykchan has quit [Quit: Computer has gone to sleep.]
obs_ has quit [Quit: Konversation terminated!]
browndawg has joined #ruby
shredding has quit [Ping timeout: 265 seconds]
makara has joined #ruby
obs_ has joined #ruby
fantazo has joined #ruby
canton7-mac has joined #ruby
freezey has joined #ruby
dukz_ has quit []
<jlebrech> silly q: if i add to errors[:base] my model fails validation? or do i have to also return false?
<jlebrech> sorry rails q
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
Kricir has joined #ruby
phansch has quit [Ping timeout: 252 seconds]
ndrei has quit [Ping timeout: 245 seconds]
angusiguess has joined #ruby
freezey has quit [Ping timeout: 260 seconds]
ultraflash3 has quit [Quit: Leaving...]
jinxcz has quit [Quit: leaving]
popl_ is now known as popl
shredding has joined #ruby
newleaf has joined #ruby
anshin has joined #ruby
Kricir has quit [Ping timeout: 265 seconds]
anshin has quit [Client Quit]
anshin has joined #ruby
<alex88> having a string like 2013-08-24 19:45:00 and a tz like BST, how can I parse the date using that custom TZ?
anshin has quit [Client Quit]
angusiguess has quit [Ping timeout: 264 seconds]
S0da has quit [Read error: Connection reset by peer]
senayar has quit []
banister has joined #ruby
monkegjinni has joined #ruby
senayar has joined #ruby
relix has joined #ruby
santiago has joined #ruby
phansch has joined #ruby
santiago is now known as loc22
bidigo has quit [Quit: Leaving]
<joonty> alex88: if the timezone is part of the string then it should pick it up in the parse
<alex88> joonty: ok let me just join them
<alex88> thanks!
eka has joined #ruby
Beoran has quit [Ping timeout: 245 seconds]
raphaelivan has joined #ruby
monkegjinni has quit [Remote host closed the connection]
meatherly has joined #ruby
sassamo has quit [Remote host closed the connection]
browndawg has quit [Read error: Connection timed out]
sassamo has joined #ruby
monkegjinni has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
sparrovv has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
zigomir has joined #ruby
meatherly has quit [Ping timeout: 272 seconds]
sparrovv has quit [Remote host closed the connection]
browndawg has joined #ruby
sassamo has quit [Ping timeout: 272 seconds]
browndawg has quit [Max SendQ exceeded]
Lewix has quit [Remote host closed the connection]
papito has quit [Remote host closed the connection]
dubsteph has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
papito has joined #ruby
S0da has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
Ariadeno has joined #ruby
browndawg has quit [Max SendQ exceeded]
Beoran has joined #ruby
browndawg has joined #ruby
karupanerura is now known as zz_karupanerura
mehlah has joined #ruby
Zai00 has quit [Quit: Zai00]
ndrei has joined #ruby
m1lt0n has joined #ruby
rubyracer has quit [Ping timeout: 264 seconds]
defrag has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
predator117 has joined #ruby
MrBy2 has joined #ruby
tjr9898 has quit [Remote host closed the connection]
MrBy has quit [Ping timeout: 265 seconds]
shredding has quit [Ping timeout: 245 seconds]
vpretzel has joined #ruby
browndawg has quit [Ping timeout: 245 seconds]
aesptux has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
Quintus_q has left #ruby ["Valete!"]
vpretzel has quit [Ping timeout: 265 seconds]
shredding has joined #ruby
napcae has left #ruby [#ruby]
loc22 has quit [Quit: Konversation terminated!]
banister has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
browndawg has joined #ruby
tvw has quit []
angusiguess has joined #ruby
makara has quit [Ping timeout: 260 seconds]
ktosiek_ is now known as ktosiek
_tpavel has quit [Quit: Leaving]
ndrei has joined #ruby
Ariadeno has quit [Ping timeout: 265 seconds]
AlexRussia has quit [Read error: Connection reset by peer]
Thanatermesis has joined #ruby
Thanatermesis has joined #ruby
AlexRussia has joined #ruby
lkba has joined #ruby
tgkokk has joined #ruby
freezey has joined #ruby
CorpusCallosum has joined #ruby
papito_ has joined #ruby
freezey_ has joined #ruby
Kricir has joined #ruby
tvw has joined #ruby
_tpavel has joined #ruby
makara has joined #ruby
freezey has quit [Ping timeout: 264 seconds]
papito has quit [Ping timeout: 252 seconds]
makara has quit [Max SendQ exceeded]
makara has joined #ruby
coderhs has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 260 seconds]
freezey_ has quit [Ping timeout: 260 seconds]
dx7 has joined #ruby
tvw has quit []
Mousse_ has joined #ruby
makara has quit [Max SendQ exceeded]
zigomir has quit [Remote host closed the connection]
makara has joined #ruby
tvw has joined #ruby
shredding has quit [Quit: shredding]
kevinykchan has joined #ruby
jonr22 has joined #ruby
dx7 has quit [Ping timeout: 265 seconds]
zigomir has joined #ruby
LekeFly has joined #ruby
Xeago_ has joined #ruby
ji0n has quit [Quit: ZNC - http://znc.in]
bandsaw1961 has joined #ruby
tvw has quit []
bandsaw1961 has left #ruby [#ruby]
Ziarkaen has quit [Read error: Operation timed out]
Xeago has quit [Ping timeout: 246 seconds]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Traxnov has joined #ruby
Traxnov has quit [Remote host closed the connection]
kevinykchan has quit [Quit: Computer has gone to sleep.]
randomnick_ has joined #ruby
yalue has joined #ruby
bandsaw1961 has joined #ruby
<j416> is there a setting to make ruby not stop on exceptions?
<j416> I want it to eat the exceptions (printing them to stdout) and continue without
tvw has joined #ruby
meatherly has joined #ruby
sassamo has joined #ruby
m1lt0n has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Remote host closed the connection]
alexherbo2 has joined #ruby
m1lt0n has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
bandsaw1961 has quit [Quit: Textual IRC Client: www.textualapp.com]
kitak_ has joined #ruby
sk87 has joined #ruby
m1lt0n has quit [Read error: Connection reset by peer]
jonno11 has joined #ruby
Xeago_ has quit [Remote host closed the connection]
Xeago has joined #ruby
<apeiros> j416: begin; …code which might raise…; rescue[ ExceptionClassToRescue[, ExceptionClassToRescue…]][ => capture_exception]; …code to deal with exception…; end
<apeiros> e.g.
browndawg has quit [Read error: Connection timed out]
<apeiros> >> x = 0; y = 1; begin; y/x; rescue ZeroDivisionError; puts "Division by zero!"; end
<eval-in> apeiros => Division by zero! ... (https://eval.in/102382)
mojjojo has quit [Quit: mojjojo]
sassamo has quit [Ping timeout: 252 seconds]
<apeiros> if you just want to rescue all exceptions, use plain rescue. it defaults to rescue StandardError.
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
tkuchiki has quit [Remote host closed the connection]
sparrovv has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
Xeago has quit [Ping timeout: 272 seconds]
browndawg has joined #ruby
predator117 has quit [Ping timeout: 265 seconds]
dawkirst has quit [Ping timeout: 245 seconds]
aesptux has quit [Remote host closed the connection]
vpretzel has joined #ruby
makara has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
dtcrshr has joined #ruby
m1lt0n has joined #ruby
browndawg has quit [Client Quit]
Hamburglr has quit [Ping timeout: 246 seconds]
timonv has quit [Remote host closed the connection]
root_empire has joined #ruby
sed_life_better has quit [Quit: Konversation terminated!]
Speed has joined #ruby
vpretzel has quit [Ping timeout: 245 seconds]
lele has quit [Ping timeout: 246 seconds]
michael_lee has quit [Ping timeout: 265 seconds]
<wuest> j416: As an opinionated caveat to apeiros's answer: don't do bare rescue; it's usually an anti-pattern. What are you doing that raises exceptions which are not otherwise meaningful to the flow of your code?
<apeiros> I'm actually of the same opinion as you wuest :)
<apeiros> be as specific in rescuing exceptions as possible
Zai00 has joined #ruby
<wuest> apeiros: I figured you were, just figured it deserved explicit mention ;)
<apeiros> you're right, I should have mentioned it
Hamburglr has joined #ruby
WillAmes has quit [Remote host closed the connection]
sparrovv has quit [Remote host closed the connection]
WillAmes has joined #ruby
<wuest> Good thing this is IRC! Lots of opinionated loudmouths^W^Whelpful people here
<apeiros> :D
shredding has joined #ruby
<popl> woo
m1lt0n has quit [Read error: Connection reset by peer]
yacks has quit [Ping timeout: 245 seconds]
kirun has joined #ruby
sdwrage has joined #ruby
cmoylan has joined #ruby
timonv has joined #ruby
lele has joined #ruby
dawkirst has joined #ruby
root_empire has quit [Max SendQ exceeded]
predator117 has joined #ruby
makara has joined #ruby
m1lt0n has joined #ruby
root_empire has joined #ruby
maximski has joined #ruby
dkamioka_ has joined #ruby
tgkokk has quit [Ping timeout: 264 seconds]
dkamioka has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
dh64 has quit [Ping timeout: 245 seconds]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
root_empire has quit [Max SendQ exceeded]
tacos1de has quit [Ping timeout: 240 seconds]
mojjojo has joined #ruby
AlSquire has joined #ruby
tacos1de has joined #ruby
Jdubs has quit [Remote host closed the connection]
root_empire has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
tjr9898 has joined #ruby
thomasxie has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasxie has joined #ruby
aesptux has joined #ruby
Speed has quit [Ping timeout: 260 seconds]
freezey has joined #ruby
Kricir has joined #ruby
yasushi has joined #ruby
relix has joined #ruby
relix has quit [Client Quit]
maroloccio has joined #ruby
mehlah has quit [Quit: Leaving...]
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
freezey has quit [Ping timeout: 265 seconds]
thomasxie has quit [Remote host closed the connection]
thomasxie has joined #ruby
TheLarkInn has joined #ruby
<TheLarkInn> so I'm needing to change the dependancy of my mail gem
thomasxie has quit [Remote host closed the connection]
<TheLarkInn> I went to the Gemfile, but every time I try bundle my app again it still requires the old dependancy even though I changed it in my gem lib
thomasxie has joined #ruby
mark_locklear has joined #ruby
thomasxie has quit [Read error: Connection reset by peer]
<wuest> TheLarkInn: the gem itself (or some other dep) may be pulling in the old dep
<pontiki> hey all
wald0 has joined #ruby
thomasxie has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<TheLarkInn> well thats the thing I don't believe I have the version anymore from what I can tell
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
jerius has joined #ruby
mojjojo has quit [Quit: mojjojo]
<TheLarkInn> Bundler could not find compatible versions for gem "mime-types":
<TheLarkInn> In snapshot (Gemfile.lock):
<TheLarkInn> mime-types (1.25.1)
<TheLarkInn> In Gemfile:
<TheLarkInn> mechanize (~> 2.7.3) ruby depends on
<TheLarkInn> mime-types (~> 2.0) ruby
browndawg has joined #ruby
asmodlol has quit [Remote host closed the connection]
browndawg has quit [Max SendQ exceeded]
jonno11 has joined #ruby
mehlah has joined #ruby
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
[krisbulman] is now known as krisbulman
<TheLarkInn> yeah I wonder how to get it to stop pulling from the old and rather pull the new
mehlah has quit [Client Quit]
vlad_starkov has quit [Remote host closed the connection]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<j416> apeiros, wuest: all due respect, you are not aware of my use case. :) so I take it that you don't know of a flag to make ruby not fatally quit on exception?
dblessing has joined #ruby
angusiguess has quit [Ping timeout: 245 seconds]
browndawg has joined #ruby
browndawg has quit [Max SendQ exceeded]
<apeiros> j416: there. is. no. flag. use begin/rescue.
<j416> (this is a test script to see what throws exceptions and not)
<apeiros> j416: and with all due respect, no use case warrants "ignore all raises"
maroloccio has quit [Quit: WeeChat 0.4.2]
<j416> ok. I'll wrap each call. thanks.
<tobiasvl> j416: what would that flag do? O_o
<TheLarkInn> ahh it was that silly Gemfile.lock
vlad_starkov has joined #ruby
maroloccio has joined #ruby
<j416> tobiasvl: make ruby eat the exceptions and continue as if nothing happened, i.e. implicit rescue
tgkokk has joined #ruby
<apeiros> tobiasvl: as I understand him, it'd suppress raising any exception
<tobiasvl> what that would do with the program flow…
<j416> you are too biased
<j416> :)
<wuest> j416: indeed, I didn't know your use case. That's why I asked what it was :)
<apeiros> s/biased/experienced/, thanks
chrisseaton has joined #ruby
mehlah has joined #ruby
<j416> apeiros: here's my use case: http://pastebin.com/CmMMGy7n
<j416> apeiros: (continuation of what you helped me with earlier)
<j416> I want those calls to public_method (line 73 and onwards) not to make subsequent calls not be done
<j416> I guess I'll just wrap each in a rescue
<apeiros> add an Object#try_send
<apeiros> which simply prints the exception and moves on
<j416> interesting, thanks
<apeiros> also you can omit the "puts 'M2.public_method'"
<apeiros> just move it into the method definition
<apeiros> puts "#{self.class.name} #{__method__}"
Butcho has joined #ruby
Xeago has joined #ruby
jonr22 has quit []
<apeiros> hm, though, that actually needs tweaking…
jonr22 has joined #ruby
<j416> :)
nszceta has joined #ruby
meatherly has joined #ruby
jonno11 has quit [Read error: Connection reset by peer]
relix has joined #ruby
jkamenik has joined #ruby
stryek has joined #ruby
fgo has quit [Remote host closed the connection]
sski has quit [Remote host closed the connection]
sassamo has joined #ruby
mojjojo has joined #ruby
sski has joined #ruby
Speed has joined #ruby
meatherly has quit [Ping timeout: 264 seconds]
<wuest> apeiros: Here's a slightly terser version of exactly what you've got:...
sparrovv has joined #ruby
<wuest> j416: not apeiros sorry :) http://pastebin.com/BT8Kawe0
tacos1de has quit [Write error: Broken pipe]
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wuest> (I'm assuming you're running on some flavor of Unix; if not you can remove the VT control sequences; I find them useful)
danshultz has joined #ruby
<apeiros> j416: btw., I'm not sure why you set up such a large test. the rules for private methods are really simple.
ndrei has quit [Ping timeout: 245 seconds]
<apeiros> 99% of the rule is: you can't call a private method with an explicit receiver (not even self). that's it.
sski has quit [Ping timeout: 260 seconds]
<apeiros> 99% because there's afaik 1 exception: methods ending in = can still be called with self as receiver.
mradmacher has quit [Ping timeout: 248 seconds]
<apeiros> depending on your view, the second exception is send/__send__ allowing you to call private/protected methods.
<wuest> apeiros: I didn't know that exception, myself. That's surprising.
<apeiros> wuest: it's because `foo = expr` is always an lvar assignment.
<apeiros> it'd be impossible to call a private writer otherwise.
<wuest> yeah, I can totally see how it happens.
phutch1ns has joined #ruby
<phutch1ns> morning
<wuest> I just rarely (never) had setters in private.
<apeiros> same
banister has joined #ruby
tacos1de has joined #ruby
<apeiros> hi there banister
sassamo has quit [Ping timeout: 245 seconds]
* apeiros pokes banister
<banister> sup apeiros
<j416> apeiros: because I'm learning
<apeiros> can you make `c = …` not trigger commands in pry?
pabloh has quit [Ping timeout: 260 seconds]
vlad_starkov has quit [Remote host closed the connection]
<apeiros> i.e., assigments
<apeiros> it already properly filters out method calls
<j416> wuest: I had a reason for keeping it simple. :)
vpretzel has joined #ruby
<banister> apeiros i think we had/have some code for that somewhere, but in the mean time you can use: Pry.config.command_prefix = "%" or something
stef_204 has joined #ruby
<banister> which forces commands to be invoked with a % prefix
<banister> that should prevent conflicts
Butcho has joined #ruby
tungd has joined #ruby
<apeiros> given that I rarely use any command besides ls, I might even do that
pabloh has joined #ruby
<banister> cool
meatherly has joined #ruby
<wuest> j416: Okay; just trying to help you stay dry :)
m1lt0n has quit [Quit: leaving]
TheLarkInn has left #ruby [#ruby]
<pontiki> sort of an umbrella service, wuest ?
<wuest> pontiki: absolutely.
bluenemo has joined #ruby
MrBy2 has quit [Quit: This computer has gone to sleep]
CorpusCallosum has quit [Ping timeout: 264 seconds]
vpretzel has quit [Ping timeout: 245 seconds]
<platzhirsch> So I build this gem that crawls a domain a builds a page graph consisting of pages, interlinks and static assets... now where I have build it, do you have any idea what it could be used for?
meatherly has quit [Remote host closed the connection]
<platzhirsch> besides playing around with the graph and giggling about its structure
meatherly has joined #ruby
mesamoo has joined #ruby
mesamoo has quit [Client Quit]
<j416> wuest: DRY is useless in one-time testing
<j416> might even be bad
mesamoo has joined #ruby
napalm_inside has joined #ruby
<j416> to reformulate: DRY usually makes the code slightly more complex, and when testing, complexity is an enemy
ppcsee has joined #ruby
<j416> that's how I see it, anyway
<j416> but thanks for your effort.
<j416> :)
<wuest> j416: any one-time test should be covered by documentation, and obviated. :)
tgkokk has quit [Ping timeout: 264 seconds]
trhodes has quit [Remote host closed the connection]
<j416> wuest: true. But when documentation lacks...
<j416> wuest: this is what I ended up with: http://pastebin.com/PNYy6u90
kevinykchan has joined #ruby
<j416> yes, it's very wet.
trhodes has joined #ruby
MatthewsFace has joined #ruby
<kapowaz> I've installed rbenv with homebrew on OS X 10.9, but when I try to install any gems, I get the permissions error that you'd expect if you were using system ruby
<kapowaz> You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.
<kapowaz> but `which gem` gives: /Users/bdarlow/.rbenv/shims/gem
<kapowaz> why would the rubygems executable from rbenv be trying to install gems in the global ruby directory?
zeeraw has joined #ruby
<kapowaz> any ideas?
lxsameer has quit [Quit: Leaving]
freezey has joined #ruby
wald0__ has joined #ruby
wald0_ has joined #ruby
<wuest> j416: seems reasonable. Does it help you understand the mechanics of private methods better? (That's what it looks like you're exploring)
makara has quit [Ping timeout: 260 seconds]
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<j416> wuest: yep, like a charm :)
<wuest> kapowaz: have you looked at ~/.gemrc yet? I don't know if OSX ships with one populated.
<j416> this made its output even clearer http://pastebin.com/AYmkX4Fp
MrBy2 has joined #ruby
<kapowaz> wuest: I need to set where rubygems installs in that?
<j416> wuest: I was trying to find what to use when making something like a namespace wrapper
<kapowaz> I'll check it out
<wuest> kapowaz: well, from my experience (rvm+linux) you don't. But you can override it, and if it's set to something global...
<wuest> Another potential culprit: /etc/gemrc
<j416> wuest: I concluded that a module with class methods is the best (ModuleWithClassSelf in that pastebin)
<j416> what apeiros suggested with module_function was good, but it prevented me from accesing private methods from within the class
freezey has quit [Ping timeout: 265 seconds]
ndrei has joined #ruby
tonni has quit [Remote host closed the connection]
<j416> perhaps there is a good way to solve that, not sure.
<apeiros> ?
kevinykchan has quit [Ping timeout: 260 seconds]
dx7 has joined #ruby
tonni has joined #ruby
<apeiros> j416: care to show the code?
<j416> apeiros: if you run the code I pastebin:ed, you'll see that ModuleWithModuleFunction.public_method fails
<j416> apeiros: my last pastebin ^
<j416> 3 minutes ag
<j416> ago*
Kricir has joined #ruby
JasmeetQA1 has quit [Quit: Leaving.]
<j416> yes
<j416> public methods of ModuleWithModuleFunction cannot access the private ones
<wuest> j416: making your module have a-priori knowledge of the class it's used in violates least knowledge, so be careful there.
enebo has joined #ruby
<j416> wuest: hm, what do you mean?
hamakn has quit [Remote host closed the connection]
<apeiros> j416: on a glance, that seems wrong… let me check
<j416> apeiros: if I can use module_function while still being able to access private methods (and keep them private) it'd be nice..
<apeiros> j416: ah, you call private_method from it
<wuest> Any piece of your code should have as little knowledge about the things which interface with it as possible. What you're describing (needing to be able to call private methods of arbitrary classes) sounds like a job for inheritence rather than modules.
<j416> apeiros: yeah
<pontiki> kapowaz: have you looked at what $HOME/.rbenv/shims/gem contains?
<apeiros> j416: which is not defined as a module_function
<j416> not sure of the mechanics
<apeiros> j416: only one of the modifiers public/private/protected/module_function works at any one time
meatherly has quit [Remote host closed the connection]
<apeiros> if you want to combine, you have to be explicit
<j416> I see
<wuest> pontiki: kapowaz sweet, someone with actual knowledge of rbenv! :D
plexus_ has joined #ruby
yfeldblum has joined #ruby
<kapowaz> pontiki: it's a script from the looks of things?
<pontiki> the rbenv shims are just that, shims. they are not the actual program
<pontiki> yes
<j416> apeiros: so I cannot easily group my set of private methods to be called from public methods of the same module?
<j416> (using this module_function)
MrBy2 has quit [Quit: This computer has gone to sleep]
<pontiki> it looks at your environment and calls the actual command
<kapowaz> pontiki: so it's still calling the system rubygems at the end of the day?
<apeiros> j416: I don't see where such a mix would make sense
MrBy2 has joined #ruby
<j416> apeiros: well, I want private methods not accessible from the outside
<apeiros> j416: I'd have to see a specific use case to tell you how I'd to it
helpa has quit [Read error: Operation timed out]
<wuest> j416: also be aware that idiomatic ruby uses public/private more to define programmer expectations re: interfaces. Nothing is truly private in ruby. (See: send/__send__)
helpa has joined #ruby
<apeiros> j416: yeah, that's the purpose of private. you don't have to explain *that* part :-p
skaflem has joined #ruby
<j416> wuest: true. My private methods aren't dangerous to call in any way, just... more of plumbing stuff
tonni has quit [Ping timeout: 272 seconds]
<apeiros> j416: but consider, a) instance methods of modules are only reachable through mixin (extend/include)
<j416> apeiros: well, you guys explain the obvious so I have to take my revenge somewhere :P
<apeiros> b) module_function's are already private
bwarkee_ has quit [Read error: Operation timed out]
sparrovv has quit [Remote host closed the connection]
gomix has quit [Ping timeout: 265 seconds]
<pontiki> kapowaz: try `rbenv which gem` to see what gem is actually being called
bwarkee has joined #ruby
<apeiros> for which reason mixing those things don't make an obvious sense. hence I ask for a specific use case where you'd want that mix.
<kapowaz> pontiki: /usr/bin/gem… wtf.
<pontiki> kapowaz: type `rbenv versions` to see what ruby versions you have available
<wuest> kapowaz: <grumbling about OSX packaging and user headaches here>
<kapowaz> * system (set by /Users/bdarlow/.rbenv/version)
<kapowaz> 1.9.3-p484
<kapowaz> ugh
<kapowaz> I thought I'd installed 2.0.0 myself
<kapowaz> obviously not
sski has joined #ruby
sambao21 has joined #ruby
devdazed has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
Speed has quit [Ping timeout: 260 seconds]
gigetoo has quit [Remote host closed the connection]
zachallett has joined #ruby
tolstoi has quit [Remote host closed the connection]
vpretzel has joined #ruby
karl___ has quit [Ping timeout: 245 seconds]
gigetoo has joined #ruby
himsin has quit [Quit: himsin]
gomix has joined #ruby
sski has quit [Ping timeout: 260 seconds]
tolstoi has joined #ruby
tolstoi has joined #ruby
tolstoi has quit [Changing host]
Butcho has joined #ruby
kpshek has joined #ruby
CAD has joined #ruby
<j416> apeiros: I have a module 'Storage' that handles storing and retrieving various kinds of data; it's got methods like read, write, delete, and also some extra things like fsck, exists?, and so on. These methods sometimes do similar operations but the end result differs, e.g. both read and read_all converts database rows into objects
CAD has quit [Client Quit]
LekeFly has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> j416: sounds odd to me that this would be a module…
ruby12345 has joined #ruby
<apeiros> but can't tell without actual code
<ruby12345> Are there any gotchas for FileTest.executable?
pu22l3r has joined #ruby
vlad_starkov has joined #ruby
<ruby12345> It's failing to detect a bash script
<j416> apeiros: you're thinking you'd implement it as an ORM-like thing using class methods to do the orming and instance methods for the actual data?
* j416 speculates
<ruby12345> that I cmod+x ed on
<apeiros> j416: I think I'd have methods like read/write/delete as instance methods. but again, without actual code, this is far too vague.
<ruby12345> It is correctly detecting a .rb file I did the same thing on
<apeiros> ruby12345: does it have a shebang?
<ruby12345> yes
<j416> apeiros: I'd gladly post you all of the code if it weren't for company rules saying that I can't share it, blergh
plexus_ has quit [Read error: Operation timed out]
<apeiros> too bad
<ruby12345> the bash script does, but the ruby script doesn't
<ruby12345> could the shebang be screwing it up?
cmoylan has quit [Ping timeout: 245 seconds]
<apeiros> ruby12345: I don't think so. the bash script can be actually run by plain ./scriptname ?
<j416> apeiros: but yes, instantiating it could make sense too
<ruby12345> yes
<ruby12345> cat something.bash
<j416> apeiros: anyway, I'll go with the module + class << self approach for now; hoping someone internal will comment on the design when this goes for review :)
<j416> apeiros: thanks a lot for your help!
<apeiros> yw
<ruby12345> #!/usr/bin/env bash
<ruby12345> echo hi
<ruby12345> #!/usr/bin/env bash
<ruby12345> #!/usr/bin/env bash
<ruby12345> echo hi
ruby12345 has quit [Killed (idoru (Spam is off topic on freenode.))]
jonno11 has joined #ruby
<apeiros> lol, what was that?
enebo has quit [Quit: enebo]
<j416> chewing gum on his fingers while trying to pastebin his .. bash script o_O
<j416> :D
ffranz has joined #ruby
angusigu1ss has joined #ruby
jonno11_ has joined #ruby
pu22l3r has quit [Ping timeout: 264 seconds]
<Takumo> Hi all, I've got a problem with my Rakefile
<Takumo> for some reason when I add an XML file I've created to builder to a zip with `sh %{zip -r package-#{version}.zip *}` the resulting entry in the zip file is 0B
devdazed has quit [Quit: Bye]
<canton7-mac> wait, is that 'sh' in backticks?
<canton7-mac> so you're calling out to 'sh' to execute your command, not calling Rake's 'sh' method?
<Takumo> I'm using rake's sh method
<canton7-mac> right, so the backticks aren't present in your Rakefile?
<Takumo> sorry the backticks are my markdown kicking in, I mean the part in the backticks is verbose
<canton7-mac> cool!
<Takumo> no they are not its just what's in the backticks
jonno11 has quit [Ping timeout: 260 seconds]
popl has quit [Ping timeout: 264 seconds]
<wuest> canton7-mac: you may cease your heart attack now ;)
<canton7-mac> heh
* canton7-mac likes the notion of people having control over a heart attack
devdazed has joined #ruby
<wuest> (I'm guilty too...)
<Takumo> I tell a lie though
<Takumo> the command is actually
angusigu1ss has quit [Ping timeout: 265 seconds]
aryaching_ has joined #ruby
<Takumo> sh %{zip -r #{package}-#{version}.zip *.zip package.xml}
MrBy3 has joined #ruby
<papito_> I got a node using nokogiri gem.. then i want to parse it with its subnodes calling .xpath .. but with //* it scans the full socument and without the //* and just saying xpath("h3")
MrBy2 has quit [Read error: Operation timed out]
kevinykchan has joined #ruby
krisbulman is now known as [krisbulman]
aryaching has quit [Ping timeout: 245 seconds]
Czupa has joined #ruby
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
[krisbulman] is now known as krisbulman
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
tonni has joined #ruby
xjiujiu has quit [Ping timeout: 252 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
tanema has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
joelroa has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
zigomir has quit [Remote host closed the connection]
Czupa has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
meatherly has joined #ruby
jonr22 has joined #ruby
shaunbaker has quit [Remote host closed the connection]
zigomir has joined #ruby
hamakn has joined #ruby
LiohAu has joined #ruby
<LiohAu> >> puts test["invalidkey"]
<eval-in> LiohAu => wrong number of arguments (0 for 2..3) (ArgumentError) ... (https://eval.in/102403)
pu22l3r has joined #ruby
pu22l3r has quit [Read error: Connection reset by peer]
tgkokk has joined #ruby
<LiohAu> >> puts test[invalidkey]
<eval-in> LiohAu => wrong number of arguments (0 for 2..3) (ArgumentError) ... (https://eval.in/102404)
pu22l3r has joined #ruby
<LiohAu> >> test = {"key" => "value" }
<eval-in> LiohAu => {"key"=>"value"} (https://eval.in/102405)
<LiohAu> puts test["key"]
<LiohAu> >> puts test["key"]
<LiohAu> hm how does this thing works :(
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherly has quit [Remote host closed the connection]
Butcho has quit [Quit: Textual IRC Client: www.textualapp.com]
<waxjar> it's a repl that doesn't remember anything
danijoo has quit [Remote host closed the connection]
<wuest> LiohAu: it's not stateful.
jonr22 has quit [Ping timeout: 272 seconds]
<apeiros> LiohAu: dude, use irb for experiments
<LiohAu> ok :(
meatherly has joined #ruby
<apeiros> instead of spamming the channel.
danijoo has joined #ruby
<waxjar> that particular thing didn't work because ruby has a #test, which expects 2 to 3 arguments
<apeiros> Kernel#test to be specific
<MindfulMonk> how can I avoid bundle exec(I'm using chruby)?
<LiohAu> well, if I want to retrieve a value associated associated with a specific key I just have to use : my_hash["key"] right ?
<apeiros> MindfulMonk: just don't use it?
kpshek has quit []
shaunbaker has joined #ruby
sassamo has joined #ruby
pabloh has quit [Quit: Saliendo]
<MindfulMonk> apeiros, I need to use the gems specified in Gemfile, so thats not an option
<LiohAu> but how do I check that "key" exists in the hash ?
<waxjar> you use the #key? method
<apeiros> MindfulMonk: that just means you have to install those gems
platzhirsch has quit [Ping timeout: 245 seconds]
shaunbak_ has joined #ruby
<apeiros> MindfulMonk: so that's not making that not an option.
<wuest> MindfulMonk: bundler can install. You can use version manager gemsets if you want environment isolation.
noop has quit [Ping timeout: 245 seconds]
<LiohAu> waxjar: it returns the value also?
<MindfulMonk> You have already activated rake 10.1.1, but your Gemfile requires rake 10.1.0. Prepending `bundle exec` to your command may solve this.
tylersmith has joined #ruby
<waxjar> it returns true or false
lmickh has joined #ruby
Czupa has joined #ruby
thomasxie has quit [Remote host closed the connection]
<LiohAu> ok that's not what I am looking for then :(
thomasxie has joined #ruby
meatherly has quit [Ping timeout: 245 seconds]
<LiohAu> waxjar: this is what I was looking for : "Hashes have a default value that is returned when accessing keys that do not exist in the hash. If no default is set nil is used"
kpshek has joined #ruby
<LiohAu> I did not wanted to call #key? and after using []
wald0__ has quit [Quit: Lost terminal]
wald0_ has quit [Quit: Lost terminal]
stef_204 has joined #ruby
Speed has joined #ruby
jkamenik has quit [Quit: Leaving.]
meatherly has joined #ruby
IceDragon has joined #ruby
shaunbaker has quit [Ping timeout: 272 seconds]
mradmacher has joined #ruby
enebo has joined #ruby
camt has joined #ruby
plotter has joined #ruby
seoNinjaWarrior has quit [Ping timeout: 252 seconds]
vagner4work_ has joined #ruby
v0n has joined #ruby
Xeago has quit [Remote host closed the connection]
sassamo has quit [Ping timeout: 265 seconds]
shaunbak_ has quit [Remote host closed the connection]
sparrovv has joined #ruby
chrisseaton has quit [Remote host closed the connection]
mradmacher has quit [Client Quit]
Ziarkaen has joined #ruby
vagner4work_ is now known as vagner4work
<jlebrech> don't know what's up with me today but i've got single responsibility principle in my head today, seeing code and going "more than one thing, rewrite"
joelbrewer has joined #ruby
Lewix has joined #ruby
Vivekananda has joined #ruby
shaunbaker has joined #ruby
thomasxie has quit [Remote host closed the connection]
<apeiros> focusify?
thomasxie has joined #ruby
angusigu1ss has joined #ruby
andy___ has joined #ruby
andy___ is now known as Guest1077
Xeago has joined #ruby
<jlebrech> apeiros: yeah, something just clicked today
krisbulman is now known as [krisbulman]
<jlebrech> we used form objects, and I just realised we needed setters instead
maximski has quit []
platzhirsch has joined #ruby
<Takumo> This is odd, from rake I'm calling sh %{zip -r #{package}-#{version}.zip *.zip package.xml} , but I get the line from zip with "adding package.xml (stored 0%)"
<Takumo> so in the zip package.xml is empty
toretore has joined #ruby
LBRapid has left #ruby [#ruby]
speakingcode has joined #ruby
angusigu1ss has quit [Ping timeout: 265 seconds]
joelroa has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Guest1077 has quit [Ping timeout: 245 seconds]
ppcsee has quit [Quit: Leaving]
vagner4work has quit [Quit: http://quassel-irc.org - Bate-papo confortável em qualquer lugar.]
prc has quit [Ping timeout: 272 seconds]
sdwrage has joined #ruby
vagner4work has joined #ruby
Es0teric has joined #ruby
snath has quit [Ping timeout: 252 seconds]
lukec has quit [Quit: lukec]
sski has joined #ruby
vagner4work has quit [Read error: Connection reset by peer]
maoko has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
speakingcode has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Remote host closed the connection]
_tpavel has quit [Quit: Leaving]
Salve has joined #ruby
tonni has quit [Ping timeout: 272 seconds]
vagner4work has joined #ruby
freezey has joined #ruby
sski has quit [Ping timeout: 245 seconds]
vagner4work has quit [Client Quit]
aryaching_ has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
vagner4work has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Salve has quit [Ping timeout: 264 seconds]
troessner has quit [Quit: Leaving]
mengu has quit []
sambao21 has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
Solnse has joined #ruby
mojjojo has quit [Quit: mojjojo]
Sawbones has joined #ruby
andy__ has joined #ruby
tonni has joined #ruby
geggam has joined #ruby
pasties has left #ruby ["Leaving"]
tesuji has quit [Ping timeout: 265 seconds]
<apeiros> hrm, I think I'm inconsistent in using terminating punctuation in exceptions :-/
Sawbones has quit [Read error: Connection reset by peer]
tjr9898 has quit [Remote host closed the connection]
Sawbones has joined #ruby
claymore has quit [Ping timeout: 260 seconds]
zachallett has quit [Remote host closed the connection]
<wuest> apeiros: eh?
<apeiros> raise "You fucked up!"
<apeiros> vs. raise "You fucked up"
<apeiros> or actually more like: raise "something went wrong." vs. raise "something went wrong"
<wuest> Ah, fair enough.
angusigu1ss has joined #ruby
<wuest> I've moved from being terse to being pretty verbose in raise messages. My assumption is that the Exception class is for the dev, the message is for the poor user who is using software the dev didn't handle the error in.
zachallett has joined #ruby
claymore has joined #ruby
<certainty> wuest: theory actually identifies 3 roles that you need to adress with your errors. 1) end-user 2) developer 3) admin
[krisbulman] is now known as krisbulman
<apeiros> 4) yourself
<certainty> which most likely is 2
<toretore> error != exception
<apeiros> in my case, it almost likely is 5) idiot :)
<apeiros> (aka, "watchadoingagain?!?")
cmoylan_ has joined #ruby
angusigu1ss has quit [Ping timeout: 245 seconds]
<apeiros> certainty: I wasn't being entirely serious. just in case that hasn't become obvious by my last comment :o)
Sawbones has quit [Remote host closed the connection]
JasmeetQA has joined #ruby
<apeiros> I'd actually like it if there was Kernel#assert
mojjojo has joined #ruby
rayners has joined #ruby
<apeiros> and Kernel#unreachable (which would just be an assert with a specific message)
tjr9898 has joined #ruby
vvitek_ has joined #ruby
<certainty> apeiros: i have figured that out in the meantime. It wasn't obvious from the very beginning to me :)
vvitek_ has quit [Remote host closed the connection]
baordog has joined #ruby
<LiohAu> I have a "case" on a string variable with multiple "when" instructions in which I am always doing the same thing, calling a method that is named like the string I am doing my "case" on. Can I dynamically call the method with its name in a var ?
<LiohAu> something like : "method"() ?
<apeiros> LiohAu: send
froy has quit [Ping timeout: 245 seconds]
<apeiros> LiohAu: i.e., just check against a whitelist (see Set class) and then use send.
Lewix has quit [Remote host closed the connection]
<apeiros> Object#send for the docs.
bogeyd6 has joined #ruby
<certainty> toretore: true. In ruby all errors are exceptions, but not all exceptions are errors
<toretore> not if it's thrown :P
axl_ has joined #ruby
* apeiros raises Astink
vlad_starkov has quit [Read error: Connection reset by peer]
<apeiros> fuck, camelcase sucks for multiword-single-letter things
thomasxie has quit [Quit: Leaving.]
<toretore> i object to the notion that can't assume the developer using your code isn't responsible for presenting the error to the end user
<maasha> Hm eval "50 > 220.5 && 50 < (478 - 50)" => false ?
JasmeetQA1 has joined #ruby
mansi has joined #ruby
Advocation has joined #ruby
maximski has joined #ruby
JasmeetQA has quit [Ping timeout: 265 seconds]
<maasha> eval don't do parans?
vlad_starkov has joined #ruby
<LiohAu> apeiros: I'm trying to understand the syntax.
aryaching has joined #ruby
<certainty> maasha: since when is 50 > 220.5?
<toretore> 50 > 220.5 #=> false
<LiohAu> I don't see what is dynamic in the method name here : k.send :hello, "gentle", "readers"
Speed has left #ruby ["WeeChat 0.4.3"]
<toretore> hello = :hello
<toretore> k.send hello
<wuest> certainty: good point, indeed :)
<wuest> (For things I write, 1 and 3 comprise something of an isomorphism)
<apeiros> LiohAu: there's no new syntax
<apeiros> LiohAu: Object#send is a normal method
<certainty> wuest: alright
<LiohAu> apeiros: the whole ruby syntax is new to my eyes
<apeiros> LiohAu: it takes the method to call as the first argument. either as a string or as a symbol.
<maasha> certainty: aharmnevermind :o/
<apeiros> LiohAu: ok, still. it's just a normal method call. no specific syntax for this.
nszceta has quit [Ping timeout: 260 seconds]
<LiohAu> the documentation is not really newbie oriented, the sample could use the string, but they used the symbol, which is something that does not exists in a lot of other languages :(
enebo has quit [Quit: enebo]
tgkokk has quit [Quit: WeeChat 0.4.4-dev]
<apeiros> LiohAu: that's making assumptions
<toretore> the documentation assumes that you understand the syntax
shawnjgoff has joined #ruby
tonni has quit [Ping timeout: 260 seconds]
<apeiros> and that
MrJoshua has quit [Ping timeout: 246 seconds]
<toretore> it's not a language specification, it documents classes, modules and methods
<apeiros> ruby has very little syntax to learn.
<LiohAu> apeiros: I'm completely thinking the opposite ^^
<apeiros> learning the literals gets you to ~60% of all syntax already
tgkokk has joined #ruby
<apeiros> LiohAu: where are you coming from? obviously not lisp…
rubyracer has joined #ruby
Hobogrammer has quit [Ping timeout: 245 seconds]
<toretore> would support the too much syntax argument
<apeiros> toretore: yes, but it has symbols
MrJoshua has joined #ruby
jprovazn has quit [Quit: Leaving]
<shawnjgoff> Is there a gem that does the opposite of chronic? For instance, I have a date object, and I want to ask it for a rough time phrase like "one year ago" or "three weeks ago".
<certainty> apeiros: wouldn't it make sense that he actually comes from lisp, if he thinks that ruby has much syntax?
DrShoggoth has joined #ruby
<toretore> apeiros: but they're not 1-1 comparable with ruby symbols
kevinykchan has quit [Quit: Computer has gone to sleep.]
<LiohAu> apeiros: not lisp, I made C, C++, Objective-C (which has a weird syntax also), C#, PHP (and all the web things that comes with it), but no ruby :(
<certainty> ok i'm late to the party
<apeiros> shawnjgoff: take a look at activesupport
MrJoshua has quit [Remote host closed the connection]
<shawnjgoff> apeiros, Yeah, I looked at the Duration, it doesn't have anything like that.
tgkokk has quit [Client Quit]
<apeiros> LiohAu: I'd argue all of those have more syntax than ruby
tanema has quit [Remote host closed the connection]
MrJoshua has joined #ruby
tanema has joined #ruby
<apeiros> fuck, merging a moved file with a modified file is harsh :-S
<LiohAu> yes but except obj-c, they are all sharing the "public int someMethod() { for (int i = 0; i < 10; i++) { printf(".."); } return 1; }" basic syntax
<Sou|cutter> apeiros: that's where most of my merging mistakes happen
<apeiros> Sou|cutter: got a strategy? i.e., can you somehow tell git that the file moved and it should consider it the same?
<apeiros> I'm considering throwing away the current state, move the file here, then merge…
<shawnjgoff> apieros, move the file (and fix requires in other files) in one commit, edit it in another.
* Sou|cutter nods to shawnjgoff
<Sou|cutter> it tends not to be the way the commits fall naturally, but it helps
sparrovv has quit [Read error: Connection reset by peer]
<LiohAu> apeiros: is the "*args" mandatory with send ?
<LiohAu> I mean, can't I have multiple arguments in the method prototype ?
tanema has quit [Ping timeout: 245 seconds]
<certainty> LiohAu: you can
sparrovv has joined #ruby
<apeiros> LiohAu: not required, no
<toretore> LiohAu: sounds like you're ahead of yourself. you should learn more before you try using something you don't understand
sputnik13 has quit [Quit: Textual IRC Client: www.textualapp.com]
<apeiros> LiohAu: it's just a way to say "I just send all arguments I got"
<apeiros> LiohAu: also there are no prototypes in ruby.
kevind has joined #ruby
<certainty> bbl
* certainty &
<LiohAu> well how do you call the prototype thing then?
srji_ has quit [Quit: leaving]
axsuul has quit [Ping timeout: 265 seconds]
chrisseaton has joined #ruby
<apeiros> LiohAu: args = [1,2,3]; foo(*args) # is equivalent to: foo(1,2,3)
<apeiros> LiohAu: *what* prototype thing? there is none.
srji has joined #ruby
<apeiros> i.e., what do you consider a prototype in ruby?
<LiohAu> the "def some_method(expected_arg1, expected_arg2)" << this is what I call prototype
kpshek has quit []
<apeiros> LiohAu: that's a syntax error
rippa has joined #ruby
<LiohAu> end
<apeiros> LiohAu: aka incomplete method definition.
<LiohAu> D
<apeiros> with the end it's a method definition.
<LiohAu> (the "D" was a keyboard mistake ^^)
platzhirsch has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 245 seconds]
kpshek has joined #ruby
sparrovv has quit [Remote host closed the connection]
thomasvs has joined #ruby
thomasvs has quit [Changing host]
thomasvs has joined #ruby
jbueza has joined #ruby
lurch_ has quit [Quit: lurch_]
sobering has joined #ruby
<LiohAu> so If I correctly understand the "send" method transform all its passed arguments (in the following example, "gentle" and "readers" : k.send :hello, "gentle", "readers" ), to only one array argument (*args in the example "def hello(*args) end" ) right ?
Al___ has joined #ruby
<apeiros> send does no transformation
kirun_ has joined #ruby
<apeiros> send(:foo, 1, 2, 3) calls foo(1,2,3)
<sobering> Hey guys. I've got a question regarding OAuth. I have this short bit of Ruby code to obtain an access token for the Discogs API: https://gist.github.com/sobering/9029493 I can make unauthorized requests perfectly fine but any time I make a request that requires authorization I get a 401 Unauthorized. Guaranteed something is wrong with my code but I've been stuck on this for like three days now. I can't seem to find anything that
<apeiros> but a common use-case for send is delegation. so instead of: def blorg(a,b,c,d,e); @receiver.send(:delegated_blorg, a,b,c,d,e); end
bal has quit [Quit: bal]
monkegji_ has joined #ruby
aaronmcadam has joined #ruby
<apeiros> you just do: def blorg(*args); @receiver.send(:delegated_blorg, *args); end
mikepack has joined #ruby
<apeiros> i.e., "just pass on all arguments you received"
Salve has joined #ruby
<LiohAu> Oh *args is a special thing like the var args ?
shredding has quit [Quit: shredding]
kirun has quit [Ping timeout: 260 seconds]
<LiohAu> ok that's the "*" which is a special operator (I just read it)
<canton7-mac> called the splat operator, if you want to googl eit
<LiohAu> canton7-mac: thx for the name
<apeiros> LiohAu: errr, yes, I just explained it to you like 5 messages ago…
<apeiros> 17:03 apeiros: LiohAu: args = [1,2,3]; foo(*args) # is equivalent to: foo(1,2,3)
Cache_Money has joined #ruby
<LiohAu> apeiros: my brain needs time xD
quatron has joined #ruby
<apeiros> in a method def it "sucks up" all the rest of the passed args. when calling, it "expands" (or "splats") all items of an array into separate arguments.
<apeiros> works with assignments the same. method def is like left hand side (lhs), method call like right hand side (rhs) of the assignment:
<apeiros> >> a,b,*c = 1,2,3,4,5,6; c
<eval-in> apeiros => [3, 4, 5, 6] (https://eval.in/102446)
Al___ has quit [Read error: Connection reset by peer]
<certainty> >> x = *1; x
<eval-in> certainty => [1] (https://eval.in/102447)
<certainty> also ^
<apeiros> >> a,b,c,d,e = 1,2,3,*[4,5]; e
<LiohAu> apeiros: ok I see
<eval-in> apeiros => 5 (https://eval.in/102448)
Al___ has joined #ruby
tylersmith has quit [Remote host closed the connection]
echevemaster has joined #ruby
olivier_bK has quit [Remote host closed the connection]
shredding has joined #ruby
ace_striker has joined #ruby
teenwolf has quit [Quit: Leaving...]
ace_striker is now known as Guest92375
Davey has quit [Quit: ZNC - http://znc.in]
DaniG2k has joined #ruby
<DaniG2k> anyone wanna help me write a text summarizer :P
<DaniG2k> jsut in case you're bored out of yoru minds
pipework has quit [Quit: Connection closed for inactivity]
thomasvs has quit [Read error: Operation timed out]
ndrei has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
m00nlight has quit [Quit: Konversation terminated!]
<apeiros> DaniG2k: def summarize(text); "Blablabla"; end
<apeiros> hth
jobewan has joined #ruby
olivier_bK has joined #ruby
tgkokk has joined #ruby
<DaniG2k> lol
<certainty> def summarize(text); "Summary: Blablabla"; end
sambao21 has quit [Quit: Computer has gone to sleep.]
<certainty> i fixed a little bug
yasushi has quit [Remote host closed the connection]
<DaniG2k> def summarize(text); ""; end
<shawnjgoff> Found a couple chronic opposites that I looking for: https://github.com/krainboltgreene/time-lord and https://github.com/jgraichen/rails-timeago
mr_red has quit [Remote host closed the connection]
olivier_bK has quit [Remote host closed the connection]
mr_red has joined #ruby
yfeldblum has joined #ruby
thesheff17_ has joined #ruby
freezey has quit [Remote host closed the connection]
karl___ has joined #ruby
<certainty> >> def summarize(t); "Summary: " << t.split("\n").map{ |l| l.split(/\s+/)[0,4] }.join(" "); end; summarize("Mary had a little lamb,\nwhose fleece was white as snow.\n\nAnd everywhere that Mary went,\nthe lamb was sure to go.")
<eval-in> certainty => "Summary: Mary had a little whose fleece was white And everywhere that Mary the lamb was sure" (https://eval.in/102451)
<certainty> there you go
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<apeiros> certainty, DaniG2k: use gist?
<LiohAu> is this syntax recommended : "for step_index in 0..steps_count" ?
thesheff17 has quit [Ping timeout: 245 seconds]
<apeiros> LiohAu: no
olivier_bK has joined #ruby
sambao21 has joined #ruby
<certainty> apeiros: yeah that was not serious. Also it doesn't work :)
<LiohAu> I should use each instead?
<apeiros> a) (0..steps_count).each do …
<apeiros> b) 0.upto(steps_count) do …
<apeiros> c) if you didn't actually intend on reaching steps_count and only want to iterate steps_count times: steps_count.times do …
<LiohAu> in all these examples, if steps_count is a method, is it called only one time ?
freezey has joined #ruby
arctaruz has left #ruby ["Leaving"]
<apeiros> re c): `for step_index in 0..steps_count` will iterate steps_count+1 times
<apeiros> LiohAu: yes
<apeiros> same as with for/in
<DaniG2k> what's wrong with people nowadays -_- no decent summarizing gems?? pff...
<DaniG2k> it's 2014
<apeiros> DaniG2k: ruby-toolbox ?
<DaniG2k> I was expecting flying cars
<DaniG2k> and summarizing tools
Cache_Money has quit [Quit: Cache_Money]
<DaniG2k> but alas I've been let down once again
yfeldblum has quit [Ping timeout: 265 seconds]
<DaniG2k> thank you, world
karl___ has quit [Ping timeout: 252 seconds]
tungd has quit [Ping timeout: 252 seconds]
LBRapid has joined #ruby
root_empire has quit [Ping timeout: 245 seconds]
<apeiros> you don't have a flying car?
<DaniG2k> never got one :\
IceDragon has quit [Read error: Connection reset by peer]
Sleepee has joined #ruby
Macaveli has quit [Ping timeout: 245 seconds]
<certainty> LiohAu: the for-loop has weired behavior. Don't use it, as apeiros already said
monkegji_ has quit [Remote host closed the connection]
<apeiros> certainty: it has weird behavior?
<LiohAu> yes, this is weird the +1 thing
sassamo has joined #ruby
<apeiros> LiohAu: that's not due to for/in, that's because you use an end-including range
<certainty> apeiros: yeah it has. At least it's weired to me
<apeiros> LiohAu: but that sounds like you really want c), steps_count.times
sethen has joined #ruby
hrrz has joined #ruby
<hrrz> does anybody can recommend a way of extracting keywords out of text articles?
<LiohAu> apeiros: this is the one I used to replace my "for", yes
<hrrz> keywords == wikipedia entities
tanema has joined #ruby
<AlexRussia> hm, how to chack variable to define?
<AlexRussia> check*
<apeiros> hrrz: you may want to team up with DaniG2k, you seem to have similar goals…
heftig has quit [Quit: Quitting]
brunto_ is now known as brunto
brunto has quit [Changing host]
brunto has joined #ruby
<apeiros> hrrz: hm, you mean you don't actually want to extract, you just want to check which wikipedia article titles are in a text?
IceDragon has joined #ruby
<hrrz> yes
<apeiros> use Array#& (intersection)
Al___ has quit [Read error: Connection reset by peer]
<apeiros> wikipedia_titles & text_to_words(text)
Al___ has joined #ruby
<apeiros> where text_to_words is a method you'd have to write. shouldn't be too difficult.
<hrrz> That's the easiest way?
<apeiros> something like scan(/\p{Word}{2,}/) would probably do it
<certainty> >> for i in [1,2]; end; i
<eval-in> certainty => 2 (https://eval.in/102457)
keen__ has quit [Read error: Connection reset by peer]
<certainty> apeiros: ^
<certainty> weired
<hrrz> I mean, I thought of that but it seemed too trivial when there's NLP etc for this
<apeiros> certainty: why? for/in doesn't have its own scope, so it assigns to i
<apeiros> and your last iteration sets it to the last array element, which is 2…
keen__ has joined #ruby
<apeiros> hrrz: well, if you want it complicated, you can use stemming and such
<certainty> apeiros: yeah, i would expect that for creates a scope
sassamo has quit [Ping timeout: 265 seconds]
<apeiros> certainty: why?
<hrrz> apeiros: and how do i parse "linear algebra" as "linear algebra" and not "linear", "algebra"
<certainty> apeiros: because it's a sane way to do it?
<apeiros> it's no different than e.g. if/else, case/when, begin/end etc.
TMM has quit [Quit: Ex-Chat]
<apeiros> certainty: not really. would you want the above to introduce their own scope too?
<hrrz> basically I want to imitate http://dbpedia-spotlight.github.io/demo/
<apeiros> hrrz: ah, that's a good point
dangerousdave has joined #ruby
alexherbo2 has quit [Quit: WeeChat 0.4.2]
thesheff17_ is now known as thesheff17
<apeiros> hrrz: well then, you could do a kind prefix search. question is what variant yields acceptable performance.
<AlexRussia> >> print k
<eval-in> AlexRussia => undefined local variable or method `k' for main:Object (NameError) ... (https://eval.in/102460)
Al___ has quit [Client Quit]
alexherbo2 has joined #ruby
<AlexRussia> how to fix it?
<apeiros> AlexRussia: fix what?
<AlexRussia> apeiros: this error
<apeiros> o0
<AlexRussia> apeiros: really
<apeiros> you seriously don't know whether you assigned to a local variable or not?
<certainty> apeiros: that's different. for is a means of iteration, as is each. It's surprising that both behave differently. I know that the latter uses block which do have their own scope and don't mess with the surrounding scope
<AlexRussia> apeiros: need in patter used variable, but i dont have send variable in every patter calls
<certainty> at least in ruby > 1.8.x
<AlexRussia> s/patter/template/
angusiguess has joined #ruby
geggam has quit [Remote host closed the connection]
<apeiros> oh dear
<AlexRussia> pattern*
bluenemo has quit [Remote host closed the connection]
<apeiros> why are template engines so broken…
<AlexRussia> apeiros: yep, idk, defined variable or no
<apeiros> defined?(k)
<apeiros> utter antipattern
<apeiros> not just a code smell. it's a code stink.
<apeiros> a code hazard.
lukec has joined #ruby
<AlexRussia> >> defined?(k)
<eval-in> AlexRussia => nil (https://eval.in/102464)
<AlexRussia> lol
earthquake has joined #ruby
<AlexRussia> diffrent results
<AlexRussia> in irb is say local variable
<AlexRussia> ah
<AlexRussia> is used name ;)
<AlexRussia> apeiros: thanks
<AlexRussia> apeiros: it work
aaronmcadam has quit [Quit: Leaving...]
geggam has joined #ruby
<AlexRussia> apeiros: why is bad?
razrunelord has joined #ruby
<apeiros> because not knowing whether a local variable is defined or not is pretty fucked up.
aaronmcadam has joined #ruby
<hrrz> apeiros: then any recommendation on how to start? perhaps you're familiar with other open source project that are related?
angusiguess has quit [Ping timeout: 252 seconds]
tagrudev has quit [Remote host closed the connection]
tanema has quit [Remote host closed the connection]
nomenkun_ has quit [Ping timeout: 260 seconds]
evilbug has joined #ruby
tanema has joined #ruby
snath has joined #ruby
DrShoggoth has quit [Quit: Leaving]
ahawkins has quit [Remote host closed the connection]
zachallett has quit [Remote host closed the connection]
Guest92375 has quit [Quit: Page closed]
Ziarkaen has quit [Ping timeout: 260 seconds]
<apeiros> hrrz: that dbpedia thing not open source?
monkegji_ has joined #ruby
<AlexRussia> apeiros: hm, yep
kpshek has quit []
vlad_starkov has joined #ruby
<hrrz> apeiros: it is but it's huge, thought maybe u knew smaller project
<apeiros> nope, sorry
tanema has quit [Ping timeout: 260 seconds]
aniM has joined #ruby
andikr has quit [Remote host closed the connection]
<hrrz> k thx
hrrz has quit [Quit: hrrz]
aspires has joined #ruby
shaunbaker has quit [Remote host closed the connection]
napalm_inside has quit []
OdNairy has joined #ruby
sassamo has joined #ruby
vlad_starkov has quit [Ping timeout: 260 seconds]
banister has joined #ruby
animehti has quit [Ping timeout: 245 seconds]
aaronmcadam has quit [Quit: Leaving...]
freezey has quit [Remote host closed the connection]
hobodave has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
jonah_k has joined #ruby
Lewix has joined #ruby
kevind_ has joined #ruby
axsuul has joined #ruby
alex88 has quit [Quit: Leaving...]
claymore has quit [Ping timeout: 272 seconds]
<apeiros> what's the umbrella term for characters in [A-Z0-9]? letter? or is letter only [A-Z]?
axsuul has quit [Excess Flood]
hobodave has joined #ruby
<certainty> apeiros: alphanumeric?
<apeiros> "first and second alphanumeric" in a documentation sounds odd :-/
* certainty needs to lookup the term umbrella term
ppcsee has joined #ruby
<apeiros> certainty: lion, horse, dog are animals. animal is an umbrella term in that context.
dkamioka_ has quit [Ping timeout: 245 seconds]
<certainty> apeiros: alright. Then I got it about right
kevind has quit [Ping timeout: 272 seconds]
kevind_ is now known as kevind
yarou has joined #ruby
monkegji_ has quit [Remote host closed the connection]
<canton7-mac> apeiros, alphanumeric character?
<canton7-mac> depends on how pedantic you want to be...
<apeiros> :-S
claymore has joined #ruby
<apeiros> soooo loooong
kpshek has joined #ruby
<apeiros> I'll not be pedantic and just call it letter.
havenwood has joined #ruby
Squarepy has quit [Quit: Leaving]
<certainty> letter or digit
sambao21 has quit [Quit: Computer has gone to sleep.]
<apeiros> hm, actually digit is a fit
ppcsee has left #ruby ["Leaving"]
<apeiros> it's technically a number. even if it uses alphanumeric characters
dkamioka has joined #ruby
<apeiros> I mean in 0xff, f is a digit too…
bbloom has joined #ruby
<certainty> i'd say no, but my english sucks
tgkokk has quit [Ping timeout: 265 seconds]
<certainty> f is a character, the fact that it can be interpreted as a hex number is an entirely other thing, no?
Sc0rp10n has joined #ruby
Wolland has joined #ruby
tanema has joined #ruby
rubyracer has quit [Quit: Konversation terminated!]
sambao21 has joined #ruby
tanema has quit [Remote host closed the connection]
LadyRainicorn has joined #ruby
jzig has quit [Remote host closed the connection]
tanema has joined #ruby
meatherly has quit [Remote host closed the connection]
monkegji_ has joined #ruby
Sleepee has quit [Quit: Leaving]
jzig has joined #ruby
<apeiros> certainty: IMO digit in the mathematical sense just means "a character representing a numerical value"
<apeiros> which is not limited to 0-9
zigomir has quit [Remote host closed the connection]
<apeiros> but "character" would actually be a suitable term too…
Wolland has quit [Remote host closed the connection]
MrBy3 has quit [Ping timeout: 272 seconds]
sdwrage has quit [Quit: This computer has gone to sleep]
kennym has quit [Read error: Connection reset by peer]
kennym_ has joined #ruby
<banister> apeiros i might be going to swizterland with my B. for a hiking holiday, do u recommend any places ?
DaniG2k has quit [Quit: leaving]
kevinykchan has joined #ruby
kennym_ is now known as kennym
kennym has quit [Changing host]
kennym has joined #ruby
sdwrage has joined #ruby
<apeiros> banister: all of switzerland is nice! :D no idea for biking :-(
<banister> apeiros hiking bb
figgleberry has joined #ruby
<apeiros> oh, *H*iking
tanema has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
aganov has quit [Quit: Leaving]
<certainty> apeiros: whitespaces are characters too? Maybe just mention the valid alphabet?
xcv has joined #ruby
<apeiros> still most of switzerland. I'd particularly recommend Graubünden. Depends a bit on your prefs.
jzig has quit [Ping timeout: 265 seconds]
sobering has quit [Quit: leaving]
<apeiros> certainty: na, the valid alphabet is implied in the context. and/or can be looked up elsewhere easily.
<certainty> alright
aryaching has quit [Read error: Connection reset by peer]
<shevy> got a question
<shevy> say we have a module called Foo
<shevy> but it may not be available all the time
<shevy> how to best check whether it is available?
<certainty> apeiros: see that? ;) ^
m8 has joined #ruby
<apeiros> certainty: yes. shevy gives me shivers all the time.
<apeiros> shevy: wtf are you doing again?
<shevy> conditional includes
Hobogrammer has joined #ruby
<apeiros> Object.const_defined?(:Foo)
<kennym> shevy: Required::Module::const_get "ModuleName" maybe?
<shevy> hmm
freezey has joined #ruby
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
<kennym> sorry, forget what I wrote
aniM has quit [Ping timeout: 245 seconds]
<shevy> it must be namespaced as part of Object?
aryaching has joined #ruby
ghr has quit [Quit: Computer has gone to sleep.]
<certainty> >> module Foo; module Bar; end; end; [Object.const_defined?(:Bar),Foo.const_defined?(:Bar)]
<eval-in> certainty => [false, true] (https://eval.in/102470)
jobewan has quit [Quit: Leaving]
drocsid has quit [Quit: Lost terminal]
monkegji_ has quit [Remote host closed the connection]
shaunbaker has joined #ruby
figgleberry has quit [Ping timeout: 245 seconds]
shaunbak_ has joined #ruby
<apeiros> WTF?
<apeiros> >> "hägar".encode(Encoding::BINARY)
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<eval-in> apeiros => U+00E4 from UTF-8 to ASCII-8BIT (Encoding::UndefinedConversionError) ... (https://eval.in/102471)
dev__ has joined #ruby
<apeiros> >> "hägar".b
<eval-in> apeiros => "h\xC3\xA4gar" (https://eval.in/102472)
leonidlm has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
<apeiros> ah, stupid me
<apeiros> I want force_encoding
tanema has joined #ruby
_dev__ has quit [Ping timeout: 265 seconds]
AlSquire has quit [Quit: This computer has gone to sleep]
oracal has quit [Quit: Leaving]
axl_ has quit [Quit: axl_]
deadlock has joined #ruby
<certainty> woa, i just realized that IO is an enumerable which means I can make it .lazy. Does it work as expected?
oracal has joined #ruby
shaunbaker has quit [Ping timeout: 245 seconds]
aniM has joined #ruby
LekeFly has joined #ruby
<toretore> how is it not lazy by default?
oracal has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<toretore> f=File.open('file', 'r') #nothing happens; f.each{|line| } #file is read
jonah_k has quit [Remote host closed the connection]
aryaching has quit []
vlad_starkov has quit [Ping timeout: 252 seconds]
<apeiros> I think it is lazy in the way you expect it
aryaching has joined #ruby
<apeiros> it always did what you describe in your last message
<apeiros> also f.each will only read one line at a time
<apeiros> but chaining e.g. f.map { }.select { } # will read the whole file into an array
zachallett has joined #ruby
greenarrow has quit [Quit: 500]
figgleberry has joined #ruby
<toretore> ah yes
timonv has quit [Remote host closed the connection]
<toretore> i don't know if "lazy" is defined by Enumerable or by the host class
yfeldblum has quit [Ping timeout: 252 seconds]
<toretore> Enumerable wouldn't know how to make File lazy
xcv has quit [Remote host closed the connection]
<banister> toretore just needs an #each i think
<certainty> yeah i was talking about examples combining operations
kindjal has joined #ruby
aryaching has quit []
<certainty> i just played around alittle. Looks good
sambao21 has quit [Quit: Computer has gone to sleep.]
mikecmpbll has quit [Read error: Operation timed out]
obs_ has quit [Quit: Konversation terminated!]
<toretore> i would think that if all you assume is an each method, it would be lazy by default
<toretore> as the lazyness if determined by the class that implements it
<shevy> this channel has become lazy
gbt has quit [Quit: Leaving...]
andy__ has quit [Remote host closed the connection]
shaunbak_ has quit [Remote host closed the connection]
<toretore> but i don't know what Enum::Lazy actually does different
nvrch has quit [Quit: nvrch]
andy__ has joined #ruby
Vivekananda has quit [Quit: Ex-Chat]
<banister> toretore do you know what's meant by laziness as we're discussing it?
<toretore> nope
<toretore> well, yes
<banister> toretore then stfu ;)
<banister> toretore hehe, we're talking about the #lazy method, that provides lazy versions of map/select/etc
<toretore> i could well be talking nonsense here, that's true
<banister> toretore it's a ruby 2.0 thing
<apeiros> toretore: f.lazy.map { … } returns an Enumerator::Lazy
aryaching has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<toretore> i understand that, but what does "lazy versions of map/select/etc" mean?
<apeiros> toretore: and I think Enumerable provides lazy. as banister said, all it needs is .each
sambao21 has joined #ruby
<apeiros> it means that it doesn't return an array.
<toretore> how does Enum::Lazy make it lazy
<apeiros> which means f.lazy.map { }.select { } will not read the whole file into an array
<certainty> toretore: it returns rather some kind of promise to give you something from that array once you need it
<toretore> i still don't see what it does differently
dkamioka has quit [Remote host closed the connection]
<havenwood> toretore: 1.upto(Float::INFINITY).map(&:even?).take(1) # <- takes forever to get just one
<apeiros> it makes it lazy by not requiring the full output as the return value of the method
<apeiros> so the select can request each line mapped separately
<apeiros> instead of drawing from a fully populated array.
yarou has quit [Remote host closed the connection]
<toretore> ok, now you're making sense
thesheff17 has quit [Ping timeout: 245 seconds]
<havenwood> toretore: 1.upto(Float::INFINITY).lazy.map(&:even?).take(1) # doesn't take forever
andy__ has quit [Ping timeout: 252 seconds]
<apeiros> so assuming f.lines.size # => 1_000_000, and f.map { … }.select { … }.size # => 100, the difference will be that without .lazy, you'll have a 1 million lines big array
bbloom has quit [Ping timeout: 260 seconds]
<apeiros> while with lazy, you'll not have that
<apeiros> your largest array will be 100 items
jonah_k has joined #ruby
<banister> toretore havenwood gave u a great example
<banister> >> 1.upto(Float::INFINITY).lazy.map(&:even?).take(10)
<eval-in> banister => #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator::Lazy: #<Enumerator: 1:upto(Infinity)>>:map>:take(10)> (https://eval.in/102473)
<banister> >> 1.upto(Float::INFINITY).lazy.map(&:even?).force(10)
<eval-in> banister => wrong number of arguments (2 for 1) (ArgumentError) ... (https://eval.in/102474)
<banister> >> 1.upto(Float::INFINITY).lazy.map(&:even?).first(10)
<eval-in> banister => [false, true, false, true, false, true, false, true, false, true] (https://eval.in/102475)
<apeiros> >> 1.upto(Float::INFINITY).lazy.map(&:even?).take(10).to_a
<eval-in> apeiros => [false, true, false, true, false, true, false, true, false, true] (https://eval.in/102476)
andy has joined #ruby
* apeiros prefers #first
sassamo has quit [Remote host closed the connection]
<banister> apeiros wtf is #take not strict?
carraroj has joined #ruby
<apeiros> because you can take lazily
sassamo has joined #ruby
<apeiros> so you can chain on take
<apeiros> in a lazy manner
<certainty> lazy folks
<banister> apeiros cool
sassamo has quit [Read error: No route to host]
dangerousdave has joined #ruby
Vovko has joined #ruby
sassamo has joined #ruby
dkamioka has joined #ruby
einarj has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
angusigu1ss has joined #ruby
<apeiros> how merging and cleaning up some small things can quickly turn into a "fuck that, I can do better"…
<apeiros> 3h down the drain
<certainty> better be lazy next time
lurch_ has joined #ruby
tylersmith has joined #ruby
maximski has quit [Remote host closed the connection]
figgleberry has quit [Ping timeout: 265 seconds]
lurch_ has quit [Client Quit]
kaliya has quit [Quit: Lost terminal]
Jdubs has joined #ruby
CaptainJet has joined #ruby
ji0n has joined #ruby
iamsean has joined #ruby
Fire-Dragon-DoL has joined #ruby
angusigu1ss has quit [Ping timeout: 265 seconds]
<apeiros> sure…
yarou has joined #ruby
jkamenik has joined #ruby
ayaz has quit [Quit: Textual IRC Client: www.textualapp.com]
ppcsee has joined #ruby
jkamenik has quit [Client Quit]
<lpvn> apeiros, next time be good, not perfect... lol
phansch has quit [Quit: Leaving]
<apeiros> well, it's still far from perfect :-/
<certainty> it always is
rippa has joined #ruby
<apeiros> sometimes sublime is horribly slow…
<apeiros> displaying letters at 1 letter per ~0.1s
jonathanwallace has quit [Quit: ZNC - http://znc.in]
<certainty> python's gc is running
* certainty hides
<LadyRainicorn> lol
<LadyRainicorn> Ours was likr that too ubtil recently...
ppcsee has left #ruby [#ruby]
<apeiros> LadyRainicorn: got a cold?
<LadyRainicorn> lol no
timonv has joined #ruby
<LadyRainicorn> :3
<LadyRainicorn> Maybe sleepy, I dunno.
sassamo has quit [Remote host closed the connection]
<LadyRainicorn> I haven't had any alcohol today. Sometimes rhat makes me weirs.
<shevy> ponicorns!
jellosea has joined #ruby
<LadyRainicorn> shevy! :3
<shevy> indeed you type as if drunk
sassamo has joined #ruby
<LadyRainicorn> Haha, well I am not drunk now.
<LadyRainicorn> But normally I almost always am.
petey has joined #ruby
<certainty> ok kids need bedtime story, bbl
pfg has joined #ruby
<jellosea> when i run this, files = files.sort_by { |x| File.stat(x).mtime} normally it works. but if this line is run by a cron job.. it doesn't work. the script seems to stop execution after that. the cron environment can run other ruby stuff fine, just this one line. anyone know why?
sassamo has quit [Read error: Connection reset by peer]
<LadyRainicorn> Tell them about rainbows and unicrons!
sassamo has joined #ruby
msmith has joined #ruby
IceDragon has quit [Ping timeout: 260 seconds]
carraroj has quit [Quit: Konversation terminated!]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
LexicalScope has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
m104 has joined #ruby
shado has joined #ruby
m104 has quit [Max SendQ exceeded]
vlad_starkov has joined #ruby
<LadyRainicorn> I love how lychhe liquer is listed as a fruit.
Vivekananda has joined #ruby
Vovko has quit [Remote host closed the connection]
lotherk has joined #ruby
m104 has joined #ruby
<apeiros> jellosea: unrelated, but you can do just File.mtime(x)
gerep has joined #ruby
<jellosea> yeah i tried that too, still have the same problem
yalue has quit [Read error: Operation timed out]
<apeiros> jellosea: and to figure out why - rescue exceptions and log them
<jellosea> oh yeah could be exception
<gerep> Hi all. I have an ec2 instance running. I have installed ruby 2.0.0 and openssl but when I try to install my project, I get this: Could not load OpenSSL.
<gerep> any ideas?
<apeiros> you probably have a file in files which you can't stat
<havenwood> ^
<LadyRainicorn> profit! looks delicious.
jonathanwallace has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Advocation has quit [Quit: Advocation]
<havenwood> gerep: You have to build your Ruby after OpenSSL so it dynamically links against the lib.
troyready has joined #ruby
mansi has joined #ruby
sparrovv has joined #ruby
k3vl4r has joined #ruby
baroquebobcat has joined #ruby
<havenwood> gerep: I'd recommend checking out `ruby-install` so you can knock out any other missing deps before you rebuild.
monkegji_ has joined #ruby
<lpvn> LadyRainicorn, yeah it does
lukec has quit [Quit: lukec]
<lpvn> LadyRainicorn, btw isn't lychee a fruit?
<havenwood> gerep: Or what package manager do you use? Could manually install the other deps before rebuilding.
rafaelmagu has joined #ruby
<gerep> havenwood: yum
<LadyRainicorn> Yes, but the listing is 'lychee liqeur (a fruit)'
<havenwood> gerep: sudo yum install -y gcc automake gdbm-devel libffi-devel libyaml-devel openssl-devel ncurses-devel readline-devel zlib-devel
vlad_starkov has quit [Ping timeout: 252 seconds]
<LadyRainicorn> Liqeur is not a fruit.
<gerep> havenwood: thanks a lot, I'll try that ;)
<LadyRainicorn> That's like saying 'apple schanps (a fruit)'
<lpvn> LadyRainicorn, haha ok
mikecmpbll has joined #ruby
<havenwood> LadyRainicorn: Then I've not been getting my daily fruit this whole time?!
mojjojo has quit [Quit: mojjojo]
<LadyRainicorn> Very odd phrasing.
<LadyRainicorn> Unfortunately no.
<havenwood> gerep: ruby-install would use yum to install those, but doing it manually and rebuilding should do the trick ;)
pel_daniel has joined #ruby
<LadyRainicorn> Fruit juice does not provide the health benefits of fruit.
<gerep> havenwood: ok :)
<LadyRainicorn> (In fact, while delicious it is not really very healthful at all)
klaut has quit [Remote host closed the connection]
<shevy> :D
tcopp has joined #ruby
tonni has joined #ruby
<jellosea> how can i get ruby to stat the symlink and not the linked file
<havenwood> jellosea: #lstat
vlad_starkov has joined #ruby
<jellosea> ok tanks
<certainty> LadyRainicorn: no, snow white it was
Kricir has quit [Remote host closed the connection]
<LadyRainicorn> ?
francisfish has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
andy has quit [Remote host closed the connection]
VTLob has joined #ruby
<certainty> LadyRainicorn: nvm, you probably didn't mean me
andy has joined #ruby
monkegjinni has quit [Remote host closed the connection]
* LadyRainicorn is confused.
<LadyRainicorn> I was talking about fruit juice.
xcv has joined #ruby
juco has quit [Remote host closed the connection]
<LadyRainicorn> Were yiu talking about fruit juice?
* LadyRainicorn wants orange juice now.
<certainty> nope
mark_locklear has quit [Ping timeout: 264 seconds]
camilasan has quit []
jhass|off is now known as jhass
<LadyRainicorn> oif
Vivekananda has quit [Remote host closed the connection]
<LadyRainicorn> Waht wer you talking about?
<LadyRainicorn> liquer
<certainty> LadyRainicorn: 18:54 < LadyRainicorn> Tell them about rainbows and unicrons!
<LadyRainicorn> ohhhhhhhhhhh
IceDragon has joined #ruby
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
* LadyRainicorn now understands
<LadyRainicorn> My mental scrollback is ~ 5 lines
<LadyRainicorn> ;p
<certainty> i see
recurrence has joined #ruby
<certainty> is unicron yet another cron implementation? :p
Vivekananda has joined #ruby
<LadyRainicorn> No it is like a unicorn decepticon.
<certainty> alright
<LadyRainicorn> (which is presumably some sort of qquatic robot since I never saw the movie)
<LadyRainicorn> omg.
<shevy> hmm test code should reside in test/ ?
monkegji_ has quit [Remote host closed the connection]
<LadyRainicorn> IT IS A ROBOT NARWHAL.
tanema has quit [Remote host closed the connection]
andy has quit [Ping timeout: 264 seconds]
<LadyRainicorn> n a r w h a l
shredding has quit [Quit: shredding]
tanema has joined #ruby
<LadyRainicorn> n ★ a ★ r ★ w ★ h ★ a ★ l
AlSquire has joined #ruby
<certainty> erm?
<apeiros> oooooh, no Enumerable#uniq
* apeiros sadface
Liothen has joined #ruby
<shevy> LadyRainicorn you are drunk :)
<LadyRainicorn> lolno, I told you I am not drunk now, you just think I am cause I'm normally drunk and I'm not quite sane otherwise
<LadyRainicorn> (ok, I'm never quite sane, but I'm somewhat saner drunkl
tanema_ has joined #ruby
havenwood has quit [Remote host closed the connection]
<certainty> apeiros: yeah that surprised me the other day too.
<LadyRainicorn> Enumerable#uniq would have really bad memory usage with lazy.
tanema has quit [Read error: Connection reset by peer]
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
pwh has joined #ruby
k3vl4r has quit [Remote host closed the connection]
yalue has joined #ruby
<certainty> LadyRainicorn: why?
lukec has joined #ruby
Sawbones has joined #ruby
<apeiros> certainty: it means I need a superfluous to_a for <2.1 support in my code :(
zeeraw has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
canton7-mac has quit [Quit: Leaving]
Zai00 has quit [Quit: Zai00]
<LadyRainicorn> How do you tell if an element is the first iutput?
olivier_bK has quit [Ping timeout: 260 seconds]
<LadyRainicorn> You have to keep (at leasy a hash of) every element output forever.
<apeiros> LadyRainicorn: pull yourself together. I get parser fails for most of your sentences :-p
AlSquire has quit [Read error: Connection reset by peer]
<apeiros> how do you mean, "element is first output"?
heftig has joined #ruby
pipework has joined #ruby
sassamo has quit [Remote host closed the connection]
zeade has joined #ruby
<LadyRainicorn> How do you know if it's appeared before?
sassamo has joined #ruby
<LadyRainicorn> You have to keep a reference to it.
AlSquire has joined #ruby
<apeiros> yes
<LadyRainicorn> Or an id
recurrence has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> you need a set
<apeiros> and test whether the element is already in that set
JasmeetQA1 has quit [Ping timeout: 265 seconds]
<apeiros> if your solution is allowed to get false positives, you can also use a bloom filter
Al___ has joined #ruby
<certainty> but that doesn't mean it's worse than the strict version in that regard
andy has joined #ruby
<certainty> actually chances are good that it's better since you probabl wont consume every element
iliketurtles has quit [Quit: zzzzz…..]
<LadyRainicorn> I suppose you could still include it
Sawbones has quit [Remote host closed the connection]
maoko has joined #ruby
<apeiros> certainty: huh?
<LadyRainicorn> Ruby does have other surprising perfomance hits.
Sawbones has joined #ruby
<LadyRainicorn> And it wouldn't neef to keep.that data around unless called
* apeiros probably misunderstands what "that regard" is supposed to mean
<certainty> apeiros: i was referring to LadyRainicorn's assumption
mojjojo has joined #ruby
<certainty> apeiros: in regard to its memory usage
<apeiros> a bloom filter uses vastly less memory
evangeline has quit [Remote host closed the connection]
TheMoonMaster has quit [Excess Flood]
<apeiros> so in that regard it beats the set
<apeiros> but it comes at the expense of possible false positives
<LadyRainicorn> I do not think false positives would reallt be acceptable for Enumerable#uniq
TheMoonMaster has joined #ruby
<apeiros> ah
<LadyRainicorn> Maybe #buniq or something
<apeiros> LadyRainicorn: well, #uniq turns the input into a hash anyway
iliketurtles has joined #ruby
monkegjinni has joined #ruby
monkegji_ has joined #ruby
<LadyRainicorn> Bloom filters havr higher error rates I think
<apeiros> and no, that's not acceptable for #°niq
yfeldblum has joined #ruby
<apeiros> yeees, false positives. as I said :-p
sassamo has quit [Ping timeout: 260 seconds]
<apeiros> and "higher" is somewhat implying that the set would have an error rate too. it doesn't.
<certainty> LadyRainicorn: what other surprising performance hits are there? i better watch out for these
zeeraw has joined #ruby
jonno11_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<LadyRainicorn> The thing with polymorphism and the method cache comes to mind.
<certainty> i'm afraid i don't know these. Can you elaborate?
sassamo has joined #ruby
Sawbones has quit [Ping timeout: 260 seconds]
Macaveli has joined #ruby
zeeraw has quit [Client Quit]
hseg has joined #ruby
yfeldblum has quit [Ping timeout: 245 seconds]
Macaveli has quit [Client Quit]
<hseg> Hi. In interests of keeping my home directory clean, I'd like gem to install into ~/.config/gem/ instead of ~/.gem However, setting GEM_{HOME,PATH} doesn't seem to affect it.
centrx has joined #ruby
timonv has quit [Remote host closed the connection]
<apeiros> aaaahahaha
<apeiros> sorry hseg. I feel with you.
msmith has quit []
<apeiros> I've pretty much given up in that regard. *nix software consider ~ to be shittable-all-over.
<apeiros> *considers
benzrf has joined #ruby
<benzrf> hey
<certainty> LadyRainicorn: alright. I have read up about the method cache. What about the polymorphism thing?
<benzrf> what's the best way to implement a custom network protocol at a high level?
<apeiros> benzrf: IO
<LadyRainicorn> extend and such don't play nicely with it
mikepack has quit [Remote host closed the connection]
<benzrf> what you mean like sockets
<hseg> apeiros: I'm a gonna do it iff'n if I die trying this.
<LadyRainicorn> In a surprising, non-local way.
<LadyRainicorn> See the link.
<apeiros> benzrf: #read/#write probably. and/or read_/write_noblock
<benzrf> :|
aryaching has quit [Read error: Connection reset by peer]
msmith has joined #ruby
<apeiros> hseg: ask drbrain over in #ruby-lang
<benzrf> is there nothing higher level ;-;
<hseg> OK. Thanks.
mark_locklear has joined #ruby
<certainty> LadyRainicorn: ok will do, thanks
<apeiros> benzrf: ask a better question, get a better answer. you know the drill :-p
<benzrf> :I
<apeiros> "high level" and "custom network protocol" are as vague as it can get.
troyready has quit [Ping timeout: 260 seconds]
<benzrf> lol
<shevy> how about low level
<benzrf> high level as in not having to manage specific bytes sent
havenwood has joined #ruby
<apeiros> how is it a custom protocol anymore in that case?
<benzrf> basically i want something to sockets as sinatra is to rack
<benzrf> i guess
<benzrf> umm
<benzrf> well http and ftp are diff protocols
<benzrf> even though they both work off of verbs and stuff
<benzrf> ...bad analogy >_>'
Macaveli has joined #ruby
ericmathison has quit [Quit: leaving]
<LadyRainicorn> You may (or may not) like ZeroMQ.
<LadyRainicorn> @benzrf
<benzrf> ill look at it o:
<certainty> how's that going to help?
monkegji_ has quit [Remote host closed the connection]
m104 has quit [Quit: bye]
<benzrf> i guess i want something that lets me implement an ftp-like protocol by defining hooks for different verbs and what to expect to receive
oso|away is now known as oso96_2000
Hiall has quit [Read error: Operation timed out]
noop has joined #ruby
jonah_k has quit [Remote host closed the connection]
freezey has joined #ruby
pel_daniel has quit [Read error: Connection reset by peer]
subbyyy has joined #ruby
monkegji_ has joined #ruby
<maasha> Namespace mess: https://gist.github.com/maasha/79b3c0fa4b51e06e9279 - any suggested fix? (error message at top of gist)
<shevy> FTP-Sinatra!
<certainty> benzrf: can't you use a protocol that already exists?
<benzrf> idk, maybe i can o-o
<jhass> maasha: ::Math.sqrt
<benzrf> im looking at zeromq and it might be what i want
aesptux has quit []
<maasha> jhass: :: means parent namespace?
sepp2k has joined #ruby
jonah_k has joined #ruby
pel_daniel has joined #ruby
<jhass> maasha: no, root namespace (Object)
andy has quit [Remote host closed the connection]
<certainty> zeromq gives you messaging, not a custom protocol
<maasha> jhass: excellent. thanks
<shevy> what gives me massaging
<benzrf> well i guess messaging is all i want
<benzrf> idk man -.-
<certainty> i see
<benzrf> im not good at networking and terms :\
<certainty> benzrf: well what do you want?
<benzrf> im writing a useless and pointless cryptocoin for fun
<benzrf> it will probably not work but i learned about the bitcoin protocol and wanted to try writing an implementation of the basic idea
<benzrf> :3
<LadyRainicorn> You might want to try msgpack or protocolbuffers for serialization and switch on a verb statement
<benzrf> mm
<LadyRainicorn> Bitcoin is fairly difficulr to inplement.
<shevy> benzrf will it become a gem?
hobodave has joined #ruby
xcv has quit [Remote host closed the connection]
phansch has joined #ruby
Findegil has joined #ruby
<LadyRainicorn> (Satoshi, for example, did not do well.)
<havenwood> I don't know what the question is, but DRb is the answer!
freezey has quit [Ping timeout: 252 seconds]
<certainty> benzrf: i see. I don't know a thing about these things :)
<LadyRainicorn> That is possible.
mityaz has joined #ruby
andy has joined #ruby
<benzrf> shevy: heck noop
<benzrf> *no
<benzrf> havenwood: drb?
Jdubs has quit [Remote host closed the connection]
<shevy> I <3 your way to tab complete
<benzrf> I <3< your antagonism
angusigu1ss has joined #ruby
SHyx0rmZ has joined #ruby
<LadyRainicorn> Aww, shevy is a pool of love.
<LadyRainicorn> Like a fluffy pink love cloud pool.
<LadyRainicorn> ♥
axl_ has joined #ruby
<certainty> private cloud?
* LadyRainicorn sends benzrf happiness rays.
<shevy> lol
<LadyRainicorn> A public cloud!
<shevy> happiness rays
* benzrf holds up a mirror
<benzrf> eat rays!!
* LadyRainicorn is happified
<havenwood> benzrf: Think RabbitMQ or 0MQ but Ruby on both ends and tons of neatness.
aryaching has joined #ruby
phansch_ has joined #ruby
<benzrf> havenwood: so neat
<benzrf> omg ruby has a built in distributed object system??
tgkokk has joined #ruby
<havenwood> benzrf: ;)
<benzrf> is this like pyro
<certainty> havenwood: *only* ruby on both ends
iamsean has quit [Quit: iamsean]
<certainty> :)
yarou has quit [Remote host closed the connection]
<shevy> benzrf drb
<havenwood> ONLY RUBY \o/
andy__ has joined #ruby
multi_io_ has quit [Read error: Operation timed out]
vlad_starkov has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
andy has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
<shevy> ONLY BEER \o/
<LadyRainicorn> Does Drb have any sort of authentication built in?
IcyDragon has joined #ruby
<LadyRainicorn> I haven't looked at it much.
btanaka has joined #ruby
<benzrf> that wouldnt even be necessary
danijoo has joined #ruby
<benzrf> for a bitcoin-style protocol
<benzrf> :D
IceDragon has quit [Ping timeout: 264 seconds]
<benzrf> the whole point is that trust is not needed
<benzrf> does ruby have an asymmetric encryption lib built in
<LadyRainicorn> Yes.
Hobogrammer has quit [Read error: Connection reset by peer]
<benzrf> or at least signature verification
<benzrf> LadyRainicorn: cool beans
<LadyRainicorn> (Though it kind of sucks.)
endash_ has joined #ruby
<benzrf> whats it called ?
<LadyRainicorn> OpenSSL
<benzrf> o
phansch has quit [Ping timeout: 252 seconds]
monkegjinni has quit [Remote host closed the connection]
<shevy> :)
angusigu1ss has quit [Ping timeout: 265 seconds]
troyready has joined #ruby
<shevy> benzrf you should not have deflected the happiness rays
yarou has joined #ruby
Sloggerkhan has quit [Ping timeout: 265 seconds]
<LadyRainicorn> Happiness rays are here to help you!
Sloggerkhan has joined #ruby
Wolland has joined #ruby
thesheff17 has joined #ruby
multi_io has joined #ruby
<certainty> neat, i didn't know that exists
<shevy> help help me rinda help help me rinda
subbyyy has quit [Ping timeout: 264 seconds]
chipotle has quit [Quit: cya]
froy has joined #ruby
IcyDragon is now known as IceDragon
<LadyRainicorn> Drb sounds neat, but kind of scary from a security pov.
<benzrf> that is why you should use Clientside!!!
<benzrf> it is so secure
<benzrf> wow
Wolland has quit [Remote host closed the connection]
Wolland has joined #ruby
jlebrech has quit [Quit: Konversation terminated!]
<LadyRainicorn> Clientside?
Mousse_ has quit [Quit: Computer has gone to sleep.]
<benzrf> my amazingly awesome gem
<benzrf> it lets you call ruby methods from browser jfs
<benzrf> *js
<benzrf> using websockets!!
<benzrf> the buzzing you hear is all of the buzzwords
<benzrf> gh/benzrf/clientside
chipotle has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> really?
<shevy> you can use the browser to call ruby methods?
deception has joined #ruby
bbloom has joined #ruby
<shevy> hmm
sambao21 has quit [Quit: Computer has gone to sleep.]
vlad_starkov has joined #ruby
gerep has left #ruby [#ruby]
<Nilium> Huh, just by requiring WeakRef, I've somehow crashed MRI 2.0.0
* Nilium scratches his head
chipotle_ has joined #ruby
failshell has joined #ruby
<Nilium> But the require only crashes if I add a specific line to the script that's requiring it
<Nilium> Something very weird is happening
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
sambao21 has joined #ruby
Vovko has joined #ruby
freezey has joined #ruby
geggam has quit [Remote host closed the connection]
chipotle has quit [Ping timeout: 264 seconds]
dubsteph has quit [Ping timeout: 252 seconds]
<benzrf> an easter egg!
<benzrf> LadyRainicorn: did ya lok at clientside
<benzrf> :3 :3 :3
<benzrf> *look
Al___ has quit [Quit: Al___]
pedda has joined #ruby
<LadyRainicorn> Yes
<LadyRainicorn> Looks neat
<benzrf> obviously itd be terrible for production
<benzrf> but i figure it could be handy for quick-and-dirty web interfaces
phansch has joined #ruby
<Nilium> Right, well, screw it, no WeakRef then
<benzrf> a friend recently wrote a flask app which has buttons that, when pressed, do an ajax call to routes that control his music player
<benzrf> i figure clientside could be useful for that kind of thing
Dreamer3 has joined #ruby
<apeiros> Nilium: the line being "crash_now!"?
Hobogrammer has joined #ruby
<Nilium> No, it's something in C.
mansi has quit [Remote host closed the connection]
<shevy> scary scary C
kindjal has joined #ruby
rdark has quit [Quit: leaving]
<apeiros> Nilium: sooo, "crash_now()" then?
mansi has joined #ruby
phansch_ has quit [Ping timeout: 252 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
* Nilium hits apeiros with a stick
* apeiros ducks
mansi has quit [Read error: Connection reset by peer]
dkamioka has quit [Remote host closed the connection]
mansi has joined #ruby
<apeiros> shevy: bah, C isn't scary. it's just easy to shoot yourself in the foot.
<apeiros> and the belly.
<apeiros> and the face.
ws2k3 has quit [Quit: -)(- If you can't see the fnords, they can't eat you.]
<apeiros> with a tank.
vagner4work has quit [Remote host closed the connection]
<apeiros> or an ICBM
timonv has joined #ruby
jprovazn has joined #ruby
<Nilium> C's easy to shoot yourself in the foot like any other language
dkamioka_ has joined #ruby
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
<apeiros> Nilium: yeah, but not every language will take the whole rest of you with it when you shoot your foot…
jonno11 has joined #ruby
<Nilium> The upside is that it's easier to debug than Ruby somehow
<apeiros> lolwut?
<Nilium> I have yet to see anything for debugging Ruby that doesn't suck enormously
shadoi has joined #ruby
Dreamer3 has quit [Ping timeout: 272 seconds]
<shevy> apeiros easier to shoot in the foot with C than C++?
sambao21 has joined #ruby
pel_daniel has quit [Quit: Leaving.]
<benzrf> shevy: absurd
iliketur_ has joined #ruby
<benzrf> anyway c has weak, static typing
<benzrf> which is basically the Worst Thing Ever
<shevy> I like that benzrf has strong opinions
<apeiros> Nilium: dunno, I rarely needed more than the exceptions raised by the code. and the times I did, puts or binding.pry easily got me covered.
iliketur_ has quit [Max SendQ exceeded]
<Nilium> C++ has a lot more there for making sure you don't make an idiot of yourself
iliketur_ has joined #ruby
<centrx> Unfortunately, the mere use of C++ means you are making an idiot of yourself!
<shevy> templates!
<shevy> the more templates the better
<Nilium> pry is nice, but debugging with it is a horrible, painful disaster and shouldn't be attempted
<benzrf> t-t-t-templates!
<benzrf> :[
<benzrf> dang but ruby really really really needs a good debugger
<shevy> people who need a debugger in ruby are incompetent anyway
<benzrf> too bad were not gonna see one ahahaa
Mousse_ has joined #ruby
iliketurtles has quit [Ping timeout: 265 seconds]
freezey has quit [Remote host closed the connection]
<shevy> besides, with all the testing culture in ruby, why do you need a debugger!!!!!!
<benzrf> haskell is the least buggy language ive ever used
<shevy> right but haskell is not used for anything anyway
<benzrf> >implying
SHyx0rmZ has quit [Ping timeout: 265 seconds]
<shevy> is github written in haskell benzrf
SHyx0rmZ has joined #ruby
<benzrf> is google written in rub
<benzrf> y
<benzrf> clearly java and python must be better QED
<shevy> don't rub it in man, google prefers python :(
<Nilium> Possibly some bits of it.
<Nilium> Wouldn't even remotely surprise me.
<xargoon> google is written in C++
<benzrf> i run into like 1 runtime bug per day when using haskell
<xargoon> if you're talking about the search engine
<shevy> yeah, python is used more widely than ruby according to tiobe
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<benzrf> 90% of errors in haskell are type errors :D
<shevy> you run into bugs when using haskell?
<benzrf> well duh
<benzrf> bugs are impossible to avoid
<benzrf> in any lang
<shevy> !!!
<xargoon> gmail and most other applications are written in java
<shevy> that is the problem
<shevy> the ATTITUDE
<shevy> it all starts there... "pfft, bugs will always be there"
hseg has quit [Ping timeout: 245 seconds]
<shevy> benzrf see how life on earth is possible with ALL THE BUGS
forced_request has quit [Remote host closed the connection]
forced_request has joined #ruby
Vovko has quit [Remote host closed the connection]
yarou has quit [Remote host closed the connection]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<benzrf> oh man how i wish ruby had :t
<benzrf> :(((
<shevy> had what
<apeiros> >> :t
<eval-in> apeiros => :t (https://eval.in/102486)
<apeiros> it has!
<benzrf> *pry i guess
<shevy> lol
Dreamer3 has joined #ruby
<benzrf> huehuehue
mehlah has quit [Quit: Leaving...]
<shevy> :t is valid ruby code
mikekellyio has joined #ruby
<shevy> you could even make a gem out of it
<shevy> gem install :t
<benzrf> shevy: let us say that i run upon the HIGHLY MYSTERIOUSSS mapM function while playing around in ghci! (the haskell REPL)
<benzrf> why, all i need is my trusty :t to find out:
<benzrf> Prelude Control.Monad> :t mapM
<benzrf> mapM :: Monad m => (a -> m b) -> [a] -> m [b]
<shevy> the 100MB thing?
<benzrf> and now i know what mapM does!
<shevy> with 100MB you'd know everything about ruby as well
<benzrf> (fyi it is pretty much just (sequence .) . map)
<shevy> also I have no idea what mapM does
claymore has quit [Ping timeout: 265 seconds]
sassamo has quit []
Czupa has quit [Remote host closed the connection]
claymore has joined #ruby
<benzrf> shevy: it takes a function that turns a's into m b's, then it maps the function over a list of a's, and sequences the result
<benzrf> Prelude Control.Monad> mapM putStr ["this ", "that ", "the ", "other"]
<benzrf> this that the other[(),(),(),()]
<benzrf> putStr :: String -> IO ()
LadyRainicorn has quit [Ping timeout: 245 seconds]
<benzrf> String is a, IO is m and () is b
<benzrf> :-D
<shevy> this is so ugly
<shevy> I can now understand why you abandoned haskell benzrf
<benzrf> ur mom is so ugly OH SNAP
<benzrf> i did not abandon haskell i still use it
<shevy> look at the four () lisps there
<benzrf> i lub it
<benzrf> () is unit
<benzrf> it is a meaningless value
<benzrf> it is like nil
<benzrf> in fact it almost literally /is/ nil
<shevy> ok 4x meaningless values
<benzrf> well if I do
<benzrf> mapM putStr ["this ", "that ", "the ", "other"]
<benzrf> that's like
<benzrf> ["this ", "that ", "the ", "other"]
<benzrf> oops
<benzrf> ["this ", "that ", "the ", "other"].map {|s| print s}
<benzrf> the result is obv [nil, nil, nil, nil]
RoryHughes has joined #ruby
<benzrf> [1] pry(main)> ["this ", "that ", "the ", "other"].map {|s| print s}
<benzrf> this that the other=> [nil, nil, nil, nil]
<benzrf> Prelude Control.Monad> mapM putStr ["this ", "that ", "the ", "other"]
<jhass> yeah, that's why we use each
<benzrf> this that the other[(),(),(),()]
<benzrf> basically the same thing
<benzrf> well the equivalent of each is something like mapM_
<benzrf> altho, it just makes IO ()
<apeiros> benzrf: dude, use pry
<benzrf> not the original list
<apeiros> benzrf: and then just: ? obj.some_method
<apeiros> even shorter than :t!
<benzrf> i do
<benzrf> [9] pry(main)> ? OpenSSL::PKey::RSA.new
<apeiros> install pry-doc if you need core/stdlib docs too
<benzrf> just tells me about Class#new
<benzrf> ;-;
<benzrf> oh wait initialize
<benzrf> derp derp derp
elaptics is now known as elaptics`away
<apeiros> was just gonna say :)
<benzrf> 2many derp
axl_ has quit [Quit: axl_]
<benzrf> hmmmm do you think there is any way i could get an internship or even a job that is coding-related this summer
<benzrf> :O
<maasha> is fastercvs build into ruby?
<benzrf> does anybody hire minors??
Solnse has quit [Remote host closed the connection]
<benzrf> apeiros:
<benzrf> [6] pry(main)> ? OpenSSL::PKey::RSA#initialize
<benzrf> Error: Cannot locate this method: initialize. (source_location returns nil)
<benzrf> :(
<apeiros> maasha: yes
<apeiros> maasha: as of 1.9, fastercsv == stdlib CSV
<benzrf> i am trick
<apeiros> benzrf: you installed pry-doc?
<benzrf> yep
<maasha> apeiros: That info was a bit secret.
<apeiros> benzrf: :(
<maasha> apeiros: thanks
<benzrf> help does not work neither
<benzrf> u_u
<apeiros> odd, ri has the info
sambao21 has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
wallerdev has joined #ruby
danijoo has quit [Quit: Leaving...]
krisbulman is now known as [krisbulman]
<waxjar> does ri have a ruby API?
deadlock has quit [Ping timeout: 272 seconds]
yfeldblum has joined #ruby
likemike_ has joined #ruby
<likemike_> hi is it possible to delete a range of characters from string ?
<likemike_> i mean with some easy method call :D
pixelgremlins_ba has joined #ruby
<apeiros> likemike_: String#delete
dik_dak has joined #ruby
jellosea has quit [Quit: jellosea]
<likemike_> o helpful...
claymore has quit [Ping timeout: 260 seconds]
sdwrage has joined #ruby
<waxjar> you'll find that, actually, it is :)
pixelgremlins has quit [Ping timeout: 245 seconds]
Jdubs has joined #ruby
blaxter has quit [Quit: foo]
pel_daniel has joined #ruby
yfeldblum has quit [Ping timeout: 272 seconds]
claymore has joined #ruby
yarou has joined #ruby
[krisbulman] is now known as krisbulman
Al___ has joined #ruby
gwz has joined #ruby
hetre85 has quit [Ping timeout: 264 seconds]
deepa is now known as deepy
CpuID has joined #ruby
CpuID has quit [Changing host]
CpuID has joined #ruby
asmodlol has joined #ruby
jonr22 has joined #ruby
gischy has joined #ruby
jerius has quit [Ping timeout: 260 seconds]
<gischy> hi, if i have 2 classes one inherit from the other both have a constructor... why does it override the constructor?
<certainty> gischy: you need to call super in the child class
Vovko has joined #ruby
aniM has quit [Ping timeout: 260 seconds]
jerius has joined #ruby
<apeiros> gischy: because if you define a method in the subclass, it will override the superclasses method (only in the subclass of course)
<apeiros> otherwise, how'd you define subclass specific methods?
<gischy> thx
LadyRainicorn has joined #ruby
<certainty> turns out, i'm interpreting too much.
<LadyRainicorn> I know, you should compile instead.
<certainty> :)
freezey has joined #ruby
blaxter_ has joined #ruby
monkegji_ has quit [Remote host closed the connection]
<shevy> hah
<shevy> LadyRainicorn <3
ndrei has quit [Ping timeout: 265 seconds]
angusigu1ss has joined #ruby
blackmesa has joined #ruby
ndrei has joined #ruby
chipotle_ has quit [Quit: cya]
Macaveli has quit [Read error: Connection reset by peer]
freezey has quit [Ping timeout: 252 seconds]
Macaveli has joined #ruby
poulson has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Astralum has joined #ruby
<benzrf> oh shit clientside isnt working right
<benzrf> what the heck
Macaveli has quit [Client Quit]
mjuszcza1 is now known as mjuszczak
<LadyRainicorn> :o
zoscoy has joined #ruby
angusigu1ss has quit [Ping timeout: 252 seconds]
claymore has quit [Read error: Operation timed out]
chipotle has joined #ruby
Sc0rp10n has quit [Remote host closed the connection]
Al___ has quit [Read error: Connection reset by peer]
<benzrf> why is this not working ;-;
<benzrf> oh boy is it a permissions issue -.-
Al___ has joined #ruby
Sthebig has quit [Ping timeout: 240 seconds]
chipotle_ has joined #ruby
fantazo has quit [Ping timeout: 245 seconds]
flagg0204 has joined #ruby
tgkokk has quit [Ping timeout: 245 seconds]
ikaros has quit [Quit: Ex-Chat]
DrShoggoth has joined #ruby
Al___ has quit [Client Quit]
<Nilium> Woo, I'm actually happy with this event dispatch/propagation stuff
chipotle has quit [Ping timeout: 264 seconds]
<benzrf> wtf
Sthebig has joined #ruby
rayners has quit [Remote host closed the connection]
Sc0rp10n has joined #ruby
noop has quit [Ping timeout: 245 seconds]
<benzrf> ?!?!?!?
<Nilium> benzrf just found a cat he didn't know he had.
<benzrf> lol
vlad_starkov has quit [Remote host closed the connection]
aspiers has joined #ruby
<Nilium> Speaking of which, I'm getting close to befriending a cat that started living under our porch.
mushky has joined #ruby
blaxter_ has quit [Quit: foo]
RaCx has joined #ruby
carif has quit [Ping timeout: 260 seconds]
decoponio has quit [Quit: Leaving...]
maoko has joined #ruby
ebwise has joined #ruby
Es0teric has joined #ruby
vlad_starkov has joined #ruby
oz has quit [Quit: EOF]
dangerousdave has joined #ruby
oz has joined #ruby
tyl has joined #ruby
jonah_k has quit [Remote host closed the connection]
<shevy> lol
<shevy> damn Nilium
<apeiros> anybody know how to get rdoc.info to update docs generated from github?
troyready has quit [Ping timeout: 272 seconds]
<shevy> go abandon wilderness and COME BACK TO CIVILIZATION man
Xeago has quit [Remote host closed the connection]
<apeiros> ah, fun, should have read "About" first :D
tanema_ has quit []
claymore has joined #ruby
geggam has joined #ruby
Kricir has joined #ruby
peck_ has joined #ruby
Sawbones has joined #ruby
<gwz> hey, if i have a 4x4 2d array , is it possible for me to only get for example, the bottom right 2x2 matrix
<lagweezle> a[3][3] ?
<lagweezle> oh, nevermind
Hobogrammer has quit [Ping timeout: 248 seconds]
<centrx> gwb3, If you use Matrix, you can use #minor - http://www.ruby-doc.org/stdlib-2.0/libdoc/matrix/rdoc/Matrix.html#method-i-minor
<certainty> gwz: ^ that's actually for you
<apeiros> blargh, doesn't seem to work… :(
shaunbaker has joined #ruby
chipotle_ has quit [Quit: cya]
prc has joined #ruby
timonv has quit [Remote host closed the connection]
gregf has quit [Quit: WeeChat 0.4.3]
tvw has joined #ruby
pixelgremlins_ba has quit [Quit: Leaving]
shaunbaker has quit [Ping timeout: 260 seconds]
Lewix has quit [Remote host closed the connection]
troyready has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> hmm guys is it possible that all ports on windows are blocked when I want to use ruby? the problem is, I can use ruby only via putty when I am on windows, connecting to a remote host... hmmm I wonder whether I can then test webrick somehow
<apeiros> am I crazy? I think I'm crazy. I'm about to start yet another gem…
<shevy> don't abandon it like butler!!!
alvaro_o has joined #ruby
<apeiros> I haven't abandoned a single gem! I just have veeeery long update cycles… 0:-)
<shevy> lol
Shidash has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
tcopp has quit [Ping timeout: 245 seconds]
sambao21 has joined #ruby
chipotle has joined #ruby
tcopp has joined #ruby
jhn has joined #ruby
chipotle_ has joined #ruby
Lewix has joined #ruby
chipotle has quit [Ping timeout: 265 seconds]
phutch1ns has quit [Ping timeout: 264 seconds]
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Sawbones_ has joined #ruby
Sawbones has quit [Ping timeout: 252 seconds]
tjr9898 has quit [Remote host closed the connection]
tjr9898 has joined #ruby
mweshi has joined #ruby
LadyRainicorn has quit [Ping timeout: 265 seconds]
LadyRainicorn has joined #ruby
popl has quit [Ping timeout: 252 seconds]
kirun_ has quit [Quit: Client exiting]
<apeiros> if somebody wants to proofread docs of my IBAN gem: http://apeiros.github.io/iso-iban/
<apeiros> s/wants to/is willing to/ ? :)
popl has joined #ruby
popl has quit [Changing host]
popl has joined #ruby
popl has quit [Client Quit]
<centrx> apeiros, "the" IBAN specification
Vivekananda has quit [Read error: Connection reset by peer]
<benzrf> IBAN?
<benzrf> like the guy in runescape
<kiba> hi, is there a good guide to opizing sql query in the context of rails development?
<apeiros> benzrf: international bank account number
<kiba> optimizing*
<apeiros> centrx: where?
<centrx> First line
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<centrx> ISO::IBAN implements ___the___ IBAN (International Bank Account Number) specification as per ISO 13616-1.
<apeiros> centrx: d'oh, lol
<apeiros> thanks :)
shadoi has quit [Quit: Leaving.]
Aryasam has joined #ruby
diegoviola has joined #ruby
Salve has quit [Remote host closed the connection]
Xeago has joined #ruby
Salve has joined #ruby
krisbulman is now known as [krisbulman]
Sawbones_ has quit []
Sawbones has joined #ruby
reset has joined #ruby
aryaching has quit []
dkamioka has joined #ruby
dkamioka has quit [Remote host closed the connection]
banister has joined #ruby
<centrx> apeiros, ISO::IBAN#load_specifications: Load the IBAN specifications file, which determines how the IBAN for any given country looks like. -- Needs to either "how" it "looks" or "what" it "looks like".
<centrx> apeiros, ISO::IBAN#numerify: Converts a String into its digits-only form, i.e. ... missing
dkamioka has joined #ruby
dkamioka has quit [Remote host closed the connection]
tyl has joined #ruby
<centrx> apeiros, ISO::IBAN#parse!: Like ISO::IBAN.parse, but raises ___an___ ISO::IBAN::Invalid exception if the IBAN is invalid.
dkamioka has joined #ruby
freezey has joined #ruby
Salve has quit [Ping timeout: 260 seconds]
dkamioka_ has quit [Ping timeout: 264 seconds]
<centrx> apeiros, ISO::IBAN#numeric: Same problem as #numerify
<centrx> apeiros, ISO::IBAN#to_a: ___An Array of___ the individual IBAN components as defined by the SWIFT specification.
Vovko has quit [Remote host closed the connection]
<centrx> apeiros, ISO::IBAN#validate: Validation ___of___ error codes___.___ (extra colon at end)
gwz has quit [Quit: Page closed]
mojjojo has quit [Quit: mojjojo]
<centrx> Some of those look like issues with the summarization dropping the end of sentences
* centrx is exhausted
lpvn has quit [Ping timeout: 246 seconds]
<apeiros> I don't get `ISO::IBAN#numerify: Converts a String into its digits-only form, i.e. ... missing`
<apeiros> I don't see a `, i.e.`
<shevy> it's missing!
<shevy> they point out that it is missing!
<shevy> that is very kind of them :)
Salve has joined #ruby
<apeiros> centrx: ah, I see, you're looking indeed at the summary automatically generated by yard
<apeiros> the full documentation is longer
<centrx> Yes I just realized that myself
RaCx has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
<centrx> apeiros, ISO::Specification: def account_code_lenght length spelled wrong
* centrx has entered the code
Davey has joined #ruby
<apeiros> oh, wow
pwh has quit []
RaCx has joined #ruby
Vivekananda has joined #ruby
* centrx activates Lint Mode Alpha-01
<apeiros> 21:42 centrx: apeiros, ISO::IBAN#to_a: ___An Array of___ the individual IBAN components as defined by the SWIFT specification.
<apeiros> I don't think I'll change that
<centrx> I submit my humble suggestions to your wisdom
<apeiros> that it returns an array is redundant (already stated in the object type)
Hobogrammer has joined #ruby
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
<apeiros> heh, well, let me reverse my order of what I say…
<apeiros> centrx: thanks a lot! working through your list right now :)
<apeiros> (wanted to say that at the end when I'm through - hence reverse the order)
<apeiros> oh, "Validation error codes" is the title for the list of error codes. so I think "Validation of error codes" would be wrong. no?
mehlah has joined #ruby
<apeiros> I could just drop the "Validation" part, though
<centrx> apeiros, It is because the "Summary" is only the first line of the complete description
<apeiros> the lenght one is a nice catch. horrible I didn't spot that :-S
<centrx> apeiros, Maybe something to tinker with in yard
kristiandelay has joined #ruby
maasha has quit [Ping timeout: 245 seconds]
<apeiros> yeah, I could play around with how to reorganize the text to better suit yards summarizer.
<shevy> cool
<shevy> def lenght is awesome
<shevy> def intialize is also a good one
* centrx submits patch to Ruby core: alias_method :length, :lenght
Tarential has quit [Excess Flood]
cmoylan_ is now known as cmoylan
Tarential has joined #ruby
cmoylan has quit [Changing host]
cmoylan has joined #ruby
gomix has left #ruby ["part 0.4.2"]
mojjojo has joined #ruby
shredding has joined #ruby
m104 has joined #ruby
lpvn has joined #ruby
thesheff17 has quit [Ping timeout: 252 seconds]
meatherly has joined #ruby
Jetchisel has joined #ruby
tvw has quit [Ping timeout: 264 seconds]
chrisseaton has quit [Ping timeout: 265 seconds]
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf> centrx: i think you have that backwards
jerius has quit []
<benzrf> >> Array.send :alias_method, :lenght, :length; [1, 2, 3].lenght
<eval-in> benzrf => 3 (https://eval.in/102504)
larissa has joined #ruby
jobewan has joined #ruby
Aryasam has quit [Read error: Connection reset by peer]
pfg has joined #ruby
Aryasam has joined #ruby
<jhass> yep, let's make gem install tpyo_porof work
kindjal has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
kindjal has joined #ruby
Thanatermesis has quit [Quit: ɯlɐɔ uı ʞɹoʍ oʇ ƃuıoƃ]
petey has quit [Remote host closed the connection]
Lewis has joined #ruby
klaut has joined #ruby
sentinal8473 has joined #ruby
petey has joined #ruby
nichtdiebohne has joined #ruby
tvw has joined #ruby
petey_ has joined #ruby
RaCx has quit [Ping timeout: 252 seconds]
klaut has quit [Ping timeout: 260 seconds]
ebwise has quit [Ping timeout: 260 seconds]
yalue has quit [Quit: Leaving]
Kricir has quit [Remote host closed the connection]
petey has quit [Read error: Connection reset by peer]
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
jackneill has quit [Ping timeout: 245 seconds]
raphaelivan1 has joined #ruby
joelteon has joined #ruby
monokrome has joined #ruby
<joelteon> hey, can I run a rake task without applying any enhancements?
Thanatermesis has joined #ruby
Lewis has quit [Ping timeout: 260 seconds]
RaCx has joined #ruby
<monokrome> Hey, all. I have ran `gem install tmuxinator`. It says that it installed, and I can see that tmuxinator was installed into the `gems` directory. However, it does not get installed into any of my actual gem paths - so, the executable is not available in my shell.
<monokrome> Does anyone know how to solve this problem?
rubyracer has joined #ruby
raphaelivan has quit [Ping timeout: 265 seconds]
<monokrome> My gem path is in my PATH environment variable, but gem never installs tmuxinator into it
<shevy> can you not put the bin/ dir into your path?
Xeago has quit [Remote host closed the connection]
<shevy> and what happens if you call it directly, does it run
thesheff17 has joined #ruby
skaflem has quit [Quit: This computer has gone to sleep]
mr_red has quit [Max SendQ exceeded]
<monokrome> Sure I can, and I even CD'd into the tmuxniator gems directory and ran it manually. However, that does not solve my original problem that gem is apparently broken...
mr_red has joined #ruby
cjsarette has quit [Ping timeout: 245 seconds]
Sawbones has quit [Remote host closed the connection]
<monokrome> I think that there might be an issue where gem and my ruby version are not agreeing
Kricir has joined #ruby
Biaf74 has joined #ruby
nichtdiebohne has quit [Quit: Linkinus - http://linkinus.com]
wald0 has quit [Quit: Lost terminal]
Jetchisel has joined #ruby
gregf has joined #ruby
Atw has joined #ruby
<monokrome> Apparently $(gem env gempath) doesn't actually add the bin parts
<monokrome> :/
Sawbones has joined #ruby
<gtech_> What's the easiest way to display text in a new window on windows?
CpuID has quit [Quit: This computer has gone to sleep]
<jhass> monokrome: $(gem env gemdir)/bin should do
<centrx> Win...dows?
<gtech_> 7
sentinal8473 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx> Never heard of it
cjsarette has joined #ruby
Biaf74 has left #ruby [#ruby]
<gtech_> centrx: it's the proprietary shitstorm of software, but it has the largest games library
Al___ has joined #ruby
<jhass> dualboot to the rescue!
<centrx> gtech_, Maybe Ruby Shoes?
Hobogrammer has quit [Ping timeout: 264 seconds]
felixjet_ has quit [Read error: Connection reset by peer]
<Nilium> I'm writing a GUI gem, but that's just me being insane
felixjet_ has joined #ruby
<Nilium> Maybe one day you'll be able to use it to display with text.
<Nilium> Text is hard.
tcopp has quit [Ping timeout: 252 seconds]
tvw has quit [Ping timeout: 240 seconds]
<gtech_> centrx: That would have been great, but Shoes won't opperate with native gems
Al___ has quit [Read error: Connection reset by peer]
einarj has joined #ruby
hrrz has joined #ruby
<gtech_> Nilium: I'm just trying to avoid learning FXruby if I can, if it's easy to just pop up a console window I can direct output to that's what I'd like to do
Al___ has joined #ruby
jhn has quit [Ping timeout: 240 seconds]
drocsid has joined #ruby
dubsteph has joined #ruby
Al___ has left #ruby [#ruby]
Hobogrammer has joined #ruby
Notte has joined #ruby
kobain has joined #ruby
shadoi has joined #ruby
ktosiek has quit [Ping timeout: 260 seconds]
<hrrz> hi guys, please tell me if i'm completely off.. I am trying to extract wordnet entities out of user input. I thought of loading all wordnet into a list and use aho-coarsick algorithm for string matching and then filter results. But I think it's bad memory, and bad implementation. any other thoughts? Wordnet is on postgresql and I am using Ruby
freezey has quit [Remote host closed the connection]
ringaroses has joined #ruby
venkat_ has joined #ruby
thesheff17 has quit [Read error: Connection reset by peer]
cina has joined #ruby
<centrx> hrrz, What portion of the user input will be words found in the dictionary?
phansch has quit [Quit: Leaving]
<centrx> hrrz, Aho-Corasick looks like it is for the much more difficult case of substring searches, not complete words
niv has joined #ruby
dubsteph has quit [Ping timeout: 260 seconds]
<centrx> drocsid, undefined local variable or method `start_post'
Sawbones has quit [Remote host closed the connection]
aspiers has quit [Ping timeout: 260 seconds]
<jhass> drocsid: line 20 of your paste
<hrrz> centrx: undefined, i expect getting about 300words from user
* apeiros was waiting for an actual question from drocsid
<drocsid> is it the +?
m104 has quit [Quit: bye]
<drocsid> +=
<hrrz> and i tried using aho-coarsick on sample text with sample dict and it worked great
<apeiros> drocsid: no, it's your typo
<jhass> drocsid: no, it's start_post being undefined
<apeiros> start_post vs. start_pos
kitak_ has quit [Remote host closed the connection]
<drocsid> duh line 21
<drocsid> thanks
<apeiros> the exception tells you that. it's worth reading exceptions.
kitak_ has joined #ruby
<drocsid> i should have just searched
<drocsid> yeah i read the execption
<drocsid> too dumb to search for post
<drocsid> and the line in the exception didn't correspond to the code
<jhass> drocsid: also look into nokogiri for parsing html or regex for simple text extraction like that
ktosiek has joined #ruby
<niv> Hi. I'm playing around with the PEG parser gen treetop. On the off chance someone in here worked with it, are there any existing grammars? I'm looking for a "C-like" with just the very basics of functionality
<centrx> hrrz, So what's the problem?
<centrx> hrrz, Searching for substrings when the words are already separated by spaces seems like overkill
<drocsid> jhass: thanks I'll check that
<hrrz> centrx: yea but wordnet isn't only about words it's about phrases as well
<hrrz> centrx: e.g Computer Software
kitak_ has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<drocsid> jhass: I'm familiar with some pcre's not sure how much time it's going to save me though
kitak_ has joined #ruby
<jhass> drocsid: a lot since you can use stuff like String#scan and don't have to build error prone while true break constructs
<hrrz> and the main problem is that i'm not sure it will scale both memory wise (?) and full-wordnet wise
freezey has joined #ruby
jonah_k has joined #ruby
matchaw_ has quit [Quit: No Ping reply in 180 seconds.]
matchaw has joined #ruby
pwh has joined #ruby
confounds has joined #ruby
claymore has quit [Read error: Operation timed out]
Phage has joined #ruby
Kricir has quit [Remote host closed the connection]
<hrrz> centrx: no conclusive say?
Kricir has joined #ruby
Solnse has joined #ruby
Phage has left #ruby ["The Python got away, gotta catch it. Cya later."]
RaCx has quit [Quit: Computer has gone to sleep.]
tfittsy has quit [Remote host closed the connection]
tfitts has joined #ruby
monkegjinni has joined #ruby
ebwise has joined #ruby
LadyRainicorn has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
axl_ has joined #ruby
agjacome has quit [Ping timeout: 260 seconds]
RaCx has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
CpuID has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
Aryasam has quit [Read error: Connection reset by peer]
bogeyd6 has quit [Ping timeout: 245 seconds]
Aryasam has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shredding has quit [Quit: shredding]
zachallett has quit [Remote host closed the connection]
nszceta has joined #ruby
RoryHughes has quit []
mando has joined #ruby
claymore has joined #ruby
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 27.0.1/20140212131424]]
geggam has quit [Remote host closed the connection]
tcopp has joined #ruby
jprovazn has quit [Quit: Odcházím]
stkowski has joined #ruby
Jdubs has quit [Remote host closed the connection]
hrrz has quit [Quit: hrrz]
RoryHughes has joined #ruby
mojjojo has quit [Quit: mojjojo]
jhass is now known as jhass|off
guyz has quit [Max SendQ exceeded]
digifiv5e has joined #ruby
digifiv5e is now known as Guest19736
sethen has quit [Ping timeout: 245 seconds]
claymore has quit [Ping timeout: 264 seconds]
v0n has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
Mousse_ has quit [Ping timeout: 240 seconds]
Al___ has joined #ruby
tjbiddle has joined #ruby
larissa has quit [Quit: Leaving]
geggam has joined #ruby
geggam has quit [Remote host closed the connection]
geggam has joined #ruby
DaniG2k has joined #ruby
xebi has joined #ruby
Guest19736 has quit [Changing host]
Guest19736 has joined #ruby
Guest19736 is now known as guyz
Vivekananda has quit [Read error: Connection reset by peer]
Mousse_ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
dx7 has quit [Remote host closed the connection]
joelroa has joined #ruby
koell has joined #ruby
dx7 has joined #ruby
Aryasam has quit [Ping timeout: 245 seconds]
Wolland has quit []
gbt has joined #ruby
gbt has quit [Client Quit]
bklane has joined #ruby
joelbrewer has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
Aryasam has joined #ruby
dx7 has quit [Ping timeout: 260 seconds]
lachesis has quit [Quit: ZNC - http://znc.in]
RaCx has quit [Quit: Computer has gone to sleep.]
lachesis has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
akemrir has quit [Ping timeout: 245 seconds]
cina has quit [Remote host closed the connection]
dev__ has quit []
Sawbones has joined #ruby
kristiandelay has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
confounds has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cina has joined #ruby
xebi has quit [Ping timeout: 245 seconds]
Aryasam has quit [Ping timeout: 245 seconds]
recurrence has joined #ruby
Sawbones has quit [Ping timeout: 260 seconds]
confounds has joined #ruby
arianit has joined #ruby
Aryasam has joined #ruby
tyl has quit [Ping timeout: 260 seconds]
baordog has quit [Remote host closed the connection]
LekeFly has joined #ruby
esuave has joined #ruby
<esuave> Can someone tell me how to output one of the array elements in the OUTPUT section of this? http://pastebin.com/BE8PkBg0
jonah_k has quit [Remote host closed the connection]
<esuave> so example.. "puts vhost", gives me the whole array, but I just want to print hostname for example..
vlad_starkov has joined #ruby
<esuave> how would I go about doing that? puts vhost['hostname'] does not seem to work
joelroa has quit [Quit: Textual IRC Client: www.textualapp.com]
joelroa has joined #ruby
joelroa has quit [Max SendQ exceeded]
pfg has quit [Quit: Textual IRC Client: www.textualapp.com]
joelroa has joined #ruby
tyl has joined #ruby
RaCx has joined #ruby
burlyscudd has joined #ruby
cina has quit [Ping timeout: 248 seconds]
Al___ has quit [Read error: Connection reset by peer]
<shevy> wat
Al___ has joined #ruby
Notte has quit [Remote host closed the connection]
<apeiros> esuave: uhm, a) it's not an Array, but probably a Hash, b) see Hash#[]
<shevy> now first off this is a hash esuave
<esuave> ahh ok
<shevy> esuave and you need to give the proper name of the key
<shevy> esuave if you are unsure, you can debug like this: require 'pp'; pp your_hash_here
prc has quit [Ping timeout: 248 seconds]
<shevy> that will print the proper structure in a very easy to read manner
<esuave> hrmm
batman___ has joined #ruby
<shevy> the best advice also is to keep your hashes and arrays as simple as possible
<esuave> what do you mean give the proper name of the key?
failshel_ has joined #ruby
mjuszczak has quit [Quit: leaving]
<shevy> the has has stored its content via keys
<shevy> *hash
<shevy> node['apache']['vhost']
stryek has quit [Ping timeout: 245 seconds]
<shevy> here we would assume the hash is node, the first key is 'apache', the second key inside what 'apache' returns to be 'vhost' (if you did not do any mistake)
<shevy> but simply do pp node
<shevy> then you know for sure
<esuave> ah ok
Findegil has quit [Ping timeout: 264 seconds]
<esuave> thank you shevy
Findegil has joined #ruby
batman____ has quit [Ping timeout: 252 seconds]
failshell has quit [Ping timeout: 240 seconds]
<shevy> you got the hash pretty printed? (pp stands for pretty print, there is also the normal p available which does not require anz extra line)
<shevy> hmm *any
<shevy> at work I have to use an english keyboard, this interferes with my brain :(
RoryHughes has quit []
meatherly has quit [Remote host closed the connection]
Aryasam has quit [Ping timeout: 265 seconds]
<esuave> actually.. im still kind of confused where the pp would go in my case..
knigitz has quit [Read error: Connection reset by peer]
RoryHughes has joined #ruby
knigitz has joined #ruby
failshel_ has quit [Ping timeout: 260 seconds]
knigitz has quit [Client Quit]
kindjal has quit [Ping timeout: 260 seconds]
<shevy> you pretty print an object
<shevy> so it must exist when you want to pretty print it
DanBoy has quit [Remote host closed the connection]
<shevy> so: require 'pp'; pp node # obviously node must exist before you can pretty print it
<shevy> >> require 'pp'; array = %w( abc def gheiogehioge ); pp array
<eval-in> shevy => ["abc", "def", "gheiogehioge"] ... (https://eval.in/102511)
Aryasam has joined #ruby
solars has quit [Ping timeout: 265 seconds]
DanBoy has joined #ruby
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fveillette has joined #ruby
<fveillette> anyone can help me with win32-service gem?
Kricir has joined #ruby
shadoi has quit [Quit: Leaving.]
DaniG2k has quit [Quit: leaving]
andy__ has quit [Remote host closed the connection]
maoko has quit [Quit: Textual IRC Client: www.textualapp.com]
danshultz has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
dubsteph has joined #ruby
matt__ has joined #ruby
matt__ has quit [Client Quit]
matt__ has joined #ruby
meatherly has joined #ruby
matt__ has quit [Client Quit]
mjuszczak has joined #ruby
mark_locklear has quit [Ping timeout: 272 seconds]
LekeFly has joined #ruby
mjuszczak has quit [Client Quit]
zoscoy has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
jonno11 has joined #ruby
mjuszczak has joined #ruby
joelbrewer has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
toretore has quit [Quit: Leaving]
deception has quit [Quit: Goodbye]
meatherly has quit [Ping timeout: 240 seconds]
knigitz has joined #ruby
mjuszczak has quit [Client Quit]
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
m8 has quit [Ping timeout: 245 seconds]
caveat- has quit [Ping timeout: 264 seconds]
Aryasam_ has joined #ruby
burgess has joined #ruby
<shevy> hmm
<shevy> I suppose I can not gem install readline?
Aryasam has quit [Read error: Connection reset by peer]
aspires has quit []
<fveillette> anyone can help me with win32-service gem?
drocsid has quit [Ping timeout: 248 seconds]
caveat- has joined #ruby
andy has joined #ruby
Kricir has quit [Ping timeout: 245 seconds]
charliesome has joined #ruby
<benzrf> hello chipotle_
<benzrf> *charliesome
kpshek has quit []
<shevy> nobody uses windows ;P
<charliesome> chipotle is ok too
<shevy> hi chipsome
angusiguess has joined #ruby
<wuest> shevy: what's that? ;p
einarj has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Quit: WeeChat 0.4.3]
<burlyscudd> doing some inter-proc programming and trying to filter a process list by a name — a la "ps aux | grep foobar"
<burlyscudd> does anyone know if Ruby supports anything like this?
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<benzrf> class Block < Struct.new(:txns, :prev, :timestamp, :nonce)
<benzrf> %w/txns prev timestamp nonce/.each {|s| undef :"#{s}="}
<benzrf> SHRIEK IN HORROR
mjuszczak has joined #ruby
DaniG2k has joined #ruby
Aryasam has joined #ruby
<burlyscudd> i AM doing pidfile-based stuff, but I want a sanity check in case the other process didn't exit cleanly and left its pidfile hanging around
steinsgate has quit [Quit: ZNC - http://znc.in]
msmith has quit [Remote host closed the connection]
<shevy> burlyscudd you can .grep in ruby
m104 has joined #ruby
<shevy> but 'ps aux' will have to remain ps aux, you'd have to do it result = `ps aux` in ruby
CpuID has quit [Quit: This computer has gone to sleep]
<burlyscudd> shevy: yeah was hoping for a way to get the process list w/out resorting to shelling out
<shevy> yeah, I am not sure... ps is a binary right?
<razrunelord> Is there a one line to convert an array to a hash with all the keys in the hash being the values of the array?
jonah_k has joined #ruby
<shevy> unsure how else to get the process list
<razrunelord> liner*
<shevy> razrunelord can you give example input for array
<shevy> usually it would be Hash[*array] or some modification to that
Aryasam_ has quit [Ping timeout: 240 seconds]
<razrunelord> [1, 2, 3] should become [ 1=>nil, 2=>nil, 3=> nil]
<shevy> hmm nil ...
vlad_starkov has quit [Remote host closed the connection]
mocfive has joined #ruby
<benzrf> >> [nil].cycle
<eval-in> benzrf => #<Enumerator: [nil]:cycle> (https://eval.in/102512)
<benzrf> >> [1, 2, 3].zip([nil].cycle)
<eval-in> benzrf => [[1, nil], [2, nil], [3, nil]] (https://eval.in/102513)
Vivekananda has joined #ruby
<benzrf> >> Hash[[1, 2, 3].zip([nil].cycle)]
<eval-in> benzrf => {1=>nil, 2=>nil, 3=>nil} (https://eval.in/102514)
<benzrf> very haskell
DaniG2k has quit [Client Quit]
<centrx> razrunelord, If you are on Ruby 2.1 you could do [arr, Array.new(arr.length, nil)].to_h
<razrunelord> benzrf: that didnt give me a hash
<razrunelord> it created an array
<benzrf> >> Hash[[1, 2, 3].zip([nil].cycle)]
<eval-in> benzrf => {1=>nil, 2=>nil, 3=>nil} (https://eval.in/102515)
<benzrf> in haskell i would do
kevind has quit [Quit: kevind]
<shevy> you can drop .cycle I think
andy has quit [Remote host closed the connection]
CpuID has joined #ruby
<razrunelord> benzrf: nvm that worked
<benzrf> :)
<benzrf> fromList $ zip [1, 2, 3] (repeat ())
<shevy> >> Hash[*[1, 2, 3].zip([nil]).flatten]
<eval-in> shevy => {1=>nil, 2=>nil, 3=>nil} (https://eval.in/102516)
<benzrf> why flatten and *
<centrx> benzrf, That was needed in Ruby <1.9
<burlyscudd> heh lol ok figured out a much easier way. derp.
<benzrf> oh
<shevy> hmm
<shevy> >> Hash[[1, 2, 3].zip([nil])]
<eval-in> shevy => {1=>nil, 2=>nil, 3=>nil} (https://eval.in/102517)
DrShoggoth has quit [Quit: Leaving]
tjr9898 has quit []
<razrunelord> can some one explain to me the zip function on an array?
<razrunelord> documentation is not detailed
<shevy> it zips something
msmith has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<shevy> probably some sort of array merge
danshultz has joined #ruby
<shevy> >> [1, 2, 3].zip([1])
<eval-in> shevy => [[1, 1], [2, nil], [3, nil]] (https://eval.in/102518)
alvaro_o has quit [Quit: Ex-Chat]
<benzrf> [a, b, c].zip([1, 2, 3]) becomes [[a, 1], [b, 2], [c, 3]]
<shevy> with the rest defaulting to nil (how odd)
<benzrf> it 'zips' them together
<shevy> like a zipper!
<benzrf> no, zippers are another thing entirely O:
<shevy> wat
<shevy> they are used in pants!
<benzrf> tree >>= left >>= right >>= put "changed!" >>= up >>= up
<benzrf> ^that is a zipper
<shevy> huh
<benzrf> or rather, a usage of a zipper
<shevy> what kind of haskell magic is that
<razrunelord> thanks guys! got it!
<benzrf> fancy schmancy haskell magic
<wuest> Fancy schmancy indeed.
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest77689 has joined #ruby
vlad_starkov has joined #ruby
<shevy> Schmancy Fancy
Guest77689 has quit [Changing host]
Guest77689 has joined #ruby
fedexo has quit [Remote host closed the connection]
<Eiam> get yer haskell outta here
* Eiam stares at cout >>
v0n has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
carif has joined #ruby
<centrx> Go back to Russia!
<razrunelord> This is offtopic, is there a pry/irb like console for Javascript?
<benzrf> node
<centrx> Firefox
<ericwood> the Chrome console
<waxjar> node has a repl, doesnt it
<ericwood> or the node one
<razrunelord> can you require files in the node console?
Sawbones has joined #ruby
<benzrf> yea
<benzrf> require in node works almost the same as in js
CpuID has quit [Quit: Leaving]
<benzrf> well
<benzrf> in terms of usage
hobodave has quit [Ping timeout: 260 seconds]
<benzrf> the result of calling require will /not/ dump stuff into your namespace
slowcon has joined #ruby
<benzrf> rather, it gives you back an object
LekeFly has quit [Quit: Textual IRC Client: www.textualapp.com]
<benzrf> which is equivalent to the 'exports' object after running the other file in its own namespace
<benzrf> so like
<razrunelord> benzrf: lets say I want to use the angular js library. How do I require it in node console
<benzrf> a.js contains 'exports.foo = 3;'
<benzrf> in the console i say a = require('./a')
Al___ has quit [Quit: Al___]
<benzrf> *var a
<benzrf> then i can do a.foo
Salve has quit [Read error: Connection reset by peer]
<benzrf> because in the file i required, foo was assigned on exports
Salve has joined #ruby
<benzrf> paths in require work like in ruby
<razrunelord> awesome! thanks benzrf
<benzrf> np :)
<razrunelord> when I require './angular' I get the elipsis
<razrunelord> is this correct?
<benzrf> i think?
<benzrf> remember, require does not do anything to your namespace
<benzrf> it just returns an object
<razrunelord> oh, ok
<benzrf> like in python, except without even creating a var
vlad_starkov has quit [Remote host closed the connection]
<benzrf> foo = require('./foo') is node for python's "import foo
<benzrf> require basically works like __import__ in py
<benzrf> but with ruby-esque path lookup
dblessing has quit [Quit: dblessing]
<razrunelord> benzrf: maybe it needs a semicolon after every line! Damn ruby made me spoilt
Sawbones has quit [Ping timeout: 265 seconds]
venkat_ has quit [Read error: Connection reset by peer]
venkat__ has joined #ruby
Salve has quit [Read error: Connection reset by peer]
Salve has joined #ruby
kevinykc_ has joined #ruby
jonr22 has quit [Remote host closed the connection]
<shevy> haha
jonr22 has joined #ruby
<shevy> ruby slowly makes you lazy
<shevy> leave while you still can
lkba has quit [Ping timeout: 252 seconds]
vlad_starkov has joined #ruby
Salve_ has joined #ruby
Salve_ has quit [Remote host closed the connection]
kevinykchan has quit [Read error: Connection reset by peer]
Salve has quit [Read error: Connection reset by peer]
Salve has joined #ruby
meatherly has joined #ruby
jonr22 has quit [Read error: Operation timed out]
joelroa has quit [Ping timeout: 248 seconds]
danshultz has quit [Remote host closed the connection]
ffranz has quit [Quit: Leaving]
yarou has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
asmodlol has quit [Remote host closed the connection]
Salve has quit [Ping timeout: 245 seconds]
meatherly has quit [Ping timeout: 264 seconds]
geggam has quit [Remote host closed the connection]
caveat- has quit [Ping timeout: 245 seconds]
Lewix has quit [Remote host closed the connection]
ndrei has joined #ruby
saltsa has quit [Ping timeout: 246 seconds]
Wolland has joined #ruby
saltsa has joined #ruby
Jetchisel has joined #ruby
mojjojo has quit [Quit: mojjojo]
danshultz has joined #ruby
m104 has quit [Quit: bye]
mojjojo has joined #ruby
kevinykc_ has quit [Read error: Connection reset by peer]
mweshi has quit [Quit: mweshi]
caveat- has joined #ruby
kevinykchan has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
knigitz has quit [Read error: Connection reset by peer]
<razrunelord> Given an array. Find pairs of numbers that add up to a given value 'x'.
sdwrage has quit [Quit: This computer has gone to sleep]
<razrunelord> I need an O(n) solution for this in ruby
ndrei has quit [Quit: Lost terminal]
<ericwood> sounds like a mean interview question
sambao21 has joined #ruby
<apeiros> razrunelord: so far this sounds like "somebody please do my work for me for free"
mityaz has quit [Quit: See ya!]
<ericwood> ^^^^^^^^^
<apeiros> we help. we don't provide free work.
<apeiros> show own effort first.
<razrunelord> apeiros: sorry for that
VTLob has quit [Quit: VTLob]
<ericwood> is there an N solution for that even?
<ericwood> I can think of an N^2 obviously
<ericwood> unless there's special properties regard the ordering of the array
<razrunelord> ericwood: thats the one I have for now
<ericwood> I feel like this is one of those ones where you need a math trick
<ericwood> I hate those >.<
sambao21 has quit [Client Quit]
Cache_Money has joined #ruby
<apeiros> I don't think it's actually difficult.
v0n has quit [Quit: WeeChat 0.4.3]
kennym has quit [Remote host closed the connection]
<apeiros> O(n) doesn't mean "single iteration"
v0n has joined #ruby
<razrunelord> I have a solution where I iterate the array once and put the values of keys in a hash map
kennym has joined #ruby
<apeiros> since O(k*n) with k being constant is still O(n)
<razrunelord> in the second iteration of the array, I check if X - A[i] exists in the hash map
danshultz has quit [Remote host closed the connection]
<razrunelord> this is O(N) + O(N) = O(N)
lkba has joined #ruby
<apeiros> correct
<razrunelord> but worst case can be O(n^2)
devdazed has quit [Quit: Bye]
<apeiros> I don't see how that has a worst case O(n^2)
<banister> razrunelord [1, 2,3,4,5,6].combination(2).select { |a, b| (a + b) == x }
<apeiros> banister: not O(n)
<banister> neither r u
sambao21 has joined #ruby
Astralum has quit [Ping timeout: 248 seconds]
<ericwood> apeiros: good point
<razrunelord> apeiros: I guess my solution is optimal then. I was told that it wasn't
<razrunelord> apeiros: sorry if I came off rude askin to do a solution for me. Thanks
<apeiros> razrunelord: I don't know whether it's optimal. it's what I thought of and it's O(n) as far as I can tell.
sdwrage has joined #ruby
<apeiros> razrunelord: no worries. first impression obviously was wrong. sorry if we reacted harsh.
msmith has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Quit: Leaving.]
<apeiros> s/if we reacted/for reacting/
mansi has quit [Quit: Leaving...]
msmith has joined #ruby
kennym has quit [Ping timeout: 245 seconds]
nszceta has quit [Remote host closed the connection]
wald0 has joined #ruby
itadder has joined #ruby
ebwise has quit [Quit: Leaving]
Jb_ has joined #ruby
danshultz has joined #ruby
Guest77689 has quit [Quit: ZNC - http://znc.in]
monkegjinni has joined #ruby
failshell has joined #ruby
RoryHughes has quit [Ping timeout: 265 seconds]
confounds has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
RoryHughes has joined #ruby
monkegjinni has quit [Ping timeout: 252 seconds]
yarou has joined #ruby
<razrunelord> does that look right?
venkat__ has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
failshell has quit [Ping timeout: 272 seconds]
venkat_ has joined #ruby
jonno11 has joined #ruby
kennym has joined #ruby
<itadder> hi
kennym_ has joined #ruby
<itadder> thanks for recomending me progrmaing ruby 1.9 / 2.0 great book
<apeiros> razrunelord: not quite. you have to populate the full hash in the first iteration.
Cache_Money has quit [Remote host closed the connection]
joelroa has joined #ruby
joelbrewer has quit [Quit: Lost terminal]
<apeiros> I'd probably use a Set. works the same internally (Hash with true as values)
sailias has joined #ruby
Kricir has joined #ruby
<apeiros> and I'd probably parametrize X :)
<apeiros> (in your code it's 10, I presume?)
kitak_ has quit [Remote host closed the connection]
<razrunelord> yeah apeiros just a first pass at the solution
kitak_ has joined #ruby
<apeiros> lookup = Set.new(list)
<apeiros> require 'set'
<itadder> rubys make sense it very good lang
wormwood_ is now known as wormwood
<razrunelord> apeiros: set makes better sense yes, but the resason I used hash is these programmers interviewing me might not know ruby
Cache_Money has joined #ruby
<razrunelord> apeiros: I don't want to confuse them
<apeiros> I sure hope they know the concept of a set :)
wormwood has quit [Changing host]
wormwood has joined #ruby
<apeiros> but well, your choice
btanaka has quit [Quit: This computer has gone to sleep]
<razrunelord> Does set take less memory than a hash?
<razrunelord> does it return results in O(1) time as far as lookup?
<apeiros> and idiomatic ruby would probably use select
Kricir has quit [Read error: Connection reset by peer]
<apeiros> as said, Set is internally exactly what you did - a Hash with true as values.
Kricir_ has joined #ruby
kennym has quit [Ping timeout: 252 seconds]
tvw has quit [Remote host closed the connection]
<apeiros> ah, actually a select alone only gives you one of the summands
<itadder> what the purpose of symbols in ruby
Es0teric has quit [Ping timeout: 265 seconds]
Es0teric has joined #ruby
danshultz has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
<apeiros> razrunelord: hm, funky - it doesn't attribute for one edge-case: x-item == x
Kricir_ has quit [Ping timeout: 252 seconds]
danshultz has joined #ruby
<apeiros> is it specified whether the array consists of unique values? and whether the summand must be another item than itself?
<razrunelord> apeiros: oh shit