<darix>
but i am sure sinatra has a way for you to set the http headers and then the file as response body
workmad3 has joined #ruby
marr has quit [Ping timeout: 248 seconds]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 240 seconds]
gusrub has quit [Remote host closed the connection]
marxarelli is now known as marxarelli|afk
agent_white has joined #ruby
<zanoni>
I'm going to look into nginx
<zanoni>
this app is not going to be a real production site anyway, it's for personal at home usage. Mostly using Sinatra because I wanted a nice front end.
dviola has joined #ruby
banisterfiend has joined #ruby
<banisterfiend>
anyone know if there exists a helper for rake that logs out each shell command execute and then runs it?
guacamol_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<banisterfiend>
something like: magic_execute("cd ..\nls"). and it'll log out "cd.." and then perform it, etc
guacamol_ has joined #ruby
jphase has quit [Remote host closed the connection]
oetjenj has quit [Ping timeout: 255 seconds]
SeepingN has quit [Remote host closed the connection]
oetjenj has joined #ruby
<elomatreb>
banisterfiend: sh "command" outputs the command before running it
jenrzzz has quit [Ping timeout: 248 seconds]
theory4000 has joined #ruby
<banisterfiend>
elomatreb it doesn't appear to do that for me, it just runs it (i'm on osx)
jphase has joined #ruby
oetjenj_ has joined #ruby
<havenwood>
it prints the command for me (macos too)
<havenwood>
hmm
<elomatreb>
Looking at the source it checks for verbose mode before outputting it
<banisterfiend>
havenwood it does print it for you?
<havenwood>
banisterfiend: yup
<banisterfiend>
weird not here
<zanoni>
darix: why do you say is the most stupid way, would that be slow?
<RickHull>
fire up pry, do something like: require 'metasploit-framework/stuff'; s = Blah::Session.new
GodFather has quit [Ping timeout: 240 seconds]
<RickHull>
otherwise, check the class of s; something like: $stderr.puts "s is a #{s.class}" or Log.warn "s is a #{s.class}"
<RickHull>
does s.target_host return an empty string?
coderphive has quit [Quit: coderphive]
d^sh has quit [Ping timeout: 248 seconds]
<zanoni>
send_file works! , all I was missing was a / in front of the path. And that might be related to Chrome.
d^sh has joined #ruby
jordanm has quit [Read error: Connection reset by peer]
jordanm has joined #ruby
Technodrome has joined #ruby
hutch34 has joined #ruby
uZiel has joined #ruby
cdg has joined #ruby
lacour has quit [Read error: Connection reset by peer]
uZiel has quit [Ping timeout: 248 seconds]
lacour has joined #ruby
Asher has quit [Ping timeout: 248 seconds]
cdg has quit [Ping timeout: 252 seconds]
Asher has joined #ruby
jphase has quit [Remote host closed the connection]
gizmore|2 has joined #ruby
tastytf has joined #ruby
jokester has quit [Quit: reboot]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
prob_dist has joined #ruby
<prob_dist>
Hey hi!
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore has quit [Ping timeout: 240 seconds]
<prob_dist>
I have an app I'm making with rails, this is an app to make exams from a question bank, when a new exam is created I wanna choose the questions from the bank randomly, but weighting more towards the questions that have been used the least
<prob_dist>
oh man, thats a long line
jokester has joined #ruby
<prob_dist>
I'm thinking of doing it with a probability distribution but don't know if that's the best bet
<prob_dist>
anyone can help me with that?
coderphive has joined #ruby
astrobunny has joined #ruby
<prob_dist>
well this seems kinda dead
<prob_dist>
hello
<RickHull>
used less frequently, or longer since last used?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alnewkirk has joined #ruby
<RickHull>
there is such a thing as a LRU cache -- least recently used -- but this wouldn't give you a slight bias from uniform random selection
alnewkirk has quit [Ping timeout: 240 seconds]
<banisterfiend>
anyone know how to force ruby to compile as 32bit on a 64bit box?
<RickHull>
you're getting into cross compilation there, right? and then selecting the right C stuff to link against?
guacamole has joined #ruby
<banisterfiend>
i was hoping it's just a matter of passing the correct flat to ./configure :D
<banisterfiend>
flag
<RickHull>
setting up for non-native compilation is trickier, i believe
<prob_dist>
@RickHull used less frequently, I have a field in the db that says how many times certain question has been used
mitt3ns has joined #ruby
<RickHull>
prob_dist: how biased toward less frequent questions should the selection be?
ramfjord has quit [Ping timeout: 240 seconds]
<RickHull>
strict adherence? sounds like a priority queue / heap
coderphive has quit [Quit: coderphive]
<prob_dist>
I would say that a question that has been used 1 times has double the chance to be chosen than one that has been used 2 times
workmad3 has joined #ruby
agent_white has quit [Ping timeout: 258 seconds]
<RickHull>
yeah, i'd be tempted to put a bunch of balls in a jar and pick one
lacour has quit [Quit: Leaving]
coderphive has joined #ruby
agent_white has joined #ruby
|ifei5good has joined #ruby
<prob_dist>
didn't get ya
<RickHull>
i.e. sample from a probability distribution as you said
bmurt has joined #ruby
<RickHull>
you can segment a range of integers and sample with Kernel.rand rangemax
mitt3ns has quit [Ping timeout: 255 seconds]
<prob_dist>
okok sounds good, will look into that
|ifei5g0_ has joined #ruby
|ifei5g00d has quit [Ping timeout: 252 seconds]
alfiemax has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
|ifei5good has quit [Ping timeout: 258 seconds]
alfiemax has quit [Remote host closed the connection]
jphase has joined #ruby
<prob_dist>
thanks @RickHull
porfa has quit [Quit: porfa]
cpallares has quit [Ping timeout: 255 seconds]
Azure has quit [Remote host closed the connection]
Azure has joined #ruby
cpallares has joined #ruby
nertzy has joined #ruby
orbyt_ has joined #ruby
hutch34 has quit [Ping timeout: 264 seconds]
porfa has joined #ruby
ryzokuken has quit [Quit: Connection closed for inactivity]
mjolnird has quit [Quit: Leaving]
Technodrome has joined #ruby
jxv has joined #ruby
__Yiota has joined #ruby
dviola has quit [Quit: WeeChat 1.9.1]
porfa has quit [Quit: porfa]
hinbody has quit [Quit: leaving]
hinbody has joined #ruby
ogres has joined #ruby
juanca_ has joined #ruby
ap4y has quit [Quit: WeeChat 1.9.1]
<jxv>
For a new project, should I use rbenv or rvm?
ap4y has joined #ruby
latemus has quit [Ping timeout: 240 seconds]
<RickHull>
I like chruby myself
<havenwood>
+1 chruby
<jxv>
player 3 has entered
<jxv>
thanks
<RickHull>
i don't use it to enforce things at the project level -- just to have different rubies easily available on my dev box
juanca_ has quit [Client Quit]
cdg has joined #ruby
porfa has joined #ruby
latemus has joined #ruby
latemus is now known as Guest18932
<RickHull>
i generally run 2.4 with chruby and expect to have a few gems installed. I use ruby-install to make more rubies available, with a clean slate as far as installed gems
<RickHull>
I don't generally mess with metadata like Gemfiles or gemsets, but those might work better for more rails type dev, not sure
weaksauce has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
<jxv>
I'm a newbie with ruby, so all the ecosystem stuff is always a hill to climb. Also, this isn't a rails project and trying not to make it complicated.
<RickHull>
i like chruby because it is very simple, conceptually and how it is implemented
<RickHull>
the trickiest part is getting your login files updated and making sure they are loaded
<jxv>
is it the preference for example projects, if that is even a valid question?
<RickHull>
i.e. to activate chruby
<jxv>
sounds similar to virtualenv with python
<RickHull>
rvm, rbenv, chruby, others -- they are all widely used
<RickHull>
and widely unused
<jxv>
oh no
<RickHull>
it's just a way of specifying the ruby version and environment that executes your code
<RickHull>
you can just use your system ruby -- on osx or linux?
<RickHull>
windows?
<jxv>
on osx
porfa has quit [Quit: porfa]
<RickHull>
do you use homebrew?
<RickHull>
or whatever the latest package manager thingie is?
<jxv>
yes, I installed chruby with brew
<RickHull>
oh cool
<RickHull>
check out ruby-install too
<jxv>
I use linux too, what would be the use there?
<jxv>
ruby-install as well?
<RickHull>
yes, should not be much different
<RickHull>
i am more familiar with the linux side
<RickHull>
for ruby-install -- you will need a build environment -- compiler, etc
<RickHull>
not sure if Xcode will want to get involved, ugh
<RickHull>
probably gcc/clang/llvm will suffice with brew
ozcanesen has joined #ruby
quobo has quit [Quit: Connection closed for inactivity]
thomasv314 has joined #ruby
thomasv314 has quit [Client Quit]
cadillac_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yaewa has quit [Quit: Leaving...]
moei has joined #ruby
kapil___ has joined #ruby
zanoni has quit [Ping timeout: 248 seconds]
enmchs has joined #ruby
<enmchs>
hi
bmurt has joined #ruby
gix has quit [Ping timeout: 240 seconds]
zautomata3 has joined #ruby
alfiemax_ has joined #ruby
alfiemax_ has quit [Remote host closed the connection]
uZiel has joined #ruby
gix has joined #ruby
zautomata2 has quit [Ping timeout: 258 seconds]
alfiemax_ has joined #ruby
_whitelogger has joined #ruby
ap4y has quit [Quit: WeeChat 1.9.1]
jphase has quit [Remote host closed the connection]
jphase has joined #ruby
ap4y has joined #ruby
jphase has quit [Ping timeout: 255 seconds]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasv314 has joined #ruby
tastygradient has joined #ruby
enmchs has quit [Remote host closed the connection]
cdg has joined #ruby
LocaMocha has joined #ruby
meadmoon has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 258 seconds]
<Guest18932>
can i use a class method within the class
<Guest18932>
if so how do i call it
Technodrome has joined #ruby
__Yiota has quit [Remote host closed the connection]
alnewkirk has joined #ruby
guardianx has joined #ruby
__Yiota has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
__Yiota has quit [Remote host closed the connection]
<RickHull>
my Tree bogs down around 2000 items I think. I maintain both parent and children references. I am hoping/pretty sure that my Tree::Node references aren't copying data
<Guest18932>
hm. i'm defining a Class which is a Rack app. when i use self.method_name to define a method within the Class, calling it nakedly later on in the class does nothing, and calling it with self.method_name gets me a 500 error
<RickHull>
Guest18932: paste it -- gist.github.com or similar
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<banisterfiend>
RickHull yea
jxv has joined #ruby
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
nicesignal has quit [Remote host closed the connection]
nicesignal has joined #ruby
theory4000 has joined #ruby
guacamole has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
guacamole has quit [Quit: My face has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hutch34 has joined #ruby
jxv has joined #ruby
pwnd_nsfw` is now known as pwnd_nsfw
AndBobsYourUncle has joined #ruby
guardianx has quit []
AnoHito_ has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 248 seconds]
aupadhye has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
ap4y has quit [Quit: WeeChat 1.9.1]
apeiros has joined #ruby
milardovich has joined #ruby
aupadhye has quit [Ping timeout: 240 seconds]
ta has quit [Remote host closed the connection]
conta has quit [Ping timeout: 240 seconds]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Devalo has joined #ruby
ramfjord has joined #ruby
milardovich has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 240 seconds]
jxv has joined #ruby
Silthias1 has joined #ruby
aupadhye has joined #ruby
Silthias has quit [Ping timeout: 252 seconds]
Dimik has quit [Ping timeout: 252 seconds]
alnewkirk has joined #ruby
troys has quit [Quit: Bye]
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
Devalo has quit [Ping timeout: 248 seconds]
vikaton has quit [Quit: Connection closed for inactivity]
ldepandis has joined #ruby
arquebus has joined #ruby
alex`` has joined #ruby
snickers has joined #ruby
workmad3 has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
ldepandis has quit [Ping timeout: 248 seconds]
Guest16627 has quit [Remote host closed the connection]
cdg has joined #ruby
dionysus69 has joined #ruby
fclausen_ has joined #ruby
conta has joined #ruby
rabajaj has joined #ruby
cdg has quit [Ping timeout: 246 seconds]
fclausen has quit [Ping timeout: 248 seconds]
theory4000 has quit [Ping timeout: 248 seconds]
Guest25611 has joined #ruby
snickers has quit [Ping timeout: 246 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has quit [Disconnected by services]
mim1k_ has joined #ruby
Hexafox[I] has joined #ruby
arquebus has quit [Quit: konversation disconnects]
fclausen_ has quit [Ping timeout: 248 seconds]
ozcanesen has quit [Quit: ozcanesen]
Hexafox[I] has quit [Ping timeout: 258 seconds]
Hexafox[I] has joined #ruby
Hexafox[I] has quit [Ping timeout: 258 seconds]
Guest96661 has joined #ruby
Hexafox[I] has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
enterprisey has quit [Ping timeout: 248 seconds]
ta has joined #ruby
oetjenj has joined #ruby
Hexafox[I] has quit [Ping timeout: 255 seconds]
Hexafox[I] has joined #ruby
andikr has joined #ruby
John___ has joined #ruby
RickHull has quit [Quit: Page closed]
kculpis has quit [Ping timeout: 258 seconds]
<Guest18932>
is there a way to unset, or set to nil, Rack::Response.write
<Guest18932>
or cause the body to be empty upon any status code except for 200
AndBobsYourUncle has quit [Read error: Connection reset by peer]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
FastJack has quit [Ping timeout: 258 seconds]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jxv has joined #ruby
hs366 has joined #ruby
universa1 has quit [Ping timeout: 252 seconds]
universa1 has joined #ruby
Immune has quit [Ping timeout: 252 seconds]
aufi has joined #ruby
Guest25611 is now known as pax
pax is now known as Guest87078
mjolnird has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
biberu has joined #ruby
claudiuinberlin has joined #ruby
snickers has joined #ruby
enterprisey has joined #ruby
van7hu has quit [Quit: Ex-Chat]
jxv has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jxv has joined #ruby
jxv has quit [Client Quit]
snickers has quit [Client Quit]
John___ has quit [Read error: Connection reset by peer]
fullstack has quit [Ping timeout: 255 seconds]
<banisterfiend>
["a", "b", "c"].grep /a/. how do i write NOT a
mark_66 has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
megamos has joined #ruby
tastygradient has quit [Quit: leaving]
cdg has joined #ruby
Guest96661 has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 240 seconds]
claudiuinberlin has joined #ruby
<aloy>
banisterfiend: you can do /[^a]/ but that'll filter anything that starts with an a, ie, doing ["a", "b", "c", "aa", "ba"].grep /[^a]/ will return ["b", "c", "ba"]
fullstack has joined #ruby
claudiuinberlin has quit [Client Quit]
cdg has quit [Ping timeout: 258 seconds]
aphprentice has quit [Quit: Connection closed for inactivity]
<Burgestrand>
banisterfiend so much ambiguity, so many options :D
<Burgestrand>
banisterfiend haha, first guess is best guess :p
FastJack has joined #ruby
<Burgestrand>
banisterfiend it's rather new if I recall correctly, so don't go putting it in ruby 2.0.0
<banisterfiend>
thanks homie i'm on 2.4.2 so no worries
<Burgestrand>
\o/
alfiemax_ has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
rgr_ has quit [Quit: rgr_]
<teatime>
kkjkbb
<teatime>
(sorry)
sagax has quit [Read error: Connection reset by peer]
zautomata3 has quit [Quit: WeeChat 1.7]
zautomata has joined #ruby
marr has joined #ruby
Illianthe has joined #ruby
cdg has joined #ruby
TomyWork has joined #ruby
cdg has quit [Ping timeout: 252 seconds]
milardovich has joined #ruby
claudiuinberlin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
snickers has joined #ruby
claudiuinberlin has joined #ruby
workmad3 has joined #ruby
oetjenj has joined #ruby
anisha has joined #ruby
mikecmpbll has joined #ruby
Guest87078 is now known as pax
pax is now known as Guest73806
cdg has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
oetjenj has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 246 seconds]
<apeiros>
banisterfiend: before grep_v I had Regexp#~
<apeiros>
so: %w[a b c].grep(~/a/)
<banisterfiend>
you wrote ~ ?
<apeiros>
(all it did was invert ===, =~ and !~)
<banisterfiend>
how did it work? a monkey patch?
huyderman has quit [Ping timeout: 252 seconds]
<apeiros>
class NegatedRegexp < Regexp; def =~(*); !super; end; …all other methods…; end; class Regexp; def ~; return NegatedRegexp.new(…<forgot the precise passing of params>…); end; end
<apeiros>
not the exact impl. obviously, but should give you the general idea
<apeiros>
worked pretty well. of course =~ would no longer return a position, only true/false.
<apeiros>
I still like it more than grep_v, it's more versatile. can be used in case/when too e.g.
<apeiros>
case foo; when ~/bar/; …
enterprisey has quit [Ping timeout: 248 seconds]
stan has quit [Read error: Connection reset by peer]
mson has quit [Quit: Connection closed for inactivity]
thinkpad has quit [Ping timeout: 240 seconds]
charliesome_ has joined #ruby
charliesome has quit [Ping timeout: 255 seconds]
megamosaren has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 255 seconds]
ozcanesen has quit [Ping timeout: 255 seconds]
andikr has quit [Remote host closed the connection]
conta2 has joined #ruby
Beams has quit [Quit: .]
porfa has quit [Quit: porfa]
17SAAX3PR has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
uZiel has joined #ruby
dxlr8r has quit [Quit: WeeChat 1.5]
RickHull has joined #ruby
jottr has quit [Quit: WeeChat 1.9.1]
<RickHull>
anyone want to discuss tree data structures implementations? I have a generic tree which has a reference to the root node and can be walked from there
mim1k has joined #ruby
vtx has quit [Quit: vtx]
<RickHull>
i find that when trying to add a new node, I want to keep the tree balanced / complete, and it's O(n) (I think) to do a breadth first search to find an open parent
<RickHull>
each node has references to its children and its parent, so walking the tree can go both up and down
17SAAX3PR has quit [Quit: 17SAAX3PR]
<RickHull>
should the tree maybe maintain references to each leaf node somehow?
<RickHull>
should I give up in bidirectional links for a generic tree?
teatime has left #ruby [#ruby]
goyox86 has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<RickHull>
i find there is no easy way to go from a parent which had its last available child, to the next candidate open parent laterally to the right
snickers has joined #ruby
<RickHull>
I haven't even gotten to the tree maintaining some property and swapping nodes to achieve it. just building it by adding new nodes without consideration to node values
chouhoul_ has quit [Remote host closed the connection]
<RickHull>
I did implement a CompleteBinaryTree with an array, using index math to maintain parent child relationships
<RickHull>
and this is very fast to insert and maintain a certain property, namely that of a heap
chouhoulis has joined #ruby
goyox86 has quit [Client Quit]
goyox86 has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
nogic has quit [Ping timeout: 255 seconds]
alfiemax has quit [Remote host closed the connection]
goyox86 has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
ledestin has joined #ruby
goyox86 has joined #ruby
shinnya has joined #ruby
goyox86 has quit [Client Quit]
blackmesa1 has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
theory4000 has quit [Ping timeout: 240 seconds]
mim1k has quit [Ping timeout: 240 seconds]
drcode has joined #ruby
goyox86_ has joined #ruby
SeepingN has joined #ruby
nowhereman has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
kapil___ has joined #ruby
uZiel has quit [Ping timeout: 248 seconds]
Technodrome has joined #ruby
dionysus69 has quit [Ping timeout: 248 seconds]
mn3m has joined #ruby
TViernion has joined #ruby
<TViernion>
afternoon everyone. I'm trying to install gem rmagick and it fails with "Can't find MagickWand.h.
<RickHull>
sounds like a broken gem
<RickHull>
maybe try a prior version
<TViernion>
The install did say it detect a partiol ImageMagick installation ... version 6.7.8
<RickHull>
gem install -v 1.2.3 rmagick # something like that
polishdub has quit [Remote host closed the connection]
kies has joined #ruby
Devalo has quit [Remote host closed the connection]
<RickHull>
consider pasting the output of the install, particularly if there are warnings, issues, or concerns like partial install
<baweaver>
TViernion: OS?
Devalo has joined #ruby
<TViernion>
Centos &
<baweaver>
ImageMagick is a particularly annoying gem
<TViernion>
7 even
troys is now known as troys_
<baweaver>
One sec, see if I can find that again
porfa has joined #ruby
<baweaver>
short version is you need its binary files too
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mn3m has quit [Quit: mn3m]
mn3m has joined #ruby
mn3m has quit [Changing host]
mn3m has joined #ruby
reaVer has quit [Remote host closed the connection]
blackmesa1 has joined #ruby
Asher has quit [Quit: Leaving.]
reaVer has joined #ruby
jenrzzz_ has joined #ruby
LocaMocha has quit [Ping timeout: 248 seconds]
zer0python has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<zer0python>
question, what is a good gem for reading & writing xlsx spreadsheets? (Featureful, pivot table, charts, etc)
orbyt_ has joined #ruby
<zer0python>
RubyXL seems buggy and uses way too much memory
jenrzzz has quit [Ping timeout: 246 seconds]
<zer0python>
I can't get roo to write anything. (but apparently it doesn't support writing)
<zer0python>
and axlsx doesn't seem to support reading
<SeepingN>
read with rubyxl, write with axlsx?
<SeepingN>
20 gigs of ram later, you have a product!
<zer0python>
lol
<SeepingN>
I love ruby as a language but damn, it needs a diet or something
nadir has quit [Quit: Connection closed for inactivity]
blackmesa1 has quit [Ping timeout: 240 seconds]
imode has joined #ruby
cdg_ has joined #ruby
cdg_ has quit [Remote host closed the connection]
jorb has joined #ruby
<apeiros>
SeepingN: for the type of language it is, it's actually doing quite well. but it's very very easy to write memory (and CPU) inefficient code :-/
k3rn31 has joined #ruby
<SeepingN>
very true
blackmesa1 has joined #ruby
reaVer has quit [Remote host closed the connection]
<SeepingN>
also my view is tainted. What I thought was a slowness in loading ruby just to run a 600 line script, turns out mostly to be due to a scan I do near the start. Looking in a directory with 274000 entires for a matching serial number...! Woopsies
cdg has quit [Ping timeout: 248 seconds]
<apeiros>
:D
<apeiros>
yeah, benchmarking can help figure out what's slow
imode has quit [Ping timeout: 255 seconds]
<SeepingN>
I had forgotten it may be becoming an issue. Then I went to manually look for something int hat directoy and an "ls" took minutes
<apeiros>
other funny things to do: big_ary.any? { |e| other_big_ary.include?(e) } # looks like a single loop, but whoopsie O(n^2), or rather O(n*m)
cdg has joined #ruby
<SeepingN>
oddly, once in a while it would return an ls within seconds.
<apeiros>
caching maybe
reaVer has joined #ruby
<SeepingN>
yeah. apparnetly we're using XFS so seems possible
jenrzzz_ has quit [Ping timeout: 240 seconds]
<SeepingN>
and with more an dmore things writing to that directly, it has less time to cache and use said cache
<apeiros>
I got super mario odyssey, why am I not playing? o0
* apeiros
will ponder for another few minutes and then vanish to go play :D
Cerbb has joined #ruby
<jorb>
so like, i am running `bundle exec` on something, and it has zero verbose logging to help debug even with the -V, is this a typical issue?
blackmesa1 has quit [Ping timeout: 246 seconds]
dionysus69 has joined #ruby
alfiemax_ has quit [Read error: Connection reset by peer]
<apeiros>
jorb: that would depend a lot on what you execute.
lanc has joined #ruby
lanc has quit [Client Quit]
alfiemax has joined #ruby
lanc has joined #ruby
<Cerbb>
hi...i have silly question...i installed ruby from the repo of debian jessie, then i found out that i was supposed to use rvm to install it. is it correct? in my installation, bundle seems to require sudo access, and I read that it could be because of the way i install it. so the question: is it ok if i remove ruby with 'remove' then install rvm and reinstall ruby with rvm?
cdg has quit [Ping timeout: 255 seconds]
<Cerbb>
does any of what i said make sense?
<apeiros>
Cerbb: you're not supposed to use rvm.
lanc has left #ruby [#ruby]
<apeiros>
but rvm is a good option
<havenwood>
Cerbb: It's fine to use the package manager or an installer like RVM, ruby-build or ruby-install
dionysus69 has quit [Client Quit]
<apeiros>
if you install it via rvm, install it as a user, not via root. bundler shouldn't need sudo then either.
<Cerbb>
the point is that at the moment bundle says:
<Cerbb>
Your user account isn't allowed to install to the system RubyGems.
<Cerbb>
<Cerbb>
You can cancel this installation and run:
<Cerbb>
bundle install --path vendor/bundle
<Cerbb>
ops..sorry
<apeiros>
yes, so you use bundler with a different user than what you used to install ruby I'd say
<apeiros>
(or you have a very funny installation)
<apeiros>
also make sure you actually use the bundler for your rvm ruby
<Cerbb>
i do not have rvm at the moment
<apeiros>
rvm ruby can coexist with system ruby, and if you don't select rvm ruby, you'll run system ruby.
<Cerbb>
i was wondering if there is a good way to change the permission without reinstalling it
<havenwood>
Cerbb: Yes, you can have your system Ruby install gems to your $HOME directory.
mn3m has quit [Remote host closed the connection]
<havenwood>
Cerbb: Some package managers do that by default.
<havenwood>
Cerbb: RubyGems has a --user-install flag that will: Install in user's home directory instead of GEM_HOME.
<Cerbb>
i see
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Cerbb>
so i have to activate this flag
<TViernion>
RickHull, i don't know what happened.. but i did a yum install Imagemagick-devel and imageMagick and it freakin worked.. lol
<havenwood>
Cerbb: You can create a ~/.gemrc file to remember that flag: gem: "--user-install"
<RickHull>
TViernion: ah right, when it complains about missing .h files, you need the -dev packages
<TViernion>
yeah
<TViernion>
now onward and upwards
<Cerbb>
so essentially every time i run some ruby-thing it is the same as running with the flag
<Cerbb>
i think i understand
<Cerbb>
i will try
vipaca has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
<apeiros>
.gemrc is specifically for rubygems
<apeiros>
hence the name ;-)
<TViernion>
Rickhull well shiiit... now i'm getting a failed to load command rake .. Name Error: uninitialized constant rake... and it's asking "did you mean? RBConfig" where would i change that
<Cerbb>
havenwood: i created this .gemrc file with just one line that says ' gem: "--user-install" '. is this what you meant? and now i reinstall bundle with gem install bundler so that it gets installed in the home directory?
<havenwood>
Cerbb: yup
<havenwood>
Cerbb: then check: gem which bundler
<RickHull>
TViernion: "rake" is the executable, on the filesystem
<RickHull>
not a proper name in ruby code (i.e. in an .rb file)
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
blackmesa1 has joined #ruby
<TViernion>
the only portion that i thinki missed now that i think about it is "add the bundler Boot and preinitialiizer code" i need to go back and figure that out.
bruno- has joined #ruby
<Cerbb>
havenwood: i think i did something wrong. it still asks for sudo permission
<Cerbb>
gem: "--user-install" <- is it like this? quotes are supposed to be there, right?
<havenwood>
Cerbb: your new bundle bin probably isn't in your path
<havenwood>
Cerbb: what is: gem which bundler
<havenwood>
Cerbb: command -v bundle
<havenwood>
Cerbb: Does one point to the new path and the other the old?
Technodrome has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
<Cerbb>
gem which bundler says: /home/fulges/.gem/ruby/2.1.0/gems/bundler-1.15.4/lib/bundler.rb
<Press10_>
Hey all. Reading a blog post on 2.5 and trying to understand the difference between yield_self and instance_eval? It seems like the implementation is a little different, but is there any reason to choose one over the other?
goyox86 has quit [Remote host closed the connection]
<havenwood>
Cerbb: Putting RubyGems bin/ in PATH, setting GEM_HOME and GEM_PATH, etc is what the chruby Ruby version switcher does: https://github.com/postmodern/chruby
<Cerbb>
now i get a dependency error. but it is fine i guess
<Cerbb>
i have to solve that one xD
<havenwood>
good luck!
Kasavage has joined #ruby
<Cerbb>
i put the updated GEM_HOME and GEM_PATH also in bashrc?
<Kasavage>
Anyone know if there is a way to swap out a certain number of spaces for a character? For example if there is 10 spaces replaces those 10 spaces with a comma?
<havenwood>
Cerbb: yes
<Cerbb>
ok thanks
<havenwood>
Kasavage: if you want to do it once, look at #sub, or multiple times look at #gsub
npgm has joined #ruby
<Press10_>
Ooo. yield_self is twice as fast in a basic test.
goyox86 has joined #ruby
<Kasavage>
I am currently using gsub with /\s+/ etc but how can I define say /\s+10/ for 10 spaces and so forth?
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
Kasavage: `{10,}` is ten or more
<Kasavage>
Thanks for the fast answers as always guys.
<havenwood>
Kasavage: `{10,12}` is 10-12
<havenwood>
Kasavage: any time!
marxarelli has quit [Ping timeout: 252 seconds]
anisha_ has quit [Quit: This computer has gone to sleep]
mtkd has quit [Ping timeout: 240 seconds]
<Cerbb>
yay..it worked \o/
mtkd has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
enterprisey has joined #ruby
alnewkirk has joined #ruby
jrafanie has joined #ruby
imode has joined #ruby
nofxx has quit [Ping timeout: 258 seconds]
Technodrome has joined #ruby
alfiemax has quit [Remote host closed the connection]
ta has joined #ruby
nofxx has joined #ruby
postmodern has joined #ruby
ta has quit [Remote host closed the connection]
ta has joined #ruby
troys is now known as troys_
claudiuinberlin has joined #ruby
mn3m has joined #ruby
blackmesa1 has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tvw has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
raynold has joined #ruby
nadir has joined #ruby
mn3m has quit [Ping timeout: 246 seconds]
fclausen has joined #ruby
imode has quit [Ping timeout: 260 seconds]
jenrzzz has joined #ruby
ams__ has quit [Quit: Connection closed for inactivity]
mtkd has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
oncall-pokemon has joined #ruby
duckpuppy has quit [Ping timeout: 246 seconds]
fclausen has quit [Ping timeout: 248 seconds]
conta2 has quit [Ping timeout: 248 seconds]
Kasavage has quit [Quit: Page closed]
thomasv314 has joined #ruby
drbroiler has joined #ruby
mn3m has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Rapture has joined #ruby
Rapture has quit [Client Quit]
troulouliou_div2 has joined #ruby
Rapture has joined #ruby
orbyt_ has joined #ruby
eckhardt has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
enterprisey has quit [Remote host closed the connection]
snickers has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ta has quit [Remote host closed the connection]
ta has joined #ruby
<jorb>
so this bundle exec is running sequel and then getting this fun "key too long" error and there doesn't seem to be a way to get it to kick out what create statement is making that happen
<jorb>
any advice?
ldnunes has quit [Quit: Leaving]
enterprisey has joined #ruby
dionysus69 has joined #ruby
Flabbergazta has quit []
Flabbergazta has joined #ruby
<RickHull>
paste the command and output
<RickHull>
omit or redact any sensitive info
mostlybadfly has joined #ruby
zautomata has joined #ruby
cdg has joined #ruby
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rt has joined #ruby
alex`` has quit [Quit: WeeChat 1.9.1]
Psybur has quit [Ping timeout: 248 seconds]
shinnya has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
ta has quit [Remote host closed the connection]
charliesome has joined #ruby
apeiros has quit [Ping timeout: 258 seconds]
blackmesa1 has quit [Ping timeout: 246 seconds]
sepp2k has quit [Quit: Leaving.]
charliesome_ has joined #ruby
synthroi_ has quit []
hutch34 has quit [Ping timeout: 240 seconds]
charliesome has quit [Ping timeout: 252 seconds]
hutch34 has joined #ruby
Press10_ has quit [Quit: Leaving]
thomasv314 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
charliesome_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RickHull>
dynamic(25) got 1.03x slower
vee__ has joined #ruby
jrm2 has joined #ruby
conta2 has quit [Ping timeout: 240 seconds]
<RickHull>
havenwood: very interesting :)
jrm has quit [Ping timeout: 240 seconds]
alnewkirk has joined #ruby
jrm2 is now known as jrm
<zanoni>
last night i asked about options for getting static files outside public folder in a Sinatra app, got some good help, went with send_file, but not happy with it. Now I'm working on getting rack::reverseproxy , and not sure if my config file is correct, I"m slightly confused about the paths, so in case someone want to look https://gist.github.com/stuartambient/2d757461471db6a1f95e4d1e95931b55
alnewkirk has quit [Ping timeout: 248 seconds]
vipaca has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
vee__ has quit [Ping timeout: 240 seconds]
MyMind has quit [Quit: WeeChat 1.6-dev]
mson has joined #ruby
<havenwood>
zanoni: Just to rule out some options, what are the files for? Stylesheets and such or other things?
alnewkirk has joined #ruby
<havenwood>
zanoni: Just to confirm, you've ruled out using Nginx or Apache as your reverse proxy for static files?
<havenwood>
What Rack webserver are you using?
<zanoni>
they are audio files , mp3, flac, etc. for previewing
Sembei has joined #ruby
<zanoni>
I'm lettting it use Puma at this point
<zanoni>
I ruled out Nginx for the time being yes
jorb has left #ruby [#ruby]
alnewkirk has quit [Ping timeout: 248 seconds]
<havenwood>
zanoni: Then doing it at the middleware level seems like the right path. I don't know what's going on with your path issue. How does the problem present itself?
hotpancakes has quit [Remote host closed the connection]
<zanoni>
it fails
<havenwood>
does something start smoking? 404?
<zanoni>
no, it goes on to the view , shows me the name of the file which i put in there,
hfp_work has joined #ruby
<zanoni>
the error though is error handling request
<RickHull>
i believe the status code for smoking all day error day is 420
<zanoni>
heh
<havenwood>
Enhance Your Calm
<zanoni>
maybe that is why it isn't working, i'm just wondering with a route like /files/* and then the actual files, deep in the path if that isn't the problem
vtx has joined #ruby
alnewkirk has joined #ruby
thinkpad has joined #ruby
SeepingN has quit [Ping timeout: 260 seconds]
vtx has quit [Remote host closed the connection]
<zanoni>
at the start of the errors in the console is something about 'can't activate activesupport, already activated', not sure why that is in there
<zanoni>
skip my last message, i got rid of that one ;)
hotpancakes has joined #ruby
<RickHull>
havenwood: matrix beats dynamic under N=500
vee__ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
vtx has joined #ruby
cschneid_ has joined #ruby
gusrub has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 240 seconds]
jphase has joined #ruby
SeepingN has joined #ruby
<zanoni>
well my errors are decreasing so i must be on the right track
QualityAddict has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alnewkirk has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 255 seconds]
Psybur has joined #ruby
jphase has quit [Remote host closed the connection]
gusrub has joined #ruby
jphase has joined #ruby
alnewkirk has joined #ruby
goyox86 has joined #ruby
<ycyclist>
Anyone know if there is a ruby gem repository for fluentd gems?
<TViernion>
guys.. i've installed redmin and i think it should work, plus i ahve all the right ports assigned, and i've run "rails s -p 8080" from within the directory where redmine is located... where could i possibly be going wrong?
<TViernion>
this is rails 4.2.4 nd ruby 2.2.2
<ycyclist>
I was gonna ask on #fluentd, but nobody seems to be there.
Dimik has quit [Ping timeout: 260 seconds]
drbroiler has quit [Ping timeout: 240 seconds]
<RickHull>
TViernion: check #rubyonrails
<TViernion>
Ahhh... thanks Rickhull
alnewkirk has quit [Ping timeout: 260 seconds]
<RickHull>
dminuoso: what is nthL from your gist?
<RickHull>
some user arg?
troys_ is now known as troys
enterprisey has joined #ruby
alnewkirk has joined #ruby
mtkd has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
alnewkirk has quit [Ping timeout: 240 seconds]
jphase has quit [Remote host closed the connection]
cschneid_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
cschneid_ has quit [Ping timeout: 252 seconds]
alnewkirk has joined #ruby
<RickHull>
from a travis worker: Load: 169.31 181.22 178.13 139/2375 2351
s3nd1v0g1us has quit [Remote host closed the connection]
jphase has joined #ruby
alnewkirk has quit [Ping timeout: 260 seconds]
blackmesa1 has quit [Ping timeout: 240 seconds]
QualityAddict has quit [Remote host closed the connection]
blackmesa1 has joined #ruby
alnewkirk has joined #ruby
oetjenj has joined #ruby
moei has quit [Quit: Leaving...]
alnewkirk has quit [Ping timeout: 248 seconds]
bmurt has joined #ruby
nogic has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
hotpancakes has quit [Remote host closed the connection]