apeiros changed the topic of #ruby to: Ruby 2.1.4; 2.0.0-p594; 1.9.3-p550: 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
luminor has joined #ruby
seitensei has quit [Ping timeout: 265 seconds]
BombStrike has joined #ruby
xwq17 has quit [Ping timeout: 265 seconds]
kies has quit [Ping timeout: 265 seconds]
Alives has joined #ruby
xwq17 has joined #ruby
sdfs has joined #ruby
Fraeon has joined #ruby
cephalostrum has joined #ruby
ramfjord has quit [Ping timeout: 265 seconds]
terrellt has quit [Ping timeout: 265 seconds]
DLSteve has quit [Ping timeout: 265 seconds]
cicloid has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 272 seconds]
Y_Ichiro has quit [Quit: No Ping reply in 180 seconds.]
jimbach has joined #ruby
hostess has quit [Quit: No Ping reply in 180 seconds.]
kies has joined #ruby
hostess has joined #ruby
<sdfs> hello
<havenwood> sdfs: hi
papercode has joined #ruby
Y_Ichiro has joined #ruby
Y_Ichiro has joined #ruby
Y_Ichiro has quit [Changing host]
ehlovader has joined #ruby
luminor has quit [Client Quit]
uber has joined #ruby
cicloid has joined #ruby
uber has joined #ruby
chrishough has joined #ruby
<sdfs> what you do?
<havenwood> brunch
<sdfs> is it always dead like this here?
<havenwood> sdfs: is this dead?
<rkazak> peaks and troughs....
<MattB2> weekends are always quiet
<sdfs> i see hundreds of people but only a few are talking
<jhass> it's called "IRC"
<rkazak> ask a question and…
<sdfs> ok
<havenwood> sdfs: that's typical for channels
benzrf|offline is now known as benzrf
<sdfs> im a noob, haha
jottr_ has quit [Ping timeout: 240 seconds]
<havenwood> sdfs: question!
<havenwood> sdfs: feed us questions!
mr_rogerz_ has joined #ruby
<rkazak> or teach us something!
<havenwood> teach! teach!
<sdfs> haha
<jhass> or just give us cookies
<havenwood> or key lime pie
<waxjar> is that new havenwood, #itself?
<havenwood> waxjar: ya
<sdfs> are you guys all doing ruby on rails projects?
<havenwood> sdfs: that's #rubyonrails
<havenwood> sdfs: we're off the rails
<sdfs> gosh, im in wrong channel
<sdfs> lol
<rkazak> this is pure, as pure…., ruby
<rkazak> all that framework stuff makes things to easy….
freerobby has quit [Quit: Leaving.]
<sdfs> ok, what is ruby use for?
<MattB2> Rails
<waxjar> everything you want it to
terrellt has joined #ruby
<MattB2> LOL!
<havenwood> sdfs: general purpose programming
<jhass> sdfs: what is a programming language used for?
<havenwood> ^ those things
tkuchiki has joined #ruby
<sdfs> compare to C++?
<sdfs> are there any difference
<rkazak> it’s one way to expresss some thoughts within a pre-defined syntax…
luminor has joined #ruby
<sdfs> so are you saying whatever c++ can do, ruby can too?
Areessell has joined #ruby
<jhass> yes. Does it make always sense to do it? no
<rkazak> yes - and more…
<wasamasa> sdfs: ever heard of this turing bloke?
<rkazak> who would be turning in his....
<sdfs> ok sounds great
<MattB2> Not completely
<sdfs> thought ruby is a scripting language
mr_rogerz_ has quit [Ping timeout: 272 seconds]
<jhass> define scripting language
godd2 has joined #ruby
<MattB2> (faceplam(
<sdfs> can't be compiled
<rkazak> there is jruby too…
<havenwood> can be
<sdfs> not traditionally
<wasamasa> sdfs: well, writing a kernel module with ruby will be rather hard
<havenwood> just in time
fschuindt has quit [Quit: WeeChat 0.4.3]
<jhass> also the term you're seeking is interpreted
<sdfs> right hass
<wasamasa> every language is interpreted by the cpu it runs on
<havenwood> sdfs: mruby is ruby too
<rkazak> script does not require compiling and provides instant feedback...
<wasamasa> you silleh guise
<Xeago_> mruby compiles into bytecode for exabmple
livingstn has joined #ruby
<havenwood> sdfs: ^
livingstn has quit [Excess Flood]
<wasamasa> sdfs: point is, there are languages that are more suitable for certain tasks
<godd2> ocra gem will create stand-alone windows executables
<wasamasa> sdfs: ruby can be used for lots of stuff, but using it for everything might be a bad idea
<sdfs> yup, exactly what i meant wasa
<wasamasa> sdfs: this applies to pretty much any language btw
<jhass> godd2: what it does can hardly be called compiling though
<godd2> jhass that's true. It bundles up the ruby interpreter with it I blieve
<sdfs> what is it most useful for?
<Xeago_> let's use C- to write the next generation of web servers!
livingstn has joined #ruby
<wasamasa> sdfs: writing quick and dirty scripts
nonks has joined #ruby
VanillaGoat__ has joined #ruby
<jhass> s/and dirty/
<sdfs> can you elaborate with details and examples?
BadQuanta has joined #ruby
<godd2> sdfs: rails
<jhass> sdfs: rubygems.org
<Xeago_> sdfs: puppet…
<Xeago_> chef
<rkazak> rails.
mib_mib has quit [Ping timeout: 260 seconds]
<havenwood> sdfs: telephony, aerospace, supercomputing, web apps, whatever
<rkazak> there are many examples only a google away....
<Xeago_> home automation :>
<wasamasa> sdfs: well, if I ever think to myself "Hum, it would be nice if I could automate this menial task", I can hack something together with ruby rather quickly
<existensil> shell scripting, API integration, the "glue" that holds an enterprise together
<sdfs> gotcha
<wasamasa> "glue" is the word I was looking for
Cache_Money has quit [Quit: Cache_Money]
<existensil> you shouldn't use ruby everywhere, but it is still a fantastic tool and arguably the best tool for certain tasks
<havenwood> cookies are a sometimes food
<godd2> sdfs I think the only thing that cant be written in Ruby is Ruby
<jhass> I hope to use crystal in those other places in the future :P
<sdfs> lol
<existensil> you shouldn't try and use ruby for heavy lifting if you can avoid it... your database should do the heavy lifting and so should your web server... but gluing them together is a perfect job for ruby
<havenwood> but cookies!
<jhass> godd2: you can write ruby in ruby
<existensil> godd2: that's absolutely not true: rubinius
<waxjar> godd2: rubinius is mostly written in ruby :p
<existensil> its a quite popular version of ruby
<godd2> jhass how would you make Class be an instance of itself?
<waxjar> it already is
<existensil> >> Class.class
<eval-in__> existensil => Class (https://eval.in/219093)
<headius> it's very difficult to represent high perf, low-level stuff in Ruby
<godd2> waxjar because Ruby is written in C
<headius> Rubinius has a long way to go in terms of performance
<existensil> godd2: MRI is written in C
<existensil> ruby is just a language
VanillaGoat_ has quit [Ping timeout: 255 seconds]
<existensil> it is implemented in C, Java, and even Ruby itself
<waxjar> you could write a ruby interpreter in ruby if you wanted
Davey has quit [Changing host]
Davey has joined #ruby
<Xeago_> waxjar: that also exists…
ramfjord_ has quit [Ping timeout: 264 seconds]
<waxjar> probably :p
sar_s has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
Cache_Money has joined #ruby
freerobby has joined #ruby
<havenwood> sdfs: it's not currently at all a systems programming language
atmosx has quit [Remote host closed the connection]
<existensil> also implemented in Objective-C (RubyMotion is Obj-C underneath, right?) and .NET (IronRuby)
<existensil> and probably a few others
codecop has quit [Remote host closed the connection]
<waxjar> there's one that uses python
<havenwood> sdfs: but it's very expressive
<waxjar> topiz i believe
takle has joined #ruby
<waxjar> *topaz
<existensil> javascript: opal
<havenwood> rpython
<jhass> we should write ruby in crystal
<existensil> for the lulz?
<existensil> :-P
<havenwood> jhass: :)
_subopt has joined #ruby
luminor has quit []
<havenwood> jhass: write crystal in ruby, write crystal in crystal, write ruby in crystal
<jhass> \o/
sdfs has quit [Quit: Page closed]
<jhass> I actually think that could lead to a faster implementation in the long term
<Xeago_> there's ruby in python running python in ruby…
<existensil> sdfs: ruby is often the best tool when the resource you are most constrained by is programmer moral or time
<Xeago_> there's ruby in python running python in ruby running on java (for speed)
<apeiros> existensil: or sanity
<existensil> it makes programmers generally happy. at least this one.
<Xeago_> it gets slow pretty quickly
kirun has quit [Quit: Client exiting]
<havenwood> headius: looking forward to JRuby 9000 talk at RubyConf! :)
Xeago has joined #ruby
<headius> me too!
<existensil> is headius giving one? I'm going. First ruby conf for me. First developer conf, really.
<headius> we just merged MRI trunk stdlib and tests to master...closing in on a preview release
<havenwood> awesome
<headius> $ jruby -v
<headius> jruby 9.0.0.0.dev-SNAPSHOT (2.2.0p0) 2014-11-08 f093698 Java HotSpot(TM) 64-Bit Server VM 24.65-b04 on 1.7.0_67-b01 [darwin-x86_64]
<headius> yeehaw
poweratom_ has quit [Quit: Be back later ...]
sailias has quit [Quit: Leaving.]
tkuchiki has quit [Remote host closed the connection]
luk3thomas has joined #ruby
<havenwood> existensil: Yeah, the schedule is up!: http://rubyconf.org/schedule
<existensil> wow, so much stuff
spyderman4g63 has joined #ruby
tkuchiki has joined #ruby
banister is now known as banisterfiend
hmsimha has quit [Ping timeout: 255 seconds]
Xeago_ has quit [Ping timeout: 264 seconds]
<existensil> Tuesday has a Fringe Ruby track. Love it.
<havenwood> they did a really good job labeling the tracks!
renderful has joined #ruby
<havenwood> i haven't had a chance to look at the schedule in detail
<havenwood> existensil: you chose a great conf
<existensil> :-)
ringarin has joined #ruby
<existensil> I thought my coworkers were going to come and the company would pay, but it fell through and I decided to go on my own.
<sar_s> dorei: you still there ?
<havenwood> existensil: good choice, that's what I do
<havenwood> existensil: i've found it to be totally worth it, i really look forward to it
<havenwood> existensil: great community
Hijiri has quit [Ping timeout: 272 seconds]
<sar_s> I still have the proble with the int to hex value. For example I want to convert 4 to "\x04". If I use "\\x#{i.to_s(16)}" y get "\\x04"
<sar_s> with the doble slash
tkuchiki has quit [Ping timeout: 255 seconds]
spyderman4g63 has quit [Ping timeout: 244 seconds]
<sar_s> and that doesn't work for what I need
klaut has joined #ruby
<existensil> Looking forward to meeting some people I've only conversed with online.
<existensil> I worked with a friend who is going for almost 2 years and never met him. Heh. Remote work.
joast has quit [Ping timeout: 245 seconds]
majjoha has joined #ruby
<havenwood> existensil: If you see me say hi! My name's Shannon Skipper.
renderful has quit [Ping timeout: 265 seconds]
wasabi12sa343523 has joined #ruby
<existensil> Cool. I will. -- Carl Zulauf
wasabi12sa343523 has left #ruby [#ruby]
freerobby has quit [Quit: Leaving.]
supersym has quit [Ping timeout: 245 seconds]
<jhass> sar_s: look at Array#pack
luminor has joined #ruby
<sar_s> jhass: yes I'm on it right now :) here http://www.ruby-doc.org/core-2.1.4/Array.html#method-i-pack
roger_rabbit has quit [Ping timeout: 244 seconds]
<sar_s> trying differente values
duncannz has joined #ruby
chipotle has joined #ruby
zeusmns has quit [Ping timeout: 244 seconds]
<gr33n7007h> sar_s, [4].pack('C') #=> "\x04"
Areessell has quit [Quit: (null)]
<sar_s> oh gr33n7007h thank you guy :)
<gr33n7007h> oops
zenojis has quit [Ping timeout: 244 seconds]
majjoha has quit [Ping timeout: 264 seconds]
bluenemo has quit [Quit: Verlassend]
<pontiki> wish i could get to rubyconf
zeusmns has joined #ruby
roger_rabbit has joined #ruby
freerobby has joined #ruby
marcdel has quit []
<havenwood> pontiki: do next year!
<pontiki> i hope so
<havenwood> would be nice to see people from here there
<pontiki> where is next year's conf?
<havenwood> not announces
<havenwood> announced*
<pontiki> i'd so *love* to go to melbourne
<pontiki> but that's not happening
<havenwood> i've never been, but i think in the states
<pontiki> rubyconf.au '15 is in melb
<havenwood> ahh
<havenwood> cool
luk3thomas has quit [Quit: luk3thomas]
<havenwood> i've never been to the continent at all
<pontiki> i miss melb
patrick99e99 has joined #ruby
<pontiki> so much good times
<pontiki> so many people
maestrojed has quit [Ping timeout: 264 seconds]
<pontiki> railsconf'15 is in hotlanta
<pontiki> not going there :P
lele has quit [Ping timeout: 260 seconds]
zenojis has joined #ruby
<havenwood> i've never been to a RailsConf
<pontiki> fair bit of overlap, but rubyconf is much much more diverse in subject matter, of course
<havenwood> wish i could go to more confs, need to make that happen
<pontiki> i know, right??
<pontiki> i used to have to attend conferences for HP and stuff. so freaking boring
<existensil> that sentence made me feel bored
<pontiki> also Software Engineering Institute confs, and other DoD crap because of that
<pontiki> it should
nkumari has joined #ruby
<pontiki> the boredom is contagious
Joufflu has joined #ruby
nkumari has quit [Remote host closed the connection]
<existensil> Only conferences I've been to are atheist/skeptic ones. They are a blast.
patrick99e99 has quit [Ping timeout: 272 seconds]
nkumari has joined #ruby
<Nilium> That sounds exceedingly boring
<banisterfiend> existensil this is u: http://i.imgur.com/nxcKA9B.jpg
zenojis has quit [Ping timeout: 244 seconds]
<benzrf> banisterfiend: ayy lmao
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<banisterfiend> do you like my me-me
<pontiki> any conference you *have* to attend because of work i think automatically makes it boring
<pontiki> though that's probably just me
<pontiki> also, maybe i'm just not the typical conference type
<pontiki> those DoD suiters were a different breed
<benzrf> banisterfiend: i <3 maymays
<pontiki> feh, i don't want to think about that
lele has joined #ruby
zenojis has joined #ruby
AlSquirrel has quit [Quit: This computer has gone to sleep]
keelerm has joined #ruby
nkumari has quit [Remote host closed the connection]
devdazed has quit [Quit: Computer has gone to sleep.]
Dude007 has quit [Remote host closed the connection]
krz has joined #ruby
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Dude007 has joined #ruby
rshetty has joined #ruby
_ixti_ has quit [Ping timeout: 255 seconds]
rshetty has quit [Remote host closed the connection]
mary5030 has joined #ruby
maestrojed has joined #ruby
AlSquirrel has joined #ruby
luk3thomas has joined #ruby
zenojis has quit [Ping timeout: 272 seconds]
nkumari has joined #ruby
AlSquirrel has quit [Remote host closed the connection]
cashnguns has joined #ruby
<Xeago> banisterfiend: where again do you hail from?
<banisterfiend> Xeago leiden
maestrojed has quit [Remote host closed the connection]
<Xeago> that's rather far off my route
rubie has joined #ruby
<Xeago> I happen to be in NL again
luminor has quit []
<Xeago> banisterfiend: do you by any chance play magic?
<banisterfiend> Xeago where are you based?
agjacome has quit [Ping timeout: 265 seconds]
<banisterfiend> Xeago no.. :)
<Xeago> Around Heerlen
mib_mib has joined #ruby
<Xeago> which is in the direction of Maastricht, or even moreso Aachen
nkumari has quit [Remote host closed the connection]
<rubie> hi all: if anyone is up for it i'd love some feedback on a really basic hangman program i wrote https://gist.github.com/gabrie30/5fdcae179fdea485d1ba
zenojis has joined #ruby
chrishough has joined #ruby
AlSquirrel has joined #ruby
<havenwood> rubie: look at Array#sample
<rubie> ok, thanks
<havenwood> rubie: you can ask a string its #size directly, no need to split to chars then size
nateberkopec has joined #ruby
<havenwood> rubie: don't explicitly `return` unless you're returning early
chrishough has quit [Client Quit]
<pontiki> heh. coding standards for the client i'm working with requires return when you're explicitly returning something, *even* when it's the last thing evaluated
<havenwood> pontiki: yuck
crazydiamond has quit [Ping timeout: 245 seconds]
<rubie> thanks havenwood
<havenwood> pontiki: but yeah, when in Rome...
<pontiki> well, it's their code, their rules
<havenwood> indeed
<pontiki> i'm just a hired gun on this job
<pontiki> which i do not like so much
<rubie> im trying to figure out how i can make it so when someone guesses the correct letter - i will show them their letter in the correct order of the wod
<pontiki> so i keep pushing myself to take no ownership of things
<pontiki> tho yesterday's sprint retro i was a bit strident
<rubie> so instead of them seeing (Correct letters = oilns) they would see (Correct Letters = L ins
BadQuanta has quit [Quit: Leaving.]
BadQuanta has joined #ruby
elemenopy has quit []
zenojis has quit [Ping timeout: 244 seconds]
duncannz has quit [Remote host closed the connection]
spastorino has quit [Quit: Connection closed for inactivity]
User4587_ has quit [Ping timeout: 264 seconds]
duncannz has joined #ruby
<existensil> rubie: ...
<existensil> >> guessed_letters = "fralstpmn"; "Flavorful".gsub(/[^#{guessed_letters}]/i, " ")
<eval-in__> existensil => "Fla rf l" (https://eval.in/219094)
AlSquirrel has quit [Quit: This computer has gone to sleep]
zenojis has joined #ruby
Scotteh_ has joined #ruby
Hijiri has joined #ruby
krz has quit [Ping timeout: 250 seconds]
Scotteh has quit [Ping timeout: 265 seconds]
jimms has joined #ruby
yfeldblum has joined #ruby
S0da has joined #ruby
robustus|Off has quit [Ping timeout: 250 seconds]
luminor has joined #ruby
AlSquirrel has joined #ruby
Mon_Ouie has quit [Remote host closed the connection]
AlSquirrel has quit [Remote host closed the connection]
robustus|Off has joined #ruby
robustus|Off is now known as robustus
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
havenwood has quit [Remote host closed the connection]
luk3thomas has quit [Quit: luk3thomas]
luk3thomas has joined #ruby
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
Wolland_ has quit [Ping timeout: 245 seconds]
bradland has joined #ruby
rubie has quit [Ping timeout: 246 seconds]
dkb20k has joined #ruby
bradland has quit [Client Quit]
nonnatus has quit [Quit: Leaving]
marcdel_ has joined #ruby
majjoha has joined #ruby
alienaut has quit [Remote host closed the connection]
duncannz has quit [Quit: Leaving]
dkb20k has quit [Ping timeout: 272 seconds]
jamto11 has joined #ruby
byprdct has quit [Ping timeout: 240 seconds]
marr has quit []
majjoha has quit [Ping timeout: 250 seconds]
s2013 has joined #ruby
anaeem1_ has quit [Ping timeout: 265 seconds]
duncannz has joined #ruby
byprdct has joined #ruby
chrishough has joined #ruby
zenojis has quit [Ping timeout: 272 seconds]
freerobby has quit [Quit: Leaving.]
Snowstormer has joined #ruby
Snowstormer is now known as Guest9182
Jake232 has quit [Ping timeout: 265 seconds]
klaut has quit [Remote host closed the connection]
KALEGEK has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Gadgetoid has quit [Ping timeout: 245 seconds]
zenojis has joined #ruby
takle has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
takle has joined #ruby
ctp has quit [Quit: Connection reset by peer... Isn't he that short little Mexican with the wire cutters heading your way?]
ringarin has quit [Ping timeout: 255 seconds]
Synthbread has joined #ruby
Xeago has quit [Remote host closed the connection]
Gadgetoid has joined #ruby
freerobby has joined #ruby
cantonic has quit [Quit: cantonic]
cantonic has joined #ruby
cantonic has quit [Client Quit]
jamto11 has quit [Remote host closed the connection]
KC9YDN has joined #ruby
takle has quit [Ping timeout: 260 seconds]
ptrrr has joined #ruby
sevvie has joined #ruby
s2013 has quit [Ping timeout: 258 seconds]
arup_r has joined #ruby
johnzorn has quit [Ping timeout: 264 seconds]
duncannz has quit [Remote host closed the connection]
ptrrr has quit [Ping timeout: 250 seconds]
duncannz has joined #ruby
IrishGringo has joined #ruby
nonks has joined #ruby
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kireevco has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
hightower4 has quit [Ping timeout: 265 seconds]
sevvie has quit [Quit: leaving]
arup_r has quit [Ping timeout: 240 seconds]
sevvie has joined #ruby
s2013 has joined #ruby
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
drawingthesun has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
eka has joined #ruby
apeiros has joined #ruby
Scotteh has joined #ruby
arup_r has joined #ruby
poweratom_ has joined #ruby
Scotteh_ has quit [Ping timeout: 255 seconds]
spyderman4g63 has joined #ruby
theotherstupidgu has quit [Ping timeout: 265 seconds]
theotherstupidgu has joined #ruby
duncannz has quit [Ping timeout: 255 seconds]
duncannz has joined #ruby
chipotle has quit [Ping timeout: 244 seconds]
spyderman4g63 has quit [Ping timeout: 256 seconds]
cashnguns has quit [Ping timeout: 272 seconds]
mib_mib has quit [Ping timeout: 265 seconds]
jonr22 has joined #ruby
sjohnsen has quit [Ping timeout: 260 seconds]
nonks has joined #ruby
adriancb has joined #ruby
fgo has joined #ruby
duncannz has quit [Ping timeout: 244 seconds]
duncannz has joined #ruby
chipotle has joined #ruby
adriancb has quit [Ping timeout: 240 seconds]
duncannz has quit [Remote host closed the connection]
duncannz has joined #ruby
chihhsin has quit [Ping timeout: 258 seconds]
lemur_ has quit [Remote host closed the connection]
mib_mib has joined #ruby
lemur has joined #ruby
weemsledeux has joined #ruby
weemsledeux has joined #ruby
majjoha has joined #ruby
duncannz has quit [Ping timeout: 244 seconds]
rshetty has joined #ruby
sjohnsen has joined #ruby
weemsledeux has quit [Client Quit]
jimms has quit []
weemsledeux has joined #ruby
lemur has quit [Ping timeout: 265 seconds]
majjoha has quit [Ping timeout: 264 seconds]
mikepack has joined #ruby
yfeldblum has joined #ruby
optiz0r has quit [Ping timeout: 245 seconds]
snovity has quit [Ping timeout: 245 seconds]
JBreit has joined #ruby
chihhsin has joined #ruby
optiz0r has joined #ruby
mikepack has quit [Ping timeout: 255 seconds]
JBreit has left #ruby [#ruby]
fgo has quit [Ping timeout: 244 seconds]
Lucky__ has joined #ruby
freerobby has quit [Quit: Leaving.]
michael_mbp has quit [Excess Flood]
takle has joined #ruby
michael_mbp has joined #ruby
jamto11 has joined #ruby
michael_mbp has quit [Excess Flood]
sevvie has quit [Quit: leaving]
michael_mbp has joined #ruby
duncannz has joined #ruby
cashnguns has joined #ruby
rshetty has quit [Remote host closed the connection]
takle has quit [Ping timeout: 272 seconds]
chipotle has quit [Quit: cya]
duncannz has quit [Ping timeout: 256 seconds]
duncannz has joined #ruby
tyll_ has joined #ruby
jimbach has quit [Remote host closed the connection]
tyll has quit [Ping timeout: 258 seconds]
nateberkopec has joined #ruby
nateberkopec has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
_lexjm has joined #ruby
zcreative has joined #ruby
rkazak has quit [Quit: Sleep.....ing....]
<MattB2> pontiki: re explicit return - I'm working on a complex project that requires it, and I've begun to appreciate it.
DivineEn1ity has quit [Ping timeout: 264 seconds]
magical_mystery is now known as magic
<benzrf> >> guessed_letters = "fralstpmn"; "Flavorful".tr(guessed_letters, " ")
<eval-in__> benzrf => "F vo u " (https://eval.in/219097)
<benzrf> oh waiit
iwishiwerearobot has quit [Ping timeout: 260 seconds]
DivineEntity has joined #ruby
magic is now known as magical_mystery
nonks has quit [Ping timeout: 250 seconds]
parabolize has joined #ruby
wjimenez5271 has joined #ruby
dkb20k has joined #ruby
mib_mib has quit [Ping timeout: 272 seconds]
j_mcnally has joined #ruby
jimbach has joined #ruby
arescorpio has quit [Excess Flood]
chipotle has joined #ruby
gsd has joined #ruby
aspires has joined #ruby
s2013 has quit [Remote host closed the connection]
IrishGringo has quit [Ping timeout: 260 seconds]
hightower4 has joined #ruby
KC9YDN has quit [Quit: ☭ Karl Marx & Friedrich Engels, Vladimir Lenin, Josef Stalin, Mao Tse-Tung, Kim Il Sung, Ho Chi Minh, Fidel Castro & Ernesto Guevara ☭]
jonr22 has quit [Remote host closed the connection]
Wolland has quit [Remote host closed the connection]
Wolland has joined #ruby
chipotle_ has joined #ruby
rkalfane has joined #ruby
MattB2 has quit []
jonr22 has joined #ruby
aspires has quit []
Wolland has quit [Ping timeout: 244 seconds]
chipotle has quit [Ping timeout: 255 seconds]
majjoha has joined #ruby
jimbach has quit [Remote host closed the connection]
majjoha has quit [Ping timeout: 245 seconds]
rshetty has joined #ruby
cashnguns has quit [Quit: I'm just an old fashioned cowboy]
chipotle has joined #ruby
kyoshero has quit [Quit: Leaving]
sevenseacat has joined #ruby
chipotle_ has quit [Ping timeout: 245 seconds]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
pen has joined #ruby
MrDoctor has quit [Remote host closed the connection]
MrDoctor has joined #ruby
rkazak has joined #ruby
boombadaroomba has joined #ruby
KC9YDN has joined #ruby
Lewix has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
ClarusCogitatio has quit [Ping timeout: 244 seconds]
spacemud has quit [Ping timeout: 260 seconds]
jonr22_ has quit [Ping timeout: 256 seconds]
radic has joined #ruby
it0a has quit [Ping timeout: 250 seconds]
boombadaroomba has quit [Ping timeout: 245 seconds]
drawingthesun has quit [Ping timeout: 255 seconds]
radic_ has quit [Ping timeout: 245 seconds]
Photism has quit [Quit: Leaving]
hamakn has joined #ruby
Jake232 has joined #ruby
n008f4g_ has quit [Ping timeout: 272 seconds]
jcdesimp has joined #ruby
spacemud has joined #ruby
byprdct has quit []
flyhigh_ has joined #ruby
braincrash has quit [Quit: bye bye]
spyderman4g63 has joined #ruby
cerberblue has quit [Ping timeout: 250 seconds]
duncannz has quit [Ping timeout: 245 seconds]
braincrash has joined #ruby
jonr2219 has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spyderman4g63 has quit [Ping timeout: 255 seconds]
graydot has joined #ruby
red_horned_rihno has joined #ruby
jonr22 has quit [Remote host closed the connection]
rkazak has quit [Quit: Sleep.....ing....]
_lexjm has quit [Quit: zzz...]
zcreative has quit [Quit: (null)]
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
red_horned_rihno has quit [Ping timeout: 265 seconds]
red_horned_rihno has joined #ruby
duncannz has joined #ruby
graydot has quit [Quit: graydot]
Spami has joined #ruby
luk3thomas has quit [Quit: luk3thomas]
livingstn has quit []
Spami has quit [Client Quit]
cerberblue has joined #ruby
charlie has joined #ruby
_lexjm has joined #ruby
Spami has joined #ruby
dseitz has joined #ruby
mtakkman has joined #ruby
duncannz has quit [Ping timeout: 244 seconds]
startupality has quit [Quit: startupality]
_lexjm has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
ramfjord has joined #ruby
Jesse1234 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
lemur has joined #ruby
majjoha has joined #ruby
dorei has quit []
chrishough has quit [Quit: Textual IRC Client: www.textualapp.com]
yfeldblum has quit [Ping timeout: 256 seconds]
chrishough has joined #ruby
majjoha has quit [Ping timeout: 245 seconds]
takle has joined #ruby
mikepack has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
_lexjm has joined #ruby
patrick99e99 has joined #ruby
takle has quit [Ping timeout: 272 seconds]
hakunin has quit [Remote host closed the connection]
mikepack has quit [Ping timeout: 258 seconds]
cerberblue has quit [Remote host closed the connection]
realeyes has joined #ruby
poweratom_ has quit [Quit: Be back later ...]
cerberblue has joined #ruby
patrick99e99 has quit [Ping timeout: 245 seconds]
hakunin has joined #ruby
hakunin has quit [Remote host closed the connection]
iulianh has joined #ruby
hakunin has joined #ruby
hakunin has quit [Remote host closed the connection]
flyhigh_ has quit [Remote host closed the connection]
jack_rabbit has joined #ruby
parabolize has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
mr_rogerz_ has joined #ruby
iulianh has quit [Quit: Textual IRC Client: www.textualapp.com]
clauswit_ has joined #ruby
clauswitt has quit [Ping timeout: 245 seconds]
Jesterman81 has joined #ruby
Avahey has joined #ruby
ferr has quit [Remote host closed the connection]
yfeldblum has joined #ruby
sar_s has quit [Ping timeout: 264 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
Jesterman81 has quit [Quit: Jesterman81]
weemsledeux has joined #ruby
sevenseacat has quit [Ping timeout: 256 seconds]
kyb3r_ has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
supersym has joined #ruby
n_blownapart has joined #ruby
it0a has joined #ruby
mikepack has joined #ruby
wjimenez_ has joined #ruby
mikepack has quit [Remote host closed the connection]
<n_blownapart> hi why do I get an argument error on this lambda example? http://pastie.org/9706416 thanks
ramfjord has quit [Ping timeout: 265 seconds]
sevenseacat has joined #ruby
philwantsfish has quit [Ping timeout: 256 seconds]
wjimenez5271 has quit [Ping timeout: 260 seconds]
mikepack has joined #ruby
<zenspider> n_blownapart: because the lambda takes an arg
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
mary5030 has quit [Remote host closed the connection]
luminor has quit []
MrDoctor has quit [Remote host closed the connection]
<n_blownapart> could you explain if you have time? zenspider I ordered the chris pine book...
MrDoctor has joined #ruby
<zenspider> yay! good book
<zenspider> lambda is just like a def... it's just a block of code
<zenspider> you essentially declared def <anonymous>(x); x; end
<zenspider> and then you did .call on it, but didn't pass x
sinequanon has joined #ruby
<zenspider> wrong number of arguments (0 for 1)
benzrf is now known as benzrf|offline
<zenspider> you provided 0 args when it expected 1
<n_blownapart> but isn't x provided in the method body as 1 ?
<zenspider> so, if I named the def above
<zenspider> def f(x); x; end
<zenspider> and then did:
<zenspider> x = 1
<zenspider> f
luminor has joined #ruby
<zenspider> what would you expect to happen?
danijoo_ has quit [Read error: Connection reset by peer]
danijoo has joined #ruby
<n_blownapart> zenspider, I have a hole in my head.. one sec. could you look at this blog? https://aprescott.com/posts/variables-closures-and-scope
<zenspider> don't worry about a blog post
<zenspider> tell me if this were algebra class
<zenspider> f(x) = x
<zenspider> .. etc
_lexjm has quit [Quit: zzz...]
rshetty has joined #ruby
<zenspider> n_blownapart: nevermind. DO worry about the blog post
<zenspider> it's just wrong
<zenspider> that code has two ruby warnings that are really helpful:
<zenspider> (irb):3: warning: shadowing outer local variable - x
<zenspider> (irb):2: warning: assigned but unused variable - x
<n_blownapart> that just draws a line based on the x value. so if you plug in x, f(x) gives you the rise and run of the line.
majjoha has joined #ruby
<zenspider> but you didn't call f(x)
<zenspider> you called f()
it0a has quit [Quit: WeeChat 1.0.1]
it0a has joined #ruby
<zenspider> n_blownapart: in fact, that code has NEVER worked in any version of ruby afaict
<n_blownapart> if I do puts pithy.call(x) I get the x value outside the scope of the method def.
<zenspider> ever.
<zenspider> I would walk away from that author as a whole
<n_blownapart> oh boy
<zenspider> it isn't just a bug, because he has a whole paragraph talking about how it should work when it could never ever work that way
<n_blownapart> oh brother glad I caught you here.
yfeldblum has joined #ruby
<zenspider> consider this misinformation and go read something else on blocks and closures
rshetty has quit [Ping timeout: 260 seconds]
<zenspider> I suggest the ruby koans, but you're waiting on chris pine, so the timing might not be right
majjoha has quit [Ping timeout: 265 seconds]
<n_blownapart> zenspider I'm working on the koans. they are very interesting.
<zenspider> kk
ramfjord has joined #ruby
lxsameer has joined #ruby
<n_blownapart> thanks zenspider
<n_blownapart> I got sidetracked and it seemed the article was well-written
mrdevri has quit [Ping timeout: 265 seconds]
<zenspider> very well written... and wrong
Spami has quit [Quit: This computer has gone to sleep]
<n_blownapart> also sinequanon thanks for the help the other day...
<n_blownapart> zenspider, word
yfeldblum has quit [Ping timeout: 264 seconds]
IrishGringo has joined #ruby
<sinequanon> n_blownapart: sure np
<sinequanon> n_blownapart: still slogging through it?
<n_blownapart> sinequanon, yeah .. have you or zenspider or anyone ever read ruby under a microscope?
<sinequanon> i haven't, no
<n_blownapart> looking at it to buy...for later
<zenspider> I have a copy, but I haven't read it yet
hightower4 has quit [Ping timeout: 264 seconds]
<zenspider> that's a long way off programming wise
<n_blownapart> a friend who is a java guy was raving about it...
<zenspider> it's very good.
<n_blownapart> zenspider, cool, can't wait to have this stuff take hold..
newmanships has joined #ruby
KC9YDN has quit [Quit: ☭ Karl Marx & Friedrich Engels, Vladimir Lenin, Josef Stalin, Mao Tse-Tung, Kim Il Sung, Ho Chi Minh, Fidel Castro & Ernesto Guevara ☭]
spyderman4g63 has joined #ruby
red_horned_rihno has quit [Ping timeout: 258 seconds]
KC9YDN has joined #ruby
red_horned_rihno has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
spyderman4g63 has quit [Ping timeout: 258 seconds]
lxsameer has quit [Ping timeout: 250 seconds]
jasonmit has joined #ruby
mr_rogerz_ has quit [Ping timeout: 255 seconds]
chipotle has quit [Ping timeout: 244 seconds]
muzik has joined #ruby
afarugie has joined #ruby
melik has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sinequanon has quit [Remote host closed the connection]
n_blownapart has quit [Quit: Leaving]
kyusang13 is now known as ChoiKyuSang
ChoiKyuSang has quit [Changing host]
ChoiKyuSang has joined #ruby
viet_power has quit [Ping timeout: 264 seconds]
lkba has quit [Ping timeout: 255 seconds]
yfeldblum has joined #ruby
arup_r has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
lkba has joined #ruby
viet_power has joined #ruby
<shevy> dumdedum
sinequanon has joined #ruby
cerberblue has quit [Remote host closed the connection]
majjoha has joined #ruby
<muzik> didoodidum
<shevy> yeah
<shevy> we gonna rock the ruby house
jack_rabbit has quit [Ping timeout: 250 seconds]
<muzik> well a ruby script to generate random music basic on popular chord structures and timing would certainly be relevant in this channel
bigmac has quit [Quit: Leaving]
<shevy> all improvement towards audio would be nice
rshetty has joined #ruby
<shevy> right now our maximum skill level has been assigned by apeiros
<shevy> when he wrote "Alle meine Entlein"
jcdesimp has quit [Quit: Leaving...]
chrishough has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy> lol
<shevy> which is actually a duck typing song!
<shevy> "All My Ducklings"
<zenspider> we had a guy in our group that was working on such a music generator thingy
IrishGringo has quit [Ping timeout: 256 seconds]
<shevy> cool
<shevy> I once wanted to write code that simulates me a Hans Zimmer audio generator
chipotle has joined #ruby
<shevy> but as I don't even know the theory behind audio nor audio codecs I gave up
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
S0da has quit [Remote host closed the connection]
<shevy> huh
<shevy> this is totally weird: https://bugs.ruby-lang.org/issues/10489
<shevy> class A < B; end
<shevy> to be equal to:
<shevy> class A; inherit B; end
lxsameer has joined #ruby
lxsameer has joined #ruby
arup_r has quit [Ping timeout: 258 seconds]
supersym has quit [Ping timeout: 258 seconds]
D9 has quit [Read error: Connection reset by peer]
shiru has joined #ruby
D9 has joined #ruby
coderhs has quit [Ping timeout: 240 seconds]
mary5030 has joined #ruby
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
rshetty has quit [Read error: Connection reset by peer]
rshetty_ has joined #ruby
shiru has quit [Ping timeout: 256 seconds]
mary5030 has quit [Ping timeout: 265 seconds]
patrick99e99 has joined #ruby
arup_r has joined #ruby
D9 has quit [Quit: Leaving]
patrick99e99 has quit [Ping timeout: 260 seconds]
<Hanmac> shevy hm yes it its weird ;P because it what happen if you call inherit more than once?
Wolland has joined #ruby
duncannz has joined #ruby
<rpag> Hanmac, it could be a no-op, or a TypeError
fgo has joined #ruby
<shevy> Hanmac well he proposed multiple inheritance
<shevy> so it would be akin to include-syntax
<shevy> which is a bit weird to have both inherit and include then
muzik has quit [Quit: Leaving]
ChoiKyuSang has quit [Quit: Going offline, see ya! ( www.adiirc.com]
<rpag> he said it 'allows multiple inheritance', i'd be +1 for the syntax but -1 for multiple inheritance
ChoiKyuSang has joined #ruby
Wolland has quit [Ping timeout: 264 seconds]
<shevy> but you can have multiple include statements for modules
<rpag> true
<shevy> well you don't get @ivars that way I guess?
<shevy> but for methods at least it works
<rpag> you get ivars too
<shevy> ack
Wolland has joined #ruby
<rpag> you could even have multiple initialize methods that call super all the way back to the first include
<shevy> >> module Foo; def initialize; @foo = 5; end; end; class Bar; include Foo; end; p Bar.new.instance_variables
<eval-in__> shevy => [:@foo] ... (https://eval.in/219115)
abuzze has joined #ruby
<shevy> indeed!
Wolland_ has joined #ruby
<zenspider> shevy: book called musimathics
ndrei has joined #ruby
coderhs has joined #ruby
<zenspider> shevy: I can't imagine anything worse
<zenspider> inherit ? ugh
<rpag> i like it, but doubt it will be accepted
marcdel_ has quit []
Wolland has quit [Ping timeout: 255 seconds]
marcdel has joined #ruby
<shevy> hmm
poweratom_ has joined #ruby
abuzze has quit [Ping timeout: 265 seconds]
<shevy> I love the creativity in music; I can't imagine one can easily combine creativity with mathematics :(
<zenspider> I hope it won't
sinequanon has quit [Remote host closed the connection]
<zenspider> shevy: sound IS math
bluOxigen has joined #ruby
DTSCode has joined #ruby
Synthbread has quit [Remote host closed the connection]
Jake232 has quit [Ping timeout: 245 seconds]
viet_power has quit [Ping timeout: 245 seconds]
viet_power has joined #ruby
viet_power has quit [Client Quit]
tenseiten has quit [Quit: No Ping reply in 180 seconds.]
bluOxigen has quit [Ping timeout: 245 seconds]
seitensei has joined #ruby
seitensei has joined #ruby
bluOxigen has joined #ruby
ChoiKyuSang has quit [Quit: Going offline, see ya! ( www.adiirc.com]
danguita has quit [Remote host closed the connection]
danguita has joined #ruby
davedev24_ has quit []
rshetty_ has quit [Remote host closed the connection]
wjimenez_ has quit [Remote host closed the connection]
sevenseacat has quit [Read error: Connection reset by peer]
sevenseacat has joined #ruby
poweratom_ has quit [Quit: Be back later ...]
<shevy> anyone knows how to find out what terminal is running? I just realized that kde konsole will support more colours than e. g. aterm or xterm
<rpag> $TERM environment variable
<shevy> well a user may set TERM to xterm yet suddenly run kde konsole
yfeldblu_ has joined #ruby
HashNuke has left #ruby [#ruby]
marcdel has quit []
<shevy> lol
<shevy> google just gave me a really weird way to output colours
afarugie has quit [Remote host closed the connection]
<shevy> tput setf 6; echo hi
<shevy> awww :(
<shevy> "The downside to lying about your terminal type is that the terminal might actually support a lot more than xterm does"
<shevy> rpag I think the problem is when i set TERM to konsole, and use xterm
<shevy> I will have no way of knowing that xterm has only a limited support for colours in this scenario
yfeldblum has quit [Ping timeout: 255 seconds]
<shevy> I never knew msgcat --color=test exists
<shevy> I stored that all in .sh scripts :\
lemur has quit [Remote host closed the connection]
lemur has joined #ruby
marcdel has joined #ruby
<shevy> oh
<shevy> ps -p$PPID
<shevy> that seems to work
<shevy> I get "konsole" in kde konsole, and "xterm" in xterm
takle has joined #ruby
<shevy> \o/
* shevy dances with rpag
mikepack has quit [Remote host closed the connection]
lemur has quit [Ping timeout: 272 seconds]
oleo__ has joined #ruby
takle has quit [Ping timeout: 272 seconds]
coderhs has quit [Ping timeout: 245 seconds]
<rpag> :-)
dave304 has joined #ruby
corehook has joined #ruby
oleo is now known as Guest59548
ChoiKyuSang has joined #ruby
<dave304> please guys why does the first code work and the second does not (1) puts "String has vowels" if "This is a test" =~ /[aeiou]/ and (2) if "This is a test" =~ /[aeiou]/ puts "String has vowels" i am a newbie and still cant figure out the difference Thanks in advance for your help
duncannz has quit [Ping timeout: 240 seconds]
Guest59548 has quit [Ping timeout: 258 seconds]
<zenspider> expr if cond vs if cond [then|;|return] expr [;|return] end
poweratom_ has joined #ruby
<zenspider> go look at the ruby quickref
_subopt has quit [Quit: Leaving.]
DTSCode has quit [Read error: Connection reset by peer]
spyderman4g63 has joined #ruby
<shevy> >> puts "String has vowels" if "This is a test" =~ /[aeiou]/
<eval-in__> shevy => String has vowels ... (https://eval.in/219116)
<shevy> dave304 that string had vowels
<shevy> and the other one has vowels as well
<shevy> so the second one worked too
<zenspider> no 'end'
spyderman4g63 has quit [Ping timeout: 264 seconds]
DTSCode has joined #ruby
josephndenton has quit [Ping timeout: 258 seconds]
red_horned_rihno has quit [Read error: Connection reset by peer]
dseitz has quit [Quit: Textual IRC Client: www.textualapp.com]
lemur has joined #ruby
coderhs has joined #ruby
marcdel has quit []
boombadaroomba has joined #ruby
corehook has quit [Remote host closed the connection]
marcdel has joined #ruby
arrubin has quit []
<dave304> zenspider i checked the link and corrected the second accordingly. i will also bookmark the page...THANK YOU VERY MUCh..
boombadaroomba has quit [Ping timeout: 260 seconds]
moritzs has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
arquebus has joined #ruby
graydot has joined #ruby
<zenspider> no prob
<dave304> shevy THANKS YOU VERY MUCh.. the first one worked out of the box..but the second did not even on irb and sublime text. Though i added "then" , "elseif" and the "end" as suggested by zenspider on the second code and it worked
tvw has joined #ruby
DTSCode has quit [Remote host closed the connection]
atmosx has joined #ruby
DTSCode has joined #ruby
jamto11 has quit [Remote host closed the connection]
theotherstupidgu has quit [Ping timeout: 256 seconds]
fumduq has quit [Remote host closed the connection]
coderhs has quit [Read error: Connection reset by peer]
theotherstupidgu has joined #ruby
rshetty has joined #ruby
jamto11 has joined #ruby
jamto11 has quit [Remote host closed the connection]
jamto11 has joined #ruby
arquebus has quit [Quit: Konversation terminated!]
theotherstupidgu has quit [Quit: leaving]
anaeem1_ has joined #ruby
jamto11 has quit [Remote host closed the connection]
jamto11 has joined #ruby
momomomomo has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
rshetty has quit [Remote host closed the connection]
rshetty has joined #ruby
jamto11 has quit [Ping timeout: 255 seconds]
poweratom_ has quit [Quit: Lingo: www.lingoirc.com]
rshetty has quit [Ping timeout: 256 seconds]
poweratom_ has joined #ruby
BlackGear has joined #ruby
poweratom_ has quit [Client Quit]
fgo has joined #ruby
mrgrieves has quit [Ping timeout: 260 seconds]
maestrojed has joined #ruby
DefKnight has joined #ruby
Synthbread has joined #ruby
lolmaus has joined #ruby
klaut has joined #ruby
klaut has quit [Remote host closed the connection]
klaut has joined #ruby
marcdel has quit []
porfa has quit [Quit: porfa]
BadQuanta has quit [Remote host closed the connection]
<rpag> shevy, what ya working on?
dave304 has quit [Remote host closed the connection]
wchun has quit [Ping timeout: 272 seconds]
<shevy> rpag right now on a console game ... but not very motivated; a side problem was to determine whether it is running in a terminal like xterm, aterm or kde konsole
<shevy> there will be more colours if on kde konsole (probably gnome-terminal too but I lack the motivation to test that), opposed to xterm etc..
tvw has quit [Ping timeout: 244 seconds]
Joufflu_ has joined #ruby
Joufflu has quit [Ping timeout: 265 seconds]
<rpag> xterm supports 256 colors nowadays doesn't it?
momomomomo has quit [Ping timeout: 258 seconds]
fgo has quit [Ping timeout: 245 seconds]
rippa has joined #ruby
lxsameer has quit [Ping timeout: 255 seconds]
momomomomo has joined #ruby
DefKnight has quit [Quit: Leaving.]
newmanships has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<shevy> I have not been able to get support for that
<shevy> if you know of something that will use the 256 colours in xterm I am all ears
kireevco has quit [Quit: Leaving.]
wjimenez5271 has joined #ruby
<rpag> "XTerm and most other modern terminal emulaters support 256 colors ..."
<shevy> ok how do I output these colours?
<zenspider> shevy: minitest/pride uses them
lxsameer has joined #ruby
<zenspider> steal my code. it goes through the whole rainbow
sinequanon has joined #ruby
Timgauthier has joined #ruby
pen has quit []
<shevy> ok
kyb3r_ has quit [Read error: Connection reset by peer]
Timgauthier is now known as timgauthier_away
supersym has joined #ruby
User458764 has joined #ruby
Ulrike_Rayne is now known as Chibi_Uli
sinequanon has quit [Ping timeout: 264 seconds]
wjimenez5271 has quit [Ping timeout: 264 seconds]
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
sevenseacat has quit [Quit: Leaving.]
hamakn has quit [Read error: Connection reset by peer]
elaptics`away is now known as elaptics
hamakn has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest9182 is now known as Snowstormer
Snowstormer has quit [Changing host]
Snowstormer has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
andrewlio has joined #ruby
marr has joined #ruby
rshetty has joined #ruby
blueOxigen has joined #ruby
robustus is now known as robustus|Off
dc_ has quit [Remote host closed the connection]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bluOxigen has quit [Ping timeout: 255 seconds]
graydot has quit [Quit: graydot]
Trieste has quit [Ping timeout: 265 seconds]
fgo has joined #ruby
tkuchiki has joined #ruby
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
Trieste has joined #ruby
jamto11 has joined #ruby
unshadow has joined #ruby
<unshadow> So, I have an array of arrays , a = [["b",1],["a",2]] , now I want to delete a specific array inside the 'big' (a) array, I thout about doing: for array in a; a.delete!(["a",2]). but this dosent work
<unshadow> what is the best way to do this ?
Timgauthier has joined #ruby
Timgauthier is now known as timgauthier_away
jamto11 has quit [Ping timeout: 244 seconds]
<shevy> dunno but one way is a.reject! {|entry| entry == ["a", 2] }
apeiros has quit [Remote host closed the connection]
apeiros has joined #ruby
poweratom_ has joined #ruby
poweratom__ has joined #ruby
<shevy> unshadow does that work?
<unshadow> hm... it behaves wierd... I'll sen you an example
poweratom___ has joined #ruby
poweratom_ has quit [Ping timeout: 255 seconds]
<shevy> huh
spyderman4g63 has joined #ruby
<shevy> >> [["b",1],["a",2]].reject {|entry| entry == ["a", 2] }
<eval-in__> shevy => [["b", 1]] (https://eval.in/219122)
<shevy> but in the example above it seems to work
poweratom____ has joined #ruby
<unshadow> check this out
hamakn has quit [Remote host closed the connection]
<unshadow> try it, the two first array should be deleted
poweratom_____ has joined #ruby
<unshadow> the third one shouldent
hamakn has joined #ruby
<shevy> why do you use sleep there :)
<unshadow> to let the time move forward, or they wont be deleted
<unshadow> its a very short code,
<unshadow> it will happen in lest then a sec
<shevy> hehehe
<shevy> btw your check confuses me
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
<shevy> if cookie[1] < Time.now
<shevy> @cookies.reject! {|entry| entry == cookie }
<rpag> unshadow, you mean delete?
<rpag> there is no delete!
tkuchiki has joined #ruby
poweratom__ has quit [Ping timeout: 250 seconds]
poweratom______ has joined #ruby
<shevy> huh
<shevy> rpag is right
<unshadow> cookie[1] contains the Time.now when it was inserted to the main array, then, when I check i see if the Time.now is higher (as is time passed) then the original insertation time
poweratom___ has quit [Ping timeout: 250 seconds]
poweratom_______ has joined #ruby
<atmosx> Does anyone has a clue on how to display two strings aligned in a HTML/ERB/HTML template?
<shevy> atmosx use pure ruby!
spyderman4g63 has quit [Ping timeout: 264 seconds]
poweratom____ has quit [Ping timeout: 250 seconds]
<shevy> atmosx can you use text-align: left and right?
<shevy> I mean it should be all html and thus css elements must work no?
<unshadow> so, use delete! instead of reject! ?
<shevy> >> [1,2,3].delete! 1
<eval-in__> shevy => undefined method `delete!' for [1, 2, 3]:Array (NoMethodError) ... (https://eval.in/219123)
<shevy> unshadow how? .delete! does not work on Array
<atmosx> shevy: nope, I have 2 DNA sequences and I want one to be "below the other" now it comes one after the other, that way you can't do any visual comparison.
poweratom_____ has quit [Ping timeout: 250 seconds]
<unshadow> so.. I dnot get what rpag meant ...
hamakn has quit [Ping timeout: 240 seconds]
<shevy> ATATATATA<br>
<shevy> GCTTATATA
<shevy> ?
<atmosx> yes
<atmosx> kinda
<shevy> well rpag pointed out that .delete! can not work by default
<shevy> .reject will work if the conditional match applies
<shevy> >> [1,2,3,4].reject {|entry| entry < 3}
<eval-in__> shevy => [3, 4] (https://eval.in/219124)
<shevy> atmosx can't you just insert arbitrary <tags> and also apply css rules to them?
<unshadow> so this is my issue, the matches apply but instead of ending with 1 array I end up with 2
<shevy> erb was too ugly for me to consider using it
<shevy> unshadow oh that is simple then
<atmosx> shevy: I'm thinking ...
<shevy> unshadow simply invert the check
<shevy> >> [1,2,3,4].reject {|entry| entry > 3}
<eval-in__> shevy => [1, 2, 3] (https://eval.in/219125)
<shevy> or use ! inside there unshadow
<atmosx> I'm using haml but I can translate easily from one to another or even from raw css/html to haml/css
bluOxigen has joined #ruby
<atmosx> hmm
tkuchiki has quit [Ping timeout: 272 seconds]
poweratom______ has quit [Ping timeout: 250 seconds]
poweratom_______ has quit [Ping timeout: 250 seconds]
blueOxigen has quit [Ping timeout: 240 seconds]
jvv has left #ruby ["I'm gone..."]
hmsimha has joined #ruby
ptrrr has joined #ruby
ferr has joined #ruby
chipotle has quit [Quit: cya]
blueOxigen has joined #ruby
<rpag> atmosx, aligning text sounds like an easy thing to do in HTML/CSS
<rpag> atmosx, like always, please provide markup or source, you usually don't
fgo has quit [Ping timeout: 245 seconds]
<atmosx> rpag: It's because I like to keep your imagination active
lolmaus has quit [Remote host closed the connection]
lolmaus has joined #ruby
<rpag> atmosx, if you want a solution, it's better to provide source/markup
<rpag> don't worry about my imagination
timonv_ has joined #ruby
bluOxigen has quit [Ping timeout: 258 seconds]
<unshadow> ok... I'm lost, after looking at all of the examples and what shevy told me, why isn't this working: https://gist.github.com/bararchy/74b789f46e2dad137a6b ? , I end up with 2 arrays instead of 1
<unshadow> :(
rshetty has quit [Remote host closed the connection]
<zenspider> you're doing for over @cookies
claymore has joined #ruby
<zenspider> then you're checking each one to see if ary[1] < Time.now
<shevy> unshadow just apply it directly without using for
KC9YDN has quit [Quit: ☭ Karl Marx & Friedrich Engels, Vladimir Lenin, Josef Stalin, Mao Tse-Tung, Kim Il Sung, Ho , Fidel Castro & Chi MinhErnesto Guevara ☭]
<zenspider> if that's the case, you walk over @cookies and reject the one == to the currently enumerated one?
<unshadow> yap
<zenspider> you already know about reject!, so why aren't you doing that at the top?
rshetty has joined #ruby
<atmosx> I always worry about your imagination, I'll provide markup in about 13 minutes
<unshadow> becuse I wont have any knowleage of the content of each array in @array except for the [1] which I should check against time.now
supersym has quit [Ping timeout: 245 seconds]
<shevy> what does it matter
timonv_ has quit [Remote host closed the connection]
<shevy> .reject and .select work as a filter - you filter in or out whatever you require there
<zenspider> you only care about each entry one at a time
coderhs has joined #ruby
<rpag> atmosx, you can provide markup if you want but i won't help you
<atmosx> rpag: that's evil.
<unshadow> cookies.reject! {|entry| entry == cookie[1] < Time.now } you mean like this ?
<atmosx> rpag: you tricked me into providing markup and then you're not helping.
lxsameer has quit [Ping timeout: 260 seconds]
<rpag> thats right
<rpag> deal with it
<shevy> unshadow can your check work?
toretore has quit [Quit: This computer has gone to sleep]
<shevy> you make a check cookie[1] < Time.now
<shevy> this will yield back true or false
dc_ has joined #ruby
<shevy> then you compare true or false to entry
<shevy> which I believe is not true or false
<zenspider> comments
<shevy> so I would assume that your check can not work unshadow
<zenspider> sleep 5 is useless too... so you've wasted time waiting for it.
<zenspider> and 'p' helps with output for this type of thing
<shevy> hehehe
<unshadow> ooh......
<zenspider> and no need for ivars
supersym has joined #ruby
<unshadow> damn.. you code looks great :)
Joufflu_ has quit [Ping timeout: 255 seconds]
<shevy> yeah it is clever
<shevy> he used two keys, :before and :after
cantonic has joined #ruby
<zenspider> puts with arrays in 2+ is really ugly because they're multi line
lxsameer has joined #ruby
<unshadow> when you do the puts :blabla => something, this will print an hash of the object ?
rshetty has quit [Remote host closed the connection]
<zenspider> I'm doing 'p', which is the same as puts(obj.inspect)
lkba has quit [Ping timeout: 264 seconds]
<unshadow> why not just use p cookies.to_s which will look the same but without the added curly brackets
rshetty has joined #ruby
crazydiamond has joined #ruby
<unshadow> >> a = [["12","21"],["45","31"] ; puts a.to_s
<eval-in__> unshadow => /tmp/execpad-36d78a835189/source-36d78a835189:2: syntax error, unexpected ';', expecting ']' ... (https://eval.in/219128)
<unshadow> >> a = [["12","21"],["45","31"]] ; puts a.to_s
<eval-in__> unshadow => [["12", "21"], ["45", "31"]] ... (https://eval.in/219129)
<zenspider> what I saw:
<zenspider> This is one cookie in the array:
<zenspider> 2014-11-09 01:56:27 -0800
<zenspider> 2014-11-09 01:55:32 -0800
<zenspider> This is what left:
<zenspider>
<zenspider> I prefer p, lets me label things, see the structure, etc.
rshetty has quit [Ping timeout: 256 seconds]
<unshadow> yeha you are right, I was just intrested as to why use p :hash array and not puts arry.to_s
<unshadow> nm :)
<unshadow> thanks btw all of you
charliesome has joined #ruby
_ixti_ has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
phrozen77 has quit [Ping timeout: 260 seconds]
heftig has quit [Read error: Connection reset by peer]
govg has quit [Quit: leaving]
phrozen77 has joined #ruby
heftig has joined #ruby
Xeago has joined #ruby
mtakkman has quit [Remote host closed the connection]
ndrei has joined #ruby
<atmosx> she drives me craaazyyyy lalalala 80s > *
drawingthesun has joined #ruby
melik has quit [Quit: (null)]
oleo__ has quit [Quit: Verlassend]
thsig has joined #ruby
heftig has quit [Read error: Connection reset by peer]
snovity has joined #ruby
Xeago has quit [Remote host closed the connection]
heftig has joined #ruby
xtreak has joined #ruby
KC9YDN has joined #ruby
o0oo0o has quit [Ping timeout: 250 seconds]
<shevy> atmosx are you listening to old schoo music again
<shevy> *school
<atmosx> yeap
<atmosx> wake me up, before you go go
parduse is now known as Guest21495
<shevy> omg
Guest21495 has quit [Killed (weber.freenode.net (Nickname regained by services))]
<shevy> LAST X-MAS
<shevy> it is the most hated song during xmas
<atmosx> what can I do? I'm writing code I don't wanna write, lol I need something to cheer me up. Not to mention that I'm living like a refugee in a room
<atmosx> until 12/12 that is!
<atmosx> shevy: yeah that's world-wide lol
parduse has joined #ruby
<shevy> hehe
<shevy> not long until xmas too
<atmosx> I mean, I know so many swearing in Greece over "last christmass" it's amazing how hate over a song, unites people! lol
<shevy> yeah, same in austria
<shevy> it is worse than rick roll
<shevy> because you will hear it as you walk on the streets
<shevy> in reallife (and some other stupid songs)
yfeldblu_ has quit [Remote host closed the connection]
ringarin has joined #ruby
<shevy> lol cool
<shevy> the lead singer is actually born in greece? Georgios Kyriacos Panayiotou
<shevy> oh ok... immigration into the UK
xcesariox has joined #ruby
agjacome has joined #ruby
josephndenton has joined #ruby
zwer has quit [Remote host closed the connection]
spider-mario has joined #ruby
spider-mario has quit [Read error: Connection reset by peer]
jottr_ has joined #ruby
oleo has joined #ruby
it0a has quit [Ping timeout: 265 seconds]
zwer has joined #ruby
jheg has joined #ruby
<atmosx> shevy: yeap
spider-mario has joined #ruby
<atmosx> shevy: but he doesn't speak Greek, he is Cypriot, George Michael
<pontiki> 80s music ftw
* atmosx beat it - Michael Jackson
<shevy> atmosx hmm but cypriots normally speak greek?
<atmosx> "Show me how funky, strong is your fight, it doesn't matter how's wrong or right..."
<atmosx> lol
<atmosx> shevy: it's a dialect, we Greeks, hate it with a passion. It's awful but we can easily understand each other. it's like Italy or Spain
<shevy> hehe
<shevy> just like austrian german and northern germany german
josephndenton has quit [Ping timeout: 244 seconds]
nfk has joined #ruby
ringarin has quit [Quit: Leaving]
tkuchiki has joined #ruby
* pontiki puts on some duran duran
* atmosx Prince - Why Doves Cry
<atmosx> pontiki: hahaha, I love a 90s song of Duran-Duran (who do you need who do you looove)
<pontiki> :)
agjacome has quit [Quit: leaving]
<atmosx> Hm, I was organizing events in Greece, 2008-2010. Small town actually but we generate good cash for 15-days work. It was kinda frenetic making so many (Greek) people work together and actually come with a decent event... But the 80s parties were the most memorable to me.
<atmosx> Most successful, IMHO it's the most widely accepted/popular decade for music
<shevy> atmosx come undone?
newmanships has joined #ruby
<shevy> atmosx I am very ashamed to admit that I like quite a few songs from the eurodance era. like "sunshine" from westbam
<pontiki> it's not as though there's no really great new music, but the 80s seemed *so* great
<pontiki> so consistent
luminor has quit []
<pontiki> wonder if that's just golden age thinking on my part tho
<shevy> dunno, a lot of modern music confuses me
<shevy> the whole dubstep trend
<pontiki> weird as, because during the 80s i never listened to pop music
<pontiki> you take one mediocre genre to say there's no great music being made today?
siwica1 has joined #ruby
luminor has joined #ruby
patrick99e99 has joined #ruby
<atmosx> shevy: hahahaha quite ashamed? Why?
<atmosx> shevy: You're supposed to like only Mozart because you're Austrian or something?
<shevy> atmosx because a lot from that era is junk
<shevy> no I don't like Mozart, save for that death song
<atmosx> shevy: everything is virtually junk
<atmosx> who cares?
<pontiki> 90% of everything is crap
<pontiki> sturgeon's law
siwica has quit [Ping timeout: 272 seconds]
<shevy> atmosx I more love old music like vivaldi's four seasons concerto
jamto11 has joined #ruby
<atmosx> pontiki: as long as pop, electro-pop, new age, heavy metal, even progressive metal goes, I think the 80s were as good as it gets. Oh for Rock and Hard Rock too.
<shevy> david hasslehoff
<pontiki> i'm going to proclaim the late 60's and early 70's for rock
<pontiki> the who, stones, beatles, etc
jheg has quit [Quit: jheg]
<pontiki> many more
<atmosx> pontiki: so there you go, you can't beat MJ or Madonna with Rihanna and Beyonce, or Dire Straits, U2, Depeche Mode with today's bands... :-/ Metallica, GnR, etc.
<atmosx> pontiki: hmm well yes, that could be.
<atmosx> pink floyd
* pontiki nods
luminor has quit [Client Quit]
<pontiki> Yes
<pontiki> i mean the band Yes
* atmosx Lionel Ritchie - All night long
Danishman has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<atmosx> hehe I know
<pontiki> the eagle with fucking joe walsh
<pontiki> eagles*
patrick99e99 has quit [Ping timeout: 258 seconds]
Lewix has quit [Remote host closed the connection]
<pontiki> even 2nd tier bands like Styx and GFR -- lots to love there
<pontiki> Rush!
<pontiki> holy crap
jamto11 has quit [Ping timeout: 255 seconds]
<atmosx> hehehe
newmanships has quit [Quit: Textual IRC Client: www.textualapp.com]
* atmosx REM - It's the end of the world
sevenseacat has joined #ruby
robbyoconnor has joined #ruby
<atmosx> pontiki: do you know "The Sound - I can't escape myself" ?
xcesariox has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
o0oo0o has joined #ruby
Dude007 has quit [Read error: Connection reset by peer]
Dude007 has joined #ruby
klaut has quit [Remote host closed the connection]
Dude007 has quit [Client Quit]
yfeldblum has joined #ruby
m8 has joined #ruby
unshadow has quit [Quit: leaving]
ferr has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 264 seconds]
coderhs has quit [Ping timeout: 255 seconds]
siwica1 has quit [Ping timeout: 265 seconds]
lolmaus has quit [Quit: Konversation terminated!]
lolmaus has joined #ruby
krz has joined #ruby
max96at|off is now known as max96at
xtreak has quit [Quit: ChatZilla 0.9.91 [Firefox 33.0.2/20141027150301]]
thsig has quit [Remote host closed the connection]
takle has joined #ruby
amundj has joined #ruby
spyderman4g63 has joined #ruby
diegoviola has joined #ruby
govg has joined #ruby
thsig_ has joined #ruby
Photism has joined #ruby
takle has quit [Ping timeout: 272 seconds]
spyderman4g63 has quit [Ping timeout: 264 seconds]
agjacome has joined #ruby
luminor has joined #ruby
thsig_ has quit [Remote host closed the connection]
kirun has joined #ruby
krz has quit [Ping timeout: 250 seconds]
yfeldblum has joined #ruby
desp has joined #ruby
xiq has joined #ruby
godd2 has quit [Ping timeout: 256 seconds]
xiq is now known as xrlabs
diegoviola has quit [Quit: WeeChat 1.0.1]
diegoviola has joined #ruby
Wolland_ has quit [Remote host closed the connection]
MrDoctor has quit [Remote host closed the connection]
rshetty has joined #ruby
Wolland has joined #ruby
ndrei has quit [Ping timeout: 244 seconds]
mtakkman has joined #ruby
Wolland has quit [Ping timeout: 255 seconds]
rshetty has quit [Ping timeout: 250 seconds]
<pontiki> i don't, atmosx
<atmosx> pontiki: youtube-it it's nice pure 80s rock
jenrzzz has joined #ruby
Timgauthier has joined #ruby
DefKnight has joined #ruby
DefKnight has quit [Max SendQ exceeded]
DefKnight has joined #ruby
jamto11 has joined #ruby
DefKnight has quit [Max SendQ exceeded]
takle has joined #ruby
elaptics is now known as elaptics`away
coderhs has joined #ruby
jamto11 has quit [Ping timeout: 245 seconds]
wjimenez5271 has joined #ruby
<shevy> hehe
<shevy> atmosx in the 1990s I was in hong kong
<shevy> they played chinese (cantonese) techno
<shevy> a totally different music to europe at that time
<atmosx> really???
amundj has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy> yeah, it was cool. I also was in Shanghai back then - they kinda tried to out-build Hong Kong and poured in a lot of money to make it appear better, but it was like a cheap clone - nowadays is huge, +25 million people compared to +7.2 in hong kong (not counting the larger nearby municipal/rural areas)
wjimenez5271 has quit [Ping timeout: 250 seconds]
Timgauthier is now known as timgauthier_away
coderhs has quit [Ping timeout: 245 seconds]
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure has quit [Ping timeout: 265 seconds]
<shevy> atmosx next task today... build me a new linux kernel
btcctf has joined #ruby
<atmosx> ...
<atmosx> leenoux
Rx_o has joined #ruby
Timgauthier has joined #ruby
hightower4 has joined #ruby
fgo has joined #ruby
Azure has joined #ruby
germanstudent has joined #ruby
<btcctf> random question, but i'm wondering if it's possible to prevent strings from containing a certain character
<shevy> just tried "make xconfig" and this qt interface is so much less usable than the ncurses wrapper
<btcctf> for example monkey patching String to prevent the letter e
<jhass> btcctf: .delete('c'
<btcctf> x = "abe"
<jhass> ugh, why would you do that
<btcctf> puts x -> ab
lxsameer has quit [Read error: Connection reset by peer]
<shevy> btcctf you'd have to somehow intercept string creation
<jhass> and no, I don't think that's possible
SCHAAP137 has joined #ruby
<btcctf> jhass: damn
<jhass> no
<jhass> good
<btcctf> shevy: is that possible without recompiling ruby?
<jhass> it's an insane suggestion
lxsameer has joined #ruby
<shevy> btcctf dunno, for most classes you could simply overwrite the old variant
luminor has quit []
<btcctf> it's a crazy question, but it's asking a question to see if something different is possible
<rpag> btcctf, curious, why do you want to do that?
<rpag> just experimenting?
<jhass> ^ seriously, what could possibly the reason
<btcctf> playing with idea/experimenting with an idea of "hardening" ruby apps
<crome> a serious aversion to the letter e
<crome> childhood trauma maybe?
<zenspider> hahahaha
mrgrieves has joined #ruby
<zenspider> hardening? by removing characters from strings?
<btcctf> well, starting simple, if i can't remove a single letter, then i have no hope of what i wanted to aim for
<zenspider> you should also remove all numbers that equate to the guilty chars
<jhass> "hardening" as in security by obfuscation I guess
<zenspider> and all equations that might make such numbers
<zenspider> and and and and
<shevy> >> class String; def initialize(i = ''); replace(i.delete('c')); end; end; x = String.new 'abc'; x
<eval-in__> shevy => "ab" (https://eval.in/219132)
<btcctf> jhass: yes, shitty blacklist, but playing with the idea of applying it generically
<shevy> btcctf you can overwrite class String at least, but I am unsure how to overwrite 'abc' string creation with just "" quotes
<jhass> "nobody understands my program, therefore it is secure"
<rpag> shevy, wont work for string literals though
lkba has quit [Ping timeout: 245 seconds]
<shevy> rpag yeah that is weird ...
<jhass> the whole idea is weird
<zenspider> the whole idea is flawed
<btcctf> could i safely replace all "blah" with String.new("blah") ?
<btcctf> zenspider: yes, it's for a crazy security ctf thing
<shevy> btcctf yeah
krz has joined #ruby
Rx_o has quit [Quit: (null)]
<btcctf> that gets more interesting then.. hmmmmmm
<shevy> rpag how do '' or "" objects get initialized?
<rpag> i don't see String.new() used that often
VanillaGoat_ has joined #ruby
<Hanmac> rpag: there is also String() ;P
<zenspider> >> class String; def initialize(i = ''); replace(i.delete('c')); end; end; x = String.new 'abc'; x += 99.chr; x
<eval-in__> zenspider => "abc" (https://eval.in/219133)
<shevy> aha
<shevy> String() also cheats!
<zenspider> >> class String; def initialize(i = ''); replace(i.delete('c')); end; end; x = String.new 'abc'; x += (3 * 11).chr; x
<eval-in__> zenspider => "ab!" (https://eval.in/219134)
<shevy> I guess String() must use string literals
<zenspider> oops. I'm obvs tired
coderhs has joined #ruby
<zenspider> >> class String; def initialize(i = ''); replace(i.delete('c')); end; end; x = String.new 'abc'; x += (3 * 3 * 11).chr; x
<eval-in__> zenspider => "abc" (https://eval.in/219135)
<zenspider> those pesky primes will get us every time
<zenspider> c is for cookie
<btcctf> yea, and string interpolation :\
<jhass> >> __FILE__[2]
<eval-in__> jhass => "m" (https://eval.in/219136)
<btcctf> can't track taint with that
<shevy> hmm
<btcctf> going to have to modify ruby internals and expose something i guess :\
<jhass> >> ARGV.keys
<eval-in__> jhass => undefined method `keys' for []:Array (NoMethodError) ... (https://eval.in/219137)
<shevy> haha
<jhass> right, anyway, plenty of strings to choose from
<jhass> see you next year with your modified MRI
VanillaGoat__ has quit [Ping timeout: 258 seconds]
<btcctf> i need this in a week or 2 actually :P
<zenspider> not. gonna. happen. :)
<shevy> the C source is all with you man
Timgauthier is now known as timgauthier_away
<jhass> I still completely fail to see _any_ usefulness in that idea
<btcctf> it's a security ctf, we're given intentionally vulnerable services to keep running and protect
clauswitt has joined #ruby
IrishGringo has joined #ruby
<jhass> then just do a proxy?
timgauthier_away is now known as Timgauthier
<jhass> jail that thing into a container, proxy & filter all traffic
<btcctf> not that easy, take compression/encryption for example, proxy won't help there
josephndenton has joined #ruby
<btcctf> and it takes time to develop a smarter proxy to help with that (vs dumb and transparent)
clauswitt has quit [Max SendQ exceeded]
<jhass> not more time than trying to modify all of MRIs input sources
<btcctf> and yes, jail/etc will help, but still needs access to sensitive data to be considered "still running"
<waxjar> why will String.new("") be safer than "" ?
<btcctf> jhass: i can work on modifying mri now, i can't do smart proxy until i know the protocol
<btcctf> which i wont know until ctf starts
clauswitt has joined #ruby
<btcctf> waxjar: i can monkey patch in a white/black list
<btcctf> apparently not possible with normal ""
<shevy> well
clauswit_ has quit [Ping timeout: 265 seconds]
<shevy> you need to get a handle towards how "" initializes strings
desp has quit [Quit: This computer has gone to sleep]
<shevy> we have fiddle!!!
<shevy> and RubyVM!!!!!
<zenspider> except all that C code that makes ruby strings... and extensions' C code ... and extensions ruby code. and algorithms... etc.
<zenspider> RubyVM calls out to C
<waxjar> hmm, strange. i'd have expected overriding String#initialize would do the trick
<shevy> btcctf the odds are stacked against you but I am sure - you will prevail
<shevy> waxjar I thought so as well but nope!
<btcctf> fiddle will be handy
<waxjar> it works for Arrays :(
<shevy> huh
<zenspider> fiddle by definition calls out to c
agjacome has quit [Ping timeout: 264 seconds]
<shevy> waxjar let me try
desp has joined #ruby
agjacome has joined #ruby
<shevy> waxjar actually, how do you get it to work with Array?
renier has quit [Quit: Textual IRC Client: www.textualapp.com]
josephndenton has quit [Ping timeout: 265 seconds]
<btcctf> waxjar: imagine if you had, class String; def initialize(i= ''; "x"+i; end; end;
<zenspider> waxjar: no it doesn't
<btcctf> string would be useless then
<shevy> btcctf that's a syntax error
luminor has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
<btcctf> as "x" would call initialize which would call initialize..
<waxjar> >> class Array; def initialize(*); puts "herro"; end; end; [1,2,3]
<eval-in__> waxjar => [1, 2, 3] (https://eval.in/219138)
<btcctf> ugh, missed a bracket, probably some other things
<shevy> well if you call initialize recursively you will only get a "stack level too deep (SystemStackError)" error
<waxjar> huh, my stdout gets a herro here :/
<shevy> aha
<shevy> so it also does not work :)
<shevy> waxjar how do you add content to it though?
<jhass> 18>> class Array; def initialize(*); puts "herro"; end; end; [1,2,3]
<eval-in__> jhass => [1, 2, 3] (https://eval.in/219139)
<jhass> 19>> class Array; def initialize(*); puts "herro"; end; end; [1,2,3]
<eval-in__> jhass => [1, 2, 3] (https://eval.in/219140)
<shevy> through e. g. Array.new(5)
<jhass> 20>> class Array; def initialize(*); puts "herro"; end; end; [1,2,3]
<eval-in__> jhass => [1, 2, 3] (https://eval.in/219141)
<jhass> just doesn't work
<btcctf> perhaps rubinius will save me
luminor has quit [Client Quit]
momomomomo has quit [Quit: momomomomo]
<shevy> btcctf I don't think rubinius is allowed to do non-ruby ways
<zenspider> there are so many holes in this plan ...
<shevy> hehe
* zenspider goes to bed
renier has joined #ruby
<shevy> oh I am dumb
<shevy> Array has #replace
<waxjar> hmm, the repl must call Array.new explicitly then :(
<waxjar> i've always though this worked. lol
<shevy> well it does not work for me here either
<shevy> >> RUBY_VERSION
<eval-in__> shevy => "2.1.3" (https://eval.in/219142)
<shevy> I don't understand why it works for you waxjar
<btcctf> waxjar: which repl?
fgo has quit [Quit: WeeChat 1.0]
<waxjar> i think because i was trying it out in a REPL and it probably did an Array.new somewhere
<waxjar> btcctf: ripl
Nieralyte has joined #ruby
<shevy> oh you mean on your side
<shevy> I thought eval-in__
<waxjar> yeah
takle has quit [Remote host closed the connection]
<shevy> crome matz teaches!
<shevy> "String objects for literals are already created in the compile time, which is far before you redefine the initialize method."
Timgauthier is now known as timgauthier_away
<shevy> "The individual string objects from literals are just copy of the already allocated and initialized objects."
<shevy> "The whole purpose of the initialize method is to initialize newly created objects, as the name suggests."
<shevy> I am still confused though
<shevy> why does [1,2,3] not go through Array.new?
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
Timgauthier has joined #ruby
yeticry has quit [Ping timeout: 240 seconds]
_lexjm has joined #ruby
tuelz has quit [Ping timeout: 244 seconds]
<shevy> Hanmac teach me!
yeticry has joined #ruby
<Hanmac> shevy: same as for strings and hashs, they are build to early
chishiki has quit [Ping timeout: 260 seconds]
Wolland has quit [Ping timeout: 245 seconds]
<shevy> huh
<shevy> build too early?
<rpag> built too early
<rpag> they're created before you define #initialize
<btcctf> then shouldn't eval work?
<jhass> ...
<jhass> "Let's make the app more secure, add eval!"
<btcctf> haha, this is why i didn't lead with my reasons
<jhass> while at it, why don't you enable goto
tkuchiki has quit [Remote host closed the connection]
<shevy> we have goto already!
<waxjar> it would make sense for eval to use the redefined #initialize tho, if it's called after
tkuchiki has joined #ruby
<shevy> rpag oh I understand. interesting
diegoviola has quit [Quit: WeeChat 1.0.1]
<pontiki> do not fear the goto
<pontiki> the raptors will eat us anyway
<jhass> >> class String; def initialize(*); replace('no happy holidays for you'); end; end; eval('"hi"')
<eval-in__> jhass => "hi" (https://eval.in/219153)
<shevy> I think I read in the pickaxe that before #initialize is called, allocate is called. can one modify allocate() to change literal syntax?
<jhass> christmas is saved!
ndrei has joined #ruby
* btcctf looks into allocate()
<shevy> btcctf I don't think I have seen anyone modify allocate before... unless perhaps the old pickaxe example but I dont recall what they wrote
<shevy> probably just an explanation
tier has joined #ruby
<shevy> oh nope
<shevy> ok... it is even available for all classes it seems
<jhass> sure, Class#new is just obj.allocate; obj.initialize(*args); obj
<Hanmac> shevy:
<Hanmac> >> Integer.allocate
<eval-in__> Hanmac => allocator undefined for Integer (TypeError) ... (https://eval.in/219154)
patrick99e99 has joined #ruby
<shevy> are Integers objects
<shevy> hmm
startupality has joined #ruby
<shevy> >> "abc".allocate
<eval-in__> shevy => undefined method `allocate' for "abc":String (NoMethodError) ... (https://eval.in/219155)
tkuchiki has quit [Ping timeout: 265 seconds]
<shevy> >> String.allocate
<eval-in__> shevy => "" (https://eval.in/219156)
<shevy> yah well...
<Hanmac> shevy: PS: if you are calling allocate without initalize on wx objects from my binding i will kick your butt ;P
<shevy> huh
<shevy> String.allocate will always return an empty string, yes?
<shevy> all with their own unique object_id
<shevy> who is using lilo and who is using grub1 and who is using grub2 here
<btcctf> >> class String; def self.allocate; "lol"; end; end; String.allocate
<eval-in__> btcctf => "lol" (https://eval.in/219157)
<shevy> Hanmac you first - pants down there. you are using grub2 right?
michael_mbp has quit [Excess Flood]
<Hanmac> shevy: isnt lilo and grub1 very much outdated?
<jhass> >>> class String; def self.allocate(*); 'no happy holidays for you'; end; end; eval('"hi"')
<eval-in__> jhass => /tmp/execpad-fdf721e5a062/source-fdf721e5a062:2: syntax error, unexpected '>' ... (https://eval.in/219158)
<jhass> >> class String; def self.allocate(*); 'no happy holidays for you'; end; end; eval('"hi"')
<eval-in__> jhass => "hi" (https://eval.in/219159)
<jhass> still safe! phew
<rpag> >> ObjectSpace.each_object(String).to_a
<shevy> btcctf I guess you won't be able to intercept string literals right?
michael_mbp has joined #ruby
<shevy> Hanmac dunno. I inherited this slackware base from like 2 months ago when I last reinstalled, so I am on lilo right now
<shevy> I find grub simpler somehow :\
<crome> I must say I just love it how a couple of people are brainstorming about a horribly useless and stupid thing :D
patrick99e99 has quit [Ping timeout: 255 seconds]
<shevy> yeah and you even chimed in!
<Hanmac> hah your fault ... i didnt have seen lilo since Suse more than 5-6 years ago
akshaykodali has joined #ruby
<rpag> aw, there's no compact_map in ruby? :(
<btcctf> shevy: no, don't believe so
matchaw_ has joined #ruby
<shevy> btcctf :(
<jhass> rpag: crystal has one :P
<rpag> jhass, yeah :)
<rpag> jhass, that's where i got the idea from, and it's nice
<jhass> dunno, I'm more a .select.map'per myself
<shevy> yes
<shevy> long live the .
<shevy> down with the _ fanatics
<shevy> look at what happens if you can not use . for method calling
<shevy> you end up using crap as namespace delimiter like in php!
timonv_ has joined #ruby
yfeldblum has quit [Remote host closed the connection]
<akshaykodali> Hello guys. I'm in the process of creating a gem named Raudra. You can read about it at http://akshaykodali.github.io/raudra/
Hobogrammer has quit [Ping timeout: 260 seconds]
Timgauthier is now known as timgauthier_away
<akshaykodali> I alone can't complete the gem
yfeldblum has joined #ruby
timgauthier_away has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<akshaykodali> So I'm looking for interested persons who are willing to work with me
matchaw has quit [Ping timeout: 255 seconds]
<akshaykodali> The project is open source and I'm not keen on selling it
<akshaykodali> So I may not be able to pay you
<crome> wow, I see you have already coded some 15 lines
<crome> keep up with the good work!
<akshaykodali> crome: I get the sarcasm
Photism has quit [Quit: Leaving]
<akshaykodali> I started only few hours back
<drizz> I count 16, crome
<btcctf> >> ObjectSpace.count_objects
<eval-in__> btcctf => {:TOTAL=>22064, :FREE=>548, :T_OBJECT=>44, :T_CLASS=>575, :T_MODULE=>22, :T_FLOAT=>7, :T_STRING=>7260, :T_REGEXP=>67, :T_ARRAY=>1080, :T_HASH=>70, :T_STRUCT=>1, :T_BIGNUM=>5, :T_FILE=>18, :T_DATA=>845, ... (https://eval.in/219163)
<jhass> you didn't declare dependencies you use in your gemspec
<akshaykodali> yup
<btcctf> hmm, object space does seem my best hope
<sevenseacat> akshaykodali: you might have a bit more luck if you actually had something to show
<akshaykodali> I'm a college student and I had a class to take
luminor has joined #ruby
<crome> drizz: "some 15" includes 16
<jhass> akshaykodali: if you want to attract people to your project, you should make it useful first
<banisterfiend> rpag you can use flat_map combined with next []
Photism has joined #ruby
<jhass> akshaykodali: and https://github.com/akshaykodali/raudra/blob/master/lib/raudra.rb#L1 is very very very bad manners
<rpag> banisterfiend, that's just weird though
<btcctf> >> ObjectSpace.each_object.to_a
<banisterfiend> rpag yeah it's weird!
<rpag> banisterfiend, and wasteful
timonv_ has quit [Ping timeout: 264 seconds]
<banisterfiend> rpag but it's kinda a cute trick
luminor has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 245 seconds]
<btcctf> >> ObjectSpace.each_object
<eval-in__> btcctf => #<Enumerator: ObjectSpace:each_object(false)> (https://eval.in/219165)
<btcctf> >> ObjectSpace.each_object.first
<eval-in__> btcctf => Errno::ETIME (https://eval.in/219166)
<akshaykodali> jhass: I'm sorry. But what is bad manners?
<jhass> polluting the global namespace with things you don't even own
<btcctf> >> ObjectSpace.each_object.first(20)
<eval-in__> btcctf => [Errno::ETIME, "ETIME", "Errno::ENODATA", Errno::ENODATA, "ENODATA", "Errno::ENOSTR", Errno::ENOSTR, "ENOSTR", "Errno::EBFONT", Errno::EBFONT, "EBFONT", "EDEADLOCK", "Errno::EBADSLT", Errno::EBADSLT, " ... (https://eval.in/219167)
<jhass> total reason to not use a gem at all
<jhass> btcctf: I hope you got your repl for experiments
<jhass> eval-in is not it
<btcctf> ok
danguita has quit [Ping timeout: 250 seconds]
<akshaykodali> jhass: Oh! I didn't know that. Thanks for the knowledge.
robustus|Off is now known as robustus
sar_s has joined #ruby
tuelz has joined #ruby
<akshaykodali> jhass: I accept that I'm not that good a programmer. I started out with ruby maybe like 2 months back
<akshaykodali> jhass: But I'm learning it daily and hope to master it soon
<jhass> btw. ruby convention for indentation is two spaces soft tab
<akshaykodali> jhass: Meanwhile however I am in need of a good ORM for cassandra
<jhass> so you hope other people will code it for you
<jhass> that's not how open source works
Wolland has joined #ruby
<sevenseacat> lol
danguita has joined #ruby
<jhass> that's how consulting works
agjacome has quit [Ping timeout: 264 seconds]
<akshaykodali> jhass: Nope. I hope that interested people will use it and send me feedback like you just did
Wolland has quit [Read error: Connection reset by peer]
<sevenseacat> theres nothing to use
<jhass> "it"
<jhass> ^
Synthbread has quit [Ping timeout: 272 seconds]
<apeiros> /me ponders going more aggressively about eval-in spammers
<rpag> there's nothing there to give feedback on
<apeiros> wtf space…
<sevenseacat> it doesnt do anything
Wolland has joined #ruby
<jhass> apeiros: (friendly) notice is enough in my experience
<jhass> they just don't realize
Timgauthier has joined #ruby
Timgauthier has quit [Client Quit]
<akshaykodali> rpag: As I said, I had a class to take and haven't had the time to properly code anything
haroldwu has quit [Ping timeout: 240 seconds]
<jhass> akshaykodali: that's a silly excuse
<akshaykodali> I just pushed the gem so that the name would be reserved
<jhass> nothing demanded you to ask for contributors at this stage
haroldwu has joined #ruby
spyderman4g63 has joined #ruby
<apeiros> jhass: more like asking somebody to add the following functionality to eval-in: first-time users get a privmsg telling them about irb/pry and that its purpose is for demonstration purposes
<akshaykodali> jhass: So when do you suggest I come back looking for contributors? After I got it working but with some bugs>?
tuelz has quit [Ping timeout: 264 seconds]
KA-EL-MAN has joined #ruby
nonks has joined #ruby
larissa has joined #ruby
<rpag> apeiros, that could be weird, the first time you use it you're told not to use it :D
<apeiros> where first-time user is determined by nick. unregistered nicks time out after N days.
<jhass> akshaykodali: after it does anything useful but might lack features for advanced or easier use
clauswitt has quit [Ping timeout: 255 seconds]
<apeiros> rpag: no. the first time you use it, you're told when to use it. and alternatives for when not to use it.
<jhass> apeiros: sounds reasonable. And fix UTF-8 support while at it :P
<akshaykodali> jhass: Point taken. Bye.
akshaykodali has left #ruby [#ruby]
clauswitt has joined #ruby
<sevenseacat> how odd
Wolland has quit [Ping timeout: 260 seconds]
<apeiros> or maybe even only enable the use of eval-in for registered users
* sevenseacat waits for shevy to start shouting about elitism again
spyderman4g63 has quit [Ping timeout: 265 seconds]
<rpag> >> "☃"
clauswitt has quit [Max SendQ exceeded]
clauswitt has joined #ruby
lxsameer has quit [Ping timeout: 255 seconds]
IrishGringo has quit [Ping timeout: 250 seconds]
<banisterfiend> rpag world-star http://www.youtube.com/watch?v=Czb4rImsph0
<shevy> sevenseacat snob cat!
<sevenseacat> :D
<shevy> I was not paying attention to IRC and man, you folks wrote a whole essay there
<shevy> what is the topic actually :)
benzrf|offline is now known as benzrf
<rpag> banisterfiend, haha shit
robustus is now known as robustus|Off
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mahtennek has joined #ruby
renier has quit [Quit: Textual IRC Client: www.textualapp.com]
rshetty has joined #ruby
charliesome has quit [Quit: zzz]
yfeldblum has joined #ruby
IrishGringo has joined #ruby
yfeldblu_ has joined #ruby
jtdowney has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
rshetty has quit [Ping timeout: 272 seconds]
almostworking has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
yfeldblu_ has quit [Ping timeout: 264 seconds]
sinequanon has joined #ruby
hamakn has joined #ruby
n008f4g_ has joined #ruby
anaeem1 has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
sinequanon has quit [Ping timeout: 244 seconds]
hamakn has quit [Ping timeout: 255 seconds]
mr_rogerz_ has joined #ruby
almostworking has left #ruby ["Leaving"]
unshadow has joined #ruby
IrishGringo has quit [Ping timeout: 255 seconds]
danijoo_ has joined #ruby
almostworking has joined #ruby
dorei has joined #ruby
<unshadow> So, someone has some experience with SSL Offloading to /dev/crypto using ruby-openssl ?
sevenseacat has quit [Ping timeout: 244 seconds]
almostworking has left #ruby [#ruby]
danijoo has quit [Ping timeout: 250 seconds]
sevenseacat has joined #ruby
corehook has joined #ruby
ndrei has joined #ruby
lxsameer has quit [Quit: Leaving]
hamakn has joined #ruby
mahtennek has quit []
AlSquirrel has joined #ruby
anaeem1 has quit [Remote host closed the connection]
<jtdowney> unshadow: are you using a version of openssl that is patched to use /dev/crypto ?
ndrei has quit [Ping timeout: 245 seconds]
<unshadow> yeha, should I just configure OPENSSL::Engine ?
iwishiwerearobot has joined #ruby
yfeldblum has joined #ruby
<jtdowney> if your openssl has it as an engine it should just be OpenSSL::Engine.load("cryptodev")
desp has quit [Quit: This computer has gone to sleep]
xrlabs has quit [Ping timeout: 264 seconds]
claymore has quit [Quit: Leaving]
jtdowney has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
iwishiwerearobot has quit [Ping timeout: 260 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
freerobby has joined #ruby
ndrei has joined #ruby
tuelz has joined #ruby
mr_rogerz_ has quit [Ping timeout: 240 seconds]
tier has quit [Remote host closed the connection]
twistedpixels is now known as zz_twistedpixels
jottr_ has quit [Ping timeout: 244 seconds]
josephndenton has joined #ruby
tuelz has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
ta has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
unshadow has quit [Quit: leaving]
josephndenton has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
takle has joined #ruby
jheg has joined #ruby
atmosx has quit [Quit: Lost in trance]
spastorino has joined #ruby
coderhs has joined #ruby
coderhs has quit [Read error: Connection reset by peer]
corehook has quit [Remote host closed the connection]
jottr_ has joined #ruby
lkba has joined #ruby
benzrf is now known as benzrf|offline
dc_ has quit [Remote host closed the connection]
nateberkopec has joined #ruby
corehook has joined #ruby
anaeem1_ has joined #ruby
davedev24_ has joined #ruby
timonv_ has joined #ruby
sar_s has quit [Ping timeout: 250 seconds]
corehook has quit [Ping timeout: 258 seconds]
shazaum has joined #ruby
rpag has quit [Ping timeout: 250 seconds]
lemur has quit [Read error: Connection reset by peer]
lemur has joined #ruby
Wolland has joined #ruby
mostlybadfly has joined #ruby
Wolland has quit [Read error: Connection reset by peer]
Wolland_ has joined #ruby
wiz- has joined #ruby
<wiz-> Hi, getting Error installing RedCloth, Failed to build gem native extension. Any ideas?
jimbach has joined #ruby
desp has joined #ruby
jenrzzz_ has joined #ruby
<KA-EL-MAN> RedCloth, haven't seen that gem along time
<KA-EL-MAN> was the author not _why the lucky stiff?
<wiz-> I'm very new to Ruby, trying to install Octopress and Jekyll, which requires Ruby.
<wiz-> But as luck have it, install is failing for me.
rkalfane has joined #ruby
Wolland_ has quit [Ping timeout: 245 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
shazaum has quit [Quit: This computer has gone to sleep]
tkuchiki has joined #ruby
dc_ has joined #ruby
mostlybadfly has quit [Ping timeout: 260 seconds]
rpag has joined #ruby
<shevy> KA-EL-MAN I think so
tyll_ is now known as tyll
timonv_ has quit [Ping timeout: 258 seconds]
<shevy> KA-EL-MAN you can still partially see it: http://rubygems.org/gems/RedCloth
zz_twistedpixels is now known as twistedpixels
timonv_ has joined #ruby
patrick99e99 has joined #ruby
<jhass> wiz-: well, you know we can't magically see your screen to see the real error message?
<KA-EL-MAN> because of Why, i came into contact with ruby, and for the first time i enjoyed progamming :)
<wiz-> sec!
mostlybadfly has joined #ruby
tkuchiki has quit [Ping timeout: 255 seconds]
startupality has quit [Quit: startupality]
thsig has joined #ruby
cirn0 has joined #ruby
<jhass> wiz-: look out for a package like ruby-dev or ruby-devel
<shevy> KA-EL-MAN yah well - I dunno why he got so scared of his identity
<wiz-> Trying to install on LMDE latest version
<jhass> you lack the basic build system for native extensions
<shevy> I wouldn't care who he is or what. I mean I use ruby because the language is cool, what do I care about personal iconification - got to reboot now to test out this new kernel
shevy has quit [Quit: ""]
yfeldblum has joined #ruby
patrick99e99 has quit [Ping timeout: 258 seconds]
<wiz-> jhass, how can I fix that? ruby --version shows that I have ruby 1.9.3p484 (2013-11-22 revision 43786) [x86_64-linux]
<jhass> jhass │ wiz-: look out for a package like ruby-dev or ruby-devel
xrlabs has joined #ruby
<wiz-> ok, installing now
<wiz-> ah that solved it for me! :) Thank you jhass
mib_mib has joined #ruby
sinkensabe has joined #ruby
spyderman4g63 has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
sinkensabe has quit [Client Quit]
phutchins has joined #ruby
andrewlio has quit [Remote host closed the connection]
sar_s has joined #ruby
lkba has quit [Ping timeout: 265 seconds]
Scotteh has quit [Ping timeout: 244 seconds]
spyderman4g63 has quit [Ping timeout: 260 seconds]
Scotteh has joined #ruby
danijoo has joined #ruby
ptrrr has quit [Quit: ptrrr]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Wolland has joined #ruby
tuelz has joined #ruby
shazaum has joined #ruby
danijoo_ has quit [Ping timeout: 250 seconds]
nateberkopec has quit [Quit: Leaving...]
desp has quit [Quit: This computer has gone to sleep]
agjacome has joined #ruby
josephndenton has joined #ruby
Wolland has quit [Ping timeout: 258 seconds]
tuelz has quit [Ping timeout: 244 seconds]
ndrei has joined #ruby
rshetty has joined #ruby
Scotteh_ has joined #ruby
shazaum has quit [Quit: Leaving]
Scotteh has quit [Ping timeout: 264 seconds]
josephndenton has quit [Ping timeout: 245 seconds]
drawingthesun has quit [Ping timeout: 265 seconds]
Hanmac has quit [Ping timeout: 265 seconds]
freerobby has quit [Quit: Leaving.]
<wiz-> New error on install.. https://gist.github.com/anonymous/a7aa7c10dced357c30d5 | I did install execjs as prompted, but doesn't seem to use/find it
rshetty has quit [Ping timeout: 245 seconds]
<pontiki> execjs is not itself a js runtime
<pontiki> execjs is, in fact, the thing telling you to install a JS runtime
<pontiki> my advice, install node.js and be done
<pontiki> my other advice, unsolicited, is don't bother with octopress. just use the new jekyll
<wiz-> pontiki, I might just do that honestly, Octopress seems outdated
<pontiki> OP still uses jekyll 0.12, we're up to 2.5 now
<wiz-> Not sure how I can remove Octopress now though hehe
Scotteh_ has quit [Ping timeout: 244 seconds]
<pontiki> it's just a git clone...
<pontiki> rm -rf the octopress dir
<wiz-> yep
Scotteh has joined #ruby
rkalfane has joined #ruby
<pontiki> we also have our own irc channel: #jekyll
thsig has quit [Remote host closed the connection]
jimbach has quit [Remote host closed the connection]
jottr_ has quit [Ping timeout: 264 seconds]
Meeh has quit [Ping timeout: 260 seconds]
Nieralyte has quit [Quit: Nieralyte]
Meeh has joined #ruby
mr_foobar_baz has joined #ruby
sevenseacat has quit [Quit: Leaving.]
spider-mario has quit [Ping timeout: 250 seconds]
banister has joined #ruby
xcesariox has joined #ruby
Hanmac has joined #ruby
nateberkopec has joined #ruby
thsig has joined #ruby
xenomorph is now known as {xenomorph}
dangerousdave has joined #ruby
jheg has quit [Quit: jheg]
zybi1 has joined #ruby
shevy has joined #ruby
<shevy> wow
<shevy> now that reboot almost failed
timonv_ has quit [Remote host closed the connection]
cirn0 has quit [Remote host closed the connection]
<shevy> I found out that you can simply do: linux init=/bin/bash and reset the superuser password \o/
spider-mario has joined #ruby
timonv_ has joined #ruby
<pontiki> isn't that fun? :)
<shevy> dunno... 10 minutes ago I thought I'd have to reinstall altogether
<shevy> no logins worked at all
it0a has joined #ruby
<shevy> now I know why people use "make oldconfig"
<shevy> my newly compiled kernel works except for being unable to see eth-devices like eth0
hmsimha has quit [Quit: Leaving]
<jnylen> best way to do this? @programmes[p.channels_id] << p
<jnylen> @programmes being []
<shevy> is this not good?
<Hanmac> jnylen: are you sure @programmes should not be a Hash or something?
<shevy> perhaps he has an Array there
vyorkin has joined #ruby
<Hanmac> because if its an array, @programmes[p.channels_id] << p will not work
porfa has joined #ruby
<mbr> as Hanmac said, unless it's two dimensional array
yfeldblum has joined #ruby
<jhass> well, it could be an array of numbers and he wants to right shift by p...
<jnylen> I was meaning to do @programmes[channel_id] which have all the programmes for that specific channel than just foreaching them in a view
nonks has quit [Ping timeout: 250 seconds]
xrlabs has quit [Ping timeout: 240 seconds]
quazimodo has joined #ruby
<quazimodo> yo
<quazimodo> anyone awake?
<jhass> you are
<quazimodo> so I'm a bit stuck here
timonv_ has quit [Ping timeout: 260 seconds]
<Cat_1> Stuck how?
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Chibi_Uli is now known as Ulrike_Rayne
<quazimodo> I've been using REXML to parse some xml doc and query it. Now my problem is the same one as with nested hashes, what happens when a node doesn't exist... then I can't do further logic requiring a billion ifs
wiz- has left #ruby ["Leaving"]
jamto11 has joined #ruby
<quazimodo> for example xml.elements["rsp/photos"].attributes["total"] ... i need to now do unless xml.elements["rsp/photos"].blank?
<Cat_1> Is the node optional?
yfeldblum has quit [Ping timeout: 255 seconds]
<quazimodo> Cat_1: not really - should I screen for it early and throw an error if it's not there?
<Cat_1> You can say something like raise MalformedXMLException unless node.children.exists?
<Cat_1> or something like that
<Cat_1> It's why I hate XML parsers, they make life hard. :-p
<mib_mib> hi - i keep getting this output with rspec as a warning - whats the right way to deal with this without just turning off warnings altogether? : .rvm/gems/ruby-2.1.0/gems/celluloid-0.16.0/lib/celluloid/tasks.rb:79: warning: global variable `$CELLULOID_DEBUG' not initialized
pandaant has quit [Remote host closed the connection]
<jhass> mib_mib: open an issue with celluloid
<mib_mib> jhass its already been open since march
<mib_mib> do i just need to patch it locally
jenrzzz_ has quit [Ping timeout: 250 seconds]
<jhass> then send a PR fixing it
<mib_mib> i tried setting $CELLULOID_DEBUG = nil
<mib_mib> in my initializer but it doesn't seem to solve it
jimbach has joined #ruby
<Cat_1> @quazimodo you can also try using xpath verifications to verify all the elements are present before you parse the XML
<jhass> mib_mib: your initializer probably runs after it
<jhass> anyway, fix upstream
<mib_mib> jhass yeah true - i guess i'll try that
<quazimodo> Cat_1: alternatively, these guys could have duck typed it instead of throwing around crappy ass nils
<Cat_1> Monkey patch is your friend.
<Cat_1> :)
<Cat_1> If you don't like the way they did it you can always monkey patch the gem it to suit your environment.
mary5030 has joined #ruby
wjimenez5271 has joined #ruby
dangerousdave has joined #ruby
<quazimodo> lol
<quazimodo> i don't know xpath very well
subopt1 has joined #ruby
oliver3 has quit [Remote host closed the connection]
<mib_mib> jhass - i tried putting it in application.rb at the top, i.e. $CELLULOID_DEBUG = false - still throwing it though...
claymore has joined #ruby
mihok has joined #ruby
<mib_mib> jhass - theoretically this should be before the gem is loaded i would think..
<mihok> Is there a perferred pattern for parsing arbitrary amount of argv options into an array?
govg has quit [Quit: leaving]
<jhass> mib_mib: if standard rails setup, the Bundler.require call loads it
wjimenez5271 has quit [Ping timeout: 258 seconds]
rkalfane has quit [Quit: Textual IRC Client: www.textualapp.com]
<mib_mib> yep - and i set the global before the Bundler.require call ...
danguita has quit [Remote host closed the connection]
<pontiki> mihok: splat it?
Wolland has joined #ruby
twistedpixels is now known as zz_twistedpixels
tuelz has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
atmosx has joined #ruby
<jhass> ARGV.to_a ?
chiel has joined #ruby
chiel has left #ruby [#ruby]
benzrf|offline is now known as benzrf
mtakkman has quit [Remote host closed the connection]
<pontiki> isn't that redundant? :)
tuelz has quit [Ping timeout: 255 seconds]
desp has joined #ruby
rshetty has joined #ruby
Wolland has quit [Ping timeout: 255 seconds]
<pontiki> i know splatting it is, too
<mihok> not familiar with splat but I'll google it
<jhass> mihok: or you could just try to rephrase your question so that it makes more sense ;)
<mihok> does ARGV.to_a return the :name=value or the full argumant (i.e.' --platform=x86' instead of :platform='x86')
<mihok> haha ;)
josephndenton has joined #ruby
<pontiki> maybe what you're looking for is something OptParse
<pontiki> something *like*
<pontiki> ARGV is just an array of command line arguments
<mihok> kk ill google OptionParse
<mihok> OptionParser* rather
<pontiki> or use one of the fancy command line gems
<jhass> slop, trollop, thor
braincrash has quit [Ping timeout: 250 seconds]
spider-mario has quit [Remote host closed the connection]
<atmosx> isn't optparse integrated to ruby2.1.x?
<pontiki> thor, methadone, GLI, slop...
<pontiki> it's stdlib, atmosx
<jhass> like, forever
<atmosx> cool, why not go optparse then?
<jhass> did you look at its API? :P
<atmosx> Nah, I use it for a very old project of mine :-P
<atmosx> used it
<pontiki> just as with perl, there's a million option parser libs :)
<atmosx> but i'll take your word for it lol
dkb20k has quit [Remote host closed the connection]
<pontiki> i have used methadone a fair bit. also been using thor more lately for generator-type things (not all rails)
byprdct has joined #ruby
jottr_ has joined #ruby
danguita has joined #ruby
<pontiki> brilliant OOCT that
jottr_ has quit [Ping timeout: 250 seconds]
byprdct has quit [Ping timeout: 244 seconds]
<rpag> jesus did someone release a library called methadone?
havenwood has joined #ruby
<pontiki> yes
<rpag> hahahaha
<rpag> thats great
<rpag> if only because people end up saying, 'i have used methadone a fair bit...'
<pontiki> exactly
<benzrf> ooct?
<pontiki> if only it weren't such a useful way of bootstrapping a coomand line tool
<pontiki> Out-of-context Theatre
<benzrf> out of character, there
<pontiki> well, you can invent your own meaning if you wish
gaganjyot has joined #ruby
fandi has quit [Read error: Connection reset by peer]
fandi_ has joined #ruby
byprdct has joined #ruby
byprdct has quit [Max SendQ exceeded]
byprdct has joined #ruby
mary5030 has quit [Remote host closed the connection]
fuhgeddaboudit has joined #ruby
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
Scotteh_ has joined #ruby
corehook has joined #ruby
<atmosx> Do we have any method which gives me the inverse result of '-' for strings?
<jhass> ?
<atmosx> jhass: wait I'll write the first implementation and we'll see if it's possible to optimize the code
corehook has quit [Client Quit]
corehook has joined #ruby
Scotteh has quit [Ping timeout: 255 seconds]
davedev24_ has quit [Read error: Connection reset by peer]
ChoiKyuSang has quit [Quit: Going offline, see ya! ( www.adiirc.com]
rshetty has quit [Ping timeout: 250 seconds]
davedev24_ has joined #ruby
ChoiKyuSang has joined #ruby
clauswit_ has joined #ruby
mtakkman has joined #ruby
jimbach has quit [Remote host closed the connection]
dangerousdave has joined #ruby
Scotteh__ has joined #ruby
clauswit_ has quit [Max SendQ exceeded]
clauswit_ has joined #ruby
yfeldblum has joined #ruby
rshetty has joined #ruby
clauswitt has quit [Ping timeout: 265 seconds]
Scotteh_ has quit [Ping timeout: 244 seconds]
gsd has joined #ruby
gsd has quit [Remote host closed the connection]
poulet_a has joined #ruby
clauswit_ has quit [Max SendQ exceeded]
gsd has joined #ruby
Gadgetoid has quit [Ping timeout: 245 seconds]
clauswitt has joined #ruby
vyorkin has quit [Read error: Connection reset by peer]
kasperti_ has joined #ruby
silkfox has joined #ruby
tkuchiki has joined #ruby
jheg has joined #ruby
nonks has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
vyorkin has joined #ruby
spyderman4g63 has joined #ruby
dc_ has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
mihok has quit [Ping timeout: 264 seconds]
mr_rogerz_ has joined #ruby
DrewDr1248 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
Gadgetoid_ has joined #ruby
spyderman4g63 has joined #ruby
patrick99e99 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tkuchiki has quit [Ping timeout: 244 seconds]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
vectra has joined #ruby
mihok has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
nonks has quit [Ping timeout: 250 seconds]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
johnzorn has joined #ruby
spyderman4g63 has joined #ruby
<atmosx> awesome!!!!!
spyderman4g63 has quit [Remote host closed the connection]
<atmosx> BioRuby support match_line clusalw syntax yay!
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
mr_rogerz_ has quit [Ping timeout: 250 seconds]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
patrick99e99 has quit [Ping timeout: 264 seconds]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
larissa has quit [Quit: Leaving]
bogeyd6 has joined #ruby
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spyderman4g63 has joined #ruby
kasperti_ has quit []
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
dangerousdave has joined #ruby
mtakkman has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
timonv_ has joined #ruby
albs22 has joined #ruby
albs22 has quit [Read error: Connection reset by peer]
desp has quit [Quit: This computer has gone to sleep]
davedev24_ has quit [Read error: Connection reset by peer]
tuelz has joined #ruby
davedev24_ has joined #ruby
danijoo_ has joined #ruby
Wolland has joined #ruby
mikepack has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
danijoo has quit [Ping timeout: 250 seconds]
Jake232 has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bbloom_ has quit [Quit: Textual IRC Client: www.textualapp.com]
JohnBat26 has joined #ruby
atomical has joined #ruby
ixolit has joined #ruby
pushpak has joined #ruby
Wolland has quit [Ping timeout: 244 seconds]
timonv_ has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
timonv_ has joined #ruby
mib_mib has quit [Ping timeout: 244 seconds]
fuhgeddaboudit has quit [Ping timeout: 255 seconds]
DrewDr1248 has quit [Ping timeout: 244 seconds]
mib_mib has joined #ruby
devdazed has joined #ruby
gccostabr has joined #ruby
zz_twistedpixels is now known as twistedpixels
gccostabr has quit [Read error: Connection reset by peer]
gccostabr has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hamakn has quit [Remote host closed the connection]
hamakn has joined #ruby
ecstatic1essimst has joined #ruby
thsig has quit [Remote host closed the connection]
vyorkin has quit [Ping timeout: 255 seconds]
hamakn has quit [Ping timeout: 244 seconds]
o0oo0o has quit [Ping timeout: 250 seconds]
serialsito has quit [Ping timeout: 250 seconds]
jamto11 has quit [Remote host closed the connection]
Jake232 has joined #ruby
rkalfane has joined #ruby
ndrei has quit [Ping timeout: 245 seconds]
vyorkin has joined #ruby
lpaste has quit [Ping timeout: 260 seconds]
ClarusCogitatio has joined #ruby
dc_ has joined #ruby
twistedpixels is now known as zz_twistedpixels
yfeldblum has joined #ruby
jottr_ has joined #ruby
lpaste has joined #ruby
johnzorn has quit [Ping timeout: 244 seconds]
jonr22 has joined #ruby
jenrzzz has joined #ruby
timonv_ has quit [Remote host closed the connection]
gccostabr has quit [Quit: See you later!]
krz has quit [Quit: WeeChat 1.0.1]
ClarusCogitatio has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Ping timeout: 250 seconds]
zz_twistedpixels is now known as twistedpixels
jottr_ has quit [Ping timeout: 264 seconds]
moritzs has quit [Remote host closed the connection]
clauswit_ has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
lkba has joined #ruby
banister has quit [Quit: Textual IRC Client: www.textualapp.com]
mistermocha has joined #ruby
clauswit_ has quit [Max SendQ exceeded]
serialsito has joined #ruby
o0oo0o has joined #ruby
spastorino has quit [Quit: Connection closed for inactivity]
clauswitt has quit [Ping timeout: 265 seconds]
clauswitt has joined #ruby
byprdct has quit []
{xenomorph} has quit [Ping timeout: 260 seconds]
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AndChat| has joined #ruby
{xenomorph} has joined #ruby
serialsito has quit [Ping timeout: 250 seconds]
karunamon has quit [Quit: ZNC - http://znc.in]
mib_mib has quit [Ping timeout: 244 seconds]
lolmaus has quit [Ping timeout: 240 seconds]
Jake232 has joined #ruby
ClarusCogitatio has joined #ruby
mib_mib has joined #ruby
johnzorn has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
jamto11 has joined #ruby
banister has joined #ruby
mistermocha has quit [Remote host closed the connection]
serialsito has joined #ruby
byprdct has joined #ruby
mtakkman has joined #ruby
oracal has joined #ruby
lolmaus has joined #ruby
moritzs has joined #ruby
codecop has joined #ruby
clauswitt has quit [Max SendQ exceeded]
ecstatic1essimst has quit [Ping timeout: 264 seconds]
clauswitt has joined #ruby
jonr2219 has quit []
{xenomorph} has quit [Ping timeout: 260 seconds]
serialsito has quit [Ping timeout: 250 seconds]
clauswitt has quit [Max SendQ exceeded]
mib_mib has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
{xenomorph} has joined #ruby
Wolland has joined #ruby
clauswitt has joined #ruby
cantonic has joined #ruby
Squarepy has joined #ruby
clauswitt has quit [Max SendQ exceeded]
turboTrust has joined #ruby
clauswitt has joined #ruby
govg has joined #ruby
ndrei has joined #ruby
Wolland has quit [Ping timeout: 244 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
clauswitt has quit [Max SendQ exceeded]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
josephndenton has quit [Ping timeout: 265 seconds]
Xeago has joined #ruby
clauswitt has joined #ruby
maestrojed has joined #ruby
xcesariox has quit [Remote host closed the connection]
ixolit has quit []
clauswitt has quit [Max SendQ exceeded]
lolmaus has quit [Ping timeout: 240 seconds]
nonks has joined #ruby
clauswitt has joined #ruby
JohnBat26 has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
tuelz has quit [Ping timeout: 260 seconds]
dangerousdave has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
lolmaus has joined #ruby
rshetty has quit [Remote host closed the connection]
andrewlio has joined #ruby
St_Marx has joined #ruby
bMalum_ has joined #ruby
turboTrust has quit [Quit: Textual IRC Client: www.textualapp.com]
bMalum has quit [Ping timeout: 255 seconds]
bMalum_ is now known as bMalum
calahan has joined #ruby
lolmaus_ has joined #ruby
cerberblue has joined #ruby
rshetty has joined #ruby
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lolmaus has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
sar_s has quit [Ping timeout: 256 seconds]
mtakkman has quit [Remote host closed the connection]
ptrrr has joined #ruby
lolmaus_ has quit [Read error: Connection reset by peer]
lolmaus__ has joined #ruby
poweratom_ has joined #ruby
ptrrr has quit [Client Quit]
yfeldblum has quit [Ping timeout: 258 seconds]
MattB2 has joined #ruby
jenrzzz has joined #ruby
supersym has quit [Ping timeout: 260 seconds]
renderful has joined #ruby
edwardloveall has joined #ruby
supersym has joined #ruby
Squarepy has quit [Remote host closed the connection]
eka has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
karunamon has joined #ruby
poulet_a has quit [Ping timeout: 265 seconds]
rshetty has quit [Remote host closed the connection]
timonv_ has joined #ruby
renderful has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
johnzorn has quit [Ping timeout: 272 seconds]
vince_ has joined #ruby
sinequanon has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kireevco has quit [Quit: Leaving.]
mrgrieves has quit [Ping timeout: 265 seconds]
supersym has quit [Quit: WeeChat 1.0.1]
rkazak has joined #ruby
tkuchiki has joined #ruby
vyorkin has quit [Read error: Connection reset by peer]
mrgrieves has joined #ruby
vyorkin has joined #ruby
danijoo has joined #ruby
tuelz has joined #ruby
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
weemsledeux has joined #ruby
weemsledeux has joined #ruby
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
eka has joined #ruby
spyderman4g63 has joined #ruby
calahan has quit []
tkuchiki has quit [Ping timeout: 255 seconds]
spyderman4g63 has quit [Remote host closed the connection]
danijoo_ has quit [Ping timeout: 250 seconds]
spyderman4g63 has joined #ruby
gr33n7007h has quit [Ping timeout: 264 seconds]
spyderman4g63 has quit [Remote host closed the connection]
kireevco has joined #ruby
spyderman4g63 has joined #ruby
mtakkman has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
claymore has quit [Ping timeout: 244 seconds]
spyderman4g63 has quit [Remote host closed the connection]
zwer has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
zwer has joined #ruby
tuelz has quit [Ping timeout: 265 seconds]
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
timonv_ has quit [Ping timeout: 244 seconds]
renier has joined #ruby
mary5030 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
claymore has joined #ruby
Gadgetoid_ is now known as Gadgetoid
mtakkman has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
sinequanon has quit [Remote host closed the connection]
spyderman4g63 has quit [Remote host closed the connection]
rkalfane has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spyderman4g63 has joined #ruby
MattB2_ has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
klaut has joined #ruby
gr33n7007h has joined #ruby
MattB2 has quit [Ping timeout: 240 seconds]
klaut has quit [Remote host closed the connection]
klaut has joined #ruby
wjimenez5271 has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Joufflu_ has joined #ruby
kireevco has quit [Quit: Leaving.]
sinequanon has joined #ruby
rkalfane has joined #ruby
Joufflu has joined #ruby
Wolland has joined #ruby
sar_s has joined #ruby
wjimenez5271 has quit [Ping timeout: 245 seconds]
MattB2 has joined #ruby
mottsiu has joined #ruby
jpinnix____ has quit [Ping timeout: 240 seconds]
subopt1 has quit [Quit: Leaving.]
edwardloveall has quit [Quit: Leaving.]
jpinnix____ has joined #ruby
vyorkin has quit [Ping timeout: 255 seconds]
MattB2_ has quit [Ping timeout: 258 seconds]
Wolland has quit [Ping timeout: 245 seconds]
mottsiu has left #ruby [#ruby]
jenrzzz has joined #ruby
phutchins has quit [Ping timeout: 256 seconds]
oracal has quit [Quit: Leaving]
marcdel has joined #ruby
jdj_dk has joined #ruby
jdj_dk has quit [Remote host closed the connection]
jdj_dk has joined #ruby
bluenemo has joined #ruby
bluenemo has joined #ruby
arup_r has quit [Quit: Leaving.]
weemsledeux has joined #ruby
cleopatra has joined #ruby
rkazak has left #ruby [#ruby]
<cleopatra> hello ruby people
jenrzzz has quit [Ping timeout: 264 seconds]
darkswordchris has joined #ruby
<darkswordchris> Hello. Does RVM install MRI?
<jhass> yes
<Cat_1> not unless you tell it to?
<jhass> it can install rubinius and jruby too
<Cat_1> You can alsos install jruby
rbrs has joined #ruby
rbrs has quit [Remote host closed the connection]
iwishiwerearobot has joined #ruby
<darkswordchris> What is the specific command I need? I think I'm doing something wrong. I used "rvm install ruby-2.1"
maestrojed has quit [Quit: Computer has gone to sleep.]
yfeldblum has joined #ruby
Hobogrammer has joined #ruby
jottr_ has joined #ruby
rbrs has joined #ruby
AndChat| has quit [Quit: Bye]
BlackGear has quit [Remote host closed the connection]
lkba has joined #ruby
BlackGear has joined #ruby
<havenwood> darkswordchris: rvm get stable; rvm install ruby-2.1.4
<havenwood> darkswordchris: the RVM channel is #rvm
yfeldblum has quit [Ping timeout: 245 seconds]
iwishiwerearobot has quit [Ping timeout: 260 seconds]
jottr_ has quit [Ping timeout: 244 seconds]
parabolize has joined #ruby
<darkswordchris> ok, so RVM isn't the issue then. When trying to use qmake with pkg-config, I get the error "Project ERROR: Package ruby-2.1 not found." RVm t
edwardloveall has joined #ruby
<darkswordchris> RVM tells me ruby 2.1.4 is installed, ruby --version also returns version 2.1.4
josephndenton has joined #ruby
kireevco has joined #ruby
sinequanon has quit [Remote host closed the connection]
BlackGear has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tuelz has joined #ruby
<havenwood> sounds like it's looking for that particular package, not just any ruby 2.1.x
Jameser` has joined #ruby
gaganjyot has quit [Quit: Leaving]
timonv_ has joined #ruby
Jameser has quit [Read error: Connection reset by peer]
pdtpatrick has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
josephndenton has quit [Ping timeout: 250 seconds]
kireevco has quit [Client Quit]
<darkswordchris> havenwood: I can specify the version with a variable, tried the exact one I have and it still didn't work
aspires has joined #ruby
pdtpatrick has quit [Client Quit]
josephndenton has joined #ruby
eduardoboss has joined #ruby
pdtpatrick has joined #ruby
pdtpatrick has quit [Client Quit]
pdtpatrick has joined #ruby
pdtpatrick has quit [Client Quit]
spider-mario has joined #ruby
pdtpatrick has joined #ruby
takle has quit [Remote host closed the connection]
ndrei has quit [Ping timeout: 265 seconds]
weemsledeux has joined #ruby
TPBallbag has joined #ruby
gsd has joined #ruby
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
jonr22 has quit [Remote host closed the connection]
spastorino has joined #ruby
desp has joined #ruby
lolmaus has joined #ruby
weemsledeux has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
lolmaus__ has quit [Read error: Connection reset by peer]
nkumari has joined #ruby
takle has joined #ruby
cantonic has quit [Quit: cantonic]
JBreit has joined #ruby
corehook has quit [Remote host closed the connection]
cantonic has joined #ruby
chishiki has joined #ruby
poweratom_ has quit [Quit: Be back later ...]
maletor has joined #ruby
ClarusCogitatio has quit [Ping timeout: 240 seconds]
j_mcnally has joined #ruby
Akuma has quit [Quit: So long sukkas!]
timonv_ has quit [Ping timeout: 244 seconds]
ClarusCogitatio has joined #ruby
nkumari has quit [Remote host closed the connection]
nkumari has joined #ruby
cantonic has quit [Quit: cantonic]
nonks has joined #ruby
oleo__ has joined #ruby
cantonic has joined #ruby
vectra has quit [Ping timeout: 272 seconds]
ClarusCogitatio has quit [Ping timeout: 255 seconds]
oleo is now known as Guest37634
Wolland has joined #ruby
oleo__ has quit [Read error: Connection reset by peer]
Guest37634 has quit [Ping timeout: 258 seconds]
kireevco has joined #ruby
dreinull has joined #ruby
nonks has quit [Ping timeout: 250 seconds]
DLSteve_ has quit [Quit: Leaving]
ClarusCogitatio has joined #ruby
<dreinull> how do I effectively fill an html table (month) with events taken from x calendars? right now I'm doing it day by day, selecting from each calendar. This is slow. Obviously.
<Xeago> dreinull: that question is why too highlevel
oleo__ has joined #ruby
<dreinull> Xeago: no, not code. Some ideas for the algorithm.
oleo__ is now known as oleo
maestrojed has joined #ruby
<Xeago> I'd just pull events as they need
<apeiros> dreinull: same
Wolland has quit [Ping timeout: 255 seconds]
<Xeago> assuming calendars contain ordered lists of events
<Xeago> even a worst case should not be expensive
<apeiros> dreinull: which algorithm to choose depends highly on which ways to query the calendars have what performance properties
newmanships has joined #ruby
<dreinull> Xeago, apeiros: I'm doing a 12 month overview. so right now I have 7 calendars * 365.
<Xeago> if you're doing a year, do you really need day resolution?
<dreinull> yes
livingstn has joined #ruby
blueOxigen has quit [Ping timeout: 256 seconds]
b3itz has joined #ruby
<Xeago> your calendar must be really slow then
<Xeago> looping over 2500 items isn't that hard
<dreinull> I said I can replace a word doc with all events. Doing it the smart way with digital calendars.
dangerousdave has joined #ruby
<Xeago> (hard for a cpu)
kireevco has quit [Quit: Leaving.]
<apeiros> dreinull: show your current code. show profiling info.
mihok has quit [Read error: Connection reset by peer]
<apeiros> everything else is just shooting in the blue and utterly pointless.
<Xeago> I concur.
<b3itz> hey guys, im using inFile = File.readlines('input.tx') print inFile. But it gives me all the nasty carriage returns or \n. how can i clean this up?
<b3itz> *.txt
mihok has joined #ruby
<apeiros> b3itz: use read instead of readlines
<apeiros> or use puts instead of print
cantonic has quit [Quit: cantonic]
<apeiros> readlines returns an array, not a string
<b3itz> the input.txt is just numbers separated by spaces and there are 4 separate lines
<b3itz> puts worked
<b3itz> ok, now if i need to put each of these lines into an array rather than print them?
kireevco has joined #ruby
<b3itz> each line in one array
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
<apeiros> readline already returns an array of all lines
razieliyo has joined #ruby
<dreinull> The culprit is here: http://j.mp/1zER5HC This takes on my old mbp ~50s. It's called from here: http://j.mp/1zERbin
auxbuss has joined #ruby
ClarusCogitatio has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
<Xeago> dreinull: I\m not even going to look at that function
<apeiros> dreinull: errr, lol? you search *all days in all calendars* on *every day*?
<apeiros> that's silly beyond reason
<dreinull> I do have the same calendar with ri_cal instead of google api client and that's a whole lot faster.
<Xeago> dreinull: the indentation is abysmal
<dreinull> apeiros: as I said...
ClarusCogitatio has joined #ruby
<apeiros> dreinull: I see. I assumed a base level of sanity.
<dreinull> thank you
<dreinull> :)
<apeiros> dreinull: helpers - utterly wrong place to prepare data. so first step is write a proper class which is NOT called in your views.
sinequanon has joined #ruby
<b3itz> apeiros: oh ok. i need to read in a single line as an array and pass it to another def
<apeiros> dreinull: second step: in that class, accept the calendars and the desired range in the constructor
<apeiros> dreinull: third step: have a method which fetches all events from all calendars in that given range and stores it within that class
<Xeago> step zero: format your code
<apeiros> dreinull: third step - well, you're mostly done
claymore has quit [Quit: Leaving]
yfeldblum has joined #ruby
<apeiros> Xeago: reload the page. github sometimes has troubles with the markup
<b3itz> apeiros: would inFile.each_line do |line| work?
<dreinull> apeiros So day by day, all calendars included.
<apeiros> b3itz: yes. also in_file, not inFile. (ruby conventions)
<Xeago> b3itz: that will call the block on each line
canton7 has joined #ruby
canton7 has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
<b3itz> why in_file?
gregf has quit [Quit: WeeChat 1.0.1]
<apeiros> because we use snake_case in ruby, not camelCase
<Xeago> ruby does snake_case
<b3itz> my professor sucks
<b3itz> -_-
<apeiros> :-D
<Xeago> he probably stems from java :>
<apeiros> tell your prof to visit us. we'll unsuck him :-p
<b3itz> thanks!
<b3itz> ye does lol
<apeiros> conventions differ from lang to lang
<Xeago> I'd be glad you're using a somewhat nice language
<apeiros> but when in rome…
<apeiros> yadda yadda…
<b3itz> *he does (stem from java)
nkumari has quit [Remote host closed the connection]
<apeiros> yes, your prof gets massive plus points for using/allowing ruby!
nkumari has joined #ruby
<b3itz> i used java a lot last year. i guess i just carried it over as well lol
<b3itz> well, its an admin scripting class we have to take
<apeiros> work or majoras mask… hmmm… difficult decision.
jenrzzz has quit [Ping timeout: 250 seconds]
<b3itz> brb
b3itz has quit [Quit: Page closed]
Avahey has joined #ruby
<atmosx> apeiros: emulator or N64?
<apeiros> emulator on wii u
JBreit has left #ruby ["Leaving"]
ClarusCogitatio has quit [Ping timeout: 264 seconds]
<atmosx> I see
<atmosx> majora's mask is the worst title imho, of the series :-P
<atmosx> but anyway, enjoy (whatever you do)
<apeiros> n64, gbc, gba, 3ds are the zeldas I missed. gotta catch up there :D
<dreinull> I might add that the last link was a slim file. So there's nothing to indent or reformat. It uses indentation for hierarchy.
yfeldblum has quit [Ping timeout: 244 seconds]
<apeiros> my favorite is still link to the past
IrishGringo has joined #ruby
ClarusCogitatio has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dreinull> to keep some dignity :)
* Xeago hails to link to the past
<atmosx> apeiros: that's the SNES title right/
<atmosx> apeiros: that's my favorite too.
<Xeago> atmosx: yes
<apeiros> atmosx: yupp
<apeiros> the worst is still zelda 2, on the NES
<atmosx> apeiros: did you ever managed to open a box, from kokoriko village?
* Xeago still has a working snes and link to the past rom :D
dangerousdave has joined #ruby
<apeiros> tried it again on the emu on wii. didn't manage to play it through.
<atmosx> apeiros: a box that comes with you wherever you go (within the village iirc)
<apeiros> Xeago: I only have the snes part :(
decoponio has quit [Quit: Leaving...]
<apeiros> atmosx: of course. I solved everything :D
b3itz has joined #ruby
<Xeago> apeiros: the rom goes for $5
<apeiros> atmosx: you have to go to the thieve in the desert
<apeiros> atmosx: the one who doesn't talk
<b3itz> is there a way in linux to have 4 windows snapped in my gui rather than 2?
<b3itz> like, tiled i guess
<Xeago> b3itz: use a tiling window manager?
<b3itz> (ubuntu)
<b3itz> i guess so Xeago
<Xeago> I'm using i3
auxbuss has quit [Quit: I'm gone.]
<Xeago> xmonad is popular too
<atmosx> apeiros: aaah .. . what's in it?!
<apeiros> I think a heart part
silkfox has quit [Ping timeout: 265 seconds]
<b3itz> *quickly downloads i3*
<apeiros> or an empty bottle?
<apeiros> not sure anymore. walkthroughs will tell :)
<apeiros> I think it was an empty bottle
<Xeago> apeiros: don't hax
<Xeago> !
<atmosx> apeiros: there is also another sword level, not master sword, not the re-vamped version there's yet another one
<atmosx> never got that either
bgamari has left #ruby ["Leaving"]
<b3itz> now how do i use it Xeago
<apeiros> Xeago: there were no walkthroughs when I beat it on SNES and found all items!
Vile` has quit [Ping timeout: 260 seconds]
x1337807x has joined #ruby
yfeldblum has joined #ruby
<atmosx> I had to finnish that alone at the time there were no walkthroughs :-P
<apeiros> atmosx: yes, fairy gives you L4 gold sword
<atmosx> no internet in Greece
<atmosx> yeah which fairy?
<atmosx> man I have to do everything all over again lol
<apeiros> not sure, I think the one in the temple where you need the huge bomb
godd2 has joined #ruby
<Xeago> b3itz: I don't know ubuntu, I use plain old debian
<shevy> cool
<shevy> I got a trojan /usr/bin/.sshd
<Xeago> I believ eyou can log out and select the WM in ubuntu
<b3itz> looks like i3 is for the terminal though anyway
<Xeago> b3itz:
<Xeago> ?
<b3itz> like, it looks like it only snaps the terminal? or did i see that wrong
<Xeago> terminals tile very well
<Xeago> b3itz: it snaps windows
<b3itz> oh -_-
<Xeago> it tiles them
melik has joined #ruby
Vile` has joined #ruby
<Xeago> you can run firefox left, and have 3 terminals split in a third on the right
<Xeago> for instnace
<atmosx> nah I had the golden sword okay
henesy has joined #ruby
aspires has quit []
b3itz has quit [Remote host closed the connection]
<atmosx> thought there was yet another
<Xeago> (anyone for a game of dota?)
<apeiros> L1 is the one from your father
* atmosx can go own with his life nw
<apeiros> L2 is the master sword
<apeiros> L3 you get from letting the dwarfs harden your master sword
<atmosx> I still remember the chills when I got the master sword
<apeiros> L4 is gold sword from fairy
ClarusCogitatio has quit [Ping timeout: 264 seconds]
S0da has joined #ruby
* Xeago never got gold sword :<
<apeiros> not sure whether going from L2 to L4 directly works
<apeiros> never tried that :)
<Xeago> I think you can go from L1 to gold?
<Xeago> saw that on a area run I think
ClarusCogitatio has joined #ruby
<atmosx> realy?
<atmosx> that beats the purpose
<atmosx> the fairy is in the light world?
<atmosx> it would made sense if she were int he dark wrld
<Xeago> you can get level2 shield without getting L1 shield
<atmosx> the L2 shield was the big one?
<Xeago> the red one yea
<atmosx> I don't think I ever enjoyed another game so much
<atmosx> wasn't big fan of games anyway
<MattB2> Xeago, apeiros, atmosx - get a room!
<atmosx> MattB2: what room?
<atmosx> possibly one with a big screen
<Xeago> MattB2: we have one :> If there is ruby to be discussed here it'll have precedence
justin__ has joined #ruby
justin__ has quit [Client Quit]
<apeiros> Xeago: I don't see how that'd be possible. need mastersword to get into the dark world
<apeiros> unless you exploit some glitch
codecop has quit [Remote host closed the connection]
<Xeago> apeiros: could very well be glitch'd
<atmosx> so I was right
<atmosx> you need master sword true, to fight the bad fella
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<atmosx> who will ake to the dark world
dangerousdave has joined #ruby
darkswordchris has quit [Quit: Page closed]
benzrf is now known as benzrf|offline
gamzera_ has joined #ruby
cantonic has joined #ruby
ClarusCogitatio has quit [Ping timeout: 258 seconds]
greenride has joined #ruby
<gamzera_> hi ruby guys, I need help with converting string into array
jamto11 has quit [Remote host closed the connection]
<greenride> sample input and output
<greenride> ?
cerberblue has quit [Remote host closed the connection]
ClarusCogitatio has joined #ruby
<Xeago> String#unpack
benzrf|offline is now known as benzrf
<gamzera_> greenride: let me give you my _form code http://pastie.org/private/wg5naoay5hxbvxmnp02sbg# so everything that is inputed into email field and separated with comma(,) should be converted into array ofc.
desp has quit [Quit: This computer has gone to sleep]
<jhass> gamzera_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ help
eduardoboss has quit [Quit: Page closed]
<jhass> gamzera_: pure Ruby solution would be String#split
<gamzera_> jhass: in ruby on rails they told me to come here ://
<greenride> try split(','), but I'm not sure exactly what you're doing.
<greenride> I told him that.
<gamzera_> greenride: is it that I PM you? it will be much easier to explain.
<greenride> With the form stuff, you can ask in RoR.
<apeiros> >> "some,stuff,with,comma,separated".split(/,/)
<eval-in__> apeiros => ["some", "stuff", "with", "comma", "separated"] (https://eval.in/219287)
<apeiros> gamzera_: ^
siwica has joined #ruby
<apeiros> if that's not what you're looking for, then please refine your question
poulet_a has joined #ruby
<greenride> The question needs to be phrased properly. But, I believe split(',') does what you want.
<gamzera_> I sitll think this question fit better in ROR question but okay.
kireevco has quit [Quit: Leaving.]
<greenride> then ask there. it was a suggestion.
<apeiros> well, String#split is core ruby. your context is rails, but that's unnecessary.
<apeiros> i.e., you gave too much context (rare - usually people give too little context)
clauswit_ has joined #ruby
jenrzzz has joined #ruby
clauswit_ has quit [Max SendQ exceeded]
atomical has joined #ruby
mr_rogerz_ has joined #ruby
clauswit_ has joined #ruby
<apeiros> majora's mask, here I come! :D
User458764 has quit [Quit: Textual IRC Client: www.textualapp.com]
spyderman4g63 has joined #ruby
tkuchiki has joined #ruby
<gamzera_> So here is how whole site work. You have 2 fields(email and message). Visitor can fill those fields and press submit, after he done that message and email will be shown on homepage - message won't be actually sent to email. I got that working. Now I want that user can enter multiple emails and separate them with ",". If he for example type 3 emails and separate them with comma that should be shown like 3 different messages - different
<gamzera_> emails, same message of course. So that's I have to do :)
clauswitt has quit [Ping timeout: 250 seconds]
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<MattB2> gamzera_: don't mean to be rude, but you've pretty much had the answer to your assignment spelled out for you at least twice over the last two days.
yfeldblum has quit [Remote host closed the connection]
<MattB2> If you're still not getting, go ask your prof for an easier assignment.
<atmosx> gamzera_: sinatra is your friend
banister has joined #ruby
<atmosx> I'm gonna se 'cast away'
<atmosx> bbl
yfeldblum has joined #ruby
atmosx has quit [Quit: Lost in trance]
nkumari has quit [Remote host closed the connection]
<gamzera_> MattB2: not really.. I know I should use split method .split(',') but I have no idea if I should put it in _form like this <%= f.label :email.split(',') %><br />
<gamzera_> or what..
dangerousdave has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
poulet_a has quit [Quit: Ex-Chat]
justin__ has joined #ruby
devdazed has quit [Quit: Bye]
justin__ is now known as b3itz
jenrzzz has quit [Ping timeout: 260 seconds]
DTSCode has quit [Read error: Connection reset by peer]
<b3itz> so im getting an undefined method on "inFile = File.readlines('input.txt')
<b3itz> inFile.each_line do |line|
<b3itz> puts line
<b3itz> end"
<b3itz> undefined for each_line
patrick99e99 has joined #ruby
spyderman4g63 has quit [Ping timeout: 255 seconds]
DTSCode has joined #ruby
benzrf is now known as benzrf|offline
tkuchiki has quit [Ping timeout: 264 seconds]
nkumari has joined #ruby
<jhass> b3itz: readlines already gives you an array of lines
<jhass> Array does not have a each_line methods since there's no such thing as a line in the context of an array
<gr33n7007h> b3itz, file = File.readlines('input.txt').each {|line| puts line }
TPBallbag has quit [Remote host closed the connection]
lemur has quit [Read error: Connection reset by peer]
<b3itz> is that slide wrong then?
cantonic has quit [Quit: cantonic]
lemur has joined #ruby
nkumari has quit [Remote host closed the connection]
<jhass> it's ugly ruby
<jhass> but not wrong
<b3itz> hes not the greatest
<b3itz> then why won't it run?
patrick99e99 has quit [Ping timeout: 256 seconds]
<jhass> it would run
<jhass> it's not what you do (and not what you should do)
<b3itz> oh -__- i guess i didn't save after editing lol it works
<b3itz> so when i pass inFile into that do, how can i store the line and pass it to another def
nkumari has joined #ruby
<b3itz> does it come out as line or inFile?
<dorei> i'm writing a text file parser, in case of syntax errors should I raise SyntaxError or should I create my own custom exception class?
<jhass> b3itz: so you want to abandon everything I teached you yesterday?
<b3itz> hehehe... this has been a disaster
<b3itz> im trying to start over
<b3itz> small scale
<jhass> good, have fun
nkumari has quit [Remote host closed the connection]
kireevco has joined #ruby
kireevco has quit [Max SendQ exceeded]
kireevco has joined #ruby
<jhass> http://paste.mrzyx.de/pa7ktgqex here's the nice solution you do not want
<gr33n7007h> woohoo!!
brandon_ has quit [Read error: Connection reset by peer]
<jhass> probably with swapped ARGVs
ClarusCogitatio has quit [Ping timeout: 264 seconds]
anaeem1 has joined #ruby
newmanships has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<b3itz> jhass, that looks like it would work, but its just not like what my prof is looking for
jimbach has joined #ruby
<b3itz> at least i don't think
<b3itz> that's too complex
majjoha has quit [Ping timeout: 255 seconds]
<jhass> it's as simple as it gets
<jhass> spreading out the complexity over more lines will not reduce it, it will at most introduce additional complexity
ClarusCogitatio has joined #ruby
newmanships has joined #ruby
<jhass> hiding the operations inside methods will mostly end in giving builtin methods new names
gregf has joined #ruby
gf3 has quit [Ping timeout: 255 seconds]
gf3 has joined #ruby
mary5030 has quit [Remote host closed the connection]
<b3itz> thats just a different path i dont think he wants us to take :/
mr_rogerz_ has quit [Ping timeout: 265 seconds]
anaeem1 has quit [Ping timeout: 240 seconds]
<jhass> yeah, we already figured he writes C in Ruby
<jhass> go ahead and do it
Wolland has joined #ruby
sinequanon has quit [Remote host closed the connection]
cerberblue has joined #ruby
ClarusCogitatio has quit [Ping timeout: 244 seconds]
Wolland has quit [Ping timeout: 244 seconds]
ClarusCogitatio has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sinequanon has joined #ruby
dangerousdave has joined #ruby
<b3itz> jhass, so i have it printing out in arrays just fine, BUT when i put that block into a def FileIO, i can't seem to get it to work
yfeldblu_ has joined #ruby
iwishiwerearobot has joined #ruby
<jhass> don't name methods like constants
<b3itz> ?
<jhass> ThisIsAConstant
jottr_ has joined #ruby
<b3itz> oh snake_whatever_its_called lol
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tier has joined #ruby
<jhass> ClassName, Constant, CONSTANT, variable_and_method, @instance_variable
<b3itz> I'll fix them at some point
<jhass> yeah well, a method that is never called
ClarusCogitatio has quit [Ping timeout: 265 seconds]
<b3itz> thats good insight though. our professor never told us that
yfeldblum has quit [Ping timeout: 250 seconds]
<shevy> man
<shevy> your professor
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<b3itz> i know i know
<b3itz> so i tried adding puts inFile after the fileIO def with no luck
iwishiwerearobot has quit [Ping timeout: 260 seconds]
<jhass> yes
<jhass> local variables are local
<jhass> method definitions start a new scope
max96at is now known as max96at|off
jottr_ has quit [Ping timeout: 244 seconds]
rbrs has quit [Quit: Leaving]
kireevco has quit [Quit: Leaving.]
rbrs has joined #ruby
<b3itz> sooo say i have a variable called 'clean' in my fileIO def, how to i get that into a def createArray
<b3itz> createArray(fileIO)?
hamakn has joined #ruby
<jhass> method arguments & return values
<jhass> you should have slides on that if you're supposed to do that
klaut_ has joined #ruby
<b3itz> im looking :P
newmanships has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
klaut has quit [Ping timeout: 264 seconds]
<jhass> create_array is a bad name btw
<b3itz> i dont really see much
pdtpatrick has quit [Quit: pdtpatrick]
<b3itz> no real clear help in the slides
vyorkin has joined #ruby
<b3itz> and thats what he explicitly told us to name it
<jhass> just saying, so you don't memorize it as good pratice
hamakn has quit [Ping timeout: 264 seconds]
sinequanon has quit [Remote host closed the connection]
klaut_ has quit [Read error: Connection reset by peer]
klaut has joined #ruby
<b3itz> ok, so i have fileIO giving me each line of numbers chomped as 'clean'. how do i get that clean variable to my createArray method
<b3itz> def = method right?
<jhass> the def keyword is used to define a new method
<b3itz> ok
<jhass> and again, return values & method arguments
<b3itz> now how do i get clean, which is in my fileIO method into my createArray method?
<b3itz> >.<
<jhass> return values & method arguments
<b3itz> ok
<b3itz> lol
toretore has joined #ruby
<melik> anyone here use yaml? i'm wondering how to reference another object in the same config file; e.g. "x: foo" and "y: $x"
<melik> so that y returns the value of x
Alina-malina has quit [Ping timeout: 264 seconds]
jimbach has quit [Remote host closed the connection]
maestrojed has quit [Quit: Textual IRC Client: www.textualapp.com]
Scotteh_ has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sinequanon has joined #ruby
<jhass> melik: google yaml anchors
<b3itz> jhass, ok so in my fileIO i did createArray(clean) then i just called createArray and i get Assignment3.rb:29:in `createArray': wrong number of arguments (0 for 1) (ArgumentError)
<jhass> b3itz: you pass an argument to createArray while it expects no argument
<b3itz> nvm
<b3itz> i just called fileIO instead
<b3itz> that worked
bbloom has joined #ruby
<dorei> i'm writing a text file parser, in case of syntax errors should I raise SyntaxError or should I create my own custom exception class? :)
Joufflu has quit [Quit: Leaving]
Scotteh__ has quit [Ping timeout: 272 seconds]
dangerousdave has joined #ruby
s00pcan has quit [Remote host closed the connection]
TheNet has joined #ruby
<Cat_1> Does anyone here use evernote for keeping notes?
desp has joined #ruby
max96at|off has quit [Quit: Bye!]
<tier> started using it recently
jdj_dk has quit [Ping timeout: 264 seconds]
<tier> not sure i like it
_ixti_ has quit [Ping timeout: 256 seconds]
jottr_ has joined #ruby
<jhass> dorei: I'd vote for MyParser::SyntaxError
TPBallbag has joined #ruby
<dorei> jhass: thanx :)
maletor has quit [Quit: Computer has gone to sleep.]
max96at|off has joined #ruby
max96at|off is now known as max96at
sevvie has joined #ruby
Alina-malina has joined #ruby
DTSCode is now known as dTSCode
ben______ has joined #ruby
jottr_ has quit [Ping timeout: 250 seconds]
<b3itz> jhass, help http://pastebin.com/EyW2vAAE
<b3itz> problem lies around line 27
<jhass> ARGV will only ever contain strings
benzrf|offline is now known as benzrf
<jhass> no need to to_s
sinequanon has quit [Remote host closed the connection]
<b3itz> oh good to know
<jhass> you never define new_line
nonks has joined #ruby
jdj_dk has joined #ruby
ben______ has quit [Quit: ben______]
<b3itz> jhass, oops new_line = line_array
<jhass> then you never define line_array
ben_____ has joined #ruby
<jhass> bored, so two utterly verbose versions http://paste.mrzyx.de/pwkva7k4q
<b3itz> ok im confused on how to get these lines back and forth between the methods
<jhass> with return values
jottr_ has joined #ruby
<jhass> >> def foo; :this_is_foos_return_value; end; result = foo(); result
<eval-in__> jhass => :this_is_foos_return_value (https://eval.in/219313)
ben_____ is now known as ancible
<gregf> how can I test if a string is actually json before passing it to JSON.parse so I don't get the parser error?
atomical has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ancible> you are probably best off rescuing the error if it’s not valid
<ancible> it would be very hard to parse it with any certainty that it won’t fail
<jhass> gregf: the quesiton is, why don't you know whether it's valid json?
<b3itz> jhass, ok to back up a little, when i do line_array = clean.split("/\n/").map(&:to_i) i get no output, but when i do line_array = clean.split("/\n/") it works fine
<b3itz> jhass, i need it as an int
nonks has quit [Ping timeout: 250 seconds]
<gregf> ancible: well basically I only get a json blob back from the api if theres an error, but if theres no error returned I just want to continue like normal
<jhass> b3itz: I doubt that either version works fine
<gregf> ancible: so would I rescue the error and just call next?
takle has quit [Remote host closed the connection]
<jhass> I don't think your file contains the string "/\n/"
adriancb has joined #ruby
boombadaroomba has joined #ruby
majjoha has joined #ruby
Alina-malina has quit [Ping timeout: 245 seconds]
<b3itz> jhass, would it be helpful for you to have the input.txt?
<jhass> I don't think so
Alina-malina has joined #ruby
spider-mario has quit [Remote host closed the connection]
atomical has joined #ruby
_ixti_ has joined #ruby
<b3itz> jhass, http://pastebin.com/CUYgQsng that seems to work just fine
maletor has joined #ruby
<b3itz> but those are returned as stings right?
<jhass> if "just fine" == "does nothing useful"
<jhass> "those"?
<b3itz> each line
<jhass> each_line returns, good question
<jhass> it returns the the io object apparently
<b3itz> im sorry, i dont understand
boombadaroomba has quit [Ping timeout: 250 seconds]
ancible has left #ruby [#ruby]
majjoha has quit [Ping timeout: 258 seconds]
<b3itz> jhass, ok, so clean is stored as an array of one single line in the input file right?
<jhass> no
rbrs has quit [Remote host closed the connection]
<b3itz> >.<
<jhass> clean is a local variable
michaeldeol has joined #ruby
<jhass> that ceases to exist when the block is over
nkumari has joined #ruby
<b3itz> right, and holds one single line of the array at a time?
<jhass> there's no array
<jhass> but it'll hold a single line with the trailing newline character removed
Alina-malina has quit [Ping timeout: 255 seconds]
andrewlio has quit [Remote host closed the connection]
hightower4 has quit [Ping timeout: 265 seconds]
Wolland has joined #ruby
<b3itz> ok, how do i go about taking clean and store it as an array? i have clean.split("/\n/")
<parabolize> jhass: why did you use inject(0, :+) rather than reduce(:+)?
bluenemo has quit [Quit: Verlassend]
<jhass> >> [].inject(:+)
<eval-in__> jhass => nil (https://eval.in/219317)
<parabolize> ah
<jhass> reduce and inject are aliases
<b3itz> i dont even know what that means, i grabbed it from another project. i deleted that part already
<jhass> I just always use inject like I always use map instead of collect
ancible has joined #ruby
ancible has left #ruby [#ruby]
phutchins has joined #ruby
<jhass> b3itz: it's short for .inject {|a,b| a+b }
<jhass> >> [1, 2, 3].inject(:+)
<eval-in__> jhass => 6 (https://eval.in/219318)
<b3itz> ok well i took that out completely and want to do it again. i dont know what any of that meant, i have
<b3itz> line_array = clean.split("/\n/")
<jhass> I still do not believe you that your file has "/\n/"
takle has joined #ruby
<jhass> since you do that inside each_line and .chomp, clean will never contain a "\n" anyway
<b3itz> 1. createArray (5points)
<b3itz> i. Purpose: To parse the row of string data into an array of integers
<b3itz> ii. Parameters
<b3itz> 1. rowData: String data type that contains a row of integers separated by a single
<b3itz> space
<b3itz> Hint: Look at the split method of the String data type, but make sure you return an
<b3itz> array of integers
<b3itz> iii. Return type: Array of integers
<b3itz> sorry i kinda flooded lol
yfeldblu_ has quit [Remote host closed the connection]
<jhass> I don't see where that says "/\n/"
yfeldblum has joined #ruby
<b3itz> ok ill try to remove it
<b3itz> anddd it worked
Guest95036 has quit [Changing host]
Guest95036 has joined #ruby
mihok has quit [Read error: Connection reset by peer]
<b3itz> ok how do i get clean into an array of ints
Guest95036 is now known as ArchBeOS
<gr33n7007h> b3itz, ruby -e 'p File.read("input.txt")' and gist it
mihok has joined #ruby
<havenwood> Is this the same conversation as yesterday or just a different person on the same problem?
<havenwood> deja vu
<b3itz> same guy.. same headache
<jhass> havenwood: no, same person throwing all away that was teached because "professor wants it this way"
diegoviola has joined #ruby
<b3itz> i have no idea what that is gr33n7007h but it doesnt look like its what i need lol
Wolland has quit [Ping timeout: 265 seconds]
<gr33n7007h> b3itz, I want to see exaclty what the file holds
phutchins has quit [Ping timeout: 255 seconds]
jokke is now known as the_procrastinat
duncannz has joined #ruby
the_procrastinat is now known as procrastinator
<gr33n7007h> thanks
<havenwood> b3itz: So `ruby` is the executable for the language, Ruby. The `-e` flag lets you run the code that follows (you can read about that and other options under `man ruby`).
max96at has quit [Quit: Bye!]
max96at|off has joined #ruby
<gr33n7007h> What is the full objective of this assignment?
max96at|off is now known as max96at
sevvie has quit [Quit: leaving]
<gr33n7007h> and you didn't run the command I gave you, you simply copied and pasted straight from the text file
jheg has quit [Quit: jheg]
<jhass> gr33n7007h: pretty sure http://paste.mrzyx.de/pa7ktgqex would solve it
<jhass> "too complex"
rajeshchawla has joined #ruby
procrastinator is now known as jokke
duncannz has quit [Read error: Connection reset by peer]
rajeshchawla has quit [Client Quit]
maletor has quit [Quit: Computer has gone to sleep.]
duncannz has joined #ruby
xyh has joined #ruby
<b3itz> i just need a way to take the variable clean and get it into an array of ints
<xyh> in https://www.refheap.com/93002 , if I want to view the test_method as a function of which the argument is an object of BankAccount class, how can I get this function without apply it to an object of BankAccount class ?
<havenwood> b3itz: check the logs from when they were explaining String#split yesterday
<pontiki> o/
<havenwood> \o
<gr33n7007h> \o/
<b3itz> unfortunately ive logged out since
SouL has quit [Remote host closed the connection]
pandaant has joined #ruby
ArchBeOS has left #ruby [#ruby]
<xyh> please
tier has quit [Remote host closed the connection]
<b3itz> i looked at that new = clean.split(' ') gave me no output :(
<jhass> xyh: this is ruby, not javascript
Xeago has quit [Remote host closed the connection]
<jhass> b3itz: that line is not outputting anything
<jhass> it's assigning an array to the local variable new
<xyh> jhass: I do not know javascript. that do you mean by ``this is ruby, not javascript''?
<b3itz> oh der i didnt use puts
max96at has quit [Quit: Bye!]
<xyh> * what
<b3itz> ok so now that prints out each number on its own line
<xyh> jhass: one can does this in javascript ?
<jhass> xyh: it's something you might want to do in javascript. It's nothing you ever want to do in Ruby
<jhass> and not really possible anyway
helpa has joined #ruby
Xeago has joined #ruby
<jhass> xyh: I hoped to provoke an explantion on why you think you need this. Didn't happen, so I ask: Why do you think you need this?
<b3itz> ok, i guess how do i get something split by lines
diegoviola has quit [Remote host closed the connection]
<jhass> #lines, File.readlines, File#each_line
<jhass> you already know!
elemenopy has joined #ruby
hamakn has joined #ruby
<b3itz> so i would use clean.readlines rather than the split method
<b3itz> ?
jenrzzz has joined #ruby
<jhass> no
m8 has quit [Quit: Sto andando via]
<jhass> why do you think clean contains lines?
<xyh> jhass: I am think of the functional paradigm that I familiared with in Scheme.
spyderman4g63 has joined #ruby
<b3itz> clean contains a line of strings
<shevy> is clean a String or an Array
<jhass> xyh: Ruby is a strongly object orientied language, applying functional programming paradigms on the syntax level doesn't work well
<jhass> b3itz: no, clean is a string
<elemenopy> yo jhass lemme know if you want a tough one :)
<shevy> b3itz you can find out - p clean; p clean.class
renderful has joined #ruby
<jhass> elemenopy: don't try to fidn the right person for your problem, just state it
<shevy> give him the tough one
<elemenopy> sorry its for a different channel hes in
<elemenopy> can't post here
<shevy> lol
<mostlybadfly> hola
<xyh> jhass: but it has lambda ?
weaksauce has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 250 seconds]
<shevy> lambda and chips
sarkis has joined #ruby
stephenh has joined #ruby
<jhass> xyh: In Ruby a lambda is an object that represents a chunk of code that has some input parameters and a return value
<jhass> xyh: lamdba itself is in fact a method that generates a Proc object
spyderman4g63 has quit [Ping timeout: 265 seconds]
<sarkis> hey all - i have a string like this - "foo_bar_baz", what's the best way to return "foo_bar_"
<jhass> xyh: you invoke a method (#call) on it to run the associated code
arquebus has joined #ruby
* pontiki watches jhass juggle questions
jamto11 has joined #ruby
<sarkis> or i guess i should say best way to slice
<jhass> sarkis: for a quality answer provide more stricter rules ;)
<sarkis> i want to cut out anything after the last _
<sarkis> ya sorry - bad question lol
Scotteh_ has quit [Ping timeout: 264 seconds]
<canton7> >> p "foo_bar_baz"[/^(.*_).*$/, 1]
<eval-in__> canton7 => "foo_bar_" ... (https://eval.in/219319)
<sarkis> goooood ol regex - thanks canton7
renderful has quit [Ping timeout: 265 seconds]
<canton7> splitting on the last token is a bit anonying iirc
<xyh> jhass: in Scheme a lamdba is also an object that represents a chunk of code that has some input parameters and a return value. you invoke it by (fun arg)
<sarkis> canton7: wheres docs on that [ ] way of slicing
mistermocha has joined #ruby
<canton7> >> p 'foo_bar_baz'.split('_')[0..-2].join('_')
<eval-in__> canton7 => "foo_bar" ... (https://eval.in/219321)
<jhass> xyh: that's what I mean, in scheme you use syntax to invoke it, in ruby most things are just methods
<canton7> >> p 'foo_bar_baz'.split('_')[0..-2].join('_') << '_'
<eval-in__> canton7 => "foo_bar_" ... (https://eval.in/219322)
weaksauce has joined #ruby
<jhass> xyh: a large potion of the syntax even just transforms to method calls
<sarkis> ty
ghostmoth has joined #ruby
hamakn has quit [Remote host closed the connection]
<pontiki> >> x="foo_bar_baz"; x[0..(x.rindex("_")]
<eval-in__> pontiki => /tmp/execpad-1ec3686a1dac/source-1ec3686a1dac:2: syntax error, unexpected ']', expecting ')' ... (https://eval.in/219323)
<pontiki> >> x="foo_bar_baz"; x[0..(x.rindex("_"))]
<eval-in__> pontiki => "foo_bar_" (https://eval.in/219324)
hamakn has joined #ruby
<pontiki> bboooo for intermediate variable
<canton7> >> 'foo_bar_baz'.rpartition('_')[0]
<eval-in__> canton7 => "foo_bar" (https://eval.in/219325)
<jhass> lol
<jhass> first time I see .rpartition in use, good one
* canton7 cheated and used SO for that one :P
<canton7> not for the first two though!
<pontiki> hee, that's not cheating, that's knowing where/how to find answers!
<havenwood> >> 'foo_bar_baz'.rpartition('_')[0..-2].join
<eval-in__> havenwood => "foo_bar_" (https://eval.in/219326)
<canton7> point
agjacome has quit [Ping timeout: 260 seconds]
<pontiki> .rpartition is sort of making me giddy :)
<benzrf> rpartition more like lamepartition
tkuchiki has joined #ruby
<benzrf> >> 'testing this rn'.split ' '
<eval-in__> benzrf => ["testing", "this", "rn"] (https://eval.in/219327)
<pontiki> benzrf more like lamezrf
<benzrf> >> 'testing this rn'.partition ' '
<eval-in__> benzrf => ["testing", " ", "this rn"] (https://eval.in/219328)
<benzrf> pontiki more like plebtiki
<benzrf> >> 'testing this rn'.rpartition ' '
<eval-in__> benzrf => ["testing this", " ", "rn"] (https://eval.in/219329)
<jhass> benzrf: get your local repl already
<benzrf> >> 'testing this rn'.partition /\s/
<eval-in__> benzrf => ["testing", " ", "this rn"] (https://eval.in/219330)
<jhass> benzrf: seriously
<benzrf> i have a local repl but im too lazy to press ctrl shift n
<jhass> next time apeiros sees that it's probably worth a kick ;)
TheNet has quit [Quit: Leaving...]
centrx has joined #ruby
michael_mbp has quit [Excess Flood]
hightower4 has joined #ruby
dangerousdave has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
Scotteh has joined #ruby
<xyh> jhass: I see. and by ``transforms to method calls'' you refer to the implementation tech of ruby ? the core is ``method calls'' and other syntax sugar transforms into that ?
nonks has joined #ruby
tkuchiki has quit [Ping timeout: 265 seconds]
<jhass> xyh: that's partially true but not what I meant. What I mean is that for example an expression like `a == b` is syntatic sugar for `a.==(b)`, that is calling the method #== on a with the argument b
<jhass> and later expression is valid ruby too in fact
jdj_dk has quit [Remote host closed the connection]
<jhass> you can map things like method definitions to method calls (`def foo` becomes `define_method(:foo)`), but those transformations aren't actually applied for efficency reasons
mr_foobar_baz has quit [Ping timeout: 250 seconds]
<xyh> oh! I see
<xyh> jhass: thx for your explain :)
desp has quit [Quit: This computer has gone to sleep]
razieliyo has quit [Quit: Saliendo]
MattB2 has quit [Remote host closed the connection]
nonks has quit [Ping timeout: 250 seconds]
max96at|off has joined #ruby
max96at|off is now known as max96at
aspiers has joined #ruby
Alina-malina has joined #ruby
badhatter has quit [Read error: Connection reset by peer]
majjoha has joined #ruby
Xeago_ has joined #ruby
phutchins has joined #ruby
<gr33n7007h> b3itz, maybe something like this: https://gist.github.com/anonymous/64ac8903fa6806a182d3
rkalfane has quit [Read error: Connection reset by peer]
Vile` has quit [Read error: Connection reset by peer]
dTSCode has quit [Ping timeout: 244 seconds]
rkalfane has joined #ruby
weemsledeux has joined #ruby
weemsledeux has joined #ruby
edwardloveall has left #ruby [#ruby]
DrCode has quit [Ping timeout: 250 seconds]
Vile` has joined #ruby
Adran has quit [Excess Flood]
majjoha has quit [Ping timeout: 250 seconds]
chrishough has joined #ruby
Adran has joined #ruby
zwer has quit [Ping timeout: 250 seconds]
o0oo0o has quit [Ping timeout: 250 seconds]
havenwood has quit [Ping timeout: 250 seconds]
Xeago has quit [Ping timeout: 245 seconds]
MattB2 has joined #ruby
cerberblue has quit [Ping timeout: 250 seconds]
St_Marx has quit [Ping timeout: 250 seconds]
danguita has quit [Ping timeout: 250 seconds]
exgf has quit [Ping timeout: 250 seconds]
avelldiroll has quit [Ping timeout: 250 seconds]
lsmola has quit [Ping timeout: 250 seconds]
nfk has quit [Quit: yawn]
Igneous_ has quit [Ping timeout: 250 seconds]
Wolland has joined #ruby
<gr33n7007h> line in average, deviation, median should be array_of_ints lol
Igneous has joined #ruby
max96at has quit [Quit: Bye!]
Igneous is now known as Guest32568
* gr33n7007h man i need sleep
cashnguns has joined #ruby
stephenh has left #ruby [#ruby]
<sarkis> canton7: im trying to udnerstand what the regex is matching.. "foo_bar_baz"[/^(.*_).*$/, 1]
<sarkis> and what the number does
<sarkis> (.*_) matches foo_?
<sarkis> since it's ^(.*_)
lsmola has joined #ruby
<jhass> sarkis: check String#[]'s docs
jamto11 has quit []
avelldiroll has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
cantonic has joined #ruby
<jhass> the regex matches as much as possible followed by a _ (== the last _), then anything
Wolland has quit [Ping timeout: 258 seconds]
pdtpatrick has joined #ruby
MattB2 has quit []
Scotteh_ has joined #ruby
<sarkis> ah makes sense now
<sarkis> i was confused on which _ is being matched
<sarkis> i was reading the docs on the fixnum - still confused :(
nkumari has quit [Remote host closed the connection]
<sarkis> If the regular expression form is used, the optional second Fixnum allows you to specify which portion of the match to replace (effectively using the MatchData indexing rules.
<b3itz> gr33n7007h, so when i use the inject, i get an undefined method error
<xyh> jhass: according to the above, lambda is less used in ruby not only for the syntax reason, but also for a semantic reason that if a function is define inside a class as a method, then one can not abstract that method to a lambda-function.
<sarkis> so is ^(.*_) = 0 and .*$ = 1?
<gr33n7007h> b3itz, let me check 1sec
<xyh> jhass: I am new to ruby. is it that right ?
<gr33n7007h> works here b3itz
Scotteh has quit [Ping timeout: 272 seconds]
<jhass> xyh: yes, a method is bound to a class and needs an instance of it to run
<gr33n7007h> on both methods
klaut_ has joined #ruby
<jhass> xyh: you should try to understand what blocks are in ruby, that'll make the uses for Proc and lambda pretty clear
<b3itz> clear
<b3itz> oops :P
davasaurous has joined #ruby
Wolland has joined #ruby
klaut has quit [Ping timeout: 255 seconds]
jsaak has quit [Ping timeout: 265 seconds]
<b3itz> gr33n7007h, now im getting a syntax on line 18
jsaak has joined #ruby
<gr33n7007h> give me a minute a check it through proprtly
<apeiros> jhass, benzrf: indeed. it might be that I'm not lazy enough to not kick :-p
<b3itz> gr33n7007h, ok i fixed those syntax errors
max96at|off has joined #ruby
Wolland_ has joined #ruby
<b3itz> now getting one on line 9 for undefined method inject
max96at|off is now known as max96at
duncannz has quit [Ping timeout: 260 seconds]
cantonic has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
cantonic has joined #ruby
st1gma1 has quit [Read error: Connection reset by peer]
jdj_dk has joined #ruby
<gr33n7007h> blitz add a ! after map on line 9
<b3itz> getting a undefined method reduce.. http://pastebin.com/TdnAERid
Wolland has quit [Ping timeout: 265 seconds]
<b3itz> oh
<gr33n7007h> scrapr that idea
weaksauce has quit [Remote host closed the connection]
weaksauce has joined #ruby
larissa has joined #ruby
<b3itz> gr33n7007h, theres no map on line9
<b3itz> looking at your git
st1gma has joined #ruby
st1gma has quit [Max SendQ exceeded]
st1gma has joined #ruby
st1gma has quit [Max SendQ exceeded]
st1gma has joined #ruby
<cleopatra> hello
<waxjar> hi
<b3itz> gr33n7007h, does data contain an array of ints?
jimbach has joined #ruby
<gr33n7007h> yes
<cleopatra> how to?
<waxjar> how to what
<b3itz> gr33n7007h, so then average = data.reduce(:+) / data.size.to_f should work?
<jhass> cleopatra: multiply by five
<cleopatra> hello ruby-guys
<cleopatra> jhass, just be ill ask because my english is bad
<gr33n7007h> yep
<waxjar> b3itz: pay close attention to what your input is, i suspect you're trying to call reduce on a String there
<waxjar> String does not have a #reduce :)
<b3itz> yeah i cant seem to call any sort of calculation on data
Scotteh_ has quit [Ping timeout: 272 seconds]
<b3itz> data.chomp.split(' ').map(&:to_i)
<b3itz> average = data.reduce(:+) / data.size.to_f
<gr33n7007h> b3itz, this is what i get: https://gist.github.com/anonymous/a7819f48b22bf73fa6e3
<cleopatra> would like to know how to extract data using HTTP-GET
<gr33n7007h> without the median method, because i'm too tired to fix it
<b3itz> gr33n7007h, my data variable is coming though as a string
<gr33n7007h> how?
<gr33n7007h> works on my end
gamzera_ has quit [Read error: Connection reset by peer]
<jhass> cleopatra: if you want to do web scraping you should learn XPath and Nokogiri. To quickly download a website use open-uri: require 'open-uri'; html = open('http://www.cne.gob.ve/web/registro_electoral/ce.php?nacionalidad=V&cedula=19206905';, &:read)
<waxjar> b3itz: data there is in the scope of the create_array method only
<b3itz> how do i make it global?
<waxjar> b3itz: your passing your other methods line, that's just a String
<waxjar> b3itz: you don't, you pass it the result of the create_array method
<b3itz> right, so i need to return data from create_array?
<waxjar> it already does, you're just not using it
<cleopatra> thx jhass i ill try and back to you :)
magic has joined #ruby
<b3itz> how do i call it? warreng
<b3itz> oops
<b3itz> waxjar,
<cleopatra> jhass, I want to make a query from my site to this site to validate users by dni
<jhass> is that a question?
<waxjar> b3itz: on line 28-30, you're passing line to the methods, i think you want to pass array_of_ints
<b3itz> i seeeeeeeeeee
tier has joined #ruby
<b3itz> waxjar, can you clean this up for me? (data[data.size-1)].fdiv(2) + data[data.size.fdiv(2)].fdiv(2)
<b3itz> waxjar, nvm
<waxjar> phew
Dude007 has joined #ruby
tier has quit [Remote host closed the connection]
jdj_dk has quit [Ping timeout: 258 seconds]
<b3itz> waxjar, http://pastebin.com/8puhh0Hm how would i output average to the console?
<b3itz> i tried print average
jenrzzz has joined #ruby
barriniphone has joined #ruby
<waxjar> print should work, puts does the same but adds a new line at the end
<jhass> if there's none
jimbach has quit [Remote host closed the connection]
<b3itz> got it
Scotteh has joined #ruby
elemenopy has quit [Remote host closed the connection]
olivier_bK has quit [Ping timeout: 260 seconds]
barriniphone has quit [Client Quit]
jenrzzz has quit [Ping timeout: 250 seconds]
bMalum has quit [Quit: bMalum]
banister has joined #ruby
thsig has joined #ruby
Wolland_ has quit [Remote host closed the connection]
fuhgeddaboudit has joined #ruby