meatherly has quit [Remote host closed the connection]
<benzrf>
hmm
<benzrf>
is it possible to convince DRb to use domain sockets or some other form of IPC instead of tcp
meatherly has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
postmodern has joined #ruby
havenwood has quit []
creede has joined #ruby
dgaffney has quit [Remote host closed the connection]
<bnagy>
almost certainly, but imho it's probably not a great idea
r0nin has quit [Ping timeout: 268 seconds]
dgaffney has joined #ruby
<benzrf>
why?
meatherl_ has joined #ruby
jhass is now known as jhass|off
<bnagy>
cause even if you gain a tiny bit of speed you lose architectural flexibility
agrinb has quit [Ping timeout: 240 seconds]
<benzrf>
hm
kitak has joined #ruby
<benzrf>
also, is there a way to generate an ephemeral port besides passing 0?
jason____ has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
<benzrf>
i want to start a pry-remote instance on an ephemeral port, but it does not return anything i can use to find out what port it's onewheelskyward
<benzrf>
*on
tylersmith has joined #ruby
danno1 has joined #ruby
roolo has quit [Quit: Leaving...]
Cache_Money has joined #ruby
rahult_ is now known as rahult
<dorei>
benzrf: try netstat -lp
Hobogrammer has quit [Ping timeout: 252 seconds]
<benzrf>
dorei: from in ruby tho
meatherl_ has quit [Remote host closed the connection]
<bnagy>
you can get it off the returned socket object, by the looks
Beoran_ has quit [Ping timeout: 240 seconds]
<benzrf>
bnagy: there is none in pry-remote tho
<bnagy>
but, again, it's a weird thing to do
meatherly has joined #ruby
<dorei>
or netstat -lpt for more compact output
tylersmith has quit [Remote host closed the connection]
dgaffney has quit [Ping timeout: 264 seconds]
<bnagy>
if you start a server on an ephemeral port, which is already strange, normally you then advertise yourself somewhere
<bnagy>
depending on protocol
axsuul has quit [Read error: Connection reset by peer]
evenix has joined #ruby
vpretzel has quit [Remote host closed the connection]
<benzrf>
bnagy: well, i wanna be able to spin off new shells at request
<benzrf>
so i need to have a new port for each one
<benzrf>
:u
nateberkopec has quit [Quit: Leaving...]
<bnagy>
good point - like a webserver needs a new port for every connection
axsuul has joined #ruby
<bnagy>
it's murder finding google.com these days
<pipework>
ikr
meatherly has quit [Ping timeout: 268 seconds]
matcouto has joined #ruby
nateberkopec has joined #ruby
<benzrf>
>_<
Cache_Money has quit [Quit: Cache_Money]
<benzrf>
well dont blame me
<mr_snowf1ake>
i propose appending "RTFM" with "ASG" (and search google) for more comprehensive advice. :P
ce_afk is now known as cescalante
<benzrf>
running binding.pry_remote does not allow >1 connor_goodwolf
<benzrf>
*conn
<benzrf>
try it o.o
ekinmur has joined #ruby
Cache_Money has joined #ruby
coderxin_ has quit [Remote host closed the connection]
lolmaus has quit [Ping timeout: 240 seconds]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<bnagy>
you want more than one remote on the same binding?
<bnagy>
that sounds exciting :/
<benzrf>
??
<benzrf>
i am attempting to make something akin to smalltalk's image-based dev
<benzrf>
one feature needs to be the ability to open a pry to it whenever
<benzrf>
so i need to be able to spawn multiple instances
jason____ has quit [Remote host closed the connection]
<benzrf>
wait 1 sec
<benzrf>
yep
<benzrf>
trying to do more than one binding.pry_remote on the same port dunt work
jason____ has joined #ruby
<benzrf>
and you can't connect to the same instance twice
<benzrf>
therefore, need more ports
<benzrf>
>.<
<bnagy>
so fix it
<bnagy>
you don't need more ports.
<benzrf>
fix pry_remote?
danno1 has quit [Ping timeout: 268 seconds]
<bnagy>
well.. more ports won't help, if whatever pry-remote does isn't shareable
blackmesa has quit [Ping timeout: 240 seconds]
<bnagy>
like.. the port just introduces your client code to your server code
<bnagy>
if they don't get along they don't get along
jtdowney has joined #ruby
<bnagy>
some servers just don't like 3 way action
<pipework>
prood
<benzrf>
no, what i mean is
<benzrf>
i can run binding.pry_remote more than once
<benzrf>
but each one needs to be on a diff port
<benzrf>
obviously
mr_snowf1ake has quit [Ping timeout: 252 seconds]
Beoran_ has joined #ruby
jason____ has quit [Ping timeout: 264 seconds]
<bnagy>
obviousy
* bnagy
wanders off
<benzrf>
huehuehue
senayar_ has joined #ruby
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
YamakasY_ has quit [Ping timeout: 246 seconds]
eka has joined #ruby
werdnativ has quit [Quit: werdnativ]
eka has quit [Remote host closed the connection]
danno1 has joined #ruby
yfeldblu_ has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
eka has joined #ruby
<benzrf>
hey banister u there?
senayar has quit [Ping timeout: 268 seconds]
<banister>
benzrf sup
naw_ has quit []
mikepack_ has quit [Remote host closed the connection]
ekinmur has quit []
<benzrf>
yo i have an problem with remote-pry
<benzrf>
is there a way to get one call to serve multiple connections
teddyp1cker has joined #ruby
<benzrf>
*pry-remote
Butcho has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<benzrf>
banister: ?
emergion has joined #ruby
iliketurtles has quit [Ping timeout: 240 seconds]
mr_snowf1ake has joined #ruby
jeer has left #ruby [#ruby]
danno1 has quit [Ping timeout: 246 seconds]
teddyp1cker has quit [Ping timeout: 252 seconds]
<banister>
benzrf google pry-remote-em
yubrew has joined #ruby
<benzrf>
b-but
<benzrf>
what if i dont want to use em
rjhunter has quit [Remote host closed the connection]
<pipework>
your be fukd den bruv
<benzrf>
hue
Tentra_ has quit [Ping timeout: 264 seconds]
sputnik13 has joined #ruby
<benzrf>
is there a version of DRb for EM
Butcho has joined #ruby
binaryhat has joined #ruby
inkblots has left #ruby [#ruby]
sputnik1_ has quit [Ping timeout: 240 seconds]
nwkr is now known as Nowaker
iliketurtles has joined #ruby
predator217 has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
yubrew has quit [Ping timeout: 246 seconds]
fgo has joined #ruby
sputnik13 has quit [Client Quit]
papercod1 has quit [Quit: WeeChat 0.4.3]
SCommette has quit [Quit: SCommette]
felipecvo has joined #ruby
lolmaus has joined #ruby
sputnik13 has joined #ruby
Tentra_ has joined #ruby
meatherly has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
<benzrf>
banister: anyways i found a utility for freezing/checkpointing processes that seems to actually work
<banister>
benzrf docker?
<benzrf>
so now im setting up a program to run within it for ruby devving
<benzrf>
no but ill google that now o=
<banister>
benzrf what was your thing called?
<benzrf>
dmtcp
<benzrf>
ooh this looks p cool
sputnik13 has quit [Client Quit]
<benzrf>
does docker allow saving a process's state entirely and bringing it back up later, even after restarts and across machines?
danshultz has quit [Remote host closed the connection]
<benzrf>
hmmmm
danshultz has joined #ruby
<benzrf>
is there some way to integrate FUSE into eventmachine
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
perldork has joined #ruby
petey has quit [Ping timeout: 240 seconds]
yubrew has joined #ruby
perldork has quit [Remote host closed the connection]
werdnativ has joined #ruby
rh1n0 has joined #ruby
patrick99e99 has joined #ruby
<schtinky>
I'm getting some strange behavior from nokogiri as I'm scraping a hostname and printing a site map.
<schtinky>
the first request works just fine, gets all the objects, links, etc
<schtinky>
the second nokogiri get page request just hangs
whomp has joined #ruby
binaryhat has quit [Quit: Leaving]
josh___ has joined #ruby
<schtinky>
when I ctrl-c, I get uninitialized constant OpenURI::Error (NameError)
<schtinky>
how can I get more info about what's going on?
josh___ has left #ruby [#ruby]
yubrew has quit [Ping timeout: 240 seconds]
<centrx>
schtinky, Do you have an incomplete Ruby installation or something?
rh1n0 has quit [Client Quit]
<centrx>
schtinky, Did you require 'open-uri' ?
<schtinky>
yes required 'open-uri'
<schtinky>
I don't think my ruby installation is incomplete. The first request works fine.
yfeldblu_ has quit [Read error: Connection reset by peer]
<centrx>
It could just be misleading error from terminating with Ctrl-C
yfeldblum has joined #ruby
<schtinky>
hmm. it's like the second request is trying to use the same Nokogiri object and can't becuase it's in use from the first one
<schtinky>
I'm 48 hours into ruby, so maybe I've got variable scope messed up
jason__ has quit [Remote host closed the connection]
r0bby has joined #ruby
<benzrf>
schtinky: var scope in ruby is wack as shit
jason__ has joined #ruby
<benzrf>
schtinky: first of all
<benzrf>
do you know constants vs vars
robbyoconnor has quit [Ping timeout: 240 seconds]
<schtinky>
right now I've got a "getPage(url) begin open(url) end return Nokogiri::HTML(doc) end" function outside of my class and the class is being called recursively
<schtinky>
could that be the issue?
<benzrf>
schtinky: let me tell you about ruby's weird-ass scoping rules
<schtinky>
haha
<schtinky>
I was reading something about them
<benzrf>
if you dont listen, or at least google about them, you WILL be bitten in the ass
<benzrf>
1. constants are NOT the same as lvars
<schtinky>
instance scope, class scope, global scope, local scope
<benzrf>
sort of.
<benzrf>
lvars are scoped to the block they are in
<benzrf>
whether that be a method or a class block
<benzrf>
they can be closed over by blocks, but NOT by methods
<benzrf>
foo = 3; def bar; foo; end; <- DOES NOT WORK
<benzrf>
constants are the other one with no sigil
<benzrf>
a name starting with a capital letter is a ConstantineXVI
<benzrf>
*constant
<benzrf>
constants are scoped to modules and classes
<benzrf>
lookup on constants is performed with ::
<benzrf>
Foo::Bar looks up the constant Bar in the class Foo
<benzrf>
constant lookup that isn't prefixed is a bit weird
<benzrf>
if i write 'Foo'...
_lynX has joined #ruby
<benzrf>
lookup goes through each of the lexically nested modules/classes im in
Frank13760 has joined #ruby
<benzrf>
but it will look up the constant /DYNAMICALLY/ in each one
<benzrf>
let me show you what i mean.
<benzrf>
module Foo
<benzrf>
module Bar
Frank13760 has quit [Remote host closed the connection]
<benzrf>
Baz
jason__ has quit [Ping timeout: 264 seconds]
<benzrf>
^first it will look for Bar::Baz
<benzrf>
then Foo::Baz
<benzrf>
if i defined Foo::Baz elsewhere, that works
<benzrf>
module Foo::Bar
<benzrf>
Baz
<benzrf>
this will look in Bar, but NOT in Foo
<benzrf>
because the scopes to check are LexicalScope
senayar has joined #ruby
<benzrf>
*lexical
<benzrf>
even though the lookup itself is dynamic
hamakn has quit [Remote host closed the connection]
<benzrf>
you have to wonder what matz was on when he figured out these rules
<benzrf>
-.-
<schtinky>
hmmm
<schtinky>
I didnt' get to the "classes" section on CodeAcademy
<schtinky>
so yeah, I'm confused
<pipework>
benzrf: How does it not make sense?
kennym has quit [Quit: Leaving.]
<benzrf>
pipework: it makes sense
<benzrf>
it's just weird as hell
<pipework>
If you define Foo then Baz within Foo, but another time you define Foo::Bar, it's not the same.
kennym has joined #ruby
matcouto has joined #ruby
<benzrf>
module Foo; module Bar; has a different lookup chain than module Foo::Bar
<benzrf>
this is unexpected because constant lookup is dynamic within a module
<benzrf>
i would expect either entirely dynamic lookup
<benzrf>
i.e. based on the semantic nesting, and looked up in the entire module
<benzrf>
or entirely lexical lookup
<benzrf>
i.e. based on the syntactic nesting, and looked up in the semantic scope
lyanchih_ has quit [Quit: lyanchih_]
lyanchih__ has joined #ruby
funburn has quit [Quit: funburn]
ce_afk is now known as cescalante
sepp2k has quit [Quit: Leaving.]
lw has joined #ruby
dapz has joined #ruby
nari has joined #ruby
funburn has joined #ruby
jtdowney has quit [Ping timeout: 264 seconds]
<schtinky>
whelp, looks like the site I was trying to spider is down
<schtinky>
pretty fantastic fail there
<schtinky>
i guess it was getting the base page from cache or something
krz has joined #ruby
<popl>
maybe you killed the site
<popl>
way to go
evenix has joined #ruby
<schtinky>
ah, it was a certificate issue
Gooder has joined #ruby
<schtinky>
it's my site I put up yesterday for testing and was trying to https:// it
<schtinky>
smh
funburn has quit [Ping timeout: 240 seconds]
PhilK has quit [Ping timeout: 240 seconds]
cescalante is now known as ce_afk
r0nin has joined #ruby
LostDatagram has joined #ruby
agrinb has joined #ruby
freerobby has quit [Quit: Leaving.]
PhilK has joined #ruby
AussieDownUnder has quit [Remote host closed the connection]
hamakn has joined #ruby
tylersmith has quit [Remote host closed the connection]
tylersmith has joined #ruby
sputnik13 has joined #ruby
sputnik13 has quit [Client Quit]
maletor has joined #ruby
ce_afk is now known as cescalante
r0nin has quit [Ping timeout: 246 seconds]
agrinb has quit [Ping timeout: 240 seconds]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
jason___ has joined #ruby
tylersmith has quit [Ping timeout: 252 seconds]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<Musashi1>
Does anyone have any reccomendations on where one could go to hire someone for some small ruby jobs?
<popl>
Musashi1: Depending on the scope of the project, you could ask here. Elance is apparently popular.
danshultz has quit [Ping timeout: 240 seconds]
<Musashi1>
Thanks
vlad_starkov has joined #ruby
cescalante is now known as ce_afk
maletor has quit [Quit: Computer has gone to sleep.]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
newbie1r has joined #ruby
<benzrf>
Musashi1: i would totally so some small ruby jobs
<benzrf>
for super cheap too
<benzrf>
*do
markisonfire has quit [Quit: markisonfire]
_lynX has quit [Quit: Leaving]
vlad_starkov has quit [Ping timeout: 252 seconds]
nolic has quit [Ping timeout: 240 seconds]
coderxin has joined #ruby
senayar has quit [Remote host closed the connection]
CopingWithBliss has joined #ruby
nfearnley has joined #ruby
blom_ has joined #ruby
Photism_ has joined #ruby
yubrew has joined #ruby
<nfearnley>
I'm trying to install ruby on my Mac, and I keep getting an error when I do "rvm install ruby-2.1.1". I get the error "library not loaded dyld: Library not loaded: /Users/mpapis/.sm/pkg/versions/openssl/1.0.1f/lib/libssl.1.0.0.dylib". That path seems to reference the use "mpapis", who doesn't exist on my machine. It looks to me like a hardwritten reference. How can I fix this?
geggam has quit [Remote host closed the connection]
Photism has quit [Ping timeout: 240 seconds]
<bnagy>
hahaha
gancl has joined #ruby
yubrew has quit [Ping timeout: 240 seconds]
coderxin has quit [Ping timeout: 246 seconds]
<nfearnley>
My google searches found Michael Papis, so I'm assuming that's the cause.
<bnagy>
can't help with rvm ( #rvm can ) but I would recommend chruby + ruby-install
<bnagy>
or rbenv, but chruby is hipper
rjhunter has joined #ruby
joshsmith has joined #ruby
<bnagy>
there are simple step-by-step instructions on the github, works with ports or brew, it's a simple path switcher
<LostDatagram>
Personally I prefer rbenv. Always found there was too many things that could go wrong with rvm and I didn't really need anything it provided over rbenv. Haven't tried chruby
<nfearnley>
I'll throw the question over to #rvm. If that doesn't work, I'll look at those suggestions.
teddyp1cker has joined #ruby
ekinmur has joined #ruby
bricker`LA has quit [Ping timeout: 240 seconds]
fgo has quit [Remote host closed the connection]
sambao21 has joined #ruby
fgo has joined #ruby
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
teddyp1cker has quit [Ping timeout: 240 seconds]
echevemaster has joined #ruby
fgo has quit [Remote host closed the connection]
sputnik13 has joined #ruby
werdnativ has quit [Quit: werdnativ]
sputnik13 has quit [Client Quit]
fieldfirst has quit [Ping timeout: 264 seconds]
felipecvo has joined #ruby
sambao21 has quit [Ping timeout: 240 seconds]
felipecvo has quit [Ping timeout: 240 seconds]
bricker`LA has joined #ruby
RaptorJesus_ has joined #ruby
alexju has joined #ruby
bricker`LA has quit [Client Quit]
LostDatagram has quit [Quit: Bye :P - znc.in]
RaptorJesus_ has quit [Remote host closed the connection]
LostDatagram has joined #ruby
RaptorJesus_ has joined #ruby
emergion has quit [Quit: Connection closed for inactivity]
blom_ has quit [Remote host closed the connection]
blom_ has joined #ruby
kennym has quit [Quit: Leaving.]
RaptorJesus has quit [Ping timeout: 268 seconds]
browndawg has joined #ruby
RaptorJesus_ has quit [Remote host closed the connection]
RaptorJesus_ has joined #ruby
Hanmac has quit [Ping timeout: 268 seconds]
mr_snowf1ake has joined #ruby
blom_ has quit [Ping timeout: 252 seconds]
rasengan has joined #ruby
rasengan has left #ruby ["WeeChat 0.3.7"]
Wolland has joined #ruby
mikepack_ has joined #ruby
RaptorJesus_ is now known as RaptorJesus
r0nin has joined #ruby
rh1n0 has joined #ruby
mikepack_ has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
endash_ has quit [Quit: endash_]
ce_afk is now known as cescalante
r0nin has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
sdouglas has joined #ruby
mikepack has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
Hanmac has joined #ruby
ekinmur has quit []
jlast has quit [Remote host closed the connection]
whomp has quit [Ping timeout: 240 seconds]
saarinen has joined #ruby
mikepack has quit [Ping timeout: 246 seconds]
nbezzala_ has joined #ruby
Cache_Money has joined #ruby
lolmaus_ has joined #ruby
lw has quit [Quit: b]
cescalante is now known as ce_afk
lolmaus has quit [Ping timeout: 268 seconds]
lukec has quit [Quit: lukec]
saarinen has quit [Quit: saarinen]
dgaffney has joined #ruby
rh1n0 has quit [Quit: Hopefully you don't see this...]
nateberkopec has quit [Quit: Leaving...]
<nfearnley>
I was able to get help from #rvm. Thanks for directing me there.
yubrew has joined #ruby
quatron has quit [Quit: ChatZilla 0.9.90.1 [Firefox 28.0/20140314220517]]
<emergion>
rjhunter, ok I guess for now I will capture any KeyErrors
RaptorJesus has quit [Ping timeout: 240 seconds]
<rjhunter>
emergion: capture and re-raise as MissingConfig with more specific information if that's appropriate
<emergion>
rjhunter, I don't mind the approach so much, but what about other libraries I would use in my app
<emergion>
?
<emergion>
If they raise a KeyError
invinceable has joined #ruby
nfearnley has quit [Remote host closed the connection]
<emergion>
I actually creates a Config class which inherits Hash and redefined fetch which works absolutely perfectly, the only thing I need a way to convert any hashes that my config hash would contain to a config class :)
<emergion>
I think I just need a to_config method and I would be set
lyanchih__ has quit [Quit: lyanchih__]
browndawg has joined #ruby
<bnagy>
:/
<bnagy>
subclasses of basic container types lead to suuu ferrr iiing
nateberkopec has quit [Ping timeout: 240 seconds]
<emergion>
looks like I am finished then
<emergion>
with this idea
<emergion>
must be a library for it already anyway
<bnagy>
you'd think
wjlafrance has quit [Quit: This computer has gone to sleep]
nisstyre has quit [Remote host closed the connection]
lukec has joined #ruby
<bnagy>
anyway my only style advice is a) don't use ternary and b) don't inherit from core classes like Hash - use a DelegateClass instead ( or redesign )
<rjhunter>
^
braincrash has quit [Quit: bye bye]
bluOxigen has joined #ruby
larsam has joined #ruby
r0nin has joined #ruby
braincrash has joined #ruby
LostDatagram has quit [Quit: Bye :P - znc.in]
__class__ has quit [Read error: Connection reset by peer]
agrinb has joined #ruby
michaeldeol has joined #ruby
creede has quit [Ping timeout: 264 seconds]
sski has joined #ruby
JBreit has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
r0nin has quit [Ping timeout: 264 seconds]
fgo has joined #ruby
nateberkopec has joined #ruby
ekinmur has joined #ruby
agrinb has quit [Ping timeout: 240 seconds]
ekinmur has quit [Client Quit]
ce_afk is now known as cescalante
CopingWithBliss has left #ruby [#ruby]
_justin has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
yasushi has joined #ruby
rjhunter has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
__class__ has joined #ruby
bradhe has joined #ruby
rjhunter has joined #ruby
mikepack has quit [Remote host closed the connection]
yubrew has joined #ruby
gigetoo has quit [Remote host closed the connection]
mostlybadfly has quit [Quit: Connection closed for inactivity]
yubrew has quit [Ping timeout: 246 seconds]
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
AussieDownUnder has joined #ruby
marcdel has joined #ruby
rahult is now known as rahult_
Doppp has joined #ruby
rahult_ is now known as rahult
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rjhunter has quit [Remote host closed the connection]
marcdel has quit [Ping timeout: 240 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
emergion has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
_justin has quit [Quit: _justin]
<pipework>
bnagy: That looks lame
maletor has joined #ruby
Solnse has quit [Quit: Leaving.]
bogeyd6 has quit [Ping timeout: 268 seconds]
creede has joined #ruby
coderxin has joined #ruby
<bnagy>
which? Activethingy?
bogeyd6 has joined #ruby
marcdel has joined #ruby
<pipework>
yeah
<pipework>
activewhatever
northfurr has quit [Ping timeout: 246 seconds]
Musashi1 has joined #ruby
Photism_ has quit [Ping timeout: 240 seconds]
<bnagy>
yeah probably is, I was just amused that it exists
Photism_ has joined #ruby
Fire-Dragon-DoL has joined #ruby
r0bby is now known as robbyoconnor
coderxin has quit [Ping timeout: 252 seconds]
<pipework>
Yeah, active is the slightly newer acts_as
Bumptious has quit [Remote host closed the connection]
mary5030 has joined #ruby
whomp has joined #ruby
Bumptious has joined #ruby
teddyp1cker has joined #ruby
teddyp1cker has quit [Read error: No route to host]
teddyp1cker has joined #ruby
invinceable has quit [Ping timeout: 268 seconds]
abdulsattar has joined #ruby
chris_thomson has quit [Quit: Zzz...]
rjhunter has quit [Remote host closed the connection]
rjhunter has joined #ruby
mary5030 has quit [Ping timeout: 268 seconds]
chrisbolton has joined #ruby
whomp has quit [Ping timeout: 240 seconds]
kobain has quit [Ping timeout: 252 seconds]
evenix has quit [Ping timeout: 268 seconds]
yasushi has quit [Remote host closed the connection]
kobain has joined #ruby
Xiti has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<chrisbolton>
Anyone working in Colorado? I'm moving this summer and looking for a Ruby/Rails opportunity.
rkazak has left #ruby [#ruby]
felipecvo has joined #ruby
sputnik13 has joined #ruby
lukec has quit [Quit: lukec]
creede has quit [Ping timeout: 268 seconds]
whomp has joined #ruby
RaptorJesus_ is now known as RaptorJesus
bahar has quit [Ping timeout: 264 seconds]
yfeldblu_ has joined #ruby
rjhunter has quit [Remote host closed the connection]
Es0teric has quit [Quit: Nigga, im OUTIE 5000]
yfeldblum has quit [Read error: Connection reset by peer]
felipecvo has quit [Ping timeout: 252 seconds]
rjhunter has joined #ruby
bahar has joined #ruby
endash_ has joined #ruby
abdulsattar has quit [Read error: Operation timed out]
mrnugget has joined #ruby
Es0teric has joined #ruby
dzhulk has joined #ruby
vlad_starkov has joined #ruby
saarinen has joined #ruby
mikepack has joined #ruby
<Musashi1>
i have a small sinatra project i need help on.. where is a good place to go to find someone to task for a small job?
vlad_starkov has quit [Remote host closed the connection]
lyanchih_ has joined #ruby
<centrx>
I can do it tomorrow
<centrx>
Unless you just need a hint
rjhunter has quit [Remote host closed the connection]
r0nin has joined #ruby
mikepack has quit [Ping timeout: 264 seconds]
rjhunter has joined #ruby
Xeago has quit [Ping timeout: 240 seconds]
marcdel has quit []
gancl has quit [Ping timeout: 240 seconds]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
bradhe has joined #ruby
nateberkopec has joined #ruby
<Kryptonical>
chrisbolton: where abouts in CO?
Deele has joined #ruby
yubrew has joined #ruby
sdouglas_ has joined #ruby
dzhulk1 has joined #ruby
dzhulk has quit [Read error: Connection reset by peer]
ce_afk is now known as cescalante
creede has joined #ruby
rex_ has joined #ruby
rex_ has left #ruby [#ruby]
sdouglas has quit [Ping timeout: 265 seconds]
bradhe has quit [Ping timeout: 252 seconds]
cover_ has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
blom_ has quit [Remote host closed the connection]
gancl has joined #ruby
poguez_ has quit [Quit: Connection closed for inactivity]
andy__ has quit [Remote host closed the connection]
blom_ has joined #ruby
rjhunter has quit [Remote host closed the connection]
rjhunter has joined #ruby
AussieDownUnder has quit [Ping timeout: 240 seconds]
blom_ has quit [Ping timeout: 252 seconds]
cescalante is now known as ce_afk
JasmeetQA has joined #ruby
whomp has quit [Ping timeout: 264 seconds]
MatthewsFace has joined #ruby
SidWu_ has joined #ruby
rjhunter has quit [Remote host closed the connection]
parduse has quit [Ping timeout: 252 seconds]
rjhunter has joined #ruby
nisstyre has joined #ruby
Krajsnick has joined #ruby
coderxin has joined #ruby
<chrisbolton>
Kryptonical: Focused on Denver but open to Boulder.
petey has joined #ruby
Krajsnick has quit [Client Quit]
_lynX has joined #ruby
marcdel has joined #ruby
davy has joined #ruby
cj3kim has joined #ruby
coderxin has quit [Ping timeout: 240 seconds]
maroloccio has quit [Quit: WeeChat 0.4.3]
phansch has joined #ruby
petey has quit [Ping timeout: 268 seconds]
maroloccio has joined #ruby
<Kryptonical>
chrisbolton: I know of a few companies looking in denver, I'll pm you now
Lewix has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<chrisbolton>
Kryptonical: Awesome. Thanks.
rjhunter has quit [Remote host closed the connection]
mehlah has joined #ruby
dzhulk1 has quit [Quit: Leaving.]
rjhunter has joined #ruby
shevy has quit [Ping timeout: 246 seconds]
sensen has quit [Ping timeout: 240 seconds]
Paradigm_ has joined #ruby
<Paradigm_>
blals
MatthewsFace has quit [Quit: This computer has gone to sleep]
blom_ has joined #ruby
abdulsattar has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has quit [Remote host closed the connection]
lyanchih_ has quit [Quit: lyanchih_]
thomasxie has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
thomasxie has joined #ruby
sensen has joined #ruby
blom_ has quit [Ping timeout: 246 seconds]
endash_ has quit [Quit: endash_]
rjhunter has quit [Remote host closed the connection]
lyanchih_ has joined #ruby
danno1 has joined #ruby
rjhunter has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
decoponio has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
chrisbolton has quit [Quit: chrisbolton]
Paradigm__ has joined #ruby
bricker`LA has joined #ruby
dp90219 has joined #ruby
Paradigm_ has quit [Ping timeout: 265 seconds]
chipotle has joined #ruby
danno1 has quit [Ping timeout: 246 seconds]
sdouglas_ has quit [Remote host closed the connection]
saarinen has quit [Quit: saarinen]
bradhe has joined #ruby
snuffeluffegus has quit [Quit: Leaving]
rjhunter has quit [Remote host closed the connection]
echevemaster has quit [Quit: Leaving]
marcdel has quit []
dgaffney has quit [Remote host closed the connection]
rjhunter has joined #ruby
r0nin has joined #ruby
dgaffney has joined #ruby
dzhulk has joined #ruby
mary5030 has quit [Remote host closed the connection]
agrinb has joined #ruby
techmaverick has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
braincra- has joined #ruby
amclain_ has quit [Quit: Leaving]
nateberkopec has joined #ruby
vlad_starkov has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
dgaffney has quit [Ping timeout: 264 seconds]
<Paradigm__>
hey
<Paradigm__>
Anyone here?
agrinb has quit [Ping timeout: 252 seconds]
toretore has joined #ruby
coderhs has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
braincrash has quit [Ping timeout: 246 seconds]
_justin has joined #ruby
derek_c has joined #ruby
ce_afk is now known as cescalante
lyanchih_ has quit [Ping timeout: 252 seconds]
Shidash has quit [Ping timeout: 246 seconds]
Es0teric has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 240 seconds]
vlad_starkov has quit [Ping timeout: 240 seconds]
rjhunter has quit [Remote host closed the connection]
robbyoconnor has quit [Excess Flood]
blom_ has joined #ruby
robbyoconnor has joined #ruby
papercode has joined #ruby
robbyoconnor has quit [Client Quit]
_justin has quit [Quit: _justin]
rjhunter has joined #ruby
_justin has joined #ruby
r0nin has joined #ruby
<agent_white>
I think I am!
bradhe has joined #ruby
Lewix has quit [Remote host closed the connection]
bluOxigen has quit [Ping timeout: 240 seconds]
<centrx>
agent_white, Therefore, you must be.
<Paradigm__>
agent_white, can you help me with a question?
r0nin has quit [Ping timeout: 246 seconds]
<Paradigm__>
Or centrx possibly may be so??
cescalante is now known as ce_afk
bradhe has quit [Ping timeout: 246 seconds]
tagrudev has joined #ruby
davy has quit [Remote host closed the connection]
whomp has joined #ruby
blom_ has quit [Ping timeout: 240 seconds]
xbshiftc has quit [Quit: xbshiftc]
<popl>
Paradigm__: If you just ask your question I'm sure someone here might be able to help you.
<Paradigm__>
popl, the only one with a <3, who gives back to the community a little and doesn't just take
Paradigm__ has left #ruby ["Leaving"]
<popl>
What was that about?
andy__ has joined #ruby
gancl has quit [Ping timeout: 240 seconds]
<popl>
Humans, man…
<centrx>
What a strange creature
SonicX has quit [Ping timeout: 240 seconds]
rjhunter has quit [Remote host closed the connection]
bahar has quit [Ping timeout: 264 seconds]
Fire-Dragon-DoL has quit [Quit: Leaving.]
rjhunter has joined #ruby
renzhi has joined #ruby
whomp has quit [Ping timeout: 268 seconds]
abdulsattar has quit [Ping timeout: 240 seconds]
andy__ has quit [Ping timeout: 246 seconds]
<renzhi>
hi, this might now be a pure ruby question, but I can't find any response, so I'll just ask here. I use the Net::HTTP client to upload a file with PUT, but the server detects a certain header is not properly, it just sends back a response (error information in the response body) and disconnect. Using http client in any other language, I can receive the response correctly, but the ruby client just detects a connection reset, and no response.
coderxin has joined #ruby
<renzhi>
when calling http.request(req), it already throws the error
<renzhi>
/usr/lib/ruby/1.9.1/net/protocol.rb:199:in `write': Connection reset by peer (Errno::ECONNRESET)
<renzhi>
I don't get a chance to read the response body
wallerdev has quit [Quit: wallerdev]
<renzhi>
is there a way to get around this?
cj3kim has quit [Remote host closed the connection]
tobiasvl has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
bahar has joined #ruby
<agent_white>
renzhi: Can you post all the related code and information needed to reproduce?
<renzhi>
hang on
ctp has quit [Ping timeout: 268 seconds]
tonni_ has quit [Remote host closed the connection]
nfk has joined #ruby
dumdedum has joined #ruby
RSTJNII has quit [Remote host closed the connection]
<renzhi>
When invoking the last line http.request(req), I just get the connection reset error above, and can't get the response body
<renzhi>
the server returns a response with the body, then disconnect
<renzhi>
I'm trying to see if there's a way for me to read the response
anarang has joined #ruby
Xeago has quit [Read error: Operation timed out]
_justin has joined #ruby
<vike27>
how does this thing work, just a chat about ruby? first time here
<centrx>
Hi
<agent_white>
vike27: Yup!
<centrx>
Yes, this is IRC
<rjhunter>
renzhi: one technique you might find helpful: point your ruby at a simple server that prints out everything it gets (`nc -l 7777` or `socat TCP-LISTEN:7777`). then point another client at it. compare the results.
<centrx>
Welcome to Internet Relay Chat
<centrx>
Twitter, Facebook, StackOverflow, Instant Messenger, etc. are all inferior copies of IRC.
<renzhi>
rjhunter: did that already, the server receives the correct request, and returns a response with a body like this: {"status":401,"code":"Unauthorized","message":"Invalid token"}
mengu has joined #ruby
<vike27>
can i ask newb questions without getting banned like on stack overflow? I've only been programming for about a month need some help
<renzhi>
and with another http client (non-ruby, e.g. curl), I can receive the response and process the response body, but not this ruby client
<centrx>
Yes, yes you can.
<renzhi>
this is the first time I use ruby in a real project, btw. I used to write an automated test script.
<vike27>
cool
<rjhunter>
renzhi: i'm suggesting using a dummy server, not the one that's actually hanging up on you
heftig has quit [Quit: Quitting]
SonicX has joined #ruby
<rjhunter>
renzhi: so that you can compare the raw HTTP requests being sent by "working" client and "not-working" client
RaptorJesus_ has joined #ruby
<renzhi>
we have a logger on the server, which is an observer plugged into the server to intercept all requests and print out detailed requests (including all headers, etc). And the requests received are the same, and the server also respond with the same message.
SonicX has quit [Read error: Connection reset by peer]
SonicX has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
bahar has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
sputnik13 has joined #ruby
<rjhunter>
renzhi: i just looked over your code and i notice that the `http` object and the `req` object don't have anything to do with each other
blom_ has joined #ruby
nisstyre has quit [Quit: WeeChat 0.4.3]
arubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
skammer_ has joined #ruby
<rjhunter>
oops, i'm clearly not being useful
<renzhi>
rjhunter: they don't?
mr_red has quit [Ping timeout: 252 seconds]
<rjhunter>
i misread the code
<renzhi>
ok
gancl has joined #ruby
<rjhunter>
but i do see that you read the response body before making the request
mikepack has quit [Ping timeout: 240 seconds]
<vike27>
hmm okay, quick newb question. I am bit confused about index view/action. Can I go to(have a get request?) from an index action on? e.i have a page render on a root/posts/index url. I ask because I just generated a scaffold and my posts/ renders my index action. but I get an error message when i visit posts/index
bahar has joined #ruby
tonni has joined #ruby
phansch has joined #ruby
axsuul has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
<renzhi>
rjhunter: I don't mind that Net::HTTP throws an error if I can handle it, but I just want to find a way to read the response which is sent back by the server, and without changing my http client library, I have about 250 test cases for daily sanity test
apeiros has quit [Remote host closed the connection]
Spleeze has quit [Ping timeout: 246 seconds]
apeiros has joined #ruby
<renzhi>
and this code has been running for over a month now, without problem until now, we try to be more aggressive on the server side to disconnect clients that connect and send in junks
<centrx>
vike27, Try #rubyonrails
gancl has quit [Ping timeout: 252 seconds]
<centrx>
vike27, You may need to register/identify your nick with Freenode to get into that channel.
<centrx>
vike27, See /msg nickserv help register
Mon_Ouie has joined #ruby
yubrew has joined #ruby
blom_ has quit [Ping timeout: 252 seconds]
<vike27>
oh this is only ruby not ruby on rails
<centrx>
Yeah
jprovazn has joined #ruby
apeiros has quit [Ping timeout: 240 seconds]
SonicX has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
vike27 has quit [Quit: Page closed]
dp90219 has quit [Ping timeout: 268 seconds]
relix has joined #ruby
nbezzala_ has quit [Ping timeout: 246 seconds]
nbezzala has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
agent_white has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 240 seconds]
tectonic has quit []
agent_white has joined #ruby
abdulsattar has joined #ruby
<rjhunter>
renzhi: do you get the same results when you use `response = http.put('/upload', get_content, hdrs)`
tonni has quit [Remote host closed the connection]
sdouglas has quit [Remote host closed the connection]
nateberkopec has quit [Ping timeout: 240 seconds]
ce_afk is now known as cescalante
rhunter has joined #ruby
derek_c has quit [Ping timeout: 264 seconds]
zigomir has joined #ruby
rhunter_ has joined #ruby
senayar has joined #ruby
rhunter_ has quit [Read error: Connection reset by peer]
rjhunter has quit [Ping timeout: 268 seconds]
shevy has joined #ruby
Gooder``` has joined #ruby
rjhunter has joined #ruby
einarj has joined #ruby
senayar has quit [Remote host closed the connection]
r0nin has joined #ruby
rhunter has quit [Ping timeout: 268 seconds]
rjhunter has quit [Read error: Connection reset by peer]
Gooder`` has quit [Ping timeout: 246 seconds]
Jrz has quit [Quit: Computer has gone to sleep.]
blackmesa has quit [Read error: Operation timed out]
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
ahawkins has joined #ruby
r0nin has quit [Ping timeout: 252 seconds]
rjhunter has joined #ruby
cescalante is now known as ce_afk
rjhunter has quit [Read error: Connection reset by peer]
ndrei has joined #ruby
skaflem has joined #ruby
tacos1de has quit [Ping timeout: 265 seconds]
fannye has joined #ruby
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
tacos1de has joined #ruby
rjhunter has joined #ruby
AlexRussia has joined #ruby
Raboo has joined #ruby
LiohAu has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
davedev24 has quit [Remote host closed the connection]
rjhunter has joined #ruby
crome has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
fieldfirst has joined #ruby
rabeldable has quit [Quit: Leaving.]
rhunter has joined #ruby
jhass|off is now known as jhass
rhunter has quit [Read error: Connection reset by peer]
rhunter has joined #ruby
bahar has quit [Ping timeout: 252 seconds]
senayar has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
bahar has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
mikepack has joined #ruby
sk87 has joined #ruby
rjhunter has joined #ruby
rhunter has quit [Ping timeout: 240 seconds]
einarj_ has joined #ruby
einarj has quit [Ping timeout: 240 seconds]
mikepack has quit [Ping timeout: 246 seconds]
tonni has joined #ruby
Ariadeno has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
Jrz has joined #ruby
ghr has joined #ruby
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
poikon_ has joined #ruby
einarj_ has quit [Read error: No route to host]
rjhunter has joined #ruby
einarj has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
himsin has joined #ruby
YamakasY has joined #ruby
rjhunter has joined #ruby
bal has joined #ruby
andikr has joined #ruby
<shevy>
hey
rhunter has joined #ruby
felipecvo has joined #ruby
agent_white has quit [Quit: night]
yasushi has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
<jle`>
hi shevy
einarj_ has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
bahar has quit [Ping timeout: 252 seconds]
rjhunter has joined #ruby
blom_ has joined #ruby
rhunter has quit [Ping timeout: 268 seconds]
bahar has joined #ruby
nvrch has joined #ruby
rhunter has joined #ruby
felipecvo has quit [Ping timeout: 240 seconds]
zw has joined #ruby
yasushi has quit [Ping timeout: 240 seconds]
<zw>
Hi fellow ruby users.
einarj has quit [Ping timeout: 246 seconds]
<zw>
I user ruby/Passenger. I have some performance problems and when I strace my ruby process I see : read(11, 0x7fffa1d4e2d0, 16384) = -1 EAGAIN (Resource temporarily unavailable) all the time.
<zw>
I can'y really figure out why ... any tips ?
<zw>
This is the line after the timeouts : select(12, [7 11], [], [], {3, 162846}) = 1 (in [11], left {2, 989917})
teddyp1cker has quit [Remote host closed the connection]
rhunter_ has joined #ruby
nvrch has quit [Client Quit]
nvrch has joined #ruby
rjhunter has quit [Ping timeout: 240 seconds]
mehlah has joined #ruby
bradhe has joined #ruby
rjhunter has joined #ruby
sensen_ has quit [Quit: leaving]
rhunter has quit [Ping timeout: 240 seconds]
mikecmpbll has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
alexju_ has quit [Remote host closed the connection]
elaptics`away is now known as elaptics
rjhunter has joined #ruby
<shevy>
hmm
<shevy>
perhaps the network is down zw ?
jespada has joined #ruby
rhunter_ has quit [Ping timeout: 240 seconds]
rjhunter has quit [Read error: Connection reset by peer]
rhunter has joined #ruby
mbuf has joined #ruby
obs has joined #ruby
rhunter has quit [Read error: Connection reset by peer]
blom_ has quit [Ping timeout: 252 seconds]
<certainty>
zw: you should try to find out what the descriptor 11 comes from. the non-blocking read on that descriptor returned abnormally and set EAGAIN.
<certainty>
could be a file or a socket
<mbuf>
when trying to run 'bundle exec guard init', I get a 'require: cannot load such file -- json (LoadError). 'gem list json' returns json (1.8.1, 1.7.7), what could I be missing?
timonv has joined #ruby
<certainty>
gem list or bundle exec gem list?
rjhunter has joined #ruby
ikaros has joined #ruby
<zw>
certainty: how can I find that out ? :)
rjhunter has quit [Read error: Connection reset by peer]
bradhe has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
<certainty>
zw: above the calls to read in your strace output there must be some lines that show you. Look for open or accept
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
coderxin has joined #ruby
rjhunter has joined #ruby
rhunter has joined #ruby
nateberkopec has joined #ruby
<zw>
certainty: I only see read/selects
<certainty>
zw: before you can read something you have to open it or accept or even connect it. Either way, you should see any of these operations
rjhunter_ has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
rjhunter_ has quit [Read error: Connection reset by peer]
stonevil has joined #ruby
rjhunter has joined #ruby
rhunter has quit [Ping timeout: 268 seconds]
nateberkopec has quit [Ping timeout: 240 seconds]
rjhunter has quit [Read error: Connection reset by peer]
ce_afk is now known as cescalante
Macaveli has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
bahar has quit [Ping timeout: 252 seconds]
bahar has joined #ruby
rjhunter has joined #ruby
coderxin has quit []
<tagrudev>
certainty, yo
rjhunter has quit [Read error: Connection reset by peer]
heftig has joined #ruby
r0nin has joined #ruby
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
cba has joined #ruby
camilasan has quit [Remote host closed the connection]
rjhunter has joined #ruby
<certainty>
tagrudev: yo :)
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
rjhunter has quit [Read error: Connection reset by peer]
cba is now known as canderson
camilasan has joined #ruby
cescalante is now known as ce_afk
rjhunter has joined #ruby
r0nin has quit [Ping timeout: 264 seconds]
canderson is now known as Ca11yWally
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
Xeago has joined #ruby
rhunter has joined #ruby
camilasa_ has joined #ruby
camilas__ has joined #ruby
camilas__ has quit [Read error: Connection reset by peer]
jlebrech has joined #ruby
rhunter_ has joined #ruby
camilas__ has joined #ruby
rhunter_ has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
rjhunter has quit [Ping timeout: 268 seconds]
patrick99e99 has quit [Ping timeout: 246 seconds]
camila___ has joined #ruby
browndawg has left #ruby [#ruby]
patrick99e99 has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
camil____ has joined #ruby
camilasan has quit [Ping timeout: 268 seconds]
rhunter has quit [Ping timeout: 268 seconds]
camilasan has joined #ruby
<certainty>
tagrudev: how's life today?
camilasan has quit [Read error: Connection reset by peer]
coderxin has joined #ruby
camilasa_ has quit [Ping timeout: 268 seconds]
sdouglas has joined #ruby
camilasan has joined #ruby
petey has joined #ruby
timonv has quit [Remote host closed the connection]
camilasa_ has joined #ruby
kobain has quit []
poikon_ is now known as poikon
camila___ has quit [Ping timeout: 240 seconds]
camilas__ has quit [Ping timeout: 268 seconds]
NovapaX has joined #ruby
camilas__ has joined #ruby
shaunbaker has joined #ruby
rjhunter has joined #ruby
klaut has quit [Remote host closed the connection]
xjiujiu has joined #ruby
camila___ has joined #ruby
Alina-malina has quit [Ping timeout: 252 seconds]
lolmaus_ has quit [Read error: Operation timed out]
andy__ has joined #ruby
camila___ has quit [Read error: Connection reset by peer]
shredding has joined #ruby
camil____ has quit [Ping timeout: 268 seconds]
andy__ has quit [Remote host closed the connection]
shredding has joined #ruby
camila___ has joined #ruby
rhunter has joined #ruby
camila___ has quit [Read error: Connection reset by peer]
camila___ has joined #ruby
victorbjelkholm has joined #ruby
patrick99e99 has quit [Ping timeout: 264 seconds]
sdouglas has quit [Ping timeout: 265 seconds]
DouweM has joined #ruby
camila___ has quit [Read error: Connection reset by peer]
lolmaus has joined #ruby
jds has joined #ruby
camilasan has quit [Ping timeout: 268 seconds]
werdnativ has quit [Quit: werdnativ]
camilasan has joined #ruby
patrick99e99 has joined #ruby
petey has quit [Ping timeout: 264 seconds]
rhunter_ has joined #ruby
camilasa_ has quit [Ping timeout: 268 seconds]
camilasan has quit [Read error: Connection reset by peer]
camilas__ has quit [Ping timeout: 240 seconds]
camilasan has joined #ruby
rjhunter has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
tvl has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
tvl is now known as tobiasvl
AlSquire has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
rhunter has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
rdark has joined #ruby
postmodern has quit [Quit: Leaving]
yubrew has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
gancl has joined #ruby
rhunter_ has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
luckyruby has quit [Remote host closed the connection]
tvw has joined #ruby
m0s has joined #ruby
hiall has joined #ruby
rjhunter has joined #ruby
einarj_ has quit [Ping timeout: 265 seconds]
rjhunter has quit [Read error: Connection reset by peer]
Kneferilis has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 265 seconds]
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 240 seconds]
webx has joined #ruby
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
rjhunter has quit [Read error: Connection reset by peer]
JBreit has left #ruby [#ruby]
rhunter has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
hiall has joined #ruby
agrinb has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
roolo has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
nateberkopec has joined #ruby
camilasan has quit [Remote host closed the connection]
mostlybadfly has joined #ruby
camilasan has joined #ruby
claymore has quit [Quit: Leaving]
Zunonia__ has quit [Quit: Computer has gone to sleep.]
ndrei has joined #ruby
rhunter has joined #ruby
abstractj has quit [Changing host]
abstractj has joined #ruby
hiall_ has joined #ruby
agrinb has quit [Ping timeout: 240 seconds]
rhunter_ has joined #ruby
klaut has joined #ruby
hiall has quit [Ping timeout: 268 seconds]
hiall_ is now known as hiall
nateberkopec has quit [Ping timeout: 240 seconds]
rjhunter has joined #ruby
lemonsparrow has quit [Ping timeout: 245 seconds]
rhunter has quit [Ping timeout: 240 seconds]
ce_afk is now known as cescalante
Xeago has quit [Remote host closed the connection]
rhunter has joined #ruby
pfg has joined #ruby
rhunter has quit [Read error: Connection reset by peer]
rhunter_ has quit [Ping timeout: 240 seconds]
rhunter has joined #ruby
Xeago has joined #ruby
rjhunter has quit [Ping timeout: 240 seconds]
rhunter has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 268 seconds]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
r0nin has joined #ruby
LostDatagram has joined #ruby
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
sski_ has quit [Remote host closed the connection]
sski has joined #ruby
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
_Andres has joined #ruby
mikepack has joined #ruby
r0nin has quit [Ping timeout: 240 seconds]
cescalante is now known as ce_afk
jollyy has joined #ruby
jollyy has quit [Client Quit]
einarj_ has joined #ruby
<_Andres>
A quick question about syntax, is this valid? @books << isbns.each { |isbn| yield BookController.get_book(isbn) }
phansch has joined #ruby
<_Andres>
doesn't seem to be working for me
<shevy>
this is not good
phansch has quit [Client Quit]
rhunter has joined #ruby
<shevy>
I would recommend you to break it down, before you call the << method
<DouweM>
@books.push *that_stuff
<mordof>
definitely need to pick up this language soon.
<DouweM>
but even then, use map not each
Xeago has quit [Remote host closed the connection]
<DouweM>
also what
<DouweM>
that code makes little sense
<shevy>
hehehehe
<DouweM>
or maybe it does
<_Andres>
no way to do it with a one liner?
sski has quit [Ping timeout: 268 seconds]
<shevy>
no please
<DouweM>
_Andres: if we're having trouble understanding it in the first place, break it down
cout_ is now known as cout
<shevy>
if you want a one liner you should be able to solve it yourself
<shevy>
otherwise you could do people a favour and break down that code into simple, logical units
<DouweM>
+1
<_Andres>
I can do a longer approach no problem, always looking to cut down on code though
<mordof>
i don't know ruby - but isn't the point of that code to iterate through isbns and fill a .. what is that.. a dictionary or list? with books using a book controller (possibly instantiated elsewhere?)
mikepack has quit [Ping timeout: 252 seconds]
rhunter_ has joined #ruby
<shevy>
that is fine but the code you show here also shows that whoever wrote it does not understand yield
<_Andres>
correct
einarj has quit [Ping timeout: 268 seconds]
<_Andres>
I would've used a map
<shevy>
mordof I don't know the point of that code - ask DouweM to understand that code :)))
<mordof>
shevy: i thought it looked fairly simple actually
<shevy>
aha
<DouweM>
I think the best person to ask what it's supposed to do is probably _Andres :P
<DouweM>
the random yield there makes me thing this is in a method that expects a block
<shevy>
hehe
<DouweM>
but that's not at all obvious from the code given
<shevy>
I like that word
<shevy>
random yield :)
<shevy>
Ruby Motto #1: "If it does not work, randomly throw in some yield statements."
<popl>
shevy: two words there
<mordof>
shevy: of course i'm referring to "concept" of the code in question. being i've never used ruby - i have no idea what the implications are of how that is being done
Xeago has joined #ruby
<shevy>
popl you sure are pedantic!
* mordof
shrugs
<DouweM>
mordof: your interpretation was pretty much right
<shevy>
mordof well; yield is used to yield the content of a block
<DouweM>
mordof: but if you've never done ruby, what are you doing here?
atmosx has quit [Read error: Connection reset by peer]
rhunter has quit [Ping timeout: 268 seconds]
<shevy>
mordof in the code above, I am not really seeing a block
<mordof>
DouweM: i dunno.. i had my client idling here, haha. i'll be learning ruby soon. i'm bored and couldn't sleep and somehow ended up following the convo
<DouweM>
hehe
einarj_ has quit [Ping timeout: 268 seconds]
<mordof>
shevy: good point
sdouglas has joined #ruby
atmosx has joined #ruby
<shevy>
mordof good, you can learn what a block in ruby is - that way _Andres will understand as well
<shevy>
so the question is - what is a block in ruby?
rhunter has joined #ruby
<popl>
shevy: only on alternating Mondays
<_Andres>
all ears
<mordof>
oooh i love closures!
* mordof
listens intently
<shevy>
wat
rhunter_ has quit [Ping timeout: 268 seconds]
<DouweM>
hehe
<shevy>
I am just asking the questions
<mordof>
oh i thought you were telling a story >.> haha.. i'm reading up on it now
<shevy>
All who know what a block is are not allowed to answer :)
<mordof>
one sec, i got this!
<popl>
uh oh, shevy gave an ultimatum
<DouweM>
lol
<popl>
:)
<shevy>
mordof, well I can try to give better questions
<shevy>
hmm
<shevy>
mordof, in ruby, what exactly can accept a block?
yubrew has joined #ruby
<shevy>
that is not a good question...
poguez_ has quit [Quit: Connection closed for inactivity]
<shevy>
I woke up not long ago, my brain works at only 5% of its normal 12%
<mordof>
lol
<shevy>
I have an idea though
rjhunter has joined #ruby
<shevy>
_Andres, let's say you have a method called "foo"
<mordof>
i'm assuming this Block you speak of is different than a normal "code block" concept from other languages?
<shevy>
_Andres, how do you pass a block to this method?
<shevy>
mordof well yeah. if you with "code block" mean something like in C, the {} part of a function
* mordof
nods
<shevy>
ok, in ruby this should be equivalent to def/end
<shevy>
def foo
* mordof
has primarily C-based language backgrounds
sdouglas has quit [Ping timeout: 240 seconds]
<_Andres>
foo { block }
<shevy>
# content here
<shevy>
end
<shevy>
_Andres yes!
<shevy>
excellent
einarj has joined #ruby
<mordof>
shevy: yeah i figured that was equivalent
<_Andres>
I like you
rhunter has quit [Ping timeout: 240 seconds]
<shevy>
_Andres now inside the method foo, how can you access the content of { } given?
jollyy has joined #ruby
<_Andres>
..yield?
<mordof>
haha xD
<shevy>
yes!
<DouweM>
of accept &block as the final argument, and use block.call :)
rhunter has joined #ruby
<DouweM>
*or]
blackmesa has joined #ruby
<shevy>
hmm
rhunter has quit [Read error: Connection reset by peer]
<_Andres>
Seems like I've left ruby closures ignored for too long :)
<mordof>
shevy: is the yield like passing scope from the code block into foo for given parts? (or all parts maybe?)
<shevy>
I guess this is the only purpose of yield ... to yield the content of a block
rhunter has joined #ruby
<mordof>
from the block*
<shevy>
_Andres well, you can deduce what is going on by just looking at the code
<shevy>
for instance
yubrew has quit [Ping timeout: 240 seconds]
<_Andres>
is: def foo (&block) equivalent to: def foo ?
<shevy>
I am not sure what your code is doing, but just by look at: yield BookController.get_book(isbn)
yfeldblum has joined #ruby
<shevy>
I have a hard time understanding where the block is... or if there is a block at all
<DouweM>
yeah, the method that line is in is probably passed one
<jhass>
_Andres: no, block becomes a optional parameter of the method. if a block is passed it contains that block as Proc object
rhunter_ has joined #ruby
<_Andres>
shevy, there is no block. I recall using yield in Scala in that sort of fashion, so thought I'd give it a go
<shevy>
mordof yeah kinda. it's a bit like an extra argument to all methods in ruby, all the time. of course a block is optional to a method, so you don't have to use it. But you can if you want to, just gives you more flexibility
rjhunter has quit [Ping timeout: 268 seconds]
<DouweM>
_Andres: what in the hell are you trying to do?
nolic has joined #ruby
<mordof>
shevy: hmm.. ok
Speed has joined #ruby
<_Andres>
BookController(ibsn) fetches a book object for each isbn and the result should be pushed to @books array
<shevy>
_Andres aha
<DouweM>
_Andres: then why use yield at all?
<shevy>
ok, it seems you don't need to use yield there at all
rjhunter has joined #ruby
<shevy>
which simplifies things :)
<DouweM>
_Andres: and in your case it's probably better to just << it to the array from within the each block
<mordof>
that's what i was just thinking... from what it sounds like that's just a pointless addition, no?
<mordof>
if there's no block - would it even do anything..?
<_Andres>
was hoping there's a one liner for it instead of doing a map and generating the @books array
<DouweM>
mordof: the code as written would pass the result of get_book as an argument to the passed block
<DouweM>
mordof: but apparently there is no block at all
rhunter has quit [Ping timeout: 240 seconds]
<shevy>
mordof haha I dont even know without trying, I never saw it used like that before; it probably is doing something though
<jhass>
so either isbns.each do |isbn| @books << BookC.... } or @books.concat isbns.map {|isbn| BookContro.... }
<shevy>
yes! go the .map way _Andres !
<mordof>
shevy: true. it wouldn't just silently be ignored
lkba has quit [Ping timeout: 246 seconds]
<DouweM>
I prefer the first one of jhass's examples
<mordof>
hmmm
<DouweM>
a bit clearer with the concat/map out of the way
yfeldblum has quit [Ping timeout: 252 seconds]
rhunter has joined #ruby
<_Andres>
yield in Scala is used like this: val res = for (a <- args) yield a.toUpperCase
bradhe has joined #ruby
rhunter_ has quit [Ping timeout: 240 seconds]
<shevy>
a laser attack!
<shevy>
<-
<mordof>
so... the isbns.each do |isbn| <stuff here> end is a foreach essentially, and each item in the isbns .. array? .. is provided in that section with the name isbn?
<_Andres>
where res will contain each a in uppercase
Macaveli has quit [Ping timeout: 252 seconds]
<shevy>
ruby has ->
poikon_ has joined #ruby
<_Andres>
it seems that Ruby is a different beast :)
<shevy>
well you can do the same in ruby just with another syntax
<DouweM>
_Andres: in Ruby, the return value of the block is what's put in the array returned by #map
<DouweM>
_Andres: the return value of the block is just its last expression
<jhass>
mordof: yes
andy__ has joined #ruby
<_Andres>
I see
poikon_ has quit [Client Quit]
<tobiasvl>
mordof: it might be an array, but each is a method that belongs to the Enumerable mixin. so you can do the same thing with any collection of stuff.
rhunter_ has joined #ruby
<mordof>
then the @books << BookController.get_book(isbn) is piping the result of the get_book into whatever data type @books is (i'm guessing it's a list or dictionary type)
<DouweM>
_Andres: and there's a difference between #each and #map. the first just loops over the array, the latter loops and returns an array consisting of the return values of every block call
gancl has quit [Ping timeout: 264 seconds]
rjhunter has quit [Ping timeout: 240 seconds]
* mordof
nods
<DouweM>
mordof: it's just calling the #<< method, which happens to append to the array :)
<jhass>
mordof: likewise << is just a method call, so who knows what happens, there's String#<< too. But I assume @books an array
<DouweM>
;)
<mordof>
orly.. ok that's a bit different
<mordof>
i was reading that similar to piping and output management from a shell point of view
poikon has quit [Disconnected by services]
<DouweM>
mordof: in Ruby, all operator-looking things are just methods
* mordof
will have to remember that those can be methods too
<mordof>
nice!
rjhunter has joined #ruby
<shevy>
mordof you can define such methods in your classes too, for instance the [] method. class Foo; def self.[](input); end; end
<DouweM>
"operator overloading" is just defining the #== method, for example
<shevy>
and call it like: Foo['hi there']
<DouweM>
and indeed, same for #[] and #[]= which are used in dics and arrays
rhunter has quit [Ping timeout: 240 seconds]
<mordof>
o.o i love this language alraedy
<mordof>
already*
<DouweM>
def self.[], as shevy is using, makes it a class method, just def [] would define the [] you know from arrays: yolo[2]
<DouweM>
the MatchData object it returns also has stuff like the starting index
<mordof>
.match is basically what i'm familiar with
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DouweM>
but yeah, not that exciting, I was just showing that it also workd with #[]
poikon_ is now known as poikon
<mordof>
for short-hand or smaller checks, i very much enjoy the #[] use. question
<shevy>
mordof see that is ruby
einarj has quit [Ping timeout: 240 seconds]
<mordof>
why do you put # in there?
<shevy>
you can have a lot of fun playing with its syntax
<DouweM>
mordof: it's a way to refer to methods
<shevy>
and then everybody wonders why nothing ever gets done in it ;)
<mordof>
shevy: hahaha, that's awesome
felipecvo has quit [Ping timeout: 264 seconds]
<DouweM>
# for instance methods, . for class methods. For example File#size is the size method on a specific File isntance, File.size method is the class method on File, that gives the file size for the passed path
jollyy_ has joined #ruby
<mordof>
ahhh right right
rjhunter has joined #ruby
<mordof>
it's just the difference between instantiated, and non then?
teddyp1cker has joined #ruby
<DouweM>
in referring to them, yes
rjhunter has quit [Read error: Connection reset by peer]
<mordof>
kind of like Class::method in php vs $class->method .... if you know php. lol
<DouweM>
the syntax isn't used anythere in the language
<mordof>
oh ok
<DouweM>
it's just File.size or file.size, where file is a var referring to a file instance
_justin has quit [Quit: _justin]
jollyy has quit [Ping timeout: 246 seconds]
jollyy_ is now known as jollyy
* mordof
nods
<tobiasvl>
mordof: no, ruby has :: too (namespace resolution)
rjhunter has joined #ruby
<tobiasvl>
Module::CONSTANT
<tobiasvl>
for example
<DouweM>
File, the class, is just an object as well, of type Class. always use period for method calls
<DouweM>
and yeah, :: is namespace seperator
vlad_starkov has quit [Remote host closed the connection]
einarj_ has quit [Ping timeout: 240 seconds]
<mordof>
tobiasvl: ah, ok.
blackmesa has quit [Read error: Operation timed out]
<mordof>
well - it's the main way to refer to non-instantiated class methods in PHP, so that's why i showed it. but yeah, that makes sense
rjhunter has quit [Read error: Connection reset by peer]
<jhass>
and File::size is used in docs to refer to class methods too. you can actually call methods like that but forget that I just said that
<mordof>
jhass: lol, alright
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<DouweM>
mordof: right, because there's an actual difference in syntax in the language. there isn't in Ruby, it's all .
<mordof>
i'm excited, as well as nervous, to jump into coffeescript with rails
<crome>
coffeescript :(
<DouweM>
I like coffeescript
andrewlio has quit [Remote host closed the connection]
<mordof>
just finishing up college (finally went back, enough though it's mostly pointless) - but the networking has landed me a pretty interesting potential job for the end of this semester
rhunter has joined #ruby
<DouweM>
it's the same language, the only difference is the much sleeker syntax
<mordof>
rails / haml / coffeescript / sass. mongodb. different from what i'm used to
<DouweM>
hehe
<DouweM>
SCSS is nice, CSS + nesting + vars + functions + mixins :)
blackmesa has joined #ruby
gancl has joined #ruby
<mordof>
i've used LeSS a lot - so it's not a whole lot different. won't be much adjustment there
fannye has quit [Remote host closed the connection]
<mordof>
only ever used PHP/MySQL though
<mordof>
wrote a PHP Haml interpreter a bit ago since i liked the way Haml looked
<mordof>
well - heavily modified one that was on github
<crome>
I suggest you read up on mongodb before you start abusing it as a sort-of relational databse :)
<DouweM>
yeah, LESS and SCSS are pretty similar
bw__ is now known as bw_
<mordof>
crome: i will. i've already been told it's not that at all - and it'll take some getting used to
chipotle has quit [Ping timeout: 252 seconds]
rjhunter has quit [Ping timeout: 240 seconds]
<DouweM>
and +1 on crome. The worst decision I ever made at my current job is to use MongoDB for something it's not really fit for
rjhunter has joined #ruby
<mordof>
crome: but to my benefit, they have things mostly set up already. so i can see how it's done previously (the proper way)
nvrch has quit [Quit: nvrch]
camilasan has quit [Remote host closed the connection]
craigp has joined #ruby
camilasan has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
rhunter_ has joined #ruby
rhunter has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
camilasan has joined #ruby
camilasa_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
LiohAu has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
rhunter has joined #ruby
camilasan has joined #ruby
rjhunter_ has joined #ruby
camilasan has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
nateberkopec has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
rjhunter has quit [Ping timeout: 268 seconds]
camilasan has joined #ruby
jollyy has quit [Quit: jollyy]
rjhunter has joined #ruby
camilasa_ has joined #ruby
rhunter_ has quit [Ping timeout: 268 seconds]
camilas__ has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
camilas__ has quit [Read error: Connection reset by peer]
jollyy has joined #ruby
rhunter_ has joined #ruby
camilasa_ has joined #ruby
rhunter has quit [Ping timeout: 268 seconds]
rhunter_ has quit [Read error: Connection reset by peer]
camilasa_ has quit [Read error: Connection reset by peer]
rjhunter_ has quit [Ping timeout: 240 seconds]
camilasa_ has joined #ruby
nateberkopec has quit [Ping timeout: 240 seconds]
danshultz has joined #ruby
<mordof>
tobiasvl: lol, that link is awesome
camilasa_ has quit [Read error: Connection reset by peer]
camilasan has quit [Ping timeout: 240 seconds]
rhunter has joined #ruby
camilasan has joined #ruby
patrick99e99 has quit [Ping timeout: 246 seconds]
camilasan has quit [Read error: Connection reset by peer]
rhunter has quit [Read error: Connection reset by peer]
rjhunter has quit [Ping timeout: 268 seconds]
<mordof>
i've known about how terrible PHP is for a while.. but sometimes time does not permit change. thankfully that's going to be fixed right shortly ^_^ yay migrating away
<mordof>
anyway.. enough about that in a ruby channel
camilasan has joined #ruby
browndawg has joined #ruby
rjhunter has joined #ruby
patrick99e99 has joined #ruby
camilasa_ has joined #ruby
ce_afk is now known as cescalante
camilas__ has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
rhunter has joined #ruby
camilas__ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
northfurr has joined #ruby
dcope has joined #ruby
<dcope>
hey all, is there a way to prepend elements of an array to another? like #concat but for the beggining of the target array
<mordof>
shevy's approach seems a lot more to the point
<DouweM>
it's very useful, but a little hacky here if there's better options
<DouweM>
yup
<mordof>
mhmm
<mordof>
oh i can definitely see how it would be in certain scenarios
<DouweM>
in this case array[0, 0]= looks nicest
einarj has joined #ruby
<mordof>
i want to try and learn things in a way that's more common-sense, as well as keeping speed in mind
camila___ has joined #ruby
<mordof>
i don't like needless overhead even if the computer can handle it (within reason)
Speed has left #ruby ["WeeChat 0.4.3"]
ndrei has quit [Ping timeout: 265 seconds]
camilasan has quit [Ping timeout: 240 seconds]
<mordof>
*shrugs* as long as i learn what things are doing internally, that won't be an issue
dcope has quit [Quit: leaving]
rjhunter has joined #ruby
<crome>
mordof: good attitude
<mordof>
^_^
rjhunter has quit [Read error: Connection reset by peer]
<crome>
and its pretty much the reason for the hate part of my love/hate relationship with rails
ndrei has joined #ruby
<mordof>
oh?
<mordof>
crome: do explain
camilasan has joined #ruby
r0nin has quit [Ping timeout: 252 seconds]
cescalante is now known as ce_afk
<crome>
without going very deeply into it (I could), it makes lots o things look a lot easier than what they really are
camilas__ has quit [Ping timeout: 240 seconds]
<crome>
it will leave beginners without the slightest undestanding of whats going on
<mordof>
oh, that i'm fully aware
<mordof>
ruby -> rails as js -> jquery
camilas__ has joined #ruby
<mordof>
no need to worry about that
<mordof>
(at least for me)
rjhunter has joined #ruby
<DouweM>
not sure that's the right comparison
<shevy>
mordof keeping speed in mind in ruby is kinda weird
<mordof>
DouweM: i just meant for sort of making the complexities invisible
camilasa_ has quit [Ping timeout: 240 seconds]
rjhunter has quit [Read error: Connection reset by peer]
<DouweM>
ah, right
<mordof>
DouweM: and making it so beginners don't really see what's going on
sparrovv has joined #ruby
camilasa_ has joined #ruby
<DouweM>
sure
razibog has quit [Quit: Leaving.]
<mordof>
i can't stand the jquery community because of that
<mordof>
haha, actually
camilasa_ has quit [Read error: Connection reset by peer]
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<mordof>
crome: similar issue - my love hate relationship with jquery. can't stand it because of how it ruins the community
camila___ has quit [Ping timeout: 240 seconds]
jollyy has quit [Quit: jollyy]
camilasa_ has joined #ruby
<mordof>
i *refused* to use jquery until i learned entirely how to do everything myself in plain js that jquery does. after that, i know what's going on internally
rjhunter has joined #ruby
<DouweM>
haha
sski has joined #ruby
<mordof>
shevy: how so?
patrick99e99 has quit [Ping timeout: 264 seconds]
camilasa_ has quit [Read error: Connection reset by peer]
_justin has quit [Quit: _justin]
andrewlio has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
rjhunter has joined #ruby
yubrew has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
<shevy>
mordof because the speed difference is often very negligible for common task scripts
camilasan has quit [Ping timeout: 240 seconds]
rjhunter has quit [Read error: Connection reset by peer]
camilasan has joined #ruby
<mordof>
shevy: indeed. been developing long enough to be able to identify over optimization.
<shevy>
like if perl is 5% faster than ruby
camilasan has quit [Read error: Connection reset by peer]
camilas__ has quit [Ping timeout: 240 seconds]
<mordof>
though, an example where it really made a difference: each vs map in a cellular automata example i made in js / canvas
<mordof>
i was using .map without thinking
<shevy>
I think the scripting languages are in a comparable speed scenario
camilasan has joined #ruby
rjhunter has joined #ruby
<mordof>
14 million iterations per frame later - .map actually limited performance by about 60%
abdulsattar has joined #ruby
_justin has joined #ruby
tkuchiki has quit [Remote host closed the connection]
rjhunter has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
<mordof>
obviously though since it have to create an empty array each time. huge overhead
Xeago has quit [Remote host closed the connection]
rjhunter has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
camilasa_ has quit [Read error: Connection reset by peer]
rjhunter has quit [Read error: Connection reset by peer]
camilasa_ has joined #ruby
petey has joined #ruby
* mordof
shrugs
doodlehaus has joined #ruby
camilas__ has joined #ruby
yubrew has quit [Ping timeout: 246 seconds]
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
camila___ has joined #ruby
<mordof>
DouweM: btw thanks for the explanation on the notation being different just for demonstration. helped me understand reading the ruby docs
<DouweM>
np
rjhunter has joined #ruby
<shevy>
DouweM is a knowledgable man
<DouweM>
lol
camilasan has quit [Ping timeout: 240 seconds]
rjhunter has quit [Read error: Connection reset by peer]
maximski has joined #ruby
rjhunter has joined #ruby
jottr has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
camilasa_ has quit [Ping timeout: 268 seconds]
gaussblurinc has quit [Quit: Leaving.]
petey has quit [Ping timeout: 265 seconds]
rjhunter has joined #ruby
roolo has quit [Quit: Leaving...]
<mordof>
oohh.. ! is byref into a block essentially - if i'm reading this right? arr.map! { |a| a ** 2 } squares each item, and since (the behavior looks this way anyway) it's byref it applies on the initial object
camilas__ has quit [Ping timeout: 268 seconds]
<mordof>
is that accurate?
bradhe has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<DouweM>
! at the end of a method name is convention for indicating a method is "destructive". The definition of descructive varies on a case by case basis, but for enumerables (like arrays), it means the objekct will be changed in-place
<DouweM>
so instead of returning a new mapped array, it will switch out the array itself. so in a sense, that means byref
popl has quit [Ping timeout: 240 seconds]
<mordof>
ok. so it's not quite the same, but the end result can sometimes be similar. good to know
<mordof>
i'll have to read up on that further
rjhunter has joined #ruby
<DouweM>
it's just a convention, it's not a special syntax construct. it's nothing to do with blocks, per se
<mordof>
ok
rjhunter has quit [Read error: Connection reset by peer]
eka has joined #ruby
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<DouweM>
as an other example of what "destructive" can mean: in Rails, you have #save and #save!. When validations fail, so if a required field is omitted, the former will return false, while the latter will raise an error
<DouweM>
in this case, crashing the program is more destructive than simply failing with false
<mordof>
ooh right. *nods*
rjhunter has joined #ruby
<mordof>
thanks for pointing that out :)
bogeyd6 has quit [Ping timeout: 268 seconds]
rjhunter has quit [Read error: Connection reset by peer]
<DouweM>
most of the time, ! methods appear in conjunction with an !-less version, where the only difference is the "severity" of their effect
vlad_starkov has joined #ruby
<DouweM>
in-place is more severe than returning a new instance, raising an error is more severe than returning false
bradhe has quit [Ping timeout: 252 seconds]
ndrei has joined #ruby
rjhunter has joined #ruby
<mordof>
in-place?
<mordof>
not sure what you mean by that
rjhunter has quit [Read error: Connection reset by peer]
<crome>
arr.map! { stuff } is essentially the as arr = arr.map { stuff }
<DouweM>
the #map! example you mentioned
<crome>
same*
<DouweM>
yeah, so arr will be changed in place
<mordof>
oh right
* mordof
nods
<DouweM>
you nod a lot, don't you
<apeiros>
mordof, DouweM: actually, as per matz' own statement, "!" is just there to mark "dangerous methods"
<apeiros>
but having bang and non-bang methods has become a convention
<DouweM>
apeiros: ah, I'd never seen the statement. But yeah, I thouched on that when I called them destructive
craigp has quit []
mercwithamouth has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<mordof>
DouweM: yes - i nod when i'm understanding something and there's not something that fits better to say :)
vlad_starkov has joined #ruby
<apeiros>
e.g., Array#push and #shift are mutating the receiver and don't have a bang.
* DouweM
nods
<mordof>
:p
aagdbl has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
blom_ has joined #ruby
<mordof>
i'm seeing |index| used inside a block for array iteration.. are there pre-defined keywords that get used inside | | to tell what to utilize from the ... what do i call the object outside the block?
<mordof>
the terminology is going to mess me up a bit starting out i think.
phansch has joined #ruby
jollyy has joined #ruby
hamakn has quit [Remote host closed the connection]
JasmeetQA has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
Macaveli has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dblessing has joined #ruby
Trynemjoel has quit [Ping timeout: 245 seconds]
AussieDownUnder has joined #ruby
rahult has joined #ruby
gancl has quit [Ping timeout: 252 seconds]
rjhunter has quit [Ping timeout: 240 seconds]
<apeiros>
mordof: || delimits the arguments which the block receives
nomenkun has quit [Read error: Connection reset by peer]
nomenkun_ has joined #ruby
<apeiros>
mordof: just like () in def foo(arg1, arg2, …) (though, in def, the () are optional)
<mordof>
ok
<apeiros>
mordof: a block is just an anonymous function with a special syntax, since it's a very common case
j416 has joined #ruby
ndrei has quit [Ping timeout: 268 seconds]
<apeiros>
(it's additionally also a closure, but quite often that's not relevant)
<mordof>
i gathered as much, good to have that confirmed. what i'm wondering is - when i see |index| vs |n| <-- are those keywords specific to ruby? or is index the only pre-known one?
<apeiros>
as said, it's just arguments
<apeiros>
you can name your argument however you want
<mordof>
right, but that's confusing then.. because in the examples |index| and |n| are utilizing different data points in an array. one is the index for each item, the other is the value
<krz>
i have a hash {'foo_1' => 'a', 'foo_2' => 'b', 'foo_3' => '', 'foo_4' => 'c' } how can i "merge the results" so it ens up as {'foo_1' => 'a', 'foo_2' => 'b', 'foo_3' => 'c' }
<apeiros>
there's a couple of conventions - where in C you'd often name your var `i`, ruby people often write it out and call it `index`
<krz>
whats the best way to go about this?
blom_ has quit [Ping timeout: 268 seconds]
<krz>
ens=ends
sparrovv has quit [Remote host closed the connection]
<apeiros>
krz: merge it with what?
Maitiu has quit [Ping timeout: 240 seconds]
<krz>
also, the hash can go up to foo_10
rjhunter has joined #ruby
<krz>
apeiros: i just want the results "compacted"
<mordof>
>> arr[0, 1, 2]
<eval-in>
mordof => undefined local variable or method `arr' for main:Object (NameError) ... (https://eval.in/125635)
rjhunter has quit [Read error: Connection reset by peer]
<apeiros>
krz: I can't deduct your logic from your example
Maitiu has joined #ruby
<apeiros>
krz: it seems to me that your keys don't matter?
<mordof>
awe - eval-in doesn't respond to messages
Trynemjoel has joined #ruby
rahult has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<krz>
apeiros: yea keys matter for keys starting with foo_
<krz>
the rest i want to scrap out of the hash
rjhunter has quit [Read error: Connection reset by peer]
<apeiros>
krz: and why did foo_3 go from '' to 'c' in your first example?
<krz>
at the same time "compact" all the foo_*'s
<krz>
apeiros: forget my fist example
rjhunter has joined #ruby
TripTastic has left #ruby [#ruby]
<apeiros>
yeah, I'm sorry, you'll have to give a better explanation than "compact"
<krz>
this is the new hash {'foo_1' => 'a', 'foo' => 'irrelvant value here too' 'foo_2' => 'b', 'foo_3' => '', 'foo_4' => 'c', 'foo_5' => 'd', 'zzz' => 'irrelevant' }
<krz>
:)
<apeiros>
you can get the relevant keys by using Hash#keys + grep
rjhunter has quit [Read error: Connection reset by peer]
<apeiros>
also, please show what you've done so far
<krz>
{'foo_1' => 'a', 'foo' => 'irrelvant value here too' 'foo_2' => 'b', 'foo_3' => '', 'foo_4' => 'c', 'foo_5' => 'd', 'zzz' => 'irrelevant' } should become {'foo_1' => 'a','foo_2' => 'b', 'foo_3' => 'c', 'foo_4' => 'd' }
rahult has quit [Client Quit]
<apeiros>
not keen on writing your code for you, especially when the explanation is still rather foggy.
<apeiros>
yes, *why* does it become that?
<krz>
apeiros: because i need it to become that
<apeiros>
oh dude
<apeiros>
good luck finding help.
<mordof>
krz: share some logic
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<mordof>
krz: essentially what the perdicament is: you've run into an issue. you think your solution is the way to solve it, so you ask about your potential implementation. where as if you ask about the original aspect you're trying to tackle - there's oftne a better way
<mordof>
either way, we need the logic behind why you're trying to do this
<apeiros>
so if you get an empty array, then your example is probably not accurate.
<krz>
h.select { |k,v| k =~ /^content/ && v.present? }
<krz>
that works!
ndrei has joined #ruby
r0nin has quit [Ping timeout: 246 seconds]
cescalante is now known as ce_afk
<jhass>
krz: oh you got activesupport?
<apeiros>
yeah, without the remapping, that's the nicer solution than Hash[] + values_at
roolo has quit [Quit: Leaving...]
gancl has joined #ruby
<krz>
jhass: yea sorry i forgot the mention that
dx7_ has quit [Remote host closed the connection]
yubrew has quit [Ping timeout: 268 seconds]
larissa has quit [Quit: Leaving]
shredding has quit [Read error: Connection reset by peer]
Guest37167 has quit [Ping timeout: 240 seconds]
<mordof>
is that what .present? is from?
bluenemo has joined #ruby
stonevil has quit [Ping timeout: 246 seconds]
<toretore>
yes
<mordof>
i don't think i like that.. .present? - technically '' is present, it's just an empty string though.
shredding has joined #ruby
dp902191 has joined #ruby
poikon has quit [Remote host closed the connection]
dp902191 has quit [Max SendQ exceeded]
bradhe has joined #ruby
<apeiros>
mordof: present? is the opposite of blank?
dp902191 has joined #ruby
<apeiros>
and blank? is true for empty values (empty string, empty array)
dp902191 has quit [Max SendQ exceeded]
<apeiros>
and empty string is even as loose as "any string which has no chars or only whitespace"
gaussblurinc has joined #ruby
diegoviola has joined #ruby
<apeiros>
i.e., " ".blank? # => true
LastWhisper has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
yeah, String#blank? is self.strip.empty? I think
kitak has quit [Remote host closed the connection]
senayar_ has joined #ruby
<mordof>
fair enough
<apeiros>
oh, not a regex?
stonevil has joined #ruby
<jhass>
semantically
thesheff17 has quit [Ping timeout: 240 seconds]
<jhass>
let's take a look
lintguy has joined #ruby
<LastWhisper>
if I have a conditional statement, of essentially if, elsif, else
<jhass>
self !~ /[^[:space:]]/
<apeiros>
self !~ /[^[:space:]]/
<apeiros>
heh
<LastWhisper>
should i use a case statement?
<apeiros>
LastWhisper: um, no?
<LastWhisper>
ok, so if, elsif, else is valid then?
bas has quit [Ping timeout: 240 seconds]
<apeiros>
why would it not be?
<mordof>
of course...
<LastWhisper>
just making sure, i didnt know if one was faster than the other or what
<apeiros>
or rather - why do you consider case/when instead of your if/elsif?
<jhass>
LastWhisper: not generally, no. If you have some repetition in the conditionals it _might_ help
<lintguy>
I'm getting this error when trying to install any gem: clang: error: unknown argument: '-multiply_definedsuppress'
<LastWhisper>
okay. just trying to conform to best practices:)
<certainty>
case uses === under the covers so it might be different
<lintguy>
What gives?
<apeiros>
case/when in ruby is not optimized like e.g. in C
<LastWhisper>
ah i see.
terrellt has joined #ruby
rjhunter has joined #ruby
<mordof>
LastWhisper: the only time you'd use a case/when is if you're doing like if(single check) else if (another single check) else if (another single check) etc... excuse the lack of proper syntax / keywords. that's essentially where that comes in to change it
<jhass>
lintguy: most easy thing you can do is to temporarily set your CC to gcc
<mordof>
LastWhisper: and all checks were on the same variable
rjhunter has quit [Read error: Connection reset by peer]
thesheff17 has joined #ruby
bas has joined #ruby
poikon_ has joined #ruby
<lintguy>
jhass: Is it a xcode issue?
senayar has quit [Ping timeout: 264 seconds]
<jhass>
lintguy: sorry, you didn't call apple tech support here
RealMarc has joined #ruby
bradhe has quit [Ping timeout: 252 seconds]
<lintguy>
that was really uncalled for
krnflake has joined #ruby
rjhunter has joined #ruby
<LastWhisper>
mordof: all of these checks do happen to be on the same variable
<jhass>
lintguy: I've no idea, I'm happy to not have to use OS X
<LastWhisper>
basically I want to accommodate 3 different scenarios
rjhunter has quit [Read error: Connection reset by peer]
<LastWhisper>
when a variable includes the word frame, when it is not nil, and when it is nil
zerun0_ has quit [Ping timeout: 245 seconds]
krnflake has left #ruby [#ruby]
<mordof>
i think that's still better suited to if/elsif/else
<LastWhisper>
okay
<lintguy>
jhass: I'm running it in a VM, so it's not something i consider using
<LastWhisper>
thx guys
Doc_X has quit []
rjhunter has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
mark_locklear has joined #ruby
yfeldblum has joined #ruby
arcanez has left #ruby [#ruby]
vincentlyons has joined #ruby
ahmdrefat has joined #ruby
<certainty>
it's generally not encouraged for good reasons, but i'd probably try to use early exits in the spirit of return do_nil_case if var.nil? etc.
rjhunter has joined #ruby
<vincentlyons>
Hi all, I'm new to ruby and trying to complete a project in rails using the cancan permissions gem
arubin has joined #ruby
<apeiros>
vincentlyons: #rubyonrails might be better suited
<vincentlyons>
thanks apeiros
terrellt has quit [Ping timeout: 252 seconds]
alex88 has joined #ruby
<certainty>
is one suited if he/she weares a suit?
rhunter has joined #ruby
<apeiros>
jhass: re cross-posting - if you feel like it, you can write a bot which keeps track of people who already cross-posted and warns at first offense and kicks as of second offense
<apeiros>
certainty: yes
anarang has quit [Quit: Leaving]
segmond has joined #ruby
lintguy has left #ruby [#ruby]
anarang has joined #ruby
roolo has joined #ruby
browndawg has quit [Ping timeout: 268 seconds]
<certainty>
apeiros: alright, so over in #rubyonrails they wear better suits?
yfeldblum has quit [Ping timeout: 268 seconds]
<apeiros>
certainty: that conclusion is logically not correct. it may still apply, though.
rjhunter has quit [Ping timeout: 240 seconds]
Doc_X has joined #ruby
<certainty>
jhass: bonus points for a random kick message ala: "don't cross-post, punk!"
rjhunter has joined #ruby
Frank13760 has joined #ruby
<jhass>
hm
<jhass>
I fear the corner cases in detecting that
<jhass>
:P
rjhunter has quit [Read error: Connection reset by peer]
<certainty>
apeiros: alright
rhunter has quit [Ping timeout: 240 seconds]
<mordof>
are corner cases different from edge cases?
<apeiros>
jhass: detection can be simple - either exact duplicate or via op input
anarang has quit [Client Quit]
rjhunter has joined #ruby
pabloh has quit [Remote host closed the connection]
<benzrf>
i think edge case usually refers to the thing you use with recursion
<benzrf>
while corner case means something that could come up but you might not think of
<apeiros>
mordof: corner cases are round, edge cases are edged :)
rjhunter has quit [Read error: Connection reset by peer]
sparrovv has joined #ruby
<benzrf>
apeiros: absurd
<apeiros>
(IMO same thing, probably a translation error)
<jhass>
apeiros: hmm, aggregating multiple messages of the same user over a time period first?
<mordof>
yeah i'm with apeiros on this ojne
alekst has joined #ruby
ikawnoclast has joined #ruby
_tpavel has quit [Quit: Leaving]
<jhass>
and yeah, I think I use corner and edge case synonym
rjhunter has joined #ruby
alex88 has quit [Quit: Leaving...]
<apeiros>
jhass: fifo with limit on time and number of messages
<mordof>
corner cases hurt more *nods*
<apeiros>
+ set for detection
rjhunter has quit [Read error: Connection reset by peer]
<apeiros>
if you get cornered by your case, things get ugly
<mordof>
lol, i'm going to find a way to make that come up in a company meeting on a serious matter one day
blom_ has joined #ruby
<benzrf>
so im calling my smalltalky widget 'quick'
dp902191 has joined #ruby
<mordof>
talk about corner cases and edge cases in the same presentation intentionally
dp902191 has quit [Max SendQ exceeded]
<benzrf>
because quick has an archaic meaning of 'alive', and the idea is that you're coding in a 'living' environtment
<benzrf>
:v
<benzrf>
*environment
rjhunter has joined #ruby
<benzrf>
>inb4 one of you dicks grabs that gem name
<apeiros>
ah, lol, smalltalk*y*
rjhunter has quit [Read error: Connection reset by peer]
<apeiros>
and missed the *y* and wondered why you'd make it a gem…
yacks has quit [Quit: Leaving]
<benzrf>
i found a process-freezing tool that actually works !
<apeiros>
ctrl-Z?
<benzrf>
no, to file i mean
dp902191 has joined #ruby
<benzrf>
dmtcp
<apeiros>
oh
<apeiros>
so you do a RAM dump of some kind?
<benzrf>
now im writing a gem that will run inside it that creates a fuse env and adds some tools for opening pry sesssions onto ItSANgo
nvrch has joined #ruby
<benzrf>
*it
<benzrf>
and stuff
vpretzel has joined #ruby
<benzrf>
i will also include a script with it for launching an instance in dmtcp
<benzrf>
and freezing/loading
dp902191 has quit [Max SendQ exceeded]
<apeiros>
curious as to how it reconstructs IOs
ndrei has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
<benzrf>
well id have it shut down all IO stuff before freezing
<apeiros>
aha!
<certainty>
hmm, is it really worth the hassle? I have rarely been in a situation where i needed that. In scheme we have something similar called transripts, but few actual implementations provide it. I never missed it their either
<benzrf>
so you'll be able to do something like 'quick load some_project; cd some_project/Controllers/SomeModule/; quick pry;'
<benzrf>
and you get a pry inside Controllers::SomeModule
<certainty>
there
<certainty>
benzrf: where do you use it?
<benzrf>
hmm?
dp902191 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<certainty>
the smalltalky thing
<benzrf>
what do u mean
dp902191 has quit [Max SendQ exceeded]
<certainty>
quick :)
shaileshg has joined #ruby
<benzrf>
no, i mean what are you asking
<benzrf>
'where do you use it?' in what sense
<mordof>
when do you utilize it
<certainty>
benzrf: yeah
<benzrf>
ah
mary5030 has joined #ruby
teddyp1cker has joined #ruby
<mordof>
benzrf: what scenarios are you solving by making this
<benzrf>
well ideally you'd use it for any kind of dev
<benzrf>
and it would save the code for definitions, which is later exportable
dp902191 has joined #ruby
ndrei has joined #ruby
<mordof>
what problem does it solve?
<benzrf>
not having a running process while coding
<benzrf>
but i g2g
dp902191 has quit [Max SendQ exceeded]
<benzrf>
bbiab
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rjhunter has joined #ruby
terrellt has joined #ruby
<certainty>
i don't get the part about the running process
<mordof>
same
benzrf is now known as benzrf|offline
rjhunter has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
<certainty>
it's probably too brainy for me
<j416>
o/ a normal project structure would be like: <root>/lib/my_program.rb (loader), <root>/lib/my_program/*.rb (bunch of files), right. Is it common to have sub-structures like: <root>/lib/my_program/my_module/lib/my_module.rb (loader), <root>/lib/my_program/my_module/lib/*.rb (bunch of files) ?
<certainty>
a lot of things are
dp902191 has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
banister has joined #ruby
tomstuder has joined #ruby
blom_ has quit [Ping timeout: 268 seconds]
<apeiros>
j416: having another lib within your lib is uncommon
rjhunter has joined #ruby
vincentlyons has quit [Quit: vincentlyons]
<apeiros>
j416: but having a deeply nested lib itself isn't uncommon
rjhunter has quit [Read error: Connection reset by peer]
teddyp1cker has quit [Ping timeout: 265 seconds]
rjhunter has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
rvraghav93_ has quit [Quit: No Ping reply in 180 seconds.]
hamakn has joined #ruby
r0nin has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
hamakn_ has joined #ruby
rvraghav93 has joined #ruby
jonno11 has joined #ruby
rjhunter has joined #ruby
CreativeEmbassy has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rjhunter has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
_justin has quit [Quit: _justin]
rjhunter has quit [Read error: Connection reset by peer]
hamakn has quit [Ping timeout: 268 seconds]
kennym has joined #ruby
senayar_ has quit [Remote host closed the connection]
rjhunter has joined #ruby
RealMarc has quit [Remote host closed the connection]
rjhunter has quit [Read error: Connection reset by peer]
RealMarc has joined #ruby
patteh_ has quit [Quit: leaving]
Patteh has joined #ruby
chris_thomson has joined #ruby
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
RoxasShadowRS has joined #ruby
ndrei has joined #ruby
<j416>
apeiros: the use case is, this is a separate sinatra app to expose some parts of our backend lib; so in a way it's a separate thing that nothing will depend on (rather, it will depend on the backend already there), so I was thinking perhaps treat it as something like a separate 'gem', adding it to $LOAD_PATH, so that I can access it like require 'my_program/my_module' or so
RealMarc has quit [Client Quit]
enebo has joined #ruby
Guest13108 is now known as lessless
benzrf|offline is now known as benzrf
browndawg has joined #ruby
<apeiros>
j416: make it a separate gem
<jhass>
j416: and giving it it's own toplevel module would make no sense? so that you'd end up with lib/{yourmainlib.rb,yourmainlib/,yourapp.rb,yourapp/}
<benzrf>
certainty: it's like smalltalk
<benzrf>
certainty: in smalltalk, you have a running smalltalk vm at all times
freezey has joined #ruby
makara has joined #ruby
<benzrf>
the program running in the vm acts as an IDE which allows you to alter itself
<benzrf>
im trying to make something vaguely equivalent for ruby but more unixy and less walled into its own ecosystem
<benzrf>
anyway g2g again :I
Notte has joined #ruby
mary5030 has quit [Ping timeout: 246 seconds]
sailias has joined #ruby
benzrf is now known as benzrf|offline
<j416>
jhass: I suppose that would make sense, too. Maybe that's the easiest way afterall.
doodlehaus has joined #ruby
jollyy has quit [Quit: jollyy]
<j416>
apeiros: but the gem would be dependent upon the existing lib, which is not a gem, so that would perhaps be complicated
<apeiros>
a) what stops you from making the existing lib a gem? b) even if not - no, why would it get complicated?
rhunter has joined #ruby
ce_afk is now known as cescalante
yubrew has joined #ruby
rhunter has quit [Read error: Connection reset by peer]
_tpavel has joined #ruby
<j416>
apeiros: it's just not structured that way currently and it would require quite some refactoring (it's our main repo), and there's simply no time for that right now :/
rhunter has joined #ruby
benzrf|offline is now known as benzrf
benzrf is now known as benzrf|class
renzhi has quit [Read error: Connection timed out]
<j416>
apeiros: b) because the my_module gem would be dependent on the project itself -- it doesn't make much sense to have a gem that is dependent on a non-gem, right?
<apeiros>
j416: so your question really is "can we do this probably not ok-ish thing anyway because we won't have the time to implement it properly?" ?
rhunter has quit [Read error: Connection reset by peer]
incade has quit [Ping timeout: 240 seconds]
<j416>
apeiros: something along those lines I suppose; I just want to add this thing in the best way
<apeiros>
j416: modularizing makes sense when you share stuff. when you share stuff it doesn't matter what you depend on.
blueOxigen has joined #ruby
<j416>
I think I pretty much answered my own question when I said the main repo isn't a gem
<apeiros>
j416: we have a couple of rails app depending on gems which expect things from the hosting app
incade has joined #ruby
thesheff17 has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 252 seconds]
<apeiros>
and the apps themselves aren't gems.
<j416>
apeiros: oh.. interesting
hermanmunster has joined #ruby
lyanchih__ has joined #ruby
yorg has joined #ruby
<yorg>
http://www.marketglory.com/strategygame/galahad1st for all you online gamers out there, if you didn't already, use this link to register on MerkatGlory a free2play financial strategy game where virtual currency can be converted into real money. It starts out slow but in time you can turn a good profit
<j416>
when you say 'expect', do you mean you are hard-requiring like require '../../blergh' ?
yorg has left #ruby [#ruby]
<apeiros>
it does make things more complicated and it should be avoided. but it's not nonsensical.
catphish has joined #ruby
<j416>
ah, no you aren't, you're assuming it's there
<j416>
ok
<catphish>
does anyone know if rubyzip can stream to a non-seekable io?
rjhunter has joined #ruby
<apeiros>
j416: a require would be within reach. in our case it even expects it to be loaded.
yubrew has quit [Ping timeout: 240 seconds]
rjhunter has quit [Read error: Connection reset by peer]
<j416>
right
rjhunter has joined #ruby
Xiti has joined #ruby
<j416>
thanks for the help
<j416>
:)
rjhunter has quit [Read error: Connection reset by peer]
cover has joined #ruby
tonni has quit [Remote host closed the connection]
jaywastaken has joined #ruby
senayar has joined #ruby
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaywastaken has quit [Changing host]
shaunbaker has joined #ruby
jaywastaken has joined #ruby
dumdedum has quit [Quit: foo]
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
browndawg has left #ruby [#ruby]
chris_thomson has quit [Quit: Zzz...]
sparrovv has quit [Remote host closed the connection]
fannye has joined #ruby
rjhunter has joined #ruby
browndawg has joined #ruby
weems has quit [Read error: Connection reset by peer]
<benzrf|class>
certainty: basically, if quick works out the way i want it to, it'll be kinda like doing all of your programming in a REPL
weems has joined #ruby
weems has quit [Changing host]
weems has joined #ruby
<benzrf|class>
only actually somewhat practical
Mon_Ouie has quit [Ping timeout: 246 seconds]
Vovko has joined #ruby
bradhe has joined #ruby
cescalante is now known as ce_afk
rhunter has joined #ruby
<benzrf|class>
it'll expose a FUSE fs representing the constant hierarchy, with files representing methods
<benzrf|class>
as well as supporting the ability to open a remote pry in any section of it
<benzrf|class>
[ideally]
<benzrf|class>
threading might end up being an issue :I
CreativeEmbassy has quit [Quit: FO SHO]
rhunter_ has joined #ruby
wjlafrance has joined #ruby
Deejay_ has joined #ruby
binaryplease has joined #ruby
wjlafrance has quit [Remote host closed the connection]
<benzrf|class>
the final goal would be to have it log the code for all of the methods and constants you add, and let you export it to a regular ruby file when you're done
rjhunter_ has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
tesuji has joined #ruby
wjlafrance has joined #ruby
rjhunter_ has quit [Read error: Connection reset by peer]
wjlafrance has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 246 seconds]
ce_afk is now known as cescalante
wjlafrance has joined #ruby
wjlafrance has quit [Client Quit]
petey has joined #ruby
inkblots has quit [Ping timeout: 252 seconds]
sambao21 has joined #ruby
RealMarc has joined #ruby
rjhunter has joined #ruby
<benzrf|class>
so you'd be able to do something likemike
<benzrf|class>
*like
<benzrf|class>
cd SomeModule/SomeClass
rhunter has quit [Ping timeout: 268 seconds]
lukec has joined #ruby
<benzrf|class>
vim a_method
afreidah has joined #ruby
<benzrf|class>
[edit code]
rjhunter has quit [Read error: Connection reset by peer]
<benzrf|class>
in another window, quick pry
<benzrf|class>
[try out the method]
<benzrf|class>
presumably it'd have facilities for quick eval of expressions also, for hooking into ur editor
thesheff17 has joined #ruby
<benzrf|class>
the whole thing would ideally be totally programmable anyway, like smalltalk images
rjhunter has joined #ruby
meatherly has joined #ruby
rhunter_ has quit [Ping timeout: 268 seconds]
rjhunter has quit [Read error: Connection reset by peer]
thesheff17 has quit [Read error: Connection reset by peer]
dp902191 has quit [Quit: Leaving.]
snath has quit [Ping timeout: 240 seconds]
Deejay_ has quit [Quit: Computer has gone to sleep.]
<certainty>
benzrf|class: i see. funky. I have never used smalltalk so forgive my ignorance
<benzrf|class>
=)
Lightstalker has joined #ruby
<benzrf|class>
i might even add something for automatically launching a new terminal with a pry in it
<benzrf|class>
so you could likemike
<benzrf|class>
*like
RaCx has joined #ruby
chipotle has joined #ruby
<benzrf|class>
add a keybind to vim for sending the current line into 'quick eval'
<benzrf|class>
type 'SomeClass.new'
<benzrf|class>
press ^P
<benzrf|class>
boom, new term window inside your SomeClass instance
zachallett has joined #ruby
xcv has quit [Remote host closed the connection]
<benzrf|class>
all of the things ive mentioned are things smalltalk has had since the 90s ofc
<certainty>
benzrf|class: have you considered 9p? might be nice as well for these kinds of things
pabloh has joined #ruby
<benzrf|class>
9p?
<certainty>
the filesystem protocol of plan9
<benzrf|class>
looking o=
thesheff17 has joined #ruby
rhunter_ has joined #ruby
fgo has quit [Remote host closed the connection]
rjhunter has joined #ruby
sk87 has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
dik_dak has joined #ruby
tonni has joined #ruby
yfeldblum has joined #ruby
rjhunter has joined #ruby
cescalante is now known as ce_afk
lyanchih__ has quit [Quit: lyanchih__]
rjhunter has quit [Read error: Connection reset by peer]
Kar- has joined #ruby
benzrf|class is now known as benzrf|offline
lyanchih__ has joined #ruby
dp90219 has joined #ruby
rhunter_ has quit [Ping timeout: 240 seconds]
codabrink has joined #ruby
rjhunter has joined #ruby
jobewan has joined #ruby
DouweM has quit [Quit: Leaving...]
yacks has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 252 seconds]
davedev24 has joined #ruby
<catphish>
looks like someone wrote a super hacky way to stream a zipfile :)
<jhass>
or if you have a delimiter in your data you can pass that to #each
crystal77 has joined #ruby
MatthewsFace has quit [Quit: This computer has gone to sleep]
<catphish>
tobiasvl: sorry, what i actually want is #read(1024*1024), but i need it to be emumerable
tonni has joined #ruby
dgaffney has joined #ruby
<catphish>
so i guess i need to make an enum wrapper to call read
jollyy has quit [Ping timeout: 264 seconds]
<catphish>
but someone has almost certainly done this for me, so i'll hit google
<jhass>
hm, kinda hacky, but .each("doesn't occur in your data", 1024**2) might work
RaCx has joined #ruby
saarinen has quit [Quit: saarinen]
mike_k has joined #ruby
<catphish>
jhass: thinking about it, rack is just going to call "each()" so i need a wrapper anyway
<catphish>
thanks though!
paulfm has quit []
tesuji has joined #ruby
tesuji has quit [Excess Flood]
rjhunter has joined #ruby
acrussell has joined #ruby
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
gancl has quit [Quit: No Ping reply in 180 seconds.]
<jhass>
well, yeah, def each; return to_enum(:each) unless block_given?; yield @io.read(@bytes) until @io.eof?; end; I guess
evenix has joined #ruby
gancl has joined #ruby
SCommette has quit [Quit: SCommette]
jollyy has joined #ruby
paulfm has joined #ruby
meatherly has quit [Read error: No route to host]
aspires has joined #ruby
meatherl_ has joined #ruby
sk87 has joined #ruby
mike_k has quit [Remote host closed the connection]
_JamieD_ has joined #ruby
paulfm has quit [Client Quit]
xcv has joined #ruby
RaCx has quit [Ping timeout: 265 seconds]
evenix has quit [Remote host closed the connection]
danno1 has joined #ruby
_JamieD_ has quit [Client Quit]
stonevil has joined #ruby
mansi has quit [Remote host closed the connection]
paulfm has joined #ruby
rjhunter has quit [Ping timeout: 265 seconds]
jrhorn424 is now known as zz_jrhorn424
mansi has joined #ruby
lethjakm1 has joined #ruby
zz_jrhorn424 is now known as jrhorn424
r0nin has quit [Remote host closed the connection]
sski has quit [Remote host closed the connection]
paulfm has quit [Client Quit]
mansi_ has joined #ruby
cescalante is now known as ce_afk
ce_afk is now known as cescalante
RaCx has joined #ruby
stonevil has quit [Client Quit]
SCommette has joined #ruby
shaileshg has quit [Quit: Connection closed for inactivity]
stonevil has joined #ruby
hoelzro_ is now known as hoelzro
klaut has quit [Remote host closed the connection]
rvraghav93 has joined #ruby
paulfm has joined #ruby
Macaveli has quit [Ping timeout: 252 seconds]
rvraghav93_ has quit [Ping timeout: 264 seconds]
tonni has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 268 seconds]
MattStratton has joined #ruby
mike_k has joined #ruby
lxsameer has quit [Quit: Leaving]
JasmeetQA has joined #ruby
soahccc has quit [Excess Flood]
mike_k has quit [Remote host closed the connection]
freezey has quit [Remote host closed the connection]
JasmeetQA1 has quit [Ping timeout: 252 seconds]
krz has quit [Ping timeout: 268 seconds]
mike_k has joined #ruby
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
mike_k has quit [Remote host closed the connection]
sski has joined #ruby
cescalante is now known as ce_afk
shaunbaker has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
shaunbaker has joined #ruby
echevemaster has joined #ruby
sdouglas has quit [Remote host closed the connection]
mike_k has joined #ruby
bu5hm4n has joined #ruby
fgo has joined #ruby
<bu5hm4n>
hey ho
himsin has joined #ruby
himsin has quit [Client Quit]
sdouglas has joined #ruby
danshult_ has joined #ruby
JasmeetQA has quit [Ping timeout: 240 seconds]
<bu5hm4n>
I get this message when I have installed active support ... any idea undefined method `eager_load_namespaces' for #<Rails::Railtie::Configuration:0x00000001c26130> ?
danshultz has quit [Read error: Connection reset by peer]
tylersmith has quit [Remote host closed the connection]
tomstuder has quit [Ping timeout: 246 seconds]
<jhass>
#rubyonrails might have more experience with activesupport
dzhulk has joined #ruby
tylersmith has joined #ruby
<bu5hm4n>
jhass: okay thx ! :)
Frank13760 has left #ruby [#ruby]
monkegjinni has joined #ruby
devdazed has joined #ruby
freezey has joined #ruby
bradhe has joined #ruby
rjhunter has quit [Ping timeout: 265 seconds]
Deejay_ has joined #ruby
petey has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
relix has quit [Ping timeout: 268 seconds]
fgo has quit [Ping timeout: 265 seconds]
maletor has joined #ruby
dangerousdave has quit [Quit: Leaving...]
SonicX has joined #ruby
tylersmith has quit [Ping timeout: 252 seconds]
naw has joined #ruby
fieldfirst has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 265 seconds]
failshell has joined #ruby
patrick99e99 has joined #ruby
maletor has quit [Client Quit]
dp902191 has joined #ruby
funktor has joined #ruby
dp902191 has quit [Max SendQ exceeded]
mercwithamouth has quit [Ping timeout: 246 seconds]
jjbohn has quit [Quit: Leaving...]
dp902191 has joined #ruby
jrhorn424 is now known as zz_jrhorn424
dp902191 has quit [Max SendQ exceeded]
bu5hm4n has left #ruby ["WeeChat 0.4.3"]
jjbohn has joined #ruby
dp902191 has joined #ruby
vlad_starkov has joined #ruby
ce_afk is now known as cescalante
rjhunter has joined #ruby
dp902191 has quit [Max SendQ exceeded]
lavaman has joined #ruby
jollyy has quit [Quit: jollyy]
renzhi has joined #ruby
oneawayman has joined #ruby
jollyy has joined #ruby
tagrudev has quit [Quit: Me = Awesome]
RaCx has joined #ruby
cgore has joined #ruby
renzhi has quit [Max SendQ exceeded]
craigp has joined #ruby
Leehro2 has joined #ruby
rjhunter has quit [Ping timeout: 246 seconds]
monkegjinni has quit [Remote host closed the connection]
wgosling has joined #ruby
wgosling has quit [Client Quit]
mike_k has quit []
Leehro2 is now known as Leehro
paulfm has quit []
mengu has quit []
Deejay_ has quit [Quit: Computer has gone to sleep.]
sski has quit [Remote host closed the connection]
sski has joined #ruby
meatherl_ has quit [Remote host closed the connection]
DaniG2k has joined #ruby
meatherly has joined #ruby
paulfm has joined #ruby
monkegjinni has joined #ruby
rjhunter has joined #ruby
evenix has joined #ruby
monkegjinni has quit [Remote host closed the connection]
petey has quit [Read error: Connection reset by peer]
petey has joined #ruby
funktor has quit [Remote host closed the connection]
funktor has joined #ruby
sski has quit [Ping timeout: 240 seconds]
mordocai has joined #ruby
dzhulk has quit [Quit: Leaving.]
rvraghav93 has quit [Ping timeout: 264 seconds]
meatherly has quit [Ping timeout: 265 seconds]
Voodoofish430 has joined #ruby
havenwood has quit [Remote host closed the connection]
meatherly has joined #ruby
CorySimmons has joined #ruby
dzhulk has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
rjhunter has joined #ruby
pedda has joined #ruby
_tpavel has quit [Quit: Leaving]
arietis has quit [Quit: Computer has gone to sleep.]
Ebsy|Away is now known as Ebsy
funktor has quit [Ping timeout: 264 seconds]
jjbohn has quit [Quit: Leaving...]
nomenkun_ has quit [Remote host closed the connection]
chipotle has joined #ruby
chipotle has quit [Max SendQ exceeded]
maletor has joined #ruby
nomenkun has joined #ruby
funktor has joined #ruby
havenwood has quit [Ping timeout: 246 seconds]
rhunter has joined #ruby
chipotle has joined #ruby
bynaryshef has quit [Remote host closed the connection]
rjhunter has quit [Ping timeout: 268 seconds]
terrellt_ has joined #ruby
Bumptious has quit [Remote host closed the connection]
rvraghav93 has joined #ruby
Bumptious has joined #ruby
dp902191 has joined #ruby
terrellt has quit [Ping timeout: 264 seconds]
dp902191 has quit [Max SendQ exceeded]
havenwood has joined #ruby
echevemaster has quit [Remote host closed the connection]
yasushi has quit [Remote host closed the connection]
lethjakm1 has quit [Ping timeout: 252 seconds]
dp902191 has joined #ruby
nomenkun has quit [Ping timeout: 246 seconds]
dp902191 has quit [Max SendQ exceeded]
dp902191 has joined #ruby
rhunter has quit [Ping timeout: 265 seconds]
dp902191 has quit [Max SendQ exceeded]
jonfer has joined #ruby
skammer has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dp902191 has joined #ruby
CorySimmons has quit [Quit: Bye!]
werdnativ has joined #ruby
dangerousdave has joined #ruby
dp902191 has quit [Max SendQ exceeded]
mikepack_ has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
maroloccio has quit [Quit: WeeChat 0.4.3]
echevemaster has joined #ruby
dp902191 has joined #ruby
dp902191 has quit [Max SendQ exceeded]
CreativeEmbassy has quit [Quit: FO SHO]
RaCx has quit [Quit: Computer has gone to sleep.]
flowerhack has joined #ruby
bynaryshef has joined #ruby
yfeldblum has joined #ruby
jgabrielygalan has joined #ruby
dp902191 has joined #ruby
dp902191 has quit [Max SendQ exceeded]
terrellt_ has quit [Ping timeout: 264 seconds]
Leehro has quit [Quit: zzz]
jeregrine has joined #ruby
mikepack_ has quit [Ping timeout: 246 seconds]
dp902191 has joined #ruby
dp902191 has quit [Max SendQ exceeded]
mmoretti has joined #ruby
dp902191 has joined #ruby
Sc0rp10n has joined #ruby
dp902191 has quit [Max SendQ exceeded]
rjhunter has joined #ruby
baroquebobcat has joined #ruby
patrick99e99 has quit [Ping timeout: 252 seconds]
Sc0rp10n has quit [Client Quit]
yfeldblum has quit [Ping timeout: 252 seconds]
patrick99e99 has joined #ruby
dp902191 has joined #ruby
jespada has quit [Quit: Leaving]
dp902191 has quit [Max SendQ exceeded]
pu22l3r_ has joined #ruby
dp902191 has joined #ruby
dp902191 has quit [Max SendQ exceeded]
arietis has joined #ruby
benmoss has joined #ruby
robmozart__ has left #ruby [#ruby]
rjhunter has quit [Ping timeout: 252 seconds]
bluenemo has quit [Quit: Verlassend]
dp902191 has joined #ruby
dzhulk1 has joined #ruby
mark_locklear has quit [Ping timeout: 240 seconds]
relix has joined #ruby
Krajsnick has joined #ruby
spicerack has joined #ruby
SonicX has quit [Remote host closed the connection]
bluenemo has joined #ruby
dzhulk has quit [Ping timeout: 265 seconds]
IceDragon has quit [Ping timeout: 246 seconds]
pu22l3r has quit [Ping timeout: 268 seconds]
patrick99e99 has quit [Ping timeout: 246 seconds]
Fire-Dragon-DoL has joined #ruby
shaunbaker has quit [Remote host closed the connection]
patrick99e99 has joined #ruby
dp902191 has quit [Remote host closed the connection]
klaut has joined #ruby
IceDragon has joined #ruby
Spami has joined #ruby
aganov has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 268 seconds]
rjhunter has joined #ruby
sambao21_ has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
sambao21 has quit [Ping timeout: 240 seconds]
sambao21_ is now known as sambao21
fieldfirst has joined #ruby
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
bradhe has joined #ruby
bradhe has quit [Remote host closed the connection]
Vovko has quit []
bradhe has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
kpshek has joined #ruby
geopet has joined #ruby
apeiros has quit [Remote host closed the connection]
rjhunter has quit [Ping timeout: 268 seconds]
jjbohn has joined #ruby
sdwrage has joined #ruby
agrinb has joined #ruby
alexju has quit [Remote host closed the connection]
rippa has joined #ruby
fgo has joined #ruby
codenapper has joined #ruby
craigp has quit [Remote host closed the connection]
petey has quit []
jonfer has quit [Quit: jonfer]
bklane has joined #ruby
bashrw has quit [Quit: Connection closed for inactivity]
rjhunter has joined #ruby
agrinb has quit [Ping timeout: 240 seconds]
sailias has quit [Quit: Leaving.]
luckyruby has joined #ruby
dzhulk1 has quit [Quit: Leaving.]
fgo has quit [Ping timeout: 252 seconds]
rhunter has joined #ruby
shaunbaker has joined #ruby
poikon_ has quit []
dzhulk has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
michaeldeol has joined #ruby
Vovko has joined #ruby
<bklane>
If i have an error I want to handle in the backend with a rescue but also want a notification how would i do so?
shaman42 has quit [Quit: Näihin sanoihin, näihin pelkotiloihin lopetamme lähetyksen Supon arkistoihin laittamalla foliohatun päähämme.]
tylersmith has joined #ruby
<bklane>
i already have the begin/rescue working but want to be notified so i can fix it as well
stonevil has quit [Quit: Computer has gone to sleep.]
<shevy>
bklane well it is normal if else block like way
<shevy>
begin
<shevy>
faulty_part_here
<shevy>
rescue
<shevy>
puts 'hey buddy you have a fatal error in your pants'
<shevy>
end
funktor has quit [Remote host closed the connection]
<bklane>
so just a puts and then i should look through the logs
RaCx has joined #ruby
matcouto has quit [Ping timeout: 240 seconds]
<shevy>
depending on whatever "backend" you use, you need to replace it with however you use, i.e. websockets or whatever
jcs222 has joined #ruby
<benmoss>
you can use something like sendmail or airbrake or any of the other notification services
CreativeEmbassy has joined #ruby
funktor has joined #ruby
<bklane>
benmoss: would airbrake still see the error if i rescue it?
<shevy>
bklane, well you could also create a new file too, it's all pure ruby. I guess you run some kind of other software
<certainty>
a fetal error in your pants?
<shevy>
certainty nono, not fetal
<jhass>
bklane: you can really run any ruby code in the resuce, decide how you want to be notified and implement it
<benmoss>
yeah you can usually manually send an exception if you want
<shevy>
resauce?
<shevy>
look what you did now certainty!
ndrei has quit [Ping timeout: 246 seconds]
<certainty>
resaucing is the act of creating a sauce from the meat
<shevy>
yeah
<shevy>
but only when encountering fetal errors
teddyp1cker has joined #ruby
<certainty>
yeah
sailias has joined #ruby
<certainty>
it's done by saucerers these days
poguez_ has quit [Quit: Connection closed for inactivity]
<benmoss>
bklane: you can call `Airbrake.notify(exception)`
kevind_ has joined #ruby
rjhunter has quit [Ping timeout: 252 seconds]
<bklane>
and will it take the params/data with the exception? like if saving an object instance doesnt work I want the validation errors/attributes it tries to save under to be sent
<shevy>
lenswipe, so yeah, there must be some connection problem
dkamioka has joined #ruby
subbyyy has quit [Quit: none 0.4.3]
mikecmpbll has quit [Ping timeout: 252 seconds]
subbyyy has joined #ruby
mrnugget has quit [Quit: mrnugget]
yfeldblum has joined #ruby
CreativeEmbassy has quit [Quit: FO SHO]
agjacome has quit [Quit: leaving]
subbyyy has quit [Client Quit]
freezey has joined #ruby
subbyyy has joined #ruby
nanoyak has joined #ruby
timonv has joined #ruby
sdouglas has quit [Ping timeout: 265 seconds]
ndrei has quit [Ping timeout: 240 seconds]
timonv has quit [Read error: Connection reset by peer]
rjhunter has quit [Ping timeout: 252 seconds]
mikecmpbll has joined #ruby
budrose has joined #ruby
timonv has joined #ruby
mikesplain has joined #ruby
rjhunter has joined #ruby
timonv has quit [Read error: Connection reset by peer]
timonv has joined #ruby
_justin has joined #ruby
pr0ggie has quit [Quit: Bye folks]
CreativeEmbassy has joined #ruby
jamesaanderson has joined #ruby
zz_jrhorn424 is now known as jrhorn424
agjacome has joined #ruby
smathieu has quit [Remote host closed the connection]
lenswipe has quit [Ping timeout: 265 seconds]
fannye has quit [Ping timeout: 252 seconds]
jollyy has quit [Quit: jollyy]
smathieu has joined #ruby
andikr has quit [Remote host closed the connection]
nbezzala has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
Leehro has joined #ruby
dkamioka has quit [Remote host closed the connection]
Leehro has quit [Max SendQ exceeded]
Dave is now known as Guest96898
razibog has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
funktor has quit [Remote host closed the connection]
AlexRussia has joined #ruby
rjhunter has joined #ruby
fannye has joined #ruby
hobodave has joined #ruby
shinobi_one has joined #ruby
jbellone has joined #ruby
dx7_ has joined #ruby
<jbellone>
Anyone have experience dealing with MITM appliance and OS X certificate bundles? Smacking my head against a wall.
senayar has joined #ruby
shredding has quit [Quit: shredding]
dx7 has quit [Read error: Operation timed out]
Shidash has quit [Ping timeout: 265 seconds]
ghr has quit [Ping timeout: 268 seconds]
smathieu has quit [Remote host closed the connection]
xcv has quit [Remote host closed the connection]
sdwrage has quit [Quit: This computer has gone to sleep]
sdouglas has joined #ruby
smathieu has joined #ruby
n1tr0g has quit [Quit: n1tr0g]
hopsoft has joined #ruby
rjhunter has quit [Ping timeout: 264 seconds]
<hopsoft>
join /#golang
agrinb has quit [Read error: Connection reset by peer]
rjhunter has joined #ruby
agrinb has joined #ruby
nvrch has quit [Quit: nvrch]
Foo1 has quit [Remote host closed the connection]
jonatasdp has quit [Remote host closed the connection]
red234324 has quit [Quit: Leaving]
catphish has quit [Quit: Leaving]
mikecmpbll has quit [Quit: i've nodded off.]
mikecmpbll has joined #ruby
hopsoft has left #ruby [#ruby]
abdulsattar has quit [Ping timeout: 264 seconds]
LiohAu has quit [Quit: LiohAu]
hfp is now known as hfp`away
workmad3 has quit [Ping timeout: 265 seconds]
simono has joined #ruby
rjhunter has quit [Ping timeout: 252 seconds]
poikon has quit [Remote host closed the connection]
<krz>
ive got two datetime values: 2014-03-21 20:48:00 UTC and 2014-03-22 17:56:11 UTC. what is a good way to find out the gap between the two in days?
rjhunter has joined #ruby
<krz>
in this case, one day
<krz>
disregard the time
abdulsattar has joined #ruby
<centrx>
krz, subtraction
vertroa has quit [Read error: Connection reset by peer]
snuffeluffegus has quit [Quit: Leaving]
iceden|2 is now known as iceden
mr_snowf1ake has joined #ruby
funktor has joined #ruby
Mon_Ouie has joined #ruby
ndrei has joined #ruby
sski has quit [Remote host closed the connection]
senayar has quit [Remote host closed the connection]
sparrovv has joined #ruby
sparrovv has quit [Remote host closed the connection]
<rmill>
Quick question → I have this issue when I try to install a gem (any) It'll complain: "activesupport requires Ruby version >= 1.9.3.", for example… But then I do `ruby -v` and get: "ruby 2.1.1p76 (2014-02-24 revision 45161) [x86_64-linux]"
rjhunter has quit [Ping timeout: 246 seconds]
doodlehaus has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
reset has joined #ruby
<centrx>
rmill, Maybe the gem executable is using a different version of ruby installed on your system?
dkamioka has joined #ruby
stonevil has quit [Quit: Computer has gone to sleep.]
<jhass>
rmill: yeah, what does gem env say?
<likemike>
jhass: ah i dont have account on freenode...but i already found "pluck" on the net
<rmill>
centrx, jhass: I feel like I am missing something, but no idea what -__-
terrellt has quit [Ping timeout: 240 seconds]
<jhass>
rmill: never saw that error though
cj3kim has joined #ruby
<jhass>
I'd probably start tracing through Rubygems to see how that's generated
doodleha_ has quit [Ping timeout: 240 seconds]
<likemike>
rmill: maybe u have multiple versions of ruby installed ?
<rmill>
likemike: I do!
abdulsattar has quit [Ping timeout: 240 seconds]
<rmill>
I'm using RVM
philcris_ has joined #ruby
philcris_ is now known as philcrissman_
<rmill>
and it's currently set to ruby-2.1.1
Deejay_ has joined #ruby
CreativeEmbassy has quit [Quit: FO SHO]
pel_daniel has joined #ruby
razibog has quit [Quit: Leaving.]
funktor has quit [Remote host closed the connection]
terrellt has joined #ruby
fannye has quit [Ping timeout: 268 seconds]
rjhunter has quit [Ping timeout: 264 seconds]
decoponio has joined #ruby
craigp has quit []
<likemike>
rmill: are you sure that when you are installing a gem it is not using your system's ruby or the "older" ruby that it is complaining about ?
<benzrf>
ok wtf does 'exception <inspect result for exception> not an errno' mean
penth has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
kaspergr_ has joined #ruby
kaspergrubbe has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 264 seconds]
funktor has quit [Remote host closed the connection]
dkamioka has quit [Remote host closed the connection]
roolo has quit [Quit: Leaving...]
nanoyak has quit [Quit: Computer has gone to sleep.]
funktor has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maletor has joined #ruby
dkamioka has joined #ruby
duggiefresh has quit [Remote host closed the connection]
funktor has quit [Remote host closed the connection]
duggiefresh has joined #ruby
supa_ has joined #ruby
dstynchula has joined #ruby
arubin has joined #ruby
tonni has joined #ruby
<supa_>
When I see a colon infront of a variable name, what is the significance? :myvar
<hoelzro>
it's a symbol
<jhass>
it's not a variable, it's a symbol
<supa_>
Perfect. Thanks.
<benzrf>
supa_: that's a literal, like 'myvar'
benzrf is now known as benzrf|offline
gancl has quit [Ping timeout: 240 seconds]
dkamioka has quit [Remote host closed the connection]
oneawayman has quit [Ping timeout: 268 seconds]
Lewix has quit [Remote host closed the connection]
jcarouth has quit [Excess Flood]
sambao21 has quit [Quit: Computer has gone to sleep.]
pfg has joined #ruby
jrhorn424 is now known as zz_jrhorn424
rjhunter has joined #ruby
smathieu has quit [Remote host closed the connection]
duggiefresh has quit [Ping timeout: 264 seconds]
_Andres has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
no6 has joined #ruby
sambao21 has joined #ruby
smathieu has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
endash_ has joined #ruby
beneggett has joined #ruby
jcarouth has joined #ruby
northfurr has quit [Ping timeout: 246 seconds]
bradhe has quit [Remote host closed the connection]
bradhe has joined #ruby
rjhunter has quit [Ping timeout: 265 seconds]
sdwrage has joined #ruby
nomenkun has quit [Read error: Connection reset by peer]
derek_c has joined #ruby
stephenmac7_ is now known as stephenmac7
pel_daniel1 has joined #ruby
jprovazn has quit [Quit: Odcházím]
carraroj has joined #ruby
rjhunter has joined #ruby
nouitfvf_ has joined #ruby
Xeago has quit [Remote host closed the connection]
nomenkun has joined #ruby
pel_daniel has quit [Ping timeout: 264 seconds]
bradhe has quit [Ping timeout: 268 seconds]
mrnugget has joined #ruby
nouitfvf has quit [Ping timeout: 252 seconds]
Notte has quit [Remote host closed the connection]
Alina-malina has quit [Ping timeout: 268 seconds]
Alina-malina has joined #ruby
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
_justin has quit [Quit: _justin]
sputnik13 has joined #ruby
fgo has joined #ruby
vallieres has joined #ruby
rjhunter has quit [Ping timeout: 268 seconds]
codabrink has quit [Ping timeout: 252 seconds]
tvw has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<invinceable>
is there a way to use regex on the contents of an object in ruby?
mercwithamouth has joined #ruby
vallieres is now known as vallieres_
krz has quit [Quit: WeeChat 0.4.3]
timonv has joined #ruby
codabrink has joined #ruby
<centrx>
invinceable, What do you mean?
vallieres_ has quit [Client Quit]
Shidash has joined #ruby
nomenkun_ has joined #ruby
vallieres_ has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
vallieres_ has quit [Client Quit]
dkamioka has joined #ruby
rjhunter has joined #ruby
<invinceable>
centrx: nevermind, i figured it out.
vallieres_ has joined #ruby
dkamioka has quit [Remote host closed the connection]
Guest71049 has quit [Ping timeout: 265 seconds]
nomenkun has quit [Ping timeout: 240 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
<invinceable>
in ruby i am looking to grab the complete string after a value... like "Email: testemail@new.com"... what function would i use for this?
kennym has left #ruby [#ruby]
AlSquire has quit [Quit: This computer has gone to sleep]
sdouglas has quit [Remote host closed the connection]
sdouglas has joined #ruby
<supa_>
What's a ruby dict called?
<mordocai>
supa_: hash
no6 has quit [Ping timeout: 265 seconds]
<supa_>
Thanks.
nanoyak has joined #ruby
<likemike>
@days = Order.pluck(:weekday) returns :["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"] in html
bradhe has joined #ruby
<likemike>
i want it to return ["Monday","Tuesday", etc]...how do i do that ?
rjhunter has quit [Ping timeout: 252 seconds]
Merks has quit []
sputnik13 has quit [Ping timeout: 265 seconds]
DrShoggoth has joined #ruby
yfeldblum has joined #ruby
fabrice31 has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
sdouglas has quit [Ping timeout: 265 seconds]
dkamioka has joined #ruby
senayar has joined #ruby
oso96_2000 has quit [Ping timeout: 240 seconds]
no6 has joined #ruby
sivoais has quit [Ping timeout: 240 seconds]
<centrx>
likemike, #rubyonrails
platzhirsch has joined #ruby
terrellt_ is now known as terrellt
<supa_>
I see an example of a constructor defining an initialize() and another example defining a new(). Are these synonyms or old version artifacts or... ?
Notte has joined #ruby
`mrspock has joined #ruby
cpruitt has joined #ruby
Merks has joined #ruby
<banister>
supa_ defining 'new' is a bit naughty
beneggett has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banister>
supa_ u should never really have to do that
bklane has quit [Quit: Leaving...]
<supa_>
Ok, so stop reading tutorials from that.
smathieu has quit [Remote host closed the connection]
<banister>
and doing it can break reasonable expectations of other libraries
<banister>
supa_ can u show me that tutorial? they might have a legit reason
smathieu has joined #ruby
<likemike>
centrx: uh but that does not apply only to ror does it ? :p
Notte has quit [Remote host closed the connection]
<`mrspock>
can anyone recommend an IRC channel to inquire about quality Canadian hosts? or does anyone here know of a solid Canadian host with good vm infrastructure?
spider-mario has joined #ruby
no6 has quit [Ping timeout: 252 seconds]
byprdct has joined #ruby
timonv has quit [Read error: Connection reset by peer]
<banister>
supa_ that doesn't say yo should override 'new', it's just illustrating how it works
r0nin has quit [Remote host closed the connection]
shinobi_one has joined #ruby
Avahey_ has joined #ruby
no6 has joined #ruby
<supa_>
banister: Well, it should mention that it shouldn't be confused with a traditional constructor..... Is initialize what I'm looking for?
tehpeh has joined #ruby
oneawayman has joined #ruby
tehpeh has left #ruby [#ruby]
beneggett has joined #ruby
kaspergr_ has quit [Remote host closed the connection]
m8 has joined #ruby
patrick99e99 has joined #ruby
kaspergrubbe has joined #ruby
beneggett has quit [Client Quit]
rakm has quit [Quit: Connection closed for inactivity]
<wallerdev>
supa_: yeah initialize is where you would put your constructor code
Merks has quit []
sigurding has joined #ruby
rjhunter has joined #ruby
oso96_2000 has joined #ruby
sivoais has joined #ruby
tvw has quit []
patrick99e99 has quit [Ping timeout: 246 seconds]
<cout>
I wish ruby would warn for typing intialize instead of initialize
geopet has quit []
arietis has joined #ruby
<invinceable>
how come ^(\d{7}|\d{11})$.match is throwing an error? the regex is valid.
rvraghav93_ has quit [Read error: Connection reset by peer]
Shidash has quit [Ping timeout: 252 seconds]
<terrellt>
//?
<invinceable>
when using /^(\d{7}|\d{11})$/.match no match is being returned. what gives? what is the proper syntax in ruby for the regex ^(\d{7}|\d{11})$?
arietis has quit [Client Quit]
<cout>
invinceable: is it throwing an error or not matching? you just said both.
<invinceable>
terrellt: that throws an error as well
<supa_>
Are methods defaultly private, protected or public?
rvraghav93 has joined #ruby
<invinceable>
invinceable: not matching when using /^(\d{7}|\d{11})$/.match, throwing an error when using ^(\d{7}|\d{11})$.match
<terrellt>
supa_: Public
<invinceable>
supa_: pub
rjhunter has quit [Ping timeout: 246 seconds]
<invinceable>
terrellt: the regex is valid as well. not sure why it would not be returning a match.
<cout>
invinceable: well the latter is invalid syntax
<invinceable>
cout: yes i know. the first should return something though.
<cout>
invinceable: you can also use %r{...} instead of /.../
<invinceable>
cout: let me try that
<cout>
invinceable: maybe. depends on what your input string is.
nfk has quit [Quit: yawn]
jds has quit [Quit: Connection closed for inactivity]
mrnugget has quit [Quit: mrnugget]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jjbohn has quit [Quit: Leaving...]
<invinceable>
hmm it seems the issue is it will not match because there are characters following the match. is there a way to "ignore" everything after that ?
<cout>
.*
<cout>
or use #search instead of #match
<cout>
also sounds like you don't want to use the $ anchor
nfk has joined #ruby
Krajsnick has joined #ruby
ezelohar has joined #ruby
SonicX has joined #ruby
<likemike>
anyone knows how should i turn " to "" i can't make it work with @days.each do |day| day end // tried raw / html_safe etc
rjhunter has joined #ruby
<centrx>
likemike, Have you asked in #rubyonrails ?
benzrf|offline is now known as benzrf
geopet has joined #ruby
<likemike>
centrx: nope :p
senayar has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
<benzrf>
ey yo
<benzrf>
given a path string, how can i split it at the beginning?
<supa_>
mr_snowf1ake: Ya, I've done that with java, python, C++, C#, etc, etc, etc. ruby should not be "hard".
<benzrf>
centrx: fyi, drop(1) > [1..-1]
dzhulk has left #ruby [#ruby]
cover has quit [Ping timeout: 264 seconds]
<shevy>
supa_ are you a language ronin? every month a new language? ;)
freezey has joined #ruby
fgo has joined #ruby
<AlexRussia>
jhass: mm, is like '...' in C-like?
rjhunter has quit [Ping timeout: 240 seconds]
whomp has joined #ruby
<supa_>
shevy: No, not for academia, anyway.... I do this for work.
<jhass>
I know that Java uses that notation, I don't know the C notation for it, but I guess so
<yxhuvvd>
supa: what are you trying to accomplish?
<supa_>
microservices initiative for an old .NET application. But the rest of the team says Python is too hard, but they know ruby.
<shevy>
hehe
<supa_>
I'm the odd man out, so ruby it is.
<shevy>
you are lucky
kaspergrubbe has quit [Remote host closed the connection]
<shevy>
I think python is not hard but weird
kaspergrubbe has joined #ruby
<shevy>
you think like in the opposite way
<AlexRussia>
jhass: '...' in C-like say: here some arguments, using some functions for work with it, cause you don't know length arguments array :P
Shidash has joined #ruby
budrose has quit [Remote host closed the connection]
Burgestrand has quit [Quit: Burgestrand]
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
deadlock has quit [Ping timeout: 240 seconds]
derek_c has joined #ruby
mattmcclure has joined #ruby
fgo has quit [Ping timeout: 246 seconds]
CreativeEmbassy has quit [Quit: FO SHO]
<supa_>
Passenger/uWSGI support both python and ruby, so I don't see why we can't just do both. :P
<benzrf>
wait wut
<benzrf>
uswgi supports rack?
<benzrf>
but
<benzrf>
wsgi is in the name
<benzrf>
>.<
<supa_>
uwsgi supports a ton of stuff now. PHP and LUA, too, I think.
<benzrf>
o.O
<hoelzro>
*cough*
<hoelzro>
it's Lua
Xeago has joined #ruby
<supa_>
Ya, you're right. :)
<benzrf>
there havent been any uppercase PLs in quite a while now
<supa_>
I actually tried to type PHP twice, realized the mistake, and kept that shift key down for fun.
<benzrf>
o wait i guess asp & php
kaspergrubbe has quit [Ping timeout: 246 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
<centrx>
PHP is an abomination and a scourge on the face of the earth.
<benzrf>
if u can call php a programming language
<supa_>
So much PHP hate.
pfg has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toastynerd has joined #ruby
<supa_>
I'll write microservices in PHP. zfg
<supa_>
Just don't make me do ruby.
<benzrf>
what.
<centrx>
Must be some kind of joke
rjhunter has joined #ruby
AlexRussia has quit [Ping timeout: 264 seconds]
<mr_snowf1ake>
probably, considering i'm still skeptical it's possible to program in PHP.
<TTilus>
good programmer will be just fine with php
<yxhuvvd>
we write microservices in lua at work.
<benzrf>
TTilus: shit crayons
<yxhuvvd>
but that is for the traffic flow. the config of it is rails.
jottr has joined #ruby
davy has quit [Remote host closed the connection]
<supa_>
oy
nomenkun has joined #ruby
<atmosx>
hello
Xeago has quit [Ping timeout: 265 seconds]
Krajsnick has quit [Quit: Leaving...]
<agent_white>
So question: I'm writing an IRC client, and have gotten to adding reading from my socket into my main window. Since I need to read new channel-text and type at the same time, should I start learning about Threading?
<supa_>
So what's everyone using as a server and handler? Apache/Passenger, nginx/uWSGI, rails?
nomenkun_ has quit [Read error: No route to host]
bynaryshef has joined #ruby
soulcake has quit [Ping timeout: 240 seconds]
<atmosx>
supa_: nginx/unicorn here
<atmosx>
supa_: sinatra no rails server yet, comming soon probably again unicorn/nginx
<supa_>
Is there a compile-in module for nginx supporting unicorn (ala Passenger)?
rjhunter has quit [Ping timeout: 265 seconds]
<philcrissman>
hm. rails/nginx/passenger. I think.
simono has joined #ruby
<yxhuvvd>
supa: we are using apache/passenger, but we intend to change to unicorn instead of passenger, as we use the apache instance for ohter stuff as well, and it is damned annoying to wait for rails to start after reconfiguring those parts
<supa_>
Oh, I see. You can just use sockets with unicorn.
<slava>
jhass: but that omits a lot of metadata like particular runtime dependencies
toastynerd has quit [Ping timeout: 265 seconds]
matcouto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jason__ has joined #ruby
brain_shim has quit [Ping timeout: 264 seconds]
NovapaX has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rjhunter has quit [Ping timeout: 268 seconds]
m0s has left #ruby ["##apple"]
mary5030 has quit [Remote host closed the connection]
<slava>
mr_snow1ake: I assume I cannot sniff the calls going through https :)
evenix has quit [Ping timeout: 240 seconds]
<mr_snowf1ake>
slave: oh, i suppose you're right, it's secure isn't it :P
bricker_ has joined #ruby
beneggett has joined #ruby
Spami has joined #ruby
bricker has quit [Ping timeout: 252 seconds]
dkamioka has quit [Remote host closed the connection]
<Hanmac>
slava: like that? # JSON.parse(open("https://rubygems.org/api/v1/versions/rails.json").read) and then ary.first {|h| h["number"] == "3.2.17" } # to get the right version PS: 3.2.19 does not exist in the list
Bumptious has quit [Remote host closed the connection]
jlast_ has joined #ruby
<slava>
Hanmac: isn't it limited metadata w/o runtime dependencies and stuff?
VTLob has joined #ruby
jlast_ has quit [Read error: Connection reset by peer]
chuk has quit [Quit: This computer has gone to sleep]
mansi_ has quit [Remote host closed the connection]
<Hanmac>
i dont know
jlast_ has joined #ruby
beneggett has quit [Client Quit]
mansi has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
bricker_ is now known as bricker
mary5030 has joined #ruby
jason__ has quit [Remote host closed the connection]
james_d_h has quit [Quit: Lost terminal]
rjhunter has joined #ruby
jlast has quit [Ping timeout: 240 seconds]
popl has quit [Ping timeout: 240 seconds]
funktor has joined #ruby
wallerdev has joined #ruby
tcstar has quit [Read error: Connection reset by peer]
<shevy>
Hanmac!
toastyne_ has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 265 seconds]
RaCx has joined #ruby
kirun has quit [Quit: Client exiting]
mehlah has joined #ruby
mansi has joined #ruby
rjhunter has quit [Ping timeout: 252 seconds]
chuk has joined #ruby
jason__ has joined #ruby
phansch has quit [Quit: WeeChat 0.4.2]
oneawayman has quit [Ping timeout: 252 seconds]
Xeago has joined #ruby
jason__ has quit [Remote host closed the connection]
beneggett has joined #ruby
jason__ has joined #ruby
no6 has quit [Ping timeout: 265 seconds]
reset has quit [Read error: Connection reset by peer]
reset has joined #ruby
kpshek has quit []
Xeago_ has joined #ruby
reset has quit [Read error: Connection reset by peer]
_reset has joined #ruby
CreativeEmbassy has quit [Quit: FO SHO]
codabrink has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<bilbo_swaggins>
but otherwise I think any type is supported technically
<wallerdev>
id be impressed if you had a 150x150 image over 1gb
<bilbo_swaggins>
or do you mean it would display on the page?
<bilbo_swaggins>
I'd think you'd have more than "a few million colors" to work with!
<shevy>
yeah bilbo_swaggins, just like an overview-picture
mansi has quit [Ping timeout: 246 seconds]
<shevy>
hmm guess I have to move to github then
<bilbo_swaggins>
I really don't think you can
Lewix has quit [Remote host closed the connection]
vlad_starkov has quit [Ping timeout: 246 seconds]
<Marfi>
Matz is on this channel ?
<centrx>
Negative
rjhunter has joined #ruby
Lewix has joined #ruby
<shevy>
Marfi he used to be on #ruby-lang but he lacks the time
* Marfi
thanks
daxroc has quit [Ping timeout: 240 seconds]
<bilbo_swaggins>
I considered it granted that Ruby was a big enough thing I wouldn't get any face time with Matz
soulcake has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
pu22l3r_ has joined #ruby
<droptone>
I'm interacting with an API via rest-client, and it returns JSON, which I parse with JSON.parse() and which works fine, but if I'm trying to reference "links"=>{"next"=>"http://myapi.com"
<droptone>
would I refernce that with MyArray["links"]["next"]
<droptone>
?
<wallerdev>
thats not an array
<droptone>
hash
<wallerdev>
but yes probably
jason__ has joined #ruby
<droptone>
symbolic array, whatever
fgo has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
<droptone>
how would I refernce that?
<droptone>
reference*
<droptone>
ok
kevind has quit [Quit: kevind]
sdwrage has joined #ruby
<shevy>
droptone whenever you can simplify it, try to simplify it
<shevy>
hash[key1][key2][key3] becomes unhandy
<wallerdev>
i doubt he's controlling the json returned from the api
<shevy>
ack
pu22l3r has quit [Ping timeout: 240 seconds]
<bilbo_swaggins>
I disagree on style
<bilbo_swaggins>
I like nested hashes at 2 levels
rjhunter has quit [Ping timeout: 268 seconds]
<bilbo_swaggins>
4, you're probably getting silly
<wallerdev>
the trick is to create a recursive hash and put all your variables into nested parts of that hash
dik_dak has quit [Remote host closed the connection]
jason__ has quit [Ping timeout: 264 seconds]
polyidus has quit [Quit: EOF]
<shevy>
man
<shevy>
I just compiled pymol
nanoyak has quit [Quit: Computer has gone to sleep.]
<shevy>
why doesn't ruby have something like this :(
Bumptious has quit [Remote host closed the connection]
nolic has quit [Read error: Operation timed out]
jason__ has joined #ruby
CaptainJet has quit [Ping timeout: 240 seconds]
SCommette has quit [Quit: SCommette]
pwh has quit []
thumpba has quit [Read error: Connection reset by peer]
fbernier has joined #ruby
thumpba has joined #ruby
jason__ has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
polyidus has quit [Quit: EOF]
jason__ has joined #ruby
polyidus has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
Altonymous has quit [Quit: Altonymous]
BuSerD has quit [Ping timeout: 265 seconds]
jhass is now known as jhass|off
crystal77 has quit [Quit: Computer has gone to sleep.]
mary5030 has joined #ruby
poikon has joined #ruby
saarinen has quit [Quit: saarinen]
Su7 is now known as quba
xcv has joined #ruby
bricker_ has joined #ruby
toastynerd has joined #ruby
linduxed has joined #ruby
chuk has quit [Quit: Leaving]
bricker has quit [Ping timeout: 240 seconds]
St_Marx has joined #ruby
rahult is now known as rahult_
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jason__ has quit [Ping timeout: 264 seconds]
michaeldeol has joined #ruby
toastynerd has quit [Remote host closed the connection]
BuSerD has joined #ruby
toastynerd has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
toastynerd has quit [Remote host closed the connection]
bricker has joined #ruby
bricker_ has quit [Ping timeout: 240 seconds]
VTLob has quit [Quit: VTLob]
senayar has joined #ruby
rjhunter has joined #ruby
MattStratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherly has quit [Remote host closed the connection]
Vovko has quit []
nateberkopec has joined #ruby
meatherly has joined #ruby
rahult_ is now known as rahult
AussieDownUnder has quit [Remote host closed the connection]
sepp2k has quit [Read error: Connection reset by peer]
toastynerd has joined #ruby
jason__ has joined #ruby
baroquebobcat has quit [Ping timeout: 265 seconds]
sepp2k has joined #ruby
rjhunter has quit [Ping timeout: 252 seconds]
toastynerd has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 265 seconds]
Lewix has quit [Remote host closed the connection]
qhartman has joined #ruby
flowerhack has quit [Quit: Connection closed for inactivity]
mikee has joined #ruby
<shevy>
sinatra or rails
<shevy>
sinatra or rails
<shevy>
sinatra or rails ...
<shevy>
hmmmm
dx7_ has quit [Remote host closed the connection]
perldork has joined #ruby
ndrei has quit [Quit: Lost terminal]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bufferloss has joined #ruby
ndrei has joined #ruby
<centrx>
sinatrails
andy__ has quit [Remote host closed the connection]
<bufferloss>
affectionately known as “snot rails"
monkegjinni has quit [Remote host closed the connection]
<bufferloss>
a formidable variety of middle school weaponry
perldork has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
evenix has joined #ruby
nobitanobi has joined #ruby
<shevy>
hmm
<shevy>
I need to be able to present something "useful" in less than 2 months
<shevy>
web related
<centrx>
You can do it in one month
<centrx>
I believe in you
<bufferloss>
shevy: useful to whom and for what?
whomp has quit [Ping timeout: 264 seconds]
chipotle has joined #ruby
michaeldeol has joined #ruby
<shevy>
bufferloss hmm useful to demonstrate that I am not a noob. Related to the life sciences in general, not really sure what precisely
Photism_ has quit [Read error: Connection reset by peer]
<bufferloss>
shevy: and to whom?
<nobitanobi>
Hi guys. I am trying to find a way of knowing how many objects have the same attribute value (:top attribute) in an Enumerable. So, for this [{top: 10}, {top:20}, {top:10}, {top:10}, {top:50}, {top:50}] I would get 5. Because there are three objects that share :top value 10, and two objects that share :top value 50.
<bufferloss>
I love ruby, but it wouldn’t be my goto choice for the “hard sciences”
<shevy>
bufferloss to a fairly large company, perhaps only on the intranet as service, perhaps something more important lateron
whomp has joined #ruby
<shevy>
eh, switching languages in 2 months :P
<bufferloss>
though the rapid prototyping capabilities of the language are great
<bufferloss>
shevy: and what’s the question related to this? is it just “is this doable in ruby in 2 months?"
nisstyre has joined #ruby
snath has joined #ruby
<bufferloss>
cuz if so, the answer is yes, I like to prototype things in ruby and then move to other languages if reasons dictate
<bufferloss>
I can usually prototype something in ruby within a couple weeks
andy__ has joined #ruby
<wallerdev>
nobitanobi: maybe use group_by ?
bilbo_swaggins has quit [Quit: Leaving]
<bufferloss>
almost regardless of complexity - mind you it usually does indeed merely qualify as a prototype, but it’s usually enough to get the core ideas across and include some actual functionality
sputnik13 has joined #ruby
<shevy>
bufferloss no, something that can be useful to demo that when I write down "web savvy", I'd actually am
<nobitanobi>
wallerdev: let me see
<nobitanobi>
thanks
<bufferloss>
nobitanobi: each_with_object + map is what I’d use
Photism has joined #ruby
<shevy>
it's like in poker right now, I am bluffing :P
sputnik13 has quit [Client Quit]
<bufferloss>
shevy: oh, well in that case, just whip up something in rails, you’ll be done in like a week, tops
<bufferloss>
maybe + 2 days for learning the basics
<shevy>
a week!
<bufferloss>
yeah rails is amazing
chipotle has quit [Quit: cya]
<shevy>
you must be some super fast learner
<bufferloss>
at least in terms of how many pre-existing gems are out there
<nobitanobi>
bufferloss: ok..
<bufferloss>
shevy: eh, are you familiar with ruby yet?
jason__ has quit [Remote host closed the connection]
<nobitanobi>
centrx: thanks
<shevy>
learning learning learning :(
<bufferloss>
I mean, yeah actually most gems require a bit of learning, but most gems are also amazingly easy to use and the important ones are quite mature by now
jason__ has joined #ruby
<bufferloss>
shevy: most of what you’ll need is already baked in to rails in terms of web stuff, for other common things there are lots of prefab gems, devise and carrierwave come to mind immediately
<shevy>
hmm
<shutchie>
shevy: how do i check if a file doesnt exist? !File.file?(filename) ?
<bufferloss>
shutchie: File.exists?
Deele has quit [Ping timeout: 240 seconds]
<shutchie>
bufferloss: that returns true if it exists, i want to return true if it doesnt exist
r0nin has quit [Remote host closed the connection]
<centrx>
Or use unless
<shevy>
File.exist? should be preferred, with File.exists? the latest ruby gives deprecation warnings
mary5030 has joined #ruby
<bufferloss>
shevy: your mileage may vary, but I really like http://guides.rubyonrails.org/ - if you read through the first several sections of that you’ll be more than ready to go
mary5030 has quit [Remote host closed the connection]
bufferloss has quit [Quit: bufferloss]
mary5030 has joined #ruby
jollyy has joined #ruby
<centrx>
shevy, Rails is probably better for getting a complete app done quickly if you are not otherwise familiar with the tools you would be using.
<centrx>
shevy, (because it includes so much functionality built in)
<boombadaroomba>
like the 5th time i heard YMMV in programming channels. Learn the lingo
bradhe has quit [Remote host closed the connection]
<shevy>
hmm
<boombadaroomba>
Learning the lingo*
<shevy>
quickly
roolo has quit [Quit: Leaving...]
<shevy>
you guys are overestimating my speed
hfp`away is now known as hfp
Shidash has quit [Ping timeout: 268 seconds]
<shevy>
I'd be like a young kid on a mine field
<shevy>
mines and pitfalls in every direction
jason__ has quit [Ping timeout: 264 seconds]
nanoyak has quit [Quit: Computer has gone to sleep.]
davy_ has quit [Remote host closed the connection]
<wallerdev>
rails has gotten a lot more complicated too
slowz has left #ruby ["Leaving"]
YamakasY has quit [Ping timeout: 240 seconds]
Frank13760 has joined #ruby
Frank13760 has quit [Remote host closed the connection]
<centrx>
The core is still simple. Rails just keeps including more extras.
nanoyak has joined #ruby
<wallerdev>
well they got rid of scaffolding and the make a blog in 15 minutes video
<wallerdev>
:p
whomp has quit [Read error: Operation timed out]
r0nin has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
senayar has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
mercwithamouth has quit [Ping timeout: 268 seconds]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
aspires has quit []
r0nin has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 268 seconds]
<shevy>
hmm
<shevy>
how long does it take to make a blog nowadays?
dstynchula has quit []
michaeldeol has joined #ruby
<centrx>
16 minuts
chipotle has joined #ruby
<shevy>
lol
teddyp1cker has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
dcope has joined #ruby
cpruitt has quit [Quit: cpruitt]
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<dcope>
is there short hand for returning nil if a string is empty?