<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
<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]
<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]
<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?
<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
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]
<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]
<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.)
<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
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
<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.
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?
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]
<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]
<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>
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]
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
<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 :)
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...
<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>
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
<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")
<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
<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
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:
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
<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.
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
<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.
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.
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]
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]
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
<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]
<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]
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
<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