zenguy_pc has quit [Remote host closed the connection]
Jet4Fire has quit [Ping timeout: 246 seconds]
zenguy_pc has joined #ruby
edwinvdgraaf has quit [Remote host closed the connection]
nixmaniack has joined #ruby
christiandsg has quit [Remote host closed the connection]
supermarin has joined #ruby
toretore has quit [Ping timeout: 260 seconds]
norc has quit [Ping timeout: 252 seconds]
__fps__ has quit [Ping timeout: 260 seconds]
christiandsg has joined #ruby
nixmaniack has quit [Ping timeout: 246 seconds]
Yzguy has quit [Quit: Zzz...]
yfeldblum has quit [Ping timeout: 264 seconds]
bb010g has quit [Quit: Connection closed for inactivity]
quazimodo has joined #ruby
underplank has joined #ruby
LiquidInsect has joined #ruby
<quazimodo>
i need to write some data to rail's send_data method as CSV, i've tried looking around for a csv sanitizer but I didn't find one, i'm not sure if ruby's CSV class can be used to sanitize my string before saving it as csv headers, => def batch_headers
<quazimodo>
data = @template.placeholders.map(&:value).join(',')
<quazimodo>
name = /(.*)\..*/.match(@template.name)[1]
<Ox0dea>
Dimik: Was that supposed to be a demonstration of your having "tried that"?
dlitvak has joined #ruby
christiandsg has joined #ruby
Arnvald has joined #ruby
centrx has joined #ruby
Jardayn has quit [Read error: Connection reset by peer]
<dimik>
ohhh ok
<dimik>
whatever man lol
duckpuppy has joined #ruby
nettoweb has quit [Ping timeout: 245 seconds]
Jet4Fire has joined #ruby
mary5030 has joined #ruby
craysiii has quit [Quit: Leaving.]
sarkis has quit [Ping timeout: 260 seconds]
Arnvald has quit [Ping timeout: 264 seconds]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
linduxed has quit [Ping timeout: 246 seconds]
Jet4Fire has quit [Ping timeout: 260 seconds]
sarkis has joined #ruby
emptyflask has quit []
<Ox0dea>
Dimik: I had to go all the way up to the attic to get it, but I am now in possession of a perfectly serviceable baby spoon; are you still hungry?
duckpuppy has quit [Ping timeout: 245 seconds]
devoldmx has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 246 seconds]
nettoweb has joined #ruby
nerium has joined #ruby
<dimik>
lol.
Jet4Fire has joined #ruby
<nerium>
Is there a way to speed up bundle install when you have gems that points to large repos?
<rgb-one>
nerium, are you having any issues with using bundler?
<nerium>
rgb-one: nope
<rgb-one>
Cool
supermarin has quit [Remote host closed the connection]
jpfuentes2 has quit [Ping timeout: 246 seconds]
joneshf-laptop has joined #ruby
<xybre>
Uhg why is that repo so large when it's like a dozen files. Oh. The vendored crap. Joy.
<nerium>
It’s 48MB, not 100 like i said before
<Ox0dea>
Same OOM.
<nerium>
but it only takes 15 sec to download using git, so there must be someting else that’s wrong
Jet4Fire has joined #ruby
elton has joined #ruby
elton has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
chouhoulis has joined #ruby
skcin7 has quit [Max SendQ exceeded]
Jet4Fire has quit [Ping timeout: 245 seconds]
skcin7 has joined #ruby
<xybre>
Definitely --verbose/trace to see what's happening.
Yzguy has joined #ruby
mary5030 has joined #ruby
Jet4Fire has joined #ruby
mooe has quit [Quit: Connection closed for inactivity]
Cantaberry has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgt1 has quit [Ping timeout: 260 seconds]
christia_ has joined #ruby
christiandsg has quit [Read error: Connection reset by peer]
Jet4Fire has quit [Ping timeout: 260 seconds]
centrx has quit [Quit: If you meet the Buddha on the road, kill him.]
rgb-one has left #ruby [#ruby]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Coldblackice has quit [Ping timeout: 260 seconds]
Jet4Fire has joined #ruby
Coldblackice has joined #ruby
Arnvald has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
framlinqp has joined #ruby
wildlander has quit [Quit: Saliendo]
framling has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
zacts has joined #ruby
underplank has quit [Quit: underplank]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
SenpaiSilver_ has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
yqt has quit [Ping timeout: 246 seconds]
jgt1 has joined #ruby
sdothum has joined #ruby
Jet4Fire has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Rickmasta has joined #ruby
nateberkopec has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
peterhil_ has joined #ruby
dlitvak has quit [Ping timeout: 260 seconds]
<grill_>
yo. what's the best way to iterate through an array such that I am able to reset the current iterator position as needed?
<Radar>
grill_: example plz
dlitvak has joined #ruby
Jet4Fire has quit [Ping timeout: 245 seconds]
<Ox0dea>
grill_: Enumerable#next.
<grill_>
in java, you can do for (int i = 0; blah blah; i++) { i = 0; blah blah; }
<Ox0dea>
Oh, that.
myztic has joined #ruby
<Ox0dea>
You're probably doing it wrong?
<Radar>
^
ledestin has joined #ruby
<grill_>
can this be done or not?
<Radar>
grill_: Explain why you want to do that, please.
<grill_>
i want to do it because i'd like to see if it can be done
<Radar>
Ox0dea: all yours
jessemcgilallen has quit [Quit: jessemcgilallen]
peterhil_ has quit [Ping timeout: 245 seconds]
* Ox0dea
passes, thanks.
<grill_>
sounds like it isn't possible
<Yzguy>
I don't think you would use a for loop
<grill_>
looks to be another flaw in ruby
Bellthoven has quit [Ping timeout: 260 seconds]
<Radar>
grill_: If you're here to criticise Ruby, may I suggest that you don't?
<Arnvald>
grill_: are you here just to bash the language?
<Radar>
Arnvald: snap
<Arnvald>
grill_: it can be done
<Arnvald>
grill_: there's a method Enumerable#rewind
<Arnvald>
you can iterate over a collection and then rewind enumerator to the beginning
<Arnvald>
and start iterating again
<Arnvald>
all inside the loop
<grill_>
wonderful. little life hack here: pretend there's a flaw with a language whenever you're not getting anywhere with a question, and someone will inevitably pop in with a viable solution
<grill_>
thanks :)
bronson has joined #ruby
<Ox0dea>
grill_: But that wasn't an answer to your question.
<Ox0dea>
So you really were just trolling/pretending to be retarded.
<Ox0dea>
Oh, dammit. :<
<Ox0dea>
I thought you asked about arbitrarily positioning the iterator.
Jet4Fire has joined #ruby
<Ox0dea>
Still friends?
<Arnvald>
grill_: it comes with a consequence, though, if you use it too often people will consider you a troll and start ignoring you
<Radar>
^
<grill_>
true
<Radar>
"RUBY SUXXORS"
<grill_>
it's sorta a nuclear weapon
<Radar>
(p.s. I can / will ban for that)
<grill_>
but it's the worst when someone assumes you're not doing something the right way
<jhass>
TheHackOps: create a config.ru with `require "resque_web"; run ResqueWeb::Engine.new` and run rackup or your favorite appserver (puma, unicorn, passenger, thin, whatever else)
<TheHackOps>
I am about as new to RoR as a baby born an hour ago
djbkd has quit [Remote host closed the connection]
kfpratt has joined #ruby
kfpratt has quit [Remote host closed the connection]
<TheHackOps>
Where do i create this config
<TheHackOps>
I am so confused
djbkd has joined #ruby
Jet4Fire has joined #ruby
Bellthoven has joined #ruby
<jhass>
TheHackOps: didn't sound like you're using Rails?
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<TheHackOps>
jhass, No idea
<jhass>
well, if you don't know then how shall I
<TheHackOps>
All I know is I want to use this web portal
<Radar>
TheHackOps: Did you create a new Rails app?
<TheHackOps>
Nope
<jhass>
if you do you're in the wrong channel, if not the answer is anywhere
<Radar>
?rails TheHackOps
<ruboto>
TheHackOps, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<TheHackOps>
Basiaclly I just installed Ruby
<jhass>
Radar: my guess is currently 75% not using Rails
<TheHackOps>
and now I am trying to get this web portal installed
<xybre>
grill_: use a class method like Rails does: Foo.create is generally what I use.
<jhass>
TheHackOps: how about you try my suggestion
skcin7 has quit [Ping timeout: 260 seconds]
<Radar>
jhass: they don't know where to create the config
<jhass>
Radar: I said "anywhere" above
<TheHackOps>
jhass, Ok this might sound weird in the context of ruby but why am i creating a new project if I am trying to use an existing one?
djbkd has quit [Ping timeout: 245 seconds]
<TheHackOps>
I am a PHP/C# dev in the webstack
<jhass>
TheHackOps: I have a doubt, you say you just installed Ruby, how do you run Resque?
Jet4Fire has quit [Ping timeout: 260 seconds]
<TheHackOps>
jhass, Not running yet
<TheHackOps>
Trying to get something concrete I can look at
<Radar>
TheHackOps: Because Resque-web is a Rails engine; it's a "mini-app" which needs to have a parent app to leech off.
<Radar>
jhass is suggesting it MIGHT work if you create a config.ru file
<TheHackOps>
I see
hello9 has quit [Ping timeout: 245 seconds]
<TheHackOps>
Radar, So I should just create a new blank app
<jhass>
TheHackOps: if you don't have your resque running yet, running resque-web will be completely useless
<TheHackOps>
Radar, The fact that I have no idea where to run it
<TheHackOps>
Like
<TheHackOps>
Wait that makes me sound retarded
<jhass>
it doesn't matter
blackmesa has quit [Ping timeout: 246 seconds]
<Radar>
TheHackOps: create a new file called "config.ru" literally anywhere
<TheHackOps>
Ok
<Radar>
then run the command "rackup config.ru" in that same directory
<Radar>
There is no step 3
<Radar>
only profit
<TheHackOps>
Radar, Ok
<TheHackOps>
I will
Jet4Fire has quit [Ping timeout: 246 seconds]
chandlerbing has quit [Quit: chandlerbing]
<TheHackOps>
configuration /home/phantom/Resque-server/config.ru not found
<TheHackOps>
when I run that
mary5030 has joined #ruby
<TheHackOps>
Ah
<TheHackOps>
I see what you mean
<Radar>
great.
<TheHackOps>
touch config.ru
<TheHackOps>
I would assume its something like composer init
<TheHackOps>
my bad
yeticry has quit [Ping timeout: 246 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kobain has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
sucks has quit [Ping timeout: 260 seconds]
sucks has joined #ruby
<TheHackOps>
Radar, `to_app': missing run or map statement (RuntimeError)
hello9 has joined #ruby
<Radar>
TheHackOps: I can't fucking believe it.
<Radar>
Did you really just touch the file and not add anything to it?
<Radar>
DESPITE being _repeatedly_ told to add contents to the file?
* Radar
's mouth is hanging open
<jhass>
yeah, are you drunk or something?
mary5030 has quit [Ping timeout: 246 seconds]
Jet4Fire has joined #ruby
<TheHackOps>
err no
<TheHackOps>
You guys dont know how different this whole eco system is
<TheHackOps>
to every other system
lele has quit [Ping timeout: 264 seconds]
<Radar>
TheHackOps: I don't understand how creating a file in ruby and putting things in it is different to creating a file in PHP and putting things in it
<Radar>
TheHackOps: Please explain to me the differences between these two actions.
<TheHackOps>
Radar, You didnt even tell me what the file does
<TheHackOps>
but
<Radar>
omg
<TheHackOps>
I assume its a composer.json like file
<grill_>
that method would work unless someone screws up the input (e.g. "1,2,3,4" instead of "1 2 3 4"), correct?
Jet4Fire has joined #ruby
Rickmasta has joined #ruby
<jhass>
?try
<ruboto>
Why don't you try it and see for yourself?
<grill_>
sigh. what's that commandline ruby interpreter?
<jhass>
irb
<jhass>
but
<jhass>
?pry
<ruboto>
Pry, the better IRB. Includes easy object inspection via `ls`, `history`, docs view with `?`, source view with `$` and syntax highlighting, among other features (see `help` for more). It can also be used for easy debugging by putting `binding.pry` directly in your source code. Visit https://pryrepl.org/ or get it now with: gem install pry pry-doc
<sorbo_>
pry++
<xybre>
<3 pry
djbkd has joined #ruby
rsc___ has joined #ruby
fly5566 has quit [Remote host closed the connection]
supermarin has quit [Read error: Connection reset by peer]
elton has joined #ruby
supermar_ has joined #ruby
juddey has quit [Ping timeout: 260 seconds]
bronson has joined #ruby
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has quit [Quit: rsc___]
Rickmasta has joined #ruby
blackmesa has joined #ruby
rgrmatt has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
Xeago has quit [Remote host closed the connection]
jetpackjoe has joined #ruby
skweek has joined #ruby
Xeago has joined #ruby
jpfuentes2 has joined #ruby
rgrmatt has quit [Ping timeout: 260 seconds]
elton has quit [Remote host closed the connection]
elton has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
Yzguy has quit [Quit: Zzz...]
kies has joined #ruby
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
jpfuentes2 has quit [Ping timeout: 245 seconds]
iateadonut has quit [Ping timeout: 260 seconds]
pyoor has quit [Ping timeout: 246 seconds]
iateadonut has joined #ruby
pyoor has joined #ruby
saneax_AFK is now known as saneax
Xeago has quit [Ping timeout: 260 seconds]
Bellthoven has quit [Ping timeout: 260 seconds]
wheresmyjetpack has joined #ruby
wheresmyjetpack has quit [Client Quit]
youch has joined #ruby
m3_del has quit [Remote host closed the connection]
grill_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
doublemalt_ has quit [Ping timeout: 245 seconds]
pdoherty has quit [Remote host closed the connection]
ascarter has joined #ruby
pdoherty has joined #ruby
grill_ has joined #ruby
skcin7 has quit [Ping timeout: 245 seconds]
DurstBurger has joined #ruby
darkf has joined #ruby
doublemalt_ has joined #ruby
skcin7 has joined #ruby
Bellthoven has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
skcin7 has quit [Max SendQ exceeded]
diegoviola has quit [Quit: WeeChat 1.3]
grill_ has quit [Ping timeout: 260 seconds]
DurstBurger has quit [Ping timeout: 245 seconds]
nateberkopec has joined #ruby
rsc___ has joined #ruby
astrobunny has joined #ruby
arescorpio has quit [Quit: Leaving.]
peterhil_ has joined #ruby
tildes has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
rsc___ has quit [Client Quit]
rsc___ has joined #ruby
grill_ has joined #ruby
ur5us has quit [Remote host closed the connection]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Rodya_ has quit [Quit: Leaving...]
houhoulis has quit [Remote host closed the connection]
peterhil_ has quit [Ping timeout: 260 seconds]
stannard has joined #ruby
grill_ has quit [Ping timeout: 246 seconds]
berserk_ren has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
stannard has quit [Ping timeout: 260 seconds]
Insti has quit [Ping timeout: 260 seconds]
Insti has joined #ruby
PaulCapestany has quit [Quit: .]
<droptone>
Here's a question for you Ruby experts: I need to encrypt the contents of a directory via my Ruby app.
<droptone>
Any thoughts on that? Should I just call an external application? My host OS is Centos 7.x
PaulCapestany has joined #ruby
PaulCapestany has quit [Client Quit]
CloCkWeRX has quit [Ping timeout: 260 seconds]
Trynemjoel has quit [Ping timeout: 264 seconds]
Mon_Ouie has joined #ruby
<xybre>
droptone: what are you doing with the directory?
shinenelson has joined #ruby
berserk_ren has quit [Ping timeout: 246 seconds]
blackmesa has joined #ruby
igor_ has joined #ruby
Trynemjoel has joined #ruby
igor_ is now known as hackmathics
favadi has joined #ruby
PaulCapestany has joined #ruby
<droptone>
xybre: I need to A) check to see if a series of files in a directory are encrypted, if so, B) decrypt, C) write changes to them, then D) re-encrypt.
<droptone>
Normally, on my home machine, I leverage a TrueCrypt container, but of course that's not applicable here.
<droptone>
As far as what I'm doing, I'm storing sensitive content to them, hence the need for encryption.
jetpackjoe has joined #ruby
<xybre>
So you only want them decrypted in memory, not on disk.
blackmesa has quit [Ping timeout: 245 seconds]
<droptone>
Looks like ccrypt might be a proper solution, it leverages the Rijndael cypher.
christia_ has quit [Remote host closed the connection]
<xybre>
Why not just mount your TrueCrypt container?
djbkd has quit [Quit: Leaving...]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
hxegon has quit [Ping timeout: 245 seconds]
<droptone>
The guys in #linux are recommended using 7z to both encrypt and compress the files, that's good.
skweek has joined #ruby
<droptone>
xybre: That container exists on my local machine, not on this remote host.
christiandsg has joined #ruby
grill_ has joined #ruby
CloCkWeRX has joined #ruby
<xybre>
Yeah, I mean a specific truecrypt container for the files you're talking about.
WizJin has quit [Excess Flood]
Ox0dea has quit [Quit: WeeChat 1.4-dev]
Bellthoven has quit [Ping timeout: 260 seconds]
christiandsg has quit [Read error: Connection reset by peer]
supermar_ has quit [Remote host closed the connection]
nerium has joined #ruby
s00pcan has quit [Remote host closed the connection]
<droptone>
Has this project been abaonded?
<xybre>
Not sure
Wsewolod has quit [Ping timeout: 260 seconds]
christiandsg has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
hello9 has quit [Quit: Leaving]
Ox0dea has joined #ruby
Gnut has joined #ruby
paradisaeidae has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
grill_ has joined #ruby
finisherr has joined #ruby
bronson has joined #ruby
solocshaw has quit [Ping timeout: 260 seconds]
solocshaw has joined #ruby
grill_ has quit [Ping timeout: 260 seconds]
tildes has quit [Ping timeout: 245 seconds]
DurstBurger has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
christiandsg has quit [Remote host closed the connection]
hotpancakes has quit []
makenoise has joined #ruby
DurstBurger has quit [Ping timeout: 245 seconds]
jessemcgilallen has joined #ruby
nateberkopec has joined #ruby
grill_ has joined #ruby
DavidDudson has joined #ruby
makenoise has quit [Remote host closed the connection]
makenoise has joined #ruby
Bellthoven has joined #ruby
Arnvald has joined #ruby
grill_ has quit [Ping timeout: 260 seconds]
nateberkopec has quit [Ping timeout: 245 seconds]
peterhil_ has joined #ruby
toy has joined #ruby
timonv has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
graffix222 has quit [Ping timeout: 260 seconds]
krzkrzkrz has quit [Ping timeout: 264 seconds]
supermarin has joined #ruby
makenoise has quit [Remote host closed the connection]
peterhil_ has quit [Ping timeout: 245 seconds]
makenoise has joined #ruby
jetpackjoe has joined #ruby
ta has quit [Remote host closed the connection]
supermarin has quit [Remote host closed the connection]
jbrhbr has joined #ruby
jbrhbr has quit [Client Quit]
devbug has quit [Ping timeout: 246 seconds]
hackmathics has quit [Remote host closed the connection]
trautwein has joined #ruby
grill_ has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<droptone>
What's the best method to run an external command within a Ruby script? %x, exec, or system?
makenoise has quit []
<Mon_Ouie>
Those all serve completely different purposes
<apeiros>
"best"?
<apeiros>
?best droptone
<ruboto>
droptone, "Best" and "better" are subjective. Try to use a different term.
<droptone>
"Most appropriate"
<droptone>
It's all good, I got it.
<droptone>
I'm using %x because it returns the result of the command.
<droptone>
It appears exec() halts the existing process and replaces it
<apeiros>
you realize that that wasn't any more telling? :)
<droptone>
I'm good, thank you though.
grill_ has quit [Ping timeout: 260 seconds]
<droptone>
I'll be more specific next time.
<apeiros>
it's more for future question of yours
<droptone>
Yes, I just hang out here a lot so sometimes I just freestyle it.
<apeiros>
and I think ?best needs a rewording. merely changing the term usually won't help.
<droptone>
I try to keep it to #ruby-offtopic but every so often it slips out here, and then I promptly regret it.
<droptone>
In #ruby-offtopic I'm addicted to hangman.
<apeiros>
!fact ed best "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
<ruboto>
apeiros, I stand corrected that best is "better" and "best" depend entirely on your context. Try to describe what quality would make one thing better than the other.
<droptone>
lol
<droptone>
The bot stands corrected!
<Ox0dea>
droptone: `foo` > %x(foo)
<Ox0dea>
The former does the same but uses more conventional orthography.
rgrmatt has joined #ruby
xcesariox has quit [Read error: Connection reset by peer]
cornerma1 has joined #ruby
<droptone>
Here's a specific question: The syntax of %x, is it simply %x(mkdir test)?
<droptone>
I realize I can use Dir.mkdir, it's just an example.
rsc___ has quit [Quit: rsc___]
<Ox0dea>
Yes?
<apeiros>
yes
<droptone>
I'm having trouble finding specific examples online.
<droptone>
Thank you.
govg has quit [Ping timeout: 260 seconds]
<droptone>
apeiros: Thank you.
<Ox0dea>
But you can use all sorts of delimiters for percent strings.
<apeiros>
`mkdir test` == %x(mkdir test) == %x/mkdir test/ == %x|mkdir test| # or whatever other delimiter
Mon_Ouie has quit [Ping timeout: 260 seconds]
<droptone>
ahh, thank you.
<Ox0dea>
Read: avoid %x.
tjad has quit [Ping timeout: 246 seconds]
auzty has joined #ruby
<apeiros>
IMO you shouldn't use %x with variable substitution
<droptone>
So, while %x would work, it's preferred to use another option, such as backticks?
hackmathics has joined #ruby
<Ox0dea>
That's ultimately your prerogative, but you've been given sufficient material to make the right choice. :P
cornerman has quit [Ping timeout: 246 seconds]
nbdy has joined #ruby
cornerma1 is now known as cornerman
blackmesa has joined #ruby
jpfuentes2 has joined #ruby
christiandsg has joined #ruby
* xybre
prefers %x(), partially because backticks are bad in *sh, cultivating good habits and all
<droptone>
lol, heavens Ox0.
Mon_Ouie has joined #ruby
<droptone>
xybre: Thank you.
Fridtjof has quit [Ping timeout: 264 seconds]
Channel6 has quit [Read error: Connection reset by peer]
krzkrzkrz has joined #ruby
CrazyEddy has quit [Remote host closed the connection]
<apeiros>
droptone: %x *is* backticks
nixmaniack has joined #ruby
Guest39588 is now known as awk
rgrmatt has quit [Ping timeout: 260 seconds]
tagrudev has joined #ruby
<droptone>
Right, I understand that, but Ox0 said "Read: avoid %x()"
<xybre>
They are equivilent in Ruby.
<droptone>
So that implies that I should avoid using %x() specifically.
<apeiros>
they aren't just equivalent. they're literally the same thing.
grill_ has joined #ruby
<apeiros>
well, apart of the apparently different sigils.
CrazyEddy has quit [Remote host closed the connection]
Mon_Ouie has quit [Ping timeout: 260 seconds]
christiandsg has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
christiandsg has joined #ruby
jessemcgilallen has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
jessemcgilallen has quit [Read error: Connection reset by peer]
tjad has joined #ruby
elton has quit [Read error: Connection reset by peer]
devbug has joined #ruby
Gnut has joined #ruby
elton has joined #ruby
WizJin has joined #ruby
bronson has quit [Remote host closed the connection]
DurstBurger has joined #ruby
CrazyEddy has joined #ruby
grill_ has joined #ruby
ta has quit [Remote host closed the connection]
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
rsc___ has quit [Quit: rsc___]
davedev24 has joined #ruby
DurstBurger has quit [Ping timeout: 246 seconds]
davedev24 has quit [Client Quit]
bb010g has quit [Quit: Connection closed for inactivity]
grill_ has quit [Ping timeout: 260 seconds]
nateberkopec has joined #ruby
jetpackjoe has joined #ruby
EllisTAA has joined #ruby
<flughafen>
morning guys
<blub>
hi flughafen
<flughafen>
huhu blub!
Lap64 has joined #ruby
<Lap64>
hello all
<EllisTAA>
when i try to scrape this website for links, it doesn’t return any of the imgs, i was thinking that maybe the imgs get loaded in after the page loads … could someone tell me if they think this is what’s happening http://grid.vsco.co/grid/3433
<Lap64>
i have written a script which was find content for me using google api
<Lap64>
its was running fine till few days back but now suddenly it stopped running and the error i am getting is Network is unreachable - connect(2) for "ajax.googleapis.com" port 80 (Curl::Err::HttpError)
<Lap64>
what does this mean ?
<Lap64>
can someone please help
<flughafen>
shevy: i'm going to install opensuse leap, if i'm not back within 2 hours, make someting take off and search for me !
<Ox0dea>
Lap64: It's likely they banned you by one means or another.
<EllisTAA>
Ox0dea: meaning it is probably getting loaded after the page gets loaded?
<Lap64>
Ox0dea, how t ocheck if i am banned ?
<Ox0dea>
Lap64: Try from another IP address?
<Ox0dea>
ellistaa: Yep.
Fridtjof has joined #ruby
Gnut has quit [Ping timeout: 246 seconds]
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
<EllisTAA>
Ox0dea: thanks
grill_ has joined #ruby
<Lap64>
Ox0dea, there is no way to check from this server that ip is banned ?
<shevy>
flughafen kk
Cantaberry has quit [Ping timeout: 260 seconds]
EllisTAA has quit [Quit: ellistaa]
<shevy>
flughafen could be worse, could be flughafen-downed-via-bluescreen-of-death
<flughafen>
haha.
<Ox0dea>
Lap64: Unless you're using an API that was very recently discontinued, that error messages suffices to indicate that you've tripped some flag and been denied access.
<Ox0dea>
*message
<Ox0dea>
Lap64: That you're not expressing indignation at the mere suggestion indicates you might have some inkling as to why this might've happened. :P
<Lap64>
Ox0dea, there might be two things
<Ox0dea>
Lap64: Did you go Sahnic fast with your requests?
<Lap64>
Ox0dea, 1. the API has changed some flags 2.I might have abused something and IP got blocked lols
poguez_ has joined #ruby
<Ox0dea>
Lap64: Aye, I'd reckon on the latter.
<Lap64>
Ox0dea, umm well it was working fine since ast 1 year and i was following the guidelines but still
<Lap64>
you never know
<Lap64>
bleh
<Ox0dea>
I'm sure it's an automated thing, but that's not to say you violated some zero-tolerance policy either.
grill_ has quit [Ping timeout: 260 seconds]
<flughafen>
l8r!
djbkd has quit [Remote host closed the connection]
<Ox0dea>
flughafen: Do you actually use SUSE?
<flughafen>
Ox0dea: yes... ?
<Ox0dea>
Oh.
<flughafen>
lol. why Ox0dea
<Ox0dea>
Just wondering.
<Ox0dea>
How come?
<flughafen>
hehe. i work for SUSE Ox0dea
<Ox0dea>
I see.
<Ox0dea>
Just dogfooding, then?
DurstBurger has joined #ruby
<flughafen>
haha, it's decent. I'd probably be on archlinux
christiandsg has quit [Remote host closed the connection]
<flughafen>
but we'll see about leap, as it's uses a lot of sles stuff
Symbiosisz has quit [Ping timeout: 245 seconds]
jbrhbr has joined #ruby
ur5us has joined #ruby
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nofxx has quit [Ping timeout: 260 seconds]
<flughafen>
plus i think zypper is a great package management tool
Bellthoven has quit [Ping timeout: 245 seconds]
grill_ has joined #ruby
flughafen has quit [Remote host closed the connection]
sandstrom has joined #ruby
bigkevmcd has joined #ruby
sandstrom has quit [Client Quit]
<shevy>
I hated suse
Macaveli has joined #ruby
ta has joined #ruby
<shevy>
I approve that they rewrote yast in ruby though
<shevy>
at first I thought it had to do with set_trace_var
kfrz has quit [Client Quit]
armyriad has joined #ruby
dhjondoh has quit [Remote host closed the connection]
DanKnox[away] is now known as DanKnox
dhjondoh has joined #ruby
rodfersou has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
waka has quit [Remote host closed the connection]
dhjondoh has quit [Remote host closed the connection]
Tempesta has quit [Quit: See ya!]
Tempesta has joined #ruby
M4l4 has quit [Ping timeout: 246 seconds]
graffix222 has joined #ruby
baweaver has joined #ruby
dhjondoh has joined #ruby
sepp2k has joined #ruby
platzhirsch has joined #ruby
colegatron has joined #ruby
M4l4 has joined #ruby
<yorickpeterse>
morning
<adaedra>
hi yorick
<blub>
hi yorickpeterse
baweaver has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
monthy has joined #ruby
Snowy has quit []
DarkBushido has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 260 seconds]
user1138 has joined #ruby
GGMethos has quit [Ping timeout: 264 seconds]
danneu has quit [Ping timeout: 264 seconds]
user1138 has quit [Read error: Connection reset by peer]
rideh has quit [Ping timeout: 260 seconds]
huyderman has joined #ruby
user1138 has joined #ruby
user1138 has quit [Remote host closed the connection]
atomical_ has quit [Ping timeout: 260 seconds]
jas02 has quit [Quit: jas02]
rideh has joined #ruby
devoldmx has joined #ruby
hostess has quit [Quit: No Ping reply in 180 seconds.]
DarkBushido has joined #ruby
epochwolf has joined #ruby
Apocalypse has joined #ruby
torpig has quit [Ping timeout: 260 seconds]
devoldmx has quit [Ping timeout: 246 seconds]
root_murdoc has joined #ruby
dionysus69 has quit [Ping timeout: 246 seconds]
nateberkopec has joined #ruby
DarkBushido has quit [Ping timeout: 260 seconds]
torpig has joined #ruby
atomical has joined #ruby
Bloomer has quit []
dhjondoh has quit [Quit: dhjondoh]
epochwolf has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 260 seconds]
root_murdoc has quit [Ping timeout: 260 seconds]
cschneid has joined #ruby
atomical has quit [Max SendQ exceeded]
nateberkopec has quit [Ping timeout: 260 seconds]
rideh has quit [Ping timeout: 260 seconds]
duncannz has quit [Ping timeout: 260 seconds]
crdpink2 has joined #ruby
crdpink has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 260 seconds]
epochwolf has joined #ruby
Ikri has quit [Read error: Network is unreachable]
hostess has joined #ruby
nfk|laptop has joined #ruby
rideh has joined #ruby
krzkrzkrz has quit [Ping timeout: 246 seconds]
monthy has quit [Killed (Sigyn (Spam is off topic on freenode.))]
chriscoffee has joined #ruby
Ikri has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
chriscoffee has quit [Max SendQ exceeded]
Bellthoven has quit []
M4l4 has quit [Ping timeout: 260 seconds]
M4l4 has joined #ruby
dhjondoh has joined #ruby
epochwolf has quit [Ping timeout: 260 seconds]
skade has quit [Quit: Computer has gone to sleep.]
ldnunes has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jet4Fire has quit [Ping timeout: 245 seconds]
atomical has joined #ruby
rideh has quit [Ping timeout: 260 seconds]
rsc___ has quit [Quit: rsc___]
vikas027 has joined #ruby
Arnvald has quit [Remote host closed the connection]
rideh has joined #ruby
stamina has joined #ruby
DarkBushido has joined #ruby
AlphaAtom has joined #ruby
jpfuentes2 has joined #ruby
rsc___ has joined #ruby
DarkBushido has quit [Ping timeout: 260 seconds]
<vikas027>
Hello Everyone, I am unable to use net-ldap gem with bind_as . Please help me to figure out what is wrong in this code http://pastebin.com/q8YSWtz6
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
doublemalt_ has quit [Ping timeout: 260 seconds]
kaka_ has joined #ruby
GGMethos has joined #ruby
<apeiros>
vikas027: lets start with your problem description - how do you figure "something is wrong"?
fabrice31 has joined #ruby
fabrice31 has quit [Remote host closed the connection]
<vikas027>
apeiros: When I run this code, I get "Authentication FAILED." while I can login thru this user on the Windows machine
jpfuentes2 has quit [Ping timeout: 260 seconds]
AlphaAtom has quit [Ping timeout: 260 seconds]
dlitvak has joined #ruby
<apeiros>
been a while - might be that your windows machine automatically adds the domain (as in "<domain>\username")
M4l4 has quit [Ping timeout: 246 seconds]
gigetoo has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
nixmaniack has quit [Remote host closed the connection]
<vikas027>
apeiros: Hmm... it shouldn't be since I tried to use username 'vikas.kumar@TEST.COM' while connecting thru a RDP session as well
DarkBushido has joined #ruby
spt0 has quit [Ping timeout: 260 seconds]
dhjondoh has quit [Remote host closed the connection]
<apeiros>
do you only need to know whether password & username are valid?
kaka_ has quit [Ping timeout: 246 seconds]
dhjondoh has joined #ruby
<vikas027>
apeiros: correct, that is my ultimate goal
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toretore has joined #ruby
<apeiros>
then you can use .bind instead of bind_as. I.e. my code here is just: def self.valid?; !!Net::LDAP.new(*options).bind
dlitvak has quit [Remote host closed the connection]
mistym has quit [Ping timeout: 260 seconds]
<apeiros>
and options is roughly: {host: , port:, base:, auth: => {method:, username:, password: }}
<apeiros>
no filter
<vikas027>
apeiros: let me try that
<apeiros>
and in username, I have "domain\\" prefixed
<vikas027>
apeiros: thanks for the help
skade has joined #ruby
<apeiros>
so I guess yours might even work, but it's missing the domain
joonty has quit [Quit: joonty]
dlitvak has joined #ruby
skade has quit [Client Quit]
araujo has quit [Quit: Leaving]
FooMunki has quit [Quit: FooMunki]
mistym has joined #ruby
mistym has quit [Changing host]
mistym has joined #ruby
dlitvak has quit [Remote host closed the connection]
atomical has quit [Max SendQ exceeded]
andikr has joined #ruby
atomical has joined #ruby
dlitvak has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
joonty has joined #ruby
svoop has joined #ruby
spk has quit [Ping timeout: 264 seconds]
spk has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
bronson has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jschmid1 has joined #ruby
arup_r has joined #ruby
jas02 has joined #ruby
DurstBurger has joined #ruby
<vikas027>
apeiros: thanks a ton. All of the ldap.auth options are working fine here - https://dpaste.de/coMU
finisherr has quit [Quit: finisherr]
bronson has quit [Ping timeout: 245 seconds]
<arup_r>
codeclimate giving error for the months method https://gist.github.com/aruprakshit/daa8b0e05a430685138a error as Assignment Branch Condition size for months is too high. [23.28/20]. How to refactor this ? little hints pease
<apeiros>
arup_r: isn't that rails?
CloCkWeRX has quit [Ping timeout: 260 seconds]
<arup_r>
No. Refactoring is not related to rails.. I can ask this channel too
* apeiros
sobs
* adaedra
pats apeiros
<apeiros>
arup_r: yes. refactoring is totally related to the tools you have available.
<apeiros>
arup_r: and rails/not rails is a *friggin huge* difference in tools available.
<adaedra>
arup_r: Rails channel will be able to give you Rails solutions that can help you further in your refactoring.
<arup_r>
ok.. moving.
vikas027 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<arup_r>
I still not convinced to think this question as Rails channel specific .. but I will listen you.. :)
<trautwein>
c
nateberkopec has joined #ruby
DurstBurger has quit [Ping timeout: 246 seconds]
<shevy>
d
stannard has joined #ruby
Peg-leg has joined #ruby
<apeiros>
arup_r: I think you're lucky you don't have to i18n that. otherwise the score would be even higher.
gigetoo has joined #ruby
<trautwein>
shevy, wrong window.. or the ruby debugger displays very strange things ;)
maesitos has joined #ruby
<arup_r>
which part of the code making rubocop unhappy thinking .. :)
stannard has quit [Ping timeout: 246 seconds]
spt0 has joined #ruby
nateberkopec has quit [Ping timeout: 260 seconds]
norc has joined #ruby
<norc>
Hi folks.
dhjondoh has quit [Remote host closed the connection]
dhjondoh has joined #ruby
stamina has quit [Ping timeout: 260 seconds]
<blub>
hi big norc
maesitos is now known as holaadios
holaadios is now known as maesitos
blackmesa has joined #ruby
it_tard has joined #ruby
nfk|laptop has quit [Read error: Connection reset by peer]
blackmesa has quit [Ping timeout: 245 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
nerium has joined #ruby
CloCkWeRX has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
dkam has joined #ruby
pandaant has quit [Remote host closed the connection]
dhjondoh has quit [Remote host closed the connection]
dlitvak has joined #ruby
dhjondoh has joined #ruby
Robert__ has joined #ruby
<dkam>
How would I create an SSL Context which includes SNI? Looks like the C call is SSL_set_tlsext_host_name?
FooMunki has joined #ruby
hackmathics has joined #ruby
dlitvak has quit [Ping timeout: 246 seconds]
<shevy>
arup_r EVERYTHING makes rubocop unhappy
dhjondoh has quit [Remote host closed the connection]
skade has joined #ruby
dhjondoh has joined #ruby
peterhil_ has quit [Ping timeout: 246 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
hackmathics has quit [Ping timeout: 246 seconds]
edwinvdgraaf has quit []
dlitvak has joined #ruby
<jhass>
dkam: I would expect that to be a default by now
<jhass>
are you sure it's failing because of that?
<dkam>
jhass: I figured it out - you set socket.hostname = "blah.com" - that'll set the SSL context for SNI.
Jet4Fire has joined #ruby
hackmathics has joined #ruby
<jhass>
cool
<dkam>
jhass: Ha! Nice to meet you in chat, rather than github issues.
edwinvdgraaf has joined #ruby
<dkam>
jhass: It wasn't failing - but without provided the context / SNI stuff, the webserver just serves up the default host's certificate.
Mon_Ouie has joined #ruby
<jhass>
yeah I can imagine, I never tried it outside a HTTPS context I guess, which handles it transparently
rsc___ has quit [Quit: rsc___]
<jhass>
Interesting, devdocs.io doesn't list Socket#hostname= or OpenSSL::Socket#hostname=
<dkam>
It's OpenSSL::SSL::SSLSocket
<jhass>
eh, yeah, OpenSSL::Socket is the crystal name :P
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mooe has quit [Quit: Connection closed for inactivity]
speaking1ode has quit [Ping timeout: 245 seconds]
Lap64 has joined #ruby
jackcom has joined #ruby
rgrmatt has quit [Ping timeout: 246 seconds]
jackcom has left #ruby [#ruby]
Coldblackice has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
jpfuentes2 has quit [Ping timeout: 245 seconds]
dkam has quit [Ping timeout: 246 seconds]
sandstrom has joined #ruby
speaking1ode has joined #ruby
tesuji has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
kaka has joined #ruby
tesuji has joined #ruby
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
xet7 has joined #ruby
CloCkWeRX has left #ruby [#ruby]
duckpuppy has quit [Ping timeout: 246 seconds]
Robert__ has quit [Ping timeout: 260 seconds]
peterhil_ has joined #ruby
aryaching has joined #ruby
<Zarthus>
Is it possible to have Resolv::DNS get either an address or a CNAME? When I try to filter those three from each_resource with Resolv::DNS::Resource::IN::ANY the server denies my request ("Please stop asking for ANY") as HINFO (I assume this is a ruby bug and shouldn't really classify as "hardware info", but I haven't read the specification).
d0nn1e has quit [Ping timeout: 260 seconds]
<Zarthus>
possibly a follow up question: If it is, is there a way to automatically resolve a CNAME to an IP address, or is it correct to recursively resolve this?
duckpuppy has joined #ruby
* jhass
never used resolv, let's experiment a bit
<Zarthus>
My initial thought was that this should use bitwase and/or, but that does not seem to be the case.
nateberkopec has joined #ruby
<Zarthus>
e.g. each_resource('google.com', Resolv::DNS::Resource::IN::A | Resolv::DNS::Resource::IN::AAAA | Resolv::DNS::Resource::IN::CNAME - but that's a flat out syntax error.
dkam has joined #ruby
<jhass>
I would expect that if you ask for A and get CNAME back, you have two situations, the server knows the target and returns it and it's available somehow, the server doesn't and you have to run another query
lxsameer has quit [Remote host closed the connection]
kaka_ has joined #ruby
<Zarthus>
each_address (essentially Resolv::DNS::Resource::IN::A and Resolv::DNS::Resource::IN::AAAA) does not return CNAMEs
<Zarthus>
as for why I would want to ensure it resolves to an IP address: I'm doing some extra validation with regards to IP ranges (e.g. "somehost.com must resolve to an IP address in 1.1.0.0/16")
<apeiros>
syntax error?
skade has quit [Quit: Computer has gone to sleep.]
<apeiros>
that doesn't mean it can't work. it just means you wrote something the wrong way. what precisely is the syntax error?
Rumbles has joined #ruby
<Zarthus>
`resolve': undefined method `|' for Resolv::DNS::Resource::IN::A:Class (NoMethodError) with: each_resource(name, Resolv::DNS::Resource::IN::A | Resolv::DNS::Resource::IN::AAAA | Resolv::DNS::Resource::IN::CNAME) do |resource|
<Zarthus>
you're right, it was a bit vaguely phrased by me
<apeiros>
yeah, that's not a syntax error
<Zarthus>
it was more or less a guess on my side to see if bitwise operators would work
mikecmpbll has joined #ruby
* apeiros
digs up his code
<apeiros>
pretty sure I did multiple lookups in one
ghoti has quit [Ping timeout: 260 seconds]
<Zarthus>
yeah, that would be the approach I would take if I couldn't sort it out
dkam has quit [Ping timeout: 246 seconds]
<apeiros>
hm, nope. I added a layer on top of getresources
<jhass>
Zarthus: getaddresses as well as getresources resolve the CNAME here
<jhass>
Zarthus: and fetch_resource provides unfiltered access to the response
bronson has quit [Ping timeout: 245 seconds]
<jhass>
if you explicitly want to know whether a CNAME exist you can either guess from comparing the name in the response with what you requested or explicitly ask for CNAME, I guess
shanemcd has joined #ruby
banister has quit [Read error: Connection reset by peer]
<Zarthus>
seems like getresources pretty much sends multiple requests
<ruboto>
puria, we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
skakri has joined #ruby
dlitvak has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
<apeiros>
given that rbenv is said to be the least popular ruby manager, we sure get a lot of questions about it…
<apeiros>
soooo… either it isn't unpopular or it's unpopular because it raises so many questions?
<jhass>
apeiros: or it just causes the most problems?
<yorickpeterse>
omg but shims are so helpful
<apeiros>
or that
* apeiros
admits that he has no idea how any manager other than rvm works - and even with rvm only a faint idea
ixti has quit [Read error: Connection reset by peer]
<jhass>
rvm & chruby have the same approach
<apeiros>
env vars?
<arup_r>
short question: How to get [[1,2], [ [3,4], [5,6]]] -> [[1,2], [3,4], [5,6]] ? [[1,2], [ [3,4], [5,6]].flatten(1) ] is wrong as per my intentation.. What other tool is there ? :)
<jhass>
they're essentially a shell function which fixes up your $PATH and stuff to the Ruby, yeah
<apeiros>
that is, user install and control all via env vars?
<apeiros>
arup_r: those two look identical?
<apeiros>
oh, your second one is fucked
<jhass>
rbenv adds a static directory to your $PATH and provides wrappers which it rewrites (or who delegate?) to the currently active ruby
<apeiros>
arup_r: properly create the array in the first place, I'd say
<shmoon>
are you talking about iptables/firewall only ?
<adaedra>
So yeah, no packet filter
<p1k>
jhass: I tried "... v.id IN $1", [[1,2,3]] and other such variations
dlitvak has joined #ruby
<adaedra>
shmoon: there are multiple ways to manage Linux iptables. iptables (eh), firewalld, ufw, shorewall, ...
dopie has quit [Ping timeout: 260 seconds]
null__ has quit [Ping timeout: 264 seconds]
ghormoon has quit [Ping timeout: 264 seconds]
<jhass>
p1k: that's only answering a quarter of my question (since it only answer half of the first part)
<p1k>
jhass: yeah it's a very non-useful error =/ PG::SyntaxError: ERROR: syntax error at or near "$1"
sjohnsen has quit [Ping timeout: 264 seconds]
kp666 has joined #ruby
<jhass>
($1) perhaps?
<p1k>
jhass: that works if you query for a single IN value, but [1,2] can't expand correctly into that =/
johnny56 has quit [Ping timeout: 264 seconds]
cookiez has quit [Ping timeout: 264 seconds]
saneax is now known as saneax_AFK
rsc___ has joined #ruby
TomPeed has joined #ruby
Xeago has joined #ruby
Xeago has quit [Read error: Connection reset by peer]
halfdan has quit [Ping timeout: 264 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
sjohnsen has joined #ruby
godzillaenlacasa has joined #ruby
nixmaniack has joined #ruby
ghormoon has joined #ruby
teoric has quit [Quit: WeeChat 1.3-dev]
sankaber has joined #ruby
halfdan has joined #ruby
Synthead has quit [Ping timeout: 265 seconds]
toy_ has quit [Quit: Leaving...]
tvw has quit [Ping timeout: 265 seconds]
sphex has quit [Ping timeout: 246 seconds]
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
JDiPierro has joined #ruby
maesitos has quit [Remote host closed the connection]
<jhass>
p1k: woah, looks like there's really no decent support for this, the solutions I find are all horrible (building an PG array literal as string)
platzhirsch has left #ruby [#ruby]
irk has joined #ruby
<bigmac>
some one had suggested clandestined gem, for a cluster like hashing... but i dont see any examples for running a server and building the hash
<p1k>
jhass: Yeah that's all I'm seeing also - but I just thought "there must be a normal way to do this"
<jhass>
p1k: your safest bet is to generate something like ($1, $2, $3) I'd say
<p1k>
like PG.encodeArrayParam or something :S
<jhass>
p1k: IN (#{1.upto(array.size).map {|i| "$#{i}" }.join(", ")}) something like that, ugh
Azulinho has quit [Ping timeout: 245 seconds]
Some-body_ has joined #ruby
pandaant has joined #ruby
sphex has joined #ruby
<apeiros>
yupp, expanding the $ vars is the way to go
Jardayn has joined #ruby
<apeiros>
if your values from your IN clause are the result of another query -> use a subquery. much more performant.
brainslug has joined #ruby
<p1k>
apeiros: no, single query, so really no encoding method - must string interpolate?
<apeiros>
p1k: no, use jhass lass suggestion
<jhass>
p1k: don't interpolate the values directly, generate bind params as I've shown
vifino has quit [Ping timeout: 246 seconds]
Some-body_ is now known as DarthGandalf
tsunamie has joined #ruby
<p1k>
jhass: that's interpolating bind params, it's still a hack that the encoder should really handle -_-
ta has quit [Remote host closed the connection]
vifino has joined #ruby
<apeiros>
you can use pgarray and use functions to expand that/use it in an IN
<apeiros>
but can't tell you from the top of my head how. and it's not necessarily better.
arup_r has joined #ruby
<jhass>
PG rewrites IN to = ANY(array[])
<apeiros>
oh? source?
<jhass>
random dude on the internet (stackoverflow), closed the tab
<p1k>
i'm looking at rails, it seems to interpolate directly without using params
<p1k>
but that might be for cross-compatibility across sql connectors also
<jhass>
rails is still a source of bad ideas, I seee
dionysus69 has quit [Ping timeout: 260 seconds]
PhilK has quit [Ping timeout: 260 seconds]
<jhass>
possibly
<jhass>
but generating bind params makes you pretty much immune to SQLi from that part at least
boxrick1 has quit [Ping timeout: 245 seconds]
youch has quit [Ping timeout: 260 seconds]
<apeiros>
surprising that AR still is. given how much time tenderlove spent on it
<apeiros>
but I guess he won't go over each db driver :)
<apeiros>
though, pg and ora driver do the same
<p1k>
meh as of 4.23 they are still using pg_type_map_all_string for instantiating AR objects from rows
<apeiros>
so maybe that's indeed not a driver-level fault
devoldmx has joined #ruby
<p1k>
fixed in 5.0 I think, but there's definetly some cross-compatibility stuff they do which is very sub optimal
* apeiros
has no 5.0 handy
nixmaniack has quit [Remote host closed the connection]
<shevy>
jhass hah, I shall immortalize that epic quote about rails in my irc-quotes file!
<darix>
shevy: well you would still need to tell the DateTime which point in time you refer to
djcp has joined #ruby
<darix>
norc: well i left out TZ as his original didnt care either. so i assume he normalized timezones on input ;)
JDiPierro has joined #ruby
lukeasrodgers has joined #ruby
Papierkorb has joined #ruby
<norc>
darix: Heh. I have made it a habit to include TZ absolutely everywhere, since it makes dealing with cross timezone issues so much easier.
whippythellama has joined #ruby
<norc>
Price for living in country with daylight saving time.
asmodlol has joined #ruby
Fredrich010 has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
<shevy>
it saves time!
Azulinho has quit [Client Quit]
Shidash has quit [Ping timeout: 264 seconds]
kobain has joined #ruby
benlakey has quit [Ping timeout: 264 seconds]
glowcoil has joined #ruby
jevs_ has joined #ruby
benlakey has joined #ruby
elektronaut has quit [Ping timeout: 264 seconds]
jevs has quit [Ping timeout: 264 seconds]
jevs_ is now known as jevs
boxrick1 has joined #ruby
favadi has joined #ruby
roshanavand has joined #ruby
Fredrich010 has quit [Ping timeout: 240 seconds]
elektronaut has joined #ruby
hxegon has quit [Ping timeout: 245 seconds]
Rickmasta has quit [Ping timeout: 245 seconds]
dlitvak has quit [Ping timeout: 260 seconds]
Shidash has joined #ruby
dlitvak has joined #ruby
kitallis has quit [Ping timeout: 245 seconds]
Fredrich010 has joined #ruby
DanKnox[away] is now known as DanKnox
joonty has quit [Quit: joonty]
sankaber has quit [Remote host closed the connection]
cookiez has joined #ruby
leslie has quit [Ping timeout: 245 seconds]
sankaber has joined #ruby
The_Phoenix has joined #ruby
Rickmasta has joined #ruby
malconis has joined #ruby
kitallis has joined #ruby
leslie has joined #ruby
leslie has quit [Changing host]
leslie has joined #ruby
jpfuentes2 has joined #ruby
rsc___ has quit [Quit: rsc___]
m3_del has joined #ruby
tagrudev has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
stannard has joined #ruby
johnny56 has joined #ruby
chouhoulis has joined #ruby
IrishGringo has joined #ruby
joonty has joined #ruby
m3_del has quit [Remote host closed the connection]
stannard has quit [Remote host closed the connection]
hxegon has joined #ruby
stannard has joined #ruby
jpfuentes2 has quit [Ping timeout: 250 seconds]
babblebre has joined #ruby
devbug has joined #ruby
Tempesta has quit [Ping timeout: 260 seconds]
dlitvak has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
dorei has joined #ruby
<dorei>
hello
duckpuppy has quit [Ping timeout: 260 seconds]
astrobunny has quit [Remote host closed the connection]
<dorei>
i want to produce unique filenames for urls, i've used Base64::encode64(url) but the output isnt that suitable for filename
devbug has quit [Ping timeout: 264 seconds]
cdg has quit [Remote host closed the connection]
duckpuppy has joined #ruby
futilegames has quit [Ping timeout: 245 seconds]
banister has joined #ruby
cdg has joined #ruby
ddubs has joined #ruby
mallu has joined #ruby
cdg has quit [Remote host closed the connection]
<toretore>
dorei, md5, sha?
Synthead has joined #ruby
amoeba has joined #ruby
<adaedra>
dorei: hexdigest.
Meliodas has joined #ruby
Authenticator has joined #ruby
cdg has joined #ruby
<adaedra>
I guess a good idea would be to generate UUIDs for your files, tho.
shredding has joined #ruby
scottstamp has joined #ruby
<dorei>
wouldnt it be an overkill to use a cryptohash?
ELLIOTTCABLE has quit [Ping timeout: 264 seconds]
Ishido has quit [Ping timeout: 260 seconds]
tesuji has quit [Ping timeout: 246 seconds]
<adaedra>
md5 is pretty quick, especially for the small string you have.
ElSif has quit [Read error: Connection reset by peer]
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
I has joined #ruby
nixmaniack has joined #ruby
nixmaniack has quit [Changing host]
nixmaniack has joined #ruby
ELLIOTTCABLE has joined #ruby
I is now known as Guest90673
zapata has quit [Ping timeout: 240 seconds]
ElSif has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<darix>
adaedra: while uuid based file names might be good. you would need to maintain a hash for url <=> filename no?
axl_ has joined #ruby
<adaedra>
yes
mary5030 has joined #ruby
cdg has quit [Remote host closed the connection]
whippythellama has quit [Ping timeout: 240 seconds]
<dorei>
in my specific case i only want to have url => filename, not both ways
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
if our filesystems would allow arbitrarily long filenames, you could just use the url itself as name :D
futilegames has joined #ruby
mary5030 has quit [Remote host closed the connection]
Ishido has joined #ruby
mkosaki has joined #ruby
norc has quit [Ping timeout: 252 seconds]
karapetyan has quit [Remote host closed the connection]
Cantaberry has quit [Ping timeout: 260 seconds]
speaking1ode has quit [Ping timeout: 246 seconds]
zapata has joined #ruby
cjbottaro has joined #ruby
<darix>
apeiros: with a s|/|_|g
<darix>
dorei: i would use sha256sum on the url and use that
tejasmanohar has quit [Ping timeout: 264 seconds]
nhhagen has quit [Remote host closed the connection]
<apeiros>
darix: I'd use an encoding system. like % encoding.
<darix>
i claim that hashing will probably be faster than url encode the url again ;)
dhollinger has joined #ruby
patdohere has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
<apeiros>
given that a couple of hashing algorithms have hardware support, you might even be right
whippythellama has joined #ruby
<apeiros>
without, I'd say % encoding is faster
yardenbar has quit [Ping timeout: 260 seconds]
shredding has quit [Remote host closed the connection]
<apeiros>
% encoding is a single loop with a single jmp
<apeiros>
hard to beat that
tejasmanohar has joined #ruby
<dorei>
maybe base64::encode64 and then removing that illegal character at the end would be faster
<apeiros>
only thing which can be expensive is if you don't want to allocate url.bytesize*3 - if you allocate too little, then you may have to realloc.
<apeiros>
darix: damn you! now I want to write a % encoder in C and see how it fares against openssl's md5/ssh256
moeabdol has joined #ruby
tenderlove has joined #ruby
sepp2k has quit [Quit: Leaving.]
patdohere has quit [Read error: Connection reset by peer]
hxegon has quit [Ping timeout: 240 seconds]
lubarch has joined #ruby
PlasmaStar has quit [Ping timeout: 264 seconds]
Krazypoloc has joined #ruby
* Krazypoloc
pokes head in
arup_r has quit [Remote host closed the connection]
* adaedra
grabs Krazypoloc and throw him•her in the channel
<adaedra>
hi!
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dorei>
Base64::strict_encode64 instead of Base64::encode64 did the trick :)
PlasmaStar has joined #ruby
<jhass>
apeiros: write it in crystal :P
gregf has quit [Quit: WeeChat 1.3]
tildes has joined #ruby
<apeiros>
jhass: you can translate it easily.
wldcordeiro has quit [Quit: WeeChat 1.3]
<apeiros>
got to way a bit until I can go home and got nothing better to do, so I'll give it a shot :D
wldcordeiro has joined #ruby
stamina has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
<adaedra>
apeiros: so, never?
<apeiros>
o0
RegulationD has joined #ruby
DexterLB has joined #ruby
skade has joined #ruby
<adaedra>
You're always busy!
<yorickpeterse>
I think that's called having a jeb
<adaedra>
THEY TOOK OUR JEBS
wldcordeiro has quit [Read error: Connection reset by peer]
jpfuentes2 has joined #ruby
wldcordeiro has joined #ruby
gregf has joined #ruby
krzkrzkrz has quit [Ping timeout: 260 seconds]
atomical_ has joined #ruby
nixmaniack has quit [Remote host closed the connection]
asmodlol has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Read error: Connection reset by peer]
jpfuentes2 has quit [Ping timeout: 240 seconds]
hxegon has joined #ruby
IrishGringo has joined #ruby
asmodlol has joined #ruby
duckpuppy has quit [Ping timeout: 256 seconds]
aganov has quit [Remote host closed the connection]
TheBloke has quit [Read error: Connection reset by peer]
<yorickpeterse>
DEY TUK ER JERBS
baweaver has joined #ruby
pdoherty has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
krzkrzkrz has joined #ruby
ethe has joined #ruby
huyderman has quit [Ping timeout: 246 seconds]
diegoviola has quit [Ping timeout: 264 seconds]
supermarin has joined #ruby
amit__ has joined #ruby
djstorm has joined #ruby
weemsledeux has joined #ruby
kriskropd has quit [Ping timeout: 260 seconds]
<amit__>
dear folks I have two timestamp values that I want to find the time difference between them within a ruby code? any idea how can i achieve this. here is the paste bin with ruby code within logstash http://pastebin.com/SJStz5RF
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
neonalpine has joined #ruby
asmodlol has quit [Ping timeout: 250 seconds]
mikecmpbll has quit [Ping timeout: 246 seconds]
<amit__>
dear folks I have two timestamp values that I want to find the time difference between them within a ruby code? any idea how can i achieve this. here is the gist post with my ruby code within logstash https://gist.github.com/83386642c2c258633af7
<darix>
amit__: if your time fields are strings then just DateTime.strptime(...) with the right format string
<darix>
then you can compare them
<amit__>
okay will not repeat it, all thank you for response, new to ruby: I am googling what ri:Time is , and yes my timestamp is a string field with content like: "November 7th 2015, 21:13:44.000"
baweaver has quit [Remote host closed the connection]
<jhass>
apeiros: in crystal you could've used a macro!
<apeiros>
jhass: then go and use a macro!
<toretore>
orion, what does "doesn't run" mean exactly?
nerium has joined #ruby
<orion>
toretore: It means that the code within the block does not execute.
mary5030 has joined #ruby
Guest90673 has quit [Quit: Leaving]
asmodlol has quit [Ping timeout: 240 seconds]
dopie has joined #ruby
<toretore>
oh
<amit__>
dear folks: I am trying to convert this timestamp value into DateTime but not successful any help is appreciated: start="November 7th 2015, 16:35:31.000" end="November 8th 2015, 18:35:31.000" but DateTime.parse(start) results in => #<DateTime: 212313674131/86400,0,2299161> but not a time value ...any idea what is wrong?
ledestin has joined #ruby
<toretore>
strptime
<jhass>
amit__: "not a time value"? What do you expect?
<amit__>
jhass: start has a string and for me to be able to subtract to time i need them in a format the will work ..
<amit__>
apeiros: let me try that
<apeiros>
amit__: but note that ::parse should only be used if you *don't know* the format. if you know the format, use ::strptime
<jhass>
that sentence didn't parse for me
<jhass>
?xy amit__
<ruboto>
amit__, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<apeiros>
I think we have a problem of misunderstanding inspect output
[Butch] has joined #ruby
<apeiros>
amit__: you realize that what you see in irb/pry is the result of obj.inspect, yes?
<apeiros>
and that your result is of type DateTime, which means a date + time, which supports DateTime#- just fine too…
TheHodge has joined #ruby
andikr has quit [Remote host closed the connection]
mary5030 has quit [Ping timeout: 256 seconds]
<amit__>
I apologize, for my naive questions as I am getting used to ruby terminology. In short I have time stamp as start="November 7th 2015, 16:35:31.000" end="November 8th 2015, 18:35:31.000" and I want to find the elapsed time in hours or minutes between these two time values and i don't know how to do that yet in ruby.
kobain has joined #ruby
<apeiros>
amit__: first step is to convert it into either a Time or a DateTime instance. you did that using DateTime.parse
<apeiros>
amit__: and now you use DateTime#- to find the difference:
* apeiros
still thinks ::parse is the wrong tool, though. use strptime.
<jhass>
agreed, I was just too lazy to type up the format string :P
<amit__>
apeiros, jhass: that is helpful I guess you gave me the solution, let me try that and see if works for what i am trying in logstash ..thank you!!
rodfersou has quit [Quit: leaving]
<apeiros>
hrm
<apeiros>
there's no constant which notes the max length of ruby strings…
mary5030 has joined #ruby
<jhass>
is there one?
mark4 has quit [Quit: Leaving.]
<amit__>
apeiros: what is the consequence of using ::parse instead of ::strptime when I already know the format?
Mon_Ouie has joined #ruby
brunto has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
skade has joined #ruby
<apeiros>
amit__: the difference is that with .parse you pray and hope that ruby thinks the same about the format as you
<apeiros>
with .strptime you a) get an error if the input does not fit the format, and b) it is using the correct format
Jackneill has joined #ruby
<adaedra>
May be a bit faster, as there's no detection?
rodfersou has joined #ruby
<apeiros>
that probably too
Cantaberry has joined #ruby
<amit__>
apeiros: fair enough, I will learn how to use ::strptime thank you for your insight.
supermarin has quit [Remote host closed the connection]
<apeiros>
and strptime is now implemented in C, fairly fast.
<amit__>
i see :)
ta has joined #ruby
devyn has joined #ruby
<apeiros>
ok, I guess maximum string length in ruby is LONG_MAX
maloik_ has joined #ruby
asmodlol has joined #ruby
Ishido has joined #ruby
<apeiros>
hm
maloik has quit [Ping timeout: 245 seconds]
<apeiros>
havenwood: does rvm use your precompiled ruby by any chance?
<apeiros>
yeah, I'm ancient. it didn't work without in olden times…
hobodave_ has joined #ruby
<darix>
apeiros: tbh ... sha256 is fast enough. ;)
<apeiros>
I noticed because of "LDFLAGS"=>"-L. -L/Users/haven/.sm/pkg/active/lib
<shevy>
hehe
<apeiros>
darix: nothing is ever fast enough!
<apeiros>
I'm 3 times faster than fast enough!!!!!!!!1!elf!
<adaedra>
No, but there are things that are too fast.
devyn has joined #ruby
<darix>
apeiros: that's only because you are bending space and time. ;)
ruby-lang866 has joined #ruby
synthroid has joined #ruby
nerium has quit [Quit: nerium]
ruby-lang352 has joined #ruby
<ruby-lang866>
hello ruby
jas02 has quit [Quit: jas02]
<ruby-lang352>
hu
<ruby-lang866>
hu hu hu
orion has left #ruby [#ruby]
shredding has quit [Ping timeout: 250 seconds]
underplank has joined #ruby
hobodave has quit [Ping timeout: 240 seconds]
joonty has quit [Quit: joonty]
<shevy>
are you two the same
supermarin has joined #ruby
<apeiros>
darix: that's not against the rules! (if you bend those too…)
moeabdol has quit [Ping timeout: 272 seconds]
<ruby-lang866>
hu me not same
SCHAAP137 has joined #ruby
ruby-lang866 has quit [Client Quit]
devbug has joined #ruby
devyn has quit [Ping timeout: 244 seconds]
mostlybadfly has quit [Quit: Connection closed for inactivity]
krzkrzkrz has quit [Read error: Connection reset by peer]
devyn has joined #ruby
jbrhbr has quit [Quit: Leaving.]
skade has quit [Read error: Connection reset by peer]
banister has quit [Read error: Connection reset by peer]
moeabdol has joined #ruby
akem has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
ruby-lang352 has quit [Ping timeout: 252 seconds]
saneax is now known as saneax_AFK
nixmaniack has joined #ruby
nixmaniack has joined #ruby
akem has joined #ruby
kp666 has quit [Quit: Leaving]
baweaver has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
pietr0 has joined #ruby
c355E3B has joined #ruby
supermarin has quit [Remote host closed the connection]
govg has joined #ruby
saddad has joined #ruby
baweaver has quit [Ping timeout: 250 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
underplank has quit [Quit: underplank]
futilegames has quit [Quit: futilegames]
underplank has joined #ruby
supermarin has joined #ruby
djbkd has joined #ruby
mostlybadfly has joined #ruby
supermarin has quit [Remote host closed the connection]
axl_ has quit [Ping timeout: 240 seconds]
skade has joined #ruby
cdg has joined #ruby
ta has quit [Remote host closed the connection]
devbug has joined #ruby
djbkd has quit [Ping timeout: 256 seconds]
B1n4r10 has joined #ruby
nerium has joined #ruby
snockerton has joined #ruby
DoubleMalt has quit [Ping timeout: 246 seconds]
centrx has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
bronson has joined #ruby
nibbo has joined #ruby
joliss has joined #ruby
axl_ has joined #ruby
The_Phoenix has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
centrx has quit [Remote host closed the connection]
cats has joined #ruby
Macaveli has joined #ruby
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
Macaveli has quit [Client Quit]
ogpastaling has joined #ruby
yalue has joined #ruby
nixmaniack has quit [Ping timeout: 256 seconds]
TDJACR has quit [Ping timeout: 260 seconds]
nofxx has joined #ruby
nofxx has quit [Changing host]
nofxx has joined #ruby
nixmaniack has joined #ruby
sepp2k has joined #ruby
RegulationD has quit [Remote host closed the connection]
Rumbles has quit [Ping timeout: 260 seconds]
saneax_AFK is now known as saneax
moeabdol has quit [Quit: WeeChat 1.3]
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
mary5030_ has joined #ruby
eljimmy has joined #ruby
kirun has joined #ruby
supermarin has joined #ruby
supermarin has quit [Remote host closed the connection]
supermarin has joined #ruby
yokel has quit [Ping timeout: 246 seconds]
yokel has joined #ruby
jpfuentes2 has joined #ruby
jgt1 has quit [Ping timeout: 260 seconds]
supermarin has quit [Remote host closed the connection]
bronson has joined #ruby
supermarin has joined #ruby
jbrhbr has joined #ruby
opitka has quit [Quit: Leaving]
nixmaniack has quit [Ping timeout: 250 seconds]
dmolina has quit [Ping timeout: 245 seconds]
duckpuppy has joined #ruby
Encapsulation has joined #ruby
TDJACR has joined #ruby
jpfuentes2 has quit [Ping timeout: 272 seconds]
zast has joined #ruby
nixmaniack has joined #ruby
Caius has joined #ruby
j2p2test has joined #ruby
SenpaiSilver has joined #ruby
bap1313 has joined #ruby
pdoherty has quit [Ping timeout: 250 seconds]
<amit__>
dear folks: i am a bit stuck here: end_date = "November 8th 2015, 18:35:31.000"; and here is equivalent parse DateTime command yd = DateTime._strptime(end_date,"%B %d?th? %Y, %H:%M:%S??offset??")
supermarin has quit []
karapetyan has joined #ruby
<amit__>
what i am missing is how to capture 8(th) the th in the 8th and the offset time after the seconds?
jpfuentes2 has joined #ruby
christiandsg has joined #ruby
Snowy has joined #ruby
nixmaniack has quit [Ping timeout: 256 seconds]
nixmaniack has joined #ruby
pdoherty has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
colleenmcguckin has joined #ruby
howdoicomputer has joined #ruby
Snowy has quit [Remote host closed the connection]
berserk_ren has joined #ruby
baweaver has joined #ruby
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
yardenbar has joined #ruby
allcentury has joined #ruby
<apeiros>
fascinating. there doesn't seem to be a format which includes the ordinal suffix.
<allcentury>
! 1 + 1
<allcentury>
how do I execute ruby in here [again] ?
baweaver has quit [Remote host closed the connection]
n1x has joined #ruby
zarubin has joined #ruby
nixmaniack has quit [Ping timeout: 250 seconds]
<apeiros>
>> 1+1 # but don't use it for experiments
<apeiros>
amit__: ok, the solutions with ordinals are sufficiently ugly that I'd say go with DateTime.parse
jessemcgilallen has joined #ruby
<apeiros>
allcentury: your full match is identical to your first capturing group
<apeiros>
and matches[0] returns the full match, matches[1] returns the first capturing group
<apeiros>
&ri MatchData#[] @allcentury
<`derpy>
method `MatchData#[]`: Match Reference -- MatchData acts as an array, and may be accessed using the nor… • http://rubydoc.info/stdlib/core/MatchData#%5B%5D-instance_method
barhum2013 has joined #ruby
linduxed has quit [Quit: WeeChat 1.3]
<apeiros>
allcentury: in general it's a *capital* idea to just go and read the docs when stuff does not behave the way you expected it.
<allcentury>
ooOOoooo
<allcentury>
thanks apeiros that makes sense
yardenbar has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
n1x has quit [Remote host closed the connection]
<apeiros>
the remaining question of course is why on earth you have a capturing group which spans the full expression.
babblebre has quit [Quit: Connection closed for inactivity]
<EthanAllen>
I would like to bring Nigger to work with me. I feel bad that he stays home every day.
<drbrain>
!ban EthanAllen !P
EthanAllen was kicked from #ruby by ChanServ [User is banned from this channel]
moeabdol has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dlitvak has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
nixmaniack has joined #ruby
belak has joined #ruby
<mfqr>
Confused !P for :P.
dhollinger has quit [Ping timeout: 240 seconds]
<drbrain>
similar sentiment
myztic has quit [Quit: leaving]
pyoor has quit [Remote host closed the connection]
<apeiros>
stupid troll is stupid.
devoldmx has joined #ruby
<hardlin3r>
is ruby dying?
<apeiros>
are you a troll?
<shevy>
haha
<hardlin3r>
no
<hardlin3r>
just asking
<hardlin3r>
im newbie
<apeiros>
ok. no. ruby isn't dying. happy now?
dlitvak has joined #ruby
<hardlin3r>
should i trust you?
<apeiros>
I dunno, should I trust you not being a troll?
<hardlin3r>
i dunno, how can i prove you?
lemur has joined #ruby
baweaver has quit [Ping timeout: 256 seconds]
lemur has quit [Remote host closed the connection]
<hardlin3r>
i know "autovivification" word
peterhil_ has quit [Ping timeout: 246 seconds]
<hardlin3r>
but it doesnt prove that im not a troll
arup_r has quit []
timonv has quit [Ping timeout: 260 seconds]
<apeiros>
hardlin3r: define what "a language is dying" means, find numbers for those metrics, figure out yourself. you can't trust anybody in here. we're all biased.
devoldmx has quit [Ping timeout: 256 seconds]
Meow-J has quit [Quit: Connection closed for inactivity]
<apeiros>
(but then again - why'd you trust those "sources" for your numbers in the internet…)
<hardlin3r>
you are right, i cant trust anybody
jas02 has joined #ruby
<apeiros>
which then bears the question: why did you ask in the first place? an answer you can't trust is meaningless…
nixmaniack has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
<drbrain>
we're all dying slowly, and so will all we've built
<drbrain>
so all languages are dying
dman777_alter has joined #ruby
edwinvdgraaf has joined #ruby
RegulationD has joined #ruby
qhartman has joined #ruby
anisha has joined #ruby
yardenbar has joined #ruby
yalue has quit [Quit: return 0;]
<amit__>
apeiros: that is interesting that it does not include "ordinal suffix" interesting term. Can you please help me make sense if this is right? start_date = "November 7th 2015, 16:35:31.000"; end_date = "November 8th 2015, 18:35:31.000"; (DateTime.parse(end_date)- DateTime.parse(start_date)) / 60
<amit__>
apeiros: result of that is => Rational(13, 720) which I cannot make sense out of
babblebre has joined #ruby
<dman777_alter>
can you do a assignment with a or operation? foo = bob[apple] or foobar
myztic has joined #ruby
hobodave has joined #ruby
karapetyan has joined #ruby
<toretore>
>> bar = false; baz = true; foo = bar or baz; foo
<Ad-ever>
) F r ; { g i 3 h / [ K f ` E / K ~ * ? b J + W | O k 7 r - o B o O : Q f $ ` | A n [
<Ad-ever>
Z l P v ( T @ {
<Ad-ever>
I > w V u , g D n 9 g e R T # ) \ V 3 L w Z t & C E i y G Y N y v D g * q k 3 i 9 0 % v
<Ad-ever>
o I ; Z P ! * Y |
<havenwood>
!mute Ad-ever
<Ad-ever>
y Q D L g $ n N L W N A j O T @ ^ ] / ( ; = w _ a ~ ^ < H , _ U 3 @ ~ ] w @ n Y ` ] :
Ad-ever has left #ruby [#ruby]
Adever has joined #ruby
dionysus69 has quit [Remote host closed the connection]
<Adever>
i think this excited...... GENITAL WARTS! maybe. it is sacd. i think this a game - NFL just this a joke
<Adever>
you do you and he who's 23 and is gettingle one partied forbin shit. what does the korn blair witch end old. no then your peace. Raise you so each for preside of 23 and the walk I talking dealing a guy donkey it? i have carpet. if i want pho. Why you run off? he's just invitation. Hi. o god. 23 year olds them like your peace. its too as pressure during with woman right noodle you're talking a
<Adever>
gambler
<Adever>
I won't think and is over $380 miles from spot in human off a French of random rap on the for married
weemsledeux has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
supermar_ has quit [Ping timeout: 250 seconds]
aryaching has quit [Ping timeout: 256 seconds]
n1x has quit [Read error: Connection reset by peer]
prestorium has quit [Quit: Leaving]
nixmaniack has joined #ruby
lubarch has quit [Ping timeout: 240 seconds]
nixmaniack has quit [Read error: Connection reset by peer]
s00pcan has joined #ruby
nixmaniack has joined #ruby
synthroid has quit []
hahuang65 has joined #ruby
supermarin has joined #ruby
radgeRayden_ has joined #ruby
unreal_ has quit [Ping timeout: 260 seconds]
gusrub has quit [Remote host closed the connection]
tildes has joined #ruby
minimalism has joined #ruby
n_blownapart has quit []
radgeRayden has quit [Ping timeout: 245 seconds]
unreal has joined #ruby
vikas027 has joined #ruby
shanemcd has quit [Remote host closed the connection]
<shevy>
hmm... perl is weird to configure from sources: sh Configure -des -Dprefix=/usr -Dvendorprefix=/usr ... via python or ruby, I can use the default ./configure --prefix=/usr
shanemcd has joined #ruby
<adaedra>
?offtopic shevy
<ruboto>
shevy, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
jessemcgilallen has quit [Quit: jessemcgilallen]
yardenbar has quit [Ping timeout: 256 seconds]
pyoor has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Ping timeout: 244 seconds]
supermarin has quit [Remote host closed the connection]
<shevy>
?spam adaedra
<ruboto>
adaedra, I don't know anything about spam
supermarin has joined #ruby
<adaedra>
Problem?
pdoherty has quit [Remote host closed the connection]
n1x has joined #ruby
nixmaniack has quit [Read error: Connection reset by peer]
nateberkopec has joined #ruby
skweek has joined #ruby
ascarter has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
hadees has joined #ruby
yardenbar has joined #ruby
allcentury has quit [Ping timeout: 272 seconds]
quazimodo has joined #ruby
<hadees>
How do you pipe in the contents of a file to a rake task? I want to write a rake task that'll run on heroku but use local data so I was thinking of something like heroku run rake foobar < test.csv
<adaedra>
And that doesn't work?
<adaedra>
Ah wait, `heroku` is a command to run things remotely, isn't it?
prestorium has joined #ruby
<hadees>
adaedra: yeah so it needs to get piped in
<hadees>
it doesn't even work locally or rather I can't figure out how to read in the file line by line
<adaedra>
The file is on your local computer or distant one?
<hadees>
adaedra: local
jbrhbr has quit [Quit: Leaving.]
<imperator>
import ?
<hadees>
adaedra: it also isn't actually a csv file, it's a weird formated file with json on each line
<hadees>
i justed used csv as an example since I figured it would be easier to understand
<adaedra>
I don't know heroku, you'll have to look at the heroku command if you can do that
bronson has quit [Remote host closed the connection]
bronson has joined #ruby
skweek has quit [Ping timeout: 256 seconds]
asmodlol has quit [Ping timeout: 272 seconds]
naftilos76 has quit [Ping timeout: 250 seconds]
barhum2013 has quit [Quit: barhum2013]
christi__ has joined #ruby
sankaber has quit [Write error: Connection reset by peer]
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
allcentury has joined #ruby
asmodlol has joined #ruby
christiandsg has quit [Ping timeout: 265 seconds]
saneax is now known as saneax_AFK
prestorium has joined #ruby
codecop has quit [Remote host closed the connection]
platzhirsch has joined #ruby
prestorium has quit [Remote host closed the connection]
InvGhost has joined #ruby
SCHAAP137 has quit [Ping timeout: 244 seconds]
SleepySensei has quit [Ping timeout: 250 seconds]
astrostl has joined #ruby
asmodlol has quit [Ping timeout: 256 seconds]
Aerillith has joined #ruby
sankaber has joined #ruby
colegatron has quit [Ping timeout: 256 seconds]
supermarin has quit [Remote host closed the connection]
asmodlol has joined #ruby
htmldrum has joined #ruby
iamnix has quit [Ping timeout: 244 seconds]
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
Bellthoven has joined #ruby
last_staff has quit [Quit: last_staff]
<ramfjord>
sup rubyists - I'm trying to convert database loader script/framework I've been working on to using unix pipes to link together the code that iterates over the data source to the code that inserts the data to the DB
christi__ has quit [Read error: Connection reset by peer]
nixmaniack has quit [Read error: Connection reset by peer]
<ramfjord>
I've used marshal for serialization in the past, and like it because it's fast and contains all the metadata I could need
<ramfjord>
but because it's a binary format, it doesn't have newlines
asmodlol has quit [Ping timeout: 250 seconds]
<ramfjord>
I can't process chunks of it at a time
<ramfjord>
any recommendations for some other format? Should I just use JSON?
shanemcd has quit [Remote host closed the connection]
berserk_ren has quit [Ping timeout: 250 seconds]
I has joined #ruby
shanemcd has joined #ruby
shanemcd has quit [Remote host closed the connection]
I is now known as Guest73452
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Channel6 has quit [Ping timeout: 272 seconds]
dlitvak has quit [Remote host closed the connection]
supermarin has joined #ruby
<ramfjord>
hxegon: can you provide a little more context? Do you want everything with a #read or #to_a method to have a #csv_to_hash method that uses that?
colegatron has joined #ruby
dlitvak has joined #ruby
<ramfjord>
if so, then using a mixin module will likely be the solution
prestorium has joined #ruby
<ramfjord>
then instead of re-implementing the method, you would ``include CsvToHash``
<hxegon>
ramfjord: good idea, but I'm just talking about a way to do either #read or if that fails with NoMethodError, use #to_a
underplank has quit [Quit: underplank]
underplank has joined #ruby
tvw has joined #ruby
KensoDev_ has quit [Remote host closed the connection]
<hxegon>
that example works, but it feels like a more idiomatic way should exist
christi__ has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
christiandsg has quit [Ping timeout: 265 seconds]
<ramfjord>
hmmm, you could check if csv.respond_to? :read
<eam>
yeah hm, that does work - I guess I must just not be hitting the gc at all
allcentury has joined #ruby
pandaant has joined #ruby
arooni has joined #ruby
<drbrain>
eam: see also ObjectSpace.count_objects
freerobby1 has joined #ruby
<eam>
I'm trying to debug why this: https://gist.github.com/eam/db9b3e7cd3b42743455b gets slow as it runs. I'm seeing what looks like a linear slowdown as the position advances through the large buf
jbrhbr has quit [Quit: Leaving.]
<eam>
there's no gc activity at all it seems
JDiPierro has joined #ruby
JDiPierro has quit [Remote host closed the connection]
ap4y has joined #ruby
<eam>
if I save the value of "pos" and restart the operation with pos = <saved value> the speed of each loop iteration is just as slow
<eam>
is slice() O(n) WRT the string size of the source?
<eam>
that's very surprising
freerobby has quit [Read error: Connection reset by peer]
DanKnox[away] is now known as DanKnox
<eam>
20MB into the file and each slice() operation is taking over 100ms
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
InvGhost has quit [Ping timeout: 264 seconds]
KensoDev has joined #ruby
devbug has joined #ruby
edwinvdg_ has joined #ruby
<drbrain>
if you have a UTF-8 string, yes slice becomes O(n)
<eam>
ooooooh shoot, is it encoding that's biting me?
<eam>
well that's silly
<drbrain>
yeah, because a character isn't represented by a fixed number of bytes
<eam>
yeah gotcha, I just didn't expect slice to do character ops
<eam>
looooool, the entire operation finishes near instantly now that I've switched read for binread
<eam>
thanks :)
TheHackOps has quit [Disconnected by services]
koneko has quit [Quit: cu]
NotTheFBI has joined #ruby
<eam>
about 13k iterations in time it was taking to do *one* iteration with character semantics
<eam>
which makes sense when the n=55M
Jackneill has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Ping timeout: 256 seconds]
tomchapin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure has quit [Quit: Oops.]
shanemcd has joined #ruby
underplank has quit [Quit: underplank]
<drbrain>
heh
dhollinger has quit [Quit: WeeChat 1.3]
zeroDivisible has quit [Quit: WeeChat 1.3]
underplank has joined #ruby
zeroDivisible has joined #ruby
shanemcd has quit [Ping timeout: 256 seconds]
solocshaw has quit [Ping timeout: 260 seconds]
shanemcd has joined #ruby
iamnix_ has joined #ruby
jbrhbr has joined #ruby
iamnix has quit [Ping timeout: 272 seconds]
kirun has quit [Quit: Client exiting]
cajone has left #ruby [#ruby]
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has quit [Ping timeout: 250 seconds]
atomica__ has quit [Read error: Connection reset by peer]
atomical has joined #ruby
pandaant has quit [Remote host closed the connection]
m3_del has joined #ruby
howdoicomputer has joined #ruby
m3_del has quit [Remote host closed the connection]
Ropeney has joined #ruby
atomical_ has joined #ruby
phillips1012 has quit [Quit: WeeChat 1.2]
floatingpoint has joined #ruby
FooMunki has joined #ruby
chouhoulis has quit [Remote host closed the connection]
phillips1012 has joined #ruby
<floatingpoint>
any thoughts as to why dir.glob("/some/dir/**/*") do |path| .... would hang?
<adaedra>
big list of files?
<floatingpoint>
yes
jessemcgilallen has joined #ruby
houhoulis has joined #ruby
<floatingpoint>
20 - 30k
brunto has quit [Ping timeout: 256 seconds]
<apeiros>
then that. also across filesystems? possibly mounted?
<floatingpoint>
yes across mounted fs
<apeiros>
s/mounted/remote/, sorry
<eam>
floatingpoint: look up 'strace' it will give you a good hint of where time is being spent
<floatingpoint>
ok
<adaedra>
floatingpoint: is `find /some/dir` long too?
diegoviola has joined #ruby
lacuna has quit [Read error: Connection reset by peer]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
atomical has quit [Ping timeout: 256 seconds]
<floatingpoint>
yeah. it's gotta be the NSF mount
<floatingpoint>
thanks
skade has joined #ruby
lacuna has joined #ruby
<eam>
Not Fast Storage
<floatingpoint>
yeah. this is going to take a while
allcentury has quit [Ping timeout: 250 seconds]
mary5030 has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
lxsameer has quit [Quit: Leaving]
whippythellama has quit [Quit: WeeChat 1.3]
mahk has joined #ruby
jbrhbr has quit [Quit: Leaving.]
axl_ has quit [Quit: axl_]
jimmybomb has joined #ruby
hakunin has joined #ruby
roshanavand has quit [Remote host closed the connection]
<jimmybomb>
hey guys, im building a web api, is it okay for one api controller to use multiple services ?, eg ProductController has ProductService and CoffeeService and use them both? or is ths considered as a smell? (is it ok for controller to have some business logic?)
ESpiney has quit [Read error: Connection reset by peer]
<toretore>
?rails jimmybomb
<ruboto>
jimmybomb, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<toretore>
(answer is probably yes, it's ok)
_stu_ has quit [Quit: _stu_]
nhhagen has joined #ruby
jbrhbr has joined #ruby
<jimmybomb>
ok thanks
tomchapin has joined #ruby
djbkd_ has joined #ruby
ascarter has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
skade has quit [Quit: Computer has gone to sleep.]
NeverDie_ has quit [Ping timeout: 240 seconds]
__fps__ has quit [Quit: Leaving]
asmodlol has quit [Quit: Leaving]
TheBloke- has quit [Read error: Connection reset by peer]
<hxegon>
hunter7
<adaedra>
********
<hxegon>
all I see is ************
facereghelp has joined #ruby
<facereghelp>
howdy folks.
Coldblackice has quit [Read error: Connection reset by peer]
TheBloke has joined #ruby
<facereghelp>
need some help with some software im trying to figure out/write up.
<facereghelp>
i like to write up a facial recognition program, but not in a traditional sense.
<jbrhbr>
i also tend to prefer non-traditional faces
<facereghelp>
normally, you feed in an image to the program, and it will tell you, this person is X. this person is Y. rather than identify people's face, I want the program to lock that person's face into an instance.
Tempesta has joined #ruby
<facereghelp>
that way, if this person's face ever shows up again, it'll throw an error saying something like this face is already here.
shellie_ has joined #ruby
<facereghelp>
any ideas/suggestions?
<jbrhbr>
ignoring the fact that it's not clear to me what this has to do with ruby, why don't you just resolve it downstream?
<facereghelp>
what do you mean?
<jbrhbr>
your recognition system outputs the recognized faces no matter what, and your conflict resolution system consumes this info and manages conflicts
mary5030_ has joined #ruby
Unicorn| has joined #ruby
Coldblackice has joined #ruby
<facereghelp>
I'm afraid I don't understand
Spami has joined #ruby
<baweaver>
This isn't something that can or should be done in ruby