apeiros_ changed the topic of #ruby to: Ruby 2.1.2; 2.0.0-p481; 1.9.3-p545: http://ruby-lang.org || Paste >3 lines of text on http://gist.github.com || this channel is logged at http://irclog.whitequark.org, other public logging is prohibited
<n_blownapart> shevy ^
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
<n_blownapart> Also advised to learn math to get beyond a certain limitation in programming.
jaequery has joined #ruby
<centrx> Both good to know
maletor has quit [Quit: Computer has gone to sleep.]
nanoyak has quit [Client Quit]
<shevy> n_blownapart hmm why do you tell me this
<shevy> I mean, it is their advice, not mine, I can't align with advice made by others can I?
<n_blownapart> shevy: that reads that I, John was advised. Just bouncing it off of you guys.
<shevy> ruby embraces that there is more than one way
<shevy> there are certain reasons why oop is a good way
<shevy> to have objects communicate with one another is very similar to what biological cells do
jamto11 has quit [Remote host closed the connection]
Bira has quit [Remote host closed the connection]
<centrx> object-oriented programming is much cleaner
blackmesa has joined #ruby
<n_blownapart> shevy: I just appreciate your advice and time and I'm lazy like you, so I'm looking for an 'in' where I can eventually be self-sufficient. agreed centrx I love it. I had a gestalt experience with that fibonacci sequence once I got that multiple assignment business.
dilated_dinosaur has quit [Ping timeout: 240 seconds]
nopc0de is now known as zz_nopc0de
i_s has quit [Remote host closed the connection]
glenfe has quit [Remote host closed the connection]
<n_blownapart> anyway that prime number / factorial problem... is it just too much to deal with in this chat ?
xrq has quit [Remote host closed the connection]
<centrx> Find an English/mathematical description of how factorize algorithms are implement
<centrx> that might make it cleaer
jespada has quit [Quit: Leaving]
MrSamuel has quit [Ping timeout: 265 seconds]
<centrx> A more naive implementation would test every number from 1..n to see if it is a factor of n
chipotle has joined #ruby
<shevy> n_blownapart you are not as lazy as I am, you want to get better at math, I for one can happily live oblivious without knowing more math
<shevy> but I have to learn R for a job in three months :(
<centrx> This one uses squares and an inner loop to do it faster
<centrx> shevy, Use RSRuby!
<shevy> and that means I have to read up on statistics and ... how do you call that shit distribution... gaussiane shit curve... and what do I know
<shevy> yeah if possible I will use ruby
<n_blownapart> centrx: ok thanks very much ..
<shevy> but they are a perls-generation
<shevy> they are +10 years older than I am on average so they only know perl
* centrx wonders how people get stuck on one and only one language for ten years
<rcs> shevy: Do you know perl?
diegoviola has joined #ruby
<shevy> rcs not really anymore
blackmesa has quit [Ping timeout: 264 seconds]
MrSamuel has joined #ruby
<shevy> centrx it's all they ever do! and shell scripts
wald0 has quit [Quit: Lost terminal]
<n_blownapart> centrx yeah the inner loop thing is odd. what is sqi is that i = 2*2 ?
<shevy> and apparently R though I don't quite know how they use it
<centrx> n_blownapart, right
brain_shim has joined #ruby
b00stfr3ak has quit [Ping timeout: 276 seconds]
bricker has quit [Quit: leaving]
<n_blownapart> oh centrx good to know. that shit is hard. I'm giving myself a few days for this one.
<n_blownapart> shevy: you rule I love your attitude towards all this.
Atw has joined #ruby
charliesome has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
<shevy> eh I wouldn't recommend my way
<shevy> what I would advice is work hard, be diligent and learn as much as possible
simoz111115 has joined #ruby
<n_blownapart> shevy: thanks pax
Lucky_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chrisseaton has quit []
Atw has quit [Client Quit]
Attww has joined #ruby
toastynerd has joined #ruby
ddv has quit [Ping timeout: 245 seconds]
<imaleaf> oh, we're talking about perl now? :P
SCommette has joined #ruby
toastynerd has quit [Remote host closed the connection]
ddv has joined #ruby
i_s has joined #ruby
brunops has joined #ruby
i_s has quit [Remote host closed the connection]
<shevy> imaleaf yeah, legacy programmers
phoo1234567 has quit [Quit: Leaving]
einarj has quit [Remote host closed the connection]
<imaleaf> programmers live that long?
<shevy> the IT dungeon systems are full of them
<shevy> yeah imaleaf look at richard stallman
<shevy> he looks like 95
mercerist has quit [Quit: Computer has gone to sleep.]
sinkensabe has joined #ruby
<imaleaf> wow, someone over 25
<imaleaf> hasn't been killed off yet. fascinating
<benzrf> imaleaf: O_O
Lightsword_ has joined #ruby
brunops has quit [Changing host]
<shevy> imaleaf he has transcended into guru stage
brunops has joined #ruby
<shevy> at guru stage you receive +5000 hp
Lightsword has quit [Ping timeout: 276 seconds]
Lightsword_ is now known as Lightsword
aspires has quit []
<imaleaf> so if one manages to transcend to guru, they are no longer subject to industry ageism? :p
kitak has joined #ruby
Attww is now known as Atttwww
n_blownapart has quit []
sinkensabe has quit [Remote host closed the connection]
MrSamuel has quit [Ping timeout: 240 seconds]
atraylen has joined #ruby
sinkensabe has joined #ruby
axilla has joined #ruby
dfinly has quit [Quit: Farewell]
n_blownapart has joined #ruby
mg^ has quit [Quit: Leaving]
<shevy> depends
sinkensabe has quit [Ping timeout: 252 seconds]
<shevy> you probably don't want to work like an idiot when you are past age 50
<imaleaf> ahahaha
axilla has quit [Ping timeout: 240 seconds]
<centrx> or ever
<wallerdev> work hard play hard
sinkensabe has joined #ruby
Bira has joined #ruby
EatMulti has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
enebo has joined #ruby
haha_afk is now known as haha_
EatMulti has quit [Remote host closed the connection]
<imaleaf> well I suppose on that topic--what other languages do people here like to use?
<shevy> ruby
<benzrf> imaleaf: haskell represent \o/
<centrx> Basic, Pascal
lw has joined #ruby
<imaleaf> LOL
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
enebo has quit [Client Quit]
john3213 has joined #ruby
MrSamuel has joined #ruby
aspires has joined #ruby
nerium has quit [Read error: Connection reset by peer]
pu22l3r has joined #ruby
Royalb15 has joined #ruby
<imaleaf> fifteen people in #pascal, I don't see centrx in there though
Royalb15 has quit [Max SendQ exceeded]
<centrx> I'll have to revive the community
<imaleaf> 3 in cobol
<centrx> Long live Borland!
axilla has joined #ruby
Bira has quit [Ping timeout: 240 seconds]
<shevy> lol
glenfe has joined #ruby
<imaleaf> sounds like a worthwhile endeavor
<imaleaf> call it a historical contribution, ask for grant money
aspires has quit [Client Quit]
<centrx> True, I need to get federal grant money
<centrx> I'll have to talk to that guy in the clown suit
diegoviola has quit [Quit: WeeChat 0.4.3]
Guest___ has quit [Quit: Textual IRC Client: www.textualapp.com]
<imaleaf> clown suit? brilliant! by being so conspicuous, they have made themselves hidden
n_blownapart has quit [Remote host closed the connection]
kitak_ has joined #ruby
aloysius21 has quit [Remote host closed the connection]
pen has quit [Remote host closed the connection]
MatthewsFace has quit [Quit: This computer has gone to sleep]
Bira has joined #ruby
kitak has quit [Ping timeout: 240 seconds]
_sambao21 has quit [Quit: Computer has gone to sleep.]
ephemerian has quit [Quit: Leaving.]
User458764 has joined #ruby
john3213 has left #ruby [#ruby]
pen has joined #ruby
i_s has joined #ruby
devdazed has quit [Quit: Bye]
Rahul_Roy has quit [Quit: Connection closed for inactivity]
Lutece has joined #ruby
<Lutece> Would anyone here know how to send hex data over a TCP socket?
<ari-_-e> Lutece: what is "hex data"?
<Lutece> Perhaps it's not hex... wait now I sound stupid, the data im trying to send is strange
<Lutece> looks like this
i_s_ has joined #ruby
<Lutece> db53 82ea b110 d3da 266b 63a5 6ff9 e5a1
MrSamuel has quit [Ping timeout: 265 seconds]
deric_skibotn has quit [Ping timeout: 265 seconds]
<Lutece> I get that when i print to a file
<ari-_-e> those are hex digits, yes
n_blownapart has joined #ruby
Lightsword has quit [Ping timeout: 252 seconds]
<Lutece> i Ah, caffine programming does work, any reason why when I send it over a tcp connection it wouldnt come out the same on the other side?
<Lutece> this is over local host
<ari-_-e> you would presumably get that same text on the other end
sinkensabe has quit [Remote host closed the connection]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
<imaleaf> as long as it's in a format that can be transmitted, it should be fine..perhaps it would be wise to encode it to base64 first
<Lutece> Hmm I will look into that
<ari-_-e> base64 is only useful if the medium is not 8-bit clean
sinkensabe has joined #ruby
<ari-_-e> such as email, for example
<ari-_-e> I don't think it's useful in this case
i_s has quit [Ping timeout: 240 seconds]
<imaleaf> Lutece: can we get more information on what problem you're trying to solve?
<ari-_-e> plus that text is only ascii anyway
sambao21 has joined #ruby
<ari-_-e> so the medium doesn't even need to be 8-bit clean
<Lutece> I'm using the RSA gem, and sending over a signature, that sig and the decrypted text dont seem to transmit properly
MrSamuel has joined #ruby
<Lutece> I'm thinking ruby is trying to do something cleve with line breaks caused by hex interpretation
<Lutece> *clever
alexju has joined #ruby
<Lutece> so base64 may fix that
i_s_ has quit [Ping timeout: 240 seconds]
supermarin has joined #ruby
dingus_khan has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 258 seconds]
hgl has joined #ruby
eka has joined #ruby
supermarin has quit [Ping timeout: 264 seconds]
Deele has quit [Ping timeout: 255 seconds]
s2013 has joined #ruby
lukec has quit [Quit: lukec]
s2013 has quit [Remote host closed the connection]
<ari-_-e> Lutece: what exactly are you experiencing?
pen has quit [Read error: Connection reset by peer]
<Lutece> One sec, let me compare the base64 differances
<Lutece> ok one of them is the same
<imaleaf> base64 will always come out the same way..
<Lutece> Hu both are the same... thats one problem down
<Lutece> Yeah... but with the strange ass problems I've had so far, I'm checking everything xD
Hobogrammer has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
s3ri0us has quit [Quit: Leaving...]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Lutece> Ok, I think all I need to do now is figure out how this RSA gem works with verifying signatures and I should be good to go
pen has joined #ruby
sdwrage has joined #ruby
pu22l3r has quit [Remote host closed the connection]
<imaleaf> but how are you transmitting it? like ari-_-e pointed out, you really shouldn't be getting such corruption to begin with. I've never experimented with error detection..isn't it sort of handled by http already?
ltdl has joined #ruby
robustus has quit [Ping timeout: 264 seconds]
User458764 has quit [Ping timeout: 252 seconds]
sdwrage_ has joined #ruby
User458764 has joined #ruby
GriffinHeart has quit [Remote host closed the connection]
robustus has joined #ruby
User458764 has quit [Client Quit]
s00pcan has quit [Ping timeout: 276 seconds]
pontiki has joined #ruby
<Lutece> No this is just a TCP socket talking to a server, but the way that ruby tries to just recieve one line of text at a time was messing with the data due to the fact that things that looked like new lines wern't supposed to be them
Es0teric has joined #ruby
einarj has joined #ruby
<Lutece> it works now, transmits fine
sdwrage has quit [Ping timeout: 276 seconds]
<pontiki> hallo o/
<Lutece> its just the signing thats failing and I have no idea why
srajan has joined #ruby
<Lutece> the text is decoded fine, although that uses a different key pair
<shevy> pontiki! you are back!
srajan has quit [Max SendQ exceeded]
i_s has joined #ruby
<Lutece> And i think I just found out why thats a problem
i_s has quit [Remote host closed the connection]
<pontiki> i am
sambao21 has quit [Quit: Computer has gone to sleep.]
<Lutece> p and b look like the same thing too much, I think we should ban these letters
<pontiki> they gave us half the day off today
einarj has quit [Ping timeout: 252 seconds]
<pontiki> and we had a grill out on the loading dock
mikemac has joined #ruby
Es0teric has quit [Ping timeout: 265 seconds]
crazymykl has quit [Ping timeout: 252 seconds]
smathieu_ has quit [Remote host closed the connection]
Lightsword has joined #ruby
alpha123 has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
<imaleaf> what? base64 doesn't use key pairs, it's just an encoding
<shevy> well deserved after working overtime
axilla has quit [Ping timeout: 252 seconds]
mikemac has quit [Read error: Connection reset by peer]
mikemac has joined #ruby
MrSamuel has quit [Ping timeout: 264 seconds]
peckermanzzz has joined #ruby
doev has quit [Ping timeout: 252 seconds]
ACPe is now known as LACP
<Lutece> imaleaf, I'm using it to transmit rsa stuff
doev has joined #ruby
Arkaniad has quit [Ping timeout: 252 seconds]
Hobogrammer has quit [Ping timeout: 258 seconds]
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
babykosh has joined #ruby
mercwithamouth has quit [Ping timeout: 258 seconds]
sski has joined #ruby
bmurt has joined #ruby
centrx has quit [Quit: All this computer hacking is making me thirsty]
shevy has quit [Ping timeout: 240 seconds]
yfeldblum has quit [Remote host closed the connection]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
poguez_ has quit [Quit: Connection closed for inactivity]
Hanmac1 has joined #ruby
b1205 has quit [Ping timeout: 252 seconds]
b1205 has joined #ruby
Hanmac has quit [Ping timeout: 264 seconds]
pen has quit [Ping timeout: 252 seconds]
<pontiki> imaleaf: are you wash?
babykosh has quit [Quit: babykosh]
Freak has joined #ruby
<imaleaf> wash?
Freak has quit [Client Quit]
KanKava_ has joined #ruby
<pontiki> not a firefly fan, i guess
brtdv has joined #ruby
<imaleaf> why do ruby people keep bringing up firefly!
<imaleaf> :p
KanKava has quit [Ping timeout: 252 seconds]
<pontiki> "i am a leaf on the wind" -- one of Wash's best lines
sepp2k has quit [Read error: Connection reset by peer]
wallerdev has quit [Quit: wallerdev]
shevy has joined #ruby
<imaleaf> ah :p
<imaleaf> well now I'll have to watch it
b1205 has quit [Ping timeout: 264 seconds]
ltdl has quit [Remote host closed the connection]
MrSamuel has joined #ruby
<duncannz> this code works but it feels like there must be a better way especially with the two functions at the end of the Task class. http://pastebin.com/H20Z2E7D
shevy has quit [Ping timeout: 265 seconds]
n_blownapart has quit []
axilla has joined #ruby
supermarin has joined #ruby
<ari-_-e> duncannz: attr_reader
<OffTheRails> you can replace those two getters with attr_reader :name, :url declared on the class
<OffTheRails> duncannz, do you not have a Task model that inherits from ActiveRecord?
<pontiki> you could also replace the class with just `Task = Struct.new :name, :url`
wiku5_ has joined #ruby
<duncannz> pontiki: yes. that is a better idea for this simple case. thanks
codeurge has joined #ruby
jimbow has quit [Quit: Lost terminal]
axilla has quit [Ping timeout: 252 seconds]
supermarin has quit [Ping timeout: 258 seconds]
brtdv has quit []
wiku5_ has quit [Client Quit]
braincra- has joined #ruby
jamto11 has joined #ruby
shevy has joined #ruby
mikesplain has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
braincrash has quit [Ping timeout: 252 seconds]
Avahey_ has joined #ruby
maestrojed has joined #ruby
maestrojed has quit [Client Quit]
mikesplain has quit [Client Quit]
jamto11 has quit [Ping timeout: 276 seconds]
<shevy> if hasattr(os, 'getuid') and os.getuid() == 0:
<shevy> this checks for superuser
<shevy> in python
<shevy> what would the corresponding be in ruby?
<duncannz> if Process.uid == 0
<shevy> aaah
<shevy> hmm
<shevy> why does that python line check for two things...
pu22l3r has joined #ruby
<duncannz> that python line first checks if "os" module is imported at all
<duncannz> which is kinda redundant
<shevy> weird
<duncannz> because in python you would have to import os first. so it's just making sure i guess
<shevy> cool thing is - no comment at all ... this is part of jhbuild http://ftp.gnome.org/pub/gnome/sources/jhbuild/3.12/jhbuild-3.12.0.tar.xz
lukec has joined #ruby
alpha123 has joined #ruby
alpha123 has quit [Client Quit]
alpha123 has joined #ruby
alpha123 has quit [Client Quit]
alpha123 has joined #ruby
radic has quit [Ping timeout: 252 seconds]
radic has joined #ruby
dingus_khan has joined #ruby
pu22l3r has quit [Ping timeout: 252 seconds]
jxf has joined #ruby
freerobby has quit [Quit: Leaving.]
MrSamuel has quit [Ping timeout: 258 seconds]
ixti has quit [Ping timeout: 240 seconds]
<ari-_-e> duncannz, shevy: no, that does not check if os has been imported
<ari-_-e> it checks if os has a getuid attribute
lw has quit [Quit: s]
<duncannz> yeah you're right.
<ari-_-e> it is redundant though
dingus_khan has quit [Ping timeout: 264 seconds]
<duncannz> but that wouldn't really happen unless os wasn't imported
cheeti has quit [Ping timeout: 240 seconds]
sski has quit [Remote host closed the connection]
<ari-_-e> duncannz: if os wasn't imported, os wouldn't exist at all
<ari-_-e> and a exception would be raised
i_s has joined #ruby
amclain has joined #ruby
sambao21 has joined #ruby
MrSamuel has joined #ruby
<shevy> what would you guys recommend for ruby to enable stuff like: "foo --help" or "foo --database=/var/lib", where foo is a ruby script
tkuchiki has joined #ruby
i_s has quit [Ping timeout: 252 seconds]
<benzrf> shevy: why not Thor
<shevy> do you use thor for your ruby scripts?
<benzrf> i used thor bethore
<benzrf> it was pretty good
<benzrf> a nice dsl
<shevy> ok
<alpha123> Thor is nice.
<benzrf> its mostly intended for subcommand-based stuff
<benzrf> like git or bundler
marcdel has joined #ruby
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
wallerdev has joined #ruby
Boohbah has joined #ruby
Vivekananda has joined #ruby
Guest__ has joined #ruby
<shevy> I'll have it in my todo list now for this weekend
<shevy> another question
<shevy> say there is a structure like this:
<shevy> module Foo; class Bar
<shevy> bar = Foo::Bar.new
<shevy> bar.output_full_scope # this should give back a string called 'Foo::Bar'
<shevy> hmm I think I'd need this available optionally on all classes
Valesk_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sambao21 has quit [Quit: Computer has gone to sleep.]
marcdel has quit [Ping timeout: 265 seconds]
jp123 has quit [Ping timeout: 252 seconds]
combusean has joined #ruby
jrhe has quit [Quit: Connection closed for inactivity]
<ari-_-e> shevy: there's Module.nesting
Royalb15 has joined #ruby
KanKava_ has quit [Quit: leaving]
binaryhat has quit [Quit: Leaving]
Lightsword has quit [Ping timeout: 252 seconds]
<ari-_-e> shevy: actually I guess all you'd need is bar.class.name?
noob101 has joined #ruby
Lightsword has joined #ruby
lunaticedit has joined #ruby
SCommette has quit [Ping timeout: 276 seconds]
<lunaticedit> Hey, I'm using ar.map{ |val| val.fn } where fn is a function that returns an array. Is there a way to have map return a concat of all results instead of an array of arrays?
marcdel has joined #ruby
<lunaticedit> in C# i'd use source.SelectMany(x => x.lines)
<ari-_-e> lunaticedit: maybe reduce?
<OffTheRails> flatten?
<OffTheRails> or am I reading it wrong
SCommette has joined #ruby
<lunaticedit> wow.. thanks ari, perfect!
<ari-_-e> flatten would probably work too
<lunaticedit> this is badass... I have replaced about 90 lines of C# code with 25 lines of ruby..
Bira has quit [Remote host closed the connection]
b1205 has joined #ruby
<Lutece> You should see the difference with C++ and ruby
<lunaticedit> Yeah I started there.. I didn't realize how powerful ruby was.. I'm a lead software engineer and I use C# at work (have to..), so i just naturally gravitated towards it at home
<OffTheRails> lunaticedit, you can also use short form: ar.map(&:fn).flatten
<Lutece> Yeah I learnt C# first, really nice language, and I still use it for front end stuff
<lunaticedit> I'm writing a compiler and I first used C, it took about 300 lines to get through the tokenizer stage, i think ruby will run me about 80
<Lutece> Still has the nicest looking code in my opinion
<lunaticedit> sourceLines = fileArgs.map{ |f| SourceFile.new(f) }.map{ |sf| sf.lines }.reduce
kumarat9pm has joined #ruby
<ari-_-e> that's not really what I meant...
<OffTheRails> probably not worth it, but...
<OffTheRails> sourceLines = fileArgs.map{ |f| SourceFile.new(f) }.map(&:lines).reduce
<lunaticedit> Args.Select(x => new SourceFile(x)).SelectMany(x => x.lines) is how i would have done it in C#
<benzrf> lunaticedit: that's syntactically valid ruby code!!
<lunaticedit> ah yeah, sorry.. I've got about 45 minutes of ruby experience so far >.>
<benzrf> >> Args.Select(x => new SourceFile(x)).SelectMany(x => x.lines)
<eval-in__> benzrf => /tmp/execpad-0b573544cc01/source-0b573544cc01:2: syntax error, unexpected tCONSTANT, expecting keyword_do or '{' or '(' ... (https://eval.in/156324)
<benzrf> oh nope
<benzrf> im wrong
<benzrf> nvm
<OffTheRails> haha
<lunaticedit> yeah that's a lambda expression :p
<benzrf> wait holy on
<benzrf> shouldnt that be valid syntax?
<ari-_-e> new
<lunaticedit> that line technically does nothing unless i threw a .ToList() or something on the end
<benzrf> ari-_-e: looks like a method call to me ;)
<benzrf> >> new foo
<eval-in__> benzrf => undefined local variable or method `foo' for main:Object (NameError) ... (https://eval.in/156325)
<benzrf> >> new Foo
<eval-in__> benzrf => uninitialized constant Foo (NameError) ... (https://eval.in/156326)
<benzrf> syntactically valid!
Guest__ has quit [Ping timeout: 264 seconds]
<benzrf> >> foo(bar => new Baz)
<lunaticedit> OK how about this line then:
<eval-in__> benzrf => /tmp/execpad-101c0cb8f60c/source-101c0cb8f60c:2: syntax error, unexpected tCONSTANT, expecting keyword_do or '{' or '(' ... (https://eval.in/156327)
<benzrf> o ktheres the problem
<benzrf> >> foo(bar => new baz)
<eval-in__> benzrf => /tmp/execpad-5bdf59fba530/source-5bdf59fba530:2: syntax error, unexpected tIDENTIFIER, expecting keyword_do or '{' or '(' ... (https://eval.in/156328)
b1205 has quit [Ping timeout: 252 seconds]
<benzrf> :\
<lunaticedit> def initialize(source) ; @lines = File.read(source).squeeze("\n").each_line.each_with_index.map{ |l,x| _parseLine(source,l,x) } end
<OffTheRails> lunaticedit, couldn't you use: sourceLines = fileArgs.map{ |f| SourceFile.new(f).lines }.reduce
<lunaticedit> takes in a source file, and splits out a list of SourceLine objects (via parseLine, which honestly i can reduce)
<OffTheRails> no need for second map
bamyyyooo14335 has joined #ruby
sinkensabe has joined #ruby
<OffTheRails> you could even use inject to reduce it further
<OffTheRails> sorry, I'll stop playing golf. I'm terrible
<lunaticedit> here's what its really doing:
<lunaticedit> def initialize(source) ; @lines = File.read(source).squeeze("\n").each_line.each_with_index.map{ |l,x| SourceLine.new(source, l, x) } end
<lunaticedit> so i'm not sure how i'd reduce that.. again < 1 hour of ruby experience ever :p
Royalb15 has quit [Quit: Leaving]
Lightsword has quit [Ping timeout: 252 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
Shidash has joined #ruby
<OffTheRails> one pointer, read the Ruby style guide
<OffTheRails> use source_lines, file_args, etc.
axilla has joined #ruby
<lunaticedit> you can tell i do lots of javascript :p yeah i'm reading it now
<OffTheRails> not an authoritative source, but good guidance
supermarin has joined #ruby
<Boohbah> >> puts a = "hello"; 1.upto(a.size-2){|i| print a[i],' '*(a.size-2),a[a.size-i-1],"\n"}; puts a.reverse
<eval-in__> Boohbah => hello ... (https://eval.in/156329)
<ari-_-e> lunaticedit: you can use with_index instead of each_with_index there
<shevy> hmm lunaticedit why do you use squeeze
i_s has joined #ruby
<shevy> >> "abc\ndef\n".squeeze("\n")
<eval-in__> shevy => "abc\ndef\n" (https://eval.in/156330)
Lightsword has joined #ruby
<lunaticedit> btw that &:lines doesn't work
i_s has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 264 seconds]
<shevy> what is the method .lines
<shevy> where did you see it
marcdel has quit []
<lunaticedit> a getter
<ari-_-e> >> "abc\n\n\ndef\n\n\n".squeeze("\n")
<eval-in__> ari-_-e => "abc\ndef\n" (https://eval.in/156331)
<lunaticedit> oh duh n/m.. () instead of {}
<lunaticedit> helps to actually read
MrSamuel has quit [Ping timeout: 264 seconds]
braincra- has quit [Quit: bye bye]
<lunaticedit> ok thanks guys, most informative 5 minutes ever, getting back to code
supermarin has quit [Ping timeout: 258 seconds]
<lunaticedit> glad to see the community is awesome too
<OffTheRails> keep on truckin'
<OffTheRails> whatever that means
axilla has quit [Ping timeout: 264 seconds]
benzrf is now known as benzrf|offline
hgl has quit [Quit: Quit]
sputnik13 has joined #ruby
braincrash has joined #ruby
jaequery has joined #ruby
jaequery has quit [Max SendQ exceeded]
jaequery has joined #ruby
MrSamuel has joined #ruby
jaequery has quit [Client Quit]
alpha123 has quit [Ping timeout: 276 seconds]
<lunaticedit> oh one last thing, i'm assuming/hoping there's a reliable way to compile to binary as well
<ari-_-e> no
kumarat9pm has quit [Ping timeout: 245 seconds]
agjacome has quit [Ping timeout: 252 seconds]
<ari-_-e> ruby is an interpreted language
<shevy> lunaticedit try mruby but it is not for newbies
<lunaticedit> sorry I miss-spoke. I can package it into an exe
<lunaticedit> I've writtey a memory manager and pce device driver in assembler, I think I can figure it out if there isn't something out there :)
<lunaticedit> s/pce/pci
Lightsword has quit [Ping timeout: 252 seconds]
<shevy> ruby uses .gem files to distribute stuff
dinoex has quit [Read error: Connection reset by peer]
<shevy> .exe sounds highly specific to windows
<OffTheRails> try JRuby
<OffTheRails> that might get you there
<lunaticedit> It is.. i won't go into details but I'm going to send data in and out through service calls
<lunaticedit> So if I can at least shell execute ruby and grab the output as stdout i'll be fine
smathieu has quit [Remote host closed the connection]
smathieu_ has joined #ruby
<OffTheRails> why use Ruby for such a simple script?
Megtastique has joined #ruby
Lightsword has joined #ruby
<OffTheRails> use something more native to Windows
dinoex has joined #ruby
jdjd555 has joined #ruby
<lunaticedit> I'm going to try writing the lexer and tokenizer in ruby, that isn't exactly simple
<jdjd555> Anyone on here know how to use tinder on the computer?
<OffTheRails> oh
<jdjd555> I want to use an android app on the a computer, as I dont have a smart phone or up to date ipad.
kilk_ has joined #ruby
<OffTheRails> well, from my experience, Ruby support on Windows is dire
Es0teric has joined #ruby
kilk_ has quit [Client Quit]
<OffTheRails> I gave up. Though I've heard it's getting better. Look at RailsInstaller and JRuby
<jdjd555> anyone?
zorak has quit [Ping timeout: 264 seconds]
<lunaticedit> I'm using it in windows now, it took 0 effort to get up and running
<shevy> jdjd555 is that related to rbuy
<shevy> *ruby
<lunaticedit> click next a bunch of times, then ruby myfile.rb in command prompt
<jdjd555> No, but there are programmers on here.
hgl has joined #ruby
<jdjd555> Who probably play with emulators.
<lunaticedit> even shoes took 5 seconds to get working
<jdjd555> So, sure someone on here knows.
<jdjd555> Possibly.
<lunaticedit> I do, what's the issue?
gigetoo has quit [Remote host closed the connection]
<OffTheRails> lunaticedit, that's great, but now you're running into problems doing basic things like reading from stdout?
<OffTheRails> sorry, in
<lunaticedit> No, I'm just saying if I can't compile into an EXE package, at the very least, i can shell execute ruby directly
hgl has quit [Max SendQ exceeded]
brunops has quit [Quit: leaving]
<lunaticedit> In fact I'll go ahead and start up VS2013 and see if it works
<OffTheRails> all I can suggest is you have a look around
kumarat9pm has joined #ruby
kumarat9pm has quit [Max SendQ exceeded]
hgl has joined #ruby
gigetoo has joined #ruby
<shevy> I linked the last one in already!
<OffTheRails> so you did, apologies
<lunaticedit> yeah :p
<shevy> haha nah no worries
<shevy> we build up lunaticedit to take over ORCA
<lunaticedit> haha nah
<shevy> because let's face it
<shevy> the people on #ruby use either osx or linux
kumarat9pm has joined #ruby
<OffTheRails> viva la linux
kumarat9pm has quit [Max SendQ exceeded]
<shevy> :)
kumarat9pm has joined #ruby
<lunaticedit> I used to be boo M$ and yay Linux, back in the Gnome 1.x and early 2.x days. I remmeber when Qt went commercial and kde went all WUT
<shevy> lunaticedit may be the last windows guy out there in the wild
kumarat9pm has quit [Max SendQ exceeded]
JoeGaudet has quit [Quit: Computer has gone to sleep.]
dinoex has quit [Ping timeout: 252 seconds]
<shevy> I am boo MS and boo Linux
Es0teric has quit [Ping timeout: 264 seconds]
except has joined #ruby
<shevy> ruby helps feel better on both
<lunaticedit> But Gnome 3 made me want to harf, i hate KDE, and the other desktops I dislike, so now I run windows 8.1 on an iMac
<shevy> haha
<OffTheRails> ha!
kumarat9pm has joined #ruby
kumarat9pm has quit [Max SendQ exceeded]
<lunaticedit> because windows
<shevy> ah that's the trick with gnome and kde - you don't use them, you only use individual components
<OffTheRails> I quite like Windows as a desktop environment
<imaleaf> meh, xfce has gotten to be quite fine
<OffTheRails> I use win 7, and ubuntu through vm
<OffTheRails> and ubuntu on my laptop
<shevy> ack
<imaleaf> it doesn't feel 'limited' anymore
<shevy> unity
<imaleaf> ^
<lunaticedit> Anyway, I need to work on this compiler.. I've money to make
<shevy> from kde, I like kde konsole the most
<shevy> yeah yeah
<shevy> and you chat while you could MAKE SOME MONEY INSTEAD!!!
<OffTheRails> same
<imaleaf> isn't that what we all do?
<lunaticedit> Could be worse, i could start up a dwarf fortress stream
<shevy> imaleaf only those who need money
<pontiki> i've never been comfortable with using windows as a development environment
<OffTheRails> I actually need money and I have work and I'm STILL not working
lyanchih has joined #ruby
<OffTheRails> screw money
bmurt has quit []
<imaleaf> shevy: you don't need money?
sdwrage_ has quit [Quit: This computer has gone to sleep]
Bira has joined #ruby
dingus_khan has joined #ruby
alexju has quit [Remote host closed the connection]
<shevy> imaleaf I've got enough
<imaleaf> shevy: I'm considering making a personal webpage with a donate button :p
<lunaticedit> My ex takes about 1/3 of my check every week :)
dseitz has joined #ruby
<shevy> sounds like theft
<lunaticedit> I make just above poverty for my current living situation, but I'm in a higher tax bracket because they only count gross, yay usa
jaequery has joined #ruby
<lunaticedit> The sad thing is, if I quit my nice paying job, and work 30 hours a week at minimum wage, i'd have more spending money even though i'd make less than 5 times what i make now.. you figure that one out :) </rant>
jaequery has quit [Client Quit]
<shevy> don't rant
<shevy> you got a job
Bira has quit [Ping timeout: 264 seconds]
dingus_khan has quit [Ping timeout: 264 seconds]
freezey has joined #ruby
einarj has joined #ruby
<imaleaf> I definitely make less than poverty level
<imaleaf> so there :P
<OffTheRails> lunaticedit, that is outrageous. Have you thought of emigrating?
<shevy> that's ok
<shevy> you write php
<OffTheRails> don't think I could stand for that
<imaleaf> precisely
<lunaticedit> I don't have a choice
sambao21 has joined #ruby
<OffTheRails> or working less hours
<OffTheRails> man, what a ridiculous situation
<lunaticedit> I'm a lead, if i'm not there full time what's the point
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
<lunaticedit> Yeah, I actually have the kids 1/3 of the time (every weekend), and pay for 50% of all expenses. Don't have kids guys :p
<OffTheRails> don't worry
<lunaticedit> anyway WAY ot, no more talking about that
<OffTheRails> haha
bamyyyooo14335 has joined #ruby
Es0teric has joined #ruby
dinoex has joined #ruby
sambao21 has quit [Client Quit]
einarj has quit [Ping timeout: 265 seconds]
smathieu_ has quit [Remote host closed the connection]
smathieu has joined #ruby
bamyyyooo14335 has quit [Ping timeout: 265 seconds]
Lightsword has quit [Ping timeout: 240 seconds]
lw has joined #ruby
yfeldblum has joined #ruby
torresga has quit [Quit: torresga]
sski has joined #ruby
yfeldblum has quit [Remote host closed the connection]
kitak_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
freezey has quit [Remote host closed the connection]
MrSamuel has quit [Ping timeout: 276 seconds]
kitak has joined #ruby
hgl has quit [Ping timeout: 276 seconds]
SCommette has quit [Quit: SCommette]
jack_rabbit has joined #ruby
NukePuppy has joined #ruby
b1205 has joined #ruby
atraylen has quit [Ping timeout: 240 seconds]
yakko_ is now known as yakko
MrSamuel has joined #ruby
i_s has joined #ruby
lw has quit [Quit: s]
speakingcode has joined #ruby
b1205 has quit [Ping timeout: 252 seconds]
i_s has quit [Ping timeout: 265 seconds]
adeponte has quit [Ping timeout: 252 seconds]
axilla has joined #ruby
supermarin has joined #ruby
<noob101> hello guys
adeponte has joined #ruby
i_s has joined #ruby
<noob101> hi centrx, shevy, RubyPanther, ari-_-e
hgl has joined #ruby
<pontiki> welcome back, noob101
<noob101> Hello pontiki, I have yet to know you. You're very familiar.
<pontiki> we exchanged a couple lines last night
<pontiki> that's all
<noob101> ha ok pontiki
<imaleaf> we taught noob101 the ways of navigating life
axilla has quit [Ping timeout: 252 seconds]
supermarin has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
i_s has quit [Ping timeout: 264 seconds]
codeurge has joined #ruby
hgl has quit [Ping timeout: 276 seconds]
b1205 has joined #ruby
phinfonet has quit []
MrSamuel has quit [Ping timeout: 252 seconds]
hgl has joined #ruby
Fire-Dragon-DoL has quit [Quit: Leaving.]
jamto11 has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby
MrSamuel has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
<RubyPanther> @noob101.hello!
<yakko> has anybody here got a connection inside rubycentral?
jimbow has joined #ruby
ValicekB has joined #ruby
<jimbow> this is my code
<jimbow> i want to write my own method
<jimbow> how would i do that?
<jimbow> i think my syntax might be way off
<jimbow> i'm trying to do everything from memory
simoz111115 has quit [Ping timeout: 258 seconds]
jaequery has joined #ruby
lethjakman has joined #ruby
<OffTheRails> if we tell you, that's not from memory
jaequery has quit [Max SendQ exceeded]
<jimbow> ughhh
<OffTheRails> well, it is, our memory
<jimbow> true
<jimbow> it's so hard to memorize this cryptic stuff
<OffTheRails> you have written your own method. please explain
<jimbow> okay i will
jaequery has joined #ruby
<jimbow> brb... i will figure all this stuff out
<OffTheRails> ok :)
robbyoconnor has quit [Excess Flood]
<lunaticedit> given my 1 hour of ruby experience, it seems that the posted code doesn't actually do anything :p
<jimbow> not yet
<jimbow> is there a way that i could get my brain tested
<jimbow> people say i'm a "genius" but i feel like i'm fucking retarded
<lunaticedit> "def" defines a method, so your example has two methods defined
<RubyPanther> memory sucks
<lunaticedit> correct me if i'm wrong, but you don't have to prefix variables with @ unless you plan on making them class members
<jimbow> oh
<RubyPanther> where the heck did I put my manual?! rubber duckiiiieeeeeee!
<lunaticedit> (@@ prefix makes them the equiv of STATIC, as in, they are shared by all instances of said class)
robbyoconnor has joined #ruby
arrubin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lunaticedit> as in, don't use them? :p
<jimbow> i hate coming in here with nonsensical questions but why would i want to make it a member of a class?
<lunaticedit> that's a question for the ages
<jimbow> i don't want to waste anyone's time either... i'm trying my best to learn programming, but it's so freaking hard
<lunaticedit> I like to group my logical pieces into classes, you could technically just write procedural code with no classes
<RubyPanther> wtf is a member?
yfeldblu_ has joined #ruby
<lunaticedit> But for example, I have a class that represents a single line of text, and another class that represents a collection of said lines
<jdjd555> Where is a good irc chat I can go too.
<jdjd555> To ask where I can download tinder app on computer.
<ari-_-e> jimbow: this is irc, we're all wasting our time :)
<lunaticedit> #ubuntu if you like scrolling text
<jdjd555> Since it requires an ipad or android devicec.
<jdjd555> And I dont have one?
<ari-_-e> jdjd555: um
<lunaticedit> jdjd555: You can use an android emulator or iPad emulator (if you're on OSX)
Hobogrammer has joined #ruby
<lunaticedit> on OSX you can run iphone/ipad emulator via the stuff installed with xCode, on the "winders" you can download the android emulator stuff from google
<ari-_-e> jdjd555: but do you really want to look for hookups in an emulator...?
maroloccio has joined #ruby
<ari-_-e> jdjd555: also tinder is location based
momomomomo has joined #ruby
<ari-_-e> jdjd555: so your question makes no sense
<lunaticedit> if you're looking for a dating site in general, I recommend plent of fish (pof), worked for me ^_^
<jdjd555> Right...I know.
<ari-_-e> not to mention offtopic
yfeldblum has quit [Ping timeout: 258 seconds]
<jdjd555> I dont have ipad or android right now.
tkuchiki has quit [Quit: Leaving...]
<jdjd555> Yes, an emulator would work if I can get it to use my lcoation.
<jdjd555> location.
<ari-_-e> jdjd555: then don't use tinder
<jdjd555> I want to use tender.
<ari-_-e> hah
fwaokda has quit [Quit: Leaving]
<lunaticedit> man I think i have a crush on the map function
<ari-_-e> well, this is the wrong channel anyway
mjuszczak has quit [Ping timeout: 240 seconds]
<lunaticedit> puts Tokenizer.new(fileArgs.map{ |f| SourceFile.new(f) }.map(&:lines).reduce).tokens.map{ |l| "[#{File.basename(l.sourceLine.source)}:#{l.sourceLine.index}] #{l.sourceLine.text}"}
<jdjd555> ari-_-e: Great, then where is the right channel/
<OffTheRails> you're going overboard with this FP stuff, personally
<jdjd555> As that was my original question?
<yakko> taht looks like very readable code o_o
<OffTheRails> break out your code into small methods
<lunaticedit> that's just debug code
<OffTheRails> oh, cool
lethjakman has quit [Ping timeout: 240 seconds]
<yakko> lunaticedit: have you tried splitting it in like 7 lines or something?
<lunaticedit> haha hold on i'll paste what i have so far
<jdjd555> Well?
<ari-_-e> lunaticedit: have you even tried running that?
<lunaticedit> yeah it works
<jdjd555> Where is the right channel to run tinder on my computer and make it work?
<yakko> lunaticedit: it works, but it's not readable, have that be a method instead
<OffTheRails> err, jdjd555 go to #tinder maybe?
<OffTheRails> oh but they won't like you emulating their shiz
<ari-_-e> lunaticedit: #reduce doesn't work without any arguments or a block, so I don't see how it could work
<imaleaf> if you need any help with finding people, check out #nsa
<lunaticedit> i use reduce to collaps my "array of arrays"
<lunaticedit> First I load n source files, and for each file I break it into SourceLine objects, returning it as an array of them (for each file)
<ari-_-e> lunaticedit: that's not what reduce does, and again reduce can not be called like that
<lunaticedit> the collapse takes all the sourcelines for all the source files, and puts them in a giant array (in order specified on the command line)
<ari-_-e> lunaticedit: so I don't see how it could work
Es0teric has quit [Quit: Computer has gone to sleep.]
<OffTheRails> flatten
<lunaticedit> those lines get sent into a token feeder, which is then pulled down piece by piece into the lexer, which is what i'm doing now
<lunaticedit> I know it works, because that was one of my first questions.. and they said use reduce, and i did, and it worked :p
<lunaticedit> without that line it returns an array of arrays
<ari-_-e> lunaticedit: that was me, but you're not using it correctly
<OffTheRails> flatten is more descriptive :P
<lunaticedit> so use flatten instead?
<OffTheRails> go for it
<ari-_-e> >> [1, 2, 3, 4].reduce
<eval-in__> ari-_-e => no block given (LocalJumpError) ... (https://eval.in/156337)
<ari-_-e> see?
<ari-_-e> that doesn't work
lyanchih has quit [Quit: lyanchih]
<lunaticedit> >> [[1,2], [3]].reduce
<eval-in__> lunaticedit => no block given (LocalJumpError) ... (https://eval.in/156338)
<OffTheRails> >> [1,[2],3,4].flatten
<eval-in__> OffTheRails => [1, 2, 3, 4] (https://eval.in/156340)
<lunaticedit> >> [[1,2], [3]].flatten
<eval-in__> lunaticedit => [1, 2, 3] (https://eval.in/156341)
<lunaticedit> ok so flatten it is
lyanchih_ has joined #ruby
toastynerd has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<lunaticedit> >> [[1,2]].reduce
<eval-in__> lunaticedit => [1, 2] (https://eval.in/156342)
<lunaticedit> that's why it worked
<lunaticedit> i only specified one file :)
<OffTheRails> interesting
<lunaticedit> thanks OTR
i_s has joined #ruby
<lunaticedit> ignore everything in TokenFeeder, i'm doing that now
freezey has joined #ruby
<OffTheRails> lunaticedit, use attr_reader :text, :index, :source instead of those getter methods
<ari-_-e> ok, I guess it doesn't attempt to call the block when there's only one element
<OffTheRails> def initialize(s, t, i) ; @source = s ; @text = t ; @index = i end -------------- break that into multi-lines
Hobogrammer has quit [Quit: WeeChat 0.4.3]
<OffTheRails> if @text.strip.chr == '`' then return false end --------- should be ------- return false if @text.strip[...]
i_s has quit [Remote host closed the connection]
<OffTheRails> no need to return true on last line of valid method
<OffTheRails> return is implicit
Es0teric has joined #ruby
<lunaticedit> I thought it implicitly returns the value of the last expression
<lunaticedit> which would be false in that case
<OffTheRails> yes, that's why you don't need to "return true"
<OffTheRails> just "true" will do
<lunaticedit> OH
<lunaticedit> dur
<OffTheRails> same with SourceFile, use attr_reader and break up your initialize method into multi-lines
sski has quit [Remote host closed the connection]
sski has joined #ruby
<OffTheRails> parseLine should be parse_line. If you want it private, mark it as such
<lunaticedit> yup, symantics, gonna take a while
<OffTheRails> sadly, access control is not at all secure in Ruby
toastynerd has quit [Remote host closed the connection]
<lunaticedit> yeah i was originally going to make it private
<lunaticedit> but as i read up i was like "ehh.. nah"
<OffTheRails> for example, you can make the method private, hide it all you want, but you can still call it externally
<lunaticedit> but the important thing is you implicitly ~knew~ it was meant to be private
<lunaticedit> this is why i like _ prefixing on privates ;)
tkuchiki has joined #ruby
<ari-_-e> OffTheRails: it's not supposed to be secure
b1205 has quit [Ping timeout: 245 seconds]
<OffTheRails> ari-_-e, didn't say it was
<ari-_-e> you said "sadly"
<OffTheRails> yes, because it would be nice
<ari-_-e> why?
<OffTheRails> well, because if I want to mark a method as private, I want it to be private
<ari-_-e> OffTheRails: if I want a variable to contain a specific type, I want to be able to say that
<OffTheRails> ari-_-e, give me something to work with, come on
<OffTheRails> you know what I'm saying
<ari-_-e> OffTheRails: do you agree with what I just said?
<lunaticedit> nerds
sski has quit [Ping timeout: 252 seconds]
<OffTheRails> lunaticedit, aren't you team lead?
snath has joined #ruby
<pontiki> lunaticedit: you are in a channel devoted to a programming language. what do you expect to find here? :)
<OffTheRails> and you worked in asembler?
<lunaticedit> haha
<OffTheRails> haha
<lunaticedit> >.>
<lunaticedit> <.<
<OffTheRails> a nerd never forgets
<lunaticedit> I also wrote a zmachine emulator in javascript *hides*
<OffTheRails> get the shotgun out!
MrSamuel has quit [Ping timeout: 258 seconds]
<ari-_-e> OffTheRails: I assume you have an example of a language with stronger encapsulation in mind?
<lunaticedit> ok i'm going to sleep, thanks again guys
<OffTheRails> ari-_-e, look, ari, I have no problem being wrong. If you have a point to make, make it
<OffTheRails> I could care less about being right. I care about learning
<OffTheRails> so go for it, teach me
<lunaticedit> remember, friends don't let friends drink and derive
<OffTheRails> lunaticedit, how many times have you used that one?
<ari-_-e> OffTheRails: encapsulation isn't about security, and private/public/protected isn't about making things impossible to find
hgl has quit [Ping timeout: 245 seconds]
<OffTheRails> is 'find' not in the same arena as access control?
<ari-_-e> they're more about specifying an interface
fgo has joined #ruby
<lunaticedit> n types. night!
<lunaticedit> er n times.. see i'm sleepy
<OffTheRails> see ya
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
MrSamuel has joined #ruby
<ari-_-e> OffTheRails: find?
tkuchiki has quit [Quit: Leaving...]
<OffTheRails> yes, as in the act of finding
tkuchiki has joined #ruby
agent_white has quit [Quit: night]
perini has joined #ruby
<ari-_-e> sorry, I'm not sure what you mean
jaequery has joined #ruby
jaequery has quit [Client Quit]
<OffTheRails> you say encapsulation isn't about making things impossible to find, I understand that. Are you also saying access control is only about specifying an interface?
<OffTheRails> surely access control should be pretty good at.. ya know, controlling access
<RubyPanther> strong encapsulation is the Devil
sinkensabe has joined #ruby
<ari-_-e> OffTheRails: different languages have different ways of specifying what things you should be using
<ari-_-e> languages like Java make it very inconvenient for you to access private stuff
<ari-_-e> still not impossible, though
mjuszczak has joined #ruby
<ari-_-e> on the other end of the scale, the convention in Python is simply to prefix "private" methods with a single underscore
<ari-_-e> by convention, python programmers know that they shouldn't be using these methods
JoeGaudet has joined #ruby
<ari-_-e> I suppose ruby is somewhere in the middle - you don't have to mess with the bytecode, but you do still have to go a little bit out of your way
<OffTheRails> I did find this interesting comparison: https://mail.mozilla.org/pipermail/es-discuss/2010-December/012334.html
axilla has joined #ruby
duncannz has quit [Ping timeout: 240 seconds]
supermarin has joined #ruby
sinkensabe has quit [Ping timeout: 264 seconds]
skysploit has joined #ruby
skysploit has quit [Changing host]
skysploit has joined #ruby
Takle has quit [Remote host closed the connection]
<OffTheRails> thanks for the breakdown ari-_-e
Lutece has quit [Remote host closed the connection]
koderok has joined #ruby
pen has joined #ruby
eguim has quit [Ping timeout: 252 seconds]
supermarin has quit [Ping timeout: 240 seconds]
MrSamuel has quit [Ping timeout: 264 seconds]
Lightsword has joined #ruby
Lightsword has quit [Client Quit]
<OffTheRails> That above link is the strongest case I've read for strong encapsulation
<ari-_-e> I'm reading it
axilla has quit [Ping timeout: 245 seconds]
<RubyPanther> Rubby == Good, Strong == Ickycapsulation
Morkel has joined #ruby
mahlon has quit [Read error: Connection reset by peer]
combusean has quit [Ping timeout: 240 seconds]
eguim has joined #ruby
mahlon has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
MrSamuel has joined #ruby
sski has joined #ruby
Dreamer3 has quit [Ping timeout: 264 seconds]
<OffTheRails> It articulates why I feel iffy with encapsulation in Ruby. But that's fine. Who cares. What's important is why these choices are made. There's tradeoffs at almost every level
<RubyPanther> Ruby way in Ruby, or Java way in Ruby, tradeoffs? I'm not trading nothin
<OffTheRails> Java does not own strong encapsulation
xrq has joined #ruby
<RubyPanther> That is true, lots of sucky languages have it
<OffTheRails> I nice middle point I've found between Java and Ruby is Scala, that's my trade
<OffTheRails> I?
JasmeetQA has joined #ruby
sski has quit [Ping timeout: 264 seconds]
pencilcheck has joined #ruby
pen has quit [Read error: Connection reset by peer]
marcdel has joined #ruby
maletor has joined #ruby
<RubyPanther> If I have to be protected from myself, might as well admit up front it is going to be a WTF and there is no way to save it
Xeago has joined #ruby
momomomomo has quit [Quit: momomomomo]
maletor has quit [Client Quit]
dingus_khan has quit [Read error: Connection reset by peer]
dingus_khan has joined #ruby
<OffTheRails> Right, because only you will ever use the code you develop? Come on
<OffTheRails> if that's your argument, well, let's just stop there
marcdel has quit [Ping timeout: 276 seconds]
kitak has quit [Remote host closed the connection]
jack_rabbit has quit [Quit: SIGSEGV (core dumped)]
<OffTheRails> and to be fair, there's so many schools of thought on software design that we could debate this until the end of time
moeSeth_ has joined #ruby
einarj has joined #ruby
jack_rabbit has joined #ruby
MrSamuel has quit [Ping timeout: 245 seconds]
Dreamer3 has joined #ruby
<imaleaf> did I mention that I code in php? :p
Xeago has quit [Ping timeout: 276 seconds]
<OffTheRails> off with his head
Lewix has joined #ruby
Es0teric has quit [Ping timeout: 252 seconds]
marcdel has joined #ruby
<OffTheRails> I came from php
kitak has joined #ruby
mary5030 has quit [Remote host closed the connection]
Takle has joined #ruby
Shidash has quit [Ping timeout: 258 seconds]
<RubyPanther> OffTheRails: If you're worried about other people using your code, use paradigms appropriate for the language, not your favorites
MrSamuel has joined #ruby
<OffTheRails> RubyPanther, I do, thanks
Es0teric has joined #ruby
<OffTheRails> I'm certainly not advocating that we start hacking on such features to Ruby
einarj has quit [Ping timeout: 252 seconds]
<OffTheRails> someone made a blog post recently announcing an optional type system library for Ruby. I can't think of a worse idea
dingus_khan has quit [Remote host closed the connection]
skysploit has quit [Ping timeout: 240 seconds]
Lewix has quit [Ping timeout: 252 seconds]
papercode has quit [Quit: WeeChat 0.4.3]
agarie has quit [Quit: Leaving...]
Takle has quit [Ping timeout: 252 seconds]
jack_rabbit has quit [Ping timeout: 252 seconds]
alem0lars has joined #ruby
Hobogrammer has joined #ruby
fgo has quit [Remote host closed the connection]
eataix has joined #ruby
lukec has quit [Quit: lukec]
<pontiki> feh
<pontiki> FEH
Bira has joined #ruby
<pontiki> bedtime
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
amclain has quit [Quit: Leaving]
Arkaniad has joined #ruby
Bira has quit [Ping timeout: 264 seconds]
JasmeetQA has quit [Quit: Leaving.]
snath has quit [Read error: Connection reset by peer]
JasmeetQA has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
supermarin has joined #ruby
kyb3r_ has quit [Read error: Connection reset by peer]
<OffTheRails> same. night folks
axilla has joined #ruby
OffTheRails has quit [Quit: Leaving]
jamto11 has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
dingus_khan has joined #ruby
keen____ has joined #ruby
axilla has quit [Ping timeout: 252 seconds]
jamto11 has quit [Ping timeout: 245 seconds]
cina has joined #ruby
dingus_khan has quit [Ping timeout: 245 seconds]
sdwrage has joined #ruby
fgo has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
marcdel has quit []
dangerousdave has joined #ruby
claymore has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
marcdel has joined #ruby
klaut has joined #ruby
alexju has joined #ruby
NukePuppy has quit [Ping timeout: 240 seconds]
justinxreese has quit [Ping timeout: 246 seconds]
glenfe has quit [Read error: No route to host]
justinxreese has joined #ruby
freezey has quit [Remote host closed the connection]
brain_shim has quit [Ping timeout: 252 seconds]
yoshiki_ has joined #ruby
_justin has joined #ruby
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
b1205 has joined #ruby
hamakn has quit [Remote host closed the connection]
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
jdjd555 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
phansch has joined #ruby
lyanchih_ has quit [Ping timeout: 265 seconds]
yfeldblu_ has quit [Remote host closed the connection]
yfeldblum has joined #ruby
brain_shim has joined #ruby
yoshiki_ has quit [Quit: Leaving]
apeiros has joined #ruby
niko has joined #ruby
toastynerd has joined #ruby
jemendja has joined #ruby
<jemendja> hello
fantazo has joined #ruby
moneydouble has joined #ruby
imaleaf has quit [Ping timeout: 240 seconds]
Kryptonical has joined #ruby
marcdel has quit []
Deejay has joined #ruby
jemendja has quit [Quit: leaving]
Deejay is now known as Guest9916
MrSamuel has joined #ruby
kies has quit [Ping timeout: 240 seconds]
Guest9916 has quit [Client Quit]
kitak has quit [Remote host closed the connection]
nari has quit [Ping timeout: 252 seconds]
cina has quit [Ping timeout: 252 seconds]
cina has joined #ruby
cina has quit [Client Quit]
brtdv has joined #ruby
supermarin has joined #ruby
zz_nopc0de is now known as nopc0de
Andromeda has joined #ruby
CodeBunny has quit [Quit: CodeBunny needs a carrot. Be back later.]
axilla has joined #ruby
supermarin has quit [Ping timeout: 240 seconds]
codename539 has joined #ruby
dingus_khan has joined #ruby
gverri has joined #ruby
MrSamuel has quit [Ping timeout: 276 seconds]
axilla has quit [Ping timeout: 245 seconds]
claymore has quit [Ping timeout: 252 seconds]
imaleaf has joined #ruby
Hanmac1 is now known as Hanmac
Arkaniad has quit [Ping timeout: 240 seconds]
dingus_khan has quit [Ping timeout: 258 seconds]
claymore has joined #ruby
JasmeetQA1 has joined #ruby
JasmeetQA has quit [Ping timeout: 258 seconds]
nopc0de is now known as zz_nopc0de
claymore has quit [Ping timeout: 252 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
MrSamuel has joined #ruby
Andromeda has quit [Remote host closed the connection]
kies has joined #ruby
Andromeda has joined #ruby
kies has quit [Changing host]
kies has joined #ruby
claymore has joined #ruby
MrSamuel has quit [Client Quit]
einarj has joined #ruby
guardian has left #ruby ["WeeChat 0.4.3"]
kies has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
_justin has quit [Quit: _justin]
b1205 has quit [Ping timeout: 265 seconds]
flops has joined #ruby
xrq has quit [Ping timeout: 240 seconds]
Andromeda has quit []
rayzinnz has joined #ruby
flops has quit [Client Quit]
flops has joined #ruby
supermarin has joined #ruby
davedev24_ has quit [Remote host closed the connection]
pencilcheck has quit [Remote host closed the connection]
flops has quit [Client Quit]
flops has joined #ruby
ctp_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
flowerpot_ has left #ruby [#ruby]
skaflem has joined #ruby
setra has joined #ruby
moeSeth_ has quit [Quit: Connection closed for inactivity]
kies has joined #ruby
kies has quit [Changing host]
kies has joined #ruby
gmas has quit [Quit: WeeChat 0.4.3]
danijoo_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
Zackio has quit [Ping timeout: 252 seconds]
hamakn has joined #ruby
jimbow has quit [Quit: LEAVING]
kenneth has joined #ruby
Zackio has joined #ruby
supermarin has quit [Quit: Computer has gone to sleep.]
supermarin has joined #ruby
Hanmac1 has joined #ruby
jhass|off is now known as jhass
einarj has quit [Remote host closed the connection]
rayzinnz has quit [Remote host closed the connection]
kitak has joined #ruby
Hanmac has quit [Ping timeout: 258 seconds]
phutchins has quit [Ping timeout: 240 seconds]
_justin has joined #ruby
pen has joined #ruby
chipotle has quit [Quit: cya]
supermarin has quit [Ping timeout: 265 seconds]
sinkensabe has joined #ruby
Guest57743 has joined #ruby
CodeBunny has joined #ruby
perini has quit [Remote host closed the connection]
xrq has joined #ruby
mohring has joined #ruby
except has quit [Quit: derpity derp]
Vivekananda has quit [Quit: Ex-Chat]
Hobogrammer has quit [Ping timeout: 252 seconds]
Hanmac1 is now known as Hanmac
shvelo has joined #ruby
codename539 has quit [Remote host closed the connection]
dmitrykorotkov has joined #ruby
xrq has quit [Ping timeout: 252 seconds]
duncannz has joined #ruby
jxf has quit [Quit: Leaving]
jamto11 has joined #ruby
axilla has joined #ruby
elaptics`away is now known as elaptics
dingus_khan has joined #ruby
jamto11 has quit [Ping timeout: 245 seconds]
axilla has quit [Ping timeout: 240 seconds]
einarj has joined #ruby
lokeshguddu has joined #ruby
einarj has quit [Remote host closed the connection]
zorak has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
phansch has quit [Quit: WeeChat 0.4.3]
lokeshguddu has quit [Client Quit]
phansch has joined #ruby
andrewlio has joined #ruby
wallerdev has quit [Quit: wallerdev]
Morkel_ has joined #ruby
MrSamuel has joined #ruby
Morkel has quit [Ping timeout: 265 seconds]
Morkel_ is now known as Morkel
bigkevmcd has quit [Quit: Ex-Chat]
toastynerd has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
foooobear has joined #ruby
moneydouble has quit [Read error: No route to host]
moneydouble1 has joined #ruby
kitak has quit [Remote host closed the connection]
shvelo has quit [Ping timeout: 252 seconds]
vitorbaptista has quit [Ping timeout: 240 seconds]
rafaelcaricio has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
kitak has joined #ruby
LiohAu has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
phansch has joined #ruby
moneydouble1 has quit [Quit: Leaving.]
alexju has quit [Remote host closed the connection]
codeurge has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
MrSamuel has quit [Ping timeout: 276 seconds]
nari has joined #ruby
_justin has quit [Quit: _justin]
foooobear_ has joined #ruby
MrSamuel has joined #ruby
foooobear has quit [Ping timeout: 258 seconds]
donnoc has joined #ruby
MrSamuel has quit [Ping timeout: 240 seconds]
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jackson-garcia has joined #ruby
MrSamuel has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
klaut has quit [Remote host closed the connection]
setra has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 276 seconds]
timonv has joined #ruby
meinside has joined #ruby
alem0lars has quit [Quit: Going AFK...]
roshanavand has joined #ruby
mikecmpbll has joined #ruby
sinkensabe has quit [Remote host closed the connection]
Takle has joined #ruby
thomasxie has joined #ruby
hamakn_ has quit [Remote host closed the connection]
Takle has quit [Ping timeout: 252 seconds]
dingus_khan has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
lkba has quit [Ping timeout: 264 seconds]
Takle has joined #ruby
nfk has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerou_ has joined #ruby
dingus_khan has quit [Ping timeout: 240 seconds]
foooobear_ has quit [Quit: Computer has gone to sleep.]
atraylen has joined #ruby
flops has quit [Ping timeout: 240 seconds]
MrSamuel has joined #ruby
flops has joined #ruby
predator117 has quit [Ping timeout: 240 seconds]
ephemerian has joined #ruby
frogssgy has joined #ruby
jackson-garcia has left #ruby [#ruby]
rafaelcaricio has quit [Remote host closed the connection]
predator117 has joined #ruby
kitak has quit [Remote host closed the connection]
dangerou_ has quit [Read error: Connection reset by peer]
frosgy has quit [Ping timeout: 245 seconds]
dangerousdave has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
toastynerd has joined #ruby
MrSamuel has joined #ruby
kitak has joined #ruby
lkba has joined #ruby
donnoc has quit [Ping timeout: 258 seconds]
ndrei has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 258 seconds]
donnoc has joined #ruby
chrisseaton has joined #ruby
kitak_ has joined #ruby
<apeiros> soooo, one week of holiday. hope this means good progress for my framework :D
lkba has quit [Ping timeout: 252 seconds]
Rahul_Roy has joined #ruby
kitak has quit [Ping timeout: 240 seconds]
jtdowney has joined #ruby
kitak_ has quit [Remote host closed the connection]
donnoc has quit [Ping timeout: 264 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
jtdowney has quit [Client Quit]
brtdv has quit []
toastynerd has joined #ruby
noob101 has quit [Ping timeout: 240 seconds]
MrSamuel has joined #ruby
thomasxie has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 252 seconds]
agjacome has joined #ruby
blackmesa has joined #ruby
koderok has quit [Ping timeout: 240 seconds]
bamyyyooo14335 has joined #ruby
doev has quit [Quit: Verlassend]
atraylen has quit [Ping timeout: 265 seconds]
yacks has joined #ruby
chrisseaton has quit []
shvelo has joined #ruby
elaptics is now known as elaptics`away
blackmesa has quit [Ping timeout: 245 seconds]
stef_204 has joined #ruby
zz_nopc0de is now known as nopc0de
timonv has quit [Remote host closed the connection]
jimg has joined #ruby
timonv has joined #ruby
GeorgesLeYeti has joined #ruby
<GeorgesLeYeti> Hi
jimg has quit [Client Quit]
chipotle has joined #ruby
<GeorgesLeYeti> I'm having an issue with a ruby script. I'm suppose to convert srt to txt (for avid media convert)
pentester_ has joined #ruby
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
andrewlio has quit [Quit: Leaving.]
chipotle has quit [Client Quit]
agt_the_walker has joined #ruby
<pentester_> i want to be master in github any good links?
<GeorgesLeYeti> But i don't get why it didn't work. My file is very close to the file return by avid. The only difference i found is: Into the file return by Avid: with CRLF, CR, LF line terminators (when i made file MyFile.txt) but in my file: with CRLF, CR line terminators
timonv has quit [Ping timeout: 245 seconds]
<imaleaf> master in...github? what?
bamyyyooo14335 has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
<imaleaf> github is simply a massive git repository
<pentester_> imaleaf: i want to know how to deal with it .. how to use it efficiently ..
<pentester_> the resources out there are complex and most of them not accurate
<imaleaf> ah. look up the git documentation :)
<pentester_> imaleaf: hard to read? do you have other recommendations?
<imaleaf> though to be honest...any decent IDE takes care of all the revision system stuff for you
<pentester_> i don't want someone to take care of me, i'm a vim coder :(
<pentester_> i want to deal with it in a low level
<imaleaf> then why are you complaining about git docs being hard to read? :P
<pentester_> because it is ..
marcdel has joined #ruby
<imaleaf> there's nothing to feel guilty about starting at a high level and then moving lower. you can also look up tutorials
<pentester_> can you provide me with the tutorials you recommend ?
<jhass> pentester_: just make topic branches for your stuff, only commit runnable code and commit early and often, everything else you need will emerge from such a workflow
<imaleaf> it's really not very hard to read.
chipotle has quit [Client Quit]
<imaleaf> just take it a page at a time
<imaleaf> if you want to master it--that's how
mercerist has joined #ruby
chipotle has joined #ruby
ktosiek has joined #ruby
<pentester_> ty, i'll read each page several times .. hope i didn't face any difficulties
mikecmpbll has quit [Quit: i've nodded off.]
marcdel_ has joined #ruby
spider-mario has joined #ruby
<pentester_> jhass: no clue what are you trying to say?
donnoc has joined #ruby
chipotle has quit [Client Quit]
<jhass> pentester_: I take it, you never used any kind of VCS before?
jamto11 has joined #ruby
marcdel_ has quit [Client Quit]
<pentester_> nope
<pentester_> only google code
agt_the_walker has quit [Quit: Leaving]
<jhass> okay, you're thinking to much about it
zorak has quit [Ping timeout: 245 seconds]
<jhass> head over to http://try.github.com and go through that
Rylee has quit [Max SendQ exceeded]
<jhass> then just start using it
chipotle has joined #ruby
marcdel has quit [Ping timeout: 258 seconds]
<pentester_> wow! a game .. very nice
axilla has joined #ruby
<pentester_> what's the different between github and git-scm?
<jhass> and as you use it you'll get better at it naturally, just like programming, or, well, anything else
<jhass> git is the software, github is a hosting site for git repositories
MrSamuel has joined #ruby
dingus_khan has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
jamto11 has quit [Ping timeout: 240 seconds]
<pentester_> jhass: is there a different when i type git-clone or wget from the terminal?
chipotle has quit [Client Quit]
donnoc_ has joined #ruby
<imaleaf> oh dear.
dinoex has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
axilla has quit [Ping timeout: 258 seconds]
<pentester_> i've many stupid questions this the first time i use github
dingus_khan has quit [Ping timeout: 245 seconds]
<jhass> it's not comparable
dinoex has joined #ruby
<jhass> really, just go through that tutorial and start using it
stef_204 has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<pentester_> ;) okey ..
<jhass> read the git-scm.org book on the side, but just start using it, that's the most important thing
bamyyyooo14335 has joined #ruby
hamakn has joined #ruby
donnoc has quit [Ping timeout: 240 seconds]
<jhass> you don't need to understand all concepts behind it right away and starting to use it will make that a lot easier later
flops has quit [Ping timeout: 258 seconds]
chipotle has quit [Client Quit]
alex88 has joined #ruby
imaleaf has quit [Ping timeout: 240 seconds]
flops has joined #ruby
Zespre has quit [Quit: leaving]
bamyyyooo14335 has quit [Ping timeout: 258 seconds]
banister has joined #ruby
Zespre has joined #ruby
imaleaf has joined #ruby
dinoex has quit [Ping timeout: 252 seconds]
<imaleaf> meh disconnected
dinoex has joined #ruby
Bira has joined #ruby
hiall has joined #ruby
<apeiros> imaleaf: so the leaf has fallen
vitorbaptista has joined #ruby
mercwithamouth has joined #ruby
<imaleaf> pretty much
banister has quit [Ping timeout: 240 seconds]
Avahey_ has quit [Quit: Connection closed for inactivity]
MrSamuel has quit [Ping timeout: 245 seconds]
sepp2k has joined #ruby
Rylee has joined #ruby
Hanmac1 has joined #ruby
<pentester_> jhass: ahhh! i hate it when someone use both commands to achieve the same thing
Bira has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
donnoc_ has quit [Ping timeout: 265 seconds]
<pentester_> jhass: is git rm --cached <file> identical to git reset HEAD <file>
Hanmac has quit [Ping timeout: 252 seconds]
MrSamuel has joined #ruby
<imaleaf> jhass: well how was I supposed to know a company invested so heavily into an interactive education for git? :p
<apeiros> pentester_: not exactly. I'm not sure about the precise details, but git reset HEAD for one requires HEAD to be present (which is not the case in the first commit)
kirun has joined #ruby
<apeiros> I haven't ever used git rm --cached except before the first commit
<pentester_> apeiros: that's what drive me insane .. when a very beginner tutorials add 2 options to delete a file
<apeiros> pentester_: it doesn't really delete it
<pentester_> it delete it from the stage? but the file still present in the directory
<apeiros> yes
<jhass> pentester_: it's not the same, git reset HEAD restores a file to the HEAD status, git rm --cached removes a file without physically deleting it, those can have the same effect if the file was newly added
<apeiros> pentester_: note that there's #git
<pentester_> apeiros: i know but they are in the sleeping mode
<apeiros> doesn't really make this the appropriate channel
<pentester_> lol
jack_rabbit has quit [Ping timeout: 276 seconds]
jle` has quit [Quit: WeeChat 0.4.2]
<pentester_> but i believe git and ruby are a very lovely brothers
<pentester_> jhass: thanks for the great explanation
<apeiros> ruby is a girl
blackmesa has joined #ruby
<pentester_> ;P
<apeiros> (at least its mascot)
mercerist has quit [Quit: Computer has gone to sleep.]
MrSamuel has quit [Quit: MrSamuel]
<LadyRainicorn> Ruby has a mascot?
<apeiros> yes. tried to google it just now, but couldn't find it. was some anime girl.
<imaleaf> well, it is japanese :p
eregon has quit [Remote host closed the connection]
eregon has joined #ruby
MrSamuel has joined #ruby
<danijoo_> hit for "ruby lang mascot"
jle` has joined #ruby
jle` has quit [Changing host]
jle` has joined #ruby
mijicd has joined #ruby
mijicd has quit [Remote host closed the connection]
blackmesa has quit [Ping timeout: 276 seconds]
agjacome has quit [Ping timeout: 252 seconds]
eregon has quit [Read error: Connection reset by peer]
bmurt has joined #ruby
SHyx0rmZ has joined #ruby
bamyyyooo14335 has joined #ruby
toastynerd has joined #ruby
danshultz has quit [Remote host closed the connection]
eregon has joined #ruby
magri has joined #ruby
danshultz has joined #ruby
JoeGaudet has quit [Quit: Computer has gone to sleep.]
<Hanmac1> danijoo_: red-head fox girl? *thumbs up*
fantazo has quit [Ping timeout: 252 seconds]
<Hanmac1> there was a thead about mascot in ruby mailing list https://www.ruby-forum.com/topic/4515274#new
mjs2600 has joined #ruby
mjs2600 has quit [Remote host closed the connection]
toastynerd has quit [Ping timeout: 252 seconds]
zly_ is now known as zly
lkba has joined #ruby
franzip has joined #ruby
danshultz has quit [Ping timeout: 240 seconds]
<LadyRainicorn> Ruby is hot.
<Hanmac1> ups that was the topic i was looking for https://www.ruby-forum.com/topic/4602286#new
Hanmac1 is now known as Hanmac
<Hanmac> LadyRainicorn: FlamePrincess is much more hotter xP
decoponio has joined #ruby
<LadyRainicorn> lollol
MrSamuel has quit [Ping timeout: 276 seconds]
dangerousdave has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 276 seconds]
dangerousdave has joined #ruby
eregon has quit [Remote host closed the connection]
flops has quit [Ping timeout: 240 seconds]
sinkensabe has joined #ruby
Takle has quit [Remote host closed the connection]
alex88 has quit [Remote host closed the connection]
flops has joined #ruby
Morkel has quit [Quit: Morkel]
Takle has joined #ruby
blackmesa has joined #ruby
Bira has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
zoraj has joined #ruby
sinkensabe has quit [Remote host closed the connection]
sinkensabe has joined #ruby
chipotle has joined #ruby
chipotle has quit [Client Quit]
Bira has quit [Ping timeout: 252 seconds]
chipotle has joined #ruby
thomasxie has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
sinkensabe has quit [Ping timeout: 276 seconds]
MrSamuel has joined #ruby
axilla has joined #ruby
chipotle has quit [Client Quit]
m8 has joined #ruby
dingus_khan has joined #ruby
chipotle has joined #ruby
alex88 has joined #ruby
alex88 has quit [Remote host closed the connection]
alex88 has joined #ruby
Atttwww has quit [Ping timeout: 276 seconds]
chipotle has quit [Client Quit]
timgauthier has joined #ruby
chipotle has joined #ruby
ndrei has joined #ruby
JasmeetQA has joined #ruby
chipotle has quit [Client Quit]
JasmeetQA1 has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
dingus_khan has quit [Ping timeout: 264 seconds]
chipotle has quit [Client Quit]
chipotle has joined #ruby
einarj has joined #ruby
axilla has quit [Quit: Lost terminal]
monsieur1 has joined #ruby
kitak has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
yfeldblum has joined #ruby
monsieurp has quit [Ping timeout: 276 seconds]
speakingcode has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
chipotle has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
yfeldblum has quit [Ping timeout: 240 seconds]
chipotle has quit [Client Quit]
klaut has joined #ruby
chipotle has joined #ruby
Lewix has joined #ruby
chipotle has quit [Client Quit]
chipotle has joined #ruby
chipotle has quit [Client Quit]
Kryptonical has quit [Ping timeout: 245 seconds]
chipotle has joined #ruby
bmurt has quit []
JasmeetQA has quit [Quit: Leaving.]
thomasxie has quit [Quit: Leaving.]
chipotle has quit [Client Quit]
User458764 has joined #ruby
andrewlio has joined #ruby
bmurt has joined #ruby
Lewix has quit [Remote host closed the connection]
JasmeetQA has joined #ruby
mjs2600 has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
toretore has joined #ruby
timonv has joined #ruby
toastynerd has joined #ruby
mikecmpbll has quit [Quit: i've nodded off.]
RaptorJesus has quit [Ping timeout: 272 seconds]
<frogssgy> When I call .to_sym on a string, is there a way to get back :foo rather than :"foo"?
shvelo is now known as LambeosaurusJesu
<jhass> frogssgy: you're confusing representation with value
frobrob has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
freerobby has joined #ruby
LambeosaurusJesu is now known as TRexJesus
<jhass> :foo and :"foo" are the same thing, just different representations
kevinykchan has quit [Quit: Computer has gone to sleep.]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
mjs2600 has quit [Remote host closed the connection]
JasmeetQA has quit [Read error: Connection reset by peer]
<frogssgy> Hmm, they are? I'm doing a CodeWars kata and assumed that was what was wrong with my result, I must be wrong then. Thanks.
einarj has quit [Remote host closed the connection]
<jhass> >> :foo == :"foo"
<eval-in__> jhass => true (https://eval.in/156372)
Bira has joined #ruby
<apeiros> >> :foo.equal?(:"foo") #even
<eval-in__> apeiros => true (https://eval.in/156373)
toastynerd has quit [Ping timeout: 265 seconds]
timonv has quit [Ping timeout: 276 seconds]
<jhass> >> :foo.inspect == :"foo".inspect # or that
<eval-in__> jhass => true (https://eval.in/156374)
<apeiros> frogssgy: there are symbols you can't construct literally without quotes
<apeiros> >> :"foo bar"
<eval-in__> apeiros => :"foo bar" (https://eval.in/156375)
<apeiros> impossible without "
roolo has joined #ruby
<frogssgy> hah, that was actually close to my problem: i'd forgotten to strip white space from the strings and hadn't noticed
<frogssgy> so the site expected :d where I had :" d"
tjsousa______ has joined #ruby
frobrob has joined #ruby
<jhass> note that you should avoid #to_sym in production code, it's a smell and possibly a DoS issue in your application
Bira has quit [Ping timeout: 252 seconds]
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
timgauthier has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
agjacome has joined #ruby
klaut has quit [Remote host closed the connection]
Devanon has joined #ruby
brtdv has joined #ruby
Lewix has joined #ruby
cashnguns has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
g0bl1n has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
justinxreese has joined #ruby
jrhe has joined #ruby
Soda has joined #ruby
mercerist has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
simono has joined #ruby
jamto11 has joined #ruby
MrSamuel has joined #ruby
dingus_khan has joined #ruby
duncannz has quit [Read error: Connection reset by peer]
alex88 has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 258 seconds]
duncannz has joined #ruby
lambo has joined #ruby
<shevy> can he use #to_s ?
phoo1234567 has joined #ruby
Lewix has quit [Ping timeout: 252 seconds]
dingus_khan has quit [Ping timeout: 252 seconds]
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
lyanchih has joined #ruby
roshanavand has quit [Quit: Leaving]
vitorbritto has joined #ruby
nari has joined #ruby
Deele has joined #ruby
klaut has joined #ruby
TRexJesus has quit [Ping timeout: 240 seconds]
sski has joined #ruby
MrSamuel has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
bamyyyooo14335 has joined #ruby
bmurt has quit []
lw has joined #ruby
Lewix has quit [Ping timeout: 245 seconds]
MrSamuel has joined #ruby
kevinykchan has joined #ruby
WillAmes has quit [Remote host closed the connection]
WillAmes has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
bamyyyooo14335 has quit [Quit: bamyyyooo14335]
LadyRainicorn has quit [Ping timeout: 276 seconds]
MrSamuel has quit [Ping timeout: 245 seconds]
phansch has quit [Quit: WeeChat 0.4.3]
brtdv has quit []
kyb3r_ has joined #ruby
postmodern has quit [Quit: Leaving]
MrSamuel has joined #ruby
XenoWolf_ has quit [Ping timeout: 252 seconds]
cina has joined #ruby
<cina> if I pass a bock to "puts" what will happen? will it not execute at all?
ElManu has joined #ruby
<cina> pass a {block}
<jhass> yes, a block to a method that doesn't expect a block will simply be ignored by it
<jhass> >> def foo; end; foo { never_executed }
<eval-in__> jhass => nil (https://eval.in/156385)
SHyx0rmZ has quit [Ping timeout: 252 seconds]
<cina> jhass: thanks!
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
zoraj has quit [Remote host closed the connection]
toastynerd has joined #ruby
Hanmac1 has joined #ruby
toastynerd has quit [Read error: No route to host]
toastynerd has joined #ruby
Hanmac has quit [Ping timeout: 240 seconds]
lw has quit [Quit: s]
fgo has joined #ruby
toastynerd has quit [Ping timeout: 258 seconds]
monsieur1 is now known as monsieurp
bluenemo has quit [Quit: Verlassend]
banister has joined #ruby
LadyRainicorn has joined #ruby
magri has quit [Read error: Connection reset by peer]
m8 has quit [Read error: Connection reset by peer]
m8 has joined #ruby
Trudko has joined #ruby
bmurt has joined #ruby
Takle_ has joined #ruby
magri has joined #ruby
Freddan962 has joined #ruby
Takle has quit [Ping timeout: 276 seconds]
lambo has quit [Quit: Lost terminal]
<Freddan962> I am getting a "wrong number of arguments <7 for 6> in FloatingEntity.rb:2" error. https://github.com/Freddan962/Spaceshooter leading from play.rb where I create a instance of the player class. Could someone help me?
<Freddan962> Full error message: http://puu.sh/8Z5cf.png
<Hanmac1> Freddan962: SpaceshipFighter line2: "initializedef" <<
p8952 has joined #ruby
p8952 has quit [Changing host]
p8952 has joined #ruby
<shevy> !!!
<Freddan962> Wow.. really.. thank you Hanmac! Been stuck for an hour! holy..
Hanmac1 is now known as Hanmac
<shevy> swallowed a newline there
magri has quit []
<Hanmac> shevy i think its more a copy-paste error
<shevy> Hanmac how is rwxw
<shevy> Hanmac: "No time for it now, must work"
bmurt has quit []
<shevy> :(
<Freddan962> Yeah it was a copy-paste error when copying parent's constructor :P
<Hanmac> shevy today there will be some new classed ported ... but also today i have some project to write in wx itself (i need to make a window ... where you can input text and the size of a Rect, and the Program calulates the correct FontSize for it)
<shevy> \o/
<shevy> 10px
<shevy> default!
lambo has joined #ruby
fantazo has joined #ruby
<Hanmac> shevy nah its a project for some cage labels, they need to write the name of the pets as large as possible, so you need to calculate the correct font size without line breaks
<lambo> hello, what would be the way to define the bottom of window to prompt ? like in a irc client for exemple
<shevy> I dont understand the question
<shevy> what window what prompt
<shevy> how is it related to ruby
cina has quit [Ping timeout: 252 seconds]
cina has joined #ruby
duncannz has quit [Ping timeout: 252 seconds]
tjsousa______ has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
sinkensabe has joined #ruby
<lambo> a script to run in terminal like window with a prompt which stays in the buttom of the window no matter what output rich the terminal
justinxreese has quit [Ping timeout: 246 seconds]
justinxreese has joined #ruby
kyb3r_ has quit [Quit: Leaving]
freerobby has quit [Quit: Leaving.]
<lambo> for example irssi
dangerousdave has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
<slash_nick> irssi isn't a rails app... but you're talking about a ruby script that interacts with stdin and controls stdout?
dangerousdave has joined #ruby
<slash_nick> why did i say rails app instead of ruby script
yfeldblum has quit [Ping timeout: 252 seconds]
<lambo> yes i mean is there why to attribute region of the teminal for specic task like the bottom for input without the output messing with it
doodlehaus has joined #ruby
<lambo> when i say is there a way i mean is there lib to help me with ^^
<cina> lambo: as far as I know you need to use ncurses
<slash_nick> ncurses can definitely help... have not used it myself
Burgestrand has joined #ruby
frobrob has quit [Ping timeout: 264 seconds]
<slash_nick> I was thinking of something like this, each_with_progress: https://github.com/adamgamble/each_with_progress/blob/master/lib/each_with_progress.rb ... I don't think it does as much as you want though
sinkensabe has quit [Remote host closed the connection]
cocotton has joined #ruby
<lambo> thx, i remember having heard of it but didnt check
sinkensabe has joined #ruby
kevinykchan has left #ruby ["["Textual IRC Client: www.textualapp.com"]"]
lukec has joined #ruby
<cina> it's interesting, "curses" docs is included in the Ruby 2.1.0 std docs, but not in 2.1.1 or 2.1.2
sinkensabe has quit [Ping timeout: 245 seconds]
<Hanmac> cina if i remember correctly that curses was kicked out if std ruby
timonv has joined #ruby
g0bl1n has quit [Ping timeout: 264 seconds]
<cina> Hanmac oh... I see
diegoviola has joined #ruby
<cina> you're right, it says here (https://github.com/ruby/curses) that it was "formerly part of the Ruby standard library"
<Hanmac> slash_nick: while its interesting imo that code can still be improved ... like "for i in 0..number_of_bars do      progress = progress + "="    end" can be replaced by progress += "=" * number_of_bars
<Hanmac> and yeah its not your code, just saying its not perfect
MrSamuel has quit [Ping timeout: 276 seconds]
<cina> Hanmac: out of curiousity, how do you keep your knowledge updated of the Ruby world? (asking because you knew about "curses" being kicked out)
timonv has quit [Ping timeout: 276 seconds]
sinkensabe has joined #ruby
lxsameer has quit [Quit: Leaving]
<shevy> it was an announcement on http://bugs.ruby-lang.org/projects/ruby-trunk cina
<shevy> shugo or what was his name proposed that
<shevy> And Hanmac is often finding bugs, so he is often on that site
fgo has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 252 seconds]
agjacome has quit [Ping timeout: 264 seconds]
timgauthier has joined #ruby
hiall has quit [Quit: hiall]
inversesquarelaw has quit [Remote host closed the connection]
sski has quit [Remote host closed the connection]
sski has joined #ruby
cocotton has quit [Remote host closed the connection]
<cina> shevy: interesting - I wish I could make a contribution too
<shevy> you could file issue requests :)
<shevy> that's my contribution... I give them good ideas, and others have to implement them ;)
Hanmac has joined #ruby
mjs2600 has joined #ruby
toastynerd has joined #ruby
<timgauthier> pft
LadyRainicorn has quit [Read error: Connection reset by peer]
<timgauthier> that is because you are a lazy person
LadyRainicorn has joined #ruby
<Hanmac> cina i am a bloody-stupid nightly user ... my ruby has a RUBY_RELEASE_DATE #=> "2014-05-18" means i did compile my ruby 6 days ago ( and i will maybe do it again today) ... means i pull many times from rubies github repo and sometimes i also do look what did change ... (like there are Dynamic & Static Symbols now in ruby, but ruby does manage that mostly internal)
dangerou_ has joined #ruby
pentester_ has left #ruby ["Leaving"]
sski has quit [Ping timeout: 245 seconds]
cina has quit [Remote host closed the connection]
<Hanmac> if i read the last changes correctly than ruby kicked minitest out ...
cina has joined #ruby
Rainicorn has joined #ruby
MrSamuel has joined #ruby
mjs2600 has quit [Ping timeout: 264 seconds]
cherry_l1n has quit [Ping timeout: 240 seconds]
toastynerd has quit [Ping timeout: 252 seconds]
dangerousdave has quit [Ping timeout: 240 seconds]
<cina> Hanmac: very cool!! I'd like to do that too, it makes sense to compile the latest version to try the new changes
LadyRainicorn has quit [Ping timeout: 265 seconds]
zorak has joined #ruby
meatherly has joined #ruby
fgo has joined #ruby
<timgauthier> update brb
timgauthier has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev24_ has joined #ruby
noob101 has joined #ruby
<noob101> Hey I need help.
<noob101> morning
doodlehaus has quit [Remote host closed the connection]
<noob101> morning*
<noob101> what is an instance variable
danman has joined #ruby
justinxreese has quit [Ping timeout: 246 seconds]
<shevy> noob101 do you know what is a global variable
<noob101> yes shevy, a global variable is a variable that can be accessed anywhere in the program.
<shevy> ok now
<shevy> noob101 do you think an instance variable can be accessed anywhere?
<noob101> yes shevy
<shevy> now you just described a global variable
<noob101> was that the correct answer?
<shevy> do not "guess", try to think
dagon666 has joined #ruby
<shevy> you already have global variables
<shevy> why have them again, in your example
<noob101> But I have no idea of the instance variable but it kind of like keeps the value solidly
<shevy> but a global variable also keeps the value solidly
<shevy> they have different scope however
<noob101> oh it does
<noob101> oh ok
<shevy> class Foo; def initialize; @foo = 5; end; end
justinxreese has joined #ruby
<shevy> class Foo; def initialize; $foo = 5; end; end
Hanmac1 has joined #ruby
<shevy> there
<noob101> ima see what happens in ruby
<shevy> the second example is useless because $foo really is valid anywhere
<noob101> >> class Foo; def initialize; @foo = 5; end; end
<eval-in__> noob101 => :initialize (https://eval.in/156400)
<shevy> so people can set to $foo outside too
<noob101> >> class Foo; def initialize; $foo = 5; end; end
<eval-in__> noob101 => :initialize (https://eval.in/156403)
<shevy> but they can not directly modify @foo that resides in class Foo namespace
<noob101> shevy what you mean people can set $foo outside
<shevy> didn't you explain it yourself
<shevy> <noob101> yes shevy, a global variable is a variable that can be accessed anywhere in the program.
<shevy> so logically you can change $foo anywhere
Hanmac has quit [Ping timeout: 240 seconds]
<noob101> right but that's what I was like brainwashed to remember
<noob101> I am not exactly sure how this process works, I have yet to see in action
<shevy> that's bad
<shevy> you should understand before you try to accept new information
<noob101> I learn from really watching the practicality of things and the actual
<shevy> how do you want to see the practicality of global variables
<shevy> I almost never use them in my coe
<shevy> code
<noob101> I learn better that way, I need to actually see it then compare
<noob101> h ok
<shevy> well you can test yourself
<noob101> shevy, I don't know see the output and stuff idk
<shevy> change your code to use only $variables
<noob101> ok shevy
<noob101> shevy Im scared, I don't think I want to do that
<shevy> and then change to class-based design with @ivars instead
<shevy> yeah if you are scared, then use php
<noob101> lol um
<noob101> ruby is my main right now, why would I do that to myself
<noob101> But one more thing.
<shevy> because you are scaredy cat
<noob101> Waaaaah, no I'm not! I just don't like switching.V:(
<noob101> I have question.
MrSamuel has quit [Ping timeout: 264 seconds]
<Freddan962> Ruby :D
<noob101> What happens if you don't use instance variables in like classes
<Freddan962> Noob101 are you a noob just like me?
fgo has quit [Remote host closed the connection]
tjsousa______ has joined #ruby
<noob101> do instance variables do the same thing if they're not in like classes in the program?
<noob101> Freddan962: yup
<shevy> noob101 of course it depends where you define the @ivars
<shevy> noob101 you always must keep the scope in mind
<shevy> foo = 5
<shevy> def bla
vitorbritto is now known as GodPuppet
<shevy> foo = 6
<shevy> end
<shevy> what is foo if you invoke bla()
<shevy> noob101 ^^^
<noob101> hmmmm must use my brain now give me a second
<shevy> there are only two possibilites
<shevy> *possibilities
GodPuppet has quit []
<Freddan962> 50% correct chance! :D
<shevy> if you keep the scope in mind, you will know the right answer
<shevy> Freddan962 even 100% if he remembers the scope of variables!
<Freddan962> Shevy: True! :)
<noob101> oh that's easy, I think 6
<shevy> but yeah, only 50% if he does not know
jamto11 has joined #ruby
ElManu has quit []
<shevy> and of course he instantly picks the wrong answer
NukePuppy has joined #ruby
<noob101> whhhhat
<noob101> really????
<jhass> well, that question was bogusq
<noob101> I thought it was 6
<jhass> *bogus
<noob101> sigh.
<jhass> it's 6 inside bar, 5 after it
<lunaticedit> it should be 5..
GodPuppet has joined #ruby
<lunaticedit> unless they were both @foo
<shevy> precisely, foo is 5
<Freddan962> Shevy: Would "Array.new(3, Array.new(3))" create a array [[[], [], []], [[], [], []], [[], [], []]]?
tjsousa______ has quit [Client Quit]
<shevy> but lunaticedit knows javascript so he is no noob
anaeem1_ has joined #ruby
<Freddan962> Shevy: Did not get any output from IRB
<shevy> # => [[nil, nil, nil], [nil, nil, nil], [nil, nil, nil]]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lunaticedit> I'd immagine that would create a array of three arrays with no values
<shevy> you have an army of nils
<lunaticedit> dang beat me to it shevy
chrisseaton has joined #ruby
<jhass> Freddan962: Array.new(3) { Array.new(3) { [] } }
chrisseaton has quit [Client Quit]
<lunaticedit> I like how ruby uses nil like pascal does ;)
<Freddan962> jhass: Thank yer!
<noob101> shevy give me another local variable/instance variable question
<shevy> noob101 I think you have bad karma
trades has joined #ruby
<shevy> your intuition makes you pick the wrong answers
User458764 is now known as User458764_NotHe
<noob101> I just woke up so it doesn't count shevy
dingus_khan has joined #ruby
<Freddan962> Trying to write a content manager for my game :P
<lunaticedit> it always counts
<shevy> noob101 ok another one
<lunaticedit> the only thing that doesn't count are iterators
<shevy> class Foo; @foo = 5; end
<shevy> versus
<jhass> noob101: class Foo; def initialize; @foo = :a; end; def foo; @foo; end; end; @foo = :b; Foo.new.foo #=> what's the result?
MrSamuel has joined #ruby
<shevy> class Foo; def initialize;@foo = 5;end; end
<shevy> oh damn
alex88 has joined #ruby
<lunaticedit> rablbablablasb paste
<shevy> noob101 look at jhass code first, ignore my code for now
<noob101> ok shevy
<shevy> it may be easier if you put that into your editor with newlines
<jhass> ^ +1
<shevy> noob101 what is this in his code doing: Foo.new.foo
jamto11 has quit [Ping timeout: 276 seconds]
XenoWolf has joined #ruby
<noob101> It's confusing as hell but I will go for it, from what I SEE
<shevy> if you understand what this does, then you know what output it will give you
<noob101> Foo is the class
<shevy> yes
<noob101> Foo.new makes a new class
<Freddan962> Jhass, Shevy: I am trying to write a content manager for my game. It should store all the content (objects) in a grid system. The total 'world' size is 640 by 480. Each grid should represent 32 pixels. I am trying to think of a smart way to access the content in a grid. Perhaps a multidimensional array? How would you do it? Would be nice if you could access the content by content[x][y] => array of content at grid x, y
<shevy> yes
<noob101> then um, .foo is the method
<shevy> yes!
<shevy> now you know the right order
DaniG2k has joined #ruby
<noob101> .foo puts @foo I think
<shevy> what is left to do is to track the value of @foo
<shevy> well, there is no puts in his code
<jhass> noob101: re Foo.new, almost, it makes a new instance of the class, also known as object (probably right in your head, just wrong terminology)
<noob101> @foo will always be the last value assigned to it right?
chipotle has joined #ruby
<noob101> jhass right
<shevy> noob101 does that make sense what you just said
<shevy> well it does
<shevy> haha
<noob101> shevy somewhat but confusing
sinkensabe has quit [Remote host closed the connection]
<noob101> so I will say as my final answer
<shevy> yeah
<noob101> @foo is :b *locks final answer*
<shevy> and now the question
agjacome has joined #ruby
<shevy> what will his code output?
<noob101> was I right
<shevy> well
<jhass> noob101: now put a puts in front the Foo.new.foo and try it out
User458764_NotHe has quit [Ping timeout: 252 seconds]
<shevy> you again ignored scope
<shevy> you will first need to understand scope before you should continue
<noob101> Awww dang it, I got it wrong
dingus_khan has quit [Ping timeout: 258 seconds]
sski has joined #ruby
alex88 has quit [Ping timeout: 252 seconds]
<noob101> >> class Foo; def initialize; @foo = :a; end; def foo; @foo; end; end; @foo = :b; Foo.new.foo
<eval-in__> noob101 => :a (https://eval.in/156415)
<noob101> it was :a
lukec has quit [Quit: lukec]
<jhass> Freddan962: array of array of arrays should be fine for a first iteration, later you may want to implement custom classes that provide the [] and []= methods for similar access
Hanmac has joined #ruby
<shevy> noob101 if it helps you, you can have multiple @foo
<shevy> but you can have only one $foo
<noob101> But how and why
<Freddan962> Jhass: So something among the lines of https://github.com/Freddan962/SurvivalBox-2D/blob/master/src/Map.rb (My old map class) - line 59-70?
<shevy> because $foo is valid everywhere
<shevy> whereas @foo resides somewhere
<noob101> multiple instance variables with the same name and different values, how does that work out?
<jhass> noob101: so local and instance variables, in contrast to global variables, are bound to certain scope. Different statements create new scopes and there are different types of scope, for example class scope, instance scope and method scope
<shevy> and is thus valid only within its scope
<shevy> so if you have:
<shevy> class Foo; @foo = 5; end
<shevy> it's different to
<shevy> @foo = 5
<jhass> Freddan962: yep
<shevy> noob101 because they are legit only in a respective scope, and out outside of that; other languages have that as well
Hanmac1 has quit [Ping timeout: 276 seconds]
<shevy> even php!
<shevy> you can do... global $foo in a php function
benzrf|offline is now known as benzrf
<jhass> Freddan962: you don't need the explicit return btw, [] could be written as @tiles[x][y] if @tiles[x]
<noob101> oooooooooh I think I get it.
sski has quit [Ping timeout: 252 seconds]
<Freddan962> jhass: Yep, thats an old project of mine. Currently working on a space invader style game :)
<Freddan962> jhass: Thanks by the way :D
ascarter_ has joined #ruby
<noob101> So if a @foo is in a class, it's totally different then a @foo outside of class and not in a method or anything right?
ascarter_ has quit [Client Quit]
Shidash has joined #ruby
ascarter_ has joined #ruby
ascarter_ has quit [Client Quit]
<benzrf> noob101: @foo always refers to the instance variable 'foo' in whatever 'self' happens to be at the moment
ascarter_ has joined #ruby
<benzrf> *the moment /when the code is run/
<noob101> ,hi benzrf, I don't know what self is either. Is it hard?
<shevy> noob101 yeah, it is different
<jhass> noob101: kind of, Ruby tricks here and evaluates all your code outside a class in an implicit object (called main)
<Freddan962> noob101: You might want to look into some Ruby documentation or tutorials.
<Hanmac> noob101: just think it so ... nearly each object (except from very base objects like Fixnum or Symbols) can have instance variables ... but classes itself are instances of the class Class too)
cina has quit [Quit: leaving]
Rainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
<jhass> noob101: I get the feeling that you try to know everything there is to know upfront actually attempting anything. If I'm right: don't. Start coding, pick projects. Only learn what you need for the projects. Share them here and ask for review
ascarter_ has quit [Read error: Connection reset by peer]
<Freddan962> I must ask you guys, do you know any good compilation of useful Ruby tricks and tips?
DaniG2k has quit [Ping timeout: 276 seconds]
<jhass> the #ruby IRC channels is pretty good for that
<jhass> :P
<noob101> jhass I am working on a project but I do want to learn everything :(
bmurt has joined #ruby
doodlehaus has joined #ruby
<Freddan962> noob101: Trust me, you would make yourself a favor.
<jhass> you won't succeed, give it time
<noob101> Freddan962: What favor?
<Freddan962> Noob101: You will save yourself time as well as headache.
<jhass> and that last of my points is actually the most important. Seeing what others think about things you already thought through helps a lot in understanding things, in my experience
<Freddan962> jhass: Do you want to review the worst Ruby code of all time? I can give you a link haha
einarj has joined #ruby
Hanmac1 has joined #ruby
<Freddan962> jhass: Attempted this with zero Ruby experience - just jumping straight in. So many failures in so many ways. https://github.com/Freddan962/ChinguRoids/blob/master/rb/levels.rb
<jhass> I've seen stuff, that would want a #!/bin/bash instead of a #!/usr/bin/env ruby, but give it a try :P
KanKava has joined #ruby
LadyRainicorn has quit [Read error: Connection reset by peer]
LadyRainicorn has joined #ruby
lw has joined #ruby
Hanmac has quit [Ping timeout: 252 seconds]
<Freddan962> jhass: I think this will take the price haha
<jhass> $music = Song["media/audio/music/stageoids.ogg"] is sad, but I've seen much worse
noob101 has quit [Ping timeout: 240 seconds]
User458764 has joined #ruby
<jhass> one could extract some repetition here and there but for first time ruby it's really not too bad
<Freddan962> jhass: Well, I can tell you the game itself turned out wonderfull. There 'MIGHT' have been some repitition, and low performance iteration, but overall I was quite happy with it as the first project.
diegoviola has quit [Quit: WeeChat 0.4.3]
<Freddan962> jhass: Currently working on this: http://puu.sh/8Z7UE.png => https://github.com/Freddan962/Spaceshooter
joast has quit [Quit: Leaving.]
<apeiros> require_relative-- :(
<Freddan962> apeiros: ? :(
banister has joined #ruby
<apeiros> set up the load path ($LOAD_PATH) properly. call the place where your ruby files are 'lib' instead of 'src', and use require instead of require_relative
omosoj has joined #ruby
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Freddan962> apeiros: What do you mean by load path ($LOAD_PATH)? :)
relix has joined #ruby
<apeiros> do you know $PATH in the shell?
<Freddan962> apeiros: No
<apeiros> bah :)
<Freddan962> apeiros: Am I missing something important? ^^
<apeiros> $LOAD_PATH contains all directories where ruby looks for files you try to require
<apeiros> and learn about $PATH in the shell :-p
akonny has joined #ruby
MrSamuel has quit [Ping timeout: 240 seconds]
<Freddan962> apeiros: Roger that :D
joast has joined #ruby
jokke has quit [Quit: WeeChat 0.4.3]
banister has quit [Client Quit]
foooobear_ has joined #ruby
Rainicorn has joined #ruby
<apeiros> jhass: btw., what do you do professionally?
skinkitten has joined #ruby
<Freddan962> Need a third monitor.. irc, sublime & rdoc :P
<skinkitten> hello I want to take out snum from this, https://gist.github.com/jsoto008/0f7cae780e2c683015e7 is this possible?
jokke has joined #ruby
alem0lars has joined #ruby
LadyRainicorn has quit [Ping timeout: 240 seconds]
<apeiros> skinkitten: snum?
<skinkitten> apeiros, sorry going to update it
motto has joined #ruby
timonv has joined #ruby
tjsousa______ has joined #ruby
m8 has quit [Ping timeout: 252 seconds]
<jhass> apeiros: still a student, writing bachelor thesis currently
dagon666 has quit [Quit: Lost terminal]
<apeiros> soooo, lots of time or almost no time at all? :)
anaeem1_ has quit [Remote host closed the connection]
<jhass> hm, procrastinating too much I guess, so not enough time :P
<apeiros> heh
centrx has joined #ruby
<Morrolan> Procrastinating? Sounds more like too much time. :P
GeorgesLeYeti has quit [Quit: Quitte]
motto has quit [Max SendQ exceeded]
Takle_ has quit [Ping timeout: 240 seconds]
LadyRainicorn has joined #ruby
einarj has quit [Ping timeout: 252 seconds]
LadyR has joined #ruby
Takle has joined #ruby
trades has quit [Ping timeout: 252 seconds]
Rainicorn has quit [Read error: Connection reset by peer]
<Freddan962> jhass: That is what I sadly did this term. Ended up having 300 pages math test, 300 pages chemistry test, speech, physics and chemistry thesis, p.e lesson and math oral presentation of math thesis... ‎I can tell you.. I barely got out alive :-P
<Freddan962> That was what I had for last week* :(
motto has joined #ruby
Neomex has joined #ruby
MrSamuel has joined #ruby
toastynerd has joined #ruby
LadyRainicorn has quit [Ping timeout: 258 seconds]
<centrx> 300-page tests?
oetjenj has left #ruby ["Textual IRC Client: www.textualapp.com"]
<Morrolan> 300 pages of reading material for the test, probably. ;)
chipotle has quit [Quit: cya]
mjs2600 has joined #ruby
DaniG2k has joined #ruby
<Morrolan> 'course it'd be amusing to see a prof attempt to grade 50 300-page tests. ;)
sheperson has joined #ruby
<Freddan962> Haha reading material of course :P
<centrx> Truly insane
skinkitten has quit [Quit: Leaving]
mohring has quit [Remote host closed the connection]
b1205 has joined #ruby
TRexJesus has joined #ruby
<Morrolan> Really depends on the subject. I wouldn't mind 300 pages of reading material for a history test. For a Math test it'd be rather annoying, though.
trades has joined #ruby
toastynerd has quit [Ping timeout: 264 seconds]
Vivekananda has joined #ruby
Takle has quit [Ping timeout: 240 seconds]
DaniG2k has quit [Ping timeout: 252 seconds]
akonny has quit [Quit: akonny]
Takle has joined #ruby
Fire-Dragon-DoL has joined #ruby
<sheperson> Hi
<Freddan962> Hello
phinfonet has joined #ruby
<sheperson> To improve my Ruby skills, many suggest reading a gem code.
<sheperson> Can you suggest a simple enough gem for this?
enebo has joined #ruby
jokke has quit [Remote host closed the connection]
<shevy> sheperson no but build your own gem
Neomex has quit [Quit: Neomex]
<shevy> first, write some code
<shevy> then you must write one file called .gemspec
<shevy> afterwards you can do: gem build *gemspec
jokke has joined #ruby
<Burgestrand> sheperson: I would suggest you don't treat it as reading a book necessarily. Make a habit of reading the source for things you use, especially for debugging.
<jhass> #ruby presents: "shevys masterplan to world domination". Step 1: write a gem. Step 2: ???. Step 3: Profit!
s00pcan has joined #ruby
<centrx> I think sheperson wants to read some existing high-quality idiomatic code, which is a good idea.
<sheperson> centrx: yes
<Burgestrand> sheperson: sinatra is small enough to start digesting, but it tends to be easier to read code if you know what you're looking for.
<centrx> Sinatra that's a good idea
<sheperson> Burgestrand: excellent
jokke has quit [Client Quit]
<centrx> sheperson, Also take a look at ActiveSupport. It mostly consists of utility methods, so there are small independent chunks making it easier to understand what is going on
trades has quit [Ping timeout: 245 seconds]
jokke has joined #ruby
<centrx> sheperson, (ActiveSupport is part of Rails, but reading the rest of the Rails code would be...complicated and unhelpful)
<sheperson> Thanks centrx
<shevy> hmm he asked for simple gems
Karpuragauram has joined #ruby
<shevy> and you guys burden him with activesupport and sinatra :(
<sheperson> Infact I got the the Rails source, and it confused me
<shevy> precisely sheperson!
<centrx> ActiveSupport is simple. You can read one method from it, say Hash#slice, and get value out of that
<centrx> not saying read the whole thing cover to cover
<Freddan962> Is this a idiotic way of updating locations of objects in a grid system? https://github.com/Freddan962/Spaceshooter/blob/master/src/ContentManager.rb
<shevy> {c: 3, b: 2, a: 1}.to_query # => "a=1&b=2&c=3"
pskosinski has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
<jhass> Freddan962: you don't use the index each_with_index yields you, so just use each instead
<Freddan962> jhass: Yes, but if you look over it - is there a more effective way to do this?
<Freddan962> over that*
doodlehaus has quit [Remote host closed the connection]
MrSamuel has joined #ruby
<jhass> not sure, actually it's essentially a no-op currently
Beoran_ has quit [Ping timeout: 240 seconds]
<Freddan962> no-op? :P
<jhass> you never assign anything other than nil
Takle has quit [Remote host closed the connection]
<Freddan962> Yeah did not get that far before asking :P
<Freddan962> Jhass: Refresh now :)
<jhass> hm, why do you /32?
<Freddan962> Jhass: Grid system consists of grids being 32x32 pixels
<Hanmac1> shevy & centrx:
<Hanmac1> >>{c: 3, b: 2, a: 1}.map(&"%s=%d".method(:%)).join(?&)
<eval-in__> Hanmac1 => "c=3&b=2&a=1" (https://eval.in/156419)
enebo has quit [Quit: enebo]
danman has quit [Quit: danman]
Hanmac1 is now known as Hanmac
<centrx> >> &"%s=%d".method(:%)
<eval-in__> centrx => /tmp/execpad-de8fdf3e74a3/source-de8fdf3e74a3:2: syntax error, unexpected & ... (https://eval.in/156420)
dingus_khan has joined #ruby
<jhass> Freddan962: so you want to assign one of the objects to each tile?
<jhass> (tile = 32x32 pixel sub-grid thingy)
<Freddan962> jhass: Ok, so I have some objects each having x and y getters. I want to, with my content system, divide them into the right grid. So I can do more effective collision detection.
<Morrolan> Hanmac: Oh god, what are you doing....
* Morrolan gets a torch
glenfe has joined #ruby
* jhass gets a fork
omosoj has quit [Ping timeout: 252 seconds]
<Hanmac> Morrolan: say, whats the prob with my code?
<Morrolan> I would, but I don't know where to start. You insane bugger. :P
magri has joined #ruby
<centrx> >> "%s=%d".method(:%)
<eval-in__> centrx => #<Method: String#%> (https://eval.in/156421)
<centrx> Hanmac, Very funky
<Hanmac> centrx: .map(&"%s=%s".method(:%)) is nearly similar to .map{|a| "%s=%s" % a }
<Morrolan> Hanmac: Not sure whether your use of the char literal, or the implicit parameters to the block, are worse!
<Morrolan> Of course, method(:%) might win an award, too. :P
<jhass> Freddan962: Ah, so that thing should be a subview of the whole thing? I'd probably just keep offsets for that and filter the objects with that
lethjakman has joined #ruby
dingus_khan has quit [Ping timeout: 252 seconds]
dawkirst has joined #ruby
<Hanmac> hey, method might be better than creating so much the same string object
<Freddan962> Jhass: Let me see if I can draw it and explain it :D
User458764 is now known as User458764_NotHe
<LadyR> I would definitely go with the char literal.
<LadyR> That shit is evil.
coderhs has joined #ruby
LadyR is now known as LadyRainicoen
LadyRainicoen is now known as LadyRainicorn
User458764_NotHe is now known as User458764
alexju has joined #ruby
omosoj has joined #ruby
s00pcan has quit [Ping timeout: 245 seconds]
<Freddan962> Jhass: http://puu.sh/8ZcMl.png - So the rectangular area is the game on my computer. It h as a width of 640px, 480px height. I want to divide the game 'screen' into cells which are 32x32 so the ContentManager can keep track of what is where and increase the effeciency of my collision detection calculations.
<Freddan962> Jhass: DO you understand what I am going for?
Takle has joined #ruby
lambo has quit [Quit: leaving]
Beoran_ has joined #ruby
danman has joined #ruby
<jhass> Hm, so you can have at most 32x32 objects on the screen?
yfeldblum has joined #ruby
<jhass> Hm, no I think those still are subviews onto the whole grid
<Freddan962> Jhass: No, unlimited objects. But, content manager keeps track of in what cell of the screen these objects are in.
<Freddan962> Jhass: So instead of checking if player collides with all the objects, we can just check if he collides with an object in the cells next to him.
sheperson has quit [Ping timeout: 265 seconds]
sheperson_ has joined #ruby
<jhass> so each pixel is a cell?
<Freddan962> Jhass: But to do that, I need to effectively store each objects location with ContentManager.
bodie_ has joined #ruby
<Freddan962> Jhass: 32 pixels high, 32 pixels low
<Freddan962> 32 pixels wide*
<centrx> "I've been using Vim for about 2 years now, mostly because I can't figure out how to exit it."
<jhass> sorry, I fear it just doesn't click for me
<bodie_> how can I make a script that runs AND opens pry? i.e. I want to run a little bit of stuff and then drop into repl
<bodie_> for example, auth with fog
<Freddan962> Jhass: No problem Jass ^^
<jhass> bodie_: require 'pry' and call binding.pry where you want to drop into the repl
benzrf is now known as benzrf|offline
<bodie_> cool, thanks
yfeldblum has quit [Ping timeout: 240 seconds]
tjsousa______ has quit [Quit: Computer has gone to sleep.]
<Freddan962> Is there a way to in a pretty way return the contents in an array? (stuff.to_nonarray) xD
postmodern has joined #ruby
franka has joined #ruby
danman has quit [Quit: danman]
zz_jrhorn424 has quit [Ping timeout: 240 seconds]
icedp has quit [Ping timeout: 240 seconds]
hellome has quit [Ping timeout: 240 seconds]
jrhe has quit [Quit: Connection closed for inactivity]
bodie_ has left #ruby ["Leaving"]
sfr^ has quit [Ping timeout: 240 seconds]
qqw_ has quit [Ping timeout: 240 seconds]
Lulzon has quit [Ping timeout: 240 seconds]
<centrx> Freddan962, What do you mean?
<centrx> Freddan962, To print out an array in a pretty way?
mr_rich101 has quit [Ping timeout: 276 seconds]
danman has joined #ruby
<Freddan962> centrx: Lets say I have arr = ["hi", "hello", "morning"] and I want to do for instance do this: "Foo" + Arr.foo => "Foohihellomorning"
danman has quit [Client Quit]
<centrx> you mean "Foo" + arr ?
dmitrykorotkov has quit [Ping timeout: 252 seconds]
<jhass> "Foo#{array.join}"
<centrx> ^^
<Freddan962> Ok, now lets do it this way:
jokke has quit [Ping timeout: 252 seconds]
s00pcan has joined #ruby
<Freddan962> arr = [Objectinstance, AnotherObjectInstance, ThirdObjectInstance]; objects = [], objects << arr.foo. Objects should contain the contents of arr, but not the arr array.
<Freddan962> Sorry if I am confusing you :P
<jhass> objects.concat arr
cherry_lin has joined #ruby
<jhass> or objects + arr if you want a new (resulting) array
bdnelson has joined #ruby
<Freddan962> jhass: Going to try that, thanks!
lethjakman has quit [Ping timeout: 252 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
<Freddan962> jhass: Thank you - exactly what I was looking for! :D
chipotle has joined #ruby
codeurge has joined #ruby
Karpuragauram has quit [Quit: Ex-Chat]
MrSamuel has joined #ruby
benzrf|offline is now known as benzrf
simono has joined #ruby
diegoviola has joined #ruby
havenwood has joined #ruby
endash has joined #ruby
lukec has joined #ruby
bmurt has quit []
icedp has joined #ruby
icedp has quit [Changing host]
icedp has joined #ruby
Lulzon has joined #ruby
mr_rich101 has joined #ruby
SCommette has joined #ruby
b1205 has quit [Ping timeout: 265 seconds]
Trudko has quit [Ping timeout: 252 seconds]
EatMulti has joined #ruby
dawkirst has quit [Remote host closed the connection]
toastynerd has joined #ruby
chipotle has quit [Quit: cya]
mjs2600 has quit [Remote host closed the connection]
qqw has joined #ruby
DaniG2k has joined #ruby
doodlehaus has joined #ruby
jokke has joined #ruby
sfr^ has joined #ruby
zz_jrhorn424 has joined #ruby
doodlehaus has quit [Remote host closed the connection]
<Freddan962> Anyone dare to guess why I get a "can't iterate from float" error line #16? (https://github.com/Freddan962/Spaceshooter/blob/master/src/ContentManager.rb)
nevans has quit [Ping timeout: 252 seconds]
Cork has quit [Ping timeout: 240 seconds]
phansch has joined #ruby
Hamled|Erp has quit [Ping timeout: 240 seconds]
toastynerd has quit [Ping timeout: 264 seconds]
saarinen has joined #ruby
<centrx> Freddan962, Use parentheses to make sure it is evaluated in the right order, probably around the begin and end of the range (xxx)..(yyy)
timonv has quit [Remote host closed the connection]
<Morrolan> >> (0.5..0.7).to_a
<eval-in__> Morrolan => can't iterate from Float (TypeError) ... (https://eval.in/156424)
<Morrolan> Freddan962: Because of this. ^
phansch has quit [Client Quit]
<benzrf> Freddan962: why are you using for
<Morrolan> The range has no clue what step you desire, when iterating over it.
DaniG2k has quit [Ping timeout: 276 seconds]
<centrx> Freddan962, Also, some style and code quality issues: Don't use for..in, use #each
Hamled has joined #ruby
keen_____ has joined #ruby
<Freddan962> centrx: How could I write this part with #each? O.o
<centrx> Freddan962, and don't repeat similar code, like @content_grid =
rcs has quit [Ping timeout: 240 seconds]
<centrx> (the part after the = that is)
diegoviola has quit [Ping timeout: 245 seconds]
<Freddan962> Centrx: Its for 'cleaning' the array.
<Freddan962> Morrolan: But I rounded it to one number?
faulkner has quit [Ping timeout: 240 seconds]
<Freddan962> Benzrf: Checking for objects which are maximum one grid away from the main player. (max 32 pixels away both x and y)
keen____ has quit [Ping timeout: 252 seconds]
<centrx> Freddan962, Create a method called clean_array, so the logic is in one place, modular, this avoids bugs and simplifies the code
Cork has joined #ruby
Cork has quit [Changing host]
Cork has joined #ruby
_justin has joined #ruby
<Freddan962> centrx: Thanks, sounds like a good idea!
<Morrolan> Freddan962: .round gets called on the divisor, *not* on the result.
<benzrf> Freddan962: nobody should ever use for..in
rcs has joined #ruby
<benzrf> unless youre code golfing
<benzrf> x.x
_justin has quit [Client Quit]
EatMulti has quit [Remote host closed the connection]
<centrx> Freddan962, E.g. "array.each do |element|" is equivalent to "for element in array"
<benzrf> not 100%
lkba has quit [Ping timeout: 252 seconds]
<benzrf> there are some minor scoping diffrences :u
MrSamuel has quit [Ping timeout: 252 seconds]
<benzrf> but they should not trouble you
<Freddan962> centrx: But I am not looping over elements in an array. I am looping over space in my array, which does not have to contain objects.
<centrx> Freddan962, Ruby converts for..in to #each internally, and #each is idiomatic
jokke has quit [Quit: WeeChat 0.4.3]
<benzrf> idiotmatic :^)
<Morrolan> Freddan962: I assume object.x is a float. And a float, divided by an integer, yields you a float. Hard to tell the definite cause, without knowing what kind of objects we're dealing with, though. :)
<benzrf> Freddan962: are you a python guy, or a java guy?
<centrx> Freddan962, It was just an example. Whatever for..in is used for, #each can and should be used instead
<Freddan962> Benzrf: C++
<benzrf> tsk
<Freddan962> Morrolan: Your assumption is correct :D
coderhs has quit [Ping timeout: 252 seconds]
<Morrolan> Freddan962: Actually... #round gets called on the '1' which you subtract from the result of object.x / @grid_with, I suspect. :P
<Freddan962> centrx: Can I do each over a range? I assume so? (1..2).each ..?
<centrx> yes
<centrx> exactly
<Freddan962> centrx: Ah, that simplifies things. Will use that instead! :D
MrSamuel has joined #ruby
<Freddan962> Morrolan: Ok, let me try to change this! Thanks for helping me everyone! :D
<Morrolan> Are you certain that the order, in which things get executed here, is the one you want? *blinks*
<benzrf> Freddan962: remember that each is a perfectly normal method
TRexJesus has quit [Ping timeout: 252 seconds]
<Freddan962> Morrolan: Most likely not ;)
Cork has quit [Excess Flood]
<Morrolan> First you round '1', then divide object.y by @grid.height, then subtract the rounded '1' from the result. :P
faulkner has joined #ruby
miah has quit [Ping timeout: 245 seconds]
miah has joined #ruby
<omosoj> I have a question about google trends; is there a place on Freenode to ask about it?
Cork has joined #ruby
<omosoj> The question is what the numbers refer to in this JSON http://hawttrends.appspot.com/api/terms/
<centrx> I think there is a #google channel actually
banister has joined #ruby
<omosoj> cool, thanks.
chipotle has joined #ruby
Prawnzy has joined #ruby
<Freddan962> Morrolan, centrx, benzrf: Thanks guys - it was the order of which I did my calculations :)
AlexRussia has quit [Remote host closed the connection]
<centrx> *~!*~!*~! You said the word of the day *~!*~!*~!*
<centrx> Order of Operations
<Freddan962> :D
jamto11 has joined #ruby
AlexRussia has joined #ruby
try has joined #ruby
User458764 is now known as User458764_NotHe
dingus_khan has joined #ruby
marcdel has joined #ruby
alex88 has joined #ruby
jamto11 has quit [Ping timeout: 265 seconds]
marcdel_ has joined #ruby
User458764_NotHe has quit [Ping timeout: 252 seconds]
doodlehaus has joined #ruby
marcdel has quit [Ping timeout: 265 seconds]
dingus_khan has quit [Ping timeout: 265 seconds]
alex88 has quit [Ping timeout: 252 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yfeldblum has joined #ruby
MrSamuel has quit [Ping timeout: 252 seconds]
arrubin has joined #ruby
maximski has joined #ruby
yfeldblum has quit [Ping timeout: 276 seconds]
lw has quit [Quit: s]
coderhs has joined #ruby
ringaring has joined #ruby
lolmaus has quit [Ping timeout: 240 seconds]
alem0lars has quit [Quit: Going AFK...]
sheperson_ has quit [Ping timeout: 276 seconds]
MrSamuel has joined #ruby
lolmaus has joined #ruby
Martxel has joined #ruby
Takle has quit [Remote host closed the connection]
Shell has joined #ruby
sheperson has joined #ruby
endash has quit [Quit: endash]
doodlehaus has quit [Remote host closed the connection]
supermarin has joined #ruby
saarinen has quit [Quit: saarinen]
kenneth has joined #ruby
freezey has joined #ruby
jokke has joined #ruby
<Shell> hey, I'm new to Ruby and having a problem. I'm trying to install SproutCore under JRuby. to do so, I'm doing "gem install sproutcore", pulling it from rubygems. however, this is trying to install thin, which doesn't work under JRuby. I've looked at the gemspec, and it has a section where it conditionally picks whether to use Thin or Mongrel. how do I tell gem to read the gemspec properly?
ferr has joined #ruby
bodie_ has joined #ruby
chabill has joined #ruby
Toger has joined #ruby
meatherly has quit [Remote host closed the connection]
lkba has joined #ruby
<jhass> try jruby -S gem install sproutcore
sharpmachine has joined #ruby
sheperson has quit [Ping timeout: 265 seconds]
Takle has joined #ruby
Photism has joined #ruby
Fezzler has joined #ruby
freezey has quit [Remote host closed the connection]
<Shell> jhass: still tries to install Thin. I think the problem is that it's not actually reading the gemspec as it exists in the source repo... it's reading something generated from the gemspec on the packager's computer? I suspect that I'm going to have to download it and install it manually.
<jhass> that command worked for me
<jhass> jruby 1.7.12
<Shell> really?
<Shell> I'm using jruby 1.7.12 as well.
<jhass> er
User458764 has joined #ruby
DanishMan has joined #ruby
toastynerd has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
franka has left #ruby [#ruby]
enebo has joined #ruby
Fezzler has quit [Quit: Leaving]
ringaring is now known as ringarin
DaniG2k has joined #ruby
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
ringarin is now known as ringaring
cashnguns has quit [Ping timeout: 245 seconds]
Avahey_ has joined #ruby
ringaring is now known as ringarin
<Shell> jhass: any ideas? maybe a configuration issue of some sort?
ringaring has joined #ruby
ringaring has quit [Client Quit]
ringarin has quit [Quit: Leaving]
ringarin has joined #ruby
toastynerd has quit [Ping timeout: 252 seconds]
sandbags has joined #ruby
DaniG2k has quit [Ping timeout: 252 seconds]
timonv has joined #ruby
<bodie_> is there a way to silently drop into pry? i.e. without "From line blah blah: blah blah blah"
<shevy> jhass why do you use jruby?
mityaz has joined #ruby
<jhass> shevy: I don't
<shevy> hmm
s00pcan has quit [Ping timeout: 252 seconds]
MrSamuel has quit [Ping timeout: 252 seconds]
<jhass> Shell: not there's #jruby
<jhass> *note
<Shell> jhass: oh, cool, I'll go ask there.
<Freddan962> If a class variable contains a value, and we set the class variable to another value in the class constructor, will the first value be 'removed'?
bodie_ has left #ruby ["Leaving"]
<centrx> Freddan962, Yes, that is a fair statement
Hobogrammer has joined #ruby
<Freddan962> centrx: Ok thanks :)
<Shell> jhass: thanks very much.
supermarin has quit [Quit: Computer has gone to sleep.]
naw has quit []
supermarin has joined #ruby
kenneth has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ringaring has joined #ruby
MrSamuel has joined #ruby
<centrx> Freddan962, The value will no longer be attached to the variable, and the garbage collector will clean up the memory on its own time, if it is no longer referenced by anything else
<Freddan962> centrx: Would this way work to not point the variable to a new location in memory with the same data? (@@images = images if @@images.nil?)
<centrx> I'm not sure what you mean
<Freddan962> centrx: Would this piece of code make so the class variable never gets set to another value, other than what it first was assigned?
<centrx> what is "images"? it's not @@images
<centrx> is that variable defined earlier somewhere?
<centrx> oh I think I know what you mean
<sandbags> Freddan962: the answer is yes, you could also write it as @@images ||= images
supermarin has quit [Ping timeout: 240 seconds]
<Freddan962> sandbags: Always wanted to ask - what does ||= 'mean'?
<Burgestrand> Freddan962: avoid @@-variables if possible, and use @-variables instead. @@ is, in the majority of cases, not what you want.
ringarin has quit [Ping timeout: 265 seconds]
<sandbags> Freddan962: it's a short hand for @@images = @@images || images
<Freddan962> Burgestrand: I only want my loot class to get the images once from the resourcemanager. Thats why I thought it was a good idea to use a class variable :P
<Burgestrand> Freddan962: do you have experience in any other programming language?
<Freddan962> Burgestrand: C++
toastynerd has joined #ruby
<Burgestrand> Freddan962: hehe, unfortunately I don't have experience with C++. Either way, I believe you have misinterpreted the difference between @-variables and @@-variables. @-variables can also be used on the class level.
Takle has quit [Ping timeout: 240 seconds]
omosoj has quit [Ping timeout: 258 seconds]
<sandbags> Burgestrand: but he presumably wants the images shared across his class instances
<Freddan962> Burgestrand: But instance variables do not hold the same values across different class instances?
<sandbags> i'm not recommending the use of a class variable per se
Takle has joined #ruby
<jhass> sandbags: Freddan962 to be precise it's @@images || @@images = images
benzrf is now known as benzrf|offline
kaspergrubbe has joined #ruby
<Burgestrand> Freddan962: could you link to where you're using the @@-variables? Perhaps my caution is misguided.
<Freddan962> Sure, let me push my changes
<sandbags> jhass: ah, i had a dim recollection as i wrote it that there was a subtlety i was forgetting, thank you
<Burgestrand> sandbags, jhass: to split more hairs, that's also not entirely correct :)
freerobby has quit [Quit: Leaving.]
<Freddan962> Jhass, sandbags: So, in words it assigns @@images the value of images if @@images is not nil? :P
<Burgestrand> Freddan962: or false!
<sandbags> Freddan962: rather than using a class variable in your using class, can you simply refer to your ResourceManager and cache your images there?
freerobby has joined #ruby
<sandbags> Freddan962: if you think of it was "it will only do a non-nil assignment once" you're covered
<Freddan962> sandbags: Of course, why have I not thought of that! Thats what I will do - pass the resourcemanager as a reference into the object. :D
Arkaniad has joined #ruby
Arkaniad|Laptop has joined #ruby
Arkaniad has quit [Read error: Connection reset by peer]
amclain has joined #ruby
<Burgestrand> Freddan962: where's the @@? ^^
<sandbags> as a general rule, any time you are initialising class variables in an instance initializer you probably should be a little suspicious
<sandbags> Freddan962: ^
<Freddan962> Ugh..
naw has joined #ruby
<Freddan962> Wait, I think my Github client did not detect the changes. Hang on.
<Freddan962> There we go - its pushed.
<sandbags> Freddan962: also if you're building a game I highly recommend looking into the Component Entity System pattern over classes & inheritance
dingus_khan has joined #ruby
<Freddan962> Sandbags: Never heard of that
<Burgestrand> Freddan962: I believe my word of caution regarding @@ is still valid here.
<sandbags> Freddan962: GIYF
koderok has joined #ruby
<Freddan962> Sadnbags: GIYF?
<sandbags> Google Is Your Friend
<Freddan962> Oh yeah, I am already looking into it. But I have never heard of that before :P
<shevy> google is my nemesis
supermarin has joined #ruby
<imaleaf> was waiting for that :p
knigitz has quit []
<Freddan962> Removed the class variable - thanks guys! :)
lyanchih has quit [Ping timeout: 245 seconds]
ringaring has quit [Ping timeout: 258 seconds]
<shevy> always good to eliminate class variables
alem0lars has joined #ruby
dingus_khan has quit [Ping timeout: 265 seconds]
kaspergrubbe has quit [Remote host closed the connection]
<Burgestrand> Freddan962: the scary part about class variables is a) people mistakenly use them where *class* instance variables would work just fine (not to be confused with instance variables), b) they're inherited to children, causing lots of headache when subclassing
tkblackbelt has joined #ruby
dRbiG has joined #ruby
tkblackbelt has left #ruby [#ruby]
lyanchih has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
User458764 is now known as User458764_NotHe
JumpMast3r has joined #ruby
endash has joined #ruby
EatMulti has joined #ruby
yfeldblum has joined #ruby
User458764_NotHe has quit [Ping timeout: 240 seconds]
lkba has joined #ruby
mijicd has joined #ruby
Soda has quit [Read error: Connection reset by peer]
marcdel_ has quit []
SCommette has quit [Quit: SCommette]
sandbags has quit []
yfeldblum has quit [Ping timeout: 276 seconds]
MrSamuel has quit [Ping timeout: 264 seconds]
<shevy> :)
* shevy cuddles Burgestrand
<Hanmac> havenwood: HUHU!
ua has joined #ruby
lyanchih has quit [Ping timeout: 240 seconds]
<Freddan962> def get_health;
<Freddan962> return @health
<Freddan962> end; How can I do this? (I assume its breaking from the method by the return statement)
<Freddan962> ; @health = 0;
enebo has quit [Quit: enebo]
supermarin has quit [Quit: Computer has gone to sleep.]
<centrx> def get_health; @health ||= 0; end
supermarin has joined #ruby
<Freddan962> Still can't wrap my head around ||=, time to read up.
<shevy> Freddan962 yes when it sees return like in your example, it will return and not check more
<Hanmac> or just set @health to 0 in the initialize method and use attr_accessor for else
lyanchih has joined #ruby
banister has joined #ruby
MrSamuel has joined #ruby
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
<Freddan962> Centrx: Would you mind explaining, in a newbie friendly way, what ||= exactly does? I can't wrap my head around it.
freezey has joined #ruby
<jhass> Freddan962: do you understand what foo || bar does?
<Freddan962> jhass: No
<Freddan962> Unless you mean in as foo or bar
<jhass> exactly as in that
supermarin has quit [Ping timeout: 240 seconds]
<jhass> || is the same as or (well, it has a different precedence, but that's not relevant here)
<jhass> so you also understand that in true || bar, bar will never be evaluated?
<Freddan962> Yes
<jhass> okay, do you understand that in ruby everything except nil and false is truthy?
<Freddan962> Jhass: Sure
<jhass> now look at what ||= is the shortcut for again: a ||= b is a || a = b
d4nk has joined #ruby
<Freddan962> if @health is not nil or if @health is 0? (@health ||= 0)
<Freddan962> not nil/false*
freezey has quit [Ping timeout: 240 seconds]
<jhass> @health || @health = 0
<jhass> when would the right side get evaluated?
Toger has quit [Read error: Connection reset by peer]
<Freddan962> When @health is nil or false
User458764 has joined #ruby
<jhass> exactly
User458764 is now known as User458764_NotHe
<jhass> and @health ||= is just a shortcut for that construct
<jhass> * @health ||= 0
koderok has quit [Quit: koderok]
<Freddan962> So, the code Shevy linked me returns the value of @health and sets it to zero?
endash has quit [Quit: endash]
<shevy> huh
<shevy> what did I link to
<Freddan962> Sorry, centrx :P
<Freddan962> "def get_health; @health ||= 0; end"
<jhass> no
<certainty> also ||=0 is an imerial fighter that lost its right wing
<certainty> imperial
<shevy> lol
<jhass> I'm not sure how to be more clear
<centrx> >> ||=0=||
<eval-in__> centrx => /tmp/execpad-c16badeef4dc/source-c16badeef4dc:2: syntax error, unexpected tOP_ASGN ... (https://eval.in/156427)
linuxnewb2 has joined #ruby
linuxnewb2 has joined #ruby
<jhass> you said you understand what @health || @health = 0 does
<Freddan962> jhass: I understand what you have been saying - but then Centrx's piece of code is not what my function does?
<jhass> no
<jhass> well, I'm not sure what your method (no functions in ruby) does
<jhass> or should do
<jhass> I was just explaining ||=
<centrx> Freddan962, If you just do "def get_health; @health = 0; end" it will return 0
<Freddan962> It should return the value of @health, then set it to 0.
<jhass> okay, that's not what ||= does
<Freddan962> Yeah thats why I was confused :P
<certainty> it can not do anything after it returned to the caller
<centrx> Freddan962, Use a temp variable or something
<Freddan962> Roger that!
<jhass> health, @health = @health, 0; health, no shorter way I'm aware of
<Freddan962> Thanks once again for helping me guys!
freezey has joined #ruby
mr_blue has joined #ruby
freezey has quit [Remote host closed the connection]
andrewlio has quit [Ping timeout: 264 seconds]
chipotle has quit [Read error: Connection reset by peer]
DaniG2k has joined #ruby
<shevy> Freddan962 or you could use a new method that does that; return_health_then_reset_it() hahahaha :D
<Hanmac> jhass: (*, @health = @health, 0).first
<shevy> omg
nevans has joined #ruby
<jhass> well, I excluded the code golfing ones of course
User458764_NotHe has quit [Ping timeout: 264 seconds]
teddyp1cker has joined #ruby
* certainty imagines a bunch of ones standing on the golf court and putting identifiers and operators and stuff
endash has joined #ruby
prathamesh has joined #ruby
RaptorJesus_ has joined #ruby
DaniG2k has quit [Ping timeout: 252 seconds]
RaptorJesus_ is now known as RaptorJesus
bdnelson has quit [Quit: Textual IRC Client: www.textualapp.com]
timonv has quit [Remote host closed the connection]
klaut has quit [Remote host closed the connection]
coderhs has quit [Ping timeout: 258 seconds]
timonv has joined #ruby
mijicd has quit [Remote host closed the connection]
andrewjanssen has joined #ruby
mijicd has joined #ruby
andrewlio has joined #ruby
MatthewsFace has joined #ruby
speakingcode has joined #ruby
magri has quit [Read error: Connection reset by peer]
phansch has joined #ruby
phansch has quit [Client Quit]
ferr has quit [Ping timeout: 264 seconds]
phansch has joined #ruby
b1205 has joined #ruby
sambao21 has joined #ruby
ferr has joined #ruby
lyanchih has quit [Quit: lyanchih]
jamto11 has joined #ruby
travis__ has joined #ruby
travis__ is now known as axilla
cashnguns has joined #ruby
mijicd has quit [Remote host closed the connection]
<Freddan962> https://github.com/Freddan962/Spaceshooter/tree/master/src - In Play.rb I create a instance of Loot.rb (every 5:th second) and one time Background.rb - The loot class prints out its @y value ONCE from the update method while Background constantly does it. Even though the code is similar, what could be the problem?
timonv has quit [Remote host closed the connection]
jamto11 has quit [Ping timeout: 240 seconds]
dingus_khan has joined #ruby
alex88 has joined #ruby
mijicd has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
EatMulti has quit [Quit: leaving]
dmitrykorotkov has joined #ruby
dmitrykorotkov has quit [Max SendQ exceeded]
dmitrykorotkov has joined #ruby
dmitrykorotkov has quit [Max SendQ exceeded]
dingus_khan has quit [Ping timeout: 240 seconds]
DaniG2k has joined #ruby
alex88 has quit [Ping timeout: 245 seconds]
jgx has joined #ruby
DaniG2k has quit [Client Quit]
<Freddan962> Ok, so its because the reference to the loot class only exists in the array which contentmanage cleans.
donnoc_ has joined #ruby
EatMulti has joined #ruby
tkuchiki has quit [Remote host closed the connection]
anaeem1 has joined #ruby
benzrf|offline is now known as benzrf
tkuchiki has joined #ruby
alexju has quit [Remote host closed the connection]
omosoj has joined #ruby
b1205 has quit [Ping timeout: 245 seconds]
DaniG2k has joined #ruby
Deele has quit [Ping timeout: 255 seconds]
Prawnzy has quit [Ping timeout: 240 seconds]
nnu has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
TRexJesus has joined #ruby
babykosh has joined #ruby
babykosh has quit [Client Quit]
ari-_-e has quit [Ping timeout: 265 seconds]
anaeem1 has quit [Ping timeout: 245 seconds]
wallerdev has joined #ruby
tkuchiki has quit [Ping timeout: 258 seconds]
soulcake has quit [Remote host closed the connection]
anaeem1 has joined #ruby
akonny has joined #ruby
doodlehaus has joined #ruby
soulcake has joined #ruby
ringarin has joined #ruby
speakingcode has quit [Ping timeout: 245 seconds]
yfeldblum has joined #ruby
doodlehaus has quit [Ping timeout: 240 seconds]
b1205 has joined #ruby
akonny has quit [Quit: akonny]
ari-_-e has joined #ruby
akonny has joined #ruby
maximski has quit []
ferr has quit [Ping timeout: 252 seconds]
Hanmac has quit [Quit: Leaving.]
b1205 has quit [Ping timeout: 258 seconds]
Devanon has quit [Ping timeout: 258 seconds]
freezey has joined #ruby
willgorman_ has quit [Ping timeout: 258 seconds]
St_Marx has quit [Ping timeout: 272 seconds]
lolmaus has quit [Read error: Connection reset by peer]
St_Marx has joined #ruby
tiguser has quit [Ping timeout: 240 seconds]
willgorman has joined #ruby
tiguser has joined #ruby
lolmaus has joined #ruby
aboutGod has joined #ruby
takemikazuchi545 has joined #ruby
sputnik13 has joined #ruby
freezey has quit [Remote host closed the connection]
TRexJesus has quit [Ping timeout: 265 seconds]
Hanmac has joined #ruby
donnoc_ has quit [Ping timeout: 245 seconds]
blackmesa has joined #ruby
aboutGod has left #ruby [#ruby]
JoeGaudet has joined #ruby
moneydouble has joined #ruby
Bira_ has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
agjacome has quit [Quit: leaving]
<shevy> hmm
<shevy> how difficult is it to learn + use puppet
Megtastique has quit []
<EatMulti> it depends what you need out of it
<EatMulti> I've used it for VM set up stuff with vagrant
<EatMulti> postgresql, apache, users and permissions and basic stuff
<EatMulti> and got going pretty quick
<shevy> hehe good answer... I don't know myself yet but the company I will work at in ~3 months seems to make high use of it in its cluster/IT department... now I am wondering whether I should spend time into learning puppet... or learning R instead...
<shevy> hmm
<shevy> you ... set up apache with it?
axilla has quit [Ping timeout: 252 seconds]
<shevy> isn't apache usually just a httpd.conf file?
<EatMulti> pretty much
<EatMulti> :p
phansch has joined #ruby
<EatMulti> I'm trying to remember the advantage of it over copying a file over
<shevy> hehehehehe
<shevy> well perhaps apache isn't the best example
<EatMulti> other than the fact that every time you run it it ensures the setup you specified
<shevy> hmm
doodlehaus has joined #ruby
NukePuppy has quit [Ping timeout: 252 seconds]
yacks has quit [Ping timeout: 252 seconds]
<EatMulti> not the best example, no, but if you do it all through puppet then you know all your setup info is delivered through the same system
MrSamuel has quit [Ping timeout: 240 seconds]
ari-_-e has quit [Read error: Connection reset by peer]
<EatMulti> I've never used it beyond setting up a single machine
<Shell> EatMulti: basically, you can version control exactly what your servers look like at any given point in time, it's declarative so you don't need to define "to get from this state to this state, run these commands", and it's automated.
<EatMulti> so I'm probably the least qualified person to answer your question :p
<EatMulti> haha there we go
Puria has joined #ruby
<shevy> you are definitely more qualified than I am
<shevy> for I haven't yet used it at all
wallerdev has quit [Quit: wallerdev]
Bira_ has quit []
yfeldblum has quit [Ping timeout: 252 seconds]
MatthewsFace has quit [Quit: This computer has gone to sleep]
Prawnzy has joined #ruby
phansch has quit [Quit: WeeChat 0.4.3]
mijicd has quit [Remote host closed the connection]
<Freddan962> Shevy: https://github.com/Freddan962/Spaceshooter/blob/master/src/gamestates/play.rb - How come I am getting a undefined method 'rectangular_collision' error? (#31)
<Freddan962> Shevy: First time trying to extend a module in a class.
DaniG2k has quit [Ping timeout: 264 seconds]
<shevy> extend is such a strong work
dingus_khan has joined #ruby
<shevy> in ruby you simply overwrite
Deejay_ has joined #ruby
blackmesa has quit [Ping timeout: 245 seconds]
ari-_-e has joined #ruby
<shevy> oohhhh
<shevy> you use extend
<shevy> RectangularCollision is a module?
MrSamuel has joined #ruby
<Freddan962> Shevy: Yep!"
<shevy> why don't you include it?
wallerdev has joined #ruby
<shevy> and why do you capitalize my nick ;)
<shevy> at least it's not upcase
<shevy> >> 'shevy'.upcase
<eval-in__> shevy => "SHEVY" (https://eval.in/156447)
<Freddan962> Shevy: Sorry, I am used to capitalize every letter in every sentence:P
<shevy> btw you write 'rectangular_collision'
Eddr has joined #ruby
<shevy> but I dont see that in your code?
<shevy> I see only 'rectangular_collision?'
<Freddan962> Shevy: What? :P
<shevy> well you wrote:
<shevy> "How come I am getting a undefined method 'rectangular_collision' error?"
<shevy> within the '
<shevy> so is the method called 'rectangular_collision' or is it called 'rectangular_collision?' ?
<Freddan962> rectangular_collision?
<Freddan962> rectangular_collision? *
<shevy> ok
<shevy> let's have eval-in__ test it
<Freddan962> Include solved it, missunderstood the difference between extend and include.
<shevy> \o/
poguez_ has joined #ruby
<shevy> well
<shevy> you can test on a short module
<shevy> module Foo; def test; puts 'hi from test'; end; end
dingus_khan has quit [Ping timeout: 258 seconds]
<shevy> if you include Foo into a class, that class will have method test() available ok?
<shevy> and now for extend
<shevy> say you want to call test() directly from Foo
fantazo has quit [Quit: Verlassend]
<shevy> you could extend self
<shevy> like this:
<shevy> >> module Foo; def test; puts 'hi from test'; end; extend self; end; Foo.test
<eval-in__> shevy => hi from test ... (https://eval.in/156448)
<shevy> and you can still include it too, of course
Eddr has quit [Remote host closed the connection]
<Freddan962> Oh, alright. So, include "includes" it in the class while extend "extends" it from the class (foo.extended)
<apeiros> ack, git submodules…
<shevy> git!
<shevy> everyone loves git
<apeiros> I do
<apeiros> but submodules seem to still be more pain than necessary
benzrf is now known as benzrf|offline
TRexJesus has joined #ruby
kman has joined #ruby
dangerou_ has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
jheg has joined #ruby
<jheg> o/
<jheg> just learning.. how do I see which versions of ruby I have install? is there a command for this?
<jheg> *have installed
<Freddan962> ruby -v
<jheg> that tells me the current version I'm using doesn't it?
<jheg> I want to know what other instances I have installed
moted has quit [Quit: moted]
<Freddan962> *whistle* Shevy :D
freezey has joined #ruby
Hanmac has left #ruby [#ruby]
mercwithamouth has quit [Ping timeout: 252 seconds]
Hanmac has joined #ruby
pontiki has joined #ruby
<apeiros> jheg: that depends on what you use to manage multiple installations
<jheg> rvm?
<apeiros> is that a question? :)
<apeiros> `rvm list` gives you all rvm installed rubies
<jheg> nah sorry I think thats what I have to manage multiple installations
<jheg> excellent thanks apeiros
<apeiros> understood it that way ;-)
benzrf|offline is now known as benzrf
yfeldblum has joined #ruby
i_s has joined #ruby
i_s has quit [Remote host closed the connection]
<shevy> Freddan962 ewww you capitalize me again!
DaniG2k has joined #ruby
<shevy> Freddan962 can't you capitalize apeiros instead?
<Freddan962> Apeiros: Hello Apeiros :D
<shevy> he usually only had people call him apieros but never Apeiros
<Freddan962> ^ Done
<shevy> yay that is so much better
<Freddan962> Haha
<Freddan962> Ok, I got the weirdest error haha. For whatever reason, my code picks up a fixnum as being an in-game object with coordinates and then tries to access it's width ;o
<shevy> you must have made an assignment to a fixnum
Boohbah has quit [Ping timeout: 272 seconds]
Boohbah has joined #ruby
<Freddan962> RectangularCollisonModule.rb => Rectangularcollision? => #8 => "undefined method 'width' for 8:Fixnum
<pontiki> you just think it's weird
timonv has joined #ruby
<Freddan962> Of course, it is logical. But I think it is weird :P
ringarin has quit [Quit: Leaving]
snath has joined #ruby
<pontiki> there is, in fact, no width method for Fixnum
<Freddan962> I know. But, my game should not pick up Fixnum's as in game objects with coordinates. Nor should it ever check for collision with a fixnum O.o
decoponio has quit [Quit: Leaving...]
<pontiki> which means your game isn't doing what you think it is
MrSamuel has quit [Ping timeout: 264 seconds]
<Freddan962> Of course, that is why I think it is weird :P
dingus_khan has joined #ruby
mattstratton has joined #ruby
mikemac has quit [Ping timeout: 245 seconds]
jimbow has joined #ruby
b1205 has joined #ruby
<pontiki> because you are such an expert coder that you never make mistakes and your code is perfect?
EatMulti has quit [Quit: leaving]
<shevy> yes
<Freddan962> What? I am a bad programmer :P
<pontiki> me, too
<shevy> pontiki just described me
<shevy> thank you pontiki
<jimbow> why is hello world = 10 not 11?
EatMulti has joined #ruby
alem0lars has quit [Quit: alem0lars]
<shevy> jimbow it stops at 10 no?
<RubyPanther> My code is Perfect and Special and I Love it unconditionally just the way it is. Now hold still while I trim your bugs...
<shevy> because of <=
<jimbow> shevy: but so does q
<segfalt> So I find myself implementing this restrictive object array with searching functionality. Does something like this already exist: https://gist.github.com/askreet/2e3624330512ae4aedc8 ?
<shevy> jimbow hmm?
<shevy> jimbow why?
<jimbow> += is the incrementer
<jimbow> does hello world start at 1 or 0?
<shevy> ah
<shevy> jimbow you increment after the puts line
<jimbow> i thought everything starts at 0
pushpak has joined #ruby
<segfalt> jimbow: Because your while loop runs when q=10, incrementing it to 11.
sski has joined #ruby
EatMulti has quit [Client Quit]
blackmesa has joined #ruby
<segfalt> before each iteration, the while conditional is checked, and since 10 <= 10, the loop runs again, increasing q to 11. On the next loop 11 <= 10 is false, and it does not run again.
EatMulti has joined #ruby
<jimbow> but what about hello world segfalt
<Morrolan> You're probably not getting a segfault in Ruby.
EatMulti has quit [Client Quit]
<pontiki> he's talking to segfalt, the user
<Morrolan> Oh. Ahaha.
<Freddan962> Shevy: Want to help an idiot? ^^
<pontiki> :)
b1205 has quit [Ping timeout: 252 seconds]
<shevy> Freddan962 only if you stop capitalizing me
<shevy> capitalize pontiki, she wants to be bigger anyway
EatMulti has joined #ruby
<segfalt> jimbow: Hello world 10 is the value of str at the end. Are you expecting that to be Hello world 11?
MrSamuel has joined #ruby
<jimbow> yes i am expecting it to be the same as q
<shevy> jimbow but you increment it afterwards
<segfalt> You set str to "Hello world #{q}", right?
mattstratton has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<segfalt> THEN you increment q to 11.
<segfalt> And the loop never runs again.
<Freddan962> shevy: Ok haha was it that bad? :P
<segfalt> So, the last time str is set, q is still 10.
<segfalt> Make sense?
<shevy> Freddan962 I dunno, is that your client doing? I never saw anyone capitalize nicks before
EatMulti has quit [Client Quit]
<Freddan962> shevy: No, that is me doing it per default :P
<shevy> I want to tab complet segfalt to segfault
<shevy> *complete
<segfalt> :)
EatMulti has joined #ruby
<shevy> Freddan962 so what is the question
<segfalt> shevy: it's 7 characters because it's my license plate :-P
<shevy> whoa
<Freddan962> Ok let me link you the code here shevy (Did I get your name right? Yes I did :D)
<pontiki> oh, neat vanity plate!
<segfalt> thanks!
<shevy> your license plate has imprinted "segfalt"? aren't people knocking on your car asking you if you misspelled?
EatMulti has quit [Client Quit]
<Freddan962> Already failed, sorry shevy :<
<segfalt> Most people have NFC what it is, and most people who do get that it's a 7 char limit here in NH
TRexJesus has quit [Ping timeout: 245 seconds]
<Freddan962> shevy: http://puu.sh/8ZvCQ.png
<shevy> sorry
<shevy> I cant keep track of different files like that
EatMulti has joined #ruby
<shevy> but I tell you what I find confusing
<shevy> def initialize(images, projectile_image, x, y, hp, speed, speed_damper = 1)
<shevy> and the next line is:
<shevy> super images, projectile_image, x, y, WIDTH, HEIGHT, hp, speed, "Player", speed_damper
<shevy> so my question is
<shevy> why are there two extra arguments
Deejay_ has quit [Quit: Computer has gone to sleep.]
<RubyPanther> 7 characters in Oregon too, vanity plate spelling is ASPCLRT
timonv has quit [Remote host closed the connection]
<RubyPanther> I did see one once that said GOTOTEN thought
St_Marx has quit [Quit: Ex-Chat]
<segfalt> RubyPanther: Hm, I don't get ASPCLRT? :-(
<jimbow> well i don't get it
<Freddan962> shevy: Check play.rb #30, somehow it checks for collision with a fixnum and crashes o.o
<segfalt> jimbow: The Hello World 11 thing?
<shevy> but can you first tell me why you have two more arguments in your subclass Freddan962
<RubyPanther> segfalt: A SPeCiaL aRT
<Freddan962> shevy: Sure, hang on.
<jimbow> i tried changing the code by adding #{q} to the beginning and it's still giving me 10
doodlehaus has quit [Remote host closed the connection]
<segfalt> jimbow: By adding #{q} to the beginning of the string?
<jimbow> yes
<segfalt> I think you're missing what "Hello world #{q}" does, perhaps.
sepp2k1 has joined #ruby
<jimbow> i think you're right segfalt
<shevy> hehehe
<segfalt> When you make a new string with #{}, it determines how to make q into a string and add it to the new string.
toretore has quit [Ping timeout: 240 seconds]
sepp2k has quit [Ping timeout: 265 seconds]
<segfalt> So it's not a *constant* reference to q.
<segfalt> It's q at the time that you *interpolated* it.
<Freddan962> shevy: I was working on something earlier but it seems like those two arguments are no longer needed. Removed them :)
<segfalt> Let me change your code a bit, and maybe it will be more clear.
RandyT has quit [Quit: ZNC - http://znc.in]
<Freddan962> MOrrolan: Indeed, but it somehow sends a fixnum, instead of a entity, into the rectangular collision method.
TRexJesus has joined #ruby
ziyadb__ has joined #ruby
EatMulti has quit [Client Quit]
toretore has joined #ruby
EatMulti has joined #ruby
<pontiki> jimbow: in your program's output, do you see that last time it shows "q is now .." ?
<jimbow> yes
<pontiki> what number does it show?
<jimbow> 11
<segfalt> jimbow: Run this program: https://gist.github.com/askreet/0e023ca7122fb184a9ff It might make more sense then.
<pontiki> that's not what it shows for me
<pontiki> for me it shows 10
<Morrolan> Freddan962: I assume the 'puts object.class' there does show that it's about to process a fixnum, yea?
MrSamuel has quit [Ping timeout: 252 seconds]
<pontiki> not the line that says "The final value of q is .."
<pontiki> "q is now .."
<Freddan962> Morrolan: Yep
<jimbow> oh
<jimbow> yeah it says 11
<Morrolan> Freddan962: Then the next thing to look at would be @cm.get_surrounding_objects(@player) - that method returns not only game objects, but also a fixnum. Some debugging information in there might help.
<jimbow> i mean 10
<Freddan962> Morrolan: I recently tried to output the class of what the method returns - no output.
St_Marx has joined #ruby
<segfalt> jimbow: Did you take a look at the new program I sent? I hope that will clear up what's going on for you.
MrSamuel has joined #ruby
<Morrolan> Freddan962: Err, @cm is probably a ContentManager?
<jimbow> i'm reading it now segfalt
<segfalt> Okay cool.
<Freddan962> Morrolan: Correct!
lunaticedit has quit [Read error: Connection reset by peer]
<Morrolan> https://github.com/Freddan962/Spaceshooter/blob/master/src/ContentManager.rb#L15 - that metho doesn't return anything array-like, nor does it yield any values.
<pontiki> your code is different than what you originally pastied, jimbow ? https://gist.github.com/tamouse/cf09b2fb3ecb5b2dddeb that's what i copied from your pastie and the output i get
<jimbow> when you guys were first starting out, did you too have problems understanding the code?
<Freddan962> Morrolan: Hmm, hang on here..
Megtastique has joined #ruby
<Morrolan> Freddan962: I'm rather confused how you even manage to iterate over whatever this method returns. It might semi-work because of implicit return values.
<segfalt> jimbow: Hell yeah. Programming is hard.
<segfalt> I've been doing it for like 12 years though, you start to grok code and concepts more quickly as you keep learning.
<Freddan962> Morrolan: It did work because of the implicit return values before.
<Freddan962> Morrolan: Let me push a change to the repository - and thank you for helping!
<Morrolan> :)
<shevy> let's push Morrolan into the repository
* Morrolan clings to his chair
<shevy> and blob him up for real
atraylen has joined #ruby
prathamesh has quit [Remote host closed the connection]
prathamesh has joined #ruby
<Freddan962> Morrolan: You were right my friend! :)
<pontiki> jimbow: how are approaching learning programming?
<Freddan962> morrolan: Thanks a bunch!
<Morrolan> :)
<jimbow> pontiki: with an open mind and lots of stress
<pontiki> that isn't what i maen
<jimbow> oh lol
<Morrolan> For clarity's sake I'd suggest to explicityl return 'surrounding_objects' at the end.
<pontiki> are you taking a class?
<pontiki> reading a book?
<jimbow> i'm doing both
axilla has joined #ruby
<segfalt> The class is teaching Ruby? Cool
<jimbow> i've signed up for courses on treehouse and i'm reading a really giant book called "the pragmatic programmer learning ruby 1.9 and 2.0"
<Freddan962> Morrolan: Refresh browser - that should have been added.
<segfalt> ahh treehouse, cool
<Morrolan> Oh, indeed. :D
<segfalt> was going to say most schools teach Java, or maybe Python.
<Freddan962> Morrolan, :D
<jimbow> also i bought an udemy course for $100 D=
SCommette has joined #ruby
<Freddan962> Segfalt: I am currently attending a Ruby class :)
<pontiki> have you completed the courses?
<DaniG2k> guys I'm trying to set up an emailer when a rake task fails
<segfalt> Freddan962: At a college?
gregf has quit [Quit: WeeChat 0.4.3]
<Freddan962> segfelt: Highschool
<segfalt> Awesome.
<DaniG2k> and I think it would work but, Google is stopping me from logging in @_@
<DaniG2k> I got a message saying "Someone recently used your password to try to sign in to your Google Account"
<segfalt> My highschool had Cisco Networking, learned a lot. Glad to hear more highschools are teaching usable skills :)
<DaniG2k> oops wrong channel
<Freddan962> Other than the pace being VERY slow paced I enjoy it a lot. I think we covered methods, return values and control structures. Over a year.
<segfalt> Hah.
<Morrolan> Heh, that's rather slow indeed. How many lessons per week?
<Freddan962> Morrolan: ~6 hours
<Morrolan> Yikes.
<Freddan962> Morrolan: The positive thing is that I can spend the time there to creating games in Ruby while the others are having problems with the basics :P
prathamesh has quit [Ping timeout: 252 seconds]
<segfalt> Are you in the US Freddan962?
<Morrolan> Freddan962: Hehe. :D
<Freddan962> segfalt: Sweden, Stockholm :D
<segfalt> Ah, cool.
<Morrolan> Programming classes in highschool were kind of like that, too.
<segfalt> Our public schools are hit or miss in the US.
moneydouble has quit [Quit: Leaving.]
<Morrolan> Though I spent most the time helping others grasp the basics, rather than creating games.
<segfalt> Teaching people is the best way to solidify your own knowledge, for sure.
<Freddan962> Morrolan: Yeah, well, I am not allowed to do that.
<segfalt> Really?
<Morrolan> Maaybe because I didn't feel like creating games in, uh, Realbasic.
<segfalt> That's lame.
<Freddan962> segfalt: Indeed.
<Morrolan> Freddan962: Bah.
benzrf is now known as benzrf|offline
axilla has quit [Ping timeout: 252 seconds]
<segfalt> Morrolan: In junior high school I taught some friends how to use QBASIC. Convinced the teacher to let us stay inside for recess 3 days a week to go over things.
<segfalt> :)
<Morrolan> :)
<centrx> Freddan962, Find a computer camp you can take classes at or teach at
<Freddan962> centrx: I would really like to understand more principles and guidelines of programming. Also really interested in networking. Seems like a great deal of fun! :)
franzip has quit [Quit: ...]
<jimbow> networkig is fun... i think it gets more fun after you understand the basics
<Freddan962> Next time I am making a game I will try the Entity Component System.
p8952 has quit [Ping timeout: 258 seconds]
jamto11 has joined #ruby
andrewhl has joined #ruby
axilla has joined #ruby
<segfalt> I like networking when you get to the large datacenter level, routing, switching, VLANs.. I don't like networking when my grandmother can't remember her SSID or my uncle gets a new ISP and expects it all to just work after he plugs in the router.
<Freddan962> segfalt: Haha xD
sski has quit [Remote host closed the connection]
sski has joined #ruby
<jheg> if you were going to build a website that needed a database (like a real estate agency site for example) would you use php or ruby?
<jheg> assuming you knew both languages equally
<segfalt> ruby
* segfalt knows both languages equally.
<Freddan962> jheg: You will most likely get a one-sided answer here :P
<segfalt> PHP is a mess, it's inconsistent, has a ton of weird behaviors and forces you into really crappy patterns.
<shevy> jheg ruby
<segfalt> I started doing "real world" programming in PHP $.
<segfalt> PHP 4*
<apeiros> jheg: having used php for >6y before ruby: ruby. clearly.
jamto11 has quit [Ping timeout: 264 seconds]
<apeiros> jheg: segfalt already mentioned the most important reasons.
axilla has quit [Ping timeout: 252 seconds]
<jheg> good to know
<segfalt> There's a really great article I read recently on why PHP is bad. One sec.
<jheg> I'm spoilt between learning php and ruby
alex88 has joined #ruby
<jheg> all my mates use php (mainly because of wordpress) but I have a finite amount of time to learn a language and ruby appealed to me
<segfalt> So, PHP is super popular and there's an endless stream of jobs for it right now.
<segfalt> But it's uh, not good.
<segfalt> And it makes you a bad programmer, a lot of the time.
<Freddan962> Finally! 10 hours later and I have built most of the system needed for my game! Woho :D
<segfalt> Freddan962: Grats :)
<Freddan962> segfalt: haha thanks ^^
sski has quit [Ping timeout: 245 seconds]
* jheg applauds Freddan962
<toretore> jheg: with php you'll be forever stuck with shitty joomla, wordpress, etc gigs and never get to do any "real" programming
skaflem has quit [Quit: Leaving]
<jheg> thanks for the link segfalt will give it a read
kirun has quit [Remote host closed the connection]
<Freddan962> http://puu.sh/8ZxUK.png <-
<toretore> (it that's what you want to do)
<centrx> jheg, Honestly, there is no reason to use PHP if current year > 2005
<centrx> >> Date.today.year
<eval-in__> centrx => undefined method `today' for Date:Class (NoMethodError) ... (https://eval.in/156449)
<segfalt> jheg: Another thing to consider, do you want to make websites, or other stuff?
<centrx> >> require 'date'; Date.today.year
<eval-in__> centrx => 2014 (https://eval.in/156450)
<segfalt> >> Time.now.year
<eval-in__> segfalt => 2014 (https://eval.in/156451)
<centrx> Story checks out
<segfalt> lol
<shevy> jheg ruby is a lot more consistent than php is
<shevy> that helps maintaining code
kirun has joined #ruby
<jheg> segfalt: mainly websites
<centrx> jheg, PHP is a very poorly designed and poorly implemented language
<jheg> in fact segfalt pretty much exclusively websites
Prawnzy has quit [Read error: Connection reset by peer]
<segfalt> jheg: So, simple websites will use crap like wordpress, drupal, etc. and save you a ton of time. Until you need to do something complex then you'll wish you just rolled a Rails site.
<centrx> jheg, Choose anything over PHP, including Ruby, Python, C#, Java, Perl, C++, Pascal, Go, Haskell, Scala, OCaml, COBOL, FORTRAN, Logo, Basic, Brainfuck, ...
<jheg> centrx: I've done a couple of wordpress sites I it certainly does feel bloated
Prawnzy has joined #ruby
<jheg> not that I really know what a lot of it does
<segfalt> Lots of people have a very profitable career spinning wordpress sites up for clients one after another, and there's nothing wrong with that.
<jheg> Brainfuck indeed ha
<segfalt> I just linked that :-p
<segfalt> great article though
alex88 has quit [Ping timeout: 252 seconds]
<segfalt> My favorite PHP WTF is truthiness.
<segfalt> '4' == 4.
snath has quit [Read error: Connection reset by peer]
<jheg> could I use ruby to design a back office system that integrates with a website
p8952 has joined #ruby
<jheg> ?
<segfalt> jheg: Absolutely.
Puria has quit [Quit: Leaving]
<segfalt> You can also use Ruby to make complete web applications, with things like Ruby on Rails or Sinatra.
maroloccio has quit [Quit: WeeChat 0.4.3]
<jheg> all sounds good
MrSamuel has quit [Ping timeout: 252 seconds]
<segfalt> I wonder what people would say in ##php
Eddr has joined #ruby
<jheg> I currently work pretty much full time in an unrelated job and am planning to do a bootcamp type course in 2015 for 3 months
<jheg> 8am to 8pm 5 days a week for 12 weeks
<segfalt> jheg: Sounds awesome.
<jheg> yeah I hope so
<segfalt> there's a ton of good self-education resources nowadays, the world is short on programmers.
<centrx> segfalt, Typical PHP answer is basically "Any language works, you just have to know how to use it"
<segfalt> Treehouse, code academy...
<jheg> I haven't the time to go to uni (kids and stuff)
<segfalt> jheg: Getting 12 weeks off work to go the bootcamp?
<jheg> yeah ha hopefully
<centrx> segfalt, But really it's "I only know PHP, and I call myself a PHP Programmer"
<jheg> its 50% my company though so its not like I have a great understanding boss or anything
<jheg> but I do have a open minded business partner :)
<segfalt> jheg: Ah, good deal.
<segfalt> Are you planning on working for someone again once you learn to program, or contracting or something?
<jheg> nope I want to design a solution for my current business thats missing in my market
<segfalt> oh nice
<segfalt> you know what's great about that?
<jheg> plus I have a couple of personal little projects I'd like to build
Eddr has quit [Remote host closed the connection]
<segfalt> motivation.
<segfalt> :-)
<jheg> yeah exactly
<segfalt> A lot of my self-education in programming was working in tech support where we didn't have any tools to do our jobs well.
<jheg> and all to often solutions are not made by the guys that actually use them and it shows
<segfalt> I asked if I could write some stuff to help out, mostly in PHP, and it made my life easier.
MrSamuel has joined #ruby
<jheg> bet the was rewarding
<segfalt> yeah
TRexJesus has quit [Ping timeout: 258 seconds]
<segfalt> and hours disappeared when I was cranking through problems I didn't understand (at the time)
<segfalt> wrote a website that helps us log into other sites more quickly
<segfalt> in retrospect, it's super insecure.
Prawnzy has quit [Read error: Connection reset by peer]
<segfalt> but our previous solution was "yell around for the creds until someone has them"
<segfalt> so whatever.
Prawnzy has joined #ruby
<jheg> thats the beauty of a bootcamp environment you don't lose a whole night figuring out why something doesn't work
<jheg> 15 minutes max
<jheg> haha sounds insecure
<jheg> we still have the latter method in our office :)
axilla_ has joined #ruby
<segfalt> Yeah, a ton of places do.
<segfalt> We did outsourced support for a dozen companies
<segfalt> so it was pretty awful when you're like.. uh.. let me put you on hold while i ask someone how to log into this site.
LadyRainicorn has quit [Ping timeout: 240 seconds]
lunaticedit has joined #ruby
lukec has quit [Quit: lukec]
<lunaticedit> Hey, you guys said windows support of ruby is sketchy.. So I tried 3 different linux distros in virtualbox and all three were buggy and unusable, any recommendataions on a light stable one for ruby dev?
<centrx> Which distros did you try
* segfalt is never happy with VM performance.
<lunaticedit> windows xp runs stupid fast in vm
* segfalt uses a Mac now :-)
<lunaticedit> i'm on a mac :p
<lunaticedit> in windows 8 ;)
havenwood has quit [Remote host closed the connection]
<centrx> !?
<segfalt> windows does virtualize really well
<Freddan962> I am on Windows 8 in Windows 8 :D
<segfalt> and it makes me so angry
havenwood has joined #ruby
<segfalt> why not use Ruby on the mac though?
imaleaf is now known as Magnum_PI
<segfalt> Ruby works great on OS X.
<lunaticedit> Debian - firefox makes the screen go black, gnome 3 has windows with no minimize button so I can't properly look at multiple windows from the same app
<segfalt> I do 100% of my work on it.
<Freddan962> I run Ruby on W8, OSX & Ubuntu as of now.
<lunaticedit> lubuntu - desktop restarts when trying to configure some settings via its built in utilities
<segfalt> Windows RubyInstaller doesn't have Ruby 2.1 yet, makes me sad.
simono has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<segfalt> lunaticedit: Did you enable 3d accel and install the guest additions?
<lunaticedit> arch: Got to the partition step, and didn't feel like setting up partitions from scratch, that got old 5 years ago when i ran gentoo
<Freddan962> segfalt: I am stuck on 1.9.3 because of Gosu's windows support :<
<segfalt> 1.9 is good.
<lunaticedit> yeah, I manually installed the additions and grabbed kernel headers, which made gnome not run in fallback mode (i'm not a linux noob)
<segfalt> I do most of my work on 1.8.7, which can be painful.
Adran has quit [Quit: Este é o fim.]
<lunaticedit> but the fact is gnome 3 is not acceptable as a real desktop to me, I need to be able to manage multiple windows...
<lunaticedit> gnome 3 is about the same level of usability as windows RT
<segfalt> Gnome 3 also performs like trash in a VM, in my experience.
Magnum_PI is now known as imaleaf
robbyoconnor has quit [Ping timeout: 252 seconds]
pushpak has quit [Quit: Linkinus - http://linkinus.com]
<centrx> lunaticedit, Debian would actually be my recommendation -- Don't use Gnome on any Linux distro -- Did you install Debian's iceweasel, or did you download Firefox from the Web?
<lunaticedit> iceweasel did the same thing for debian
<lunaticedit> i'm not trashing it, i'm sure its great for regular users. but if i can't run two command prompts in seperate windows I can't use it
<centrx> lunaticedit, If three different distros didn't work, it could be an issue with your virtualization or hardware speed/RAM
Megtastique has quit []
Adran has joined #ruby
trades has joined #ruby
<centrx> lunaticedit, How much CPU and RAM did you assign the VM?
s00pcan has joined #ruby
<segfalt> lunaticedit: If you're on a Mac, is there a reason not to use Ruby there?
yarou has joined #ruby
yarou has quit [Client Quit]
axilla_ has quit [Ping timeout: 276 seconds]
<lunaticedit> 1.5gb ram, 24mb vmram, all hardware virtualization enabled
<centrx> 24MB of VM RAM?
<centrx> that's not enough
<lunaticedit> again, i have windows 3.11, windows 98, windows xp all installed and running just fine in the same VM
<lunaticedit> 24mb of vm ram not enough for non 3d accelerated desktop?
<centrx> Those are all from over ten years ago
<centrx> no way
<centrx> It would be like trying to install any modern operating system on a computer from...twenty years ago?
<segfalt> 128M of video RAM didn't make Gnome 3 not slow as crap for me.
<lunaticedit> glxgears ran at 390fps on vbox
<centrx> I doubt XP runs on 24MB RAM too
<lunaticedit> with that setting
<segfalt> this is video ram, centrx.
<lunaticedit> but i had 3d acceleration enabled so who knows
<centrx> oh ok
<centrx> nevermind
<lunaticedit> compiz was working, it wasn't "slow", it actually had drop shadows, and the fade in/out was smooth
<lunaticedit> my problem was gnome 3 itself
ndrei has quit [Remote host closed the connection]
<lunaticedit> and with lubuntu crashing
jgx has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<segfalt> What is lubuntu?
<segfalt> LXDE?
<lunaticedit> ubuntu with lxde
<centrx> yes
<lunaticedit> ubuntu has that unity bullcrap
<segfalt> Odd that it was crashing.
<segfalt> LXDE is pretty basic.
<segfalt> could try Xubuntu, it's a similar GTK based experience.
<lunaticedit> yeah i've ran it a few years back, same machine, same vm, no crashing
Devanon has joined #ruby
robbyoconnor has joined #ruby
<segfalt> You could also install fluxbox, i3, or some other lightweight solution and just not boot Gnome 3.
<lunaticedit> honestly i'm fine with a text mode
<lunaticedit> pure text mode is fine, as long as I don't have to hand hold manual installation of the distro
<centrx> segfalt, He said "vm ram" twice, so I don't see how could that mean video RAM...
jack_rabbit has joined #ruby
<EatMulti> maybe installing something like debian server?
<segfalt> I assumed it was a typo, he did say 1.5gb RAM right before that.
<lunaticedit> sorrry it was a typo
ndrei has joined #ruby
<lunaticedit> 1.5gb of ram, 24mb of vram, enough to represent 1024x768@32bpp
<segfalt> debian or ubuntu server are probably a good choice
<EatMulti> I've never had issues with that kinda thing, host osx/linux virtualbox vm
<segfalt> if you just need a shell
<EatMulti> only need about 250mb ram
<lunaticedit> can't do ubuntu server, only x64 supported, and stupid me upgraded and it stuck me with 32-bit windows 8
fantazo has joined #ruby
<EatMulti> at most
<segfalt> you could install vagrant on your Mac and just boot a VM and 'vagrant ssh' from iterm
<EatMulti> vagrant works on windows to
<lunaticedit> the problem i have with OSX is the osx keymap
<EatMulti> apparently
<EatMulti> too*
<lunaticedit> i use windows all day at work, end should take me to the end of the line, not the end of the file ;)
<segfalt> you know what's funny about that lunaticedit is I can't stand Windows keymap after ~7mo working exclusively on OSX.
teddyp1cker has quit [Remote host closed the connection]
<segfalt> After years of Linux/Windows use.
<segfalt> I somehow got used to it
<segfalt> I regularly yell at my gaming PC for not copying things when I press Alt-C. :-(
ndrei has quit [Remote host closed the connection]
<lunaticedit> oh, and i went to the store today seeing if there were any good ruby books. nope.
b1205 has joined #ruby
<segfalt> is the pickaxe book still popular?
<segfalt> i learned from that, but i think 1.8.5 was mainstream then
Avahey_ has quit [Quit: Connection closed for inactivity]
<EatMulti> I dunno, I've got it back at home but don't reference it too often
<lunaticedit> it's ok though, in my first night with ruby i almost have half my compiler done
<lunaticedit> so i guess i'll stick with google and you guys
<segfalt> but yeah, google+us is good too
<segfalt> :)
<EatMulti> haha... google is potentially the best learning/reference tool for me
<EatMulti> I've been looking through Eloquent Ruby recently, best book I've seen so far
dingus_khan has quit [Remote host closed the connection]
<lunaticedit> so I have the debian iso, i was installing for server but somehow still managed in gnome 3, i'll try running it again, and reading a little closer
<EatMulti> hahaha ouch
<segfalt> all servers have gnome 3, don't you know?
<segfalt> :-)
<EatMulti> can't remember the last time I manually set up a vm
omosoj has quit [Ping timeout: 240 seconds]
<EatMulti> :P
SCommette has quit [Quit: SCommette]
<segfalt> because vagrnat?
<segfalt> *vagrant
<EatMulti> because vagrant
<EatMulti> yep
LadyRainicorn has joined #ruby
<EatMulti> gotta figure out how to make my own boxes at some point though
b1205 has quit [Ping timeout: 252 seconds]
<lunaticedit> OH
<lunaticedit> debain hide the desktop stuff in the 'advanced' menu
<lunaticedit> they also have lxde, xfce, and kde on it
<EatMulti> puppet for setting up newer versions of rubies seems a little unnecessary
<imaleaf> 13:27 <segfalt> I wonder what people would say in ##php
<EatMulti> oooo
<lunaticedit> hrm.. lxde vs xfce
<imaleaf> segfalt: we would agree :p
s00pcan has quit [Ping timeout: 252 seconds]
<segfalt> imaleaf: haha nice.
<imaleaf> I learned it simply to work on specific projects
blackmesa has quit [Ping timeout: 245 seconds]
<segfalt> imaleaf: Wordpress, Drupal?
digitalcake has joined #ruby
<imaleaf> wordpress really isn't ....useful
<imaleaf> I had to work with mediawiki
<EatMulti> ...wordpress
* EatMulti shudders
<segfalt> wordpress is great if you want a blog.
<segfalt> and.. nothing else at all.
<lunaticedit> people still do blogs?
<imaleaf> meh, one can just code up a blog using a decent framework in half an hour
trades has quit [Quit: Leaving]
<imaleaf> and then be able to actually make an application, too
<Senjai> lunaticedit: Lol, funny
<EatMulti> I have a client atm with a pretty ambitious site on wordpress
pwh has joined #ruby
<EatMulti> took the prior dev about two years to implement...
<Senjai> imaleaf: not a decent blog.
<Senjai> EatMulti: Sounds like two years of wasted $
<takemikazuchi545> I had to deal with a wordpress ecommerce site once.
<takemikazuchi545> Never again.
<Senjai> takemikazuchi545: eww, l2spree
<EatMulti> Senjai: no doubt
<Senjai> EatMulti: Whats it for?
<imaleaf> Senjai: define decent blog? my definition is being able to store and retrieve from the database, validate, and display it :p
<lunaticedit> ok debian is installing
<imaleaf> takemikazuchi545: my apologies on behalf of the entire planet
<Senjai> imaleaf: Okay, sure, my version of decent is, production ready
<EatMulti> news publication with some more stuff chucked in
<EatMulti> Senjai: news publication with some more stuff chucked in
<imaleaf> well, I've looked at the wordpress architecture, it's not bad. but the idea that you have a separate backend from the frontend, and other things..it's just doing too much
<Senjai> can I see
<Senjai> EatMulti: ^
MrSamuel has quit [Ping timeout: 252 seconds]
<takemikazuchi545> It worked out in the end though. Women flock to me when I start telling my WooCommerce stories at parties.
<imaleaf> hahahaha
<EatMulti> Senjai: 7000 lines of css, all ids, lots of !importants, everything about it is a pain
<lunaticedit> I think our old project lead must have worked on wordpress then
<EatMulti> Senjai: pretty broken responsive design too
<imaleaf> it just doesn't make sense--if one needs to make an application, why not use a framework. and then we could create blogs and wikis that are all gems/composer modules
<lunaticedit> If there's one thing i've learned in my years of coding, its that abstraction for the sake of abstraction is both a waste of time, and a mistake
<imaleaf> instead of having these massive beasts that people try to force to be something else
<Senjai> EatMulti: The second WP needs to be more than a blog, its time to make an application
<EatMulti> Senjai: precisely, be glad you don't have to look at the php for it
<lunaticedit> If you write properly designed software that has low class coupling, its easy to add abstractions when needed later
<takemikazuchi545> Yeah, the problem is some people take that idea to Abstraction == Not getting real work done.
benzrf|offline is now known as benzrf
<Senjai> EatMulti: Im sure I could write that up in rails in 2 and a half weeks
<EatMulti> Senjai: there's about 50 files in the root theme directory
<EatMulti> Senjai: that's pretty much what I'm doing :P
<takemikazuchi545> The same way people waste time on unnecessary early-development abstractions for problem scopes that aren't even well defined.
<lunaticedit> well i define my scopes first :p
<lunaticedit> if you don't have a goal how do you 'finish'?
<imaleaf> I think that's just the basic problem of people focusing too much on processes and not enough on solving the actual problem at hand
<takemikazuchi545> Yeah.
<lunaticedit> that's why, laugh if you will, I use microsoft OneNote, like all the time
<Freddan962> This is not Ruby related - but anyone knows why this could be? http://puu.sh/8ZAOA.png (Running Ubuntu x64)
<imaleaf> onenote isn't bad..
<EatMulti> Senjai: just started, after fixing up some urgent things and implementing a few bits and pieces
<lunaticedit> Freddan: chmod +x it, or do sh ./thefile.sh
<imaleaf> Freddan962: use sh
<lunaticedit> try that
<takemikazuchi545> I'm not very experienced, but of the two projects I've worked/working on the scope hasn't been very clear, and what to keep abstract is up in the air.
toastynerd has quit [Remote host closed the connection]
<lunaticedit> If scope isn't clear, you can't ensure your code is properly tested and implemented..
<imaleaf> takemikazuchi545: for someone who's not experienced, it sounds like you've already gone through the worst job possible :p
<Freddan962> imaleaf: Same
<takemikazuchi545> Well, I suppose the immediate scope is clear.
<lunaticedit> 75% of the challenge of software design is to define what you're actually trying to do
<Freddan962> Imaleaf: Same issue
<pontiki> [citation needed]
lw has joined #ruby
<lunaticedit> I work for a government agency so you can imagine the kind of crazy I have to dig through
<takemikazuchi545> Like "it needs to be able to do this by X point in time" but what it'll ALSO need to do is another question.
<lunaticedit> that's what you have change control.
<imaleaf> lunaticedit: yeah in #programming they just pointed out the interesting idea of creating a function for an -output-, rather than solving a problem. I'll play with that
MrSamuel has joined #ruby
<EatMulti> Senjai: Jousting with the wp db is good fun though
<lunaticedit> thats kinda what I do.. I start with something like Compiler.Compile(source), then unit test the result of that (which fails)
ixti has joined #ruby
<lunaticedit> and dig down from there
sputnik13 has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
<Freddan962> imaleaf: What else could it be?
<imaleaf> Freddan962: you're in ~steam/, and the script is calling something in /root/steam/linux32 -- different place, which likely -does not- exist
<takemikazuchi545> I'm working on a project with two repositories of the same site both being used in production, while we write a new one to replace them both.
<RubyPanther> I disagree, figuring out WTF you should actually be trying to do is over 90% of it
<takemikazuchi545> It isn't that bad but it gives me a headache sometimes.
<RubyPanther> If you actually know what you're trying to do, the implementation is guaranteed to be trivial.
enebo has joined #ruby
<lunaticedit> exactly, which is what my job is -- to take the requirements, and turn it into something a person can actually implement
<imaleaf> RubyPanther: well isn't that the idea? implementing for an output, because ultimately what we are trying to get is output? rather than thinking about problem
<imaleaf> yeah
<segfalt> So I found myself implementing this today (https://gist.github.com/askreet/2e3624330512ae4aedc8) and wondered if something like this already exists?
<Freddan962> imaleaf: http://puu.sh/8ZBdQ.png :<
<RubyPanther> imaleaf: if you start out knowing what output you want, you're probably not asking, "what output should I want?"
<imaleaf> hm
<RubyPanther> What is the real (human) problem, and what is the nature of the problem domain? What outputs would help the human the most? That is sooooo much more important than the stuff people usually get caught up in, like "what output did the human ask for?"
<takemikazuchi545> If you're also a UX designer.
Trudko_ has joined #ruby
<RubyPanther> If you know what outputs you need, you shouldn't be trying to design anything.
<imaleaf> Freddan962: ...you just told your computer "run steamcmd.sh, in the root directory of my machine, even though there is nothing but directories in root, and what I want to do takes place much lower in the filesystem". sh steamcmd.sh would be correct. your issue is within steamcmd.sh itself.
eregon has joined #ruby
ktosiek has quit [Ping timeout: 245 seconds]
<imaleaf> RubyPanther: I mean, when creating functions, you are solving individual -pieces- of a problem. and they need to be strung together and work toward solving the larger one. so designing a function toward a specific output that you need, a result, makes sense
ktosiek has joined #ruby
<RubyPanther> imaleaf: sounds like a random pile of methods to me, not a well designed system
RandyT has joined #ruby
<RubyPanther> a method should not have any idea of what the larger problem is, that implies excessive coupling
<lunaticedit> yeah imaleaf that sounds sketchy
<lunaticedit> functions don't solve a piece of a problem, they solve a single problem
<imaleaf> hm
<Freddan962> imaleaf: Did the same command, this time it worked. No idea why.
<lunaticedit> most big problems consist of a number of smaller problems
<imaleaf> Freddan962: butterfly effect
DaniG2k has quit [Quit: leaving]
<sharpmachine> did you try turning it out and then turning it back on again?
<imaleaf> lunaticedit: well isn't a certain amount of coupling necessary? methods within a class are working towards a major function
<lunaticedit> i try to avoid that where possible
<lunaticedit> because when you have a function that relies on an external variable, you can NEVER garuntee a state from the perspective of that individual function
<imaleaf> I mean within a class
<lunaticedit> even within a class
<takemikazuchi545> As a junior developer the amount of coupling vs. decoupling(like dependency injection) is really difficult when I'm writing a class.
anaeem1 has quit [Remote host closed the connection]
<lunaticedit> Honestly, what I do at work is I have what i call a "service class", which takes in some sort of object and interacts with it
banister has joined #ruby
<lunaticedit> (new PostService(post)).AddReply(newPost);
toastynerd has joined #ruby
<takemikazuchi545> So what's a good way to implement a process in a class?
<lunaticedit> but yeah, just remember in your function you CANNOT assume the state of any variable you rely on that is external
<takemikazuchi545> Like often I'm writing code that goes through a number of discrete steps to get to a certain output.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
toastynerd has quit [Remote host closed the connection]
<takemikazuchi545> Like preprocessing data files for import into a database.
<lunaticedit> well you can say something like..
blackmesa has joined #ruby
<lunaticedit> Well let me back up, what language/environment
<lunaticedit> because every tool is different. in MVC you'd do it in controllers, or you can use a state machine
nopc0de is now known as zz_nopc0de
Prawnzy has quit [Ping timeout: 264 seconds]
<takemikazuchi545> ruby in a rails application.
toastynerd has joined #ruby
<takemikazuchi545> It's an order management system with orders coming in from multiple other systems.
doodlehaus has joined #ruby
<takemikazuchi545> Mostly csv files.
<lunaticedit> OK well you'd have some top level controller that is being told "hey import this stuff", right?
<centrx> takemikazuchi545, Make rake tasks and set them up to be run from cron
<takemikazuchi545> In a great variety of formats. I have a big module full of helper functions I wrote.
<takemikazuchi545> centrx: That's already been done(albeit with thor tasks).
<imaleaf> lunaticedit: by external, do you mean class variables?
<lunaticedit> so that'd be where you do the 'steps', BUT only in that one place, each indivdual step should not know about the other
<takemikazuchi545> The big issue is that the data is often really dirty, so I want to be able to override a step.
<lunaticedit> 'override' meaning
<lunaticedit> when you talk about overrides, you start getting into the realm of dependency injection, which can get real messy real quick
Prawnzy has joined #ruby
<takemikazuchi545> Override meaning I have dirty data so I can't do simple mappings of the csv headers to database columns.
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
<takemikazuchi545> Well, let's say for a given file I can do 90% of the data as a direct header => column mapping.
MrSamuel has quit [Ping timeout: 252 seconds]
<takemikazuchi545> But for the 10% that I can't, I need to define custom steps for how say, What's called a `name` in my imported data gets mapped to a `first_name` and a `last_name` in my database.t
frosgy has joined #ruby
<lunaticedit> well for each iteration i'd validate the row, and use that to determine how to map
<lunaticedit> value = Mapper.Generate(item.isvalid).map
<lunaticedit> where mapper.genreate would return class A or class B that will map normal style, or with some custom error correcting logic
pareidoliax has joined #ruby
MrSamuel has joined #ruby
<lunaticedit> that way you have no 'override', you have one function (isvalid) that determines if you can do a normal map or not, and then a specific implementation based on either situation. There is no stateful logic at that point, and you get to stay in boxes
omosoj has joined #ruby
<takemikazuchi545> Okay.
digitalcake has quit [Quit: Leaving.]
<takemikazuchi545> If you don't mind explaining, how would that work in my example of mapping a first_name and a last_name to a name.split(' ')
frogssgy has quit [Ping timeout: 245 seconds]
<lunaticedit> well I'd use a function to map each line to a specific output type, you'd have to show me a code snippit example or something
marr has joined #ruby
toastynerd has quit [Remote host closed the connection]
digitalcake has joined #ruby
<takemikazuchi545> goccha
<lunaticedit> def initialize(source) ; @lines = File.read(source).each_line.with_index.map{ |l,x| SourceLine.new(source, l, x) } end
paulog has joined #ruby
<lunaticedit> as an example of me doing a source file -> collection of lines mapping
<takemikazuchi545> Okay.
dingus_khan has joined #ruby
MrSamuel has quit [Ping timeout: 265 seconds]
<lunaticedit> sorry back, looking
<takemikazuchi545> Thank you.
<lunaticedit> it's great i only have a day of ruby experience ;)
MrSamuel has joined #ruby
kirun has quit [Quit: Client exiting]
<lunaticedit> so ShipStation, you have this huge function
DaniG2k has joined #ruby
<takemikazuchi545> Well ShipStation is more of a namespace for the thor jobs that are relevant to it.
<takemikazuchi545> It's a service we use for making shipments.
<lunaticedit> er correct, clientimporter
<takemikazuchi545> Yeah.
<lunaticedit> so where is your 'fix'
<lunaticedit> er the part where it deviates
doodlehaus has quit [Remote host closed the connection]
<takemikazuchi545> Well, the job is supposed to be a single thor task.
nari has quit [Ping timeout: 245 seconds]
moneydouble has joined #ruby
<lunaticedit> orders = raw_csv.each_with_index.collect.map{ |x| Order.new(x) } is all i'd have, instead of all those mappings
DanishMan has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
freezey has quit [Remote host closed the connection]
<takemikazuchi545> Sorry I didn't explain it correctly.
<takemikazuchi545> This is one file out of many.
smathieu has quit [Remote host closed the connection]
<lunaticedit> and with that product_header_count is no longer available, and i see it's some kinda global stateful indexer
smathieu has joined #ruby
pareidoliax has quit [Quit: pareidoliax]
<takemikazuchi545> There are a great variety of potential mappings.
<takemikazuchi545> This accounts for one.
<lunaticedit> all I'm saying is, if you have a lot of branching where you map, that should be based off of some condition, and that condition doesn't matter in the higher level import function
<takemikazuchi545> Okay, where do I add the branching?
<lunaticedit> in a factory method
diegoviola has joined #ruby
imaleaf has quit [Ping timeout: 240 seconds]
<lunaticedit> FooFactory.Generate(sourceType).map(source) where sourceType is determine by what that 'branching' is checking
gregf has joined #ruby
kyb3r_ has joined #ruby
<lunaticedit> but again i'd have to actually see it to give you a specific example
foooobear_ has quit [Quit: Computer has gone to sleep.]
<apeiros> please don't use capitalized method names
nnu has quit [Ping timeout: 240 seconds]
Freddan962 has quit [Quit: Leaving]
<lunaticedit> <-- uses C#
<lunaticedit> I'm only one day into ruby, give me a break :)
<centrx> Welcome
<RubyPanther> *except when the method is similar in function to Integer() and Float(), for example hpricot has a Hpricot() method
<apeiros> even then
imaleaf has joined #ruby
<centrx> those are like fake methods pretending to be class constructors, not really methods
<lunaticedit> javascriptParam ruby_param CSharpParam, every language has a style. every. single. one
<apeiros> IMO better leave those Kernel level pseudo-functions away.
MrSamuel has quit [Ping timeout: 252 seconds]
<apeiros> lunaticedit: yupp
<lunaticedit> lord forbid 3 people agree on something online
<apeiros> lunaticedit: css-classes
<lunaticedit> aye yeah
<takemikazuchi545> lunaticedit: I hadn't considered factories I'll look at them.
<lunaticedit> factories are great when there's a number of possible ways to do something, based on a condition, where the implementation is completely dynamic
omosoj has quit [Ping timeout: 245 seconds]
cashnguns has quit [Remote host closed the connection]
<takemikazuchi545> That actually makes a lot of sense.
MrSamuel has joined #ruby
<lunaticedit> that allows you to, at the caller level, only worry about what matters
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<lunaticedit> PayService.generate(paymentProcessor).sendBill(mybill)
<lunaticedit> doesn't matter if its a check, money order, or cash at this point
timonv has joined #ruby
<lunaticedit> the only place it matters is in PayService.generate, which is one function in one place in yoru file, not spread all over the place
<RubyPanther> They're part of Ruby
<lunaticedit> if processor == Credit return CreditProcessor.new
<lunaticedit> etc etc.
yfeldblum has quit [Ping timeout: 265 seconds]
Guest57743 has quit [Remote host closed the connection]
Derander has quit [Quit: ZNC - http://znc.sourceforge.net]
<takemikazuchi545> I see.
<lunaticedit> My favorite saying at my job: "Think inside the 'box'"
Derander has joined #ruby
<RubyPanther> if you implement a martiannumerals gem that subclasses Numeric, leaving out a Martian() method would leave it incomplete; that's true even if you don't ever use Integer() and Float()
b1205 has joined #ruby
nnu has joined #ruby
nnu has quit [Changing host]
nnu has joined #ruby
fantazo has quit [Ping timeout: 252 seconds]
try has quit [Quit: derpity derp]
timonv has quit [Ping timeout: 265 seconds]
Prawnzy has quit [Ping timeout: 258 seconds]
danijoo has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
akonny has quit [Quit: akonny]
<takemikazuchi545> So this is my basic idea: https://gist.github.com/Takemikazuchi/ccbe01cd050e6ae49fcd
<takemikazuchi545> How can I do this with factories?
top4o has joined #ruby
ferr has joined #ruby
nnu has quit [Client Quit]
<lunaticedit> give me a few, again, i'm a C# guy, so the ruby is slowing me down :)
MrSamuel has quit [Ping timeout: 264 seconds]
lw has quit [Quit: s]
<lunaticedit> what are you doing with 'override'?
b1205 has quit [Ping timeout: 258 seconds]
<takemikazuchi545> Well, I haven't implemented any of this so it's all up in the air.
<takemikazuchi545> But override would be for everything that can't be done with the mapping.
<lunaticedit> ok let me take a stab, keeping in midn i'm a ruby newb so it may not be compillable :)
MrSamuel has joined #ruby
andrewhl has quit [Quit: andrewhl]
<takemikazuchi545> So say my mapping accounts for attribute_one and attribute_two, but attribute_three needs some crazy processing shit to be valid. So I need to have access to it in override.
andrewhl has joined #ruby
ktosiek has quit [Read error: Connection reset by peer]
<takemikazuchi545> haha okay, thanks. Yeah mine won't run either since I didn't assign my instance to a variable. The file's been updated if it matters.
andrewhl has quit [Client Quit]
Trudko_ has quit [Remote host closed the connection]
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
CodeBunny has quit [Ping timeout: 252 seconds]
MrSamuel has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
DaniG2k has quit [Quit: leaving]
dingus_khan has quit [Remote host closed the connection]
dingus_khan has joined #ruby
imaleaf has quit [Ping timeout: 264 seconds]
mary5030 has quit [Ping timeout: 240 seconds]
endash has quit [Quit: endash]
noob101 has joined #ruby
<noob101> Hey guys got disconnected sorry :(
<noob101> Quick question.
<noob101> How can I find out the password to my network if I am connected to that network? Is it possible?
diegoviola has quit [Quit: WeeChat 0.4.3]
smathieu has quit [Remote host closed the connection]
toastynerd has joined #ruby
imaleaf has joined #ruby
smathieu has joined #ruby
flops has quit [Remote host closed the connection]
<benzrf> noob101: probably not
<benzrf> noob101: you can check if your comp stores it
<pontiki> if it's a mac, it will be in the keychain
<noob101> benzrf: How can I check if my computer stored it? is there a file that tracks all inputs I have made and etc? I am using windows 8
<noob101> windows 8.1 sorry
<pontiki> sadly, no idea about that :/
jheg has quit [Quit: jheg]
<vakt> noob181: You're SOL unless you're talking about IRC.
marcdel has joined #ruby
<benzrf> noob101: why are you using windows?
spider-mario has quit [Read error: Connection reset by peer]
<vakt> lol
<pontiki> wrong channel, benzrf
<pontiki> you want #h8windows
<benzrf> u cant cite MINASWAN
<noob101> So is there a way or not, I am just asking I would like an answer now please.
toastynerd has quit [Remote host closed the connection]
<RubyPanther> noob101: "no"
<benzrf> in this case, the true niceness is to get people out of that shitheap
<benzrf> :^)
<RubyPanther> noob101: "of course not"
lolmaus has quit [Ping timeout: 252 seconds]
<noob101> Channel doesn't exist btw
toastynerd has joined #ruby
<benzrf> noob101: try google
<noob101> I did
<benzrf> something like
<RubyPanther> noob101: "that would really suck if it worked like that"
<pontiki> if your computer connects automatically to your network, the password is stored someplace on your computer. whether you can get access to it or not is another question
<benzrf> 'windows stored wifi passwords'
<pontiki> no it wouldn't, RubyPanther
chrisseaton has joined #ruby
<vakt> noob181: if you're talking about IRC, talk to a mod to get your password reset, or see if you can see if that computer still has a msg window open for NickServ
<benzrf> chrisseaton: is that chriss eaton or chris seaton
<pontiki> it would more than suck, it would BLOW
<pontiki> :>
marcdel has quit [Client Quit]
<RubyPanther> lolol
pskosinski has quit [Ping timeout: 272 seconds]
<chrisseaton> benzrf: hello? it's Chris Seaton
<benzrf> chrisseaton: ok
<benzrf> just wondering o;
MrSamuel has joined #ruby
Eddr has joined #ruby
revoohc has joined #ruby
<apeiros> and there I thought your middle name was 'sea'
<vakt> 'Ton' would of been an unfortunate surname
t0rc has joined #ruby
<apeiros> I'm still curious why so many people confuse 'of' with 'have'
<RubyPanther> I dunno, Sea Ton would be a fine name for a marine mammal
<pontiki> apeiros: "phonological ambiguity" run amok
<vakt> Because I pronouce of as 'ov' and I'm drinking.
<centrx> apeiros, They don't actually know English, they are pure imitators.
dingus_khan has quit [Remote host closed the connection]
<apeiros> centrx: english isn't my first language either
<apeiros> heck, it isn't even my second
agjacome has joined #ruby
<RubyPanther> Because would've doesn't get the attention that their there they're does
pgmcgee has joined #ruby
<apeiros> pontiki: is that only similar in some dialects? or all of US english?
<vakt> Dialects. I'm British.
lolmaus has joined #ruby
<vakt> I still right it as 'have' though.
<RubyPanther> "There, their, they're, it will be OK"
<vakt> 've doesn't seem right, in writing.
<revoohc> Hey, I need some help sorting a hash. I’m new to Ruby and working on creating a Dashing dashboard. I have a hash that I need to sort but can’t figure out how. It looks like {“server1”=>{:label=>”server1”, :value=>123}, … How do I sort by vaolue
<centrx> apeiros, "native"-level knowledge is the highest level only as it refers to a literate native
<pontiki> i wouldn't say it's so much dialect as speech is often sloppy
<apeiros> vakt: interesting
<vakt> but I just wrote write as right so I'm pissed
<vakt> lol
<centrx> As ignorance is glorified, some of the "native" speakers are ignorant
<pontiki> in casual conversation, people rarely pay attention to enunciation
<pontiki> it's just a thing; it's not even limited to English
<vakt> As long as the point gets across.
<vakt> yeah
<benzrf> revoohc: the_hash.values.sort_by {|server| server[:value]}
<pontiki> in a conversation, only about 6 to 8 percent of the communication is carried by the syntax itself
<vakt> It's relaxed, casual informalities. I find it in a lot of websites though.
<pontiki> that's where it runs amok :)
peckermanzzz has quit [Ping timeout: 255 seconds]
<centrx> For example, it's easy to understand what this person is saying, because of body language:
<shevy> pontiki do you mean in a conversation like girls talk
<pontiki> seriously?
<RubyPanther> It is not sloppiness, in American English would've is pronounced "would uv" if speaking quickly and "would of" if spoken slowly but still in the contracted form. `ve turns into of when spoken slowly because of the missing vowel.
Hanmac1 has joined #ruby
<shevy> who would have known
<shevy> RubyPanther knows ghetto-lang after all
<imaleaf> this really sounds like it belongs on #perl :p
<shevy> imaleaf don't insult us!!!
<revoohc> benzrf: Thanks!
<shevy> it's legacy speak on #perl after all
<imaleaf> talk about human languages? :P
<shevy> no not the topic
<shevy> the environment!!!
<imaleaf> ahh
<imaleaf> I meant the topic
<RubyPanther> Yes, I was the poor kid who dropped out of school to spend more time in the library
<shevy> they locked him away into the library :)
Hanmac has quit [Ping timeout: 245 seconds]
jimbow has quit [Quit: switching clients]
blackmesa has quit [Ping timeout: 245 seconds]
<RubyPanther> If you get locked into the University Library after hours, the SW staircase has a roof exit, and there is a ladder at the NW corner that leads down to the physics department student satellite dish, and from there you can jump into a red cedar tree. Then it is only a short climb/drop to the ground level.
jimbow has joined #ruby
<jimbow> colloquy > irssi
<benzrf> jimbow: u lie
claymore has quit [Quit: Leaving]
<pontiki> thanks for the intel, RubyPanther
<shevy> xchat > jimbow
<jimbow> that doesn't even make sense shevy
<pontiki> wrong channel, jimbow
<pontiki> you want #ranton
Eddr has quit [Remote host closed the connection]
<RubyPanther> xchat comes with Ruby plugin support, so that is an easy battle
try has joined #ruby
<shevy> I never used that plugin
MrSamuel has quit [Ping timeout: 252 seconds]
n_blownapart has joined #ruby
peckermanzzz has joined #ruby
<pontiki> weechat does as well
<shevy> I wouldn't even know what to do with it either
<RubyPanther> shevy: I did "hello world" and swooned, and now I <3 <3 <3 xchat 4ever
yfeldblum has joined #ruby
yfeldblum has quit [Remote host closed the connection]
MrJoshua has joined #ruby
<pontiki> lol
Eddr has joined #ruby
Eddr has left #ruby [#ruby]
<n_blownapart> hi I'm still slogging through this euler problem. someone said yesterday the first example was not orthodox ruby. what about the second example? in any case I don't follow the program flow here: http://pastie.org/9207541
yfeldblu_ has joined #ruby
<RubyPanther> It is high quality software, I don't think I've seen a new feature in over 10 years. That is as it should be. Figure out what it is supposed to do, and make it do that. New features are admissions of past failure. Admit failure, but don't fail all year every year like firefox is doing.
<pontiki> oh crikey, now we have orthodox ruby?
Xeago has joined #ruby
<shevy> RubyPanther I can't compile it anymore
<n_blownapart> pontiki: I forget the term they used...
<pontiki> maybe "idiomatic"
<shevy> n_blownapart "not sane ruby"
<centrx> Ruby with the Filioque
<shevy> n_blownapart the real way to reach idiomatic ruby is to write a lot of code
<RubyPanther> Orthodox Ruby ensconces the UNIX philosophy, and that giant method that does a bunch of different things should be burned at the stake! Heretic!
<n_blownapart> shevy: well these problems I find interesting.
<ashp> idiomatic ruby is to make a terrifying metaprogramming mess for the next maintainer :D
<RubyPanther> It looks like it was ported straight from Perl.\
<shevy> lol
vakt has quit [Quit: leaving]
<n_blownapart> really?
mr_blue has quit [Quit: leaving]
<centrx> n_blownapart, you've started quite a discussion
<n_blownapart> centrx: wearing my flak jacket..
<RubyPanther> ashp: As long as you have it properly abstracted and encapsulated so that each method only does one WTF, it should be easy to refactor.
<shevy> let's do a public discussion
<shevy> (1) while sqi <= n do
<RubyPanther> wtf is a sqi?
Nexus_x1 has joined #ruby
<pontiki> the sound of a small rodent?
sinkensabe has joined #ruby
MrSamuel has joined #ruby
<shevy> lol
<RubyPanther> variable names are actually FREE, you don't pay per character.
<shevy> (2) while n.modulo(i) == 0 do
apeiros has quit [Remote host closed the connection]
<segfalt> I wish I could convince my coworkers of that, RubyPanther.
<pontiki> OMG
<pontiki> watching winter soldier
revoohc has quit [Quit: revoohc]
apeiros has joined #ruby
<pontiki> they just got to the place where they raided the computer history museum for props
<shevy> that is surely better than watching n_blownapart code!
<RubyPanther> "nobody" uses #modulo we have a % operator
<n_blownapart> shevy pontiki please rewrite it for us so I can at least follow the math. I know what a prime number is. It's not my code it shevy !
mercerist has quit [Read error: Connection reset by peer]
<shevy> I think the dude that called the code not idiomatic was nice
<shevy> it's not your code?
<RubyPanther> (n%i)==0 is idiomatic
mercerist has joined #ruby
<n_blownapart> hell no I can barely read the definition of the hash. shevy
sharpmachine has quit [Ping timeout: 264 seconds]
<shevy> eh
<shevy> if it is not your code, why are you staring at it
<RubyPanther> In Ruby we try to avoid punctuation unless we can string a bunch of punctuation together in a row so it looks funny.
<segfalt> (n % i).zero?
<segfalt> :-)
<n_blownapart> ok is the second example any better ?
<shevy> well if you can not identify with that code, I don't know what to say :(
axilla_ has joined #ruby
alex88 has joined #ruby
<RubyPanther> That's the first time I ever saw /= used, and I hope the last
<n_blownapart> identify with it? I'm trying to follow the logic. RubyPanther throw me a bone.
akita has joined #ruby
<RubyPanther> If you can't afford a temp variable, how can you afford the implicit temp var that Ruby creates under the hood?
dorei has joined #ruby
<shevy> hehehe
<RubyPanther> n_blownapart: which is the part you don't understand?
<RubyPanther> n /= i is syntactic sugar and means n = n / i
<RubyPanther> which is why nobody does that, instead they say m = n / i
MrSamuel has quit [Ping timeout: 252 seconds]
axilla_ has quit [Ping timeout: 240 seconds]
ferr has quit [Ping timeout: 240 seconds]
<benzrf> in haskell /= means not equal!
<n_blownapart> RubyPanther: got that re: n = n/i. but if you could explain a few of the key lines on code, like that one and lines 5..7
<n_blownapart> The program does work, after all, that much I know.
<RubyPanther> n_blownapart: 5 and 6 have the same meaning as they would have in an algebra class
<Nilium> in haskell ::=-!!#^== means equals
MrSamuel has joined #ruby
<n_blownapart> I took algebra in 1978
<RubyPanther> n_blownapart: while TEST EXPRESSION do CODE THAT GETS REPEATED end
andrewlio has quit [Quit: Leaving.]
<RubyPanther> n_blownapart: that's fine, it is just like x = 1 y = 2
Hobogrammer has quit [Read error: Connection reset by peer]
<n_blownapart> so you're squaring the lowest prime number to begin a loop that computes higher factorials or somesuch?
<n_blownapart> RubyPanther: ^
mercwithamouth has joined #ruby
<RubyPanther> so in pseudocode, while the ponies still have ugly tails, trim them. In Ruby: while pony.tail == :ugly do ; pony.tail.trim! end
alex88 has quit [Quit: Leaving...]
combusean has joined #ruby
<n_blownapart> RubyPanther: nice. ... one sec
smathieu has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
<shevy> are we trimming ponies again
Devanon has quit [Ping timeout: 276 seconds]
smathieu has joined #ruby
<RubyPanther> it is really awful code though, for example: sqi = 4 # square of i
<benzrf> god damn
<benzrf> shevy: <3 pone
<RubyPanther> but then later at the end of the loop: sqi += 2 * i + 1 # optimized version of sqi = i*i
<Nilium> pony.tail.trim! while pony.tail.ugly? # the correct pony tail trimming code
<n_blownapart> Found factor 71 ; Found factor 839 ; Found factor 1471 ; The largest factor is 6857 << RubyPanther this is the output. could we take say 839 and see how it was computed line by line ?
<Nilium> Problem: the pony's tail is always ugly and therefore you have an infinite loop 'cause your pony sucks
<RubyPanther> Nilium: Only if you don't plan to #primp! and #preen! after #trim!
<havenwood> why is there a trim that doesn't modify the receiver? i think just pony.tail.trim :
<Nilium> It's all pointless because the pony's ugly and is better suited for feeding doggies
<RubyPanther> pony.tail.trim obviously returns a new trimmed tail, and leaves the original tain untrimmed. Pony magic is awesome, k?!
<n_blownapart> Nilium: throw me a bone.
<Nilium> The doggies are not ugly
<havenwood> RubyPanther: oh, good point
<noob101> I have an error in my code, can someone tell me what it is please. http://pastie.org/9207585
MrSamuel has quit [Ping timeout: 265 seconds]
sinkensabe has quit [Remote host closed the connection]
<noob101> It seems maybe at the while loop, I am not sure but when I run it in cmd, nothing works, just a blanking underscore
teddyp1cker has quit [Ping timeout: 245 seconds]
sinkensabe has joined #ruby
<RubyPanther> noob101: There is no error, it does exactly what you told it.
<havenwood> noob101: line 37
<benzrf> ponies!!!!
<noob101> Are you sure, I run it in cmd and there seems to be an error
<benzrf> RubyPanther: smart ass
<noob101> havenwood, HI! Long time no see, how's it going?!
<noob101> Thanks havenwood.
<havenwood> noob101: three day weekend \o/
<noob101> havenwood, I remember you cause you helped me a lot months ago.
<n_blownapart> back to ultimate reality : http://pastie.org/9207541
<RubyPanther> noob101: while cpu_cards < 17 # try putting a puts in there so print your value so you can check if you're looping infinitely
ferr has joined #ruby
<noob101> But like you individually help me understand the code, thank you. yey for three day weekend lol.
interactionjaxsn has joined #ruby
<noob101> RubyPanther: Ok thank you
MrSamuel has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
<RubyPanther> or use a debugger, but I prefer 70s-style retro bug hunting.
<noob101> RubyPanther: what value should I print?
<RubyPanther> noob101: The one you're testing in the while condition :)
<noob101> RubyPanther: Gotchya, thank you sir.
yfeldblum has joined #ruby
sinkensabe has quit [Ping timeout: 258 seconds]
<noob101> Ok it works but there is an issue.
<noob101> Why is there an inf loop in my code when I run it sometimes? http://pastie.org/9207585
toretore has quit [Quit: This computer has gone to sleep]
<noob101> I ran it like 8 times, I got an inf loop like 2 times
freerobby has quit [Quit: Leaving.]
<noob101> dont midn line 37 that was a comment I failed to delete
<noob101> mind*
interactionjaxsn has quit [Remote host closed the connection]
ltdl has joined #ruby
moneydouble has quit [Quit: Leaving.]
lunaticedit has quit []
<n_blownapart> RubyPanther may I pm you real quick?
top4o has quit [Ping timeout: 276 seconds]
<RubyPanther> oh [Deity] please no\
<n_blownapart> ok leave me to rot
yfeldblu_ has joined #ruby
<n_blownapart> :)
<RubyPanther> you can rot in the channel just fine :)
<n_blownapart> thats for sure
revoohc has joined #ruby
<pontiki> must not be his type
<noob101> quick question, what other chat lobby is based on the language ruby?
<noob101> does anyone have any suggestions please?
<Hanmac1> noob101: there is also #ruby-lang and #ruby-dev and some others too
<centrx> noob101, Use functions, it makes it easier for everyone to understand what the code is doing, and to identify bugs
<noob101> centrx functions are methods right?
<centrx> noob101, Yes
<RubyPanther> I only like PMs that are full of ASCII pr0n and ponies, weapons and code get checked in at the door.
yfeldblum has quit [Ping timeout: 252 seconds]
<shevy> noob101 in ruby yes, but the important part to remember is not the distinction between functions and methods, but what centrx said: you must use them! use them today!
<n_blownapart> RubyPanther: once I told someone to cut off their ponytail and have a funeral. it didn't go over very well.
imaleaf has quit [Ping timeout: 252 seconds]
<pontiki> odn't forget the kittens
<shevy> chopping off a ponytail is quite mean
<pontiki> have to have kittens
<shevy> chopping off kittens is definitely evil
<noob101> shevy, I like to just write the code as it goes. :(
<shevy> noob101 ok then start *thinking* in methods
<pontiki> why would you do that, shevy??
<shevy> pontiki for blood sacrifices
jhass is now known as jhass|off
<pontiki> shevy makes me cry :'''(
MrSamuel has quit [Ping timeout: 252 seconds]
<n_blownapart> noob101: here's a similar program : http://pastie.org/4751506
<RubyPanther> I don't want PMs full of kittens, I already have internet, and it is made of kittens.
platzhirsch has joined #ruby
platzhirsch has quit [Quit: Leaving.]
platzhirsch has joined #ruby
<shevy> I would PM with a kitten
MatthewsFace has joined #ruby
<RubyPanther> Last time I PM'd a kitten it cost me a weekend and a train ticket. I prefer the married life.
imaleaf has joined #ruby
<n_blownapart> so no interest in the largest factor of 600_851_475_143 I take it ..
<shevy> numbers are boring, use kittens instead
<n_blownapart> use of kittens is abuse shevy
duncannz has joined #ruby
<shevy> it's like they became a protected netizen group
<n_blownapart> shevy: well I know what a neti pot is ..
MrSamuel has joined #ruby
<RubyPanther> n_blownapart: instead of having somebody walk you through it line by line, you walk us through it and ask questions
platzhirsch has quit [Ping timeout: 240 seconds]
<RubyPanther> by "us" I mean "them" because I have to go in a couple minutes :)
Olipro has quit [Ping timeout: 246 seconds]
andrewjanssen has quit [Quit: Leaving...]
<n_blownapart> I would be honored seriously RubyPanther
<n_blownapart> oh
digitalcake has quit [Quit: Leaving.]
<RubyPanther> but if you do all the work of walking through each line, They will likely help you more than if you ask Them to get their slippers dirty doing the steps
Shell has left #ruby ["Leaving"]
<n_blownapart> http://pastie.org/9207541 two is the lowest prime number .. it is squared : sqi = 4
tjsousa______ has joined #ruby
platzhirsch has joined #ruby
<n_blownapart> while n is greater than or equal to 4, run the nested loop...
enebo has quit [Quit: enebo]
<RubyPanther> n_blownapart: Also, make sure to be aware of the canonical http://slash7.com/2006/12/22/vampires/
<noob101> n_blownapart: I appreciate your help but it would be even more effective if you explained each line of code you did. Would you be kind and put comments next to each line you developed please?
chrisseaton has quit []
<noob101> If you don't want to it's fine, I am asking.
<n_blownapart> hold on noob101 that is a program from david black's book . it's fairly easy.
<n_blownapart> RubyPanther: ok never mind I didn't realize that is what you meant.
<platzhirsch> How is it going
<RubyPanther> n_blownapart: I meant everything I said literally, minus ponies and kittens.
<shevy> platzhirsch are you in london?
<platzhirsch> Hey shevy, yeah since 6th May
<shevy> platzhirsch will you return to europe one day?
<shevy> we noticed a downtime
<platzhirsch> maybe after the UK votes to leave the EU I have to leave anyway
<shevy> wallerdev had to substitute for you
<shevy> let me keep you updated:
MrSamuel has quit [Ping timeout: 252 seconds]
<shevy> he was suggesting for his father to learn php
<shevy> <shevy> wallerdev why do you hate your dad so much
<shevy> <wallerdev> haha if i hated my dad id ask him to learn rails just to make a one page site with a couple images on it
chrisseaton has joined #ruby
<platzhirsch> haha
<platzhirsch> nice
lukec has joined #ruby
Olipro has joined #ruby
<shevy> oh this one was nice too:
<shevy> <benzrf> shevy: sadly i appear to be completely incapable of growing facial hairyhenderson
<shevy> I have you registered in february
<shevy> <platzhirsch> I entered it and now gem installs the whole internet
Hobogrammer has joined #ruby
<platzhirsch> ^^ geez
<platzhirsch> so far I am enjoying myself very much, pure software development, startup life in creative East London, loads of hipsters running around... Though without writing Ruby code I tend to hang out more often in #android-dev
MatthewsFace has quit [Quit: This computer has gone to sleep]
MrSamuel has joined #ruby
<shevy> damn
<shevy> they already started to change you
Megtastique has joined #ruby
ferr has quit [Remote host closed the connection]
kyb3r_ has quit [Ping timeout: 276 seconds]
mikemac has joined #ruby
<benzrf> platzhirsch: i am a huge hipster, maybe i will come over
dingus_khan has joined #ruby
<benzrf> but then again, you use some kind of weird foreign currency
<benzrf> instead of good ol murican dollars
<shevy> papermoney
ltdl has quit [Ping timeout: 252 seconds]
Olipro has quit [Ping timeout: 246 seconds]
kyb3r_ has joined #ruby
<platzhirsch> yeah GBP is so fucked up
<platzhirsch> the food prices are bloody mental
<noob101> Can someone tell me the other ruby channels again please, I want to seek help.
motto has quit [Quit: Sto andando via]
takemikazuchi545 has quit [Ping timeout: 252 seconds]
<n_blownapart> #ruby-lang
bluenemo_ has joined #ruby
<shevy> noob101 #ruby-lang
<noob101> thanks shevy
takemikazuchi545 has joined #ruby
<platzhirsch> haha, why. Doesn't she/he get help here?
s3ri0us has joined #ruby
predator117 has quit [Ping timeout: 276 seconds]
<centrx> This channel is flying off the hook with insane activity
<centrx> #ruby-lang is definitely quieter a lot of the time
<RubyPanther> noob101: You should really try a "real" IRC client, then you can find channel lists in a menu, and filter them based on a keyword like "ruby"
dkendal has joined #ruby
<noob101> RubyPanther: I don't know to much about IRC except how to sign in.
bluenemo has quit [Ping timeout: 240 seconds]
digitalcake has joined #ruby
sputnik13 has joined #ruby
Devanon has joined #ruby
<noob101> RubyPanther: Don't know too much of the functionality except for some commands, I am luck to know.
<RubyPanther> noob101: You know to come here to ask questions, so presumably it is worth learning about "IRC clients"
<noob101> RubyPanther: Ahhhhhhhh ok.
dkendal has left #ruby [#ruby]
predator117 has joined #ruby
<noob101> RubyPanther: I hate changes but ok. :(
<havenwood> noob101: instead of lines following `# Loop of each suit` do: card_suits.zip card_values
dayepa has joined #ruby
<havenwood> noob101: instead of `deck[rand(0..51)]` do `deck.sample`
sputnik13 has quit [Client Quit]
timonv has joined #ruby
Es0teric has joined #ruby
<noob101> havenwood: What does deck.sample do may I ask?
atraylen has quit [Ping timeout: 240 seconds]
<havenwood> noob101: "Choose a random element or n random elements from the array.": http://www.ruby-doc.org/core-2.1.2/Array.html#method-i-sample
<noob101> havenwood: I don't get what you said at 19:30 "instead of lines following...", please elaborate
<noob101> havenwood: Ahhhhh ok, thank you.
<havenwood> noob101: use gist.github.com and i'll link to line numbers
<noob101> havenwood: I will use that in my program, now we are getting somewhere havenwood this is why I like you!
<havenwood> noob101: lines 4-9
dingus_khan has quit [Remote host closed the connection]
<noob101> Wait but havenwood, If I use .sample, will I be able to index in an element if I use .sample?
revoohc has quit [Quit: revoohc]
<noob101> For example. deck.sample[1] <-- Valid code or not?
<havenwood> you're re-implementing Array#zip, so instead just use #zip: card_suits.zip(card_values)
dingus_khan has joined #ruby
<havenwood> noob101: yeah, that's fine - try it in Pry
<noob101> What's Pry? sorry for asking havenwood
<havenwood> noob101: gem install pry pry-doc
<havenwood> noob101: then instead of typing `irb` for a repl type `pry`
n_blownapart has quit []
<noob101> Um, I need a lesson on this now, Please enlighten me.
<noob101> See there are somethings I don't know right now such as `pry`, `repl`.
axilla_ has joined #ruby
<havenwood> google em
timonv has quit [Ping timeout: 258 seconds]
mattstratton has joined #ruby
yfeldblu_ has quit [Remote host closed the connection]
benzrf is now known as benzrf|offline
zzzbra has joined #ruby
MrSamuel has quit [Ping timeout: 265 seconds]
yfeldblum has joined #ruby
try has quit [Quit: derpity derp]
<havenwood> REPL is just a general programming acronym, not ruby specific
Hytosys has joined #ruby
<noob101> havenwood: Can you at least explain the downloading pry thing, someone told me this before but someone else said it would be too much for me. What is so special about pry?
<shevy> yes havenwood
<shevy> now that you suggested it
<shevy> explain in full detail ;)
<havenwood> shevy: hehe
<noob101> No explain, I love explanations (.")_(.")
<shevy> noob101 the point is that you use an environment where you can evaluate the ruby code you write instantly
<noob101> shevy, right right. Is it easy or complicated?
chabill has quit [Quit: WeeChat 1.0-dev]
<shevy> for you?
<shevy> VERY COMPLICATED
<shevy> for others
<shevy> a breeze
<shevy> do you use irb noob101
MatthewsFace has joined #ruby
<noob101> yes I do shevy very often.
<shevy> good
<noob101> I have it open right now! :)
<shevy> now ask havenwood why he wants you to use pry
<noob101> so Pry is something I won't regret right?
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
<havenwood> colors and indentation, the humanity...
<havenwood> noob101: installing it is easy: gem install pry
<havenwood> noob101: using it is easy: pry
<pontiki> repl: Read-Evaluate-Print Loop
<havenwood> noob101: try it..
axilla_ has quit [Ping timeout: 276 seconds]
bakflash has quit [Ping timeout: 252 seconds]
<pontiki> read in an expression, evaluated it, print the results, do it again and again
MrSamuel has joined #ruby
<havenwood> noob101: if you regret it: gem uninstall pry pry-doc
MatthewsFace has quit [Client Quit]
dangerousdave has quit [Ping timeout: 252 seconds]
<noob101> so repl is like something I type or it's an acronym pontiki
<noob101> I will install right now :(
<havenwood> noob101: many langs have repls, i think they're swell
<noob101> Quick question what happens if I accidently put in the uninstall command first instead of the install first
b1205 has joined #ruby
<noob101> Will that mess up ruby or something? I stopped it though after one second
<havenwood> noob101: try it
<centrx> it's fine
<havenwood> noob101: no, it won't harm a thing
<noob101> I already did but I am asking
<havenwood> ha
<noob101> ok thank you
yfeldblu_ has joined #ruby
Nexus_x1 has quit [Quit: Computer has gone to sleep.]
<centrx> noob101, basically "not installed, doing nothing"
<noob101> oh wow ok.
Nexus_x1 has joined #ruby
<noob101> I have a question. Is there a website where I can show my screen to you guys so you can see?
<noob101> I know twitch.tv I will have to download some other bs but I don't want to do that
frobrob has joined #ruby
<havenwood> noob101: http://showterm.io/
<noob101> ty
yoshiki__ has joined #ruby
dingus_khan has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 252 seconds]
Shidash has quit [Ping timeout: 245 seconds]
takemikazuchi545 has quit [Ping timeout: 258 seconds]
benzrf|offline is now known as benzrf
<noob101> havenwood: so if I install then how would you see me live cause I just want to show you live my whole screen and not record a clip then send.
Nexus_x1 has quit [Ping timeout: 264 seconds]
lw has joined #ruby
toastynerd has quit [Remote host closed the connection]
b1205 has quit [Ping timeout: 265 seconds]
Nexus_x1 has joined #ruby
agrinb has joined #ruby
chrisseaton has quit []
yoshiki__ has quit [Ping timeout: 240 seconds]
<havenwood> noob101: you'd have to open a pull request adding live streaming :P
Nexus_x1 has quit [Client Quit]
try has joined #ruby
pen has quit []
iamcalledrob has joined #ruby
heftig has quit [Quit: Quitting]
frobrob has quit [Ping timeout: 252 seconds]
<noob101> havenwood: Don't know what pull request is but I'll "google it" but anyway look, it no work. http://oi60.tinypic.com/2nbi05z.jpg
<havenwood> noob101: oh, windows