klaut has quit [Remote host closed the connection]
coca_rails has joined #ruby
pen has quit [Remote host closed the connection]
Landshark753 has joined #ruby
peneconleche is now known as peneconleche|awa
Kilo`Byte has quit [Quit: kilobyte22.de]
okinomo has joined #ruby
autumn has quit [Ping timeout: 246 seconds]
Kilo`Byte has joined #ruby
threesome has quit [Ping timeout: 260 seconds]
mmitchell has quit []
mikemac has quit [Ping timeout: 245 seconds]
Liothen has joined #ruby
ahawkins has joined #ruby
zombiebi_ has joined #ruby
autumn has joined #ruby
flubba has joined #ruby
zombiebit has quit [Ping timeout: 260 seconds]
bamdad has joined #ruby
mikemac has joined #ruby
bamdad has quit [Client Quit]
cj3kim has quit [Remote host closed the connection]
rickruby has quit [Remote host closed the connection]
<shevy>
mgberlin yeah. several ways. you could ask drbrain on #rubygems or #ruby-lang - he tries to ensure that the quality gets better
<shevy>
mgberlin another way is to file an issue at the https://bugs.ruby-lang.org/ site, just showing where the error is. someone else will most likely make a patch then
aryaching has joined #ruby
<mgberlin>
will do, thanks
VTLob has quit [Quit: VTLob]
maletor has joined #ruby
havenwood has joined #ruby
phipes has quit [Remote host closed the connection]
landon__ has joined #ruby
afhammad has quit [Remote host closed the connection]
phipes has joined #ruby
eka has joined #ruby
ChristianMarks has joined #ruby
ChristianMarks has left #ruby [#ruby]
okinomo has quit [Ping timeout: 265 seconds]
afhammad has joined #ruby
ebobby has quit [Ping timeout: 260 seconds]
RoryHughes has quit []
sailias has joined #ruby
rjhunter has joined #ruby
mzdravkov has left #ruby [#ruby]
autumn has quit [Ping timeout: 245 seconds]
waxjar_ has quit [Ping timeout: 252 seconds]
waxjar has joined #ruby
mojjojo has quit [Quit: mojjojo]
Xiti has joined #ruby
autumn has joined #ruby
RoryHughes has joined #ruby
<sts>
apeiros: thank you
pen has joined #ruby
<apeiros>
sts: ah, forgot the passing on example:
<apeiros>
class Foo; def each(&block); @internal_datastructure.each(&block); end; end
Asher has joined #ruby
pen has quit [Read error: Connection reset by peer]
pen has joined #ruby
aspires has quit []
kcombs has joined #ruby
mojjojo has joined #ruby
bogeyd6 has quit [Ping timeout: 245 seconds]
nisstyre has joined #ruby
bogeyd6 has joined #ruby
mojjojo has quit [Client Quit]
bogeyd6 has quit [Read error: Connection reset by peer]
pen has quit [Ping timeout: 272 seconds]
blackmesa has quit [Ping timeout: 240 seconds]
mikeric has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
predator117 has joined #ruby
mklappstuhl has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
serp` has joined #ruby
predator217 has quit [Ping timeout: 252 seconds]
pagioss has quit [Excess Flood]
eka has quit [Quit: Computer has gone to sleep.]
robustus has joined #ruby
pagioss has joined #ruby
mklappstuhl has quit [Ping timeout: 245 seconds]
emocakes has joined #ruby
nowthatsamatt has joined #ruby
ebobby has joined #ruby
benzrf has joined #ruby
croaky has quit [Ping timeout: 252 seconds]
<benzrf>
hi, i previously asked for constructive criticism on my code but then declined to share it because the guy who had me write it might not have wanted it publicly available
<benzrf>
DouweM: you offered to look at it right ?
tylersmith has joined #ruby
mercwithamouth has quit [Ping timeout: 265 seconds]
psyl0n has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 245 seconds]
psyl0n has joined #ruby
yshh has joined #ruby
coca_rails has quit [Remote host closed the connection]
afhammad has quit [Remote host closed the connection]
lyanchih has joined #ruby
afhammad has joined #ruby
larissa has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
afhammad has quit [Ping timeout: 252 seconds]
tkuchiki has joined #ruby
marr has quit [Ping timeout: 272 seconds]
totalmajor has joined #ruby
ewnd9 has joined #ruby
croaky has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest22909
estebistec has quit [Remote host closed the connection]
totalmajor has quit [Remote host closed the connection]
Faris has quit [Ping timeout: 245 seconds]
mneorr has joined #ruby
Guest22909 has quit [Ping timeout: 272 seconds]
threesome has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<benzrf>
any comments?
mdpatrick has quit [Quit: No Ping reply in 180 seconds.]
vongrippen has quit [Quit: No Ping reply in 180 seconds.]
sailias has quit [Quit: Leaving.]
sailias1 has joined #ruby
sailias1 is now known as sailias
<shevy>
yeah
<shevy>
can you use a pastie
<shevy>
I must download this
falood has joined #ruby
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
tkuchiki has quit [Remote host closed the connection]
<Jamo>
lets see
<shevy>
what is that? org.bukkit.Location.new
tkuchiki has joined #ruby
<benzrf>
jruby
<benzrf>
its part of the bukkit api
iliketurtles has joined #ruby
iliketurtles has quit [Excess Flood]
iliketurtles has joined #ruby
Faris has joined #ruby
iliketurtles has quit [Excess Flood]
yshh has quit [Remote host closed the connection]
tkuchiki has quit [Ping timeout: 245 seconds]
serp` has quit [Quit: serp`]
butblack has joined #ruby
Kricir has joined #ruby
afhammad has joined #ruby
ambushsabre has quit [Quit: rip]
ambushsabre has joined #ruby
fschuindt has joined #ruby
LexicalScope has quit [Ping timeout: 265 seconds]
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yshh has joined #ruby
<benzrf>
well?
<benzrf>
verdict?
<benzrf>
:|
totalmajor has joined #ruby
Seich has joined #ruby
<apeiros>
sry, too sleepy
<apeiros>
looks quite good on a cursory glance
<apeiros>
@ benzrf
<shevy>
dunno
<shevy>
I have no idea what this mysterious jruby thing does so I can't pass verdict on it
<Rennex>
looks pretty clean to me
phipes has quit [Remote host closed the connection]
estebistec has joined #ruby
<benzrf>
woot
<benzrf>
shevy: jruby is a ruby impl in java
dayepa has quit [Quit: dayepa]
<benzrf>
which can interface with java classes and objects
<shevy>
that sounds scary
<benzrf>
it is
<benzrf>
minecraft and its server are written in java, so bukkit is written in java (bukkit is a wrapper around minecraft's server that adds a nice api for plugins)
<benzrf>
so to write a minecraft plugin in ruby, you need to be able to interface with ajva
<benzrf>
*java
<benzrf>
hence, the code has to run on jruby
<benzrf>
*to write a bukkit plugin
<shevy>
hmmm
<shevy>
beautiful beautiful java
psyprus has quit [Read error: Connection reset by peer]
kitak has joined #ruby
psyprus has joined #ruby
Guedes0 has quit [Ping timeout: 245 seconds]
flubba has quit [Read error: Connection reset by peer]
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
<JustinAiken>
jruby :)
bricker`LA has joined #ruby
flubba has joined #ruby
<shevy>
well it has "ruby" in its name so that makes it prettier
<benzrf>
jruby has some nice bits
<benzrf>
it does name conversion for one
<benzrf>
so if a java class defines the methods 'getFoo' and 'setFoo', the ruby object that you cna use will have those but also 'foo' and 'foo='
<benzrf>
as aliases
<shevy>
hmmmm
<benzrf>
isFoo will be translated to foo?
<benzrf>
and camelCase is translated to snake_case in general
<benzrf>
so like if your wrapped type is 'maybe', where values of type maybe can be a value or they can be Nothing, then to chain functions that take a value and give you a maybe, just stop running the chain if one returns a maybe and otherwise feed the result along
<benzrf>
*returns a nothing
TomRone has joined #ruby
<benzrf>
in ruby that might look something like:
<benzrf>
class Object
<benzrf>
def bind
<benzrf>
if self.nil?
<benzrf>
nil
<benzrf>
else
<benzrf>
yield self
<benzrf>
end
vpretzel has joined #ruby
<benzrf>
end
<benzrf>
end
<benzrf>
now you can do this:
w4y has quit [Ping timeout: 246 seconds]
<benzrf>
3.bind {|n| n + 2}.bind {|n| n / 2}.bind {|n| nil}.bind {|n| n + 1}
zz_CripperZ has joined #ruby
<benzrf>
in haskell that would look like:
maletor has quit [Quit: Computer has gone to sleep.]
Hanmac has joined #ruby
<benzrf>
Just 3 >>= \n -> Just n + 2 >>= \n -> Just n / 2 >>= \n -> Nothing >>= \n -> Just n + 1
Hanmac1 has quit [Ping timeout: 264 seconds]
mneorr has quit [Remote host closed the connection]
<shevy>
well
sensen has joined #ruby
<jle`>
parentheses, but i'll let it pass
<shevy>
your ruby code scares me as well ;)
<benzrf>
:P
afhammad has quit [Ping timeout: 272 seconds]
mneorr has joined #ruby
yshh has joined #ruby
<jle`>
shevy: basically it prevents you from accidentally doing something to a nil
estebistec has quit [Read error: Connection reset by peer]
charliesome has joined #ruby
<jle`>
normally you would do the .nil? checking yourself, on every method
<jle`>
but bind handles the nil checking for you
estebistec has joined #ruby
<jle`>
so it'll evaluate the block *only if* the value isn't nil already
tahzeem has quit [Ping timeout: 240 seconds]
<jle`>
if it's already nil, it leaves it alone
<benzrf>
except that in haskell, a value that can be something or that can be nothing has to be of type Maybe <something>
<benzrf>
a value of type Int cant be nothing
<shevy>
oh man
<benzrf>
it can only be an int
<shevy>
I am gonna break those nils down
<benzrf>
so nil cant run around like in rubt
<benzrf>
*ruby
<benzrf>
unless you specify that your function can take Nothings, youll get a type error at compiling if you try to give it one
<benzrf>
yes but people think return is doing something different from what it is doing
maletor has joined #ruby
<benzrf>
should rly be called unit
<benzrf>
or pure
Kricir has quit [Remote host closed the connection]
<jle`>
well in this case, it is analogous to ruby's "return"/"next" ^.^
mneorr has quit [Ping timeout: 245 seconds]
<benzrf>
hmmmmm ish
Kricir has joined #ruby
emocakes has joined #ruby
<jle`>
if you squint, you can almost imagine doing a ctrl+f
samsonasu has quit [Quit: samsonasu]
<jle`>
well. the currying gets in the way admittedly.
<jle`>
maybe lambdas are more similar.
<jle`>
{ |n| next n+2 }
<jle`>
\n -> return (n+2)
<jle`>
come on it's basically the same thing :)
<benzrf>
it really really isnt
<benzrf>
because taking out the next changes nothing
<jle`>
well because in ruby there is an implicit next
<benzrf>
there is in haskell too
<benzrf>
the next aborts execution and gives back a value
<benzrf>
return turns a plain value into a monadic one
<benzrf>
they are nothing alike
<jle`>
well...it's not the same thing. but i was trying to maybe make things as lexically similar as possible
<benzrf>
ok, but semantics are generally more important than syntax
<benzrf>
;p
kitak_ has quit [Remote host closed the connection]
<benzrf>
lexically similar is BAD if the semantics arent similar
<benzrf>
causes confusion
ahawkins has quit [Ping timeout: 252 seconds]
<jle`>
but i like waving my hands :/
<benzrf>
hah
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
Kricir has quit [Ping timeout: 272 seconds]
Landshark753 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mercwithamouth has quit [Ping timeout: 252 seconds]
agent_white has quit [Quit: leaving]
mneorr has joined #ruby
mneorr_ has joined #ruby
Sawbones has quit [Ping timeout: 264 seconds]
Sawbones has joined #ruby
serp` has joined #ruby
mneorr has quit [Read error: No buffer space available]
Nahra has quit [Ping timeout: 245 seconds]
predator117 has quit [Ping timeout: 240 seconds]
Sawbones has quit [Remote host closed the connection]
clarknoah has joined #ruby
Nahra has joined #ruby
Sawbones has joined #ruby
Inoperable has quit [Ping timeout: 272 seconds]
predator117 has joined #ruby
Inoperable has joined #ruby
guardianx_ has joined #ruby
mikeric has quit []
Sawbones_ has joined #ruby
Sawbones has quit [Read error: Connection reset by peer]
Seich has quit [Ping timeout: 240 seconds]
ambushsabre has quit [Quit: rip]
Sawbones_ has quit [Remote host closed the connection]
benzrf has quit [Quit: fzzz]
pen has joined #ruby
Sawbones has joined #ruby
RoryHughes has quit []
Seich has joined #ruby
abramovic has joined #ruby
larissa has quit [Quit: Leaving]
danshultz has quit [Remote host closed the connection]
danshultz has joined #ruby
mneorr_ has quit [Remote host closed the connection]
pen has quit [Ping timeout: 245 seconds]
Sawbones has quit [Ping timeout: 272 seconds]
phipes has joined #ruby
mneorr has joined #ruby
weirdpercent has joined #ruby
<weirdpercent>
I have a list of URLs to forum posts and I want to chop off all characters after a certain point. I could do it with regex but there are several different kinds, what's the most efficient way to do this?
timonv has joined #ruby
centipedefarmer has joined #ruby
mdpatrick has joined #ruby
vongrippen has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
phipes has quit [Ping timeout: 264 seconds]
mneorr has quit [Ping timeout: 265 seconds]
guardianx_ has quit [Remote host closed the connection]
ambushsabre has joined #ruby
timonv has quit [Ping timeout: 272 seconds]
<shevy>
jle` what else do you like doing with your hands
maletor has quit [Quit: Computer has gone to sleep.]
totalmajor has quit [Remote host closed the connection]
<law>
many thanks, thats exactly what I was looking for!
banghouse is now known as Guest69426
<Dude007>
You're welcome
TomRone has joined #ruby
okinomo has joined #ruby
Guest69426 has quit [Ping timeout: 260 seconds]
Tearan has joined #ruby
<Dude007>
I got a question as well. File.open(path, 'r+') { |file| file.write Base64.encode64(file.read) } This code appends the base64 encoded string after the binary itself. Do somebody know why?
psyl0n has quit [Remote host closed the connection]
mgberlin has quit [Quit: mgberlin]
maletor has quit [Quit: Computer has gone to sleep.]
Dude007 has left #ruby [#ruby]
Dude007 has joined #ruby
Dude007 has quit []
Dude007 has joined #ruby
mikeric has quit []
axl_ has quit [Quit: axl_]
parduse is now known as Guest39231
parduse has joined #ruby
Guest39231 has quit [Ping timeout: 252 seconds]
axl_ has joined #ruby
cj3kim_ has joined #ruby
Wolland has quit []
burlyscudd has quit [Quit: Leaving.]
phipes has joined #ruby
asteve has joined #ruby
<law>
you can't write to a file you've opened for reading?
zhouitpro has joined #ruby
grep_away is now known as grep_awesome
<law>
and I suspect file.write needs its arguments in parens
<law>
i.e. 'file.write(Base64.encode(blargh))'
pen has joined #ruby
mary5030 has joined #ruby
<pontiki>
well, you *can*, but you probably shouldn't
Mars` has joined #ruby
<pontiki>
not there, it doesn't, law
alvinsj has quit [Remote host closed the connection]
<pontiki>
Dude007: after you've read the file, where do you think the file pointer is going to be?
tylersmith has quit [Remote host closed the connection]
mr_red has quit [Quit: Bye :)]
<Dude007>
pontiki: I have absolutely no idea
<law>
how can I get my quick n' dirty ruby script to accept both a file argument and STDIN for its input?
estebistec has quit [Remote host closed the connection]
<sisco_dreamber>
here the error : At least one output file must be specified
<sisco_dreamber>
sh: line 1: -vcodec: command not found
<sisco_dreamber>
it seems doesnt read the rest of the line
<mdel>
jrobeson, ok I won't try to force sprockets then. I was just trying to utilize it as much as possible so that it can best handle stuff like precompilation
<sisco_dreamber>
what am i doing wrong?
<jrobeson>
well it'll still do that
<jrobeson>
sisco_dreamber, first i'd look for a library that works with ffmpeg instead of trying to parse the params yourself..
<jrobeson>
see if a gem like that exists
Mars` has quit [Remote host closed the connection]
clarknoah has joined #ruby
<jrobeson>
otherwise why bother doing a ruby script.. just write a shell script
BrixSat_ has quit [Remote host closed the connection]
<sisco_dreamber>
i did a shell script before
<mdel>
im using sprockets in sinatra, so I wanted to do it the rails way. I prefer handling includes in scss anyway
Hanmac1 has quit [Ping timeout: 252 seconds]
Mars` has joined #ruby
<sisco_dreamber>
but it doesnt work with ruby because i use GOD script
<sisco_dreamber>
the shell works great
<jrobeson>
sisco_dreamber, well change exec to puts .. and then make sure the command still works
BrixSat has joined #ruby
jacderida has quit [Quit: Leaving]
<sisco_dreamber>
it gets the variable and append to the line
<jrobeson>
that is.. echo the command and test it
<sisco_dreamber>
puts work but doesnt execute
<sisco_dreamber>
ok
<jrobeson>
of course not
<sisco_dreamber>
i will do echo now
<jrobeson>
just make sure that you actually composed it correctly
<sisco_dreamber>
ok
<jrobeson>
cuz it sounds like you didn't build it correctly and i don't know ffmpeg well enough to suggest what it is you're doing wrong
<jrobeson>
also you should generally try to make sure you escape stuff you pass to shell commands to prevent all sorts of nasty exploits
<jrobeson>
so look into that
<sisco_dreamber>
puts works
<sisco_dreamber>
i got output like expected
<sisco_dreamber>
thats what i dont understand
<sisco_dreamber>
put gives me output correct
<sisco_dreamber>
when i switch puts to exec
<sisco_dreamber>
then it cant read the rest of the file
<sisco_dreamber>
-vcodec command not know
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sisco_dreamber>
when i use directly ffmpeg it works and shell it works
<sisco_dreamber>
is there any command to execute then exec?
<jrobeson>
probably.. but i've never used exec.. i generally look for any alternative to calling an external program form my ruby scripts
<jrobeson>
perhaps somebody else will know better
<sisco_dreamber>
hope so
<sisco_dreamber>
:(
Mars` has quit [Ping timeout: 265 seconds]
timonv has joined #ruby
freerobby has quit [Quit: Leaving.]
<cgcardona_>
I want to use this gem to encrypt an auth_token and refresh token for each user in my app (https://github.com/attr-encrypted/encryptor). The gem readme docs say that we need to use an initialization vector, secret_key, and salt to encrypt/decrypt. My question is do the initialization vector, secret_key, and salt need to be unique for each user? And if so where should I store them after using them to encrypt so that I can have them
<cgcardona_>
again when I need to decrypt at a different place in the app? If the initialization vector, secret_key, and salt don't need to be unique to each user would the suggested route be to store them as env vars? Thanks in advance for any help.
OdNairy has joined #ruby
ebobby has joined #ruby
lewix has quit [Remote host closed the connection]
mneorr has joined #ruby
Yarou has quit [Quit: This computer has gone to sleep]
clarknoah has quit [Quit: clarknoah]
JohnBat26 has joined #ruby
clarknoah has joined #ruby
ebobby has quit [Ping timeout: 246 seconds]
brunops has quit [Quit: leaving]
<jrobeson>
sisco_dreamber, the quick solution in the moment is just create a shell script and exec() that
Inoperable has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Ping timeout: 260 seconds]
Wolland has quit [Remote host closed the connection]
<sisco_dreamber>
jrobeson
<sisco_dreamber>
well i have it already
<sisco_dreamber>
but the problem is : i use god to monitor my shell (run ffmpeg)
<sisco_dreamber>
so if ffmpeg stops it will relaunch it again
afhammad has joined #ruby
iliketurtles has joined #ruby
<sisco_dreamber>
if i have an alternative to this of course i will use shell, i was thinking about cron job, but i want ffmpeg to restart only if it goes down
iliketurtles has quit [Excess Flood]
Inoperable has joined #ruby
<jrobeson>
that's what i' msaying.. is use your ruby script.. but instead of execting ffmpeg directly.. exec your shell script
<jrobeson>
which does exec ffmpeg
<jrobeson>
or do some more reading to figure out where you went wrong with exec.. it's likely a tiny oversight
mengu has joined #ruby
<sisco_dreamber>
yes it does
<sisco_dreamber>
but
existensil has joined #ruby
<sisco_dreamber>
if i try to append variable to the input like ffmpeg -i "input"$variable
<sisco_dreamber>
shell works great
tylersmith has joined #ruby
<sisco_dreamber>
but not ruby
rjhunter has joined #ruby
<jrobeson>
that doesn't change my suggesting in any way
vlad_starkov has quit []
vlad_starkov has joined #ruby
rjhunter has quit [Read error: Connection reset by peer]
<sisco_dreamber>
my problem is the variable id dynamic
rjhunter has joined #ruby
<sisco_dreamber>
i have to change it every 24 hours
<sisco_dreamber>
so i put into a file text
<sisco_dreamber>
and all my script get the variable from it
<WJW>
sisco_dreamer, if you want to use Ruby, it cal also get the value from the file.
<WJW>
"can also", I meant.
<sisco_dreamber>
yes i did
<sisco_dreamber>
it works
<WJW>
Cool.
<sisco_dreamber>
if i use puts
<sisco_dreamber>
it output all correct
<sisco_dreamber>
when i use exec
<WJW>
Well, maybe something is broken about 'exec'.
<sisco_dreamber>
i got error -vcodec unknow
<sisco_dreamber>
hmmm
rjhunter has quit [Ping timeout: 252 seconds]
<WJW>
So, what jrobeson said.
<sisco_dreamber>
At least one output file must be specified
<sisco_dreamber>
sh: line 1: -vcodec: command not found
<sisco_dreamber>
shell script
<sisco_dreamber>
bash
<sisco_dreamber>
i did also it works
<WJW>
Yes, shell script, bash.
<sisco_dreamber>
when i call it from ruby (god script)
<sisco_dreamber>
it doesnt work
<WJW>
You can't make your god script call the shell on the shell file?
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jrobeson>
maybe you're missing some sort of escaping that exec requires
<jrobeson>
i'd suggest rereading the docs on exec and then try execing something less complex that ffmpeg until you get that working
<WJW>
I have used backticks; I suppose they are semantically the same as exec.
<jrobeson>
s/that/than
Tearan has joined #ruby
<WJW>
>> "running?"
<jrobeson>
or you can use %x{} i think
<jrobeson>
which doesn't require quoting
Kiba has quit [Ping timeout: 260 seconds]
<sisco_dreamber>
now im using exec ("ffmpeg...............")
<jrobeson>
as long as you're not using ruby 1.8.x i think
grep_awesome is now known as grep_away
<sisco_dreamber>
im using ruby 1.8
<jrobeson>
that ruby is EOL
* jrobeson
doesn't touch it with a 10 foot pole
<sisco_dreamber>
aha means?
r0bby_ has quit [Read error: No route to host]
<sisco_dreamber>
im new to this
mclee has joined #ruby
r0bby_ has joined #ruby
clarknoah has quit [Quit: clarknoah]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<WJW>
In exec, you have to use separate arguments for the shell arguments??
<WJW>
No, it's more complex than that.
fire has quit [Quit: WeeChat 0.4.1]
<WJW>
Oh, exec really does sys exec, and so the Ruby goes away. Is that what you want?
mclee has quit [Client Quit]
<sisco_dreamber>
whats the link for pastbin
fire has joined #ruby
<sisco_dreamber>
i will post the command to have a better idea
<WJW>
irb(main):001:0> exec "echo this is a long string that I am going to type here and now until I get tired of typing it now is the time for every good man to come to the aid of his party."
<DouweM>
Advocation: also, although they can be omitted, parentheses are generally preferred around method arguments. so `File.open('AoM Booklist.txt', 'w')`
<DouweM>
Note that the puts on line 17 is the same puts as on line 13, both are the method on IO, only the former is on your main object which includes Kernel which includes IO, so it writes to standard out, and the latter is on `f` explicitly
<jokke>
i omit parentheses only when the method has no arguments or when it has one but nothing comes after the method invocation in that line
<DouweM>
I only omit parantheses when there are no args, or if we're working with a DSL
<Advocation>
DouweM: ok, sounds cool
<jokke>
yeah
psyl0n has joined #ruby
blackmesa has joined #ruby
sayan has quit [Ping timeout: 265 seconds]
<DouweM>
I always include parentheses with one argument, except with #puts
flubba has quit [Remote host closed the connection]
eka has joined #ruby
Advocation has quit [Quit: Advocation]
<apeiros>
DouweM: "on your main object which includes Kernel which includes IO"
<apeiros>
close, but not correct like that
<apeiros>
IO is a class, not a module and can't be included
<apeiros>
Kernel#puts is simply defined as $stdout.puts, and $stdout is an IO
<DouweM>
Ah, right you are. For some reason I was under the impression that Kernel had all IO methods
Zai00 has joined #ruby
<DouweM>
Thanks
rjhunter has joined #ruby
dross has joined #ruby
<apeiros>
yw :-)
chopmo has joined #ruby
threesome has quit [Ping timeout: 245 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rjhunter has quit [Ping timeout: 240 seconds]
sensen has quit [Quit: leaving]
max96at has joined #ruby
fire has joined #ruby
dross has quit [Ping timeout: 265 seconds]
chopmo has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
ehaliewicz has quit [Remote host closed the connection]
levity_island has quit [Quit: levity_island]
blackmesa has quit [Ping timeout: 240 seconds]
mojjojo has quit [Quit: mojjojo]
mojjojo has joined #ruby
retrofade has joined #ruby
fire has quit [Ping timeout: 240 seconds]
eka has quit [Quit: Computer has gone to sleep.]
mojjojo has quit [Client Quit]
mojjojo has joined #ruby
fire has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
mzdravkov has quit [Ping timeout: 245 seconds]
mzdravkov has joined #ruby
afhammad has quit []
kep has joined #ruby
<kep>
/cl/cl
<zxd>
what does the # mean in #{foo}
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
JohnBat26 has quit [Remote host closed the connection]
krz has joined #ruby
Zackio has joined #ruby
rippa has joined #ruby
geekbri has joined #ruby
St_Marx has joined #ruby
drumusician has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
kirun has joined #ruby
<pipecloud>
Finally.
popl has quit [Quit: And then there are people who prefer to look their fate in the eye.]
Azulinho has joined #ruby
vlad_starkov has joined #ruby
rippa has quit [Ping timeout: 248 seconds]
drumusician has quit [Read error: No buffer space available]
jellow_ is now known as jellow
jellow has quit [Changing host]
jellow has joined #ruby
drumusician has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
chopmo has joined #ruby
mercwithamouth has joined #ruby
arietis has joined #ruby
drago777 has joined #ruby
veterinarian has joined #ruby
<ace_striker>
shevy: Hanmac : what's your point there ?
chopmo has quit [Ping timeout: 246 seconds]
<DouweM>
If I have two dates, say Date.new(2013,12,26) and Date.new(2014,1,5), how can I get the number of nights between them *per year* ? In this case I'd want { 2013 => 6, 2014 => 2}. Note that the dates can also be in the same year, or more than one year apart
lurch_ has quit [Quit: lurch_]
<DouweM>
whoops, 2014 => 4
lewix has joined #ruby
Azulinho has quit [Quit: WeeChat 0.4.2]
<Hanmac>
ace_striker: rails users are like apple users ... think that they are superior than others ... and most of the time really annoying
Wolland has quit []
tyl has joined #ruby
<ace_striker>
Hanmac: it's not like that !!
<ace_striker>
people do prove the point ..
lewix has quit [Remote host closed the connection]
lurch_ has joined #ruby
senayar has quit [Remote host closed the connection]
Azure has joined #ruby
<Hanmac>
my biggest problem with rails users is that they learn rails before ruby and then think that each method they learned from rails exist in ruby too
totalmajor has joined #ruby
browndawg has quit [Ping timeout: 240 seconds]
<pipecloud>
Mine is that they never learn ruby.
<pipecloud>
"Please to handle file uploads a gem?" look at the request, it's a damn IO object.
ae-r has joined #ruby
Azulinho has joined #ruby
fixl has quit [Remote host closed the connection]
karupanerura is now known as zz_karupanerura
Azulinho has quit [Client Quit]
Azulinho has joined #ruby
parduse has quit [Read error: Connection reset by peer]
ged__ is now known as ged
predator117 has quit [Ping timeout: 264 seconds]
lurch_ has quit [Quit: lurch_]
totalmajor has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
<zxd>
what does intern mean?
<zxd>
"hello world".intern
<pipecloud>
It makes the string immutable and persistent in heap.
<pipecloud>
Wait, sorry thinking of something else.
<shevy>
ace_striker that like 50% of the irc folks are gone
parduse has joined #ruby
<pipecloud>
It returns the symbolized version of your string.
<Hanmac>
zxd: String#intern == String#to_sym #=> makes a Symbol from a String
<DouweM>
Hanmac: thanks! I had already figured out something similar myself
mengu has quit [Remote host closed the connection]
<ace_striker>
shevy: everyone is celebrating new year ..i guess..shopping spree might be !!
<Hanmac>
DouweM: let me guess ... my code is better? ;P
<shevy>
nono, even weeks ago
retrofade has joined #ruby
<ace_striker>
shevy: so you means RoR trend is dying ?
lkba has joined #ruby
senayar has joined #ruby
<Hanmac>
ace_striker: thats we all hope for
<shevy>
ace_striker could be or it could not be, my comment was mostly in regards to the amount of people who are there. where did they go?
<shevy>
what happened to them!
<shevy>
WHERE ARE THEY NOW!!!
EngierkO has joined #ruby
<DouweM>
Hanmac: my code now gives [Thu, 26 Dec 2013..Wed, 01 Jan 2014, Wed, 01 Jan 2014..Thu, 01 Jan 2015] for start_date Date.new(2013,12,26) end_date Date.new(2015,1,1) which is actually more useful to me ;)
burlyscudd has quit [Ping timeout: 260 seconds]
<ace_striker>
Hanmac: don't say that !
<Hanmac>
oh you wanted ranges, i could make that too
drumusician has quit [Ping timeout: 246 seconds]
diegoviola has joined #ruby
<Hanmac>
shevy: they are all banished into the Nevermore ;P
<DouweM>
Hanmac: I wanted either, went with ranges myself
predator117 has joined #ruby
<ace_striker>
shevy: Hanmac : maybe all are working onsite instead of online !!
specious has quit [Ping timeout: 245 seconds]
* Hanmac
is still angry that rails/activesupport doesn't get human file sizes right ... and that after so many years
<zxd>
status = "peace" buggy_logger = status why isn't it required to use #{status} to get value stored in the variable status?
Azulinho_ has joined #ruby
Azulinho_ has quit [Client Quit]
Azulinho_ has joined #ruby
<Hanmac>
zxd where do you think you would need that?
Azulinho has quit [Quit: Leaving]
bayhonan has quit [Read error: Connection reset by peer]
Azulinho_ has quit [Client Quit]
<Hanmac>
>> 1+2 #test
Azulinho has joined #ruby
Neomex has joined #ruby
matchaw has quit [Ping timeout: 240 seconds]
matchaw has joined #ruby
Guest42481 has quit [Ping timeout: 272 seconds]
<shevy>
zxd you need #{} only in a string man
brunetti has joined #ruby
<shevy>
zxd #{} is equivalent to do .to_s
raar has joined #ruby
predator117 has quit [Ping timeout: 246 seconds]
arietis has quit [Quit: Computer has gone to sleep.]
Azulinho has quit [Client Quit]
raar is now known as Guest91611
Wolland has joined #ruby
predator117 has joined #ruby
<Hanmac>
shevy did you know that ruby parses "12#{ "str" }34" as "12str34" ? ;P
securitycrush has joined #ruby
<shevy>
dunno
<Hanmac>
apeiros: you can look too: RubyVM::InstructionSequence.compile('"12#{"str"}34"').disasm.lines[2] #=> "0002 putstring \"12str34\"\n"
<shevy>
I dont use #{} much really
Azulinho has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
Azulinho has quit [Client Quit]
Azulinho has joined #ruby
jhaig has joined #ruby
ae-r has quit [Remote host closed the connection]
drago777 has joined #ruby
<Hanmac>
shevy i mean the fun is when you use a string literal inside another string literal with #{} ruby parses as only one string
jibi has quit [Read error: Connection reset by peer]
ae-r has joined #ruby
predator117 has quit [Ping timeout: 272 seconds]
retrofade has quit [Ping timeout: 245 seconds]
ewnd9 has joined #ruby
Azulinho has quit [Client Quit]
ekarlso has quit [Changing host]
ekarlso has joined #ruby
Azulinho has joined #ruby
dorei has quit []
breakingthings has joined #ruby
<shevy>
ya well
<shevy>
will hit only folks who use #{}
jibi has joined #ruby
Neomex has quit [Ping timeout: 264 seconds]
figgleberry has joined #ruby
Neomex has joined #ruby
aryaching has joined #ruby
bogeyd6 has joined #ruby
OdNairy has joined #ruby
mojjojo has quit [Quit: mojjojo]
dagen has quit [Ping timeout: 272 seconds]
rjhunter has joined #ruby
mojjojo has joined #ruby
<jhaig>
Hello. I'm trying to access an https page with 'net/http'. I have set http.use_ssl as true and http.cert to the certificate file: http.cert = OpenSSL::X509::Certificate.new(File.read('file.cer')) but it is getting an 'sslv3 alert handshake failure' error.
<jhaig>
I can use 'file.cer' to get the page with curl.
krz has quit [Ping timeout: 252 seconds]
mojjojo has quit [Client Quit]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<WJW>
I like programs not to be so wide I can't read them on the left or right half of my screen.
TheNumb has joined #ruby
alexherb1 has joined #ruby
<apeiros>
you can use the fact that `"foo" "bar"` is "foobar" and escape the newline, like so:
<WJW>
I believe that the emptiness in {} evaluates to nil and so if nil.to_s returned "nil", then using {} to insert whitespace for readability wouldn't work.
<shevy>
Hanmac1, now it's your time to shine, a bundler question arose
Hanmac1 is now known as Hanmac
<DouweM>
pengunix: you're looking for "bundler", but because you're not the first to make that typo, "bundle" exists as well as a no-op, except for requiring the real "bundler"
<Hanmac>
bundler is the new rails ... everyone wants to use it, even if its not necessary ...
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<WJW>
How else you keep track of what gem versions you need?
_4V_ has quit []
<shevy>
Hanmac hehehe
clamstar has joined #ruby
<shevy>
WJW always the latest and greatest
cbetta is now known as cbetta_afk
cbetta_afk is now known as cbetta
<pengunix>
ah
<Hanmac>
WjW i just uses the newest version possible and if its not working i update my own code (otherwise you may bet diamond depending problem and THEN it bites you in your ass)
<pengunix>
this makes things clear, thank you
vlad_starkov has quit [Remote host closed the connection]
<WJW>
Don't like the idea of a project changing its behavior when I haven't changed the code.
<shevy>
you don't want to get your ass bitten!
freerobby has joined #ruby
wmoxam_ has quit [Quit: leaving]
wmoxam has joined #ruby
JZTech101 has joined #ruby
retrofade has joined #ruby
ludar has quit [Ping timeout: 245 seconds]
coca_rails has joined #ruby
Xiti has joined #ruby
vlad_starkov has joined #ruby
Hanmac1 has joined #ruby
Shayan_ has quit [Quit: Page closed]
ace_striker has joined #ruby
Hanmac has quit [Ping timeout: 260 seconds]
juarlex has quit [Remote host closed the connection]
xiphias has quit [Ping timeout: 240 seconds]
agjacome has joined #ruby
<apeiros>
Hanmac1: bundler gets integrated into rubygems, so needless usage might drop a bit
Hanmac1 is now known as Hanmac
roadt has joined #ruby
xiphias has joined #ruby
jerius has quit []
<Hanmac>
apeiros: i might not have a problem with that when they do it right ... but the diamond depending problem still exist
rickruby has quit [Remote host closed the connection]
bsdbeard has joined #ruby
Kruppe- has quit [Ping timeout: 240 seconds]
pengunix has left #ruby [#ruby]
krz has joined #ruby
coca_rails has quit [Remote host closed the connection]
<shevy>
ack
<shevy>
bundler will be assimilated into rubygems?
mary5030 has joined #ruby
<Hanmac>
apeiros: my current problem with bundler (and also a bit with rvm & others) is that its users update their ruby version but forget to reinstall all the native gems ... the last time i got such a problem was because all "#nil?" tests does fail
Bumptious has quit [Remote host closed the connection]
<shevy>
bundler helps lazy users and newbies
chopmo has quit [Remote host closed the connection]
_maes_ has joined #ruby
<apeiros>
Hanmac: native gems?
<apeiros>
there's no such thing :)
Bumptious has joined #ruby
<apeiros>
also, #nil? is core, that does not require any gem…
Kruppe has joined #ruby
juarlex has joined #ruby
<apeiros>
got to go, bye
<Hanmac>
apeiros: i mean C-extensions
apeiros has quit []
tahzeem has quit [Ping timeout: 240 seconds]
sharms has quit [Ping timeout: 240 seconds]
juarlex has quit [Remote host closed the connection]
tahzeem has joined #ruby
chopmo_ has joined #ruby
russt_ has quit [Quit: russt_]
_maes_ has quit [Client Quit]
sharms has joined #ruby
jerius has joined #ruby
bean has joined #ruby
starship has left #ruby ["WeeChat 0.4.3-dev"]
TomRone has quit [Ping timeout: 240 seconds]
<shevy>
Hanmac will bundler really become integrated?
<Hanmac>
i dont know, we will see
<DrOwl>
Hi All, i am having confusions with a gem "HTTPClient/SSLConfig" i am trying to get it not to report an error/warning becouse of a self signed sert
smathieu has joined #ruby
clarknoah has joined #ruby
<DrOwl>
I have tried verify_mode = 0 and "options = OpenSSL::SSL::VERIFY_NONE" and a few other things i forget, but can not get it to stop wanrning,
<DrOwl>
and suggestions?
TomRone has joined #ruby
<DrOwl>
^any
workmad3 has joined #ruby
lyanchih_ has joined #ruby
bean has quit [Ping timeout: 240 seconds]
totalmajor has quit [Remote host closed the connection]
totalmajor has joined #ruby
mercwithamouth has joined #ruby
[0x1a] has joined #ruby
Wolland has quit []
asteve has joined #ruby
devdazed has quit [Quit: Bye]
sayan has quit [Quit: Leaving]
devdazed has joined #ruby
krnflake has quit [Ping timeout: 252 seconds]
mlpinit_ has joined #ruby
Wolland has joined #ruby
totalmajor has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
sambao21 has joined #ruby
ambushsabre has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mlpinit has quit [Ping timeout: 260 seconds]
bean has joined #ruby
bean has quit [Max SendQ exceeded]
larssmit has quit [Quit: Leaving.]
[0x1a] has quit [Changing host]
[0x1a] has joined #ruby
[0x1a] has quit [Changing host]
[0x1a] has joined #ruby
bean has joined #ruby
ludar has joined #ruby
larissa has joined #ruby
elux has joined #ruby
iamjarvo has joined #ruby
krz has quit [Read error: Operation timed out]
kevind_ has joined #ruby
krnflake has joined #ruby
psyl0n_ has quit [Remote host closed the connection]
russt has quit [Remote host closed the connection]
mengu has quit []
russt has joined #ruby
russt has quit [Client Quit]
<bsdbeard>
Trying to install a ruby project, did bundle install, now it says "Xapian version 1.2.15 or higher required", even though bundle install installed xapian-ruby 1.2.15.1
* bsdbeard
knows nothing about ruby/gem/bundle
retrofade has quit [Ping timeout: 272 seconds]
rjhunter has joined #ruby
butblack has joined #ruby
russt has joined #ruby
<Hanmac>
bsdbeard: #bundler
clamstar has quit [Ping timeout: 252 seconds]
<bsdbeard>
alright
IceDragon has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
interactionjaxsn has quit [Remote host closed the connection]
joast has joined #ruby
smathieu has joined #ruby
clamstar has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
rjhunter has quit [Ping timeout: 240 seconds]
noop has quit [Ping timeout: 252 seconds]
predator117 has quit [Ping timeout: 265 seconds]
iamjarvo has quit [Remote host closed the connection]
predator117 has joined #ruby
iamjarvo has joined #ruby
smathieu has quit [Ping timeout: 252 seconds]
drago777 has quit [Ping timeout: 240 seconds]
jerius has quit [Ping timeout: 245 seconds]
chopmo_ has quit [Remote host closed the connection]
krz has quit [Ping timeout: 245 seconds]
iamjarvo_ has joined #ruby
drago777 has joined #ruby
smathieu has joined #ruby
MindfulMonk has joined #ruby
iamjarvo has quit [Ping timeout: 246 seconds]
assurbanipal has joined #ruby
psyl0n has joined #ruby
psyl0n has quit [Changing host]
psyl0n has joined #ruby
centipedefarmer has joined #ruby
psyl0n has quit [Remote host closed the connection]
bluOxigen has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
chopmo has quit [Remote host closed the connection]
lewix has quit [Remote host closed the connection]
BuGo_ has joined #ruby
<BuGo_>
Hi
drago777 has joined #ruby
<BuGo_>
Previously kill -2 PID used to throw Interrupt exception. How to do it now?
aryaching_ has quit [Ping timeout: 272 seconds]
oddalot has quit [Ping timeout: 260 seconds]
workmad3 has quit [Read error: Operation timed out]
psyl0n has joined #ruby
<BuGo_>
Previously kill -2 PID used to throw Interrupt exception. How to do it now?
havenwood has joined #ruby
meatherly has joined #ruby
<meatherly>
rails testing question. Should you ever do an assert in a loop? Something like User.all.each{ |user| page.should have_content user.name }
weeems is now known as weems
weems has quit [Changing host]
weems has joined #ruby
danshult_ has quit []
aryaching has joined #ruby
krzkrz has quit [Ping timeout: 272 seconds]
<shevy>
ack
<shevy>
is that not better for #RubyOnRails channel
<meatherly>
lol going there now. sorry about that
roadt has quit [Ping timeout: 245 seconds]
jhaig_ has joined #ruby
Megtastique has joined #ruby
<shevy>
no worries, many people here in #ruby don't know rails
cgore has joined #ruby
_maes_ has joined #ruby
mlpinit_ has quit [Remote host closed the connection]
<meatherly>
I mean I could also just ask is good to do an assert in a loop?
jhaig has quit [Ping timeout: 264 seconds]
jhaig_ is now known as jhaig
mlpinit has joined #ruby
pagioss is now known as pagios
habanany has quit [Ping timeout: 252 seconds]
meatherly has quit [Remote host closed the connection]
meatherly has joined #ruby
drim has joined #ruby
<drim>
: Im using em-websocket and im trying to read websocket request headers. I can access it throw ws.handshake.headers but is it an easy way to parse it to get the cookie?
<terrellt>
meatherly: That seems silly to me. Test states, not all users. Especially since you should probably only have one user for a test.
gja has joined #ruby
clamstar has quit [Ping timeout: 252 seconds]
<meatherly>
true true.
jerius has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
clamstar has joined #ruby
lyanchih_ has quit [Quit: lyanchih_]
psyl0n has quit [Read error: Connection reset by peer]
chomskiii has quit [Ping timeout: 265 seconds]
burlyscudd has joined #ruby
<ForceMultiplier>
can ya'll help me
<ForceMultiplier>
i tested some simple code in IRB
<WJW>
Depends.
<ForceMultiplier>
and it works there
butblack has quit [Quit: butblack]
<ForceMultiplier>
but when i use it across two .rb's it doesnt work
<ForceMultiplier>
and im confused
<olivier_bK>
i have a question about how to get the output of script
AlSquire has quit [Quit: This computer has gone to sleep]
<WJW>
ForceMultiplier, does one of the .rb's load the other?
<olivier_bK>
i need to execute one script in the server A by server B and i would want to know if he make a good job or bad job ?
tylersmith has quit [Remote host closed the connection]
croaky has quit [Ping timeout: 252 seconds]
simplyaubs has joined #ruby
kate_r_ has quit [Ping timeout: 272 seconds]
meatherly has quit []
drago777 has joined #ruby
meatherly has joined #ruby
ehc has joined #ruby
clarknoah has joined #ruby
kate_r has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<apeiros>
kraljev0: Ripper, whitequark's parser (don't know the name), zenspiders parser (ruby_parser I think)
zipper has joined #ruby
zipper has quit [Client Quit]
<kraljev0>
thanks, going to look into that
zipper has joined #ruby
<apeiros>
also, what you have is an AST, not polish notation.
<apeiros>
polish notation is flat
user258467 has quit [Quit: Quitte]
ambushsabre has joined #ruby
<kraljev0>
if you call .flatten on that,
<kraljev0>
:)
<kraljev0>
also: How to transform ruby expression to expression tree
joaoh82_ has quit [Remote host closed the connection]
alexherb1 has joined #ruby
wildroman2 has joined #ruby
wildroman2 has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
wildroman2 has joined #ruby
Jake232 has joined #ruby
retrofade has quit [Ping timeout: 252 seconds]
clarknoah has quit [Quit: clarknoah]
mneorr has quit [Remote host closed the connection]
jhaig has quit [Quit: ChatZilla 0.9.90.1 [Firefox 26.0/20131205075310]]
clamstar has quit [Quit: Computer has gone to sleep.]
mneorr has joined #ruby
assurbanipal has quit [Remote host closed the connection]
clarknoah has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
ozgun has quit [Quit: Leaving]
clarknoah has quit [Client Quit]
grep_away is now known as grep_awesome
TomRone has quit [Ping timeout: 240 seconds]
aspires has joined #ruby
ArchSurf has joined #ruby
mneorr has quit [Ping timeout: 272 seconds]
vismay has joined #ruby
TomRone has joined #ruby
ylluminate has joined #ruby
mklappstuhl has joined #ruby
<ericwood>
ugh, maintainer of this Gem hasn't touched it in 3 years, won't respond to my emails asking if I can take over it as a maintainer
<ericwood>
won't touch pull requests, no commits in 3 years
<havenwood>
ericwood: fork eet!@
<ericwood>
havenwood: currently have a fork used for my work, but I'm annoyed that none of my changes are available for anyone else who uses the gem :(
grep_awesome is now known as grep_away
<ericwood>
plus I'd like to maintain an OSS project that people use
rjhunter has joined #ruby
<havenwood>
ericwood: can maintain the fork, a good number of popular projects started as forks of an unmaintained code spike or the like
<ericwood>
havenwood: right, but if you do "gem install pygmentize" you'll get the shitty one
<havenwood>
ericwood: ah, a known gem
<ericwood>
yeah, lots of people use it
ArchSurf has quit [Quit: Leaving]
<ericwood>
emailed the maintainer again today, maybe this time he won't ignore me
ArchSurf has joined #ruby
<havenwood>
ericwood: did you try both the owners?
krnflake has joined #ruby
guiocavalcanti has joined #ruby
<ericwood>
oh good point, there's multiple
<ericwood>
I guess they'd have to give me access to the rubygems account too
<ericwood>
idk how that stuff works
deception has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
danshultz has quit [Read error: Connection reset by peer]
ArchSurf has quit [Client Quit]
<ericwood>
havenwood: wait, how are you seeing the maintainers?
<havenwood>
ericwood: well, for the purpose of being able to push the newly cut gem, need a person in the spec.authors Array in the gem's .gemspec
jonathanwallace has quit [Ping timeout: 272 seconds]
<havenwood>
L7 for the corresponding email addys :P
<havenwood>
ericwood: np
rjhunter has quit [Ping timeout: 246 seconds]
maletor has joined #ruby
clamstar has joined #ruby
maletor has quit [Remote host closed the connection]
kevind__ has joined #ruby
blandflakes has joined #ruby
ziggles has joined #ruby
croaky has joined #ruby
interactionjaxsn has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
yshh has quit [Read error: Connection reset by peer]
interactionjaxsn has joined #ruby
<ericwood>
well, fingers crossed
yshh has joined #ruby
<ziggles>
I'm using faraday to communicate with a flakey 3rd party API and manually checking response codes/exceptions… Does anyone know if this sort of thing belongs in a faraday middleware?
meatherly has quit [Read error: Connection reset by peer]
drago777 has joined #ruby
meatherly has joined #ruby
timonv has quit [Remote host closed the connection]
iamjarvo has quit []
iamjarvo has joined #ruby
maletor has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
danshultz has joined #ruby
kevind_ has quit [Ping timeout: 272 seconds]
txdv has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
estebistec has joined #ruby
Wolland has joined #ruby
interactionjaxsn has quit [Ping timeout: 245 seconds]
silent_root has joined #ruby
flame_ has quit [Quit: Computer has gone to sleep.]
kidoz has joined #ruby
krainbol1greene is now known as krainboltgreene
croaky has quit [Ping timeout: 240 seconds]
croaky has joined #ruby
vismay has quit [Ping timeout: 240 seconds]
guiocava_ has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
interactionjaxsn has joined #ruby
pushpak has joined #ruby
flubba has joined #ruby
relix has joined #ruby
TomRone has joined #ruby
guiocavalcanti has quit [Ping timeout: 272 seconds]
mzdravkov has joined #ruby
m8 has quit [Quit: Sto andando via]
bsdbofh has joined #ruby
sambao21 has joined #ruby
mzdravkov has quit [Read error: Connection reset by peer]
mzdravkov has joined #ruby
croaky has quit [Ping timeout: 240 seconds]
CaptainJet has joined #ruby
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
HD_ has quit [Ping timeout: 248 seconds]
bluenemo_ has quit [Remote host closed the connection]
bluenemo has quit [Remote host closed the connection]
<kraljev0>
What is the best way to search for a subsequence in array
jerius has quit []
<kraljev0>
example: [1,2,3,;a,4], [2,3]
<kraljev0>
that would return 1
jerius has joined #ruby
<kraljev0>
[:a,4] would return 4
<kraljev0>
3
arietis has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.2]
arietis has quit [Client Quit]
soobus has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
Czupa has joined #ruby
<havenwood>
kraljev0: i don't get what you're trying to do
agent_white has joined #ruby
arietis has joined #ruby
<kraljev0>
[1,2,3,4,5,6,7,8,9,"x","y",5]
<kraljev0>
that is an example array
echevemaster has quit [Ping timeout: 260 seconds]
<kraljev0>
i want the position of the [9, "x", "y"] subsequenc
<kraljev0>
nil if not present
<shevy>
and what is the query condition
<shevy>
why is it not 6,7,8
<canton7>
array.each_cons(2).to_a.index([:a,4]) is a slightly expensive way of doing it
dru has joined #ruby
echevemaster has joined #ruby
drago777 has joined #ruby
<canton7>
he's trying to find the position of a subarray in another array
<kraljev0>
input: main array A, child array C
ziggles has quit [Quit: ziggles]
<kraljev0>
output: position of C in A
TomRone has quit [Ping timeout: 240 seconds]
<kraljev0>
current idea is
vpretzel_ has joined #ruby
<kraljev0>
use find for the first element
<kraljev0>
then take subarray starting at that position, C.size long
grep_away is now known as grep_awesome
<kraljev0>
see if they are equal
cbetta is now known as cbetta_afk
<havenwood>
kraljev0: you want only the first match?
<kraljev0>
not sure yet
<havenwood>
canton7: nice, i was thinking #each_cons with #with_index but #to_a.index is neat
vpretzel has quit [Disconnected by services]
lukec has joined #ruby
vpretzel_ is now known as vpretzel
TomRone has joined #ruby
<kraljev0>
canton your solution is slow and wrong
<havenwood>
kraljev0: >> [1,2,9,"x","y",3,4,5,6,7,8,9,"x","y",5].each_cons(3).with_index.with_object([]) { |(group, index), result| result << index if group == [9, "x", "y"] }
<kraljev0>
it finds array only if at the boundary
<havenwood>
=> [2, 11]
<canton7>
kraljev0, "... is a slightly expensive way of doing it"
<havenwood>
kraljev0: good point on boundary
lukec has quit [Client Quit]
<kraljev0>
>> [1,2,9,"x","y",3,4,5,6,7,9,"x","y",5].each_cons(3).with_index.with_object([]) { |(group, index), result| result << index if group == [9, "x", "y"] }
flubba has quit [Remote host closed the connection]
rm_ has joined #ruby
<havenwood>
hmm, although target is currently set at 2.2.0
cid404 has quit [Quit: cid404]
subbyyy has joined #ruby
flubba has joined #ruby
DouweM has quit [Quit: Leaving...]
rm_ has quit [Remote host closed the connection]
arietis has joined #ruby
rm_ has joined #ruby
DanKnox has left #ruby [#ruby]
joaoh82 has quit [Ping timeout: 260 seconds]
clamstar has quit [Quit: Computer has gone to sleep.]
alexherb1 has quit [Quit: WeeChat 0.4.3-dev]
linduxed has quit [Read error: Connection reset by peer]
clamstar has joined #ruby
ankov has joined #ruby
flubba has quit [Ping timeout: 272 seconds]
<zzak>
havenwood: we can do a gem release for BD
ssvo has joined #ruby
<havenwood>
zzak: oh sweet!
<havenwood>
zzak: that is certainly convenient :D
bean has quit [Ping timeout: 240 seconds]
g0bl1n has quit [Ping timeout: 260 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
grep_away is now known as grep_awesome
kidoz has quit [Quit: Ухожу я от вас]
bean has joined #ruby
Jake232 has joined #ruby
tylersmith has joined #ruby
zxd has quit [Ping timeout: 264 seconds]
Urocyon has joined #ruby
Tearan has quit []
drago777 has quit [Ping timeout: 240 seconds]
Guest82348 has joined #ruby
arietis has quit [Quit: Computer has gone to sleep.]
drago777 has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
silent_root has quit [Quit: leaving]
<apeiros>
havenwood: not my ssh key, my keychain
<havenwood>
apeiros: ah, right
<apeiros>
and I know where it is, it's just not accessible
ankov has quit [Ping timeout: 248 seconds]
Jake232 has quit [Ping timeout: 240 seconds]
exelens has joined #ruby
<apeiros>
I could probably make it accessible, but I didn't want to spend the effort, since my laptop was expected to return after 3-5 days. which it hasn't :(
cj3kim_ has joined #ruby
rm_ has quit [Read error: No route to host]
burlyscudd has quit [Quit: Leaving.]
rm_ has joined #ruby
<havenwood>
ouch, the idea of a more-than-five-day repair makes me want to have a clone of my laptop as backup
Tearan has joined #ruby
<havenwood>
but too $$
sailias has quit [Ping timeout: 272 seconds]
havenwood has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
exelens has quit [Remote host closed the connection]
heidi has joined #ruby
<apeiros>
oh, havenwood is gone…
* apeiros
wanted to reply
centipedefarmer has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
Tearan has quit [Ping timeout: 252 seconds]
cj3kim_ has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
TomRone has joined #ruby
burlyscudd has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
Jake232 has joined #ruby
arietis has joined #ruby
lewix has joined #ruby
Wolland has quit [Remote host closed the connection]
carraroj has quit [Ping timeout: 260 seconds]
nestula has joined #ruby
drago777 has joined #ruby
nestula has quit [Remote host closed the connection]
mneorr has joined #ruby
rubyracer has quit [Remote host closed the connection]
burlyscudd has quit [Ping timeout: 246 seconds]
rubyracer has joined #ruby
lukec has quit [Quit: lukec]
HD_ has joined #ruby
<shevy>
oh man your laptop is still held as a hostage?
alex88 has quit [Quit: Leaving...]
drago777 has quit [Ping timeout: 240 seconds]
aspiers has joined #ruby
shime has quit [Ping timeout: 264 seconds]
flubba has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
ace_striker has joined #ruby
mneorr has quit [Remote host closed the connection]
drago777 has joined #ruby
blindingdawn has joined #ruby
mneorr has joined #ruby
seemant has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
HD_ has quit [Ping timeout: 272 seconds]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
interactionjaxsn has quit [Remote host closed the connection]
ankov has quit [Read error: Connection reset by peer]
platzhirsch has joined #ruby
interactionjaxsn has joined #ruby
ace_striker_ has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
St_Marx has quit [Remote host closed the connection]
<platzhirsch>
How would I design interfaces in Ruby? Simply with a base class I guess
jhn has joined #ruby
blueOxigen has joined #ruby
<apeiros>
platzhirsch: why'd you "design interfaces" in ruby?
ankov has joined #ruby
end_guy has quit [Ping timeout: 240 seconds]
<apeiros>
what problem do you want to solve?
ace_striker_ has quit [Client Quit]
<platzhirsch>
Mh, I want to structure my code...
<platzhirsch>
Harvester, CkanHarvester, FallbackCkanHarvester, SocrataHarvester. Maybe I should modulize it to Harvester::
bluOxigen has quit [Read error: Connection reset by peer]
<apeiros>
if those are all toplevel - yes. any lib should IMO have only a single toplevel module (or class)
dima has quit [Remote host closed the connection]
bricker`work has joined #ruby
<platzhirsch>
yeah, currently I have MetadataHarvester as the toplevel module, it's the name of the project
browndawg has left #ruby [#ruby]
bluOxigen has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
interactionjaxsn has quit [Ping timeout: 252 seconds]
ankov has quit [Ping timeout: 240 seconds]
clamstar has quit [Ping timeout: 246 seconds]
blueOxigen has quit [Ping timeout: 272 seconds]
txdv has joined #ruby
drago777 has joined #ruby
ambushsabre has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
ZoanthusR has joined #ruby
clamstar has joined #ruby
end_guy has joined #ruby
maroloccio has quit [Quit: WeeChat 0.4.2]
S0da has quit [Read error: Connection reset by peer]
ankov has joined #ruby
hellome has joined #ruby
TomRone has joined #ruby
meatherly has quit [Read error: Connection reset by peer]
senj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
meatherly has joined #ruby
mary5030_ has quit [Remote host closed the connection]
drago777 has quit [Ping timeout: 240 seconds]
indstry has joined #ruby
ozkan has joined #ruby
fire has joined #ruby
senj has joined #ruby
ace_striker has quit [Ping timeout: 272 seconds]
retrofade has quit [Ping timeout: 252 seconds]
mlpinit_ has joined #ruby
drago777 has joined #ruby
destruct1re is now known as destructure
blackmesa has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
havenwood has joined #ruby
blackmesa has joined #ruby
Guest49643 has quit [Remote host closed the connection]
nowthatsamatt has joined #ruby
mlpinit has quit [Ping timeout: 246 seconds]
TomRone has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
mansi has joined #ruby
mansi has quit [Read error: Connection reset by peer]
Megtastique has quit []
senj has quit [Ping timeout: 240 seconds]
mlpinit_ has quit [Remote host closed the connection]
nanoyak has joined #ruby
tyl has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joaoh82 has joined #ruby
shadoi has quit [Read error: Connection reset by peer]
ambushsabre has quit [Quit: rip]
shadoi has joined #ruby
ambushsabre has joined #ruby
blindingdawn has quit [Remote host closed the connection]
ankov has quit [Ping timeout: 246 seconds]
kewubenduben has joined #ruby
freezey has joined #ruby
TomRone has joined #ruby
rubyracer has quit [Remote host closed the connection]
joaoh82 has quit [Ping timeout: 272 seconds]
clarknoah has joined #ruby
rm_ has quit [Remote host closed the connection]
Bumptious has quit [Remote host closed the connection]
<shevy>
that name alone makes me horny
Bumptious has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
MetadataHarvester
Bumptious has quit [Remote host closed the connection]
rm_ has joined #ruby
soobus has quit [Ping timeout: 245 seconds]
indstry has quit []
smathieu has quit [Remote host closed the connection]
centipedefarmer has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
flame_ has joined #ruby
iliketurtles has joined #ruby
lukec has joined #ruby
iliketurtles has quit [Excess Flood]
clamstar has quit [Ping timeout: 245 seconds]
<platzhirsch>
lol
ankov has joined #ruby
fuhgeddaboudit has quit [Remote host closed the connection]
subbyyy has joined #ruby
saarinen has joined #ruby
clamstar has joined #ruby
rm_ has quit [Ping timeout: 265 seconds]
clarknoah has quit [Quit: clarknoah]
kofno has joined #ruby
cj3kim__ has quit [Remote host closed the connection]
mansi has joined #ruby
momomomomo has joined #ruby
cong has joined #ruby
DanKnox has quit [Disconnected by services]
DanKnox has joined #ruby
clarknoah has joined #ruby
ludar has quit [Ping timeout: 272 seconds]
pskosinski has quit [Remote host closed the connection]
croaky has quit [Ping timeout: 265 seconds]
<cong>
I compiled ruby 2.1 and did the tests. On the tests I got a few failures and errors. Aside from all that, I get this error when ruby encounters Kernel.gets: http://cxg.de/_d0b7ee.htm I'm missing something maybe another library for reading lines, ex: readline. if so how do I configure these libraries for ruby on mingw?
timonv has quit [Remote host closed the connection]
<benzrf>
what exactly are the semantics of constant lookup?
<benzrf>
and why does ruby needlessly overcomplicate namespacing?
ankov has joined #ruby
meatherly has quit [Remote host closed the connection]
smathieu has joined #ruby
meatherly has joined #ruby
mneorr has joined #ruby
nadley has quit [Ping timeout: 245 seconds]
TomRone has quit [Ping timeout: 240 seconds]
psyl0n has joined #ruby
<shevy>
hehe
<shevy>
nice way to greet benzrf
<shevy>
hello me
<canton7>
benzrf, more detail? a constant lookup generally means that, no matter how large the collection gets, it always takes the same amount of time to fetch a particular element
<shevy>
!!!
<Hanmac>
benzrf: look at Kernel#nesting
<benzrf>
canton7: v funny ;p
<shevy>
Hanmac knows it all
<benzrf>
also, what exactly is 'main' and what context is the top level running in?
<canton7>
benzrf, glad you find me so amusing :P what *were* you asking, then?
<benzrf>
constant lookup...
phansch has quit [Quit: Leaving]
<benzrf>
as in, how is the expression 'Foo' evalled?
<benzrf>
methods are scoped to modules/classes... constants are scoped to module/class definition blocks... blocks have lexical scoping on lvars, but methods dont...
<benzrf>
ick
cid404 has joined #ruby
<TTilus>
well, ruby is not a lisp, right?
<Hanmac>
apeiros: what is your mighty comment about that?
axl_ has quit [Ping timeout: 240 seconds]
<benzrf>
TTilus: python is less lispy than ruby, and it has pleasantly minimal and consistent scoping & variable rules
<benzrf>
:)
<benzrf>
it also has my favorite import system ever
<benzrf>
^mention #23
<TTilus>
i like it too
senayar has joined #ruby
<TTilus>
the import system
figgleberry has quit []
<benzrf>
is self lexically scoped in blocks? it is,right?
Tearan has quit []
figgleberry has joined #ruby
axl_ has joined #ruby
agjacome has joined #ruby
<havenwood>
So nice to see Ruby 2.0 and 2.1 flourishing with wide adoption. I feel sad for Python 3.
wallerdev has quit [Quit: wallerdev]
<benzrf>
i feel like with just a few tweaks to the basic semantics and a complete syntax overhaul, python could be like ruby but better
<benzrf>
o_o
<TTilus>
but i always forget if it was foo.len() or len(foo) ;)
burlyscudd has joined #ruby
<benzrf>
TTilus: yeah thats one of python's nasty bits
mansi has quit [Ping timeout: 265 seconds]
<benzrf>
the one thing i like about python's indecision between methods and functions is that it lets you teach basic procedural programming to people without even touching objects
<havenwood>
Also uhhg! Ruby's object model may be more complex but it is also more lovely. And I think a nicer heritage than Python.
<havenwood>
Crush the snake!!
<benzrf>
u kiddin m8
<shevy>
notice what benzrf wrote
<benzrf>
python ftw
<shevy>
"and a complete syntax overhaul"
<havenwood>
benzrf: Do you use Python 3?
<benzrf>
when i use python i attempt to use 3
<Hanmac>
benzrf: yes and no, self can also be block scoped, look at instance_eval/instance_exec
<shevy>
he did not write " a little bit" or "a few changes"
mlpinit has joined #ruby
<shevy>
a COMPLETE syntax overhaul
<TTilus>
uhh, don't crush the snake
<benzrf>
i like a lot of parts of python's syntax
<shevy>
like perl 6
<benzrf>
particularly the indentation
<havenwood>
benzrf: When I use Python it's during the porting-to-Ruby process. :P
<benzrf>
but i find 90% of ruby's to be superior
<benzrf>
at least...
<benzrf>
for the style of coding i prefer
<shevy>
but indentation means that the parser is crippled and needs your help to show where tokens start and end
<benzrf>
the thing is, i like ruby's day-to-day usage significantly more than python's
<benzrf>
but otoh i much prefer almost all of python's core semantics
<miah>
i havent seen much beautiful oop python. compared to ruby.
drago777 has quit [Ping timeout: 240 seconds]
<benzrf>
yeah
<miah>
maybe im weird for liking oop.
estebistec has quit [Remote host closed the connection]
<benzrf>
like i said, ruby is nicer on the surface
<TTilus>
Hanmac: thats what i said, didnt i?
<benzrf>
i just like python's language semantics more
<miah>
Go ?
<benzrf>
omg balls
<benzrf>
this looks promising
<havenwood>
miah: i actually really like Clojure's manner of sidestepping oo complexity and insisting on terseness, if only it wasn't Java underneath...
<TTilus>
benzrf: platform of choise for your next web app! :D
cid404 has quit [Quit: cid404]
<benzrf>
havenwood: i enjoy haskell's manner of doing the same thing
<shevy>
miah lisp has so many parens
<TTilus>
havenwood: it is not that much java underneath, more jvm
zipper is now known as broken_toy
<shevy>
benzrf ruby is too complex
<havenwood>
TTilus: right, but for using it for any real world purpose you end up calling out to Java all the time
OdNairy has joined #ruby
<shevy>
python not flexible enough
<havenwood>
TTilus: i mean for stripping a string and whatnot
<TTilus>
and imo jvm is not totally evil
* miah
puts on her Java Ring
<havenwood>
TTilus: I don't mind the JVM, and I love how tiny Clojure is
<havenwood>
TTilus: Just you end up having to use Java... >.>
joaoh82 has quit [Ping timeout: 260 seconds]
<benzrf>
shevy: yep
<havenwood>
TTilus: I guess you could RedBridge to JRuby, but seems Java is the usual goto.
<benzrf>
ruby's surface fits my style of programming better than python, but god are the inner semantics ugly
<TTilus>
havenwood: that might be the case, im not so deep in clojure at all
ozkan has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<shevy>
benzrf python documentation is better than ruby's
<havenwood>
TTilus: If it wasn't for the Java, I think I'd be pretty into Clojure actually.
drago777 has joined #ruby
<shevy>
hehe
<shevy>
I think havenwood does not love Java much
mklappstuhl has joined #ruby
<shevy>
benzrf actually you have quite a task ahead of you
<havenwood>
shevy: too true, but mostly due to ignorance - i don't have any Java chops and don't feel like investing the time to learn just for Clojure at this point
<shevy>
benzrf create a useful, nice language mixing in Python Ruby Io and perhaps also Erlang
<havenwood>
shevy: maybe it is worth it, but a hard pill to swallow :O
broken_toy is now known as zipper
<havenwood>
shevy: Have you looked at Potion?
<shevy>
is that the thing that required Java?
<shevy>
because I am Java free!
rm_ has joined #ruby
<havenwood>
shevy: I think it was heavily Io and Matz influenced.
<benzrf>
it was made by why_
<benzrf>
wait is it _why
<benzrf>
shit
<havenwood>
shevy: It is its own VM.
<wmoxam>
benzrf: what's scary about it?
<shevy>
benzrf the problem with _why projects is that they often were not finished
<benzrf>
wmoxam: scary about what?
<havenwood>
shevy: And the future platform for Perl2 or Perl11, I can't remember which.
<apeiros>
Hanmac: my comment on rubys scoping? there are some rare regretable things, the rest: mix & match, mostly it's quite useful the way it is
<wmoxam>
20:10 < benzrf> ruby's surface fits my style of programming better than python, but god are the inner semantics ugly
<shevy>
benzrf like his sandbox in ruby, I asked him for the source, he never published it despite promising to release it eventually
pskosinski has quit [Remote host closed the connection]
<benzrf>
wmoxam: there are like 5 kinds of names
<benzrf>
scoping works differently for all of them
<benzrf>
lambdas and blocks are different
totalmajor has quit [Remote host closed the connection]
<benzrf>
basically my issue is that for every kind of thing, ruby has 3 different things that fill different niches in that category and all act just slightly differently
<havenwood>
benzrf: The differences are necessary to preserve tennet's correspondence priciple, it is technically superior thought admittedly not as easy to initially understand.
platzhirsch has left #ruby [#ruby]
<benzrf>
and regular code will use all of them and itll work fine, until you have a strange bug that happens because you dont understand the subtle differences
totalmajor has joined #ruby
<shevy>
benzrf yeah but with experience you come to understand that some things are utter shit
<havenwood>
benzrf: The subtle differences are a pain to learn, but powerful.
<shevy>
benzrf like Pathname. so you stop using it :>
ejnahc has quit [Ping timeout: 252 seconds]
mzdravkov1 has joined #ruby
<havenwood>
Ruby, you'll shoot your eye out!!
<wmoxam>
benzrf: in my decade+ of Ruby I can't say I've encountered an error because of those things :p
<benzrf>
w/e
mzdravkov1 has quit [Max SendQ exceeded]
sandelius has joined #ruby
<shevy>
wmoxam did you have to port a lot of ruby code written by someone else, usually a lazy idiot? :)
<benzrf>
havenwood: well python gets along fine by using one thing for each category, and making it flexible enough to server all of the purposes you need
burlyscudd has joined #ruby
<benzrf>
;p
mzdravkov has quit [Quit: Leaving.]
mzdravkov1 has joined #ruby
<benzrf>
*serve
<shevy>
benzrf but where is the creativity in python!
<havenwood>
benzrf: I disagree. Simpler maybe. Probably why more oft used as a teaching language. More powerful, I don't think so.
devdvd has quit [Ping timeout: 272 seconds]
<benzrf>
i didnt say MORE powerful
<wmoxam>
shevy: I've had to fix a lot of bad code, but it was bad for lots of other reasons that weren't related to the language used :p
<benzrf>
but sufficiently so
<benzrf>
i feel like python is intentionally crippled tho
<havenwood>
benzrf: okay, okay, sufficiently powerful true - just not my cup of tea when Ruby is an option :)
<benzrf>
like, nothing about it except maybe the syntax really precludes things like blocks
<shevy>
that's how I feel about class vs. module distinction in ruby
ejnahc has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
<havenwood>
benzrf: but certainly pleasant
mneorr has quit [Remote host closed the connection]
alexherb1 has joined #ruby
<benzrf>
they wouldnt require a major difference to add
<benzrf>
but no
Hanmac has joined #ruby
<shevy>
benzrf guido is an old man by now, he can't take anymore real changes
<benzrf>
and classes act very similar to prototypes, but the language forces you to only use them like classes
<benzrf>
you cant do prototype OO at all
<benzrf>
i mean come on
mzdravkov1 has left #ruby [#ruby]
<shevy>
that's understandable
mzdravkov1 has joined #ruby
<shevy>
python doesn't care about OOP
<benzrf>
you can set __class__, but you're not allowed to set it to anything but instances of type?!
mneorr has joined #ruby
<havenwood>
benzrf: also four underspaces :P
<shevy>
else why does it require you to declare explicit self all the time
<havenwood>
underscores*
<benzrf>
shevy: because it allows for nifty tricks
<apeiros>
__this_is_very_private__
<shevy>
underspace!
<shevy>
GIMME SOME UNDERSPACE
<apeiros>
____seriously_dont_touch_____
wildroman2 has quit [Remote host closed the connection]
<benzrf>
although if it had proper namespace manipulation...
<benzrf>
basically i want ruby's syntax and day-to-day usage, but with inner semantics that are like pythons but with first-class namespace manipulation
<agent_white>
ohsnap
<benzrf>
and then i will be happy
<shevy>
we get it we get it
<benzrf>
sorry
<shevy>
you want a mix of everything
<benzrf>
i like repeating myself
totalmajor has quit [Ping timeout: 272 seconds]
<shevy>
you want like the perfect language
pskosinski has joined #ruby
<shevy>
pubyio
superscott[8] has joined #ruby
rm_ has quit [Ping timeout: 248 seconds]
<shevy>
and it must come with a great web framework by default
<cout>
benzrf: you want Mython :)
<benzrf>
kek
<havenwood>
Ruby is the best i've found, but i admit severe Clojure and Haskell envy for some problems that are elegantly solved functionally
<shevy>
what is Mython? python on myspace?
<benzrf>
havenwood: heck yeah
figgleberry has quit [Ping timeout: 245 seconds]
<cout>
shevy: macros for python
<benzrf>
cout: i meant runtime namespace manip, fool
<benzrf>
havenwood: for example, i love parens-less calling, but then how do you have javascript/python style methods-as-attrs?
Wolland has joined #ruby
<benzrf>
havenwood: except in haskell that's not a significant difference because there is no difference between values and argless funcs
<benzrf>
problem solved!
<shevy>
ack now you mentioned javascript
<cout>
benzrf: sure, you could do that with Mython
sailias has quit [Ping timeout: 246 seconds]
<shevy>
the solution would be to specify your own language and then code in that
<cout>
right
vlad_starkov has joined #ruby
<shevy>
I wanted that for the different desktop environments
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
like use them like lego building blocks and reassemble them
<shevy>
I loved the old winamp snap-like behaviour
flubba has quit [Remote host closed the connection]
<lethjakman>
WJW: that's also php and quite a few other languages.
<lethjakman>
Hanmac: if I use ()'s I can multi line like that?
<benzrf>
lethjakman: you could use tap
mreiss has joined #ruby
<lethjakman>
tap?
drago777 has quit [Ping timeout: 240 seconds]
<benzrf>
Object#tap
<benzrf>
takes a block, passes self to the block
<benzrf>
returns self
<benzrf>
foo.tap(&:bar).tap(&:baz)
<benzrf>
foo.bar, foo.baz
* benzrf
shrugs
matchaw_ has joined #ruby
<cong>
like this?: class my_class; class << self; attr_accessor :method1, :method2, :method3; end end
<lethjakman>
benzrf: how is that allowing me to put it on multiple lines?
ArchBeOS-work has joined #ruby
<cong>
add \n's
<WJW>
I commented the gist.
allaire has joined #ruby
matchaw has quit [Ping timeout: 272 seconds]
meatherly has quit [Ping timeout: 240 seconds]
<lethjakman>
cong: interesting solution, not bad.
drago777 has joined #ruby
h0rrorvacui has joined #ruby
<lethjakman>
I'm surprised there's no easy way to do this in ruby :(
<lethjakman>
my methods are getting too long.
<WJW>
benzrf, if you are going to chain like that, you have to have a convention that when a method doesn't return an otherwise useful value, it returns self.
<shevy>
lethjakman cant you let your class bundle methods for you? then you call what you need externally. or you use a special meta class that can call some methods based on a string input you send it
thumpba has quit [Remote host closed the connection]
<shevy>
lethjakman I have one class where I gave 6 methods names, because they must be run in 1 2 3 4 5 6, and sometimes I need to call only 4 5 6. I solved that by simply having a method that can respond to input like '3 5 6'
thumpba has joined #ruby
<lethjakman>
shevy: interesting. that's also a good idea. I'll keep that pattern in mind
levity_island has joined #ruby
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
Mars has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
<lethjakman>
I don't know why I never realized this :/ I guess it's cause of irb
meatherly has quit [Read error: Connection reset by peer]
Mars is now known as Guest65018
<lethjakman>
and it doesnt' seem to be popular in ruby
<Hanmac>
are you sure about id ? i mean is it continued? otherwise you leave holes into the Array. or do you only want a sorted array?
<gazarsgo>
sparse is ok
<gazarsgo>
it's def. not continuous
<txdv>
python violates TCP?
danshultz has quit [Remote host closed the connection]
<txdv>
benzrf: I thought python would only violate my eyes
<gazarsgo>
i guess it's just better to make a hash and push onto it, but i want to know more about ruby arrays too
workmad3 has quit [Ping timeout: 272 seconds]
<Hanmac>
gazarsgo: what about: collection.sort_by(&:id) ?
danshultz has joined #ruby
ankov has joined #ruby
<gazarsgo>
this is more of a projection operation than a sorting operation
klaut_ has joined #ruby
klaut has quit [Read error: Connection reset by peer]
<benzrf>
txdv: wut
<benzrf>
python is bootiful
ambushsabre has quit [Quit: rip]
<ericwood>
I don't like the way a lot of pythonistas write it
<Hanmac>
gazarsgo: there collection.each_with_object([]) {|item,array|array[item.id] = item.column}
<Hanmac>
but i warn you it leaves massive holes inside the Array
<txdv>
so is BSDM
clarknoah has quit [Quit: clarknoah]
<gazarsgo>
Hanmac: aha, so each_with_object is like inject ?
<benzrf>
gazarsgo: its the same but instead of passing along the result of the last it always passes along the same object
<Hanmac>
yes and no ... inject uses the result of the block as next iteration object ... each_with_object ALLWAYS returns the object that you give
freezey has joined #ruby
danshultz has quit [Ping timeout: 246 seconds]
closer has quit [Ping timeout: 252 seconds]
<gazarsgo>
thanks very much
Shayan___ has joined #ruby
mreiss has joined #ruby
<Shayan___>
Hi there. I'm a major beginner and am burnt out from doing examples about bank accounts and tickets. I'm trying to practice learning about Classes, Instance Variables and Methods. I am wondering if anyone has any suggestions about what kinds of programs I can create that are more interesting than depositing $ into a 'bank account' and checking my balance.
<shevy>
Hanmac yeah i read fefe too
kcombs has quit [Remote host closed the connection]
ssvo_ has joined #ruby
lfox has joined #ruby
lkba has joined #ruby
<shevy>
cong do you use debian? if so you must decripple your stuff first
ambushsabre has joined #ruby
jmimi has joined #ruby
<shevy>
Shayan___ write code that solves a given need or want you have
iliketurtles has quit [Quit: zzzzz…..]
<shevy>
like a game, or some backups or some other utility script
iliketurtles has joined #ruby
ankov has quit [Ping timeout: 265 seconds]
Mars has joined #ruby
iliketurtles has quit [Excess Flood]
<shevy>
Shayan___ you could start with methods only for now
Mars is now known as Guest73221
drago777 has quit [Ping timeout: 240 seconds]
<Shayan___>
@shevy thanks
<cong>
nope. it's mingw.
ssvo has quit [Ping timeout: 252 seconds]
iliketurtles has joined #ruby
<shevy>
hmmm
closer has joined #ruby
Shayan___ has quit [Client Quit]
drago777 has joined #ruby
robbyoconnor has joined #ruby
<shevy>
my termcap is at /usr/lib/libtermcap.so
<cong>
mine is at /local/lib/libtermcap.a
skulker has joined #ruby
dima has joined #ruby
aspiers has quit [Ping timeout: 246 seconds]
<Hanmac>
cong: wrong
<Hanmac>
cong the "a" file and the "so" file are TWO different purposes
<cong>
i'm thinking of static build
diegoviola has quit [Quit: WeeChat 0.4.2]
stryek has joined #ruby
cosmicpanda has quit [Ping timeout: 252 seconds]
tgandrews has joined #ruby
<Hanmac>
static is no good ... it can not be changed ... like the political system in the USA ;P
ankov has joined #ruby
DouweM_ has quit [Ping timeout: 272 seconds]
<cong>
i don't need it to change i just need it in readline so it can compile and then in ruby so it can function
samsonasu has quit [Quit: samsonasu]
<Hanmac>
cong i am sure that it might need to be compiled dynamiclly so ruby can access it thouth readline
tropicalmug has joined #ruby
asteve has joined #ruby
<cong>
ruby compiled find without it. wait so ruby needs termcap too?
<lethjakman>
cong: you can include a readline gem, but the best method is to recompile
Guest73221 has quit [Remote host closed the connection]
deception has quit [Quit: Goodbye]
<lethjakman>
I had to install the readline-dev package
drim has quit [Quit: drim]
shadoi has quit [Ping timeout: 246 seconds]
<cong>
typo. ruby compiled fine without it. wait so ruby needs termcap too?
shadoi has joined #ruby
blueOxigen has joined #ruby
ankov has quit [Ping timeout: 272 seconds]
cburyta has joined #ruby
cburyta has quit [Client Quit]
bluOxigen has quit [Ping timeout: 248 seconds]
kofno has quit [Ping timeout: 265 seconds]
jerius has quit [Read error: Operation timed out]
burlyscudd has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
wildroman2 has joined #ruby
<shevy>
cong perhaps the readline bindings require the .so file
aspiers has joined #ruby
<shevy>
cong did you go into ext/readline subdirectory of your extracted ruby source and try to run there and see what precisely the error output given is?
<shevy>
ruby will always compile fine without readline, it's an extension, hence inside of ext/ directory
drago777 has quit [Ping timeout: 240 seconds]
blueOxigen has quit [Ping timeout: 248 seconds]
lurch_ has quit [Quit: lurch_]
joaoh82 has joined #ruby
burlyscudd has quit [Ping timeout: 260 seconds]
burlyscudd has joined #ruby
shadoi has quit [Quit: Leaving.]
joaoh82 has quit [Read error: Connection reset by peer]
shadoi has joined #ruby
joaoh82 has joined #ruby
TomRone has quit [Ping timeout: 240 seconds]
allaire has quit []
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shadoi has quit [Read error: Connection reset by peer]
mansi has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
nisstyre has joined #ruby
rm_ has joined #ruby
pskosinski has quit [Ping timeout: 240 seconds]
sepp2k has quit [Read error: Connection reset by peer]
gregoriokusows-1 has quit [Quit: gregoriokusows-1]
guiocavalcanti has joined #ruby
Megtastique has joined #ruby
<cong>
"shevy, cong did you go into ext/readline subdirectory of your extracted ruby source and try to run there and see what precisely the error output given is?" i don't understand what you're saying.
Jason has joined #ruby
havenwood has joined #ruby
<Jason>
what's the difference btween = and =>? hard question to google, haha.
retrofade has joined #ruby
<ericwood>
=> is only used in hashes
<Jason>
ahh
<ericwood>
= is an equals sign for assignment
<Jason>
that makes sense now
totalmajor has quit [Ping timeout: 272 seconds]
<ericwood>
>> {:foo => 'bar'}
<ericwood>
also you can do this:
<ericwood>
>> {foo: 'bar'}
<havenwood>
Jason: `=>` is called a 'hash rocket'
dogweather has joined #ruby
<Jason>
hash rocket, huh
<Jason>
an appropriate name
rm_ has quit [Ping timeout: 245 seconds]
iliketurtles has joined #ruby
<Hanmac>
the "<=>" from Comparable is called space ship operator
<ericwood>
splat is misunderstood and underappreciated for how awesome it is
<Hanmac>
splat is outdated ... double-splat "**kargs" is more awesome ! ;P
<shevy>
cong if you compile ruby from source, you must have extracted it. cd into the ext/readline directory
phipes has joined #ruby
<benzrf>
Hanmac: what does that do
<benzrf>
o-o
<cong>
shevy i installed it: make install. inside install: bin, lib, include, share
<waxjar>
=~ spermy operator \o/
<Hanmac>
waxjar: i thought ~> was the spermy operator ;P
<shevy>
cong excellent
<cong>
okay
<waxjar>
lol. they both look very spermy
<shevy>
Hanmac, waxjar is in the initial phase still
<benzrf>
>~ is syntactically valid !
<Hanmac>
benzrf: keyargs rest
<benzrf>
oh, i thought ruby didnt have kwargs?
nemesit|znc has quit [Ping timeout: 272 seconds]
<benzrf>
*in python kwargs is traditional, also uses **
<shevy>
ruby copies python
<Hanmac>
benzrf: 2.0 and 2.1does
claymore has quit [Quit: night]
<benzrf>
o:
<benzrf>
how do they work?
<cong>
like hash i suppose
elux has quit [Quit: Bye!]
teenwolf has joined #ruby
banghouse has joined #ruby
nemesit|znc has joined #ruby
banghouse is now known as Guest57609
totalmajor has joined #ruby
<shevy>
I only saw syntax and wondered why something as ugly as this made it into ruby
<cong>
"shevy i installed it: make install. inside install: bin, lib, include, share" doesn't mean it's working.
<advorak>
What should I replace Page.page_name_exists?('asdf') with in https://gist.github.com/advorak/d627aaef8ba47c638b27 to allow the code to work if the model named "Page" is renamed to something else? I've tried self.page_name_exists? ... but it doesn't seem to work?
totalmajor has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
Yu\2 has joined #ruby
<Hanmac>
advorak: #rubyonrails
<shevy>
cong why don't you say that
totalmajor has joined #ruby
smathieu has joined #ruby
<benzrf>
groovy on grails
timonv has quit [Remote host closed the connection]
assurbanipal has quit [Remote host closed the connection]
<shevy>
there, run ruby extconf.rb
<cong>
shevy you said cd into ext/readline which isn't there
<shevy>
no, it is there
<shevy>
did you download the ruby source tarball
<cong>
i'm showing you what is when i installed it
<shevy>
how do you install it
_maes_ has quit [Ping timeout: 265 seconds]
<shevy>
what is the source tarball you use
<shevy>
is it ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p448.tar.bz2
<shevy>
?
gstamp has joined #ruby
<shevy>
is it ftp://ftp.ruby-lang.org/pub/ruby/2.1/ruby-2.1.0.tar.bz2
rickruby has joined #ruby
gazarsgo has left #ruby [#ruby]
aryaching has joined #ruby
<cong>
that's a long story. here's the short: ./configure & make & make install
<benzrf>
so if I do 'foo(bar, baz, x: y)' in ruby 2, it will NOT arrive in the last variable?
<benzrf>
*the hash bit
<benzrf>
doesnt that break compatability?
<cong>
shevy, i used the newest i could find
<shevy>
no that it useless that way. if you do not use the official source then you are on your own apparently. all I can tell you is that the official source has ext/readline and running ruby extconf.rb there is the proper way to install the readline bindings afterwards, even when they were unavailable
Yu\2 has quit [Client Quit]
<shevy>
what the heck is "newest". can you not simply give accurate information?
Guest57609 has quit [Ping timeout: 272 seconds]
<cong>
2.1.0
vlad_starkov has quit []
rickruby has quit [Remote host closed the connection]
frxx has left #ruby [#ruby]
<shevy>
cd /Depot/jjj/ruby-2.1.0/ext/readline/
<shevy>
I have the directory
<shevy>
<cong> shevy you said cd into ext/readline which isn't there
<shevy>
so you are not writing the truth
joriso_ has joined #ruby
<advorak>
Hanmac, yes, wrong window .. thanks :-)
<advorak>
sorry!
<benzrf>
oh shit
vlad_starkov has joined #ruby
<benzrf>
this is really gross
smathieu has quit [Ping timeout: 248 seconds]
<benzrf>
*kwargs
<shevy>
benzrf does kwargs make you more eager to move away from python to ruby?
vpretzel has quit [Quit: Adios!]
totalmajor has quit [Ping timeout: 248 seconds]
<havenwood>
benzrf: nice addition in 2.0, one of the few upgrade caveats that will in the future be a nicety to replace our hash args workaround
<benzrf>
this is really really gross
<benzrf>
*the way kwargs work
<Hanmac>
benzrf: no it does not break compatiblity
marr has quit [Ping timeout: 252 seconds]
mansi has joined #ruby
<havenwood>
benzrf: what is gross about it, nice simple syntax it seems to me
<cong>
shevy, now what? for the record i was nothing but truthful.
interactionjaxsn has quit [Remote host closed the connection]
<matled>
shevy: hash.keys[2]?
<shevy>
aaaaah
<shevy>
I am so dumb
asteve has joined #ruby
<shevy>
yeah matled, thanks
<cong>
hash[hash.keys[2]]
interactionjaxsn has joined #ruby
<matled>
cong: hash.values[2] should suffice if you don't need the key
St_Marx has quit [Ping timeout: 240 seconds]
rankine has quit [Quit: Leaving]
rankine has joined #ruby
rankine has quit [Changing host]
rankine has joined #ruby
<cong>
i'm sure i would know that if i read more about hashes.
phipes has quit [Remote host closed the connection]
heftig has quit [Quit: Quitting]
<Hanmac>
shevy: or wihout creating big array: hash.each.with_index {|(k,v),i| break v if i == 2 }
mikepack has quit [Remote host closed the connection]
centipedefarmer has quit [Remote host closed the connection]
<shevy>
Hanmac that would be faster?
<shevy>
the hash has almost 20.000 keys already
<Hanmac>
didnt benchmark it, but i think it would be faster ...
<matled>
just thought about that too, could also do hash.each.take(3).last, not sure how fast/slow last(n) is vs with_index with break
<shevy>
well
<matled>
for n = 3 probably very negligible
<shevy>
.keys[position] is so much cleaner than the alternatives so far :<
asteve has quit [Ping timeout: 272 seconds]
interactionjaxsn has quit [Ping timeout: 252 seconds]
<shevy>
in ruby we have... short is pretty but slow, ugly is fast
<matled>
enumerator doesn't have a metod to get a specific element, right?
retrofade has joined #ruby
thumpba has quit [Remote host closed the connection]
thumpba has joined #ruby
heftig has joined #ruby
<Hanmac>
shevy: Hay! we forget this: hash.find.with_index {|(k,v),i| i == 2 }
meatherly has quit [Remote host closed the connection]
<shevy>
hmm
<shevy>
nah sorry Hanmac
<shevy>
any of these 3 things are too ugly
cbetta_afk is now known as cbetta
<shevy>
I stick with the prettier but slower one
meatherly has joined #ruby
iliketurtles has joined #ruby
Godd2 has joined #ruby
iliketurtles has quit [Excess Flood]
<havenwood>
shevy: sounds shallow if you didn't know what you were talking about
<shevy>
havenwood why
<Godd2>
Anyone know how to dynamically call class constants?
<havenwood>
shevy: looks over brains
centipedefarmer has joined #ruby
thumpba has quit [Remote host closed the connection]
<Hanmac>
Godd2: what about const_get?
<havenwood>
shevy: preferring the pretty, slow one over the homely, smart one :P
thumpba has joined #ruby
<shevy>
ah no
<shevy>
I love beautiful
<shevy>
if I want ugly I go and use C
<Godd2>
Hanmac: I did not know about const_get. works perfectly, thank you :)
<shevy>
or Go
<shevy>
OR JAVA
<Hanmac>
shevy: or PHP ? ;p
<shevy>
or perl
<shevy>
hmm
<lethjakman>
shevy: is Go ugly?
<havenwood>
lethjakman: yup
<lethjakman>
I want a pretty compiled language.
<alexherb1>
how apply a regex on stream?
<shevy>
lethjakman don't really know
mlpinit_ has joined #ruby
zipper has quit [Quit: Lost terminal]
<lethjakman>
I keep meaning to play with it.
<shevy>
lethjakman I think java leads the list, then comes C++... then perhaps perl
<lethjakman>
haven't gotten to it yet though.
<lethjakman>
I actually like the new c++
<shevy>
that template stuff in C++ is so awful
<lethjakman>
it's as pretty as a compiled language gets in my opinion.
<havenwood>
lethjakman: a nicer-than-C but still fugly lang
<lethjakman>
you can make things fairly pretty.
<shevy>
not sure lethjakman
<lethjakman>
I liked a lot of the code from design patterns by GoF
<shevy>
these languages all seem to be rather similar in inspiration from syntax
<shevy>
C, C++, Java, Go
danshultz has quit [Remote host closed the connection]
meatherly has quit [Ping timeout: 245 seconds]
<lethjakman>
what made ruby so different?
<shevy>
they all depend a lot on {} right?
burlyscudd has quit [Quit: Leaving.]
iliketurtles has joined #ruby
<lethjakman>
a lot of the time, yes.
<alexherb1>
/foo/.parse(STDIN)
danshultz has joined #ruby
<lethjakman>
which I would rather not have
<shevy>
lethjakman well scripting languages are much more lightweight everywhere
<lethjakman>
and rubys function syntax too
<alexherb1>
how do that?
<lethjakman>
I don't think that's an excuse for syntax.
<shevy>
I can write a .rb script, then I set an alias, then I can call it from bash
kevind has quit [Quit: kevind]
allaire has joined #ruby
<shevy>
alexherb1 does that work?
<shevy>
NoMethodError: undefined method `parse' for //:Regexp
<alexherb1>
of course not
BuffyNZ has joined #ruby
<shevy>
alexherb1 you can add it... class Regexp; def parse(i = '');end;end
freebs has quit [Read error: Connection reset by peer]
<shevy>
lethjakman with C, I would have an additional compile cycle
<shevy>
lethjakman then I must carry both the source, and the compiled version, if I want to use it
<alexherb1>
shevy: hum how?
<alexherb1>
i would parse stdin on stream
<shevy>
alexherb1 what do you mean how? just add this line of code into a .rb file
<shevy>
on stream?
<shevy>
/foo/ is a regex, no?
<alexherb1>
yes
pskosinski_ is now known as pskosinski
kevind has joined #ruby
<waxjar>
alexherb1: Regexpes have no parse method. what are you trying to do?
mlpinit has quit [Ping timeout: 272 seconds]
mlpinit_ has quit [Ping timeout: 240 seconds]
* Hanmac
smells a rails problem
<shevy>
hehe
<BuffyNZ>
Hi folks, would this be the right channel to ask a question about rake unit tests, or is there a more approprate channel?
<havenwood>
#rubyonrails!
<shevy>
Hanmac, I went through a rails tutorial today
<havenwood>
BuffyNZ: Here'd be good.
<waxjar>
rails and STDIN? :O
<shevy>
Hanmac I got until the part "Hi Rails!" then I closed the tab again
<BuffyNZ>
havenwood: Thanks!
<lethjakman>
shevy: you may need an aditional cycle, I don't think so though. it's when it's being parsed to assembly. and then it'd just be built into the language.
<lethjakman>
I'm not talking about coffeescripting C, I'm talking about making function syntax different and other things.
<shevy>
lethjakman yeah, I mean, I have to do extra steps, as opposed to ruby or other dynamic languages
wildroman2 has quit [Remote host closed the connection]
<shevy>
I guess I could keep all .c files in a separate directory
danshultz has quit [Ping timeout: 240 seconds]
heftig has quit [Ping timeout: 240 seconds]
<shevy>
and run a batch-script to compile them into /usr/bin or somewhere
heftig has joined #ruby
<shevy>
In ruby I just edit the .rb file, that makes me happy
<alexherb1>
waxjar: parse stdin on stream means i don’t want block on read until stdin receive eof (STDIN.read.match /foo/)
freezey has quit [Ping timeout: 246 seconds]
burlyscudd has joined #ruby
nowthatsamatt has quit [Quit: nowthatsamatt]
<BuffyNZ>
I am trying to hack a unit test together for a pull request. The unit tests are using rake. I am having trouble getting my expects() to pass, and would like to see what is actually being invoked. Is there a way to get rake to show what was invoked so I can see what is different from what it is in the expect?
Hanmac1 has joined #ruby
<alexherb1>
currently i use STDIN.each_line
<Hanmac1>
lethjakman: you dont want to see what i can do with C macros ... shevy did see it ... and he dont what to see it ever again ;P
Zai00 has quit [Quit: Zai00]
<lethjakman>
Hanmac1: oh god no.
<shevy>
lol
<shevy>
lethjakman you can already see that Hanmac's code is weird here in ruby
<shevy>
Hanmac why are you here twice
<lethjakman>
shevy: that's not really what I'm talking about. I just think that the C style syntax is antiquated, I think it could be prettier.
<lethjakman>
he is?
<lethjakman>
huh...
joaoh82 has joined #ruby
<havenwood>
doppleganger!
kevind has quit [Client Quit]
mikepack has joined #ruby
<shevy>
well I meant this mostly as reply to when you wrote this:
<shevy>
<lethjakman> what made ruby so different?
<shevy>
but yeah syntax plays a big role as well
<WJW>
BuffyNZ, check the options on rake.
<Hanmac1>
shevy the problem will be solved in no time
simplyaubs has quit [Quit: simplyaubs]
<lethjakman>
shevy: I asked you the samet hing. I don't know
<shevy>
lethjakman the C-style syntax also often seems to inspire verbosity
<lethjakman>
it does
<lethjakman>
oh god...java's verbosity.
<lethjakman>
I hate it so
Hanmac has quit [Ping timeout: 272 seconds]
<shevy>
let me get hello world in java
Hanmac1 is now known as Hanmac
<lethjakman>
lol I've done java...not a fan.
<shevy>
public class HelloWorld { public static void main(String[] args) { System.out.println("Hello, World"); } }
<lethjakman>
shevy: it can if you namespace yourself
<WJW>
Bash: echo Hello, World!
<shevy>
oh I remember
<shevy>
right
<shevy>
something like: using namespace std;
kevind has quit [Remote host closed the connection]
jmimi has quit [Ping timeout: 252 seconds]
<shevy>
WJW bash starts to suck a lot if you want to do truly complicated things
<lethjakman>
yep.
<lethjakman>
seems better than java to me...haven't used go though so I can't compare.
joaoh82 has quit [Ping timeout: 246 seconds]
<waxjar>
bash is so weird, i really dont like it.
<shevy>
I actually liked php more than shell stuff
<lethjakman>
Hanmac: I don't know, I'd have to spend more time with it. what's it do?
<shevy>
while php sucked, I was able to do useful things with it!
<lethjakman>
bash has its place...
devdazed has quit [Quit: Bye]
<lethjakman>
it's not so much a programming language as it is a system language.
<lethjakman>
I hated it til I got used to it
<lethjakman>
now I love/hate it.
<lethjakman>
zsh is nicer
<shevy>
one day I will replace bash with a hybrid ruby shell
joaoh82 has joined #ruby
kevind has joined #ruby
<shevy>
but one has to use C :(
jmimi has joined #ruby
<waxjar>
it's similar to javascript in that you shoot yourself in the foot countless times because of its little quirks when you try to do simple things
<lewix>
i hate that i forgot most of my c and java
<lewix>
it's like i never used it
<lethjakman>
lol
<atmosx>
Lewix: awesome
jmimi has quit [Client Quit]
<havenwood>
waxjar: so much more so too when you're trying to code portable shell rather than bash
<lethjakman>
that'd be nice.
<lethjakman>
ugh javascripts querks
<atmosx>
Lewix: maybe there is a reason your brain cells choose to burry that down
<lewix>
atmosx: I hope so -) but i wanna relearn it though
<BuffyNZ>
WJW: Sorry, I cant see a rake command line option that shows what was invoked. I have tried --trace and -v.
<Hanmac>
lethjakman: this line resolves to this: => "DLL_LOCAL VALUE _getBitmap(VALUE self){return wrap(_self->GetBitmap());}DLL_LOCAL VALUE _setBitmap(VALUE self,VALUE other){rb_check_frozen(self);_self->SetBitmap(unwrap<wxBitmap>(other));return other;}"
<shevy>
cong the ; is not needed at the end of the line
kaldrenon has joined #ruby
<cong>
it's not a crime punishable by death is it?
<shevy>
lethjakman now imagine what Hanmac's documentation looks like
<shevy>
cong it is unnecessary
rm_ has joined #ruby
<shevy>
think of all the bytes you will waste that way in the next 30 years
robbyoconnor has quit [Ping timeout: 252 seconds]
retrofade has quit [Ping timeout: 240 seconds]
centipedefarmer has joined #ruby
<BuffyNZ>
WJW: Hmm, sorry, it appears the options I am passing are being stripped. Will keep trying.
<Hanmac>
lethjakman: or for short: "macro_attr" generates _get and _set methods incl type conversion & frozen check and maybe latter exception handling. the methods are documented later as attributes
<cong>
if i was efficient then i could care.
<lethjakman>
very interesting....
<shevy>
cong every wasted keystroke could bring you closer to some goal
<shevy>
rather, every not wasted one
totalmajor has joined #ruby
<Hanmac>
lethjakman: like one of the classes has 27! attributes ... and i am very lazy i dont want to write the nearly same method body for each get and set method when i can use macros for that
sepp2k has joined #ruby
rm_ has quit [Ping timeout: 252 seconds]
phipes has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
zeropx has quit [Ping timeout: 252 seconds]
phipes has quit [Read error: Connection reset by peer]
phipes has joined #ruby
croaky has quit [Ping timeout: 272 seconds]
estebistec has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
relix has joined #ruby
stetho has joined #ruby
croaky has joined #ruby
robbyoconnor has joined #ruby
Guest17191 has quit [Remote host closed the connection]
vlad_sta_ has joined #ruby
John445 has joined #ruby
kofno has joined #ruby
<BuffyNZ>
Okay new question. I am running the unit tests for the package using 'bundle exec rake spec', which is eventually invokes rake, but I cant not find a way to pass parameters through, can anyone give me a pointer on where to start?
Hanmac1 has joined #ruby
aryaching_ has joined #ruby
phipes has quit [Ping timeout: 246 seconds]
slash_nick has quit [Quit: leaving]
slash_nick has joined #ruby
estebistec has joined #ruby
slash_nick has quit [Changing host]
slash_nick has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
lfox has quit [Quit: ZZZzzz…]
robbyoconnor has quit [Excess Flood]
aryaching has quit [Ping timeout: 272 seconds]
robbyoconnor has joined #ruby
kep has quit [Quit: WeeChat 0.4.2]
Bosox20051 has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
centipedefarmer has quit [Remote host closed the connection]
kofno has quit [Ping timeout: 252 seconds]
baroquebobcat has joined #ruby
estebistec has quit [Remote host closed the connection]
bentonrr has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
lfox has joined #ruby
tommylommykins has quit [Remote host closed the connection]
marr has joined #ruby
robbyoconnor has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
totalmajor has quit [Remote host closed the connection]
phipes has joined #ruby
mburns_ is now known as mburns
tommylommykins has joined #ruby
kaldrenon has quit [Remote host closed the connection]
Mars has joined #ruby
Mars is now known as Guest84005
zeropx has joined #ruby
pdtpatrick has joined #ruby
olivier_bK has quit [Ping timeout: 246 seconds]
phipes has quit [Ping timeout: 240 seconds]
matchaw has quit [Ping timeout: 272 seconds]
lukec has quit [Quit: lukec]
nanoyak has quit [Quit: Computer has gone to sleep.]
Wolland has quit [Remote host closed the connection]
figgleberry has joined #ruby
nanoyak has joined #ruby
rjhunter has joined #ruby
Seich has quit [Quit: Computer has gone to sleep.]
phipes has joined #ruby
allaire has quit []
drago777 has quit [Ping timeout: 240 seconds]
havenwood has quit [Remote host closed the connection]
drago777 has joined #ruby
iamjarvo has quit [Remote host closed the connection]