LorentzFactor has quit [Ping timeout: 240 seconds]
LorentzFactor has joined #ruby
dmiller has quit [Remote host closed the connection]
<davidcelis>
i <3 ffvi
<flu->
+1
Guest5515 has joined #ruby
ryanf has quit [Quit: leaving]
answer_42 has joined #ruby
znake has joined #ruby
<banisterfiend>
davidcelis: Hello Dave.
<davidcelis>
Hello, HAL.
<banisterfiend>
My mind is going, I can feel it. Could be the vodka.
<davidcelis>
Sing me a song, HAL
sr___ has quit [Quit: Connection closed for inactivity]
<banisterfiend>
It's 4 in the morning, the end of september, i'm ringing you now just to see if you're better. New york is cold but I like where i'm living, there's music on clinton street all through the evening. But you traded my woman to a flake of your life, and when she came back, she was nobody's wife.
jarred has joined #ruby
<banisterfiend>
davidcelis: where in US America are you from
<davidcelis>
portland oregon
<banisterfiend>
is that a hub for activity or is it quiet
<banisterfiend>
is it a place that foreigners would consider 'america' if they've just been exposed to movies and tv
poga has quit [Remote host closed the connection]
Kabaka has joined #ruby
gmci has quit [Quit: Computer has gone to sleep.]
<davidcelis>
hm
<davidcelis>
depends on the movies or tv
<davidcelis>
oregon is a pretty hippy state
<davidcelis>
portland is less hippy and more hip, but
<davidcelis>
it's a pretty small city, though it's still a city
<TTilus>
im about to ride my portland for couple of hours :)
sepp2k has joined #ruby
grizlo42 has left #ruby [#ruby]
fyolnish has joined #ruby
mc0e has joined #ruby
juarlex_ has joined #ruby
flu- has quit [Ping timeout: 240 seconds]
juarlex has quit [Read error: Connection reset by peer]
flu- has joined #ruby
raul782 has quit [Remote host closed the connection]
fyolnish has quit [Ping timeout: 265 seconds]
tomsthumb_ has joined #ruby
Progster has quit []
w400z has joined #ruby
<elico>
I have a class which has " @ldr_flg = false" as a basic variable of the class... and in the class i have a line: "ok" if @lbr_flg but ruby will say: "warning: instance variable @lbr_flg not initialized"
just4dos_ has quit [Ping timeout: 260 seconds]
<elico>
this happens on ruby 1.9.3 on linux.. on windows 1.8 ok
<elico>
ok sorry my bad... the -w flag was on..
areil has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
Takehiro has joined #ruby
savage- has quit [Remote host closed the connection]
tramontana has joined #ruby
naoya21 has joined #ruby
yoklov has quit [Quit: bye!]
Takehiro has quit [Ping timeout: 260 seconds]
[Neurotic] has quit [Remote host closed the connection]
naoya21 has quit [Client Quit]
mahmoudimus has joined #ruby
DrunkDave has joined #ruby
DrunkDave is now known as Guest2876
just4dos_ has joined #ruby
havenn_ has quit [Remote host closed the connection]
Guest2876 has quit [Changing host]
Guest2876 has joined #ruby
michaelmartinez has joined #ruby
arkiver has joined #ruby
<michaelmartinez>
is attempting machine learning in ruby a fools errand? it seems that most of the books and tuts are pythonic… what say you?
iniy has joined #ruby
Quadrant has joined #ruby
<banisterfiend>
michaelmartinez: yur'e asking that in a #ruby channel?
<banisterfiend>
michaelmartinez: the no. 1 coding website in the world (github) is written in Ruby
iniy has left #ruby [#ruby]
<michaelmartinez>
banisterfiend: yes… and yer point is?
<michaelmartinez>
machine learning is wholly diff than ror
clocKwize has joined #ruby
<banisterfiend>
oh you said machine learning
clocKwize has quit [Client Quit]
<banisterfiend>
sorry i skipped that i am drunk
<michaelmartinez>
hahahah
<michaelmartinez>
the ole default "drunk" status
<banisterfiend>
well it's not default, i've been drinking vodka since 4pm (6pm now)
<michaelmartinez>
peerty quiet around these parts tonight...
<banisterfiend>
michaelmartinez: tbh, i would do machine learning in a language like R or Octave
<banisterfiend>
at least for prototyping
<banisterfiend>
a DSL for mathematics is what you need for machine learning
jhunter_ has quit [Ping timeout: 272 seconds]
<banisterfiend>
and when i did a coursera course on machine learning they used octave, too
<michaelmartinez>
yeah… thought about that…
<michaelmartinez>
I just want to get better at ruby too
dejanr has joined #ruby
<michaelmartinez>
Off to play a bit...
<banisterfiend>
ok, believe in yourself
jhunter has joined #ruby
<michaelmartinez>
thanks banisterfiend … I will look into octave… thats a new one for me
<banisterfiend>
really?
<banisterfiend>
octave is a horrible language, tbh, but it provides easy stuff for doing mathematics
<banisterfiend>
and machine language is all about matrices and vectors
<michaelmartinez>
yeah. I am very, very green on the sic front
<michaelmartinez>
sic ==science
<michaelmartinez>
will have a play none the less...
Zambz has quit []
Hanmac1 is now known as Hanmac
drago757 has quit [Quit: drago757]
azm has joined #ruby
hadees has quit [Quit: hadees]
pygmael has joined #ruby
fyolnish has joined #ruby
t68627 has quit [Remote host closed the connection]
t78848 has joined #ruby
AlbireoX has quit [Quit: IRC crashed.]
seich- has quit [Ping timeout: 265 seconds]
williamherry has joined #ruby
ngoldman has joined #ruby
seich- has joined #ruby
areil has quit [Remote host closed the connection]
araujo has quit [Quit: Leaving]
Advocation has joined #ruby
sterNiX has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
th3xer0 has joined #ruby
ngoldman has quit [Remote host closed the connection]
luckyruby has joined #ruby
apok has joined #ruby
Takehiro has joined #ruby
ngoldman has joined #ruby
heftig has joined #ruby
adeponte has joined #ruby
sambio has quit []
arkiver has quit [Quit: Leaving]
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
Richmond has quit [Ping timeout: 264 seconds]
jarred has quit [Quit: jarred]
davidcelis has quit [Ping timeout: 240 seconds]
azm has quit [Ping timeout: 256 seconds]
Advocation has quit [Ping timeout: 276 seconds]
davidcelis has joined #ruby
havenn has joined #ruby
maletor has joined #ruby
havenn has quit [Ping timeout: 260 seconds]
knightblader has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.8]
ngoldman has quit [Remote host closed the connection]
workmad3 has joined #ruby
Guest2876 has quit [Quit: Leaving.]
pygmael has quit [Read error: Connection reset by peer]
flu- has quit [Ping timeout: 252 seconds]
pygmael has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
bradhe has quit [Remote host closed the connection]
gtuckerkellogg has joined #ruby
flu- has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
wallerdev has quit [Quit: wallerdev]
maletor has joined #ruby
maletor has quit [Client Quit]
workmad3 has quit [Ping timeout: 260 seconds]
heftig has quit [Quit: leaving]
moshee has quit [Ping timeout: 272 seconds]
dbck has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
dejanr has quit [Ping timeout: 245 seconds]
quazimodo has quit [Ping timeout: 260 seconds]
DrunkDave has joined #ruby
thomas is now known as chaplain
DrunkDave has quit [Changing host]
DrunkDave has joined #ruby
quazimodo has joined #ruby
TheLZA has quit [Quit: Bye]
maletor has joined #ruby
maletor has quit [Client Quit]
w400z has quit [Quit: Computer has gone to sleep.]
Takehiro has quit [Remote host closed the connection]
<burgestrand>
cicatristeza: how did you install ruby?
<workmad3>
cicatristeza: if you're using rvm, use rvmsudo, not sudo
<burgestrand>
cicatristeza: anyhow, try running jekyll without --server and --auto
s1n4 has joined #ruby
<lupine_85>
cicatristeza, check the output of netstat. if something else was bound to 40000 and has been killed, no fd will show up in lsof, but the kernel might keep the port unavailable for an unspecified amount of time
<lupine_85>
(also see the REUSEADDR socket option)
Markvilla has quit [Quit: Computer has gone to sleep.]
eindoofus has joined #ruby
tewecske has quit [Read error: Connection reset by peer]
yasushi has joined #ruby
<eindoofus>
Hi, I want to understand Ruby and be able to write programs. Does anyone have a suggestion for a good read before jumping into Rails? I should mention that I'm pretty comfortable with Java so I don't need too much hand-holding.
<eindoofus>
Then again, I am new to dynamic languages
<eindoofus>
I tried learning both at the same time before, but I felt as though I wasn't absorbing as much due to my lack of Ruby knowledge
<shevy>
since you already know java, I recommend you work through all tutorials from http://pine.fm/LearnToProgram/?Chapter=00 at least once. it should not take you longer than 20 minutes. after that, you have a overview of ruby at least
<eindoofus>
thanks :)
<shevy>
rails is very specialized
<shevy>
all the Active* things
<eindoofus>
cool, I'll gve it a go
<TTilus>
eindoofus: i'd advice to focus on ruby alone for a while
<matti>
From Java to Rails.
<matti>
LOL
<shevy>
how many people know ActiveRecord inside out
<shevy>
only matti
<matti>
I have AR
<shevy>
hehe
<matti>
Its a fucking abomination and should be cleansed with fire.
<TTilus>
eindoofus: hang around here, read other programs, publish what you write and get feedback
<shevy>
I have an array... like this array = [ ["numactl", "Aug 2011"], ["libgnome", "Aug 2012"], ["libflowmanager", "May 2012"] ]
<matti>
s/have/hate/
<shevy>
I'd like to sort it by those pseudo-dates somehow
<matti>
shevy: Impossible.
<matti>
;d
<TTilus>
eindoofus: by reading a lot of code you will get familiar with idioms
<rippa>
shevy: array.sort_by {|i| i[1]}
<TTilus>
shevy: care to elaborate that "somehow" part?
<shevy>
TTilus well obviously those are incomplete dates
<shevy>
only month + year entries are listed, and month is a shortcut
<bnagy>
shevy: try DateTime.parse
<bnagy>
it will handle that format
<shevy>
the sorting should be either by youngest entry first, or oldest entry first
<shevy>
whoa cool
<TTilus>
shevy: ok, chronological, as bnagy said, DateTime.parse is your friend
<matti>
shevy: DateTime is slow.
<shevy>
matti but it seems to work!
<shevy>
thanks
Virunga has left #ruby [#ruby]
justinmcp has joined #ruby
<matti>
;]
<matti>
shevy: What are you up to?
moshee has quit [Ping timeout: 272 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
<shevy>
matti right now a small .rb file that tells me which program entries I did update last
mascool has quit [Ping timeout: 250 seconds]
ChampS666 has joined #ruby
seanstickle has joined #ruby
<matti>
shevy: You could do this in bash too ;]
<matti>
shevy: Its like trying to kill a mosquito with an Apache chopper.
<akromyk>
If you did this within ruby: pastebin.com/sJaisDB0 would it print out 1 2 ...or... 2 2 ?
<JonnieCache|home>
2 2
<akromyk>
cool, thanks :)
olrrai has quit [Quit: Saliendo]
<akromyk>
So the only things that are immutable objects are integers, floats, Strings, and boolean variables. Is that correct?
matrixise has quit [Ping timeout: 264 seconds]
<Mon_Ouie>
No, strings are mutable
<Mon_Ouie>
>> a = "foo"; a[1] = "b"; a
<al2o3cr>
(String) "fbo"
<JonnieCache|home>
floats are mutable too
<Mon_Ouie>
They're not, except for their ivars
snearch has joined #ruby
<Mon_Ouie>
But if that counts, everything is mutable
<JonnieCache|home>
Mon_Ouie: youre right. im just tried it in irb but misread a couple of digits of the object_id
<Mon_Ouie>
You can create your own class and decide to make its instances immutable simply by not providing methods to change their internal state
<JonnieCache|home>
note to self: if youre going to try the code to make yourself look like less of an idiot, read the output properly
<Mon_Ouie>
(You'd still have instance_variable_set, but using it like that is bad practice anyway)
<fowl>
akromyk: instead of strings you meant symbols?
<akromyk>
fowl: not sure, what are symbols. I'm new to ruby
<Mon_Ouie>
:foo is a symbol
<akromyk>
what does a symbol do?
just4dos_ has quit [Ping timeout: 276 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
laen_ has joined #ruby
<Mon_Ouie>
It's just something you can use to… symbolize something; it's commonly used as hash keys or to represent code symbol names (method names, etc.)
<Hanmac>
symbols are like C++ enums
<fowl>
symbols symbolize, good definition Mon_Ouie
<Hanmac>
but more cool
[MAN] has joined #ruby
<akromyk>
interesting. I can't wait to learn that part :)
johnjohnson has joined #ruby
<Mon_Ouie>
fowl: Yeah, things that are named right have obvious definitions! :p
adac has joined #ruby
jasonLaster has joined #ruby
hmans has joined #ruby
dev_ryan70 has joined #ruby
butblack has joined #ruby
<akromyk>
So back to this code. If the equivalent is done in ruby why would it print out 2 2? I mean if you did the same with two integer objects in ruby it would give you 1 2
<akromyk>
if they acted the same then you would get 3 3 3 3, but instead it's 3 3 2 3
ar_ has quit [Read error: Connection timed out]
<akromyk>
and I don't understand the difference. I thought their both objects
workmad3 has quit [Ping timeout: 256 seconds]
dmiller has joined #ruby
havenn_ has quit [Read error: No route to host]
<Mon_Ouie>
They are both objects, but in the second example, when you do var2 = 3, you change the object var2 is referencing
<Mon_Ouie>
So it's not the same object than var1 anymore
havenn_ has joined #ruby
alisha123 has quit [Client Quit]
<Mon_Ouie>
While in the first example, you change the object referenced by var2.value — and since var1 and var2 both are the same thing at that point, they're both affected
<akromyk>
need another moment :P
baroquebobcat has joined #ruby
<Mon_Ouie>
Objects should not be confused with variables
godfrey999 has joined #ruby
shevy has joined #ruby
heisenmink has quit [Remote host closed the connection]
qwerxy has joined #ruby
moshef has quit [Quit: moshef]
atmosx has joined #ruby
kirun has joined #ruby
jonathanwallace has quit [Remote host closed the connection]
khakimov has joined #ruby
havenn has quit [Remote host closed the connection]
havenn has joined #ruby
s1n4 has joined #ruby
<akromyk>
Mon_Ouie, I think I almost got it. So does var1 = 1; var2 = 2; var1 = var2; basically copy the reference to the integer object of var2 to var1. And then var2 = 3 constructs a whole new integer object while var1 still references the number 2 object. Is that correct?
<atmosx>
writing function that I already understand is sooo annoying
<Mon_Ouie>
Yeah ;)
<akromyk>
Awesome :)
<akromyk>
Thanks Mon_Ouie!
<atmosx>
I need to get the computer to do it (meta-programming at it's best)
havenn has quit [Ping timeout: 244 seconds]
s1n4 has quit [Client Quit]
guns has joined #ruby
guns is now known as Guest768
gmci has quit [Ping timeout: 244 seconds]
Guest768 has quit [Client Quit]
baroquebobcat has quit [Quit: baroquebobcat]
dmiller has quit [Ping timeout: 268 seconds]
mahmoudimus has joined #ruby
brianpWins has joined #ruby
akromyk has quit [Quit: Leaving]
gmci has joined #ruby
ly_gs has quit [Remote host closed the connection]
Guest75036 is now known as dpk
mohits has quit [Ping timeout: 272 seconds]
baroquebobcat has joined #ruby
regedarek has quit [Read error: Connection reset by peer]
th3xer0 has quit [Quit: leaving]
baroquebobcat has quit [Client Quit]
bier_ has quit [Ping timeout: 264 seconds]
Eldariof-ru has quit [Ping timeout: 244 seconds]
Eldariof-ru has joined #ruby
havenn_ has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
jasonLaster has quit [Remote host closed the connection]
lampe2_ has joined #ruby
ly_gs has joined #ruby
pridian has joined #ruby
jasonLaster has joined #ruby
<libryder>
i'm curious if there is an overhead associated with allowing parentheses as optional
awarner has joined #ruby
<libryder>
def some_thing(arg1, arg2) vs def some_thing arg1, arg2
<pridian>
I believe I may have asked this earlier, and if so I apologize: are integers mutable or immutable in ruby?
<libryder>
immutable
<pridian>
thanks libryder
lampe2 has quit [Ping timeout: 260 seconds]
fantazo has joined #ruby
baphled has joined #ruby
jasonLaster has quit [Ping timeout: 260 seconds]
pdelgallego has quit [Quit: pdelgallego]
Yiq has joined #ruby
<libryder>
in numeric.c: /* Numerics are immutable values, which should not be copied */
<Yiq>
why do you prefer ruby over python? to me they are quite similar but python has more and better libs and is used more widely and not just in webapps.
<banisterfiend`>
Yiq: 1 answer: blocks ;)
<banisterfiend`>
Yiq: once u get used to block based programming everything else feels crippled and ugly
<xyon>
I'm not a ruby expert, but its frameworks are very powerful and the code itself makes sense to me from my perl background...
havenn has joined #ruby
<xyon>
Python is very hard for me to read, much less code in..
Guerrero has quit [Killed (idoru (Spam is off topic on freenode.))]
<xyon>
banisterfiend`: agreed
<fowl>
hey another one
<fowl>
ruby is rails
<fowl>
cheers
chussenot has joined #ruby
<Yiq>
much less ocde in ruby?
<Yiq>
blocks=functions?
<melfar>
for me the fact that len is not a member method of array and that you have to explicitly pass self to the method is enough to question the language's internal consistency
<banisterfiend`>
Yiq: no
<Yiq>
how free/modular is rails? does it force you into a certain model of your app?
<banisterfiend`>
Yiq: blocks are like python's lambda on crack
haxrbyte has joined #ruby
<fowl>
ruby is rails, so why not just use the two interchangeably
Foxandxss has joined #ruby
chussenot has quit [Client Quit]
apok has quit [Quit: apok]
<shevy>
Yiq rails forces you strictly into the rails world
baroquebobcat has joined #ruby
snearch has quit [Quit: Verlassend]
haxrbyte has quit [Remote host closed the connection]
havenn has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<shevy>
Yiq the biggest difference between ruby and python is the philosophy
haxrbyte_ has quit [Ping timeout: 260 seconds]
haxrbyte_ has joined #ruby
<pridian>
shevy, what would you say are the most notable differences in philosophy?
<shevy>
pridian that ruby actively encourages creativity
<shevy>
and that it is less rigid about enforcing one over the other (mandatory () in method calls vs. optional parens)
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
haxrbyte has quit [Ping timeout: 260 seconds]
tramontana has quit [Quit: tramontana]
<pridian>
are there any advantages to their philosophy?
<shevy>
if you are creative, you can have lots of crazy ideas
<shevy>
see what _why wrote
banghouse has quit [Remote host closed the connection]
<shevy>
an advantage is that you can quickly churn out code to test whether your ideas work or not
baroquebobcat has quit [Quit: baroquebobcat]
kiyoura has joined #ruby
<Yiq>
in python no parens mean a reference toa function isntead of a call. how do you pass a function to a fucntion in ruby? and how is array.len or array.len() about creativity?
SCommette has quit [Quit: SCommette]
Morkel has joined #ruby
<kiyoura>
Yiq, you may simply omit the parenthesis, if you wanted to however pass the return value of another function you may unambiguously call function(function2())
<pridian>
reference to a function? are those like javascript closures?
gentz_ has quit [Ping timeout: 256 seconds]
<Hanmac>
p array.method(:size), Array.instance_method(:size)
<Hanmac>
>> p array.method(:size), Array.instance_method(:size)
<al2o3cr>
-e:1:in `eval': undefined local variable or method `array' for main:Object (NameError), from -e:1:in `eval', from -e:1:in `<main>'
<Hanmac>
>> p [].method(:size), Array.instance_method(:size)
<adac>
i wanted to check if a string contains one or more image formats (endings) ie: png, jpg and gif I was windering how a regular expression for this looks like in ruby?
<shevy>
Yiq I said it is less rigid - that is the difference in philosophy. it shows in syntax requirements
mneorr_ has joined #ruby
<shevy>
Yiq in python you can not choose. in ruby you can
mneorr has quit [Quit: Leaving.]
flak has joined #ruby
mneorr_ is now known as mneorr
<Muz>
adac: /\.((pn|jp)g|gif)$/
flak is now known as Guest78224
senny has joined #ruby
<Muz>
I'm sure you can golf that down, but that'll work for most rudimentary use cases.
Spooner has quit [Ping timeout: 264 seconds]
* shevy
still loves the '.' at the end
<Yiq>
i want to pass a function, not the return value of a function
* Muz
disappears back to playing CS:GO. ¬_¬
<Yiq>
like map( f, list )
havenn has joined #ruby
<eridani>
i always viewed the lack of () as optimizing for the common case and not the exotic case. it's very rare to pass a method to a method.
havenn_ has joined #ruby
<adac>
Muz, nd hwo would a test look, is this correct? if string =~ Regexp.new( /\.((pn|jp)g|gif)$/)...
<fowl>
Yiq: in ruby when you do list.map { |x| ... } the |x| .. is the block
<fowl>
the block is the function*
rippa has quit [Ping timeout: 244 seconds]
<shevy>
Yiq then pass a proc and run .call on it when you want to evaluate it
awarner has quit [Remote host closed the connection]
seanstickle has joined #ruby
butblack has quit [Quit: butblack]
khakimov has joined #ruby
Nu^253r has quit [Ping timeout: 276 seconds]
tommyvYo has quit [Quit: Computer has gone to sleep.]
gvz has joined #ruby
<Yiq>
f=Proc.new {|x| x*x} # [1,2,3].map(f) doesnt work
Quadrant has quit [Read error: Connection reset by peer]
RudyValencia has quit [Quit: My IRC client doesn't advertise in /quit messages.]
Quadrant has joined #ruby
<seanstickle>
[1,2,3].map(&f)
<Yiq>
so you need the ugly & instead
Yiq has left #ruby [#ruby]
<fowl>
lol
<seanstickle>
I see we've won a new Ruby loyalist
Guest78224 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<fowl>
we have enough stupid people
<fowl>
python can keep him
rippa has joined #ruby
grenierm has joined #ruby
jwbuurlage has joined #ruby
tgriffin2081 has quit [Ping timeout: 245 seconds]
SCommette has joined #ruby
<pridian>
I'm following along with a tutorial that has me write the following code, but the last line is returning an error for me: http://pastie.org/4592602
<pridian>
Is there a typo in there code?
<seanstickle>
pridian: don't put spaces before parens
<seanstickle>
foo() not foo ()
<pridian>
thanks seanstickle, that did the trick
<pridian>
with is the line 6 str.rjust lining up with the rjust of line 5?
<pridian>
it's divided by 2. shouldn't it be more to the left?
triptec has quit [Ping timeout: 268 seconds]
ar__ has joined #ruby
<fowl>
python is the devil
<Hanmac>
Yiq: array.map(&method(:name))
<bperry>
neat
sterNiX has joined #ruby
sterNiX has quit [Changing host]
sterNiX has joined #ruby
apok has joined #ruby
<shevy>
Hanmac he is gone
<Hanmac>
:(
banghouse has joined #ruby
<pridian>
does anyone have any recommendations that for a program I can look at that uses a good deal of ruby's power but isn't too large in size?
<pridian>
I'm look for something to reverse engineer to better learn the language
<pridian>
looking*
jtgiri_ has joined #ruby
jtgiri_ has quit [Client Quit]
[MAN] has quit [Quit: Leaving...]
sepp2k1 has quit [Read error: Connection reset by peer]
<seanstickle>
pridian: Sinatra
<pridian>
thanks. what is Sinatra?
<canton7>
heh, some of the tricks sinatra uses need a deep explanation
<Mon_Ouie>
You could also check Binstruct, a library that uses some meta-programming to define class to manipulate binary formats
<seanstickle>
The best thing to read is something a bit more than you understand. Otherwise you won't have to work to read it.
<pridian>
thanks, I'll take a look at those two
dpk has quit [Ping timeout: 252 seconds]
ringotwo has joined #ruby
tommyvYo has joined #ruby
tommyvYo has quit [Changing host]
tommyvYo has joined #ruby
senny has quit [Remote host closed the connection]
dpk has joined #ruby
moshee has quit [Ping timeout: 244 seconds]
John_Galt has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
resure has quit [Remote host closed the connection]
<canton7>
yay ,that could do with a bit of tidying
Z_Mass has joined #ruby
<shevy>
I think the author took the php version and "ported" that to ruby
pdelgallego has quit [Quit: pdelgallego]
ph^ has joined #ruby
manizzle has quit [Read error: No route to host]
Spooner has joined #ruby
h4mz1d has quit [Ping timeout: 252 seconds]
khakimov has quit [Quit: Computer has gone to sleep.]
<shevy>
where do you guys store .pdf files btw?
ngoldman has quit [Remote host closed the connection]
havenn__ has joined #ruby
<reactormonk>
shevy: dev/doc ;-(
havenn_ has quit [Ping timeout: 244 seconds]
<shevy>
my filesystem is a mess
<reactormonk>
clean it up
pdelgallego has joined #ruby
<shevy>
yeah, I dunno. it is more a structural mess
nicoulaj has quit [Remote host closed the connection]
<shevy>
80% of my ruby files reside in something like ~ruby/src
ChampS666 has joined #ruby
workmad3 has quit [Ping timeout: 265 seconds]
aaronmacy has joined #ruby
catery has joined #ruby
<Mon_Ouie>
I used to have pretty much everything and anything in ~
<catery>
how does the self keyword and @ (instance variables) work in the context of a module, what exactly is a module?
<Mon_Ouie>
catery: Depends, do you mean within the body of the module or within the methods defined in the module?
<catery>
method
michaelmartinez has joined #ruby
<catery>
a module is not a class right?
<catery>
so what does it mean to use self and @ then?
<Mon_Ouie>
Well, self is whatever you call it on; typically that would be instances of a class the module was included into
<Mon_Ouie>
And instance variables are always relative to self alone
cinch has left #ruby ["Leaving"]
<michaelmartinez>
I have two dvm, two bundlers in my global gem set…how can I remove one?
<michaelmartinez>
dvm = rvm
Danielpk_ has joined #ruby
<Mon_Ouie>
For example, Array includes Enumerable. If you decide add a method to Enumerable, you could call that method on an array and self would be that array
Tearan has joined #ruby
Tearan has quit [Client Quit]
Criztian has quit []
khakimov has joined #ruby
banisterfiend` has quit [Remote host closed the connection]
banisterfiend has joined #ruby
TechCel has joined #ruby
Danielpk has quit [Ping timeout: 260 seconds]
Danielpk_ is now known as Danielpk
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby
apok has quit [Quit: apok]
Progster has quit [Ping timeout: 245 seconds]
lampe2_ has quit [Quit: Verlassend]
frogprince_mac has quit [Quit: Leaving...]
jwbuurlage has quit [Quit: jwbuurlage]
Morkel has quit [Quit: Morkel]
SCommette has joined #ruby
mneorr_ has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
dev_ryan70 has quit [Ping timeout: 264 seconds]
<elico>
if someone have specific expirence i will be more then happy
jeffnapp1 has quit [Remote host closed the connection]
AnarchoTroll has joined #ruby
<AnarchoTroll>
Is there a starightforward way to iterate the elements of an array in pairs? E.g. Array: [1,2,3]. I would like to iterate it as if it was [[1,2], [2,3]]
catery has joined #ruby
catery has left #ruby [#ruby]
datapolitical has quit [Quit: This computer has gone to sleep]
<elico>
AnarchoTroll: i think you can use a each_index and build your own loop it's pretty simple
awarner has joined #ruby
yasushi has joined #ruby
<AnarchoTroll>
elico, this is what I ended up doing: arr.clone.remove(arr.first).zip(arr.clone.remove(arr.last))
<AnarchoTroll>
I get exactly what I want by doing that, I was just wondering if there was a more elegant way of doing it
t50407 has quit [Remote host closed the connection]
t69121 has joined #ruby
verto is now known as verto|off
sambio_ has joined #ruby
sambio_ has quit [Client Quit]
sambio has joined #ruby
<elico>
AnarchoTroll: if you do want you can encapsulate it in a method.. /\-/\
datapolitical has joined #ruby
yasushi has quit [Ping timeout: 244 seconds]
<elico>
the only way of making one thing another is to iterate over it...
<elico>
or at least on it's index..
Bosma has joined #ruby
Takehiro has joined #ruby
jtgiri_ has joined #ruby
awarner has quit [Remote host closed the connection]
<AnarchoTroll>
got it
justinmcp has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
Takehiro has quit [Ping timeout: 248 seconds]
w400z has joined #ruby
coyo6770 has joined #ruby
kuzushi has quit [Ping timeout: 264 seconds]
coyo6770 is now known as coyo
coyo has quit [Changing host]
coyo has joined #ruby
Z_Mass has quit [Ping timeout: 245 seconds]
ngoldman has joined #ruby
pdelgallego has quit [Quit: pdelgallego]
ringotwo has quit [Remote host closed the connection]
miho has quit [Remote host closed the connection]
kiyoura has quit [Quit: Leaving]
ringotwo has joined #ruby
justinmcp has quit [Remote host closed the connection]
ohdae has quit [Quit: leaving]
joast has joined #ruby
answer_42 has quit [Quit: WeeChat 0.3.8]
jasonLaster has quit [Remote host closed the connection]
ttilley has quit [Ping timeout: 245 seconds]
jasonLaster has joined #ruby
alex___ has joined #ruby
cakehero has quit [Quit: Computer has gone to sleep.]
<alex___>
hi - does anyone know how you can create a separate namespace to use with eval? I need it to work with rspec: https://gist.github.com/3484012
jonathanwallace has joined #ruby
kuzushi has joined #ruby
qwerxy has quit [Quit: offski]
berserkr has quit [Quit: Leaving.]
jasonLaster has quit [Ping timeout: 246 seconds]
<Mon_Ouie>
What do you mean by separate namespace?
<alex___>
@Mon_Ouie something that can't access my local vars and methods
<Mon_Ouie>
You can use Binding#eval anyway to change the variables that can be accesesd
<alex___>
Mon_Ouie: the problem is getting it to hook in with my rspec group.. could you give an example?
<Mon_Ouie>
def fresh_binding; binding; end # no local variables will be available there
<Mon_Ouie>
fresh_binding.eval code
<alex___>
will give that a try, thanks
CannedCorn has quit [Quit: Computer has gone to sleep.]
jtgiri_ has quit [Quit: jtgiri_]
datapolitical has quit [Quit: This computer has gone to sleep]
<alex___>
Mon_Ouie: what about methods?
skogis has quit [Ping timeout: 248 seconds]
<Mon_Ouie>
Where are they defined?
havenn has joined #ruby
<alex___>
not inside a module or anything
<Mon_Ouie>
Well, top-level methods are by definition globally accessible, there's nothing you can do about that
<Spooner>
AnarchoTroll : The way to iterate as you wanted is [1, 2, 3].each_cons(2) {|a, b| ... }
<Mon_Ouie>
(Well, nothing is never true strictly speaking)
<Mon_Ouie>
(Well, "nothing" is never true strictly speaking) might be clearer
jorge has joined #ruby
<alex___>
oh ok, so if I put everything in modules, and then make the binding defined to a new module or just global will that hide pretty much everything?
<alex___>
I'm running user-submitted code here so I'm just trying to avoid the user messing things up
nari_ has joined #ruby
srnty has quit [Quit: Bye]
Stalkr_ has quit [Quit: Leaving...]
w400z has quit []
<Spooner>
alex___ : If you are running user-submitted code then you need a bit more if you want it to be in any way safe.
banisterfiend has quit [Remote host closed the connection]
<alex___>
Spooner: I'm using ruby cop to scan the syntax tree for bad calls/constants etc
<Mon_Ouie>
Well, your user will still be able to find your module
srnty has joined #ruby
seanstickle has joined #ruby
<alex___>
Spooner: it's what code school use for code restrictions
banisterfiend has joined #ruby
<alex___>
the problem is sandboxing the namespace
<Spooner>
alex___ : Oh, OK. I thought you were just attempting to sandbox by only exposing a single namespace in the hope that would make everything magically OK :)
<alex___>
someone suggested using a container object + instance_eval but that prevents my rspec group from accessing the definitions