cody-- has quit [Quit: Computer has gone to sleep.]
<popl>
denysonique: Can you be more specific?
<popl>
denysonique: What isn't working?
<denysonique>
I want to simply pass a method as one of the block params
justsee has quit [Ping timeout: 245 seconds]
<denysonique>
popl: the code is self explanatory
Matadoer has joined #ruby
<Nilium>
The code is not self-explanatory..
<popl>
Ok, maybe someone will look at it.
<ismaelrb>
Nilium sorry. I'm not able to answer that. But if that's the case I'm sure they are looking into it
<Nilium>
ismaelrb: I know they were, just not sure if it was fixed.
<DanielRb>
ismaelrb: do you work for rubymotion or something?
<denysonique>
Nilium: popl: I want |print_string| to become puts in this example
stkowski has quit [Quit: stkowski]
<Nilium>
RubyMotion is one of those things I'd like to license but cannot really justify because I have no actual projects I'd do that would necessitate it
<popl>
denysonique: good luck
<denysonique>
later in my real code I am going to replace puts with another lambda/method
<DanielRb>
hmm Dynamic session lookup supported but failed: launchd did not provide a socket path, verify that org.freedesktop.dbus-session.plist is loaded!
<ismaelrb>
Have a nice day/night everyone :)
<DanielRb>
trying to get gtk3 + gtk3 ruby gem working, 1.9.3
<bnagy>
Nilium: if we can change everything else than absolutely they can stay the same
<Nilium>
Insanity is easy when you're okay with insanity.
<bnagy>
Nilium: yeah that's about what I was thinking :/
<denysonique>
It's the end user that matters, isn't it?
<bnagy>
or I think there's some trick to rebind a block locally
Takehiro has joined #ruby
<bnagy>
denysonique: yeah but I don't actually see how this improves life for the end user
justsee has quit [Ping timeout: 276 seconds]
<bnagy>
like.. where does 'f' come from? wtf does it mean?
<Nilium>
I was thinking just do Object.new.instance_exec and define a method for that instance only, but I'm not sure if I can actually do that with a non-fixed name (meaning def name, since Object doesn't provide define_method)
<denysonique>
it means define_field, I could call that as well
<denysonique>
call it that*
devoldmx has quit [Ping timeout: 245 seconds]
<bnagy>
then why do you even need the fields block?
<popl>
rubber ducky, you're the one
<bnagy>
class Article; define_field 'comments', 'comments.div' ...
<denysonique>
bnagy: but it looks nicer when grouped in a do block
<bnagy>
that at least is easy to implement _and_ makes ( to me ) some sense
<Nilium>
denysonique: My opinion of this is that your design is shite and you need to go back to the drawing board.
DanKnox is now known as DanKnox_away
<DanielRb>
wow, gtk3 is slow
<denysonique>
I want it to be grouped somehow
dEPy has quit [Remote host closed the connection]
ckrailo has quit [Quit: Computer has gone to sleep.]
<Nilium>
Seriously, quit this foolish quest, descend no deeper into madness
<bnagy>
having a block because it 'looks nice' is unsound
BRMatt has quit [Ping timeout: 264 seconds]
pskosinski has quit [Quit: Til rivido Idisti!]
<r0bgleeson>
bnagy: i just remove features until it looks nice
dmiller has quit [Remote host closed the connection]
<bnagy>
denysonique: count the '@' signs
<endash>
denysonique: it doesn't. It defines a method on the singleton which modifies @first_name
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joast has quit [Quit: Leaving.]
<r0bgleeson>
denysonique: it defines a getter and setter on the singleton class of your class, or it defines a setter/getter as class methods that set & read @first_name
seivan has left #ruby [#ruby]
nari has joined #ruby
<wisconsin>
one @ good, two @s bad
S0da has quit [Remote host closed the connection]
<endash>
The key is to remember that classes are themselves instance of the class Class
<denysonique>
endash: thank you
<DylanJ>
wisconsin: the more @'s the better.
<DylanJ>
add some $s to make things better
mikepack has quit [Remote host closed the connection]
<endash>
it's classes all the way down!
<wisconsin>
lies
<r0bgleeson>
class variables (@@) are shared by the class & all instances of that class, so unless you need that you shouldnt use them.
<wisconsin>
it's not possible for Class to be an instance of Class. it must have been created by God.
<endash>
and all superclasses sibling classes
<epitron>
wisconsin: god's name is matz
burlyscudd has joined #ruby
tkuchiki has joined #ruby
<endash>
its a giant mess
v0n has joined #ruby
<denysonique>
you have just debunked atheism/evolutionism
eka has quit [Quit: Computer has gone to sleep.]
wmoxam has joined #ruby
i_s has quit [Remote host closed the connection]
i_s has joined #ruby
<endash>
Class.class.class.class.class.class.class.class => Class
ntus1017_ has quit [Remote host closed the connection]
<endash>
and then Module's class is Class
prathamesh has quit [Changing host]
prathamesh has joined #ruby
superscott[8] has quit [Quit: superscott[8]]
<r0bgleeson>
because its a class
<r0bgleeson>
which is a module
<r0bgleeson>
which is a class
i_s has quit [Read error: Connection reset by peer]
<r0bgleeson>
which is a module
<endash>
now I'm just confusing myself for NO REASON
elvis4526 has joined #ruby
i_s has joined #ruby
<denysonique>
If I want to share/set the same data that is to remain the same among all instances of MyClass, then the best way to do it is to use MyClass.instance_variables in order to save memory unlike if I use @instance_variables
<denysonique>
just to make sure there is no other trap in here, like with @@vars
<elvis4526>
Guys, do you know a tutorial that explain the concept behind the blocks in ruby ? I'm coming from a python background.
<bnagy>
denysonique: don't do it, imho
<bnagy>
when you start storing stuff in classes it's a code smell
<denysonique>
elvis4526: I will explain it to you in a sec
<elvis4526>
denysonique: cool thans
<bnagy>
save us all :(
<r0bgleeson>
lol
<denysonique>
bnagy: you mean @instance_vars all the way?
<endash>
yeah if you're just using it to store stuff, that's bad… if it's an actual attribute of the class in and of itself, that's alright
<bnagy>
elvis4526: a block is a 'closure'
<bnagy>
which means it's a chunk of code that can be passed around, but it remembers all the stuff that was in scope when it was created
<r0bgleeson>
and a closure is a first class function that 'closes over' a scope.
<endash>
which i just remembered i seem to have stolen from a friend
<wisconsin>
metaprogramming sucks
<Boohbah>
wisconsin sucks
<Boohbah>
unless you like cheese
<DanielRb>
so true
<DanielRb>
haha
<denysonique>
bnagy: nice link, thanks
<Boohbah>
and you like to pronounce 'o' like 'a'
<endash>
vermont cheese is better
<endash>
especially the one with bacon in it
Megtastique has joined #ruby
<DanielRb>
haha
<bnagy>
>> (1..3).map {|i| a=4}; p a # <- elvis4526
<eval-in>
bnagy => undefined local variable or method `a' for main:Object (NameError) ... (https://eval.in/39692)
<denysonique>
seriously, why @@ was even invented...
<bnagy>
vars declared in a block are locally scoped
cantonic has quit [Quit: cantonic]
adeponte has quit [Remote host closed the connection]
<wisconsin>
denysonique: matz was just trolling
<Boohbah>
denysonique: i don't know, i just use instance variables in my classes
<bnagy>
and {...} and do ... end are interchangeable
ultimoo has quit [Ping timeout: 240 seconds]
<bnagy>
people have different theories about when to use which one
<endash>
bnagy: expect for precedence
BSaboia has joined #ruby
<elvis4526>
oh okay, i didn't know
<endash>
*except
<elvis4526>
cool
Cooler_ has joined #ruby
thomasle_ has quit [Remote host closed the connection]
ssvo has joined #ruby
<tjbiddle>
Hey guys - I have a string that looks something like mystring = "some/random/garbage" and then I have [""some/random/garbage"].find { |e| /mystring/ =~ e } which is returning nil. If I escape the forward slashes then I'm good, but is there a method to do so in place?
<wisconsin>
i use { } for blocks that produce a value
<Boohbah>
wisconsin: i am never consistent with do ... end or { }
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<endash>
there are some small differences… if you do "myfunc otherfunc {}" the block gets passed to otherfunc, if you do "myfunc otherfunc do end" the block gets passed to myfunc
niklasb has quit [Ping timeout: 245 seconds]
<wisconsin>
myfunc(otherfunc) { }
RichardBaker has joined #ruby
orend has joined #ruby
<wisconsin>
which also works for other expressions
<wisconsin>
myfunc(1 + 1) { }
<bnagy>
tjbiddle: that was for you ( above )
<wisconsin>
myfunc 1 + 1 { } is a syntax error
<endash>
also if you're in the habit of putting spaces in your function calls "before (:each)" {} will barf, do/end won't
<epochwolf>
wisconsin: yo
<wisconsin>
yo to you too
<epochwolf>
wisconsin: I was curious why you're named wisconsin :)
seich- has quit [Ping timeout: 264 seconds]
<tjbiddle>
bnagy: Thanks - Think you misunderstood my question. No worries, I think I just want to use gsub - I was just looking for a more magic ruby solution :-) I want "some/garbage" to be "some\/garbage"
<wisconsin>
curiousity killed the cat
<tjbiddle>
Was hoping I could just do something like mystring.escape! lol
<epochwolf>
wisconsin: thank god I'm a wolf then. Haven't died yet.
<tjbiddle>
(Noticed that wasn't there though)
<bnagy>
tjbiddle: why would you want that?
<tjbiddle>
bnagy - Using the ruby-git library, for some reason it's weird and won't let me checkout a branch like 'release/6.6' I need to pass it 'release\/6.6'
* tjbiddle
shrugs
<tjbiddle>
Worked in IRB when I did that
<bnagy>
there's no reason to escape / except if you're making a regexp out of a string
<bnagy>
and if you're doing that just do Regexp.new
<tjbiddle>
bnagy: I was doing git.branches.find { |e| /branch_im_creating/ =~ e }
saarinen has quit [Quit: saarinen]
<tjbiddle>
I think the '/' in the string is throwing it off (Actually this has nothing to do with the ruby-git library, lol
<tjbiddle>
)
t_p has joined #ruby
<tjbiddle>
Should I be doing Regexp.new(branch_im_creating) ?
<bnagy>
you can use grep instead of find
<bnagy>
it's a lot clearer when you want to select via regex
<tjbiddle>
I'll check into it. Regexp.new is what I wanted though - Thanks for pointing that out :-)
havenwood has joined #ruby
hamakn has quit [Remote host closed the connection]
Asher has joined #ruby
<epochwolf>
r%"regex with/"
tommyvyo has joined #ruby
twoism has quit [Remote host closed the connection]
hakunin has quit [Read error: Connection reset by peer]
hakunin_ has joined #ruby
ehc has quit [Ping timeout: 264 seconds]
robustus has quit [Ping timeout: 245 seconds]
j3sk0la has joined #ruby
i_s has quit [Ping timeout: 264 seconds]
danshultz has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
nkts has joined #ruby
robustus has joined #ruby
j3sk0la has quit [Client Quit]
mootpointer has quit [Ping timeout: 264 seconds]
anonymuse has quit [Remote host closed the connection]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
brennanMKE has joined #ruby
bradsmith has joined #ruby
burlyscudd has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
bean has joined #ruby
<endash>
Pandee: that's the one
<endash>
It's affectionality referred to as "pickaxe"
wmoxam has quit [Ping timeout: 264 seconds]
mootpointer has joined #ruby
BillCriswell has quit [Remote host closed the connection]
julian-delphiki has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
<wisconsin>
endash: why?
<endash>
it is a mystery
mansi_ has quit [Remote host closed the connection]
mansi has joined #ruby
Vivekananda has quit [Ping timeout: 240 seconds]
carlyle has joined #ruby
<bigmac>
how would you start a loop, for each line of a file you will start a new thread and limit the amount of threads to 10
<bigmac>
my way is ugly
<popl>
that sounds ugly anyways. what are you trying to do?
<bigmac>
process 5000 lines of a file
brennanMKE has quit [Ping timeout: 264 seconds]
<bigmac>
my way is to monitor the process list (ugly)
hakunin_ has quit [Remote host closed the connection]
<bigmac>
i have never used thread.list
<bigmac>
ill check that out
<bnagy>
threadpool, queue
<bnagy>
there are many
mansi has quit [Ping timeout: 245 seconds]
burlyscudd has quit [Quit: Leaving.]
Petrochus has joined #ruby
<bnagy>
or just like (1..10).map {|_| Thread.new { loop do; q.pop; #work; } }.map &:join
smathieu_ has joined #ruby
<Petrochus>
bnagy: wouldn't 10.times {...} make more sense?
<bnagy>
unlikely to help you any in MRI though, only jruby etc
<Petrochus>
or am I missing something
<bnagy>
Petrochus: meh, I like map cause I am mapping the array of threads again at the end
<popl>
You could just save the time and get the hammer and hammer your foot directly
<bnagy>
times implies doing something sequentially to me, but I don't have a very strong opinion
<Petrochus>
yeah I sort of see what you're saying
giorni has quit [Remote host closed the connection]
<bnagy>
bigmac: anyway the point is that won't help you at all in MRI, most likely
burlyscudd has joined #ruby
<bigmac>
can i show how many threads are currently running?
<bnagy>
cause if the processing per line is expensive you'll be CPU bound
cyong has quit [Quit: Leaving.]
<bigmac>
thats what i want to avoid
ELLIOTTCABLE has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
<bigmac>
five_thousend_lines.map{|x| Thread.new}
sayan has joined #ruby
jorge has joined #ruby
smathieu_ has quit [Ping timeout: 245 seconds]
<bigmac>
that would cause cpu bound.
<bnagy>
you can use processes instead, there's a gem called parallel, or use jruby rbx etc
<bnagy>
one thread will cause it to be CPU bound
<bnagy>
in MRI
<bigmac>
im sorry but im not sure what is MRI?
<bigmac>
im in irb lol
<bnagy>
'normal' ruby
fuhgeddaboudit has joined #ruby
Megtastique has joined #ruby
mrommelf has joined #ruby
mmitchell has joined #ruby
viszu has quit [Quit: Leaving.]
<bnagy>
if the work per line is more expensive than the work to read a line, which it almost always is, threads are unlikely to help very much unless you have jruby or rubinius or something
ELLIOTTCABLE has joined #ruby
WaRori has joined #ruby
ELLIOTTCABLE has quit [Remote host closed the connection]
<bigmac>
i see
nsuria has joined #ruby
mmitchell has quit [Remote host closed the connection]
jorge has quit [Ping timeout: 264 seconds]
<nsuria>
join #rubyonrails
<bnagy>
shan't
<zendeavor>
don't tell me what to do
<bnagy>
bigmac: also, spinning up Threads is 'expensive'
<bnagy>
so for a threadpool you usually want to have long lived threads that read from a work queue or something
<bigmac>
i have made some mistakes before with threads
_anildigital is now known as anildigital
<popl>
There's a reason there are bad jokes about threads.
<bnagy>
Now you have two problems!You have a problem and think "I'll use threads!"
havenwood has quit [Remote host closed the connection]
<bigmac>
my mind cant process threads lol
<bnagy>
then don't use em
<bigmac>
when i think i have it figured out... my labtop goes zooooooom
<bnagy>
5000 lines is pretty small
noyb has quit [Ping timeout: 264 seconds]
<bigmac>
depends on how long the thread takes
<bigmac>
each thread*
noyb has joined #ruby
<popl>
nah, it's pretty small
rickruby has joined #ruby
<bigmac>
i guess your right
Nanuq has quit [Ping timeout: 245 seconds]
<popl>
wow, I wish I could convince other people that easily.
reset has quit [Quit: Leaving...]
fuhgeddaboudit has quit [Ping timeout: 264 seconds]
<bnagy>
anyway, if you have a truly concurrent and parallel problem and you want to light up all your cores, you need jruby, rbx, or fork()
<Nilium>
I think it's probably easier to start a new process and open an interprocess socket via zeromq. Then you're forced to not be stupid about sharing data between threads.
nadirvar_ has quit [Ping timeout: 245 seconds]
<Nilium>
Bearing in mind that zeromq's not necessary, I just use it for that.
<bigmac>
you guys convince me to find another way
stonevil has joined #ruby
io_syl has quit [Ping timeout: 240 seconds]
_maes_ has joined #ruby
cyong has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
<bigmac>
10.times{|x| if `ps aux | grep irb`.map.size <= 10; puts "start new thread"; end}
freeayu has joined #ruby
<bigmac>
thats my ugly way lol
tjbiddle_ has joined #ruby
prathamesh has quit [Ping timeout: 245 seconds]
radic_ has joined #ruby
<bigmac>
that example is 10 times, should of been 5000.times
<popl>
that's pretty horrible all right
<Nilium>
That's.. horrifying.
stonevil has quit [Ping timeout: 276 seconds]
<bigmac>
i like it
<zendeavor>
diabolical
<bigmac>
,-)
<Nilium>
Why is it N.times in the first place? O_o
* Nilium
is pretty sure he's missing something here
Nanuq has joined #ruby
Takehiro has joined #ruby
* dagnachew
just discovered blocks
tjbiddle has quit [Ping timeout: 240 seconds]
tjbiddle_ is now known as tjbiddle
<dagnachew>
am reading pickaxe book 3rd
danshultz has quit [Remote host closed the connection]
tjbiddle has quit [Client Quit]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
<bnagy>
bigmac: what.. the..
burlyscudd has quit [Quit: Leaving.]
nbouscal has joined #ruby
radic__ has quit [Ping timeout: 264 seconds]
asteve has joined #ruby
iliketurtles has joined #ruby
seich- has quit [Ping timeout: 264 seconds]
prathamesh has joined #ruby
ELLIOTTCABLE has joined #ruby
<Nilium>
Also why grep?
<bigmac>
let me fix it
<bnagy>
jsut stop
<Nilium>
Why not something like %x{ps aux}.split(?\n).select! { |line| line =~ /\birb\b/ }
krz has joined #ruby
krz has quit [Client Quit]
Takehiro has quit [Ping timeout: 240 seconds]
<Nilium>
Granted I still have no idea what the hell you're doing so who knows
<Pandee>
as a beginner to ruby, should i install 2.0 or 1.9?
<Nilium>
2.0
<Pandee>
gracias
<Nilium>
Hardcore 2.0 all the way 4ever yo
cyong has quit [Quit: Leaving.]
<Nilium>
Seriously, though, you're probably going to need both because of how ass backwards some people are about moving onto 2.0
<bigmac>
File.read("uniq_pass.txt").each{|x| if `ps aux | grep irb`.map.size <= 1; puts "start new thread#{x}"; else puts "retry"; retry; end}
<bigmac>
<= 100
<popl>
bigmac: what are you trying to do anyways?
<bigmac>
i give up lol
<WaRori>
Also from what I could tell, there's not a lot of resources outside of the official doc that helps learn 2.0. Could be wrong though.
nathancahill has quit [Quit: nathancahill]
<bigmac>
build a small brute forcer lol
<bnagy>
bigmac: your life would be easier if you would listen, ever
<bnagy>
instead of trying retarded stuff
<Nilium>
There's not a lot to learn about 2.0 since it's more or less the same as 1.9 but with more docs and a some improvements/fixes.
<Nilium>
Python 3.0, as far as I know, is to Python 2.x as Ruby 1.9 is to 1.8
habanany has joined #ruby
<Pandee>
and django has had a lot of changes which documentation hasn't caught up
<Pandee>
or books at least
habanany has quit [Client Quit]
<Nilium>
Was basically a case of both languages going "hey we're going to fix some stuff whether you like it or not"
<Nilium>
And the web developers crying foul because they're a whiny bunch of tosspots.
mikepack has quit [Remote host closed the connection]
<Nilium>
That's a joke though, I haven't seen anyone actually complaining about either change being a bad thing.
ffio has quit [Quit: WeeChat 0.4.1]
<WaRori>
Easy enough. :P
<Pandee>
the differences between 2.7 and 3.0 are easy to get the hang of, but with django it was different
<Nilium>
My impression is just that a lot of people are going "hey this is going to take some time"
<Nilium>
Thought I'm not familiar enough with django to know what's going on with that.
<Pandee>
the djangobook which was written in 2009 is not a good resource anymore, everyone says its out of date. But all the books on django were written in that time period!
<Nilium>
I don't do web dev stuff -- the closest I came was writing tools to generate static HTML files for my blog.
<Nilium>
Well, HTML and RSS. mustache is a hell of a drug.
<Pandee>
ah, i'm switching to ruby because that's all i want to do is web stuff
<Nilium>
Eh, whatever works for you as long as it's not PHP or Perl
<Nilium>
Or RPG.
<sevenseacat>
lolphp
<Pandee>
heh
<Nilium>
If you touch RPG I'll gut you on the spot.
<Pandee>
is php dying then?
<sevenseacat>
no, its just shit
<Nilium>
Not a chance in hell it's dying
<Pandee>
lol
<Nilium>
Perl's kind of dying, but that's going to be prolonged as hell
<DanielRb>
you think php is shit?
<Pandee>
probably a lot of code that people write in php is shit
<popl>
Perl is dying?
codepython777 has left #ruby [#ruby]
<Nilium>
PHP was made by some dude who thought PHP was a good idea, it's not really more or less shit than much else.
<popl>
What does that even mean?
<DanielRb>
php == for le skiddies
<Nilium>
popl: Its popularity.
sdegutis has joined #ruby
sdegutis has quit [Changing host]
sdegutis has joined #ruby
<popl>
Nilium: As gauged by what?
<Nilium>
As gauged by what I've seen people using.
<Nilium>
Which is a whole lot of not-perl.
<DanielRb>
it's procedural that gave PHP a bad name
<DanielRb>
in my opinion, anyway.
<popl>
Nilium: How big is your sample size?
<Nilium>
I'm not going down this road with you -_-
<popl>
Because you're making specious claims?
<popl>
:)
dagnachew has quit [Quit: Leaving]
<Nilium>
You can trudge down unhappy-defend-perl lane if you want, I'll be back here not trying to defend a programming language.
<Pandee>
does ruby come prepackaged with any databases? i.e. sqlite
<Nilium>
I'll also be making fun of web developers.
<Nilium>
Because that's what I do.
<popl>
To be perfectly honest I do like Perl quite a bit, but I am more going down the "if you have proof then spit it out otherwise you're just talking out of your ass" road.
krz has joined #ruby
<popl>
So there.
<Nilium>
popl: I'm on IRC, I'm _obviously_ talking out my ass.
thepumpkin has quit [Remote host closed the connection]
cyong has joined #ruby
<Nilium>
If I were writing an article on it, then I'd do the research.
<popl>
Ah.
<Nilium>
I mean I could cite the TIOBE but I think the TIOBE's a crock of shit.
RichardBaker has quit [Quit: RichardBaker]
<bnagy>
you could probably cite just about anything
<Nilium>
I cite my cockatiel.
<popl>
bnagy: wrt what?
<Nilium>
He's an expert on Perl.
<bnagy>
perl is less popular than say 20 years ago
<Nilium>
Cockatiel is currently whistling, which means Perl's unpopular.
<bnagy>
there are less people writing in perl
<bnagy>
less new lines of perl are being written
<Boohbah>
that's because ruby is better
<Boohbah>
but matz loves perl
<popl>
Ruby has a lot in common with Perl.
<Boohbah>
yes
<bnagy>
irrelevant
<Nilium>
I just call Ruby the readable Perl.
<Nilium>
This is to irritate people who are really, really offended by that statement.
<Boohbah>
Nilium: i like that
<bnagy>
and I don't think ruby would be the one winning in popularity
<Nilium>
Of which there are more than a few, amazingly.
<Pandee>
what's better php or html?
<Nilium>
O_o
<bnagy>
Pandee: fish
* Nilium
shanks Pandee
<popl>
pandee is trolling in another channel too
mrommelf has quit [Remote host closed the connection]
<Pandee>
haha, i sure am
<Boohbah>
Pandee: what
<popl>
this is all trolling
<popl>
nilium is trolling too
<popl>
:P
<Nilium>
Go join #webdevs or whatever and see if they give you a serious response
<Pandee>
I actually am switching from python popl :P
<Nilium>
I'd be interested to know
* Boohbah
slaps Pandee around a bit with a large trout
<popl>
Pandee: That's irrelevant.
<Nilium>
I'm a pretty lousy troll by any metric of trolliness.
<Boohbah>
popl is a tattle-tale
rien_ has quit [Quit: leaving]
<popl>
fucking right
<Pandee>
popl: perl is irrelevant
<Pandee>
!
<Nilium>
Well it's pretty irrelevant in a channel about ruby, yeah >_>
<popl>
nilium++
<zendeavor>
wot
<Boohbah>
no, it's quite relevant because matz loves perl
<Boohbah>
dang it, i got trolled
<zendeavor>
how can you compare html vs php
<popl>
20:24 < bnagy> irrelevant
<popl>
Boohbah: ^
<zendeavor>
i am boggled at the question itself
<popl>
zendeavor: it's a trap
<Boohbah>
zendeavor: fancy seeing you here
<bnagy>
it's irrelevant to the popularity over time of perl as a language, yeah
* Nilium
hands Pandee a penny.
<Pandee>
i'd say html is a bit more useful with more documentation
<Nilium>
You earned it.
<Pandee>
thank you Nilium
<popl>
bnagy: I just don't think there's any reliable metric by which to judge that sort of thing, so asserting one way or the other is silly.
<zendeavor>
Boohbah: i have 15 channels in my bufferlist right now
* Boohbah
30-40 channels
<Nilium>
I don't think there's any reliable metric for programming languages in general 'cause popularity does not make something the right choice for a task
<zendeavor>
and greybot
<bnagy>
popl: surveys, languages taught, languages used for language agnostic challenges...
<Nilium>
Though if your choice was perl it's still wrong 'cause Ruby exists.
<bnagy>
and the fact that it's completely obvious to anyone that knows more than 20 developers
<popl>
I had a class where Perl was taught.
seich- has joined #ruby
<Nilium>
I wish I'd had a class on Perl
<Boohbah>
metrics are for middle managers
<Boohbah>
don't stoop to their level
<Pandee>
oh cool they have a mobile app course coming up on udacity
<Nilium>
I haven't used the language since I learned to code, seeing as I started with Perl
<zendeavor>
surveys are prone to bias
<popl>
metrics are for people who don't like to phone it in
<Nilium>
Nowadays I can't do anything in it
<Pandee>
err, i mean mobile web development
<zendeavor>
language-agnostic challenges are equally prone to bias
<popl>
bnagy: you say it's completely obvious but what do you mean by that?
<Boohbah>
engineers measure, managers metre
<zendeavor>
"i know smalltalk best, so i'm gonna use that one"
<Nilium>
Boohbah: And programmers eyeball and say "I can optimize that"
<bnagy>
zendeavor: how is that a bias, in this instance?
hakunin has joined #ruby
<bnagy>
yes, people choose their primary language, which is THE WHOLE POINT
<Nilium>
zendeavor: Said nobody ever.
<bnagy>
also that :)
<zendeavor>
that was the point of the example
Grieg_ has quit [Quit: Grieg_]
<popl>
I think subtlety is going to be lost and we should make our assertions plainly.
<Nilium>
My question is usually less what I know best and what I think I can get away with doing something fastest in.
<Nilium>
Which doesn't mean the code is fast, but just whether I can get it working.
Takehiro has joined #ruby
<bnagy>
popl: do you, in real life, assert that the % of people writing _any_ code in perl today is less than say 15 years ago?
<v1rr3n>
For me its all about whats the most fun. Ruby takes the cake there.
<bnagy>
because "well you don't know lol u don't have stats" is not a primary argument
<popl>
I didn't say that.
<popl>
I wouldn't talk like that. :P
<bnagy>
well do you, or not
<bnagy>
like, is there a point of debate
<v1rr3n>
I have to code in Java a lot for work though :(
<Nilium>
There are more languages than 15 years ago and more programmers than 15 years ago, so I think the percent of people writing any code in perl must necessarily be lower.
<bnagy>
or are you just wasting time?
<zendeavor>
is this not an idle conversation anyway?
<Nilium>
Vastly more programmers than 15 years ago, probably.
<popl>
bnagy: Whether this is a waste of time has yet to be determined. You didn't answer my question, though. So I feel this is sort of one-sided.
<zendeavor>
one might assert that the reason this chat is happening is simply to waste time, as there's no productive value to it by its very nature
<Nilium>
I'm using this chat to avoid pushing a new gem version.
<bnagy>
well if you're actually making an assertion I'll bother to go and find some 'data' to support what everybody knows to be true
<Boohbah>
if a bear shits in the woods and nobody's around to hear it, does it make a sound?
<sevenseacat>
if a man speaks in the woods and no woman is around to hear him, is he still wrong?
<bnagy>
but you can't say 'I wish your claim weren't true, therefore you must survey everyone in the world or I win'
<popl>
You made an assertion bnagy. You said it was obvious to anybody who knows more than 20 developers.
mansi has joined #ruby
<popl>
I'm not saying that at all.
<popl>
I don't wish for one or the other to be true.
<popl>
I have mentioned my bias in that I do prefer Perl but if it is destined to go the way of the dodo then who am I to stop it?
<popl>
Besides, I doubt that I individually could in fact do that.
asgardBSD has joined #ruby
<Nilium>
Besides, I doubt anything's going to stop you from using Perl if you want to use Perl.
Takehiro has quit [Ping timeout: 276 seconds]
<Nilium>
Not like your installation will just one day go "nope I'm done"
ericboehs has quit [Quit: WeeChat 0.4.0]
<popl>
Right. So I don't understand bnagy's apparent indignation, unless he's totally misunderstood everything I've said.
Petrochus has quit [Quit: Leaving]
kofno has quit [Remote host closed the connection]
<bnagy>
I am indignant because you appeared to be continuously making logically fallacious arguments against a fairly simple and obvisouly true statement
<Pandee>
Wow, I am totally sold on the Ruby community. In my local area (san diego), there is a large ruby gathering every month, and they also have a introductory 4-5 week course for beginners.
<bnagy>
ie that perl is dying, but it will take a long time
<popl>
Which argument did I make?
mansi has quit [Ping timeout: 240 seconds]
<zendeavor>
Pandee: there's also the same for practically every language
alvaro_o has quit [Quit: Ex-Chat]
<Pandee>
Not really for python that I could find
<bnagy>
11:10 < popl> Because you're making specious claims?
carlyle has quit [Read error: Connection reset by peer]
<zendeavor>
found one
smathieu has joined #ruby
RichardBaker has joined #ruby
<popl>
There's no real etc there. Most of what I said was trying to suggest that there's no reliable metric to judge the popularity of something like that. Then you, bnagy, said it was obvious, and I asked what you meant by that. Then you popped off.
<Pandee>
with a 4-5 week course?
carlyle has joined #ruby
axeman- has joined #ruby
<zendeavor>
no, with an "every meetup is a learning experience"
rodacato has quit [Remote host closed the connection]
<bnagy>
ok, well A: obviously true thing B: that is wrong
<bnagy>
sounds like an 'argument' to me
<zendeavor>
what is obviously true?
<popl>
I don't understand that statement.
<Pandee>
are these things generally good to attend?
<zendeavor>
popl: person A states an obviously true thing; person B retorts "that is wrong"
<bnagy>
I apologise for assuming that you knew what specious means and that you used the work on purpose
<popl>
Oh, ok.
<zendeavor>
now, what is this obviously true thing?
krz has quit [Quit: krz]
<popl>
zendeavor: "Perl is dying."
<popl>
zendeavor: if you know more than 20 developers
<zendeavor>
oh, that was obviously true back in perl4 days too
<popl>
which I do not understand
<zendeavor>
surprise, it didn't come close to dying
<zendeavor>
it's also shipped as part of nearly every linux distribution's base set of packages
<popl>
Yeah, which is why I asked for something to back it up. But bnagy is going for the volume versus accuracy attack I guess.
<popl>
So whatever. :)
Kruppe has quit [Remote host closed the connection]
<zendeavor>
therefore, it's obviously true that perl is dying in the same sense that it's obviously true shell is dying
swordsmanz has quit [Quit: swordsmanz]
<bnagy>
right. Which it is.
<bnagy>
it will just take a very long time, which was the other half of the statement
<bnagy>
which wasn't even mine btw
<zendeavor>
this was said about perl4
smathieu has quit [Ping timeout: 245 seconds]
<zendeavor>
it resurged, instead
<popl>
bnagy: I looked up the word before I used it initially.
<bnagy>
fewer people write things in shell than they used to. Thank god.
nlv has joined #ruby
mansi has joined #ruby
<popl>
bnagy: I realize you were making an ad hominem jab at me there. It's ok.
<DanielRb>
simple stuff, but how come is_valid_length? is returning false all the time? http://pastebin.com/niGKkedu
<zendeavor>
a lower percentage of the overall total number of programmers globally write shell than before
<zendeavor>
i would assert that is not even remotely true, either. i would concede that fewer projects in shell are released in public form, though.
kofno has joined #ruby
gstamp has quit [Read error: Connection reset by peer]
<bnagy>
so.. what.. it's all sekret shell scripting?
<zendeavor>
personal shell scripting
<zendeavor>
sysadmin shell scripting
<zendeavor>
i would further assert that there is no less shell scripting happening today than 10 years ago
<bnagy>
ok, I'd assert that HLLs like python etc are becoming more popular, and some people that used to use shell now use those
<zendeavor>
agreed.
<bnagy>
therefore the % of people doing those tasks in shell has decreased
<bnagy>
because it adds up to 100%
<DanielRb>
nvm had it wrong
nsuria has quit [Quit: nsuria]
tjbiddle has joined #ruby
<zendeavor>
i'd assert that the percentage is a poor metric, because as the overall number of people writing code in "scripting" langauges is increasing dramatically thanks to things like github making it easy to get involved in prjects
<zendeavor>
s/as//
mansi has quit [Ping timeout: 240 seconds]
<bnagy>
what is a better metric for popularity than a percentage of potential users who use a thing?
<zendeavor>
it's not that there is necessarily less of it happening, just that there are more new entrants into other languages rather than shell
<zendeavor>
and then i'd assert that this application of logic applies to perl5 just the same.
bluOxigen has joined #ruby
<zendeavor>
when you stick a bucket into a puddle of water, you will fill it with a greater percentage of available water than you would if you'd stuck it in an ocean
<zendeavor>
it's a skewed statistic
browndawg has joined #ruby
gstamp has joined #ruby
<bnagy>
in what way? It's the % of people who might do X that do, in fact, do X
<bnagy>
so no, if you're looking at the popularity of tampon brands, you don't include men
<zendeavor>
no, it's the percent of people who might do X that do, in fact, do X *with Y*
<zendeavor>
you can write scripts with equivalent functionality in ruby, perl, python, smalltalk, C, haskell, scheme, etc
<bnagy>
not that it's actually relevant, but that's also just wrong
fuhgeddaboudit has joined #ruby
becky_ has quit [Ping timeout: 276 seconds]
wmoxam has joined #ruby
blueOxigen has joined #ruby
<zendeavor>
i should have said "programs" to be more accurate, due to my later addition of compiled language, but the point remains
<bnagy>
but anyway, no it's not skewed
<bnagy>
skewed would be looking at absolute numbers, or looking at the people who use bash for game programming
<zendeavor>
it is skewed by virtue of the fact that there are more resources now than 10 years ago
<bnagy>
that's not skew
<bnagy>
it is, in fact, inherently not skew.
<popl>
inflation?
<popl>
:P
axeman- has quit [Ping timeout: 245 seconds]
<bnagy>
if perl was the best thing ever, it could STILL have 80% popularity, and it's just that the other 20% would be shared among 12 things instead of 2
bluOxigen has quit [Ping timeout: 264 seconds]
<zendeavor>
popularity is a rather meaningless contest
<bnagy>
it's like saying IE is only less popular because mean people went and wrote other browsers
axeman- has joined #ruby
<zendeavor>
that's what percentages imply
devoldmx27 has quit [Quit: Bye]
<zendeavor>
now there are 50 choices, and 50% of the internet browsing community switched; there may very well still be the same 500 people using IE as there were in the first place
devoldmx has joined #ruby
<zendeavor>
so is IE less popular then?
<bnagy>
which would make it less popular
<zendeavor>
just because the community inflated?
<bnagy>
yes
<bnagy>
each new member made a choice of browser
<zendeavor>
popularity is an awful topic.
<popl>
It is.
<bnagy>
the initial expectation, based on the sample, was 0.5. Turned out not to be observed
<zendeavor>
this discussion will run in circles until the sun burns out
<bnagy>
there are no circles
gstamp has quit [Read error: Connection reset by peer]
<zendeavor>
there is no right or wrong about it
<popl>
zendeavor: I think we will die before that.
<bnagy>
you just keep saying stuff that's wrong
<bnagy>
like, trivially, logically wrong
anildigital is now known as _anildigital
n_blownapart has quit [Remote host closed the connection]
<zendeavor>
sure
axeman- has quit [Ping timeout: 276 seconds]
axeman- has joined #ruby
skaczor has quit [Quit: Lost terminal]
<zendeavor>
in any case, there's no empirical evidence that less shell scripting or perl scripting is happening because you must assume complete transparency in the matter; you can't see 100% of all scripts, so you can't make a meaningful observation on the matter
moeSeth has joined #ruby
asgardBSD has quit [Ping timeout: 264 seconds]
<bnagy>
ahh, now it's the empirical evidence fallacy!
gstamp has joined #ruby
<zendeavor>
as opposed to the "i know more than 20 developers" fallacy, yes
<bnagy>
I contend that we can draw inferences from observed data, as long as we're careful
<popl>
What's fallacious about evidence?
<bnagy>
we don't need to know _everything_ before a question is decideable
<zendeavor>
okay, so there's less shell and perl code being actively developed
<bnagy>
basically complete knowledge is impossible, but you don't get to say 'so therefore who knows, maybe I win anyway'
* zendeavor
throws hands up
<zendeavor>
that was my point all along
<zendeavor>
except i extended it to "you can't know either way"
Takehiro has joined #ruby
<bnagy>
I can be pretty sure
darkc0met has joined #ruby
<zendeavor>
well i'm pretty sure too so there.
<bnagy>
just like you can walk through LA for a day and say that cars are more popular than unicycles
<popl>
Self-delusion can be pretty persuasive.
<zendeavor>
popl: that's uncalled for.
<bnagy>
and hey, you COULD be wrong, because maybe there's a BIGGER city, in like Europe somewhere, where everyone rides unicycles
<bnagy>
but the odds are not on your side
pupoque_ has joined #ruby
<Nilium>
I'm almost positive that anyone using my 3D maths gem hates me.
<popl>
zendeavor: I'm pretty sure bnagy started with the ad hominem. I was actually quoting a conversation I had with someone the other day. So I was amusing myself.
carlyle has quit [Read error: Connection reset by peer]
<popl>
Besides I'm sure bnagy doesn't care what I say. :)
m104 has joined #ruby
<Nilium>
I've been ignoring this while pushing out a new version of my 3D math gem.
<popl>
If I thought he did I wouldn't say that.
<popl>
Nilium: You're welcome.
<Nilium>
I'm too lazy to figure out what I could say that would be inflammatory.
<popl>
20:34 < Nilium> I'm using this chat to avoid pushing a new gem version.
<popl>
21:10 < Nilium> I've been ignoring this while pushing out a new version of my 3D math gem.
<popl>
\o/
<Nilium>
Four new versions in the past week.
<popl>
Nilium: You should credit #ruby as motivators
<Nilium>
I'm sure if anyone was using it, they are wondering if I'm on crack.
d2dchat has quit [Remote host closed the connection]
<bnagy>
Nilium: damn you!
<bnagy>
you started this, then popl and zendeavor kept being wrong on the internet and you cut and ran and got WORK done??
<popl>
bnagy: I don't think I was wrong. I think you misunderstood. :) We still were arguing on the Internet, though.
<Pandee>
there ya go ;0
<popl>
So we both lose.
<Nilium>
Ugh, paying to become a rails developer
<Nilium>
That's like paying to give yourself herpes
Davey has joined #ruby
<zendeavor>
a lot of people do that, Nilium
<popl>
If I could find my Special Olympics volunteer shirt I'd put it on.
<Nilium>
I know, that was the joke
<Pandee>
a lot of people pay for herpes? or the latter
<zendeavor>
you can't be srs.
<zendeavor>
Pandee: that WAS the latter.
<popl>
Herpes is a gateway STI.
<Nilium>
Most people have some form of it without even trying.
Takehiro has quit [Remote host closed the connection]
<Nilium>
So for the sake of argument, let's say rails is like really bad herpes that inflate, burst, and regrow multiple times per day.
<Nilium>
And when they burst, it's audible
<zendeavor>
why do you make this comparison?
<Nilium>
Because I don't like Rails.
<zendeavor>
well, i don't think i do either but i haven't actually tried to use it
nlv has quit [Remote host closed the connection]
<sevenseacat>
i like rails.
<Nilium>
More specifically, I dislike that Rails is what Ruby is known for.
<sevenseacat>
yeah that kinda sucks
ntus1017 has quit [Remote host closed the connection]
Megtastique has quit [Quit: Megtastique]
gstamp has quit [Read error: Connection reset by peer]
m104 has quit [Quit: brb]
axeman- has quit [Ping timeout: 264 seconds]
<zendeavor>
i started looking into ruby because i found python's "batteries included stdlib" to be daunting
mary5030 has joined #ruby
<zendeavor>
every time i had an inclination to do something, i'd find out it was already done in the stdlib
axeman- has joined #ruby
huoxito has quit [Quit: Leaving]
io_syl has joined #ruby
TheBay has joined #ruby
<zendeavor>
so what was the point in writing anything for myself when the most appropriate way to write it was to simply import a few modules from the stdlib and call it a day
<bnagy>
well that's kind of the case for ruby as well, except odds are it's done horribly
<zendeavor>
oh i'm sure it's the same case, but, turntabler looks awesome so i thought i'd try my hand
browndawg has quit [Quit: Leaving.]
<zendeavor>
the python equivalent is sorely lacking in comparison
thesheff17 has quit [Remote host closed the connection]
gstamp has joined #ruby
gstamp has quit [Client Quit]
axeman- has quit [Ping timeout: 245 seconds]
iliketurtles has quit [Quit: zzzzz…..]
bradsmith has quit [Remote host closed the connection]
nlv has joined #ruby
m104 has joined #ruby
axeman- has joined #ruby
Deele has joined #ruby
DanKnox is now known as DanKnox_away
apeiros has quit [Read error: Connection reset by peer]
apeiros has joined #ruby
Megtastique has joined #ruby
<Nilium>
I reinvent a lot of wheels in Ruby.
bradsmith has joined #ruby
<Nilium>
People don't like this, but I do it anyway.
crazedpsyc has joined #ruby
<sdegutis>
Nilium: like?
Megtastique has quit [Client Quit]
<Nilium>
My blog gem, my memory gem, probably someone would complain that I wrote bindings for an image loader instead of using DevIL bindings, I'd bet someone wouldn't like that I did a GLFW 3 gem instead of just using an SDL gem
<Nilium>
I'm sure there are better tools than my bork project for file tagging as well
<Nilium>
That is to say not all of the wheels are things already in or for Ruby, but that people just like to get mad at me for some reason when I tell them I don't want to use this thing they already know about
<Nilium>
Like trying to build something myself is a huge sin because IT'S BEEN SOLVED.
bradsmith has quit [Ping timeout: 245 seconds]
<Nilium>
Which just makes me think those people are insane, really.
brain_shim has joined #ruby
joast has joined #ruby
gstamp has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
axeman- has quit [Ping timeout: 240 seconds]
yacks has quit [Quit: Leaving]
ananthakumaran has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
stillEPIK has quit [Ping timeout: 264 seconds]
Kricir has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
bradhe has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 245 seconds]
smathieu has joined #ruby
axeman- has joined #ruby
<zendeavor>
they are, but so are you
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
<Nilium>
I am, but for different reasons.
dhruvasagar has joined #ruby
<sdegutis>
Nilium: meh we all reinvent wheels
mansi has joined #ruby
smathieu has quit [Ping timeout: 276 seconds]
noyb has quit [Ping timeout: 245 seconds]
axeman- has quit [Read error: Connection reset by peer]
<sdegutis>
welp, time to break a bunch of people's configs.
fridim_ has quit [Ping timeout: 276 seconds]
<sdegutis>
sorry backwards compatibility YOUR NOT WLCOM HERE
<s2013>
i originally did comp sci. we arent exactly party animals either
yshh has joined #ruby
hogeo has quit [Read error: Connection reset by peer]
<s2013>
considering my university had maybe 3 girls
<Nilium>
Plus I'm basically a shut-in.
<Nilium>
Or try to be.
<Nilium>
I live in Idaho, so it's necessary to my sanity.
hogeo has joined #ruby
<s2013>
idaho is beautiful. was just there
<s2013>
why would you stay inside?
<s2013>
go enjoy outside and the potatoes
<Nilium>
I mean shut-in more in the sense of someone who avoids people.
keen_____ has quit [Ping timeout: 245 seconds]
<s2013>
well you are on irc, tons of people here are like that i guess
keen_____ has joined #ruby
amacgregor_ has joined #ruby
<s2013>
have you been to bear lake?
<Nilium>
Don't think so.
carlyle has joined #ruby
<Nilium>
Sounds like that's mostly southern Idaho.
<s2013>
drive down to bear lake and do akeg stand
<s2013>
its between idaho/utah so yea
<Nilium>
Yeah, I'm very far north. Next door to Schweitzer, basically, if you know where that is.
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<s2013>
hmm farthest north ive been is idaho falls i guess
<Nilium>
I lived in Boise for four years, but that was to get my degree 'cause BSU and UI are the only universities I could afford.
<s2013>
o
<s2013>
you went to bsu?
amacgregor has quit [Ping timeout: 264 seconds]
<Nilium>
And living in Boise is far preferable to living in Moscow -- which if you've been there, you know exactly why anywhere else is preferable.
<Nilium>
Yes.
<s2013>
ever been to a bronco game?
<s2013>
boise is one of the best places to live in the us
krz has quit [Client Quit]
<Nilium>
No, not a fan of football.
babykosh has quit [Quit: babykosh]
<Nilium>
I've been to the basketball games 'cause they gave me free tickets, but that's mostly just tickets to watch BSU lose.
<s2013>
one of the best games ive ever seen was bsu vs oklahoma
<Nilium>
BSU's basketball team is bad, and their arena is just depressing because when the other team is doing a free-throw, for example, all the boards around the arena light up with "FAIL" and such
ewnd9 has quit [Ping timeout: 245 seconds]
<Nilium>
Just made me lose respect for the school because of how unsportsman like it seemed.
axeman- has quit [Ping timeout: 264 seconds]
Es0teric has quit [Quit: Computer has gone to sleep.]
axeman- has joined #ruby
jblack has quit [Ping timeout: 264 seconds]
<Nilium>
That aside though, Boise is a nice place to live.
<s2013>
umm dude thats how stadiums is supposed to be
krz has joined #ruby
<s2013>
you intimidate the opposing team as much as you can
<Nilium>
I don't think that's a good things.
<Nilium>
*thing
<sevenseacat>
theres intimidation and theres bad sportsmanship
<s2013>
and its all in good fun too because the other team does the same thing
<Nilium>
To me, it comes across as dickish and insulting.
<s2013>
im guessing you arent a fan of sports then
<Nilium>
I have no respect for it.
<s2013>
i see
<Nilium>
Generally not a fan of sports, though that's more because of sports fans than the sports themselves.
<s2013>
whats wrong with sports fans now?
bradsmith has joined #ruby
<Nilium>
I should say obsessive sports fans.
TheBay has quit [Remote host closed the connection]
axeman- has quit [Read error: Connection reset by peer]
mary5030 has quit [Remote host closed the connection]
<Nilium>
E.g., the drunks, the facepaint people, the ones who get violent, etc.
<s2013>
well drunks and violent ones dont mean they are obsessive it just means they are drunk and violent
<s2013>
nothigns wrong with facepaint though.
<popl>
right
<Nilium>
It's just not to my liking. It's over the top and insane.
<popl>
harmless meatheaded fun
axeman- has joined #ruby
<s2013>
i see.
xcthulhu has joined #ruby
<popl>
some people recreate in different ways
<Nilium>
They can keep doing it, obviously, but I won't enjoy it with them.
<popl>
sure
<popl>
different strokes
<s2013>
i guess i can be considered an 'obsessive' fan but ive never been violent.. well ive thrown remotes once in a while but yeah
<Nilium>
Same as I won't respect what is apparently common practice to try to bully an opposing team.
<popl>
yes, not everyone does that
<popl>
although sometimes it's good-natured ribbing
<s2013>
yeah
<Nilium>
For me, there's no room in sportsmanship for being a cock, and that's what I felt BSU did in their basketball game.
bean has quit [Ping timeout: 245 seconds]
<s2013>
lol dude then you havent been to the south
krz has quit [Quit: krz]
<s2013>
youd have a heart attack
tagrudev has joined #ruby
<Nilium>
I've been to Dallas, but that's about it.
Takehiro has joined #ruby
bradhe has joined #ruby
<s2013>
we take our football seriously in texas
m104 has quit [Quit: bye]
<Nilium>
I probably wouldn't fit in down in the bible belt anyway.
<s2013>
oo scary christians
GeissT has joined #ruby
<Nilium>
People already act strangely when they ask me what church I go to and I tell 'em none.
milardovich has quit [Quit: Leaving]
<s2013>
i see
sarkis has joined #ruby
<Nilium>
Had a lot of that growing up. Probably why I avoid people now.
<s2013>
do you have close friends?
<bigmac>
how can i print in reverse order 0..1000
<Nilium>
I have a handful of close friends, yeah.
<s2013>
are they the same as you or are they into sports and being out , etc
<Nilium>
More or less the same.
<L8D>
bigmac: (0..1000).reverse.each { |x| puts x }
<s2013>
bigmac: you can just do .reverse
<Nilium>
Mostly musicians, writers, other programmers, etc.
<bigmac>
thanks
<L8D>
sorry
<L8D>
bigmac: (0..1000).to_a.reverse.each { |x| puts x }
<Nilium>
Mainly programmers who ended up getting degrees in non-programming things.
<s2013>
thats cool. whatever floats your boat
bradhe has quit [Ping timeout: 248 seconds]
<L8D>
bigmac: (1000..0).to_a.each { |x| puts x }
<Nilium>
(0..1000).reverse_each { |x| ... }
ewnd9 has joined #ruby
lemonsparrow has joined #ruby
<L8D>
bigmac: the best thing you should do is (1000..0).each { |x| ... }
kofno has quit [Remote host closed the connection]
<L8D>
Why is it working in 2.0.0?
<Nilium>
Iteration over a range only works for positive steps.
<Nilium>
I'm using 2.0.0, it's not working.
<L8D>
wierd
wallerdev has quit [Quit: wallerdev]
<Nilium>
In irb, what is RUBY_VERSION?
<L8D>
"2.0.0"
<Nilium>
What's your test code for saying it works in irb?
<L8D>
(10..0).each { |x| puts x }
<sevenseacat>
that wont ever work
<Nilium>
And that prints 10, 9, 8, 7.. etc.?
<L8D>
yes
<L8D>
wait sorry
<L8D>
I'm using rubinius
<wisconsin>
L8D: haha
<Nilium>
I was going to tell you to take a screenshot.
<wisconsin>
rubinius fails
<L8D>
you're right
<L8D>
it doesn't work in mri
ewnd9 has quit [Ping timeout: 264 seconds]
d2dchat has joined #ruby
<Nilium>
Also, since when did Rubinius do Ruby 2.x?
<Nilium>
Heck, its website still says 1.8.7
mikepack has joined #ruby
eoinkelly has joined #ruby
<Nilium>
Though the website might be completely dead, so who knows
ssvo has quit [Ping timeout: 276 seconds]
<L8D>
Check the git repo
axeman- has quit [Ping timeout: 245 seconds]
dash_ has joined #ruby
axeman- has joined #ruby
bklane has quit [Remote host closed the connection]
d45h has joined #ruby
ssvo has joined #ruby
browndawg has joined #ruby
ananthakumaran has joined #ruby
i_s has joined #ruby
Evixion has quit [Ping timeout: 264 seconds]
smathieu has joined #ruby
eldariof has joined #ruby
apeiros has joined #ruby
Evixion has joined #ruby
rshetty has joined #ruby
dash_ has quit [Ping timeout: 264 seconds]
jmsbrwr has joined #ruby
<Nilium>
This repo is going to take a while to clone
<Nilium>
I should go pet a kitty while I'm waiting.
keen_____ has quit [Ping timeout: 240 seconds]
Takehiro has quit [Remote host closed the connection]
v1rr3n has quit [Quit: WeeChat 0.4.1]
keen_____ has joined #ruby
m104 has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
Al_ has joined #ruby
mansi has joined #ruby
ewnd9 has joined #ruby
pranny has joined #ruby
nbouscal has quit [Quit: nbouscal]
osvico has quit [Ping timeout: 264 seconds]
kaspergrubbe has joined #ruby
bradhe has joined #ruby
mansi has quit [Ping timeout: 264 seconds]
danman has joined #ruby
arya_ has joined #ruby
endash has joined #ruby
<s2013>
anyone knows how to remove ruby and all its gems completely on ubuntu? i did purge but it still shows me ruby
arya_ has quit [Client Quit]
krz has joined #ruby
<sevenseacat>
depends on how you installed it.
bradhe has quit [Remote host closed the connection]
xaxxon has joined #ruby
<xaxxon>
when I call array.select(&:thing) -- I thought it was supposed to call array_element.thing() for each element of the array.. but for some reason it's passing array_element as a parameter into thing().. is that normal
<xaxxon>
?
<xaxxon>
and I'm getting the 1 for 0 parameter error
<s2013>
i used sudo apt-get but i ended up just removing the entire .rvm folder
<sevenseacat>
s2013: well apt-get and rvm are two entirely different things
<xaxxon>
and the docs for select don't evn mention that it's an option to pass in a .. whatever that is instead of a block. it just talks about block and no-block
<sevenseacat>
if you installed both, you need to uninstall both
<apeiros>
foo(&:thing) will do: foo { |receiver, *args| receiver.thing(*args) }
Evixion has quit [Read error: Connection reset by peer]
<s2013>
i basically installed rails 4.0 but i wanted to install rails 3.2. i tried removng rails and installing 3.2 but it will install 4.0 everytime so i figured might as well start froms cratch
<apeiros>
so if you don't have an array, and select thus yields more than a single value, your method will get additional arguments
<sevenseacat>
s2013: so install rails 3.2 instead? whats the problem?
<s2013>
it wouldnt
<sevenseacat>
what did you try?
<xaxxon>
[1,2,3,4,5].select(&:even?) <== that works. so is even defined like def even(*ignore_all_parameters) ... end?
<s2013>
gem install rails -v 3.2.9
bean has joined #ruby
himsin has joined #ruby
<xaxxon>
I don't know how to see the implementations of built-in functions
<sevenseacat>
and that command installed rails 4?
<s2013>
i originally did just gem install rails which is why it installed 4.0
<s2013>
but i tried removing 4.0 and tried to isntall 3.2 but it would show me rails 4.0 when i did rails v
tonini has quit [Remote host closed the connection]
himsin has joined #ruby
troessner has joined #ruby
Emmanuel_Chanel has quit [Quit: Leaving]
mikecmpbll has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
<rickruby>
I've been wondering, why does ruby use key => value
tonini has joined #ruby
<rickruby>
that symbol => does it mean anything specific ?
<rickruby>
if I do say 1 in irb the response is => 1
hamakn has quit [Remote host closed the connection]
Elhu has joined #ruby
<Nilium>
That's kind of a different case.
<rickruby>
and if I try say, 1 => 2 ruby irb states something about unexpected tASSOC
<Nilium>
The => thing in Ruby is just it telling you the result of the last expression.
<Nilium>
*in irb
<rickruby>
so like => in irb just means this is the value of that statement
<rickruby>
value, or result ?
mklappstuhl has joined #ruby
<Nilium>
Result.
<Nilium>
E.g., the result of x=1 is 1.
<rickruby>
cool
<rickruby>
so that is why when i do
<rickruby>
puts "hello"
<rickruby>
I get => nil
<Nilium>
Yes.
jarray52 has left #ruby [#ruby]
<rickruby>
there is no real valid return from that statement other than to output to screen and return nil to signify nothing else really you should do with it
<rickruby>
so why use => in Hashes, what is the significance of =>
<rickruby>
association ?
<rickruby>
and what is => even called ?
<Nilium>
There is none, it's an arbitrary symbol not used elsewhere.
skaflem has joined #ruby
<Nilium>
Well, operator, I guess.
<Nilium>
Or delimiter. Or something.
eoinkelly has quit [Quit: eoinkelly]
<rickruby>
I see, so nothing really special about it, they just picked that symbol
<Nilium>
You can also do { foo: 1 } for hashes as well.
<rickruby>
for use with hashes
<rickruby>
oh cool
<Nilium>
I highly discourage this because it looks weird.
<rickruby>
is there a preferred way or which is the more Ruby way ?
<Nilium>
But that's just me.
<Nilium>
=> is what Ruby originally had, k:v is relatively new
<Nilium>
Relatively meaning in 1.9.
<Nilium>
Either one is probably fine as long as you're consistent.
elaptics`away is now known as elaptics
<rickruby>
cool
<rickruby>
thanks, Hashes are starting to make sense to me
hackingoff has quit [Ping timeout: 245 seconds]
<sevenseacat>
=> is called a hashrocket, who didnt know that :p
t_p has joined #ruby
krz has joined #ruby
krz has joined #ruby
krz has quit [Changing host]
ephemerian has joined #ruby
trepidaciousMBR has joined #ruby
<Nilium>
Is that an official term or did someone just make that up because they wanted 'rocket' in a keyword name?
emergion has joined #ruby
<rickruby>
hashrocket sounds good, hey it kinda looks like a little rocket heh => or missile
wildcard0 has quit [Ping timeout: 260 seconds]
<sevenseacat>
its what ive always known them as
<Nilium>
At any rate, the important thing is to set things on fire while coding.
<Nilium>
Periodic fire sacrifices keep things going smoothly.
<rickruby>
must appease the computer gods
<sevenseacat>
absolutely.
<Nilium>
And who knows, maybe your fire sacrifice will be the one to wake the old gods of chaos and bring about a new era of suffering/COBOL.
jibi has quit [Quit: .]
<rickruby>
thats what the cats are for, as intermediaries to receive offerings to keep things as they are when the fire sacrifices fail to appease
thomasle_ has quit [Remote host closed the connection]
<sevenseacat>
noooooo
<sevenseacat>
wont somebody please think of the kittens
elaptics is now known as elaptics`away
<rickruby>
haha
<Nilium>
I think he just said he sets cats on fire.
elaptics`away is now known as elaptics
<Nilium>
I think that means we have to set him on fire in turn.
<Nilium>
A fire for a fire.
<rickruby>
D:~
nomenkun has joined #ruby
niKeITA has joined #ruby
obs has joined #ruby
<Nilium>
So it turns out I need an epsilon of about 1e-6 or less to do equivalence checks for 32-bit floats. Single precision sucks.
stuartrexking has joined #ruby
camilasan has joined #ruby
rdark has joined #ruby
smathieu has joined #ruby
<trepidaciousMBR>
I've always seen => as implies, which isn't normally what it means
mklappstuhl has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
paissad__ has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
darth_chatri has quit [Quit: Leaving.]
<Nilium>
I wish I could get Ruby 1.9.3 to build.
cj3kim has quit [Remote host closed the connection]
mansi has joined #ruby
paissad_ has quit [Ping timeout: 245 seconds]
smathieu has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
BizarreCake has joined #ruby
niKeITA has quit [Quit: sleep]
rspec_newbie has joined #ruby
Deele has joined #ruby
ad has joined #ruby
ad is now known as Guest57897
mklappstuhl has quit [Remote host closed the connection]
<rspec_newbie>
how can I stub Net::Ftp requests
senayar has joined #ruby
niKeITA has joined #ruby
Guest57897 has quit [Read error: Connection reset by peer]
<rspec_newbie>
using VCR?
Guest52440 has joined #ruby
timonv has quit [Remote host closed the connection]
nlv has quit [Remote host closed the connection]
axeman- has quit [Ping timeout: 276 seconds]
mansi has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
zavier has quit [Quit: WeeChat 0.4.0]
s2013 has quit [Ping timeout: 240 seconds]
Deele has quit [Ping timeout: 240 seconds]
schickung has joined #ruby
blaxter_ has joined #ruby
Guest52440 has quit [Ping timeout: 240 seconds]
<gnufied>
No
Judge has joined #ruby
<gnufied>
you can't net:ftp requests using vcr, iirc
<gnufied>
may be use rspec/mocha mocks?
lkba has quit [Ping timeout: 245 seconds]
niklasb has joined #ruby
wildcard0 has joined #ruby
mywebcompute has joined #ruby
niKeITA has quit [Quit: sleep]
blackmesa has joined #ruby
yacks has joined #ruby
<Judge>
Moooin, everyone :)
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
kaspergrubbe has quit [Ping timeout: 248 seconds]
germanstudent has quit [Ping timeout: 264 seconds]
d3 has joined #ruby
obs has quit [Quit: obs]
niKeITA has joined #ruby
anildigital is now known as _anildigital
germanstudent has joined #ruby
_anildigital is now known as anildigital
anderson has quit [Ping timeout: 248 seconds]
browndawg has quit [Ping timeout: 245 seconds]
kaspergrubbe has joined #ruby
<L8D>
object_mapper = (obj, fn) -> r = []; r.push fn v for v in Object.getOwnPropertyNames obj; r
timonv has joined #ruby
gyre007 has joined #ruby
stonevil has joined #ruby
sevenseacat has left #ruby [#ruby]
nari has quit [Ping timeout: 245 seconds]
krz has quit [Quit: krz]
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
zavier has joined #ruby
anderson has joined #ruby
braoru has joined #ruby
stonevil has quit [Remote host closed the connection]
s0ny123 has joined #ruby
anildigital is now known as _anildigital
cj3kim has joined #ruby
graydot has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
cascalheira has joined #ruby
mansi has joined #ruby
stonevil has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
blaxter_ has quit [Quit: foo]
Resure is now known as resure
Neomex has joined #ruby
Neomex has quit [Client Quit]
sdegutis has quit [Remote host closed the connection]
blaxter_ has joined #ruby
niceguyjames has joined #ruby
decoponio has joined #ruby
blaxter_ is now known as blaxter
seich- has quit [Ping timeout: 264 seconds]
smathieu has joined #ruby
hmsimha has quit [Read error: Connection reset by peer]
mansi has quit [Remote host closed the connection]
mansi has joined #ruby
visof has joined #ruby
hmsimha has joined #ruby
Vinz_ has joined #ruby
<Vinz_>
hi
seich- has joined #ruby
<Vinz_>
do you know a way to convert 100644 into -rw-r--r-- ?
<Xeago>
Vinz_: it is octal
smathieu has quit [Ping timeout: 240 seconds]
<Xeago>
leave out the leading 100, those are flags from the first -, you likely don't need them
krz has quit [Quit: krz]
<Xeago>
r=4,w=2,x=1
hamakn has joined #ruby
<Vinz_>
so I loop through each digit of 644 and associate each one with its corresponding letters ?
hamakn has quit [Remote host closed the connection]
<wisconsin>
0600 = 0400 + 0200
mansi has quit [Ping timeout: 248 seconds]
jlebrech has joined #ruby
<wisconsin>
that's u=rw
<wisconsin>
0040 = 0040
<wisconsin>
that's g=r
<wisconsin>
0004 = 0004
<wisconsin>
that's o=r
<wisconsin>
so 0644 is u=rw, g=r, o=r
<Vinz_>
ok thanks :)
mklappstuhl has joined #ruby
cha1tanya has quit [Ping timeout: 240 seconds]
<bnagy>
6.to_s(2).split('').zip(%w(r w x)).select {|a| a.first=='1'}.map(&:last).join
tonini has quit [Remote host closed the connection]
stonevil has quit [Remote host closed the connection]
obs has joined #ruby
<Vinz_>
oh
<Vinz_>
thank you bnagy !
nari has joined #ruby
<bnagy>
pretty disgusting
<bnagy>
>> 6.to_s(2).split('').zip(%w(r w x)).map {|a| a.last if a.first=='1'}.join
<_br_>
seriously_random: well, for homeworks you normally should do some RTFM
TIJ has quit [Remote host closed the connection]
<_br_>
seriously_random: alternatively STFW, and if you have exhaused that, maybe ask.
TIJ has joined #ruby
jefflyne has quit [Ping timeout: 240 seconds]
matthieua has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
dawkirst has joined #ruby
jefflyne has joined #ruby
evenix has joined #ruby
ntus1017 has joined #ruby
jefflyne has quit [Max SendQ exceeded]
r0bgleeson has quit [Ping timeout: 264 seconds]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
whowantstolivefo has quit [Quit: who wants to live forever ?]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
jefflyne has joined #ruby
jefflyne has quit [Max SendQ exceeded]
<cads>
hey guys, I've got a little shell script that initiates small shell scripts. It takes a file name, creates a file, gives it a #!/bin/bash line, makes it executable, and then opens the file in an editor.
jefflyne has joined #ruby
<cads>
I'd like to write a couple unit tests
jefflyne has quit [Max SendQ exceeded]
<cads>
for example, it shouldn't mangle directories, or files that already exist
jefflyne has joined #ruby
<_br_>
cads: Sorry, silly question first. Why not stay in ruby all the time, why bash scripts generation? Testing a pure ruby solution would be pretty straight forward.
atno has joined #ruby
<cads>
I'd like this to happen in a small testing directory, and have the tests written in a single file - can you guys recommend a very simplistic testing so0lution?
dagen has joined #ruby
jefflyne has quit [Client Quit]
<cads>
_br_: Sure, that's a reasonable question.
[narcan] has joined #ruby
<_br_>
cads: You can always throw minitest at the problem, but scripting in pure shell makes no sense imo.
<cads>
I'm writing this just to get my shell chops up, and the reason I'm testing it is that there's a project I'd like to contribute to - it's written in shell and doesn't currently have a test suite
<_br_>
ah, ok that changes things
<cads>
yeah, it's a proof of concept to a proof of concept :)
<cads>
I can't be like "you guys, lets test in ruby!"
<cads>
unless I can... you know, test shell code in ruby, easily and comfortably
migimunz has joined #ruby
<rickruby>
whenever possible, do I want to choose to use a symbol over a string ? as in puts :"Hello World" instead of puts "Hello World" /
<_br_>
well, actually you can use ruby test for quite everything. I wrote one case where i actually used ffi bindings to rspec test c code, so the sky is the limit I guess.
<avelldiroll>
and ruby is not a bash replacement ... every tools have their domain of relevance, and ruby's domain does not recover bash's one ... hence the existence of both
migimunz has quit [Client Quit]
kreeves has joined #ruby
pranny has quit [Quit: Leaving.]
shevy has quit [Remote host closed the connection]
<_br_>
avelldiroll: Nonsense. Bash and sh for that matter, exist since much longer and are much older. Ruby, is a fully fleged general programming language, that was never intended to replace bash or sorts but its implied. Eg. Larry Wall created Perl (so he says) to replace all the mess of shell scripting and sed/awk/grep/etc. into one consistent system.
<cads>
rickruby: I use symbols as signals and keywords, like in hashes and function calls, and strings when the content is supposed to interpreted as a string of symbols, eg, written words or code.
<rickruby>
what do you mean by signals ?
<_br_>
avelldiroll: If we are talking about backwards compatibility and not needing to install a ruby vm sure. But if you have this luxory such as a many people nowadays have a python vm on default systems, scripting in bash makes no sense.
<cads>
rickmasta: like take the function dbz(9000, "I will defeat you", :fusion, :super_saiyan_mode)
<avelldiroll>
_br_: yeah ... we have n standard, let's builds a new standard to encompass them all ... now with have n+1 standard
<_br_>
avelldiroll: Nice use of XKCD, doesn't make your point stronger though.
dagen has left #ruby [#ruby]
<rickruby>
cads: oh so as parameter values
<avelldiroll>
_br_: it's much older than xkcd though
<rickruby>
so for keys and parameter values would be a good use for symbols
<cads>
rickmasta: the first two parameters are parameters that might drive the function, and generally represent information that the function will transform or use somehow
<_br_>
avelldiroll: Possibly, still. If you ever did some SERIOUS shell scripting you will agree with me. The quoting exceptions in shell are just INSANE.
<avelldiroll>
_br_: and they are many systems without a ruby or python shell available, some even mandates not to use them
<cads>
rickmasta: and the second two parameters tell the function what mode to operate in
<rickmasta>
Hey hey hey cad.
<rickmasta>
His name is rickruby. lol
<_br_>
avelldiroll: Fair enough, if you have no fancy python or ruby vm, sure.
<cads>
oops!
<avelldiroll>
_br_: every langage has its flaws, ruby is no exception
<cads>
sorry rickmasta!
<rickmasta>
No problem. haha
<cads>
okay, so one good reason to use bash over ruby, even though bash is a stinking pile
<_br_>
avelldiroll: True, but besides the point.
<rickruby>
lol
<rickruby>
was wondering why I was a master lol
<cads>
bash is pretty universally accepted
<_br_>
so are zsh, ksh, csh and many others
<cads>
you'll almost never come across an environment that doesn't have bash
<Spooner>
cads works much better than Ruby does on Windows ;)
BRMatt has joined #ruby
<avelldiroll>
_br_: that was the point you were making, as you seem to be keen on dialectics, i was just following your pointers
browndawg has joined #ruby
<rickruby>
cads: any reason I would want to avoid things like say puts :"Welcome to my homepage"
<_br_>
I don't know. If you like the torture of scripting shell go ahead. E.g. Whitespace in output. Just try to play with that, now what kind of quotation are we going to use to work around this properly in sh/bash ?
<cads>
Spooner: bash works better than ruby on windows?
<vasilakisFiL>
If I want to call an instance method from a class object can I use self.method in order to differentiate from local variable?
<cads>
Spooner: I'd be afraid to run either bash or ruby on windows without a linux vm, lol
<Spooner>
cads: I was being sarcastic. They both work on Windows, but aren't included, so Ruby wins there (since it is just better; bash's only advantage over Ruby is ubiquity on Posix).
<cads>
I'm actually considering converting the project to ruby, mostly because ruby has nicer delivery methods than shell
<cads>
but the original author is a perl/shell/haskell guy
jibi has joined #ruby
<avelldiroll>
_br_: I was just reacting to your "why ever use bash" comment ... i am just pointing it has it's use, it is not a "onesize fix all" tool either, i was just feeling that "don't use bash" was not an answer to "i want to test the env when i am creating bash script from a ruby script"
Neomex has joined #ruby
<_br_>
avelldiroll: Didn't say don't use bash. But how are you really going to test a bash script? There are x-corner cases alone in quotation you used. And Perl was even invented to fill this gap presumably.
<cads>
avelldiroll: I think that bash/zsh makes a better interactive shell than ruby.. but imo, the sooner I can elevate some code above the haphazard nature of shell, the better
<rickmasta>
I've built an app that scrapes my job's schedule, though it treats sundays as the previous week as opposed to the US standard of having Sundays as the start of the week.
<cads>
it seems like some languages are designed
<cads>
but shell //acreted//
<Spooner>
cads I used Ruby plenty on Windows for a good while and it was fine. The main problem was Posix-based devs not allowing for it (whereas they expected Windows devs to make stuff work on Posix :D).
<kalleth>
Spooner: imagemagick
<cads>
Spooner: lol
<kalleth>
personally, i never bother running ruby in windows
<avelldiroll>
i only have *nix at work or at home ... might have a windows hiding somewhere for the occasional word or visio doc ... but most of the time telling people to use a proper format is enough
<kalleth>
avelldiroll: i'm a gamer :)
<kalleth>
my personal PC Is windows
<cads>
ah, I meant to ask avelldiroll, since he's the kvm guy
<kalleth>
i have a dedicated debian box to host stuff on on the INTERWEBS
<kalleth>
and i have a macbook for work
kofno has joined #ruby
stonevil has joined #ruby
<cads>
kalleth: I have a failover box that also boots windows for my CAD software
<cads>
it makes me sad to have windows on my premises :(
<kalleth>
same here
<kalleth>
but, gamer, etc
<cads>
hehe, that's like saying "heroin addict"
<cads>
"wai yu liv in slums?" "meh, heroin addict"
bradsmith has quit [Ping timeout: 264 seconds]
<kalleth>
i use windows at home because i have to to play computer games
<kalleth>
anywhere i don't play games, i don't use windows ;)
<cads>
hmm
<cads>
I might be trying the ruby-on-windows thing to automate some solidworks tasks
<kalleth>
cads: honestly, it's just native extensions
* cads
is cringing already
<kalleth>
it's not that bad
senayar has joined #ruby
<kalleth>
rails apps/websites/etc that do anything with images, give up, because imagemagick
<kalleth>
but for most tasks you don't need native extension gems
<kalleth>
or if you do they'll compile cleanly
stonevil has quit [Ping timeout: 245 seconds]
<avelldiroll>
cads: no kvm is full virt, you can use lxc for containers (or openvz, but i prefer lxc), both are manageable from virsh or virt-manager with the same interfece
<_br_>
cads: Windows automation? Actually Windows Scripting host is pretty good otherwise this is fun: http://www.sikuli.org/
jonkri has quit [Quit: jonkri]
<cads>
hmm, I saw that a week or so ago
ahawkins has joined #ruby
<cads>
it can automate windows apps?
himsin has quit [Quit: himsin]
<ahawkins>
what's the difference between encode! and force_encoding
<cads>
I saw it used in the contenxt of browser automation
<cads>
ahawkins: you say the first one with force!
<cads>
and the second one is like 'meh, forced it'
<cads>
sorry, I am just kidding - I don't know the answer here
OffTheRails has quit [Read error: Connection reset by peer]
<cads>
thanks guys for the input in ruby based testing
pranny has joined #ruby
OffTheRails has joined #ruby
nfk has joined #ruby
ldnunes has joined #ruby
osvico has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
xcthulhu has quit [Quit: xcthulhu]
niKeITA has quit [Quit: sleep]
razi has joined #ruby
pranny has quit [Client Quit]
Maoko has joined #ruby
Neomex has quit [Quit: Neomex]
geekbri has joined #ruby
anildigital is now known as _anildigital
OffTheRails has quit [Ping timeout: 264 seconds]
endash has quit [Quit: endash]
mansi has joined #ruby
gokul has quit [Quit: Leaving]
axeman- has quit [Ping timeout: 245 seconds]
niKeITA has joined #ruby
_droid has left #ruby [#ruby]
axeman- has joined #ruby
<_br_>
ahawkins: #force_encode is a sledge hammer. It will hammer your result into that encoding. #encode will try to use more sense. #encode! is just #encode but instead of returning the result it will override the string its called upon.
sahil has quit [Ping timeout: 245 seconds]
<ahawkins>
_br_: so I have a string in some other encoding, I should use encode?
fuhgeddaboudit has quit [Ping timeout: 240 seconds]
<emilevictor>
hi all, I'm trying to install a gem using 'gem install twitter' on my remote server, but it gives me the error "ERROR: Could not find a valid gem 'twitter' (>= 0) in any repository". I can curl rubygems.org, but I can't ping it for some reason
relix has joined #ruby
r0bgleeson has joined #ruby
relix has quit [Client Quit]
relix has joined #ruby
Drekonus has joined #ruby
Drekonus has quit [Max SendQ exceeded]
mansi has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
cjs226 has joined #ruby
Drekonus has joined #ruby
Drekonus has quit [Max SendQ exceeded]
mansi has joined #ruby
moura has joined #ruby
anay has quit [Remote host closed the connection]
moura has quit [Max SendQ exceeded]
GeissT has quit [Quit: MillBroChat AdIRC User]
apakatt has joined #ruby
moura has joined #ruby
moura has quit [Max SendQ exceeded]
gazarsgo has joined #ruby
<brisbin>
emilevictor: try with --verbose
moura has joined #ruby
<emilevictor>
thanks
moura has quit [Excess Flood]
<emilevictor>
you from brissie too?
<brisbin>
nope, boston
<emilevictor>
lol
<emilevictor>
fair enough. your nick is similar to my hometown's name
heftig has quit [Quit: Quitting]
<brisbin>
cool, it's really similar to my last name ;)
sambao21 has quit [Quit: Computer has gone to sleep.]
huoxito has quit [Ping timeout: 246 seconds]
BillCriswell has joined #ruby
asteve has joined #ruby
d2dchat has joined #ruby
pupoque_ has joined #ruby
BillCriswell has quit [Remote host closed the connection]
S0da has quit [Ping timeout: 268 seconds]
BillCriswell has joined #ruby
Guest10893 has joined #ruby
S0da has joined #ruby
brbcoding has joined #ruby
mary5030 has joined #ruby
yacks has joined #ruby
orionstein_away is now known as orionstein
h4mz1d has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
senayar has quit [Read error: Connection reset by peer]
Takehiro has joined #ruby
pierre1 has quit [Remote host closed the connection]
ehc has joined #ruby
rodacato has quit [Remote host closed the connection]
kreisys has joined #ruby
Neomex has quit [Quit: Neomex]
bamdad has joined #ruby
k0rupted has quit [Ping timeout: 260 seconds]
h4mz1d has joined #ruby
k0rupted__ has quit [Ping timeout: 276 seconds]
ebanoid has quit [Quit: brbomgwtfbbq]
zeroXten has left #ruby [#ruby]
blz37 has quit [Ping timeout: 276 seconds]
anildigital is now known as _anildigital
xcthulhu_ has joined #ruby
xcthulhu has quit [Ping timeout: 245 seconds]
xcthulhu_ is now known as xcthulhu
Kricir has joined #ruby
anay has joined #ruby
JZTech101 has joined #ruby
huoxito has joined #ruby
bradsmith has joined #ruby
codezombie has joined #ruby
thesheff17 has joined #ruby
stayarrr has joined #ruby
Cyrus has quit [Quit: Cyrus.sleep()]
thepumpkin has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
rodacato has joined #ruby
predator217 has quit [Ping timeout: 245 seconds]
Spooner has quit [Remote host closed the connection]
Emmanuel_Chanel_ has joined #ruby
h4mz1d has quit [Ping timeout: 260 seconds]
noop has quit [Ping timeout: 264 seconds]
senayar has joined #ruby
blz37 has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 245 seconds]
xcv has joined #ruby
k0rupted__ has joined #ruby
jerius has joined #ruby
bradhe has joined #ruby
k0rupted has joined #ruby
anay has quit [Remote host closed the connection]
hogeo has joined #ruby
fredjean has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
h4mz1d has joined #ruby
dphase has joined #ruby
burlyscudd has joined #ruby
jerius_ has quit [Ping timeout: 268 seconds]
NealJ has quit [Quit: :c]
fredjean has quit [Client Quit]
Uranio has joined #ruby
bradhe has quit [Ping timeout: 246 seconds]
baroquebobcat has joined #ruby
senayar has quit [Read error: Connection reset by peer]
stonevil has quit [Remote host closed the connection]
k0rupted has quit [Ping timeout: 260 seconds]
k0rupted has joined #ruby
k0rupted__ has quit [Ping timeout: 276 seconds]
k0rupted_ has joined #ruby
mark_locklear has joined #ruby
stonevil has joined #ruby
carlyle has quit [Read error: Connection reset by peer]
carlyle has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
sambao21 has quit [Quit: Computer has gone to sleep.]
bradsmith has quit [Remote host closed the connection]
Diranged has joined #ruby
v0n has joined #ruby
<Diranged>
is there a ruby lint checker that works in ruby 1.8?
arya_ has joined #ruby
jasonsmr has joined #ruby
mmitchell has joined #ruby
<mjc_>
is making a native extension still the recommended/only way to specify different versions of gems depending on the ruby version the installee is using?
zachrab has joined #ruby
m104 has joined #ruby
m104 has quit [Max SendQ exceeded]
acrussell has joined #ruby
ffio_ has joined #ruby
ffio has quit [Ping timeout: 245 seconds]
dshap has joined #ruby
h4mz1d has quit [Ping timeout: 256 seconds]
kaspergrubbe has quit [Ping timeout: 245 seconds]
geggam has joined #ruby
<dshap>
Hey all - i've never worked with ruby before but I need to install a gem to get a vim plugin to work. The instructions say to run this command "gem install redcarpet pygments.rb" but when I do that it says "Failed to build gem native extension" with a bunch of other error logging
<mjc_>
Diranged: ruby 1.8 is unsupported, you should upgrade. that said ruby -c should do a syntax check, otherwise I'm not aware of any
<dshap>
not sure what's going on to be honest
burlyscudd has quit [Quit: Leaving.]
pen has joined #ruby
bradsmith has joined #ruby
<terrellt>
dshap: Github says it has no system dependencies - what OS are you on?
<dshap>
OS X 10.6.8
<dshap>
terrellt: ^
<terrellt>
dshap: What version of ruby?
<dshap>
terrellt: 1.8.7
<terrellt>
dshap: Latest version of redcarpet requires 1.9.2
<dshap>
well that explains it!
<Diranged>
mjc_: im not planning on upgrading any time soon, we use ruby in al imited fashion here. primarily used in our custom Puppet modules..
<dshap>
alright, guess ill upgrade my ruby
<dshap>
terrellt: thanks
<cr3>
how can I set a breakpoint in my source code?
<Diranged>
mc_but ill keep looking around..
Krajsnick has joined #ruby
<terrellt>
dshap: No problem. As an aside, the pygments.rb definitely should not be there.
babykosh has joined #ruby
Judge has quit [Remote host closed the connection]
senayar has joined #ruby
babykosh has quit [Client Quit]
h4mz1d has joined #ruby
<terrellt>
Oh, I lied.
<terrellt>
It's installing two gems - redcarpet and a gem called pygments.rb.
<terrellt>
Who puts a dot in their gem name, psh.
<brisbin>
cr3: require 'debugger' then put "debugger" where you want to stop, you'll be in a gdb like environment from which you can step, set more breakpoints etc
<brisbin>
cr3: i would also recommend you look into pry
yalue has quit [Read error: Connection reset by peer]
kobain has joined #ruby
<cr3>
brisbin: thanks, I'll give that a try
seich- has quit [Ping timeout: 245 seconds]
Kricir has joined #ruby
threesome has joined #ruby
<mjc_>
Diranged: are you looking specifically to catch stuff not compatible with 1.8? or just a general linter
akells` has joined #ruby
Guest10893 has quit [Ping timeout: 256 seconds]
<Diranged>
mjc_: just a generic linter..
Takehiro has quit [Remote host closed the connection]
<mjc_>
Diranged: you could use ruby-lint or pelusa (depending on what kind of feedback you're after) and just look manually for things not compatible with 1.8
<Diranged>
ruby-lint only supports ruby 1.9+..
vasilakisFiL has left #ruby ["Konversation terminated!"]
bluenemo has joined #ruby
<Diranged>
ill look at pelusa
<Diranged>
im looking less for syntax (though thats obviously important) and more for style guideline following
io_syl has joined #ruby
<Diranged>
similar to pep8… or puppet-lint (which does both really)
habanany has quit [Read error: Connection reset by peer]
Kricir has quit [Ping timeout: 245 seconds]
<cr3>
brisbin: I'm on ubuntu and I can't seem to gem install debugger, I get: extconf.rb:16:in `require': no such file to load -- debugger/ruby_core_source (LoadError)
habanany has joined #ruby
<brisbin>
cr3: which version of ruby?
<terrellt>
Does rubocop work with 1.8.7?
<dshap>
terrellt: hah, got it, ty
* terrellt
doesn't know.
fess has joined #ruby
akells` has quit [Ping timeout: 256 seconds]
h4mz1d has quit [Ping timeout: 256 seconds]
<cr3>
brisbin: 1.8.7
jefflyne has quit [Ping timeout: 268 seconds]
devoldmx has quit [Read error: Connection reset by peer]
<mjc_>
Diranged: you can run ruby-lint from rubinius on your 1.8 ruby files
<mjc_>
Diranged: use something like chruby or rvm to manage your ruby versions and you're all set
<cr3>
brisbin: cheers!
jsummerfield has joined #ruby
northelks has quit [Ping timeout: 264 seconds]
sambao21 has quit [Client Quit]
devoldmx has quit [Read error: Connection reset by peer]
Krajsnick has quit [Remote host closed the connection]
Giorgio has joined #ruby
Spooner has joined #ruby
gemmy has joined #ruby
aganov has quit [Remote host closed the connection]
devoldmx has joined #ruby
cj3kim has joined #ruby
krz has joined #ruby
graft has quit [Ping timeout: 240 seconds]
lnormous has joined #ruby
Takehiro has joined #ruby
sambao21 has joined #ruby
cha1tanya has joined #ruby
ckrailo has joined #ruby
visof has quit [Remote host closed the connection]
seich- has joined #ruby
Myconix has joined #ruby
bzitzow has joined #ruby
mikecmpbll has joined #ruby
Catbuntu has quit [Remote host closed the connection]
kreisys has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
jblack has joined #ruby
Kruppe has quit [Remote host closed the connection]
ssvo has quit [Ping timeout: 248 seconds]
cj3kim has quit [Ping timeout: 245 seconds]
Mathieu has joined #ruby
bigoldrock has joined #ruby
x1337807x has joined #ruby
krz has quit [Quit: krz]
krz has joined #ruby
krz has quit [Changing host]
krz has joined #ruby
zachrab has quit [Remote host closed the connection]
krz has quit [Client Quit]
tjbiddle has joined #ruby
stonevil has quit [Remote host closed the connection]
krz has joined #ruby
krz has quit [Read error: Connection reset by peer]
machuga is now known as machuga|away
danman has quit [Ping timeout: 246 seconds]
tjbiddle_ has joined #ruby
noname001 has quit [Ping timeout: 240 seconds]
DestinyAwaits has joined #ruby
bigoldrock has left #ruby [#ruby]
himsin has joined #ruby
DestinyAwaits has quit [Max SendQ exceeded]
vikhyat_ has quit [Ping timeout: 245 seconds]
rickmasta has joined #ruby
DestinyAwaits has joined #ruby
io_syl has quit [Quit: io_syl]
vikhyat has joined #ruby
graft has joined #ruby
graft has quit [Changing host]
graft has joined #ruby
mikepack has quit [Remote host closed the connection]
d2dchat has quit [Remote host closed the connection]
woolite64 has quit [Quit: Leaving]
tjbiddle has quit [Ping timeout: 245 seconds]
tjbiddle_ is now known as tjbiddle
sunya7a has joined #ruby
tobyo has joined #ruby
nezumi has quit [Ping timeout: 264 seconds]
urielable has joined #ruby
Megtastique has quit [Quit: Megtastique]
vikhyat has quit [Read error: Connection reset by peer]
Mon_Ouie has joined #ruby
Mon_Ouie has joined #ruby
BizarreCake has quit [Remote host closed the connection]
<sunya7a>
I have two strings: "delta in DBP" and "DBP in adults" ... I would like to somehow compare these and determine whether these two string have any words in common, without knowing which word beforehand. Is there a method in ruby or rails that allows me to compare these easily? my brute force way would be to break up the strings and compare each word.
maxmanders has quit [Quit: Computer has gone to sleep.]
SirFunk has quit [Ping timeout: 264 seconds]
scarolan has joined #ruby
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
browndawg has joined #ruby
razi has quit [Ping timeout: 245 seconds]
mosheee has joined #ruby
tkuchiki has quit [Ping timeout: 264 seconds]
justinmcp has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
ned has quit [Ping timeout: 240 seconds]
vikhyat has quit [Ping timeout: 256 seconds]
_bart has quit [Remote host closed the connection]
DestinyAwaits has quit [Quit: Leaving]
oddraisin has quit [Ping timeout: 240 seconds]
thisirs has quit [Remote host closed the connection]
autumn has quit [Ping timeout: 240 seconds]
vikhyat has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
m8 has joined #ruby
hogeo has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
milardovich has joined #ruby
akells` has quit [Remote host closed the connection]
stkowski has joined #ruby
spider-mario has joined #ruby
justinmcp has quit [Client Quit]
dagen has left #ruby [#ruby]
Nightmare has quit [Ping timeout: 260 seconds]
bamdad has quit [Quit: bamdad]
scarolan has joined #ruby
autumn has joined #ruby
justinmcp has joined #ruby
urielable has left #ruby [#ruby]
SirFunk has joined #ruby
babykosh has joined #ruby
Villadelfia has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
derf- has quit [Ping timeout: 245 seconds]
nadirvar_ has quit [Quit: Computer has gone to sleep.]
bradhe has quit [Remote host closed the connection]
predator117 has joined #ruby
oddraisin has joined #ruby
S0da has quit [Remote host closed the connection]
frikii has joined #ruby
Villadelfia has joined #ruby
mahmoudi_ has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
derf- has joined #ruby
blueOxigen has quit [Ping timeout: 240 seconds]
brennanMKE has quit [Remote host closed the connection]
scarolan has joined #ruby
troessner has quit [Quit: Leaving]
tgunr has quit [Read error: Connection reset by peer]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
tgunr_ has joined #ruby
Floydzy has quit [Quit: Floydzy]
justinmcp has joined #ruby
pskosinski has joined #ruby
mark_locklear has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
PhatBaja has quit [Quit: Leaving.]
PhatBaja has joined #ruby
timonv has quit [Remote host closed the connection]
andres833 has joined #ruby
blackmesa has joined #ruby
trepidaciousMBR has quit [Ping timeout: 245 seconds]
scarolan has quit [Ping timeout: 245 seconds]
krz has joined #ruby
Guest99267 has quit [Remote host closed the connection]
SirFunk has quit [Remote host closed the connection]
Giddeon has quit []
pskosinski has quit [Client Quit]
Krajsnick has joined #ruby
scarolan has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
justinmcp has quit [Client Quit]
cantonic has quit [Quit: cantonic]
alex__c2022 has quit [Quit: alex__c2022]
thiagopnts has joined #ruby
thiagopnts has joined #ruby
devoldmx has joined #ruby
bradhe has joined #ruby
justinmcp has joined #ruby
mephux_ has joined #ruby
x1337807x has joined #ruby
zeade has quit [Quit: Leaving.]
zeade has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
soulcake has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
tvw has quit []
thomasle_ has joined #ruby
noop has joined #ruby
scarolan has joined #ruby
Zai00 has quit [Quit: Zai00]
justinmcp has quit [Client Quit]
himsin has quit [Quit: himsin]
xcthulhu has quit [Quit: xcthulhu]
justinmcp has joined #ruby
krz has quit [Quit: krz]
milardovich has quit [Quit: Leaving]
Rubba has joined #ruby
Pandee has joined #ruby
aqil has joined #ruby
scarolan has quit [Ping timeout: 245 seconds]
stonevil has quit [Remote host closed the connection]
scarolan has joined #ruby
rdark has quit [Quit: leaving]
mityaz has joined #ruby
DanKnox_away is now known as DanKnox
skaflem has quit [Quit: This computer has gone to sleep]
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
rickruby has quit [Remote host closed the connection]
justinmcp has joined #ruby
endash has joined #ruby
stonevil has joined #ruby
millerti has joined #ruby
benlieb has joined #ruby
schickung has quit [Quit: schickung]
Lewix has quit [Remote host closed the connection]
<millerti>
Hi, all. I must be having a major brainfart, because I can't figure out why this line of code gives me a syntax error. It's complaining about the colon of the ternary operator: mine = l[(ideal?0:1)].split(" ")[3].to_f Any ideas?
seich- has joined #ruby
<millerti>
Syntax error during parsing.
ColKurtz has joined #ruby
<fryguy>
millerti: try to space out the ternary operator
<fryguy>
ideal? is a method call, not ideal + a ternary operator
<millerti>
I get it now. Thanks!
krz has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
krz has quit [Client Quit]
akells` has joined #ruby
justinmcp has quit [Client Quit]
justinmcp has joined #ruby
nadirvar_ has joined #ruby
stonevil has quit [Ping timeout: 256 seconds]
xcv has quit [Remote host closed the connection]
wald0 has joined #ruby
apeiros has joined #ruby
devoldmx has joined #ruby
<wald0>
if I use an FFI that references to a C lib/API, how ruby manages its equivalent "pointers" ?
browndawg has left #ruby [#ruby]
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
devoldmx3 has joined #ruby
cha1tanya has quit [Quit: cha1tanya]
sambao21 has joined #ruby
adambeynon has quit [Ping timeout: 240 seconds]
mahmoudi_ is now known as mahmoudimus
mephux_ is now known as mephux
gemmy has quit [Ping timeout: 245 seconds]
blueOxigen has joined #ruby
iamalexalright has left #ruby ["Leaving"]
stuff has quit [Disconnected by services]
arya_ has quit []
justinmcp has quit [Quit: No Ping reply in 180 seconds.]
bluOxigen has quit [Ping timeout: 246 seconds]
devoldmx has quit [Read error: Connection reset by peer]
justinmcp has joined #ruby
devoldmx has joined #ruby
krz has joined #ruby
gyre007 has quit [Remote host closed the connection]
bluOxigen has joined #ruby
workmad3 has joined #ruby
skaflem has joined #ruby
devoldmx3 has quit [Ping timeout: 246 seconds]
johnnyfuchs has joined #ruby
Nightmare has joined #ruby
dash_ has quit [Ping timeout: 256 seconds]
[1]Encosi has joined #ruby
elaptics is now known as elaptics`away
amacgregor has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
devoldmx3 has joined #ruby
motto has joined #ruby
tyman has quit [Quit: tyman]
krz has quit [Quit: krz]
arya_ has joined #ruby
Encosi has quit [Ping timeout: 248 seconds]
[1]Encosi is now known as Encosi
adambeynon has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
axeman- has quit [Remote host closed the connection]
devoldmx has joined #ruby
workmad3 has quit [Ping timeout: 264 seconds]
m8 has quit [Ping timeout: 245 seconds]
Catbuntu has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
habanany has joined #ruby
devoldmx3 has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
arya__ has joined #ruby
Floydzy has joined #ruby
vikhyat_ has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
arya__ has quit [Read error: Connection reset by peer]
<wald0>
nobody knows :)
devoldmx has joined #ruby
arya_ has quit [Ping timeout: 268 seconds]
Kricir has joined #ruby
fmcgeough has quit [Quit: fmcgeough]
neonlex has joined #ruby
suyase has joined #ruby
vikhyat has quit [Ping timeout: 268 seconds]
<suyase>
what is wait() in ruby?
Drekonus has joined #ruby
arya_ has joined #ruby
<onewheelskyward>
I guess that depends on what wait() was in that other language you're speaking about.
<suyase>
Sorry, I ran across this ruby snippet that is failing to run correctly, and it calls "wait"
Diranged has left #ruby [#ruby]
<aedorn>
Process.wait?
<onewheelskyward>
hmm. I don't know of a wait, only a sleep.
bradsmith has quit [Remote host closed the connection]
rickruby has joined #ruby
Eagle_Eyes has joined #ruby
akells` has quit [Remote host closed the connection]
<Eagle_Eyes>
Hello Everybody...
vikhyat_ has quit [Ping timeout: 256 seconds]
gyre007 has joined #ruby
Eagle_Eyes has left #ruby [#ruby]
timonv has joined #ruby
gemmy has joined #ruby
<OffTheRails>
Hello Dr Nick
vikhyat_ has joined #ruby
Senjai has quit [Read error: Operation timed out]
ctp has quit [Quit: Leaving...]
maasdesginer has left #ruby ["quit"]
klip has joined #ruby
motto has joined #ruby
jazzanova has joined #ruby
vikhyat has quit [Ping timeout: 260 seconds]
randomautomator has joined #ruby
mansi has quit [Read error: Connection reset by peer]
<jazzanova>
trying to parse csv with \, commas escaped. It doesn't work. Using FasterCSV
maasdesigner1 has joined #ruby
devoldmx has joined #ruby
mansi has joined #ruby
maasdesigner1 has quit [Client Quit]
thesheff17 has joined #ruby
benlieb has quit [Quit: benlieb]
m8 has quit [Ping timeout: 264 seconds]
<jazzanova>
how do I parse: a, b\, c ? it should become ['a', 'b, c']
pskosinski has joined #ruby
Uranio has joined #ruby
mansi has quit [Read error: Connection reset by peer]
maasdesigner1 has joined #ruby
pskosinski has quit [Remote host closed the connection]
mansi has joined #ruby
maasdesigner1 is now known as maasdesigner
<Rubba>
i have an array of hashes [{"a"=>2,"b"=>3,"c"=>1} , {"a"=>4,"b"=>0,"c"=>5}] what's the easiest way to get the sum hash? {"a"=>6","b"=>3,"c"=>6}
arya_ has quit [Ping timeout: 246 seconds]
soulcake has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
s2013 has quit [Quit: Leaving]
swordsmanz has joined #ruby
workmad3 has joined #ruby
ehc has joined #ruby
bradsmith has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
sayan has quit [Ping timeout: 264 seconds]
blaxter has quit [Ping timeout: 264 seconds]
eldariof has joined #ruby
devoldmx has quit [Read error: Connection reset by peer]
bluOxigen has quit [Read error: Connection reset by peer]
<MrZYX>
.map(&:to_a).flatten(1).each_with_object(Hash.new(0)) {|item, sum| k, v = item; sum[k] += v } there's probably something prettier
bluOxigen has joined #ruby
brennanMKE has joined #ruby
Giorgio has quit [Ping timeout: 264 seconds]
mwmnj has joined #ruby
Al_ has joined #ruby
freakazoid0223 has left #ruby ["Leaving"]
amacgregor has quit [Read error: Connection reset by peer]
amacgregor has joined #ruby
devoldmx has joined #ruby
Kricir has joined #ruby
interactionjaxsn has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
Takehiro has joined #ruby
alex__c2022 has joined #ruby
brennanMKE has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
ravster has quit [Ping timeout: 264 seconds]
stonevil has joined #ruby
poga has quit [Remote host closed the connection]
ewnd9 has joined #ruby
eldariof has quit [Read error: No route to host]
Kricir has quit [Ping timeout: 246 seconds]
Takehiro has quit [Remote host closed the connection]
eldariof has joined #ruby
decoponio has quit [Quit: Leaving...]
arya_ has quit [Read error: Connection reset by peer]
dash_ has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
bradhe has quit [Remote host closed the connection]
nfk has quit [Quit: yawn]
axeman- has joined #ruby
bradhe has joined #ruby
Vivekananda has joined #ruby
cha1tanya has joined #ruby
cha1tanya has quit [Changing host]
cha1tanya has joined #ruby
sayan has joined #ruby
braoru has joined #ruby
b_ has joined #ruby
amacgregor has quit [Ping timeout: 245 seconds]
Es0teric has joined #ruby
Krajsnick has quit [Read error: Connection reset by peer]
mmitchel_ has quit [Remote host closed the connection]
b_ has quit [Quit: Leaving]
mmitchel_ has joined #ruby
Zolo has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Astralum has joined #ruby
S0da has quit [Ping timeout: 264 seconds]
x1337807x has joined #ruby
ryannielson has joined #ruby
S0da has joined #ruby
x1337807x has quit [Client Quit]
vlad_starkov has joined #ruby
Notte has joined #ruby
<Rubba>
if my hash has multiple classes e.g. String and BigDecimal, can i choose which type to operate on in an inject?
Diranged has left #ruby [#ruby]
bradsmith has quit [Remote host closed the connection]
<Rubba>
i have row.inject { |sum,c| sum + c.last if c.last.class == BigDecimal }
xcv has quit [Remote host closed the connection]
Spami has quit [Quit: Leaving]
<Rubba>
but that's giving me "undefined method + for nil:NilClass"
teddyp1cker has joined #ruby
grillermo has joined #ruby
<Rubba>
i realize i could use an .each but i was wondering how it's done with inject
pyrac has quit [Ping timeout: 276 seconds]
x1337807x has joined #ruby
Krajsnick has quit [Remote host closed the connection]
akells` has joined #ruby
mywebcompute has quit [Ping timeout: 245 seconds]
<mjc_>
Rubba: probably better to use .respond_to? in either case
<mjc_>
IMO
orionstein is now known as orionstein_away
smathieu_ has quit [Remote host closed the connection]
Krajsnick has joined #ruby
RichardBaker has joined #ruby
ryannielson has left #ruby [#ruby]
smathieu has joined #ruby
devoldmx3 has joined #ruby
<MasterAsia>
self.is_required? ? return Foo::Constant : return false <---Error, the namespace separator is throwing it off
<MasterAsia>
not possible?
pyrac has joined #ruby
<terrellt>
() is your friend.
<MasterAsia>
terrellt: You're everywhere.
akells`_ has joined #ruby
* terrellt
totally is.
akells` has quit [Read error: Connection reset by peer]
<MasterAsia>
Btw fixed it by removing the returns.
<MasterAsia>
Ahaha.
<terrellt>
That too.
blueOxigen has joined #ruby
bluOxigen has quit [Ping timeout: 246 seconds]
Kricir has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
ewnd9 has quit [Ping timeout: 245 seconds]
robscomputer has joined #ruby
bradsmith has joined #ruby
axeman- has quit [Remote host closed the connection]
aqil has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
soulcake has joined #ruby
jb41 has joined #ruby
timonv has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
bricker has quit [Quit: leaving]
freerobby has joined #ruby
jfelchner has joined #ruby
Lewix has joined #ruby
habanany has quit [Ping timeout: 260 seconds]
_bart has joined #ruby
cpruitt has joined #ruby
Al_ has quit [Quit: Al_]
bklane_ has quit [Remote host closed the connection]
ahawkins has joined #ruby
maasdesigner has quit [Quit: maasdesigner.com]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrThePlague has quit [Read error: Connection reset by peer]
pskosinski has joined #ruby
MrThePlague has joined #ruby
MrThePlague has joined #ruby
MrThePlague has quit [Changing host]
tommyvyo has quit [Quit:]
timeout has quit [Quit: leaving]
soulcake has quit [Read error: Connection reset by peer]
LucidDreamZzZz has joined #ruby
saarinen has quit [Quit: saarinen]
Takehiro has quit [Remote host closed the connection]
LucidDreamZzZ has quit [Ping timeout: 240 seconds]
pyrac has quit [Quit: pyrac]
jlast has quit [Ping timeout: 256 seconds]
bricker has joined #ruby
akells`_ has quit [Remote host closed the connection]
jlast has joined #ruby
neonlex has quit [Quit: neonlex]
gyre007 has quit [Remote host closed the connection]
asgardBSD_ has joined #ruby
wald0 has quit [Quit: Lost terminal]
rupee has joined #ruby
soulcake has joined #ruby
tatsuya_o has joined #ruby
asgardBSD has quit [Ping timeout: 264 seconds]
ehaliewicz has joined #ruby
geekbri has joined #ruby
maxmanders has joined #ruby
havenwood has joined #ruby
stonevil has quit [Remote host closed the connection]
bklane has joined #ruby
babykosh has quit [Quit: babykosh]
Kricir has joined #ruby
thepumpkin has quit [Read error: Connection reset by peer]
thepumpkin has joined #ruby
unstable has joined #ruby
smathieu_ has joined #ruby
smathieu_ has quit [Remote host closed the connection]
orolo is now known as todd_work
<jb41>
somebody know any good gem for financial data?
smathieu_ has joined #ruby
<Rubba>
what's ruby equivalent of .= in php?
timonv has quit [Remote host closed the connection]
<terrellt>
+=
<Rubba>
ah
<jb41>
I have, much data of transactions, and I've to make a candlestick chart from it, for example
<unstable>
I want to search a dictionary file, and only print out words that have 5 different letters in the word. I know I can do an individual word like 'dog'.include?('d') returns true, though how can I parse all the words in a dictionary and output ones that have d and o and g in them?
<unstable>
cleaning without repeating .include? n times
maroloccio has quit [Ping timeout: 268 seconds]
artm has joined #ruby
fermion has quit [Ping timeout: 264 seconds]
artm has quit [Client Quit]
d2dchat has joined #ruby
smathieu has quit [Ping timeout: 256 seconds]
<terrellt>
That have all three letters in any order?
mmitchell has joined #ruby
<terrellt>
Or that have one of those letters?
mmitchell has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 264 seconds]
jonahR has joined #ruby
mmitchel_ has quit [Read error: Connection reset by peer]
mmitchell has joined #ruby
nomenkun has joined #ruby
xcthulhu has quit [Quit: xcthulhu]
<unstable>
terrellt: yes, in any order, all 3.
bradhe has quit [Remote host closed the connection]
<terrellt>
I can't think of anything with lower complexity.
apeiros has joined #ruby
bradhe has joined #ruby
jbpros has joined #ruby
<terrellt>
You can do "string_of_letters".split("").permutation.map(&:join).include?(checking_word), but that's a big loop.
maroloccio has joined #ruby
<fryguy>
if you plan on doing multiple queries instead of just dog, you can preprocess the wordlist into somethign like a gaddag
<fryguy>
which will make all lookups faster
xcthulhu has joined #ruby
DrShoggoth has joined #ruby
ravster has quit [Ping timeout: 245 seconds]
apeiros has quit [Ping timeout: 264 seconds]
xcthulhu has quit [Client Quit]
bradhe has quit [Ping timeout: 246 seconds]
thiagopnts has quit [Quit: Leaving.]
smathieu_ has quit [Remote host closed the connection]
BrianJ has joined #ruby
sambao21 has joined #ruby
axl_ has quit [Quit: axl_]
grillermo has quit [Quit: bandtastic.me]
smathieu has joined #ruby
smathieu has quit [Remote host closed the connection]
oddraisin has quit [Quit: leaving]
eldariof has quit [Ping timeout: 264 seconds]
io_syl has quit [Remote host closed the connection]
<BrianJ>
Kinda confused around doing text replace for an xml file using ruby. http://pastie.org/8191170
smathieu has joined #ruby
<terrellt>
BrianJ: Use a ruby parser. Nokogiri works quite well.
<BrianJ>
right, but the key value section is different than the typical examples
io_syl has joined #ruby
xcthulhu has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
saarinen has joined #ruby
moeSeth has quit [Ping timeout: 264 seconds]
pcarrier has quit [Ping timeout: 245 seconds]
<havenwood>
unstable: guess you could do a #find_all with an #all, just its a nested loop
<havenwood>
>> %w[dog god gop pog].find_all { |word| %w[g o d].all? { |letter| word.include? letter } }
asgardBSD_ has quit [Remote host closed the connection]
_droid has joined #ruby
<_droid>
hi peole, i have installed ruby 1.9.1 and wanted to install a gem called mongrel. when entering the command in my terminal I get the following output: http://pastebin.com/kD6VMsg6
ravster has joined #ruby
<havenwood>
_droid: I hope by 1.9.1 you mean you're using apt-get package (so 1.9.3)?
andres833 has quit [Quit: Saliendo]
<havenwood>
(the actual 1.9.1 is not a stable release and should *never* be used)
MrZYX has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
mark_locklear has quit [Ping timeout: 245 seconds]
amacgregor has joined #ruby
<_droid>
havenwood: kubuntu has in it's repositories 1.8, so I should install 1.8??
dash_ has quit [Ping timeout: 264 seconds]
<terrellt>
havenwood BrianJ: irb says regex is way faster.
JimmyAtCMU has joined #ruby
<havenwood>
_droid: 1.8 is officially End-of-Life but there aren't any un-patched security vulns yet. In any case, 2.0.0-p247 is the latest stable release.
<havenwood>
terrellt: yeah, i haven't benched but it seem it ought be
louism2wash has joined #ruby
<_droid>
havenwood: is there a way to update it from the gem command?
Kricir has quit [Read error: Connection reset by peer]
Kricir has joined #ruby
<havenwood>
terrellt: oh, nvm - i got confused between convos - oops!
BillCriswell has quit [Remote host closed the connection]
<JimmyAtCMU>
Hi folks, a quick question: what's the best way to learn Ruby 2 thoroughly? (I have programming experience with C and Python, but *not* Ruby)
bklane has quit [Remote host closed the connection]
<havenwood>
_droid: You can update RubyGems (the `gem` command) with `gem update --system` but not Ruby.
bklane has joined #ruby
<_droid>
havenwood: well I have only 1.8 and 1.9.1 as a choice
<havenwood>
_droid: You can build Ruby from source, or use a tool like RVM, chruby/ruby-install or rbenv/ruby-build to install and manage for you.
<havenwood>
_droid: the 1.9.1 on apt-get should actually be 1.9.3
gemmy has joined #ruby
<havenwood>
_droid: What do you get for?: ruby -v
dash_ has joined #ruby
<louism2wash>
Hey guys, if I create a module and then inside that module I open up the array class and change the to_s method, what is the scope of that change? Will the change I made only be scoped to where I include the module? Thanks!! https://gist.github.com/louism2/369ac90f65cf475e5137
maroloccio has quit [Ping timeout: 268 seconds]
jlast has quit [Remote host closed the connection]
machuga is now known as machuga|away
mikepack_ has joined #ruby
x1337807x has joined #ruby
mikepack has quit [Read error: Connection reset by peer]
<_droid>
havenwood: for some wierd reason ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]
sayan has quit [Ping timeout: 245 seconds]
BillCriswell has joined #ruby
<_droid>
havenwood: although when I run apt-cache search ruby I get the 1.8 and 1.9.1 version
<havenwood>
louism2wash: You are currently opening up MyModule::Array, if you want to freedom patch, open up ::Array not Array.
nomenkun has quit [Remote host closed the connection]
bradhe has joined #ruby
<havenwood>
louism2wash: just a "::" in front of "Array" should do the trick (pointing to the globally scoped Array)
<louism2wash>
havenwood: so I am really only changing the Array class within the scope of 'MyModule"
<louism2wash>
?
<terrellt>
lousm2wash: You didn't open up a class so much as defined a new one, to my understanding.
<havenwood>
louism2wash: No, that one is an empty class.
<havenwood>
louism2wash: Yeah, what terrellt said.
<terrellt>
Which is interesting.
tommyvyo has joined #ruby
<terrellt>
Can you monkeypatch via module MyModule class Array < ::Array?
fcahoon has joined #ruby
<havenwood>
louism2wash: You could do a scoped Array by inheriting, like ^
Bry8Star{T2 has quit [Remote host closed the connection]
maxmanders has joined #ruby
<louism2wash>
I appreciate everyone's help, but just to make sure I understand, in my previous example I am not changing the 'to_s' method in class Array I am simply creating a new class?
<terrellt>
louism2wash: Yes. You defined a new class MyModule::Array.
<havenwood>
louism2wash: Yes, you are creating an entirely new MyModule::Array that is unlrelated to Array.
BZaidan has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
Bry8Star{T2 has joined #ruby
kpshek has quit []
<havenwood>
louism2wash: You can do what terrellt suggests and "Array < ::Array" if you want to first have MyModule::Array inherit from Array then monkeypatch it.
maz-dev has quit [Remote host closed the connection]
<jb41>
I have an array of hashes. Every hash has 'time' key. I want to split that array into array of arrays of hashes, depending on that time value - for example in array[0] are hashes with 'time' value 0-10, in array[1] 11-20 and so on. What solution will be best for that?
<_droid>
havenwood: i get for ruby -v : ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux] although I clearly installed 1.9.1
kpshek has joined #ruby
<terrellt>
apt-get ruby is no good, bud.
Senjai has quit [Ping timeout: 245 seconds]
<_droid>
terrellt: talking to me?
<havenwood>
_droid: Yeah, Debian has a bizarro thing where they confuse the heck outta everyone by naming 1.9.3 as 1.9.1.
dash_ has quit [Quit: dash_]
<terrellt>
Yeah.
teddyp1cker has quit [Remote host closed the connection]
<_droid>
havenwood: ok, now where to I go from there?
BZaidan has left #ruby [#ruby]
<havenwood>
_droid: RVM is the most popular route. I like to install Ruby 2.0.0 with ruby-install and select Rubies with chruby.
Kricir has quit [Remote host closed the connection]
bklane has quit [Remote host closed the connection]
<havenwood>
_droid: Or yeah, you could grab chruby and build it yourself.
thiagopnts has joined #ruby
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
<_droid>
havenwood: I'll check it out, and get back to you if I need any help
Zai00 has joined #ruby
<havenwood>
_droid: That apt-get 1.9.3 *should* work though, but possibly not worth the effort and not 2.0.0 version.
<_droid>
havenwood: you mean "apt-get install ruby1.9.3"
<_droid>
??
<havenwood>
_droid: That is an alias to 1.9.1, same package.
<havenwood>
_droid: Also confusing...
Notte has quit [Remote host closed the connection]
thiagopnts has quit [Client Quit]
<havenwood>
_droid: I meant the only you have installed. I'd recommend looking at modern web servers, like Unicorn, Puma, and Thin.
v0n has joined #ruby
thiagopnts has joined #ruby
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
zeromodulus has quit [Read error: Connection reset by peer]
<havenwood>
_droid: Or Passenger.
BillCris_ has joined #ruby
xeqtr has joined #ruby
BillCris_ has quit [Read error: Connection reset by peer]
pcarrier has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
zeromodulus has joined #ruby
vlad_starkov has joined #ruby
BillCris_ has joined #ruby
<havenwood>
_droid: ^ all nice modern options, different strong and weak points
jlast has joined #ruby
thiagopnts has quit [Client Quit]
BillCriswell has quit [Read error: Operation timed out]
<havenwood>
_droid: Unicorn uses a process pre-fork model, Puma is thread pools, Thin is evented-io with eventmachine, and Passenger is a process/fork model with apache or nginx modules.
<_droid>
havenwood: now you just opened new questions for me. Till now I knew lighthttpd and apache
unstable has quit [Changing host]
unstable has joined #ruby
<havenwood>
_droid: It is very popular to put one of those ^ webservers behind Nginx or Apache acting only as a reverse proxy.
<_droid>
havenwood: what is churby
geekbri has quit [Remote host closed the connection]
<havenwood>
_droid: chruby changes the current Ruby by setting the appropriate environment variables.
<terrellt>
(P.S: nginx will be faster as a reverse proxy.)
<havenwood>
<3 Nginx + Unicorn
Christopher37 has joined #ruby
S0da has quit [Read error: Connection reset by peer]
* terrellt
high fives havenwood.
thiagopnts has joined #ruby
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
pskosinski_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
stayarrr has quit [Quit: Leaving...]
v0n has quit [Ping timeout: 264 seconds]
smathieu has quit [Remote host closed the connection]
blackmesa has joined #ruby
DrShoggoth has quit [Quit: Leaving]
pskosinski_ has quit [Client Quit]
maroloccio has joined #ruby
<havenwood>
jb41: Could you do a gist with an example Array of Hashes and the desired output?
Lewix has quit [Remote host closed the connection]
<_droid>
havenwood: ok 1 sec
vlad_starkov has quit [Ping timeout: 245 seconds]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
akells` has quit [Ping timeout: 245 seconds]
<_droid>
havenwood: it is downloading ruby-2.0.0-p247 from ruby-lang.org, is that ok??
mansi has quit [Remote host closed the connection]
<zendeavor>
that's something you ought to know for yourself really
danman has joined #ruby
devoldmx3 has joined #ruby
shosti has joined #ruby
Drekonus has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<_droid>
zendeavor: that is what the shell script is doing
<havenwood>
_droid: Ideally, you'd check the md5's of what you download (what the script is doing).
devoldmx has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
mansi_ has joined #ruby
<havenwood>
_droid: RVM, ruby-install, and ruby-build all check the checksums of what they install. (Actually, i think ruby-build skips this when it installs from head, ruby-install doesn't install from head to avoid that).
SHyx0rmZ has joined #ruby
npulse has quit [Ping timeout: 248 seconds]
breakingthings has quit [Quit: breakingthings]
cjs226 has quit [Quit: cjs226]
tatsuya_o has quit [Remote host closed the connection]
<tjbiddle>
When packaging a gem, is there a way to say it conflicts with another gem?
twoism has quit [Read error: Connection reset by peer]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
<_droid>
havenwood: ok so whenever there is a new stable version of ruby can I simply run this script?
twoism has joined #ruby
v0n has joined #ruby
npulse has joined #ruby
<havenwood>
tjbiddle: Hrm, I have no idea... Might get a quick answer in #rubygems.
<havenwood>
_droid: The ruby-install way to install latest stable Ruby is: ruby-install ruby
smathieu has joined #ruby
<havenwood>
_droid: In the upcoming chruby 0.4.0, you'll be able to: chruby-install ruby
<havenwood>
(Uses ruby-install under the hood, but automatically adds the newly installed ruby to RUBIES so its available without resourcing.
<havenwood>
RubyHelp: Spamming here is same code more than once.
<zendeavor>
you pasted the code 3 times in ten minutes, that's spamming anywhere.
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
rafekettler has joined #ruby
rafekettler has left #ruby [#ruby]
<RubyHelp>
Maybe in IRC with three active users. I'll give you that
mklappstuhl has joined #ruby
<zendeavor>
_anywhere_
<RubyHelp>
Absolutes are _always_ wrong.
thiagopnts has quit [Quit: Leaving.]
<havenwood>
RubyHelp: Try it in #ruby-lang :P
rafekett has joined #ruby
<havenwood>
RubyHelp: Is there a certain part you're trying to understand, or the whole thing from top to bottom?
<RubyHelp>
The whoel thing, haven.
<rafekett>
is there a way to get the the hash {:regexp => '\d'} to serialize to {"regexp":"\d"} instead of {"regexp":"\\d"} using the JSON module?
devth has joined #ruby
<brisbin>
rafekett: don't you want it to serialize that way, so it de-serializes back to the original?
<terrellt>
^
maxmanders has quit [Quit: Computer has gone to sleep.]
<rafekett>
i'm serializing to JSON to send to elasticsearch
<rafekett>
so no
<havenwood>
rafekett: The second "\" isn't there.
devoldmx has quit [Ping timeout: 264 seconds]
apes has left #ruby [#ruby]
<rafekett>
haverwood: it is when it is sent over the wire
xeqtr has joined #ruby
<devth>
how do people typically deal with deeply-nested modules? it's a pain to always specify A::B::C::D.foo. I can alias D to use it easier: D = A::B::C::D; D.foo; D.bar; but is it idiomatic?
<RubyHelp>
havenwood: Currently the object is sorting by group, first_name .. and I'm trying to understand how that is actually happening in that object with that snippet
<brisbin>
RubyHelp: read the docs for #select, #detect, and #collect. they're in Enumerable
<brisbin>
devth: if you need to reach into all those modules from teh outside, you've got other problems
<RubyHelp>
I'm reading it now.
<brisbin>
A should have an interface which you call directly and uses B internally, same for B to C and C to D
thiagopnts has joined #ruby
thiagopnts has joined #ruby
thiagopnts has quit [Changing host]
jbpros has quit [Quit: jbpros]
<brisbin>
lots of "::" would be a pretty big smell to me
ahawkins has quit [Quit: ahawkins]
<devth>
brisbin: good point. asking for a friend (not joking)
<jb41>
is there any method like Array#select, but which deletes selected value from array?
<havenwood>
RubyHelp: It finds all the assignables where the role is assignable then maps to a new array of the result of calling #principle on the assignable. It then sorts.
<zendeavor>
i assume you're on OSX, so i don't expect you to install it, but you can feed it scripts through the web interface too; i'm pretty certain it will catch some of the more egregious errors even though it's not quite complete yet
<RubyHelp>
havenwood: How would I influence its sort order differently then? It seems to me I could instantiate a new sort by adding params to sort
wmoxam has quit [Ping timeout: 264 seconds]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
evenix has quit [Remote host closed the connection]
Lewix has quit [Remote host closed the connection]
<havenwood>
RubyHelp: Look more closely into #sort_by
mansi has quit [Read error: Connection reset by peer]
seich- has joined #ruby
<havenwood>
tjbiddle: I was curious if the answer was "no", good to know!
shosti has quit [Read error: Connection reset by peer]
<tjbiddle>
havenwood: The answer is no, you cannot mark a gem to conflict with another :-)
<havenwood>
There ya go!
pupoque_ has quit [Read error: Connection reset by peer]
ged_ is now known as ged
Kruppe has quit [Ping timeout: 264 seconds]
pupoque_ has joined #ruby
d2dchat has joined #ruby
bklane has joined #ruby
<havenwood>
tjbiddle: I'd never had an occasion where i've needed to do it.
<RubyHelp>
havenwood: I still don't understand these pipe-defined variables
<havenwood>
RubyHelp: They are block arguments.
Myconix has quit [Quit: According to Wikipedia, I don't exist]
Kricir has quit [Ping timeout: 268 seconds]
<havenwood>
(method_arg) vs |block_arg|
<terrellt>
RubyHelp: Those are blocks - you should do a basic ruby tutorial online.
<havenwood>
tjbiddle: Sorry if that came across as snide... didn't mean it that way. Was just eaves dropping in #rubygems. :P
<tjbiddle>
havenwood: Didn't come across as snide in the slightest :-)
<havenwood>
whew! :)
<havenwood>
hate re-reading what i've written, i shouldn't do it - prone to second-guessing myself >.>
<zendeavor>
or just take a stand and own the hell out of what you say ;]
<RubyHelp>
terrellt: It's more like we have one ruby on rails project at work that they want me to change something.. but we have no ruby devs.
jerius has quit [Ping timeout: 246 seconds]
akells` has quit [Remote host closed the connection]
<havenwood>
zendeavor: Or that! Haha! :O
<zendeavor>
i did it the other day, even though it looked like i was shit-gabbing chruby ^.^
PhatBaja has quit [Quit: Leaving.]
<havenwood>
RubyHelp: Might be worth just hiring a Rubyist ringer for a handful of hours to get it done.
* terrellt
rings a bell.
workmad3 has joined #ruby
shosti has joined #ruby
<RubyHelp>
havenwood: I've managed to get most of the tasks completed.. but that one snippet is throwing me a loop
zigomir has joined #ruby
adambeynon has joined #ruby
<brisbin>
better to say you're *puts on glasses* blocked on it.
<iliketurtles>
question: say I have an array of arrays, each array is length N. I want to transpose the first element of each array into its own new array, then the second, then the third. so, [a,b,c,],[d,e,f] would become [a,d][b,e][c,f]
MrZYX|off has joined #ruby
<havenwood>
RubyHelp: Looks to me like you want #sort_by with a block.
<RubyHelp>
brisbin: Yes, you and your glasses are correct.
<brisbin>
iliketurtles: is this a homework assignment?
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<iliketurtles>
brisbin: no...
<havenwood>
iliketurtles: Are you wearing zombie face paint?
<RubyHelp>
hahaha ^
akells` has joined #ruby
cdelo_ has quit [Quit: Leaving]
gustavn has quit [Quit: Leaving]
<iliketurtles>
sorry, i suppose i confused this with a place where you come to get help with your ruby questions ^_^
thesheff17 has quit [Remote host closed the connection]
bradsmith has quit [Remote host closed the connection]
<brisbin>
iliketurtles: do you know the length beforehand?
_droid has quit [Ping timeout: 260 seconds]
<brisbin>
of the inner arrays
<iliketurtles>
brisbin: yes, let's call it N for now
bradsmith has joined #ruby
BlakeRG has quit [Remote host closed the connection]
spider-mario has quit [Remote host closed the connection]
jh00pla has quit [Quit: Leaving]
mumble has joined #ruby
<havenwood>
iliketurtles: pass multiple arrays as args to #zip (if you missed banter above)
nomenkun has quit [Ping timeout: 264 seconds]
woolite64 has joined #ruby
workmad3 has quit [Read error: Operation timed out]
<iliketurtles>
and one final question: if I have an array just full of strings, ie ['Hello World!'], how would i "zip" this one every Nth (lets say N is 4) character? ie => ['H','o','r']['e',' ','l']['l','W','d']['l','o','!']?
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
<brisbin>
this is so homework
<terrellt>
I want ruby homework.
<Rubba>
someone asked exactly this question last week :o
<Rylai>
I wish I could do my homework in Ruby.
<terrellt>
All I get is assembly homework. Bleh.
<iliketurtles>
~_~
<RubyHelp>
What is sort's default behavior?
<zendeavor>
that's documented.
<iliketurtles>
unless homework is something you get paid to do, then this isn't homework
<havenwood>
It sorts!
<iliketurtles>
:P
<iliketurtles>
i'm just trying to ask a simplified version of a much more complex question im trying to solve
BillCris_ has quit [Write error: Broken pipe]
<zendeavor>
ask the hard version instead
Senjai has joined #ruby
<iliketurtles>
but I want to figure that part out! :P
<brisbin>
"how do i build a CRUD application over Postgres?"
fcahoon has quit [Quit: Leaving]
sambao21 has quit [Quit: Computer has gone to sleep.]
<havenwood>
brisbin: With Nginx! :)
<brisbin>
ha! i read that blog post too
arya__ has joined #ruby
<brisbin>
so crazy
<havenwood>
brisbin: aye, pretty sick
devoldmx has quit [Ping timeout: 264 seconds]
<RubyHelp>
zendeavor: Certainly, there are plenty of things documented, doesn't mean that I particularly care for reading snide comments from people to read every doc.
<brisbin>
you get the help you pay for, go complain to irc customer service
devoldmx has joined #ruby
shosti has quit [Remote host closed the connection]
<havenwood>
Pay with a poem!
apakatt has quit [Quit: Leaving...]
pskosinski has quit [Quit: Til rivido Idisti!]
<iliketurtles>
i feel like array#product does ALMOST what i want
<zendeavor>
it's not snide. it's honest, good truth.
<zendeavor>
here, i'll read it for you
<RubyHelp>
That wasn't a haiku.
<zendeavor>
Returns an array containing the items in enum sorted, either according to their own <=> method, or by using the results of the supplied block. The block should return -1, 0, or +1 depending on the comparison between a and b.
<havenwood>
RubyHelp: Almost, just an extra syllable on the last line.
bamdad has joined #ruby
arya_ has quit [Ping timeout: 256 seconds]
x1337807x has joined #ruby
<terrellt>
havenwood: Really? Seemed right to me.
<havenwood>
terrellt: 6 when 5 expected, no?
<terrellt>
havenwood: but most-ly red-dit.
Kricir has quit [Remote host closed the connection]
<zendeavor>
but -> 1, mostly -> 2, reddit ->2
codesoda has joined #ruby
mityaz has quit [Quit: See ya!]
<havenwood>
ahhh! of course - i was reading zendeavor's response - LOL
<RubyHelp>
My object is being returned sorted group desc, first_name asc.. which I don't see how that is being returned with just a default sort
codesoda has left #ruby [#ruby]
cjs226 has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zastern_ has joined #ruby
akells` has quit [Remote host closed the connection]
luckyruby has joined #ruby
<havenwood>
RubyHelp: Just #sort is not what you're looking for, what its doing in c: return rb_ary_sort(enum_to_a(0, 0, obj));
<havenwood>
oh, dangit rb_ary_sort
<havenwood>
RubyHelp: Suffice it to say, #sort_by. :P
<havenwood>
RubyHelp: Are you trying to first sort by one thing, then second by another?
<RubyHelp>
Yes
zastern has quit [Read error: Connection reset by peer]
<terrellt>
RubyHelp: This isn't Rails and a model, right?
<RubyHelp>
terrellt: It is in rails.
devoldmx has quit [Ping timeout: 246 seconds]
<RubyHelp>
As well as a model, yes.
zastern_ has quit [Remote host closed the connection]
baordog has quit [Remote host closed the connection]
dankest has joined #ruby
<terrellt>
Your database should be doing this.
<terrellt>
Not ruby.
<iliketurtles>
I promise ill shut up after this, but can anyone offer input on this: ['Hell']['o Wo']['rld!'], how can I produce => ['H','o','r']['e',' ','l']['l','W','d']['l','o','!']? the first letter of each array, the second letter of each array, etc
zastern has joined #ruby
devoldmx has joined #ruby
kpshek has quit []
<RubyHelp>
terrellt: Could you explain further please?
<terrellt>
RubyHelp: So somewhere in your controller there's ModelName.all. You want something like ModelName.sort("first_name ASC, group desc").all
<havenwood>
RubyHelp: So if this *was* a Ruby domain instead of Rails problem: #sort_by { |principle| [principle.first_name, principle.group] }
<havenwood>
terrellt: How did you realize it was Rails!? Hehe.
<terrellt>
havenwood: It's always rails.
<havenwood>
haha
anonymuse has quit [Remote host closed the connection]
<RubyHelp>
Is what kills me the most in this project, truth.
<RubyHelp>
Rails is what*
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
rgreen has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
PhatBaja has joined #ruby
jfelchner has quit [Quit: jfelchner]
anonymuse has joined #ruby
<terrellt>
havenwood: I didn't realize you could pass multiple parameters to sort_by. Cool stuff.
<RubyHelp>
havenwood: For my own inquiring mind, how would I impose sort direction on that snippet, though?
xcv has joined #ruby
<havenwood>
RubyHelp: You can use the spaceship operator if you want to do more complex comparisons. Sec, lemme find a link.
<terrellt>
RubyHelp: Next time you have a problem like this, #rubyonrails + gisted code of your controller/model.
<havenwood>
+1 ^
rafekett has left #ruby ["ERC Version 5.3 (IRC client for Emacs)"]
<RubyHelp>
terrellt: It's a redmine installation, it is huge.
<terrellt>
It can be the relevant controller action.
devoldmx has joined #ruby
<terrellt>
Man, all you had to say was redmine and we'd have been all over this.
<RubyHelp>
Hah..
Nisstyre has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
bradsmit_ has quit [Remote host closed the connection]
Mattix has joined #ruby
rickmasta has joined #ruby
germanstudent has quit [Ping timeout: 264 seconds]
moeSeth has joined #ruby
sam113101_afk is now known as sam113101
wagster has quit [Quit: Computer has gone to sleep.]
dtcrshr has quit [Quit: poff]
tylersmith has quit [Remote host closed the connection]
Myconix has joined #ruby
<havenwood>
RubyHelp: Can't find a link and gotta run. But a simple way is to negate the element you want to reverse order of, like: [from_top, -from_bottom]
<RubyHelp>
havenwood: Thanks for your help.
havenwood has quit [Remote host closed the connection]
PhatBaja has quit [Ping timeout: 245 seconds]
d2dchat has quit [Remote host closed the connection]
brain_shim has quit [Read error: Connection reset by peer]
alex__c2022 has joined #ruby
germanstudent has joined #ruby
brain_shim has joined #ruby
robscomputer_ has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
MrThePlague has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
mklappstuhl has quit [Ping timeout: 256 seconds]
Cyrus has joined #ruby
flou has joined #ruby
seivan has joined #ruby
nezumi has quit [Read error: Connection reset by peer]
<seivan>
Does anyone know of a gem that works with guard for notifications to Mac OS? All of them seems to have been yanked; like 'terminal-notifier-guard
shosti has joined #ruby
nezumi has joined #ruby
shosti has quit [Client Quit]
mary5030 has joined #ruby
shosti has joined #ruby
_whitelogger has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]