<pontiki>
everyone seems to want to learn rails (which i don't mind so much) but a book like that, about learning ruby to solve your own problems, i think is a much better into to the language
simplyianm has joined #ruby
<miah>
agreed
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bruno- has quit [Ping timeout: 276 seconds]
<volty>
pontiki: absolutely !
<andywojo>
I'm really awesome at ruby sysadmin type scripts, like I've done some pretty gnarly automation working with large datasets and complex stuff but... I cannot for the life of me wrap my head around rails / webdev
pragmatism has joined #ruby
<pontiki>
learning how to systematically and *practically* solve problems is the essence of programming and the craft of software, to me
<miah>
i have written a bunch of nagios/sensu checks. started out with mixlib-shellout and such but i've learned option parser pretty well now
CloCkWeRX has joined #ruby
<pontiki>
yeah
<miah>
thor is neat too, used that a few times
<volty>
so many people think that programming could be learn the way they learned their phones, touching & clicking
<pontiki>
i've been using thor a lot lately
<volty>
learned
<miah>
but option parser is stdlib so its easy to grab
<pontiki>
it is
<pontiki>
just basically good to know
<miah>
ya
<pontiki>
copeland
<pontiki>
oops
<pontiki>
copeland's gems are kinda nifty, too, but i've moved away from them
cabreraM516 has joined #ruby
<miah>
which ones?
<pontiki>
methadone and GLI
<miah>
oh i used gli while reading the book
<miah>
but never again
BanzaiJoe has quit [Ping timeout: 265 seconds]
<pontiki>
for the scripts i've done that are that multi-command thing, i like thor better
<miah>
i usually just 'bundle gem <foo>' and work from there
stardiviner has joined #ruby
<miah>
otherwise methadone looks neat
<miah>
i am hacking some ldap management tools, have a ton of cli options and environment variables to deal with
cabreraM516 has quit [Client Quit]
* pontiki
nods
<miah>
been hard to be... concise? with option parser
<pontiki>
i decided methadone put too much emphasis on testing via the command line
<miah>
ah
<miah>
i just write units with minitest
oo___ has joined #ruby
<pontiki>
right
<miah>
argv is just an array, easy to pass in what you want without actually having to ./foo.rb
<pontiki>
yep
<episage>
Is it possible to convert a struct to an array?
<pontiki>
if you write a to_a method for it
<volty>
everything could be converted to an array
<episage>
ok but there is no automatic mechanism so i have to write to_a as pontiki sugessted
<drdave>
RickHull: rplot is the one used by the code...
<drdave>
but it seems terminally broken...
sharpmachine has joined #ruby
<drdave>
or more exactly, the install is...
<drdave>
i spent a while trying to figure why it wasn’t detecting the lib and i’m about to give up
yqt has quit [Ping timeout: 246 seconds]
<RickHull>
did you install the prereqs?
<drdave>
i’ll have a look at ruby-gsl, but i’m afraid it’s more science functions than graphics...
eggoez has joined #ruby
<drdave>
oh, i did… but for whatever reason, it just won’t find them… looked at the extconf.rb and it is definitely looking at the right lib dir
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<drdave>
i’m starting to suspect that the routine it is looking for might not even exist any more (libplot doc tells me it is legacy but still provided…)
jpfuentes2 has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
sharpmachine has quit [Ping timeout: 250 seconds]
ItSANgo has quit [Ping timeout: 252 seconds]
fgo has joined #ruby
hahuang65 has joined #ruby
j4cknewt has joined #ruby
hahuang65 has quit [Client Quit]
jwaldrip_ has joined #ruby
hahuang65 has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
fujimura has joined #ruby
quimrstorres has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
deric_skibotn has quit [Ping timeout: 252 seconds]
ItSANgo has quit [Max SendQ exceeded]
ItSANgo has joined #ruby
kahuna_ has joined #ruby
kLooaa has joined #ruby
<kLooaa>
Do you realize that basically after age 20 your body starts rotting, being worse and worser at everything? and that includes your brain too? you will eventually be stupid and naive just like children. or worse - you can get alzheimer's disease. If you are alive now, I guarantee you that you will die eventually. And it can be really painful dying. Just read news or statistics how many people die in what ways DAILY. You will become one of them eventually. One
<kLooaa>
of that statistics number. nothing more.
platzhirsch has left #ruby [#ruby]
<kahuna_>
kLooaa: dont you think that's looking at the cup as half empty?
<kLooaa>
kahuna_: thats looking at reality
<kLooaa>
without purple glasses on
<kahuna_>
kLooaa: reality is how you precieve it
<kLooaa>
I perceive it without FILTERS and brainwashing
<kLooaa>
im external oberver
<kahuna_>
ok
<kLooaa>
and I look at people, they suffer
<RickHull>
brainwashing prevents alzheimers. you just gotta hose it down every once in a while
<kahuna_>
And others enjoy an incredible life
drewo has quit [Ping timeout: 276 seconds]
ItSANgo has quit [Max SendQ exceeded]
francoi__ has joined #ruby
shazaum_ has quit [Quit: Leaving]
jwaldrip_ has quit [Quit: Be back later ...]
milesmatthias has joined #ruby
ItSANgo has joined #ruby
<kLooaa>
kahuna_: until they have horrible accident or get old
<kLooaa>
its only temporary
<shevy>
well you always have filters, all the time
<kLooaa>
eventually all humans end very badly
<kLooaa>
shevy: I destroyed filters
<shevy>
your own perception filters information or how your own brain tricks you; remember those eye-tricks about 3D vs. 2D sketches
<RickHull>
no shevy, kLooaa is beyond filters
<RickHull>
he perceives reality directly and is here to tell us about it
davedev24_ has quit []
<shevy>
he is a limited system
<shevy>
without food he could not even type
symm- has quit [Ping timeout: 276 seconds]
<kLooaa>
shevy: Yes but I was talking about THINKING filters
<kLooaa>
not seeing filters
<shevy>
illusions
<kLooaa>
people are optimistic
<shevy>
the river of DNA goes on and on
<kLooaa>
so they see bad things as good
<RickHull>
what bad things do you see as good, kLooaa?
ItSANgo has quit [Max SendQ exceeded]
<kLooaa>
RickHull: NOT ME. humans
<RickHull>
oh right
<RickHull>
what are you then?
ItSANgo has joined #ruby
francoi__ has quit [Ping timeout: 276 seconds]
<kLooaa>
RickHull: observer
milesmatthias has quit [Ping timeout: 276 seconds]
<RickHull>
do you have blood? is it pumped by a heart?
<shevy>
he is a pessimist
<shevy>
so he has a filter that downgrades input
idafyaid has joined #ruby
<kLooaa>
RickHull: I hate it
<kLooaa>
shevy: input is so shitty, doesnt need to downgrade it more
ItSANgo has quit [Max SendQ exceeded]
<shevy>
but you filter it, all the time
<shevy>
you don't have all objective information given to you in the first case
<shevy>
like if you are short-sighted
<shevy>
and everything is a blur
<drdave>
does anyone have experience using mkmf?
ItSANgo has joined #ruby
<kLooaa>
I have much more than others
<drdave>
this is driving me a bit bonkers…
<kLooaa>
others just ignore their death and suffering
<drdave>
lib most definitely have binding (i created a test C project that links and uses it fine), but ‘have_library(‘lib’, ‘func’) returns false for anything but main
<drdave>
any tip on how i could debug that?
<drdave>
(i suppose the only explanation is that somehow it is not finding the right library)
podman has quit [Quit: Connection closed for inactivity]
<kLooaa>
drdave: Do you realize that basically after age 20 your body starts rotting, being worse and worser at everything? and that includes your brain too? you will eventually be stupid and naive just like children. or worse - you can get alzheimer's disease. If you are alive now, I guarantee you that you will die eventually. And it can be really painful dying. Just read news or statistics how many people die in what ways DAILY. You will become one of them eventua
<kLooaa>
lly. One of that statistics number. nothing more.
<sevenseacat>
!mute kLooaa
stryek has quit [Quit: leaving]
ItSANgo has quit [Max SendQ exceeded]
<sevenseacat>
bye now.
<drdave>
thanks
balazs has quit [Remote host closed the connection]
psy_ has joined #ruby
ItSANgo has joined #ruby
kahuna_ has quit [Ping timeout: 276 seconds]
<hoelzro>
drdave: which OS are you on? what library is mkmf failing to find?
<drdave>
hoelzro: OSX and libplot
<drdave>
it’s definitely there...
<hoelzro>
drdave: is libplot installed to /usr/local?
<drdave>
and it actually finds it (or at least returns true for the ‘main’ binding)
<drdave>
yup
<hoelzro>
that's probably why
<drdave>
how so?
Spami has joined #ruby
ItSANgo has quit [Max SendQ exceeded]
<drdave>
if it did not find it at all, i would indeed suspect a path issue (but i’m setting it)
<hoelzro>
I'm not an OS X expert, but I'm guessing /usr/local/include is not in the default ld search path
<hoelzro>
drdave: it finds main because main is a symbol in the test program
<hoelzro>
it doesn't come from libplot
<drdave>
I have a LIB_DIRS = [ ‘/usr/local/lib’] in there
<hoelzro>
hmm
<drdave>
shouldn’t it only look for main *in* the library?
<drdave>
i thought that was what the doc said...
ItSANgo has joined #ruby
<drdave>
otherwise what would be the point of have/find_library(‘lib’, nil)?
<hoelzro>
drdave: usually how those programs work is they compile something like this:
robbyoconnor has quit [Quit: Konversation terminated!]
<ponga>
so gsub is versatile one
<eam>
yeah gsub uses regex, the others do not
Ox0dea has joined #ruby
<haasn>
I'm not very familiar with ruby. I found a project on the internet that I would like to modify, but I can't figure out how to test my changes. I can use `gem build project.gemspec` in order to successfully build the project (and I can also use `rake` to.. do something. There's a Rakefile. Seems to be some kind of test framework?), but I can't figure out how to run the project now that I've build it (and
<haasn>
produced a .gem file)
<damien1>
shevy: unfortunately it doesn't.. O.o
<shevy>
why not
<damien1>
I must have mistyped something
<damien1>
one sec
<haasn>
Is it possible to run the project without having to install it first?
braincrash has joined #ruby
<shevy>
did it not remove all 's in the example string above
<shevy>
haasn you have built a .gem file
houhoulis has joined #ruby
<shevy>
that is like an archive
<shevy>
now you must install it
<eam>
haasn: run rake -T
<shevy>
e. g. gem install ./name-of-gem-file-here.gem
mdz_ has quit [Remote host closed the connection]
<ponga>
thank you shevo i was going to tell him exact same thing
baweaver has joined #ruby
<eam>
well that's not entirely true
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
<eam>
odds are it has tests he can run before installing the gem
<haasn>
eam: Ah, useful; there's `rake build`, `rake install`, `rake install:local`, `rake release` and `rake spec`; but apparently nothing like `rake run` :(
<eam>
haasn: spec is a testing framework, give that a spin
krisquigley has quit [Ping timeout: 265 seconds]
mrmargolis has quit [Remote host closed the connection]
<haasn>
eam: Yeah that seems to work well enough, I guess what I should be doing is modifying the spec file to add tests for the new functionality I'm adding, so I can test it through `rake spec`?
<damien1>
shevy: it works in IRB, but not in my .rb file.. can I pastebin?
<eam>
yes
<shevy>
damien1 gist
<shevy>
not pastebin :D
<shevy>
btw if it works in IRB
<shevy>
then it should work in your .rb file
<haasn>
I would still just really like the ability to just say “hey, run this file for me please” without having to install it into my global/local environment, sort of like running `make && ./binary` but not `make install` in a traditional C program
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
haasn you can provide the path to ruby via e. g. ruby -r
<eam>
haasn: rspec will run the tests on your local source tree
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<haasn>
eam: That works exactly as expected, thanks
mdz_ has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
haasn: if you come from C, consider RUBYLIB as ruby's equiv to LD_LIBRARY_PATH
ItSANgo has quit [Max SendQ exceeded]
baweaver has quit [Ping timeout: 252 seconds]
<haasn>
Right, makes sense. Incidentally, does ruby have something like Cabal's “sandboxes”? where I can just say eg. “cabal sandbox init” and then get a virtual local environment into which I can “cabal install” dependencies without cluttering up my system
<haasn>
(and even “cabal install” the local program itself)
<eam>
yes, bundler and rvm are common tools for that in development
bruno- has joined #ruby
sdothum has quit [Ping timeout: 276 seconds]
<eam>
rvm will help you manage multiple rubies (different versions per project perhaps) and bundler manages gemsets, you'll create a Gemfile for a project outlining exactly the gems to use
j4cknewt has quit [Remote host closed the connection]
penzur has quit [Read error: Connection reset by peer]
<eam>
damien1: @@passage = @@passage.tr()
ItSANgo__ has quit [Max SendQ exceeded]
<eam>
damien1: OR, you can say @@passage.tr!()
<eam>
the version with a ! modifies its receiver, the version without returns a new string with the changes (which you're ignoring)
datanoise has joined #ruby
<damien1>
eam: now it removes any "s"
psy_ has quit [Ping timeout: 264 seconds]
tkuchiki has quit [Remote host closed the connection]
<haasn>
eam: Hmm, unfortunately the RUBYLIB= trick does not work on my server (the machine that I was going to test it on), it only works locally. On the server, it complains about require not being able to find 'json', even though both bundler and gem agree that json is installed just fine; *and* the program works fine when I run it normally (after gem install)!
<eam>
damien1: yeah, tr "abc", "" will remove any a, b or c
<eam>
damien1: you'll need gsub to remove patterns
whippythellama has quit [Quit: WeeChat 1.2]
<damien1>
eam: I used to have that, but still couldn't make it work
<eam>
damien1: share the code?
<Ox0dea>
haasn: Which version of Ruby is your server running?
penzur has joined #ruby
penzur has quit [Read error: Connection reset by peer]
<eam>
haasn: what Ox0dea said, I would guess you have something playing with your environment there
ItSANgo__ has joined #ruby
<haasn>
Ox0dea: 1.8.7 and nothing else
<damien1>
.gsub(/\'s/, "")
<damien1>
eam: .gsub(/\'s/, "")
<haasn>
(The machine on which it works has 1.9, 2.0, 2.1 and 2.2)
<eam>
damien1: same rules as with tr() and tr!(), gsub() and gsub!()
<damien1>
eam: yeah that was good too haha
datanoise has quit [Ping timeout: 245 seconds]
penzur has joined #ruby
<damien1>
eam: Ohh i had "'+s"
jack_rabbit has quit [Ping timeout: 264 seconds]
<eam>
you know, we were talking about gsub being slower than tr, but a good implementation of gsub can be extremely faster than tr in certain datasets
penzur has quit [Client Quit]
<damien1>
thanks y'all <3
<eam>
because gsub doesn't necessarily have to examine every character in the source string, but tr does
penzur has joined #ruby
armyriad has joined #ruby
closer has quit [Ping timeout: 272 seconds]
Koshian has quit [Quit: Tiarra 0.1+svn-39209: SIGTERM received; exit]
closer has joined #ruby
tkuchiki has joined #ruby
gix has quit [Ping timeout: 255 seconds]
CloCkWeRX has joined #ruby
damien1 has quit [Quit: WeeChat 1.1.1]
iamse7en has quit [Quit: I'm out like a black kid in a spelling bee.]
mgorbach has quit [Ping timeout: 276 seconds]
<Ox0dea>
haasn: You have to explicitly require 'rubygems' on 1.8.7.
<Ox0dea>
I take it you're doing that?
sdwrage has quit [Quit: Leaving]
<eam>
supporting 1.8.7 warms my heart
gix has joined #ruby
<Ox0dea>
It's like compiling your C programs with -ansi -pedantic.
<eam>
it's like compiling your C programs with a pre-ansi k&r compiler
<eam>
sorta the same language, but not really
<Ox0dea>
The only differences are syntactic ones, no?
<eam>
I mean, is there a different kind?
<Ox0dea>
What?
<eam>
making a joke, but there's all kinds of crazy changes. Scoping behavior, methods change behavior, added, removed, etc
vikaton has quit [Quit: Connection closed for inactivity]
<eam>
and new syntaxes
<haasn>
How can I figure out what constants something defines? Specifically, Socket::Constants. I can't seem to find documentation on this anywhere
<Ox0dea>
haasn: Socket::Constants.constants
<Ox0dea>
Totally unintuitive, I know. :P
jack_rabbit has joined #ruby
michaeldeol has joined #ruby
<haasn>
Ah, that works - thanks. Strange that ruby-doc doesn't list them anywhere!
<haasn>
(Or maybe I just can't find them)
arquebus has joined #ruby
oo_ has quit [Remote host closed the connection]
mgorbach has joined #ruby
<eam>
haasn: it's a method on Module
<eam>
navigating rubydocs are a bit of a pain as they're organized by class so it's hard to find things implemented by a superclass
<haasn>
Yeah, and also the documentation for the thing that actually needs it (in this case, class IPAddr), doesn't contain so much as a *link* to the definition of the AF_* constants
oo_ has joined #ruby
<haasn>
just literally says “family = Socket::AF_UNSPEC” and that's it. Not clickable either. :(
musgravejw has left #ruby ["Leaving"]
<eam>
haasn: ruby culture isn't very doc oriented, it's very experimentation oriented. Lots of folks rely on stuff like tab completion for API discovery
<haasn>
Ah, okay. That's the complete opposite of what I'm used to :)
<eam>
me too
mistym has joined #ruby
<haasn>
(And doesn't make a lot of sense either, how does experimentation scale to anything past hobby projects?)
<nietzschette>
searching the source code is just as good as docs
yfeldblum has quit [Remote host closed the connection]
<nietzschette>
I wrote a program - metasearch I called it - to scan every file in every lower directory for a key word and return an array of instances of that word. I use it quite often
<haasn>
I'm wondering about what's more idiomatic: The code I'm editing does stuff like Logger.new(config['logfile']), but as I understand it those parentheses are redundant? Why not just write Logger.new config['logfile'] ?
<eam>
haasn: no parens is common
<saadq>
Is there a way to automatically install needed gems when running a ruby program that requires them through terminal?
balazs has joined #ruby
<eam>
method parens aren't redundant with precedence parens, oddly enough
<havenwood>
saadq: In Pry to install then require you can: gem-install foo
<eam>
f(x) is different from f((x)) for various expressions of x
<haasn>
eam: that seems odd, what kind of expressions ‘x’ trigger this?
<havenwood>
saadq: Or do you mean something else by from the terminal? Maybe say more about what you mean?
<haasn>
(stuff like this reminds me of php's crazy parser)
<ruboto>
eam # => /tmp/execpad-67f20c74064c/source-67f20c74064c:2: syntax error, unexpected keyword_true, expecting '( ...check link for more (https://eval.in/383491)
<nietzschette>
could you write a gem installation method in a rescue block?
surs has joined #ruby
<haasn>
eam: As a non-ruby programmer, that makes no sense to me. Isn't “not true” a valid expression on its own?
<eam>
pretty sure it's a bug
sleungcy has joined #ruby
<nietzschette>
!true
<nietzschette>
= false
<Ox0dea>
saadq: You should consider whether you really want to install arbitrary dependencies.
<Ox0dea>
So the problem is the precedence of the "not" keyword.
icebourg has joined #ruby
<Ox0dea>
Which should only be used for control flow and ideally not at all.
<eam>
not quite, it's a parser bug but precedence isn't why
<eam>
>> [true and false]
<ruboto>
eam # => /tmp/execpad-1eb8f8b10250/source-1eb8f8b10250:2: syntax error, unexpected keyword_and, expecting ']' ...check link for more (https://eval.in/383495)
mattyohe has quit [Quit: Connection closed for inactivity]
tkuchiki has quit [Remote host closed the connection]
<saadq>
When I run `ruby test.rb`
<saadq>
is there a way to make that mechanize gem install before the program runs automatically?
<eam>
saadq: possibly, but you probably shouldn't
<nietzschette>
I have mech on another computer. . . .
<saadq>
Okay, was just curious if there was something everyone did that I was unaware of
<eam>
anything you do has good odds of breaking different environments
tkuchiki has joined #ruby
<havenwood>
saadq: You could cut it into a gem so the dependencies install along with the script. Or you can specify the deps in a Gemfile or gem.deps.rb file and run `gem i -g` to install.
j4cknewt has quit [Ping timeout: 265 seconds]
Jarboe has quit []
<nietzschette>
I just find it funny you want mechanize to install automatically
<haasn>
(pastebin.com has ads!?)
<nietzschette>
I mean, do you even USE a keyboard?
<saadq>
That was just an example
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
drocsid has joined #ruby
<saadq>
so when most people create something in Ruby that has dependencies, do they usually expect the user to manually install those dependencies itself?
<saadq>
themselves*
auzty has joined #ruby
<havenwood>
saadq: They usually create a gem so the deps install along with the gem.
<saadq>
Oh, I see that's basically what I was asking about haha thanks
<havenwood>
saadq: Or, a Gemfile for easy installation.
<drocsid>
I installed rvm and have been trying to run a script I wrote from my crontab. Similar to /usr/local/rvm/rubies/ruby-2.2.1/bin/ruby /home/user/script/create_indices.rb . When I login I can run the script fine. It looks like the error I'm getting from cron is /usr/local/rvm/rubies/ruby-2.2.1/lib/ruby/site_ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:i
<drocsid>
+n `require': cannot load such file -- elasticsearch (LoadError)
<drocsid>
looks like it is having issues with the gem when I'm not logged in. I'm no ruby expert, does anybody know what's going on?
ramfjord has quit [Read error: Connection reset by peer]
ramfjord has joined #ruby
saadq has quit [Remote host closed the connection]
<havenwood>
saadq: `gem.deps.rb` is the new name for `Gemfile`, which you'll probably see in most projects
dgutierrez1287 has joined #ruby
Cust0sLim3n has joined #ruby
milesmatthias has quit [Ping timeout: 255 seconds]
<Rager>
I've got a method not acting the way I think it should
<Rager>
how would I use reflection to find out what the interface is?
<havenwood>
?pry Rager
<ruboto>
Rager, 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’ directy in your source code. Visit https://pryrepl.org/ or get it now with gem install pry pry-doc
<havenwood>
Rager: gem install pry pry-doc
<havenwood>
Rager: Then use `pry` instead of `irb` for your REPL.
mleung has joined #ruby
<havenwood>
Rager: Try: ls method_you_want_to_look_at
<Rager>
hm
<Rager>
no way to use some class to enumerate the declared args or whatnot?
<Rager>
ok
<Rager>
I'll try pry
shadoi has joined #ruby
fabrice31 has joined #ruby
<havenwood>
Rager: There are ways, absolutely.
danman has joined #ruby
icebourg has quit []
Dopagod has quit [Read error: No route to host]
dgutierrez1287 has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
<havenwood>
Rager: I'm not quite clear on what you're wanting to do, but you can get at what Pry is showing. It makes it easy.
<eam>
I'm on a train, now we just need someone in an automobile
<flughafen>
haha
<nietzschette>
ARGF.kind_of?(Object) => true <= *emits sigh of relief*
<flughafen>
germanphobe
<shevy>
flughafen I have faith in you. One day you will the world that you are FINISHED
<shevy>
*will show to the world
corehook has joined #ruby
<eam>
GermNaN is what you get when you drop the bread on the floor
<shevy>
certainty well I sort of ignored the word "constant" there, and reduced the question to "obtain lines of required modules", which to my brain only made sense in the way as "how to get all loaded modules in ruby", which is a question that is quite often asked here actually
<eam>
you might want the error raised to explain which receiver object didn't have the method
<Ox0dea>
shevy: NameError#receiver's raison d'être is to make it easier for the did_you_mean gem to do its thing.
<shevy>
hmm
hahuang65 has quit [Ping timeout: 272 seconds]
chinmay_dd has joined #ruby
<Ox0dea>
It's a lot cleaner than method_missing.
rubie has quit [Remote host closed the connection]
<eam>
what's ruby's worst feature
<nietzschette>
ambiguity about what's an object and what's a pointer
moretti has joined #ruby
corehook has quit [Remote host closed the connection]
<nietzschette>
or that's it's best feature
fabrice31 has quit [Ping timeout: 272 seconds]
<Ox0dea>
eam: The flip-flop operator seems to have exactly one (questionable) use case.
<bnagy>
@@classvars
atom_ has joined #ruby
<eam>
how about nearly arbitrary characters as string delimiters with %
avahey has quit [Quit: Connection closed for inactivity]
ndrei has joined #ruby
<bnagy>
flip-flop is awful but it's too confusing to ever be used in real-world code
hahuang65 has joined #ruby
<shevy>
eam hard question. method_missing can be useful sometimes. I use it to simulate LPC in one project, where methods never fail but instead, when they don't exist, return false
<shevy>
I dislike @@vars as well. dunno if they are the worst though
<shevy>
arbitrary characters don't affect me much because I just use ... %w() !
<shevy>
and others use.... %w[]
<shevy>
those are the two most commonly used variants
<shevy>
everyone else is an unbeliever
<Ox0dea>
eam: Have you ever actually seen somebody use a delimiter that confused you?
<shevy>
hanmac did
<nietzschette>
you could also search ruby source for that method and dynamically GIVE it to the object when the error is raised
<ruboto>
eam # => /tmp/execpad-ec0a6f6d5ba1/source-ec0a6f6d5ba1:4: syntax error, unexpected tIDENTIFIER, expecting key ...check link for more (https://eval.in/383553)
Spami has quit [Quit: This computer has gone to sleep]
<agent_white>
That's actually a good idea for a lil project. I haven't programmed in... 3-4 months. Need some good lil starter stuff to work on :D
darkf has joined #ruby
fgo has quit [Ping timeout: 244 seconds]
bkxd has joined #ruby
CloCkWeRX has quit [Ping timeout: 252 seconds]
<agent_white>
jhass: I'll fork it. There's an issue that it doesn't include the fortune "It'
<agent_white>
"It's 5 o'clock somewhere." :P
ta has joined #ruby
<jhass>
sure
keernel has joined #ruby
mikecmpbll has joined #ruby
<maloik>
yorickpeterse: pirate costumes are encouraged!
agent_white has quit [Read error: Connection reset by peer]
agent_white has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
rdark has joined #ruby
workmad3 has joined #ruby
<undeadaedra>
yarr
Xeago has quit [Remote host closed the connection]
valkyrka has joined #ruby
dhjondoh has joined #ruby
krisquigley has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<abyss>
I have a script: https://gist.github.com/anonymous/386e9f03f859cdb4c692 It for each line check if line contain one of the figure in ids array if yes do this between if and else if not then just print line... The question is, how I can expedite this script. I have about 3M lines and 30k id in array...
Xeago has joined #ruby
Hounddog has joined #ruby
alex88 has joined #ruby
sevensea_ has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
zenguy_pc has joined #ruby
dumdedum has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
<bnagy>
abyss: you need to check each of 3M lines for 30k values?
<bnagy>
that's just going to be slow, I'm afraid
c0m0 has joined #ruby
<bnagy>
you could try making the match into a single regexp
<bnagy>
although I kind of threw up in my mouth suggesting it
<bnagy>
there's Regexp.union
<bnagy>
or you could sort your ids into ranges, possibly
sevenseacat has quit [Ping timeout: 264 seconds]
stardiviner has quit [Quit: Weird in coding now, or make love, only two things push me away from IRC.]
<ljarvis>
I love Ruby, but it's really not a good fit for your job
<bnagy>
I don't know if regexp unions will do that for you.. they might, actually
ta has quit [Remote host closed the connection]
michael_mbp has quit [Excess Flood]
<bnagy>
abyss: not creating your regexps in the read path will help, as well, those are expensive
jenrzzz has joined #ruby
<abyss>
the files that I want to modify looks like this one: http://pastebin.com/whhQ2U04 but unfortunatelly UPDATE or INSERT can be divided into few lines.
<jhass>
after you upgraded, reading larger chunks than a line should help too
<bnagy>
hoped it would be able to build ranges
dhjondoh has joined #ruby
<bnagy>
guess I still don't know what the internal engine builds
sevensea_ is now known as sevenseacat
marr has joined #ruby
<jhass>
bnagy: pretty sure Regexp.union is just a Regexp.new(args.join("|"))
sharpmachine has joined #ruby
tkuchiki has quit [Remote host closed the connection]
ndrei has joined #ruby
<bnagy>
but that should compile into something inside the regexp engine, no?
j4cknewt has joined #ruby
<jhass>
uh perhaps but you'll never see that version
tkuchiki has joined #ruby
dmolina has joined #ruby
Dopagod has quit [Ping timeout: 256 seconds]
sharpmachine has quit [Ping timeout: 244 seconds]
ta has joined #ruby
senayar has quit [Remote host closed the connection]
j4cknewt has quit [Ping timeout: 246 seconds]
<abyss>
to sum it up, first I should using newer ruby but second I should somehow put regexp = /\b(#{Regexp.union(ids)})\b/; ... file2.write(line.gsub(regexp) { $1.to_i+1000 }) in my code, yes?
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
oo_ has quit [Remote host closed the connection]
Ropeney has joined #ruby
Xeago has quit [Remote host closed the connection]
<jhass>
well, that should be faster, yes, albeit it might bloat memory too much, we're not sure yet
iwishiwerearobot has quit [Quit: Be back later ...]
<jhass>
3) read larger chunks than a line, I'd try 64Kb or 128Kb
last_staff has joined #ruby
oo_ has joined #ruby
Xeago has joined #ruby
pwnz0r has quit [Remote host closed the connection]
Ropeney has quit [Client Quit]
<bnagy>
going to have some issues then I think at the chunk borders
_jesterfraud is now known as jesterfraud
<jhass>
hm, true
<bnagy>
nothing insurmountable, but needs to be done
<jhass>
now I want to write an optimized parser for that in crystal but it's no fun without the data :/
Ropeney has joined #ruby
<bnagy>
:D
Ropeney has quit [Client Quit]
dhjondoh has quit [Quit: dhjondoh]
Xeago has quit [Read error: Connection reset by peer]
Ropeney has joined #ruby
Ropeney has quit [Client Quit]
Xeago_ has joined #ruby
Pupeno has joined #ruby
<jhass>
I mean you don't need much, flag to check whether you're inside the word boundary, consume digits into a temp buffer, replace digits if match else write input to target
chussenot has joined #ruby
<jhass>
use BufferedIO and done
spider-mario has quit [Remote host closed the connection]
Zai00 has joined #ruby
houhoulis has quit [Remote host closed the connection]
chussenot has quit [Client Quit]
workmad3 has joined #ruby
Rarikon has joined #ruby
Xoro has quit [Ping timeout: 244 seconds]
Xeago_ has quit [Remote host closed the connection]
nEosAg has joined #ruby
nEosAg has quit [Client Quit]
senayar has joined #ruby
chussenot has joined #ruby
DEA7TH has joined #ruby
chussenot has quit [Client Quit]
GPrime has joined #ruby
stan has joined #ruby
GitGud has left #ruby ["Leaving"]
workmad3 has quit [Ping timeout: 250 seconds]
<abyss>
jhass: I don't know what you mean with that chunks sorry:(
Xeago has joined #ruby
zotherstupidguy has quit [Ping timeout: 256 seconds]
<bnagy>
abyss: try the other stuff first
<bnagy>
when you're checking 30k things per line the cost of reading one line is not the first thing you optimise
zotherstupidguy has joined #ruby
quimrstorres has joined #ruby
d10n-work has quit [Quit: Connection closed for inactivity]
mdih has joined #ruby
nickfausnight has quit [Quit: Connection closed for inactivity]
<jhass>
well, my thought by increasing the chunk size is more less transitions Ruby <-> C <-> Oniguruma
iwishiwerearobot has joined #ruby
<ljarvis>
all that glorious memory
<bnagy>
jhass: not saying it's a bad idea :)
<bnagy>
tbh I would just read everything into memory. :D
chussenot has joined #ruby
dionysus69 has quit [Read error: Connection reset by peer]
<bnagy>
who cares about code for poor people with < 16G RAM?
<yorickpeterse>
morning
<yorickpeterse>
ddfreyne: boooo
<ljarvis>
bnagy: yeah but then Ruby will shit itself when it tries to do anything with all of it :D
charliesome has quit [Quit: zzz]
<bnagy>
jruby! \o/
<bnagy>
I used to love running jruby -Xmx 100g :P
fabrice31_ has quit [Remote host closed the connection]
<undeadaedra>
wat
<apeiros>
that's a nice home computer you have :D
haxrbyte has joined #ruby
fabrice31 has joined #ruby
<ljarvis>
a nice home supercomputer
<bnagy>
it actually has more ram than ssd :/
<maloik>
lol
Axy has quit [Read error: Connection reset by peer]
<ljarvis>
how does that even get used
<bnagy>
running 100 windows VMs
<ljarvis>
mother of god
edwinvdg_ has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
__main__ has quit [Ping timeout: 272 seconds]
<bnagy>
not at the same time as jruby, obvs ^_^
edwinvdgraaf has joined #ruby
sleungcy has quit [Quit: Connection closed for inactivity]
<apeiros>
I guess I should ask what hardware our VM hosts use
<undeadaedra>
computer hardware.
<apeiros>
-.-
<apeiros>
imaginary hardware
sepp2k has joined #ruby
<bnagy>
true story - when I first set it up I found a bunch of kvm kernel bugs due to unneccessary lock contention
subtwo has joined #ruby
<bnagy>
just nobody had run across it before :/
Mia has joined #ruby
Mia has joined #ruby
jenrzzz has joined #ruby
<bnagy>
anyway, those boxes are old now :`( new moar tin
tomaz_b has quit [Quit: Leaving]
haxrbyte has quit [Ping timeout: 256 seconds]
GreatSUN has joined #ruby
<GreatSUN>
hi all
<GreatSUN>
short question onto documentation
<GreatSUN>
if you have a method def test(var1, var2, &block)
devyn has joined #ruby
<GreatSUN>
would you document &block?
<undeadaedra>
yes
<GreatSUN>
how?
<GreatSUN>
as a param?
<undeadaedra>
depends on what you use for documentation
skade has quit [Quit: Computer has gone to sleep.]
withnale_ has joined #ruby
workmad3 has joined #ruby
dhjondoh has joined #ruby
<abyss>
jhass, bnagy: ok thank you, I will try to do different approach
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<apeiros>
abyss: still working on your problem from yesterday?
yh has joined #ruby
<apeiros>
GreatSUN: btw., don't use &block if you don't pass the block on to another method. use yield/block_given? instead.
<yh>
Hi guys, can anyone recommend a good way of storing data in memory across multiple invocations of a Ruby application?
<abyss>
apeiros: yes;) Now the script is too slow;) I have something like this: https://gist.github.com/anonymous/8e8bb7f376fce8d3cef1 Unfortunatelly I had cut off checking by INSERT UPDATE etc because INSERTS UPDATES can be divided into few lines, not only one:(
<abyss>
*I had to cut off
<yorickpeterse>
yh: yes: don't store it in memory
<apeiros>
abyss: are all numbers which can occur in the file IDs?
<yorickpeterse>
yh: when the process dies so does the memory, so you have to store it externally somewhere
<yorickpeterse>
that can either be a file, a database, etc
bMalum has quit [Quit: bMalum]
<abyss>
apeiros: sorry I don't know what you're asking about :(
LMity has quit [Ping timeout: 265 seconds]
<apeiros>
abyss: in your "dump-to-database-test-1" file, are there numbers in it which are not IDs?
<abyss>
but I checking each line if contain one of the figure in ids array
<abyss>
dump-to-database-test-1 is the file after changing it's outcome
msgodf has joined #ruby
auzty has quit [Quit: Leaving]
<apeiros>
abyss: right. correction: in your "test.sql" file, are there numbers in it which are not IDs?
<yh>
yorickpeterse: ah, was thinking stuff like POSIX shm_open
<abyss>
apeiros: yes, there are. File looks like this one: https://gist.github.com/anonymous/4f80127d871bf60c771a but ofcourse in that extract there's no updates/insert divided to many lines (but in main files there are)
<bnagy>
yh: I don't know if it's debian specific, but those create a /dev/shm automatically
jas02 has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
<bnagy>
for osx a regular user can mount a ramdisk
<yh>
bnagy: is that a problem?
<apeiros>
abyss: so you just hope that you don't accidentally change another number?
<bnagy>
no, it's good
<yorickpeterse>
yh: IIRC Ruby has some stuff in stdlib for in-memory storage that can be backed up to a file/loaded from it
<yorickpeterse>
lemme see if I can find it
allomov has quit [Remote host closed the connection]
bMalum has joined #ruby
<abyss>
so I need to change everything in SET INSERT_ID and insert/updates/deletes that contain some of the figure from ids array, but updates/insert can be divided into few lines
<bnagy>
anyway I thought pstore persisted to disk, aren't we talking about persisting to ram?
edwinvdg_ has joined #ruby
svoop has joined #ruby
<apeiros>
abyss: SET INSERT_ID always has this form: "SET INSERT_ID=<number>"?
migbar has joined #ruby
<abyss>
apeiros: yeah, but I presume that it unlikely to ease the pain;)
<abyss>
apeiros: yes
<apeiros>
abyss: btw., you can edit gists. that way they have a revision and we can see how the file changed
<apeiros>
instead of pasting a new gist every time
roshanavand has joined #ruby
<abyss>
oh, I didn't know that, thank you.
hectortrope has joined #ruby
roshanavand has quit [Max SendQ exceeded]
<apeiros>
abyss: do the others have a fixed format too?
ponga has quit [Quit: Connection closed for inactivity]
<abyss>
apeiros: but I need to log in?
roshanavand has joined #ruby
<apeiros>
abyss: or keep the browser session open, yes
<apeiros>
at least I think anonymous can edit during a session
timonv has joined #ruby
<abyss>
apeiros: INSERT INTO, DELETE, UPDATE always begin the same, but the rest is arbitrary I mean for example it can be divided into separe lines etc
edwinvdgraaf has quit [Ping timeout: 256 seconds]
<Ox0dea>
abyss: Sounds like you need a SQL parser.
A205B064 has quit [Ping timeout: 264 seconds]
<apeiros>
abyss: can you make 3 examples of UPDATE which differ a lot in your opinion?
<jhass>
abyss: maybe we're approaching this in a completely wrong way. Why do you have to change the IDs?
mgeek has joined #ruby
<mgeek>
Hey, have you heard about WebAssembly?
<jhass>
abyss: and why do you need to do it on the dump opposed to say importing it into a (temporary) DB and changing the data there?
<jhass>
?ot mgeek
<ruboto>
mgeek, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
konieczkow has quit [Ping timeout: 256 seconds]
<hanmac1>
its very fun when someones who has NO exp with html are working on something like joomla ;P
ZOMGITSABEAR has joined #ruby
<jhass>
hanmac1: ^ too
<ZOMGITSABEAR>
hey guys
multi_io has quit [Ping timeout: 245 seconds]
<mgeek>
Suddenly, we keep ##ruby clean, lol ok.
bigkevmcd has quit [Remote host closed the connection]
<jhass>
nah, you can do whatever you ant in ##ruby :P
<hanmac1>
recently i found that they put the <input> inside <label> elements ... that this doesnt work had no one tested before it seems ;P
<mgeek>
Actually, I was gonna ask if WebAssembly will provide Ruby and what you think about it.
bigkevmcd has joined #ruby
<ZOMGITSABEAR>
what is ##ruby?
<apeiros>
mgeek: didn't jhass just tell you to ask that in #ruby-offtopic?
<mgeek>
apeiros: No, this is a difference question.
multi_io has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Copperfield has joined #ruby
<apeiros>
mgeek: ok. true, I only read until webassembly and sighed there :)
<abyss>
jhass: I have databases old database which shouldn't be restored unfortunately the client spot this after few days so into that database some operations has been done. Now I have the right database from 1.06.2015
railsraider has joined #ruby
<jhass>
mgeek: I think opal will be able to draw some optimizations from it, maybe someone gets mruby to run but I don't think MRI will happen
<apeiros>
mgeek: I doubt full ruby is suitable for webassembly. but mruby might be a good fit.
<abyss>
now everything from 1.06.2015 to today I need move to that database from 1.06.2015
<apeiros>
eh, seems jhass shares my opinion :D
tkuchiki has joined #ruby
ZOMGITSABEAR has left #ruby [#ruby]
<jhass>
abyss: I'm sorry but I'm not sure I follow
zotherstupidguy has quit [Read error: Connection reset by peer]
<apeiros>
abyss: oy, what's ^M again? I'm not a vim/emacs/whatevereditorthatis user
<jhass>
your explanation seems to assume some application context
<abyss>
apeiros: oh, now I see you asked about that sql that changing something in my opinion. Do you need more examples?
<jhass>
abyss: and again, why is importing to a temporary DB not an option?
GitGud has joined #ruby
<GitGud>
people here are such gems <3
<apeiros>
abyss: would be good. especially ones which differ in your opinion (but same type of query - that is, all should be e.g. INSERTs)
zotherstupidguy has joined #ruby
<GitGud>
i'm going to learn ruby
lee-jon has quit [Quit: lee-jon]
<jhass>
good
sigurding has quit [Quit: sigurding]
<abyss>
apeiros: new lines, I can remove it. Don't worry about that:)
<apeiros>
abyss: ^M is \n? ok
<wasamasa>
and ^J is \r
<abyss>
apeiros: yes
zudochkin has joined #ruby
<abyss>
jhass: I didn't say that:) Each option is ok if I able to restore the data;)
<apeiros>
temporary db sounds actually like an excellent way
<jhass>
yep
<apeiros>
that way you can manipulate the data using sql
<apeiros>
then dump again
<apeiros>
and import that
nofxx has quit [Ping timeout: 276 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
<abyss>
jhass: but it will not so easy because customers set up again theirs accounts because they didn't know about issue. So I will have duplicates.
starfox_sf has joined #ruby
<jhass>
abyss: and you don't have by editing the dump because...?
giuseppesolinas has quit [Quit: Leaving]
<abyss>
yeah, but it's about 20000 inserts and something about similar with deletes and updates:( restoring binlog to clear database and do something on it is almost I suppose impossible.
quimrstorres has quit [Ping timeout: 265 seconds]
<abyss>
jhass: yeah, I will edit dump instead of binlog, it would be easier. Great idea.
hanmac1 has left #ruby [#ruby]
sdothum has joined #ruby
quimrstorres has joined #ruby
<jhass>
eh
<abyss>
what?;)
startupality has joined #ruby
RegulationD has joined #ruby
<jhass>
no, I better bail from this, sorry for wasting your time
<jhass>
but I just don't get what your issue is and what you're doing at all
<jhass>
not a single bit
dionysus69 has joined #ruby
lee-jon has joined #ruby
<yorickpeterse>
"Get autosacling group" ok I need more sugar in my tea
* apeiros
puts sugar in yorickpeterse's tea
<abyss>
jhass: sorry, my english isn't so good, maybe I didn't catch something... But you and apeiros ease my pain because I didn't sink in that I can do it by restore binlog, dump that data from binlog, increase ids, and then merge this. Thank you.
* undeadaedra
puts tea in yorickpeterse's sugar
starfox_sf has quit [Ping timeout: 250 seconds]
<yorickpeterse>
D:
Squarepy has joined #ruby
<undeadaedra>
>:]
zudochkin has quit [Remote host closed the connection]
ylla has quit [Ping timeout: 252 seconds]
bMalum has quit [Quit: bMalum]
RegulationD has quit [Ping timeout: 276 seconds]
skade has joined #ruby
codecop has joined #ruby
mojsmiesznynick has joined #ruby
oo_ has quit [Remote host closed the connection]
vondruch_ has joined #ruby
cyong has quit [Quit: Leaving.]
ndrei has joined #ruby
kayloos has joined #ruby
kayloos has quit [Read error: Connection reset by peer]
kayloos has joined #ruby
kayloos has quit [Read error: Connection reset by peer]
kalusn has quit [Ping timeout: 276 seconds]
vondruch has quit [Ping timeout: 276 seconds]
rikkipitt has joined #ruby
kayloos has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
k3asd` has quit [Remote host closed the connection]
<ljarvis>
scx: thor is good for this kind of thing
krz has joined #ruby
rodfersou has quit [Ping timeout: 252 seconds]
k3asd` has joined #ruby
zenguy_pc has quit [Ping timeout: 264 seconds]
zenguy_pc has joined #ruby
_blizzy_ has joined #ruby
<bnagy>
wat thor?
skade has quit [Quit: Computer has gone to sleep.]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
ponga has left #ruby [#ruby]
<bnagy>
huh, looks cool. :)
erts has joined #ruby
WeebleWobble has joined #ruby
<WeebleWobble>
r
<jhass>
s
jgpawletko has joined #ruby
<agent_white>
Using Curses in ruby, should I have the executable initialize the Curses stuff (init_screen,start_color,nonl,cbreak,noecho... etc.) ?
starfox_sf has joined #ruby
<WeebleWobble>
Is Starfox Command worth buying
<agent_white>
I'm just writing a simple inventory app, pretty much.
<jhass>
?ot WeebleWobble
<ruboto>
WeebleWobble, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<WeebleWobble>
I heard it was coming out for Virtual Console on the Wii U video game system
<WeebleWobble>
i'm asking starfox_sf
<WeebleWobble>
the animal voices in Starfox Command seem really off and horrible
<WeebleWobble>
also is Starfox Command compatible with the Nintendo WiFi network
<WeebleWobble>
fuck you jhass
<jhass>
and by
<jhass>
!ban WeebleWobble !T 1w troll
WeebleWobble was banned on #ruby by ChanServ [WeebleWobble!*@*]
WeebleWobble was kicked from #ruby by ChanServ [Banned: troll]
Wobble has joined #ruby
Wobble was kicked from #ruby by ChanServ [Banned: troll]
<agent_white>
I wish there were more examples of Curses programs, other than ones from 3 years ago D:
<bnagy>
surely you can find older ones than that, did you even try??
<agent_white>
bnagy: Do I dare to? ;)
RegulationD has joined #ruby
<agent_white>
Is it OK to initialize ncurses stuff in the binary, rather than in the first/main object I create?
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bnagy>
srsly though, just read C apps, probably
sharpmachine has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
<agent_white>
bnagy: Yeah this is my second go-round of attempting ncurses in Ruby. Just trying to get it right. It _does_ seem most initialize ncurses in main().
rodferso1 has quit [Quit: leaving]
<agent_white>
That way the screen is setup, as well as its modifiers...
rodfersou has joined #ruby
* agent_white
solved his own question, with bnagy's help
<bnagy>
I only update bindings when they're broken *shrug*
<bnagy>
or when upstream changes API or something
<agent_white>
Ah true... but I'm still very new to programming. Haven't touched code in 4 months as-is, and before I was still new :D
<agent_white>
So whatever is most reliable without me tinkering in the back-end is awesome.
<bnagy>
I seem to recall there was an ffi binding as well, imvho I would look at that first, but w/e
<agent_white>
I did use ncursesw before.
<bnagy>
if you want nice menu-ey stuff curses is probably richer anyway
<agent_white>
But checking out just curses this time.
RegulationD has quit [Ping timeout: 265 seconds]
sharpmachine has quit [Ping timeout: 252 seconds]
<agent_white>
Yeah... TBH I'm honestly tempted to just go straight to coding it in C to avoid it all. I need a good excuse to learn it/crack open K&R anyways.
<agent_white>
;P
<agent_white>
s/honestly//
<bnagy>
hahahah hahah
<bnagy>
C
* bnagy
cries
<agent_white>
I've wanted to learn it for a long time :)
ahmetkapikiran has quit [Quit: ahmetkapikiran]
<shevy>
agent_white still fighting with ncurses?
<agent_white>
Classes in my university (at least... when I go back) are taught in C/C++.
<agent_white>
shevy: Nope! Just starting :D
<undeadaedra>
int main() { int problem_count = 99; }
<shevy>
its name was wisely chosen
<agent_white>
undeadaedra: But a bitch ain't one?
<undeadaedra>
#include <bitch.h>
<agent_white>
Ruby and C are languages I want to put into my coffee in the morning.
<apeiros>
agent_white, undeadaedra: please don't.
<agent_white>
apeiros: I'm good. Mom's spaghetti has filled my tummy quite enough.
<shevy>
that b....!
<agent_white>
bnagy: Why not C, though? It birthed Ruby, afterall?
bronson has joined #ruby
<apeiros>
agent_white: I'm referring to your bitch joke. that's stuff for your regulars table, not here.
<agent_white>
apeiros: I'm not sure what you mean. But I won't continue it.
<agent_white>
:P
<shevy>
agent_white what will you actually build with curses?
yh has quit [Ping timeout: 264 seconds]
<shevy>
I tried the tic-tac-toe-example; that gem does not seem to work
skade has quit [Quit: Computer has gone to sleep.]
<agent_white>
shevy: Basically just a minor inventory system :) I mix my own liquids for vaporizors/electronic cigs, so just making a simple recipe calculator and inventory-of-flavors thingy.
<shevy>
cool
<agent_white>
Ones out there require me to run Windows in some VM, so I'd rather just have it in a terminal here. :P
diegoviola has joined #ruby
senayar has quit [Remote host closed the connection]
commondream has joined #ruby
bronson has quit [Ping timeout: 245 seconds]
<diegoviola>
I'm trying to consume an API over HTTP / JSON, and I get a hash with an array that contains the hash, after I JSON.parse(res.body) I see lots of \r\n and so on
<diegoviola>
should I get rid of those?
<undeadaedra>
We must get rid of CRLF at once.
chussenot has quit [Quit: chussenot]
<Darkwater>
s/\r\n/\n/g
<diegoviola>
I'm also not sure why I get => ["type", "article_id", "url", "title", "body", "category_id", "search_score"] for j["results"][0].keys
<undeadaedra>
what do you expect?
<agent_white>
undeadaedra: I have markers in vim because I spent a few hours tryin to debug code with CRLF in it.
<diegoviola>
shouldn't I get symbols instead?
<diegoviola>
like :title, :body, and so on?
ahmetkapikiran has joined #ruby
<undeadaedra>
no
<Darkwater>
only if you set json to use symbols
<undeadaedra>
hash keys can be anything, not only symbols
<diegoviola>
how do I get symbols instead?
<ljarvis>
but in json they can only be strings
<ljarvis>
diegoviola: when you parse it, check the json docs
<ljarvis>
yorickpeterse: jesus fuck they're expensive
<yorickpeterse>
:D
<yorickpeterse>
my back is worth more than an aeron
<ljarvis>
yeah I'll sit on my soap box
<bnagy>
yorickpeterse: are you still talking about your chairs??
<bnagy>
man it's been days o_0
<ljarvis>
:D
Cust0sLim3n has quit [Ping timeout: 276 seconds]
<bnagy>
you should try a swift dose of buddhism :P
<ljarvis>
or a swift dose of stfu
<yorickpeterse>
wut
Iskarlar has joined #ruby
tkuchiki_ has quit [Ping timeout: 265 seconds]
<shevy>
lol
<shevy>
do weight-lifting against your bad back yorickpeterse!
<yorickpeterse>
oh hm, I should totally take a photo to show off
<bnagy>
kids these days, it's all aerons, Rust and monads :<
nateberkopec has joined #ruby
aridere has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
phutchins has joined #ruby
edwinvdgraaf has joined #ruby
chipotle has joined #ruby
zudochkin has quit [Remote host closed the connection]
<yorickpeterse>
s/Rust/Go
DroidBurgundy has joined #ruby
<yorickpeterse>
my chair is pretty monadic though
<bnagy>
. o O ( he knows my weak spot )
<yorickpeterse>
no side effects too
<yorickpeterse>
besides a higher social status
<bnagy>
hahah
Xeago has quit [Remote host closed the connection]
ldnunes has joined #ruby
chussenot has quit [Quit: chussenot]
Al3ks has joined #ruby
arturhoo has joined #ruby
<shock_one>
yorickpeterse: you know that if your chair is monadic, you can't get out of it, right? However, if you're sitting on a chair on a chair, you can join those two.
<yorickpeterse>
shock_one: this chair and I will be one
k3asd` has quit [Ping timeout: 256 seconds]
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arturhoo has quit [Ping timeout: 250 seconds]
ItSANgo__ has joined #ruby
startupality has quit [Quit: startupality]
arturhoo has joined #ruby
centrx has joined #ruby
edwinvdgraaf has quit [Ping timeout: 256 seconds]
zudochkin has joined #ruby
<shevy>
lol
<shevy>
love letters to a chair
<shevy>
the monitor is quite far away though
<yorickpeterse>
well, it's probably the only thing that gets to touch my butt ~9 hours a day
<yorickpeterse>
my monitor is just a voyeur
<yorickpeterse>
but yeah, I pulled it closer a bit
<yorickpeterse>
My previous chair was a bit less long (forward wise)
<yorickpeterse>
So I could sit closer to it
<undeadaedra>
( ͡° ͜ʖ ͡°)
<yorickpeterse>
heheh
<yorickpeterse>
"oh aeron you're so big"
but3k4 has joined #ruby
<shock_one>
Speaking of monads, can anybody explain me how the Y combinator works? I've been trying to understand it for hours, and now can even write it from the top of my head, but I still don't get all those bindings. https://gist.github.com/shockone/47431c0096964abe14d1
<yorickpeterse>
shock_one: they work by donating money to crappy startups
* yorickpeterse
runs
<shock_one>
:|
micmus has joined #ruby
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
dhjondoh has quit [Quit: dhjondoh]
charliesome has joined #ruby
<yorickpeterse>
shock_one: but what part is confusing you in this Gist?
endash has joined #ruby
stardiviner has quit [Ping timeout: 245 seconds]
<abyss>
apeiros: jhass guys I think operating on binlog will be easier, because it's hard to do something or merge inserts only (and some inserts don't have autoincrement fileds:/). I need updates and deletes as well...
migbar has quit []
<shock_one>
Let's start from the simplest question: line 9 and the function passed on the lines 11-13 are identical (because if you wrap the former one in a function and call it, you'll get the same result). How can I define it in one place and then use twice?
<shock_one>
yorickpeterse: also, I know that somewhere we pass a parameter which is never used. Where is that?
<diegoviola>
#map always returns an array, no?
<shock_one>
diegoviola: yes.
<diegoviola>
okay
mojsmiesznynick has quit [Quit: Page closed]
<diegoviola>
I thought it was the same as each, that it just printed the result instead
hoov has joined #ruby
<yorickpeterse>
shock_one: all params are used
charliesome has quit [Ping timeout: 265 seconds]
endash has quit [Ping timeout: 256 seconds]
serivichi has joined #ruby
sdothum has quit [Ping timeout: 256 seconds]
<shock_one>
yorickpeterse: correct. But on one of the iterations one of the params is not.
<yorickpeterse>
You also can't re-use any functions here, since they all do different things (as far as I can tell)
<yorickpeterse>
shock_one: per jshint all params are used
endash has joined #ruby
<yorickpeterse>
so I'm fairly sure they are :P
mengu has joined #ruby
mister_solo has quit [Ping timeout: 252 seconds]
<shock_one>
yorickpeterse: I've updated the gist to better show the identical functions.
allomov has quit [Remote host closed the connection]
hildgrim has joined #ruby
x44x45x41x4E has quit [Ping timeout: 244 seconds]
tsvenson|afk has quit [Quit: Leaving]
<apeiros>
diegoviola: Array#map, Enumerable#map and Hash#map do. other than that - it's an ordinary method and returns whatever the implementor makes it return…
tsvenson has joined #ruby
allomov has joined #ruby
dg-ratiodata has quit [Read error: Connection reset by peer]
ndrei has quit [Ping timeout: 264 seconds]
<yorickpeterse>
ah
denver has joined #ruby
<shock_one>
yorickpeterse: It calls itself recursively, right? On one of the iterations f is not evaluated. Which f is that?
claptor has quit [Quit: this channel is bakas]
<hildgrim>
Stupid question; how can i manage to combine strings in arrays like this http://pastebin.com/9q2NDNjE
<abyss>
apeiros: the file is not regular at all. But there is always something between begin and commit. And I need to chagne id = '11446' (in that long update) for example if this id is in my array.
last_staff has quit [Quit: last_staff]
al2o3-cr has quit [Ping timeout: 245 seconds]
startupality has quit [Client Quit]
chinmay_dd has joined #ruby
startupality has joined #ruby
yh has joined #ruby
NeverDie has quit [Remote host closed the connection]
dgutierrez1287 has quit [Remote host closed the connection]
unshadow has quit [Quit: leaving]
stardiviner has joined #ruby
lee-jon has joined #ruby
skade has joined #ruby
<apeiros>
abyss: from where do you have your id's list then?
<apeiros>
I mean from where do you know which id's you have to increment?
chussenot has joined #ruby
dumdedum has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
<abyss>
I put everything to separate file and I did something like this: awk -F'=' '/INSERT_ID/ {print $2}' binlog-restore-20150614-1230-slice|sed 's/\/\*\!\*\/\;//g' > id_to_change so I put everything from INSERT_ID=figure and put to file
edwinvdgraaf has joined #ruby
<abyss>
each number from SET INSERT_ID=number should be increased.
yh has quit [Read error: Connection reset by peer]
yh has joined #ruby
spyderman4g63 has joined #ruby
ahmetkapikiran has joined #ruby
veinofstars has quit [Quit: veinofstars]
<apeiros>
ok. that gets me back to regularity. I doubt it's irregular. you have a couple of tables. and it'll always be `INSERT INTO <table> (<columns>) VALUES (<values>)`
veinofstars has joined #ruby
<apeiros>
and IMO you should collect all the different tables and how their INSERT/UPDATE queries look like
<apeiros>
and figure which of their columns are ID columns which need replacement
ahmetkapikiran has quit [Client Quit]
<apeiros>
because then you can process the file much more efficiently
jonathanwallace_ has quit [Ping timeout: 252 seconds]
francoi__ has quit [Remote host closed the connection]
zudochkin has quit [Remote host closed the connection]
sandstrom has quit [Quit: My computer has gone to sleep.]
davedev24_ has joined #ruby
zudochkin has joined #ruby
jefus has left #ruby ["Leaving"]
Xeago has quit [Remote host closed the connection]
guillaume-rb has joined #ruby
yh has quit [Ping timeout: 264 seconds]
francoi__ has joined #ruby
commondream has quit [Remote host closed the connection]
sgambino has joined #ruby
Xeago has joined #ruby
<abyss>
apeiros: you mean I should extract all insert/update/delete and then do something with this file?
<apeiros>
no
Cust0sLim3n has quit [Ping timeout: 276 seconds]
<apeiros>
I mean you should figure out the pattern. and use that. instead of hoping that you don't accidentally change the wrong number.
yh has joined #ruby
<apeiros>
abyss: how many tables do you insert into/update in that file?
<abyss>
previously it was impossible because I didn't know that I can extract binlog for separate database. So I needed all begin use somedatabase commit, now I can do that bacause I found an option in mysqlbinlog ;)
<ljarvis>
(we have lots of gem deps that throw off warnings that are just as frustrating)
InternetFriend has joined #ruby
wahben has left #ruby [#ruby]
<brettnem>
apeiros: I’m kinda new to ruby, is there some reading material on that?
<apeiros>
not really
<ljarvis>
wahben: fwiw.. you could submit a pull request to fix the warning in the gem
x44x45x41x4E has joined #ruby
dEPy has quit [Quit: (null)]
dhjondoh has joined #ruby
<apeiros>
brettnem: sadly, the only real answer is "this will not work". everything else are desperate tries.
<brettnem>
(facepalm)
<jhass>
brettnem: open an issue with either gem to change their namespace
<brettnem>
seems odd that namespaces are global yet not in any way regulated (shrug)
starfox_sf has joined #ruby
galeido has quit [Ping timeout: 272 seconds]
thelastinuit has joined #ruby
chussenot has quit [Quit: chussenot]
charliesome has quit [Ping timeout: 265 seconds]
CloCkWeRX has joined #ruby
commondream has joined #ruby
<apeiros>
brettnem: I agree. but seems most people think something akin to java's reverse-dns style namespaces was "too bothersome" :-/
RegulationD has joined #ruby
<yorickpeterse>
everything in Java is too bothersome
nonparfumee has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
yqt has joined #ruby
zenguy_pc has quit [Quit: Leaving]
starfox_sf has quit [Ping timeout: 256 seconds]
jpfuentes2 has joined #ruby
mdz_ has quit [Remote host closed the connection]
CamonZ has joined #ruby
<brettnem>
apeiros: seems like there should at least be some sort of registry for namespaces.. (shrug) so devs can be sure they arn’t stepping on someone else without knowing every namespace in existance
sepp2k has quit [Quit: Leaving.]
oo_ has quit [Remote host closed the connection]
<apeiros>
brettnem: again, I agree.
<brettnem>
and who gets to “win” the “cassandra” namespace
commondream has quit [Ping timeout: 276 seconds]
<brettnem>
oh well
<undeadaedra>
namespaces are derived from gem name, no?
<apeiros>
gem names and used namespaces currently don't need to correspond the slightest.
<brettnem>
heh, I don’t think they are undeadaedra
<apeiros>
undeadaedra: that's only a convention
<undeadaedra>
no, they don't need to, but it's usually the case
<brettnem>
it’s just like 90% less confusing when they do, I’ve seen plenty of gems where they arn’t even close
<brettnem>
ok so
<brettnem>
if I want to fix this myself
<brettnem>
can I like, find/replace inside the gem? or is it more complicated than that?
RegulationD has quit [Ping timeout: 272 seconds]
catphish_ has joined #ruby
tedstriker has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
brettnem: it is more complicated than that. but search/replace should cover 99% of the cases.
<apeiros>
more complicated: stuff like const_get and friends
<brettnem>
oh hell I don’t even use that 1%
rbennacer has joined #ruby
<catphish_>
does anyone know if it's possible to get field types (or any other raw result data) with mysql2?
<catphish_>
ie before all the casting to a nice ruby hash
revath has joined #ruby
mister_solo has joined #ruby
coderhs has joined #ruby
serivich has joined #ruby
erts has quit [Quit: erts]
lee-jon has quit [Quit: lee-jon]
allomov has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
bMalum has joined #ruby
dblessing has joined #ruby
<yh>
If a gem writes to a file "foo.txt", where will that file be?
<yh>
The same directory that executed ruby ?
rbennacer has joined #ruby
<yh>
(This gem is being required by a script)
lee-jon has joined #ruby
zenguy_pc has joined #ruby
sharpmachine has joined #ruby
techsethi has quit [Quit: techsethi]
mdz_ has joined #ruby
allomov has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
ta has quit [Remote host closed the connection]
coderhs has joined #ruby
startupality_ has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
commondream has joined #ruby
jphenow has joined #ruby
coderhs has quit [Client Quit]
gkra has quit [Ping timeout: 256 seconds]
devdazed has joined #ruby
<yorickpeterse>
The current working directory
zudochkin has quit [Remote host closed the connection]
startupality has quit [Ping timeout: 256 seconds]
startupality_ is now known as startupality
DroidBur_ has joined #ruby
jlast has quit [Remote host closed the connection]
veinofstars has quit [Quit: veinofstars]
charliesome has joined #ruby
zudochkin has joined #ruby
malconis has joined #ruby
quimrstorres has joined #ruby
mrmargolis has joined #ruby
DroidBurgundy has quit [Ping timeout: 272 seconds]
sharpmachine has quit [Ping timeout: 265 seconds]
malconis has quit [Remote host closed the connection]
chinmay_dd has quit [Remote host closed the connection]
agent_white has quit [Ping timeout: 252 seconds]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
malconis has joined #ruby
bMalum has quit [Quit: bMalum]
<yorickpeterse>
lol, I like recruiter Emails
<yorickpeterse>
especially their signatures that state "YOU MAY NOT DISCLOSE THIS BLA BLABLA "
<undeadaedra>
Generic signatures
<yorickpeterse>
oh really? I wasn't aware your made up laws are automatically applied the moment I read this Email
hinbody has joined #ruby
<yorickpeterse>
also loL:
<yorickpeterse>
"and you are strongly advised to check for the latest viruses on its receipt."
<undeadaedra>
I don't have those kind of mails :(
<apeiros>
brettnem: problem is more when/if the gem uses that 1% ;-)
<yorickpeterse>
I hate how they just ignore my website though
<yorickpeterse>
" Although I appreciate the interest I am not interested in job offers at the moment."
<yorickpeterse>
I might have to put that in a <marquee> after all
<undeadaedra>
marquee still works?
jhwhite has joined #ruby
<yorickpeterse>
Of course it does
zudochkin has quit [Ping timeout: 246 seconds]
<yorickpeterse>
it's still part of HTML 5.1
<undeadaedra>
o_O
bMalum has joined #ruby
<undeadaedra>
I thought this thing was burried
<yorickpeterse>
nop
chinmay_dd has joined #ruby
agent_white has joined #ruby
fgo has quit [Quit: WeeChat 1.1.1]
dstarh has joined #ruby
dede has joined #ruby
ryba has joined #ruby
mdz_ has quit []
JoshL has joined #ruby
Marsupermammal has joined #ruby
ta has joined #ruby
enebo has joined #ruby
chinmay_dd has quit [Ping timeout: 265 seconds]
chussenot has joined #ruby
<shevy>
how dare you undeadaedra
<shevy>
<marquee>baguette</marquee>
edwinvdg_ has quit [Remote host closed the connection]
rubie has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
edwinvdgraaf has joined #ruby
atomical has joined #ruby
zz_Outlastsheep is now known as Outlastsheep
* undeadaedra
burries shevy
sevenseacat has joined #ruby
last_staff has joined #ruby
rubie has quit [Ping timeout: 265 seconds]
senayar has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
Iskarlar has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
tomphp_ has joined #ruby
Al3ks has quit [Ping timeout: 265 seconds]
fmcgeough has joined #ruby
axl_ has joined #ruby
ta has quit [Remote host closed the connection]
DaniG2k has joined #ruby
InternetFriend has joined #ruby
senayar has joined #ruby
galeido has joined #ruby
Xeago has joined #ruby
paulcsmith has joined #ruby
ebarrett has quit [Ping timeout: 255 seconds]
revath has quit [Ping timeout: 276 seconds]
jwilson_ has quit [Read error: Connection reset by peer]
atom_ has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
haxrbyte_ has joined #ruby
commondream has quit [Remote host closed the connection]
jwilson_ has joined #ruby
ebarrett has joined #ruby
gambl0re has quit [Ping timeout: 252 seconds]
mrmargolis has quit [Ping timeout: 256 seconds]
pandaant has joined #ruby
commondream has joined #ruby
mrmargolis has joined #ruby
casadei has joined #ruby
blue_deref has quit [Quit: bbn]
dhjondoh has quit [Quit: dhjondoh]
lupine has quit [Max SendQ exceeded]
drdave has joined #ruby
yh has quit [Ping timeout: 252 seconds]
lupine has joined #ruby
Mojo_Nixon has joined #ruby
dhjondoh has joined #ruby
charliesome has quit [Quit: zzz]
drdave has quit [Client Quit]
yh has joined #ruby
commondream has quit [Remote host closed the connection]
<centrx>
The synergy is blowing up.
commondream has joined #ruby
mrmargolis has quit [Ping timeout: 244 seconds]
last_staff has quit [Remote host closed the connection]
DroidBur_ is now known as droidburgundy
mrmargolis has joined #ruby
d10n-work has joined #ruby
lupine has quit [Ping timeout: 256 seconds]
dopie has joined #ruby
chussenot has quit [Quit: chussenot]
endash has quit [Quit: endash]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
startupality has quit [Quit: startupality]
dmmoody has joined #ruby
Kricir has joined #ruby
kaleido has joined #ruby
RegulationD has joined #ruby
Squarepy has quit [Quit: Leaving]
chussenot has joined #ruby
startupality has joined #ruby
Xeago has quit [Remote host closed the connection]
charliesome has joined #ruby
Regulati_ has joined #ruby
edwinvdg_ has joined #ruby
RegulationD has quit [Read error: Connection reset by peer]
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mrmargolis has quit [Ping timeout: 264 seconds]
atomical has joined #ruby
startupality has quit [Ping timeout: 276 seconds]
mrmargolis has joined #ruby
tkuchiki has joined #ruby
konieczkow has joined #ruby
shinnya has joined #ruby
edwinvdgraaf has quit [Ping timeout: 255 seconds]
decoponio has joined #ruby
InternetFriend has joined #ruby
jonathanwallace has joined #ruby
veleno has joined #ruby
lkba has joined #ruby
lkba has quit [Remote host closed the connection]
j4cknewt has quit [Remote host closed the connection]
lkba has joined #ruby
<veleno>
hello. a program is crashing without telling which line number it crashes to. it only says: “W, [2015-06-18 16:23:07 #4362] WARN -- : NoMethodError: undefined method `[]' for #<Splayd:0x007fe9c0afa350>”
glcx has joined #ruby
<abyss>
apeiros: I've changed if to: if ( line !~ /thread_id|BEGIN|COMMIT|end_log_pos/ ) && ( id = ids.find { |w| line =~ /\b#{w}\b/ } ) It should ease a pain a little;)
ta has joined #ruby
chipotle has quit [Quit: cheerio]
<havenwood>
veleno: Link to the code?
dorei has joined #ruby
renderful has joined #ruby
mary5030 has joined #ruby
mary5030 has quit [Remote host closed the connection]
konieczkow has quit [Ping timeout: 246 seconds]
droidburgundy has quit [Remote host closed the connection]
<ljarvis>
the code is just really hard to read, which is why you're having trouble
* jhass
closes tab
<ljarvis>
^
<veleno>
jhass: i agree
segfalt_ has joined #ruby
Iskarlar has joined #ruby
<veleno>
the auth(..) method initialized @splayd at line 163
<ljarvis>
on top of that, there are SO many race conditions
<ljarvis>
veleno: kill it with fire
<veleno>
ljarvis: that’s also one option….
segfalt has quit [Ping timeout: 276 seconds]
segfalt_ is now known as segfalt
<yorickpeterse>
ljarvis: ehm, I think I found a nice bug in Slop
<ljarvis>
nice?
* ljarvis
intrigued
jonathanwallace has quit [Ping timeout: 245 seconds]
<yorickpeterse>
https://gist.github.com/YorickPeterse/77ade5f3f566eeb6fd17 if you run this with "ruby test.rb --version" you get /home/yorickpeterse/.gem/ruby/2.2.0/gems/slop-4.1.0/lib/slop/parser.rb:105:in `try_process': unknown option `--version' (Slop::UnknownOption)
<yorickpeterse>
but!
<yorickpeterse>
it works fine if you remove the "puts"
<yorickpeterse>
so Slop#to_s apparently poops itself
<yorickpeterse>
which is wack because it shouldn't even be called
<yorickpeterse>
oh hm, seems to break in "parse" even
<ljarvis>
why wouldn't it be called?
<ljarvis>
orly
<yorickpeterse>
because of the exit
dmmoody has quit [Remote host closed the connection]
<ljarvis>
right
<yorickpeterse>
maybe I have the dumbz though
dmmoody has joined #ruby
<ljarvis>
that error is definitely weird
<yorickpeterse>
haha what the fuck, this gets even better
<yorickpeterse>
if you do "puts Slop.parse { .... }" it gives a basic output
droidburgundy has joined #ruby
j_mcnally has joined #ruby
yoongkang has quit [Remote host closed the connection]
<yorickpeterse>
If you define your own options and all that, it will still give the basic output
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
hrm, so how do you meaningfully benchmark an asynchronous job queue server? :)
<yorickpeterse>
if you do "opts = Slop.parse { ... }; puts opts" you get teh full output
<yorickpeterse>
oh hm, TIL anonymous classes aren't really so anonymous
<yorickpeterse>
e.g. constants are apparently not local to the Class.new { ... } block
CloCkWeRX has quit [Remote host closed the connection]
<yorickpeterse>
>> Class.new { A = 10 }; Class.new { A = 5 }
sandstrom has quit [Quit: My computer has gone to sleep.]
<ruboto>
yorickpeterse # => /tmp/execpad-ea4779f7ff29/source-ea4779f7ff29:2: warning: already initialized constant A ...check link for more (https://eval.in/383835)
Xeago has quit [Remote host closed the connection]
<yorickpeterse>
like wtf
<jhass>
oh, interesting
mengu has quit []
lee-jon has quit [Quit: lee-jon]
JakFrist has joined #ruby
phizzbuzz has joined #ruby
<yorickpeterse>
....but using const_set works
<undeadaedra>
because block does not changes constant scope
railsraider has quit [Quit: railsraider]
endash has joined #ruby
<yorickpeterse>
undeadaedra: depends on how the block is evaluated
paulcsmith has quit [Quit: Be back later ...]
startupality has joined #ruby
droidburgundy has joined #ruby
gambl0re has joined #ruby
<yorickpeterse>
oh hm interesting, seems it doesn't even do that when using instance_eval/instance_exec
<bougyman>
yorickpeterse: it puts the constant on Class
<yorickpeterse>
stupid Ruby
paulcsmith has joined #ruby
JakFrist has quit [Client Quit]
<bougyman>
Class::A shows it, even.
ta has quit [Remote host closed the connection]
TheMoonMaster is now known as blake
ylla has quit []
Xeago has quit [Remote host closed the connection]
startupality has quit [Client Quit]
preyalone has joined #ruby
milesmatthias has quit []
atom_ has quit [Ping timeout: 246 seconds]
startupality has joined #ruby
edwinvdg_ has quit [Remote host closed the connection]
jwilson_ has quit [Read error: Connection reset by peer]
jwilson_ has joined #ruby
edwinvdgraaf has joined #ruby
fabrice31 has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 265 seconds]
starfox_sf has quit [Ping timeout: 265 seconds]
yh has quit [Ping timeout: 244 seconds]
ta has joined #ruby
[H]unt3r has joined #ruby
<ljarvis>
it puts the lotion on the class
mikecmpb_ has joined #ruby
sevenseacat has quit [Quit: Me dun like you no more.]
brettnem has quit [Quit: brettnem]
agent_white has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
LMity has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
momomomomo has joined #ruby
mikecmpbll has quit [Ping timeout: 264 seconds]
Rollabunna has joined #ruby
haxrbyte_ has quit [Ping timeout: 256 seconds]
galeido has quit [Read error: Connection reset by peer]
yh has joined #ruby
hectortrope has quit [Quit: WeeChat 0.4.2]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dmmoody has quit []
lee-jon has joined #ruby
bhorn1 has joined #ruby
<bhorn1>
Hey guys, I'm looking into creating guis with Ruby. Does anyone have any recommendations on what to use in terms of libraries to get started?
snockerton has joined #ruby
<ljarvis>
bhorn1: what kind of gui?
<apeiros>
.gsub(/(?!\A)^/, ' ') # indent all but the first line :D
zudochkin has joined #ruby
slash_nick has quit [Ping timeout: 252 seconds]
<bhorn1>
A relatively simple user-friendly front end with different pages of buttons to perform various tasks from opening webpages to running scripts in the background.
ahmetkapikiran has joined #ruby
<ljarvis>
Ruby isn't great at this stuff. Shoes is popular but it's more of a toy. I would probably lean on java tools via jruby (the latest version of shoes does this)
Spami has joined #ruby
aryaching has joined #ruby
ahmetkapikiran has quit [Client Quit]
<ljarvis>
bhorn1: well, check out shoes. Otherwise I'd go swing/jwt
mandarinkin has quit [Ping timeout: 245 seconds]
<bhorn1>
ljarvis: I'm very familiar with java/swing, I've just been tasked recently with using ruby to do this instead. I generally agree with your opinion but am not well versed enough in Ruby to construct a very good argument for my case.
<bhorn1>
ljarvis: Thank you for your input, though!
* jhass
still has to play with ruby-gir
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis>
bhorn1: you could still do it in Ruby, just using swing :)
rbowlby has quit [Read error: Connection reset by peer]
<phat4life>
bhorn1: why not scala instead
mandarinkin has joined #ruby
roger_rabbit has quit [Ping timeout: 245 seconds]
rbowlby has joined #ruby
<ljarvis>
but yeah bit pointless if you know java better..
DaniG2k has quit [Quit: leaving]
<phat4life>
still jvm though
<ljarvis>
so?
ta has quit [Remote host closed the connection]
ItSANgo__ has quit [Ping timeout: 265 seconds]
<bhorn1>
phat4life: I say why not java instead, personally. Like I said I've just been tasked by a higher up to attempt to use ruby instead.
<bhorn1>
Thanks a ton for your input, though guys! Have a good day.
<phat4life>
meh, use the right tool for the right job
metalic has joined #ruby
<phat4life>
i can only imagine pain later on trying to do gui stuff with ruby
<ljarvis>
or the right tool for the wrong job
<phat4life>
my company was like that, once one team did everything in ruby, the whole company was like, lets rewrite EVERYTHING to ruby
Marsupermammal has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
livathinos has quit []
<jhass>
I think GUIs could be great with Ruby, if somebody sat down and wrote an API actually utilizing its powers (and with a result that doesn't look like a kids toy...)
<bhorn1>
Yeah, I see the potential it's just not something that's relevant at this point in time I feel.
Marsupermammal has joined #ruby
<phat4life>
just use qt
krowv has joined #ruby
commondream has quit [Remote host closed the connection]
<ljarvis>
oh god
<ljarvis>
just cut your foot off with an axe
<phat4life>
lol
<phat4life>
what other gui libraries are there
quazimodo has joined #ruby
<undeadaedra>
Qt's not so bad itself
<jhass>
Gtk, WxWidgets, Tk (*cough*)
<shock_one>
phat4life: HTML.
mister_solo has quit [Ping timeout: 272 seconds]
<kaleido>
html5 ftw?
<phat4life>
i guess desktop apps are less relavant
<jhass>
the enlightment stuff
jordanm has joined #ruby
<phat4life>
do it in flash heueueueu
<undeadaedra>
mmh, too bad I don't have rslap anymore
ItSANgo__ has joined #ruby
rubie has joined #ruby
LMity has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby
* hanmac1
point at rwx for wxWidgets in ruby for phat4life
chinmay_dd has joined #ruby
sharpmachine has joined #ruby
<phat4life>
interesting
<jhass>
is it usable "already"?
dr-richard has joined #ruby
platzhirsch1 has quit [Ping timeout: 245 seconds]
bMalum has quit [Quit: bMalum]
<hanmac1>
jhass: it does have specs and samples ... for the most stuff its "usable" ... but need to be build from source because the gem is not updated for long
cumorris has joined #ruby
jpfuentes2 has joined #ruby
diegoviola has quit [Ping timeout: 276 seconds]
<jhass>
release early, release often! ;P
<ljarvis>
that docs
mike___1234 has quit [Remote host closed the connection]
michaeldeol has quit [Client Quit]
JoshL has quit [Read error: Connection reset by peer]
j4cknewt has joined #ruby
JoshL has joined #ruby
startupality has quit [Read error: Connection reset by peer]
hubcaps has quit [Ping timeout: 255 seconds]
sandstrom has joined #ruby
jhwhite has quit [Ping timeout: 252 seconds]
yoongkang has joined #ruby
startupality has joined #ruby
hanmac1 has quit [Quit: Leaving.]
j4cknewt has quit [Remote host closed the connection]
freerobby has joined #ruby
rbennace_ has joined #ruby
paulcsmith has quit [Quit: Be back later ...]
athos_diddy has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
rbennacer has quit [Read error: Connection reset by peer]
zotherstupidguy has quit [Read error: Connection reset by peer]
haxrbyte has joined #ruby
paulcsmith has joined #ruby
aganov has quit [Remote host closed the connection]
commondream has joined #ruby
<athos_diddy>
even simpler immutability means it's id won't change. it's static?
svoop has quit [Read error: Connection reset by peer]
<jhass>
athos_diddy: okay, from the start
sharpmachine has quit [Remote host closed the connection]
<jhass>
{foo: bar} is equivalent to {:foo => bar}
<athos_diddy>
right
<jhass>
it's using the symbol :foo as key
<jhass>
that you defined a local variable named foo too doesn't matter with this syntax
tagrudev has quit [Remote host closed the connection]
<athos_diddy>
oh
<athos_diddy>
hah
<athos_diddy>
smh
<jhass>
where it would matter is if you did {foo => bar}
<apeiros>
athos_diddy: hash table corruption happens when the hash value of a key changes
<apeiros>
athos_diddy: and the hash value of a key is a product of its value
nikhgupta has joined #ruby
<phat4life>
aren't there certina cases where foo: bar becomes ambiguous
wookiehangover has quit [Ping timeout: 256 seconds]
mdih has joined #ruby
darkf has quit [Quit: Leaving]
<jhass>
phat4life: perhaps your thinking about keyword arguments and accepting an options argument too?
<apeiros>
athos_diddy: when a hash-table performs a lookup, it does so by calculating the hash value of the key, that number is used to find a "bucket"
<jhass>
elsewhere I can't imagine
<apeiros>
athos_diddy: with a different hash value, it'll find a different bucket - so the correct one can't be found anymore.
<apeiros>
oh dear, right, string keys are special cased
<Senjai>
apeiros: Isnt key copied?
<apeiros>
of course, *the only* key which is special cased
<apeiros>
Senjai: no
camilasan has quit [Remote host closed the connection]
droidburgundy has quit [Read error: Connection reset by peer]
<apeiros>
Senjai: except for - drumrolls - string keys. they are copied and frozen.
<Senjai>
That's what I thought :P
<Senjai>
It kinda makes sense, no?
<apeiros>
no
droidburgundy has joined #ruby
rcvalle has joined #ruby
<Senjai>
I would probably rather have it copy over than just be a reference. Specifically because it's -hard- in ruby to understand when things are actually passed by value vs by reference
<athos_diddy>
apeiros thank you
<apeiros>
athos_diddy: new example, using a non-special-cased key:
<apeiros>
>> k = ["some", "array"]; h = {k => "value"}; h[k] # normal
<apeiros>
k = ["some", "array"]; h = {k => "value"}; k << "change"; h.rehash; h[k] # finds it again because the hash h updates all .hash values for all keys
wookiehangover has joined #ruby
<apeiros>
>> k = ["some", "array"]; h = {k => "value"}; k << "change"; h.rehash; h[k] # finds it again because the hash h updates all .hash values for all keys
<apeiros>
athos_diddy: anyway, in short: you should just not use objects as keys which you mutate
<Senjai>
Generally shouldn't be mutating things
<apeiros>
Hash#rehash is expensive
<Senjai>
^
mandarinkin has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
bMalum has joined #ruby
<athos_diddy>
apeiros would this be different in the case of fp
<apeiros>
what's fp got to do with this?
<apeiros>
also, don't use abbreviations without introducing them.
<athos_diddy>
nothing i guess i'm just wondering if it has a similar caveat when using their version of hash tables which would be object literals?
<athos_diddy>
sorry
* apeiros
assumes fp = functional programming
dionysus69 has quit [Client Quit]
endash has joined #ruby
<apeiros>
a hash table in fp doesn't work differently. I doubt the problem arises, though, since strict fp does not allow mutable objects. so you can't have mutable keys to begin with.
<athos_diddy>
ahhh
dionysus69 has joined #ruby
veleno has quit [Ping timeout: 276 seconds]
yh has quit [Ping timeout: 265 seconds]
alex88 has quit []
<athos_diddy>
funny i guess the work around in rails is to always rehash. possibly in one of the functions in ActionPack since this will interface with model and view
<apeiros>
no
<apeiros>
totally and utterly no
<apeiros>
if you use Hash#rehash you almost certainly did something wrong.
<Senjai>
athos_diddy: NOOO
<athos_diddy>
hahaha
yh has joined #ruby
<Senjai>
athos_diddy: You can exist in life without ever using rehash
<Senjai>
I did
<Senjai>
and still have
towski_ has joined #ruby
<apeiros>
I'm not even sure there are valid use-cases for rehash
<Senjai>
apeiros: Beyond cus ruby?
happyface has joined #ruby
<apeiros>
Senjai: ¿que?
<Senjai>
athos_diddy: What was this originally meant to solve?
senayar has quit []
<Senjai>
apeiros: Just that in ruby, everything is mutable.
<apeiros>
Senjai: so?
aphprentice has quit [Remote host closed the connection]
<apeiros>
just because it *can* be mutated, doesn't mean *it will be*
<Senjai>
apeiros: I'm not saying it should be there, I'm just saying thats probably why
<athos_diddy>
i'm solidfying my understand of proper data structures in Ruby
<apeiros>
also, not everything is mutable.
<undeadaedra>
What's #rehash?
<apeiros>
Senjai: I understand why it exists.
michaeldeol has joined #ruby
<athos_diddy>
a practical example could be a counted collection of objects
SHyx0rmZ has joined #ruby
<apeiros>
Senjai: what I say is that I don't think there's any case where it's correct to actually use it.
<Senjai>
apeiros: Ok, that's fair.
danzilio has quit [Quit: My computer has fallen asleep!]
<athos_diddy>
the key should be immutable not a mutable object that is pointing to a number
<athos_diddy>
i can gist an example
<apeiros>
or put differently: I think if you use #rehash, I'm convinced there's a better solution without using #rehash :)
<Senjai>
^
<Senjai>
which is why I'm asking what problem you're trying to solve
<athos_diddy>
Senjair it's an abstract lesson
<apeiros>
undeadaedra: Hash#rehash
jbisnett has joined #ruby
mandarinkin has joined #ruby
<Senjai>
athos_diddy: But .. no.
<apeiros>
undeadaedra: "Rebuilds the hash based on the current hash values for each key." (straight from the docs ;-p)
<apeiros>
athos_diddy: yes, gist
kayloos has quit []
<undeadaedra>
wuuuuuuuuuuuuuuuuuuuut
ta has joined #ruby
sarkyniin has quit [Ping timeout: 265 seconds]
andikr has quit [Remote host closed the connection]
<athos_diddy>
ok give me a second, thank you
finisherr has joined #ruby
<jbisnett>
does anyone know how one would go about linking a custom memory allocation suite into ruby?
chussenot has quit [Quit: chussenot]
<apeiros>
Kernel.trap("INT") do Thread.new do … end; end # <-- sooo sad that this is necessary…
juanpaucar has quit [Remote host closed the connection]
<Senjai>
apeiros: ? :( what
<apeiros>
Senjai: can't use mutexes and other stuff in trap context
drewvanstone has joined #ruby
ndrei has joined #ruby
drewvanstone has quit [Client Quit]
<Senjai>
Orly. You're just full of the TIL's today :)
krisquigley has quit [Remote host closed the connection]
jackjackdripper1 has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Al3ks has joined #ruby
yh has joined #ruby
zenguy_pc has joined #ruby
The_Phoenix has joined #ruby
adamjleonard has joined #ruby
<jbisnett>
has anyone tried linking a different malloc to ruby?
apoplexy has joined #ruby
jackjackdripper has quit [Ping timeout: 252 seconds]
<undeadaedra>
what do you mean?
konieczkow has joined #ruby
<undeadaedra>
ruby has been linked to different malloc implementations as it works on different systems
sharpmachine has joined #ruby
<jbisnett>
im trying to link doug lea's malloc in and its building but failing tests apparently randomly
Xeago has joined #ruby
dagda1_ has joined #ruby
mleung has quit [Quit: mleung]
DrShoggoth has joined #ruby
<jbisnett>
i also have a custom malloc im trying to link in but it seems like ruby is overwriting its headers
mrmargolis has quit [Remote host closed the connection]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gkra has joined #ruby
mrmargolis has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
yh has quit [Ping timeout: 255 seconds]
konieczkow has quit [Ping timeout: 244 seconds]
mleung has joined #ruby
<jbisnett>
i tried configuring with jemalloc but i cant figure out how that works
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
shock_one has joined #ruby
simplyianm has joined #ruby
mleung has quit [Read error: Connection reset by peer]
mallu has joined #ruby
<mallu>
I have a hash like this. https://dpaste.de/qeSH. Can you please tell me how to get dev password for janitor
jas02 has left #ruby [#ruby]
bMalum has quit [Quit: bMalum]
chinmay_dd has quit [Remote host closed the connection]
<apeiros>
mallu: what have you tried?
tkuchiki has quit [Remote host closed the connection]
<ZOMGITSABEAR>
you guys know anyone that needs sysadmin work, web design, or help with a project?
<mallu>
test['dev']['janiotor']['password']
<apeiros>
mallu: apart from the typo, that looks correct
<ZOMGITSABEAR>
sorry, wrong channel
wookiehangover has quit [Ping timeout: 265 seconds]
<apeiros>
mallu: is your paste a config file? or actual output from your hash?
<mallu>
test['dev']['janitor']['password']
<mallu>
NoMethodError: undefined method `[]' for nil:NilClass
spider-mario has joined #ruby
dblessing has quit [Ping timeout: 244 seconds]
vdamewood has quit [Quit: Life beckons.]
michaeldeol has joined #ruby
<apeiros>
mallu: is your paste a config file? or actual output from your hash?
<mallu>
aperios: it is an actual hash from a databag
<mallu>
I should say from a json file
mwlang has joined #ruby
<apeiros>
mallu: my nick is not aperios. use tab completion for nicks.
<apeiros>
mallu: how did you generate that output?
zudochkin has quit [Remote host closed the connection]
startupality has quit [Quit: startupality]
<mwlang>
I may need to find a SOAP channel to ask this, but hopefully there are other SOAP users lurking here: Doesn’t the SOAP protocol disallow two different variations of the same-named complex data type within the same namespace?
Notte has joined #ruby
mister_solo has joined #ruby
DroidBur_ is now known as droidburgundy
tkuchiki has joined #ruby
wookiehangover has joined #ruby
Narzew has joined #ruby
cndiv has joined #ruby
mdw has joined #ruby
mikecmpb_ has quit [Quit: i've nodded off.]
kb3ien has joined #ruby
guillaume-rb has quit [Quit: guillaume-rb]
hectortrope has joined #ruby
Spami has joined #ruby
<kb3ien>
I'm trying to make a ruby on rails app, running under Apache use a proxy for its outgoing connections. Setenv http_proxy http://127.1:8888 in the virtualhost file isn't doing the trick. Is there a better way?
RobertBirnie has joined #ruby
<undeadaedra>
\o
dblessing has joined #ruby
guillaume-rb has joined #ruby
pwnz0r has joined #ruby
hectortrope has quit [Client Quit]
<kb3ien>
its using passenger
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang>
kb3ien: since it’s an outgoing connection, you’re presumably using Faraday, mechanize, HTTPClient, RestClient, or similar, right?
<Senjai>
mwlang: Thank you for not wanting to party hard
<kb3ien>
the call is generated thusly : req = Net::HTTP::Post.new(uri.request_uri)
<havenwood>
ye ole Net::HTTP
Spami has quit [Quit: This computer has gone to sleep]
<Senjai>
Net::HTTP fo lyfe
<kb3ien>
more like the death of me.
<mwlang>
Senjai: :-)
wookiehangover has quit [Ping timeout: 265 seconds]
<dfockler>
mwlang: that's on there and it works, just wondering why the other way didn't
shock_one has quit []
<havenwood>
kb3ien: Check?: ENV['http_proxy']
fabrice31 has joined #ruby
<kb3ien>
I've been down that road, but will try again.
<mwlang>
dfockler: I think operator precedence…without the parentheses, ruby wants to handle “output << yield” first, but then doesn’t know what to do with element next.
<dfockler>
ahh ok
ramfjord has joined #ruby
<mwlang>
dfockler: sorry for the quick fire answer…I actually didn’t read the whole gist. :-p
Xeago has quit [Remote host closed the connection]
Fooster has joined #ruby
<dfockler>
no it's cool, it's wasn't a real problem I was having anyways
sharpmachine has quit [Remote host closed the connection]
<athos_diddy>
recently i was practicing data structures and have been building counted collections. so i'm reading what Yuki said about corruption and i'm wanting to understand what's the best way to build this counted collection
sinkensabe has joined #ruby
Cust0sLim3n has quit [Ping timeout: 245 seconds]
<athos_diddy>
originally i just used structs as keys and it's easy to compare and update it's value. using an immutable object as a key i find it more difficult to build the counted collection
<athos_diddy>
a word counter would be simpler to keep count of
Igorshp has quit [Remote host closed the connection]
<claw>
i guess thats fine jhass thanks
livathinos has joined #ruby
wallerdev has joined #ruby
drocsid has quit [Ping timeout: 265 seconds]
wookiehangover has quit [Quit: i'm out]
<dfockler>
athos_diddy: in jafrog's example she is mutating the value that the reference in the hash is pointing to
wookiehangover has joined #ruby
livathinos has quit [Client Quit]
wallerdev has quit [Client Quit]
<dfockler>
so the hash of the reference has changed when you go to check for it again
mister_s_ has quit [Ping timeout: 264 seconds]
<dfockler>
it comes down to how ruby is calculating the hash value of the object you want to store in the hash
<dfockler>
and whether that hash value can change
rushed has joined #ruby
stamina has quit [Quit: WeeChat 1.2]
qwertme has joined #ruby
allomov has quit [Remote host closed the connection]
wallerdev has joined #ruby
symm- has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
centrx has quit [Quit: Shutting down, Please wait...]
ndrei has joined #ruby
<athos_diddy>
jhass thank you for clarifying
<athos_diddy>
dfockler thank you for the explanation
denver has quit [Remote host closed the connection]
<kb3ien>
seems that it does follow the bidding of the setenv, but it did not until after I did ` bundle exec rake` first. Not sure why.
duderonomy has quit [Ping timeout: 264 seconds]
krisquigley has joined #ruby
jackjackdripper has joined #ruby
<mwlang>
boy, I’m glad I never think to use mutable objects as hash keys. :-)
Spami has joined #ruby
_djbkd has joined #ruby
sharpmachine has joined #ruby
<dfockler>
hopefully it would never come up
danzilio has quit [Quit: My computer has fallen asleep!]
DrShoggoth has quit [Ping timeout: 272 seconds]
chinmay_dd has quit [Remote host closed the connection]
<havenwood>
kb3ien: well, that's odd - hrm
jackjackdripper1 has quit [Ping timeout: 255 seconds]
<kb3ien>
The bigger issue, for now, is that I want to use an external cache for these requests, most of which are HTTPS are are therefore implemented as a CONNECT rather than a GET or POST.
<kb3ien>
I'm assuming that there is no way simpler that to edit the https: and change it to http: ?
danzilio has joined #ruby
<kb3ien>
again. simple code changes that anyone can maintain.
simplyianm has quit [Read error: Connection reset by peer]
dmolina has quit [Quit: Leaving.]
droidburgundy has quit [Read error: Connection reset by peer]
dmolina has joined #ruby
sarmiena_ has joined #ruby
chinmay_dd has joined #ruby
Fooster_ has joined #ruby
Fooster has quit [Read error: Connection reset by peer]
<sarmiena_>
is there a standard way of doing a net::http post for multipart data without loading an entire attachment into memory?
simplyianm has joined #ruby
<sarmiena_>
i’m transferring video data & don’t have gigs of ram on the machine to spare
droidburgundy has joined #ruby
axl__ has quit [Ping timeout: 245 seconds]
<chridal>
Any way to avoid the INSANELY annoying automatic string escaping in Ruby?
<Senjai>
chridal: What
<chridal>
Hang on. I'll gist it.
nikhgupt has joined #ruby
nofxx has joined #ruby
<Senjai>
sarmiena_: I'm going to go with yes. I believe you can send chunks
<sarmiena_>
Senjai: i found the documentation for reading in chunks, but haven’t found anything about sending in chunks :/
constantinexvi has quit [Quit: Exiting]
<Senjai>
sarmiena_: or read in chunks, sorry. Is this a web form?
<kb3ien>
wondering if its easier to use `ip` commands to reroute the traffic.
<jhass>
anyway, you want {"APNS_SANDBOX" => inner.to_json }.to_json
MatthewsFace has joined #ruby
edwinvdg_ has joined #ruby
<Senjai>
jhass: Dont need inner.to_json
<chridal>
that one is going to escape into escape hell though
sinkensabe has quit [Remote host closed the connection]
<jhass>
eh, well, removing the one above of course
<chridal>
and lead to three x \\\
<kb3ien>
needs more \.
<jhass>
chridal: note that pry calls .inspect
<jhass>
chridal: compare with puts
<Senjai>
chridal: Is this an API that has to accept a string of json as a value, in a string of json?
<chridal>
aha! So that's why that was happening.
serivich has quit [Ping timeout: 265 seconds]
<chridal>
Senjai: Correct
<Senjai>
chridal: I SAID that...
mrmargolis has quit [Ping timeout: 250 seconds]
<Senjai>
:/
<chridal>
Senjai: I noticed
The_Phoenix has quit [Read error: Connection reset by peer]
ramfjord has quit [Ping timeout: 245 seconds]
<Senjai>
jhass: People just listen to you more I suppose :P
<chridal>
but this is causing three \\\
dopie has quit [Quit: This computer has gone to sleep]
sdothum has joined #ruby
<chridal>
That's the part I was confused about
<jhass>
Senjai: nah, it's the repetition
<chridal>
^
bgmarx has quit [Remote host closed the connection]
<chridal>
Anyhow.
andikr has joined #ruby
<Senjai>
My favorite is when people define inspect methods on objects
<chridal>
So { APNS_SANDBOX: inner }.to_json should produce the wanted output?
<mwlang>
Senjai: nah, it’s not that….jhass has the annoying habit of chiming in after you’ve done did said your piece and start reading instead of typing.
<jhass>
chridal: yeah
<kb3ien>
iptables. whatever.
<chridal>
Will have a go! Thanks.
<chridal>
any way to have pry not do .inspect?
<jhass>
mwlang: heh
<jhass>
chridal: use puts
edwinvdgraaf has quit [Ping timeout: 255 seconds]
lexun has joined #ruby
<chridal>
Thanks. Will try.
sharpmachine has quit [Remote host closed the connection]
Scroff has quit [Remote host closed the connection]
<Senjai>
jhass: Pry still calls inspect on the string
Regulati_ has quit [Remote host closed the connection]
<Senjai>
chridal: No, this is how pry works
lexun has left #ruby [#ruby]
jackjackdripper has quit [Read error: Connection reset by peer]
<jhass>
Senjai: no, on the nil returned by puts
jackjackdripper has joined #ruby
<Senjai>
chridal: If you want to see the raw format, write it out to a file
RegulationD has joined #ruby
<Senjai>
jhass: Ah, right
<Senjai>
sorry
<chridal>
I guess the reason I am so pissed is I couldn't properly test this without pushing through CI to staging ...
Notte has quit [Remote host closed the connection]
<chridal>
bad environment atm
adamjleonard has joined #ruby
balazs has joined #ruby
<chridal>
because to_json
<Senjai>
chridal: That's a you problem, not a String/JSON/Rails/ActiveSupport problem though :P
<Senjai>
The odds of you finding a bug in to_json is extreeeeemeely rare.
constantinexvi has joined #ruby
Fooster_ has quit [Remote host closed the connection]
<chridal>
is in active_support and I couldn't require it
tfitts has joined #ruby
stylus has quit [Ping timeout: 255 seconds]
<chridal>
shouldn't that be possible outside of rails btw? in a .rb file?
<Senjai>
chridal: You can use Oj manually without active support
<tfitts>
Given this array [["A1DTX7RSSYHHWC", 17], ["A2YPCK6GWDEH36", 18], ["A1X9E31IPCZV5I", 19]] is there a one-line way to turn it into a hash such that hash["A1X9E31IPCZV5I"] returns 19
<Senjai>
chridal: If I had the choice, I'd use Oj though
<chridal>
Hold my cyanide while I kick myself in the face.
<Senjai>
?gist tfitts
<ruboto>
tfitts, https://gist.github.com - Multiple files, syntax highlighting, even automatically with matching filenames, can be edited
<jhass>
tfitts: call .to_h on it
<tfitts>
jhass: I knew I was missing something easy/obvious, thanks
sandstrom has quit [Quit: My computer has gone to sleep.]
momomomomo has quit [Quit: momomomomo]
segfalt has quit [Quit: segfalt]
mwlang has quit [Quit: mwlang]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dumdedum has quit [Quit: foo]
k3asd`_ has joined #ruby
<sarmiena_>
So any insight on doing chunked multi part post via net::http to avoid loading the entire file from disk?
DrShoggoth has joined #ruby
dopie has joined #ruby
rdark has quit [Quit: leaving]
<Senjai>
sarmiena_: You didnt answer my question
commondream has joined #ruby
<Senjai>
sarmiena_: Is this a web form?
<sarmiena_>
Senjai: you must have missed it :) i did. sec lemme scroll up
<sarmiena_>
“no. i’m uploading videos from my raspberry pi to flickr account. some videos are about 1GB, but pi only has 1GB total”
mikecmpbll has joined #ruby
tkuchiki has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
dopie has joined #ruby
Notte has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
konieczkow has joined #ruby
jlast has quit [Ping timeout: 256 seconds]
jlast has joined #ruby
duderonomy has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
qwertme has joined #ruby
konieczkow has quit [Ping timeout: 250 seconds]
<lav>
is there any ffi tut. on ruby?
jacaballero has joined #ruby
mdw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler>
lav: the github wiki on the ffi lib is decent, unless you are looking for something more specific
glcx has quit [Ping timeout: 250 seconds]
denver has quit [Remote host closed the connection]
<dfockler>
s/lib/gem
Cust0sLim3n has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ramfjord has joined #ruby
<sarmiena_>
jhass: couple questions about that SO answer. how is the file being chunked? i see the line that says req.body = f.read, but how big is that chunk by default?
Ruinside has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
adamjleonard has quit [Quit: Leaving...]
<jhass>
right, that's a bit weird
nym has joined #ruby
nofxxx has joined #ruby
wookiehangover has quit [Ping timeout: 265 seconds]
nofxx has quit [Disconnected by services]
nofxxx is now known as nofxx
nofxx has quit [Changing host]
nofxx has joined #ruby
<jhass>
no idea, I don't think it's a fully working sample
Lucky__ has joined #ruby
stylus has joined #ruby
lav has quit [Ping timeout: 246 seconds]
nb_bez___ has quit [Quit: Connection closed for inactivity]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
<Ruinside>
Hello Room:)
<sarmiena_>
yeah i can follow the concept, but don’t see how the chunking is actually happening. is it per byte? per kilobyte? and also the fact that it appears to open up a new connection every time seems wasteful if you’re doing this thousands of times
Morrolan has quit [Quit: ZNC: Shutting down.]
<sarmiena_>
not aiming these questions directly at you. just questions i have hehe
Al3ks has joined #ruby
<Ruinside>
Anyone having trouble installing Rails on Mac os 10.10.3?
wookiehangover has joined #ruby
<sarmiena_>
Ruinside: what error are you getting? and how are you trying to install it?
<nofxx>
There;s this nice gem, stringex, for the #to_url method. Very useful but I'm going to call it 2, at most 3 times in all the project. And the gem only works as string ext, was going to suggest a more functional approach: Stringex.to_url("") instead of "".to_url. I mean why have that in all my strings? Am I beign too methodical/systematic?
DrShoggoth has quit [Ping timeout: 256 seconds]
Ruinside has quit [Quit: Leaving...]
sandstrom has joined #ruby
DrShoggoth has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
chouhoul_ has quit [Ping timeout: 246 seconds]
paulcsmith has quit [Quit: Be back later ...]
paulcsmith has joined #ruby
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
lexun has joined #ruby
pietr0 has quit [Quit: pietr0]
kb3ien has quit [Ping timeout: 265 seconds]
michael_mbp has quit [Excess Flood]
sinkensabe has quit [Remote host closed the connection]
swgillespie has joined #ruby
pietr0 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<ericmeds>
what is recommended for measuring code documentation?
simplyianm has quit [Remote host closed the connection]
ndhamecom has joined #ruby
_djbkd has quit [Remote host closed the connection]
Yiota has joined #ruby
InternetFriend has joined #ruby
rbowlby has joined #ruby
GitGud has joined #ruby
wookiehangover has joined #ruby
lkba_ has quit [Ping timeout: 264 seconds]
mistergibson has joined #ruby
mengu has joined #ruby
jackjackdripper1 has quit [Quit: Leaving.]
uptownhr has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
davedev24_ has joined #ruby
[H]unt3r has joined #ruby
symm- has joined #ruby
Outlastsheep is now known as zz_Outlastsheep
DLSteve has joined #ruby
k3asd` has joined #ruby
kahuna_ has joined #ruby
skade has joined #ruby
j_mcnally has joined #ruby
simplyianm has joined #ruby
axl_ has left #ruby [#ruby]
bMalum has quit [Quit: bMalum]
workmad3 has joined #ruby
skade has quit [Ping timeout: 276 seconds]
Mojo_Nixon has joined #ruby
konieczkow has joined #ruby
roger_rabbit has joined #ruby
jmignault has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
jpfuentes2 has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
konieczkow has quit [Ping timeout: 256 seconds]
danzilio has quit [Quit: My computer has fallen asleep!]
simplyianm has quit [Read error: Connection reset by peer]
bMalum has joined #ruby
DrShoggoth has quit [Quit: Leaving]
skade has joined #ruby
<jbisnett>
does anyone know what my cause an "uninitialized constant TOPLEVEL_BINDING" error. I'm currently trying to link a memory allocator to ruby and I am getting that error when linking miniruby
<jbisnett>
might*
danzilio has joined #ruby
simplyianm has joined #ruby
dhjondoh has quit [Remote host closed the connection]
jphenow has quit [Quit: Be back later ...]
jpfuentes2 has quit [Client Quit]
rindolf has quit [Quit: Leaving]
PaulCapestany has joined #ruby
danzilio has quit [Max SendQ exceeded]
wookiehangover has quit [Ping timeout: 256 seconds]
edwinvdg_ has quit [Remote host closed the connection]
<jhass>
?ot yorickpeterse
<ruboto>
yorickpeterse, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
momomomomo_ has joined #ruby
momomomomo has quit [Ping timeout: 265 seconds]
momomomomo_ is now known as momomomomo
edwinvdgraaf has joined #ruby
<jhass>
yorickpeterse: and this time I mean, it's not the place and it will not go anywhere to discuss it
swgillespie has joined #ruby
<jhass>
anybody that responds to this topic in this channel will be removed until 8am CET
edwinvdgraaf has quit [Remote host closed the connection]
paulcsmith has quit [Quit: Be back later ...]
ndrei has quit [Ping timeout: 250 seconds]
Xeago has joined #ruby
<yorickpeterse>
what the fuck
rbennace_ has quit [Remote host closed the connection]
edwinvdgraaf has joined #ruby
<yorickpeterse>
this channel turned sour pretty quickly
<jhass>
it's prone to shitstorm, sorry but being hard is the only way
jpfuentes2 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
ehm no, with all due respect this is called censorship
<apeiros>
yorickpeterse: jhass wants to avoid that #ruby catches on the shitstorm. and he offers an alternative venue.
<jhass>
if you want to discuss join #ruby-offtopic, last word
skade has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
j4cknewt has quit [Remote host closed the connection]
barkerd427 is now known as zz_barkerd427
paulcsmith_ has joined #ruby
skade has quit [Client Quit]
dopie has quit [Quit: This computer has gone to sleep]
ramfjord has joined #ruby
zudochkin has joined #ruby
Mojo_Nixon has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freerobby has quit [Quit: Leaving.]
danzilio has quit [Quit: My computer has fallen asleep!]
sinkensabe has joined #ruby
freerobby has joined #ruby
rbennacer has joined #ruby
ndrei has joined #ruby
<athos_diddy>
back
<athos_diddy>
apeiros did you ever respond this irc client only goes back 300 lines
peter_paule has joined #ruby
<athos_diddy>
turned off join\leave
<jhass>
?logs
<ruboto>
I don't know anything about logs
<jhass>
meh
<apeiros>
athos_diddy: my last status was that you wanted to gist something - did I miss that?
<apeiros>
mkfact!
<jhass>
on it
<yorickpeterse>
there's irclog.whitequark.org
<yorickpeterse>
which is logging this channel
<athos_diddy>
yeah i was getting one together
<athos_diddy>
someone responded but i had to run out and could use a little more clarity
<apeiros>
athos_diddy: remind me - we were discussing Hash and #rehash, right?
<athos_diddy>
yes!
<apeiros>
phew, brain isn't dead yet :D
<athos_diddy>
i can repost the chat in a gist i saved where we left off
eggoez has quit [Ping timeout: 252 seconds]
<apeiros>
backpack.hash_key? # <- that should be .has_key?, right?
<athos_diddy>
::gags::
<athos_diddy>
yes
InternetFriend has joined #ruby
roolo has quit [Remote host closed the connection]
<athos_diddy>
ah yes my point is that sure a word counter is easy you can turn a string to a key and point to an integer, voila counted collection of words
<athos_diddy>
but if it's something more complex that's mutable what should we do
peter_paule has quit [Ping timeout: 265 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
happyface has quit [Quit: Connection closed for inactivity]
momomomomo has joined #ruby
weaksauce has joined #ruby
<apeiros>
athos_diddy: if it's mutable, the question is what do you want the key to be
<apeiros>
the current state? or the object itself
<bhorn1>
Why, when attempting to use the RGBA values to change the color of the background of a gui, does it not return the proper color?
<bhorn1>
Nevermind fixed.
<bhorn1>
Sorry!
<apeiros>
i.e., `key = [1,2,3]; {key => "one two three"}; key << 4` - do you want key still to refer to "one two three"? or should that now be key to another value?
ldnunes has quit [Quit: Leaving]
<athos_diddy>
yes i want it to still point to [1,2,3] in this case
<athos_diddy>
well i don't know if i want to or not i suppose both have different answers
eggoez has joined #ruby
<Senjai>
athos_diddy: Again, whats the problem you're trying to solve
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
athos_diddy: but it never pointed to [1,2,3], it pointed to "one two three"
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Senjai>
nvm
<dfockler>
I was testing Struct and it has the same hash regardless of the value of the fields in the object
<Ponyo>
Hi there, I'm playing with classes and instances in Ruby as a training lesson in Classes and class inheritance. https://gist.github.com/FuzzySunshine/e9f2bf673c91a0398306 I'm wondering if there is an easy way in the class Spades to call Deck's initialize when it's initialize but with players 4 instead of players 2?
konieczkow has joined #ruby
MasterPiece has quit [Quit: Leaving]
<apeiros>
dfockler: um, then something went wrong
<athos_diddy>
ahhhh
<athos_diddy>
right
<apeiros>
dfockler: struct's hash depends on class & values
ndrei has joined #ruby
<dfockler>
well I was changing an Object generated from a struct
GBrawl has joined #ruby
bgmarx has quit [Remote host closed the connection]
<apeiros>
dfockler: different hashes. same object.
<athos_diddy>
what a brilliant way to use an irc bot
<athos_diddy>
that was cool
commondream has quit [Remote host closed the connection]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
Ponyo: sure, just call super inside Spades initialize, it's a normal method after all
<athos_diddy>
so the actual hash is never pointing to the value
<Ponyo>
oh ok, that's where super comes into this, thanks!
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
<athos_diddy>
it's the variable holding the hash
<apeiros>
dfockler: I'm curious - want to gist your code? maybe we can figure why the hash didn't change for you?
yfeldblum has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<athos_diddy>
which you can use for comparisons
mdw has joined #ruby
<athos_diddy>
and that should be fine and not lead to corruption
<apeiros>
athos_diddy: since ruby (sadly) calls the class Hash - do you mean the key's .hash value?
<athos_diddy>
yes sorry
<athos_diddy>
wait
<athos_diddy>
i meant
startupality has joined #ruby
<athos_diddy>
it's the variable holding the Struct
<dfockler>
ahhh apeiros you're right, error on my part
qwertme has joined #ruby
chussenot has joined #ruby
maknz has joined #ruby
<apeiros>
athos_diddy: heh, now I'm confused. let me read your gist (mind you, I'm slightly tired with a bit of a headache, but I hope I can still give you the information you need to figure out how all works together)
commondream has joined #ruby
fabrice31 has quit [Ping timeout: 276 seconds]
subtwo has quit [Ping timeout: 276 seconds]
slash_nick has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
inspiron has joined #ruby
valeriansaliou has joined #ruby
Pupeno has quit [Remote host closed the connection]
<apeiros>
athos_diddy: I see a few misconceptions. let me think how to best unravel them.
<Ponyo>
I'm confused about class inheritance and instance variables, https://gist.github.com/FuzzySunshine/63719c97463dd37d6ae0 shouldn't an instance variable defined by the super be accessible by what called it? I'm getting undefined local variable when I try to inherit the class and run it's functions locally. Error code at the bottom. Thanks
<athos_diddy>
apeiros line 17 should that never be done? brick is a variable (pointing or holding) a struct. In the example it is being used a key pointing to a hash
<inspiron>
i did a: sudo gem uninstall the_gem and it ran. when i type: the_gem at the console it says /usr/bin/the_gem: No such file or directory... How does it sill now about it? how can I completely remove all traces of it
valeriansaliou has quit [Client Quit]
<athos_diddy>
thank you yes i know i'm missing something
<apeiros>
athos_diddy: it's viable and makes sense. what you should not do is change any attribute of brick later in the code.
kb3ien has joined #ruby
<athos_diddy>
right
<athos_diddy>
because that would be bad right?
<athos_diddy>
it lead to corruption
<apeiros>
athos_diddy: if we had the time, the best would probably be to implement a tiny hash class ourselves. that'd explain everything. but not sure I'll stay awake long enough.
<athos_diddy>
so it's this case i was wondering if we should rehash
<athos_diddy>
tomorrow when you wake up i can just show you the project on my github
<athos_diddy>
i'm just working on understanding the caveats of the language and best practice for data collections
<apeiros>
thought it'd go in that direction from the structs' contents ;-)
<athos_diddy>
how to build an interface for it and why I am doing so
<apeiros>
ah, that's not language related. hash tables work like that in every language :)
<athos_diddy>
:)
<athos_diddy>
yes i'm trying to understand that
<athos_diddy>
i'm learning the baseline of programming
<apeiros>
you understand arrays?
<jhass>
Ponyo: take a look at the line mentioned in the error, line 19
<athos_diddy>
yes
<apeiros>
ok
<jhass>
Ponyo: hands is twice there, but it's not the same in both
<apeiros>
you also understand arrays of arrays?
<Senjai>
I wouldn't get to caught up on this stuff athos_diddy. If you're just learning its probably best to not worry about the low level deets. Unless you want to become an apeiros
<athos_diddy>
sure
<athos_diddy>
can we call them 2d arrays
<athos_diddy>
is that appropriate
<Senjai>
It's usually better to just make things in the beginning :P
<yorickpeterse>
ooooooh, apeiros got served
railsraider has joined #ruby
<Senjai>
yorickpeterse: apeiros knows way too much
pwnz0r has joined #ruby
akkad has joined #ruby
<athos_diddy>
it's best to know all
francoi__ has joined #ruby
<athos_diddy>
=P
<Senjai>
athos_diddy: Not when you're first starting out it isnt
<apeiros>
athos_diddy: not really. 2d arrays are often considered to be "rectangles", i.e. all arrays have the same size. that's not necessarily the case with arrays of arrays.
<athos_diddy>
i'm not first starting out
<athos_diddy>
this is what i'm up to
<Senjai>
You said your learning the basics of programming
<athos_diddy>
no
<athos_diddy>
baseline
<Senjai>
Oh, so you already know how to program then?
<athos_diddy>
being a language po9lygot
mhb has joined #ruby
<athos_diddy>
i know ruby and js
<yorickpeterse>
wait, there's the perfect article for this
<athos_diddy>
i learned ruby the first year, then went into JS.. now back to ruby
railsraider has quit [Client Quit]
<athos_diddy>
i've been diving pretty deep past few months
TvL2386 has joined #ruby
x1337807x has joined #ruby
x1337807x has quit [Max SendQ exceeded]
tomphp has joined #ruby
<athos_diddy>
i'd call myself intermediate
allomov has joined #ruby
x1337807x has joined #ruby
<Ponyo>
jhass: oh you are very right, thank you for that
x1337807x has quit [Max SendQ exceeded]
<Ponyo>
Thanks that works well
x1337807x has joined #ruby
pwnz0r has quit [Ping timeout: 252 seconds]
krisquigley has joined #ruby
francoi__ has quit [Ping timeout: 272 seconds]
wildroman2 has joined #ruby
<apeiros>
damn ruby's #hash being randomly seeded
Papierkorb has joined #ruby
crdpink2 has joined #ruby
zudochkin has quit [Remote host closed the connection]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
hrmpf: the bane of talk proposals: "is this too nerdy y/n"
crdpink has quit [Ping timeout: 256 seconds]
rbennacer has quit [Ping timeout: 244 seconds]
<Senjai>
yorickpeterse: What?
<BanzaiJoe>
always no, dive, dive, dive!
momomomomo has quit [Quit: momomomomo]
<yorickpeterse>
Senjai: trying to write down a talk proposal for Arrrrcamp, unsure if it's too hardcore or not
<Senjai>
yorickpeterse: What's your topic?
<athos_diddy>
yorickpeterse good article
nikhgupt has quit [Ping timeout: 250 seconds]
krisquigley has quit [Ping timeout: 265 seconds]
crdpink2 has quit [Remote host closed the connection]
<yorickpeterse>
Senjai: I want to focus on parsing/performance in the context of Oga and such, since that's what I've been doing mostly in the past year or so
<BanzaiJoe>
yorickpeterse isn't Arrrrcamp more hardcore to start with?
<yorickpeterse>
Not specifically Oga, but it would involve some bits related to it
<yorickpeterse>
BanzaiJoe: No idea, never went there
crdpink2 has joined #ruby
workmad3 has joined #ruby
<Senjai>
yorickpeterse: I dont think parsing would be too bad.
* dukedave
thought such modifiers were supposed to go on the mode string, not the filename
<apeiros>
athos_diddy: it works the same. a hash value is calculated from the struct's value.
<athos_diddy>
right
<athos_diddy>
so the question is
<athos_diddy>
should we never do that?
rjno has joined #ruby
<athos_diddy>
because Yuki talked about data corruption
<dukedave>
Ah, I see, it moves the file after, nvm
<apeiros>
we can do that, it's ok and there's plenty of cases where that's making a lot of sense
<athos_diddy>
because that is in fact a mutable object
<athos_diddy>
OK!!!
<apeiros>
you can make it immutable by using .freeze e.g.
failshell has quit [Ping timeout: 244 seconds]
<undeadaedra>
"Mr".freeze
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<athos_diddy>
or private
<apeiros>
what you should not do is change any value in the struct
<apeiros>
because from what you can see from the emulation - if you change the value, the hash changes too
rbowlby_ has quit [Remote host closed the connection]
<apeiros>
but the associated value is already stored in a bucket, using the old hash value
<athos_diddy>
i know i'll end up using this in real world cases possibly with rails
kerrizor has joined #ruby
rbowlby has joined #ruby
<apeiros>
so it can never be found with the new hash value. it'll look in the wrong bucket
bgmarx has joined #ruby
<athos_diddy>
ok
<athos_diddy>
so if just write a function with logic comparing equality we are fine
<athos_diddy>
since it's flexible with changes
jackjackdripper has quit [Read error: Connection reset by peer]
<apeiros>
what rehash does is remove all key/value pairs from all buckets, and then put them back into the correct bucket according to their current .hash value
jackjackdripper has joined #ruby
<athos_diddy>
this could be considered polymorphism?
<athos_diddy>
if we start talking about subtype poly?
<athos_diddy>
oohhh!!!
<athos_diddy>
rehash will update all the keys of the collection
JoshL has quit []
<athos_diddy>
this can be considered garbage collection
<athos_diddy>
?
<apeiros>
re rehash: yes. which is why it is expensive
<apeiros>
no, nothing is collected
<athos_diddy>
expensive meaning less profit.. system overhead
nickfausnight has joined #ruby
<athos_diddy>
like in pop
<athos_diddy>
principals of programming
commondream has joined #ruby
commondream has quit [Remote host closed the connection]
fgo has joined #ruby
GBrawl has quit [Quit: (null)]
bkxd has quit [Ping timeout: 252 seconds]
<yorickpeterse>
Senjai: so re parsers, what would you be interested in learning about them?
<yorickpeterse>
other than "how they work" because that's too abstract
ramfjord has quit [Ping timeout: 244 seconds]
last_staff has quit [Quit: last_staff]
lostcuaz has quit [Read error: Connection reset by peer]
<undeadaedra>
AbstractParser
<Senjai>
yorickpeterse: Generally that is what you'd want to know. There's a large number of concepts that come into play with parsing.
lostcuaz_km has joined #ruby
phizzbuzz has joined #ruby
<athos_diddy>
apeiros merci! that was awesome
<apeiros>
athos_diddy: expensive as in overhead, lots of CPU cycles
<undeadaedra>
« merci »
<athos_diddy>
ok cpu cycles got it
<Senjai>
Going through how a parser would be able to find a value in a dom tree, even a simple one would be worth knowing
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Senjai>
I bet there's also lots to learn specifically about recursion, and lookup optimization as well
<Senjai>
Speaking from someone who knows very little aobut parsing
<athos_diddy>
wow so i wonder how it would look if the key was an immutable string pointing to a hash containing the struct and another hash
<yorickpeterse>
Yeah, though that I can't all fit in ~30 minutes
<yorickpeterse>
though I intend to spread that out over some articles
ramfjord has joined #ruby
<yorickpeterse>
once I get to it...next year or something :P
sgambino has joined #ruby
<yorickpeterse>
I really hope cloning picks up in the coming decade, having a few clones of myself wouldn't be a bad idea
<athos_diddy>
i think i may avoid that rabbit hole and practice rails for a possible interview... and learn more about polymorphism. thank you everyone for the help today
<apeiros>
athos_diddy: you're welcome. I hope it helped your understanding
<athos_diddy>
it helped greatly and i saved the discussion earlier and i'm about to save this gist example too!
frem has quit [Quit: Connection closed for inactivity]
<Senjai>
yorickpeterse: You should be able to keep it at a high leve right? possibly?
tomphp has joined #ruby
<yorickpeterse>
oh sure, but that means I can't go into too many details
<yorickpeterse>
which is part of the art of writing a good talk, but at the same time stupid difficult
<Senjai>
How you store data once parsed and how lookups are done on that data is pretty interesting. Specifically if there's a lot of ways to do it wrong
<yorickpeterse>
actually the storing of results is the boring part :P
<Senjai>
yorickpeterse: The best thing I could learn from parsing, is the ability to write more configuration files in different ways for my programs and not be terrible at interpreting them
micmus has quit [Ping timeout: 264 seconds]
ldnunes has quit [Quit: Leaving]
<Senjai>
though I'd probably just use the standard formats, unless it was for like a game, or something more involved
<yorickpeterse>
at least after aphyr got his hands on it
workmad3 has joined #ruby
<miah>
they fixed _some_ of their issues for _certain_ cases
<miah>
i dont think 1.6.0 is _quite_ there yet
<yorickpeterse>
Granted we ditched ES a while ago
<yorickpeterse>
haven't really kept up since
<yorickpeterse>
We stopped using it prior to 1.0
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<miah>
i was reading the changelog the other day, we havent updated to it yet
<nofxx>
those services I too damn expensive... and the limit is a slap in the face: 10gb/month. But it'll not drop the old ones to get you the new ones.
<miah>
its certainly gotten better. but i think it still has a ways to go
<yorickpeterse>
nofxx: which services?
jgpawletko has quit [Quit: jgpawletko]
<nofxx>
yorickpeterse, use something for text search?
<nofxx>
yorickpeterse, log aggregrators
<yorickpeterse>
Oh right
<yorickpeterse>
logentries isn't that bad
<yorickpeterse>
though their interface is a bit dodgy
<yorickpeterse>
typical JS app: shits itself half the time
evilthomas is now known as thomas
<miah>
i work for a bank, we're not going to ship our logs offsite..
<nofxx>
yorickpeterse, they at least drop the old ones if I happen to overflow my limit?
<yorickpeterse>
nofxx: not sure, haven't had that problem yet
<yorickpeterse>
we only log a few GB/month
kadoppe has quit [Ping timeout: 250 seconds]
<nofxx>
yorickpeterse, gonna check it out.
<yorickpeterse>
I'm not super stoked about logentries, the main reason we use it is due to its alerting system
jackjackdripper1 has joined #ruby
jackjackdripper2 has joined #ruby
<yorickpeterse>
miah: oh yeah, that makes sense
<yorickpeterse>
we don't really log sensitive information
wildroman2 has quit [Remote host closed the connection]
<yorickpeterse>
mostly stuff like "Alice edited user #12381923" and such
<miah>
ya
<miah>
we're working on ensuring that heka filters that stuff out
kadoppe has joined #ruby
workmad3 has quit [Ping timeout: 252 seconds]
jackjackdripper has quit [Ping timeout: 256 seconds]
sharpmachine has joined #ruby
<yorickpeterse>
welp, in the mean time I managed to whip together an excerpt it seems
<miah>
cool
allomov has quit [Remote host closed the connection]
<yorickpeterse>
oh the wonders of paper and pen
<yorickpeterse>
I really need a better fountain pen though
ogpastal_ has quit [Remote host closed the connection]
mengu has quit [Remote host closed the connection]
ogpastaling has joined #ruby
rubie has joined #ruby
omegahm has joined #ruby
jackjackdripper1 has quit [Ping timeout: 264 seconds]
davedev2_ has joined #ruby
paulcsmith_ has quit [Quit: Be back later ...]
startupality has quit [Quit: startupality]
umgrosscol has quit [Remote host closed the connection]
Casty has joined #ruby
startupality has joined #ruby
commondream has joined #ruby
davedev24_ has quit [Ping timeout: 272 seconds]
sinkensabe has quit [Remote host closed the connection]
nym has quit [Quit: Connection closed for inactivity]
<yorickpeterse>
I think it's worse than I can actually read that for the most part
<ljarvis>
yep that'll do it
<ljarvis>
what's [..], slice coerce?
bMalum has quit [Quit: bMalum]
<yorickpeterse>
Hm, that I'm not sure about actually
commondream has quit [Ping timeout: 265 seconds]
rodfersou has quit [Quit: leaving]
<ljarvis>
apart from that I can read it
<ljarvis>
though it's really not pleasant
<yorickpeterse>
you have become one with Rust young padawan
<yorickpeterse>
unwrap() you must
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis>
I haven't actually found a use for it yet, so I would be just re-writing something way less epic than redis
RobertBirnie has quit [Ping timeout: 264 seconds]
<ljarvis>
do you even try!
<yorickpeterse>
Funny enough I might actually have to port over ruby-ll to Rust at some point
<yorickpeterse>
rust-peg sucks since it requires nightly builds
<yorickpeterse>
and the only real other alternative is a parsing combinator, not a generator
A205B064 has joined #ruby
cumorris has quit [Remote host closed the connection]
<yorickpeterse>
I can never get a break from all this yak shaving :<
<ljarvis>
I have too much unfinished crap to deal with new things :(
jphenow has quit [Quit: Be back later ...]
pragmatism has joined #ruby
<yorickpeterse>
Currently my list is: Oga (usualy stuff), OpenSSL/Digest multi-threading crap on Rubinius, proglang in Rust, fixing the Socket lib for Rubinius
<yorickpeterse>
I think that's all
<yorickpeterse>
which is like 5 years worth of work
<yorickpeterse>
and 1512930812093 blog posts
crdpink2 has joined #ruby
Mojo_Nixon has joined #ruby
<ljarvis>
I need to get back on track with Mechanize, and then finish my proglang also
RobertBirnie has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ljarvis>
eh "finish" = get it good enough to not suck
Mojo_Nixon has quit [Client Quit]
rjno has quit []
<ljarvis>
yorickpeterse: I'm not sure I'd agree with your first sentence, though I might be biased because I spent months and months writing parsers
platzhirsch has joined #ruby
<ljarvis>
I like the idea of exploring different algs
jgpawletko has joined #ruby
<yorickpeterse>
ljarvis: you've obtained the status of "person who knows parsing"
<yorickpeterse>
which is like 1% of the total programmer population :P
<ljarvis>
I thought it was popular
<yorickpeterse>
oh?
<ljarvis>
although.. i have always struggled to find really good docs
<ljarvis>
so maybe not
<yorickpeterse>
From what I gather it's the opposite: people treat it as a black box
devdazed has quit [Ping timeout: 276 seconds]
<ljarvis>
people end up avoiding hand writing parsers because they're lazy or don't know how to do it. Or, they know exactly how to do it and they know how mind numbing and time consuming it is
<ljarvis>
I *love* writing hand-written parsers, but i'm weird as fuck so *shrug*
<yorickpeterse>
heh, I'm too lazy for that
<yorickpeterse>
ain't got no time fo that
<ljarvis>
see point 1
simplyianm has quit [Read error: Connection reset by peer]
<yorickpeterse>
heh
<ljarvis>
I enjoy it. I have a crap load of things I've built with relation to parsing that I haven't released though :( relapse (the only ruby related project) seriously needs to gtfo
<yorickpeterse>
why write a parser when you can write code to generate a parser? :P
<ljarvis>
meh
platzhirsch has left #ruby [#ruby]
<yorickpeterse>
(answer: because that takes a few months and makes you hate yourself)
<ljarvis>
parser generators suck at fine grained error reporting
<ljarvis>
and im just a parser nerd
<yorickpeterse>
and hate all those academic nuts out there who only upload .ppt files that don't explain shit
<yorickpeterse>
ljarvis: actually LL(1) has pretty good error reporting
simplyianm has joined #ruby
<yorickpeterse>
LALR is just a joke
<yorickpeterse>
(error wise)
<ljarvis>
there's a lot of pretenciousness when you dig deep enough
<ljarvis>
pretentiousness*
<bougyman>
CREATE INDEX CONCURRENTLY idx_measurement_readings_compound ON measurement_readings USING btree (asset_id, measurement_tag_type_id, reported_at);
<bougyman>
er
<ljarvis>
wrong window yo
<yorickpeterse>
bougyman: CREATE INDEX
<yorickpeterse>
:D
[H]unt3r has quit []
<ljarvis>
CONCURRENTLY
<yorickpeterse>
oh shit you're right
<ljarvis>
^ my favourite thing
<bougyman>
:)
<Aria>
Parsers? Marpa.
<yorickpeterse>
I recently had our DB shit itself
<yorickpeterse>
because in Sequel I use :concurrent instead of :concurrently
<yorickpeterse>
so did my tests
<bougyman>
ugh
<yorickpeterse>
so they passed just fine
<ljarvis>
heh
<yorickpeterse>
:<
chussenot has quit [Quit: chussenot]
zenguy_pc has quit [Read error: Connection reset by peer]
<ljarvis>
I've done it before too
<ljarvis>
I did it once
<ljarvis>
then scared myself
<yorickpeterse>
it worked fine for weeks
<yorickpeterse>
then suddenly it raced
decoponio has quit [Quit: Leaving...]
<ljarvis>
did it win?
<yorickpeterse>
(as in, for weeks it didn't do it concurrently without problems, then somehow it got stuck)
chussenot has joined #ruby
<ljarvis>
add_index, algorithm: :concurrently <- my jam
j4cknewt has joined #ruby
<yorickpeterse>
now for the hardest part of a talk: the title
shadoi has quit [Quit: Leaving.]
workmad3 has joined #ruby
skade has joined #ruby
paulcsmith__ has quit [Quit: Be back later ...]
jacaballero has quit [Ping timeout: 265 seconds]
rbowlby has quit [Ping timeout: 276 seconds]
<undeadaedra>
Use GitHub project name generator.
__butch__ has quit [Read error: Connection reset by peer]
i831533 has joined #ruby
<yorickpeterse>
"How about turbo-octo-bear." k
<undeadaedra>
:D
<yorickpeterse>
"How about north-american-happiness." oooooooh
i831533 has quit [Client Quit]
<yorickpeterse>
"How about massive-hipster." hahahahaha
<undeadaedra>
I got one with '-yolo-swag' once
__butch__ has joined #ruby
<yorickpeterse>
"How about spawncamping-sansa." somebody was salty
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rbowlby has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 244 seconds]
workmad3 has joined #ruby
<nietzschette>
Is there a list somewhere of ENV keys by OS?
mengu has joined #ruby
<shevy>
don't think so
<shevy>
isn't ENV typically empty anyway?
<yorickpeterse>
nietzschette: No, because the list is not fixed
<bougyman>
no
<bougyman>
ENV should always be populated.
<yorickpeterse>
But you can get the currently set env variables using just ENV.keys
arturhoo has quit [Quit: arturhoo]
<bougyman>
but you never know what will be in it.
<yorickpeterse>
(their names that is)
sandstrom has quit [Quit: My computer has gone to sleep.]
<shevy>
>> p ENV
<ruboto>
shevy # => {"LIBC_FATAL_STDERR_"=>"1", "LANG"=>"en_US.UTF-8", "HOME"=>"/tmp/execpad-c918369fc6bc"} ...check link for more (https://eval.in/384003)
momomomomo has quit [Ping timeout: 256 seconds]
quazimodo has quit [Ping timeout: 265 seconds]
<yorickpeterse>
boom, proposal sent
wildroman2 has joined #ruby
ruurd has joined #ruby
guillaume-rb has quit [Quit: guillaume-rb]
<yorickpeterse>
even have my eyes set on a pirate costume :D
uptownhr has quit [Quit: uptownhr]
skade has quit [Quit: Computer has gone to sleep.]
micmus has quit [Quit: Leaving]
rbowlby_ has joined #ruby
zenguy_pc has joined #ruby
ndrei has quit [Ping timeout: 265 seconds]
<yorickpeterse>
well, if I could actually find it that is
<nietzschette>
um, is it close to Halloween in your timezone?
railsraider has quit [Quit: railsraider]
<yorickpeterse>
No
ruurd has quit [Client Quit]
dede has quit [Quit: Connection closed for inactivity]
zenguy_pc has quit [Read error: Connection reset by peer]
<undeadaedra>
Define 'close'
<undeadaedra>
at ±12 months, it is
rbowlby has quit [Read error: Connection reset by peer]
<nietzschette>
too true
icebourg has quit []
<shevy>
tomorrow
keernel has quit [Ping timeout: 256 seconds]
k3asd` has quit [Ping timeout: 252 seconds]
keernel has joined #ruby
<Senjai>
yorickpeterse: I can sees proposal?
fabrice31 has joined #ruby
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tercenya has quit [Read error: Connection reset by peer]
jbisnett has quit [Ping timeout: 246 seconds]
tercenya has joined #ruby
cndiv has quit []
krisquigley has joined #ruby
ogpastaling has joined #ruby
jlast has quit [Remote host closed the connection]
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DEA7TH has joined #ruby
RobertBirnie has quit [Ping timeout: 250 seconds]
dgutierrez1287 has joined #ruby
jackjackdripper has joined #ruby
<kb3ien>
Well the efforts to get ruby (passenger) to use http_proxy are largely not working. I'm okay with modifying the code as all the requests that I care about originate in one .rb file.
jfarmer has joined #ruby
cndiv has joined #ruby
cndiv has quit [Changing host]
cndiv has joined #ruby
jackjackdripper1 has joined #ruby
segfalt has quit [Read error: Connection reset by peer]
jackjackdripper2 has quit [Read error: Connection reset by peer]
Jarboe has joined #ruby
krisquigley has quit [Ping timeout: 255 seconds]
icebourg has quit []
<kb3ien>
I've copied the file from '/usr/local/lib/ruby/gems/2.0.0/gems/ebsco-discovery-service-api-1.0.4/lib/ebsco-discovery-service-api.rb
mgorbach has joined #ruby
RobertBirnie has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<kb3ien>
' to /var/www/local_gems/ebsco-discovery-service-api-1.0.4/lib/ , updated the Gemfile with the path thusly "gem "ebsco-discovery-service-api", "1.0.4" , :path => '/var/www/local_gems/ebsco-discovery-service-api-1.0.4/lib/' -- but it's notworking should not there be a *.gem file involved ?
ericmeds has quit [Read error: Connection reset by peer]
commondream has joined #ruby
phizzbuzz has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Ping timeout: 272 seconds]
tcrypt has quit [Read error: Connection reset by peer]
dzejrou has quit [Ping timeout: 252 seconds]
PaulCapestany has quit [Read error: Connection reset by peer]
edwinvdgraaf has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 276 seconds]
tcrypt has joined #ruby
<kb3ien>
because the error is now "uninitialized constant Blacklight::ArticlesHelperBehavior::EDSApi" , which the the Controller define in that file.
kb3ien has left #ruby [#ruby]
eam has quit [Ping timeout: 265 seconds]
_phwelo has quit [Ping timeout: 245 seconds]
eam has joined #ruby
ericmeds has joined #ruby
PaulCapestany has joined #ruby
stonith has quit [Quit: No Ping reply in 180 seconds.]
startupality has quit [Quit: startupality]
blaines has joined #ruby
sivoais has quit [Ping timeout: 256 seconds]
nwhirschfeld has quit [Ping timeout: 256 seconds]
michaelreid has quit [Ping timeout: 252 seconds]
A205B064 has quit [Ping timeout: 250 seconds]
atomi has quit [Ping timeout: 250 seconds]
tvw has quit [Remote host closed the connection]
nwhirschfeld has joined #ruby
axisys has quit [Ping timeout: 256 seconds]
mahlon has quit [Read error: Connection reset by peer]
ozzloy has quit [Ping timeout: 264 seconds]
existensil has quit [Ping timeout: 256 seconds]
axisys has joined #ruby
stonith has joined #ruby
tomphp has joined #ruby
ozzloy has joined #ruby
ozzloy has joined #ruby
ozzloy has quit [Changing host]
atomi has joined #ruby
AlexAltea has quit [Ping timeout: 272 seconds]
sivoais has joined #ruby
sharpmachine has quit [Read error: Connection reset by peer]
sanguisdex has quit [Ping timeout: 256 seconds]
edwinvdgraaf has joined #ruby
failshell has joined #ruby
sharpmachine has joined #ruby
<zenspider>
you left before getting a response... idgi
matp_ has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jgpawletko has quit [Quit: jgpawletko]
PaulCapestany has quit [Max SendQ exceeded]
mahlon has joined #ruby
ogpastaling has quit [Remote host closed the connection]
existensil has joined #ruby
jackjackdripper has joined #ruby
ogpastaling has joined #ruby
crdpink2 has quit [Remote host closed the connection]
jackjackdripper2 has joined #ruby
crdpink2 has joined #ruby
swgillespie has joined #ruby
<dfockler>
they were on here earlier
<nietzschette>
Scope resolution, maybe?
marienz has quit [Ping timeout: 608 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
<nietzschette>
I'm not one of the gurus
matp has quit [Ping timeout: 252 seconds]
tomaw has quit [*.net *.split]
rubie has quit [*.net *.split]
jpfuentes2 has quit [*.net *.split]
_djbkd has quit [*.net *.split]
symm- has quit [*.net *.split]
Agoldfish has quit [*.net *.split]
MatthewsFace has quit [*.net *.split]
Spami has quit [*.net *.split]
spider-mario has quit [*.net *.split]
jwilson_ has quit [*.net *.split]
datanoise has quit [*.net *.split]
Akagi201 has quit [*.net *.split]
ZOMGITSABEAR has quit [*.net *.split]
iwishiwerearobot has quit [*.net *.split]
Rarikon has quit [*.net *.split]
RazorX has quit [*.net *.split]
alphaatom|pc has quit [*.net *.split]
surs has quit [*.net *.split]
sumark has quit [*.net *.split]
cats has quit [*.net *.split]
systemd0wn has quit [*.net *.split]
meatchicken has quit [*.net *.split]
scottstamp has quit [*.net *.split]
S_Walker has quit [*.net *.split]
WillAmes has quit [*.net *.split]
quarcu_ has quit [*.net *.split]
avelldiroll has quit [*.net *.split]
mr_rich101 has quit [*.net *.split]
aytch has quit [*.net *.split]
unreal has quit [*.net *.split]
TinkerTyper has quit [*.net *.split]
Kharma has quit [*.net *.split]
mrsolow has quit [*.net *.split]
fold has quit [*.net *.split]
thomas has quit [*.net *.split]
gregf_ has quit [*.net *.split]
tdy has quit [*.net *.split]
EnergyCoffee has quit [*.net *.split]
mansel has quit [*.net *.split]
oz has quit [*.net *.split]
zz_Outlastsheep has quit [*.net *.split]
ccooke has quit [*.net *.split]
Steve_Jobs has quit [*.net *.split]
maloik has quit [*.net *.split]
tris has quit [*.net *.split]
closer has quit [*.net *.split]
RTG` has quit [*.net *.split]
eshy has quit [*.net *.split]
cibs has quit [*.net *.split]
nfsnobody has quit [*.net *.split]
yaw has joined #ruby
A205B064 has joined #ruby
yaw has left #ruby [#ruby]
_phwelo has joined #ruby
failshell has quit [Ping timeout: 244 seconds]
michaelreid has joined #ruby
s2013 has joined #ruby
jackjackdripper1 has quit [Ping timeout: 264 seconds]
j_mcnally has joined #ruby
jackjackdripper2 has quit [Read error: Connection reset by peer]
danzilio has quit [Quit: Baiii!]
swgillespie has quit [Client Quit]
jackjackdripper1 has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
bigmac_ has joined #ruby
bigmac_ is now known as i8igmac
Igorshp has joined #ruby
arcanez has joined #ruby
<arcanez>
is there an easy/short way to take { :foo => 'bar', :baz => 'quux' } and make a string "foo=bar baz=quux"
DEA7TH has quit [Ping timeout: 272 seconds]
hinbody has quit [Read error: Connection reset by peer]
<arcanez>
I imagine there is always someone that has it worse
<arcanez>
being stuck on ruby 1.9.3 and rails 2 isn't fun
atomical_ has quit [Ping timeout: 248 seconds]
<elektronaut>
hah. i still have 5 projects stuck on 1.8.7 / rails 2
<elektronaut>
hopefully 2015 will be the year i can finally retire 1.8.7 from production
<arcanez>
sucks when you google for how to do something in AR and you find the 3/4 results.. then realize you can't do that in 2 :(
et09 has joined #ruby
<et09>
how do i get comprehensive class info/derivation etc. for a variable?
fgo has joined #ruby
<elektronaut>
fortunately, there's not that much you can do in 2, so it's easy to keep in your head
<elektronaut>
although i'm getting rusty on that
rubie has quit [Remote host closed the connection]
<jfarmer>
arcanez You....really should upgrade.
renderfu_ has joined #ruby
<arcanez>
not my decision sadly
<Senjai>
arcanez: Tell the person who can make the decision if they dont they're stupid
<Senjai>
Rails 2 is just .. no
<jfarmer>
There are maybe more effective ways to convince them, haha.
paulcsmith__ has joined #ruby
<arcanez>
I can't imagine how many 2isms we have though
paulcsmith__ has quit [Client Quit]
<jfarmer>
But Rails 2 is not just out of date — it's obsolete.
tkuchiki has quit [Remote host closed the connection]
<jfarmer>
There's no support for it, there are almost certainly security holes
<Ox0dea>
Is it possible to simulate -> lambdas in Ruby 1.0?
<Senjai>
jfarmer: 1.8 is terribly scary
<arcanez>
is there a backcompat layer or way to find incompatible things in your code before you upgrade 2->3 or 2->4?
<elektronaut>
there was a gem, i can't remember what it's called
<jfarmer>
arcanez Maybe. This is something that most people dealt with 3-4 years ago.
<arcanez>
:)
x1337807x has quit [Ping timeout: 256 seconds]
<elektronaut>
rails_upgrade
volty has quit [Quit: Konversation terminated!]
eggoez has quit [Ping timeout: 256 seconds]
francois_ has joined #ruby
renderfu_ has quit [Ping timeout: 255 seconds]
<zenspider>
everything is obsolete pretty much as soon as its published
<arcanez>
zenspider: I think it's more that there aren't any security patches provided
inspiron has quit [Quit: Leaving]
Musashi007 has joined #ruby
kb3ien has joined #ruby
<elektronaut>
there's rails LTS at least
<kb3ien>
I'm still stumped forcing a ruby on rails app to consistently use a proxy.
<elektronaut>
haven't tried it. but i imagine there's quite a few projects still stuck on rails 2 out there.
eggoez has joined #ruby
commondream has quit [Remote host closed the connection]
snockerton has quit [Quit: Leaving.]
<kb3ien>
I did the 'SetEnv http_proxy http://127.1:8888' thing in the VirtualHost ; I told apache to use a shell script that injected that into the environment, but seems that apache doesnt actually launch roby directly most of the time, but rather users Passenger. How does one make Passenger set the http_proxy env var ?
commondream has joined #ruby
FernandoBasso has joined #ruby
blue_deref has joined #ruby
<Senjai>
kb3ien: Could always use Nginx :P
<zenspider>
argh. I have a rails/AR default_scope question... and MAN i don't want to go to #rubyonrails to ask it. :P
jwilson_ has quit [Quit: bye bye]
d5sx43 has quit [Quit: Leaving...]
idafyaid has quit [Ping timeout: 246 seconds]
<kb3ien>
Ah, well its taken me long enough to learn apache well enough for everything I use. I'd hate to switch. how does one set the environment for Passenger ?
blaines has quit [Ping timeout: 276 seconds]
<kb3ien>
actually I did set the env by editing /etc/apache2/mods-enabled/passenger.conf to use a wrapper too.
commondream has quit [Remote host closed the connection]
datanoise has quit [Ping timeout: 265 seconds]
Lucky__ has joined #ruby
francois_ has quit [Ping timeout: 245 seconds]
simplyianm has quit [Read error: Connection reset by peer]
simplyianm has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
fgo has quit [Ping timeout: 256 seconds]
andywojo has quit [Quit: Lost terminal]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kb3ien>
I did confirm that the ENV['http_proxy'] is set by the ruby-wrapper I wrote : I envoked it and ran STDOUT.puts ENV['http_proxy'] and got the expected value.
swgillespie has joined #ruby
Ropeney has joined #ruby
Yiota has joined #ruby
swgillespie has quit [Client Quit]
dmolina has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
sdothum has joined #ruby
<zenspider>
that was relatively painless
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
uptownhr has joined #ruby
<arcanez>
Senjai: ++ for nginx
brainshim has quit [Ping timeout: 276 seconds]
<arcanez>
is passenger still a good thing to use?
<Senjai>
kb3ien: Apache is terrible, so is passenger @_@
mdw has joined #ruby
<kb3ien>
Passenger is terrible. Might not the problem be in NET::Http , which is also none too clean ?
<et09>
what's betterthanpassenger
AndroidLoverInSF has quit [Quit: This computer has gone to sleep]
<Senjai>
et09: unicorn, mostly
<et09>
how so?
axl_ has joined #ruby
<Senjai>
et09: Ruby thrives in a process based model, threads are highly overrated
quazimodo has joined #ruby
wallerdev has quit [Quit: wallerdev]
mdw has quit [Client Quit]
<Senjai>
It works swimmingly with nginx
<et09>
hmm
uptownhr has quit [Client Quit]
<et09>
passenger runs them in threads?
<Senjai>
and each unicorn 'master' acts as a load balancer, that can kill each sub process if it fails
<et09>
i have severalpassenger procs on the server
<Senjai>
or eats too much memory
ramfjord has quit [Ping timeout: 244 seconds]
<et09>
what about "Raptor" passenger
failshell has joined #ruby
failshell has quit [Remote host closed the connection]
<bougyman>
nginx in front of a pile of thins never did me wrong.
failshell has joined #ruby
<bougyman>
i'm on the fence about unicorn. with a good config it can be tame enough.
uptownhr has joined #ruby
dfockler has quit [Remote host closed the connection]