<banisterfiend>
also: "Practical reasons exist for checking the invariant after a return from a wait other than spurious wakeups. For example, a woken-up thread may not be scheduled immediately after the wake up, but be at the mercy of the system scheduler. A scheduler may preempt a process abruptly or schedule other threads. It may be the case that, in the meantime, an external entity (another process or hardware) has invalidated the invariant
<banisterfiend>
assumption. As with spurious wakeup, wrapping the wait with a loop avoids such cases."
<banisterfiend>
in other words, if your thread wakes up as a result of waiting on a condition variable, yo ustill have to check the condition
zorak8 has quit [Ping timeout: 272 seconds]
<banisterfiend>
90% of ruby threading tutorials i've seen get that wrong :) (they don't re-check the condition after being woken up)
<havenwood>
ahh, interesting
kith has quit [Ping timeout: 250 seconds]
jonr2219 has quit [Ping timeout: 264 seconds]
<havenwood>
back in a few
havenwood has quit [Remote host closed the connection]
ekinmur has joined #ruby
kirun has quit [Quit: Client exiting]
cleopatra has quit [Remote host closed the connection]
thsig has quit [Remote host closed the connection]
Pupeno has joined #ruby
supersym has quit [Ping timeout: 255 seconds]
jottr has quit [Ping timeout: 245 seconds]
ekinmur has quit [Quit: no longer available]
Cache_Money has quit [Quit: Cache_Money]
renderful has joined #ruby
Cache_Money has joined #ruby
renderful has quit [Ping timeout: 258 seconds]
timonv_ has quit [Ping timeout: 272 seconds]
cleopatra has joined #ruby
Xeago has quit [Remote host closed the connection]
Scripore has joined #ruby
mkaesz has joined #ruby
kith has joined #ruby
havenwood has joined #ruby
Pupeno has quit [Remote host closed the connection]
lampd1 has quit [Remote host closed the connection]
<weaksauce>
I can't seem to figure out how to make a function that is able to be called without the parentheses and takes a block that it yields to... It's just a quick thing for an import script and it works fine if I call it with the parens but I am curious how to get that to work correctly.
<apeiros>
weaksauce: let me guess - you call it like this: `ary.each_with_index_starting_at 12 { …`
<weaksauce>
yeah that's what I did... I just tried it with do end and it worked
<weaksauce>
what's the difference?
DLSteve has quit [Quit: Leaving]
<weaksauce>
apeiros you nailed it
<apeiros>
precedence
<apeiros>
with `foo 12 {`, the block is associated to 12, not foo
<apeiros>
and 12 - obviously - does not accept a block
commmmodo has quit [Quit: commmmodo]
<weaksauce>
very interesting... I thought { and do were basically synonymous
<apeiros>
other than precedence they are
<weaksauce>
any idea why they have different precedence?
<weaksauce>
what's the use case for it
<apeiros>
because that's how they've been designed
chipotle has joined #ruby
commmmodo has joined #ruby
<apeiros>
IME it lends itself for using do/end for side effect, {} for return value.
<weaksauce>
I see... thanks for the help
SCHAAP137 has quit [Quit: Leaving]
jimbach has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
SCHAAP137 has joined #ruby
ghr has joined #ruby
fabrice31 has joined #ruby
jottr has joined #ruby
<benzrf>
i generally use {} for 1 liners, do..end for multi line
sdwrage has joined #ruby
lucyinthesky has joined #ruby
<banisterfiend>
benzrf i thought you only id haskell these days
josephndenton has joined #ruby
ghr has quit [Ping timeout: 265 seconds]
lampd1 has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
fabrice31 has quit [Ping timeout: 258 seconds]
<benzrf>
tbh i dont write much code at all these days :v(
Cache_Money has quit [Quit: Cache_Money]
josephndenton has quit [Ping timeout: 258 seconds]
<banisterfiend>
benzrf what're you doing with yourself then?
Arnie25 has joined #ruby
<benzrf>
learning to use coq & stuff
<benzrf>
teaching other ppl about math & haskell
mary5030 has joined #ruby
KLVTZ has joined #ruby
marr has quit [Ping timeout: 252 seconds]
spastorino has joined #ruby
StephenA1 has joined #ruby
<StephenA1>
How do you sign a oauth request?
klmlfl has quit [Remote host closed the connection]
<StephenA1>
using oauth-ruby. The docs are a little light on the detail
<StephenA1>
any examples would be appreacited
<StephenA1>
oauth1.0a
chipotle_ has joined #ruby
iamninja has quit [Quit: ZZZzzz…]
kiyote23 has joined #ruby
iamninja has joined #ruby
phutchins has joined #ruby
robustus has quit [Ping timeout: 255 seconds]
chipotle has quit [Ping timeout: 252 seconds]
cleopatra has quit [Remote host closed the connection]
charlenopires has joined #ruby
robustus has joined #ruby
kiyote23 has quit [Ping timeout: 240 seconds]
phutchins has quit [Ping timeout: 240 seconds]
<quazimodo>
i have a class that creates pipes/ttys and spawns a new process with stdin/out redirected. All good. But in my test i want to assert that the spawned processes stdout is a tty. In my original class though, I've called close on that file descriptor of course. So how do you go about asking if it *was* a tty
<quazimodo>
?
charlenopires has quit [Client Quit]
SOLDIERz_ has quit [Quit: Be back later ...]
<quazimodo>
oh i can stub out the .close method can't I
<quazimodo>
:D
kiyote23 has joined #ruby
StephenA1 has quit [Quit: StephenA1]
goodenough has joined #ruby
charlenopires has joined #ruby
iaj has quit [Ping timeout: 240 seconds]
androidbruce has joined #ruby
androidbruce has quit [Changing host]
androidbruce has joined #ruby
Deele has quit [Ping timeout: 260 seconds]
Dopagod has quit [Read error: Connection reset by peer]
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby
charlenopires has quit [Ping timeout: 264 seconds]
kiyote23 has quit [Read error: Connection reset by peer]
kiyote23 has joined #ruby
jonr22 has quit [Remote host closed the connection]
<quazimodo>
here we go
robertt_dex has quit [Ping timeout: 244 seconds]
<quazimodo>
how do you tell if an IO endpoint is a pipe endpoint?
mary5030 has quit [Remote host closed the connection]
klmlfl has joined #ruby
mary5030 has joined #ruby
diegoviola has quit [Quit: WeeChat 1.0.1]
nkumari has joined #ruby
quimrstorres has quit [Remote host closed the connection]
yfeldblu_ has joined #ruby
iaj has joined #ruby
charliesome has joined #ruby
mary5030 has quit [Ping timeout: 272 seconds]
VBlizzard has quit [Ping timeout: 258 seconds]
Blizzy has quit [Ping timeout: 258 seconds]
VBlizzard has joined #ruby
Blizzy has joined #ruby
Pupeno has quit [Remote host closed the connection]
tastycode has joined #ruby
iamjarvo has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
yfeldblum has quit [Ping timeout: 256 seconds]
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
kiyote23 has quit [Remote host closed the connection]
kiyote23 has joined #ruby
mary5030 has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
jimbach has quit [Remote host closed the connection]
apeiros has quit [Read error: Connection reset by peer]
Takle has joined #ruby
kiyote23 has quit [Remote host closed the connection]
quimrstorres has quit [Remote host closed the connection]
vieq has joined #ruby
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
jonr22 has quit [Ping timeout: 245 seconds]
reinaldob has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
davedev24_ has quit []
lucyinthesky has joined #ruby
reinaldob has quit [Ping timeout: 250 seconds]
kiyote23 has joined #ruby
jimbach has joined #ruby
Spami has joined #ruby
chris613 has joined #ruby
josephndenton has joined #ruby
charlenopires has quit [Ping timeout: 258 seconds]
diegoviola has joined #ruby
jimbach has quit [Ping timeout: 258 seconds]
wasamasa has quit [Ping timeout: 264 seconds]
timonv_ has joined #ruby
wasamasa has joined #ruby
darkswordchris has joined #ruby
nkumari has quit [Remote host closed the connection]
quimrstorres has joined #ruby
<darkswordchris>
Hello. I am using Win32API to use a dll to send marshal'ed objects to a server so that they can be retrieved on a later run. The problem is, my DLL only gets the first part of the marshal'ed data. Why is only part of it received and how do I fix it, or is there a better way to do this?
quimrstorres has quit [Remote host closed the connection]
claptor has quit [Quit: this channel is bakas]
<quazimodo>
in general
<quazimodo>
are wusing rvm or rbenv these days?
<ericwood>
darkswordchris: (I most likely can't help you) but that question will need some more details! It's very complex and requires some background
<ericwood>
quazimodo: lots of love for rbenv and chruby
<ericwood>
I'm really digging chruby
<quazimodo>
what's wrong with rvm?
quimrstorres has joined #ruby
<quazimodo>
why did rbenv get created?
<ericwood>
stuff
Joufflu has quit [Read error: Connection reset by peer]
<ericwood>
tl;dr they work differently, and lots of people felt the way rvm worked was too much of a shim
<darkswordchris>
ericwood: Well, I've got an object that I am trying to send to a server so that it can be loaded back on a later run. I am sending it to a dll using Win32API.new("Game_Client.dll", "send_data", "P", "").call(Marshal.dump($var)). This doesn't give me an error, but the dll only receives the first part of the marshal'ed data.
<darkswordchris>
godd2: [18:15] <darkswordchris> Hello. I am using Win32API to use a dll to send marshal'ed objects to a server so that they can be retrieved on a later run. The problem is, my DLL only gets the first part of the marshal'ed data. Why is only part of it received and how do I fix it, or is there a better way to do this?
<darkswordchris>
and [18:21] <darkswordchris> Well, I've got an object that I am trying to send to a server so that it can be loaded back on a later run. I am sending it to a dll using Win32API.new("Game_Client.dll", "send_data", "P", "").call(Marshal.dump($var)). This doesn't give me an error, but the dll only receives the first part of the marshal'ed data.
thsig_ has joined #ruby
<godd2>
darkswordchris do you ahve a github with the code?
goodenough has quit [Remote host closed the connection]
<godd2>
darkswordchris what version of Ruby are you using?
<darkswordchris>
I think it's 1.8.something. It's embedded in a program, so I can't update it.
lampd1 has quit []
supersym has quit [Ping timeout: 244 seconds]
<ericwood>
that rules out weirdness with Marshal
StephenA1 has joined #ruby
<darkswordchris>
does Marshal have some issues?
phutchins has joined #ruby
<ericwood>
I've noticed weirdness with it between ruby versions
<darkswordchris>
and p Marshal.dump dumps it all
<ericwood>
yeah no you're fine, the problem would be the server and client not seeing things in the right format
fabrice31 has joined #ruby
cleopatra has joined #ruby
<quazimodo>
cheers
moritzs has quit [Ping timeout: 240 seconds]
<quazimodo>
rpag: didn't know we had FileTest
quimrstorres has quit [Remote host closed the connection]
<darkswordchris>
ericwood: godd2: just test by immediately returning and printing the data sent the dll, the dll does not recieve all the data, so it is not a problem between my server and client.
fabrice31 has quit [Ping timeout: 240 seconds]
<darkswordchris>
tested*
ptrrr has joined #ruby
iaj has quit [Ping timeout: 250 seconds]
ptrrr has quit [Client Quit]
<darkswordchris>
Am I going to have to just resort to marshaling to a file and sending the file? I didn't want to do that because I'm pretty sure it's going to take more room than putting it in a sql database.
<quazimodo>
ericwood: rbenv does make more sense
<quazimodo>
dno if chruby is an upgrade on it though :)
StephenA1 has quit [Quit: StephenA1]
ender3rd has joined #ruby
<ericwood>
quazimodo: it's not really an "upgrade" as much as just a really simple tool that does only one thing
claptor has joined #ruby
<ericwood>
quazimodo: ruby-install to install a ruby version to ~/.rubies (or wherever) and then chruby to decide which one is used
<godd2>
darkswordchris I'm confused. What is in $var in the script you linked?
tastycode has quit [Quit: tastycode]
ender3rd is now known as Prometheus
<darkswordchris>
godd2: A bunch of variables and stuff
<ericwood>
darkswordchris: have you considered using a data format like JSON instead?
<godd2>
What do you mean "a bunch of variables". is it an array?
<ericwood>
not that it would fix anything, it just makes more sense for data interchange
Prometheus has left #ruby [#ruby]
<quazimodo>
i dno
<quazimodo>
rvm's working
<quazimodo>
dont fix what ain broke
<ericwood>
fair enough
<quazimodo>
maybe ill go to rbenv on my new machine
<quazimodo>
but i can see it's merit
<ericwood>
tbh that's what I'd do, don't bother unless it's not doing the job right
kiyote23 has quit [Remote host closed the connection]
<darkswordchris>
godd2: No, I'm not sure what to call it in Ruby. In c++ I would call it an object.
jimbach has joined #ruby
<darkswordchris>
ericwood: I haven't looked at JSON before. I'm quiet new to ruby
<ericwood>
darkswordchris: JSON isn't a ruby thing, it's just a data markup format of sorts, somewhat (but not really) like XML
<godd2>
darkswordchris JSON is something from Javascript. It stands for JavaScript Object Notation.
<darkswordchris>
oh, still haven't looked at it
<ericwood>
JSON, YAML, XML, etc.
<ericwood>
anything that isn't sending marshalled ruby objects around
<ericwood>
makes more sense to have an intermediate data type, ya kno?
<godd2>
darkswordchris but JSON is just plaintext string, so it's useful for sending data around, especially objects in any language which is OOP
ghr has joined #ruby
goodenough has joined #ruby
<darkswordchris>
Alright, I'll take a look at it. Thanks
iaj has joined #ruby
<ericwood>
the idea is for communication you use a format that any number of languages can understand rather than a marshalled version of some language implementation's data structure
<ericwood>
keep in mind Marshal isn't really a ruby spec thing...
<ericwood>
JRuby, for example, doesn't do it the same
<ericwood>
the only requirement is the same version of ruby can read and write it...not very useful ya kno?
<darkswordchris>
Ah
<darkswordchris>
Ya, I see
j_mcnally has joined #ruby
<darkswordchris>
But I still don't think that will fix my problem, due to the length.
<ericwood>
I can't say that it won't, but it's a better approach to what you're doing
jimbach has quit [Ping timeout: 252 seconds]
<darkswordchris>
Alright, thanks guys. I appreciate it. I'm off
MattB2 has quit []
<ericwood>
peace
darkswordchris has quit [Quit: Page closed]
tejas-manohar has joined #ruby
MattB2 has joined #ruby
ghr has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
cleopatra has quit [Remote host closed the connection]
razieliyo has joined #ruby
bmichelsen has joined #ruby
<quazimodo>
killing a process necessarily kills it's children right
Scripore has quit [Read error: Connection reset by peer]
<ericwood>
quazimodo: were they started via fork?
Scripore has joined #ruby
<ericwood>
if so, no, that is not the case
cleopatra has joined #ruby
<quazimodo>
hrm
<quazimodo>
i thught that was the default behaviour
razieliyo has quit [Remote host closed the connection]
<godd2>
quazimodo the fact that it doesn't is how daemon processes are made with Ruby
razieliyo has joined #ruby
razieliyo has quit [Changing host]
razieliyo has joined #ruby
josephndenton has quit [Ping timeout: 255 seconds]
mary5030 has quit [Ping timeout: 258 seconds]
<ericwood>
or like, anything, for that matter
<ericwood>
all processes spawn from some process :o
x1337807x has joined #ruby
elusion has quit [Ping timeout: 258 seconds]
thsig_ has quit [Remote host closed the connection]
tyll_ has joined #ruby
thsig has joined #ruby
wsmoak has quit [Quit: wsmoak]
thsig_ has joined #ruby
charlenopires has quit [Quit: Be back later ...]
tyll has quit [Ping timeout: 264 seconds]
thsig has quit [Ping timeout: 256 seconds]
zorak8 has joined #ruby
Megtastique has quit []
rfi_ is now known as koyoteinclude
koyoteinclude is now known as rfi
jimbach has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<quazimodo>
freaking race conditions :(
<quazimodo>
oh, i know you can separate processes from each other that way
<quazimodo>
i thought the *default* behaviour is that killing parents kills child processes
perturbation has quit [Quit: Leaving]
<quazimodo>
unless specified otherwise, but yeah thanks for the tip :)
<quazimodo>
now I have to solve this race condition where I've sent a kill signal but the process aint dead yet and my spec has to wait for it to die
jimbach has quit [Ping timeout: 264 seconds]
nkumari has joined #ruby
tejas-manohar has left #ruby [#ruby]
startupality has joined #ruby
chu has joined #ruby
nkumari has quit [Ping timeout: 264 seconds]
AlexRussia has quit [Ping timeout: 240 seconds]
ekinmur has joined #ruby
tejas-manohar has joined #ruby
cleopatra has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 264 seconds]
chipotle_ has joined #ruby
iaj has quit [Ping timeout: 252 seconds]
ekinmur has quit [Client Quit]
chipotle_ has quit [Read error: Connection reset by peer]
chipotle has quit [Ping timeout: 250 seconds]
boombadaroomba has joined #ruby
freerobby has quit [Quit: Leaving.]
chipotle has joined #ruby
Takle has joined #ruby
x1337807x has quit [Read error: Connection reset by peer]
boombadaroomba has quit [Ping timeout: 264 seconds]
geggam has joined #ruby
thsig_ has quit [Remote host closed the connection]
thsig has joined #ruby
tomeara has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
startupality has quit [Quit: startupality]
startupality has joined #ruby
startupality has quit [Client Quit]
Musashi007 has joined #ruby
Takle has quit [Ping timeout: 250 seconds]
hakunin_ is now known as hakunin
Megtastique has joined #ruby
x1337807x has joined #ruby
xenomorph is now known as {xenomorph}
phutchins has quit [Ping timeout: 264 seconds]
iaj has joined #ruby
{xenomorph} is now known as xenomorph
kiyote23 has joined #ruby
fedexo has joined #ruby
radic has quit [Ping timeout: 272 seconds]
radic has joined #ruby
ghr has joined #ruby
charlenopires has joined #ruby
AlexRussia has joined #ruby
lemur has joined #ruby
ekinmur has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
kiyote23 has quit [Ping timeout: 245 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ghr has quit [Ping timeout: 245 seconds]
josephndenton has joined #ruby
x1337807x has joined #ruby
Spami has joined #ruby
sski has joined #ruby
josephndenton has quit [Ping timeout: 264 seconds]
cleopatra has joined #ruby
mloveless has quit [Remote host closed the connection]
sailias has quit [Quit: Leaving.]
KLVTZ has joined #ruby
timonv_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
adriancb has joined #ruby
ekinmur has quit [Quit: no longer available]
timonv_ has quit [Ping timeout: 250 seconds]
braincrash has quit [Quit: bye bye]
Cache_Money has joined #ruby
chrishough has joined #ruby
Spami has quit [Ping timeout: 258 seconds]
braincrash has joined #ruby
ekinmur has joined #ruby
Beoran__ has quit [Ping timeout: 250 seconds]
arescorpio has quit [Excess Flood]
beef-wellington has quit [Ping timeout: 258 seconds]
lkba has joined #ruby
Kricir has joined #ruby
gcganley has joined #ruby
Takle has joined #ruby
oleo__ has joined #ruby
zorak8 has quit [Ping timeout: 240 seconds]
<gcganley>
so my gf's brother is interested in learning ruby. he has experience with java and visual basic but is interested in ruby. I personally use haskell and have 0 experience with ruby. i was curious what you would recommend for him to read/watch and what i should read/watch to help him learn
<sevenseacat>
where did you put `gem 'fog', '=1.22'` ?
<sevenseacat>
and what did you run to get the error
apoorvparijat has joined #ruby
<jtreminio>
sevenseacat: at the top of my file. This is in a Vagrantfile - which Vagrant runs
<jtreminio>
I'm guessing the gem is included somewhere above where I can access the flow
jonr22 has quit [Ping timeout: 250 seconds]
<sevenseacat>
interesting, i didnt even know what was valid
<sevenseacat>
only ever seen gems specified like that in Gemfiles
comma8 has quit [Ping timeout: 265 seconds]
emmesswhy has joined #ruby
<jtreminio>
The issue is that there is an undefined constant, Fog::VERSION
<jtreminio>
if I manually replace that with '1.2.5', works great. So, another solution would be to define Fog::VERSION myself. Is it possible to do this in my code, outside of the Fog class?
Megtastique has quit []
<havenwood>
jtreminio: does it work if you?: require 'fog/version'
<jtreminio>
require 'fog/1.2.2' ?
<jtreminio>
Will check in a second, the vm is still spinning up
<havenwood>
the 'fog/version'
<havenwood>
actually the word, version
josephndenton has joined #ruby
<havenwood>
jtreminio: there's often a `fog/version.rb` that defines the `Fog::VERSION` constant
<tejas-manohar>
havenwood: watttt this is failing when phrases[:tejasmanohar] is nil (tested w/ p phrases[:tejasmanohar]) - @phrase = phrases[:tejasmanohar] ? '' : phrases[:tejasmanohar][:phrase]
<ridethekline>
hi
<ridethekline>
anyone on?
<havenwood>
hi
<lbrf>
:-)
<ridethekline>
this is a really stupid question but why are there different programming languages?
<ridethekline>
i'm learning ruby and i'm getting the hang of the syntax as well as memorizing a lot of cool stuff!
<ridethekline>
but what i am not getting is why can't we do everything in ruby?
<havenwood>
ridethekline: there are tradeoffs in languages, so there are niches where important tradeoffs have been made
<tejas-manohar>
some have niches, some ppl like certain ways of doing things
<havenwood>
ridethekline: ruby is a turing complete language, so anything that can be computed...
<tejas-manohar>
havenwood: do you have any idea on my follow-up?
<ridethekline>
you can also make gui apps in ruby
<havenwood>
tejas-manohar: i can't tell from your code example
<ridethekline>
so why not use ruby tk to make websites?
<tejas-manohar>
its strange since the >> "#{nil}"
jimmyy has quit [Ping timeout: 256 seconds]
<havenwood>
ridethekline: ruby doesn't have the best graphics bindings around, but does via jruby have access to swig, etc
<havenwood>
ridethekline: that's another thing, the libraries that are available
Wolland has joined #ruby
<ridethekline>
wow i have no idea what you just said
<jidar>
having one hell of a time getting the windows gem to install on windows, get the following error: http://pastebin.com/tKCM0QAu I've done the required DevKit stuff via `ruby dk.rb init` `ruby dk.rb install` any ideas?
<tejas-manohar>
fk windows
<tejas-manohar>
lol
<havenwood>
ridethekline: so not only are there different languages, there are different implementations of the same language
<jidar>
tejas-manohar: tell me about it
<jidar>
tejas-manohar: but customers want stuff and it pays ;)
<ridethekline>
tejas-manohar: it's nothing to worry about :)
<havenwood>
ridethekline: one very nice implementation of Ruby is JRuby, which is the JVM and has access to all its libraries
<ridethekline>
yay i know something :{
<lbrf>
ridethekline: there's other languages than english too :p
<havenwood>
mark06: it's nice to replace things like `def EasyOptions.` with `def self.` do the module name can change without needing to be messed with everywhere
<mark06>
thanks havenwood
<tejas-manohar>
how to implement a secret
bronak has joined #ruby
TheLastExile has quit [Quit: Leaving]
<Areessell>
Implement a secret?
<tejas-manohar>
im getting a warning about not using secret and cookies doing omniauth btw
<havenwood>
mark06: though you can just drop the `self.` and put a `module_function` before the first method definition
<Areessell>
I like to use `class << self` for some reason. Dunno why
<Areessell>
If theres one class method, I use `def self.method_name` though
<havenwood>
mark06: a `module_function` before the methods will make them all available as module functions
<mark06>
so I make the function a module function only if I plan to make the function public?
<havenwood>
mark06: there are a variety of options depending on how you want to use the module and expose methods
<Areessell>
D< havenwood> mark06: it's nice to replace things like `def EasyOptions.` with `def self.` do the module name can change without needing to be messed with everywhere
<mark06>
I think the code would be better organized if I encapsulated private stuff within a class and made puiblic only finish method, Options and Arguments... but this is not too important, I wanted to know if I'm doing something bizarre for now
jdj_dk has joined #ruby
jdj_dk has quit [Read error: Connection reset by peer]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<mark06>
I want to know if even this new code would be better than setting the global variables $options and such
<mark06>
for now, that's what I want to solve, the use of global variables
benzrf is now known as benzrf|offline
<tejas-manohar>
hey guys having some trouble w/ secret + cookies
chabier has quit [Remote host closed the connection]
<tejas-manohar>
(ok sleeping for some time, just ping me w/ "tejas-manohar:" at beginning of response if you know answer, i'll scroll up when I wake up)
fabrice31 has joined #ruby
<tejas-manohar>
feel free to do so in #sinatra or #ruby
<tejas-manohar>
adios
<tejas-manohar>
(been facing issue for couple hrs)
<sevenseacat>
lol
<sevenseacat>
'gonna go to bed now, do my work for me and give me the answer for when i wake up'
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
kiyote23 has quit [Ping timeout: 245 seconds]
jrvlima has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Takle has joined #ruby
lemur has quit [Ping timeout: 258 seconds]
mary5030 has quit [Ping timeout: 250 seconds]
samsquanch has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fabrice31 has quit [Ping timeout: 272 seconds]
<pontiki>
cool. that's the way it always works for me, too!
maksalra has quit [Ping timeout: 246 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonr2219 has quit [Read error: Connection reset by peer]
Takle has quit [Ping timeout: 265 seconds]
jonr22 has joined #ruby
antgel has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
chipotle has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
apoorvparijat has quit [Read error: No route to host]
apoorvparijat has joined #ruby
chabier has joined #ruby
jonr22 has quit [Remote host closed the connection]
jonr2219 has joined #ruby
posixpascal has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
Wolland has quit []
bmichelsen has quit [Quit: ZZZzzz…]
ned__ has left #ruby [#ruby]
tekk has quit [Ping timeout: 256 seconds]
Jackneill has joined #ruby
apoorvparijat has quit [Remote host closed the connection]
zumbi_ has quit [Ping timeout: 245 seconds]
jonr22 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
lemur has joined #ruby
jonr2219 has joined #ruby
josephndenton has joined #ruby
BlackGear has joined #ruby
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
apoorvparijat has joined #ruby
NoNMaDDeN has quit [Ping timeout: 255 seconds]
jonr22 has quit [Read error: Connection reset by peer]
jonr2219 has joined #ruby
josephndenton has quit [Ping timeout: 244 seconds]
jonr2219 has quit [Read error: Connection reset by peer]
jonr22 has joined #ruby
jonr2219 has joined #ruby
jonr22 has quit [Read error: Connection reset by peer]
NoNMaDDeN has joined #ruby
jonr2219 has quit [Remote host closed the connection]
<godd2>
try `rspec file.rb` instead of `ruby file.rb`
<wald0>
/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:55:in `require': cannot load such file -- rspec-expectations (LoadError)
Takle has joined #ruby
<godd2>
what version of rspec is it?
<shevy>
wald0!!!
<shevy>
there was something I had to tell you but I forgot what it was :(
SCHAAP137 has joined #ruby
<wald0>
shevy: !
<wald0>
lol
giuseppesolinas has joined #ruby
<wald0>
godd2: maybe 3.1.0
<godd2>
rspec -v
kyoshero has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
CustosLimen has quit [Ping timeout: 255 seconds]
chu has joined #ruby
ptrrr has joined #ruby
<godd2>
wald0 if you run the file with `rspec file.rb` you don't need to require rspec stuff
ctp has joined #ruby
apeiros__ has joined #ruby
apeiros___ has joined #ruby
luriv has joined #ruby
<wald0>
3.1.7, but the dirs shows differnet version like: ./ruby/1.9.1/gems/rspec-3.1.0
<wald0>
godd2: i know almost nothing about rspec :) was just trying a demo snippet of code
zumbi has joined #ruby
Areessell has quit [Ping timeout: 256 seconds]
kiyote23 has joined #ruby
Darryl_ has joined #ruby
apeiros_ has quit [Ping timeout: 252 seconds]
Hobogrammer has quit [Ping timeout: 272 seconds]
apeiros has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
fandi has quit [Read error: Connection reset by peer]
josephndenton has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
sarlalia1 has joined #ruby
kiyote23 has quit [Ping timeout: 244 seconds]
<pontiki>
all you should need to require is rspec
<wald0>
updating gems now.. lets see if changes anything
jdj_dk has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 258 seconds]
Pupeno has joined #ruby
josephndenton has quit [Ping timeout: 265 seconds]
Pupeno_ has quit [Ping timeout: 265 seconds]
jdj_dk has joined #ruby
jdj_dk has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
<pontiki>
but even if you do want to, you should be doing: require "rspec/expectations"
Spami has joined #ruby
lemur has quit [Remote host closed the connection]
<pontiki>
at least if you're using rspec >= 3
lemur has joined #ruby
<wald0>
"There was a change in rspec starting with release 3.0. You simply need to replace require 'rspec-expectations' with require 'rspec' in the env.rb file...
<wald0>
duh!
<pontiki>
yah
<wald0>
seems like i have followed and old chunk of demo code
<wald0>
big spanks to the api breakages!
Joufflu has quit [Quit: Leaving]
<shevy>
free spanking for everyone
lemur has quit [Ping timeout: 258 seconds]
timonv_ has joined #ruby
<wald0>
what is the command equivalent to apt-cache search in gems?
adamski2600 has joined #ruby
<apeiros__>
gem search?
apeiros__ is now known as apeiros_
jimbach has joined #ruby
ringaring has joined #ruby
jottr has joined #ruby
despai has joined #ruby
exadeci has joined #ruby
ringarin has quit [Ping timeout: 240 seconds]
jimbach has quit [Ping timeout: 258 seconds]
ponga has joined #ruby
panga has quit [Read error: Connection reset by peer]
<wald0>
im trying to use selenium for check if my website works correctly (unit-testing a website)
<wald0>
hte most important thing is to know if the downloads works, but these downloads are huge
<wald0>
i can do a download in selenium, but how i can make it to download only the 1% of the file ? or hte first MB's?
<shevy>
mostlybadfly: dunno, have to prepare a presentation about large (biological) viruses and then meetup with the supervisor. two exams this week as well, and some more bickering with bureaucracy. In regards to programming, I'd like to finish my rewrite of pipe handling in ruby... I want to get something like Avisynth for ruby -> http://avisynth.nl/index.php/First_script
max96at|off is now known as max96at
keen____ has joined #ruby
rocknrollmarc has joined #ruby
keen___ has quit [Ping timeout: 258 seconds]
rkalfane has joined #ruby
<mostlybadfly>
oh nice interesting
<mostlybadfly>
that sounds like a fun project, how far along are you?
byprdct has joined #ruby
Soda has joined #ruby
cnj has quit [Ping timeout: 258 seconds]
kiyote23 has quit [Ping timeout: 265 seconds]
Seich has quit [Ping timeout: 258 seconds]
mkaesz has joined #ruby
RTG` has quit [Ping timeout: 272 seconds]
apoorvparijat has joined #ruby
C0deMaver1ck_ has quit [Ping timeout: 258 seconds]
RTG` has joined #ruby
cnj has joined #ruby
timonv_ has quit [Remote host closed the connection]
dangerousdave has joined #ruby
C0deMaver1ck has joined #ruby
C0deMaver1ck is now known as Guest51424
<dangerousdave>
wald0, perhaps I am undoing what you did
Seich has joined #ruby
jdj_dk has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
charlenopires has joined #ruby
Takle_ has quit [Remote host closed the connection]
freerobby has joined #ruby
byprdct has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kirun has joined #ruby
jottr has joined #ruby
byprdct has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sarlalia1 has joined #ruby
chu has joined #ruby
Blaze_Boy has joined #ruby
tomeara has joined #ruby
<shevy>
mostlybadfly hahaha ... not far at all... I should have finished reading all papers and then present the overview and presentation "tactic" but I haven't finished at all
nastri has joined #ruby
mkaesz has quit [Ping timeout: 265 seconds]
fertapric has joined #ruby
antgel has joined #ruby
mhi^ has joined #ruby
MrIlyas has joined #ruby
Unknown2 has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
despai has quit [Quit: This computer has gone to sleep]
mkaesz has joined #ruby
jottr has joined #ruby
etqqkoiflwhb has joined #ruby
sarlalia1 has quit [Ping timeout: 264 seconds]
jimbach has joined #ruby
despai has joined #ruby
tlarevo has joined #ruby
mkaesz has quit [Ping timeout: 264 seconds]
mhi^ has quit [Quit: Lost terminal]
ptcek has quit [Remote host closed the connection]
jimbach has quit [Ping timeout: 258 seconds]
despai has quit [Client Quit]
arup_r has quit [Quit: Leaving.]
benzrf|offline is now known as benzrf
yeticry has quit [Ping timeout: 272 seconds]
thiagofm has joined #ruby
last_staff has quit [Ping timeout: 265 seconds]
yeticry has joined #ruby
havenwood has joined #ruby
thiagofm has quit [Remote host closed the connection]
anaeem1_ has quit [Remote host closed the connection]
havenwood has joined #ruby
fabrice31 has quit [Ping timeout: 265 seconds]
<quazimodo>
I'm sure i've done something
<quazimodo>
just not certain what
<quazimodo>
(and yes i know a robot shouldn't have execute, I'm just playing
banister has joined #ruby
sevenseacat has quit [Remote host closed the connection]
unshadow has joined #ruby
anaeem1_ has joined #ruby
ponga has joined #ruby
ponga has joined #ruby
<unshadow>
My first shot at getting ruby an SSHSocket to work with (using ffi) https://github.com/bararchy/SSHSocket its not fully finished and needs allot more work, what you guys think ?
<unshadow>
this is a server side btw
<unshadow>
as the client side is fully implamented uner net-ssh
tlarevo_ has quit []
nfk has joined #ruby
kenichi has quit [Ping timeout: 245 seconds]
startupality has quit [Quit: startupality]
emmesswhy has quit [Quit: This computer has gone to sleep]
philwantsfish has quit [Read error: Connection reset by peer]
philwantsfish has joined #ruby
boombadaroomba has joined #ruby
Kilo`byte has quit [Ping timeout: 265 seconds]
unshadow has quit [Quit: leaving]
Photism has quit [Quit: Leaving]
<wald0>
I have an array of hashes, one of their elements is :request which points to the address of a file (webserver logs access)
<wald0>
how i can count the amount of the same request that I have ?
Trieste has quit [Ping timeout: 258 seconds]
<rpag>
wald0, .count {} can probably do it
<spider-mario>
probably using .group_by
<spider-mario>
oh, didn’t know about that one
chinmay_dd has quit [Ping timeout: 240 seconds]
beilabs_________ has quit [Ping timeout: 245 seconds]
davedev24_ has quit [Read error: Connection reset by peer]
davedev24_ has joined #ruby
AlexRussia has joined #ruby
AlexRussia has quit [Client Quit]
AlexRussia has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
nicoulaj has joined #ruby
kyoshero has quit [Ping timeout: 272 seconds]
kyoshero has joined #ruby
kyoshero has quit [Max SendQ exceeded]
claymore has quit [Ping timeout: 264 seconds]
kyoshero has joined #ruby
geggam has joined #ruby
charlenopires has joined #ruby
__future__ has left #ruby [#ruby]
jrd0 has joined #ruby
Blaze_Boy has quit [Quit: Blaze_Boy]
ctooley has joined #ruby
charlenopires has quit [Read error: Connection reset by peer]
claymore has joined #ruby
charlenopires has joined #ruby
<ctooley>
I’m using ruby’s Net::HTTP to make reqeusts. Is there a clean way to get back where the site is redirecting to or to tell Net::HTTP to follow the redirect?
beilabs_________ has quit [Ping timeout: 272 seconds]
<jhass>
I think the docs actually have an example for that
<wald0>
mmh, how i should use this with the push ?
<wald0>
if entries.any?... ?
<wald0>
well, if !
<tejas-manohar>
sevenseacat: i'd looked at that issue for a long time and it was 1 am lol so i was like ok going to come back in the morning but if anyone knows pls say
<jhass>
you already know unless!
<wald0>
damn, is hard to think on ruby way
<wald0>
oh, i see
reinaldob has joined #ruby
<wald0>
yay! it worked now :)
<wald0>
i wonder what was wrong in my previous unless... maybe it was simply wrongly coded
<jhass>
Wolfram74: a few style notes if you don't mind
<Wolfram74>
sure
<jhass>
your @@class_vars want to be CONSTANTs
<Wolfram74>
for context, python is my first language
<jhass>
yes, the python is strong in there :P
beilabs_________ has quit [Ping timeout: 240 seconds]
<Wolfram74>
yeah, they are constants, the western 12 tone scale is not changing anytime soon
<jhass>
in ruby most people leave off empty parens ()
<havenwood>
i've never seen an accomplished Rubyist who doesn't
<tejas-manohar>
jhass: how do i find available properties of users (like users.****) - users.map {|user| [user.key, user.ref]} is the example code for iterating thru all users in orchestrate ruby api docs
danoo_ has quit [Ping timeout: 258 seconds]
<tejas-manohar>
jhass: basically im trying to find out how to grab the user's "phrase
<jhass>
Wolfram74: clean, strip the @, I think you wanted to call initialize there
<shevy>
Wolfram74 why do you abandon python!!!
<jhass>
@ always denotes an instance variable
<ericwood>
I like putting params on things that aren't DSL-ified
<Wolfram74>
because I'm doing dev bootcamp, shevy
<ericwood>
Wolfram74: which one?
<Wolfram74>
DevBootcamp, the first, i think
<Wolfram74>
in san fransisco
<ericwood>
coolcool
<Wolfram74>
and they work in ruby
Spleeze has joined #ruby
<Wolfram74>
so I'm transitioning from physics work to mercenary work
<ericwood>
I was hoping you'd be one of my MakerSquare friends without even knowing it
<wald0>
ericwood: yes, hum... this is complex, in my shell i can just do | something | something | something to concatenate results, i was thikning that in ruby is the same using dot
beilabs_________ has joined #ruby
bmichelsen has quit [Quit: ZZZzzz…]
<jhass>
then I disagree about your spacing around operators, but meh ;)
<Wolfram74>
true, thanks for catching my goof on the clean method jhass
<ericwood>
wald0: it's a similar concept but different enough to get you in trouble if you think about them the same way :\
<havenwood>
Wolfram74: instead of `print "\n"` just `puts`
<Wolfram74>
just an adorned puts?
<havenwood>
yup
<havenwood>
unadorned
<ericwood>
puts is the same as print "\n"
<jhass>
puts "\n" still is too though
<apeiros>
ooooh how fun :D after ~14y I'll finally write a log parser again
<Wolfram74>
I've- that's dumb...
* apeiros
does the happy dance
<shevy>
shuffle dance!
<shevy>
I'll get worried the moment you'll write a new IRC bot
<Wolfram74>
ok, time to drop out of the conversation while I ponder the scale method some more
<jhass>
tejas-manohar: grab pry & pry-doc
commmmodo has quit [Quit: commmmodo]
<shevy>
Wolfram74 how long have you been writing in python by the way?
<apeiros>
shevy: I'd not write a new one. I'd dedust butler
<felltir>
actually no, they can't. never mind, it probably is eql?
<havenwood>
benzrf: aye
<tejas-manohar>
havenwood: how does this work? i want to get phrases "testing" and "lel" out of there as you can see they exist and its an array of arrays of some sorts but some reason my debugging isnt working the way i'd expect and pulling those vals out - http://i.imgur.com/xY8ffbT.png (pry_
<tejas-manohar>
** (pry)
<jhass>
use obj.class and ls obj to find out what they really are
beilabs_________ has quit [Ping timeout: 272 seconds]
yfeldblu_ has quit [Remote host closed the connection]
<felltir>
benzrf: it's not eql?, because if you override that hashes still work
<felltir>
don't know what it is though
<tejas-manohar>
so weird
<felltir>
it can't be object id, because strings
<tejas-manohar>
its iterating thru the string's chars
<tejas-manohar>
but it wont get rid of the usernames...
<tejas-manohar>
i wanna stick to convention as much as possible
anarang has joined #ruby
Ulrike_Rayne has joined #ruby
<shevy>
which one
<shevy>
:>
moritzs has joined #ruby
<shevy>
there is only one true way!
<jhass>
I tend to do that, yeah. Can't really comment on what the majority does
<tejas-manohar>
yeah sure
<tejas-manohar>
it looks nicer in my eyes
<tejas-manohar>
lol
<tejas-manohar>
have you guys used houndci?
<jhass>
but then I'm also more of a slim instead of irb guy
<shevy>
Hanmac here always says this:
<jhass>
*erb
<shevy>
there is the right way. then there is the wrong way. and then there is the Hanmac way
<tejas-manohar>
or another PR-based github ruby style checker
alex88 has joined #ruby
xiq_ has joined #ruby
beilabs_________ has joined #ruby
bret has joined #ruby
alex88 has quit [Remote host closed the connection]
i8igmac has quit [Ping timeout: 255 seconds]
hakunin has joined #ruby
xiq has quit [Ping timeout: 240 seconds]
cool has joined #ruby
mjuszczak has joined #ruby
fabrice31 has joined #ruby
kireevco has joined #ruby
<tejas-manohar>
jhass: do you see anything here that could make my server hang indefinitely on shutdown? https://github.com/tejas-manohar/omnistrate/blob/master/app.rb -- or should i just file a bug w. sinatra and try to reinstall the gem first? i just had to kill the server with kill -9 after using lsof to find its pid
<tejas-manohar>
jhass: done this a couple times already
<jhass>
"shutdown" ?
alex88 has joined #ruby
<tejas-manohar>
jhass: ctrl c the webserver
Guest19 has joined #ruby
<jhass>
did you try SIGTERM before SIGKILL?
chu has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<DANtheBEASTman>
`realpath': No such file or directory
<tejas-manohar>
jhass: how do i add a version to gem 'pry', :group => [:development] -- do i needa use the do end syntax or can i just do gem 'pry', '...', :group ...
<jhass>
tejas-manohar: I think the later works
hamakn has quit [Remote host closed the connection]
<tejas-manohar>
okok
<tejas-manohar>
wow pry is < 1.0
<jhass>
(you could've tried)
elastik has quit [Ping timeout: 258 seconds]
hamakn has joined #ruby
<jhass>
DANtheBEASTman: ah, needs a File.exist? guard I guess
<jhass>
DANtheBEASTman: I guess you want to add a check that raises if it's there but not a directory nor a symlink to a directory
alex88 has quit [Remote host closed the connection]
rylev has joined #ruby
beilabs_________ has quit [Ping timeout: 264 seconds]
it0a has joined #ruby
jheg has joined #ruby
Megtastique has quit []
<DANtheBEASTman>
hmm.. ok so I did ....unless File.directory?(File.expand_path("~/.tmuxinator")) or File.ftype(File.expand_path("~/.tmuxinator")) == 'link'
mloveless has quit [Remote host closed the connection]
<jhass>
now I could link to a file and that check would pass
<jhass>
and there's a File.symlink?
<DANtheBEASTman>
I'm really surprised that moving a dir and symlinking it is causing such a problem
<jhass>
that code is making several bad assumptions, yes
ZaRDaK has joined #ruby
<jhass>
(another one being that ~ == ENV['HOME'])
mjuszczak has quit []
mjuszczak has joined #ruby
<DANtheBEASTman>
ignoring the fact my change isn't really good enough, there's another error in a different file..
<DANtheBEASTman>
I suppose it should be File.directory?(File.expand_path("#{ENV["HOME"]}/.tmuxinator")) ?
beilabs_________ has joined #ruby
jonr22 has quit [Remote host closed the connection]
havenwood has quit [Remote host closed the connection]
rylev_ has joined #ruby
beilabs_________ has quit [Ping timeout: 272 seconds]
<jhass>
er, mkdir_p was FileUtils stuff
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
<shevy>
DANtheBEASTman in such a case, I am a bit surprised you use File.expand_path("~/.tmuxinator") and File.expand_path("~/.tmuxinator") twice
BraddPitt has joined #ruby
BraddPitt has quit [Client Quit]
<DANtheBEASTman>
I have no idea what I'm doing.
<DANtheBEASTman>
first time inside a Ruby codebase
Takle has quit [Ping timeout: 272 seconds]
<DANtheBEASTman>
and I'm really only an novice programmer
rylev has quit [Ping timeout: 256 seconds]
<shevy>
no, I mean regardless of the language, that you use the same code twice in general. In such a scenario I would assign to a local variable and work on that instead
<DANtheBEASTman>
ohh. yeah I might've refactored that if it worked
agjacome has joined #ruby
thsig has joined #ruby
Allaman_ has quit [Remote host closed the connection]
beilabs_________ has joined #ruby
<shevy>
by the way I think you can replace YAML.load(File.read(config_path)) with YAML.load_file(config_path) (if config_path is a real path)
Lilian has quit [Ping timeout: 250 seconds]
<shevy>
you can also possibly replace "#{ENV["HOME"]}/.tmuxinator" with a constant near the top of the file?
yfeldblum has joined #ruby
jheg has quit [Quit: jheg]
AndChat| has joined #ruby
nkumari has quit [Remote host closed the connection]
spastorino has joined #ruby
jimbach has quit [Remote host closed the connection]
<DANtheBEASTman>
that would make sense..
lkba has quit [Read error: Connection reset by peer]
AndChat- has joined #ruby
bdamos has joined #ruby
doki-worry has joined #ruby
bdamos has quit [Client Quit]
bdamos has joined #ruby
yfeldblum has quit [Ping timeout: 252 seconds]
phutchins has joined #ruby
AndChat| has quit [Ping timeout: 265 seconds]
boombadaroomba has joined #ruby
beilabs_________ has quit [Ping timeout: 250 seconds]
xaitec has left #ruby [#ruby]
quimrstorres has quit [Remote host closed the connection]
timonv_ has quit [Remote host closed the connection]
bdamos has quit [Client Quit]
nastri has quit [Remote host closed the connection]
bdamos has joined #ruby
timonv_ has joined #ruby
anarang has quit [Ping timeout: 252 seconds]
beilabs_________ has joined #ruby
synergyz has joined #ruby
boombadaroomba has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
Takle_ has quit [Ping timeout: 258 seconds]
bdamos has quit [Client Quit]
bdamos has joined #ruby
rkalfane has joined #ruby
bdamos has quit [Client Quit]
bdamos has joined #ruby
gregf has quit [Quit: WeeChat 1.0.1]
thsig has quit [Remote host closed the connection]
timonv_ has quit [Ping timeout: 265 seconds]
beilabs_________ has quit [Ping timeout: 244 seconds]
beilabs_________ has joined #ruby
BraddPitt has joined #ruby
nyarlshub has joined #ruby
karmatr0n has quit [Remote host closed the connection]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
perturbation has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
rkalfane has quit [Client Quit]
nkumari has joined #ruby
nkumari has quit [Remote host closed the connection]
goodenough has joined #ruby
havenwood has joined #ruby
nkumari has joined #ruby
quimrstorres has joined #ruby
goshdarnyou has joined #ruby
sea_local has quit []
beilabs_________ has quit [Ping timeout: 240 seconds]
gregf has joined #ruby
beilabs_________ has joined #ruby
nyarlshub has left #ruby ["Leaving"]
Vile` has quit [Ping timeout: 240 seconds]
jheg has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
KLVTZ has joined #ruby
anaeem1_ has joined #ruby
Vile` has joined #ruby
beilabs_________ has quit [Ping timeout: 256 seconds]
jonr22 has joined #ruby
mary5030_ has quit [Remote host closed the connection]
mary5030 has joined #ruby
JBreit has joined #ruby
anaeem1_ has quit [Ping timeout: 244 seconds]
JBreit has left #ruby [#ruby]
beilabs_________ has joined #ruby
mary5030 has quit [Ping timeout: 264 seconds]
jheg has quit [Quit: jheg]
beef-wellington has quit [Ping timeout: 272 seconds]
rylev_ has quit [Remote host closed the connection]
marr has joined #ruby
rylev has joined #ruby
beilabs_________ has quit [Ping timeout: 240 seconds]
bluenemo has joined #ruby
tastycode has joined #ruby
ekinmur has joined #ruby
giuseppesolinas has joined #ruby
wldcordeiro has quit [Ping timeout: 265 seconds]
ekinmur has quit [Client Quit]
ekinmur has joined #ruby
jheg has joined #ruby
max96at is now known as max96at|off
ekinmur has quit [Client Quit]
tyll_ is now known as tyll
dts has joined #ruby
SOLDIERz_ has joined #ruby
mjuszcza_ has joined #ruby
ekinmur_ has joined #ruby
mjuszczak has quit [Ping timeout: 240 seconds]
beilabs_________ has joined #ruby
ekinmur_ has quit [Remote host closed the connection]
bdamos has quit [Quit: leaving]
bMalum has quit [Quit: bMalum]
jimbach has joined #ruby
bluenemo has quit [Quit: Verlassend]
tjbiddle has quit [Quit: tjbiddle]
DLSteve has joined #ruby
SOLDIERz_ has quit [Ping timeout: 264 seconds]
St_Marx has quit [Quit: WeeChat 1.0.1]
beilabs_________ has quit [Ping timeout: 244 seconds]
beilabs_________ has joined #ruby
St_Marx has joined #ruby
jrvlima has joined #ruby
kireevco has quit [Ping timeout: 250 seconds]
emmesswhy has joined #ruby
kireevco has joined #ruby
mloveless has joined #ruby
beilabs_________ has quit [Ping timeout: 250 seconds]
noaon has joined #ruby
sea_local has joined #ruby
beilabs_________ has joined #ruby
mjuszcza_ has quit []
dorei has joined #ruby
Soda has joined #ruby
phutchins has quit [Ping timeout: 264 seconds]
Hobogrammer has joined #ruby
bluenemo has joined #ruby
jdj_dk has quit [Remote host closed the connection]
beef-wellington has joined #ruby
yfeldblum has joined #ruby
jdj_dk has joined #ruby
jimbach has quit [Remote host closed the connection]
ohaibbq has joined #ruby
cleopatra has quit [Ping timeout: 265 seconds]
kireevco has quit [Quit: Leaving.]
lukevinc has joined #ruby
Jackneill has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 265 seconds]
sevvie has joined #ruby
quimrstorres has quit [Remote host closed the connection]
rkalfane has joined #ruby
jdj_dk has quit [Ping timeout: 250 seconds]
renderful has joined #ruby
nkumari has quit [Remote host closed the connection]
ponga has quit [Quit: Leaving...]
<shevy>
dumdedum
beilabs_________ has quit [Ping timeout: 250 seconds]
bdamos_ has joined #ruby
renderful has quit [Ping timeout: 255 seconds]
bdamos_ has quit [Client Quit]
doki-worry has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
<rpag>
shevy, twidling your thumbs?
josephndenton has quit [Ping timeout: 244 seconds]
danijoo has joined #ruby
<shevy>
kinda bored
<shevy>
porting old code is so awfully boring
timonv_ has joined #ruby
fabrice31 has joined #ruby
<rpag>
indeed
jrvlima has quit [Max SendQ exceeded]
voltage_ has joined #ruby
byprdct has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tjbiddle has joined #ruby
thsig has joined #ruby
tastycode has quit [Quit: tastycode]
byteoverfl0w has joined #ruby
jonr22 has quit [Ping timeout: 240 seconds]
fabrice31 has quit [Ping timeout: 245 seconds]
posixpascal has quit [Read error: Connection reset by peer]
nkumari has joined #ruby
emmesswhy has quit [Quit: This computer has gone to sleep]
byteoverfl0w has quit [Remote host closed the connection]
posixpascal has joined #ruby
St_Marx has quit [Quit: WeeChat 1.0.1]
<shevy>
I think I started writing ruby-projects conforming to a proper gem-layout and pushing these onto rubygems.org perhaps 3 years ago; but I also have some code in projects that is as old as perhaps ~8 years
St_Marx has joined #ruby
<shevy>
over the years change have accrued or been added that was added left or right, partially no longer works either and is messy
tejas-manohar has joined #ruby
jonr22 has joined #ruby
<tejas-manohar>
would you guys consider sinatra a web framework?
<edwardloveall>
yxhuvud: yeah replacing that last line with self[0..-1] = remainder + rotated worked too
<sud0x>
hey guys, trying to print out some variables im passing to a function. I'm passing name and doing a print statement within the new function as "Hello #{name}", but it shows hello #{name} instead of the name in passing it
<jhass>
that looks like somebody doesn't know instance_eval
nicoulaj has quit [Ping timeout: 240 seconds]
quimrstorres has joined #ruby
olivier_bK has quit [Ping timeout: 258 seconds]
prasselpikachu has quit [Ping timeout: 272 seconds]
beilabs_________ has joined #ruby
nkumari has quit [Ping timeout: 250 seconds]
rylev has joined #ruby
jimbach has quit [Remote host closed the connection]
YourKicks has joined #ruby
mkaesz has quit [Remote host closed the connection]
dseitz has joined #ruby
beilabs_________ has quit [Ping timeout: 264 seconds]
edwardloveall has quit [Quit: Leaving.]
beilabs_________ has joined #ruby
spider-mario has quit [Remote host closed the connection]
rylev has quit [Ping timeout: 256 seconds]
tjbiddle has joined #ruby
Axy has quit [Read error: Connection reset by peer]
tjbiddle has quit [Client Quit]
beilabs_________ has quit [Ping timeout: 265 seconds]
<shevy>
yes yes!
<shevy>
let's explain it to him!
kaspertidemann has quit []
byprdct has joined #ruby
reinaldob has joined #ruby
edwardloveall has joined #ruby
brendenb has quit [Excess Flood]
nkumari has joined #ruby
brendenb has joined #ruby
mloveless has quit [Remote host closed the connection]
chipotle has joined #ruby
last_staff has quit [Quit: last_staff]
agjacome has quit [Ping timeout: 240 seconds]
jonr22 has quit [Remote host closed the connection]
<waxjar>
oh my, there are very weird things going on in that crawler module
byprdct has quit [Client Quit]
jonr22 has joined #ruby
<waxjar>
#method_missing sends messages to it's class o.O
byprdct has joined #ruby
<waxjar>
and the classes method_missing sends messages to yet another object 0.o
reinaldob has quit [Ping timeout: 265 seconds]
beilabs_________ has joined #ruby
<shevy>
I tell you
<shevy>
method_missing can be dangerous to handle
tjbiddle has joined #ruby
<shevy>
I used it in one game project to keep on sending method calls to other classes (other objects instantiated from different classes)
<shevy>
half a year later I came back and could no longer understand what was going on
alex88 has joined #ruby
tjbiddle has quit [Client Quit]
jonr22 has quit [Ping timeout: 256 seconds]
feow has joined #ruby
<shevy>
there is one instance where I use it though, in my incomplete ruby MUD where I simulate false by default for all objects, such as you get 0 in LPC for non-existing method calls
<shevy>
methods will always exist!
<waxjar>
no more NoMethodErrors! :D
<shevy>
yeah, you only get 0 back when it does not work in LPC, and any other value if it works... they then use custom error codes for what happens to objects that are moved around, like ->move() # 1 if it is moved successfully, return value of like 2 to "indicate failure because target inventory object could not handle incoming object due to it being too large/big a volume"
MattB2 has joined #ruby
<shevy>
erm, any other value to ... mean anything else... but 1 usually was a success. might be they also used negative values as return values in case it did not work, I forgot. been like 15 years or so
Mateon1 has quit [Ping timeout: 240 seconds]
adamski2600 has quit []
triple_b has joined #ruby
Earthnail has joined #ruby
alex88 has quit [Ping timeout: 250 seconds]
eguneys has joined #ruby
tejas-manohar has joined #ruby
<tejas-manohar>
is there an alternative to bundler?
<Earthnail>
1) is there a way to make Nokogiri's css selector case insensitive? 2) are there other XML parsing libraries other than Nokogiri that can handle tags and attributes case insensitively? Performance is not an issue.
<tejas-manohar>
i love bundler, but just wondering
mary5030 has quit [Remote host closed the connection]
mary5030 has joined #ruby
fabrice31 has quit [Ping timeout: 258 seconds]
beilabs_________ has joined #ruby
sevvie has quit [Read error: Connection reset by peer]
reactor has joined #ruby
cool has quit [Quit: Connection closed for inactivity]
sevvie_ has joined #ruby
mary5030_ has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
St_Marx has quit [Quit: WeeChat 1.0.1]
<eguneys>
Ok I found the problem, I can't parse a page with a missing header `Content-Type` using Wombat why?
St_Marx has joined #ruby
FrankenDaemon has joined #ruby
ZaRDaK has quit [Quit: Leaving]
tokik has quit [Ping timeout: 264 seconds]
beilabs_________ has quit [Ping timeout: 252 seconds]
beilabs_________ has joined #ruby
xenomorph is now known as {xenomorph}
mloveless has joined #ruby
<eguneys>
Say I want to alter the behaviour of a gem and test it in my app what do I do?
it0a has joined #ruby
WonderDave has joined #ruby
<shevy>
eguneys overwrite it - it is ruby code all the way
sevvie_ has quit [Read error: Connection reset by peer]
<eguneys>
shevy: like how, download source code/ edit / build a gem/ publish/ use your own gem ?
<shevy>
eguneys of course you must have the code available somewhere. ruby can not magically know what you wanna modify if you do not have the code
<shevy>
when you have the code, then of course, overwrite implies an "edit" action right?
beilabs_________ has quit [Ping timeout: 258 seconds]
<eguneys>
where is it in the bundler case
<shevy>
as for publish - why do you need to publish? In your question you only wrote you want to alter the behaviour of a gem, I don't understand why you ask to publish it
<shevy>
I have no idea, I do not use bundler. But bundler will work on a specific set of gems, so your gem must be there
<shevy>
so let me ask you: WHICH behaviour do you want to modify
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
sevvie has joined #ruby
snath has joined #ruby
mloveless has quit [Remote host closed the connection]
mloveless has joined #ruby
mjuszczak has joined #ruby
bluenemo has quit [Quit: Verlassend]
<mjuszczak>
I have this ruby code: node['resolver']['search'].split('.').map { |s| "dc=#{s}" }.join .... my goal was to replace "example.com" with "dc=example,dc=com". It's making it "dc=exampledc=com". How can I make sure the comma is in there?
mloveless has quit [Remote host closed the connection]
rylev has joined #ruby
aspires has joined #ruby
mloveless has joined #ruby
beilabs_________ has quit [Ping timeout: 250 seconds]