gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Alina-malina has quit [Ping timeout: 265 seconds]
<graft>
the only time i've ever seen anyone assign an ipv6 address was in my kitchen when my roommates were trying to see if they could circumvent our router
jottr has quit [Ping timeout: 255 seconds]
danijoo has quit [Read error: Connection reset by peer]
<graft>
meanwhile my name resolution is like 50X slower because it keeps trying to resolve host names to ipv6 before it tries ipv4
samuel02 has quit [Ping timeout: 250 seconds]
Lucky__ has joined #ruby
danijoo has joined #ruby
<jhass>
that's only until ipv4 finally goes away
dkb20k has quit [Ping timeout: 256 seconds]
agjacome_ has joined #ruby
jonathan_alban has joined #ruby
wjimenez_ has joined #ruby
dandaman has quit [Quit: Leaving.]
tkuchiki has quit [Ping timeout: 258 seconds]
<parabolize>
Is that going to happen before the USA uses metric or after?
<jhass>
who cares for the US
<graft>
i still don't understand why you'd prioritize ipv6 lookups over ipv4 lookups by default
* parabolize
cries
kasperti_ has quit []
ghr has joined #ruby
procat has quit [Ping timeout: 256 seconds]
stunder has quit [Remote host closed the connection]
<jhass>
graft: shouldn't happen afaik unless you got a public prefix available
<jhass>
or at least a v6 default route
agjacome has quit [Ping timeout: 255 seconds]
gsd has joined #ruby
<jhass>
if it is available it makes sense to prioritize, you get a good chance of bypassing some NATting
dandaman has joined #ruby
wjimenez5271 has quit [Ping timeout: 240 seconds]
procat has joined #ruby
<graft>
yeah i still don't understand that whole thing
_lexjm has quit [Read error: No route to host]
_lexjm has joined #ruby
karmatr0n has joined #ruby
jottr has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
baweaver has joined #ruby
karmatr0n has quit [Remote host closed the connection]
rajeshchawla has quit [Remote host closed the connection]
rajeshchawla has joined #ruby
reinaldob has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 272 seconds]
mr_foobar_baz has quit [Quit: WeeChat 1.0.1]
baroquebobcat has quit [Quit: baroquebobcat]
gregoriokusowski has joined #ruby
ta has joined #ruby
aspires has quit []
jonr22 has joined #ruby
mloveless has quit [Read error: Connection reset by peer]
karmatr0n has quit [Ping timeout: 264 seconds]
mary5030_ has quit [Remote host closed the connection]
nateberkopec has joined #ruby
mary5030 has joined #ruby
aspires has joined #ruby
tvw has quit []
henesy has joined #ruby
jonr22 has quit [Remote host closed the connection]
ta has quit [Ping timeout: 265 seconds]
testcore has quit [Ping timeout: 250 seconds]
AndyBotwin has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
rajeshchawla has quit [Remote host closed the connection]
zzzbra has quit [Remote host closed the connection]
o0oo0o has quit [Quit: WeeChat 0.4.3]
rajeshchawla has joined #ruby
aspires has quit []
akurilin has joined #ruby
<akurilin>
quick question: what's the simplest way to run a bunch of shell commands in parallel in ruby?
<akurilin>
I saw resqueue suggested as an optino
rajeshchawla has quit [Client Quit]
<Radar>
akurilin: Do you care that they're all ran at the same time?
rylev has quit [Remote host closed the connection]
axl_ has quit [Quit: axl_]
aspires has joined #ruby
axl_ has joined #ruby
Ankhers has joined #ruby
byprdct has quit [Read error: Connection reset by peer]
<Radar>
akurilin: Or do you care that they're run at some point in the future?
<eam>
system cmd + ?&
axl_ has quit [Client Quit]
Soda has quit [Remote host closed the connection]
geggam has quit [Ping timeout: 250 seconds]
<volty>
cmds.map { |cmd| `#{cmd}` }
<eam>
volty: that's not in parallel
<volty>
no ?
Porpado has quit [Ping timeout: 240 seconds]
<eam>
nope, each backtick will block waiting for the subprocess to complete so it can return the output as a String
<volty>
threads then
whoisjake has joined #ruby
<volty>
?
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
perhaps. mixing threads and forking is a recipe for sadness though
Ankhers has quit [Ping timeout: 250 seconds]
<eam>
cmds.each {|c| system c+?&} will do it if you don't care about collecting the results
Alina-malina has joined #ruby
<eam>
or popen and multiplex collection of the results
<godd2>
wonder if you could get away with .map(&:join).map(&:[], :output)
<terrellt>
No, really, listen to Radar.
siso has joined #ruby
<akurilin>
cool stuff
spastorino has quit [Quit: Connection closed for inactivity]
sdwrage has quit [Quit: Leaving]
<volty>
terrellt: what works only in JRub/Rubinius?
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<terrellt>
Shelling out in threads might work, I'm not sure where MRI's GIL comes into play there.
<godd2>
I think he means that it will only be executed in parallel in jruby/rubinius
<eam>
shelling out without threads is fine so long as you don't block on them
<godd2>
but it will stil be concurrent in mri
tier has joined #ruby
<eam>
if you want to limit the number in flight just multiplex on waitpid
baweaver has joined #ruby
<terrellt>
You could shell out and have it do your work, then report status when it's done through some sort of medium. Maybe redis. You could call it a piece of work. A job even.
<eam>
you don't need redis
<volty>
it executes in parallel here, enough to cmds = Array.new(10) { 'sleep 3' }
sevenseacat has joined #ruby
rshetty has joined #ruby
<eam>
suggesting sidekiq is absurd for such as simple task
<eam>
dependencies on a database just to create a few subprocesses?
<godd2>
volty it won't execute in parallel in MRI, but the thread scheduler will swap so often it will feel like it is
<volty>
eam: i wanted to say the same
* terrellt
shrugs
workmad3 has joined #ruby
<volty>
godd2: i have it here after 3 seconds
lucyinthesky has left #ruby ["Leaving"]
<godd2>
volty that doesn't make it parallel, just concurrent
virtualize has joined #ruby
<volty>
but he wanted the shell processes in paralel, @godd2
<eam>
tasks.each { |t| fork_exec_task(t); jobs += 1; loop { pid = waitpid WNOHANG; jobs -= 1 if pid; break if jobs < max_jobs } } # pseudo-ruby
<eam>
I'm sure there's a gem somewhere that does this
<Radar>
lol you people
<Radar>
Just use Sidekiq... it's good for this kind of thing.
<eam>
absurd
<volty>
the processes do RUN in parallel
<godd2>
volty I know, I'm just saying that it's not the case that it will only work on jruby/rubinius, since mri will schedule the threads well enough, even though it wont be in parallel
<eam>
whenever I find some crappy script and it's like "lol also install redis to run me" I throw it away and generally use something not written in ruby
<benzrf>
eam: lmao
<godd2>
volty parallelism != concurrency
<Radar>
eam: Can't tell if trolling
mloveless has joined #ruby
<eam>
not.
<Radar>
Great.
<Radar>
So why do you think Sidekiq is a "crappy script"?
momomomomo has quit [Quit: momomomomo]
rshetty has quit [Remote host closed the connection]
<Radar>
When mperham has built an entire business of it.
<terrellt>
Radar: He's saying he doesn't want a system dependency for a script.
<eam>
Radar: it's not, it's a fine job queue
<eam>
but I have seen for example <100 line irc bots that want you to install (sometimes multiple!) databases to run them
<eam>
it's just crazy
<eam>
if you need a distributed job queue, yeah sidekiq
<Radar>
You want to debug threading code for running processes in parallel? Go ahead.
<Radar>
Orrrr you could like Sidekiq deal with that crap for you;
<eam>
Radar: the code I pasted you doesn't thread
snath has joined #ruby
<eam>
it multiplexes
<Radar>
forking whatever
<eam>
and yes, it's trivial to debug
delianides has joined #ruby
<eam>
much easier than a distributed job queue
<Radar>
What do you do when it breaks?
<eam>
fix it?
<Radar>
Where's the error logging?
workmad3 has quit [Ping timeout: 265 seconds]
<volty>
godd2: i do not get your point, maybe we lost the context. Isn't the OS that takes care of allocating resources for the subshell ?
<Radar>
What happens when a process returns a non-zero exit code?
<Radar>
Does it have exception notification service integration?
<eam>
Radar: I have fixed bugs in distributed job systems like sidekiq/resque too. I'll take the simple option if I can
<volty>
Radar: who needed error logging here ?
Joufflu has joined #ruby
<Radar>
I'm sure your code is fine for a one-off, but I wouldn't use it in any kind of production system because it hasn't been tested... like Sidekiq consistently has.
<eam>
if you want logging it is trivial to add
<eam>
heh
<Radar>
And yes, you are required to setup Redis to use it. Or you could use RedisToGo.
<eam>
well you might be surprised
<sevenseacat>
wheel called, someone is reinventing it again
<benzrf>
ebins
<eam>
distributed and single process job queues are two very different sized wheels
<volty>
ppl ask simple questions and you come out with a whole encyclopedia (about all possible cases)
<eam>
no need to write either
<rpag>
i think the thread example is fine
<rpag>
it doesn't need to be a solution for a web application
o0oo0o has joined #ruby
delianides has quit [Ping timeout: 264 seconds]
FooMunki has quit [Read error: Connection reset by peer]
<volty>
and, btw 1) you have to study that gem, its commands, options, syntax etc 2) you have to believe it (the gem) does well what it supposed to do 3) i do not see a peer-review there (on gems) , as for the quality
FooMunki has joined #ruby
<volty>
so: for simple problems ad-hoc personal solutions are enough
<eam>
sidekiq is fine. but so is something like forkmanager
<volty>
but YOU, ALREADY, know that. The man that wants to process a few files in parallel 1) didn't know about that 2) anyway has to read the peer-review 3) has to study that gem
<Radar>
volty: You're funny. I like you.
<volty>
thx, honey :)
<Radar>
There's no context about where these files are coming from, either.
<Radar>
We're assuming quite a lot, all of us.
<Radar>
akurilin: Where do the files come from?
njames has quit [Remote host closed the connection]
havenwood has joined #ruby
<volty>
of course, the man wanted parallel bash and we gave it to him, the minimum on the unknown, sufficient :)
<eam>
xargs :P
pygospa has quit [Ping timeout: 240 seconds]
<eam>
scare factor around <20 line snippets of code though
<eam>
smh
rshetty has joined #ruby
reinaldob has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
jjasonclark has quit [Quit: jjasonclark]
<volty>
now I would like an advice from you
pygospa has joined #ruby
<volty>
I was writing a spell-server, with a spell pipe. writing to aspell and reading its output
Jake232 has joined #ruby
<volty>
but if I don't wait i receive blocking, if I wait it's too slow for the purpose (syntax highlighter
<volty>
)
<volty>
I did it with read_nonblock
Sht0 has quit []
Photism_ has joined #ruby
charliesome has joined #ruby
<volty>
hints, suggestions, what else? should I rescue and retry at a rate of 0.05 seconds ?
soulcake has quit [Ping timeout: 260 seconds]
<eam>
volty: I'm not clear what you've got, share code?
<eam>
read will return "" if the fd evented as readable but doesn't read anything
soulcake has joined #ruby
<volty>
ops, ya ya, i can determine if everything is there because of the markup of aspell
jottr has quit [Ping timeout: 240 seconds]
Porpado has joined #ruby
tier has quit [Remote host closed the connection]
<volty>
when it is complete, like '*\n.data\n$", the answer is complete
<volty>
ok, thx
fabrice31 has quit [Ping timeout: 244 seconds]
<eam>
often you're selecting on more than one fd and potentially returning (and looping over) multiple descriptors that event
mary5030 has joined #ruby
Ankhers has joined #ruby
klmlfl has quit [Remote host closed the connection]
bbloom has quit [Read error: Connection reset by peer]
jimbach has quit [Remote host closed the connection]
<volty>
yes , I see from the docs
bbloom has joined #ruby
treehug88 has quit []
nb_bez___ has joined #ruby
Porpado has quit [Ping timeout: 240 seconds]
mistermocha has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
nateberkopec has quit [Quit: Leaving...]
tkuchiki has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<volty>
I prefer to write this kind of things with QProcess (Qt), that fires signals on data_ready, but cannot be used because of the "real-time" syntax-highlighter
jimbach has joined #ruby
slawrence00 has joined #ruby
o0oo0o has quit [Quit: WeeChat 0.4.3]
gsd has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
jimbach has quit [Remote host closed the connection]
<eam>
not familiar with qt
Ankhers has quit [Remote host closed the connection]
Bira has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Techguy305 has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 244 seconds]
mistermocha has quit [Ping timeout: 265 seconds]
siso_ has joined #ruby
Techguy305 has joined #ruby
dkb20k has joined #ruby
siso has quit [Ping timeout: 272 seconds]
siso_ is now known as siso
jsaak has joined #ruby
Bira has quit [Ping timeout: 264 seconds]
<volty>
not about you, because everybody specializes in what he needs and thinks is better, but I find that it is a pity that too few rubyists use it
maletor has quit [Quit: Computer has gone to sleep.]
gregoriokusowski has quit [Quit: gregoriokusowski]
baweaver has quit [Remote host closed the connection]
Lightsword has joined #ruby
nobitanobi has quit [Remote host closed the connection]
<gebbione>
yep i realise there is no need now, but bash needs it
<eam>
you aren't sudoing your bash script
<sevenseacat>
bash does, curl doesnt
<eam>
curl | sudo bash
<gebbione>
wasnt
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
gsd has joined #ruby
<eam>
obligatory sudo is terrible
diegoviola has joined #ruby
<sevenseacat>
sudo all of the thingz!!!
NoNMaDDeN has quit [Ping timeout: 258 seconds]
t_mmyv has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<diegoviola>
you don't want to run everything as root
mary5030_ has quit [Remote host closed the connection]
<gebbione>
not on prod
mary5030 has joined #ruby
<gebbione>
on a super trashable vm with no public scope who cares
beef-wellington has quit [Ping timeout: 265 seconds]
zzzllnlnk909 has joined #ruby
zzzbra has joined #ruby
<sevenseacat>
well if you have no idea what you're doing, you should probably care :)
joonty has joined #ruby
tyll_ has joined #ruby
<sevenseacat>
so you can learn what to do and what not to do
Blizzy has joined #ruby
iamjarvo has joined #ruby
dermothaughey has quit [Remote host closed the connection]
_5kg has quit [Remote host closed the connection]
tyll has quit [Ping timeout: 255 seconds]
dermothaughey has joined #ruby
<eam>
dermothaughey: you don't want to use sudo to elevate privs either
<eam>
diegoviola: even ^^
mary5030 has quit [Ping timeout: 258 seconds]
<eam>
it's a pretty crappy mechanism
hmsimha_ has quit [Ping timeout: 255 seconds]
<diegoviola>
I use su
<eam>
I use sshd
rshetty has joined #ruby
<eam>
and I don't have any setuid binaries at all
ghr has joined #ruby
fabrice31 has joined #ruby
wsmoak has quit [Quit: wsmoak]
<jhass>
so you allow remote root login? mmh
rshetty has quit [Remote host closed the connection]
dermothaughey has quit [Ping timeout: 245 seconds]
hiyosi has joined #ruby
yetanotherdave has quit [Ping timeout: 255 seconds]
ghr has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
karmatr0n has joined #ruby
hiyosi has quit [Ping timeout: 255 seconds]
zzzllnlnk909 has quit [Ping timeout: 246 seconds]
msmith_ has quit [Remote host closed the connection]
gebbione has left #ruby ["Ex-Chat"]
joonty has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
davasaurous has joined #ruby
kish has quit [Ping timeout: 244 seconds]
Duckily has quit [Ping timeout: 240 seconds]
kish has joined #ruby
ARCADIVS has joined #ruby
nateberkopec has joined #ruby
mugiwara has joined #ruby
<mugiwara>
=/ not happy... been trying to learn rails. I'm working through the codecademy series (after 100%ing the ruby tutorials), and I also have sublime text 3 and my terminal open. Basically any task I do in codecademy, I also do in my real rails environment.
<mugiwara>
I was having a fantastic time at the start, because I finally grasped the concept of MVC and was able to setup the Pages controller, page routes, and views, but once we started going over Models and index/show/edit, etc, its getting very complicated and I'm losing motivation
<sevenseacat>
yes, there is a learning curve to rails
<mugiwara>
I need help, motivation, encouragement. Anything you guys can provide
rainfyre has quit [Ping timeout: 272 seconds]
ericmathison has quit [Quit: leaving]
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rainfyre has joined #ruby
<benzrf>
mugiwara: learn haskell instead !
<benzrf>
[i kid]
BTRE has quit [Quit: Leaving]
<mugiwara>
The first controller was for website pages, and we would use a method to send to route and load a page (using a view of course). But then we created a new controller for product categories... I have no idea why I would ever want a separate page called website.com/categories/index to show all categories, or /edit to edit a particular category.. Websites just don't work like that
phutchin1 has quit [Ping timeout: 255 seconds]
beneggett has joined #ruby
pengin has joined #ruby
<mugiwara>
So I guess I'm just not a fan of the direction the tutorial is going. Maybe it would make sense if I continue it, but I feel like now that I understand the concept of MVC, the michael hartl tutorial may not be so intimidating this time around
lkba has quit [Ping timeout: 265 seconds]
arup_r has joined #ruby
<jhass>
(#RubyOnRails)
<godd2>
yay for havenwood's lightning talk at rubyconf
<mugiwara>
jhass: getting errors. "#rubyonrails Cannot join channel (+r) - you need to be identified with services
Techguy305|2 has joined #ruby
agjacome_ has quit [Quit: leaving]
<jhass>
mugiwara: MVC is the pattern used to structure your code (and actually not an architecture pattern, but let's leave this aside), the pattern used there to structure your URLs is called REST
<jhass>
and to join the channel: /msg NickServ help
rshetty has joined #ruby
freerobby has joined #ruby
Techguy305 has quit [Ping timeout: 240 seconds]
<mugiwara>
jhass: thanks for the help dude
<mugiwara>
jhass: I believe that sticking with this will be worth it. I don't want to give up at the first sign of real confusion. This is uncharted territory for me ...
<godd2>
#ruby, the number one place to learn how to get the Nickserv help menu
<jhass>
sure, keep going
pengin has quit [Remote host closed the connection]
samuel02 has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
<mugiwara>
godd2: sorry, i'm new and dont ever use IRC
pengin has joined #ruby
<godd2>
mugiwara lol don't worry, you're in good company
hmsimha_ has joined #ruby
msmith has joined #ruby
kp666 has joined #ruby
beneggett has quit [Ping timeout: 245 seconds]
<Radar>
mugiwara: may I PM?
<mugiwara>
Radar: sure
Techguy305|2 has quit [Ping timeout: 265 seconds]
<Radar>
thank you
beneggett has joined #ruby
pengin has quit [Ping timeout: 264 seconds]
yetanotherdave has joined #ruby
samuel02 has quit [Ping timeout: 272 seconds]
nb_bez___ has quit [Quit: Connection closed for inactivity]
radic has joined #ruby
oo_ has joined #ruby
j_mcnally has quit [Ping timeout: 240 seconds]
msmith has quit [Ping timeout: 264 seconds]
Andrevan has quit [Quit: WeeChat 0.4.4-dev]
karmatr0n has quit [Remote host closed the connection]
deric_skibotn has quit [Ping timeout: 255 seconds]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
Takle has joined #ruby
kireevco has joined #ruby
frog0909 has quit [Remote host closed the connection]
vimer has quit [Quit: leaving]
ta has quit [Ping timeout: 258 seconds]
kireevco has quit [Client Quit]
rtlong has joined #ruby
chipotle has quit [Quit: cya]
Takle has quit [Ping timeout: 272 seconds]
vimer has joined #ruby
rtlong_ has quit [Ping timeout: 255 seconds]
rtlong has quit [Ping timeout: 255 seconds]
IronKoopa has joined #ruby
nobitanobi has joined #ruby
<IronKoopa>
Hi guys, is there a rails-specific channel on freenode?
ramfjord has quit [Ping timeout: 264 seconds]
<sevenseacat>
#rubyonrails
<cleopatra>
#RubyOnRails
rshetty has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
rshetty has joined #ruby
boombadaroomba has quit [Remote host closed the connection]
braincra- has quit [Quit: bye bye]
ghr has joined #ruby
<eam>
jhass: of course, why not allow remote root login?
<eam>
better than copying the root password out to a remote host
<eam>
(which sudo typically requires)
tatsuo has joined #ruby
braincrash has joined #ruby
Spami has quit [Ping timeout: 255 seconds]
bluOxigen has joined #ruby
ghr has quit [Ping timeout: 245 seconds]
Spami has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
kireevco has joined #ruby
procat has quit [Ping timeout: 258 seconds]
geggam has joined #ruby
arup_r has quit [Quit: Leaving.]
aspires has joined #ruby
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
psy_ has quit [Read error: Connection reset by peer]
wjimenez5271 has joined #ruby
psy_ has joined #ruby
Techguy305 has joined #ruby
psy__ has joined #ruby
Techguy305 has quit [Max SendQ exceeded]
parabolize has joined #ruby
davasaurous has quit [Remote host closed the connection]
philwantsfish has quit [Ping timeout: 250 seconds]
msmith has joined #ruby
Bira has joined #ruby
msmith has quit [Remote host closed the connection]
Techguy305 has joined #ruby
psy__ has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
jlast has joined #ruby
Bira has quit [Remote host closed the connection]
Bira has joined #ruby
IronKoopa has quit [Quit: Page closed]
gmas has joined #ruby
jlast has quit [Remote host closed the connection]
rtlong has joined #ruby
gmas has quit [Client Quit]
jlast has joined #ruby
aspiers has joined #ruby
kyb3r_ has joined #ruby
mugiwara has left #ruby [#ruby]
njames has joined #ruby
tatsuo has quit [Remote host closed the connection]
_5kg has joined #ruby
workmad3 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jonathan_alban has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arescorpio has quit [Excess Flood]
njames has quit [Remote host closed the connection]
lemur has joined #ruby
Eiam has joined #ruby
davasaurous has joined #ruby
karmatr0_ has quit [Remote host closed the connection]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
teejar has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 250 seconds]
tatsuo has joined #ruby
rtlong has quit [Quit: Leaving...]
teejar has joined #ruby
zdaniel has joined #ruby
<zdaniel>
hey all, so I want to create a CLI for an application that I'm working on, but I don't want it to consists of running the file with arguments. I want running the file to open (essentially) a custom irb. Are there any gems that you guys know of to do that?
<i8igmac>
but yes, if i can get past the frustration
mary5030 has quit [Remote host closed the connection]
<i8igmac>
is that like "illiterate"
<i8igmac>
like retarded
<i8igmac>
lol
mary5030 has joined #ruby
<i8igmac>
,-)
<zdaniel>
woah bud. lets not use the r word.
<i8igmac>
i feel stupid lol
<i8igmac>
good job
<zdaniel>
anyway. That gem is almost definitely the best way to parse and handle an html response.
<zdaniel>
its pretty widely used, from what I know.
bbloom has quit [Read error: Connection reset by peer]
NoNMaDDeN has quit [Remote host closed the connection]
<sevenseacat>
very widely used.
<i8igmac>
i have come across this gem
<i8igmac>
i avoid gems, i need to start looking into these things
<zdaniel>
you wut no
<zdaniel>
**wut now
<zdaniel>
avoid gems?
<zenspider>
NIH
<sevenseacat>
lol
pietr0 has joined #ruby
<i8igmac>
i struggle
<i8igmac>
lol
<sevenseacat>
reinvent *all of the wheels*
<i8igmac>
YES
ghr has quit [Ping timeout: 258 seconds]
<zdaniel>
haha
bbloom has joined #ruby
<zdaniel>
gems are *litrally*(ann perkins) code other people wrote just for you.
<i8igmac>
for EVERY one
Techguy305|2 has joined #ruby
mary5030 has quit [Ping timeout: 258 seconds]
geggam has quit [Ping timeout: 255 seconds]
<zdaniel>
the first step to approaching almost any problem in ruby is to try and find a gem.
davasaurous has joined #ruby
<i8igmac>
so for instance, Nokogiri...
<zdaniel>
I had a project that was estimated for me at 4 days of work to do alone. I found a gem, and finished just after lunch. Now I don't have to show up for work for 3 days.
<zdaniel>
win
<i8igmac>
i guess i strugle with documentation
jenrzzz has joined #ruby
<zdaniel>
lets address that then.
<zdaniel>
because documentation is meant to remove struggling.
<i8igmac>
<tr><td>xxx.xxx.xxx</td><td>xxxx</td>
<i8igmac>
the gem that is widely used
<i8igmac>
Nokigiri
<zdaniel>
yeah
<i8igmac>
should pull data based on html tags
<zdaniel>
yep
Techguy305 has quit [Ping timeout: 264 seconds]
<i8igmac>
lol
<i8igmac>
Nokogiri.XML('<td>')
<zdaniel>
well
<zdaniel>
this isn't XML
<zdaniel>
so not that.
maestrojed has joined #ruby
sinequanon has joined #ruby
<zdaniel>
have you looked at stack overflow?
<pipework>
zdaniel: Take the time to learn how the gem works then.
Blizzy has quit [Ping timeout: 244 seconds]
<zdaniel>
pipework: did I say something incorrect?
<lampd1>
i think pipework may have gotten you and i8igmac mixed up
<pipework>
zdaniel: No, just that if you finished work early, you should treat yourself to learning how the gem that solved your problem works.
<lampd1>
;)
<lampd1>
ah
<zdaniel>
oh I see what you mean
<lampd1>
regarding that
<pipework>
[21:15:01] <zdaniel> I had a project that was estimated for me at 4 days of work to do alone. I found a gem, and finished just after lunch. Now I don't have to show up for work for 3 days.
<pipework>
[21:15:03] <zdaniel> win
<lampd1>
i was confused too :P
Ancient has joined #ruby
<i8igmac>
i see
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zdaniel>
I won't really be skipping work for 3 days.
<zdaniel>
theres always more to do lol
<lampd1>
reading reddit for 3 days moar like it
<zdaniel>
iqigmac
kohgpat has joined #ruby
<i8igmac>
a high five is necessary
<zdaniel>
iqigmac: so what has the docs yielded?
<zdaniel>
**have
<i8igmac>
Nokogiri.html
<zdaniel>
I don't want to tell you, since you mentioned wanting to get better at reading docs, but I'm looking at Nokogiri::HTML
mji has quit [Quit: Leaving]
<zdaniel>
making a Nokogir document with something like html_doc = Nokogiri::HTML("<html><body><h1>Mr. Belvedere Fan Club</h1></body></html>")
henesy has quit [Remote host closed the connection]
rahult has quit [Quit: Back to the world of zombies]
<zdaniel>
I think the standard process would be to just parse the entire response as a nokogiri document.
<i8igmac>
i do need to spend some spare time reading the documentation on this gem
<i8igmac>
read documentation or... build a octagon wheek
<i8igmac>
wheel
AndroUser466 has joined #ruby
<zdaniel>
I would wager that being able to read documentation is more important to being a programmer than even being able to program.
<i8igmac>
well, my secret is... im a basement ruby hobbyist
<i8igmac>
my hobby is ruby... its stuck my my brain all day long at work
<i8igmac>
i think about ruby all day long\
<zdaniel>
you should get really good at it and then get a job doing it.
<zdaniel>
thats what I did.
<zdaniel>
wait, that sounded horrible
NoNMaDDeN has joined #ruby
<zdaniel>
let me rephrase
kohgpat has quit [Ping timeout: 265 seconds]
<zdaniel>
you should get good enough at it to get a job doing it
<zdaniel>
and then get a job doing it.
JohnBat26 has joined #ruby
arup_r has joined #ruby
<i8igmac>
i make 20 per hr currently
<i8igmac>
i cant give that up
karmatr0n has joined #ruby
<zdaniel>
are you under the impression that programming is not a lucrative career?
<i8igmac>
im sure computer networking/programing have higher potential
<zenspider>
ruby is stuck in your brain all day long and you avoid all gems?? wtf
troyready has quit [Ping timeout: 240 seconds]
<zdaniel>
haha
samuel02 has quit [Ping timeout: 264 seconds]
<zenspider>
[ ] Plays well with others
<zenspider>
[X] Does not play well with others
<i8igmac>
its all about documentation
NoNMaDDe_ has joined #ruby
<i8igmac>
seems like there is a big gap
<zenspider>
no it's not. that's pathological
<zdaniel>
a big gap in what?
<sevenseacat>
lol
NoNMaDDeN has quit [Read error: No route to host]
<i8igmac>
the problems i seek to solve and the rest of the functionality of the gem
<sevenseacat>
and youre convinced this is a problem with the gem?
<i8igmac>
no
<zdaniel>
so it does...too much stuff?
aspires has joined #ruby
<sevenseacat>
because the documentation doesnt write the code to cover your exact use case?
sirene has joined #ruby
<zdaniel>
dear god we will make millions.
<pipework>
I mean, as a hobbyist, there's nothing wrong with spending the time to build things yourself if that's what makes you happy.
<i8igmac>
lol
rainfyre has quit [Ping timeout: 240 seconds]
Cache_Money has joined #ruby
Joufflu has quit [Read error: Connection reset by peer]
jusmyth has joined #ruby
freerobby has quit [Quit: Leaving.]
rainfyre has joined #ruby
<i8igmac>
i feel that its quicker to build my own function then follow the documentation of a gem... BUT the end resault is ugly and Wont work well with others
<zdaniel>
we should make documentation whereby you put in your existing code that tries to use said gem, and it tells you which part of the documentation pertains to you.
tatsuo has quit [Remote host closed the connection]
davasaurous has joined #ruby
<pontiki>
*sigh*
<zdaniel>
oh yeah, we left you hanging
blacknicker has joined #ruby
rahult has joined #ruby
rkazak_ has joined #ruby
JoshGlzBrk has joined #ruby
<Areessell>
I was using Lingo which is an OSX IRC client for a few days. The damn thing would memory leak and bloat up to over 4GB of RAM when closing a convo or channel O_o Switched to irssi
JoshGlzBrk has quit [Client Quit]
<zenspider>
Areessell: I realize we're mentarbating here, but don't assume it is an array. Could just be array-like.
<blacknicker>
Permission denied (publickey). <----------- i tried everything to fix this problem how can i fix it?
<sevenseacat>
how vague
mistermocha has quit [Remote host closed the connection]
<blacknicker>
i'm trying to push to bitbucket
<zdaniel>
technically it just has to respond to explode
lemur has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
lemur has joined #ruby
HayesHimself has joined #ruby
supersymmetry has joined #ruby
ndrei_ has joined #ruby
HayesHimself has quit [Client Quit]
HayesHimself has joined #ruby
lemur has quit [Ping timeout: 255 seconds]
patrick99e99 has quit [Ping timeout: 265 seconds]
ikaros has joined #ruby
rylev has joined #ruby
Hobogrammer has quit [Ping timeout: 255 seconds]
mbwe1 is now known as mbwe
foooobear has joined #ruby
turtlejim has joined #ruby
lolmaus has joined #ruby
vimer has joined #ruby
zorak8 has joined #ruby
dcarmich has joined #ruby
CustosLimen has joined #ruby
postmodern has quit [Quit: Leaving]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
rylev has quit [Remote host closed the connection]
sevenseacat has quit [Remote host closed the connection]
tgandrews has quit [Quit: tgandrews]
arup_r has joined #ruby
samuel02 has quit [Remote host closed the connection]
nvdpl has joined #ruby
tgandrews has joined #ruby
tesuji has joined #ruby
agit0 has joined #ruby
elaptics`away is now known as elaptics
<turtlejim>
I am just starting to learn ruby, does rails have any major benefits?
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
suy|BNC has quit [Ping timeout: 272 seconds]
DefV_ is now known as DefV
sk87 has joined #ruby
govg has quit [Quit: Lost terminal]
banister_ has joined #ruby
banister has quit [Read error: Connection reset by peer]
govg has joined #ruby
ghr has joined #ruby
suy|BNC has joined #ruby
giuseppesolinas has joined #ruby
rkazak_ has left #ruby [#ruby]
tokik has quit [Ping timeout: 256 seconds]
nvdpl has quit [Ping timeout: 264 seconds]
ghr has quit [Ping timeout: 244 seconds]
<zenspider>
yes
Abhijit has joined #ruby
<zenspider>
exactly 7 of them
nvdpl has joined #ruby
<zenspider>
and 7 is a good number... so you should do that
Zettam has joined #ruby
Axy has quit [Read error: Connection reset by peer]
<Abhijit>
are we talking about the rings? 7 off them?
maximski has joined #ruby
<zenspider>
exactly
<turtlejim>
what about the one ring to rule them all?
<zenspider>
that's the middle ring that coats the candy center
rshetty has quit [Remote host closed the connection]
<Abhijit>
:-)
jmdade has joined #ruby
rshetty has joined #ruby
yetanotherdave has joined #ruby
Bira has joined #ruby
vinleod has joined #ruby
jheg has joined #ruby
Takle has joined #ruby
melik has quit [Quit: (null)]
melik has joined #ruby
Bira has quit [Ping timeout: 240 seconds]
ta has joined #ruby
workmad3 has joined #ruby
yetanotherdave has quit [Ping timeout: 258 seconds]
NoNMaDDeN has quit [Quit: Leaving...]
roolo_ has joined #ruby
clauswitt has quit [Max SendQ exceeded]
startupality has joined #ruby
sigurding has quit [Quit: sigurding]
workmad3 has quit [Client Quit]
Pumukel has joined #ruby
arup_r has quit [Remote host closed the connection]
clauswitt has joined #ruby
melik has quit [Ping timeout: 272 seconds]
arup_r has joined #ruby
NoNMaDDeN has joined #ruby
rylev has joined #ruby
ghr has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
lxsameer has joined #ruby
rshetty has joined #ruby
dANO has joined #ruby
rylev has quit [Client Quit]
corehook has joined #ruby
timonv_ has quit [Read error: Connection reset by peer]
danjordan has joined #ruby
workmad3 has joined #ruby
pandaant has joined #ruby
osvimer has joined #ruby
ringarin has quit [Quit: Leaving]
joonty has joined #ruby
User458764 has joined #ruby
tgandrews has quit [Quit: tgandrews]
ozzloy has quit [Ping timeout: 264 seconds]
tgandrews has joined #ruby
hiyosi has joined #ruby
marr has joined #ruby
tgandrews has quit [Client Quit]
yeticry has quit [Ping timeout: 265 seconds]
tgandrews has joined #ruby
jds has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
yeticry has joined #ruby
tatsuo has quit [Remote host closed the connection]
doev has joined #ruby
sigurding has joined #ruby
hiyosi has quit [Ping timeout: 256 seconds]
lkba has quit [Ping timeout: 265 seconds]
blackmesa has joined #ruby
mikepack has joined #ruby
Guest34224 has quit [Quit: This computer has gone to sleep]
zorak8 has quit [Ping timeout: 245 seconds]
dcunit3d has joined #ruby
Guest88445 is now known as kaspergrubbe
ringarin has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
corehook has quit [Remote host closed the connection]
musl has quit [Quit: WeeChat 1.0.1]
havenwood has joined #ruby
Morkel has quit [Quit: Morkel]
tgandrews has quit [Quit: tgandrews]
mloveless has quit [Remote host closed the connection]
Jet4Fire has quit []
FooMunki has joined #ruby
mloveless has joined #ruby
AFKGeek has quit [Ping timeout: 258 seconds]
iml has joined #ruby
dcunit3d has quit [Ping timeout: 250 seconds]
timonv_ has joined #ruby
tgandrews has joined #ruby
rkalfane has joined #ruby
Lightsword_ has joined #ruby
Mateon1 has joined #ruby
AlexRussia has joined #ruby
budhram has joined #ruby
Lightsword has quit [Ping timeout: 265 seconds]
Lightsword_ is now known as Lightsword
AFKGeek has joined #ruby
mloveless has quit [Ping timeout: 250 seconds]
nobitanobi has joined #ruby
codeoptimist has left #ruby [#ruby]
ht__th has quit [Remote host closed the connection]
Sp4rKy has quit [Quit: Changing server]
AFKGeek has quit [Client Quit]
ht__th has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
rshetty has quit [Remote host closed the connection]
yfeldblum has joined #ruby
rshetty has joined #ruby
jusmyth1 has joined #ruby
nobitanobi has quit [Ping timeout: 256 seconds]
grzywacz has quit [Ping timeout: 264 seconds]
lidaaa has quit [Ping timeout: 265 seconds]
ReRixo has joined #ruby
yfeldblum has quit [Remote host closed the connection]
AFKGeek has joined #ruby
rshetty_ has joined #ruby
<teotwaki>
turtlejim: I'd consider rails and ruby to be fairly distinct topics.
Guest34224 has joined #ruby
yfeldblum has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
josephndenton has joined #ruby
<teotwaki>
turtlejim: you can't really say that "rails has major benefits over ruby", they're two completely different things. One is a web-oriented framework, the other is a language.
<workmad3>
teotwaki: how about 'If you're developing web applications, using Rails provides major benefits over using plain Ruby and building everything from scratch'? :P
abuzze has joined #ruby
<teotwaki>
depending on your use case
<workmad3>
heh
reinaldob has joined #ruby
boombadaroomba has joined #ruby
<teotwaki>
if you only want to print "." on GET requests, Rails might be overkill.
echooo has joined #ruby
budhram has left #ruby [#ruby]
<workmad3>
teotwaki: I'd be dubious about calling that a web app, but ok, I'll stop being a facetious pedant now ;)
josephndenton has quit [Ping timeout: 272 seconds]
giuseppesolinas has joined #ruby
reinaldob has quit [Read error: Connection reset by peer]
boombadaroomba has quit [Ping timeout: 255 seconds]
Seich has quit [Ping timeout: 272 seconds]
<maahsa>
Is there any clever schemes to make sure your ruby script calls specific versions of system commands?
terlar has quit [Ping timeout: 264 seconds]
<maahsa>
i.e. gnuplot 4.2 and not gnuplot 3.9
AFKGeek has joined #ruby
AFKGeek has quit [Read error: Connection reset by peer]
danijoo has quit [Read error: Connection reset by peer]
gregoriokusowski has joined #ruby
iml has quit []
danijoo has joined #ruby
<workmad3>
maahsa: provide the full path to the version you want to run?
Mateon1 has quit [Ping timeout: 244 seconds]
grzywacz has joined #ruby
vinleod has joined #ruby
<maahsa>
workmad3: and if it should be portable :o( ?
tgandrews has quit [Quit: tgandrews]
<maahsa>
relying on $PATH is bad
<workmad3>
maahsa: afaik, there isn't a portable way of specifying specific versions
drawingthesun has joined #ruby
<workmad3>
maahsa: hell, half the package managers out there don't let you install 2 versions of the same package side-by-side
<maahsa>
workmad3: and no convention that all commands have a --version option that outputs something sane :o(
<workmad3>
maahsa: some use --version, some only use -v, some -version, some just a first 'version' command...
<maahsa>
workmad3: and -vv = very version ?
drawingthesun has quit [Max SendQ exceeded]
despai has quit [Quit: This computer has gone to sleep]
_5kg has quit [Ping timeout: 264 seconds]
drawingthesun has joined #ruby
<maahsa>
workmad3: so what about for a particular command (e.g gnuplot) get the md5sum and look in some database ...
<maahsa>
if there was such a database
_5kg has joined #ruby
<workmad3>
maahsa: what if it's the right version, but hand compiled with some custom archictecture-specific optimisations? ;)
msmith_ has joined #ruby
<maahsa>
workmad3: ew :o(
* maahsa
failed getting any result googling for 85f3b661e7e9490e8eb67cd89ff6486f
<workmad3>
hehe
<maahsa>
workmad3: I sort of expected a hit to homebrew's gnuplot
krz has quit [Quit: WeeChat 1.0.1]
krz has joined #ruby
<workmad3>
maahsa: hehe
Seich has joined #ruby
corehook has joined #ruby
<maahsa>
so options are: 1) run --version or such and deal with it. 2) use full path (if it helps). 3) setup symlinks with version to commands
tkuchiki has quit [Remote host closed the connection]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<maahsa>
I hate them all.
Bira has joined #ruby
tkuchiki has joined #ruby
yetanotherdave has joined #ruby
<workmad3>
maahsa: 4) check in a variety of places and give a command line option to point to a specific gnuplot that overrides the check
<maahsa>
workmad3: I hate that as well :o)
ehlovader has quit [Quit: see you space cowboy]
<workmad3>
maahsa: I guessed you would :P
<maahsa>
no wonder why there is such a big hype about docker
msmith_ has quit [Ping timeout: 244 seconds]
gaussblurinc1 has joined #ruby
<workmad3>
maahsa: option 5) try to run with whatever gnuplot is available and throw an error if it doesn't work, informing the user that they should make sure gnuplot 3.9 is available and pass it to the command with --gnuplot /path/to/bin
<workmad3>
maahsa: or option 6) create an omnibus installation of your app that includes embedded versions of all the shit you need, and only look at stuff inside your embedded omnibus install
<maahsa>
workmad3: actually, what I am after is not user interaction, but that for some analysis the versions of all uses software is recorded in the logs so the analysis may be reproduced some day.
<maahsa>
used*
kp666 has quit [Read error: Connection reset by peer]
dANO has quit [Remote host closed the connection]
Oog has joined #ruby
<Oog>
best way to find memory leaks?
AFKGeek has joined #ruby
<workmad3>
maahsa: I'm not sure there's a good way to do that without creating an archive of all the software and related libraries you're using (potentially all the way down to the kernel), fingerprinting the hardware and then recording all of that
yetanotherdave has quit [Ping timeout: 245 seconds]
tkuchiki has quit [Ping timeout: 245 seconds]
bal has quit [Ping timeout: 255 seconds]
Bira has quit [Ping timeout: 264 seconds]
<workmad3>
maahsa: after all, what do you do if you've got something like an original Pentium with its dodgy arithmetic... you'd need to keep track that an analysis was run on that particular hardware to reproduce the results
<maahsa>
workmad3: I wonder if there is a compromise that woun't drive you nuts.
arup_r has quit [Remote host closed the connection]
<maahsa>
workmad3: I would skip recording hardware details.
jusmyth1 has left #ruby [#ruby]
<workmad3>
maahsa: so you'd have no way to reproduce that particular run from the details you've stored...
last_staff has joined #ruby
ht__th has quit [Read error: Connection reset by peer]
last_staff has quit [Client Quit]
<ddv>
Oog: You could run your app on jruby and use some of the profiler tools available for Java
<maahsa>
workmad3: maybe I should just walk away from this stinker and find something else to do :o)
<workmad3>
maahsa: and hell, I'd guess you'd need to be sure that operations being pipelined in different orders wouldn't impact the results too (dunno what it's an analysis of, so couldn't say whether that's important or not)... if it is, you're pretty much screwed anyway though :)
despai has joined #ruby
ht__th has joined #ruby
fgo has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<maahsa>
workmad3: well, I am recording the commands used and the order already. Just not the versions.
dANO has joined #ruby
<workmad3>
maahsa: I'm talking about non-deterministic CPU pipelining...
<maahsa>
workmad3: oh
rkalfane has joined #ruby
<workmad3>
maahsa: i.e. the order that operations are actually being processed by the CPU
Guest34224 has quit [Quit: This computer has gone to sleep]
<ddv>
Oog: visualvm will even show you nice graphs of probable locations to look at
techsethi has quit [Quit: techsethi]
<workmad3>
maahsa: it's all really dependent on how far down the rabbit hole of 'exact reproduction' you want to go, tbh
despai has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
techsethi has joined #ruby
<Oog>
ddv: how is it to get jruby working on osx...
<Oog>
and will it work with rails/rvm?
KC9YDN has joined #ruby
MrIlyas has joined #ruby
<Oog>
how can there be memory leaks if it is garbage collected
tgandrews has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
ReRixo has quit [Ping timeout: 255 seconds]
<maahsa>
workmad3: for now I just wanted version numbers on stuff like gnuplot - but that is non-trivial as it happens
<canton7>
collections of objects which keep growing instead of being flushed is a simple example
<txdv>
Oog: if you don't release an object by deferencing it, the gc can't collect it
vimer has quit [Quit: leaving]
arup_r has joined #ruby
<Oog>
i have to dreference stuff like in c/c++ - like free/delete?
pen has quit []
<workmad3>
Oog: no, you just need to be sure that nothing is holding a reference before the GC will consider cleaning it up
<workmad3>
Oog: the GC isn't going to free something from memory if it's still in use, after all... otherwise the GC would be useluss
<canton7>
@field = Foo.new # that Foo instance won't be collected until @field is set to something else, or the class owning @field is released
ht__th has quit [Remote host closed the connection]
wjimenez5271 has quit [Remote host closed the connection]
ned_[Away] is now known as ned__
<Oog>
hmm
ht__th has joined #ruby
corehook has quit [Remote host closed the connection]
<canton7>
a slightly more realistic example: imagine you've got an event aggregator, which takes subscribers and publishes events to them. therefore it has to hold a reference to every subscriber. if a subscribe doesn't unsubscribe itself, it will also be referenced by the event aggregator, and therefore will never be released
apeiros_ has joined #ruby
<canton7>
s/also/always/
<Oog>
its weird because this is a delayed_job queue so it processes jobs
<Oog>
they get processed and go away
corehook has joined #ruby
<Oog>
so jruby i the best way to find memory leaks?
blackmesa has joined #ruby
sk87 has joined #ruby
<canton7>
confused... are you asking whether jruby is a good way to find memory leaks?
pen has joined #ruby
<Oog>
yes
<Oog>
easiest way on osx
<canton7>
jruby is an implementation of ruby. it won't help you find leaks any better than any other ruby implementation...
<canton7>
unless you're planning on hooking it up to a jvm-only profiler
<Oog>
oh someone recommended it but id prefer to not use it and just use ruby that i already have
<maahsa>
what about ruby-prof?
ringarin has quit [Quit: Leaving]
ldnunes has joined #ruby
patrick99e99 has joined #ruby
penzur has joined #ruby
arup_r has quit [Remote host closed the connection]
gaussblurinc11 has joined #ruby
gaussblurinc1 has quit [Read error: Connection reset by peer]
vimer has joined #ruby
Lightsword has quit [Quit: Lightsword]
Guest58384 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<workmad3>
jhass: because I forgot that string responds to empty? :P
Sp4rKy_ is now known as Sp4rKy
<jhass>
:P
<arup_r>
jhass: Thanks
jottr has quit [Ping timeout: 244 seconds]
renderful has joined #ruby
yfeldblum has quit [Ping timeout: 244 seconds]
tyll has quit [Ping timeout: 245 seconds]
arup_r has quit [Remote host closed the connection]
mr_foobar_baz has quit [Quit: WeeChat 1.0.1]
vimer has joined #ruby
rahult has quit [Ping timeout: 244 seconds]
Takle has quit [Remote host closed the connection]
dcunit3d has quit [Ping timeout: 240 seconds]
<blacknicker>
jhass: what math would you recommend i take? for programming?
<blacknicker>
number = gets number[1..10].each { |number, i| number * i }
arup_r has joined #ruby
<blacknicker>
whoops
tyll has joined #ruby
josephndenton has joined #ruby
rahult has joined #ruby
<jhass>
basic programming requires no math, it at most comes handy in some situation leading to cleaner or more efficient solutions
lucyinthesky has left #ruby ["Leaving"]
samuel02 has joined #ruby
rodferso1 has joined #ruby
<workmad3>
blacknicker: I'd recommend boolean logic (sometimes also called propositional logic)
<blacknicker>
workmad3: i am having a terrible time with algorithms
renderful has quit [Ping timeout: 265 seconds]
<blacknicker>
i regret not studying math in school
<blacknicker>
now i have a super awesome idea that i want to share with the world and i don't have the technical requirements to make it happen
<workmad3>
blacknicker: I did maths all the way up to A-level (UK school system) and even had some courses at uni... about the only stuff I use on a daily basis from any of that in programming is logic ;)
blackmesa has quit [Ping timeout: 250 seconds]
<blacknicker>
workmad3: i think i lack logic
<blacknicker>
how can i get it?
josephndenton has quit [Ping timeout: 244 seconds]
samuel02 has quit [Client Quit]
tatsuo has joined #ruby
rodfersou has quit [Ping timeout: 240 seconds]
<workmad3>
blacknicker: just paypal me $10000, and I'll ensure delivery of a logic braindump in 50-100 years...
<wasamasa>
workmad3: worse is that sometimes you only know it's nintendohard after getting deep enough into it
lolmaus has quit [Remote host closed the connection]
lolmaus has joined #ruby
<workmad3>
wasamasa: let's not forget that what's difficult is constantly changing... go back 10 years and the 'Easy GIS lookup' would have been 'Give me a large dev team and pay for access to some stupidly expensive mapping database' most likley
<blacknicker>
wasamasa: all good ideas are secret, companies wouldn't bother keeping secrets if it talking about it didn't mean anything
<wasamasa>
blacknicker: nope
<wasamasa>
blacknicker: still a lot of clueless people around in the higher-up positions
<blacknicker>
just because they don't want to do what you're doing doesn't make them clueless
<blacknicker>
you're comming across as arrogant and it's quite sad
<wasamasa>
workmad3: then, there was some news recently about a team that claimed to have something working that can discern surprisingly much of a photo programmatically
<workmad3>
anyway... can we stop arguing about whether there's any real value in an 'idea' that has no implementation please? It's not an argument that tends to go anywhere, especially on IRC :)
Bira has quit [Remote host closed the connection]
Takle has quit [Remote host closed the connection]
<blacknicker>
workmad3: you already restated what i just said a few minutes before, if you could only read :)
<wasamasa>
of course, let's help this person in the most sympathetic way with his beginner ruby code
<wasamasa>
then he might go forward with revolutionizing the world
<workmad3>
wasamasa: and if not (I agree, the most likely situation) at least there's another person in the world who understands programming and its constraints ;)
<workmad3>
wasamasa: so it's win-win!
<wasamasa>
workmad3: yup, we need moar problem solvers
<wasamasa>
blacknicker: anyhow, how exactly are these lines going to work?
msmith_ has joined #ruby
alexherbo2 has joined #ruby
<blacknicker>
workmad3: well, you would be surprised the people i know, but that's irrelevant... but they will help me once i show them an interesting prototype
<workmad3>
blacknicker: btw, insulting someone's ability to read is not exactly a good idea... especially when you didn't actually say anything close to my statement :P
<blacknicker>
wasamasa: what do you mean?
jimbach has joined #ruby
<wasamasa>
blacknicker: you need to be able to explain the meaning of your code to both humans (at least yourself) and computers
<wasamasa>
blacknicker: neither me nor pry get the second line
Guest37775 has quit [Quit: leaving]
<blacknicker>
wasamasa: well i would like for the program to output the first 10 multiples of a number that has been inputted
<workmad3>
oh wow, now we're onto anonymous name-dropping! awesome :D
jenrzzz has quit [Ping timeout: 256 seconds]
<wasamasa>
blacknicker: first of all, what gets reads in is a *string*
<wasamasa>
blacknicker: you might want to change that
<workmad3>
blacknicker: ellipsis, they're used to elide extra information, or in this case as a stand-in for 'a shitload more that isn't worth stating right now anyway'
<blacknicker>
oh
<apeiros_>
jhass: I got that tail a couple of days ago
<apeiros_>
apeiros sans tail is here too
<wasamasa>
or why the input is read in as string at all
<apeiros_>
we come as a pair now
<wasamasa>
or why ruby fails on you if it's not looking like a number
<jhass>
apeiros_: oh, you still lack a bouncer :P
<apeiros_>
correct
<workmad3>
bouncers are for boring people :P
<apeiros_>
still having this fantasy of writing one based on silverplatter-irc or cinch.
yetanotherdave has joined #ruby
<jhass>
in the mean time just grab a znc
<apeiros_>
reality says I should spend my time with more important stuff :(
<apeiros_>
yeah, I have VMs again, so that's actually an option
<wasamasa>
firrre offers znc bouncers for freenode users
<wasamasa>
and cool reverse dns entries
<apeiros_>
meh
<wasamasa>
aka "hostmasks"
<apeiros_>
no trust :)
rahult has quit [Ping timeout: 250 seconds]
<blacknicker>
this is the hardest thing i've ever tried to learn, but thank you for that reminder that gets always treats stuff like strings
<jhass>
or just grab a $3 box at lowendspirit.com for it
penzur has quit [Quit: WeeChat 1.0]
<blacknicker>
and thank you for that other stuff
<jhass>
blacknicker: seriously though, go on with one of the courses. Picking your own exercises is a good thing, but you're just not there yet
<workmad3>
blacknicker: fair warning too - it gets a *lot* harder
<workmad3>
blacknicker: learning the syntax for a language is just the tip of the iceberg... and all it does is give you a basic vocabulary for expressing yourself with. You still need to figure out the hard parts (like how to deconstruct a problem into something you can express in the language)
yetanotherdave has quit [Ping timeout: 272 seconds]
<workmad3>
blacknicker: pragprog and associated setups tend to be reasonably solid and trustworthy
<apeiros_>
jhass: I have digitalocean boxes. I quite like them.
livathinos has quit [Read error: Connection reset by peer]
oo_ has quit [Remote host closed the connection]
livathinos has joined #ruby
oo_ has joined #ruby
corehook has joined #ruby
rshetty has quit [Ping timeout: 245 seconds]
rshetty_ has joined #ruby
kohgpat has quit [Ping timeout: 264 seconds]
sigurding has quit [Quit: sigurding]
mloveless has joined #ruby
AFKGeek has quit [Quit: Fades into the shadows]
kasperti_ has quit []
oo_ has quit [Ping timeout: 256 seconds]
Bira has joined #ruby
shazaum has joined #ruby
shazaum has quit [Changing host]
shazaum has joined #ruby
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
coderhs has joined #ruby
coderhs has quit [Client Quit]
mloveless has quit [Ping timeout: 245 seconds]
pedromoreira has quit [Ping timeout: 264 seconds]
fgo_ has joined #ruby
rahult has quit [Ping timeout: 256 seconds]
Lingos_ has joined #ruby
larissa has joined #ruby
fgo has quit [Ping timeout: 258 seconds]
parzzix has quit [Ping timeout: 255 seconds]
workmad3 is now known as wm3|away
Takle has joined #ruby
yfeldblum has joined #ruby
mkaesz has joined #ruby
jottr has quit [Ping timeout: 264 seconds]
blacknicker has quit [Ping timeout: 246 seconds]
Lingos_ has quit [Ping timeout: 244 seconds]
phutchins has joined #ruby
enape_101 has joined #ruby
blacknicker has joined #ruby
hiyosi has joined #ruby
tatsuo has quit [Remote host closed the connection]
rahult has joined #ruby
blacknicker has quit [Client Quit]
rahult has quit [Client Quit]
yfeldblum has quit [Ping timeout: 264 seconds]
patrick99e99 has joined #ruby
Photism has joined #ruby
AkashicLegend has quit [Ping timeout: 255 seconds]
s1|verfox has joined #ruby
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<s1|verfox>
Good after noon
danjordan has quit [Quit: danjordan]
Bira has quit [Remote host closed the connection]
<jheg>
o/
<s1|verfox>
after exporting to csv through Rails in my controller with format.csv { createMyString.... } , my CSV viewed in Excel lost encoding. Any ideas? In case, thanks a lot from norway!
patrick99e99 has quit [Ping timeout: 264 seconds]
<apeiros_>
Excel does not understand csv
<jheg>
im trying to inspect an array and it’s working to an extent but I can’t figure out why it is evaluating to true 3 times rather than just once
<apeiros_>
and recent version seem to even lack options to set things like encoding and delimiters
<s1|verfox>
Ok apeiros_! Thanks a lot. No worres jheg!
mgorbach has quit [Ping timeout: 272 seconds]
<apeiros_>
jhass: with e.g. [0,4,8] you do squares[0..8]
<apeiros_>
you probably want values_at(*array)
<s1|verfox>
apeiros_ , I am providing a price feed to a product-listing service here in Norway, and I got an email from the admin about this encoding issue. Maybe everything is OK after all, just Excel causing these issues.
<jhass>
apeiros_: wrong jh ;)
<apeiros_>
grah
<apeiros_>
jheg: ^ a couple of lines up
<apeiros_>
jhass: that's what you get for renaming!
danjordan has joined #ruby
rodferso1 has joined #ruby
<jheg>
thanks apeiros_ just reading now
mgorbach has joined #ruby
<jhass>
it's been long enough now! leave it already!
sirene has quit [Ping timeout: 256 seconds]
oo_ has joined #ruby
rodferso1 has quit [Client Quit]
Bira has joined #ruby
<jheg>
apeiros_: with e.g. [0,4,8] you do squares[0..8]
<jheg>
not sure I understand
<jheg>
board.squares[array[0]..array[2]]
Bira has quit [Remote host closed the connection]
Xeago has joined #ruby
<apeiros_>
jheg: you iterate over WINNING_LINES, putting the values into array, right?
<apeiros_>
and one of them is [0,4,8]
<jheg>
isnt that like board.squares[0] board.squares[1] & board.squares[2]
<apeiros_>
so in one of your iterations, array == [0,4,8]. following so far?
kohgpat has joined #ruby
<jheg>
ok yep
<apeiros_>
and then you do board.squares[array[0]..array[2]]
rshetty_ has quit [Remote host closed the connection]
<apeiros_>
in [0,4,8] - to what does array[0] and array[2] resolve?
<shevy>
I'm gonna test how ruby works on her computer, then I could try and automatize lots of stuff through ruby
<jhass>
txdv: same here. old crappy xp laptop became too slow. now linux is running on it and there are no more complaints about it
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
arup_r has quit [Remote host closed the connection]
<shevy>
txdv nah, Win 7; also another problem is that she is using a sony vaio workstation, like where the computer is integrated in the monitor; it's like a standtop ... I have no experience on that how well linux runs on it
<shevy>
oh sorry, might even be just win vista
byteoverfl0w has quit [Quit: Leaving... have a good one...]
<jhass>
gregf_: each_with_object
<gregf_>
jhass: yeah, theres soo many more better ways :/
<apeiros_>
gregf_: standard case where you should use each_with_object, not inject.
arup_r has joined #ruby
<gregf_>
i wonder how complex ruby code reviews would be
<apeiros_>
…; accumulator } # <-- inject abuse
<gregf_>
ah - ok
yetanotherdave has quit [Ping timeout: 250 seconds]
<shevy>
gregf_ I guess it depends on the style used, and the amount of code
<shevy>
txdv yeah, it won't work when it is hot, it just says "SMART HDD FAILURE"; once it is cooled down, it can be brought up however
<canton7>
remember that #inject and #each_with_object take their arguments in opposite orders ;)
beef-wellington has joined #ruby
ClarusCogitatio has quit [Ping timeout: 244 seconds]
wm3|away has joined #ruby
snath has quit [Ping timeout: 256 seconds]
<txdv>
well that is actually a problem
<txdv>
i had to teach my mom how to change the input audio device
corehook has quit [Remote host closed the connection]
<shevy>
your geek-mom is clearly too advanced
eichenwald has joined #ruby
<gregf_>
canton7: well in Perl, its : grep !$seen{$_}++,qw/red red blue/ :/
SkireM has joined #ruby
<canton7>
concise but unreadable to any sane human ;)
whoisjake has joined #ruby
<shevy>
I could actually replace the computer with a normal desktop machine + linux, I have a spare one + monitor too; only real problem there is ... what to do with outlook, it's literally the number #1 thing she uses
<gregf_>
i just wonder at times why ruby does'nt have a pre/post increment oprator
yfeldblum has quit [Ping timeout: 240 seconds]
<canton7>
because that implies mutation
<gregf_>
*operator
jerius has joined #ruby
<canton7>
and ruby doesn't mutate numbers
<gregf_>
ah - and Fixnum's are immutable?
Squarepy has quit [Quit: Leaving]
Techguy305 has joined #ruby
<canton7>
it stems from the fact that even numbers are objects
<canton7>
yes, they are
<gregf_>
yeah, fair enough
<canton7>
and that becomes important when you start capturing them in blocks and the like
<txdv>
shevy: nothing you can do about it
<txdv>
what outlook version though?
rodfersou has quit [Ping timeout: 240 seconds]
<shevy>
dunno forgot to check; probably the one that was actual from ... 2009
<gregf_>
something new to learn everyday; canton7++ :)
<txdv>
try wine
Lingos_ has quit [Quit: Be back later ...]
wasamasa is now known as wasa
wm3|away is now known as workmad3
wasa is now known as wasamasa
arup_r has joined #ruby
josephndenton has joined #ruby
tier_ has joined #ruby
corehook has joined #ruby
jottr has joined #ruby
zzzbra has quit [Remote host closed the connection]
arup_r has quit [Remote host closed the connection]
devdazed has joined #ruby
sevenseacat has quit [Remote host closed the connection]
fgo_ has quit [Ping timeout: 265 seconds]
tier has quit [Ping timeout: 244 seconds]
rshetty has quit [Ping timeout: 245 seconds]
rodfersou has joined #ruby
Lingos_ has joined #ruby
jimbach has joined #ruby
mary5030 has joined #ruby
rshetty has joined #ruby
freerobby has joined #ruby
corehook has quit [Remote host closed the connection]
Abhijit has quit [Quit: Leaving]
<canton7>
:)
jottr has quit [Ping timeout: 264 seconds]
<gregf_>
well thought of doing a benchmark and inject is faster ;). anyways
<gregf_>
tho' its not the proper way to do it :/
Lingos_ has quit [Ping timeout: 272 seconds]
<canton7>
is there really much in it?
<canton7>
there shouldn't be :P
fenak has joined #ruby
patrick99e99 has joined #ruby
<gregf_>
nah. ;). each_with_object is more readable
krz has joined #ruby
FooMunki has quit [Read error: No route to host]
FooMunki has joined #ruby
ndrei has quit [Ping timeout: 256 seconds]
ndrei_ has quit [Ping timeout: 272 seconds]
nobody44 has joined #ruby
jerius has quit []
<nobody44>
hello, i installed gitlab on my server, but after the last update (its arch linux), gitlab stopped working. It says: "libicui18n.so.53 not found". is there a way to "rebuild" the application? in this case gitlab?
<nobody44>
because from what i know, gitlab does not "required" libicu v53
rodfersou has quit [Ping timeout: 255 seconds]
noop has quit [Ping timeout: 240 seconds]
rodfersou has joined #ruby
patrick99e99 has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
larissa has quit [Ping timeout: 240 seconds]
kohgpat has quit [Ping timeout: 258 seconds]
toretore has quit [Ping timeout: 240 seconds]
jlast has quit [Ping timeout: 258 seconds]
<jhass>
nobody44: first step is to figure out what binary throws that
clauswitt has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
larissa has joined #ruby
<nobody44>
it was charlock_holmes
karmatr0n has quit [Remote host closed the connection]
beneggett has joined #ruby
supersymmetry has quit [Ping timeout: 272 seconds]
<jhass>
was? so you solved it?
lolmaus has quit [Remote host closed the connection]
karmatr0n has joined #ruby
lolmaus has joined #ruby
msmith_ has joined #ruby
toretore has joined #ruby
Channel6 has quit [Remote host closed the connection]
mikepack has joined #ruby
o0oo0o has quit [Remote host closed the connection]
tanath has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
tier_ has quit [Remote host closed the connection]
o0oo0o has joined #ruby
rebelshrug has joined #ruby
sts_ has quit [Quit: leaving]
freerobby has joined #ruby
<jheg>
I am trying to iterate through known elements in an array using intergers stored in a seperate array and if a coniditon is met then change that elements value in the original array
tanath has joined #ruby
<jheg>
for instance a =[1,1,1,1,2,1,1,1,1]
<jheg>
b = [[0,1,2],[3,4,5],[6,7,8]]
_bart has joined #ruby
divi has joined #ruby
Hijiri has quit [Quit: WeeChat 1.0.1]
<Hanmac>
jheg: what s the wanted result?
<jheg>
so using a loop to iterate through b passing their values into a to check if a condition is met and if so change that element
karmatr0n has quit [Ping timeout: 264 seconds]
<_bart>
Hi, I'm using Nokogiri, and I located a specific element (Nokogiri::XML::Element), but now I want to get the string position of this element inside the original (text) HTML document, is that possible?
kohgpat has joined #ruby
<jheg>
this is what i have so far but it returns the correct array but doesnt change it
<jheg>
board.squares.values_at(*the_line).map{ |e| (e == ' ') ? e = 'M' : e }
Versality has quit [Quit: Be back later ...]
pasv has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
<txdv>
jaja compadre, just sum the string lengths of all the left side of the tree
pasv is now known as Guest27310
<txdv>
is very easy
mary5030 has quit [Remote host closed the connection]
<jheg>
Hanmac: In this example I’d want to change 2 to 3 for example but only for 2’s that are within the current iteration of b’s values as indexes
charliesome has quit [Quit: zzz]
krz has joined #ruby
procat has joined #ruby
kohgpat has quit [Client Quit]
kasperti_ has quit []
mary5030 has joined #ruby
<jhass>
_bart: what's a "string position"? The index?
jerius has joined #ruby
adriancb has quit [Remote host closed the connection]
Versality has joined #ruby
divi has quit [Ping timeout: 258 seconds]
beef-wellington has quit [Quit: WeeChat 0.4.3]
silkfox has joined #ruby
quimrstorres has joined #ruby
divi has joined #ruby
<eam>
jhass: how do you elevate to root, then? pam module for a non-pass mech in sudo?
<jhass>
I don't mind a suid binary or two
pacMakaveli has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
<eam>
I mean, via what credential?
<jhass>
no password auth for sshd
<jhass>
not in general
<eam>
ah. See, I'd rather not transmit any in
<eam>
there's no meaningful reason to disallow root logins for non-password auth
<eam>
but there are a bunch of good reasons to never send secrets to the remote node
baroquebobcat has joined #ruby
rodfersou has quit [Ping timeout: 272 seconds]
<jhass>
you trust your sshd enough for root login but not encrypting a password over the wire?
rshetty has quit [Read error: Connection reset by peer]
<eam>
it's not encrypted after it goes over the wire -- not entirely about trusting sshd
MrIlyas has quit [Read error: Connection reset by peer]
<jhass>
so you fear somebody else on the server reads your pty?
dorei has joined #ruby
<eam>
or has rooted the node (but not all of the others)
rshetty_ has joined #ruby
<eam>
probably the most common case
<_bart>
jhass: yes the index of the string inside the big document
<jhass>
you use the same password everywhere?
<eam>
or has managed to get me to run something other than /usr/bin/sudo
LekeFly has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<eam>
jhass: not everywhere, but certainly not a separate password for every machine either
<jhass>
_bart: I don't think you can. Why do you want that? Replace something?
<eam>
most employers run a directory service and use the same password across production
<_bart>
No, I want to know if a certain element occurred first in the document relative to another few elements
<eam>
jhass: something like pam_ssh_agent_auth for sudo or kerberos is far superior
Versality has quit [Quit: Be back later ...]
corehook has joined #ruby
troulouliou_dev has quit [Ping timeout: 264 seconds]
<eam>
there's also the issue of interactive logins being more rare than automated stuff
<jhass>
_bart: I'm not sure I follow but I can imagine you could craft an xpath for that
rodfersou has joined #ruby
pontiki has joined #ruby
<jhass>
_bart: like fetch the first via xpath and then just == with what you have
<_bart>
jhass: ah yes, in this case the parent is the same so I guess it's simply the index of the child in the parent
haroldwu has quit [Ping timeout: 264 seconds]
haroldwu has joined #ruby
user____ has joined #ruby
livingstn has joined #ruby
user____ is now known as basichash
doev has quit [Ping timeout: 245 seconds]
henesy has joined #ruby
duggiefresh has joined #ruby
Versality has joined #ruby
ndrei has joined #ruby
ndrei_ has joined #ruby
<_bart>
jhass: xpath('count(preceding-sibling::*)'), is nice
mistermocha has joined #ruby
<jhass>
:)
LekeFly has joined #ruby
maahsa has quit [Ping timeout: 246 seconds]
<mostlybadfly>
Good morning
wasamasa is now known as wasa
yfeldblum has joined #ruby
Lingos_ has joined #ruby
zB0hs has joined #ruby
agit0 has quit [Quit: This computer has gone to sleep]
yetanotherdave has joined #ruby
snath has joined #ruby
BTRE has joined #ruby
wasa is now known as wasamasa
startupality_ has joined #ruby
iLike has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
apeiros_ has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
startupality has quit [Ping timeout: 240 seconds]
startupality_ is now known as startupality
apeiros_ has joined #ruby
jaequery has joined #ruby
mary5030 has joined #ruby
yetanotherdave has quit [Ping timeout: 256 seconds]
mary5030 has quit [Remote host closed the connection]
iamjarvo has joined #ruby
josephnd1nton has joined #ruby
mary5030 has joined #ruby
mistermocha has quit [Remote host closed the connection]
jlast has joined #ruby
corehook has quit [Remote host closed the connection]
andikr has joined #ruby
<shevy>
hey mostlybadfly
<shevy>
whatch coding lately?
joncol has joined #ruby
klmlfl has joined #ruby
Takle_ has quit [Remote host closed the connection]
Guest34224 has quit [Quit: This computer has gone to sleep]
samuel02 has quit [Remote host closed the connection]
<mostlybadfly>
shevy: just been doing exercism exercises
<mostlybadfly>
I also made a silly shoes app
<mostlybadfly>
Going back through the matasano crypto challenges too
sambao21 has quit [Quit: Computer has gone to sleep.]
Takle has joined #ruby
apeiros_ has quit [Ping timeout: 264 seconds]
rodfersou has quit [Read error: Connection reset by peer]
nvdpl has joined #ruby
josephnd1nton has quit [Ping timeout: 250 seconds]
rodfersou has joined #ruby
dcunit3d has joined #ruby
giuseppesolinas has joined #ruby
sambao21 has joined #ruby
giuseppesolinas has quit [Client Quit]
Techguy305 has quit [Ping timeout: 272 seconds]
banister has joined #ruby
danjordan has quit [Quit: danjordan]
<_bart>
If I have two arrays [1,3,5] and [2,4,8], how do I confirm that if they are joined, the interleave perfectly (that is, I don't care that the 8 'skips' a few numbers) but both the arrays contribute evenly
<_bart>
they* interleave
Sonderblade has joined #ruby
Takle has quit [Remote host closed the connection]
Lingos_ has quit [Quit: Be back later ...]
danjordan has joined #ruby
joncol has quit [Quit: Lost terminal]
<pontiki>
can you give an example of the output you're expecing? "interleave" is a bit vague
Brando753 has quit [Ping timeout: 265 seconds]
<_bart>
so [2, 3, 5] + [1, 4, 8] is an example that does not interleave properly, the first array contributes two numbers in a row.
arup_r has joined #ruby
<_bart>
the output should be true (the arrays together join like a zebra pattern), or false (they do not interleave evenly)
cpruitt has joined #ruby
<iLike>
_bart, so basically you want given two arrays A, B of equal size that for each i A[i] > B[i] or A[i] < B[i]?
larissa has quit [Quit: Leaving]
<_bart>
the spacing between the numbers does not matter, as long as one array does not at one point contribute two integers in a row
<iLike>
I'm assuming you in a row means in increasing order?
Brando753 has joined #ruby
<iLike>
[1,3,5] and [2,4,6] interleave then?
<_bart>
that is correct, they are always ordered from low to high
<_bart>
yup, that one should return true
<_bart>
[2, 6, 10] and [4, 8, 12] as well. but [2, 6, 10] and [4, 8, 9] is FALSE for example
<iLike>
see what I mentioned earlier :) You want to check if for each i in your arrays A[i] < B[i], or the other way around
<iLike>
Or <=, depending if you consider equal numbers valid
<_bart>
but then [1, 2, 3] and [4, 5, 6] would check out as true
<_bart>
which do not interleave
<iLike>
A[i] < B[i] < A[i+1]?
sambao21 has quit [Quit: Computer has gone to sleep.]
tier has joined #ruby
<mostlybadfly>
If you want them in order join then sort?
<_bart>
this freezes my brain, but I think that A[i+1] is correct yes, that'd prevent the situation and maybe also add a A[i-1] < at the start
<_bart>
to make sure [4, 5, 6] and [1, 2, 3] does not return true
sambao21 has joined #ruby
dcunit3d has quit [Ping timeout: 255 seconds]
pedromoreira has left #ruby ["WeeChat 1.0"]
dcunit3d has joined #ruby
rkalfane has joined #ruby
fantazo has joined #ruby
allcentury has quit [Quit: WeeChat 1.0]
allcentury has joined #ruby
rodfersou has quit [Read error: Connection reset by peer]
aspiers has quit [Ping timeout: 255 seconds]
<workmad3>
_bart: what about [1, 10, 12] and [2, 9, 11]?
rodfersou has joined #ruby
tgandrews has quit [Quit: tgandrews]
MSY has joined #ruby
hamakn has quit [Remote host closed the connection]
<waxjar>
a.zip(b).flatten == a.zip(b).flatten.sort should work, no?
danjordan has quit [Quit: danjordan]
MSY is now known as Guest14861
<iLike>
_bart, note that this is not a valid ruby expression (I think). (A[i] < B[i] && B[i] < A[i+1]) would be more appriopriate?
benzrf is now known as benzrf|offline
<_bart>
workmad3: that should return false
* iLike
doesn't know the ruby syntax
<workmad3>
waxjar: I was thinking of 'a.zip(b).each_cons(2).all?{|i, j| i.last <= j.first}' personally
hamakn has joined #ruby
<_bart>
because 2 and 9 are between 1 and 10
<_bart>
and therefore, two numbers are contributed in a row
joncol has joined #ruby
<waxjar>
workmad3: probably a little more efficient :P
sigurding has quit [Quit: sigurding]
<workmad3>
_bart: right, so you want something that, when zipped, remains ordered
Versality has quit [Quit: Be back later ...]
<joncol>
How best to skip installing certain gems (using Bundler) on the build server?
<waxjar>
if you're gonna distribute your gem trough rubygems, don't use a Gemfile
<joncol>
This is for internal use only
livathin_ has quit [Remote host closed the connection]
<workmad3>
waxjar: you can... but you have to make sure all your gem's dependencies are in the gemspec and only some development gems necessary for your own personal preferences are in the Gemfile :)
bootstrotter has joined #ruby
bootstrotter has left #ruby [#ruby]
CustosLimen has quit [Ping timeout: 258 seconds]
Bira has quit [Remote host closed the connection]
<waxjar>
yeah, fair enough. just be aware that rubygems is not gonna install them for you :P
ThaDick_ has joined #ruby
<workmad3>
joncol: basically, when you install a gem through rubygems, the only thing that gets looked at is the .gemspec, and by default it will only install the runtime dependencies (you can specify to install development dependencies too)
zzzbra has quit [Client Quit]
bootstrotter has joined #ruby
<bootstrotter>
moose
ThaDick has quit [Ping timeout: 255 seconds]
eichenwald has quit [Quit: WeeChat 1.0.1]
ThaDick_ is now known as ThaDick
anaeem1 has quit [Remote host closed the connection]
<shevy>
goose
<waxjar>
i think you can even tell the gemfile to look at the gemspec, maybe its also possible to add some extra groups and stuff?
<workmad3>
joncol: you don't get any finer control than that through rubygems... there's no provision for things like optional dependencies, for example
<waxjar>
in addition to the gemspec, that is
<workmad3>
waxjar: yeah, you can
delianid_ has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<workmad3>
joncol: so the question is... are these gems dependencies that you want/need to install when the gem is installed in another project?
<workmad3>
joncol: or are they some development-machine specific tooling that you don't need on the build server?
Jackneill has joined #ruby
anaeem1_ has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
jaequery has quit [Ping timeout: 265 seconds]
<_bart>
workmad3: any way this is scalable to three arrays? Like [1,2,3] and [4,5,6] and [7,8,9] returns true because all three arrays never contribute two values in a row to the total
delianides has quit [Read error: Connection reset by peer]
Versality has quit [Quit: Be back later ...]
anaeem1 has joined #ruby
<bootstrotter>
Isn't ruby...SUPER...eh...ehhh...
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<joncol>
workmad3> Teamcity wants the rspec and rake gems, but those are in the development group
bootstrotter is now known as TheDigitalCowboy
allcentury has joined #ruby
<workmad3>
_bart: waxjar's version with comparing the flattened array with the sorted flattened array would scale
<_bart>
workmad3: ok skip that example, that is totally wrong
<_bart>
:p
<_bart>
ok
benzrf|offline is now known as benzrf
<workmad3>
a = [1,2,3].zip([4,5,6], [7,9,9]); a.flatten == a.sort.flatten
TheDigitalCowboy is now known as moosey
<workmad3>
>> a = [1,2,3].zip([4,5,6], [7,9,9]); a.flatten == a.sort.flatten
LekeFly has quit [Read error: Connection reset by peer]
moosey is now known as Guest14301
Guest14301 is now known as TheDigitalCowboy
sambao21 has joined #ruby
<workmad3>
d'oh, .flatten.sort, not .sort.flatten
agit0 has joined #ruby
rodfersou has quit [Read error: Connection reset by peer]
zzzbra has joined #ruby
zzzbra has quit [Client Quit]
momomomomo has quit [Client Quit]
danjordan has quit [Quit: danjordan]
zzzbra has joined #ruby
<joncol>
workmad3> It works now, thanks. Using both Gemfile (with custom group) and .gemspec did the trick
Lightsword has quit [Quit: Lightsword]
vimer has joined #ruby
rippa has joined #ruby
danjordan has joined #ruby
hamakn has joined #ruby
Guest14861 has quit [Quit: This computer has gone to sleep]
adriancb has joined #ruby
yalue has joined #ruby
<TheDigitalCowboy>
I am a moose god
momomomomo has joined #ruby
mistermocha has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
TheDigitalCowboy has quit [Quit: Lost terminal]
troulouliou_dev has joined #ruby
momomomomo has quit [Client Quit]
rodfersou has joined #ruby
ki0 has joined #ruby
foooobear has quit [Quit: (null)]
joncol has quit [Quit: leaving]
mastr_bennett[x] has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
tier has quit [Remote host closed the connection]
rodfersou has quit [Read error: Connection reset by peer]
Cache_Money has joined #ruby
benzrf|offline is now known as benzrf
rodfersou has joined #ruby
mjwhitta has joined #ruby
supersymmetry has joined #ruby
yfeldblum has joined #ruby
emmesswhy has joined #ruby
emmesswhy has quit [Remote host closed the connection]
zacstewart has joined #ruby
mjwhitta has quit [Remote host closed the connection]
cmckee-dev has joined #ruby
troulouliou_dev has quit [Ping timeout: 255 seconds]
troulouliou_dev has joined #ruby
troulouliou_dev has joined #ruby
troulouliou_dev has quit [Changing host]
sambao21 has quit [Read error: Connection reset by peer]
jonathan_alban has joined #ruby
cmckee has quit [Ping timeout: 255 seconds]
cmckee-dev is now known as cmckee
mbwe has joined #ruby
gsd has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
borodin has joined #ruby
<borodin>
struggling with a bundler issue with jenkins and the rvm plugin. My latest log: https://gist.github.com/chewmanfoo/f1c3def42a33800e871f I've tried uninstalling and reinstalling mysql2 gem in a variety of ways - nothing works. Any suggestions, please?
yfeldblum has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
Pumukel has quit [Ping timeout: 272 seconds]
jjasonclark has joined #ruby
nobitanobi has joined #ruby
fabrice31 has quit [Remote host closed the connection]
last_staff has quit [Quit: last_staff]
sargas has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
Avahey has joined #ruby
rodfersou has quit [Read error: Connection reset by peer]
banister has quit [Ping timeout: 256 seconds]
yetanotherdave has joined #ruby
rodfersou has joined #ruby
nobitanobi has quit [Remote host closed the connection]
kobain has joined #ruby
jottr has joined #ruby
angryzor has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghostlines has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nobitanobi has joined #ruby
treehug88 has joined #ruby
finferl has joined #ruby
yetanotherdave has quit [Ping timeout: 244 seconds]
danjordan has quit [Quit: danjordan]
zorak8 has quit [Ping timeout: 265 seconds]
HayesHimself has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chthon has joined #ruby
delianid_ has quit [Remote host closed the connection]
govg has quit [Read error: Connection reset by peer]
jottr has quit [Ping timeout: 255 seconds]
danjordan has joined #ruby
troulouliou_dev has quit [Remote host closed the connection]
samuel02 has joined #ruby
nobitanobi has quit [Remote host closed the connection]
moritzs has joined #ruby
Macaveli has quit [Ping timeout: 265 seconds]
sk87 has joined #ruby
drewvanstone has joined #ruby
hiyosi has quit [Ping timeout: 265 seconds]
dermothaughey has joined #ruby
nobitanobi has joined #ruby
lacrymology has quit [Quit: leaving]
aspires has joined #ruby
maestrojed has joined #ruby
sk87 has quit [Client Quit]
Xeago has joined #ruby
chrishough has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
centrx has joined #ruby
freerobby has quit [Quit: Leaving.]
dkb20k has quit [Remote host closed the connection]
sk87 has joined #ruby
Takle has joined #ruby
airdeluxe has joined #ruby
dkb20k has joined #ruby
karmatr0n has joined #ruby
diegoviola has joined #ruby
Lingos_ has joined #ruby
moritzs has quit [Ping timeout: 255 seconds]
iLike has quit [Quit: Leaving]
jenrzzz has joined #ruby
klmlfl has quit [Remote host closed the connection]
dermothaughey has quit [Ping timeout: 272 seconds]
mkaesz has quit [Remote host closed the connection]
<pontiki>
does your jenkins worker have mysql2 installed?
freerobby has joined #ruby
jaequery has joined #ruby
aganov has quit [Quit: Leaving]
Hobogrammer has joined #ruby
dkb20k has quit [Ping timeout: 272 seconds]
tus has joined #ruby
Takle has quit [Ping timeout: 250 seconds]
Lingos_ has quit [Ping timeout: 240 seconds]
atmosx has quit [Remote host closed the connection]
psy_ has joined #ruby
benzrf is now known as benzrf|offline
psy_ has quit [Max SendQ exceeded]
henesy has quit [Ping timeout: 240 seconds]
psy_ has joined #ruby
momomomomo has joined #ruby
mkaesz has quit [Ping timeout: 256 seconds]
Takle has joined #ruby
eichenwald has joined #ruby
Xeago_ has joined #ruby
Lightsword has joined #ruby
yetanotherdave has joined #ruby
yetanotherdave has quit [Client Quit]
allcentury has quit [Ping timeout: 258 seconds]
troyready has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rodfersou has quit [Read error: Connection reset by peer]
weems|mac has joined #ruby
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
weems|mac has quit [Changing host]
weems|mac has joined #ruby
dANO has quit []
Xeago has quit [Ping timeout: 245 seconds]
danjordan has quit [Quit: danjordan]
kohgpat has quit [Quit: leaving]
rshetty_ has quit [Read error: Connection reset by peer]
nobitanobi has quit [Remote host closed the connection]
rshetty has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
mloveless has joined #ruby
Versality has joined #ruby
enape_101 has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
atmosx has joined #ruby
henesy has joined #ruby
spyderman4g63 has quit [Ping timeout: 255 seconds]
benzrf|offline is now known as benzrf
mloveless has quit [Ping timeout: 250 seconds]
samuel02 has quit [Ping timeout: 264 seconds]
jaequery has joined #ruby
Megtastique has joined #ruby
rshetty has quit [Remote host closed the connection]
danjordan has joined #ruby
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
danjordan has quit [Client Quit]
mjuszczak has joined #ruby
lucyinthesky has joined #ruby
jlast has quit [Read error: Connection reset by peer]
renderful has joined #ruby
njames has joined #ruby
Techguy305 has joined #ruby
Rahul_Roy_ has joined #ruby
JimmyNeutron has joined #ruby
Hijiri has joined #ruby
renderfu_ has joined #ruby
allcentury has joined #ruby
checkit has joined #ruby
timonv_ has quit [Remote host closed the connection]
mloveless has joined #ruby
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
nvdpl has quit [Quit: ZZZzzz…]
gsd has joined #ruby
kireevco has joined #ruby
M-Technic has quit [Ping timeout: 256 seconds]
renderful has quit [Ping timeout: 258 seconds]
speaking1ode is now known as speakingcode
AndyBotwin has joined #ruby
_bart has quit [Quit: Bye!]
jerius has quit [Remote host closed the connection]
jottr has joined #ruby
yfeldblum has joined #ruby
jerius has joined #ruby
elaptics is now known as elaptics`away
fella5s has quit [Read error: Connection reset by peer]
procat has quit [Ping timeout: 240 seconds]
ARCADIVS has quit [Quit: ARCADIVS]
samuel02 has joined #ruby
bricker`work has joined #ruby
wjimenez5271 has joined #ruby
blackmesa has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
msgodf has quit [Ping timeout: 255 seconds]
lucyinthesky has quit [Quit: Leaving]
tier has joined #ruby
havenwood has joined #ruby
henesy has quit [Ping timeout: 272 seconds]
wsmoak has quit [Quit: wsmoak]
spyderman4g63 has joined #ruby
banister has joined #ruby
Jesterman81 has joined #ruby
triple_b has joined #ruby
zacstewart has quit [Remote host closed the connection]
josephnd1nton has joined #ruby
einarj has quit [Remote host closed the connection]
lemur has joined #ruby
djbkd has joined #ruby
henesy has joined #ruby
Akuma has joined #ruby
tier has quit [Ping timeout: 272 seconds]
Takle has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 244 seconds]
ndrei has quit [Ping timeout: 245 seconds]
unshadow has joined #ruby
Takle has joined #ruby
ndrei_ has quit [Ping timeout: 240 seconds]
josephnd1nton has quit [Ping timeout: 256 seconds]
lmickh has joined #ruby
atmosx has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 255 seconds]
Hijiri has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
tier has joined #ruby
<unshadow>
So, I'm looking to create a SSH listener (server) socket, looking around I cannot find any examples/libs/gems for this, any one knows if something like this already exists (and not a 5 year old dead project XD)
Spami has joined #ruby
ptrrr has joined #ruby
maximski has joined #ruby
<ddv>
unshadow, just make something with eventmachine
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
dts_Zzzz is now known as DTSCode
Takle has quit [Ping timeout: 272 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
pacMakaveli has quit [Remote host closed the connection]
timonv_ has joined #ruby
patrick99e99 has joined #ruby
procat has joined #ruby
jheg has quit [Read error: Connection reset by peer]
jheg has joined #ruby
<unshadow>
yeha, my issue is that the functionality of an SSH socket is missing, unlike SSLSocket which is fully implemented (am I missing something?)
gebbione has quit [Ping timeout: 244 seconds]
zorak8 has joined #ruby
robertt_dex has joined #ruby
hiyosi has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
delianides has joined #ruby
adriancb has quit [Remote host closed the connection]
Hijiri has joined #ruby
sargas has quit [Quit: Leaving]
shazaum_ has joined #ruby
nobitanobi has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
DaniG2k has quit [Quit: leaving]
SCHAAP137 has joined #ruby
shazaum has quit [Ping timeout: 240 seconds]
chthon has quit [Quit: Ex-Chat]
delianides has quit [Ping timeout: 258 seconds]
stunder has joined #ruby
hiyosi has quit [Ping timeout: 272 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Techguy305 has quit [Ping timeout: 240 seconds]
vimer has quit [Quit: leaving]
tvw has quit []
rodfersou has joined #ruby
dkb20k has joined #ruby
haxr has joined #ruby
delianides has joined #ruby
ghr has quit [Ping timeout: 265 seconds]
Xeago_ has quit [Remote host closed the connection]
haxr has quit [Quit: Leaving]
sailias1 has joined #ruby
sailias has quit [Quit: Leaving.]
haxr has joined #ruby
dseitz has joined #ruby
lolmaus has quit [Remote host closed the connection]
lolmaus has joined #ruby
sailias1 has quit [Client Quit]
triple_b has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
maximski has quit []
dkb20k has quit [Ping timeout: 256 seconds]
zacstewart has joined #ruby
triple_b has joined #ruby
tomeara has joined #ruby
Macaveli has joined #ruby
jonathan_alban has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krisquigley has quit [Remote host closed the connection]
divi has quit [Ping timeout: 272 seconds]
bricker`1ork has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
bricker has quit [Client Quit]
bricker`work has quit [Quit: Lost terminal]
bricker`work has joined #ruby
allcentury has joined #ruby
<unshadow>
nothing ha ?
Macaveli has quit [Ping timeout: 245 seconds]
shazaum_ is now known as Shazaum
Shazaum has quit [Changing host]
Shazaum has joined #ruby
wjimenez5271 has quit [Remote host closed the connection]
<Joe_knock>
havenwood: I get: There is only one alternative in link group ruby: /usr/bin/ruby1.8
<Joe_knock>
Does this mean I have 1 or 2?
<havenwood>
Joe_knock: so there aren't alternatives
<havenwood>
1
<Joe_knock>
aah thank goodness for that
<yxhuvud>
Joe_knock, dpkg -l |grep ruby
boombadaroomba has joined #ruby
<Joe_knock>
I thought I screwed up my ruby install a long time ago
yfeldblum has quit [Ping timeout: 256 seconds]
<havenwood>
Joe_knock: you may have rubies not installed by apt
<Joe_knock>
If RVM is the equivalent of Pythonbrew, what is Rubys equivalent of virtualenv ?
Lingos_ has joined #ruby
Photism has quit [Quit: Leaving]
Versality has quit [Quit: Be back later ...]
<yxhuvud>
dunno, but I'd recommend chruby for that task
oleo__ has joined #ruby
Versality has joined #ruby
adriancb has joined #ruby
<Joe_knock>
Basically, the workflow I want is to use RVM for different Ruby versions and through virtualenvs on top of each version for specific dev environments
econerd4ever has joined #ruby
<Joe_knock>
havenwood: ubuntu software centre doesn't have ruby listed
<yxhuvud>
Joe_knock: I'd use chruby + bundler, and avoid rvm like the plague. It does some things that are not really healthy.
oleo is now known as Guest30194
kireevco has quit [Quit: Leaving.]
oleo__ has quit [Read error: Connection reset by peer]
benzrf|offline is now known as benzrf
boombadaroomba has quit [Ping timeout: 265 seconds]
<Joe_knock>
yxhuvud: can you provide more info on what weird things it does?
Guest30194 has quit [Ping timeout: 256 seconds]
<yxhuvud>
for example, it put an alias on ls.
Lingos_ has quit [Ping timeout: 255 seconds]
sdwrage has joined #ruby
<havenwood>
yxhuvud: huh?
<yxhuvud>
or has it stopped doing that?
ikaros has quit [Quit: Ex-Chat]
<havenwood>
yxhuvud: i think you're thinking cd, and yeah i think all is well
<yxhuvud>
oh, it was cd. even worse.
psy_ has quit [Remote host closed the connection]
timonv_ has quit [Read error: Connection reset by peer]
<havenwood>
Joe_knock: If you don't need to switch Rubies, consider just using the Brightbox package for Ubuntu so you can have latest stable but still use the package manager: https://launchpad.net/~brightbox/+archive/ubuntu/ruby-ng
<havenwood>
Joe_knock: RVM is a feature-full option for installing and switching or for example I use ruby-install to install and chruby to switch.
<havenwood>
Joe_knock: You can actually use RVM to install and chruby to switch even if you like. There are many options. :)
psy_ has joined #ruby
elaptics`away is now known as elaptics
<yxhuvud>
rvm was a fantastic solution to a big problem when it came, but nowadays the different subtasks it solves are solved better by other tools, like chruby, bundler, rbenv etc.
<Joe_knock>
Does having multiple Rubys on a single system at system-wide level not cause conflicts? I've come across people saying that doing it for Python may break things on Ubuntu
<havenwood>
yxhuvud: I don't think rbenv is a better solution. But I'm with you on the chruby and bundler love. :)
josephnd1nton has joined #ruby
<Joe_knock>
I looked at rbenv, but I makes things too complicated to use
<havenwood>
Joe_knock: It's fine to have multiple system rubies. Ubuntu uses update-alternatives to switch.
<havenwood>
Joe_knock: Or just have one system Ruby, why do you need multiple?
<havenwood>
Joe_knock: Your choice.
<shevy>
Joe_knock the problem is the location; for instance, you can have only one instance at e. g. path "/usr/bin/ruby"
wjimenez5271 has joined #ruby
<havenwood>
Joe_knock: So one ruby *at a time*.
<Joe_knock>
havenwood: Partly because I enjoy the workflow of something like pythonbrew. It feels "clean" and makes things easier to manage, especially when there are multiple devtools on a single system (eg. pythonbrew, meteor, etc.)
tobago has quit [Read error: Connection reset by peer]
<yxhuvud>
also one set of gems at a time, with bundler.
<shevy>
Joe_knock distributions like gobolinux (before they died) solved it in ways how RVM would solve it in the HOME_DIR - $HOME/.rvm/ruby-version-bla; gobolinux went for system-wide /Programs/Name/Version, so you'd have /Programs/Ruby/2.1.3 and /Programs/Ruby/1.8.7 and would set a symlink (through update_program name) to point at the current version in use
<havenwood>
Joe_knock: bundler is a gem, you can use it with any of the above ways to install and switch rubies
chrishough has joined #ruby
narph has joined #ruby
postmodern has joined #ruby
<Joe_knock>
interesting, shevy . Seeing as you guys are mentioning HOME_DIR, I believe that is how Pythonbrew does it.
<Joe_knock>
oh wait ... I misread there
<shevy>
Joe_knock yeah; it's how gobolinux got started too, hisham compiled and installed into his user dir
FooMunki_ has joined #ruby
FooMunki has quit [Read error: No route to host]
FooMunki_ is now known as FooMunki
josephnd1nton has quit [Ping timeout: 265 seconds]
fabrice31 has joined #ruby
o0oo0o has quit [Ping timeout: 250 seconds]
<shevy>
Joe_knock so ultimately it will depend on what model you follow; the FHS model won't allow more than one /usr/bin/ruby, so debian would have I think /usr/bin/ruby2.0 or something like that, and then /usr/bin/ruby is a symlink - they can not easily switch to multiple different ruby versions, because where do the real different ruby binaries reside precisely on a debian system?
<Joe_knock>
It kinda makes me wonder if a fork of Ubuntu to simply "enhance" developer tools would live. Something like Mozilla's new browser
<shevy>
enhance what model
allcentury has quit [Ping timeout: 272 seconds]
<shevy>
you are still in the ubuntu model
allcentu1 has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
<Joe_knock>
The gobolinux way of doing it
lampd1 has joined #ruby
SCHAAP137 has joined #ruby
<shevy>
dunno; the big distributions have no intention to change to alternative ways
<shevy>
do it their way or take the highway
<shevy>
how did unity originate :)
<Joe_knock>
no unity by me :'D that shit would smash my old systems
Jesterman81 has quit [Quit: Jesterman81]
haxr has quit [Quit: Leaving]
kasperti_ has quit []
<lampd1>
anyone know of a better way to get a human readable and filename friendly timestamp than something like `Date.strptime(Time.now.to_s, '%Y-%m-%d').strftime('%Y%m%d')` ?
adriancb has quit [Remote host closed the connection]
bbloom has quit [Client Quit]
yfeldblum has joined #ruby
Juanchito has quit [Quit: Connection closed for inactivity]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sinequanon has quit []
iamjarvo has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
t_mmyv has joined #ruby
Shazaum has quit [Quit: Leaving]
<shevy>
hmm what would be an elegant or short way to convert "151.13" into "151.130"?
<jhass>
<< '0'
sambao21 has quit [Quit: Computer has gone to sleep.]
<borodin>
struggling with a bundler issue with jenkins and the rvm plugin. My latest log: https://gist.github.com/chewmanfoo/f1c3def42a33800e871f I've tried uninstalling and reinstalling mysql2 gem in a variety of ways - nothing works. Any suggestions, please?
despai has quit [Quit: This computer has gone to sleep]
i0n has joined #ruby
aspires has quit []
Areessell has quit [Ping timeout: 256 seconds]
econerd4ever has joined #ruby
havenwood has joined #ruby
tier_ has joined #ruby
adriancb has joined #ruby
msmith_ has quit [Ping timeout: 244 seconds]
reinaldob has quit [Ping timeout: 258 seconds]
v2n has quit [Quit: WeeChat 1.0.1]
maximski has joined #ruby
jheg has joined #ruby
nobitanobi has quit [Remote host closed the connection]
jheg has quit [Client Quit]
maximski has quit [Client Quit]
tier has quit [Ping timeout: 264 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
rshetty has joined #ruby
sinequanon has joined #ruby
v0n has joined #ruby
<jdj_dk>
anybody here using capistrano? Can't get it to respect roles not containing db. I don't want it to do db migrations on deploy.. worked fine in 2.x.. but can't make it work in 3.x... Tried setting it in deploy.rb and as a environment var when running the task.. any suggestions?
Lightsword_ has joined #ruby
<jhass>
there's a #capistrano
banister has joined #ruby
DTSCode is now known as rabbitbiscuit
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jdj_dk>
jhass: thanks =)
chipotle has joined #ruby
rabbitbiscuit is now known as DTSCode
nobody44 has quit [Quit: Leaving]
chipotle has quit [Remote host closed the connection]
nkumari has joined #ruby
Lightsword has quit [Ping timeout: 272 seconds]
Lightsword_ is now known as Lightsword
wldcordeiro has joined #ruby
spider-mario has joined #ruby
rshetty has quit [Ping timeout: 264 seconds]
nkumari has quit [Read error: Connection reset by peer]
nkumari_ has joined #ruby
decoponio has quit [Quit: Leaving...]
chipotle has joined #ruby
devdazed has quit [Read error: Connection reset by peer]
jimmyy has joined #ruby
MattB2 has joined #ruby
nkumari_ has quit [Remote host closed the connection]
nkumari has joined #ruby
devdazed has joined #ruby
auxbuss has quit [Quit: I'm gone.]
pika_pika has joined #ruby
krisquigley has joined #ruby
tier_ has quit [Remote host closed the connection]
Versality has quit [Quit: Be back later ...]
Jake232 has joined #ruby
aspires has joined #ruby
gregf has quit [Remote host closed the connection]
borcean has left #ruby ["WeeChat 0.3.5"]
Versality has joined #ruby
nobitanobi has joined #ruby
lidaaa has joined #ruby
josephnd1nton has joined #ruby
krisquigley has quit [Ping timeout: 264 seconds]
nobitanobi has quit [Remote host closed the connection]
nkumari has quit [Remote host closed the connection]
rkalfane has joined #ruby
quimrstorres has joined #ruby
Lightsword_ has joined #ruby
atmosx has joined #ruby
<atmosx>
hello
Lightsword has quit [Ping timeout: 265 seconds]
Lightsword_ is now known as Lightsword
<shevy>
atmosx!
fantazo has joined #ruby
<shevy>
is your exam over?
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
josephnd1nton has quit [Ping timeout: 240 seconds]
<atmosx>
shevy: yeah I passed, the prof was good (luckily)
The_NetZ has joined #ruby
<atmosx>
I mean he gave me an 'e' which the lowest vote but I passed it
<atmosx>
now I have another problem though.
<shevy>
atmosx \o/
<shevy>
lol
<atmosx>
hehe ty shevy :-D
<The_NetZ>
pop those tops folks, lets party!
<shevy>
how can you solve one problem and incur a new problem
<atmosx>
I need wait another 1.5 years to get the degree
<atmosx>
because pharmacy is 5 years and if I get the degree earlier is not recognized
<atmosx>
by many EU states, Greece among them
<atmosx>
so
<The_NetZ>
shevy: got ruby 2.1.5 setup under mingw-w64 on arch linux :)
<atmosx>
but I'll be in Greece at least...
<The_NetZ>
I wonder... if germany attacked france from the rear, would greece help?
nobitanobi has joined #ruby
rkalfane has quit [Ping timeout: 264 seconds]
<atmosx>
Anyone familiar with HAML? I have an array... which I display using array.join(' ,') ... can I turn this array into an array of links? joined?
mloveless has quit [Remote host closed the connection]
mloveless has joined #ruby
robertt_dex has quit [Remote host closed the connection]
eichenwald has quit [Quit: WeeChat 1.0.1]
sambao21 has quit [Quit: Computer has gone to sleep.]
unclouded has quit [Ping timeout: 272 seconds]
unclouded has joined #ruby
blackmesa has joined #ruby
sambao21 has joined #ruby
baweaver has joined #ruby
<shevy>
atmosx huh? what madness is this?
<shevy>
I mean the waiting time
<atmosx>
shevy: well, I have some tags and I want make the click-able
lolmaus has quit [Quit: Konversation terminated!]
<atmosx>
now I display them in views using tags.join(' ,') so... I wonder if I can make them somehow link "/tags/:#{element}" ... I think it can be done through a helper method
<atmosx>
but I can't wrap my mind around it
Macaveli has joined #ruby
<ramfjord>
atmosx: array.map { |tag| link_to tag blah } ?
<apeiros>
LIKE %foo% queries can't be indexed in a good way
ThaDick has joined #ruby
tus has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
krisquigley has joined #ruby
nvdpl has quit [Quit: ZZZzzz…]
chipotle has quit [Quit: cya]
paulfm has quit []
<atmosx>
hm, that's messed up. One way or another... I'll to do an extra filtering
<atmosx>
blah I'll continue tomorrow
<apeiros>
atmosx: also, pointing to a stack overflow question with tons of answers and asking "this scheme"? seriously?
<atmosx>
apeiros: anyone of them
<apeiros>
yes. you can make it with one of them
<atmosx>
apeiros: that would work fine if the app had 1 user, if the app is multiuser how will you filter between users through tags?
chipotle has joined #ruby
mloveless has quit [Remote host closed the connection]
jjasonclark has quit [Quit: jjasonclark]
supersymmetry has joined #ruby
<apeiros>
atmosx: you did not describe how your tagging system is supposed to work. so: no idea.
hiyosi has quit [Ping timeout: 244 seconds]
<atmosx>
without an extra table you can do that, or without extra filtering.. fetch tags, match tags to products, see which products belong to the user, create a list display them...
pandaant has quit [Remote host closed the connection]
<atmosx>
apeiros: pretty much as the Toxi system listed there.
krisquigley has quit [Ping timeout: 256 seconds]
<apeiros>
the system listed there does not have users.
<apeiros>
ok, look, I'm not interested in pulling a spec out of your nose.
<apeiros>
specify your problem. then ask.
<apeiros>
don't make people figure YOUR spec for you.
neoxquick has joined #ruby
whoisjake has quit []
Oog has joined #ruby
klmlfl has joined #ruby
<Oog>
any advice on finding memory leaks? someone recommended ruby-prof but it requires a patched ruby...
josephndenton has quit [Ping timeout: 240 seconds]
Timgauthier is now known as timgauthier_away
Avahey has joined #ruby
econerd4ever has quit [Remote host closed the connection]
terlar has quit [Quit: WeeChat 1.0.1]
sdwrage_ has joined #ruby
Lingos_ has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
econerd4ever has joined #ruby
<atmosx>
Actually, I'm trying to figure out the less complicated way to make a working tag scheme, for a web-app with multiple users. My current scheme works, but it has double entries in my 'Tag' models and soon will be overflowing.
cafeina has quit [Quit: Leaving]
sdwrage has quit [Ping timeout: 255 seconds]
dsilva has joined #ruby
tier has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
Megtastique has quit []
timgauthier_away is now known as Timgauthier
jaequery has joined #ruby
dseitz has joined #ruby
unshadow has joined #ruby
econerd4ever has quit [Ping timeout: 250 seconds]
Lingos_ has quit [Ping timeout: 250 seconds]
CustosLimen has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
ptrrr has quit [Quit: ptrrr]
fabrice31 has joined #ruby
momomomomo has joined #ruby
Areessell has joined #ruby
drawingthesun has quit [Read error: Connection reset by peer]
sambao21 has quit [Quit: Computer has gone to sleep.]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
econerd4ever has joined #ruby
crazydiamond has joined #ruby
msgodf has quit [Remote host closed the connection]
<Oog>
it really seems like there isnt a good tool for finding memory leaks in ruby...? :(
unshadow has quit [Client Quit]
lampd1 has joined #ruby
duncannz has joined #ruby
DTSCode is now known as dts
<lampd1>
so, how would you guys validate hash values the ruby way?
<lampd1>
not sure it's going to be worth my time to validate them, but it could be nice
mary5030 has quit [Ping timeout: 244 seconds]
<lampd1>
would like to check datatype and length
baweaver has quit [Remote host closed the connection]
HULK_SMASH has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
jenrzzz_ has joined #ruby
<atmosx>
lampd1: minitest?
josephndenton has joined #ruby
<lampd1>
well, i actually want it to validate the output during execution
<atmosx>
oh I see
<lampd1>
as the system the data gets fed into just fails if the data isn't the right type
dts has quit [Quit: Leaving]
HULK_SMASH has quit [Quit: GONE]
<atmosx>
like Rails, well write method..
<lampd1>
:P
<atmosx>
a method
timonv_ has quit [Remote host closed the connection]
dts has joined #ruby
<lampd1>
ergh
HULK has joined #ruby
<lampd1>
i guess i could, just wondering if there was anything handy already made :P
<lampd1>
saw hash_validator but it doesn't do length afaik
HULK is now known as HULK_SMASH
dts has quit [Changing host]
dts has joined #ruby
sambao21 has joined #ruby
<atmosx>
lampd1: adding a validator doesn't seem complicated.
crazydiamond has quit [Remote host closed the connection]
<atmosx>
havenwood: when are you going up? that's live streaming umnice
<lampd1>
what do you guys use to profile Ruby?
josephndenton has quit [Ping timeout: 250 seconds]
_2_Rebecca has joined #ruby
<_2_Rebecca>
hi
<atmosx>
ah no, havenwood what minute did you come up?
<havenwood>
atmosx: i think i linked the spot
<shevy>
_2_Rebecca lol sure sure sure, the _2_ is a dead giveaway
<_2_Rebecca>
u ok
<shevy>
lampd1 I only use benchmarks
<atmosx>
havenwood: oh that's you! OMG I thought you were uglier! :-P
adriancb has quit [Remote host closed the connection]
<havenwood>
atmosx: hahaha
<havenwood>
atmosx: nope, just that ugly, no more :P
<_2_Rebecca>
ha
Scripore has quit [Ping timeout: 264 seconds]
<lampd1>
what's your setup like for that shevy?
vifino has quit [Ping timeout: 272 seconds]
dts has quit [Quit: Leaving]
davasaurous has joined #ruby
<atmosx>
shevy: everybody uses benchmarks... :-P
<_2_Rebecca>
I think
* lampd1
runs ruby app, looks at watch
<shevy>
lampd1 just benchmarks to see what is faster and preferrentially use that UNLESS the other way is prettier (and not much slower)
<lampd1>
:P
DTSCode has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
tus has quit []
geggam has quit [Ping timeout: 264 seconds]
<lampd1>
sry if my questions are super noobish, working on my first ruby app after working solely on Magento projects for a few years :P
jenrzzz has joined #ruby
<atmosx>
havenwood: blah lame youtube still doesn't start, I wonder it has to load the entire video :-/
renderfu_ has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 264 seconds]
<_2_Rebecca>
do u like talking
<atmosx>
lampd1: what kind of app, eshop?
<jhass>
apeiros: social experiment ready?
mloveless has joined #ruby
<apeiros>
jhass: no. you'd know.
<apeiros>
seems to be the same as before.
jenrzzz_ has quit [Ping timeout: 250 seconds]
davasaurous has quit [Remote host closed the connection]
_2_Rebecca has quit [Remote host closed the connection]
Akuma has quit [Quit: So long sukkas!]
<lampd1>
atmosx: building a bridge between shopify and an APIless ERP system
davasaurous has joined #ruby
<jhass>
ups, scared away, sorry
<lampd1>
so, mostly functional stuff
<apeiros>
:)
<atmosx>
lampd1: interesting
blackmesa has quit [Quit: WeeChat 1.0.1]
<lampd1>
enjoying ruby though :)
<atmosx>
lampd1: do you any programming experience with other langs?
duggiefresh has quit [Remote host closed the connection]
<atmosx>
lampd1: PHP I guess?
<lampd1>
PHP mostly, super tired of ZF1 and magento tho
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<atmosx>
lampd1: I see why you enjoy ruby
<lampd1>
have done a little functional python stuff with an arduino lately
maletor has joined #ruby
josephndenton has joined #ruby
DTSCode has quit [Quit: Leaving]
duggiefresh has joined #ruby
dts has joined #ruby
Akuma has joined #ruby
AndyBotwin has joined #ruby
baweaver has joined #ruby
<atmosx>
cool
max96at is now known as max96at|off
allcentu1 has quit [Ping timeout: 250 seconds]
SHyx0rmZ has quit [Remote host closed the connection]
boombadaroomba has quit [Remote host closed the connection]
boombadaroomba has joined #ruby
duggiefresh has quit [Ping timeout: 245 seconds]
narph has quit [Quit: Connection closed for inactivity]
Scripore has joined #ruby
karmatr0n has quit [Remote host closed the connection]
rkazak has joined #ruby
Akuma has quit [Read error: Connection reset by peer]
it0a has quit [Ping timeout: 244 seconds]
nobitanobi has joined #ruby
benzrf is now known as benzrf|offline
Akuma has joined #ruby
davasaurous has quit [Remote host closed the connection]
rshetty has joined #ruby
nvdpl has joined #ruby
jerius has quit []
silkfox has quit [Ping timeout: 240 seconds]
zorak8 has joined #ruby
renderful has joined #ruby
jimbach has quit [Remote host closed the connection]
rajeshchawla has joined #ruby
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
rshetty has quit [Ping timeout: 240 seconds]
jheg has joined #ruby
jimmyy has joined #ruby
Megtastique has joined #ruby
Photism has joined #ruby
aspiers has joined #ruby
jimmyy has quit [Max SendQ exceeded]
davasaurous has joined #ruby
jimmyy has joined #ruby
ht__th has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
Scripore has quit [Ping timeout: 272 seconds]
cpruitt has quit [Quit: cpruitt]
rkazak has quit [Quit: Sleep.....ing....]
econerd4ever has quit [Remote host closed the connection]
econerd4ever has joined #ruby
zacstewart has joined #ruby
davasaurous has quit [Remote host closed the connection]
davasaurous has joined #ruby
Scripore has joined #ruby
<zacts>
so far I'm really liking ruby also
econerd4ever has quit [Ping timeout: 245 seconds]
snath has quit [Ping timeout: 245 seconds]
fantazo has quit [Quit: Verlassend]
baweaver has quit [Remote host closed the connection]
andrewlio has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 240 seconds]
ndrei_ has quit [Ping timeout: 265 seconds]
kasperti_ has joined #ruby
Xeago has joined #ruby
SHyx0rmZ has joined #ruby
Timgauthier has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fantazo has joined #ruby
Scripore has quit [Ping timeout: 255 seconds]
Deele has quit [Ping timeout: 260 seconds]
davasaurous has quit [Remote host closed the connection]
davasaurous has joined #ruby
funburn has joined #ruby
aspires has quit []
funburn has quit [Client Quit]
hiyosi has joined #ruby
livingstn has quit []
v0n has quit [Quit: WeeChat 1.0.1]
<shevy>
zacts \o/
v0n has joined #ruby
dkphenom has joined #ruby
HULK_SMASH has quit [Quit: Sleepy...]
ctp has joined #ruby
sailias has quit [Quit: Leaving.]
snath has joined #ruby
zzzbra_ has joined #ruby
zzzbra has quit [Ping timeout: 258 seconds]
baweaver has joined #ruby
hiyosi has quit [Ping timeout: 255 seconds]
baweaver has quit [Remote host closed the connection]
baweaver has joined #ruby
aspiers has quit [Ping timeout: 255 seconds]
davasaurous has quit [Remote host closed the connection]
samuel02 has quit [Remote host closed the connection]
adriancb has joined #ruby
deric_skibotn has quit [Ping timeout: 255 seconds]
patrick99e99 has joined #ruby
moritzs has joined #ruby
lmickh has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
Lightsword has joined #ruby
baweaver has quit [Ping timeout: 244 seconds]
adriancb has quit [Remote host closed the connection]
weems|mac has quit [Quit: bai]
hiyosi has joined #ruby
baweaver has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lightsword_ has joined #ruby
sinequan_ has quit []
sinequanon has joined #ruby
econerd4ever has joined #ruby
havenwood has quit [Remote host closed the connection]
deric_skibotn has joined #ruby
Hijiri has quit [Ping timeout: 272 seconds]
kirun has quit [Quit: Client exiting]
dkb20k has joined #ruby
Lightsword has quit [Ping timeout: 265 seconds]
Lightsword_ is now known as Lightsword
claymore has quit [Quit: Leaving]
Megtastique has quit []
kireevco has quit [Quit: Leaving.]
rajeshchawla has quit [Remote host closed the connection]
AlexRussia has quit [Ping timeout: 240 seconds]
procat has quit [Ping timeout: 240 seconds]
treehug88 has quit []
sambao21 has joined #ruby
aspires has joined #ruby
maximski has quit []
nateberkopec has quit [Quit: Leaving...]
devdazed has quit [Quit: Computer has gone to sleep.]
ghr has joined #ruby
dkb20k has quit [Ping timeout: 244 seconds]
AlexRussia has joined #ruby
dangerousdave has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
jheg has quit [Quit: jheg]
jack_rabbit has joined #ruby
<The_NetZ>
ruby is pretty swish
procat has joined #ruby
davasaurous has joined #ruby
AndyBotwin has quit [Ping timeout: 240 seconds]
ghr has quit [Ping timeout: 272 seconds]
volty has joined #ruby
frozenturtle has joined #ruby
dangerousdave has quit [Ping timeout: 264 seconds]
Megtastique has joined #ruby
<shevy>
swedish?
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Takle has quit [Remote host closed the connection]
agjacome has quit [Quit: leaving]
<shevy>
god
<shevy>
that is the first time that the module vs. class distinction actually forces me to change my code
<shevy>
Foo is not a module (TypeError)
MattB2 has quit [Remote host closed the connection]
<shevy>
all I do is set some constants
funburn has joined #ruby
<eam>
ruby could do without the module concept entirely
rajeshchawla has joined #ruby
lkba has joined #ruby
siso has joined #ruby
<shevy>
yeah
<shevy>
now my code works again; changing module Foo to class Foo
<shevy>
but this is so annoying
<The_NetZ>
heh
<jhass>
don't take my mixins!
<shevy>
and my toplevel is now a class too
<shevy>
I am walking the path of apeiros
MattB2_ has joined #ruby
<eam>
I don't know why the toplevel wouldn't always be a class
<lampd1>
Foo me once, shame on you, Foo me twice, shame on me. Foo me thrice...
j_mcnally has quit [Ping timeout: 240 seconds]
<shevy>
eam but if you have a toplevel class in a project then you can no longer 'include' on it
cloaked1 has joined #ruby
procat has quit [Ping timeout: 264 seconds]
<eam>
so?
<shevy>
that reduces flexibility every time you desire to do composition
jobewan has quit [Quit: Leaving]
<jhass>
eam: because your library might be nothing but a collection of utility functions
SloggerKhan has joined #ruby
<eam>
really the problem here is I think oo is fundamentally broken
<eam>
so I'll just quit while I'm ahead
<shevy>
hehehe
<shevy>
perl tried to do OOP!
<cloaked1>
g'day everyone. So, Python has a way of allowing a script to be called either interactively or as a module using a conditional expression looking at __main__ (iirc). Does Ruby have anything similar to that? I have a script I'd like to be able to call as a library but I need to massage it a little if so.
<eam>
did a really good job of it
<eam>
it's useful in a limited fashion
<shevy>
cloaked1 I guess this is equivalent to: if __FILE__ == $PROGRAM_NAME
<SloggerKhan>
Is there a way to insert a bunch of nearly identical methods into a ruby class? Like `[<list of method names>].each { |name| add_to_this_class_method_x_named name }` ?
<shevy>
actually
<cloaked1>
shevy: ah! right! Ok. Thanks!
<cloaked1>
?
<shevy>
what is this interactively part? do you mean a live debugger for all modules cloaked1?
* cloaked1
waits a sec
<cloaked1>
meh, nah. Just if I invoke it directly or load/require it from another script.
<shevy>
ah yes
funburn has quit [Quit: funburn]
fantazo has quit [Ping timeout: 244 seconds]
<shevy>
for a moment you got me there with some python superfeature
<cloaked1>
so __FILE__ is the recommended way.
<rpag>
SloggerKhan, there's define_method()
adriancb has joined #ruby
MattB2_ has quit [Ping timeout: 272 seconds]
<cloaked1>
yeah, sorry. I'm not a Python dev really...just mucked with it a bit and noticed that feature a few times.
<jhass>
cloaked1: note though that we tend to use two or more files though
<shevy>
hah I don't know much of python myself
<cloaked1>
actually, the more I mess with Python, the more I wanna kick someone betweent he legs
jottr has joined #ruby
<eam>
right in the python
<shevy>
we have lots of perl users but barely any python folks
<jhass>
one containing the library and one doing nothing but requiring the library and driving it
larissa has quit [Quit: Leaving]
momomomomo has quit [Quit: momomomomo]
AndyBotwin has joined #ruby
<jhass>
the later one being your executable
<cloaked1>
jhass: you mean how I've seen that there's a library loader/wrapper and the actual script kinda thing?
<eam>
shevy: it's because python isn't undergoing a diaspora
<cloaked1>
ah, yes
<shevy>
well they have had their python 2 vs. python 3 war
<cloaked1>
I suppose that would be the cleaner solution really....
<SloggerKhan>
Thanks, I think define method will work for me. I'll have to at least try it, anyway.
<cloaked1>
I think I'll break out the classes into their own library and require them from the main script. Thanks jhass.
anarang has joined #ruby
grzywacz has quit [Quit: :wq]
<jhass>
cloaked1: quite often you even have a third one and the executable doing nothing but require 'foo/cli'; Foo::CLI.new(ARGV) or similar
<jhass>
which makes it a lot easier to write tests for
<klmlfl>
SloggerKhan:
<cloaked1>
jhass: yeah. I've noticed that technique in a lot of libraries. I'm going to go with that.
<jhass>
and then the Foo::CLI class drives your library
<klmlfl>
do the methods have definitions yet SloggerKhan
siso has quit [Read error: Connection reset by peer]
wsmoak has joined #ruby
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<shevy>
this channel lacks smileys
<cloaked1>
:)
<cloaked1>
I've done my good deed for the day.
rh1n0_away has quit [Max SendQ exceeded]
jottr has quit [Ping timeout: 240 seconds]
<shevy>
\o/
<klmlfl>
(:
<shevy>
oh that's read from right to left... my brain has difficulties with these
rh1n0 has joined #ruby
davasaurous has quit [Remote host closed the connection]
<shevy>
it's like going to Australia
<shevy>
and walking on your hands
<klmlfl>
loL
<shevy>
<Ulti> got a year until v6.0.0 is actually released