amargherio has quit [Remote host closed the connection]
Trynemjoel has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
trinaldi has quit [Quit: zzz]
benlieb has quit [Quit: benlieb]
snockerton has quit [Quit: Leaving.]
IrishGringo has quit [Ping timeout: 250 seconds]
n008f4g_ has quit [Ping timeout: 252 seconds]
freerobby has joined #ruby
Trynemjoel has quit [Ping timeout: 244 seconds]
baweaver has quit [Remote host closed the connection]
bhaak has joined #ruby
freerobby has quit [Quit: Leaving.]
lvn has joined #ruby
vikaton has joined #ruby
A124 has joined #ruby
pandaant has quit [Remote host closed the connection]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
hiljusti has quit [Ping timeout: 252 seconds]
solocshaw has joined #ruby
baweaver has joined #ruby
wldcordeiro has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
haylon has joined #ruby
LoneHerm_ has joined #ruby
solocshaw has quit [Quit: solocshaw]
fmcgeough has quit [Quit: fmcgeough]
blackmesa has joined #ruby
benlieb has joined #ruby
duckpupp1 has joined #ruby
_wwwbukolaycom has joined #ruby
baroquebobcat has joined #ruby
duckpupp1 has quit [Ping timeout: 246 seconds]
jayc0b0 has joined #ruby
zenlot_away is now known as zenlot
trosborn has joined #ruby
lemur has joined #ruby
htmldrum has quit [Ping timeout: 276 seconds]
graydot has quit [Read error: Connection reset by peer]
graydot has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
baweaver has joined #ruby
lemur has quit [Ping timeout: 250 seconds]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgpawletko has joined #ruby
mikeiniowa has joined #ruby
solocshaw has joined #ruby
fmcgeough has joined #ruby
amclain_ has joined #ruby
DLSteve has joined #ruby
eregi has joined #ruby
baweaver has quit []
haylon has quit [Quit: WeeChat 1.4]
Aviio has quit [Remote host closed the connection]
ta_ has quit [Ping timeout: 246 seconds]
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
j3r0 has joined #ruby
amclain_ has quit [Ping timeout: 260 seconds]
djbkd has quit [Read error: Connection reset by peer]
eregi has quit [Ping timeout: 252 seconds]
djbkd has joined #ruby
djbkd has quit [Client Quit]
LoneHerm_ has quit [Remote host closed the connection]
freerobby has joined #ruby
tenderlo_ has quit [Read error: No route to host]
wldcordeiro has joined #ruby
darkf has joined #ruby
tenderlove has joined #ruby
ensyde_ has joined #ruby
LoneHerm_ has joined #ruby
lele has joined #ruby
x77686d has quit [Quit: x77686d]
ready has joined #ruby
ready has quit [Client Quit]
fmcgeough has quit [Quit: fmcgeough]
intrigueD has quit [Remote host closed the connection]
Respek has quit [Quit: gone to sleep. ZZZzzz…]
Cohedrin has joined #ruby
baweaver has joined #ruby
DmitryBochkarev has joined #ruby
sp4rrow has joined #ruby
podman has joined #ruby
Xiti has joined #ruby
idefine has quit [Remote host closed the connection]
QORRiE has quit [Read error: Connection reset by peer]
sudoubuntu has joined #ruby
matp has joined #ruby
marr has quit [Ping timeout: 250 seconds]
graphettion has joined #ruby
griffindy has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
trosborn has quit [Quit: trosborn]
dlitvak has joined #ruby
spuk has joined #ruby
freerobby has quit [Quit: Leaving.]
FernandoBasso has quit [Quit: Leaving]
deuxclique has joined #ruby
jesterfraud has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
chouhoulis has quit [Ping timeout: 248 seconds]
duckpupp1 has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
robbyoconnor has quit [Excess Flood]
lvn has quit [Ping timeout: 253 seconds]
htmldrum has joined #ruby
duckpupp1 has quit [Ping timeout: 246 seconds]
SCHAAP137 has quit [Remote host closed the connection]
allcentury has quit [Ping timeout: 246 seconds]
Respek has joined #ruby
aryaching has joined #ruby
chouhoulis has joined #ruby
B4daBing73 has joined #ruby
Respek has quit [Quit: gone to sleep. ZZZzzz…]
cdg has joined #ruby
idefine has joined #ruby
ta_ has joined #ruby
cdg has quit [Ping timeout: 250 seconds]
robbyoconnor has joined #ruby
B4daBing73 has quit [Quit: Leaving]
duckpupp1 has joined #ruby
mattwildig has joined #ruby
baweaver has quit [Remote host closed the connection]
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
ljames has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tlaxkit has quit [Quit: ¡Adiós!]
sgambino has joined #ruby
ta_ has quit [Ping timeout: 250 seconds]
sgambino has quit [Client Quit]
jenrzzz has quit [Ping timeout: 276 seconds]
mattwildig has quit [Ping timeout: 248 seconds]
diegoviola has quit [Quit: WeeChat 1.4]
graydot has quit [Quit: graydot]
jgpawletko has quit [Quit: jgpawletko]
rodolfowtf has joined #ruby
freerobby has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
hxegon has joined #ruby
aryaching has quit [Read error: Connection reset by peer]
aryaching has joined #ruby
LoneHerm_ has quit [Read error: Connection reset by peer]
mattwildig has joined #ruby
deuxclique has quit [Remote host closed the connection]
augcesar has quit [Remote host closed the connection]
lvn has joined #ruby
maletor has joined #ruby
maletor has quit [Client Quit]
binaryplease has quit [Ping timeout: 252 seconds]
maletor has joined #ruby
maletor has quit [Client Quit]
unreal_ has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
eregi has joined #ruby
unreal has quit [Ping timeout: 248 seconds]
uglybandersnatch has quit [Ping timeout: 260 seconds]
eregi has quit [Ping timeout: 252 seconds]
justbleed is now known as GETEMOUTTAHERE
Respek has joined #ruby
freerobby has quit [Quit: Leaving.]
safe has joined #ruby
freerobby has joined #ruby
chouhoulis has quit [Remote host closed the connection]
blackgoat has quit [Quit: WeeChat 1.4]
Chagel has joined #ruby
blackmesa has joined #ruby
volty has quit [Ping timeout: 246 seconds]
idefine has quit [Remote host closed the connection]
jottr has joined #ruby
benlieb has quit [Quit: benlieb]
blackmesa has quit [Ping timeout: 250 seconds]
uglybandersnatch has joined #ruby
goodcodeguy has joined #ruby
robbyoconnor has quit [Quit: Konversation terminated!]
idefine has joined #ruby
lessless has joined #ruby
<lessless>
hello folks! is it possible to receive a pair a values inside the block?
DLSteve has joined #ruby
jottr_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
idefine has quit [Ping timeout: 246 seconds]
statelesscode has joined #ruby
jottr has quit [Ping timeout: 248 seconds]
<epitron>
lessless: yep
tenderlove has quit [Remote host closed the connection]
<Ox0dea>
lessless: Certainly. Anything you can say in a method signature can be said in a block signature.
<lessless>
epitron, I mean current and next
<lessless>
sorry, for being unclear
<epitron>
lessless: each cons
<Ox0dea>
lessless: I think you might want each_cons(2)?
bronson has quit [Remote host closed the connection]
tenderlove has joined #ruby
<lessless>
I do not have control over the over the method enumerable method itself - it's a 'ActionView::FormBuilder#collection_check_boxes' - it takes a block and returns a collection of checkboxes. And I need to wrap each pair of checkboxes into a div
GETEMOUTTAHERE is now known as justbleed
<Ox0dea>
#each_slice, then.
gigetoo has joined #ruby
kies^ has quit [Quit: baaaaiiiiiiiiiii~]
deuxclique has joined #ruby
deuxclique has quit [Remote host closed the connection]
deuxclique has joined #ruby
ensyde_ has quit [Ping timeout: 250 seconds]
lacuna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
x77686d has joined #ruby
myntcake has quit [Ping timeout: 246 seconds]
sudoubuntu has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mjc_ has quit [Quit: Connection closed for inactivity]
shanemcd has joined #ruby
aaeron has joined #ruby
hxegon has quit [Ping timeout: 246 seconds]
chouhoulis has joined #ruby
kriskropd has joined #ruby
ericn81 has joined #ruby
freerobby has quit [Quit: Leaving.]
shanemcd has quit [Ping timeout: 248 seconds]
kies^ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
sudoubuntu has joined #ruby
mostlybadfly has joined #ruby
bronson has joined #ruby
robbyoconnor has joined #ruby
DmitryBochkarev has joined #ruby
bronson has quit [Remote host closed the connection]
astrofog has joined #ruby
rodolfowtf has quit [Quit: No Ping reply in 180 seconds.]
duncannz has joined #ruby
rodolfowtf has joined #ruby
freerobby has joined #ruby
zotherstupidguy has joined #ruby
astrofog has quit [Quit: Quite]
duncannz has quit [Remote host closed the connection]
duncannz has joined #ruby
krz has joined #ruby
jhack has joined #ruby
blackmesa has joined #ruby
mattwildig has quit [Remote host closed the connection]
stardiviner has joined #ruby
<havenwood>
shevy: nice
blackmesa has quit [Ping timeout: 246 seconds]
Chagel has quit [Remote host closed the connection]
pawnbox has joined #ruby
krz has quit [Ping timeout: 260 seconds]
deuxcliq_ has joined #ruby
rdavila has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
Chagel has joined #ruby
deuxclique has quit [Ping timeout: 248 seconds]
devbug has joined #ruby
eregi has joined #ruby
DmitryBochkarev has joined #ruby
LoneHermit has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DmitryBochkarev has quit [Client Quit]
DmitryBochkarev has joined #ruby
aaeron has quit [Quit: aaeron]
deuxcliq_ has quit [Remote host closed the connection]
eregi has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
rodolfowtf has quit [Read error: Connection reset by peer]
Chagel has quit [Remote host closed the connection]
adgtl has joined #ruby
adgtl has joined #ruby
FooMunki has quit [Quit: FooMunki]
rdavila has joined #ruby
sneakerhax has joined #ruby
x77686d has quit [Quit: x77686d]
elifoster has quit [Ping timeout: 252 seconds]
LoneHermit has quit [Ping timeout: 276 seconds]
leksster has joined #ruby
krz has joined #ruby
x77686d has joined #ruby
baweaver has joined #ruby
duckpupp1 has quit [Ping timeout: 260 seconds]
william3 has joined #ruby
ta_ has quit [Ping timeout: 252 seconds]
Chagel has joined #ruby
floatingpoint has joined #ruby
pawnbox has quit [Remote host closed the connection]
william3 has quit [Ping timeout: 246 seconds]
DLSteve has quit [Remote host closed the connection]
pdoherty has joined #ruby
makenoise has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
zast has joined #ruby
adgtl has quit [Remote host closed the connection]
Chagel has quit [Remote host closed the connection]
pawnbox has joined #ruby
jottr has joined #ruby
braincrash has joined #ruby
gix has joined #ruby
jottr_ has quit [Ping timeout: 276 seconds]
aupadhye has joined #ruby
howdoi has joined #ruby
Chagel has joined #ruby
Chagel has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 250 seconds]
bronson has joined #ruby
Chagel has joined #ruby
chipotle has quit [Ping timeout: 260 seconds]
lpvb has joined #ruby
aupadhye has quit [Quit: Leaving]
aupadhye has joined #ruby
rodolfowtf has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 252 seconds]
graphettion has quit [Remote host closed the connection]
dlitvak has joined #ruby
queequeg1 has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
DmitryBochkarev has joined #ruby
blackmesa has joined #ruby
chouhoul_ has joined #ruby
dlitvak has quit [Ping timeout: 276 seconds]
DmitryBochkarev has quit [Client Quit]
DmitryBochkarev has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
robbyoconnor has quit [Quit: Konversation terminated!]
blackmesa has quit [Ping timeout: 260 seconds]
rizenine has joined #ruby
nachoman has joined #ruby
elifoster has joined #ruby
jhack has quit [Quit: jhack]
plonk_ has joined #ruby
plonk_ has joined #ruby
plonk_ is now known as plonk
InternetFriend has joined #ruby
nachoman has quit []
LoneHermit has joined #ruby
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
sarlalia1 has joined #ruby
Rodya_ has joined #ruby
arlek has joined #ruby
dopamean_ has joined #ruby
sarlalia1 has quit [Client Quit]
makenoise has quit []
rodolfowtf has quit [Read error: Connection reset by peer]
aaeron has joined #ruby
godzillaenlacasa has joined #ruby
aaeron has quit [Client Quit]
LoneHermit has quit [Ping timeout: 246 seconds]
pawnbox has quit [Remote host closed the connection]
nachoman has joined #ruby
pawnbox has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ericn81 has quit [Remote host closed the connection]
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
djbkd has joined #ruby
djbkd has quit [Client Quit]
spuk has quit [Ping timeout: 260 seconds]
cdg has joined #ruby
djbkd has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
<epitron>
"Reduce system calls by activating the `did_you_mean` gem before requiring the gem. Activating the gem puts the gem on the load path, where simply requiring the file will search every gem that's installed until it can find a gem that contains the `did_you_mean` file."
<epitron>
hey, that's a neat trick!
<epitron>
probably still loads all the gemspecs in the universe though
<drbrain>
↑ is what bundler does
<epitron>
orly
makenoise has joined #ruby
<epitron>
doh. it only reduces the system calls from 3400 to 3300
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
tenderlove has quit [Remote host closed the connection]
uglybandersnatch has quit [Ping timeout: 276 seconds]
ruby-lang921 has joined #ruby
tjbiddle has joined #ruby
ruby-lang921 has quit [Client Quit]
bronson has joined #ruby
ruby-lang980 has joined #ruby
hayden_ has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug_ has quit [Ping timeout: 248 seconds]
bronson has quit [Ping timeout: 252 seconds]
the_drow has joined #ruby
antgel has joined #ruby
lee0417 has joined #ruby
lvn has quit [Ping timeout: 250 seconds]
hololeap has joined #ruby
Hounddog has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
skade has joined #ruby
mark1 has joined #ruby
mark1 has left #ruby [#ruby]
vdamewood has joined #ruby
tulak has joined #ruby
mark1 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
Amnez777 has joined #ruby
jenrzzz has joined #ruby
karapetyan has quit [Remote host closed the connection]
<TomyWork>
lately I don't think very highly of instantiating classes on deserialization :)
karapetyan has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
<hanmac>
i think thats one of the reasons why Autoloading is such an un-liked feature that matz wanted to remove it (or deprecate it) in the past
hahuang61 has joined #ruby
czerasz has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 246 seconds]
adgtl has joined #ruby
scope has joined #ruby
<scope>
hi guys anyone online
<scope>
need a little help
tjbiddle has quit [Quit: tjbiddle]
<xpt>
scope: Usually asking specific question helps fo achieve answer.
<scope>
haha sorry
<scope>
im trying to add some design to ROR
<scope>
i have 3 files i have created a html file which sets the canvas
<scope>
a css file and a js file
<scope>
i cant for the life of me figure out where they go i have so far placed them in assets
<scope>
i get this error message
<scope>
Asset was not declared to be precompiled in production. Add `Rails.application.config.assets.precompile += %w( matrix.css )` to `config/initializers/assets.rb` and restart your server
tranvuong has joined #ruby
<scope>
its supposed to be a raining code style background
dlitvak has joined #ruby
baweaver has joined #ruby
<xpt>
scope: try asking this question on #rubyonrails
Gasher has joined #ruby
<scope>
ok
<scope>
thanks anyway
mja has joined #ruby
Xeago has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
Freeaqingme has joined #ruby
Xeago has quit [Remote host closed the connection]
baweaver has quit [Ping timeout: 246 seconds]
ruby-lang608 is now known as lee0154
<lee0154>
hello
Xeago has joined #ruby
tranvuong has quit [Remote host closed the connection]
rdark has joined #ruby
ruby-lang980 has quit [Ping timeout: 252 seconds]
jayc0b0 has quit [Remote host closed the connection]
norc has joined #ruby
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mja>
hi, guys! I'm using BigDecimal to parse some financial data in form of numbers. I have some cases where the user has the ability to enter data. How could I raise error if the data is some characters, or a string but not a number? I mean, how the parsing of the input into BigDecimal could fail?
Snowy has joined #ruby
tjbiddle has joined #ruby
<norc>
mja: Are you perhaps looking for a gem like highline?
marr has joined #ruby
tjbiddle has quit [Client Quit]
<mja>
norc: let me check out
<norc>
mja: Anyway. A simple regex will solve your issue.
<norc>
This should be enough for you I think /\a[+-]?\d+\.?\d*\Z/
<mja>
norc: yeah, but I want to avoid of the overhead. Let's say I use something like Float("asd"), it will fail and raise exception.
<norc>
(highline just greatly simplifies the cli interaction with the user)
troulouliou_div2 has joined #ruby
<norc>
mja: Just test against the regex I mentioned above and raise and error if it does not match
<mja>
norc: okay, thanks. I'll check and the gem that you mentioned
hari_ has joined #ruby
<hanmac>
mja for financial stuff you might checkout the "money" gem
ferr has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
tomphp has joined #ruby
<mja>
hanmac: thanks, I'll do it
tomphp has quit [Client Quit]
trosborn has joined #ruby
tomphp has joined #ruby
vdamewood has quit [Ping timeout: 246 seconds]
htmldrum has joined #ruby
Xeago has quit [Remote host closed the connection]
trosborn has quit [Ping timeout: 276 seconds]
<lee0417>
hi guys, when learning meta programming, I found a concept that said `Class` is the object of itself. How to implement that concept?
trosborn has joined #ruby
lee0154 has quit [Quit: Page closed]
trosborn has quit [Client Quit]
william3 has joined #ruby
<norc>
lee0417: I do not understand your question. Can you rephrase it?
<hanmac>
norc: like its said something very "fatal" ;P hm i dont know why it has such a hidden class, but its for that cases for exceptions from the C-side which should not be catchable ... a fatal error does exit the entire ruby programm/interpreter
[gmi] has joined #ruby
dgncn has quit [Read error: Connection reset by peer]
dgncn has joined #ruby
<norc>
hanmac: Fair enough. Ill have to look into that later today.
<norc>
>> DidYouMean::ClassNameChecker::ClassName
<ruby[bot]>
norc: # => private constant DidYouMean::ClassNameChecker::ClassName referenced (NameError) ...check link for more (https://eval.in/528636)
n008f4g_ has quit [Ping timeout: 246 seconds]
<norc>
Funny things lying around.
croberts has joined #ruby
volty has joined #ruby
pawnbox_ has joined #ruby
pawnbox has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
william3 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
djbkd has quit [Remote host closed the connection]
jaruga has joined #ruby
Xeago has joined #ruby
baweaver has joined #ruby
jeanlinux has joined #ruby
trosborn has quit [Quit: trosborn]
darkf has joined #ruby
InternetFriend has joined #ruby
j3r0 has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
jeanlinux has quit [Ping timeout: 246 seconds]
william3 has quit [Remote host closed the connection]
InternetFriend has quit [Ping timeout: 276 seconds]
volty has quit [Quit: Konversation terminated!]
tulak has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<norc>
adaedra: The exercise was worth it. I learned that there is one core class that does not derive from Object -> Delegator. :)
<norc>
(Well and SimpleDelegator of course)
quaristice has joined #ruby
quaristice has quit [Client Quit]
UtkarshRay has joined #ruby
karapetyan has quit [Ping timeout: 276 seconds]
dlitvak has quit [Remote host closed the connection]
f4cl3y has joined #ruby
Chagel has quit [Remote host closed the connection]
troulouliou_div2 has quit [Quit: Leaving]
trinaldi has joined #ruby
Xeago has quit [Remote host closed the connection]
toretore has quit [Ping timeout: 260 seconds]
sdothum has joined #ruby
chouhoulis has joined #ruby
UtkarshRay has quit [Ping timeout: 250 seconds]
hayden_ has quit []
hayden_ has joined #ruby
chouhoulis has quit [Ping timeout: 260 seconds]
rodfersou has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
uglybandersnatch has quit [Ping timeout: 248 seconds]
<maximski>
i recently updated a gem in a project gemfile to use the github repository to fetch the gem but it still uses the old gem version (using rbenv), any idea why that might be?
blackmesa has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
lipoqil has joined #ruby
<maximski>
sorry, was my bad, already found the issue
LoneHerm_ has quit [Ping timeout: 252 seconds]
AbdulR3hman has quit [Ping timeout: 252 seconds]
mattwildig has quit [Ping timeout: 276 seconds]
binaryplease has quit [Ping timeout: 260 seconds]
cassioscabral has joined #ruby
cassioscabral has quit [Remote host closed the connection]
adgtl has quit [Remote host closed the connection]
zotherstupidguy has quit [Ping timeout: 260 seconds]
Ishido has joined #ruby
Mon_Ouie has joined #ruby
csmb has joined #ruby
Kruppe has joined #ruby
hadronzoo has joined #ruby
jpterry has joined #ruby
ghormoon has joined #ruby
ghormoon has quit [Max SendQ exceeded]
ghormoon has joined #ruby
Xeago has quit [Remote host closed the connection]
skade has joined #ruby
Foren has joined #ruby
allcentury has joined #ruby
GreyHands has joined #ruby
UtkarshRay has joined #ruby
jeanlinux has joined #ruby
vondruch has joined #ruby
william3 has joined #ruby
adgtl has joined #ruby
rizenine has quit [Remote host closed the connection]
schickung has joined #ruby
jaruga has quit [Ping timeout: 260 seconds]
scope has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
gregf has quit [Quit: WeeChat 1.4]
karapetyan has quit [Remote host closed the connection]
Aviio has joined #ruby
lessless has quit [Ping timeout: 276 seconds]
dlitvak has joined #ruby
<harryh>
i have an array pages = [{ order: 1 }, { order: 2 }, ...] and need to get the element where order == currentPage.order + 1, or order == 1 if it reaches the final page. im trying to use .select, but idk a clean way to do it, since .select returns an empty array if no elements are found, it seems, so `nextPage = foo.select{ |f| f.order == current.order+1 } || foo.select{ |f| f.order == 1 }` doesn't work. is there a clean way to do this?
mfaeh has quit [Remote host closed the connection]
Aviio has quit [Read error: Connection reset by peer]
Aviio_ has joined #ruby
william3 has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 246 seconds]
hololeap has quit [Ping timeout: 248 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
blackmesa has joined #ruby
Tempesta_ has joined #ruby
<norc>
harryh: By the way, no need to annotate multiple versions in your gist. Just update it, and others will see previous "attempts" in the revision history. :)
adgtl has quit [Remote host closed the connection]
UtkarshRay has joined #ruby
bronson has joined #ruby
<harryh>
norc: i never even realized there was a revision history for gists ha :p id rather just annotate to make it easier for someone to glance over since its a one liner though. TIL
<apeiros>
harryh: position the faster test first
<apeiros>
as a general advice
<apeiros>
gists can even be forked/cloned. they're git repos.
<norc>
harryh: Id say the best solution depends on what you are actually trying to do.
<harryh>
yeah. so any suggestions? im starting to think im going to need to do the first select, check to see if it's empty, then do the next
nocontrol has joined #ruby
<Aviio_>
Hi all - Anybody got experience with puppet?
<harryh>
im building a portfolio site for someone in middleman. he's going to be able to set an `order` variable for each page to dictate the order they are listed
bronson has quit [Ping timeout: 260 seconds]
<norc>
Aviio_: Ask your question instead of asking whether there is experienced people around.
<nocontrol>
I am trying to do a ping sweep => write results to the (postgre) database and it works fine in a frequency of 1 second repeats, but after some time it piles up somehow and fails https://gist.github.com/chrisvel/e1474c66fef6de1fda10
<nocontrol>
This is the problem I see "error_message"=>"could not obtain a connection from the pool within 5.000 seconds (waited 5.005 seconds); all pooled connections were in use"
<apeiros>
a wild indentation appears
<harryh>
at the bottom of each project page, there's a "Next Project" button that leads to the next project. so the fact that the client gets to set an order variable makes me not want to go on array size or anything
* apeiros
uses advanced reading skills
<norc>
nocontrol: Sounds like heroku.
<apeiros>
it's not very effective…
<nocontrol>
nope
<Aviio_>
So I have some puppet files that ive been provided with, I have a manifest named cleanup.pp and a module which is stored in a 'cleanup' directory named config.pp ( https://github.com/Aviio/SecGen/tree/directory_change/modules/build/puppet ) but when I try and provision them through vagrant I get an error ( Error: Could not find class cleanup::config for debian-607-x64-vbox4210 on node debian-607-x64-vbox4210 ), i
<Aviio_>
f I go onto the box both of the files are present and in the proper folders
<norc>
nocontrol: ActiveRecord?
<nocontrol>
norc: nope
<norc>
nocontrol: The problem is quite obvious though. You have only a limited set of pooled connections and no queueing mechanis,.
<nocontrol>
norc: just a vagrant ubuntu server on puma
<nocontrol>
norc: I see and it's logical... because it might open 255 connections at once
<nocontrol>
norc: but do you have any idea how to overcome this ?
<norc>
nocontrol: I dont even know which part is being pooled.
<norc>
nocontrol: You need to provide more information
<norc>
nocontrol: And this is why I wanted the stacktrace, you could have saved us both a lot of time if you had pasted it right at the beginning when I asked for it.
<norc>
You completely hid the fact that you are using sidekiq jobs here.
<n1colas>
Hello
InternetFriend has quit [Ping timeout: 244 seconds]
mattwildig has quit [Ping timeout: 244 seconds]
<nocontrol>
norc: I didn't hide this actually, sorry :)
vondruch has joined #ruby
pawnbox has quit [Ping timeout: 250 seconds]
<norc>
nocontrol: You did not even mention that you are running this from sidekiq jobs to begin with.
synthroid has joined #ruby
<nocontrol>
sorry
<nocontrol>
I would like to see why theoretically this is wrong
<nocontrol>
I got similar errors with Threads and the worst part is that after some time IF I don't end the processes manually by Ctrl+c, it freezes the vm
adgtl has joined #ruby
vasilakisfil_ has joined #ruby
<norc>
nocontrol: As I said, I wouldnt use shell ping but do it all in Ruby, that would not be an issue then.
<nocontrol>
it might be that the persistance of items to the db is slow so they pile up and overflow
william3 has joined #ruby
<norc>
nocontrol: No.
<norc>
nocontrol: Do you have other sidekiq jobs running?
<nocontrol>
norc: but the problem is not the shell ping but the connections to the db
<nocontrol>
norc: puma
<norc>
nocontrol: You said you had issues with freezing with threads etc, that was just my response to that.
<nocontrol>
norc: clockwork starts a job with the ping sweep
<nocontrol>
norc: as I decrease the frequency it's more likely for it to fail
johnmilton has joined #ruby
<norc>
nocontrol: There you go. Multiple concurrent workers.
<norc>
nocontrol: You have more concurrent workers than your connection pool size.
<nocontrol>
norc: possibly more than 5
vasilakisfil has quit [Ping timeout: 240 seconds]
karapety_ has joined #ruby
<nocontrol>
norc: but why? the ping sweep completes in 1.3sec
johnmilton has quit [Max SendQ exceeded]
schickung has joined #ruby
<norc>
nocontrol: If you have 6 concorrent jobs..
<nocontrol>
norc: the iteration happens every 5 sec or more
<nocontrol>
norc: is there any way to wait for the termination of the previous ones ?
johnmilton has joined #ruby
duckpupp1 has joined #ruby
<nocontrol>
norc: and what wound be the cons If I increased the number of concurrent workers to 10 or 15 ?
<norc>
nocontrol: Just resources. But if you have 10 concurrent workers which all use the database, it means they all need to be able to gain access within the timeout duration which is 5 seconds.
william3 has quit [Ping timeout: 244 seconds]
<norc>
If you cannot guarantee that, increase your connection pool size to have enough for your jobs and web users.
<norc>
nocontrol: Or better yet, use your redis queue that you already have!
<norc>
nocontrol: Pump the data you need to write back into redis and have another sidekiq job write them to the database maybe.
karapetyan has quit [Ping timeout: 268 seconds]
<nocontrol>
norc: the first suggestion makes sense
<nocontrol>
norc: the second one.. I don't get it at all :(
<norc>
nocontrol: If your actual jobs dont use the database, you are basically wasting database connections on your jobs for just inserting node data.
makenoise has joined #ruby
<norc>
nocontrol: So if you have 10 concurrent workers all doing their ping sweep, they would all feed the data back into redis.
<norc>
nocontrol: and next time, start with the stack trace... ;-)
adgtl has quit [Remote host closed the connection]
<nocontrol>
norc: they use the database. Actually the workflow is: Start Job => Do a ping sweep and append data to a hash/array => iterate array and persist them to the db
<nocontrol>
norc: this happens every 5 sec and I want to decrease it to 1 sec
<nocontrol>
norc: the ping sweep takes 1.2seconds in shell alone, so I am pretty close
<nocontrol>
norc: so I need the database in order to write the data and then show them in the frontend
karapety_ has quit [Remote host closed the connection]
<norc>
nocontrol: So?
IrishGringo has joined #ruby
Xeago has quit [Remote host closed the connection]
karapetyan has joined #ruby
shanemcd has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
terlar has joined #ruby
<nocontrol>
norc: it makes sense what you're saying because If the first one takes 5.5 seconds, the first and second ones will finish after the third begins
makenoise has quit [Remote host closed the connection]
<nocontrol>
norc: so there's a "line" where each one ends and another one or two or three start
<norc>
nocontrol: Just write the data back into your redis queue.
<nocontrol>
norc: I don't get it what redis have to do
<norc>
nocontrol: Do you know what redis is?
<nocontrol>
norc: I only use redis for sidekiq
<nocontrol>
norc: so far a key/value pair storage
shanemcd has quit [Remote host closed the connection]
<nocontrol>
in the form of hashes
<nocontrol>
but how could this help me ?
Mon_Ouie has quit [Ping timeout: 260 seconds]
swills has quit [Ping timeout: 260 seconds]
karapetyan has quit [Ping timeout: 248 seconds]
<norc>
nocontrol: You can simply take a redis list and push/pop from it.
chouhoulis has joined #ruby
<nocontrol>
norc: so to use it as a database storage ?
<norc>
More like a message broker.
shanemcd has joined #ruby
mfaeh has joined #ruby
lxsameer has quit [Quit: Leaving]
<norc>
nocontrol: One other solution - is to prevent overlapping jobs to begin with.
<nocontrol>
norc: I don't like using one gem for each problem
<nocontrol>
norc: do you think it's a problem of postgres finally ?
<norc>
nocontrol: You surely like using sidekiq for something its not meant for.
<nocontrol>
norc: why should Redis work and PostgreSQL not ?
<nocontrol>
or should I try using something like Mongodb ?
<norc>
nocontrol: The issue is you have multiple concurrent processes which try to make use of a limited connection pool.
chouhoulis has quit [Ping timeout: 276 seconds]
Snowy has quit [Remote host closed the connection]
<norc>
nocontrol: redis would work because it all works on the same connection.
<norc>
nocontrol: Your whole job design smells a bit funny though.
<nocontrol>
norc: it's a hobby project for learning purposes
tristanp has joined #ruby
<nocontrol>
norc: to keep a ping sweeper on the background running as a job
<norc>
nocontrol: If you want to learn, then use the right tools. ;-)
<nocontrol>
norc: and update live with websockers later
pandaant has quit [Remote host closed the connection]
<nocontrol>
norc: but it's not a problem for this project only
emilkarl has joined #ruby
<nocontrol>
norc: what If I had a website with several http requests to the db at once ?
<nocontrol>
norc: whould they fail ?
<norc>
nocontrol: Usually you have a set up with multiple http workers, each of which contains a connection pool.
<nocontrol>
norc: in this case they should be way more than just 255/second
<norc>
nocontrol: But you are correct that this can become a problem.
yardenbar has quit [Quit: Leaving]
<norc>
Which is why building robust websites that can handle hundreds of users is not trivial.
<nocontrol>
norc: so raise the workers amount or the pool size ? or both ?
_rsc` has left #ruby [#ruby]
<norc>
nocontrol: In your case I would seriously say neither.
<norc>
nocontrol: You are using sidekiq in a way its not meant to, and are trying to remedy your issues by scaling resources up.
jottr has joined #ruby
vdamewood has quit [Quit: Life beckons.]
<nocontrol>
norc: but except redis, you're not suggesting anything else ?
<norc>
[14:25] <norc> nocontrol: One other solution - is to prevent overlapping jobs to begin with.
Azulinho has joined #ruby
<nocontrol>
norc: with the gem you suggested ?
william3 has joined #ruby
<norc>
nocontrol: just dont use sidekiq for this.
<norc>
You dont need sidekiq.
<norc>
You just want cronjobs.
<nocontrol>
ok got it
aclearman037 has joined #ruby
<nocontrol>
at least I have some information to deal with
<nocontrol>
thank you
<norc>
nocontrol: in fact sidekiq does not even offer you the resolution to do something every second.
Chagel has joined #ruby
<nocontrol>
norc: but it lets you manage workers and jobs
schickung has left #ruby [#ruby]
william3 has quit [Remote host closed the connection]
jeanlinux has quit [Ping timeout: 248 seconds]
<norc>
nocontrol: Its for a different problem domain.
<norc>
nocontrol: You just want for something to happen periodically every n timeslots.
<norc>
While sidetiq (a sidekiq plugin of sorts) allows for something, its more designed to integrate the concept of cron into an existing sidekiq infrastructure.
eregi has joined #ruby
<nocontrol>
norc: I don't get it but most possibly I need to read a bit more
makenoise has quit [Remote host closed the connection]
ESpiney has joined #ruby
skade has joined #ruby
william3 has quit [Read error: Connection reset by peer]
codecop has quit [Remote host closed the connection]
sudoubuntu has joined #ruby
asahi has joined #ruby
crystal77 has joined #ruby
jaruga has quit [Quit: jaruga]
<asahi>
hello, I'm trying to upgrade my ruby to 2.2.4 but am getting this message BUILD FAILED (Ubuntu 14.04 using ruby-build 20160228-1-g5297dbc)
<asahi>
I'm using rbenv
ramortegui has joined #ruby
chouhoulis has joined #ruby
darkf_ is now known as darkf
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
Gasher has quit [Quit: Leaving]
vasilakisfil_ has quit [Remote host closed the connection]
vasilakisfil_ has joined #ruby
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
<nocontrol>
norc: I raised the clockwork to 10 seconds but it still fails. So it might be something else
<nocontrol>
norc: could not obtain a connection from the pool within 5.000 seconds (waited 5.001 seconds); all pooled connections were in use but the pool is 10 and my clockwork frequency is 20 secons
vondruch has quit [Quit: Ex-Chat]
grn has joined #ruby
shanemcd has joined #ruby
malconis has joined #ruby
vondruch has joined #ruby
jaruga has joined #ruby
last_staff has quit [Quit: last_staff]
andikr has quit [Remote host closed the connection]
haylon has joined #ruby
AlphaAtom has joined #ruby
jmignault has joined #ruby
justbleed has joined #ruby
JohnBat26 has quit [Ping timeout: 260 seconds]
m0rph has joined #ruby
aryaching has quit []
hxegon has joined #ruby
sgambino has joined #ruby
decoponio has joined #ruby
m0rph has quit [Remote host closed the connection]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nrsky has quit [Quit: Konversation terminated!]
jaruga has quit [Quit: jaruga]
mary5030_ has quit [Remote host closed the connection]
Macaveli has joined #ruby
jhack has joined #ruby
ralsh has joined #ruby
bronson has joined #ruby
kerunaru has joined #ruby
aganov has quit [Quit: Leaving]
m0rph has joined #ruby
kies^ has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 276 seconds]
babblebre has joined #ruby
emilkarl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
<norc>
nocontrol: How long are your jobs alive?
fullofcaffeine has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
emilkarl has joined #ruby
<norc>
nocontrol: Remember that ping configured like that might timeout after 4s.
DoubleMalt has quit [Remote host closed the connection]
pawnbox has joined #ruby
<norc>
nocontrol: And I dont know what your queue looks like.
nerium has joined #ruby
<apeiros>
"could not obtain a connection from the pool within 5.000 seconds" sounds like you're having threads which check out connections and don't return them
<apeiros>
or that you have too many concurrent threads with a too small pool
<nocontrol>
norc: well I added ActiveRecord::Base.connection.close before each iteration ends and it doesn't throw any more errors
<apeiros>
pool size should be > number of concurrently active threads
<nocontrol>
norc: but the strange thing is that it takes 1.2sec to ping and possibly 2-3 seconds to persist to the db
<norc>
apeiros: Careful where you tread on, he has an abusive usage of sidekiq. :S
<nocontrol>
norc: and I see things as done: 29.851 sec
<norc>
nocontrol: Which brings us all the way back.
hxegon is now known as hxegon_AFK
<nocontrol>
apeiros: is it indeed abusive ?
<norc>
nocontrol: Stop using this shell ping, stop using 255 concurrent processes.
shanemcd has quit [Remote host closed the connection]
<norc>
Stop using sidekiq when you should be using whenever.
shanemcd has joined #ruby
<nocontrol>
norc: regarding the shell ping, I've also tried nmap
<nocontrol>
it shouldn't have a problem with 255 concurrent processes, it's not that much finally
<nocontrol>
norc: the shell ping ends itself in 1 second
<nocontrol>
whether the client replies back or not
<norc>
nocontrol: Also on another thing:
<norc>
host[1] == 0 ? true : false
<norc>
Look at this carefully.
<nocontrol>
hmm
DmitryBochkarev has joined #ruby
justbleed is now known as TomPeed
<norc>
If you have trouble seeing whats wrong there, you might want to stop for a second using so many complex pieces of Ruby.
<nocontrol>
you're talking about 0 that could be mistakenly considered as nil ?
<nocontrol>
I feel something's leaking
<nocontrol>
that's why it throws errors and it takes so much time to end a job
nachoman has joined #ruby
<nocontrol>
but I am also confused because apeiros said I am abusing sidekiq
<norc>
No I said.
<apeiros>
reading. how does it work.
jhack has quit [Quit: jhack]
<apeiros>
I don't know whether your use of sidekiq is abusive. I didn't read the backlog (and don't have the time to). but norc certainly has experience and if I were you I'd listen to them.
jhack has joined #ruby
jhack has quit [Client Quit]
Respek has joined #ruby
<nocontrol>
norc: it shouldn't have a problem with concurrent shell commands though except If it does somehow because of O/S limitations
hxegon has joined #ruby
Respek has quit [Client Quit]
hxegon_AFK has quit [Ping timeout: 240 seconds]
<norc>
nocontrol: Do me a favour and use threads with the net-ping gem.
<nocontrol>
I will but tell me something first
binaryplease has quit [Ping timeout: 244 seconds]
<nocontrol>
norc: why does this iteration work fine IF you run it from shell like ruby and not within rails ?
<nocontrol>
If you run it by using ruby something.rb which iterates the pings (actually ping sweeps) then everything works fine
<nocontrol>
so to exclude things first, I don't believe shell ping has anything to do here
<nocontrol>
I am focusing between sidekiq workers and posgres connections
<norc>
nocontrol: postgres is not your problem that much I can guarantee.
<nocontrol>
which finally worked ok in terms of persisting stuff after I added ActiveRecord::Base.connection.close
<nocontrol>
and means that the connections are leaking, staying open for some reason
<norc>
nocontrol: The advantage you gain with threads for example, is that you can timeout the entire thread. That gives you hard limits so you will not exceed your connection pool size as easily.
<nocontrol>
and jobs take a long time to end
Xeago has joined #ruby
<nocontrol>
norc: nice hint
<norc>
nocontrol: The connections are not leaking.
<norc>
nocontrol: your jobs are just overlapping.
rippa has joined #ruby
<nocontrol>
norc: what's the difference between threads and processes ? aren't they on a O/S level both ?
jokester has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Hammy_Work has joined #ruby
<apeiros>
a thread shares the address space of the common process
<norc>
nocontrol: Threads are very lightweight in comparison. They also share the same address space.
<apeiros>
whether threads are an OS level construct depends on your runtime.
shanemcd has quit [Remote host closed the connection]
imgoinhungry has joined #ruby
myntcake has joined #ruby
<apeiros>
mruby/cruby as of 1.9 has OS thread backed threads, but does its own scheduling.
floatingpoint has joined #ruby
Xeago has quit [Ping timeout: 268 seconds]
hxegon has quit [Quit: BRB]
<norc>
nocontrol: Just keep in mind that threads require careful coding when working with shared resources *because* you are in the same address space.
<yorickpeterse>
also I remember something about backticks causing a stop-the-world so the threading might not help as much here
<nocontrol>
ok
<norc>
nocontrol: Also try to use Net::Ping::ICMP if you can. :)
<apeiros>
yorickpeterse: what? I rather doubt that…
<yorickpeterse>
threads.each { |t| t.join } can just be threads.each(&:join) but it's a small detail
<nocontrol>
I am walking an advanced knowledge path here and I believe I should stop and read a bit more
<apeiros>
backticks should be threadable IO
<yorickpeterse>
apeiros: IIRC it uses fork or something, though I might be mixing it up with rbx
<yorickpeterse>
and fork requires a STW while it's forking, but it's been a while
<apeiros>
that's possible. but should only concern initiation.
shanemcd has joined #ruby
vdamewood has quit [Quit: Life beckons.]
Xeago has joined #ruby
adgtl has joined #ruby
<yorickpeterse>
Sure
<apeiros>
i.e. a long running backtick command should be threadable
testuser123 has joined #ruby
<testuser123>
why
<testuser123>
why!!!!!!!!!!
<yorickpeterse>
testuser123: because
adgtl has quit [Remote host closed the connection]
<ddv>
lol
<apeiros>
testuser123: 42
<testuser123>
so tired
<testuser123>
what
<nocontrol>
norc: so to close this discussion and don't bother you anymore do you suggest three things that I should look at ?
<nocontrol>
norc: is Threads all I want ?
adgtl has joined #ruby
grn has quit []
testuser123 has left #ruby [#ruby]
unl0ckd has joined #ruby
Chagel has quit [Ping timeout: 244 seconds]
unl0ckd has quit [Client Quit]
InternetFriend has quit [Ping timeout: 276 seconds]
unl0ckd has joined #ruby
<norc>
nocontrol: Use Net::Ping::ICMP as well.
moeabdol has joined #ruby
<nocontrol>
norc: it needs root privileges
asahi has left #ruby [#ruby]
<norc>
That...
<nocontrol>
norc: I am trying to keep things simple
<nocontrol>
norc: I tried nmap also which is great but it's too heavy for the usage I want
InternetFriend has joined #ruby
<norc>
nocontrol: All you want is to do this every N seconds right?
joonty has quit [Quit: Leaving]
<nocontrol>
norc: true
<norc>
nocontrol: I would then use Net::Ping::External instead - and make sure you specificy a timeout on that ping.
allcentury has joined #ruby
<norc>
nocontrol: Replace the entire sidekiq/redis with just whenever
imgoinhungry has quit [Quit: Leaving]
<norc>
(whenever is just a fancy way of using cron)
<nocontrol>
but why ?
treehug88 has joined #ruby
hxegon has joined #ruby
<nocontrol>
sidekiq is much stronger than cron
<norc>
Do you really need a scalable high performance key/value store with a complex gem for asynchronous background processing?
<norc>
I thought you just want to do the same job every n seconds.
vasilakisfil_ has quit [Remote host closed the connection]
<norc>
sidekiq is not stronger, its for different problems.
joonty has joined #ruby
myntcake has quit [Ping timeout: 268 seconds]
vasilakisfil_ has joined #ruby
poguez_ has joined #ruby
volty has joined #ruby
<nocontrol>
norc: I've been using it in work for scheduling jobs so I feel like I know how it works
<nocontrol>
or at least I did before speaking here !
<nocontrol>
I could easily remove sidekiq and redis, I 'm just using tools "I believe" I knew
x77686d has joined #ruby
asahi has joined #ruby
paul98 has joined #ruby
<norc>
nocontrol: Lets say you have some computationally expensive task that is triggered from your users.
Pandorian has quit []
jottr has quit [Ping timeout: 246 seconds]
<paul98>
hey, trying to install gem foodcrtic but get the following error, http://pastebin.centos.org/40676/ i've installed other gems ok just this one seems to be a issue.
<norc>
nocontrol: That could drain your resources and if not done asynchronously would lead to a rather unresponsive website.
<norc>
nocontrol: So these tasks are moved into background asynchronously. With only a preset amount of workers you limit the strain on your system resources.
adgtl has quit [Remote host closed the connection]
<norc>
nocontrol: Its also great when you want for a specific thing to happen at a specific time.
<norc>
nocontrol: Say a user unsubscribes at a given date - sidekiq helps you do this too.
infra-red has joined #ruby
<norc>
nocontrol: For things that need to run periodically it is just oversized, and sidekiq will not make any guarantees that it will actually run at that time.
mark1 has quit [Quit: Leaving.]
<nocontrol>
and why is that? about guarantees ?
<nocontrol>
it is supposed to be a professional tool
<norc>
nocontrol: Because the queue might be filled with thousands of jobs.
<nocontrol>
so I could wait more from it
<paul98>
nvm sorted :)
vasilakisfil_ has quit [Remote host closed the connection]
<nocontrol>
norc: sidekiq's queue ?
<norc>
nocontrol: The redis list it works on, yes.
vasilakisfil_ has joined #ruby
<nocontrol>
norc: so you suggest to remove sidekiq/redis
jas02 has quit [Quit: jas02]
Aviio_ has quit [Remote host closed the connection]
<nocontrol>
norc: but will I still have ActiveJobs ?
<apeiros>
and I'd also wonder why I'd have to spawn a million thread. as that almost certainly makes little to no sense.
<adgtl>
apeiros: it never completes
<apeiros>
it's quite possible that your OS says "no".
<adgtl>
I have to reduce million number to like 10000, then yes
<apeiros>
you'll have to set the limits of your OS appropriately. if it even allows limits that high.
kapowaz has joined #ruby
<adgtl>
apeiros: on erlang, yes, it allows me to run million processes at once
<apeiros>
well, I guess you've gotten an answer to your question?
<adgtl>
apeiros: just POC.. wanted to know whether OS allows Ruby to spawn million threads
<apeiros>
erlang doesn't use OS backed threads for its processes.
<adgtl>
apeiros: nope.. wondering.. what's major difference there
<Scott2619>
0x0dea: thanks that works what is the first line doing? I have never seen it before?
<adgtl>
apeiros: so you mean.. Ruby's threads are OS backed threads?
howdoi has quit [Quit: Connection closed for inactivity]
jeanlinux has joined #ruby
<apeiros>
reading… how does it work. really, what's up today?
<apeiros>
adgtl: read the backlog. I don't like to repeat myself.
iamdank is now known as Darkwater
jevs has joined #ruby
the-undefined_ has joined #ruby
infra-red has joined #ruby
jeanlinu_ has joined #ruby
<adaedra>
apeiros: reading is so 20th century.
<apeiros>
yeah. 2016 is the year of the goldfish.
<adaedra>
>< ˚>
ramblinpeck has joined #ruby
<apeiros>
»<<„°>
<arup_r>
One more question, I didn't able to answer.. is "Give an example of a Ruby data type that is not normally thought of as an object, but supports the true statement "Everything in Ruby is an object." Accept that it's a true statement and support it with an example and remember case-sensitivity."
<arup_r>
what should it be?
<arup_r>
I need to know for future
evidex has quit [Quit: leaving]
<arup_r>
I know the answr as `block` .. but the question i didn't get
<apeiros>
"not normally". I guess I'm not in the target audience.
jaruga has quit [Quit: jaruga]
evidex has joined #ruby
jeanlinux has quit [Ping timeout: 244 seconds]
<apeiros>
a block ain't an object. not even in ruby.
jeanlin__ has joined #ruby
symm- has joined #ruby
<apeiros>
you can turn a block into an object using &blockarg syntax. but then it becomes a Proc.
baroquebobcat has quit [Ping timeout: 244 seconds]
* apeiros
master pedant in training
<arup_r>
yeah..
jeanlinu_ has quit [Ping timeout: 240 seconds]
<Ox0dea>
I suspect that's the case-sensitivity they had in mind.
<Ox0dea>
There's no Block class, for instance.
<arup_r>
apeiros: you are in target audience .. haha
<arup_r>
yeah, so what should be the reasoning.. ? That's why I was confused..
jaruga has joined #ruby
tjohnson has joined #ruby
<apeiros>
every object can be used in conditional statements. every object is true-ish except nil & false. no idea which one they think is not normally thought of as an object.
<apeiros>
a common mistake is to think 0, "", [] and/or {} are false-ish
<Ox0dea>
arup_r: After some though, I bet they want you to focus on methods.
<Ox0dea>
*thought
<volty>
they are just nullish & emptish :)
<apeiros>
and given some languages don't have numbers as proper objects, my guess would probably have been 0
<apeiros>
but seriously, that question IMO sucks because it's highly subjective.
htmldrum has joined #ruby
rodfersou is now known as rodfersou|lunch
<Ox0dea>
It's really not, though; they're either looking for the difference between "block" and "Proc" or "method" and "Method".
<apeiros>
oh wait, "datatype". well… then numbers are probably not what they're looking for as those are used in most languages for conditionals.
<apeiros>
Ox0dea: how do you figure?
<Ox0dea>
apeiros: It feels like I'm applying common sense?
jeanlin__ has quit [Ping timeout: 248 seconds]
pandaant has quit [Remote host closed the connection]
TomyWork has quit [Ping timeout: 244 seconds]
mjc_ has joined #ruby
<apeiros>
IMO it makes little sense. but well, what do I know by which logic they consider something as "not normally considered an object".
<Ox0dea>
Oh, yes, I see whence you're coming now; I guess they probably do have Fixnum and the like in mind.
antgel has joined #ruby
<apeiros>
also I'm troubled by "supports the true statement" - what precisely is that supposed to mean? "is true-ish" is what I interpreted it as.
sneakerhax has quit [Ping timeout: 252 seconds]
<volty>
>> nil.nil? "true-ish" : "false-ish"
<ruby[bot]>
volty: # => /tmp/execpad-a18f347accef/source-a18f347accef:2: syntax error, unexpected ':', expecting keyword_end ...check link for more (https://eval.in/528865)
<apeiros>
eh, I'll remain at "this question sucks because subjective"
htmldrum has quit [Ping timeout: 252 seconds]
<volty>
I didn't quite followed. going to try to catch up
<apeiros>
next question probably is whether lambdas or procs are better.
diegoviola has joined #ruby
bronson has joined #ruby
mfaeh has quit []
m0rph has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
Mattx has joined #ruby
hamed_r has joined #ruby
<Mattx>
Hey guys! How do I print a Time in a different time zone?
jeanlinu_ has joined #ruby
DmitryBochkarev has quit [Quit: This computer has gone to sleep]
<volty>
"not normally considered an object", I hate these vague quantifiers. Or considered, or not considered. If there's normally, there should be also abnormally.
<Mattx>
I want something like this, Time.parse("2016-03-02 13:31:06 -0300").to_zone "+5"
<volty>
s/should be/must be/
<apeiros>
Ox0dea: method/proc might fit the bill. it just feels pointless to think about them in a context related to conditions. assuming "supports true statement" is really "is true-ish"
kies^ has joined #ruby
kalleth_ is now known as kalleth
jeanlinux has quit [Ping timeout: 244 seconds]
<volty>
"supports the true statement" does not has sense. "supports the frog's singing" could do well as well
rodolfowtf has joined #ruby
bronson has quit [Ping timeout: 240 seconds]
infra-red has quit [Remote host closed the connection]
rodolfowtf has quit [Read error: Connection reset by peer]
<volty>
subject, object, verb action. Who 'supports'?
heyimwill has joined #ruby
<volty>
apeiros: on what are your comments? which source/text?
<volty>
a book?
IrishGringo has quit [Ping timeout: 240 seconds]
m0rph has joined #ruby
cpup has quit [Ping timeout: 246 seconds]
m0rph has left #ruby [#ruby]
IrishGringo has joined #ruby
infra-red has joined #ruby
<Ox0dea>
apeiros: Hm? I don't see how conditionals come into it.
cpup has joined #ruby
Guest63581 is now known as James
rodolfowtf has joined #ruby
<volty>
could you be so kind and put a line about what's the topic/context ? (I apologize but really not sure if I am too tired | fuzzy)
James is now known as Guest89259
<arup_r>
One more question: There are (at least) three different variations in the syntax for defining the when clauses of a case statement. (yes/no) .. I said no and it is wrong. lol .
<adgtl>
Ruby threads are not OS threads, then why there is limit to number of threads it can run at at time?
Couch has quit [Ping timeout: 252 seconds]
<yorickpeterse>
Ruby threads _are_ OS threads
<eam>
adgtl: ruby threads are OS threads
<volty>
could be ruby's own limit. have you found the upper limit?
<eam>
at least, on modern rubies
<volty>
2.3 too?
mja has quit [Ping timeout: 248 seconds]
<yorickpeterse>
The limit is there because of the Global Interpreter Lock
<volty>
as I thought
<yorickpeterse>
which exists to prevent shitty C code from wrecking everything
<ljames>
what's the simplest way to enumerate through an Array, finding an element that meets a condition and get its index, followed by performing a second test starting the found index until the test succeeds and then stopping, returning a second index? optionally, drop items between those 2 indexes from the array. is there a simple way of doing this, or should I just each_with_index?
<eam>
yorickpeterse: ruby has a limit? that's kinda odd
<yorickpeterse>
eam: There's not a limit in the number of threads you can start
<yorickpeterse>
However MRI can only run 1 Ruby thread at a time
<eam>
oh, sure
<adaedra>
ljames: should be doable combining some Array#index
infra-red has quit [Remote host closed the connection]
<Ox0dea>
ljames: Perhaps you want the flip-flop operator?
<Ox0dea>
(Sorry.)
<ljames>
hmm
<eam>
I think adgtl is actually running into OS thread limits (NPROC and the like)
<ljames>
thanks adaedra, aegis3121. and flip flop might jsut work for it, thanks Ox0dea, will try
adgtl has joined #ruby
<eam>
erlang doesn't actually use threads
adgtl has joined #ruby
adgtl has quit [Remote host closed the connection]
<adaedra>
Ox0dea: haha, I was looking for this one the other day but couldn't remember the name, thanks
<aegis3121>
First index, then a slice from there to the end to find the second?
_whitelogger_ has quit [Excess Flood]
_whitelogger has joined #ruby
<apeiros>
Ox0dea: "which support the true statement"
<ljames>
flip flop might just be the most elegant way to do this, thanks
<Ox0dea>
apeiros: That's in reference to the statement that immediately follows about everything being an object in Ruby.
shanemcd has quit [Remote host closed the connection]
diegoviola has quit [Quit: WeeChat 1.4]
<apeiros>
Ox0dea: ooooh dear
<apeiros>
I see
hanmac has quit [Ping timeout: 250 seconds]
<apeiros>
is this just me as a non-native speaker or is that question awfully phrased?
<volty>
me too, finally - behind arup_r's comments
eregi has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 250 seconds]
<apeiros>
Ox0dea: in that case, I'd throw in Class/Module into the mix. similarly uncommon as proper objects.
krasnus has joined #ruby
<volty>
neither Ox0dea is infallible :)
adgtl has quit [Remote host closed the connection]
<Ox0dea>
apeiros: I do concede that it's a shitty question, but it does strike me as pretty obvious that they're referring to numbers being objects in Ruby.
the_drow has joined #ruby
<apeiros>
so IMO all datatypes which are primitives in other languages (true/false/nil/fixnum), and all datatypes which are not commonly objects (class/module/method/proc) are eligible
<Ox0dea>
Sure, but that the question explicitly mentions case-sensitivity seems like they're after the difference between, say, "integer" and "Integer".
augcesar has joined #ruby
hogetaro_ has quit [Read error: Connection timed out]
<arup_r>
I am way too confused.. :)
<arup_r>
hehe
<apeiros>
I assumed that they referred to the answer being case sensitive. which would probably apply to all class names.
<arup_r>
but thanks to all
evidex has quit [Remote host closed the connection]
<arup_r>
I was checking why I got negetatives... and thought to ask you also if you understand what they asked me..
naftilos76 has joined #ruby
<Ox0dea>
The questions you're being given are open to interpretation, and yet they want concrete answers.
<Ox0dea>
It's like MyMathLab for Ruby. :(
Scott2619 has quit []
asahi has left #ruby [#ruby]
hogetaro has joined #ruby
<arup_r>
haha
Xeago has quit [Remote host closed the connection]
<volty>
a 'shortcut' for Array#include?, something operator-like ?
diegoviola has joined #ruby
paul98_ has joined #ruby
Snowy has quit [Quit: ragequit]
nando293921 has joined #ruby
paul98 has quit [Ping timeout: 260 seconds]
<apeiros>
eam: told adgtl actually already. another OS limit for ruby threads are afaik filehandles (not sure, iirc it's either 1 or 2 handles per thread)
darkf has quit [Quit: Leaving]
aegis3121 has quit [Ping timeout: 250 seconds]
<Ox0dea>
volty: Nope. In the past, people have tried to get an `in` operator like Python's, but it's never come to fruition.
<apeiros>
volty: nope. not in standard ruby.
htmldrum has joined #ruby
shanemcd has joined #ruby
<Ox0dea>
volty: ActiveSupport provides Object#in?, but I think it's ugly.
<volty>
pity, thx.
<apeiros>
given that in? has to always delegate, it's IMO an anti-pattern.
<volty>
Ox0dea: I'm far away from Active, and will stay so for a while
<Ox0dea>
volty: There are plenty of diamonds in that rough. :P
arup_r has left #ruby [#ruby]
<volty>
where diamonds there are too many light paths :)
evenix has joined #ruby
<evenix>
weird.. how come I'm getting a unexpected tLABEL error on jruby 1.7.12 ruby 1.9.3
<evenix>
I thought tLABEL error were fixed from 1.9.2 to 1.9.3
<eam>
apeiros: yeah. With 1m threads he's going to at least run into pid_max limits -- as that's generally set to 65k or so
hanmac has joined #ruby
<eam>
tid is limited by pid_max
amclain has joined #ruby
scepticulous has quit [Ping timeout: 248 seconds]
<eam>
"why aren't my pids ever more than 5 digits wide" etc
KensoDev has joined #ruby
stannard has quit [Remote host closed the connection]
marxarelli has joined #ruby
<apeiros>
eam: interesting. good to know.
IrishGringo has quit [Ping timeout: 268 seconds]
jottr_ has joined #ruby
<apeiros>
evenix: do you expect an answer from the info you've given?
aclearman037 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shanemcd has quit [Remote host closed the connection]
momomomomo has joined #ruby
stannard has joined #ruby
vasilakisfil__ has quit [Quit: Konversation terminated!]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
<evenix>
apeiros: what additional information do you need?
krz has quit [Ping timeout: 276 seconds]
rodfersou|lunch has quit [Ping timeout: 276 seconds]
<evenix>
what error I'm getting? syntax error, unexpected tLABEL
<evenix>
what else can I add @apeiros feel free to share
<evenix>
because I don't see what else you expect my answer to have
<evenix>
question*
[Butch] has joined #ruby
idefine has joined #ruby
<Ox0dea>
evenix: The interpreter you're using doesn't support keyword arguments.
Uber|Dragon has joined #ruby
B1n4r10 has joined #ruby
<evenix>
0x0dea: Thanks. You mean my version of jruby? I looked into it and it seem that jruby 1.7.12 using >=1.9.3 is supposed to have an update that fixes it :/
benlieb has joined #ruby
eregi has joined #ruby
<evenix>
Maybe I can try to update the ruby -v of my interpreter? .. it seem that the app was set to use 1.9.3
<Ox0dea>
evenix: Keyword arguments is a 2.0+ thing.
<apeiros>
evenix: with syntax errors? always code.
<apeiros>
but I see you & Ox0dea already figured
<evenix>
Ox0dea: Ok thanks.
<evenix>
apeiros: yes thx
jmignault has quit [Ping timeout: 252 seconds]
niksrc has joined #ruby
Rodya_ has joined #ruby
rodolfowtf has quit [Read error: Connection reset by peer]
fullofcaffeine has quit [Remote host closed the connection]
Ishido has quit [Remote host closed the connection]
rodolfowtf has joined #ruby
TomPeed has quit [Read error: Connection reset by peer]
Gasher has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
fullofca_ has joined #ruby
Ishido has joined #ruby
openstruct has quit [Remote host closed the connection]
kalopsian has quit [Ping timeout: 244 seconds]
justbleed has joined #ruby
joonty has quit [Ping timeout: 260 seconds]
justbleed is now known as TomPeed
shanemcd has joined #ruby
ferr has quit [Quit: WeeChat 1.4]
momomomomo has quit [Quit: momomomomo]
the_drow has quit [Quit: This computer has gone to sleep]
stannard has quit [Remote host closed the connection]
gizmore has joined #ruby
thevaliantx has joined #ruby
moeabdol has quit [Ping timeout: 276 seconds]
dhollin3 has joined #ruby
firstdayonthejob has joined #ruby
dhollinger has quit [Ping timeout: 244 seconds]
<ddv>
humblespoon, because in_words is an instance method
jxs_ has joined #ruby
<kgirthofer>
hey all - I'm updating an old gem on a new machine, and I went t hrough and updated all the names and everything, and now when I run gem build gem_name.gemspec it is erroring out that it cant find the old named items... where am I missing?
<Ox0dea>
norc: I am. What news?
<humblespoon>
ddv: thanks
kgirthofer has joined #ruby
stannard has joined #ruby
<norc>
Ox0dea, are you around?
<ddv>
humblespoon, you are not creating an instance
<humblespoon>
ddv: oooohhh. Ok I think I see what you mean
norc has joined #ruby
_whitelogger has quit [Excess Flood]
_whitelogger has joined #ruby
<kgirthofer>
While executing gem ... (Gem::InvalidSpecificationException)
<norc>
Simply because the N of your reference gets lshifted twice.
Aviio has quit [Read error: No route to host]
<norc>
before being passed to FIX2INT
vdamewood has joined #ruby
<norc>
or rather it gets lshifted already before being passed.
<Ox0dea>
norc: Gotta love the comment.
<Ox0dea>
You can tell they were like, "Should we even bother?"
atmosx has joined #ruby
<norc>
Heh.
<norc>
I was actually surprised to find a comment at all.
<Ox0dea>
It does look like some architectures are getting snubbed.
<Ox0dea>
They only have access to half as many numeric variables as they ought to.
jaruga has quit [Quit: jaruga]
<dougsko>
anyone have experience with the parallel gem? im trying to get a simple cummulative sum working but i keep getting the wrong answer. this example demonsrtates the problem: https://gist.github.com/anonymous/021b1d3cc9509b8d8c14
[Butch] has quit [Quit: I'm out . . .]
kalopsian has joined #ruby
jeanlinux has quit [Ping timeout: 248 seconds]
<norc>
Ox0dea, most annoying part was figuring out which damn code actually raised that error
shanemcd has joined #ruby
joonty has joined #ruby
shadoi has joined #ruby
<Ox0dea>
norc: That damned "%s" for "big" and "small".
Blaguvest has joined #ruby
<norc>
Ox0dea, indeed. I was staring at my damn screen for like 5 minutes when I could not find the "too small to converto to `int'" string
volty has quit [Quit: Konversation terminated!]
<norc>
But plenty such strings for other types like unsigned int and what not.
eric2 has joined #ruby
spider-mario has joined #ruby
skade has joined #ruby
<norc>
Ox0dea, considering the "do as others do" this significantly lowers the bar for contributors though. "Do whatever you fancy, and use macros. Lots of macros"
jeanlinux has joined #ruby
<Ox0dea>
norc: And mix tabs and spaces however the guy before you did. :(
<norc>
set ts=8
<norc>
and be done
AlexRussia has quit [Ping timeout: 260 seconds]
<norc>
;)
kalopsian has quit [Ping timeout: 240 seconds]
<norc>
Ox0dea, I loved whitespace mixing in Python. Had one nasty one that actually parsed and executed without an error - except the behavior was just completely buggy.
joonty has quit [Ping timeout: 246 seconds]
<Ox0dea>
norc: I could swear the Ruby source files used to contain modelines.
eric2 has quit [Quit: WeeChat 1.4]
xMopxShell has joined #ruby
UtkarshRay has quit [Ping timeout: 240 seconds]
<norc>
Ox0dea - Im guessing the reason you do not see any is emacs users. They keep deleting vim modelines for giggles, and vim users do the same for emacs modelines.
<Ox0dea>
norc: Ha. That'd certainly do it.
elifoster has joined #ruby
* norc
wishes Ruby had MSVC project files
<norc>
Perhaps with QMake!
djbkd has joined #ruby
saneax is now known as saneax_AFK
<norc>
kgirthofer, have you committed the rename change to git?
rodolfowtf has quit [Read error: Connection reset by peer]
vdamewood has quit [Ping timeout: 264 seconds]
* norc
is just guessing that you used the bundle template that uses `git ls-files' for spec.files
Rodya_ has quit [Remote host closed the connection]
<norc>
kgirthofer, of course sharing the gemspec would be the best
openstruct has joined #ruby
Rodya_ has joined #ruby
AlexRussia has joined #ruby
dionysus69 has quit [Remote host closed the connection]
vdamewood has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
PaulePanter is now known as PaulePanetr
PaulePanetr is now known as PaulePanter
bronson has joined #ruby
rodolfowtf has joined #ruby
douglascorrea has quit [Remote host closed the connection]
rodolfowtf has quit [Max SendQ exceeded]
douglascorrea has joined #ruby
ironcame1 is now known as ironcamel
shellfu has joined #ruby
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
Rodya_ has quit [Ping timeout: 250 seconds]
Guest34101 has quit [Ping timeout: 248 seconds]
baweaver has joined #ruby
ReK2GnULinuX has quit [Remote host closed the connection]
evenix has quit [Remote host closed the connection]
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
elifoster has quit [Ping timeout: 244 seconds]
bronson has quit [Ping timeout: 240 seconds]
shanemcd has quit [Remote host closed the connection]
ReK2 has joined #ruby
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
infra-red has joined #ruby
blackmesa has joined #ruby
ta__ has joined #ruby
baweaver has quit [Ping timeout: 246 seconds]
naftilos76 has quit [Quit: Αποχώρησε]
cassioscabral has joined #ruby
vdamewood has quit [Quit: Life beckons.]
niksrc has quit [Quit: Leaving]
jeanlinux has quit [Remote host closed the connection]
kuroro has left #ruby [#ruby]
damonkelley has joined #ruby
cassioscabral has quit [Client Quit]
jeanlinux has joined #ruby
<shellfu>
Question, in trying to stick with single responsibility I am trying to determine the following: In a method that queries a database, the query hits many tables. Should the query be broken into small methods like, fetch_user, fetch_id, and assemble in ruby? Granted the method as it stands only performs a query. However, I am trying to determine where to draw the line.
rodolfowtf has joined #ruby
ta_ has quit [Ping timeout: 246 seconds]
rodolfowtf has quit [Max SendQ exceeded]
Guest58624 is now known as James
[Butch] has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
fullofca_ has quit [Remote host closed the connection]
James is now known as Guest74980
Timberwo|f has joined #ruby
hxegon has quit [Ping timeout: 244 seconds]
<apeiros>
shellfu: depends on the details. but usually it's not a problem to write an sql query touching multiple tables.
<apeiros>
and if it's a common case, you can abstract the multiple tables away by using db views.
dlitvak has joined #ruby
rodolfowtf has joined #ruby
rodolfowtf has quit [Max SendQ exceeded]
sneakerhax has joined #ruby
jeanlinux has quit [Ping timeout: 260 seconds]
fullofcaffeine has joined #ruby
rodolfowtf has joined #ruby
<norc>
shellfu, personally I dislike having to deal with databases at all when writing Ruby code unless I absolutely cannot avoid it - so I always opt for an ORM to deal with the pain for me.
hiljusti has joined #ruby
j3r0 has quit [Quit: Leaving]
<shellfu>
So single responsibility is still considered unbroken so long as the method only executes the query, and I'm parsing elsewhere. Ok cool. I just wanted to know where to call it good, as if I broke the query up I risk running a class over too many lines.
sepp2k has quit [Quit: Leaving.]
htmldrum has joined #ruby
<shellfu>
Yeah I am trying to do away with this piece of the puzzle, but until this database is deprecated I cannot. I will look into ORMs per your suggestion. I just can assemble a query pretty quickly, but perhaps that is me being lazy.
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
nettoweb has quit [Client Quit]
joonty has joined #ruby
dhollinger has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
joonty has quit [Ping timeout: 252 seconds]
shanemcd has quit [Remote host closed the connection]
QORRiE has joined #ruby
dlitvak has quit [Remote host closed the connection]
nerium has joined #ruby
shanemcd has joined #ruby
supplication has joined #ruby
dlitvak has joined #ruby
patrick99e99 has joined #ruby
shellfu has quit [Quit: Lost terminal]
baweaver has joined #ruby
fullofcaffeine has quit [Ping timeout: 248 seconds]
pawnbox has joined #ruby
lvn has joined #ruby
Ilgazer has joined #ruby
decoponyo has joined #ruby
baweaver has quit [Ping timeout: 276 seconds]
djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 268 seconds]
decoponio has quit [Ping timeout: 246 seconds]
stannard has quit [Remote host closed the connection]
stannard has joined #ruby
baweaver has joined #ruby
Guest88888 is now known as C0deMaver1ck
hahuang61 has joined #ruby
jeanlinux has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
circ-user-hoVeW has joined #ruby
<Ilgazer>
do you have using sinatra?
jenrzzz has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
duckpupp1 has quit [Ping timeout: 268 seconds]
shanemcd has quit [Remote host closed the connection]
nettoweb has joined #ruby
schickung has joined #ruby
<Ilgazer>
HEY
dionysus69 has quit [Ping timeout: 260 seconds]
hahuang61 has quit [Ping timeout: 264 seconds]
Guest34101 has joined #ruby
lemur has joined #ruby
Ilgazer has left #ruby ["Konversation terminated!"]
agent_white has joined #ruby
djbkd has joined #ruby
idefine has joined #ruby
<patrick99e99>
Hey ruby friends... I am a little confused about something.. I've got some xml that has some unicode characters that I need to remove.. and I am a little confused.. if I see \u0034 .. how do I know if that number is hex or oct ?
<patrick99e99>
will \u always be hex?
<Ox0dea>
Yes.
<apeiros>
yes
<shevy>
u will always be my hex!
n008f4g_ has quit [Ping timeout: 248 seconds]
lemur has quit [Ping timeout: 250 seconds]
<hanmac>
XD
<patrick99e99>
U+omg would be oct?
<Ox0dea>
Codepoints are always expressed in hexadecimal.
Guest34101 has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
gizmore has quit [Ping timeout: 264 seconds]
Guest85255 is now known as James
James is now known as Guest14285
aef has quit [Remote host closed the connection]
rodferso1 has joined #ruby
trosborn has joined #ruby
rodfersou has quit [Ping timeout: 260 seconds]
<norc>
apeiros, first time I worked with MySQL for real today. I ended discovering such a damn shitty quirk, it makes Oracle fun in comparison.
QORRiE has quit [Remote host closed the connection]
<norc>
Did you know how MySQL works with collation and German unicode with unique constraints?
<norc>
It is so laughable.
diego4 has joined #ruby
diego4 has quit [Changing host]
diego4 has joined #ruby
davejlong has joined #ruby
<tobiasvl>
MySQL is horrible
SCHAAP137 has joined #ruby
Snowy has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
diegoviola has quit [Ping timeout: 240 seconds]
<apeiros>
norc: do tell?
<apeiros>
been a while since I used mysql
<norc>
apeiros, plain database with a table with a unique varchar column. insert "ß" and "ss" and watch the unique violation error throw into your face.
<norc>
This is with the default utf8 setting.
evenix has joined #ruby
<norc>
Or it was "ß" and "s" - cant remember. Either way, its downright horrible.
<hanmac>
norc it depends on what collation you use ... there is a difference between "unicode" and "general" ...
<norc>
hanmac, that particular bit is collated the same with both utf8_unicode_ci and utf8_general_ci
<norc>
hanmac, funny eh?
spiette has joined #ruby
sgambino has joined #ruby
<norc>
You basically have to specifically set utf8_bin for collation.
eregi has quit [Ping timeout: 244 seconds]
<norc>
hanmac, but good luck even figuring out that issue when you are importing a dump and it just tells you "duplicate error for key weise"
<hanmac>
norc i know the problem
<hanmac>
i prefer unicode if possible
<norc>
hanmac, I would prefer the builtin utf8 charset had utf_bin by default since that has no impact on data.
<apeiros>
norc: it depends on details I'd have to research. but assume you had a case insensitive unique constraint, you'd want "foo" and "FOO" to collide too.
<apeiros>
as said, it depends on specifics, but if the unique constraint is supposed to adhere to the collation, and the collation specifies ß and ss to be equivalent (which might be bad since there's words which have a differing meaning depending on whether written with ss or ß), then it's sensible (the collation defining ss and ß to be equivalent might not be sensible, but that's not mysql's fault)
baweaver has quit [Remote host closed the connection]
bubbys has quit [Ping timeout: 276 seconds]
aswen has joined #ruby
makenoise has quit [Ping timeout: 240 seconds]
<norc>
apeiros, except their entire reasoning is based on DIN 5007-1 - which talks about *sorting* not lexical equivalence.
ldnunes has quit [Quit: Leaving]
<norc>
apeiros, and all the other databases have this notion of collation too. its about how things are sorted depending on your locale generally. ;-)
<norc>
I dont know.
ready has quit [Ping timeout: 276 seconds]
sp4rrow has joined #ruby
davejlong has quit [Remote host closed the connection]
morochena has joined #ruby
<apeiros>
mhm
<apeiros>
again, depends on the specifics. it might not be sensible :)
<apeiros>
one thing I'd want to cause a violation: "ä" and "ä"
<apeiros>
if you can't spot the difference - don't worry ;-) it's both "ä", but once C and once D normalization
davejlong has joined #ruby
<norc>
apeiros, just google for "collation problem mysql" - the advantages gained (namely slightly faster searches involving collated characters) are hardly worth the trouble so many users get when dealing with unicode.
davejlong has joined #ruby
<antranigv>
greetings all, I'm new here, interested in learning Ruby, mostly cz my fav open source project is in Ruby :))
<norc>
apeiros, honestly I would simply normalize this on the application level.
<norc>
apeiros, a full text search engine can take care of any collation
<norc>
and at the database I just have plain codepoints.
<norc>
Hello antranigv :)
<apeiros>
the codepoints differ for those two ;-)
nando293921 has quit [Ping timeout: 268 seconds]
<norc>
apeiros, not after my application normalizes the input
<apeiros>
yeah, sure. if you can control all venues values come from.
jxs_ has quit [Remote host closed the connection]
<apeiros>
and sadly I've had to deal with more situations where that was not the case than the other way round :-/ (because the db is such an awesome place to interface between apps… :<)
<norc>
apeiros, I constantly get shit for one of my applications constantly breaking things at work - with comments like "you dont test your application"
<antranigv>
or just any guide will be good as well, heh :))
s2013 has joined #ruby
<norc>
apeiros, and the issue is always the tables my rails app has no control over, so I cannot have migrations for them - so I cannot test it. Having no control over all "venues" is no excuse for bad design.
<norc>
It just calls for placing the control where its needed imho.
<apeiros>
um…
<apeiros>
you understood the point about "no control", yes?
fullofcaffeine has quit [Remote host closed the connection]
joonty has joined #ruby
kalleth has quit [Ping timeout: 260 seconds]
<norc>
apeiros, well I understand your point about db being abused for interfacing between apps.
<norc>
But in the end the real issue is that you dont encapsulate your data behind APIs.
kalleth has joined #ruby
<apeiros>
how exactly do you encaspulate data behind APIs when those other apps do not use them?
<apeiros>
and don't get me wrong - that's precisely what I'd want. but I have no say about that.
<norc>
Honestly I feel perfectly where you are coming from, Im in the same boat at times.
<apeiros>
so that part you said about "proper design" - I have to put that into the db at times. one of the ways being constraints.
<norc>
apeiros, I should apologize. I recently wrote a huge stack of pl/perl functions for our postgresql database, because the admin from the other dept was an idiot and would not let me write custom hooks for our radius server, so Im basically processing logs in triggers as they come in..
<norc>
So I should know better than to advertise perfect design.
<apeiros>
:)
* apeiros
does that too
joonty has quit [Ping timeout: 248 seconds]
<norc>
Im sorry.
<apeiros>
heh, I'm fully on your side. as said - don't get me wrong. IMO you're totally right.
<apeiros>
but some places simply don't allow for it :(
shanemcd has joined #ruby
<apeiros>
with the current project, we will actually try to enforce going via the API. but honestly, I think it's only a question of time until somebody says "but doing this 'simply' on the db is easier/faster/better"
ready has joined #ruby
jeanlinux has quit [Remote host closed the connection]
<norc>
apeiros, every time its short sighted since it drastically reduces maintainability, testability and scalability.
Spami has quit [Quit: This computer has gone to sleep]
<norc>
So they get the spotlight for finding a cheap solution, and you get the blame when it all blows up and you cant maintain your systems.
<norc>
Its an ugly world.
mlehrer has quit [Ping timeout: 248 seconds]
BTRE has quit [Ping timeout: 276 seconds]
mdw has joined #ruby
davejlong has quit [Remote host closed the connection]
uglybandersnatch has joined #ruby
douglasc_ has joined #ruby
<norc>
We have this rushed Rails framework in use that we have hired an external dev company to help with - and honestly I already feel pretty embarassed about the code already, since it barely has tests, is just hacked together because well - results needed to be produced in short time.
shanemcd has quit [Ping timeout: 276 seconds]
<norc>
Dont even want to show that code to them.
<norc>
So yeah, when Im off the job I just dream of a better world. Maybe this normal at my age, I am relatively young. ;-)
dougsko has left #ruby [#ruby]
Cohedrin has joined #ruby
<apeiros>
norc: precisely @ spotlight & blame
<apeiros>
and same @ dream of a better world :D
supplication has quit [Ping timeout: 244 seconds]
douglascorrea has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 260 seconds]
douglasc_ is now known as douglascorrea
f4cl3y has joined #ruby
deuxclique has joined #ruby
Blaguvest has quit []
fostertheweb has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
morochena has quit [Quit: Leaving...]
dlitvak has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dlitvak has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
davejlong has joined #ruby
sudoubuntu has quit [Ping timeout: 246 seconds]
fullofcaffeine has joined #ruby
BTRE has joined #ruby
johnmilton has quit [Ping timeout: 260 seconds]
<norc>
apeiros, at times I wonder whether Im just better off looking for a different place to work at.
<norc>
Though based on everything I have learned I should know that its very likely that most places work like that.
atomical_ has joined #ruby
trosborn has joined #ruby
zeroDivisible has joined #ruby
n008f4g_ has joined #ruby
last_staff has quit [Ping timeout: 244 seconds]
theunraveler has joined #ruby
idefine has quit [Remote host closed the connection]
atomical has quit [Ping timeout: 244 seconds]
kirillzh has joined #ruby
benlieb has quit [Quit: benlieb]
kirillzh has quit [Client Quit]
queequeg1 has quit [Remote host closed the connection]
idefine has joined #ruby
last_staff has joined #ruby
kirillzh has joined #ruby
Guest14285 is now known as James
James is now known as Guest65615
eregi has joined #ruby
idefine has quit [Remote host closed the connection]
al2o3-cr has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
idefine_ has quit [Remote host closed the connection]
idefine has joined #ruby
treehug88 has quit [Max SendQ exceeded]
s2013 has joined #ruby
harryh has joined #ruby
B1n4r10 has quit [Ping timeout: 246 seconds]
leksster has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
ropeney has joined #ruby
davejlong has quit []
mdw has joined #ruby
Vingador has joined #ruby
workmad3 has quit [Read error: Connection reset by peer]
Spami has joined #ruby
LoneHerm_ has joined #ruby
tvw has joined #ruby
ta_ has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
idefine_ has joined #ruby
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dragooon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
supplication has joined #ruby
LoneHerm_ has quit [Ping timeout: 240 seconds]
idefine has quit [Ping timeout: 260 seconds]
trinaldi has joined #ruby
norc has quit [Ping timeout: 244 seconds]
volty has joined #ruby
dlitvak has quit [Remote host closed the connection]
jud has quit [Ping timeout: 260 seconds]
jottr_ has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
Dragooon has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
diego2 has joined #ruby
dlitvak has joined #ruby
joonty has joined #ruby
allcentury has quit [Ping timeout: 250 seconds]
idefine_ has quit [Remote host closed the connection]
sp4rrow has joined #ruby
diegoviola has quit [Ping timeout: 248 seconds]
idefine has joined #ruby
idefine has quit [Remote host closed the connection]
Mia has joined #ruby
Mia has joined #ruby
Jardayn has quit [Ping timeout: 252 seconds]
mattwildig has joined #ruby
IrishGringo has joined #ruby
postmodern has joined #ruby
joonty has quit [Ping timeout: 248 seconds]
Jardayn has joined #ruby
diego2 has quit [Changing host]
diego2 has joined #ruby
hahuang61 has joined #ruby
Axy has quit [Ping timeout: 252 seconds]
diego2 is now known as diegoviola
kirillzh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Axy has joined #ruby
Axy has quit [Changing host]
Axy has joined #ruby
unl0ckd has quit [Quit: Bye!]
snockerton has quit [Read error: Connection reset by peer]
thevaliantx has quit [Quit: Leaving]
theunraveler has quit []
Mia has quit [Ping timeout: 244 seconds]
Axy has quit [Client Quit]
workmad3 has joined #ruby
hahuang61 has quit [Ping timeout: 246 seconds]
uglybandersnatch has quit [Ping timeout: 240 seconds]
danjam has joined #ruby
leksster has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
amclain has quit [Ping timeout: 248 seconds]
workmad3 has quit [Read error: Connection reset by peer]
Noxilex has joined #ruby
pdoherty has quit [Ping timeout: 276 seconds]
trosborn has quit [Quit: trosborn]
baweaver has joined #ruby
fostertheweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
danjam1 has joined #ruby
<humblespoon>
so I defined a method for Fixnum to convert numbers to words, but when I use a number that's 1 billion or larger, it says my method is not defined (possibly to do with the BigNum class?) I don't quite understand what's happening https://eval.in/529069
danjam has quit [Client Quit]
<humblespoon>
and if I can get my method to work with BigNum easily
<apeiros>
humblespoon: define it on Integer instead of Fixnum
workmad3 has joined #ruby
<apeiros>
and yes, larger integers are Bignum, not Fixnum. but all are Integer.
sp4rrow has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TomyLobo has quit [Ping timeout: 276 seconds]
<humblespoon>
apeiros: awesome that worked! Thanks for explaining the difference :D
[Butch] has quit [Quit: I'm out . . .]
Spami has quit [Quit: This computer has gone to sleep]
idefine has quit [Remote host closed the connection]
Uber|Dragon has quit [Ping timeout: 240 seconds]
fullofcaffeine has joined #ruby
lvn has quit [Ping timeout: 276 seconds]
<drbrain>
"a" !=~ /a/ is seen as ("a" != (~ /a/))
jenrzzz has quit [Ping timeout: 268 seconds]
zeroDivisible has quit [Quit: WeeChat 1.3]
idefine has joined #ruby
Snowy has joined #ruby
deuxclique has quit [Remote host closed the connection]
nando293921 has joined #ruby
haylon has quit [Quit: WeeChat 1.4]
baweaver has quit [Remote host closed the connection]
kies^ has quit [Ping timeout: 248 seconds]
uglybandersnatch has joined #ruby
diegoviola has quit [Quit: WeeChat 1.4]
mattwildig has quit [Remote host closed the connection]
chouhoulis has joined #ruby
jenrzzz_ has quit [Ping timeout: 276 seconds]
idefine has quit [Remote host closed the connection]
moos3 has quit [Quit: leaving]
flappynerd has joined #ruby
<flappynerd>
can I rescue multiple exception types with the same handler?
<flappynerd>
e.g.
<flappynerd>
rescue FooException, BarException => e
<flappynerd>
or must I have a separate rescue line for each?
wald0 has quit [Read error: Connection reset by peer]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<apeiros>
flappynerd: if you'd just tried that ;-)
intrigueD has joined #ruby
chouhoulis has quit [Remote host closed the connection]
jenrzzz has joined #ruby
dgncn has quit [Quit: Leaving]
solocshaw has joined #ruby
coffeecupp has joined #ruby
last_staff has joined #ruby
damonkelley has quit [Quit: WeeChat 0.4.2]
Gasher has quit [Ping timeout: 276 seconds]
deuxclique has joined #ruby
<flappynerd>
is there any reason I can't put a begin/rescue/end blog inside a rescue handler?
<flappynerd>
e.g. I'd like to attempt to log some info about the exception, but if that logging in turn fails, I want to at least fail gracefully and not throw another exception
<ruby[bot]>
mallu: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
mustmodify has left #ruby [#ruby]
baweaver has joined #ruby
Spami has joined #ruby
<Ox0dea>
apeiros: Why not just have ruby[bot] post the raw link?
blackmesa has quit [Quit: WeeChat 1.4]
despai has quit [Quit: This computer has gone to sleep]
IrishGringo has quit [Ping timeout: 250 seconds]
hololeap has joined #ruby
Spami has quit [Client Quit]
mary5030 has quit [Ping timeout: 250 seconds]
hightower6 has joined #ruby
<trosborn>
bjensen82: I’m not the most qualified to help you, but basically your problem is you are using each as an iterator when in fact is is an enumerator. if you want to do a nested loop I think you need to use something like a while loop.
deuxcliq_ has quit [Read error: Connection reset by peer]
<Ox0dea>
mallu: ^
<hightower6>
Hey, is there a way to achieve the effect of 'include', but include the module at a particular point in the ancestors chain, not at the end?
schickung has quit [Quit: schickung]
deuxclique has joined #ruby
<Ox0dea>
hightower6: There's #prepend for sticking it at the front.
<bjensen82>
trosborn: i think your referencing the wrong person :-)
<trosborn>
oops I meant mallu hah
<trosborn>
yeah
deuxclique has quit [Remote host closed the connection]
<Ox0dea>
(And can swallow having to drop back to 1.8 or so. :P)
hxegon_ has joined #ruby
James is now known as Guest83414
<hightower6>
Ox0dea, right, but which array would I prepend to? When I call .include() in a class to include a module, the array with the list of ancestors is not obvious / explicitly used
<Ox0dea>
mallu: I think you probably want #zip.
<Ox0dea>
hightower6: Huh?
<hxegon_>
If I want to check that something isn't 0, 0.0, '', or nil, is there a less magic/clearer way than #to_f#zero?
<Ox0dea>
The return value of #ancestors is generated dynamically; modifying that Array in-place has no bearing on the actual hierarchy.
<hightower6>
Ox0dea, the advice you gave me (.prepend) is for arrays, not for what I asked about