noobsu has quit [Read error: Connection reset by peer]
noobsu has joined #ruby
pat__ has joined #ruby
nerium has joined #ruby
jaguarmagenta has joined #ruby
idefine has joined #ruby
<claw>
http://paste.debian.net/684187/ can anybody tell me why this is slow ? is it my implementation or is it net-ssh ? i get almost 100% cpu usage. ( copies random data over sftp to a remote server ) i get 800-1000kB/s
idefine has quit [Remote host closed the connection]
idefine has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
halfamind has joined #ruby
<claw>
on 1Gbit ethernet. looks like the cpu is the bottleneck
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wigust has quit [Remote host closed the connection]
wigust has joined #ruby
idefine has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 260 seconds]
stardiviner has quit [Ping timeout: 276 seconds]
rbennace_ has joined #ruby
mtkd has quit [Ping timeout: 244 seconds]
noobsu has quit [Read error: Connection reset by peer]
noobsu has joined #ruby
mtkd has joined #ruby
skweek has quit [Remote host closed the connection]
idefine has joined #ruby
rbennacer has quit [Ping timeout: 260 seconds]
skweek has joined #ruby
mynameisbrian has joined #ruby
A5101 has joined #ruby
mynameisbrian has quit [Client Quit]
<shevy>
domgetter semi... sort halfway sleeping
<domgetter>
lol I wanted to show you a new gem I made
<domgetter>
It's a multi-client, multi-runtime repl server, and I'm using it to send ruby expressions and print them out in vim
<TheMoonMaster>
domgetter: In your readme, ```vim`
<TheMoonMaster>
I think
<TheMoonMaster>
erm, ```viml maybe
stardiviner has joined #ruby
<shevy>
hmm what does multi runtime mean?
<shevy>
I may not understand it today though, will have to reread after sleep
noobsu has quit [Read error: Connection reset by peer]
agent_white has quit [Quit: brb]
d0nn1e has joined #ruby
wigust has quit [Quit: Leaving]
noobsu has joined #ruby
<TheMoonMaster>
shevy: I don't know either tbf.
<domgetter>
shevy: it can manage different runtimes to evaluate incoming expressions. Well, not yet, but it would be able to, say, take an incoming javascript expression and send it to a node runtime
RegulationD has joined #ruby
noobsu has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 276 seconds]
stannard has quit [Remote host closed the connection]
oetjenj has quit [Ping timeout: 260 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
<domgetter>
TheMoonMaster: it was ```vim thanks :)
xall has joined #ruby
nankyokusei has joined #ruby
oetjenj has joined #ruby
<shevy>
hmm
nankyokusei has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
xall has quit [Ping timeout: 260 seconds]
<domgetter>
I was envious of the lisp and clojure folks who were sending forms to their nREPL servers and I figured we could set something up similar in Ruby
pawnbox has quit [Ping timeout: 244 seconds]
zast has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
cdg has joined #ruby
jancel has joined #ruby
idefine has joined #ruby
gambl0re has joined #ruby
<gambl0re>
which language is easier to learn, ruby or php, rails vs laravel
blaxter has quit [Read error: Connection reset by peer]
GodFather has quit [Remote host closed the connection]
joelwallis has joined #ruby
Devalo has quit [Read error: Connection reset by peer]
<joelwallis>
Are Ruby blocks executed asynchronous?
<domgetter>
joelwallis: no
Devalo has joined #ruby
kgrz has joined #ruby
<joelwallis>
If I have a method call that receives a block, the lines below it will be executed only after that block gets executed?
<domgetter>
joelwallis: yes
<joelwallis>
domgetter, newbie here. btw, ty for helping!
idefine_ has joined #ruby
<domgetter>
An exception to this rule is the block you pass to Thread.new
idefine has quit [Read error: Connection reset by peer]
Devalo has quit [Read error: Connection reset by peer]
<domgetter>
But unless you're doing async explicitly, it will block, yes
jenrzzz has quit [Ping timeout: 244 seconds]
Devalo has joined #ruby
<joelwallis>
roger
halfamind has quit [Quit: Leaving.]
LoneHermit has quit [Remote host closed the connection]
houhoulis has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 276 seconds]
xall has joined #ruby
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
rkazak has joined #ruby
<bazzy>
I am dealing with a plugin system.. where each plugin can access a hash called `config` .. I'd like to implement some kind of access layer that defines which keys are required to exist so that I can raise errors when they don't .. i only have that concept and was wondering if it would interest anyone to flesh it out .. I of course will be figuring it out too based on response
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
<bazzy>
What I haven't figured out yet is if it's best to implement a new system which requires a redesign of this config hash accesses .. or if I can somehow "transparently" implement the layer
The_Phoenix has joined #ruby
<bazzy>
Considering that per plugin class definition, the list of required and optional config hash keys will change
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
<bazzy>
The plugin config hash is based on a pre-existing framework .. I'm open to modifying it but preliminarily against it
The_Phoenix has quit [Max SendQ exceeded]
The_Phoenix has joined #ruby
The_Phoenix has quit [Max SendQ exceeded]
Biopandemic has quit [Remote host closed the connection]
The_Phoenix has joined #ruby
smathy is now known as smathy_afk
The_Phoenix has quit [Max SendQ exceeded]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
p1k has joined #ruby
bronson has joined #ruby
stardiviner has quit [Ping timeout: 265 seconds]
Kallis has quit [Quit: Leaving]
quazimod1 has quit [Quit: leaving]
bronson has quit [Ping timeout: 252 seconds]
tmtwd has joined #ruby
idefine_ has quit [Ping timeout: 250 seconds]
rbennace_ has quit [Remote host closed the connection]
idefine has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
blackmesa has joined #ruby
yaewa has joined #ruby
moei has quit [Ping timeout: 246 seconds]
rbennacer has joined #ruby
bruno- has quit [Read error: Connection reset by peer]
bruno- has joined #ruby
dsea has quit [Read error: Connection reset by peer]
jokester has quit [Quit: enabling selinux]
blackmesa has quit [Ping timeout: 240 seconds]
jaguarmagenta has joined #ruby
dsea has joined #ruby
czerasz has quit [Quit: Ex-Chat]
czerasz has joined #ruby
chip_ has joined #ruby
capsloth has joined #ruby
p1k has quit [Read error: Connection reset by peer]
idefine has quit [Ping timeout: 250 seconds]
idefine has joined #ruby
capsloth has left #ruby ["Leaving"]
braincrash has quit [Quit: bye bye]
<nerium>
Is there a way to combine this into one? "%5s" % ("%.2f" % 1.0)
<kirillow>
and explain to me why index.slim is able to access @posts but layout.slim can not access @config?
<kirillow>
`NoMethodError: undefined method `[]' for nil:NilClass`
blackmesa has joined #ruby
sarlalian has quit [Ping timeout: 252 seconds]
<havenwood>
kirillow: An aside, but you're not closing those files. Consider `File.read` or the block form of `File.open` that's self-closing.
terminalrecluse has joined #ruby
<kirillow>
thanks i will take a look
<havenwood>
kirillow: `YAML.load` is the usual way to write it in the actual coad.
<havenwood>
code*
sarlalian has joined #ruby
nischay has joined #ruby
bobbycvi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
beauby has joined #ruby
SilverKey has quit [Quit: Halted.]
moeabdol has joined #ruby
<beauby>
Hi there. When building a gem, is there a recommended way to add "optional methods" (i.e. methods that will get defined *only* if some constant is defined at runtime (say ActionController for instance))?
tmtwd has quit [Ping timeout: 244 seconds]
kgrz has quit [Ping timeout: 265 seconds]
freija_ has joined #ruby
xue has joined #ruby
navneet_ has joined #ruby
kgrz has joined #ruby
emilkarl has joined #ruby
janebootydoe has quit [Quit: Leaving]
ecksit has quit [Ping timeout: 246 seconds]
johnDoe111 has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
johnDoe111^ has quit [Remote host closed the connection]
grs has joined #ruby
johnDoe111^ has joined #ruby
nerium has joined #ruby
johnDoe111^ has quit [Remote host closed the connection]
terlar has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
schpn has joined #ruby
schpn has quit [Client Quit]
ferr has joined #ruby
codecop has joined #ruby
lsmola has joined #ruby
blingrang has joined #ruby
blingrang has joined #ruby
blingrang has quit [Changing host]
blackmesa has joined #ruby
vondruch has joined #ruby
navneet__ has joined #ruby
navneet_ has quit [Read error: Connection reset by peer]
flughafen_ has quit [Ping timeout: 250 seconds]
roshanavand has joined #ruby
<hightower3>
Hey, what's the common way in Ruby to hash directory names like "abcdef" into "a/ab/abc/abcdef" ?
blackmesa has quit [Ping timeout: 252 seconds]
ravishankarjha has quit [Remote host closed the connection]
Ravisun66 has joined #ruby
<Ravisun66>
hi
<Ravisun66>
any help for multithreading?
elaptics`away is now known as elaptics
Ravisun66 has quit [Remote host closed the connection]
<toretore>
hightower3: that depends on what behavior you want
stan has quit [Ping timeout: 246 seconds]
<hightower3>
toretore, right, right, I mean is there a lib or something dealing with that and providing extra options
<hightower3>
(the functionality itself, in the basic sense, is trivial of course)
johnDoe111^ has joined #ruby
moeSeth has joined #ruby
<toretore>
hightower3: i don't see why you would even want to introduce a dependency for something like that
<toretore>
your goal is probably to store a lot of files and to avoid storing them all in the same directory?
nischay has quit [Remote host closed the connection]
<toretore>
so you probably want the standard method of hashing the filename and then splitting that up into n levels of dirs
<toretore>
d=Digest::SHA1.hexdigest(filename); path, name = File.join(d[0], d[1], d[2], d[3]), d[4..-1]
Dimik has quit [Ping timeout: 250 seconds]
stan has joined #ruby
roshanavand has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
roshanavand has joined #ruby
navneet__ has quit []
johnDoe111^^ has joined #ruby
johnDoe111^^^ has joined #ruby
johnDoe111^^^^ has joined #ruby
<Zarthus>
Does anyone know of decent libraries for HTTP? I've been using Unirest for a while but the maintainer never pushes updates to rubygems.org so you'll be stuck asking your users to use git for the gem
johnDoe111^^^^ has quit [Remote host closed the connection]
<Zarthus>
I've written my own solution myself but it's far less feature-istic and chokes at HTTP redirections :<
roshanavand has quit [Quit: This computer has gone to sleep]
M570` has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
jaruga___ has joined #ruby
jaruga___ is now known as jaruga____
M570 has quit [Ping timeout: 276 seconds]
kirillow has quit [Ping timeout: 265 seconds]
Shashikant86 has joined #ruby
Shashikant86 has quit [Max SendQ exceeded]
pabloh has joined #ruby
kirillow has joined #ruby
TomyLobo has joined #ruby
<tzica>
can anyone help me with a fix for this script https://exchange.nagios.org/directory/Plugins/System-Metrics/Networking/Martin/details ? it uses mtr and I think the script is having problems with the lines having ??? - it means there is no additional route information. Script is working for most of examples only the ones with ??? throws error
<tzica>
the fix in the comments does not works
kirillow has quit [Client Quit]
bluOxigen has quit [Ping timeout: 244 seconds]
bluOxigen has joined #ruby
czerasz has joined #ruby
aharlan has joined #ruby
aharlan has quit [Client Quit]
yqt has quit [Ping timeout: 276 seconds]
stannard has joined #ruby
startupality has joined #ruby
gregf_ has quit [Quit: leaving]
bronson has joined #ruby
chipotle has quit [Ping timeout: 252 seconds]
Coldblackice has quit [Ping timeout: 276 seconds]
johnDoe111^^ has quit [Remote host closed the connection]
blackgoat has quit [Ping timeout: 260 seconds]
johnDoe111 has quit [Remote host closed the connection]
johnDoe111^^^ has quit [Remote host closed the connection]
johnDoe111 has joined #ruby
ropeney has joined #ruby
ropeney has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
stannard has quit [Ping timeout: 276 seconds]
Octavian has quit [Remote host closed the connection]
bronson has quit [Ping timeout: 252 seconds]
startupality has quit [Quit: startupality]
d0lph1n98 has quit [Ping timeout: 276 seconds]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
marr has joined #ruby
nankyokusei has joined #ruby
whathappens has joined #ruby
blackmesa has joined #ruby
whathapp_ has joined #ruby
nankyokusei has quit [Remote host closed the connection]
lacce has joined #ruby
whathap__ has joined #ruby
d0lph1n98 has joined #ruby
nighttime has joined #ruby
lacce has quit [Read error: Connection reset by peer]
aupadhye has joined #ruby
nankyokusei has joined #ruby
whathappens has quit [Ping timeout: 276 seconds]
whathappens has joined #ruby
whathapp_ has quit [Ping timeout: 250 seconds]
blackmesa has quit [Ping timeout: 250 seconds]
johnDoe111 has joined #ruby
whathapp_ has joined #ruby
startupality has joined #ruby
whathap__ has quit [Ping timeout: 250 seconds]
nischay has joined #ruby
noobsu has joined #ruby
oetjenj has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
whathap__ has joined #ruby
konsolebox has joined #ruby
startupality has quit [Client Quit]
whathappens has quit [Ping timeout: 250 seconds]
whathappens has joined #ruby
whathapp_ has quit [Ping timeout: 250 seconds]
whathapp_ has joined #ruby
<Zarthus>
tzica: can you give me some example content of what you're comparing against?
whathap__ has quit [Ping timeout: 250 seconds]
<Zarthus>
if I were to loosely guess the problem is in the #run_mtr method, but I don't have any idea what it's really for but I could verify if the regex can be improved
<Zarthus>
er, also a different variable otherwise i'll overwrite the existing one # { |x| !x.nil? }
whathap__ has joined #ruby
evidex has joined #ruby
whathappens has quit [Ping timeout: 250 seconds]
nankyokusei has quit [Ping timeout: 246 seconds]
madgen has joined #ruby
whathappens has joined #ruby
whathap__ has quit [Read error: Connection reset by peer]
skade has joined #ruby
hightower3 has quit [Ping timeout: 246 seconds]
jgt1 has joined #ruby
johnDoe111^^ has joined #ruby
<Zarthus>
honestly I should have probably separated the regexes instead, or even just a simple String#include? would have sufficed
whathapp_ has quit [Ping timeout: 276 seconds]
whathapp_ has joined #ruby
m570 has quit [Remote host closed the connection]
<tzica>
thanks for the help, it's bypassing the ??? question marks with both
ravishankarjha has joined #ruby
<tzica>
the first if is working too
<Zarthus>
neato
nobitanobi has joined #ruby
harry111 has quit [Quit: Leaving]
whathap__ has joined #ruby
harry111 has joined #ruby
<Zarthus>
if you want me to send in a proper pr I can do that
<tzica>
the 2nd if truncates a bit the output
moeabdol has joined #ruby
<tzica>
let me find some other hosts with route issues on the way(middle) and not at the end
whathappens has quit [Ping timeout: 276 seconds]
whatha___ has joined #ruby
<harry111>
ANICK harry222
harry111 is now known as harry222
whathapp_ has quit [Ping timeout: 250 seconds]
whathappens has joined #ruby
whathap__ has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
whathapp_ has joined #ruby
Devalo has quit [Remote host closed the connection]
<tzica>
Zarthus yes, this if m.captures.select { |xx| !xx.nil? }.count < 4 deletes the lines with ??? - not my intention - from network point of view means no route info, but still good info for me :)
johnDoe111^^ has quit [Ping timeout: 260 seconds]
<tzica>
so I find this if m.captures.count < 4 fine
whatha___ has quit [Ping timeout: 250 seconds]
<Zarthus>
tzica: oh, you can literally print out anything you want, it's just that I stopped it from erroring
<Zarthus>
at the moment all it does is tell you it skips it because it doesn't know what to do with it
<Zarthus>
(and it does tell you it encountered an ??? block)
whathappens has quit [Ping timeout: 276 seconds]
jaguarmagenta has quit [Ping timeout: 265 seconds]
whathapp_ has quit [Ping timeout: 276 seconds]
Devalo has joined #ruby
RegulationD has joined #ruby
blackmesa has joined #ruby
koooge has quit [Quit: Leaving...]
Gasher has joined #ruby
Devalo has quit [Remote host closed the connection]
blaxter has joined #ruby
Devalo has joined #ruby
chipotle has joined #ruby
mdw has joined #ruby
koooge has joined #ruby
RegulationD has quit [Ping timeout: 260 seconds]
Devalo has quit [Remote host closed the connection]
der-landgraf has quit [Ping timeout: 276 seconds]
stardiviner has quit [Ping timeout: 265 seconds]
nobitanobi has quit [Remote host closed the connection]
blackgoat has joined #ruby
postmodern has quit [Quit: Leaving]
startupality has quit [Quit: startupality]
johnDoe111^^ has joined #ruby
Ishido has joined #ruby
jgt1 has quit [Ping timeout: 246 seconds]
qasaur has joined #ruby
johnmilton has quit [Remote host closed the connection]
startupality has joined #ruby
qasaur has quit [Max SendQ exceeded]
qasaur has joined #ruby
d0lph1n98 has quit [Ping timeout: 260 seconds]
<claw>
can anybody confirm that net-sftp is really slow ? i have this test: http://paste.debian.net/684187/, It uploads random data to 'test-host' speed is 1000 kB/s max while cpu runs at 100%.
antgel has quit [Ping timeout: 260 seconds]
<claw>
(on a 1 gigabit ethernet connection)
antgel has joined #ruby
gregf_ has quit [Quit: leaving]
banister has joined #ruby
koooge has quit [Quit: Leaving...]
yfeldblum has quit [Ping timeout: 276 seconds]
stardiviner has joined #ruby
A124 has quit [Read error: Connection reset by peer]
grs has quit [Ping timeout: 260 seconds]
johnDoe111^^^ has joined #ruby
Devalo has joined #ruby
harry222 is now known as harry333
<workmad3>
claw: is the test host on the 1gb LAN?
<claw>
workmad3: yes
A124 has joined #ruby
Devalo has quit [Remote host closed the connection]
johnDoe111^^^ has quit [Remote host closed the connection]
johnDoe111 has quit [Remote host closed the connection]
<workmad3>
claw: ok... it probably is slow, but I'm surprised it would be that much slower
nankyokusei has joined #ruby
<claw>
me too
<ujjain>
error_without_bodytag = #{e.message}.sub! '<body>', '<removedbody>' - Can I use .sub with e.message?
<workmad3>
claw: you should probably be doing (read.fdiv(time_passed)).fdiv(1024) for more accurate reporting (you're suffering from multiple truncations from integer division currently) but that doesn't account for reaching 1% of possible upload speed :/
gregf_ has joined #ruby
flughafen_ has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
noobsu has joined #ruby
jgt1 has joined #ruby
grs has joined #ruby
johnDoe111 has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
<claw>
workmad3: yes even if its not accurate something realy wrong here
der-landgraf has joined #ruby
nerium has quit [Quit: nerium]
johnDoe111 has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
johnDoe111^^^ has joined #ruby
<harry333>
hi
tagaulap has joined #ruby
johnDoe111^^^ has quit [Remote host closed the connection]
moeSeth has quit [Quit: Connection closed for inactivity]
johnDoe111 has quit [Remote host closed the connection]
johnDoe111 has joined #ruby
duncannz has quit [Quit: Leaving]
johnDoe111 has quit [Remote host closed the connection]
johnDoe111 has joined #ruby
madgen has quit [Ping timeout: 250 seconds]
lxsameer has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
idefine has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
<jhass>
ujjain: I'd refrain from sub! but sub should be no problem as it's a string
pyo_ has joined #ruby
johnDoe111 has joined #ruby
<jhass>
a bit weird to have HTML (?) in an exception in the first place though
nchambers has quit [Quit: Killed (Sigyn (Being awesome is too on-topic for freenode))]
rodfersou has joined #ruby
nankyokusei has quit [Remote host closed the connection]
diegoaguilar has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
nchambers has joined #ruby
harry333 has quit [Quit: Leaving]
johnDoe111 has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
johnDoe111 has joined #ruby
flughafen_ has quit [Ping timeout: 276 seconds]
harry111 has joined #ruby
skade has joined #ruby
harry111 has quit [Client Quit]
mdw has quit [Quit: Sleeping Zzzzz]
harry111 has joined #ruby
johnDoe111 has quit [Remote host closed the connection]
johnDoe111^ has quit [Remote host closed the connection]
johnDoe111^^ has quit [Remote host closed the connection]
skade has quit [Client Quit]
jgt2 has joined #ruby
johnDoe111 has joined #ruby
harry111 has quit [Client Quit]
harry111 has joined #ruby
pyo_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
d0lph1n98 has joined #ruby
Biopandemic has joined #ruby
madgen has joined #ruby
ta_ has joined #ruby
jgt1 has quit [Ping timeout: 276 seconds]
platzhirsch has joined #ruby
<harry111>
hello everyone
harry111 is now known as harry222
* harry222
waves hello
<Zarthus>
sup
emilkarl has joined #ruby
pyo_ has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
aupadhye has quit [Quit: Leaving]
nankyokusei has joined #ruby
nischay has quit [Remote host closed the connection]
govg has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
aupadhye has joined #ruby
matp has quit [Remote host closed the connection]
madgen has quit [Ping timeout: 265 seconds]
deadnull_ has joined #ruby
Devalo has joined #ruby
GodFather has joined #ruby
ldnunes has joined #ruby
ravishankarjha has quit [Remote host closed the connection]
Devalo has quit [Ping timeout: 260 seconds]
d0lph1n98 has quit [Ping timeout: 250 seconds]
ravishankarjha has joined #ruby
johnmilton has joined #ruby
platzhirsch has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
sepp2k has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
jgt3 has joined #ruby
gregf has quit [Quit: WeeChat 1.5]
noobsu has joined #ruby
jgt2 has quit [Ping timeout: 276 seconds]
johnmilton has quit [Ping timeout: 260 seconds]
gregf has joined #ruby
nerium has joined #ruby
crameth has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
RegulationD has joined #ruby
matp has joined #ruby
grs has quit [Ping timeout: 276 seconds]
idefine has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
der-landgraf has quit [Quit: WeeChat 1.5]
der-landgraf has joined #ruby
flughafen_ has joined #ruby
RegulationD has quit [Ping timeout: 240 seconds]
govg has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
govg has quit [Client Quit]
noobsu has joined #ruby
GodFather has quit [Remote host closed the connection]
j_mcnally has joined #ruby
d0lph1n98 has joined #ruby
m_antis has joined #ruby
johnDoe111 has quit [Ping timeout: 265 seconds]
hanmac has quit [Ping timeout: 250 seconds]
johnmilton has joined #ruby
johnny56 has joined #ruby
nankyokusei has quit [Remote host closed the connection]
ixti has joined #ruby
harry222 has quit [Ping timeout: 265 seconds]
grs has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
sdothum has joined #ruby
nadir has joined #ruby
blackgoat has quit [Ping timeout: 265 seconds]
|2701 has joined #ruby
xall has quit [Ping timeout: 260 seconds]
sinkensabe has joined #ruby
hanmac has joined #ruby
minimalism has quit [Quit: minimalism]
flashpoint9 has joined #ruby
nando294021 has quit [Ping timeout: 276 seconds]
jgt3 has quit [Ping timeout: 260 seconds]
jgt3 has joined #ruby
sami has left #ruby [#ruby]
gagrio has quit [Ping timeout: 244 seconds]
spider-mario has joined #ruby
qasaur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Weavel has joined #ruby
GodFather has joined #ruby
houhoulis has joined #ruby
aegis3121 has joined #ruby
madgen has joined #ruby
djcp has joined #ruby
bauerbob has joined #ruby
GodFather has quit [Remote host closed the connection]
qasaur has joined #ruby
saneax is now known as saneax_AFK
synthroid has joined #ruby
<shevy>
yo Zarthus
<Zarthus>
o/
Yiota has joined #ruby
<bauerbob>
hi. i want to implement a method that can be called with a hash as well as key value pairs. some of the keys are mandatory, but :to is optional and it’s the only one that should not be in the variable where the rest of the hash/key-value-pairs are in? my gist works, but I guess there’s a more elegant solution in ruby. could you please have a look? https://gist.github.com/thorstenhirsch/30d305f553d5c5a30201308421a4e2fe
ravishankarjha has quit [Remote host closed the connection]
pyo_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
bauerbob: IMO don't do that. let the caller normalize the arguments. that'll be *a lot* cleaner.
<apeiros>
if you insist on what I'd consider an ugly way: def something(hashargs=nil, id: default, foo: default, to: default); if hashargs; id = hashargs[:id]; …; end …
Devalo has joined #ruby
<apeiros>
there are other ways, sacrificing different things.
Devalo has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 276 seconds]
nankyokusei has quit [Remote host closed the connection]
IrishGringo has joined #ruby
<bauerbob>
ok… well, you’re right, this was more or less a workaround, because i couldn’t find the place, where i call something() with key-value pairs instead of a hash
Devalo has joined #ruby
<bauerbob>
guess i’ll stick to something(msg, to: nil)
<apeiros>
it's called keyword arguments, not key value pairs ;-)
<bauerbob>
ok :)
nankyokusei has joined #ruby
beauby has quit [Ping timeout: 260 seconds]
gagrio has joined #ruby
nankyokusei has quit [Remote host closed the connection]
Azure|dc has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m_antis has quit [Ping timeout: 260 seconds]
blackgoat has joined #ruby
akiTendo has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
how about... keyword pairs! or ... argument values!
raeoks has joined #ruby
allcentury has joined #ruby
ta_ has joined #ruby
akiTendo has quit [Quit: akiTendo]
ravishankarjha has joined #ruby
akiTendo has joined #ruby
mdw has joined #ruby
jancel has joined #ruby
Madplatypus has joined #ruby
Azure has joined #ruby
Devalo has quit [Remote host closed the connection]
akiTendo has quit [Quit: akiTendo]
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has joined #ruby
umdstu has joined #ruby
labaleine_ has joined #ruby
labaleine has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
labaleine_ is now known as labaleine
duoi has quit [Ping timeout: 276 seconds]
bauerbob has quit [Quit: bauerbob]
bronson has quit [Ping timeout: 252 seconds]
duoi has joined #ruby
gnufied has joined #ruby
sinkensabe has quit [Remote host closed the connection]
|2701 has quit [Changing host]
|2701 has joined #ruby
|2701 has joined #ruby
kobain has joined #ruby
akiTendo has joined #ruby
agent_white has quit [Quit: brb]
aegis3121 has quit [Ping timeout: 265 seconds]
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinkensabe has joined #ruby
Devalo has joined #ruby
AnoHito_ has quit [Read error: Connection reset by peer]
kus has joined #ruby
kus has quit [Max SendQ exceeded]
flashpoint9 has quit [Read error: Connection reset by peer]
AnoHito_ has joined #ruby
hays has quit [Read error: Connection reset by peer]
flashpoint9 has joined #ruby
monoprotic has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
monoprotic has joined #ruby
monoprotic has joined #ruby
iamvery has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agent_white has joined #ruby
nando293921 has joined #ruby
nando293921 has quit [Client Quit]
ta_ has quit [Remote host closed the connection]
<apeiros>
IMO String#^ should just be in ruby core
<agent_white>
Mornin'
nando293921 has joined #ruby
<apeiros>
moin
stardiviner has joined #ruby
perlgod has joined #ruby
<claw>
apeiros: stupid question: how to use it ?
<claw>
make was fine but how to call it from ruby
mdw has quit [Ping timeout: 265 seconds]
jancel has quit [Read error: Connection reset by peer]
<apeiros>
require the resulting .so or .bundle by either putting it into a path in $LOAD_PATH, or by absolute path
<apeiros>
e.g. I just did `pry -r /Users/apeiros/Documents/Development/Ruby/snippets/native_string_xor/ext/string_xor` (copy pasted the path of course :D)
crameth has quit [Quit: crameth]
p1k has joined #ruby
<apeiros>
make sure you require ctr from net-sftp, then redefine it to use String#^
<apeiros>
"foo" ^ "bar" # is how it's called
araujo has joined #ruby
nando293921 has quit [Ping timeout: 246 seconds]
CoderPuppy has joined #ruby
<apeiros>
oh great, still had the ctr.rb file open in my browser. the method actually gets defined dynamically upon extend
<apeiros>
I'd probably get a hold of the source-file you're loading and edit that.
<apeiros>
I wonder why they chose to implement it that way. seems bad.
arpegius has quit [Quit: arpegius]
startupality has quit [Quit: startupality]
dstarh has joined #ruby
cpup has quit [Ping timeout: 276 seconds]
jobewan has joined #ruby
davedev24 has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
nankyokusei has joined #ruby
startupality has joined #ruby
stardiviner has quit [Ping timeout: 260 seconds]
CloCkWeRX has joined #ruby
jobewan is now known as jobewan_away
ftj has joined #ruby
pabloh has quit [Quit: Leaving]
jwren has joined #ruby
hydr8d has joined #ruby
jobewan_away is now known as jobewan
<Zarthus>
Does TracePoint.new(:raise) also catch caught exceptions
<apeiros>
it'd be helpful if there were headers on those columns
aufi has quit [Ping timeout: 265 seconds]
pawnbox_ has joined #ruby
nankyokusei has quit [Ping timeout: 246 seconds]
antgel has joined #ruby
<claw>
%Total %Self Total Self Wait Child Calls Name
<claw>
they are just a the top of the page. ( ruby-prof gem )
<Zarthus>
apeiros: yeah, it looks like that's the case.
drptbl has joined #ruby
<apeiros>
claw: and your transfer datarate?
<Zarthus>
I was really surprised to find windows registry errors in my error logs
yqt has joined #ruby
<claw>
2 times faster cpu still at 100%. that whole implementation of ctr is a problem
pawnbox has quit [Ping timeout: 240 seconds]
polishdub has joined #ruby
codecop has quit [Remote host closed the connection]
guille_ has joined #ruby
<claw>
#update still consumes 98.18% of the total cpu time
<apeiros>
seems like #update is the next big fish
duoi has quit [Ping timeout: 276 seconds]
guille_ has left #ruby [#ruby]
<shevy>
I like fish
<apeiros>
double the bandwith is still piss poor. at least iirc that means you get 2Mbit/s on a 1000Mbit/s connection?
<apeiros>
what kind of transfer rates do you get with a native sftp client?
duoi has joined #ruby
mdw_ has quit [Quit: Sleeping Zzzzz]
yqt has quit [Ping timeout: 244 seconds]
<apeiros>
btw., why are the % columns empty except for #update?
hydr8d has quit [Quit: Goodbye]
SilverKey has quit [Quit: Halted.]
jancel has joined #ruby
aganov has quit [Remote host closed the connection]
drptbl has quit [Quit: See you later!]
duoi has quit [Ping timeout: 276 seconds]
<claw>
if native sftp client i get ~ 800Mbit/s
<claw>
apeiros: dont know why the columns are empty its generated using ruby-prof
zhunting has joined #ruby
<apeiros>
mhm, 800Mbit/s is about what I'd have expected
Insti has joined #ruby
<apeiros>
now I wonder whether I should change some code at work, which uses net/sftp too to download ~300MB of data
jancel has quit [Remote host closed the connection]
mdw has joined #ruby
mdw has quit [Max SendQ exceeded]
<claw>
apeiros: depends on the sshd version you are connecting to. i think only the ctr implementation is such a mass ( which is default for current sshd )
duoi has joined #ruby
mdw has joined #ruby
<claw>
nevermind i already tested arcfour128 which was faster but still at 100%cpu
bronson has joined #ruby
<claw>
#increment_counter! is fun too
SilverKey has joined #ruby
masaru- has joined #ruby
_guille has joined #ruby
davedev2_ has joined #ruby
davedev2_ has quit [Read error: Connection reset by peer]
the_drow has quit [Quit: This computer has gone to sleep]
chouhoulis has quit [Remote host closed the connection]
<toretore>
new_user: what is the error?
<new_user>
toretore, SQLite3::CantOpenException: unable to open database file (Sequel::DatabaseError)
jgt3 has quit [Ping timeout: 252 seconds]
<toretore>
you are creating a new connection for each insert
<toretore>
create one, then use that for each insert
jaguarmagenta has joined #ruby
chouhoulis has joined #ruby
startupality has joined #ruby
RegulationD has quit [Remote host closed the connection]
RegulationD has joined #ruby
roger_rabbit has joined #ruby
<flips>
Hm, using rbenv and bundler, it's easy enough to manage dependencies etc. But how do you keep various installations from being bloated? (I'm used to Python's virtualenvs, where all I need is copied to that project dir.) When I develop a large project on my laptop, when I'm done with that, I'd like to clear out what's not needed. I guess I could remove all and do bundle install on the projects I'm working on ...
<flips>
(?) Or am I missing an obvious better solution? :)
<new_user>
toretore, thanks you very much.
<agent_white>
toretore: Working with Sequel myself as well... so is it pretty much a good idea to create the DB connection outside of any namespace?
<agent_white>
ie - Sequel.connect(){|db| #do all the things here using one connection}
<toretore>
agent_white: it's a good idea not to create one for each query :P
jhack has joined #ruby
<toretore>
but yes, probably, inject the connection into whatever needs it
jwren has quit [Quit: Lost terminal]
<agent_white>
Roger that!
jaguarmagenta has quit [Ping timeout: 246 seconds]
<toretore>
otherwise you'll have a class which "magically" knows how to get data from a db
speakingcode has quit [Ping timeout: 265 seconds]
slash_nick is now known as slash_me
<toretore>
the best is probably to separate data retrieval and data processing entirely, i.e. `Sequel.connect{|db| db.query(q).map{|r| DataProcessor.new(r).result } }`
Weavel has quit [Quit: The early bird may get the worm, but the second mouse gets the cheese]
nofacade has joined #ruby
idle_task has quit [Quit: .]
moeabdol has quit [Quit: WeeChat 1.4]
elaptics is now known as elaptics`away
kirun has joined #ruby
duoi has quit [Ping timeout: 276 seconds]
Guest38 has joined #ruby
loinclot_ has joined #ruby
loinclot_ has quit [Remote host closed the connection]
shibly has joined #ruby
shibly has left #ruby [#ruby]
masaru- has quit [Remote host closed the connection]
swills has quit [Ping timeout: 250 seconds]
flughafen_ has quit [Ping timeout: 240 seconds]
amclain has joined #ruby
masaru- has joined #ruby
duoi has joined #ruby
loinclot_ has joined #ruby
skalfyfan has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<lucidity>
i've been doing a lot of swift and php for work and i've been tinkering with ruby in my spare time...how do you think the transition from php to ruby will be?
<lucidity>
(I really, really like Swift)
bryanray has joined #ruby
<Papierkorb>
no idea what swift is. But the transition to ruby from PHP will be fabolous.
<lucidity>
swift = os
<lucidity>
ios*
<Papierkorb>
oh that apple lang
yaewa has quit [Quit: Leaving...]
codecop has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tomchapin has joined #ruby
kareeoleez has joined #ruby
RegulationD has quit [Ping timeout: 246 seconds]
moei has joined #ruby
<lucidity>
yeah it's pretty neat imo
IrishGringo has quit [Ping timeout: 265 seconds]
ta__ has joined #ruby
shadeslayer has quit [Ping timeout: 250 seconds]
SilverKey has joined #ruby
lapide_viridi has joined #ruby
sesquipedalian has quit [Ping timeout: 244 seconds]
lapide_viridi has quit [Remote host closed the connection]
firstdayonthejob has joined #ruby
jgt3 has quit [Ping timeout: 265 seconds]
CJKinni_ has joined #ruby
ta_ has quit [Ping timeout: 260 seconds]
rodfersou|lunch is now known as rodfersou
Pupeno has quit [Remote host closed the connection]
madgen has joined #ruby
SilverKey has quit [Ping timeout: 246 seconds]
Pupeno has joined #ruby
araujo_ has quit [Quit: Leaving]
kareeoleez has quit [Ping timeout: 276 seconds]
<bazzy>
wait.. Steve Jobs faked his own death?
skalfyfan has joined #ruby
skalfyfan has quit [Client Quit]
p1k has quit [Ping timeout: 260 seconds]
mark_66 has quit [Remote host closed the connection]
RegulationD has joined #ruby
jamto11 has joined #ruby
CJKinni_ has quit [Client Quit]
skalfyfan has joined #ruby
SilverKey has joined #ruby
araujo has joined #ruby
Mia has joined #ruby
Mia has joined #ruby
Pupeno has quit [Ping timeout: 244 seconds]
kareeoleez has joined #ruby
j_mcnally has joined #ruby
skalfyfan has quit [Client Quit]
<benzrf>
o3o
<benzrf>
lucidity: screw ruby - just learn haskell
skalfyfan has joined #ruby
opentux has joined #ruby
Axy has joined #ruby
skalfyfan has quit [Client Quit]
jancel has quit [Remote host closed the connection]
jancel has joined #ruby
<weaksauce>
lucidity ruby is nice. swift is nice. php is not so nice
eljimmy has quit [Quit: This computer has gone to sleep]
chosen1 has joined #ruby
<ytti>
learving curve for purely functional is pretty steep
<ytti>
but i wonder if that would be true for someone with 0 experience in programming
bougyman has quit [Remote host closed the connection]
shinnya has quit [Ping timeout: 265 seconds]
aupadhye has quit [Ping timeout: 276 seconds]
jaguarmagenta has quit [Ping timeout: 240 seconds]
emilkarl[away] is now known as emilkarl
skalfyfan has joined #ruby
loinclot_ has joined #ruby
err_ok has quit [Ping timeout: 260 seconds]
noobsu has joined #ruby
hahuang65 has quit [Quit: WeeChat 1.4]
Pupeno_ has quit [Ping timeout: 260 seconds]
hollywood has quit [Quit: Quitting]
loinclot_ has quit [Read error: Connection reset by peer]
<benzrf>
ytti: i think it's harder to learn haskell from scratch than python from scratch, if by learn you mean "come to understand the semantics of, in a way that allows you to really understand what code does, and design systems"
loinclot_ has joined #ruby
skalfyfan has quit [Client Quit]
loinclot_ has quit [Client Quit]
<benzrf>
er, wait
<benzrf>
flip haskell and python
<benzrf>
i think it's harder to learn haskell from scratch than python from scratch, if by learn you mean "gain the ability to make your computer do things that are useful"
<benzrf>
"without necessarily 100% understanding the conceptual stuff behind what you're doing"
loincloth has quit [Ping timeout: 246 seconds]
hahuang65 has joined #ruby
nyuszika7h has quit [Quit: WeeChat 1.4]
Weavel has quit [Quit: Friends help you move. Real friends help you move bodies.]
err_ok has joined #ruby
govg has joined #ruby
shadeslayer has joined #ruby
duoi has quit [Ping timeout: 276 seconds]
mrgrieves has joined #ruby
duoi has joined #ruby
jancel has quit [Remote host closed the connection]
ta__ has quit [Remote host closed the connection]
jwdunne has joined #ruby
jwdunne has left #ruby ["AndroIRC"]
blaxter has quit [Quit: foo]
jwdunne has joined #ruby
wilbert has quit [Ping timeout: 276 seconds]
<RegulationD>
fwiw, one of the stated goals of "haskell book" is to teach haskell in a way that does not assume that you know another language. I can't really comment on how successful it is, but I appreciate the recognition that such assumptions were a part of most other learning materials.
dopie has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
the_drow has joined #ruby
govg has quit [Ping timeout: 252 seconds]
dhollinger has joined #ruby
govg has joined #ruby
fr3d_ativista has joined #ruby
j_mcnally has quit [Read error: Connection reset by peer]
j_mcnally has joined #ruby
jwdunne has quit [Ping timeout: 276 seconds]
mdw has joined #ruby
Peetooshock has quit [Quit: Ой, всё!]
symm- has quit [Ping timeout: 276 seconds]
kareeoleez has quit [Remote host closed the connection]
davedev2_ has quit [Ping timeout: 250 seconds]
kareeoleez has joined #ruby
pawnbox_ has quit [Ping timeout: 260 seconds]
domgetter has joined #ruby
davedev24 has joined #ruby
nyuszika7h has joined #ruby
noobsu has quit [Read error: Connection reset by peer]
skalfyfan has joined #ruby
Devalo has joined #ruby
noobsu has joined #ruby
skalfyfan has quit [Client Quit]
terlar has quit [Ping timeout: 250 seconds]
SilverKey has joined #ruby
ramfjord_ has joined #ruby
skalfyfan has joined #ruby
govg has quit [Ping timeout: 252 seconds]
SilverKey has quit [Client Quit]
SilverKey has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
kareeoleez has quit [Remote host closed the connection]
bryanray has quit [Ping timeout: 265 seconds]
minimalism has joined #ruby
tagaulap has quit [Quit: Connection closed for inactivity]
<digitalfiz>
hey guys i am a devops dude trying to set up a travis build for a ruby app and was wondering is there a way to make the app not require the database when running unit tests?
rkoller has joined #ruby
<digitalfiz>
err this is a rail app sorry might be a better channel for this
arlek has quit [Ping timeout: 252 seconds]
Caelum has quit [Ping timeout: 260 seconds]
duoi has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
bauerbob has joined #ruby
<adaedra>
?rails
<ruby[bot]>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
duoi has joined #ruby
hrsxpj has quit [Remote host closed the connection]
<pipework>
Directly in the place without being put somewhere else first
<tubbo>
i didn't need to reinstall anything, it was nice
<pipework>
tubbo: reinstalled OSX after formatting.
joneshf-laptop has joined #ruby
<tubbo>
ah ok
skalfyfan has joined #ruby
<pipework>
Now I have a privileged user I don't use except when I trust/need something to work that won't otherwise.
<pipework>
So my normal user typically has everything they want just to them that's not applicable for system-wide use in ~/.config/ and I've forked a lot of projects to get them to support XDG_CONFIG_HOME as the install location, but also came up with a lot of symlinks to preserve old behaviour until I remove the assumptive behaviours from all the projects.
idefine_ has joined #ruby
<tubbo>
the answer i was looking for was `gem: "--no-ri --no-rdoc --bindir /usr/local/bin"` in ~/.gemrc fwiw.
SilverKey has quit [Quit: Halted.]
<pipework>
My admin user has homebrew installed like normal, so I can install brew stuff as normal and execute it as my normal user.
Guest38458 has quit [Ping timeout: 260 seconds]
<pipework>
My normal user just can't write to /usr/local
elifoster has quit [Ping timeout: 240 seconds]
idefine has quit [Ping timeout: 252 seconds]
spider-mario has quit [Read error: Connection reset by peer]
flopsec has quit [Ping timeout: 244 seconds]
r0bby_ has joined #ruby
ta__ has quit [Read error: Connection reset by peer]
jancel has quit [Remote host closed the connection]
kobain has joined #ruby
ctrlrsf has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
idefine_ has quit [Ping timeout: 276 seconds]
mlehrer has quit [Ping timeout: 240 seconds]
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
ta__ has joined #ruby
robbyoconnor has quit [Ping timeout: 260 seconds]
spider-mario has joined #ruby
mago0 has joined #ruby
ta__ has quit [Client Quit]
jamto11 has quit []
r0bby_ has quit [Excess Flood]
r0bby_ has joined #ruby
lxsameer has quit [Ping timeout: 276 seconds]
ta_ has joined #ruby
elifoster has joined #ruby
<shevy>
let your normal user break free from the chains of slavery!
<pipework>
shevy: trying to engineer some social for yourself?
alxgsv has quit [Ping timeout: 276 seconds]
nankyokusei has joined #ruby
govg has quit [Ping timeout: 265 seconds]
govg has joined #ruby
jhack has joined #ruby
r0bby_ has quit [Excess Flood]
r0bby_ has joined #ruby
tekk has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
jgt3 has joined #ruby
m_antis has joined #ruby
mdw has quit [Quit: Sleeping Zzzzz]
vdamewood has joined #ruby
rbennacer has joined #ruby
allcentury has quit [Ping timeout: 276 seconds]
arlek has joined #ruby
ctrlrsf has joined #ruby
flopsec has joined #ruby
pawnbox has quit [Read error: Connection reset by peer]
masaru- has left #ruby [#ruby]
mago0 has quit [Quit: WeeChat 1.2]
pawnbox has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
symm- has joined #ruby
labaleine has joined #ruby
cpup has joined #ruby
<shevy>
freedom!
<pipework>
shevy: Freedom from privacy!
mbreedlove has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
swills has quit [Ping timeout: 276 seconds]
pawnbox has quit [Ping timeout: 250 seconds]
ta_ has joined #ruby
druonysus has quit [Ping timeout: 246 seconds]
CoderPuppy has quit [Ping timeout: 260 seconds]
siovene has quit [Quit: Connection closed for inactivity]
mbreedlove has quit [Max SendQ exceeded]
flashpoint9 has quit [Remote host closed the connection]
ta_ has quit [Read error: Connection reset by peer]
jancel has joined #ruby
ta_ has joined #ruby
stannard has joined #ruby
alxgsv has joined #ruby
zel has joined #ruby
cdg has joined #ruby
zel is now known as Guest32203
drewo has joined #ruby
djcp has quit [Ping timeout: 265 seconds]
Captain_Crow has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
brunto has joined #ruby
tomchapin has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
ta_ has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
codecop has quit [Remote host closed the connection]
madgen has quit [Ping timeout: 276 seconds]
perlgod_ has joined #ruby
CoderPuppy has joined #ruby
blackgoat has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
perlgod_ has quit [Read error: Connection reset by peer]
sj has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
ta__ has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
skolman_ has joined #ruby
cpup has quit [Ping timeout: 260 seconds]
sj has quit [Client Quit]
perlgod has quit [Ping timeout: 260 seconds]
sj has joined #ruby
elifoster has quit [Ping timeout: 246 seconds]
idefine has joined #ruby
nankyokusei has quit [Remote host closed the connection]
sj has quit [Client Quit]
codecop has joined #ruby
perniciouscaffei has joined #ruby
_ht has quit [Ping timeout: 265 seconds]
<Captain_Crow>
is "shoes" still the most used gui library for ruby or is there something better now?
govg has quit [Ping timeout: 260 seconds]
eljimmy has quit [Quit: This computer has gone to sleep]
xall has joined #ruby
govg has joined #ruby
_ht has joined #ruby
codecop has quit [Remote host closed the connection]
edwinvdg_ has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 276 seconds]
OTORelic has quit [Quit: WeeChat 1.4]
djbkd has joined #ruby
jenrzzz has joined #ruby
psf has quit [Read error: Connection reset by peer]
ta__ has quit [Read error: Connection reset by peer]
OTORelic has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
sneakerhax has joined #ruby
madgen has joined #ruby
djbkd has quit [Client Quit]
Don_John has joined #ruby
Don_John has quit [Remote host closed the connection]
wigust has quit [Remote host closed the connection]
<pipework>
Captain_Crow: Personally, and I don't really know for sure at all, but I think most people aren't doing gui's with ruby as much as they've moved to JS for those.
drewo has quit [Ping timeout: 260 seconds]
<Captain_Crow>
ok thanks
ur5us has joined #ruby
djbkd has joined #ruby
skweek has joined #ruby
brunto has quit [Ping timeout: 250 seconds]
|2701 has quit [Quit: Connection closed for inactivity]
ringabela has joined #ruby
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving]
Es0teric has joined #ruby
VeryBewitching has quit [Quit: Konversation terminated!]
ringabela has quit [Ping timeout: 250 seconds]
madgen has quit [Ping timeout: 260 seconds]
aef has quit [Remote host closed the connection]
<shevy>
Captain_Crow I use ruby-gnome... but actually I am still sitting in gtk2, I am so lazy... gtk3 is supported though
malconis has joined #ruby
synthroid has quit []
dmr8 has quit [Quit: Leaving]
psf has joined #ruby
CIA has quit [Quit: leaving]
celly has quit []
madgen has joined #ruby
<Captain_Crow>
shevy, thanks i'll take a look at gtk3
`tim` has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
m_antis has quit [Ping timeout: 250 seconds]
jancel has quit [Remote host closed the connection]
gnufied has joined #ruby
djbkd has quit [Remote host closed the connection]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
julieeharshaw has quit [Ping timeout: 250 seconds]
iamvery_ has joined #ruby
nofxx has quit [Ping timeout: 250 seconds]
Guest90636 has joined #ruby
eljimmy has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
whathappens has joined #ruby
howdoi has joined #ruby
qasaur has joined #ruby
jancel has joined #ruby
m_antis has joined #ruby
flashpoint9 has joined #ruby
horaceheaven has joined #ruby
toretore has quit [Ping timeout: 246 seconds]
nerium has joined #ruby
lucidity has quit [Ping timeout: 265 seconds]
GodFather has quit [Remote host closed the connection]
wolffles has joined #ruby
eljimador has joined #ruby
<wolffles>
would this be considered bad practice? array.combination(2).find{|a,b| array[a] + array[b] == 0};rescue
m_antis has quit [Ping timeout: 260 seconds]
ldnunes has quit [Quit: Leaving]
startupality has joined #ruby
cpup has joined #ruby
djbkd has quit [Remote host closed the connection]
A124 has quit [Quit: '']
<wolffles>
if i used rescue to return nil?
CoderPuppy has quit [Ping timeout: 244 seconds]
ChiefAlexander has joined #ruby
startupality has quit [Client Quit]
skalfyfan has quit [Ping timeout: 250 seconds]
GodFather has joined #ruby
A124 has joined #ruby
<havenwood>
wolffles: what error are you rescuing? why? are you really reading indexes from the Array? show example data?
platzhirsch has quit [Quit: WeeChat 1.4]
aegis3121 has quit [Ping timeout: 260 seconds]
Mia has joined #ruby
Mia has joined #ruby
CoderPuppy has joined #ruby
mbreedlove has joined #ruby
gnufied has quit [Quit: Leaving]
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has quit [Ping timeout: 276 seconds]
<wolffles>
rescuing a typeError. examples would be array=[1,3,5] & array[1,3,5,-3]. and its just the indexes are the requirement for the practice.
<smathy>
array[-3] won't raise an error.
Axy has quit [Ping timeout: 240 seconds]
mbreedlove has quit [Max SendQ exceeded]
<smathy>
...oh, you mean because of nil +
<wolffles>
yes
Axy has joined #ruby
wrkrcoop has joined #ruby
<smathy>
Ok, that'll be a NoMethodError
rodfersou has quit [Quit: leaving]
lucidity has joined #ruby
cpup has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<wolffles>
this is what i get when array = [1,3,5] “TypeError: nil can't be coerced into Fixnum”
<smathy>
Ah, you're right, when it's the array[b]
jhack has quit [Quit: jhack]
jancel has quit [Remote host closed the connection]
<smathy>
...you'll get both.
mbreedlove has joined #ruby
kgrz has joined #ruby
iamvery__ has joined #ruby
tomchapin has joined #ruby
<wolffles>
so i used rescue to escape it. just wondering if that is good practice cuz ive read some arguements online.
<smathy>
To your original question, I'm still not really seeing what you're doing, you're using the values of the array as indexes into the array - seems very odd.
govg has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
Mia has quit [Ping timeout: 260 seconds]
mbreedlove has quit [Max SendQ exceeded]
djbkd has joined #ruby
govg has joined #ruby
<wolffles>
yeah it was werid to me too but i found you can use the values to find the indices within the block, instead of using more methods to convert them to the index
skolman_ has quit [Remote host closed the connection]
ma489 has joined #ruby
skolman_ has joined #ruby
horaceheaven has quit [Quit: horaceheaven]
mbreedlove has joined #ruby
mbreedlove has quit [Client Quit]
<smathy>
wolffles, it's your code that's weird, I just can't grok the purpose of this code. You're using values that are seemingly arbitrary as indexes back into the same array, and *this* is the reason you're getting those `nil`s in the first place, are you sure you didn't want to be checking the values themselves? Ie. `.find {|a,b| a + b == 0 }` ?
tlaxkit has joined #ruby
horaceheaven has joined #ruby
horaceheaven has quit [Client Quit]
mbreedlove has joined #ruby
iamvery_ has quit [Ping timeout: 260 seconds]
<wolffles>
its just one of those practice problems
<pipework>
havenwood: They need the value if it's true, so .zero? yeah.
<havenwood>
>> -0.negative?
<pipework>
Much better than my silly stuff.
<ruby[bot]>
havenwood: I'm terribly sorry, I could not evaluate your code because of an error: OpenURI::HTTPError:500 Internal Server Error
iamvery__ has joined #ruby
ledestin has joined #ruby
iamvery_ has quit [Ping timeout: 240 seconds]
wilbert has quit [Ping timeout: 260 seconds]
rbennacer has quit [Ping timeout: 250 seconds]
iamvery__ has quit [Remote host closed the connection]
|ifei5g00d has joined #ruby
SilverKey has joined #ruby
mbreedlove has quit [Ping timeout: 244 seconds]
<nerium>
Is there a way to run system commands without printing to stdout but still getting access to both output and status?
OTORelic has quit [Ping timeout: 252 seconds]
bronson has joined #ruby
greg__ has joined #ruby
pat__ has quit [Ping timeout: 276 seconds]
greg__ has quit [Remote host closed the connection]
<smathy>
nerium, ``
|ifei5good has quit [Ping timeout: 260 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nerium>
smathy: What?
<smathy>
nerium, x = `ls`
<smathy>
nerium, puts $?
iamvery_ has joined #ruby
<nerium>
Wont that print to stderr?
<ytti>
pretty much never ever use ``, %x(), or system()
<nerium>
ytti: Got any other recommendation?
<smathy>
nerium, you asked "without printing to stdout" - did you mean stderr?
<ytti>
use popen every time, so you can pass binary and arguments separately (execve, instead of system)
<nerium>
I mean both, sorry
<ytti>
this way it's safe, regardless of bad input
<ytti>
and you don't have to rely being smarter than attacker on input validation
<ytti>
an full control on stdout, stderr and return value
r0bby_ has quit [Ping timeout: 250 seconds]
<ytti>
it's shame all scripting languages make the correct way complicated and the wrong way simple
<nerium>
ytti: Aha, that’s perfect
<nerium>
Thanks!
akiTendo has quit [Quit: akiTendo]
bronson has quit [Ping timeout: 252 seconds]
<ytti>
sensible implamentation would do this by default
Ballo has joined #ruby
<ytti>
out, err = %x(cmd, *args)
<ytti>
sadly that is not so
ChiefAlexander has quit [Quit: Leaving...]
<ytti>
whole bunch of security issues caused by bad choices in language design
Yiota_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mbreedlove has joined #ruby
<Ballo>
hello, I have a question: I have some objects which I want to run a method which returns true or false MyObj#test and also alter their state. If I have these objects in an array, is it possible to run all the .test methods and then return the list of altered objects if any one of them returns false?
* Ballo
ponders if he can do this with array#all if he changes the conditional
LoneHermit has joined #ruby
<Ballo>
no, don't think so. I need the objects in their new state
bobbycvi_ has joined #ruby
<Ballo>
something like map, but returning the new state depending on the conditional
<havenwood>
IceDragon: headlessCamels are an abomination
<IceDragon>
Now that gets my gears grinding
jenrzzz_ has quit [Ping timeout: 240 seconds]
<IceDragon>
havenwood: Authorize.Net has it
<IceDragon>
and now I have to deal with it
<pipework>
I want our naming convention to support plural ownership of plural things.
<pipework>
users_blogs is too ambiguous
biberu has quit []
|2701 has joined #ruby
binaryplease has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
nankyokusei has joined #ruby
<IceDragon>
pipework: Now that I think about it, are you using rails?
<pipework>
IceDragon: I'm not using anything in this context.
<pipework>
Though if we're just talking theoretically, I don't flip out about activesupport usage out of hand. :)
sumobob has joined #ruby
<IceDragon>
*raises finger to protest, changes mind and leaves the topic alone*
<IceDragon>
I was going to say you could do select(&:present?) if you hated itself so badly
<IceDragon>
:P
startupality has joined #ruby
iamvery__ has joined #ruby
<IceDragon>
but that would vape booleans and empty objects...
rbennacer has joined #ruby
last_staff has quit [Quit: last_staff]
OTORelic has quit [Ping timeout: 252 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
roshanavand_ has joined #ruby
mwlang has joined #ruby
mooe has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
wilsonc91 has quit [Ping timeout: 252 seconds]
iamvery__ has quit [Remote host closed the connection]
iamvery_ has quit [Ping timeout: 260 seconds]
droptone has joined #ruby
iamvery_ has joined #ruby
<pipework>
IceDragon: '' isn't present, but is truthy
zenlot6 has joined #ruby
<IceDragon>
yep, that's why it doesn't fit the use case
<pipework>
Objects don't really need methods for truthiness, but they make things like select(&:truthy?) look nicer than select{|o| o} and select(&:itself), imo.
zenlot has quit [Ping timeout: 240 seconds]
ebbflowgo has quit [Quit: ebbflowgo]
<havenwood>
require 'active_support/core_ext/object/blank'; class Ninja; def empty?; :pocket_sand end end; Ninja.new.present? #=> false
johnmilton has joined #ruby
Loss-up has joined #ruby
<Loss-up>
Hello Guys
<havenwood>
Loss-up: hi there
jenrzzz has joined #ruby
johnmilton has quit [Ping timeout: 244 seconds]
<pipework>
havenwood: not gonna set up object delegates for every object in the collection just so I can define a new method that'll respond with truthiness so I can remove all falsies. That's just mental masturbation.
pawnbox has joined #ruby
<havenwood>
pipework: Ninja's aren't great role models.
<havenwood>
Ninjas*
<pipework>
havenwood: Much like my father, never in sight when you want to take a swing at them.
<hightower2>
Hey, how do I make my Ruby script load rubygems, so that I can just execute ./script, instead of bundle exec ./script?
<pipework>
hightower2: By using the bundler gem in your code to call the bundler programmatic interface.
<pipework>
Bundler.setup and the such
johnmilton has quit [Read error: Connection reset by peer]
<hightower2>
oh ok great, thanks, I was trying to load 'rubygems'
kies has joined #ruby
<pipework>
require 'bundler/setup' is a good hint for you to start with
banister has joined #ruby
catpoop is now known as pfargtl
pfargtl is now known as Guest69547
ta_ has quit [Ping timeout: 260 seconds]
Guest69547 is now known as catpoop
danostrowski has joined #ruby
dzivalli has joined #ruby
startupality has quit [Quit: startupality]
rbennacer has quit [Ping timeout: 240 seconds]
postmodern has joined #ruby
<danostrowski>
anyone know, when running JRuby apps, whether a thread pool of N or N+1 is best (when N is the number of CPUs available), generally?
<danostrowski>
Or, that is, have an opinion and/or a relevant link. :)
iamvery_ has quit [Remote host closed the connection]
<pipework>
danostrowski: Measure, measure, measure. Depends on the scheduler and how well your kernel manages those things, so measure, measure, measure.