<onewheelskyward>
That's the perfect ternary use case btw.
<popl>
I wouldn't use system.
rickruby has quit [Ping timeout: 245 seconds]
<Rylai>
I ended YEah
<Rylai>
err
<Rylai>
I ended up just using ternary
<popl>
Rylai: do you just want to know if the site is responding to pings? do you really want to know if the webserver is up?
<Rylai>
popl: It's not a webserver, it's a Garry's Mod server
<Rylai>
But, uh, yeah, that's the basic idea
<popl>
there are gems for most things
fixl has joined #ruby
<popl>
why not do the test outside of the HTML string? That way you have all the logic in one place.
tabolario has joined #ruby
<zendeavor>
game servers shouldn't be responding to icmp anyway
<zendeavor>
should be dropping them outright to prevent ping ddos
<popl>
It makes sense that they wouldn't.
guiocavalcanti has joined #ruby
<popl>
I didn't think of that because I don't play MMOs at all.
<popl>
I'm not entirely sure what Garry's Mod is.
<zendeavor>
sandbox
<popl>
ah
<Rylai>
Well, this doesn't quite ping the game server, it pings the underlying Windows server. Unless you mean servers that are hosting game servers shouldn't respond to ICMP.
<zendeavor>
yes
<popl>
obviously that's what he meant.
<popl>
:P
<zendeavor>
or, the top-level server can respond but icmp echo's which are routed to the game server underneath should be dropped at least
<zendeavor>
butthen the server itself can still get ping ddos'd anyway so
<popl>
tjbiddle: Do you have to mark your shoes with "L" and "R"?
<popl>
:)
bradhe has quit [Remote host closed the connection]
<tjbiddle>
popl: No. I generally just make the shape with my hands on which ones makes the L :-)
<popl>
haha
RORgasm has joined #ruby
osvico has quit [Read error: Connection reset by peer]
OffTheRails__ has joined #ruby
OffTheRails has joined #ruby
OffTheRails_ has joined #ruby
Kricir has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 240 seconds]
niklasb has joined #ruby
bklane has quit [Remote host closed the connection]
Davey has quit [Quit: Computer has gone to sleep.]
randomautomator has joined #ruby
jnoob22 has joined #ruby
Apocalypse has quit [Ping timeout: 245 seconds]
Mattix has joined #ruby
osvico has joined #ruby
randomau_ has quit [Ping timeout: 264 seconds]
Apocalypse has joined #ruby
randomautomator has quit [Ping timeout: 268 seconds]
conner has joined #ruby
<conner>
is there are short hand way of expressing Regexp.new(Regexp.quote())
Spami has quit [Quit: This computer has gone to sleep]
threesome has quit [Ping timeout: 245 seconds]
<havenn>
Matz superglues his shoelaces.
<havenn>
Efficiency.
<popl>
o_O
<havenn>
I swear I heard him say this and am not making things up. But I think its applying Rubyist concept to life. Sure, people are used to this junk, lets make it *nice*.
<havenn>
Slippers... mmmhmmm!
mercwithamouth has joined #ruby
nezumi has joined #ruby
<popl>
what?
ehaliewicz has joined #ruby
Davey has joined #ruby
<havenn>
popl: I may just need more oxygen. :P
<havenn>
Saw there was a Summer of Code project to gemify Shoes, that seems potentially neat.
zeromodulus has quit [Remote host closed the connection]
zeromodulus has joined #ruby
cj3kim has quit [Ping timeout: 256 seconds]
nathancahill has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
zeromodulus has quit [Ping timeout: 268 seconds]
cpruitt has quit [Quit: cpruitt]
niklasb has quit [Ping timeout: 276 seconds]
dmiller has joined #ruby
Megtastique has joined #ruby
Spooner has quit [Remote host closed the connection]
emergion has quit [Ping timeout: 260 seconds]
MrZYX is now known as MrZYX|off
robustus has quit [Ping timeout: 245 seconds]
emergion has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
Davey has joined #ruby
robustus has joined #ruby
adeponte has joined #ruby
bleubeard has joined #ruby
tjbiddle has joined #ruby
saarinen has joined #ruby
saarinen has quit [Client Quit]
JimmyNeutron has joined #ruby
RORgasm has joined #ruby
saarinen has joined #ruby
dmiller has quit [Remote host closed the connection]
RORgasm has quit [Ping timeout: 264 seconds]
Shirakawasuna has joined #ruby
poga has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 264 seconds]
nbouscal has joined #ruby
rupee has joined #ruby
sepp2k1 has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
<Eiam>
hmm aside from web sockets what are my options in the ruby/sinatra world to push changes from the backend forward?
spidergears has quit [Read error: Connection reset by peer]
brennanMKE has quit [Remote host closed the connection]
arya__ has joined #ruby
spidergears has joined #ruby
kung has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 268 seconds]
Megtastique has quit [Quit: Megtastique]
joshsmith has joined #ruby
arya_ has quit [Ping timeout: 276 seconds]
Kricir has quit [Remote host closed the connection]
Kricir has joined #ruby
radic__ has joined #ruby
poga has joined #ruby
yhsgw has quit [Quit: Leaving.]
radic_ has quit [Ping timeout: 245 seconds]
benlieb has joined #ruby
endash has quit [Quit: endash]
adeponte has quit [Remote host closed the connection]
tjbiddle has quit [Quit: tjbiddle]
Es0teric has joined #ruby
Killerkeksdose_ has quit [Read error: Connection reset by peer]
Killerkeksdose has joined #ruby
rickruby has joined #ruby
mosheee has quit [Ping timeout: 276 seconds]
ixti has quit [Quit: WeeChat 0.4.1]
spidergears has quit [Read error: Connection reset by peer]
mosheee has joined #ruby
dross has quit [Ping timeout: 248 seconds]
m104 has joined #ruby
dross has joined #ruby
rickruby has quit [Ping timeout: 264 seconds]
hamakn has quit [Remote host closed the connection]
nathancahill has quit [Quit: nathancahill]
Mattix has quit [Quit: Leaving]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
Kricir has quit [Remote host closed the connection]
ryannielson has joined #ruby
postmodern has quit [Quit: Leaving]
m104 has quit [Quit: brb]
danman has joined #ruby
huoxito has quit [Quit: Leaving]
hakunin has quit [Read error: Connection reset by peer]
hakunin has joined #ruby
poga has quit [Remote host closed the connection]
nari has joined #ruby
becky_ has quit [Ping timeout: 245 seconds]
cj3kim has joined #ruby
alvaro_o has quit [Quit: Ex-Chat]
guiocavalcanti has joined #ruby
m104 has joined #ruby
Shirakawasuna has quit [Quit: Leaving]
fyz1x has joined #ruby
goleldar has joined #ruby
<goleldar>
hello
smathieu has quit [Remote host closed the connection]
poga has joined #ruby
caveat- has quit [Disconnected by services]
caveat- has joined #ruby
smathieu has joined #ruby
robwilliamsukio has joined #ruby
spidergears has joined #ruby
lump has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
ryannielson has quit [Remote host closed the connection]
drago777 has quit [Ping timeout: 240 seconds]
Dwarf has quit [Ping timeout: 240 seconds]
Dwarf_ is now known as Dwarf
Y_Ichiro has quit [Quit: No Ping reply in 180 seconds.]
Y_Ichiro has joined #ruby
IceDragon has quit [Ping timeout: 240 seconds]
zero7 has quit [Ping timeout: 240 seconds]
UForgotten has quit [Ping timeout: 240 seconds]
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
ckrailo has quit [Ping timeout: 240 seconds]
froy has quit [Ping timeout: 240 seconds]
robwilliamsuk has quit [Ping timeout: 240 seconds]
nanoxd has quit [Ping timeout: 240 seconds]
s00pcan has quit [Ping timeout: 240 seconds]
Y_Ichiro has quit [Client Quit]
Dwarf is now known as 18WAEAWXL
jolleyjoe has quit [Ping timeout: 240 seconds]
Dwarf has joined #ruby
Beoran__ has quit [Ping timeout: 240 seconds]
TomRone has quit [Ping timeout: 240 seconds]
IcyDragon has joined #ruby
drago777 has joined #ruby
wmoxam_ has joined #ruby
Uranio has quit [Ping timeout: 240 seconds]
UForgotten has joined #ruby
jolleyjoe has joined #ruby
jnoob22 has quit [Remote host closed the connection]
<sergiocampama>
hey
TomRone has joined #ruby
MrRacoon has quit [Ping timeout: 240 seconds]
Beoran__ has joined #ruby
MrRacoon has joined #ruby
Uranio has joined #ruby
s00pcan has joined #ruby
Y_Ichiro has joined #ruby
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
poga has quit [Remote host closed the connection]
guiocavalcanti has quit [Remote host closed the connection]
emergion has quit [Quit: Computer has gone to sleep.]
twer has joined #ruby
emergion has joined #ruby
poga has joined #ruby
noyb has quit [Ping timeout: 264 seconds]
emergion has quit [Ping timeout: 260 seconds]
twer has quit [Ping timeout: 264 seconds]
n_blownapart has quit [Remote host closed the connection]
nbouscal has joined #ruby
smathieu has quit [Remote host closed the connection]
havenwood has joined #ruby
ananthakumaran has joined #ruby
IcyDragon has quit [Quit: Space~~~]
Lewix has quit [Remote host closed the connection]
wmoxam_ has quit [Ping timeout: 240 seconds]
danman has quit [Quit: danman]
cj3kim has joined #ruby
ewnd9 has joined #ruby
atno has joined #ruby
davehimself has joined #ruby
benlieb has quit [Quit: benlieb]
nanoxd has joined #ruby
bleubeard has quit [Remote host closed the connection]
joshsmith has quit [Quit: joshsmith]
cj3kim has quit [Ping timeout: 240 seconds]
kung has joined #ruby
rickruby has joined #ruby
<epitron>
Eiam: the only other options are client polling and flash-based-hacks
xavier23 has quit [Quit: xavier23]
<Eiam>
yeah.. I think I'm just going to poll to the backend saying "how many records you got left to save?" "how about now?" "and now?"
<epitron>
there's also that really old trick where you keep an http connection open and stream data in
<epitron>
but i don't know if you can parse that
<Eiam>
I almost feel like just making # records ajax requests is cleaner
<epitron>
i think only the browser can stream that into the body of the page
<Eiam>
because it'll always be accurate
<Eiam>
vs polling i could hit double ups
<Eiam>
"how many" 10 "how many" still 10..
<epitron>
heh
tjbiddle has joined #ruby
<epitron>
i don't actually know what you're doing
<epitron>
the things you say do not mean anyhting
<Eiam>
epitron: I got asked to turn my indeterminate spinner into a progress bar
<Eiam>
which means I've got to get updates on "how its going" in ruby land
pkh has quit [Ping timeout: 256 seconds]
<Eiam>
I was just wondering if other solutions beyond web sockets and polling were avaialble
<Eiam>
sounds like thats still the tool for the job.
<epitron>
ah
<epitron>
yeah, polling is the easiest thing to do
<epitron>
there's no real advantage to getting fancier
fyz1x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<epitron>
doing N ajax requests is probably not ideal though
rickruby has quit [Ping timeout: 264 seconds]
<epitron>
there's a lot of overhead for the setup/teardown
voltagex has joined #ruby
pipework has joined #ruby
bleubeard has joined #ruby
adeponte has joined #ruby
BadQuanta has quit [Ping timeout: 240 seconds]
<voltagex>
hi guys, I'm trying to work out who the maintainer of bluepill is: http://rubygems.org/gems/bluepill - I have already contacted Arya who's listed on that page
BadQuanta has joined #ruby
bleubeard has quit [Remote host closed the connection]
axeman- has quit [Read error: Connection reset by peer]
guiocavalcanti has quit [Remote host closed the connection]
kobain has joined #ruby
axeman- has joined #ruby
wicked has joined #ruby
MrZYX is now known as MrZYX|off
kloeri_ is now known as kloeri
eric-atl has quit [Quit: eric-atl]
teddyp1cker has quit [Ping timeout: 245 seconds]
sailias has quit [Ping timeout: 276 seconds]
Elhu has joined #ruby
devoldmx3 has quit [Ping timeout: 245 seconds]
flughafen has joined #ruby
<flughafen>
any capybara users in here?
<Quadlex>
I use Capybara
<Quadlex>
But mainly from an integration POV
<flughafen>
I have a question, I've tried #capybara, but it's useless... im upgrading to capybara 2.1 from 1.x... and a test case that used to work, is now failing(finding an element... but the issue is, it says it finds more than one, but I searched the whole src for the page, and there is only one element in it that matches
JZTech101 has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
charliebone has joined #ruby
<sevenseacat>
got some code?
axeman- has joined #ruby
<flughafen>
just a second
<charliebone>
hey folks, i'm hoping someone who knows Ruby can help me understand some code
<charliebone>
specifically, I need someone to read some ruby code (not long) and answer a couple questions about the implementation that isn't clear. basically, it's code that uses a lot of open SSL stuff so if you are familiar with that then you should have no issues
<flughafen>
i added a slightly more specific xpath too, but it still says it finds more than one
<sevenseacat>
you verified that that's the HTML that capybara is seeing?
<canton7>
we have next and break
endash has joined #ruby
<flughafen>
sevenseacat: i did a print page.html before it searches for the xpath
<canton7>
(for breaking out of loops)
<sevenseacat>
can you validate that html?
<pandawarrior>
sevenseacat: i'm a newbie to ruby and he's been perling for over 10 years. i'm just going to have to get used to it untll i get proficient. but it is so annoying
Cyrus has quit [Quit: Cyrus.sleep()]
smathieu has quit [Ping timeout: 240 seconds]
<pandawarrior>
canton7: he's specifically speaking about inner loops breaking out into an outer loop
<flughafen>
sevenseacat: on w3.org?
<canton7>
break will break out of the current loop?
<pandawarrior>
but i think that's bad and there must be another way to handle breaking out of inner loops and handing control back to the outer loop
`Chris`_ has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
saintcajetan has quit [Remote host closed the connection]
<apeiros>
pandawarrior: usually you can avoid such situations altogether by choosing your iterator properly.
`Chris` has quit [Ping timeout: 264 seconds]
<apeiros>
pandawarrior: while ruby doesn't have goto, it has throw/catch to unroll the stack, however, that's usually a code smell.
<pandawarrior>
that's what i said. i think this is really about a vet of another language: a) not respecting ruby and b) not respecting a less experienced coder
<apeiros>
pandawarrior: and you can tell your flatmate that it's a codesmell in perl too if you use goto and similar constructs
<pandawarrior>
apeiros: totally agree
pupoque_ has quit [Read error: Connection reset by peer]
pupoque_ has joined #ruby
tommyvyo has joined #ruby
kreeves has joined #ruby
<flughafen>
sevenseacat: there is a name on the page and an email address in <email@something.com> but the <email> isn't displayed, there were a few errors
<apeiros>
pandawarrior: well, I'd not worry about it. if he insists on bad code being better, let him.
<pandawarrior>
:)
Matriks has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
osvico has quit [Ping timeout: 256 seconds]
Myrth has joined #ruby
<Myrth>
hi, i'm trying `gem install sup` but it errors `sh: 1: rake1.8: not found`. i did `aptitude install rake` but that didn't help. any tips? thanks
saarinen has quit [Quit: saarinen]
v0n has joined #ruby
<sevenseacat>
now try installing rake1.8, if you insist on using debian packages to install ruby
saintcajetan has joined #ruby
devdazed has quit [Ping timeout: 264 seconds]
<Myrth>
sevenseacat: thanks, but no such package
<apeiros>
1.8?
kaspergrubbe has quit [Ping timeout: 268 seconds]
<flughafen>
aptitude search for rake
<apeiros>
I guess it infers the rake name from the ruby name? ruby1.8 -> rake1.8
<apeiros>
anyway - debian: blegh
<ged>
pandawarrior: Goto isn't even a good way to break out of an inner loop in Perl, let alone Ruby. Tell him he should know about 'last LABEL' by now. :P
<kraljev1>
the one that resembles array, except few functions?
selene23 has joined #ruby
<apeiros>
yay, methods, not functions. and: 2 spaces for indent, not tabs :-p
<kraljev1>
agree on first one
<kraljev1>
disagree on second :)
<kraljev1>
but that is religious
<kraljev1>
the problem is, if i inherit array
<apeiros>
no, second one is convention
selene23 has quit [Killed (idoru (Spam is off topic on freenode.))]
<kraljev1>
then i get Array as a result of +, <<, etc
<apeiros>
and while I personally prefer tabs over 2-space, it makes much more sense to stick to the going convention.
kaspergrubbe has quit [Remote host closed the connection]
<kraljev1>
that is rails convention, no?
<apeiros>
not just
<apeiros>
that's actually a convention where rails stuck with ruby convention
kaspergrubbe has joined #ruby
<kraljev1>
so, how can I avoid writing
bklane has joined #ruby
<kraljev1>
def |(deck)
<kraljev1>
Deck.new super
<kraljev1>
end
<kraljev1>
for every Array function
<apeiros>
use metaprogramming
<kraljev1>
i don't think method_missing is the answer here
<apeiros>
I think there's a gem out there to make it easier to create pseudo-arrays and -hashes
<apeiros>
oh, I wouldn't use method_missing
<apeiros>
I wouldn't inherit from array either, though
leonidlm has joined #ruby
c3l has joined #ruby
<kraljev1>
good point
<apeiros>
I'd use: def self.wrap_array_method(name); define_method(name) do Deck.new(super) end; end
<apeiros>
something like that
<kraljev1>
hm, that is actually nice :)
<kraljev1>
maybe *names
<kraljev1>
so you can specify more
<apeiros>
sure. it's your thing :)
chimkan has joined #ruby
spidergears has quit [Ping timeout: 256 seconds]
kaspergrubbe has quit [Ping timeout: 276 seconds]
spidergears has joined #ruby
lethjakm1 has joined #ruby
Bry8Star{T2 has quit [Ping timeout: 240 seconds]
<charliebone>
Hey folks, I'm hoping someone can help, who may know their way around the Ruby docs better than I. The question I have is on the following code: OpenSSL::HMAC.digest("sha256", @signature_key, data)
pskosinski has joined #ruby
<charliebone>
what is the encoding of the output there?
<charliebone>
I cant seem to find out if its binary or hex
sailias has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest36002
Bry8Star{T2 has joined #ruby
cads has quit [Ping timeout: 264 seconds]
evdakovkirill has joined #ruby
tommyvyo has quit [Quit:]
saarinen has quit [Quit: saarinen]
nbouscal has joined #ruby
lethjakman has joined #ruby
swordsmanz has joined #ruby
<evdakovkirill>
hi, can you explain how should i check, if user's input is numbers?
<r0bglees0n>
lethjakman: a lot of code that talks to the database is written in Rails, and the default choice for Rails is ActiveRecord, but there's other good alternatives if you aren't happy with AR.
mechanicalduck has quit [Read error: Connection timed out]
<r0bglees0n>
Sequel is probably one of the most solid alternatives
<kraljev1>
Whois.whois("example.com").registered?
<Renich>
apeiros: that's why I want to use URI.parse()
<r0bglees0n>
I actually think AR is really good in the context of a rails application
<apeiros>
lethjakman: while I'd second r0bglees0n's sequel recommendation - you can also use raw drivers
<lethjakman>
r0bglees0n: rails kinda feels awkwaard and overkill if I'm not using it for a website
pupoque_ has quit [Read error: Connection reset by peer]
io_syl has joined #ruby
<kraljev1>
rails is good for nothing
_seanc_ has joined #ruby
<lethjakman>
sequel looks good, thank you!
<apeiros>
lethjakman: rails is not overkill but simply wrong if you don't use it for a website
<apeiros>
lethjakman: but AR can be used without rails
pupoque_ has joined #ruby
<lethjakman>
yeah...
<kraljev1>
even for a website it is wroing
<lethjakman>
apeiros: how do you normally do that? where do you put your migrations and such?
<apeiros>
kraljev1: I disagree. but I see no point in arguing that :)
<apeiros>
lethjakman: no idea. I haven't used AR outside of rails.
<Renich>
apeiros: ok, how do I use URI.parse() in an if clause?
<Renich>
apeiros: or any other resource if not an "if"
<lethjakman>
hrm I'll have to look around
<lethjakman>
thanks everyone
fyz1x has joined #ruby
<apeiros>
Renich: I think if you only want to validate (*.)domain.tld, you probably best just write a regex
<apeiros>
shouldn't be hard to translate the ABNF/EBNF from the RFC
<Renich>
apeiros: ok, I'll try that
<Renich>
apeiros: thanks
<r0bglees0n>
if using URI.parse, don't forget URI.escape before you pass.
<r0bglees0n>
(why doesn't it do that for you?)
tjbiddle has joined #ruby
<apeiros>
r0bglees0n: because there's no such thing as a free escaping
<apeiros>
you have to know which parts may be escaped, and which not
<apeiros>
(that's the insanity which was magic slashes in php)
splittingred has joined #ruby
<r0bglees0n>
what was magic slashes again?
<r0bglees0n>
from wordpress, right?
<kraljev1>
it was a premature escaping solution
c3l has quit [Ping timeout: 276 seconds]
<kraljev1>
one of php's faults
<kraljev1>
later being deprecated
Speed has joined #ruby
JZTech102 has joined #ruby
<r0bglees0n>
can you explain more? i can google if not
<kraljev1>
there is no such thing as magic slashes
JZTech101 has quit [Disconnected by services]
JZTech102 has quit [Client Quit]
KevinSjoberg has joined #ruby
JZTech101 has joined #ruby
leonidlm has quit [Ping timeout: 240 seconds]
henn has quit [Ping timeout: 264 seconds]
axeman- has quit [Read error: Connection reset by peer]
clocKwize has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
<r0bglees0n>
apeiros, kraljev1 so the general idea I pick up from that is that in the case of URI, different schema's might have different escaping URLs, or even different components of a URI, so a one-catch-all won't work?
<r0bglees0n>
s/escaping URLS/escaping rules/
vlad_starkov has joined #ruby
<r0bglees0n>
apeiros: if a string is of fixed size(56) and each column/character can have a possible of 58 values, how can I calculate how many combinations are possible?
<apeiros>
r0bglees0n: depends, can characters appear repeatedly?
shaunbaker has joined #ruby
<kraljev1>
and, sure, good point
<r0bglees0n>
apeiros: the string in question is from SecureRandom.urlsafe_base64, so repeats happen.
<r0bglees0n>
its just fixed in size
<apeiros>
then what kraljev1 said
<r0bglees0n>
awesome
<r0bglees0n>
thank you
kaspergrubbe has joined #ruby
shaunbaker has quit [Remote host closed the connection]
<apeiros>
that's much much more than UUIDs
<r0bglees0n>
apeiros: hehe actually, background: going from fixed 56 to up to 80, so the combinations is even more :)
<r0bglees0n>
length will vary in other words
<apeiros>
I don't think there's any realistic use-case for such long identifiers
<apeiros>
a UUID would fit into 23 characters of base58
pskosinski has quit [Quit: Til rivido Idisti!]
<r0bglees0n>
yeah, probably not, it's way more space than i need, but i dont want a fixed size string either
<apeiros>
gah, I calculated base56
nitish has joined #ruby
<apeiros>
base58, 22 would suffice for a uuid
splittingred has quit [Quit: splittingred]
axeman- has quit [Remote host closed the connection]
<r0bglees0n>
going to go with that length for now(50-80), which gives me a crazy number of combinations and a lot of space, way more than i'll need, but yeah.
c3l has joined #ruby
<apeiros>
reminds me that I still want to come up with a good UID scheme for our companies documents
<apeiros>
company's
goshakkk has joined #ruby
kraljev1 has quit [Read error: Operation timed out]
tkuchiki has quit [Remote host closed the connection]
spidergears has quit [Remote host closed the connection]
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrZYX|off is now known as MrZYX
spidergears has joined #ruby
saarinen has joined #ruby
Kricir has quit [Remote host closed the connection]
lebek has joined #ruby
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
shreya has joined #ruby
tommyvyo has quit [Quit:]
carlyle has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
smathieu has joined #ruby
ksmth has joined #ruby
trivol has joined #ruby
axeman- has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
_helloworld_ has quit [Remote host closed the connection]
maroloccio has joined #ruby
KevinSjoberg has joined #ruby
colonolGron has joined #ruby
axeman- has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
iFire has quit [Ping timeout: 245 seconds]
iFire has joined #ruby
Karpuragauram has joined #ruby
Karpuragauram has quit [Client Quit]
smathieu has quit [Ping timeout: 240 seconds]
spidergears has quit [Remote host closed the connection]
Karpuragauram has joined #ruby
bradhe has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
spidergears_ has joined #ruby
guiocavalcanti has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
AzizLight has joined #ruby
St_Marx has joined #ruby
<AzizLight>
Hi everybody
noyb has joined #ruby
<AzizLight>
I have a super mega noobish question: Why does this condition return false? "create" =~ /new|create/
The-Mad-Pirate has joined #ruby
zeromodulus has quit [Read error: Connection reset by peer]
stuartrexking has joined #ruby
zeromodulus has joined #ruby
includex has quit [Quit: Leaving...]
<AzizLight>
by the way I'm using ruby 2
rezzack has quit [Ping timeout: 248 seconds]
spidergears_ has quit [Remote host closed the connection]
The-Mad-Pirate has quit [Read error: Connection reset by peer]
<apeiros>
it also isn't false-ish like in other languages. only nil and false are false-ish
<AzizLight>
apeiros: yeah I figured. It's a rails problem I think
<AzizLight>
apeiros: thanks a lot though
<apeiros>
o0
<apeiros>
I don't see how that's rails related, but fine :)
<AzizLight>
apeiros: for some reason using strong parameters one of my params is not being included...
<AzizLight>
weird
S0da has joined #ruby
noyb has quit [Ping timeout: 264 seconds]
Nahra has joined #ruby
Nahra has joined #ruby
<apeiros>
aha
_Andres has quit [Ping timeout: 264 seconds]
axeman- has quit [Ping timeout: 256 seconds]
fridim_ has joined #ruby
nitish has quit [Remote host closed the connection]
LnL has joined #ruby
LnL is now known as Guest70284
ericboehs has joined #ruby
Guest70284 has left #ruby [#ruby]
fenec has joined #ruby
vikhyat has quit [Remote host closed the connection]
Kricir has joined #ruby
axeman- has joined #ruby
The-Mad-Pirate has joined #ruby
vince_prignano has quit [Remote host closed the connection]
KevinSjoberg has quit [Quit: Computer has gone to sleep.]
The-Mad-Pirate has quit [Client Quit]
gnuyoga has quit [Quit: gnuyoga]
charliebone has left #ruby [#ruby]
axeman- has quit [Ping timeout: 240 seconds]
Karpuragauram has quit [Quit: Ex-Chat]
The-Mad-Pirate has joined #ruby
axeman- has joined #ruby
endash has quit [Quit: endash]
endash has joined #ruby
_seanc_ has quit [Quit: _seanc_]
stuartrexking has quit [Quit: Leaving...]
saarinen has quit [Quit: saarinen]
<AzizLight>
apeiros: do you know how I can permit an array of hashes with strong parameters please?
Kricir has quit [Ping timeout: 240 seconds]
Astralum has quit [Quit: Leaving]
_Andres has joined #ruby
Guest70284 has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
ehaliewicz has joined #ruby
kaspergrubbe has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
KiwiHeretic has joined #ruby
axeman- has joined #ruby
bradhe has quit [Remote host closed the connection]
kaspergr_ has joined #ruby
r0bby_ has quit [Read error: No route to host]
kaspergrubbe has quit [Read error: Connection reset by peer]
KiwiHeretic has quit [Client Quit]
r0bby_ has joined #ruby
<ayonix_>
AzizLight: what do you mean by array of hashes?
ayonix_ is now known as ayonix
sergiocampama has joined #ruby
Renich has left #ruby [#ruby]
<apeiros>
AzizLight: that'd probably fit better in #rubyonrails
bradhe has joined #ruby
<AzizLight>
apeiros: I asked there and they told me to ask here -_-
LnL has joined #ruby
LnL is now known as Guest5936
icy` has joined #ruby
icy` has quit [Changing host]
icy` has joined #ruby
<apeiros>
AzizLight: lol
bradhe has quit [Remote host closed the connection]
jmimi has joined #ruby
Guest70284 has quit [Ping timeout: 264 seconds]
Nisstyre has quit [Quit: Leaving]
KevinSjoberg has joined #ruby
sepp2k has joined #ruby
teddyp1cker has joined #ruby
Nisstyre-laptop has joined #ruby
spidergears_ has quit [Remote host closed the connection]
noyb has joined #ruby
spidergears_ has joined #ruby
Lewix has joined #ruby
r0bby_ has quit [Read error: Connection reset by peer]
r0bby_ has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
axeman- has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Read error: Connection reset by peer]
axeman- has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
eka has joined #ruby
vlad_starkov has joined #ruby
codecop has joined #ruby
colonolGron has quit [Ping timeout: 264 seconds]
goleldar has joined #ruby
szines has joined #ruby
colonolGron has joined #ruby
Lewix has quit [Ping timeout: 268 seconds]
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran1 has joined #ruby
Evixion has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
maasdesigner has quit [Ping timeout: 256 seconds]
baroquebobcat has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
szines has quit [Remote host closed the connection]
Evixion has joined #ruby
senayar has joined #ruby
habanany has quit [Quit: Leaving.]
baroquebobcat has quit [Client Quit]
razi has quit [Ping timeout: 245 seconds]
vasilakisFiL has joined #ruby
goshakkk has quit [Ping timeout: 264 seconds]
spidergears_ has quit [Remote host closed the connection]
larissa has joined #ruby
spidergears_ has joined #ruby
bradhe has joined #ruby
_Andres has quit [Ping timeout: 240 seconds]
<vasilakisFiL>
hello I would like to ask about this syntax: STATUS_CODES = { 100 => "Continue", 200 => "OK" } is it the new, the old, or another syntax?
<vasilakisFiL>
it actually looks like the old syntax but without the colon
<apeiros>
it's the old syntax
<apeiros>
and the old syntax never had a colon
mityaz has joined #ruby
<apeiros>
I assume you're mistaking the Symbol literal to be part of the hash syntax. it is not (in the old one)
vlad_starkov has quit [Remote host closed the connection]
shreya_ has joined #ruby
shreya has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
amacgregor has joined #ruby
_Andres has joined #ruby
<vasilakisFiL>
the symbol literal is the colon in a hash like that? hash = { :name => "David", :age => 49 }
jbpros has joined #ruby
<apeiros>
the colon is part of the symbol literal in that, yes
<r0bglees0n>
what's the race-condition way to perform an update in that manner
<sergiocampama>
why isn't ++ defined in ruby? is it a design choice?
<r0bglees0n>
would you need a lock around the counter
<canton7>
sergiocampama, ++ mutates. numbers are immutable in ruby
carlyle has quit [Remote host closed the connection]
<r0bglees0n>
sergiocampama: because ++ would imply mutation and numbers aren't mutated, is my understanding of it
Nanuq has left #ruby [#ruby]
<horrror>
apeiros: this doesn't work
mgorbach has joined #ruby
<apeiros>
horrror: come back when you have a useful problem description
<apeiros>
hint: "doesn't work" isn't one.
<sergiocampama>
but the variable holding the pointer to a fixnum could update its reference to the next fixnum, 1++ doesn't mean anything…
<sergiocampama>
but a++ where a = 1 does mean something
<r0bglees0n>
sergiocampama: += is explicit about the reassignment, thats the point
<r0bglees0n>
its saying "you are getting a new object"
<r0bglees0n>
(probably)
<apeiros>
sergiocampama: I think we can just leave it at: design choice.
<sergiocampama>
ok…
<r0bglees0n>
obv stuff like x = 5; x += 0; will give you the same object, but x is being reassigned and no mutation happens on 'x'.
<apeiros>
I think matz also didn't want the implications of when ++x and x++ are executed
<r0bglees0n>
yeah
<apeiros>
sergiocampama: also think of String#+
<r0bglees0n>
post/prefix is annoying sometimes
senayar has quit [Remote host closed the connection]
<r0bglees0n>
apeiros: any ideas for my q?
<apeiros>
what was your q?
<apeiros>
(didn't see it, sorry)
n_blownapart has quit [Remote host closed the connection]
<r0bglees0n>
if i wanted to implement a thread-safe counter in the database, would I need a lock anytime the counter is increased?
<apeiros>
hm, that might be two issues conflated into one
<apeiros>
your database doesn't know about your ruby threads.
<apeiros>
within ruby, you'd need a mutex to have a thread-safe counter
<r0bglees0n>
so, perform the addition in SQL
<apeiros>
in your database, you could probably do it with transactions and "good" sql
<apeiros>
i.e., col = col+1 with a transaction around it should suffice
<r0bglees0n>
im guessing if i did something like, read value, add to it in ruby, insert, id definitely need a lock of some kind but that sounds like the bad way to do it
<brisbin>
if you increment in sql i don't think you'll need transaction since UPDATE is atomic
xcv_ has quit [Remote host closed the connection]
<brisbin>
if you read, modify write, then a transaction would be needed
<r0bglees0n>
thanks
<r0bglees0n>
id definitely do it in SQL then
<brisbin>
i'm just guessing though, no expert
<r0bglees0n>
it seems like the database should handle that to me
<apeiros>
write a procedure :-D
<r0bglees0n>
write a ruby DSL to generate SQL procedures
<r0bglees0n>
instant gem hit
<r0bglees0n>
apeiros: have you used hstore yet
<apeiros>
in a trigger, yes
<apeiros>
unhappy about it, though. will probably rewrite it.
frem_ has joined #ruby
<r0bglees0n>
I used it with AR
Eiam has joined #ruby
dhruvasagar has quit [Ping timeout: 256 seconds]
<r0bglees0n>
the abstractions AR provides for it are crappy(AR3), support is "native" on AR4, but _no_ abstractions around the queries.
<r0bglees0n>
rails cant understand that or i dont know how to make it understand that
<r0bglees0n>
so I use santize("key-name")
smathieu has joined #ruby
<r0bglees0n>
but an abstraction like, Foo.store(:hstore_column).key? "key-name" would be a nice little abstraction for that
<r0bglees0n>
A hash-like API to perform a queries like that
<r0bglees0n>
probably 3 hours work
dhruvasagar has joined #ruby
bleubeard has joined #ruby
saarinen has quit [Quit: saarinen]
kaspergrubbe has joined #ruby
Xeago has joined #ruby
bleubeard has quit [Remote host closed the connection]
bradhe has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
habanany has joined #ruby
khismetix has joined #ruby
ewnd9 has quit [Remote host closed the connection]
banisterfiend has joined #ruby
<apeiros>
r0bglees0n: then get started already! :D
colonolGron has joined #ruby
jp- has joined #ruby
<apeiros>
I'll time you
<r0bglees0n>
haha, its saturday
ewnd9 has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Quit: tjbiddle]
<r0bglees0n>
apeiros: when you start a random idea do you prototype in a single file
colonolG1on has quit [Ping timeout: 276 seconds]
zmike1234 has quit [Quit: ~]
<apeiros>
r0bglees0n: don't make up excuses. get coding already! you've got 2h 57min left
<r0bglees0n>
lol
<apeiros>
r0bglees0n: depends. sometimes I start with the full structure fleshed out.
<r0bglees0n>
wow really?
<r0bglees0n>
sounds like that would slow you down
KevinSjoberg has joined #ruby
<apeiros>
if I already know the complete layout of the classes? why would it?
fyz1x has joined #ruby
sepp2k1 has joined #ruby
<r0bglees0n>
well, i guess because of the unexpected, maybe that class just doesn't make sense or needs to go somewhere else when you start to write code and see things you didnt account for
<waxjar>
apeiros is a superhero, don't forget that!
<apeiros>
meh. I've >20 years of coding experience. either I have a pretty clear idea of something, and then my initial setup won't be too far from the final one, or I don't have one, and then I'll go differently about it.
Al_ has joined #ruby
colonolG1on has joined #ruby
<r0bglees0n>
yeah
sepp2k has quit [Ping timeout: 240 seconds]
<r0bglees0n>
i guess my biggest obstacle isn't mapping files/classes but choosing a project name that i'll need to change in so many files
<apeiros>
but "not a clear idea about it" is usually either because I'm implementing somebody else's idea, and then I'll go with creating mock-ups
axl_ has left #ruby [#ruby]
<banisterfiend>
apeiros: what language did you start with?
<apeiros>
or because the issue is very complex, and then it's completely dependent on the precise situation how I'd go about it
<r0bglees0n>
thats why i prototype in a script & at the toplevel(no namespace, or just a dumb placeholder)
<apeiros>
banisterfiend: hypertalk :)
cj3kim has joined #ruby
<banisterfiend>
apeiros: cool, where did you go from there?
<apeiros>
a tiny bit of C, then perl
<apeiros>
from perl to php
<apeiros>
and from php to ruby
<apeiros>
some side-dishes
<apeiros>
the only languages I can claim >5y of experience are perl, php and ruby, though.
Davey has quit [Quit: Computer has gone to sleep.]
<apeiros>
and php is the only odd-one out, as it's the only language I didn't like coding in.
<r0bglees0n>
PHP definitely gives a solid foundation on some good techniques, patterns, and styles to use when writing code.
<Eiam>
is any part of the web fronted stack still around after 5 years?
<Eiam>
just javascript
colonolGron has quit [Ping timeout: 276 seconds]
<Eiam>
r0bglees0n: I would hum, not agree with that..
<apeiros>
Eiam: well, perl, php, ruby, javascript, html and css are all >5y old
<Eiam>
apeiros: i was on the fence about counting css, it has changed substantially in 5 years
<apeiros>
r0bglees0n: when I switched from perl to php it was mainly because all "designers" only knew php. I never understood why somebody would use php over perl. it's inferior in every regard.
<Eiam>
javascript not so much
colonolGron has joined #ruby
arya_ has quit [Read error: Connection reset by peer]
cj3kim has quit [Read error: Connection reset by peer]
<r0bglees0n>
apeiros: luckily I missed the rise of PHP by a few years
arya_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
spidergears_ has quit [Remote host closed the connection]
cj3kim has joined #ruby
vlad_starkov has joined #ruby
<shaman42>
php still hast the most usable documentation which I have seen so far.
spidergears_ has joined #ruby
colonolG1on has quit [Ping timeout: 268 seconds]
<apeiros>
shaman42: that was its only saving grace
<apeiros>
but it was dearly needed too, as it was (is) inconsistent as hell
<apeiros>
shaman42: though, perls documentation is still awesome too
CogitoAbsurd has joined #ruby
<apeiros>
little is as thorough as perls pods
<apeiros>
and it's very entrenched in the community too
<CogitoAbsurd>
I am trying to get code completion to work in eclipse... but it only shows things that are NOT in the ruby core...
<CogitoAbsurd>
looked all over the internet can't find anytyng
<CogitoAbsurd>
anything*
<shaman42>
apeiros: never seen it before now and that does look very nice indeed.
enebo has quit [Read error: Connection reset by peer]
Al_ has quit [Read error: Connection reset by peer]
<CogitoAbsurd>
Has anyone had issues with getting code completion in eclipse for the ruby core?
Al__ has quit [Client Quit]
enebo has joined #ruby
decoponio has quit [Quit: Leaving...]
<Eiam>
my first language was c++
Kricir has quit [Ping timeout: 256 seconds]
<Eiam>
and I've forgotten all of it
<Eiam>
I consider myself lucky to have forgotten it =)
<Eiam>
I had to implement linked lists, doubly linked lists, sorts, hashes, arrays & so on in C++, so I'm thankful for the 'fundamentals' but, glad to be out of that business!
Demo_of_doom has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
* Eiam
gives ruby a hug for letting him get real work done
<apeiros>
I love the fundamentals
Al_ has joined #ruby
<apeiros>
but it's true, if you keep working on those, you'll rarely ever get a "complete" program
Lewix has quit [Ping timeout: 276 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
<Eiam>
^
`MArceLL` has joined #ruby
<Eiam>
every time I sit down and refactor a bunch of code to make it better
<Eiam>
I have to go run all the tests against
<Eiam>
verify non testable parts still function
<Eiam>
just to "clean up" the backend that no one sees but me
<Eiam>
a constant battle of my own will to do it & not
Krajsnick has quit [Remote host closed the connection]
n_blownapart has joined #ruby
benlieb has joined #ruby
wesside has joined #ruby
jrdint has joined #ruby
<jrdint>
hi
mityaz has quit [Quit: See ya!]
teddyp1cker has quit [Remote host closed the connection]
St_Marx has quit [Remote host closed the connection]
n_blownapart has quit [Remote host closed the connection]
rodacato has joined #ruby
SecretAgent has quit [Ping timeout: 264 seconds]
Al_ has quit [Read error: Connection reset by peer]
Al_ has joined #ruby
`Chris` has quit [Read error: Connection reset by peer]
vasilakisFiL has left #ruby ["Konversation terminated!"]
`Chris` has joined #ruby
habanany has quit [Quit: habanany]
Al_ has quit [Client Quit]
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
lemonsparrow has left #ruby [#ruby]
jrdint has quit [Ping timeout: 250 seconds]
benlieb has quit [Quit: benlieb]
tgunr has quit [Quit: Nity nite]
kaspergrubbe has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
Andrevan has joined #ruby
wesside has quit [Quit: I think I heard an ice cream truck..]
BizarreCake has quit [Ping timeout: 264 seconds]
kaspergrubbe has quit [Read error: Connection reset by peer]
colonolGron has quit [Quit: Lost terminal]
shreya_ has quit [Remote host closed the connection]
senayar has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
bradhe has joined #ruby
bluOxigen has joined #ruby
IceDragon has quit [Ping timeout: 276 seconds]
IceDragon has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
senayar has quit [Ping timeout: 264 seconds]
<CogitoAbsurd>
hey the eclipse Dynamic Languages Toolkit (DLTK) doesn't seem to have rdocs for the ruby core... anyone?
<apeiros>
jp-: what? it cost like 30$ back when I bought it
<apeiros>
oh, wow
<jp->
i just looked and it's $70
<apeiros>
yeah, I just looked too
<apeiros>
quite an increase…
<jp->
yeah i'd say so, makes learning vim a lot more appealing… :)
<jp->
i use vim anyway, i tried sublime text out a while back but i never could stomach the cost.
<apeiros>
now even bbedit is cheaper than ST
<jp->
yeah, textwrangler is quite capable and free.
<banisterfiend>
emacs seems to be the editor of choice by the big guns, matz, jim weirich, zenspider, linus torvalds, simon peyton jones, eric raymond, banisterfiend
<apeiros>
jp-: well, I guess it depends on where you live. but here if you code for a living, 70$ isn't much.
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banisterfiend>
peter norvig also uses emacs iirc, the CTO of google
<CogitoAbsurd>
so I am guessing no one here uses eclipse?
<apeiros>
I mean consider apps like photoshop…
<apeiros>
CogitoAbsurd: very very few ruby coders use an IDE
<CogitoAbsurd>
being that I started with java and then did c# I feel eclipse would be a good way to go
<CogitoAbsurd>
ah
<Nilium>
I started with a bunch of things and I still think Eclipse is some sort of cruel joke on Java fetishists.
<apeiros>
:D
<jp->
people that use photoshop (legitimately) usually have a financial institution backing the bill or are in a line of business where it pays itself off fast
ewnd9 has quit [Ping timeout: 276 seconds]
<apeiros>
jp-: if you code for a living, you should be able to afford $70 for your main tool
* Nilium
has paid for the E text editor, Textmate, and Sublime.
relix has joined #ruby
<Nilium>
They've all managed to more or less pay for themselves.
<Nilium>
E is dead, FYI, don't go looking for it.
IceDragon has quit [Ping timeout: 264 seconds]
<Andrevan>
I paid for rubymine once
<Andrevan>
it was $50 or something
<Nilium>
I paid for IntelliJ when it was on sale last year.
<CogitoAbsurd>
90$ last time i checked
<Nilium>
So I sort of have RubyMine already.
Kricir has joined #ruby
soulcake has quit [Read error: Connection reset by peer]
<jp->
*shrug*, i've bought a lot of software over the years but i've never paid that much for a text editor, all i'm saying. :)
<Nilium>
Never used it for Ruby stuff though. I'm mostly of the opinion that IntelliJ should be strictly Java because Java practices do not map well to non-Java projects.
<CogitoAbsurd>
well me preferring an IDE and also not using a command line probably puts me in the minority
soulcake has joined #ruby
<jp->
and yes, i do write code on and off the job. i'd get laughed out the door if i asked for approval to buy a $70 text editor at work. :)
<Nilium>
As far as Ruby is concerned, it probably actually does
<Nilium>
So just buy it for yourself if you like it.
<Nilium>
It has an infinite trial version.
IceDragon has joined #ruby
Al_ has joined #ruby
<Nilium>
It's basically a game plus $10, assuming you've bought games in the last 5 years or so.
<apeiros>
jp-: I'd leave such a workplace immediatly
<jp->
i bought a game today, Trine for $.99 on the mac app store. :)
<apeiros>
jp-: do they force you to write your code with paper and pencil too?
<apeiros>
because, you know, a computer would be like… expensive…
<jp->
apeiros, no pen and paper with white out
<jp->
erasers are a luxury.
<CogitoAbsurd>
I was at a job like that once, got out of that hell hole as soon as I could. best choice i ever made
<apeiros>
I'm being absolutely serious btw.
<Nilium>
I can't find jobs that don't have really absurd job requirements. :|
Kricir has quit [Ping timeout: 264 seconds]
<banisterfiend>
jp-: trine is an awful game
<banisterfiend>
looks pretty, but by god is it boring
* Nilium
punches banisterfiend
<apeiros>
if the company doesn't consider the tools you work with important enough to shell out 70$, it's a crap place to work.
<Nilium>
Actually, Trine 1 does suck. Trine 2 is better.
mercwithamouth has joined #ruby
<banisterfiend>
all these beautiful backgrounds that oyu cant interact with
<CogitoAbsurd>
the only thing I want with my current job is to be doing Rails instead of asp MVC
<banisterfiend>
it's just a simple side scroller as far as i can make out
cj3kim has quit [Remote host closed the connection]
<jp->
banisterfiend, that's all it is, but then i was born in the early 80's and grew up on side scrollers with the exception of zelda, ff, dragon warrior, etc...
<Nilium>
I wouldn't want to do rails or ASP at ajob.
<Nilium>
That sounds like a punishment.
futile has joined #ruby
<futile>
oops
<banisterfiend>
jp-: then download 'dolphin' wii emulator and play the new super mario brothers ;)
<CogitoAbsurd>
well if you are doing web development, anything else would be worse... right?
<jp->
banisterfiend, i've got a wii and the new super mario brothers :p
<Nilium>
I suppose, but web development's basically a living hell.
<Nilium>
It's the most boring thing I can possibly imagine.
<futile>
[crosspost from #ruby-lang]
<futile>
how can i make exceptions on the main thread show up (or catch them) after an at_exit handler has joined a background thread?
<CogitoAbsurd>
well I agree. no one ever would have created the web the way it is now to do the things we are doing with it now.
_Andres has quit [Quit: jazz]
<futile>
test case: t = Thread.new {loop{}}; at_exit {t.join}; raise Exception.new
<Nilium>
I'm probably biased since I've always done game development and desktop applications.
<CogitoAbsurd>
also not having a good vertical alignment across the board thing is way way way overdue..
<Nilium>
I get to play with the cool tools.
<banisterfiend>
Nilium: desktop applications using which framework?
Cyrus has joined #ruby
<Nilium>
wxWidgets originally, until I moved entirely to Mac OS and ergo Cocoa because it turns out the only credible cross-platform GUI library is QT, and I hate it with a passion.
<banisterfiend>
Nilium: cocoa using objc?
<Nilium>
Obj-C, MacRuby, etc.
<futile>
#macruby
<banisterfiend>
obj-c and cocoa are beautifully designed but by god i hate the obj-c syntax
<Nilium>
Yeah, it's not the best.
<jp->
amen.
<Nilium>
It's improved quite a bit, at least, compared to when I started using it 5 years ago.
<banisterfiend>
Nilium: yeah there's more literal syntax in one of the recent releases right?
jmimi has quit [Quit: Leaving.]
<Nilium>
Literals, closures, no more retain/release, and so on.
<Nilium>
It doesn't fix the method calling syntax most people hate, but I mostly like that it more or less makes it clear what an argument is.
shadoi has quit [Read error: Connection reset by peer]
<CogitoAbsurd>
just be glad you don't have to do app development with javascript... just kill yourself first
shadoi has joined #ruby
<Nilium>
I've done some JS stuff, but nothing extensive.
<banisterfiend>
CogitoAbsurd: app development with coffeescript and marionette isn't bad
intuxicated has quit [Ping timeout: 245 seconds]
<Nilium>
CoffeeScript is nice, though I don't know if the debugging issue was ever resolved
<CogitoAbsurd>
well I just submitted an app to the apple store constructed with appcelerator
<banisterfiend>
Nilium: it's not really an issue
<Nilium>
On the upside, the output javascript is fairly readable and it's got a uniform syntax to it, so that's a huge plus.
<banisterfiend>
Nilium: the javascript that is generated is often pretty simple
<banisterfiend>
Yeah
<CogitoAbsurd>
in 2 months, starting by never doing anything major in javascript or and mobile apps...
leonidlm has joined #ruby
<CogitoAbsurd>
for one javascript does not have a for each loop...
timonv has joined #ruby
<Nilium>
Well, it sort of does.
<banisterfiend>
CogitoAbsurd: then use coffeescript?
<CogitoAbsurd>
yes it has .forEach but there is no way to break it
<Nilium>
Just.. not the kind you're thinking of.
intuxicated has joined #ruby
<CogitoAbsurd>
so you will end up using for(var i.. blah blah to get performance
<Nilium>
No, I mean it has for (x : y) which is _sort of_ a for-each but not really.
<CogitoAbsurd>
yeah not really great for readability
<jp->
javascript isn't that bad, between jquery and the debuggers built in to web browsers these days it's pretty simple to work with.
Olipro has quit [Ping timeout: 260 seconds]
<zendeavor>
that's no excuse
<Nilium>
Javascript is alright. Its issue is that it's in browsers.
<CogitoAbsurd>
and all normal stuff most langaugues just start with, in javascript they are libraries you add
<Eiam>
jp-: weird, my boss bought us all copies of sublime text =)
<CogitoAbsurd>
like underscore
<zendeavor>
javascript has a book dedicated to the good parts
<zendeavor>
it's 10% of the size of the full guide to javascript.
<zendeavor>
that's a problem, man.
<banisterfiend>
ES6 has co-routines \o/
<jp->
lol, yeah i guess i hear you.
<banisterfiend>
check this out: taskjs.org
<zendeavor>
let's just write raw ecma
<CogitoAbsurd>
Its not so bad on the web when your not constructing a whole app with it... but when you have to do that... the issues come out of the woodwork
<jp->
Eiam, that's awesome, think he'll hook me up with a license?
<banisterfiend>
CogitoAbsurd: you're*
<Eiam>
jp-: if you worked for him I'm sure he would =)
Olipro has joined #ruby
ebanoid has joined #ruby
<Eiam>
he also just bought us all vmware for vagrant too
Davey has joined #ruby
<jp->
sweet (i'm not sure what vagrant is)
<Nilium>
Is there an acceptable solution to the whole lack of require/include thing in Javascript yet, or are people just hacking it and hoping for the best?
Al_ has quit [Read error: Connection reset by peer]
<banisterfiend>
CogitoAbsurd: again, why not use coffeescript?
<Eiam>
Nilium: AMD & Require.js
<Eiam>
banisterfiend: uh, no
<Eiam>
banisterfiend: bad banisterfiend
<CogitoAbsurd>
no solution
Matriks has quit [Remote host closed the connection]
Al_ has joined #ruby
<CogitoAbsurd>
just use commonjs for everything
<banisterfiend>
Eiam: ?
<Eiam>
banisterfiend: coffee script is just a tool making a deeper problem
<Eiam>
using it won't remove the problem
<Eiam>
it just hides it until you have to go deal with it anyway.
<banisterfiend>
Eiam: are you going to back that up or just say it?
<zendeavor>
can we all just write raw ecmascript instead
<Eiam>
banisterfiend: sure. When I debug code, I debug code I wrote. Unless its coffee script, in which case its not code I wrote
<Eiam>
it just adds another layer onto a ridiculously layered development stack already (the web)
<banisterfiend>
Eiam: that really hasn't been an issue for me, the generated javascript is eminently readable for me
kaspergrubbe has joined #ruby
<Eiam>
I've tried to move to coffee script a few times but I can't get past that part
<banisterfiend>
Eiam: and after a while of using coffeescript you just know what kind of code will be generated
<Eiam>
and I figure, knowing javascript is a more marketable skill than coffeescript
<banisterfiend>
Eiam: then that's your own problem, it's certainly not a problem for most people i've talked to
<Eiam>
banisterfiend: one shouldn't use generating tools until they understand the language they are layering over
<banisterfiend>
Eiam: i didn't say a total noob should pick up coffeescript, when you're somewhat familar with js (spend about a month with it) then you can make a transition to coffeescript with minor hassles and huge wins
<Eiam>
a month with JS then move onto CS??
<banisterfiend>
Sure
<banisterfiend>
assuming you're not a noob to programming in general
<Eiam>
banisterfiend: well, we aren't going to convince each other to change our views here, clearly I disagree
<Eiam>
I'm ok with that =)
<banisterfiend>
if you know another dynamic language like python or ruby, then one month with js should be enough
<zendeavor>
most of it's self-explanatory...
noyb has joined #ruby
<Eiam>
trine is fune..
<Eiam>
Nilium: have to ignore the job requirements
<Eiam>
Nilium: I once looked at my jobs "requirements" when we were trying to hire another dude to work with me
<Eiam>
I didn't meet more than half the requirements
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Eiam>
the other half, I never did/used
<Nilium>
Eiam: 20 years of C#!
<Eiam>
Nilium: and yet there I was, doing that job =)
<Nilium>
Yeah, I'm starting to get that impression. I'll have to also ignore the whole over-achiever thing I do.
bklane has quit [Remote host closed the connection]
<Eiam>
Nilium: yeah, its totally just a HR dumping ground
<Eiam>
throw out lots of catch alls
<CogitoAbsurd>
HOLY CRAP! solved my problem! for some reason I was using Juno eclipse instead of Kepler.. I thought I downloaded the lastest last time (version numbers eclipse VERSION NUMBERS). anyway I now have code completion
<Eiam>
hope you get someone who thinks they can do some of it, learn the rest of it
<CogitoAbsurd>
well thats about 12hrs of work finally solved
<Andrevan>
CogitoAbsurd: I had a problem, then I used java(eclipse), now I have a ProblemFactory
<CogitoAbsurd>
lol
<jp->
man, i literally laughed at that
<jp->
on that note, i'm out. later on. :)
_seanc_ has joined #ruby
<CogitoAbsurd>
eclipse has a huge setup learning curve compared to most IDEs but hey I have already gotten over that hump
timonv has quit [Remote host closed the connection]
<Nilium>
Andrevan: I'm borrowing that.
_honning_ has quit [Ping timeout: 268 seconds]
baroquebobcat has joined #ruby
<Andrevan>
Nilium, go ahead, I didn't come up with it
<zendeavor>
he borrowed it too
<CogitoAbsurd>
has anyone done any game development in ruby?
<Nilium>
I'm trying to.
<zendeavor>
just like jwz borrowed "i used regex, now i have two problems"
<CogitoAbsurd>
is guso written in only ruby? like rubygame?
<banisterfiend>
CogitoAbsurd: c++
Al_ has quit [Quit: Al_]
<Andrevan>
no it's a C extention
<CogitoAbsurd>
even better!
<Andrevan>
banisterfiend, I ended up rolling my own little coordinate system and doing rotation with ruby Matrix
<banisterfiend>
Andrevan: weird, why?
<banisterfiend>
gosu has all that stuff built in :)
<Andrevan>
it was sort of a challenge/experiment, black box implementation of tetris
<Andrevan>
my def rotate is basically @shape.map{|arr|(Matrix[arr] * Matrix[[0,-1],[1,0]]).to_a.flatten}
<banisterfiend>
cool
<Andrevan>
and the pieces are defined like @shape = {I: [[1,0],[2,0],[3,0]],
Evixion has quit []
intuxicated has quit [Ping timeout: 264 seconds]
<banisterfiend>
nice
intuxicated has joined #ruby
askreet has joined #ruby
cooldman224 has joined #ruby
iliketurtles has joined #ruby
cj3kim has joined #ruby
frem_ has quit [Ping timeout: 264 seconds]
v0n has quit [Ping timeout: 264 seconds]
intuxicated has quit [Ping timeout: 245 seconds]
noyb has quit [Quit: leaving]
eldariof has quit [Ping timeout: 264 seconds]
agent_white has joined #ruby
benlieb has joined #ruby
arya_ has quit [Ping timeout: 264 seconds]
Spami has quit [Quit: This computer has gone to sleep]
AzizLight has quit [Quit: leaving]
maasdesigner1 has joined #ruby
maasdesigner1 has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maasdesigner1 has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
maasdesigner1 has quit [Client Quit]
zachrab_ has joined #ruby
intuxicated has joined #ruby
Fire-Dragon-DoL has joined #ruby
leonidlm has quit [Quit: Leaving]
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
askreet has quit [Quit: leaving]
CogitoAbsurd has quit [Quit: Page closed]
MrZYX is now known as MrZYX|off
lebek has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.0]
iliketurtles has quit [Quit: zzzzz…..]
iliketurtles has joined #ruby
lebek has quit [Read error: Connection reset by peer]
Z3tta has joined #ruby
atno has quit [Remote host closed the connection]
futile has left #ruby [#ruby]
intuxicated has quit [Ping timeout: 245 seconds]
Notte has quit [Remote host closed the connection]
the_fallen has quit [Remote host closed the connection]
codecop has quit [Read error: Operation timed out]
eoinkelly has joined #ruby
intuxicated has joined #ruby
nbouscal has quit [Read error: Connection reset by peer]
workmad3 has joined #ruby
dankest has joined #ruby
_seanc_ has quit [Quit: _seanc_]
smathieu has joined #ruby
<dankest>
.join #nginx
MrZYX|off is now known as MrZYX
adeponte has joined #ruby
maroloccio has joined #ruby
<r0bglees0n>
dankest: nope
Notte has joined #ruby
bobjohnson has joined #ruby
<bobjohnson>
I have a question. I'm trying to use passenger with two separate rails apps on the same host.
<zendeavor>
that's not a question!
<bobjohnson>
wait, there's more!
smathieu has quit [Ping timeout: 276 seconds]
<bobjohnson>
..and the problem is, as instructed, I deploy RVM / Ruby / Rails on a per-user basis, since multiple sites are hosted on the same CentOS box.
iliketurtles has quit [Quit: zzzzz…..]
<bobjohnson>
..so I deploy passenger under one specific user, to help rails easily integrate with apache, and now, when I create a new user and deploy RVM / Ruby / Rails for that user, when I try to use passenger, apache is obviously trying to access the passenger instance tied to the first user, and thus, it fails due to permission issues.
hadees has quit [Ping timeout: 256 seconds]
rodacato has quit [Remote host closed the connection]
<bobjohnson>
in a multi-user environment, are you supposed to deploy passenger at the root level, so multiple applications can use it? My understanding was, you don't want to deploy ruby at the root level at all, for a variety of reasons.
<bobjohnson>
I'm having a time finding any information on this topic online, I've been googling on and off for days.
iliketurtles has joined #ruby
<bobjohnson>
apparently no one encounters this issue, which makes no sense to me.
<agent_white>
Proc is just a synonym for lambda, correct?
icy` has quit [Quit: Leaving]
Nisstyre-laptop is now known as Nisstyre
<waxjar>
incorrect
codecop has joined #ruby
<agent_white>
Perfect thank ya
<zendeavor>
perhaps you would want to inquire with the #passenger folks
<zendeavor>
or the #httpd people
<zendeavor>
seems to me the problem is in one of those
<bobjohnson>
indeed, I just found those channels, thank you.
<bobjohnson>
not many people there, hopefully someone's around.
eoinkelly has quit [Quit: eoinkelly]
kirun has quit [Quit: Client exiting]
apeiros_ has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
<zendeavor>
well, you might get lucky here but ruby is only incidentally involved
<bobjohnson>
sure.
<zendeavor>
be sure to note that you're cross-posting
agent_white has quit [Quit: leaving]
<zendeavor>
and tell everyone when you get a solution so no one wastes time explaining it again.
xcv has joined #ruby
<zendeavor>
i'd love to help with the real problem but i don't use apache or passenger
hadees has joined #ruby
<banisterfiend>
proc is an alias for lambda on 1.8 ;) (but who cares about 1.8, right? right?)
henn has joined #ruby
<Eiam>
amen
vince_prignano has joined #ruby
<Eiam>
retired over a month ago
<Eiam>
released 5 years ago
_seanc_ has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<zachrab_>
can anyone explain this in ruby versions.sort_by do |(n,_),_|
<zachrab_>
the |(n,_),_|
<banisterfiend>
zachrab_: each element in versions should look like this: [[x, y], z]
<banisterfiend>
you're throwing away y and z and just keeping x
<Eiam>
zachrab: looks like they don't care about the other elements so throwing away
<zachrab_>
ah i see
<Eiam>
zachrab: _ in that context is a way to say "I don't want to declare a variable I'm not going to use"
<Eiam>
I should use that more often, I just do |a,b,c| =p
<banisterfiend>
Eiam: your explanation misses out the fact that the (,) destructures nested elements
<Eiam>
if I'm feeling macabre, |i,ii,iii|
codecop has quit [Remote host closed the connection]
<Eiam>
banisterfiend: yes, it does. yours clearly covers the () construct =)
iliketurtles has quit [Quit: zzzzz…..]
<Eiam>
banisterfiend: sokay, thats why there is more than one here =)
<banisterfiend>
hehe
Kricir has joined #ruby
thomasle_ has joined #ruby
tgunr has joined #ruby
jonkri has joined #ruby
bradhe has joined #ruby
bklane has joined #ruby
the_fallen has joined #ruby
xcv has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 240 seconds]
Mo0O has joined #ruby
<Mo0O>
hi, does application runing on ruby1.9.3 can run on ruby2.0.0 ?
Lewix has joined #ruby
Lewix has joined #ruby
MrZYX is now known as MrZYX|off
vlad_starkov has quit [Remote host closed the connection]
<apeiros_>
Mo0O: in most cases, yes
<Eiam>
Mo0O: mine had no problem
<Eiam>
Mo0O: use rvm/rbenv and try it out see what happens.
<zendeavor>
chruby!
<Eiam>
1.9 -> 2.0 wasn't the same kind of move as 1.8 -> 1.9
davehimself has joined #ruby
<Mo0O>
what a good news, thanks for your speed answer
* Eiam
showers karma upon apeiros_
<Mo0O>
^^
<apeiros_>
OO
* apeiros_
pulls out umbrella
<zendeavor>
bug-eyed freak
jonkri has quit [Quit: jonkri]
spider-mario has quit [Read error: Connection reset by peer]
TheComrade has joined #ruby
Davey has joined #ruby
Notte has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 240 seconds]
bradhe has quit [Remote host closed the connection]
<epitron>
Eiam: just to clarify, _ isn't a language feature.. it's just a naming convention
<Eiam>
epitron: right. Its a "way to say"
xcv has joined #ruby
Vert has joined #ruby
<epitron>
yes
<epitron>
but you're saying it to the user, not the language :)
S0da has joined #ruby
<Eiam>
ye
<Eiam>
yep
<epitron>
kekek
<apeiros_>
also to some IDEs
<epitron>
oh really?
gh has joined #ruby
<apeiros_>
e.g. rubymine will not issue "unused variable" warnings for _* named variables
<epitron>
hah
<epitron>
well, fancy that
<apeiros_>
yeah, once nice thing
Lewix has quit [Remote host closed the connection]
maasdesigner1 has joined #ruby
maasdesigner1 is now known as maasdesigner
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
<Eiam>
i kind of wish sublime text had something more obviously than the dotted lines
<apeiros_>
*one
<Eiam>
for some reason I still have a hard time aligning code blocks
the_fallen has quit [Remote host closed the connection]
<apeiros_>
Eiam: write a plugin?
<Eiam>
the line is too long I lose track of it as I follow it down
<Eiam>
maybe the one line that denotes your current indention scope should be bolder
<apeiros_>
um, ERRNO::EOTOOLONGMETHODS? :)
<Eiam>
apeiros_: lol this is just an $.ajax request =)
<Eiam>
so its maybe 10 lines?
gyre007 has joined #ruby
<Eiam>
i think its just how my eyes/brain do mapping, it just falls out of my brain when I'm trying to follow it
MrZYX|off is now known as MrZYX
<Eiam>
maybe ill look for a plugin =)
<banisterfiend>
Eiam: do you use callbacks or promises for ajax?
maasdesigner has quit [Client Quit]
<Eiam>
banisterfiend: this is just some jquery so success callbacks
gh has quit [Quit: Leaving]
<banisterfiend>
jquery is all about promises these days :)
<banisterfiend>
nearly everything returns a promise
<banisterfiend>
Eiam: promises are monads, they allow you to write async code as if it was sync (with a bit of syntactical fluff)
<apeiros_>
promises are renamed barriers?
<banisterfiend>
apeiros_: what's a barrier?
<Eiam>
oh
<Eiam>
this is like deferred in twisted
<banisterfiend>
Eiam: right, and like EM::Deferrable in event machine
<apeiros_>
banisterfiend: a construct for concurrency control
<banisterfiend>
except EM::Deferrable also misses the point of promises from my experience with it
<apeiros_>
sorry, watching sc2 atm - wikipedia or c2 surely have a good explanation
eka has quit [Quit: Computer has gone to sleep.]
cj3kim has joined #ruby
the_fallen has joined #ruby
gz0 has joined #ruby
Xeago has quit [Remote host closed the connection]
mary5030 has joined #ruby
mgorbach has joined #ruby
<banisterfiend>
apeiros_: reading the wikipedia article, i dont think they're like barriers. Promises are often used in event-loop situations where no threading is involved at all, but barriers seem to be a construct related to managing multiple threads afaict
MrZYX is now known as MrZYX|off
<banisterfiend>
never heard of them before though :)
thomasle_ has quit [Read error: Connection timed out]
<banisterfiend>
basically when you perform an async operation you get back a promise immediately which represents the future value
Davey has quit [Quit: Computer has gone to sleep.]
cj3kim has quit [Ping timeout: 240 seconds]
<banisterfiend>
you can pass that value arround, other objects can attach callbacks to it, and when the promise is finally fulfilled all the success callbacks execute at once
<banisterfiend>
further, and one of the coolest bits, you can attach success callbacks to it after the promise has already resolved, and the callbacks will be executed immediately
<apeiros_>
banisterfiend: while js is single threaded, callbacks/async are somewhat like "concurrency"
<apeiros_>
I used barriers to get rid of the callback mess
neonlex has joined #ruby
<banisterfiend>
oh ok, you should checkout promises too, they're pretty fun
<apeiros_>
i.e., foo.load(barrier.wait()); bar.load(barrier.wait()); baz.load(barrier.wait()); barrier.ready(function() { …foo, bar and baz are loaded… })
vince_prignano has quit [Remote host closed the connection]
<apeiros_>
instead of foo.load(function() { bar.load(function() { baz.load(function() { …foo, bar and baz are loaded… })})})
popl has quit [Quit: We must make an idol of our fear, and call it God.]
<apeiros_>
(additionally it's faster since bar doesn't have to wait for foo to load, and baz doesn't have to wait for foo and bar)
<apeiros_>
banisterfiend: yeah, seems like I should check out promises.
thomasle_ has joined #ruby
rodacato has joined #ruby
Nss has quit [Ping timeout: 264 seconds]
<zachrab_>
how can i get a error backtrace when i run a .rb file
<Eiam>
banisterfiend: I don;'t think there is much value in replacing a $.ajax({ url:blah, success: function(){}}; with a $.ajax({ url:blah}).done(function(){}); if your done does nothing beyond update a local value
<Eiam>
banisterfiend: since they will both be called back when the request is done
<Eiam>
successfully
<banisterfiend>
apeiros_: ah ok, with promises that would probably look like: $.when(foo.load(), bar.load(), baz.load()).then -> ..foo..bar..baz.. are loaded, do something
<apeiros_>
banisterfiend: yeah, so $.when acts like a barrier IMO
<Eiam>
but for having to build more complex state on top of it.. sure
<zachrab_>
Eiam: how can i get ruby file.rb to give me error backtrace?
<apeiros_>
zachrab_: getting a backtrace is the default
vlad_starkov has joined #ruby
<zachrab_>
apeiros_: how can i get a line number
<apeiros_>
zachrab_: i.e. if you don't get one, you have some code in there which suppresses it
<apeiros_>
zachrab_: that'd be part of the default backtrace
<apeiros_>
if you write code, it's in the exception object. e.g. `begin; …code which raises…; rescue exc; puts exc.backtrace; end`
<apeiros_>
and if you don't have an exception, you can use Kernel#caller
<zachrab_>
apeiros_: im working with a gigantic codebase any way to override for one file?
adeponte has quit [Remote host closed the connection]
<apeiros_>
blerp? does eval-in show '1' or is it just me again seeing only the `=> `
<r0bglees0n>
id almost say, dont use timeout
Lewix has quit [Remote host closed the connection]
<r0bglees0n>
esp if you arent sure if it can interrupt your block or not
<gyre007>
apeiros_: why ?
<apeiros_>
gyre007: run the pasted code in irb. Timeout does very well interrupt the block
<apeiros_>
but you have to be aware that it might be *anywhere* within the block
<apeiros_>
so unless your code is transactional, you're up for some fun
<gyre007>
yeah I think it's the mongoid stuff...
<gyre007>
but i hoped timeut block would simply terminate the whole operatoin...
<gyre007>
but i see the point...
<r0bglees0n>
thats just the wrong way to do it
<apeiros_>
but your code looks like your reasoning is that if it reaches line 7, the block was not interrupted - which is completely wrong reasoning.
<r0bglees0n>
youre not telling mongo to gracefully kill the connection
<r0bglees0n>
its just a "STOP, OK, SWITCH"
<apeiros_>
reaching line 7 only means that Timeout::Error was raised in line 2-5
Shirakawasuna has joined #ruby
jonathanwallace has joined #ruby
<gyre007>
Im just a SysAd trying to learn a bit of ruby so take it easy on me please :)
<apeiros_>
gyre007: it's nothing personal. only explaining :)
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
<gyre007>
no probs
baroquebobcat has quit [Quit: baroquebobcat]
benlieb has joined #ruby
<apeiros_>
ah, one thing to be aware too - C code can be atomic to ruby. i.e. another thread my have raised an exception a long time ago on a thread which is running a long/slow piece of C code
<gyre007>
so the way to do this is to kill the connection in the timeout error exception handler somehow...
<apeiros_>
though, I'm not so sure whether that still stands as of 1.9
<r0bglees0n>
and if there's nothing managing the threads but the thing you've killed..
eoinkelly has joined #ruby
<r0bglees0n>
anyway, that should probably be handled in the library differently but could be a problem
intuxicated has quit [Ping timeout: 240 seconds]
djdee has quit [Read error: Connection reset by peer]