<Channel6>
why did I not get on this bandwagon earlier?
<sdegutis>
Channel6: :(
<atmosx>
sdegutis: interesting
<Channel6>
sadface?
<atmosx>
Channel6: good question. Try the Go bandwagon, or the Julia or the Rust one... they are leaving right now.
r0bby has quit [Remote host closed the connection]
<sdegutis>
Go bandwagon is gone.
Arkaniad|Laptop has joined #ruby
ahofmann has quit [Quit: Computer has gone to sleep.]
<sdegutis>
Julia on its way out, Rust is still there and going strong.
<havenwood>
Nimrod!
<sdegutis>
Meanwhile I'm jumping back on the Lua bandwagon pretty much permanently.
<atmosx>
prolog!
<shevy>
brainfuck!
r0bby has joined #ruby
GriffinHeart has quit [Ping timeout: 245 seconds]
<havenwood>
Ruby is downright popular, our bandwagon became a metropolis.
lewix has joined #ruby
<sdegutis>
Tried the Scheme bandwagon (in its modern incarnation as Clojure) and its pretty okay, but its dependence on (or "JS" "JVM") is just too much.
<havenwood>
sdegutis: chicken or racket!
<havenwood>
?
<sdegutis>
havenwood: Ruby is for rockstars, but I've settled down in life.
yubrew has quit [Ping timeout: 252 seconds]
maestrojed has quit [Quit: Computer has gone to sleep.]
<sdegutis>
That said, I did just write a new project in Ruby the other day.
<ari-_-e>
rust hasn't even stabilized yet, has it?
<sonofflynn>
So, it parses nmap (a port scanner's output)
<sonofflynn>
basically, it is supposed to find webservers based on the xml output
<sonofflynn>
so it looks for a host, grabs its IP address, then looks for open ports with "http" or "https" in the port's "name" field
<sonofflynn>
and then records it all, as long as that port is open, and not closed
<sonofflynn>
the test xml is just three computers, with web servers on 80, 443, and 8443
<sonofflynn>
I've tried changing some of the port's attribute to make the port "closed", but it doesn't seem to work
kalusn has quit [Ping timeout: 276 seconds]
datafirm has quit [Ping timeout: 276 seconds]
<sonofflynn>
and right now, it's completely missing some IPs, and ports
<ari-_-e>
sonofflynn: what output are you getting, and what would you expect?
binaryhat has joined #ruby
stnly has joined #ruby
sivoais has quit [Ping timeout: 252 seconds]
LACP has joined #ruby
tectonic has quit []
<sonofflynn>
right now, it's printing to the screen, that's how I'm trying to debug. It'll print a computers IP address and the port that has http or https in its name as long as it is open.
<sonofflynn>
but it's missing some IPs and Ports
<ari-_-e>
could you paste the output
<ari-_-e>
?
<sonofflynn>
sure, just didn't want to flood the channel
<sonofflynn>
one sec..
<ari-_-e>
not in the channel...
<shiggity__>
pastebin or something
<ari-_-e>
use pastebin, like you did before
<sonofflynn>
well, it's only one line
<sonofflynn>
IP: Port: 443 and port is closed! and uses https://!
<sonofflynn>
that's it
<ari-_-e>
ok
<sonofflynn>
so, it's clearly missing the IP, and only found one port, and it's printing the "closed" one
oo_ has joined #ruby
<sonofflynn>
which 443 is open, not closed
<sonofflynn>
so I'm not sure how/where this is going wrong
Vivekananda has quit [Quit: Ex-Chat]
vali has joined #ruby
<EatMulti>
I'd just chuck in a ton of debug puts statements in
Vivekananda has joined #ruby
lethe has joined #ruby
<shiggity__>
do it
<shiggity__>
maximum verbosity
<shevy>
it's the simplest way of testing!
<sonofflynn>
true that
<shiggity__>
word
shiggity__ is now known as shiggityjoe
<ari-_-e>
sonofflynn: I'd also advise that you simplify this a bit - for example, the blocks of code starting at lines 60 and 68 seem to be almost identical
<EatMulti>
was thinking about unit testing that... but nah. p and puts
<sonofflynn>
true, they are very similar
sivoais has joined #ruby
<shiggityjoe>
ah yes. looks like it’s same process just depends on whether http or https
<sonofflynn>
this is more of a PoC, not necessarily the final cleaned up code
<sonofflynn>
just trying to figure out how to get it working first
<ari-_-e>
for me, this sort of cleanup sometimes makes causes or problems more obvious
<ari-_-e>
that's why I suggest it at this stage
<ari-_-e>
*causes of
<sonofflynn>
ok, that's fair
bradhe has joined #ruby
<ari-_-e>
or at least allows me to more easily comprehend what's happening
<ari-_-e>
it'll also remove some of that nesting :)
<sonofflynn>
that's the start of the xml parsing function, but that is also the entire script
dapz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
thomasxie has quit [Read error: Connection reset by peer]
thomasxie has joined #ruby
EatMulti has quit [Quit: leaving]
benzrf is now known as benzrf|offline
thomasxie has quit [Remote host closed the connection]
<ari-_-e>
sonofflynn: any reason you're using SAX in the ruby version?
binaryhat has quit [Quit: Leaving]
<sonofflynn>
Because the XML files could potentially be massive, and didn't want to do DOM where it loads it completely in memory
<ari-_-e>
hmm ok
<sonofflynn>
it should be changed in python as well
vali has quit [Ping timeout: 240 seconds]
LACP has quit [Ping timeout: 240 seconds]
oo_ has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 240 seconds]
sivoais has joined #ruby
LACP has joined #ruby
<shevy>
shshsssyessssss
io_syl has joined #ruby
io_syl has quit [Client Quit]
lewix has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
Wolland has joined #ruby
vali has joined #ruby
<shevy>
hmm
<shevy>
what is the opposite of .reject!
<havenwood>
shevy: a date
<shiggityjoe>
select! ??
<shevy>
hmm
<havenwood>
shevy: i like #keep_if and #delete_if
<havenwood>
shevy: as they modify the receiver without returning `nil` on no match
<shiggityjoe>
isnt keep_if like an alias for select! ?
<shevy>
huh
<havenwood>
shiggityjoe: nope
oo_ has joined #ruby
yfeldblu_ has quit [Read error: Connection reset by peer]
<shiggityjoe>
ok thought maybe it was
<havenwood>
shiggityjoe: close, but different behavior when no match
<shiggityjoe>
gotcha
yfeldblum has joined #ruby
yubrew has joined #ruby
<shevy>
if I have something like an array:
fif has quit [Quit: Page closed]
lemur has joined #ruby
<shevy>
array = ['/abc/def','/abc/df','/abc/ef']
brandonblack has quit [Ping timeout: 240 seconds]
<shevy>
and now I have a variable that is so: foo = '*ef*'
<shevy>
hmm
<shevy>
lost my train of thought
<shiggityjoe>
turning foo into regex?
<shevy>
I would kinda like to do something like a Dir.glob, but against that array
OrionKissinger has joined #ruby
charliesome has joined #ruby
<shevy>
so the first and last entry would match but not the middle one
<Wolland>
do you want to support full regex?
<shevy>
only the '*' character
<shevy>
as in meaning "all before can be valid" and "all afterwards can be valid"
bmurt has quit []
<shevy>
like *ef*
<Wolland>
select_if can do that
<shiggityjoe>
(.*)ef(.*)
<crome>
are those some sort of ascii tits
<shiggityjoe>
[.*]ef[.*]
<Wolland>
with include?('ef')
yubrew has quit [Ping timeout: 240 seconds]
<shiggityjoe>
member:identifier:wolland wouldn’t include? look for the array item equal to ‘ef’, not for a string including it?
<shiggityjoe>
i thought there is a string include? and an array include?
<ari-_-e>
shevy: File#fnmatch
OrionKissinger has quit [Ping timeout: 264 seconds]
<shevy>
hmm
<ari-_-e>
err, File.fnmatch
<shiggityjoe>
if you iterate over the array and you can do include?, otherwise it will look for an exact matching array item if run on the array itself
<ari-_-e>
shevy: I think fnmatch would work, but it also supports a bunch of other stuff... is that a problem?
robustus has joined #ruby
<Wolland>
shevy: array.select{ |i| i[/ef/] }
benlieb has quit [Quit: benlieb]
<Wolland>
just derive at that regex from *ef vs *ef*, etc
SCommette has joined #ruby
benlieb has joined #ruby
<shevy>
ari-_-e don't think it would be a problem, I really only need support for the abovementioned array check, like array = ['/abc/def','/abc/df','/abc/ef'] and input would be '*ef*'; support for '*ef' or 'ef*' additionally would be nice, but currently for my own use case I only need '*xyz*' support; I am using ruby to search for certain files, but I keep it all stored in a rather complicated array which can get
<shevy>
modified by several different methods
<shevy>
Wolland hmm
<shevy>
let me think
<shevy>
Wolland I would need more than one regex or?
bennylope has joined #ruby
drizz has quit [Remote host closed the connection]
<Wolland>
starts with, ends with, and includes
<Wolland>
I am guessing
<Wolland>
ideal would be to take *ef and convert it into starts with ef regex
sidik has joined #ruby
<Wolland>
basically sub ending * with $ for example
jhulten has quit [Read error: Connection reset by peer]
sdouglas has joined #ruby
lxsameer has joined #ruby
jhulten has joined #ruby
chipotle has joined #ruby
CodeBunny has joined #ruby
toastynerd has joined #ruby
toastynerd has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
vee has quit [Ping timeout: 240 seconds]
toastynerd has joined #ruby
toastynerd has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
wallerdev has quit [Quit: wallerdev]
aspires has joined #ruby
shiggityjoe has quit [Quit: shiggityjoe]
bradhe has joined #ruby
frem_ has joined #ruby
holmser has joined #ruby
timonv has joined #ruby
hermanmunster has joined #ruby
IceDragon has quit [Ping timeout: 245 seconds]
hermanmu_ has joined #ruby
frem_ has quit [Ping timeout: 245 seconds]
bradhe has quit [Ping timeout: 265 seconds]
hermanmunster has quit [Ping timeout: 240 seconds]
toastyne_ has joined #ruby
timonv has quit [Ping timeout: 276 seconds]
brunops has quit [Ping timeout: 245 seconds]
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
vee has joined #ruby
benzrf is now known as benzrf|offline
jprovazn has joined #ruby
absolutezeroff has quit [Remote host closed the connection]
toastyne_ has quit [Ping timeout: 245 seconds]
atraylen has joined #ruby
garndt has quit [Quit: Connection closed for inactivity]
anaeem1_ has quit [Ping timeout: 260 seconds]
_justin has joined #ruby
mary5030 has joined #ruby
railzForDaiz has joined #ruby
whyy has joined #ruby
whyy has quit [Read error: Connection reset by peer]
whyy has joined #ruby
diegoviola has joined #ruby
toastynerd has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
yubrew has joined #ruby
GriffinHeart has joined #ruby
mary5030 has quit [Ping timeout: 245 seconds]
anaeem1 has joined #ruby
yubrew has quit [Ping timeout: 260 seconds]
toastynerd has quit [Remote host closed the connection]
GriffinHeart has quit [Ping timeout: 252 seconds]
iliketurtles has joined #ruby
maestrojed has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
akonny has joined #ruby
Burgestrand has joined #ruby
Xeago has joined #ruby
mrnugget has joined #ruby
krz has joined #ruby
toastynerd has joined #ruby
Xeago has quit [Remote host closed the connection]
mr_snowf1ake has quit [Ping timeout: 240 seconds]
Xeago has joined #ruby
jack_rabbit has quit [Quit: Leaving]
ra4king has quit [Ping timeout: 240 seconds]
railzForDaiz has quit [Ping timeout: 245 seconds]
Avahey_ has quit [Quit: Connection closed for inactivity]
railzForDaiz has joined #ruby
Xeago has quit [Ping timeout: 276 seconds]
aspires has quit []
sdouglas has quit [Remote host closed the connection]
toastynerd has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dangerousdave has joined #ruby
sdouglas_ has joined #ruby
relix has joined #ruby
sdouglas_ has quit [Ping timeout: 276 seconds]
alem0lars has joined #ruby
ndrei has joined #ruby
LexicalScope has joined #ruby
Photism has joined #ruby
brandonblack has quit [Ping timeout: 265 seconds]
george2 has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
brandonblack has joined #ruby
frem_ has joined #ruby
Vivekananda has quit [Remote host closed the connection]
bigkevmcd has joined #ruby
blackgoat has quit [Quit: WeeChat 0.3.8]
frem_ has quit [Ping timeout: 240 seconds]
blackgoat has joined #ruby
LexicalScope has quit [Ping timeout: 252 seconds]
GriffinHeart has joined #ruby
alem0lars has quit [Quit: alem0lars]
ra4king has joined #ruby
bluOxigen has quit []
eagles0513875_ has joined #ruby
<eagles0513875_>
hey all :)
bigkevmcd has quit [Ping timeout: 252 seconds]
<eagles0513875_>
im looking at the rub on rails website and i am wondering how does ruby deal with website creation in terms of responsive design.
<mozzarella>
#rubyonrails
bigkevmcd has joined #ruby
NukePuppy has joined #ruby
mrnugget has quit [Quit: mrnugget]
GriffinHeart has quit [Ping timeout: 260 seconds]
steeve has quit [Ping timeout: 252 seconds]
lethe has quit []
lethe has joined #ruby
charliesome has joined #ruby
<eagles0513875_>
mozzarella whats the difference between ruby and rails?
lethe has quit [Client Quit]
lethe has joined #ruby
<ari-_-e>
eagles0513875_: ruby is a programing language
<ari-_-e>
rails is a web development framework written in ruby
<ari-_-e>
this channel is about ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<eagles0513875_>
ari-_-e: :D im interested in ruby for a project im working on
<eagles0513875_>
my question now becomes does one compile the ruby application into a binary to run it
<ari-_-e>
nope
<ari-_-e>
ruby is an interpreted language
yubrew has joined #ruby
<eagles0513875_>
ok
NukePuppy has quit [Ping timeout: 252 seconds]
<ari-_-e>
I guess things like jruby do something that you could consider compiling
<ari-_-e>
it's usually strictly interpreted though
<eagles0513875_>
ok
ponga has joined #ruby
ponga has quit [Changing host]
ponga has joined #ruby
eagles0513875_ has quit [Quit: Page closed]
lethe has quit []
lethe has joined #ruby
yubrew has quit [Ping timeout: 252 seconds]
lethe is now known as nyamx2
Xeago has joined #ruby
<arrubin>
Ruby is as compiled as Java in most cases.
<arrubin>
There is just not a separate compilation step.
railzForDaiz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arrubin>
Different implementations and versions work slightly differently though.
aantix has quit [Quit: aantix]
why_away has joined #ruby
<arrubin>
MRI 1.8 is pretty much interpreted.
<arrubin>
1.9 is compiled to bytecode and then run on an internal VM.
<arrubin>
Rubinius does the same.
<arrubin>
JRuby, as far as I understand, actually does run interpreted and then JIT compiles to JVM bytecode, which can then be JIT compiled to native code.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<arrubin>
I believe that Rubinius's VM can JIT to native code.
kalusn has joined #ruby
whyy has quit [Ping timeout: 260 seconds]
whyy_ has joined #ruby
<arrubin>
And RubyMotion is compiled to native code.
steeve has joined #ruby
jhulten has quit [Remote host closed the connection]
why_away has quit [Ping timeout: 260 seconds]
kalusn has quit [Ping timeout: 260 seconds]
klaut has joined #ruby
ksinkar_ has quit [Quit: Konversation terminated!]
<Burgestrand>
dopie: your tab-character in front of each name
kilk_ has joined #ruby
<Burgestrand>
dopie: it's considered the first character for capitalize
<dopie>
Burgestrand, ha!
<dopie>
ahhh ok
anarang has joined #ruby
JensOfSweden has left #ruby [#ruby]
JBreit has joined #ruby
skaflem has joined #ruby
lsmola_ has joined #ruby
hamakn has joined #ruby
brandonblack has quit [Ping timeout: 276 seconds]
hamakn_ has quit [Read error: Connection reset by peer]
ayaz has joined #ruby
<Hanmac>
dopie: is the \t needed in the output?
<dopie>
yeah
<dopie>
i just moved it to the bottom
<dopie>
puts "\t#{name1} #{health1} health"
noop has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamakn has joined #ruby
<headius>
no version of MRI does any JIT, so it's fair to say MRI is 100% interpreted
<Hanmac>
headius: are you sure that the new one YARD that is used in ruby1.9+ isnt compiling to bytecode ?
<headius>
compiling to bytecode doesn't mean you're not just interpreting the bytecode
bradhe has joined #ruby
<headius>
interpreting means you have a piece of code that walks instructions of some kind and responds to them, rather than producing machine code for the CPU to handle
chipotle has quit [Quit: cya]
timonv has joined #ruby
<headius>
YARV is an bytecode-based interpreted runtime, and it's unlikely they'll have a JIT any time soon
Spami has joined #ruby
Xeago has joined #ruby
Spami has quit [Read error: Connection reset by peer]
Spami has joined #ruby
bradhe has quit [Ping timeout: 240 seconds]
frem_ has joined #ruby
Hobogrammer has quit [Ping timeout: 240 seconds]
timonv has quit [Ping timeout: 252 seconds]
mupkoo has joined #ruby
dumdedum has joined #ruby
DouweM has quit [Ping timeout: 240 seconds]
frem_ has quit [Ping timeout: 252 seconds]
The_NetZ_ is now known as ntzrmtthihu777
ntzrmtthihu777 has quit [Changing host]
ntzrmtthihu777 has joined #ruby
GriffinHeart has joined #ruby
byteoverfl0w has joined #ruby
sinkensabe has quit [Remote host closed the connection]
whyy_ has quit [Remote host closed the connection]
<Nilium_>
I wouldn't recommend using that method though.
cgj_ has joined #ruby
<isomorphismes>
nvm
mateu has quit [Ping timeout: 240 seconds]
<isomorphismes>
Nilium_: ok. why not?
<jgrevich>
Souldn’t the channel title be updated for 1.9.3? (e.g. 545->547)
whyy has joined #ruby
<Nilium_>
The sanest route is to just do a = ary.shift; function(a) unless a.nil?
<isomorphismes>
Nilium_: is tap standard?
<Nilium_>
Yes.
<isomorphismes>
ok. I was trying to have unless work as a while loop.
<Nilium_>
The likelihood that most people even know about it, though, is sort of low
mateu has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
<Nilium_>
You mean `until COND ; things ; end`?
<isomorphismes>
Exactly.
<Nilium_>
So why not just write that?
<isomorphismes>
unless ary.shift==nil { function(ary.shift) } uses up the front element
wookiehangover has quit [Ping timeout: 240 seconds]
<isomorphismes>
in the conditional itself
xiphias has joined #ruby
rhys has quit [Ping timeout: 240 seconds]
<Nilium_>
I'd say try not to get too fancy.
duncannz has quit [Ping timeout: 265 seconds]
akonny has quit [Quit: akonny]
aganov has quit [Ping timeout: 240 seconds]
cgj has quit [Ping timeout: 252 seconds]
<Nilium_>
Future you will thank you (well, maybe whisper it, because future you is still going to curse past you and past you's ancestors for the code anyway)
<isomorphismes>
well I'm working on a langugae tutorial
<isomorphismes>
so language details are what I'm really after
kies has quit [Read error: Connection reset by peer]
<Nilium_>
Also bear in mind that {} is not a general scope thing
wookiehangover has joined #ruby
<isomorphismes>
language mechanics
<isomorphismes>
I'm not solving any real problems
rhys has joined #ruby
relix has quit [Ping timeout: 240 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
<Nilium_>
so whereas in C you'd have for(;;) {}, in Ruby you don't have that for basic loops.
<apeiros>
tutorials which don't solve actual problems in their examples tend to suck
<apeiros>
sorry if that's pretty blunt
Doppp has joined #ruby
davedev24_ has joined #ruby
Doppp has quit [Changing host]
Doppp has joined #ruby
<isomorphismes>
apeiros: ruby koans is good
<Nilium_>
Write a Lisp interpreter in Ruby.
<Nilium_>
That'll be a fun exercise.
gigetoo has joined #ruby
<isomorphismes>
I don't speak Lisp.
<isomorphismes>
That sounds masochistic.
<apeiros>
isomorphismes: anyway, even with that given, you do have an actual problem. an abstract problem is still a problem.
varius has quit [Ping timeout: 240 seconds]
psmolen has quit [Ping timeout: 240 seconds]
<Nilium_>
Sounds like fun to me.
<Nilium_>
Granted I'm also writing a virtual machine for fun, so…
psmolen has joined #ruby
_justin has quit [Quit: _justin]
bradhe has joined #ruby
<Nilium_>
Different strokes.
<isomorphismes>
It's probably fun for someone with the right knowledge base.
<apeiros>
in your case, it sounds like "how do I iterate over an array", but I'm not sure because your suggested implementation of that problem is broken.
Doppp has quit [Client Quit]
drago777 has joined #ruby
<isomorphismes>
ok
Dr3amc0d3r|away has joined #ruby
<isomorphismes>
hold on let me play with your example apeiros
<isomorphismes>
thanks both Nilium_ apeiros
mgorbach has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
<isomorphismes>
so apeiros array.each do |i| f(i) # is the most idiomatic?
gogiel_ has joined #ruby
Photism has quit [Ping timeout: 240 seconds]
gogiel has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
kies has joined #ruby
bbbthunda_ has quit [Ping timeout: 260 seconds]
varius has joined #ruby
<graspee>
seeking to be idiomatic has the potential to stifle innovation
relix has joined #ruby
ghr has quit []
jayne_ is now known as jayne
<isomorphismes>
apeiros: The reason I was using array.shift is, I guess, because I only need to go through the aray once, so I don't mind (even it's good to) killing elements each time.
ghr has joined #ruby
marr has joined #ruby
shellox has joined #ruby
<shellox>
hi
<isomorphismes>
hi shellox
noop has quit [Ping timeout: 240 seconds]
cgj_ has quit [Quit: leaving]
bradhe has quit [Ping timeout: 265 seconds]
<isomorphismes>
apeiros: So if I do array.each do { |i| i=peano(i) } it doesn't seem to actually ++ the elements of the array. This is a pass-by-value thing maybe?
noop has joined #ruby
<Hanmac>
isomorphismes: you want to get a new array in return? use map
drager has quit [Ping timeout: 240 seconds]
steeve has quit [Remote host closed the connection]
<shellox>
I've got this gemfile and installed the gems with bundler. After the installation i tried in irb require 'supply_drop'
<apeiros>
isomorphismes: you ask about an aspect of your code but don't show the relevant code - how am I supposed to answer?
<Nilium_>
graspee: I doubt basic idioms like looping over an array are in severe need of innovation
<shellox>
but it returned an error and cannot load the file
<shellox>
when i type gem list
drager has joined #ruby
hpoydar has joined #ruby
<shellox>
i can't find the gem
<shellox>
why is that?
<apeiros>
isomorphismes: how about you show your actual code and desired result?
<isomorphismes>
apeiros: what do you want to see? def peano(x) { x+1 }
<shellox>
is it because the gem was installed from github
<apeiros>
isomorphismes: x+1 does not modify x. and integers can't be modified anyway.
axilla_ has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
<apeiros>
isomorphismes: variables have only one operation: assignment. everything else happens on the objects themselves.
<Nilium_>
isomorphismes: What are you trying to do specifically?
<Nilium_>
i.e., not asking how to fix the code, but just describe the data and what you want to do with it.
<isomorphismes>
Nilium_: I'm just working through this tutorial. It's the ruby koans about_scoring_project.rb.
<apeiros>
isomorphismes: and you did it again - you didn't ask how to solve your problem. you wanted us to fix your suggested implementation.
<apeiros>
you'll get bad answers that way.
<isomorphismes>
apeiros: sorry I don't understand what you mean
r0bby has joined #ruby
<isomorphismes>
apeiros: your answer made perfect sense
<Nilium_>
As a general rule, when asking programming questions, figure out what the data is and what you want to do with the data without thinking too much in terms of code.
<isomorphismes>
Nilium_: I'm sorry I don't understand what you mean by that.
<isomorphismes>
I'm just trying to learn how the language works
why_away has joined #ruby
<isomorphismes>
there is no problem to solve
mgorbach has quit [Ping timeout: 240 seconds]
<isomorphismes>
these have been really helpful answers
<Nilium_>
Just read the post.
<apeiros>
isomorphismes: an abstract problem *still is a problem*
<isomorphismes>
Nilium_: I did
axilla_ has quit [Ping timeout: 240 seconds]
XenoWolf has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
renier has quit [Ping timeout: 240 seconds]
<Nilium_>
You cannot have possible read both the question and answer in less than a minute
<Nilium_>
*possibly
<apeiros>
"I want to have an array with the result of a method applied to each element in an existing array" is an abstract problem
hpoydar has quit [Ping timeout: 265 seconds]
XenoWolf has joined #ruby
<apeiros>
"I solve it by manually iterating and assigning stuff to variables" is a suggested implementation. and you asked about a part of that implementation "why doesn't assigning stuff to variables change my array".
axilla has joined #ruby
kies has quit [Remote host closed the connection]
mgorbach has joined #ruby
<apeiros>
but in an idiomatic solution, that's not even part of the implementation.
<apeiros>
see the example irc dialog in Nilium_'s link (first answer)
<isomorphismes>
apeiros: What's the idiomatic solution?
<isomorphismes>
first comment on second answer -- says these Q's are not necessarily bad. I don't feel I've received unhelpful answers, just the opposite
renier has joined #ruby
<apeiros>
for the abstract problem I formulated? the map code I showed you above.
<isomorphismes>
ok cool thanks
<Nilium_>
As a suggestion, look at the Array class reference, the Hash class reference, and the Enumerable module reference
Takle has quit [Remote host closed the connection]
<isomorphismes>
those are over my head
AndChat|102836 has joined #ruby
<Nilium_>
They'll probably be easier to read than you think
<isomorphismes>
I've tried to read them before
drago777 has joined #ruby
Kruppe has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
xiphias has joined #ruby
xiphias has quit [Changing host]
Spami has quit [Quit: This computer has gone to sleep]
Takle has joined #ruby
whyy has quit [Ping timeout: 276 seconds]
mercwithamouth has joined #ruby
yubrew has joined #ruby
kies has joined #ruby
banisterone has quit [Ping timeout: 260 seconds]
<isomorphismes>
Nilium_: You're talking about ri Array #correct?
gigetoo has quit [Read error: Connection reset by peer]
Gadgetoid has quit [Ping timeout: 240 seconds]
<Nilium_>
Well, not necessarily through ri (I've never used it), but that's the documentation
<Nilium_>
I also like that you can view the source code for stuff by clicking on it, but that's only useful when you've really gone insane.
xiphias has quit [Ping timeout: 240 seconds]
<isomorphismes>
oh ok they're different
drago777 has quit [Ping timeout: 240 seconds]
ClarusCogitatio has quit [Ping timeout: 240 seconds]
nomadic has quit [Ping timeout: 240 seconds]
<apeiros>
I nowadays usually just use ? and $ from within pry.
<isomorphismes>
Nilium_: the web one is the one i've looked at before. ri is readable but very short. the web one is super long
spider-mario has joined #ruby
<isomorphismes>
apeiros: oh cool
<apeiros>
isomorphismes: the web one is exactly the one from ri
<Nilium_>
ri only displays documentation for the specific thing you requested.
<apeiros>
just differently formatted
yubrew has quit [Ping timeout: 260 seconds]
<Nilium_>
So you won't get all the instance/class method docs in the same view.
Kruppe has joined #ruby
<isomorphismes>
apeiros: sorry, I'm new -- ?Array; $Array; ?$Array don't pull it up in pry. What's the command exactly?
<apeiros>
isomorphismes: for core classes, you need to install pry-doc
<apeiros>
`? Array#concat` for example
Kruppe is now known as Guest80807
<apeiros>
or `? Time.at`
<apeiros>
.at is a class method, #concat an instance method
andrewlio has joined #ruby
<Nilium_>
Oddly enough, that doesn't work in Pry for me.
<Nilium_>
*pry
<Nilium_>
I suspect pry's just confused as all hell.
nomadic has joined #ruby
Shidash has quit [Ping timeout: 265 seconds]
<apeiros>
Nilium_: as said, install pry-doc
<isomorphismes>
oh this is nice. So you cd Array; ls; ? Array#& or any of the methods listed in the ls
<Nilium_>
I don't use it, so I'll pass
<apeiros>
Nilium_: it can't display core docs otherwise because it doesn't have the source to it
<Nilium_>
Dash is my documentation god
<apeiros>
meh
<apeiros>
switching apps for docs
mijicd has quit [Remote host closed the connection]
<apeiros>
but to each its own, I guess
thoolihan has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
willgorman has quit [Ping timeout: 240 seconds]
yeticry has quit [Ping timeout: 240 seconds]
willgorman has joined #ruby
dideler|work has quit [Ping timeout: 240 seconds]
<Nilium_>
I'm not writing code in pry, so I'm switching apps for something or another
dideler|work has joined #ruby
shtirlic has quit [Ping timeout: 240 seconds]
yeticry has joined #ruby
xiphias has joined #ruby
lxsameer has joined #ruby
rostam has quit [Read error: Connection reset by peer]
<isomorphismes>
Nilium_: not sure I get what you mean by "ri only displays documentation for the specific thing you requested". So I requested ri Array #the stuff on the website IS about Array, no
railzForDaiz has quit [Ping timeout: 260 seconds]
zartoosh has joined #ruby
<isomorphismes>
?
shtirlic has joined #ruby
<isomorphismes>
I don't know, I somehow thought there was a command-line access to all the smae information as this website.
thoolihan has joined #ruby
<isomorphismes>
local, rather.
Xuerian has quit [Ping timeout: 240 seconds]
<Nilium_>
It is the same documentation, it just doesn't display all of it at once.
ktun has joined #ruby
<Nilium_>
If you specify a class name, it displays the class description. If you specify an instance method for a class, it displays the instance method description.
mercwithamouth has quit [Ping timeout: 245 seconds]
Wolland has quit []
Hanmac has quit [Ping timeout: 252 seconds]
<ReggieMan>
Can anyone recommend JRuby over Rubinius or vice versa? Those two because they both have JIT compilers. I had no doubt about Python before I found out Python 3 doesn't have a JIT compiler.
Veidit has quit [Remote host closed the connection]
Veidit has joined #ruby
steeve has joined #ruby
timonv has joined #ruby
jcp has joined #ruby
Takle_ has joined #ruby
<headius>
ReggieMan: I can, but I'm biased... JRuby (or really, JVM) is a far more mature and high-perfomance runtime
<ReggieMan>
Hmm. I'll see if anyone else has anything to say.
Hanmac has joined #ruby
timonv has quit [Ping timeout: 240 seconds]
_justin has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
drago777 has quit [Ping timeout: 240 seconds]
xiphias has quit [Changing host]
xiphias has joined #ruby
chth0n has joined #ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
ta has quit [Ping timeout: 240 seconds]
benlieb has joined #ruby
sawtooth has quit [Ping timeout: 240 seconds]
ta has joined #ruby
<ReggieMan>
I plan on getting into Java one day, but I don't think that's a good reason to base my decision on. I plan on using it for Minecraft modding, anyway.
sawtooth has joined #ruby
Takle has quit [Ping timeout: 260 seconds]
jcp is now known as Guest9568
drago777 has joined #ruby
steeve has quit [Ping timeout: 260 seconds]
willgorman has quit [Ping timeout: 240 seconds]
Hobogrammer has quit [Ping timeout: 260 seconds]
<Nilium_>
Wow, my cat is apparently so tired he didn't even bother moving from my desk to my chair.
<Nilium_>
This is good. Means no crazy running around at 4am.
kalusn has joined #ruby
AndChat|102836 has quit [Read error: Connection reset by peer]
ziyadb has joined #ruby
willgorman has joined #ruby
marr has quit [Ping timeout: 260 seconds]
kalusn has quit [Ping timeout: 240 seconds]
david__ has quit [Quit: Leaving]
steeve has joined #ruby
andrewlio has quit [Quit: Leaving.]
xiphias has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
xiphias has quit [Changing host]
xiphias has joined #ruby
mercerist has joined #ruby
decoponio has joined #ruby
mupkoo has quit []
mercwithamouth has joined #ruby
Raboo_ has joined #ruby
axilla has quit [Ping timeout: 260 seconds]
jgrevich has quit [Quit: jgrevich]
nfk has joined #ruby
Raboo has quit [Ping timeout: 240 seconds]
Raboo_ is now known as Raboo
Guest9568 has quit [Ping timeout: 240 seconds]
xiphias has joined #ruby
xiphias has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
gregf_ has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
gregf_ has joined #ruby
Doppp has joined #ruby
Slavox is now known as Slavox|AFK
axilla has joined #ruby
chipotle has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
Kruppe- has joined #ruby
bradhe has joined #ruby
drago777 has joined #ruby
akonny has joined #ruby
klaut has joined #ruby
chipotle has joined #ruby
shvelo has joined #ruby
chipotle has quit [Client Quit]
jhulten has joined #ruby
<atmosx>
morning
obs has joined #ruby
AlSquire has joined #ruby
klaut has quit [Remote host closed the connection]
chipotle has joined #ruby
chipotle has quit [Client Quit]
wm3|away has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
willgorman has quit [Ping timeout: 240 seconds]
willgorman has joined #ruby
musl_ has quit [Ping timeout: 240 seconds]
bradhe has quit [Ping timeout: 260 seconds]
drago777 has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
chipotle has quit [Client Quit]
BizarreCake has joined #ruby
dc has quit [Remote host closed the connection]
jhulten has quit [Ping timeout: 260 seconds]
scx has joined #ruby
scx_ has quit [Ping timeout: 245 seconds]
DouweM has joined #ruby
dc has joined #ruby
<shvelo>
Ahoy
<shvelo>
what do we do with the drunken sailor early in the morning?
chipotle has joined #ruby
<ReggieMan>
Come back to bed, Captain.
<atmosx>
why all live in a yellow submarine
<atmosx>
hahaha
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
lkba has quit [Ping timeout: 260 seconds]
<Hanmac>
shvelo: remove him from the pc so he does not to try to make rails apps
<shvelo>
lol
railzForDaiz has quit [Ping timeout: 240 seconds]
akonny has quit [Quit: akonny]
emsilva has joined #ruby
malcolmva has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
Kruppe- has quit [Ping timeout: 240 seconds]
drago777 has quit [Ping timeout: 240 seconds]
willgorman has joined #ruby
willgorman has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
shvelo has quit [Quit: Leaving]
yubrew has joined #ruby
chipotle has joined #ruby
xiphias has joined #ruby
chipotle has quit [Client Quit]
Azure_ has joined #ruby
starfox_21 has quit [Quit: starfox_21]
chipotle has joined #ruby
drago777 has joined #ruby
rotor has quit [Ping timeout: 240 seconds]
carraroj has joined #ruby
willgorman has quit [Ping timeout: 240 seconds]
jxf has quit [Ping timeout: 240 seconds]
benlieb has quit [Quit: benlieb]
Azure has quit [Ping timeout: 240 seconds]
malcolmva has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
yubrew has quit [Ping timeout: 260 seconds]
Takle_ has quit [Remote host closed the connection]
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
railzForDaiz has joined #ruby
Atttwww has quit [Ping timeout: 252 seconds]
rotor has joined #ruby
klaut has joined #ruby
duncannz has joined #ruby
chipotle has quit [Quit: cya]
newUser1234 has quit [Remote host closed the connection]
hermanmu_ has quit [Remote host closed the connection]
Kruppe has joined #ruby
willgorman has joined #ruby
chipotle has joined #ruby
hgl has quit [Ping timeout: 265 seconds]
drago777 has quit [Ping timeout: 240 seconds]
Nilium_ has quit [Remote host closed the connection]
Kruppe is now known as Guest90739
rdark has joined #ruby
keen________ has quit [Ping timeout: 240 seconds]
drago777 has joined #ruby
hgl has joined #ruby
mityaz has quit [Ping timeout: 252 seconds]
hgl has quit [Max SendQ exceeded]
willgorman has quit [Ping timeout: 240 seconds]
hgl has joined #ruby
chipotle has quit [Client Quit]
xiphias has joined #ruby
chipotle has joined #ruby
duncannz has quit [Quit: Leaving]
rotor has quit [Ping timeout: 240 seconds]
XenoWolf has quit [Ping timeout: 260 seconds]
rotor has joined #ruby
chipotle has quit [Client Quit]
willgorman has joined #ruby
charliesome has joined #ruby
Platini has quit [Ping timeout: 240 seconds]
pranny has quit [Quit: Leaving.]
moritzschaefer has joined #ruby
FIGO_ has joined #ruby
yacks has quit [Ping timeout: 245 seconds]
timonv has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
yacks has joined #ruby
hakunin_ has joined #ruby
musl_ has joined #ruby
FIGO_ is now known as Platini
niftylettuce_ has quit [Quit: Connection closed for inactivity]
blaxter has joined #ruby
XenoWolf has joined #ruby
oo__ has joined #ruby
sk87 has joined #ruby
rotor has quit [Ping timeout: 240 seconds]
Takle has joined #ruby
hamakn_ has joined #ruby
mehlah has quit [Quit: Leaving...]
keen________ has joined #ruby
mityaz has joined #ruby
willgorman has quit [*.net *.split]
PhilK has quit [*.net *.split]
Guest90739 has quit [*.net *.split]
hakunin has quit [*.net *.split]
dumdedum has quit [*.net *.split]
hamakn has quit [*.net *.split]
oo_ has quit [*.net *.split]
drago777 has quit [*.net *.split]
lxsameer has joined #ruby
timonv has quit [Remote host closed the connection]
timonv has joined #ruby
PhilK has joined #ruby
rghose1 has quit [Ping timeout: 240 seconds]
rghose1 has joined #ruby
gazz101_ has joined #ruby
gazz101_ has left #ruby [#ruby]
emsilva has quit [Quit: Keep Walking (Computer Slept!)]
ReggieMan has quit [Remote host closed the connection]
chipotle has joined #ruby
hermanmunster has joined #ruby
Guest42887 has quit [Quit: Guest42887]
drago777 has joined #ruby
chipotle has quit [Client Quit]
ndrei has quit [Ping timeout: 260 seconds]
chipotle has joined #ruby
rotor has joined #ruby
railzForDaiz has quit [Ping timeout: 276 seconds]
shvelo has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
near77 has joined #ruby
jcp has joined #ruby
willgorman has joined #ruby
pranny has joined #ruby
<shvelo>
I don't like the hash syntax
jcp is now known as Guest41835
<Morrolan>
That's unfortunate.
chipotle has quit [Client Quit]
hermanmunster has quit [Remote host closed the connection]
Xeago has quit [Remote host closed the connection]
aganov has joined #ruby
hermanmunster has joined #ruby
shellox has left #ruby [#ruby]
ndrei has joined #ruby
<ari-_-e>
shvelo: what about it?
<shvelo>
=>
<shvelo>
why not :
xiphias has joined #ruby
<ari-_-e>
because perl
<ari-_-e>
also, there's a new syntax which does use :
<shevy>
"June Headline: Is Swift going to replace Objective-C?"
anaeem1 has quit [Quit: Leaving...]
<banister>
ari-_-e it's useful sometimes
anaeem1_ has joined #ruby
_dels has joined #ruby
dels is now known as Guest68990
kalusn has quit [Ping timeout: 245 seconds]
Guest68990 has quit [Ping timeout: 265 seconds]
hermanmunster has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
relix has joined #ruby
bradhe has quit [Ping timeout: 276 seconds]
bluOxigen has quit [Ping timeout: 245 seconds]
aagdbl has quit [Quit: This computer has gone to sleep]
relix has quit [Client Quit]
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 276 seconds]
alem0lars has joined #ruby
<atmosx>
I've read a couple of weeks back that it's better to let the application come out with an error
<atmosx>
than to use rescue Exception => e
<atmosx>
is that so?
<atmosx>
we should be using only expected exception e.g. Sequel::Error in my case?
<atmosx>
but even that seems a little generric
shvelo has quit [Ping timeout: 260 seconds]
<katlogic>
use rescue if you want to act upon it, not to ignore the error
jhulten has joined #ruby
yubrew has joined #ruby
aagdbl has joined #ruby
akonny has joined #ruby
why_away has quit [Remote host closed the connection]
whyy has joined #ruby
doev has quit [Quit: Verlassend]
GriffinHeart has joined #ruby
aagdbl has quit [Client Quit]
jhulten has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
yubrew has quit [Ping timeout: 260 seconds]
<apeiros>
atmosx: if you blindly swallow exceptions you'll never (or just too late) notice that your program works incorrectly. and when you notice you'll have not much for diagnosis.
<apeiros>
blindly swallowing exceptions == bad
<apeiros>
and rescue Exception is a no-go because it also eats system level exceptions, like Interrupt (ctrl-c)
steeve has joined #ruby
<atmosx>
I see
whyy has quit [Ping timeout: 245 seconds]
<atmosx>
Nice so it's a good practice not to use it. Good, I'll remove them.
diegoviola has quit [Remote host closed the connection]
whyy has joined #ruby
Xeago has joined #ruby
phoo1234567 has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
gazz102 has quit [Ping timeout: 246 seconds]
Xeago has quit [Ping timeout: 245 seconds]
<apeiros>
note that you can e.g. globally rescue StandardError (plain rescue defaults to that), log the exception and shut down in a nicer fashion. that mostly makes sense if your users aren't developers.
aagdbl has joined #ruby
Xeago has joined #ruby
maximski has quit []
obs has quit [Quit: Saliendo]
mercwithamouth has quit [Ping timeout: 252 seconds]
<shevy>
"mod_php solved this problem. PHP was a terrible language back then"
<shevy>
the part headed "Library Dominance is Not a Historical Inevitability" is interesting
<shevy>
though PHP of course is still an awful language haha
railzFor_ has joined #ruby
koell has joined #ruby
mark_locklear has joined #ruby
railzForDaiz has quit [Ping timeout: 265 seconds]
emsilva has joined #ruby
banister has quit [Ping timeout: 245 seconds]
banister_ has joined #ruby
mordof has quit [Disconnected by services]
mordof1 has joined #ruby
sumark has quit [Remote host closed the connection]
cocotton has joined #ruby
relix has joined #ruby
railzFor_ has quit [Ping timeout: 265 seconds]
sumark has joined #ruby
aagdbl has quit [Quit: This computer has gone to sleep]
danshultz has joined #ruby
garndt has joined #ruby
<sdegutis>
Is there an excellent tutorial on making your own Gem (mainly the Gemspec) and testing it on a real project without pushing it up to ruby gems?
lewix has joined #ruby
AlexRussia has quit [Ping timeout: 245 seconds]
r0bby has quit [Excess Flood]
<Burgestrand>
sdegutis: I'd use http://guides.rubygems.org/, together with Bundler to depend on the gem from a local path/or a github repository
anaeem1 has quit [Remote host closed the connection]
r0bby has joined #ruby
<sdegutis>
Burgestrand: Ahh good idea, thanks.
moritzschaefer has quit [Ping timeout: 260 seconds]
<Burgestrand>
banister_: usually don't IRC much any more, only gaming, not much coding in my spare time
alexju has joined #ruby
<Burgestrand>
banister_: how's you? pry has certainly caught on ;)
cocotton_ has joined #ruby
<banister_>
Burgestrand working for a ruby/rails shop too, it's ok…but rails work is pretty uninspiring
<banister_>
Burgestrand doing much ios?
yosafbridge has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
<Burgestrand>
banister_: naw, not so much, only sometimes
<Burgestrand>
banister_: some rubymotion in my spare time, but… not much coding in the spare time
<banister_>
Burgestrand why? is the passion going out? or is your woman taking up all your free time? (as in my case..)
chipotle has joined #ruby
<Burgestrand>
banister_: naw, most of the time I just… yeah the woman, and gaming, and just doing other stuff!
AlexRussia has joined #ruby
_dels has quit [Quit: Leaving.]
<banister_>
Burgestrand cool! are you following the oculus rift developments? :)
<Burgestrand>
banister_: a little! tried the rift at DreamHack here in winter, and it's cool, can't wait for it to come out
alexju has quit [Ping timeout: 240 seconds]
<Burgestrand>
banister_: the feeling of spaghetti legs after using it definitely sold it
<banister_>
Burgestrand did you preorder the dk2 or anything like that?
cocotton has quit [Ping timeout: 265 seconds]
pranny1 has quit [Quit: Leaving.]
<Burgestrand>
banister_: no development kit for me, 3D development is not for me
<Burgestrand>
banister_: I want the final thing with some games, and I'll lock myself in my apartment for a few days
carraroj has quit [Ping timeout: 252 seconds]
<Burgestrand>
banister_: you do any development on things like that?
<Burgestrand>
banister_: maybe even with ruby? hehe
cocotton_ has quit [Quit: Leaving...]
benzrf|offline is now known as benzrf
ec has quit [Disconnected by services]
yosafbridge has joined #ruby
cocotton has joined #ruby
qwyeth has quit [Quit: Leaving]
<banister_>
Burgestrand hmm, i want to do a bit of dev with it, but more, there's a lot of content already out there for the rift, i'd like to juts play with that. THere's also some very interesting stuff that aren't quite games, they're like recreations of scenes from movies, some one recently did the bus stop scene from my neighbor totoro, and the boiler scene from spirited away. Also, there's a few vids taken with 3d cameras around japan that are
<banister_>
meant to be pretty incredible with the rift
<banister_>
Burgestrand i'll probably play a bit with ue4
chipotle has quit [Client Quit]
<Burgestrand>
banister_: aw yeah, exploring movies would be cool
<banister_>
Burgestrand too much? you mean learning curve is too steep?
<Burgestrand>
banister_: dunno, just doesn't feel like my thing
mikesplain has joined #ruby
lewix has quit [Ping timeout: 252 seconds]
<banister_>
Burgestrand i think u have to go in there with a project in mind
benzrf is now known as benzrf|offline
<banister_>
otherwise you could get bogged down with all the crap
<banister_>
Burgestrand what's the leap motion like bw?
<banister_>
btw*
<Burgestrand>
hehe, yeah, probably, I've dabbled in some 2D game development with a goal in mind, but it's just too much fun fiddling around rather than finishing, as always :P
bluOxigen has quit []
lewix has joined #ruby
lewix has joined #ruby
<Burgestrand>
banister_: it's cool! they recently released an update that addresses my only concerns with it (sometimes losing track of fingers, light sensitivity) that I have not tried
<Burgestrand>
banister_: but… you kind of miss the feedback physical objects give; having an arbitrary cube in the air is tricky for UX
koell has left #ruby ["So say we all!"]
JokerDoom has joined #ruby
<Burgestrand>
banister_: now my eyes are set on the Myo armband, I'm more interested in doing cool stuff with e.g. iphone apps
<shevy>
sdegutis don't worry really, just push to rubygems.org and call it a beta gem
northfurr has joined #ruby
northfurr has quit [Client Quit]
shvelo has joined #ruby
<sdegutis>
lol
sambao21 has joined #ruby
snath has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 276 seconds]
yubrew has joined #ruby
banister_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shwouchk has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
anaeem1 has quit [Remote host closed the connection]
dc has joined #ruby
pontiki has quit [Quit: Lost terminal]
maximski has joined #ruby
yubrew has quit [Ping timeout: 245 seconds]
danshultz has joined #ruby
<sdegutis>
Okay, before I push this gem, it's time to settle on a decent gem name.
<sdegutis>
(project name)
OrionKissinger has joined #ruby
<bmurt>
depends on what it does
<sdegutis>
It was inspired by fuckingshellscripts.org.
ixti has joined #ruby
obs has joined #ruby
strax has joined #ruby
<sdegutis>
The description of my project is "Minimalist EC2 management & deployment tool"
<sdegutis>
The current name is kinda dumb.
<bmurt>
which is?
<sdegutis>
Oh! I know! How about "Dragon" ?
<sdegutis>
The current name is "billow"
<sdegutis>
(found it in the thesaurus for "cloud")
<bmurt>
how does dragon relate?
<sdegutis>
It doesn't, but it's way cool.
ItSANgo has joined #ruby
<bmurt>
"stationary"
<sdegutis>
I am bad at naming things.
<bmurt>
plays on the word deployment
zarubin has quit [Read error: Connection reset by peer]
<sdegutis>
Hmm.
_dels has joined #ruby
zarubin has joined #ruby
_dels is now known as dels
<bmurt>
emdt
zarubin has quit [Read error: Connection reset by peer]
<bmurt>
abbreviations
oorst has quit [Quit: oorst]
zarubin has joined #ruby
<bmurt>
emdtk
alem0lars has quit [Quit: Going AFK...]
<bmurt>
ec2 management & deployment toolkit
chipotle has joined #ruby
dc has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 276 seconds]
boris has joined #ruby
jhulten has joined #ruby
maximski has quit []
chipotle has quit [Client Quit]
sdouglas has joined #ruby
<shevy>
sdegutis oh man
<shevy>
sdegutis you already now face the biggest problem ruby hackers face
<shevy>
sdegutis giving things proper names
<bmurt>
heh, just mash keys and go with it
<sdegutis>
My wife suggested "Web Ignite"
<shevy>
that's how we end up with things like god, unicorn and more crap like that
vpretzel has joined #ruby
chipotle has joined #ruby
<bmurt>
seems to be how most shit is named
<shevy>
sdegutis well that is too long
<bmurt>
'cancan'
<bmurt>
how does cancan relate to authorization?!
<shevy>
dunno
<shevy>
how does python relate to programming
<shevy>
it's a god damn animal!
<bmurt>
animals program though
<shevy>
I know, I've seen the cats hackers
dc has joined #ruby
<sdegutis>
To be fair, all of my new non-Ruby projects are just named after mythological creatures and such, like Phoenix and Zephyros (window managers), Bahamut (music player), Leviathan and Chaos (text editors)
mityaz has joined #ruby
chipotle has quit [Client Quit]
<sdegutis>
So anything slightly-relevant is a step up for me.
<bmurt>
isn't bahamut an irc service?
<sdegutis>
Probably.
<bmurt>
it was, i dont know if its still active
mityaz has quit [Client Quit]
chipotle has joined #ruby
Takle has quit [Remote host closed the connection]
<sdegutis>
It's also my obscure OS X music player that ~20 people like.
<sdegutis>
At least I had a professional icon made for mine.
jhulten has quit [Ping timeout: 260 seconds]
dc has quit [Read error: Connection reset by peer]
<shevy>
hehe
<sdegutis>
Oh! How about "Ignition"?
chipotle has quit [Client Quit]
alexju has joined #ruby
<shevy>
call it Elvis
<sdegutis>
(for my ec2 manager/deployer gem"
dblessing has joined #ruby
<shevy>
for Elvis Presley
<sdegutis>
Crap, wrong end-delimiter.
sdouglas has quit [Ping timeout: 240 seconds]
<bmurt>
deployee
qwyeth has joined #ruby
<bmurt>
like employee, but it actually works and for cheaper
chipotle has joined #ruby
<bmurt>
"no obamacare needed for this gem!"
<sdegutis>
:D
<sdegutis>
Keepers.
predator117 has joined #ruby
sdrew has joined #ruby
kpshek has joined #ruby
<sdegutis>
Okay, it's gonna be named "Deployee" and the description will be "No ObamaCare needed for this gem!" and the summary will be "Like Employee, but it actually works and for cheaper."
chipotle has quit [Client Quit]
<bmurt>
i like it
<bmurt>
:D
<sdegutis>
I'll tell everyone to blame Brendan Murtagh for it.
<sdegutis>
s.author = "Brendan Murtagh"
katmandoo has joined #ruby
OrionKissinger has quit [Remote host closed the connection]
chipotle has joined #ruby
<bmurt>
that's fine. i'll finally be popular
<bmurt>
:_
<sdegutis>
:D
<bmurt>
:)
Guest25852 has joined #ruby
Mongey is now known as zeel2
jcarouth has joined #ruby
chipotle has quit [Client Quit]
<shevy>
this is a wonderful example why the names for gems will continue to be awful
zeel2 is now known as zeel_cola
akonny has joined #ruby
r0bby has quit [Excess Flood]
echevemaster has joined #ruby
chipotle has joined #ruby
<sdegutis>
Actually I won't choose that name.
<bmurt>
:*(
<sdegutis>
We have too many funny names, this one should be serious.
* bmurt
hunts down sdegutis's address and buys a sharp knife
<bmurt>
i put lots of effort into deployee
<sdegutis>
bmurt: Oh thanks, we've needed some.. can you make it a cheese knife?
Maple__ has quit [Quit: bbl]
r0bby has joined #ruby
<sdegutis>
PM me for directions
dangerousdave has quit [Read error: Connection reset by peer]
<bmurt>
i prefer a butter knife
sdrew has quit [Client Quit]
dangerou_ has joined #ruby
<sdegutis>
bmurt: our cheese knife is the dullest one, we could use a new one
bluOxigen has joined #ruby
maximski has joined #ruby
chipotle has quit [Client Quit]
<bmurt>
once you make it big with deployee, you can buy you're own
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
sinkensabe has quit [Remote host closed the connection]
dc_ has quit [Remote host closed the connection]
predator117 has quit [Ping timeout: 245 seconds]
<sdegutis>
Although I'd rather it be called FogHQ, but I don't know if I can get away with that legally.
iamvery has joined #ruby
sinkensabe has joined #ruby
<shevy>
bmurt
<bmurt>
yo
<shevy>
look at this
<shevy>
you should have been more insistent with getting him to name it deployee
<shevy>
now it's too late :(
* sdegutis
waits...
<sdegutis>
shevy: oh thought you had some link or something relevant
<shevy>
people will come and ask him
<shevy>
"Hey, how can I connect my iPhone to your CloudHQ app?"
JokerDoomWork has joined #ruby
<bmurt>
sdegutis: i reject your claim to name it cloudhq. i suggest deployee
<shevy>
\o/
<shevy>
the more often the word gets repeated, the better it sticks
<bmurt>
guaranteed to get you laid by ruby nerds since june 9th, 2014
<shevy>
omg
<bmurt>
true
<shevy>
ruby nerds
<bmurt>
so i think im going to do some deployeeing today of new VMs
Guest25852 has quit []
<bmurt>
our network engineer is getting ready to deployee a new router
luksaur has joined #ruby
<atmosx>
bmurt: and you are going to delpoy a vm for a router?
marr123 has joined #ruby
akonny has joined #ruby
<bmurt>
yep. using this new gem called deployee
<bmurt>
once sdegutis renames it
<bmurt>
:D
yubrew has quit [Ping timeout: 252 seconds]
<sdegutis>
"de" = un, "plicare" = to fold, "deploy" = unfold; "employ" = enfold, or fold-in, since "en" = in; "employee" = one who folds in, deployee = "one who folds"
davedev24_ has joined #ruby
mikecmpbll has joined #ruby
silkfox has joined #ruby
_justin has quit [Quit: _justin]
<sdegutis>
"displicare" (deploy) can also mean "explain", not just "unfold", so deployee = "one who explains"
<sdegutis>
I can dig that.
devdazed has quit [Quit: Bye]
<atmosx>
sdegutis: what are you doing to these people?
<bmurt>
aka, "one who folds a bunch of shit and ships it to aws"
<bmurt>
deployee
<atmosx>
I'm so tired of writing begin/rescue/ennd and if/else clauses
sinkensabe has quit [Ping timeout: 276 seconds]
<sdegutis>
atmosx: then stop
<atmosx>
sdegutis: no, I wanna make it perfect
<sdegutis>
atmosx: that doesn't make it better
<atmosx>
no more errors in my code.
<sdegutis>
I only used begin/rescue/end once I think.
mercerist has quit [Quit: Computer has gone to sleep.]
byteoverfl0w has quit [Quit: Leaving... have a good one...]
mercwithamouth has quit [Ping timeout: 265 seconds]
railzFor_ has joined #ruby
Takle has quit [Remote host closed the connection]
devdazed has joined #ruby
djcp has joined #ruby
<sdegutis>
Oh come on Firefox, at least render /something/ on travis-ci.org
<railzFor_>
is it possible to create a hash with default keys ? looking liek this Hash.new(:task, :date, :author) and later on add the corresponding values later ?
railzForDaiz has quit [Ping timeout: 276 seconds]
TDJACR has joined #ruby
<aagdbl>
railzFor_, what should be the default values for the keys?
hpoydar has quit [Read error: Connection reset by peer]
thumpba has joined #ruby
Bira has joined #ruby
stantona has joined #ruby
phansch has joined #ruby
<sdegutis>
Gyahh, implicit blocks create procs, not lambdas, which don't tell me which args are truly required.
stantona has quit [Read error: Connection reset by peer]
stantona has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
marco82 has joined #ruby
mikesplain has quit [Ping timeout: 245 seconds]
tiguser has quit [Ping timeout: 260 seconds]
Hanmac has joined #ruby
baroquebobcat has joined #ruby
tiguser has joined #ruby
sk87 has joined #ruby
Zamerick has quit [Ping timeout: 245 seconds]
sambao21 has quit [Quit: Computer has gone to sleep.]
chrisja has joined #ruby
marco82 has left #ruby ["Sto andando via"]
luisjose has joined #ruby
sdouglas has joined #ruby
sambao21 has joined #ruby
sputnik13 has joined #ruby
<luisjose>
Hello, is there a way to listen to keyboard events on a daemon running on background, or even launched on another console and listen to keyboard on another console
mikesplain has joined #ruby
hakunin_ is now known as hakunin
jarray52 has left #ruby [#ruby]
maletor has joined #ruby
baroquebobcat has quit [Client Quit]
<jhass>
not sure, I think I'd investigate reading /dev/input directly first
b00stfr3ak has joined #ruby
<jhass>
probably more of a #linux question I guess
baroquebobcat has joined #ruby
ruralhack has quit [Ping timeout: 260 seconds]
OrionKissinger has quit []
markuman has left #ruby ["WeeChat 0.4.3"]
IceDragon has joined #ruby
toastynerd has joined #ruby
shvelo has quit [Quit: Leaving]
<Mon_Ouie>
You don't even know that he's using linux yet though
shiggity_ has quit [Quit: Leaving]
<hoelzro>
once a job is backgrounded, I believe it loses control of the tty
sinkensabe has quit [Remote host closed the connection]
<hoelzro>
that's getting into process group/session land
arrubin has joined #ruby
mary5030_ has joined #ruby
<hoelzro>
you *might* be able to listen to another terminal's input by finding out its tty name
<hoelzro>
and opening that file
maletor has quit [Ping timeout: 260 seconds]
baroquebobcat has quit [Client Quit]
<jhass>
luisjose: what's the goal of doing that anyway? keylogger?
<Hanmac>
jhass: he might be a agent from the NSA ;P
<jhass>
duh, I'd expected them to not get the best man, but that low?
<jhass>
;P
Guest41835 is now known as Kruppe
scx has joined #ruby
<sdegutis>
Is there a way to make blocks passed to methods actually be lambdas without explicitly passing lambdas?
<toretore>
elaborate
mary5030 has quit [Ping timeout: 276 seconds]
hpoydar has joined #ruby
<workmad3>
sdegutis: not without rewriting the method
mijicd has joined #ruby
<jhass>
what feature of a lambda do you need anyway?
<sdegutis>
required args
mary5030 has joined #ruby
apipkin has joined #ruby
ruralhack has joined #ruby
<toretore>
that's a bit backwards
<apipkin>
is there a specific channel for haml, or is this a good place?
<sdegutis>
apipkin: LOL
<sdegutis>
apipkin: you had me for a second
<sdegutis>
toretore: oh?
<toretore>
it's your method that decides the arguments
<toretore>
not the block/lambda
_justin has joined #ruby
<sdegutis>
toretore: right on
<sdegutis>
toretore: I'll probably just use def then.
<sdegutis>
Not sure how to test this function without namespacing it though.
scx has quit [Ping timeout: 245 seconds]
<jhass>
sdegutis: as toretore said you shouldn't need that enforcement. If you think you really do the simplest thing is to check .arity by hand
<apipkin>
sdegutis: huh? :-/
mary5030_ has quit [Ping timeout: 240 seconds]
<sdegutis>
apipkin: LOL the whole andy kaufman style is a great touch
<toretore>
apipkin: did you try #haml ?
obs has quit [Remote host closed the connection]
<sdegutis>
apipkin: oh wait I misread you as sayign "html"
<Hanmac>
jhass all other best man dont want to do the job because they have "moral" ;P
benzrf is now known as benzrf|offline
<apipkin>
toretore: i didn’t see many people in there :) This may be more ruby based anyways…
<jhass>
I think everybody has moral. Some people just don't notice they do until it's too late
<toretore>
apipkin: you won't know until you try to ask them
<apipkin>
toretore: roger that
baroquebobcat has joined #ruby
<toretore>
that is the rule: try the right channel first, then try another one if you don't get a reply
timonv has joined #ruby
<workmad3>
apipkin: also, #rubyonrails could be a good place to ask
<toretore>
god damn heat, i don't understand what people like about it
<apipkin>
workmad3: that makes sense too, thanks!
troyready has joined #ruby
sinkensabe has joined #ruby
<jhass>
toretore: I think they actually like the sun and not the heat. Wrong associations and all that
<toretore>
apipkin: to be clear: your question is probably quite relevant to this channel, but it's more relevant to #haml :)
<Dekade>
can you assign a new value to a hash key like x['y'] += z ?
<toretore>
yes
<jhass>
exactly like that
Lucky_ has joined #ruby
<Dekade>
hmm, alright I figured. dont know why I keep messing up.
<Hanmac>
Dekade: if the Hash supports it with a default value yes
scx has joined #ruby
<toretore>
oh
<jhass>
I think new value implies that it exists before
<toretore>
yes
havenwood has quit [Remote host closed the connection]
<apipkin>
Is there an alternative to each on a hash so that I only get the “loop” once on any key of the hash?
bmurt has quit []
<jhass>
apipkin: .each_key
sski has quit [Remote host closed the connection]
noop has quit [Ping timeout: 265 seconds]
diegoviola has quit [Quit: WeeChat 0.4.3]
<toretore>
jhass: people are always like "oh summer is the best" but it's like 30C and you sweat like a pig
alem0lars has joined #ruby
sski has joined #ruby
<jhass>
doesn't defeat my point
SCommette has quit [Quit: SCommette]
<jhass>
it's the sun light that makes you happy, people just associate the feeling the the omnipresent heat during the times you get a lot
hamakn_ has quit [Remote host closed the connection]
<jhass>
*to the
<sdegutis>
Oooh, I remember the other reason I used inheritance for commands... so they could inherit methods. Oops.
Mon_Ouie has quit [Ping timeout: 240 seconds]
Hanmac1 has joined #ruby
<Hanmac1>
toretore: you need to think it from another direction ... you are sitting in a sauna ... and you dont need to pay for that
CodeBunny has quit [Ping timeout: 240 seconds]
<toretore>
but i don't like saunas :(
hamakn has joined #ruby
sski has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 252 seconds]
LnL_ is now known as LnL
<jhass>
that's okay, at least you don't have to pay for it, remember?
subraminion has joined #ruby
<Hanmac1>
jhass: psst don't let the capitalist hear that!
cocotton has quit [Remote host closed the connection]
vee has quit [Read error: Connection reset by peer]
<luisjose>
jhass: is an app that listen to a barcode scanner, I want to run it on background, actually it runs on startup and take control of the tty so i can't login while is running unless i do it by ssh, and if i need to restart the app, i need to reboot
<luisjose>
hoelzro: its actually Linux
<luisjose>
jhass: but the barcode scanner acts as a keyboard
<jhass>
I'd definitely pursue directly opening the input device node then
chrisja has quit [Quit: leaving]
<hoelzro>
luisjose: what I described should work on Linux
SCommette has joined #ruby
ruralhack has quit [Ping timeout: 265 seconds]
juco has joined #ruby
hpoydar has quit [Remote host closed the connection]
<hoelzro>
and in light of what you've described, I agree with jhass
<luisjose>
yeah thats what im looking for, but i don't know how to open the keyboard device directly
IceDragon has quit [Ping timeout: 265 seconds]
<luisjose>
thats what im trying to find out
IceDragon has joined #ruby
<jhass>
File.open("/dev/input/right_thing_here") though that might be a bit raw and direct, depending on what the scanner sends
wallerdev has joined #ruby
hamakn has quit [Ping timeout: 276 seconds]
hpoydar has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<hoelzro>
you may have to turn off buffering as well
mikepack has quit [Remote host closed the connection]
acmehandle has joined #ruby
sinkensabe has quit [Remote host closed the connection]
acmehandle has quit [Client Quit]
sinkensabe has joined #ruby
acmehandle_ has joined #ruby
poguez_ has joined #ruby
_justin has quit [Quit: _justin]
<acmehandle_>
Hi, does ruby have the same concept of namespace like perl and python? Or is ruby's concept of namespace like java?
<jhass>
hm, neither I'd say
ephemerian has quit [Quit: Leaving.]
steeve has quit [Ping timeout: 252 seconds]
<acmehandle_>
Ok, so does ruby handle its memory like python? Meaning in python everything links back to a 'table' of values
akonny has joined #ruby
<jhass>
rubys namespaces are modules (of which classes are a subclass of), the filename/path where those a defined doesn't relate beyond conventions
<acmehandle_>
No I'm not going to do that. I've bought hundreds of books and spent thousands of dollars on books over the years.
<hoelzro>
I would say the organization of object members is an implementation detail
sailias1 has joined #ruby
sailias has quit [Read error: Connection reset by peer]
<workmad3>
acmehandle_: well, you don't *have* to buy the book... I'm suggesting that, considering the types of questions you're asking that the book would be likely highly interesting to you
<hoelzro>
you *could* implement them as a dictionary, but if you were clever, you could probably implement them with packed memory
JasmeetQA has joined #ruby
cocotton has joined #ruby
sinkensabe has quit [Ping timeout: 265 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
bradhe has joined #ruby
railzFor_ has quit [Ping timeout: 252 seconds]
Rahul_Roy has joined #ruby
<acmehandle_>
Thats a lot to chew on right there.
benzrf|offline is now known as benzrf
Wolland has joined #ruby
<acmehandle_>
Thank you for that. That gives me something to think about.
railzForDaiz has joined #ruby
bluOxigen has joined #ruby
Joulse has quit [Quit: Joulse]
Gil_ has joined #ruby
hamakn has joined #ruby
<acmehandle_>
But everything is not 'an object' in ruby like other languages are so fond of saying nowadays.
<acmehandle_>
It seems
whyy has quit [Ping timeout: 240 seconds]
<hoelzro>
acmehandle_: what do you mean?
<jhass>
what's not an object in ruby that should be?
<workmad3>
jhass: blocks are quantum-objects :) and the code itself isn't really an object...
<jhass>
"..that should be"
Gil_ has quit [Remote host closed the connection]
<acmehandle_>
I dont know. Honestly I'm just trying to make the bridge between python and ruby and then just wrap my mind around ruby as it is on its own. Unfortunately saying that a language is 'not object oriented' is used disparagingly nowadays which I think is silly.
<workmad3>
jhass: ah... so you've never written lisp then? :)
<jhass>
and I pretty much can get an object representation of a block
<jhass>
hm, no
<acmehandle_>
Never written lisp.
jpstokes has joined #ruby
<hoelzro>
I think you could argue that individual variables in Ruby are not objects
<workmad3>
jhass: lispers would say that the code itself should be part of the data... or in ruby terms, the code should be an object (and I think rubinius exposes a huge amount of that as objects you can manipulate and inspect at runtime)
<sdegutis>
Hmm, this code is getting weird.
Asher has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
<jhass>
acmehandle_: you might approach this from the wrong side, recognizing concepts you already know from other languages while learning a new one and then skipping ahead is good, but don't try to learn it by listing all concepts you know and trying to map them to the new language
<acmehandle_>
for example, in python types are objects. A string would have its own set of functions available to manipulate the string.
<workmad3>
acmehandle_: I'm not aware of people saying ruby isn't object-oriented... I'm aware of people saying *python* isn't object-oriented, and with a variety of, IMO, good reasons (starting with the complete lack of an implicit 'self' or 'this' concept inside methods)
<acmehandle_>
I agree jhass, I am trying to tread carefully here.
<acmehandle_>
so is a = String legal? Or should it be only a = "String" ?
Sc0rp10n has quit [Remote host closed the connection]
banister has joined #ruby
anarang has quit [Quit: Leaving]
<jhass>
we just showed you that it's legal
<workmad3>
acmehandle_: both
<acmehandle_>
Just wanted to confirm I didnt miss something.
<jhass>
String is just a constant pointing to a instance of Class
<workmad3>
acmehandle_: a = String; <-- that assigns the class String to the variable a, a = "String" <-- that assigns an instance of String to the variable a
mikesplain has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<workmad3>
acmehandle_: >> sends some ruby code to eval-in, which runs it and gives you back the result ;)
Spami has quit [Quit: This computer has gone to sleep]
<workmad3>
acmehandle_: so when we do '>> a = String' and eval-in comes back without errors, it's showing legal, working code ;)
IceDragon has quit [Ping timeout: 252 seconds]
IceDragon has joined #ruby
niharvey|call is now known as niharvey
<acmehandle_>
eval-in: a = "String"
yfeldblum has quit [Ping timeout: 265 seconds]
aspires has joined #ruby
<acmehandle_>
Not sure what that meant. Ok. Thank you. This is something to chew on.
subraminion has quit [Ping timeout: 260 seconds]
<apipkin>
(bare with my n00bness here :) ) I have nested hashes like https://gist.github.com/apipkin/601cbaa9654d9f6a849e where the inner hash for each is the same structure. I want to get the inner hash of any of the element so I can iterate over the inner to build out the UI. In javascript I would do it like http://jsbin.com/pibeyofe/2/edit
<workmad3>
acmehandle_: it would help if you used valid classes and ruby syntax ;)
<jhass>
acmehandle_: please use irb or yet better pry for testing stuff, eval-in is only for demonstration purposes
weems has quit [Read error: Connection reset by peer]
<acmehandle_>
Got it. Ok thanks
hpoydar has joined #ruby
weems has joined #ruby
jobewan has joined #ruby
<apipkin>
jhass: and that would only do one of the outter hashes?
mijicd has quit [Remote host closed the connection]
<jhass>
apipkin: no that would iterate through all hashes
andrewlio has quit [Quit: Leaving.]
treehug88 has quit [Ping timeout: 240 seconds]
<jhass>
you can as well skip the second each and use inner_hash[key]
Gil_ has joined #ruby
JBreit has left #ruby ["Leaving"]
Hanmac1 has quit [Ping timeout: 260 seconds]
djbkd has quit [Remote host closed the connection]
<apipkin>
jhass: yeah i’m just wanting one of the inner hashes. It doesn’t matter which one, but the keys aren’t constant so that’s where I’m getting stuck
Hobogrammer has quit [Ping timeout: 245 seconds]
troyready has quit [Quit: Leaving]
binaryhat has joined #ruby
<jhass>
well then just pick the first one: hash.values.first
djbkd has joined #ruby
<jhass>
or for a random one hash.values.sample
phansch has quit [Quit: WeeChat 0.4.3]
hpoydar has quit [Remote host closed the connection]
<apipkin>
ah! I hadn’t seen those options yet :)
Xeago has quit [Read error: Connection reset by peer]
nanoyak has quit [Quit: Computer has gone to sleep.]
Xeago has joined #ruby
<apipkin>
jhass: that’s perfect :) thank you so much!
saarinen has joined #ruby
saarinen has quit [Client Quit]
deric_skibotn has joined #ruby
hpoydar has joined #ruby
hpoydar has quit [Remote host closed the connection]
hpoydar has joined #ruby
djbkd has quit [Remote host closed the connection]
momomomomo has joined #ruby
ascarter has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
klaut has quit [Remote host closed the connection]
Eiam has joined #ruby
saarinen has joined #ruby
chipotle has joined #ruby
JasmeetQA has quit [Read error: Connection reset by peer]
alem0lars has quit [Quit: Going AFK...]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
wallerdev has quit [Quit: wallerdev]
dilated_dinosaur has quit [Ping timeout: 260 seconds]
andrewjanssen has quit [Quit: Leaving...]
<cocotton>
With the optparse lib, is there a way to specify we are waiting for a string with spaces in it, so users would not have a add quotes when using the flag?
Hanmac has joined #ruby
mduk has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Spami has joined #ruby
<xybre>
"waiting"?
iliketurtles has joined #ruby
timonv has quit [Remote host closed the connection]
djbkd has joined #ruby
andrewjanssen has joined #ruby
sdouglas has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
<cocotton>
just a way of saying that when you call the script with the flag -x, this last one should receive "a string with spaces in it", so that it just doesn't take the first word as input
Hobogrammer has joined #ruby
<mduk>
hi, i'm pretty new to ruby so please forgive my ignorance, but i'm running into a little difficulty with Thor and manipulating an argument to my command. eg: def mycommand( myparam ). what I want to do is myparam.downcase! but it's moaning that myparam is "frozen". what does that mean and how do i reheat it? thanks! :)
blizzow has joined #ruby
<blizzow>
Anyone here have suggestions on updating ruby definitions once ruby-build and rbenv have been installed via apt-get on an ubuntu system?
<xybre>
ccooke: Oh, like the "--" a lot of commands have?
lkba has joined #ruby
<ccooke>
xybre: too many cs :-)
DouweM has quit [Ping timeout: 245 seconds]
<jhass>
mduk: frozen means that you can't modify the object anymore, just do the non-mutating version: myparam = myparam.downcase
binaryhat has quit [Quit: Leaving]
silkfox has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 276 seconds]
<mduk>
jhass, ok will do. so thor arguments are just plain'old immutable. wasn't sure if i was missing something dumb. thanks! :)
<cocotton>
xybre: I guess this could be it! Really new to the ruby world. What I'd like to do is to pass in a date like ruby myScript.rb -d 2014-06-09 12:56:00.000
<xybre>
Oh, sorry, cocotton :D
hpoydar has quit [Remote host closed the connection]
<apeiros>
cocotton: quote your argument
<xybre>
ccooke: Yep I blured the two together :D
<cocotton>
apeiros: Is there a way not to be force to quote the argument? Feels a bit dirty to me
<cocotton>
xybre: haha np!
<apeiros>
cocotton: that's more related to how shells and shell arguments work than ruby
<xybre>
cocotton: You can jsut grab the next 2 or more args after that, but you'd do it manually, I don't think optparse supports it.
<apeiros>
cocotton: it's the proper way. or provide the date without a space (e.g. iso8601 style with a T)
<apeiros>
xybre: ew
<apeiros>
violate expectations by working differently than all other shell tools?
<xybre>
cocotton: The "splitting" of the arguments and parsing of them is handled by the shell so Ruby never gets the raw string (I just had to check).
<cocotton>
apeiros: oh ok ok nice, thx :)
hpoydar has joined #ruby
<apeiros>
seriously, if anything is dirty - and not just a bit - then it's custom arg handling.
danshultz has quit [Ping timeout: 260 seconds]
<cocotton>
apeiros: with quotes it's going to be then ;)
djbkd has joined #ruby
i_s has joined #ruby
<xybre>
apeiros: Like I said above I was expecting "--" to end the sequence of normal stuff. -d taking two args does seem strange. Typically you'd put a comma between them.
chipotle has quit [Quit: cya]
<xybre>
(or in quotes, of course)
benzrf|offline is now known as benzrf
<apeiros>
xybre: if it was considered 2 arguments, yes. but in this case, it's supposed to be one
TheCuban has joined #ruby
frem_ has joined #ruby
<apeiros>
xybre: alternative to , is multiple flags, like with ruby's -I or -r
djbkd has quit [Remote host closed the connection]
cocotton has quit [Remote host closed the connection]
zigomir has quit [Remote host closed the connection]
danijoo has joined #ruby
gruz0[russia] has joined #ruby
<xybre>
apeiros: Yeah I sorta glossed over the actual use case, that was my bad. I was imagining a different one when I made my suggestion.
sambao21 has joined #ruby
sambao21 has quit [Client Quit]
tkuchiki has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 260 seconds]
silkfox has joined #ruby
wallerdev has joined #ruby
dilated_dinosaur has joined #ruby
sk87 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
GriffinHeart has quit [Remote host closed the connection]
<Hanmac>
ping havenwood ;P are you feeling like in Episode 42 where the alien does burn everyone too because of the outdoor temperature? ;P
oo_ has quit [Remote host closed the connection]
silkfox has quit [Ping timeout: 252 seconds]
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
nyamx2 has joined #ruby
forcefsck has quit [Ping timeout: 240 seconds]
<havenwood>
maybe
jkline has joined #ruby
jkline has quit [Client Quit]
sputnik13 has joined #ruby
<sdegutis>
Hmm, turns out I actually want instances and inheritance, so that state will be reset with each new instance, and inherited methods will have the new state.
<sdegutis>
Weird.
starfox_21 has joined #ruby
<sdegutis>
Hoorah for mutable state.
sambao21 has joined #ruby
nyamx2 has quit [Ping timeout: 265 seconds]
b1205 has joined #ruby
rdark has quit [Quit: leaving]
michaelchum has joined #ruby
goleldar has joined #ruby
tessi_zz is now known as tessi
baroquebobcat has joined #ruby
dangerou_ has quit [Read error: Connection reset by peer]
nanoyak has joined #ruby
lkba has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
dangerousdave has joined #ruby
goleldar has quit [Client Quit]
yfeldblu_ has joined #ruby
<sdegutis>
Ahh, I can pass the helper (of a new instance) to the lambda.
bmurt has joined #ruby
gregf has quit [Quit: WeeChat 0.4.3]
ixti has quit [Quit: WeeChat 0.4.3]
m8 has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
yfeldblu_ has quit [Ping timeout: 240 seconds]
dels has quit [Quit: Leaving.]
wald0 has joined #ruby
morinap has quit [Quit: late]
<sdegutis>
Phew!
<havenwood>
stabby stab stab ->{}
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<shevy>
<-{}
<shevy>
counter-stab
_justin has quit [Quit: _justin]
djbkd has joined #ruby
sputnik13 has joined #ruby
sputnik13 has quit [Max SendQ exceeded]
jhulten has quit [Remote host closed the connection]
sputnik13 has joined #ruby
morinap has joined #ruby
pietr0 has joined #ruby
postmodern has joined #ruby
silkfox has joined #ruby
krz has quit [Quit: WeeChat 0.4.3]
zigomir has joined #ruby
mityaz has joined #ruby
gregf has joined #ruby
sdouglas has joined #ruby
RaCx has joined #ruby
dawkirst has quit [Remote host closed the connection]
happytux has joined #ruby
<happytux>
hi
gattuso has quit [Ping timeout: 260 seconds]
<happytux>
I got a Rake related question, although I find it very ruby.
<shevy>
when it comes to the ruby readline module, how can I respond to tab-press events only IF the user has a leading proper word correct? for instance
<shevy>
I have a dictionary for english and I wish to allow this:
<happytux>
command << '--config.strict_ssl=false' if ENV.CI
<happytux>
system(*command)
* happytux
thinks that three lines are still OK to be pasted directly in IRC
<jhass>
happytux: of course! never use ; in your code, that's just for brevity here
gattuso has joined #ruby
Arkaniad has joined #ruby
mordof has joined #ruby
<happytux>
jhass: ah, ok! thank you very much
<mordof>
I'm trying to convert a Date to a DateTime in Ruby - under rails i would use Date.current.in_time_zone, but Ruby doesn't have this method. is there a different way to go about doing that in Ruby?
hpoydar has quit [Remote host closed the connection]
<mordof>
Note: I need the time zone awareness
<jhass>
isn't there to_datetime?
<mordof>
there's a to_time
<mordof>
which isn't time zone aware
<mordof>
puts it to the wrong zone
<benzrf>
the world sucks
<benzrf>
timezones suck
ndrei has joined #ruby
<mordof>
yes.. yes they do
<benzrf>
lets make a new world where we dont need em
<benzrf>
lets make a planet with 256-day years and 32-day months
<benzrf>
and no leap nonsense
wald0 has joined #ruby
<jhass>
benzrf: you could just switch our calendar system to base 12
hpoydar has joined #ruby
sungai_keruh has joined #ruby
TheCuban has left #ruby [#ruby]
<brandonblack>
I've never understood why so many people struggly with time zones
<brandonblack>
its really pretty simple
luisjose has joined #ruby
<brandonblack>
utc always on the back end, deal with tz on in the UI/application layer
Hanmac has joined #ruby
<brandonblack>
DateTime.parse(utc) in ruby
<brandonblack>
and Date.new(utc) in javascript
<mordof>
brandonblack: first time working with time zones in a larger application.. and this is a situation where the database was storing dates, not datetimes
<brandonblack>
never store a localized time
<mordof>
brandonblack: so the conversion broke some logic on date where clauses
<happytux>
jhass: I try to grasp what your code does. So the '<<' in [...]command <<[...] is a STDOUT operator like in C(++)?
<brandonblack>
mordof: gotcha.
newUser1234 has quit [Remote host closed the connection]
<jhass>
happytux: << is the ruby operator for "appending"
<mordof>
brandonblack: to fix the from - to, i'm just doing (date + 1).to_datetime - 1
sdouglas has quit [Remote host closed the connection]
<mordof>
then the <= will work
strax has quit [Quit: Connection closed for inactivity]
<jhass>
happytux: you're missing the splat part, it's system(*command)
<sdegutis>
This is dumb.
Tricon has joined #ruby
ambient has quit [Quit: Page closed]
AlexRussia has quit [Excess Flood]
Blaguvest has quit [Read error: Connection reset by peer]
jottr has joined #ruby
nhhagen has joined #ruby
nhhagen has quit [Remote host closed the connection]
AlexRussia has joined #ruby
dawkirst has quit [Ping timeout: 245 seconds]
<sdegutis>
man, cleaning my code up is making such a mess of my code
pushpak has joined #ruby
GriffinHeart has joined #ruby
B1n4r10 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 245 seconds]
newUser1_ has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
stantona has quit [Remote host closed the connection]
newUser1234 has joined #ruby
AlexRussia has quit [Client Quit]
troyready has joined #ruby
naw has quit [Remote host closed the connection]
nhhagen has joined #ruby
naw has joined #ruby
<shevy>
lol
<shevy>
you are funny sdegutis
alem0lars has quit [Quit: alem0lars]
<shevy>
but you may end up like me
GriffinHeart has quit [Ping timeout: 245 seconds]
<shevy>
and never use -> again
<sdegutis>
i am already using "def cmd.run()" instead
mania has joined #ruby
<Hanmac>
i always know that this stabby lambdas are backstabbing me one day ;P
<shevy>
you seem to like ()
<jhass>
ew, empty parens in a method def
<shevy>
Hanmac do you use -> ?
nhhagen has quit [Client Quit]
<Hanmac>
shevy: nope, i call them brutus lambdas ;P
moritzschaefer has joined #ruby
<sdegutis>
I wish Ruby did more lexical scoping and less dynamic scoping.
alem0lars has joined #ruby
<Hanmac>
because of the backstabbing ... and the syntax "->()" already looks like backstabbing ...
reset has joined #ruby
<shevy>
you make it sound as if you could have the same feature support in both situations sdegutis
<shevy>
Hanmac yeah it's an operator for thieves and assassins
<shevy>
in other words, honourless low-life scum
shadoi has joined #ruby
gtc has quit [Remote host closed the connection]
<Hanmac>
shevy depends in some Fantasy books of Terry Pratchett assassins have a high moral code compared to simple killers ... like they dont kill someone if they not get paid for that
<shevy>
Terry Pratchett is a pirate.
<crome>
yarrrr
<mania>
Guys, quick question: Will "select * from Table where col1 = 'desiredvalue' order by RAND() limit 1" become "Table.first(col1: 'desiredvalue').order(Sequel.lit('RAND()'))" in Sequel? I know that using RAND() isn't recommended. But this is a very small table with < 50 rows
andrewjanssen has quit [Quit: Leaving...]
iamvery has joined #ruby
AlexRussia has joined #ruby
Photism has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
testcore has joined #ruby
RyanV has quit [Quit: Computer has gone to sleep.]
<jhass>
mania: easy enough to try out, isn't it?
<mania>
I was interested in whether I'm understanding it correctly. I'm new to Sequel .. so still not confident
gtc has joined #ruby
<mania>
Even if it works, I won't know if this is the right way to do this :)
beef-wellington has joined #ruby
dawkirst has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
jimbauds has quit [Ping timeout: 252 seconds]
<jhass>
not sure if you need the Sequel.lit in the order clause, but looks fine to me
silkfox has quit [Read error: Connection reset by peer]
<mania>
ok. thank you!
<sdegutis>
Indecision paralysis.
bradhe has joined #ruby
djbkd has quit [Remote host closed the connection]
blizzow has quit [Ping timeout: 260 seconds]
Xeago has joined #ruby
dpp has joined #ruby
akonny has quit [Quit: akonny]
Gil_ has quit [Remote host closed the connection]
shvelo has joined #ruby
revoohc has joined #ruby
b1205 has quit [Ping timeout: 260 seconds]
jezen has joined #ruby
<shvelo>
hi shevy
sambao21 has quit [Quit: Computer has gone to sleep.]
terrell_t has quit [Remote host closed the connection]
yfeldblum has joined #ruby
Mon_Ouie has joined #ruby
terrellt has quit [Ping timeout: 240 seconds]
Xeago has quit [Read error: Connection reset by peer]
dawkirst has quit [Quit: Leaving...]
<sdegutis>
current status: writing clojure-like code in ruby
failshell has joined #ruby
robertodecurnex has joined #ruby
thrownaway has quit [Ping timeout: 240 seconds]
mark_locklear has quit [Ping timeout: 265 seconds]
shvelo has quit [Ping timeout: 276 seconds]
jezen has joined #ruby
zonetti has quit [Ping timeout: 252 seconds]
carraroj has quit [Quit: Konversation terminated!]
mikepack has joined #ruby
Xeago has joined #ruby
<jezen>
I’m trying to run `rake db:reset` from a .rb file. I’m already doing `require "rake"; load "Rakefile"; Rake::Task[:db:reset].invoke`, but predictably, Ruby is confused by the colon in the symbol. How can I work around this?
andrewjanssen has joined #ruby
ffranz has quit [Ping timeout: 252 seconds]
JBreit has left #ruby ["Leaving"]
<jhass>
pass a string
mark_locklear has joined #ruby
<jhass>
but for reference you'd be able to write :'db:reset'
stantona has joined #ruby
toastynerd has quit [Remote host closed the connection]
zonetti has joined #ruby
<sdegutis>
ruby does not make it easy to test my code
FifthWall has quit [Ping timeout: 252 seconds]
<jezen>
jhass: Thanks!
alem0lars has quit [Ping timeout: 265 seconds]
blizzow has joined #ruby
mikepack has quit [Ping timeout: 260 seconds]
andrewhl has joined #ruby
acmehandle_ has quit [Ping timeout: 252 seconds]
alem0lars has joined #ruby
benzrf is now known as benzrf|offline
i_s has quit [Read error: Connection reset by peer]
terrellt has joined #ruby
i_s has joined #ruby
professor_soap has joined #ruby
<professor_soap>
hello :)
shtirlic has quit [Ping timeout: 240 seconds]
FifthWall has joined #ruby
professor_soap has left #ruby [#ruby]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shtirlic has joined #ruby
Davey has quit [Max SendQ exceeded]
Sawbones has joined #ruby
RaCx has quit [Quit: Computer has gone to sleep.]
wald0 has quit [Quit: Lost terminal]
b1205 has joined #ruby
Gil_ has joined #ruby
Davey has joined #ruby
jezen has quit []
Martxel has joined #ruby
mikepack has joined #ruby
Rahul_Roy has quit [Quit: Connection closed for inactivity]
Bosox20051 has quit [Read error: Connection reset by peer]
ruralhack has joined #ruby
rm_ has quit []
pontiki has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
aspires has quit []
jerius has joined #ruby
sdouglas has quit [Remote host closed the connection]
sambao21 has joined #ruby
cearls has joined #ruby
sungai_keruh has quit [Quit: Leaving]
SCommette has quit [Quit: SCommette]
relix has joined #ruby
benzrf|offline is now known as benzrf
Nilium has joined #ruby
RaCx has joined #ruby
gruz0[russia] has quit [Quit: This computer has gone to sleep]
Burgestrand_ has joined #ruby
djbkd has joined #ruby
benzrf is now known as benzrf|offline
horrror has quit [Quit: horrror]
ascarter has joined #ruby
TheComrade has joined #ruby
moritzschaefer has quit [Ping timeout: 276 seconds]
<TheComrade>
Strange days. I have a conditional like: if !(File.exists f && File.size(f) == ...). f does not exist, but the short circuiting isn't ... short circuiting, and I get an exception thrown on File.size (file does not exist). Can someone explain this behavior?
shvelo has joined #ruby
horrror has joined #ruby
horrror has quit [Client Quit]
bradhe has joined #ruby
<hoelzro>
are you sure it's not parsing as File.exists(f && File.size(f))?
<hoelzro>
try File.exists(f) rather than File.exists f
BizarreCake has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
Ankhers has quit [Ping timeout: 264 seconds]
<jhass>
TheComrade: also unless you got an elsif use unless over if !(..)
robert_ has joined #ruby
<TheComrade>
jhass, yeah, will do, just for debugging purposes... I have added a variety of parentheses with no joy yet.
djbkd has quit [Remote host closed the connection]
<Mon_Ouie>
(The problem is you can't do something like that in a gempsec if that's what you mean)
shadoi has joined #ruby
Kricir has joined #ruby
Bouncer0 has quit [Quit: Wychodzi]
oo_ has quit [Ping timeout: 240 seconds]
elaptics is now known as elaptics`away
frem_ has joined #ruby
justin_pdx has quit [Quit: justin_pdx]
SCommette has joined #ruby
Notte_ has quit [Remote host closed the connection]
stef1a has joined #ruby
<stef1a>
how do i open a file, iterate over each line, and perform a regex sub on matching lines? with what i currently have ( http://pastie.org/pastes/9274849/text ), the output file is the same name as the original, but the contents are empty
treehug88 has joined #ruby
<happytux>
jhass: Why do I have to use a '*' in `system(*command)` ? Some kind of reference/pointer?
terrellt has quit [Remote host closed the connection]
mikesplain has quit [Ping timeout: 276 seconds]
terrellt has joined #ruby
<jhass>
happytux: it's a splat, it takes an array and passes its elements as individual arguments
oo_ has joined #ruby
mikesplain has joined #ruby
djbkd has quit [Remote host closed the connection]
jimbow has quit [Quit: jimbow]
djbkd has joined #ruby
terrell_t has joined #ruby
DouweM has joined #ruby
momomomomo has quit [Read error: Connection reset by peer]
jprovazn_afk is now known as jprovazn
momomomomo has joined #ruby
<Mon_Ouie>
stef1a: Modifying a file in-place like that is not so easy because the cursor is moved as you're reading and as you're writing. Really the simplest way is to write to a temporary file and then rename the temporary file to the input.
terrellt has quit [Read error: Connection reset by peer]
<Mon_Ouie>
(in your case you may be able to get away without it because your output is always going to be smaller than your input… but I wouldn't bother)
<sdegutis>
trying to use ruby without using classes is a recipe for disaster :(
sdegutis has left #ruby [#ruby]
newUser__ has quit [Remote host closed the connection]
oo__ has joined #ruby
<toretore>
stef1a: you can read one line at a time from the input file and write one line at a time to the output file
digifiv5e has joined #ruby
oo_ has quit [Ping timeout: 276 seconds]
digifiv5e is now known as Guest47880
sinkensabe has joined #ruby
<jheg>
what is the purpose of .collect if .map does the same thing?
<toretore>
it's an alias
<toretore>
its purpose is the same
GriffinHeart has joined #ruby
stantona_ has quit [Remote host closed the connection]
<jheg>
yeah but whats the point if they do the same thing?
Hanmac1 has joined #ruby
<jheg>
which came first?
stantona has joined #ruby
<toretore>
what is the purpose of map if collect does the same thing?
<toretore>
does it matter?
<DouweM>
jheg: "the point" is that these are both common names for the same practice, so we have both names so people can use whichever they prefer
<jheg>
yep
<toretore>
no, it doesn't
<happytux>
jhass: so if I don't use the splat 'operator', the array would be passed to first argument and then the method will fail
<happytux>
ah
oo_ has joined #ruby
<Mon_Ouie>
It's not like one really came first, they came from different languages. map from functional programming languages, collect from Smalltalk.
<DouweM>
jheg: "which cames first" matters very little. the only thing that *may* matter is which is more popular/common in open source Ruby code. In that case, probably #map
<jheg>
toretore: I'm just trying to understand the language
<stef1a>
so what do i do if i want to iterate over the lines in a file multiple times and perform multiple substitutions? should i just store the entire file (not very large) in a string and iterate over that repeatedly, performing the necessary substitutions? that seems like it would be easier
Burgestrand_ has quit [Quit: Burgestrand_]
<jhass>
just do the substitutions in one loop?
<Mon_Ouie>
You can very easily write line by line in a temporary file
<stef1a>
but the latter substitutions rely on the former
aspires has quit []
sdouglas has joined #ruby
<jhass>
so?
<stef1a>
so how can i do all of them at once
Bira has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
xaxisx has joined #ruby
<lemur>
regex capture groups, learn them
<jhass>
each_line do |line| line.gsub(...); line.gsub(...); ... end
jrhorn424 is now known as zz_jrhorn424
<jhass>
er, gsub!
<stef1a>
oh... duh...
paulfm has quit []
jprovazn has quit [Quit: Odcházím]
ascarter has joined #ruby
<stef1a>
thanks jhass
oo_ has joined #ruby
<lemur>
line.gsub().gsub()
<lemur>
chain
cvitullo has joined #ruby
cvitullo has quit [Remote host closed the connection]
<lemur>
or make sure to learn regex more in depth and get rid of multiple method calls.
akonny has quit [Quit: akonny]
Xeago_ has quit [Remote host closed the connection]
codecop has quit [Remote host closed the connection]
<jhass>
you may even be able to omit the to_a
moritzschaefer has quit [Ping timeout: 265 seconds]
mercwithamouth has quit [Ping timeout: 276 seconds]
<jheg>
is to_a to array?
<jhass>
yes
<jheg>
cool thanks
failshell has quit []
luisjose has joined #ruby
kirun has quit [Quit: Client exiting]
nyamx2 has joined #ruby
<jheg>
with the vast amount of methods do you often find yourself writing your own methods to only discover later down the line that it already existed?
Dreamer3 has joined #ruby
<Dreamer3>
does rdoc document all constants? evey those i just reference in passing?
<Dreamer3>
Library.test causes a file to be generated for Library, is that a way to turn that off or tweak it?
rezzack has joined #ruby
NukePuppy has quit [Ping timeout: 240 seconds]
oo__ has quit [Ping timeout: 260 seconds]
<DouweM>
jheg: always google or search the docs before writing something you're sure someone else has ran into before
lemur has quit [Remote host closed the connection]
Zenigor has joined #ruby
dEPy has joined #ruby
<benzrf>
my brain is full of haskell
<benzrf>
yall should go fill up ur brains with haskell
<DouweM>
benzrf: heresy!
<DouweM>
benzrf: also, yo
sdouglas has quit [Remote host closed the connection]
<benzrf>
y-yo
ldnunes has quit [Quit: Leaving]
<jheg>
DouweM: sure will
nyamx2 has quit [Ping timeout: 240 seconds]
Sawbones has quit [Remote host closed the connection]
RaCx has quit [Quit: Computer has gone to sleep.]
jxf has quit [Quit: Leaving]
mordof has quit [Ping timeout: 245 seconds]
RaCx has joined #ruby
RaCx has quit [Client Quit]
mordof_work has joined #ruby
b1205 has quit [Ping timeout: 265 seconds]
iamvery has left #ruby ["Leaving..."]
Atttwww has joined #ruby
<RubyPanther>
my brain is full of interfaces, and data relationships
<ruralhack>
moving life cpu <alphabetic technology> binary cells
RaCx has joined #ruby
<JokesOnYou77>
Hi all. I'm trying to make a file post using multipart-post and I'm getting a routing error: /http.rb:879:in `initialize': getaddrinfo: Name or service not known (SocketError) I'm pretty sure this is a result of my inexperience with uri and how to structure the parameters but nothing I try is working
jottr_ has joined #ruby
terrellt has quit [Remote host closed the connection]
<shevy>
ruralhack why should anyone click on that considering that you are not using ruby?
stantona has joined #ruby
sdouglas_ has joined #ruby
weems has quit [Read error: Connection reset by peer]
<ruralhack>
i think with objects transcending my body like ruby demands. women who know ruby know easily how to keep their baby's music instead of notation.
jottr has quit [Ping timeout: 260 seconds]
<Boohbah>
bot alert
<ruralhack>
postpartum depression history
terrellt has joined #ruby
<ruralhack>
women get him, he forgot the shifts ruby presents. we felt them as children.
<ruralhack>
matz did something beautiful and no one knows.
<shevy>
ruralhack you are so lame
hpoydar has quit [Remote host closed the connection]
BlakeRG has joined #ruby
combusean has joined #ruby
combusean has quit [Remote host closed the connection]
combusean has joined #ruby
combusean has quit [Remote host closed the connection]
oorst has quit [Quit: oorst]
Olipro has joined #ruby
jobewan has quit [Quit: Leaving]
<ericwood>
what is happening
lemur has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
terrellt has quit [Ping timeout: 245 seconds]
Gil_ has joined #ruby
katmandoo has joined #ruby
<ruralhack>
use of language not transcending your body will get you put in an asylum soon shenk. I'm not worthy of presenting to the only community worthy of changing the world yet, the ruby community, please don't burn me at the stake.
Hanmac1 has quit [Ping timeout: 252 seconds]
treehug8_ has quit []
chipotle has quit [Quit: cya]
linuxnewb2 has joined #ruby
<shevy>
ruralhack you don't deserve a good death anyway
newUser1234 has joined #ruby
bradhe has joined #ruby
oo_ has joined #ruby
<ruralhack>
#DufusHunter an algorithm scraping the internet exposing DarkAgers for the children by the language they use. you will be listed in a database until you prove you think from the TechAge of two classes of time. until then you are las vegas shooter.
Bira has joined #ruby
<xybre>
Markov chains are fun, eh?
<wallerdev>
what is going on
<ruralhack>
kik
<ruralhack>
lol
terrellt has joined #ruby
<ruralhack>
i'm leaving before i get burned at the stake by a man before i can present to the woman of ruby. love you friend!
BlakeRG has quit []
ruralhack has left #ruby ["Leaving"]
tyfighter has joined #ruby
Gil_ has quit [Ping timeout: 260 seconds]
RaCx has quit [Quit: Computer has gone to sleep.]
<xybre>
wat
ruralhack has joined #ruby
northfurr has joined #ruby
byteoverfl0w has quit [Quit: Leaving... have a good one...]
sambao21 has quit [Quit: Computer has gone to sleep.]
<ruralhack>
bye now
Hanmac has joined #ruby
ruralhack has left #ruby ["Leaving"]
northfurr has quit [Client Quit]
mercerist has quit [Quit: Computer has gone to sleep.]
oo_ has quit [Ping timeout: 276 seconds]
bradhe has quit [Ping timeout: 276 seconds]
tyfighter has quit [Ping timeout: 260 seconds]
olivier_bK has joined #ruby
mary5030 has joined #ruby
linojon has quit [Quit: linojon]
newUser1234 has quit [Ping timeout: 260 seconds]
baroquebobcat has joined #ruby
thesheff17 has quit [Quit: Leaving]
thesheff17 has joined #ruby
saarinen has joined #ruby
northfurr has joined #ruby
northfurr has quit [Client Quit]
Bira has quit [Remote host closed the connection]
djbkd has joined #ruby
hermanmunster has quit [Remote host closed the connection]
<JokesOnYou77>
I'm trying to make a file post using multipart-post and I'm getting a routing error: /http.rb:879:in `initialize': getaddrinfo: Name or service not known (SocketError) I'm pretty sure this is a result of my inexperience with uri and how to structure the parameters but nothing I try is working
hermanmunster has joined #ruby
_djbkd has joined #ruby
jespada has quit [Quit: Leaving]
freerobby has joined #ruby
djbkd has quit [Remote host closed the connection]
lmickh has quit [Remote host closed the connection]
jxf has joined #ruby
ixti has joined #ruby
hermanmunster has quit [Ping timeout: 265 seconds]
jailbot has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
hpoydar has joined #ruby
centrx has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdouglas_ has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
sdouglas has joined #ruby
combusean has joined #ruby
<timgauthier>
woah so much typing!
freezey has quit [Remote host closed the connection]
<Nilium>
Sometimes I can't tell if people working on MRI intentionally write the ugliest C known to man or if they're just stuck in academic-code-is-crap land and don't know how to get out.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tyfighter has joined #ruby
<Nilium>
Though apparently terrifying code is a Japanese thing, so that might be it.
<timgauthier>
mri?
<combusean>
matz's ruby interpreter
<timgauthier>
ah is it in C?
<Nilium>
Yes.
<Nilium>
Yes.
FDj has joined #ruby
b1205 has quit [Ping timeout: 245 seconds]
Steve21 has quit [Quit: Steve21]
<Nilium>
Not sure how much of MRI remains in YARV, though, so I just refer to pre- and post-YARV-MRI as MRI.
benlieb has joined #ruby
<Nilium>
Either way, a lot of the code comes across as almost nightmarish
Kricir has joined #ruby
sdouglas has quit [Ping timeout: 240 seconds]
sdouglas has joined #ruby
jottr_ has quit [Ping timeout: 252 seconds]
dopie has quit [Quit: Leaving]
dangerousdave has quit [Ping timeout: 265 seconds]
aantix has joined #ruby
andrewjanssen has joined #ruby
tyfighter has quit [Ping timeout: 276 seconds]
predator217 has joined #ruby
<centrx>
Nilium, How so?
clov3r has joined #ruby
<Nilium>
Best example I can think of is probably ruby.h -- everything is abbreviated, there's little in the way of documentation, and trying to find anything in it is kind of a huge pain in the ass.
<Nilium>
It's just ugly code.
b1205 has joined #ruby
zigomir has quit [Remote host closed the connection]
MrDoctor has joined #ruby
<Nilium>
A lot of stuff also comes across as fairly macro-heavy, but I'm not sure how consistent that is.
predator117 has quit [Ping timeout: 252 seconds]
<MrDoctor>
I wish to share a @var in two different methods defined in a controller
<MrDoctor>
How can I achieve that
ahofmann has joined #ruby
<MrDoctor>
I tried before_filter to define a @var for both methods
<MrDoctor>
But the value of @var is different in the scope of both methods
<combusean>
MrDoctor: i would try #rubyonrails
<Nilium>
I think you need to ask in a Rails room
<MrDoctor>
Okay combusean, Nilium
<MrDoctor>
Thanks
<centrx>
Interesting
charliesome has joined #ruby
SCommette has quit [Quit: SCommette]
saarinen has quit [Quit: saarinen]
tessi is now known as tessi_zz
mary5030 has quit [Remote host closed the connection]
onewheelskyward has joined #ruby
Mattx has quit [Ping timeout: 276 seconds]
SCommette has joined #ruby
seitensei has joined #ruby
baroquebobcat has quit [Ping timeout: 245 seconds]
toastynerd has quit [Remote host closed the connection]
jheg has quit [Quit: jheg]
mikecmpbll has quit [Quit: ciao.]
kitak has quit [Remote host closed the connection]
sdouglas has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
Avahey_ has joined #ruby
mary5030 has quit [Ping timeout: 252 seconds]
bradhe has joined #ruby
CodeBunny has joined #ruby
Mattx has joined #ruby
Arkaniad has quit [Ping timeout: 276 seconds]
snath has quit [Ping timeout: 260 seconds]
blinkdesign has quit [Remote host closed the connection]
jottr_ has joined #ruby
Gil_ has joined #ruby
bradhe has quit [Ping timeout: 265 seconds]
andrewjanssen has joined #ruby
george2 has joined #ruby
michaelchum has quit [Quit: Connection closed for inactivity]
KLVTZ has joined #ruby
x1337807x has joined #ruby
Vivekananda has joined #ruby
ixti has quit [Quit: WeeChat 0.4.3]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hermanmunster has joined #ruby
Gil_ has quit [Ping timeout: 252 seconds]
axilla has quit [Ping timeout: 260 seconds]
jottr_ has quit [Ping timeout: 265 seconds]
rhys has quit [Read error: Connection reset by peer]
MrDoctor_ has joined #ruby
rhys has joined #ruby
Wolland has quit [Remote host closed the connection]
combusean has quit [Quit: Leaving.]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
Wolland has joined #ruby
MrDoctor has quit [Ping timeout: 240 seconds]
sdouglas_ has joined #ruby
Sawbones has joined #ruby
narcan has joined #ruby
ffranz has quit [Quit: Leaving]
blizzow has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Arkaniad has joined #ruby
Wolland has quit [Ping timeout: 276 seconds]
<JokesOnYou77>
I'm trying to make a file post using multipart-post and I'm getting a routing error: /http.rb:879:in `initialize': getaddrinfo: Name or service not known (SocketError) I'm pretty sure this is a result of my inexperience with uri and how to structure the parameters but nothing I try is working
axilla has joined #ruby
nisstyre has quit [Quit: WeeChat 0.4.3]
frem_ has quit [Ping timeout: 245 seconds]
Lwhite has joined #ruby
nisstyre has joined #ruby
sdouglas_ has quit [Remote host closed the connection]
sdouglas has joined #ruby
HashNuke has joined #ruby
sdouglas has quit [Read error: Connection reset by peer]
sdouglas has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
andrewjanssen has quit [Quit: Leaving...]
Sawbones has quit [Remote host closed the connection]
Sawbones has joined #ruby
andrewjanssen has joined #ruby
lazyguru has quit [Ping timeout: 252 seconds]
ponga has joined #ruby
Bira_ has joined #ruby
lazyguru has joined #ruby
x1337807x has joined #ruby
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]