<workmad3>
lavaman: sorry... I have very little sympathy if you *started* this on a ruby that was already EOL
<sshack>
apeiros: Point.
armyriad has joined #ruby
<centrx>
lavaman, You started using Ruby 1.8 after it was already retired?
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<lavaman>
we don't write ruby apps
<centrx>
I feel even more sorry for you now
<lavaman>
we just use a bunch of tools that are based on ruby
<lavaman>
well, i'm not a dev at all. We're building out infrastructure for devs to use
maletor has quit [Quit: Computer has gone to sleep.]
<workmad3>
'oh hey, we have this new setup we built last year... it's using windows 2000 and we're having issues...'
timonv has joined #ruby
<centrx>
Tell them Ruby 1.9.0 was released in 2007.
<lavaman>
I got an email for a job today that required familiarity with windows nt
<centrx>
So they've had about seven years to upgrade.
<workmad3>
centrx: I was taking 2010 as the first 1.9.2 stable release :)
<dorei>
a friend of mine is working @ organization where due to internal bureaucracy the ETA for the setup of a new VM is about 9 months :D
<lavaman>
you're preaching to the choir here
<workmad3>
centrx: as 1.9.0 and 1.9.1 weren't really good for production
<lavaman>
we'd have started this whole thing on ubuntu 13.10 if i could have
<centrx>
Why not?
<workmad3>
centrx: too buggy and unstable, iirc
<dorei>
lavaman: why not compile ruby from sources?
<workmad3>
centrx: also, quite a moving target as they were still figuring stuff out
<centrx>
But Ubuntu 12.04 has Ruby 1.9...
terrellt has quit [Ping timeout: 252 seconds]
<workmad3>
centrx: already pointed that out :D
irishcoder has quit [Remote host closed the connection]
<centrx>
Ubuntu 10.04 even has Ruby 1.9
abdulsattar has quit [Ping timeout: 246 seconds]
<workmad3>
10.04 has 1.9.1, 12.04 has 1.9.3
<workmad3>
both installed with ruby-1.9.1...
<workmad3>
because... ubuntu...
<lavaman>
I don't determine my work priorities sadly
<centrx>
but isn't there anyone competent there who would upgrade Ruby in the last seven years?
<lavaman>
one-click deploy of oracle java trumped any effort to get the ruby versions straight
<centrx>
You should quit
<lavaman>
lol
<centrx>
Take a stand
<lavaman>
we really haven't run into many issues until recently
Sc0rp10n has quit [Ping timeout: 240 seconds]
<lavaman>
now nothing supports 1.8.7 anymore
yasushi has joined #ruby
Tentra has quit []
Tentra has joined #ruby
<workmad3>
lavaman: yeah... funny how something that was in security-only fixes for legacy for about 4 years, then got retired a year ago is now not supported by anyone..
<lavaman>
oh, i'm not the least bit surprised
<centrx>
They've been too busy the last seven years to upgrade
<lavaman>
i'm more surprised we made it this long without issues
timonv has quit [Ping timeout: 240 seconds]
<workmad3>
lavaman: regarding your actual problem btw... I'd push to get the puppet modules installed so you can share data between nodes
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy>
ifelse(x<5 | x>8, x, 0)
<workmad3>
lavaman: it's kinda essential to be able to do that if you want to do multi-node rollouts that have *any* reliance on communicating between the nodes
<shevy>
hmmm R has an ifelse construct
<workmad3>
shevy: fun :)
jeregrine has quit [Quit: Connection closed for inactivity]
andrewlio has quit [Remote host closed the connection]
<workmad3>
lavaman: once you've done that, you can store the mapping of hostnames to ids on the zookeeper master config node and pull them off on other nodes
<lavaman>
yeah. if i had the leeway to actually solve the problem. I mean, we've gone from 0 to 3000+ instances in amazon in less than a year. We can do multi-region cassandra and mongo clusters in < 10min with 6 lines of json passed to a rest api
<lavaman>
overall, we've done very well
<workmad3>
lavaman: you just can't install ruby 1.9... ;)
<lavaman>
lol i would
irishcoder4 has joined #ruby
<lavaman>
but that's testing a fair amount of stuff we don't have automated tests for
<lavaman>
mostly random scripts and such
yasushi has quit [Ping timeout: 240 seconds]
sputnik13 has joined #ruby
<lavaman>
but it's an effort i just don't have time for
<lavaman>
our backlog and support burden are outstripped our capacity about 3 months ago :)
fgo has joined #ruby
<lavaman>
and since the whole company is in the middle of a complete re-org, all hiring is frozen
<lavaman>
smh
Cache_Money has quit [Quit: Cache_Money]
jetblack has quit [Ping timeout: 265 seconds]
afex has quit [Ping timeout: 246 seconds]
paulfm has joined #ruby
shinobi_one has quit [Quit: shinobi_one]
<pipework>
lavaman: Because when any company isn't undergoing reorganization they're any less clueless than they are otherwise, right? :D
<lavaman>
lol no doubt
<lavaman>
right now we're in the "We've got a 30 day plan to make the 90 day plan to implement the framework for the decison-making process of how things are going to be organized"
<lavaman>
lol
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
montyboy has joined #ruby
niekas has joined #ruby
<wallerdev>
how big is the company?
niekas has left #ruby [#ruby]
<pipework>
|========| this big
sailias has joined #ruby
<dorei>
lavaman: r u working for the EU Commission? :p
<lavaman>
lol almost
<lavaman>
Pearson
badhatter has joined #ruby
atmosx has quit [Quit: Lost in trance]
f0ster has quit [Remote host closed the connection]
paulfm has quit [Ping timeout: 240 seconds]
Tentra_ has joined #ruby
<lavaman>
I'd bet money every single person in this room has used something from my company at some point in their education :)
yekta has joined #ruby
abdulsattar has joined #ruby
<benzrf>
lavaman: what co.
<wallerdev>
name sounds familiar
<lavaman>
Pearson
<benzrf>
ah
<lavaman>
It's the world's biggest education company
<pipework>
lavaman: What if someone of us aren't educated?
* pipework
is illiterate
<lavaman>
nice use of a keyboard ;)
<lavaman>
I learned the other day that R.Kelly is actual illiterate lol
<lavaman>
*actually
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
pel_daniel has left #ruby [#ruby]
mary5030 has quit [Remote host closed the connection]
Tentra has quit [Ping timeout: 240 seconds]
vlad_starkov has joined #ruby
<lavaman>
you guys are talking about ruby versions, this place was 90% M$ .NET a year ago
SonicX has quit [Read error: Connection reset by peer]
<lavaman>
so at least i'm not dealing with that :)
SonicX_ has joined #ruby
<benzrf>
>mfw you actually called it m$
<pipework>
lavaman: Speech-to-text
<benzrf>
lavaman: what software do they make
<lavaman>
well, we have several learning platforms
<lavaman>
testing systems
<lavaman>
i'm honestly not even sure what all they have
youssefeid has joined #ruby
<lavaman>
they used to operate as a holding company
sdouglas has quit [Remote host closed the connection]
<lavaman>
now they're trying to consolidate
zigomir has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
sdouglas has quit [Read error: Connection reset by peer]
<lavaman>
cause the realized it didn't make sense to have completely different products for the same purpose, but one owns North America, one owns Europe and the other Asia
youssefeid has quit [Write error: Connection reset by peer]
<lavaman>
completely separate groups, names, infrastructure
<pipework>
lavaman: So you work for the illiterati?
Hobogrammer has quit [Ping timeout: 246 seconds]
sdouglas has joined #ruby
<lavaman>
hahah maybe
youssefeid has joined #ruby
<lavaman>
i'm way too far down to know about any of that :)
<lavaman>
they say they now want to be the google of education
<lavaman>
can't sit around collecting textbook money anymore
mercwithamouth has joined #ruby
<Musashi1>
Good :P
dgaffney has joined #ruby
toastynerd has quit [Remote host closed the connection]
<lavaman>
indeed
<lavaman>
the vision sounds good. we'll see about the execution :)
vlad_starkov has quit [Ping timeout: 240 seconds]
<Musashi1>
Fricken 140$ books that have one page rewritten and the chapters and problems reordered so you can't use the old version
bricker`LA has joined #ruby
* pipework
expects a marvelous hallmark of a fuckup.
snuffeluffegus has joined #ruby
arubin has joined #ruby
<lavaman>
pipework I give it even odds. All the executives are new
<lavaman>
half the directors are gone
jjbohn has joined #ruby
<lavaman>
Musashi1 no doubt. one of the biggest scams ever
pu22l3r has joined #ruby
alexju has quit [Remote host closed the connection]
SonicX_ has quit [Read error: Connection reset by peer]
paulfm has joined #ruby
<Musashi1>
I don't know about the biggest ever but it's pretty bad.. Doesn't affect me anymore but it sucks to see people getting ripped off like that.
skulker has joined #ruby
<lavaman>
in the US at least, higher ed in general is a huge scam
<lavaman>
half these kids don't need college
bradhe has quit [Remote host closed the connection]
skulker is now known as skulker_
<Musashi1>
yeah
coderxin has joined #ruby
<lavaman>
24, broke, no real job prospects with that 80k sociology degree, still at home and now on parents insurance till 26
<Musashi1>
the man wants it so that they can enslave people with debt. wall street wants it so they can sell the debt.
bocase8 has joined #ruby
mikepack has joined #ruby
<bocase8>
Hi
lethjakman has quit [Ping timeout: 245 seconds]
<bocase8>
i wanna build an wrapper around an API - where do i start? any good link that could give me an idea
sshack has quit [Quit: sshack]
sailias has quit [Read error: Operation timed out]
SonicX has joined #ruby
<benzrf>
bocase8: that is an absurdly vague question
<benzrf>
what api?
<benzrf>
a c api? a web api?
<bocase8>
ruby
coderxin has quit [Ping timeout: 246 seconds]
danshultz has joined #ruby
<shevy>
penis
lethjakman has joined #ruby
jetblack has joined #ruby
bocase8 has quit [Quit: Page closed]
lavaman has quit [Quit: Leaving.]
<centrx>
shevy!*@* added to ignore list.
<centrx>
!!!
<shevy>
:(
<shevy>
now noone will combat php here anymore
r0nin_ has quit [Remote host closed the connection]
Xeago has quit [Ping timeout: 240 seconds]
<centrx>
PHP is an abomination and a scourge on the face of the earth.
<benzrf>
centrx: thats a good idea
<benzrf>
ill do that too
<benzrf>
08:38 Ignoring ALL from shevy
<geggam>
illiterati ... pipework
* geggam
saves that
<geggam>
expect plagarism
<shevy>
benzrf haha now I can rule
lavaman has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skulker_ has quit [Remote host closed the connection]
irishcoder4 has quit [Remote host closed the connection]
markisonfire has joined #ruby
workmad3 has quit [Read error: Operation timed out]
<abdulsattar>
If I'm writing an edit post cucumber feature, and I need to have a post created before, should I use capybara to fill in the new form and create a post AND then test editing or should I just create directly using FactoryGirl.create :post and then just test the editing part?
george2 has quit [Remote host closed the connection]
byprdct has joined #ruby
elaptics is now known as elaptics`away
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
montyboy has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<abdulsattar>
I already have a new test already in place
predator217 has joined #ruby
skulker_ has joined #ruby
mengu has quit []
kbarry has quit [Ping timeout: 264 seconds]
youssefeid has quit []
predator117 has quit [Ping timeout: 246 seconds]
<abdulsattar>
sorry, lost connection for a while, did I miss something?
<benzrf>
nothing at all
yubrew has joined #ruby
shevy has quit [Ping timeout: 240 seconds]
razrunelord has quit []
elaptics`away is now known as elaptics
elaptics is now known as elaptics`away
<abdulsattar>
When testing for edit, should I just stub the create part (using Factorygirl) and test editing or should I run through the create form too?
sambao21 has quit [Ping timeout: 246 seconds]
toastynerd has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
<centrx>
abdulsattar, Are you asking if you should ignore testing the create component of your program?
cj3kim has joined #ruby
BuSerD has quit [Ping timeout: 245 seconds]
superlou has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
<superlou>
Is there a way to detect from a child process (created using fork) if the parent process has exited (or crashed)? I tried the example given at https://www.ruby-forum.com/topic/141150, but Kernel.exit is never called.
baroquebobcat has joined #ruby
<superlou>
Is there a more standard way to do this than using fork to make sure the child process doens't outlive the parent?
chipotle has quit [Quit: cya]
abdulsattar has quit [Ping timeout: 240 seconds]
tjr9898 has quit [Remote host closed the connection]
<bnagy>
you can just check your ppid from time to time I guess
saarinen has joined #ruby
<superlou>
check the parent's ppid from inside the fork?
frode15243__ is now known as frode15243
<bnagy>
uh you ppid is your parent id
frode15243 has quit [Changing host]
frode15243 has joined #ruby
dx7 has quit [Ping timeout: 265 seconds]
<superlou>
so if my child process is blocking, i'd need to make a new thread inside the child?
cj3kim has quit [Ping timeout: 240 seconds]
kennym has quit [Quit: Leaving.]
robbyoconnor has quit [Ping timeout: 245 seconds]
BuSerD has joined #ruby
lethjakman has joined #ruby
<bnagy>
you're forking _and_threading?
<bnagy>
you must like pain :)
<superlou>
i've coded myself into a corner :)
<bnagy>
well the halting problem is hard, don't feel bad
robert_ has quit [Read error: Connection reset by peer]
<bnagy>
yeah forking gives you a whole faux shared memory thing
<superlou>
i thought threads shared memory?
<superlou>
and processes didn't?
<benzrf>
superlou: 90% sure that forks dont share memory
<benzrf>
it just clones the memory
<bnagy>
but when you fork you initially have exactly the same memory
tils`` has joined #ruby
<benzrf>
ah
<bnagy>
hence 'faux'
<benzrf>
so spawn creates a new process... with what exactly?
<dorei>
that's why there's always that ungly "if" in C and fork :p
irishcoder4 has quit [Ping timeout: 240 seconds]
mikepack has joined #ruby
<bnagy>
so your child can seem like it's accessing shared vars, but it's only shared in the sense that it's a copy of what existed at forktime
Xiti has quit [Read error: Connection reset by peer]
<superlou>
so Process.spawn seems much more robust the fork
Xiti has joined #ruby
<bnagy>
spawn in the loose sense ( as I meant it, sorry sloppy terminology ) is just asking the OS to launch a process
<superlou>
but i'm still not sure how it would be sure to terminate with the parent (uh, spawner? does spawn even keep track of ppid)?
<bnagy>
newp
<bnagy>
unix people sometimes keep pidfiles, if that helps
kennym has joined #ruby
<superlou>
like a listing of pids that the program started, to terminate on startup?
ephemerian has quit [Read error: Connection reset by peer]
<superlou>
if thye're still around?
<bnagy>
I would normally try and architect with some kind of semaphore that works cross process and cross system
<bnagy>
less hassle later
tils` has quit [Ping timeout: 240 seconds]
petey has joined #ruby
<bnagy>
so some sort of comms fabric that wrangles all your actors
<dorei>
superlou: if parent dies/exits before children, the children become zombies
bklane has quit [Quit: Leaving...]
<superlou>
i'm starting to feel like the right thing to do is have ruby files, and open 2 terminals and start webserver in one, and game server in other
<superlou>
it was just for the convenience of running 1 file
<bnagy>
philosophically, I find it easier to just have each process responsible for its own destiny
<bnagy>
same for threads tbh
teddyp1cker has joined #ruby
<bnagy>
it's way easier to arrange a way for them to self-terminate than to try and track and kill children or threads
<superlou>
what kinds of ways are for them to self terminate?
<bnagy>
check something from time to time
Shidash has joined #ruby
<bnagy>
heartbeats, IPC, files, sockets, ...
<superlou>
oh
<bnagy>
but you still have the halting problem :/
sdouglas has quit [Remote host closed the connection]
<superlou>
yeah
<bnagy>
it's a hard area
petey has quit [Ping timeout: 246 seconds]
sdouglas has joined #ruby
<superlou>
i think i'm going to split them into two programs for now
<superlou>
one game_server, and one web_server
<superlou>
or whatever
Caretaker has joined #ruby
lethjakman has quit [Ping timeout: 240 seconds]
<superlou>
since there's no interaction between them (well, it's handled by websockets)
<bnagy>
only reason I don't use it is cause I wrote kind of the same thing inhouse before it existed and dcell wasn't ready enough to switch
teddyp1cker has quit [Ping timeout: 252 seconds]
b00stfr3ak has quit [Ping timeout: 240 seconds]
<superlou>
ah. aren't we fancy :)
Atw has joined #ruby
Cache_Money has joined #ruby
saarinen has quit [Quit: saarinen]
sdouglas has quit [Ping timeout: 265 seconds]
kennym has quit [Quit: Leaving.]
sambao21 has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
thesheff17 has joined #ruby
<superlou>
welp, the split files thing sure made the code look cleaner. maybe one day i'll set up a parent script to start them both and check on each other, but seems good enough for now
<superlou>
thanks!
kennym has joined #ruby
<bnagy>
np
cj3kim has joined #ruby
sambao21 has quit [Ping timeout: 265 seconds]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
beneggett has joined #ruby
cj3kim has quit [Remote host closed the connection]
lethjakman has joined #ruby
echevemaster has quit [Ping timeout: 245 seconds]
superlou has quit [Remote host closed the connection]
beneggett has quit [Client Quit]
Avahey_ has joined #ruby
chihhsin has quit [Quit: leaving]
kennym has quit [Quit: Leaving.]
paulfm has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
badhatter has joined #ruby
paulfm has quit [Client Quit]
rahult has joined #ruby
yfeldblum has quit [Remote host closed the connection]
saarinen has joined #ruby
<wallerdev>
well have a good weekend everybody :)
irishcoder4 has joined #ruby
wallerdev has quit [Quit: wallerdev]
rjhunter has joined #ruby
postmodern has quit [Quit: Leaving]
yubrew has joined #ruby
irishcoder4 has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
davy has joined #ruby
jetblack has joined #ruby
postmodern has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
<Solnse>
are constants in Ruby actual constants, or just recognized by naming convention? In other words, could I actually change a global constant in the code somewhere?
rjhunter has quit [Ping timeout: 265 seconds]
Shidash has quit [Ping timeout: 265 seconds]
yubrew has quit [Ping timeout: 240 seconds]
<apeiros>
Solnse: constants are actual constants in that they behave differently than local variables. it's not just convention.
m_3 has joined #ruby
<apeiros>
Solnse: however, ruby sadly only produces a warning when you reassign a constant
bradhe has quit [Remote host closed the connection]
chris_thomson has quit [Quit: Zzz...]
skulker has joined #ruby
xcv has quit [Remote host closed the connection]
zono has joined #ruby
funktor has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yacks has joined #ruby
funktor has joined #ruby
marcdel_ has joined #ruby
bahar has quit [Ping timeout: 245 seconds]
funburn has quit [Quit: funburn]
rabeldable has quit [Quit: Leaving.]
marcdel has quit [Ping timeout: 265 seconds]
bahar has joined #ruby
skulker has quit [Client Quit]
<centrx>
Just invented a new emoji
<centrx>
!:P
yfeldblum has quit [Remote host closed the connection]
funktor has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
yubrew has joined #ruby
<Musashi1>
lol what is it
<agent_white>
I forgot... is pastie the bad one? Or pastebin?
apple_ has joined #ruby
Teltariat has quit [Remote host closed the connection]
davedev24 has quit []
<benzrf>
agent_white: pastebin
<benzrf>
but pastie is not that great either o=
<benzrf>
gist ftw
charliesome has joined #ruby
Guest25022 has quit [Ping timeout: 240 seconds]
jamesbrink has quit [Remote host closed the connection]
maroloccio has quit [Quit: WeeChat 0.4.3]
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
budrose has joined #ruby
bradhe has joined #ruby
yubrew has quit [Ping timeout: 265 seconds]
Hobogrammer has quit [Ping timeout: 246 seconds]
centrx is now known as HIOKABEXZ
HIOKABEXZ is now known as centrx
gancl_ has quit [Quit: Page closed]
bahar has quit [Ping timeout: 246 seconds]
decoponio has joined #ruby
bahar has joined #ruby
dx7 has joined #ruby
toretore has joined #ruby
agent_white has quit [Quit: brb]
maroloccio has joined #ruby
cj3kim has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Solnse has quit [Remote host closed the connection]
ftj has joined #ruby
chunk2k3 has quit [Quit: Page closed]
Vovko_ has joined #ruby
rjhunter has joined #ruby
<ftj>
Hey there — I'm building a little CLI tool that checks certain HTML tags on a few websites to make sure that they're properly title cased. I'm splitting the work into a few methods, the lowest-level of which is the word checker method (which checks each word to see if it's cased correctly). It's failing, and I'm ripping my hair out trying to figure out why. Here's what it looks like:
<metalhead`>
what is the best editor to use to learn ruby? what is a good book i can download to learn the language?
<jhass>
likemike: there are also abstraction layers for it, like capybara. If you want it headless there's phantomjs and if you want to scrape there's mechanize
<popl>
Oh, good point.
<popl>
Selenium is just what popped in my head 'cause I was messing around with it.
kennym has quit [Quit: Leaving.]
<popl>
I didn't even ask what his usecase was.
<popl>
Silly me.
vlad_starkov has joined #ruby
afreidah1 has joined #ruby
havenwood has joined #ruby
afreidah has quit [Ping timeout: 245 seconds]
blom_ has quit [Ping timeout: 252 seconds]
<likemike>
popl: jhass on a specific page i want to search through the page and search for a specific string...then i have to open each entry and then based on specific requirements i want to click on a button and fill out the box with my name (which assigns the entry to me)
<likemike>
this would involve an interaction with javascript
<jhass>
so mechanize falls out
Xeago has joined #ruby
afreidah2 has joined #ruby
tylersmith has joined #ruby
<jhass>
capybara+selenium can surely do it, capybara+phantomjs should be a little bit faster, though in my experience phantomjs is a bit less fault tolerant to crappy coded sites (which is a good thing for its main purpose, testing)
carraroj has quit [Ping timeout: 265 seconds]
CaptainJet has quit []
afreidah1 has quit [Ping timeout: 246 seconds]
mikepack has joined #ruby
metalhead` has left #ruby ["Leaving"]
afreidah3 has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
afreidah2 has quit [Ping timeout: 240 seconds]
predator217 has quit [Ping timeout: 252 seconds]
afreidah4 has joined #ruby
rjhunter has quit [Remote host closed the connection]
paolooo has quit [Ping timeout: 245 seconds]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
mikepack has quit [Ping timeout: 246 seconds]
afreidah3 has quit [Ping timeout: 246 seconds]
_justin has joined #ruby
afreidah has joined #ruby
havenwood has quit [Ping timeout: 245 seconds]
rahult has joined #ruby
bahar has quit [Ping timeout: 252 seconds]
kennym has joined #ruby
afreidah4 has quit [Ping timeout: 246 seconds]
afreidah1 has joined #ruby
jaimef has quit [Excess Flood]
Doppp has quit [Ping timeout: 240 seconds]
<likemike>
thanks guys
predator117 has joined #ruby
bahar has joined #ruby
afreidah2 has joined #ruby
art-solopov has joined #ruby
afreidah has quit [Ping timeout: 240 seconds]
alexju has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
fgo has quit [Remote host closed the connection]
afreidah1 has quit [Ping timeout: 240 seconds]
afreidah3 has joined #ruby
zigomir has joined #ruby
cibs has joined #ruby
zz_karupanerura has joined #ruby
eshy has joined #ruby
zz_karupanerura is now known as karupanerura
yfeldblum has quit [Ping timeout: 245 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
hiall has joined #ruby
afreidah2 has quit [Ping timeout: 240 seconds]
userx has joined #ruby
afreidah4 has joined #ruby
_justin has quit [Quit: _justin]
jaimef has joined #ruby
afreidah3 has quit [Ping timeout: 246 seconds]
kennym has quit [Quit: Leaving.]
afreidah has joined #ruby
gstamp has joined #ruby
predator117 has quit [Read error: Connection reset by peer]
rahult is now known as rahult_
afreidah1 has joined #ruby
_justin has joined #ruby
afreidah4 has quit [Ping timeout: 265 seconds]
bahar has quit [Ping timeout: 265 seconds]
yfeldblu_ has quit [Remote host closed the connection]
senayar has joined #ruby
<Xeago>
apeiros: So I'm writing an IRC bot, but I want it to be more testable than what I have currently made with Cinch
yfeldblum has joined #ruby
<Xeago>
do you have any experience with Cinch?
<apeiros>
nope
afreidah has quit [Ping timeout: 265 seconds]
sparrovv has joined #ruby
afreidah1 has quit [Ping timeout: 245 seconds]
afreidah2 has joined #ruby
<Xeago>
would you advise something else than Cinch?
<Jamo>
check out Rbot
klaut has joined #ruby
bahar has joined #ruby
<Jamo>
Its fully functional irb-bot, and it has a nice modular structure thus adding your own plugins is really easy
afreidah3 has joined #ruby
<Xeago>
I'm more about testability of my plugin with their framework
ayaz has joined #ruby
<Xeago>
I don't want to write mocks for irc messages
ayaz has quit [Max SendQ exceeded]
ayaz has joined #ruby
ayaz has quit [Max SendQ exceeded]
afreidah2 has quit [Ping timeout: 240 seconds]
afreidah4 has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
petey has joined #ruby
toastynerd has joined #ruby
afreidah3 has quit [Ping timeout: 240 seconds]
rahult_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
afreidah has joined #ruby
afreidah4 has quit [Ping timeout: 246 seconds]
mengu has joined #ruby
mengu has joined #ruby
afreidah1 has joined #ruby
petey has quit [Ping timeout: 240 seconds]
<apeiros>
Xeago: well, I wrote butler ages ago, so naturally I'd suggest looking at it
<apeiros>
even though it's old code and I'd do a lot different, it's IMO still quite good code
<apeiros>
I haven't looked at cinch's codebase, but I know who wrote it and his code is usually quite good too
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
sparrovv has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
spider-mario has joined #ruby
WormDrink has joined #ruby
bradhe has joined #ruby
tvw has quit []
snuffeluffegus has quit [Quit: Leaving]
bradhe has quit [Ping timeout: 240 seconds]
bahar has quit [Ping timeout: 240 seconds]
art-solopov has quit [Quit: Konversation terminated!]
thomasxie has joined #ruby
bahar has joined #ruby
hugoxrosa has quit [Ping timeout: 265 seconds]
crystal77 has joined #ruby
rdark has quit [Quit: leaving]
yfeldblu_ has quit [Ping timeout: 245 seconds]
AlexRussia has joined #ruby
sigurding has quit [Quit: sigurding]
blom_ has joined #ruby
mikepack has joined #ruby
Macaveli has joined #ruby
mikepack has quit [Ping timeout: 240 seconds]
AussieDownUnder has joined #ruby
SHyx0rmZ has joined #ruby
ujvaljoshi has joined #ruby
blom_ has quit [Ping timeout: 246 seconds]
YamakasY has joined #ruby
yubrew has joined #ruby
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby
the_hack has joined #ruby
timonv has quit [Remote host closed the connection]
tylersmith has quit [Remote host closed the connection]
irishcoder has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
Trudko has joined #ruby
<Trudko>
guys i have weird error on linux when install gem rails http://pastie.org/8958662 if I do ruby -v it returns 1.9.3 not sure when 1.9.1 came from
ephemerian has quit [Ping timeout: 265 seconds]
jle` has quit [Quit: WeeChat 0.4.2]
<apeiros>
1.9.3's C interface is 1.9.1 compatible. that's why apt calls it 1.9.1
<certainty>
Trudko: 1.9.1 is the abi version
<certainty>
or what apeiros said
<Trudko>
so what would be solution?
<apeiros>
and you're missing mkmf because apt package maintainers are retarded and split up standard ruby
rjhunter has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
<apeiros>
you need another package, I suggest you ask in #ubuntu or #debian which one it is
<apeiros>
their mess… their duty to clean it up
<Trudko>
i see
YamakasY_ has joined #ruby
jle` has joined #ruby
<certainty>
now apeiros gets +b on #ubuntu and #debian :p
sepp2k has joined #ruby
YamakasY has quit [Ping timeout: 265 seconds]
<apeiros>
I couldn't care less
rjhunter has quit [Ping timeout: 265 seconds]
zenojis has quit [Ping timeout: 265 seconds]
ayaz has joined #ruby
m8 has joined #ruby
Guest68890 has quit [Ping timeout: 252 seconds]
<popl>
OH SHI-
<popl>
+b on #ubuntu
<popl>
slash my wrists
yfeldblum has joined #ruby
<jokke>
hello
<jokke>
how can i turn on syntax highlighting for yard example blocks?
<jokke>
already tried !!!ruby
mostlybadfly has joined #ruby
Xeago has quit [Remote host closed the connection]
nbjahan has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<certainty>
apeiros: thanks! now i wont get that song out of my head for some time
YamakasY has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 265 seconds]
inkblots has joined #ruby
ezelohar has quit [Ping timeout: 240 seconds]
sparrovv has joined #ruby
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
jle` has quit [Quit: WeeChat 0.4.2]
Jrz has joined #ruby
Jrz has quit [Max SendQ exceeded]
Jrz has joined #ruby
rahult is now known as rahult_
hiall has joined #ruby
AussieDownUnder has quit [Read error: Connection reset by peer]
suffice has joined #ruby
blom_ has joined #ruby
<shevy>
jokke is that vim?
AussieDownUnder has joined #ruby
kennym has joined #ruby
kirun has joined #ruby
Jrz has quit [Quit: Computer has gone to sleep.]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rootshift has joined #ruby
makara has joined #ruby
coderxin has quit [Remote host closed the connection]
relix has joined #ruby
blom_ has quit [Ping timeout: 240 seconds]
rindolf has joined #ruby
<rindolf>
Ruby 2.x does not like this line: « puts @src.gsub(/[\x00-\x09\x0b-\x1f\x7f-\xff]/){'\\x%x'%$&.ord} » - it gives me «invalid multibyte escape: /[\x00-\x09\x0b-\x1f\x7f-\xff]/ (SyntaxError) » - why?
<rindolf>
Hi all, BTW.
caustic has joined #ruby
kennym has quit [Quit: Leaving.]
fgo has quit [Remote host closed the connection]
<apeiros>
rindolf: because your regex is utf-8 but contains invalid sequences for utf-8
<apeiros>
if you want to match binary data, make your regex binary too. use the //n flag
<apeiros>
certainty: aaaaha!
<apeiros>
oh, cross-poster
Speed has joined #ruby
rindolf was kicked from #ruby by apeiros [if you cross-post, you're required to inform all channels that you are cross posting. this is only a warning-kick. you can rejoin.]
suffice has quit [Quit: leaving]
cina has joined #ruby
kennym has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
Jrz has joined #ruby
<popl>
Where did rindolf cross-post that?
AussieDownUnder has quit [Remote host closed the connection]
<apeiros>
#ruby & #ruby-lang
<popl>
ah
claymore has quit [Ping timeout: 246 seconds]
eval-in has quit [Remote host closed the connection]
rindolf has joined #ruby
eval-in has joined #ruby
<apeiros>
I wouldn't have an issue with cross-posting, if people had the decency to update other channels about solutions they get.
<apeiros>
but experience shows that they don't.
razibog has quit [Quit: Leaving.]
<rindolf>
apeiros: OK, thanks for the headsup.
* apeiros
off for a bit
rahult_ is now known as rahult
rahult is now known as rahult_
AussieDownUnder has joined #ruby
claymore has joined #ruby
dzhulk has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
dzhulk1 has quit [Ping timeout: 240 seconds]
AussieDownUnder has quit [Remote host closed the connection]
rootshift has joined #ruby
bahar has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
suffice has joined #ruby
alexju has joined #ruby
suffice has quit [Client Quit]
bahar has joined #ruby
mehlah has quit [Quit: Leaving...]
<rindolf>
apeiros: thanks! That seems to work. Hopefully it will be the last porting issue.
fijimunkii has joined #ruby
carraroj has quit [Ping timeout: 240 seconds]
ujvaljoshi has quit [Ping timeout: 265 seconds]
carraroj has joined #ruby
claymore has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
claymore has joined #ruby
bahar has quit [Ping timeout: 240 seconds]
bahar has joined #ruby
suffice has joined #ruby
popl has quit [Ping timeout: 246 seconds]
rvraghav93 has joined #ruby
mehlah has joined #ruby
ij has quit [Ping timeout: 246 seconds]
Macaveli has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
Hanmac1 has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
ktosiek has joined #ruby
suffice has quit [Quit: leaving]
bradhe has quit [Ping timeout: 265 seconds]
suffice has joined #ruby
Guest76720 has quit [Ping timeout: 253 seconds]
<aep>
any smarter way to make an erb template, when most of my template is actually ruby code?
<jokke>
hey
<certainty>
aep: probably don't use erb?
Speed has quit [Ping timeout: 265 seconds]
<aep>
yeah, what else?
<aep>
i don't want nested output += "bla" either
<certainty>
aep: plain ruby, probably peppered with String#%
<aep>
and for most parts erb works fine, i just wish it had a way to output text within the ruby blocks
<jokke>
i'm trying to implement a very simple "template" definition so that one can write placeholders in a string which will be replaced
<jokke>
much like the strftime syntax
alexju has quit [Remote host closed the connection]
mikepack has joined #ruby
<jokke>
not sure how to parse the string though
<jokke>
oh i think i got it
<jhass>
jokke: scroll up to certaintys last example? :P
wolfsoul has joined #ruby
wolfsoul has joined #ruby
badeball has joined #ruby
robbyoconnor has joined #ruby
coder_neo has joined #ruby
greenrose has quit [Remote host closed the connection]
<jokke>
oh lol
<jokke>
true
<jokke>
forgot about that
apple has joined #ruby
mikepack has quit [Ping timeout: 252 seconds]
rvraghav93 has quit [Ping timeout: 252 seconds]
apple is now known as Guest89485
<jokke>
jhass: however, i don't really know what placeholders will be used
Guest89485 has quit [Remote host closed the connection]
<jokke>
replace the placeholders with a codeblock instead of a hash?
AussieDownUnder has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
how do you want to replace placeholder if you don't know the keys?
<jhass>
I think it's unclear what you want
AussieDownUnder has quit [Remote host closed the connection]
charliesome has joined #ruby
greenrose has joined #ruby
<jokke>
i have a match object and if it has a named group for a placeholder it's replaced by that group.
bahar has quit [Ping timeout: 240 seconds]
Speed has joined #ruby
vlad_starkov has joined #ruby
blackmesa has quit [Read error: Operation timed out]
YamakasY has joined #ruby
rjhunter has joined #ruby
rvraghav93 has joined #ruby
postmodern has quit [Quit: Leaving]
blom_ has joined #ruby
sparrovv has quit [Remote host closed the connection]
bahar has joined #ruby
<jokke>
so something like this would be cool: match = 'foo bar'.match(/(?<foo>\w+)\s+(?<bar>\w+)/); 'Foo %{bar}' % { |placeholder| match[placeholder] || '%{placeholder}' }
rjhunter has quit [Ping timeout: 252 seconds]
<jokke>
maybe i should just use erb...
kennym has quit [Quit: Leaving.]
<shevy>
ewwww
<jokke>
shevy: @erb?
<shevy>
yeah
<jokke>
yeah..
<jokke>
shevy: i could parse it with a regex ofcourse
<jokke>
but it's not as trivial as i'd like
<jokke>
because i have to allow escaping of the "special" character
<jokke>
like %% in strftime
<jhass>
>> match = "foobar".match(/(?:(?<a>foo)|(?<b>bar))+/); "There's %{a} and there's %{b}" % Hash[match.regexp.named_captures.keys.map(&:to_sym).zip(match.captures)]
crystal77 has quit [Quit: Computer has gone to sleep.]
<dorei>
hello, is there a way to get innertext using capybara?
<jhass>
dorei: there's #text, #all_text and #visible_text
<dorei>
text gets all the text, not the inner one only
yfeldblum has joined #ruby
<dorei>
using XPATH, one can get inner text only using text()
senayar has quit []
the_hack has quit [Quit: Computer has gone to sleep.]
<jhass>
did you try one of the other variants?
<dorei>
hold on, let me try them
wolfsoul has quit [Quit: Leaving]
senayar has joined #ruby
bradhe has joined #ruby
<dorei>
visible_text and all_text are undefined for Capybara::Element
yfeldblum has quit [Ping timeout: 265 seconds]
Mrdarknezz has quit [Ping timeout: 240 seconds]
darkkeri has quit []
chipotle has quit [Quit: cya]
io_syl has joined #ruby
sparrovv has joined #ruby
<jhass>
what about #text(:visible) ?
irishcoder4 has joined #ruby
jgoss has joined #ruby
jgoss has quit [Changing host]
jgoss has joined #ruby
claymore has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
irishcoder4 has quit [Remote host closed the connection]
<dorei>
it returns all the text from that element, not the innertext only
p8952 has joined #ruby
Mrdarknezz has joined #ruby
kr1shnak has joined #ruby
abdulsattar has quit [Ping timeout: 253 seconds]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rvraghav93 has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
rvraghav93_ has quit [Ping timeout: 265 seconds]
<jhass>
I'm still not sure what you define as innertext
petey has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
<jhass>
<div>abc<span>def</span></div> you only want "abc" from find("div").text ?
davedev24 has joined #ruby
sailias has quit [Ping timeout: 240 seconds]
Jrz has quit [Quit: Computer has gone to sleep.]
<dorei>
yeap
<dorei>
using xpath it's //div/text()
<jhass>
did you try using xpath?
<jhass>
find(:xpath, '//div/text()') ?
petey has quit [Ping timeout: 265 seconds]
<dorei>
Capybara::Poltergeist::BrowserError: There was an error inside the PhantomJS portion of Poltergeist. This is probably a bug, so please report it.
<jhass>
I'd probably just assert a match on text though, expect(find('div')).to have_text "whatever"
<dorei>
if i do Nokogiri::HTML(page.html).xpath('//div/text()') it works though
robbyoconnor has quit [Ping timeout: 240 seconds]
neo_ has joined #ruby
<likemike>
jhass: where i can find some documentation for selenium ? also what's the difference between Selenium and selenium-webdriver ?
<jhass>
"Selenium -- Gem wrapper for selenium server", "selenium-webdriver This gem provides Ruby bindings for WebDriver and has been tested to work on MRI (1.8.7 through 1.9), JRuby and Rubinius."
jjbohn has joined #ruby
crystal77 has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
io_syl has quit []
fieldfirst has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
blom_ has joined #ruby
cashnguns has joined #ruby
cover has joined #ruby
enebo has joined #ruby
rjhunter has quit [Ping timeout: 245 seconds]
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bahar has quit [Ping timeout: 252 seconds]
bahar has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
coderxin has joined #ruby
sepp2k has quit [Quit: Leaving.]
blom_ has quit [Ping timeout: 265 seconds]
inkblots has quit [Ping timeout: 240 seconds]
Krajsnick has joined #ruby
caustic has joined #ruby
coderxin has quit [Ping timeout: 246 seconds]
ItSANgo has quit [Quit: Leaving...]
sepp2k has joined #ruby
sambao21 has joined #ruby
Jetchisel has quit [Quit: "Unfortunately time is always against us" -- *Morpheus*]
fgo has quit [Remote host closed the connection]
havenwood has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
Soliah has quit [*.net *.split]
TheLarkInn has quit [*.net *.split]
vadviktor has quit [*.net *.split]
Asher has quit [*.net *.split]
mist has quit [*.net *.split]
rawtaz has quit [*.net *.split]
n88 has quit [*.net *.split]
bbloom has quit [*.net *.split]
troyready has quit [*.net *.split]
Spleeze has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
TheNumb has quit [*.net *.split]
mr_red has quit [*.net *.split]
monsieurp has quit [*.net *.split]
jcarouth has quit [*.net *.split]
billiam has quit [*.net *.split]
LiquidInsect has quit [*.net *.split]
patronus_ has quit [*.net *.split]
nuba has quit [*.net *.split]
neaer has quit [*.net *.split]
adsisco has quit [*.net *.split]
aef has quit [*.net *.split]
Killerkeksdose has quit [*.net *.split]
ponbiki has quit [*.net *.split]
flori has quit [*.net *.split]
FDj has quit [*.net *.split]
malcolmva has quit [*.net *.split]
drager has quit [*.net *.split]
ji0n has quit [*.net *.split]
elektronaut has quit [*.net *.split]
sirecote has quit [*.net *.split]
go|dfish has quit [*.net *.split]
nkts has quit [*.net *.split]
Port3M5[Work] has quit [*.net *.split]
RTG` has quit [*.net *.split]
asuka_ has quit [*.net *.split]
dazeddev has quit [*.net *.split]
matti has quit [*.net *.split]
thejoecarroll has quit [*.net *.split]
the_mentat has quit [*.net *.split]
jzigmund has quit [*.net *.split]
Davey has quit [*.net *.split]
gischy has quit [*.net *.split]
peterhu has quit [*.net *.split]
thelamest has quit [*.net *.split]
tskogber1 has quit [*.net *.split]
marcoecc has quit [*.net *.split]
chiel has quit [*.net *.split]
justinmcp has quit [*.net *.split]
Jelco has quit [*.net *.split]
eregon has quit [*.net *.split]
Zhann has quit [*.net *.split]
adamholt has quit [*.net *.split]
Hamled has quit [*.net *.split]
ccooke has quit [*.net *.split]
__main__ has quit [*.net *.split]
markolson has quit [*.net *.split]
kevinfagan_ has quit [*.net *.split]
blackjid has quit [*.net *.split]
ezrios has quit [*.net *.split]
snkcld has quit [*.net *.split]
cHarNe2 has quit [*.net *.split]
wmoxam has quit [*.net *.split]
ptierno has quit [*.net *.split]
wookiehangover has quit [*.net *.split]
mahlon has quit [*.net *.split]
emdub has quit [*.net *.split]
icedp has quit [*.net *.split]
optiz0r_ has quit [*.net *.split]
ocher has quit [*.net *.split]
TwinkleHood has quit [*.net *.split]
sindork has quit [*.net *.split]
madhatter has quit [*.net *.split]
angelixd has quit [*.net *.split]
phreax has quit [*.net *.split]
qqw_ has quit [*.net *.split]
petems has quit [*.net *.split]
DanKnox has quit [*.net *.split]
xargoon has quit [*.net *.split]
philtr has quit [*.net *.split]
ParanoidSP has quit [*.net *.split]
Zackio has quit [*.net *.split]
jso has quit [*.net *.split]
gregf_ has quit [*.net *.split]
Gnubie__ has quit [*.net *.split]
rs0 has quit [*.net *.split]
mattp_ has quit [*.net *.split]
wwalker has quit [*.net *.split]
chridal has quit [*.net *.split]
paul_k has quit [*.net *.split]
error404 has quit [*.net *.split]
deavidsedice has quit [*.net *.split]
zonetti has quit [*.net *.split]
stonecolddevin has quit [*.net *.split]
napcae has quit [*.net *.split]
Rydekull has quit [*.net *.split]
Nowaker has quit [*.net *.split]
Tarential has quit [*.net *.split]
z has quit [*.net *.split]
tonini has quit [*.net *.split]
mburns has quit [*.net *.split]
sn0wb1rd has quit [*.net *.split]
xybre has quit [*.net *.split]
elaptics`away has quit [*.net *.split]
droptone has quit [*.net *.split]
Guest40652 has quit [*.net *.split]
malnek_ has quit [*.net *.split]
mumblerit has quit [*.net *.split]
jericon has quit [*.net *.split]
Guest72920 has quit [*.net *.split]
germanstudent has quit [*.net *.split]
bpgoldsb has quit [*.net *.split]
Anarch has quit [*.net *.split]
rotor has quit [*.net *.split]
Scient has quit [*.net *.split]
brisbin has quit [*.net *.split]
Roa has quit [*.net *.split]
preller has quit [*.net *.split]
tchebb has quit [*.net *.split]
slash_nick has quit [*.net *.split]
headius has quit [*.net *.split]
tafryn has quit [*.net *.split]
connor_goodwolf has quit [*.net *.split]
Spitfire has quit [*.net *.split]
drasch has quit [*.net *.split]
koalallama has quit [*.net *.split]
CaptainKnots has quit [*.net *.split]
pedrocr has quit [*.net *.split]
Kabaka_ has quit [*.net *.split]
qz has quit [*.net *.split]
finges has quit [*.net *.split]
ged has quit [*.net *.split]
pavelz has quit [*.net *.split]
ericwood has quit [*.net *.split]
matrixise has quit [*.net *.split]
bnagy has quit [*.net *.split]
yeltzooo has quit [*.net *.split]
rtl has quit [*.net *.split]
cout has quit [*.net *.split]
__class__ has quit [*.net *.split]
tommylommykins has quit [*.net *.split]
qqw has joined #ruby
tonini has joined #ruby
flori has joined #ruby
mburns has joined #ruby
ccooke has joined #ruby
petems has joined #ruby
Soliah has joined #ruby
tommylommykins has joined #ruby
tskogberg has joined #ruby
philtr has joined #ruby
cout_ has joined #ruby
adam12 is now known as adam
bnagy has joined #ruby
LiquidInsect has joined #ruby
Anarch_ has joined #ruby
droptone has joined #ruby
ocher has joined #ruby
patronus has joined #ruby
matti has joined #ruby
preller has joined #ruby
matti has joined #ruby
preller has joined #ruby
matti has quit [Changing host]
preller has quit [Changing host]
madhatter has joined #ruby
wwalker has joined #ruby
asuka has joined #ruby
ptierno has joined #ruby
optiz0r has joined #ruby
drasch has joined #ruby
rawtaz has joined #ruby
TheLarkInn has joined #ruby
ericwood has joined #ruby
mr_red has joined #ruby
slash_nick has joined #ruby
gischy has joined #ruby
rtl has joined #ruby
mattp_ has joined #ruby
Spitfire has joined #ruby
ParanoidSP has joined #ruby
Tarential has joined #ruby
jericon has joined #ruby
TwinkleHood has joined #ruby
Killerkeksdose has joined #ruby
snkcld has joined #ruby
TheNumb has joined #ruby
billiam has joined #ruby
chridal has joined #ruby
Roa has joined #ruby
pedrocr has joined #ruby
wmoxam has joined #ruby
n88 has joined #ruby
connor_goodwolf has joined #ruby
malnek has joined #ruby
billiam has quit [Changing host]
malcolmva has joined #ruby
billiam has joined #ruby
elektronaut has joined #ruby
xybre has joined #ruby
Jelco has joined #ruby
Jelco has quit [Changing host]
xybre has joined #ruby
Jelco has joined #ruby
xybre has quit [Changing host]
Nowaker has joined #ruby
z has joined #ruby
RTG` has joined #ruby
DanKnox has joined #ruby
headius has joined #ruby
angelixd has joined #ruby
germanstudent has joined #ruby
finges has joined #ruby
napcae has joined #ruby
rotor has joined #ruby
sn0wb1rd has joined #ruby
Scient has joined #ruby
matrixise has joined #ruby
troyready has joined #ruby
brisbin has joined #ruby
Port3M5[Work] has joined #ruby
chiel has joined #ruby
RealMarc has joined #ruby
sambao21 has joined #ruby
stonecolddevin has joined #ruby
tchebb has joined #ruby
ace_striker has joined #ruby
Rydekull has joined #ruby
cHarNe2 has joined #ruby
gregf_ has joined #ruby
phreax has joined #ruby
markolson has joined #ruby
monsieurp has joined #ruby
ged has joined #ruby
qz has joined #ruby
Hamled has joined #ruby
elaptics`away has joined #ruby
bpgoldsb has joined #ruby
drager has joined #ruby
FDj has joined #ruby
Zhann has joined #ruby
qz has quit [Changing host]
dazeddev has joined #ruby
qz has joined #ruby
wookiehangover has joined #ruby
go|dfish has joined #ruby
paul_k has joined #ruby
adam is now known as Guest29671
thelamest has joined #ruby
ezrios has joined #ruby
thejoecarroll has joined #ruby
yeltzooo has joined #ruby
adsisco has joined #ruby
zonetti has joined #ruby
adsisco has quit [Changing host]
adsisco has joined #ruby
the_mentat has joined #ruby
ace_striker is now known as Guest91413
sirecote has joined #ruby
peterhu has joined #ruby
__class__ has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
justinmcp has joined #ruby
ji0n has joined #ruby
__main__ has joined #ruby
Zackio has joined #ruby
tafryn has joined #ruby
deavid has joined #ruby
vadviktor has joined #ruby
kevinfagan has joined #ruby
eregon has joined #ruby
Davey has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
kennym has joined #ruby
<hfp>
Hey guys, I am doing the katas on codewars and most of the time I write a method to do something that could have been done with a built in method (like #rjust, block_given? etc). Is there a way to avoid that beforehand or is it a matter of getting fooled once or twice and then remember?
Sou|cutter has joined #ruby
mumblerit has joined #ruby
mumblerit is now known as Guest60483
aef has joined #ruby
<shevy>
still busy with the katas
<shevy>
hfp I think if you write a lot of ruby code, most of the time you know these things
<shevy>
you could try to look at documentation for class String, Array, and Hash, and read the index list twice
sindork has joined #ruby
<jhass>
hfp: reading through core once helps to get a vague idea on what could be there. everything else is just experience
<shevy>
until your brain remembers passively
Kabaka_ has joined #ruby
<shevy>
the moment you apply it to real problems, you will quickly remember them again
mahlon has joined #ruby
ItSANgo has joined #ruby
ItSANgo_ has joined #ruby
blackjid has joined #ruby
<shevy>
hfp only since about 2 years do I use .ljust and .rjust myself :)
xargoon has joined #ruby
<shevy>
before that I always used %
jso has joined #ruby
ItSANgo_ has quit [Client Quit]
emdub has joined #ruby
skaflem has quit [Quit: Leaving]
icedp has joined #ruby
icedp has quit [Changing host]
icedp has joined #ruby
<hfp>
shevy: I wrote a very winded up method to define the colspan, then count the length of the string and pad it with spaces... Only to discover that rjust existed
<shevy>
yeah
Spleeze has joined #ruby
camila has joined #ruby
neo_ has quit [Quit: Leaving]
<shevy>
I usually have to write a class that takes care of help menu section for .rb files
pavelz has joined #ruby
<hfp>
that's the thing with ruby, it has so many methods that you just don't expect there is a builtin method for doing such and such as you have to diy in other languages
<shevy>
so that it gets padded properly, depending how long the content of the line(s) is/are
jzigmund has joined #ruby
<shevy>
nono
rs0 has joined #ruby
<shevy>
hfp class String is the biggie, really
<shevy>
class Array and Hash too
bradhe has joined #ruby
<shevy>
that was it for like 90%
ponbiki has joined #ruby
sparrovv has quit [Remote host closed the connection]
mist__ has joined #ruby
<jhass>
I'd include Enumerable
<shevy>
block_given? is associated with yield and blocks, which is kinda specialized already
ponbiki is now known as Guest97287
<shevy>
then there is lambda
<shevy>
which nobody uses
<hfp>
haha
<shevy>
only for loops are worse
adamholt has joined #ruby
<shevy>
because some use them
<hfp>
lambda is to assign a method to a variable, right?
<jhass>
hfp: you need to know that shevy basically lives in his own world
_justin has joined #ruby
<shevy>
hfp I thought the whole point of lambda is to create anonymous methods
<jhass>
hfp: no, lamdba converts the passed block to a Proc object that responds with true to #lambda?
<shevy>
hfp isn't that super useful!!! ^^^
CaptainKnots has joined #ruby
CaptainKnots has quit [Changing host]
CaptainKnots has joined #ruby
nkts has joined #ruby
<shevy>
I recommend to store all lambdas in @@ vars
<shevy>
the usefulness will explode
nuba has joined #ruby
yfeldblum has joined #ruby
<hfp>
why make a lambda when you can def a method? Is there an advantage?
nkts is now known as Guest96994
<jhass>
the usecases are largely orthogonal
<jhass>
a lambda is closer to a block than to a method
bw__ has joined #ruby
suffice_ has joined #ruby
Nahra_ has joined #ruby
m_3_ has joined #ruby
sparrovv has joined #ruby
Ebsy has joined #ruby
bradhe has quit [Ping timeout: 245 seconds]
<hfp>
I guess I didn't grasp all the subtleties of blocks yet
chrisseaton has joined #ruby
SCommette has joined #ruby
<shevy>
hfp this is exactly the question I always have to ask myself as well
e^0 has joined #ruby
the_hack has joined #ruby
<jhass>
if you ever come up with a method where you'd like to pass two blocks, the solution could be to pass two procs (of which lambda is a special kind) or a proc and a block
<shevy>
why not just one block? I can pass in a hash as well and could store or assign methods/objects in that hash
suffice_ has quit [Client Quit]
<shevy>
hfp a block gives you flexibility for every method
Nahra_ has quit [Client Quit]
<shevy>
hfp you don't have to use a block but you can, so you can pass in extra arguments to any method in additional to normal arguments
<shevy>
*in addition
yfeldblum has quit [Ping timeout: 265 seconds]
Nahra_ has joined #ruby
koalallama has joined #ruby
gizmore has quit [Excess Flood]
AlexRussia has quit [Remote host closed the connection]
<shevy>
hfp here is a good question to have:
gizmore has joined #ruby
zarul has quit [Excess Flood]
<shevy>
hfp when to use a symbol and when to use a string in your code/methods?
Alina-malina has quit [Max SendQ exceeded]
cina has quit [Write error: Broken pipe]
suffice has quit [Write error: Broken pipe]
spacebug has quit [Write error: Broken pipe]
m_3 has quit [Write error: Broken pipe]
Nahra has quit [Write error: Broken pipe]
bw_ has quit [Write error: Broken pipe]
camilasan has quit [Write error: Broken pipe]
Squarepy has quit [Excess Flood]
camt has quit [Remote host closed the connection]
Patteh has quit [Remote host closed the connection]
zarul has joined #ruby
TigerWolf has quit [Excess Flood]
kevinykchan has quit [Excess Flood]
Alina-malina has joined #ruby
Squarepy has joined #ruby
sigurding has quit [Ping timeout: 252 seconds]
suffice has joined #ruby
cina has joined #ruby
spacebug has joined #ruby
<shevy>
hmm am I still connected...
Shidash has joined #ruby
sigurding has joined #ruby
timonv has joined #ruby
_justin has quit [Quit: _justin]
mikepack has joined #ruby
inkblots has joined #ruby
AlexRussia has joined #ruby
<banister>
jhass lambdas are easier to do functional-style programming with
Gnubie_ has joined #ruby
error404 has joined #ruby
Patteh has joined #ruby
<banister>
you can curry them, and it's trivial to provide sugar to compose them, etc
camt has joined #ruby
AlexRussia has quit [Client Quit]
havenwood has joined #ruby
_justin has joined #ruby
AlexRussia has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
sambao21_ has joined #ruby
jhass is now known as jhass|off
makara has quit [Quit: Leaving]
sigurding has quit [Client Quit]
mikepack has quit [Ping timeout: 252 seconds]
<hfp>
shevy: symbols use less memory because they don't create a new object so they are preferable when it is an object you are going to reuse a lot like a column name
r0nin has joined #ruby
_justin has quit [Ping timeout: 240 seconds]
<hfp>
amirite?
sigurding has joined #ruby
_justin has joined #ruby
linojon has joined #ruby
SCommette has quit [Quit: SCommette]
YamakasY has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
<shevy>
hfp I thought they use more memory because they are never garbage collected
kennym has quit [Quit: Leaving.]
<apeiros>
shevy: Array.new(20) { "hello" } uses more memory than Array.new(20) { :hello }
<apeiros>
but yes, once both arrays are GC'ed, the latter will use more memory (since :hello won't be collected)
yubrew has quit [Ping timeout: 265 seconds]
sambao21 has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
lw has joined #ruby
andrewhl has joined #ruby
andrewhl has quit [Client Quit]
jhass|off is now known as jhass
sigurding has quit [Quit: sigurding]
danshultz has joined #ruby
havenwood has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
dzhulk has quit [Quit: Leaving.]
rootshift has joined #ruby
blom_ has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
crystal77 has quit [Quit: Computer has gone to sleep.]
<shevy>
hmm what was the main convention for versions in a class or module
<shevy>
was it VERSION or Version ?
vlad_starkov has quit [Remote host closed the connection]
Vovko has joined #ruby
Vovko has quit [Client Quit]
<havenwood>
shevy: VERSION
bbloom has joined #ruby
rvraghav93_ has joined #ruby
<shevy>
\o/
rvraghav93 has quit [Ping timeout: 265 seconds]
kennym has joined #ruby
dzhulk has joined #ruby
Krajsnick has quit [Quit: Leaving...]
blom_ has quit [Ping timeout: 252 seconds]
linduxed has quit [Quit: WeeChat 0.4.2]
coderxin has joined #ruby
einarj has joined #ruby
userx has quit [Ping timeout: 245 seconds]
<hfp>
what do you all use Ruby for? Is it in conjunction with Rails or something else?
caustic has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
_justin has quit [Quit: _justin]
jlast has joined #ruby
yfeldblum has joined #ruby
sski has joined #ruby
timonv has quit [Remote host closed the connection]
Asher has joined #ruby
coderxin has quit [Ping timeout: 240 seconds]
linduxed has joined #ruby
kennym has quit [Quit: Leaving.]
prakash1 has joined #ruby
fantazo has joined #ruby
<shevy>
hfp for everything
yfeldblum has quit [Ping timeout: 265 seconds]
<shevy>
whenever there is a task, I throw ruby at it
SCommette has joined #ruby
lkba has joined #ruby
timonv has joined #ruby
bradhe has joined #ruby
<shevy>
hfp for example, right now I work on a time-table / class-scheduler, so that ruby will tell me what is upcoming in the next n days, and perhaps generate pdf/xls from that, first on the commandline, once that works perhaps through some web interface as well
chrisseaton has quit [Remote host closed the connection]
Solnse has joined #ruby
chrisseaton has joined #ruby
kennym has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
<shevy>
hfp if you don't have a use case, you could start to write down things that you would like to have/do, store them in a file. eventually you'll add more and more to that until you will never ever again find a lack of things you want to do
crystal77 has quit [Quit: Computer has gone to sleep.]
YamakasY has quit [Quit: The best revenge is massive success...]
crystal77 has joined #ruby
crystal77 has quit [Client Quit]
<droptone>
Question: I'm working with rest-client and writing error-handling, which works well using a case statement for response.code, but I was wondering, using a case statement, is there any way to easily specify a range of values? For example, in this API, per the documentation, it will respond with a 2xx code if the operation was successful, as expected, a 4xx code if there was a parameter error, and a 5xx code if there was an internal server error
<droptone>
How can I use case response.code, and write the equivalent of "when 2xx", or "when >= 200 && < 300"? can you use such operators in a case / when statement? and if so, is there a cleaner way to write that?
petey has quit [Ping timeout: 245 seconds]
<droptone>
ahh, never mind, I see, you can use 200..299
<droptone>
disregard, thank you
sambao21 has quit [Quit: Computer has gone to sleep.]
sparrovv has joined #ruby
chipotle has quit [Quit: cya]
kaspergrubbe has quit [Ping timeout: 245 seconds]
cina has quit [Read error: Connection reset by peer]
sambao21 has joined #ruby
apple has joined #ruby
cina has joined #ruby
apple is now known as Guest1276
jle` has joined #ruby
Guest1276 has left #ruby [#ruby]
Guest1276 has joined #ruby
fieldfirst has joined #ruby
druiddesign has joined #ruby
e^0 has quit [Quit: WeeChat 0.4.1]
Xeago has quit [Remote host closed the connection]
einarj has joined #ruby
Nahra has joined #ruby
Nahra has quit [Changing host]
Nahra has joined #ruby
Doppp has quit [Ping timeout: 240 seconds]
druiddesign is now known as spicerack
tjr9898 has joined #ruby
<Mrdarknezz>
droptone: I don't think 299 is a valid status code
havenwood has joined #ruby
davedev24 has quit [Ping timeout: 246 seconds]
<certainty>
Mrdarknezz: it is currently not used but it constitutes a valid status for a successful operation
davedev24 has joined #ruby
tjr9898 has quit [Ping timeout: 246 seconds]
havenwood has quit [Read error: Connection reset by peer]
<Mrdarknezz>
certainty: According to rfc2616 there is only 200-206
havenwood has joined #ruby
coderxin has joined #ruby
bradhe has joined #ruby
sdouglas has joined #ruby
benzrf|offline is now known as benzrf
Cache_Money has joined #ruby
mirage335 has joined #ruby
<mirage335>
Seems bundle always chooses libv8-3.16.14.3-x86_64-linux, regardless of ARCHFLAGS or the 32bit chroot userspace, which is totally wrong.
<certainty>
Mrdarknezz: many APIs that build on HTTP use custom status codes. Webdav for example. They however retain the general semantics like 2xx being successful, 4xx being client errors etc.
<mirage335>
Any ideas how to force the non-x64 version of libv8 among other packages?
Doppp has joined #ruby
blom_ has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
yekta has joined #ruby
sepp2k has quit [Read error: Operation timed out]
<Mrdarknezz>
certainty: WebDav is rfc 4918
no0code has joined #ruby
pu22l3r has joined #ruby
<jhass>
mirage335: is bundle platform displaying the right thing?
coderhs has joined #ruby
momigi has joined #ruby
invinceable has joined #ruby
<certainty>
Mrdarknezz: ok, so?
petey has joined #ruby
<Mrdarknezz>
certainty: you don't just add random status codes
coderhs has quit [Client Quit]
Nahra has quit [Quit: leaving]
<certainty>
Mrdarknezz: he said that he writes a client for a custom api which explicitely defines 2xx to be successful
<mirage335>
TBH, I am not a ruby expert, so I am not sure exactly what that is doing.
pu22l3r has quit []
ctp has joined #ruby
<havenn>
benzrf: Ruby is my fav Sapphire, but Padparadscha is nice too.
sski has quit [Ping timeout: 252 seconds]
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
snuffeluffegus has joined #ruby
yacks has quit [Ping timeout: 246 seconds]
<mirage335>
jhass: How is it determining that the machine is x64? Reading /proc/cpuinfo?
<jhass>
reading RbConfig::CONFIG['arch']
schtinky has joined #ruby
<mirage335>
And where/how is that set?
yfeldblum has quit [Ping timeout: 240 seconds]
<Hanmac1>
mirage335: it was set while building
Hanmac1 is now known as Hanmac
<mirage335>
Ahh, so I need to reinstall ruby.
<Hanmac>
why?
rippa has joined #ruby
<schtinky>
hi everyone. brand new to ruby and rails. have some questions: when I need a new library, do I have to yum install rubygem-newlibrary or just gem install newlibrary or both?
<mirage335>
Hanmac: You mean while building ruby, right?
<schtinky>
if one, which is better? And how does ruby know where to get libraries with "gem install newlibrary"?
<havenn>
Hanmac: One night elves came and converted the 32 bit system to 64 bit. Damned elves!
<jhass>
schtinky: this is largely preference, many applications today use bundler to manage their gem dependencies. The central repository for gems is http://rubygems.org and that's what gem and bundler call
<havenn>
schtinky: `yum` is the system package manager and `gem` is Ruby's package manager
<benzrf>
wait i thought Gemfile was a bundler thing
<benzrf>
is it not
<mirage335>
jhass: Oh wait. If this was set at compile time, doesn't that mean the debian developers screwed up?
<jhass>
benzrf: rubygems recently added support for reading a Gemfile
<schtinky>
are these centrally-linked gems verified for stability and security?
<havenn>
benzrf: RubyGems now supports the Gemfile, but yeah it started as a bundler convention.
<havenn>
benzrf: `gem i -g Gemfile` or `gem install --file Gemfile`
<benzrf>
man there really needs to be a generic package management api
<mirage335>
Hmm, no, I compiled it myself actually.
<benzrf>
so that gems can hook into packages n stuff
<jhass>
mirage335: debian screwing up ruby stuff is a common pattern, but since I didn't really understand what you're trying I can't answer that
<havenn>
schtinky: To install system packages, use yum. To install Ruby packages, use gem.
einarj has quit [Remote host closed the connection]
<schtinky>
ugh. I'm all confused. I installed ruby with yum and a gazillion packages along with it, but i've also been following instructions to use gem install whatever, too
<schtinky>
which makes me feel like my whole setup is jacked
duggiefresh has joined #ruby
<havenn>
schtinky: Ruby ships with RubyGems (which provides the `gem` command).
<mirage335>
jhass: Ruby was installed by compiling ruby-2.0.0-p247 under a debian 32bit userspace ChRoot, which is running under a 64-bit host Gentoo userspace with a 64-bit kernel.
dx7 has joined #ruby
<schtinky>
so let's say I need a new library to run a very basic ruby script, say, typhoeus
<havenn>
schtinky: gem install typhoeus
<schtinky>
my first step is to "gem install typhoeus"
<schtinky>
ok good
<havenn>
schtinky: install gems with RubyGems
<schtinky>
next step is to edit gemfile?
<schtinky>
gem 'typhoeus'?
<jhass>
no
<jhass>
you don't have to use bundler (and thus Gemfiles)
<jhass>
but if you want to it's enough to add that line to it and run bundle
<benzrf>
wot does typhoeus d
<benzrf>
o
<schtinky>
ruby wrapper for curl
<mirage335>
jhass: ?
<havenn>
schtinky: You can just install gems with `gem install ...` and be done with it. If your project has multiple gems, and you need to resolve dependencies, a Gemfile.
<jhass>
benzrf: ask curl to do a gazillion of requests
<jhass>
mirage335: ?
sparrovv has quit [Remote host closed the connection]
<mirage335>
nvm
<Hanmac>
mirage335: any reason why you want 32bit userspace?
<schtinky>
so I'm in a rails environment, to get typhoeus, my best bet is to add gem "typhoeus" to my app's Gemfile, run bundle install. correct?
snuffeluffegus has quit [Quit: Leaving]
andrewlio has quit [Quit: Leaving.]
<havenn>
mirage335: Build 64-bit Ruby for a 64-bit system.
wallerdev has joined #ruby
<jhass>
schtinky: yes. as a little shortcut bundle install is the default action for bundle without any arguments
<mirage335>
hackeron: Been there, done that. I need this ChRoot to run on a 32 bit WYSE terminal.
<schtinky>
how can I check to see if it's really installed?
<schtinky>
nvm
<schtinky>
bundle
<jhass>
schtinky: also gem list
* mirage335
wonders if ./configure --with-arch=i386 will solve things
<schtinky>
next question... I read on stackexchange where you don't need to "require 'typhoeus'" in your file because it should be available in rails now that the Gemfile knows about it
hiall has joined #ruby
<schtinky>
but I'm getting Unrecognized constant errors
centrx has joined #ruby
<schtinky>
i'm a java guy... is require 'typhoeus" equivalent to "import java.util.*" or some such?
<benzrf>
schtinky: in ruby, there is 1 top-level object that all files run inside of
<benzrf>
its pretty dumb
<jhass>
not quite since require works on a file level
<havenn>
benzrf: different != dumb
kobain has joined #ruby
<benzrf>
if you define a method or constant in one file, every other file will have it at the top level too
lenswipe has joined #ruby
<benzrf>
they all run in a shared namespace
<lenswipe>
hey guys
<benzrf>
as mentioned: dumb
bradhe has joined #ruby
<benzrf>
sup lenswipe
<havenn>
lenswipe: hi
<lenswipe>
having compass issues
<lenswipe>
wonder if someone can help
<lenswipe>
it's not specifically ruby but it's compass so I thought you guys might be able to help
<lenswipe>
I wrote a grunt file to compile my SASS/compass
<centrx>
In benzrf, there is one top-level object that all thoughts run inside of.
<havenn>
benzrf: what language does it better? just about choices. i like the Ruby way.
<schtinky>
so my little script I'm running on the command line inside my rails app folder... should it already know about Typhoeus?
<schtinky>
or do I need to tell it explicity?
<schtinky>
explicitly*?
<lenswipe>
it dumped this in the resulting CSS file
<benzrf>
tbh python has my favorite import system ever
<benzrf>
haskell's works mostly the same (in usage if not in semantics) except that it dumps every var into your namespace by default, while python makes it all qualified by default
Es0teric has joined #ruby
<benzrf>
but either one lets you do the other thing too
<lenswipe>
havenn, just to check - I can just "import compass" in my scss, right? I don't actually need compass files in that directory - do i?
<benzrf>
schtinky: include is a method on classes that takes a module as its argument
<arubin>
benzrf: Python has some strange system which requires some file to exist at every level of a hierarchy though.
<benzrf>
arubin: wha?
<arubin>
benzrf: I cannot remember the details.
<benzrf>
schtinky: it puts all of the methods and constants in the module into the class
<benzrf>
schtinky: so 'include Typhoeus' will dump all of the methods in Typhoeus into the current __class__
<benzrf>
*class
<jhass>
and constants too
nanoyak has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
alexju has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 240 seconds]
havenwood has quit [Ping timeout: 246 seconds]
no6 has quit [Ping timeout: 246 seconds]
soulcake has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
carraroj has quit [Quit: Konversation terminated!]
<jhass>
hm, not sure how you managed to have no ABI versions in your paths, do you have multiple rubys installed or did you upgrade your ruby at some point?
dik_dak has joined #ruby
funktor has quit [Remote host closed the connection]
tcstar has quit [Read error: Connection reset by peer]
linduxed has joined #ruby
bradhe has quit [Remote host closed the connection]
<schtinky>
you know how it is... when your'e first learning something new, you end up following whatever advice you're reading and only later find out it was wrong, outdated or contradictory
<shevy>
depends
<jhass>
hm
<jhass>
what does locale say?
maletor has quit [Ping timeout: 246 seconds]
<schtinky>
what is locale?
j416 has left #ruby ["o/"]
<jhass>
`locale` run it
<schtinky>
everything is "en_US.UTF-8"
mehlah has joined #ruby
<shevy>
schtinky a big problem is when distributions change ruby defaults
<schtinky>
except LC_ALL which is blank
<schtinky>
should I get rid of all my system packages and try to do it from scratch?
<jhass>
anything different after you do export LC_ALL="en_US.UTF-8" ?
<schtinky>
same json-y errors
yekta has quit [Quit: yekta]
<schtinky>
ugh... I hate constantly learning new techs, apis, languages, consoles, databases, etc... seems like I can't ever work on my actual app
funktor has quit [Read error: Connection reset by peer]
funktor_ has joined #ruby
<shevy>
schtinky yeah
<shevy>
a lot of things one has to know
Czupa has quit [Quit: Wychodzi]
<schtinky>
I feel like we're approaching the level like how car mechanics used to be able to work on a car... but now each car is too specialized -- the equipment too opaque
<jhass>
schtinky: what about bundle exec ruby yourtestfile.rb
<schtinky>
ooh that seemed better
<schtinky>
still an error, but no json stuff
rjhunter has joined #ruby
<schtinky>
ok no error now, need to figure out how to print the results
<schtinky>
what did bundle exec do for me?
<shevy>
schtinky well, it's partially your fault as well - you rely on these tools, like your system ruby and bundler
<jhass>
benzrf: took me some time to dig it out but I actually have a gist with directories in it
crystal77 has joined #ruby
<benzrf>
wut
<schtinky>
yeah but that's like saying it's ford's fault for relying on fuel injection isntead of a carborater
<benzrf>
how
Guest1276 has quit [Remote host closed the connection]
<schtinky>
you have to use what's better, but it becomes more and more complex as you add layers
keen______ has joined #ruby
apple has joined #ruby
<jhass>
schtinky: it basically does require 'bundler/setup' for you. that is it's preparing the $LOAD_PATH on which require works to only include entries for gems in your Gemfile.lock
apple is now known as Guest94842
<shevy>
schtinky you can use what is simpler too
maletor has joined #ruby
<jhass>
benzrf: iirc just created a gist, cloned it, comitted directories and pushed it
Guest29671 is now known as adam12
<schtinky>
not if you hope to remain relevant
decoponio has quit [Quit: Leaving...]
keen_____ has quit [Ping timeout: 265 seconds]
<schtinky>
I'm not coding in cobol, for instance
blom_ has joined #ruby
mikepack has joined #ruby
prc has joined #ruby
no6 has joined #ruby
endash_ has joined #ruby
Shidash has quit [Ping timeout: 240 seconds]
<schtinky>
btw, what editors do you guys use? I've always been an eclipse guy. Coding in vim seems... um... yeah.
rjhunter has quit [Ping timeout: 265 seconds]
<shevy>
I consider myself still relevant without bundler ;)
<shevy>
I use bluefish 1.0.7
<centrx>
vim
<schtinky>
ugh I only have a vague sense of what bundler even is
<jhass>
schtinky: no editor war please :( :P
<schtinky>
I'm just asking opinions
<schtinky>
I need to pick one
<shevy>
In ruby the editor should not be too important though
<jhass>
schtinky: try a few, pick what you like
chipotle has joined #ruby
<jhass>
the question is religious in my experience
shaileshg has quit [Quit: Connection closed for inactivity]
nateberkopec has joined #ruby
<shevy>
the question is perfectly fine
maletor has quit [Ping timeout: 252 seconds]
<benzrf>
schtinky: use vim
<benzrf>
schtinky: vim is the shit
<jhass>
there we go...
<benzrf>
schtinky: it's like notepad if notepad were awesome instead of being notepad
<shevy>
that's ok, benzrf is like 15
<schtinky>
cutting and pasting a massive chunk of code? undoing like 70 actions? vim can d othis?
<shevy>
vim can do everything if you memorize a few thousand commands in your brain
<schtinky>
that's what I'm afraid of
<benzrf>
70u
<shevy>
hehe
<shevy>
the basic vim commands are fine
mikepack has quit [Ping timeout: 252 seconds]
<benzrf>
da{/other_method<CR>3jp
rahult has joined #ruby
<shevy>
see, there it starts ^^^
<shevy>
then add a few functions
twiceaday has quit [Ping timeout: 245 seconds]
<benzrf>
why the hell would you think vim couldnt do such basic stuff
twiceaday has joined #ruby
twiceaday has quit [Client Quit]
<shevy>
with awesome delimiters such as "endfunction"
<schtinky>
but doesn't show how to actually view the results. I'm sure it's something basic, but I'm 24-hours into ruby max... so... help would be appreciated
dapz has joined #ruby
dapz has quit [Max SendQ exceeded]
<schtinky>
is it returning a hash map object?
<schtinky>
is that like the default thing? I need to get the keys and parse it?
<benzrf>
jhass: i dont know anything about it except that it's some kind of awful parody of feminism
blom_ has quit [Ping timeout: 265 seconds]
<jhass>
schtinky: try bundle exec irb
<jhass>
that gives you an interactive interpreter
<jhass>
for a more advanced version of that do gem install pry; bundle exec pry
<schtinky>
too much
<shevy>
schtinky you can ask for the class in i.e. irb; result = Typh bla here; result.class
rahult has quit [Ping timeout: 252 seconds]
no6 has quit [Ping timeout: 265 seconds]
<shevy>
well you asked what it returns
yubrew has joined #ruby
<shevy>
you can find out via .class
<shevy>
whether you do this in a .rb file, in irb or anywhere else does not matter
<hfp>
Fuck. It took 28 years for me to realize it's not "substract" but "subtract"… And it happened just now. I'm glad to share this important moment with you all.
<shevy>
lol
<shevy>
hfp I had such a moment not long ago
<shevy>
recieve vs. receive
<hfp>
so your life has been turned upside down as well huh
<shevy>
well it's ok
Nahra has joined #ruby
Nahra has quit [Changing host]
Nahra has joined #ruby
fschuindt has joined #ruby
<shevy>
just embarrassing to write it wrong for many years
jetblack has joined #ruby
<benzrf>
hfp: holy shit
<shevy>
perfection is hard to achieve
<benzrf>
you thought it was substract this whole time?
<benzrf>
o=
<schtinky>
bingo... got the HTTP response body to print to console
<hfp>
benzrf: Yes. To my defence, I'm not a native speaker so there's that
yubrew has quit [Ping timeout: 265 seconds]
<schtinky>
I'll try to take it from here
<schtinky>
thanks everyone
soulcake has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<soahccc>
shafox: Why would you need that? vThis library provides bindings to Oniguruma, a regular expression library which is standard with Ruby 1.9. It allows users of Ruby 1.8 to access the extended functionality without the need to recompile or to upgrade Ruby.
evenix has quit [Remote host closed the connection]
jamto11 has joined #ruby
chipotle has quit [Ping timeout: 268 seconds]
<centrx>
Hack: "My interpretation of the summary is: Facebook has sunk a lot of investment into a turd, and now they've determined that that turd needs polishing."
<centrx>
"PHP is the BASIC of the 21st century."
<centrx>
"Hack" as a name for a programming language is egregious. It's like naming your newborn baby "Wipe"
<centrx>
> "Hack" as a language name? Really?
<centrx>
Because "Brainfuck" was already taken.
montyboy has joined #ruby
zonetti has quit [Quit: bye]
zenojis has quit [Ping timeout: 265 seconds]
weems has quit [Read error: Connection reset by peer]
weems has joined #ruby
mr_snowf1ake has joined #ruby
atmatt has joined #ruby
segmond has joined #ruby
<atmatt>
Where's the standard location rbenv or RVM should be installed? I'm using Chef and it installed it as root and I'm running into problems with every other user.
<shevy>
I would assume they default to HOME
dapz has quit [Read error: No route to host]
<shevy>
hmm if I do rand(255)
<shevy>
the max value obtained is 254 right?
mikepack has joined #ruby
<shevy>
so if I'd want to obtain R,G,B values, I'd have to use rand(256)
evenix has joined #ruby
<atmatt>
I provisioned the server using Chef and Berkshelf and it installed as root, thus the $PATH is /usr/local/rbenv
jgoss has quit [Quit: Leaving]
Astralum has quit [Read error: Operation timed out]
<centrx>
shevy, 256 is the number of values in RGB?
jgoss has joined #ruby
<shevy>
0 up to 255
Form_Feed has quit [Quit: leaving]
<centrx>
right, so n is the number values
<centrx>
If it were 1 to 255, you would do 1 + rand(255)
<centrx>
Otherwise your randomization get skewed
<benzrf>
guys?
<shevy>
benzrf wat
RaptorJesus has joined #ruby
<benzrf>
is an MRI/YARV instance stored in a single data structure, or does it use global variables?
<shevy>
wuest, you were the guy who told me about kde konsole colours?
mikepack has quit [Ping timeout: 252 seconds]
circuit has joined #ruby
Kryptonical has joined #ruby
duggiefresh has quit [Ping timeout: 246 seconds]
JBreit has joined #ruby
funktor_ has quit [Remote host closed the connection]
JBreit has left #ruby [#ruby]
agent_white has joined #ruby
funktor has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blom_ has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
sambao21 has joined #ruby
Krypt has quit [Ping timeout: 255 seconds]
RaptorJesus has quit [Ping timeout: 268 seconds]
<agent_white>
Gewd afternewn reby
<agent_white>
rewby
rjhunter has joined #ruby
yubrew has joined #ruby
<benzrf>
hmmmm
<benzrf>
how can i have to_enum return a result from the block passed to the method being enumerated?
funktor has quit [Ping timeout: 240 seconds]
<centrx>
benzrf, to_enum.first ?
<benzrf>
huh"
wjlafrance has quit [Quit: This computer has gone to sleep]
<centrx>
huh?
lenswipe has left #ruby ["Leaving"]
<centrx>
to_enum returns an enumerator
<benzrf>
well
<benzrf>
let me show u what i mean
<benzrf>
def foo
RaptorJesus has joined #ruby
<benzrf>
res = yield 1
<benzrf>
raise "oh shit" if res != 'ok'
<benzrf>
yield 2; yield 3;
<benzrf>
end
<benzrf>
then i wanna to to_enum :foo
<benzrf>
how can i make the block passed in return 'ok'
sambao21 has quit [Ping timeout: 268 seconds]
yubrew has quit [Ping timeout: 240 seconds]
rjhunter has quit [Ping timeout: 246 seconds]
jamto11 has quit [Read error: Connection timed out]
<centrx>
benzrf, foo { |x| "ok" } ?
scttnlsn has quit [Ping timeout: 245 seconds]
<benzrf>
huh?
<benzrf>
i want to turn it into an enum tho
snuffeluffegus has joined #ruby
saarinen has joined #ruby
schtinky has quit [Quit: Leaving]
jamto11 has joined #ruby
scttnlsn has joined #ruby
<centrx>
Is there some real code?
<benzrf>
im using libclang
<wuest>
shevy: I am pretty darn familiar with console colors; I might well have told you about them.
<benzrf>
if you want to traverse the ast you need to use visit_children
<benzrf>
the block you pass is expected to return a code indicating how to proceed
<benzrf>
i want to get an enum of children
<benzrf>
but the block to_enum passes it returns nil
spider-mario has quit [Remote host closed the connection]
<wuest>
shevy: The escape sequence is 38;2;#{r};#{g};#{b}m
<centrx>
"roy is a small library which allows every Ruby object to be used as a Rack application."
<benzrf>
centrx: isn't that how rack works anyway
blom_ has quit [Remote host closed the connection]
tectonic has joined #ruby
blom_ has joined #ruby
montyboy has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
chipotle_ has quit [Quit: cya]
montyboy has joined #ruby
bahar has quit [Ping timeout: 265 seconds]
saarinen has quit [Quit: saarinen]
scttnlsn has quit [Ping timeout: 252 seconds]
bahar has joined #ruby
mikemar10 has joined #ruby
scttnlsn has joined #ruby
bradhe has joined #ruby
timonv has joined #ruby
blom_ has quit [Ping timeout: 252 seconds]
jamto11_ has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
blom_ has joined #ruby
ikaros has joined #ruby
nari has quit [Ping timeout: 245 seconds]
AlexRussia has quit [Quit: Konversation terminated!Good bye!]
creede has quit [Ping timeout: 245 seconds]
blom_ has quit [Remote host closed the connection]
<jamto11>
Hi I am trying to parse my time string from "2014-03-19T04:00:00.000Z" to "2014-03-19 00:00:00 -0400" . Does anyone know of an elegant solution? Right now the best that I could come up with is Time.zone.parse("2014-03-19T04:00:00.000Z").in_time_zone('America/New_York').to_s however I feel that there is a more elegant way
creede has joined #ruby
blom_ has joined #ruby
Vovko has joined #ruby
scttnlsn has quit [Ping timeout: 252 seconds]
bradhe has quit [Ping timeout: 268 seconds]
sdouglas has joined #ruby
chipotle has joined #ruby
scttnlsn has joined #ruby
IcyDragon has quit [Ping timeout: 246 seconds]
fschuindt has quit [Quit: Computer has gone to sleep.]
IcyDragon has joined #ruby
blom_ has quit [Ping timeout: 240 seconds]
bahar has quit [Ping timeout: 252 seconds]
sdouglas has quit [Ping timeout: 265 seconds]
bahar has joined #ruby
wallerdev has quit [Quit: wallerdev]
<agent_white>
jamto11: Just curios, are you trying to get the Time in New York?
<agent_white>
jamto11: Because `Time.new` gives you the string format you want, already.
fgo has joined #ruby
hobodave has joined #ruby
bradhe has joined #ruby
sailias has quit [Ping timeout: 265 seconds]
funktor has joined #ruby
circuit has quit [Quit: leaving]
<jamto11>
Time.new("2014-03-19T04:00:00.000Z")
<jamto11>
=> 2014-01-01 00:00:00 +0000
<jamto11>
hmm Time.new doesn't work with the string i am using (maybe it doesnt recognize the format?)
george2|chakra is now known as george2
mikepack has joined #ruby
nbezzala has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]
bradhe has quit [Ping timeout: 268 seconds]
petey has joined #ruby
Xeago has joined #ruby
camila has quit [Ping timeout: 240 seconds]
sambao21 has joined #ruby
codeitagile has quit [Remote host closed the connection]
<agent_white>
jamto11: No I mean, why do you need that string in the first place?