fflush changed the topic of #ruby to: Ruby 1.9.3-p194: http://ruby-lang.org || Paste > 3 lines of text on pastebin.com
manizzle has quit [Ping timeout: 246 seconds]
jonathanwallace has quit [Ping timeout: 255 seconds]
jonathanwallace has joined #ruby
tiripamwe has joined #ruby
manizzle has joined #ruby
BlackShadow has quit [Remote host closed the connection]
hndsmrob has quit [Quit: Linkinus - http://linkinus.com]
phinfonet has joined #ruby
jorge has joined #ruby
nadirvardar has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
icambridge has quit [Read error: Operation timed out]
DarkFoxDK has quit [Read error: Operation timed out]
nacengineer has quit [Read error: Operation timed out]
willb has quit [Read error: Operation timed out]
tectonic has quit [Write error: Broken pipe]
kenichi has quit [Remote host closed the connection]
thomasfedb has quit [Read error: Operation timed out]
GoGoGarrett has joined #ruby
burgestrand has joined #ruby
<GoGoGarrett> is there an easy to way convert each parm to a method to an integer, something like.. attributes.each{|x| x.to_i }
oddmunds has joined #ruby
<GoGoGarrett> but assign that to be used throughout the method
DarkFoxDK has joined #ruby
<phoe6> What's the different between require "module.rb" vs require "module" ( with and without extension). - Sorry for asking agian.
willb has joined #ruby
icambridge has joined #ruby
tectonic has joined #ruby
baphled has quit [Ping timeout: 240 seconds]
jorge has quit [Ping timeout: 246 seconds]
davidcelis has quit [Quit: K-Lined.]
nacengineer has joined #ruby
thomasfedb has joined #ruby
ryanf has joined #ruby
justsee|away is now known as justsee
saneshark has quit [Quit: saneshark]
infinitiguy has quit [Quit: Leaving.]
levity_island has quit [Quit: levity_island]
jgrevich_ has joined #ruby
<Spooner> phoe6 : The only real difference is tht "file.rb" will only load that file. "file" may load "file.rb" or "file.so" (binary library).
Goles has quit [Read error: Connection reset by peer]
jgrevich has quit [Ping timeout: 240 seconds]
jgrevich_ is now known as jgrevich
saneshark has joined #ruby
<Spooner> GoGoGarrett : Not sure what you mean by "but assign that to be used throughout the method"
<GoGoGarrett> like for example I have def blah(a, b, c, d)
<GoGoGarrett> isn't there a variable that contains a, b, c,d
nari has quit [Ping timeout: 246 seconds]
<GoGoGarrett> (can't find it myself, so it may not exist)
<GoGoGarrett> I know I can do method(:blah).paramters
<GoGoGarrett> but that's not exactly what I need
<Spooner> GoGoGarrett : No. Not unless you do def blah(*args)
<GoGoGarrett> Gotcha.
<Spooner> then you could do a, b, c, d = args.map(&:to_i)
<Spooner> But you are better off with a, b, c, d = a.to_i, b.to_i, etc.
phinfonet has quit [Quit: phinfonet]
sgronblo1 has quit [Ping timeout: 250 seconds]
<GoGoGarrett> yeah
<GoGoGarrett> Thanks
Goles has joined #ruby
saneshark has quit [Ping timeout: 246 seconds]
ckrailo has quit [Quit: Computer has gone to sleep.]
jbohn has quit [Quit: Leaving...]
carlyle has joined #ruby
drupin has joined #ruby
<drupin> where is mkmf.log located?
Stalkr_ has joined #ruby
manizzle has quit [Ping timeout: 248 seconds]
jonathanwallace has quit [Remote host closed the connection]
<phoe6> Spooner: Thanks! that helps a lot.
raphie_ has joined #ruby
oz has joined #ruby
Foxandxss has quit [Quit: KVIrc 4.2.0 Equilibrium http://www.kvirc.net/]
<raphie_> anyone know how I can make a TCP client listen for server pushes? or do I have to loop with gets?
saneshark has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<dekz> Anyone familiar with God (process watcher) and why it isn't restarting my process after detecting it's not running?
Stalkr_ has quit [Quit: Leaving...]
carlyle has quit [Remote host closed the connection]
Hawklord has quit [Ping timeout: 276 seconds]
mahmoudimus has joined #ruby
iamjarvo has joined #ruby
manizzle has joined #ruby
niklasb has quit [Quit: WeeChat 0.3.8]
opus has joined #ruby
sdwrage has joined #ruby
randomautomator has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
niklasb has joined #ruby
khakimov has joined #ruby
infinitiguy has joined #ruby
subbyyy has joined #ruby
tomb_ has quit [Quit: Computer has gone to sleep.]
nonotza has quit [Quit: nonotza]
ringotwo has quit [Remote host closed the connection]
ryh has quit [Remote host closed the connection]
tomb_ has joined #ruby
manizzle has quit [Ping timeout: 252 seconds]
saneshark has left #ruby [#ruby]
banisterfiend has joined #ruby
josefig has quit [Quit: Leaving]
jorge has joined #ruby
paolooo has quit [Quit: Page closed]
cbuxton has quit [Quit: Leaving.]
liluo has quit [Read error: Operation timed out]
ringotwo has joined #ruby
voodoofish430 has quit [Ping timeout: 248 seconds]
voodoofish430 has joined #ruby
liluo has joined #ruby
SuperSonicSound has joined #ruby
jorge has quit [Remote host closed the connection]
maletor has joined #ruby
infinitiguy has quit [Quit: Leaving.]
chylli has joined #ruby
joekarma has joined #ruby
adeponte has quit [Remote host closed the connection]
cmyers has left #ruby [#ruby]
ryh has joined #ruby
infinitiguy has joined #ruby
jorge has joined #ruby
shadoi has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
chimkan has joined #ruby
mrsolo has quit [Quit: Leaving]
opus has quit [Quit:]
theRoUS has joined #ruby
Crisewng has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
kjellski_ has joined #ruby
jarred_ has joined #ruby
cantonic_ has joined #ruby
monkegjinni has quit [Read error: Connection reset by peer]
jarred_ has quit [Client Quit]
monkegjinni has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
Goles has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
imami|afk has quit [Ping timeout: 264 seconds]
jarred has quit [Ping timeout: 240 seconds]
joekarma has quit [Quit: joekarma]
liluo has quit [Read error: Connection reset by peer]
kjellski has quit [Ping timeout: 244 seconds]
JetAway has joined #ruby
cantonic has quit [Ping timeout: 240 seconds]
cantonic_ is now known as cantonic
jhunter has quit [Ping timeout: 264 seconds]
CaptainJet has quit [Disconnected by services]
JetAway is now known as CaptainJet
jhunter has joined #ruby
rodj has quit [Quit: rodj]
radic has quit [Excess Flood]
bier has quit [Ping timeout: 264 seconds]
s0ber has joined #ruby
aantix_ has joined #ruby
radic has joined #ruby
bier has joined #ruby
phanousit has joined #ruby
banseljaj has joined #ruby
banisterfiend has quit [Remote host closed the connection]
adamkittelson has quit [Ping timeout: 248 seconds]
mikepack has quit [Remote host closed the connection]
Crisewng has left #ruby [#ruby]
aantix has quit [Ping timeout: 244 seconds]
ringotwo has quit [Remote host closed the connection]
emmanuelux has quit [Ping timeout: 240 seconds]
carlyle has joined #ruby
aantix_ has quit [Ping timeout: 246 seconds]
mfridh has quit [Ping timeout: 255 seconds]
Abbas| has quit [Ping timeout: 246 seconds]
chessguy has joined #ruby
raphie_ has quit [Remote host closed the connection]
Supaku has joined #ruby
Banistergalaxy has joined #ruby
justsee is now known as justsee|away
<Banistergalaxy> Hey guys
justsee|away is now known as justsee
TheTFEF has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
TheTFEF has joined #ruby
pskosinski has quit [Quit: I've got a feeling there's a fish in the floor; I'd better squish it or he'll swim out the door; Sometimes they take me for a walk in the sun; I see my fish and I have to run]
hadees has joined #ruby
hadees has quit [Remote host closed the connection]
Hanmac has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
randomautomator has quit [Remote host closed the connection]
nateberkopec has joined #ruby
hunglin has joined #ruby
monkegjinni has quit [Remote host closed the connection]
hunglin has quit [Client Quit]
liluo has joined #ruby
<fowl> TRANSLATION: "Let's go pay some hookers to knock our junk around!"
phoe6 has quit [Quit: phoe6]
tobym_ has joined #ruby
riginding has quit [Remote host closed the connection]
xorgnak has joined #ruby
maletor has quit [Quit: Computer has gone to sleep.]
Chryson has joined #ruby
williamcotton has quit [Ping timeout: 240 seconds]
savage- has quit [Remote host closed the connection]
apok_ has joined #ruby
drupin has left #ruby ["Leaving"]
Supaku has quit [Quit: Leaving.]
uris has joined #ruby
jjbohn has joined #ruby
apok_ has quit [Client Quit]
williamherry has joined #ruby
williamcotton has joined #ruby
KindOne has quit [Ping timeout: 264 seconds]
sebicas has joined #ruby
apok has quit [Ping timeout: 244 seconds]
theRoUS has quit [Ping timeout: 240 seconds]
chessguy has quit [Remote host closed the connection]
khakimov has quit [Quit: Computer has gone to sleep.]
krusty_ar has quit [Read error: Connection reset by peer]
resure has quit [Remote host closed the connection]
krusty_ar has joined #ruby
lunitikcalm has quit [Remote host closed the connection]
banisterfiend has joined #ruby
burntbit has quit [Quit: Ex-Chat]
nateberkopec has quit [Quit: Linkinus - http://linkinus.com]
mascool has quit [Ping timeout: 244 seconds]
Banistergalaxy has quit [Ping timeout: 246 seconds]
khakimov has joined #ruby
Progster has joined #ruby
nari has joined #ruby
rbanffy has quit [Quit: Ex-Chat]
jorge has quit [Remote host closed the connection]
jarred has joined #ruby
sdwrage has quit [Quit: geekli.st/programmer]
yugui_zzz is now known as yugui
jarred has quit [Client Quit]
carlyle has quit [Remote host closed the connection]
jarred has joined #ruby
sdwrage has joined #ruby
Araxia_ has quit [Quit: Araxia_]
SCommette has joined #ruby
Spooner has quit [Ping timeout: 264 seconds]
jonathanwallace has joined #ruby
<shevy> hah funny
<shevy> foo { x = 'bla' }
<shevy> and I wondered why x was not available ...
<shevy> I should not code when tired
KindOne has joined #ruby
niklasb has quit [Ping timeout: 240 seconds]
subbyyy has quit [Read error: Connection reset by peer]
ssspiff has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
sspiff has quit [Ping timeout: 248 seconds]
adamkittelson has joined #ruby
adamkittelson has quit [Remote host closed the connection]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
joukokar has quit [Ping timeout: 248 seconds]
shadoi1 has joined #ruby
GoGoGarrett has quit [Remote host closed the connection]
mehlah has left #ruby ["Linkinus - http://linkinus.com"]
robert45 has joined #ruby
TorpedoSkyline has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
jrajav has quit []
subbyyy has joined #ruby
phoe6 has joined #ruby
noganex has quit [Ping timeout: 252 seconds]
centipedefarmer has quit [Read error: Connection reset by peer]
dv310p3r has joined #ruby
noganex has joined #ruby
infinitiguy has quit [Quit: Leaving.]
centipedefarmer has joined #ruby
sebicas has left #ruby [#ruby]
Banistergalaxy has joined #ruby
SCommette has quit [Quit: SCommette]
voodoofish430 has quit [Quit: Leaving.]
yugui is now known as yugui_zzz
banisterfiend has quit [Ping timeout: 240 seconds]
jjbohn has quit [Quit: Linkinus - http://linkinus.com]
mxweas has joined #ruby
SeanLazer has joined #ruby
sdwrage has left #ruby [#ruby]
KindOne has quit [Ping timeout: 240 seconds]
<SeanLazer> can somebody give me a hand with an inheritance issue? i'm calling a class method on a parent class but i want a subclass to be able to change its options, as seen here: https://gist.github.com/3232551
<SeanLazer> this doesn't work, it calls with the parent class' options
<SeanLazer> what's the best way to handle a situation like this?
messi has joined #ruby
<messi> ciao
<messi> list
khakimov has quit [Quit: Computer has gone to sleep.]
messi has quit [Client Quit]
macer1 has quit [Remote host closed the connection]
yugui_zzz is now known as yugui
maletor has joined #ruby
jrajav has joined #ruby
jxf has joined #ruby
radic has quit [Disconnected by services]
SCommette has joined #ruby
radic_ has joined #ruby
<phanousit> can anyone explain to me what the method "method" does?
Gab0 has quit [Read error: Connection reset by peer]
radic_ is now known as radic
minijupe has joined #ruby
cj3kim has joined #ruby
yugui is now known as yugui_zzz
<heftig> phanousit: method(:puts) gets you an object embodying the "puts" method
<heftig> that includes the receiver
tcopp has joined #ruby
bricker88 has quit [Quit: Leaving.]
richardr has quit [Ping timeout: 244 seconds]
CaptainJet has quit [Ping timeout: 240 seconds]
stephenjudkins has quit [Quit: stephenjudkins]
cj3kim has quit [Quit: This computer has gone to sleep]
robert45 has quit [Quit: • IRcap • 8.6 •]
CaptainJet has joined #ruby
KindTwo has joined #ruby
SCommette has quit [Quit: SCommette]
idflyfish has joined #ruby
hekin has joined #ruby
<idflyfish> hello
justsee has quit [Ping timeout: 256 seconds]
<idflyfish> I'm looking to learn a new language and it is between ruby and python
tcopp has quit [Quit: leaving]
<idflyfish> any thoughts as too why I should choose ruby?
koshii has quit [Ping timeout: 244 seconds]
<hekin> apeiros_: hi, there?
<idflyfish> hello ap
busybox42 has quit [Remote host closed the connection]
<phanousit> heftig: thanks
davidcelis has joined #ruby
<idflyfish> is this where the hardcore rubyists hang out?
<fowl> no this is where we idle
<idflyfish> hah
<idflyfish> I was wondering when someone was going to speak up
bean has quit [Remote host closed the connection]
<idflyfish> <--- C#/ASP.NET programmer learning ruby
ananthakumaran has joined #ruby
zak_ has left #ruby [#ruby]
<fowl> welcome
<idflyfish> well...leaning towards ruby...thinking about python also
<idflyfish> thanks
bluenemo has quit [Remote host closed the connection]
williamcotton has quit [Ping timeout: 252 seconds]
krusty_ar has quit [Remote host closed the connection]
centipedefarmer has quit [Ping timeout: 255 seconds]
davidcelis has quit [Changing host]
davidcelis has joined #ruby
<fowl> idflyfish: ruby is better than python (imo)
williamcotton has joined #ruby
havenn has joined #ruby
havenn has quit [Remote host closed the connection]
<fowl> one thing is, in python the lambda is limited to one line which is really limiting
<heftig> i prefer python's importing to ruby's requiring
<fowl> repeating self all the time is annoying
stephenjudkins has joined #ruby
<heftig> python's explicit "self" is ugly
<fowl> class X: def foo(self, ..):
<Chryson> idflyfish: have your cake and eat it too. My experience of both: Python is explicit, and Ruby is implicit. It seems a lot easier to hide behavior in Ruby so that you can write short, pretty, declarative code (ie, mixins, code blocks). Python is great for its simplicity and ease-of-use. Python is essentially "executable pseudo-code." Anyway, that's my subjective two cents.
phoe6 has quit [Quit: phoe6]
koshii has joined #ruby
chimkan has quit [Read error: Connection reset by peer]
chimkan has joined #ruby
verbad has joined #ruby
SCommette has joined #ruby
ianbrandt has joined #ruby
stefanp has joined #ruby
stefanp has quit [Changing host]
stefanp has joined #ruby
havenn has joined #ruby
jonathanwallace has joined #ruby
stefanp_ has quit [Ping timeout: 265 seconds]
denysonique has quit [Max SendQ exceeded]
NimeshNeema has quit [Excess Flood]
BrianE has quit [Read error: Operation timed out]
ladder4 has quit [Max SendQ exceeded]
phoe6 has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
Synthead has joined #ruby
KindTwo has quit [Changing host]
KindTwo has joined #ruby
rodj has joined #ruby
KindTwo is now known as KindOne
MetaCosm has quit [Max SendQ exceeded]
SeanLazer has quit [Quit: SeanLazer]
dv310p3r has quit [Ping timeout: 240 seconds]
lectrick has quit [Max SendQ exceeded]
moeSeth has quit [Ping timeout: 246 seconds]
fcoury has quit [Ping timeout: 252 seconds]
regedarek has quit [Ping timeout: 248 seconds]
SeanTAllen has quit [Ping timeout: 248 seconds]
[diecast] has quit [Ping timeout: 246 seconds]
chimkan has quit [Quit: chimkan]
notbrent has quit [Ping timeout: 252 seconds]
iori has joined #ruby
pvh has quit [Ping timeout: 248 seconds]
anildigital_work has quit [Ping timeout: 276 seconds]
skryking has quit [Quit: Konversation terminated!]
Spaceghostc2c has quit [Ping timeout: 260 seconds]
locriani has quit [Remote host closed the connection]
relix has quit [Ping timeout: 244 seconds]
_marvin has quit [Ping timeout: 264 seconds]
kapowaz has quit [Ping timeout: 260 seconds]
mroth has quit [Ping timeout: 246 seconds]
savage- has joined #ruby
NimeshNeema has joined #ruby
dnyy has quit [Ping timeout: 246 seconds]
baroquebobcat has joined #ruby
dkannan has quit [Ping timeout: 248 seconds]
dotemacs has quit [Ping timeout: 245 seconds]
tsguy52 has joined #ruby
kaichanvong has quit [Max SendQ exceeded]
SCommette has quit [Quit: SCommette]
stephenjudkins has quit [Quit: stephenjudkins]
davidboy has quit [Max SendQ exceeded]
NimeshNeema has quit [Max SendQ exceeded]
<aclocal> I am wondering I have heared of ruby and say some code , though curious is rails just a web server because I always here ruby on rails ?
hekin_ has joined #ruby
<aclocal> say = saw
maletor has quit [Quit: Computer has gone to sleep.]
NimeshNeema has joined #ruby
Spaceghostc2c has joined #ruby
tommyvyo has joined #ruby
SCommette has joined #ruby
SCommette has quit [Client Quit]
MetaCosm has joined #ruby
richardcreme has quit [Ping timeout: 244 seconds]
tiripamwe has quit [Ping timeout: 252 seconds]
hekin has quit [Ping timeout: 246 seconds]
hekin_ is now known as hekin
dkannan has joined #ruby
davidboy has joined #ruby
lectrick has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
moeSeth has joined #ruby
khakimov has joined #ruby
hekin has quit [Quit: hekin]
IrishGringo has joined #ruby
BrianE has joined #ruby
dotemacs has joined #ruby
sebastorama has joined #ruby
<tsguy52> aclocal: http://rubyonrails.org << More information there
SeanTAllen has joined #ruby
<havenn> aclocal: #RubyOnRails channel as well
oxide3 has joined #ruby
notbrent has joined #ruby
<havenn> aclocal: but no, Rails isn't a web server
moshee has quit [Ping timeout: 252 seconds]
Progster has quit [Ping timeout: 244 seconds]
<tsguy52> aclocal: Ruby on Rails is a web framework, which uses Ruby as the programming language. A web server for Ruby on Rails is a completely different component of the website altogether. Some popular web server setups include NGINX + Passenger and Apache + Passenger. Google is your friend :D
<havenn> aclocal: ^ Rails is a web framework that uses Rack. Rack connect Rails and other Ruby frameworks to web servers that support Ruby.
pvh has joined #ruby
<havenn> aclocal: Ruby web servers would be like WebRick, Unicorn, Rainbows!, Thin
<havenn> aclocal: usually with Nginx, Apache, or Lighttpd in front
phoe6 has quit [Quit: phoe6]
<havenn> aclocal: Oops, forgot a major Ruby web server... Phusion Passenger
<williamherry> what `handle` is when registry on rubygems.org?
<tsguy52> aclocal: Basically you should know that, Ruby on Rails is amazing…
krz has quit [Quit: krz]
Taichou_ has joined #ruby
IrishGringo has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713134347]]
<aclocal> so is there any uses to ruby out side of rails ?
<havenn> aclocal: Yes.
sent-hil has joined #ruby
anildigital_work has joined #ruby
<havenn> aclocal: Ruby is useful for much more, but another awesome Ruby web framework is Sinatra: http://www.sinatrarb.com
<aclocal> and what exactly is more in a web framework then an actual webserver that host ruby programs ?
SCommette has joined #ruby
SCommette has quit [Client Quit]
kaichanvong has joined #ruby
<rking> aclocal: It's just stacks of patterns.
<aclocal> Are you talking just about there being more libs to uses like server faces , messaging , ejb ,... webservices etc stuff \
<rking> aclocal: Whenever you do a thing a bunch of times, it's helpful to stop and think, "Can the computer do this instead of me?" And a web framework aims to answer that question for a bunch of the minutia that you'd otherwise have to do.
happydpc has joined #ruby
<aclocal> or is webframe work different term then the one in other languages like java
phoe6 has joined #ruby
dnyy has joined #ruby
<rking> aclocal: I'm not sure what the Java terminology is. I spent about a week in 2002 where I looked into such things, and pretty much haven't looked back. They're wack.
relix has joined #ruby
<rking> aclocal: But whatever it is, in Ruby, it's going to be more programmer-friendly than 99% of the things you're used to in Java.
rd34 has quit [Quit: rd34]
<oxide3> aclocal: Rails provides a structured way to create web sites using ruby, a webserver, and a database. It provides code generation to create lots of boilerplate code and gently forces you into a model-view-controller pattern
aers has quit [Quit: aers]
<havenn> aclocal: A web framework like Ruby provides opinionated conventions around routes, views, and models etc. Rails like most Ruby web framework uses Rack (a hugely popular webserver interface). You can serve up your Rack app however you want, with whatever webserver you want that works with Rack.
<havenn> aclocal: Err, that first 'Ruby' was meant to be 'Rails'
<oxide3> you could go and reinvent the wheel and figure out how to combine the serving of pages, generation of dynamic content, and persistence of stuff to a database
moshee has joined #ruby
<oxide3> but that would be useless unless you really wanted to make a better wheel
Guest91275 has joined #ruby
_marvin has joined #ruby
<aclocal> http://en.wikipedia.org/wiki/Web_application_framework <--- when you say web framework is that what you mean if so I am all set
flip_digits has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rking> aclocal: Yeah, that's a decent description, sure.
<havenn> aclocal: ya, Rail is MVC web app framework
kapowaz has joined #ruby
jmil has quit [Ping timeout: 244 seconds]
<aclocal> like spring , structs , velocity ,...etc stuff ya
mk03 has quit [Remote host closed the connection]
<oxide3> spring is a monster, way more than just that, but yes it includes a web app framework
<aclocal> "but that would be useless unless you really wanted to make a better wheel" well agreed provided you have done the grunt work and understand how to do it the hard way . after that sit back it push buttons
<aclocal> it = and
<aclocal> virtually no creativity left :( just screwing with configuration files :)
verbad has quit []
<oxide3> Well, if one was comfortable with spending... i don't know, 3-5 or more years thinking, writing, promoting, and maintainting it
baroquebobcat has quit [Quit: baroquebobcat]
Jay_Levitt has quit [Read error: Operation timed out]
rodj has quit [Quit: rodj]
jmil has joined #ruby
<aclocal> so how is joomla or drupal or other things of that nature not just an web framework
<aclocal> they basically do all the shit for you
adeponte has joined #ruby
rodj has joined #ruby
<aclocal> and you just have to learn the tool not how to program and deep concepts
<aclocal> pointless because the deep concepts are the most important ways of thought
<fowl> joomla/drupal is the next step
idflyfish has quit [Ping timeout: 246 seconds]
<fowl> rails isnt a blog, its a framework for building things such as blogs
uris has quit [Quit: leaving]
<aclocal> ok cool so it like can generate a joomla / drupal site :)
jrajav has quit [Quit: The best darkness is strange and surprising]
idflyfish has joined #ruby
<oxide3> One day we wil have a web framework generator that builds web frameworks like ROR so people can build things like Can I haz Cheeseburger
<tsguy52> aclocal: think of building a house…. all of the building materials are there and you have all the creativity in the world to build your house like you would want… so yes - lots of creativity..
<fowl> aclocal: can't tell if trolling or not
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
<aclocal> I guess whats next something maybe that can generate the a webserver of many joomla's then maybe the internet :)
<tsguy52> aclocal: sure… a joomla farm.. I could totally see that happening
quest88 has joined #ruby
<aclocal> "think of building a house" its like a modular home built mostly by a computer . No mistakes :)
<fowl> ...in a future where humans breed and enslave Apps to do their chores...
baroquebobcat has joined #ruby
<aclocal> Ok I retract my negative comment there is lots of creativity just in different places and thru different means ...
<aclocal> But if you like the low level stuff it is dieing in web development :(
KindOne has quit [Ping timeout: 240 seconds]
<aclocal> really there isn't much coding of anything when you have a web frame work ;)
mockra has quit [Remote host closed the connection]
Tomasso has quit [Ping timeout: 255 seconds]
<aclocal> more just connecting which isn't that bad
<oxide3> I'm waiting for an x86 asm web framework.
<aclocal> connecting creative pieces
<oxide3> until then it's all too abstracted
phoe6 has quit [Quit: phoe6]
happydpc has quit [Remote host closed the connection]
TorpedoSkyline has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<rking> MOV [$C4RT,%US3R], PRDCT
<rking> Could work.
jonathanwallace has joined #ruby
ViperMaul has quit [Ping timeout: 240 seconds]
phoe6 has joined #ruby
luckyruby has joined #ruby
phoe6 has quit [Client Quit]
KindOne has joined #ruby
adeponte has quit [Remote host closed the connection]
<oxide3> on a serious note, are there any ruby web frameworks other than ROR worth looking into?
Boohbah has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
Rizzle has joined #ruby
dhruvasagar has joined #ruby
Boohbah has joined #ruby
<fowl> there are many
Boohbah is now known as Guest20023
<fowl> there are many
Rizzle is now known as ViperMaul
ViperMaul has quit [Client Quit]
<oxide3> I should say, does anyone here -recommend- any of them from personal experience
Rizzle has joined #ruby
jonathanwallace has quit [Ping timeout: 252 seconds]
<havenn> oxide3: http://www.padrinorb.com
_adeponte has joined #ruby
<rking> The comment so nice he said it twice. Fowl: What do you like for web frameworks?
adeponte has quit [Ping timeout: 240 seconds]
phoe6 has joined #ruby
Rizzle has quit [Client Quit]
<fowl> sinatra or webrick but i dont do web stuff often
<rking> webrick? Hrm. I've only thought of it as the dinky default rails server that spews needless error messages.
zeen has quit [Ping timeout: 246 seconds]
TheTFEF has quit [Read error: Connection reset by peer]
eko has quit [Quit: This computer has gone to sleep]
xpot-station has quit [Read error: Operation timed out]
TheTFEF has joined #ruby
zeen has joined #ruby
<rking> (From superlong ago.)
Renrea has joined #ruby
<oxide3> sinatra / padrino, seems nice, I'll give it a whirl. I'm trying to port an "applicaton" that was basically a sql db with a bunch of stored procs and a UI of... excel to something a little sweeter
<fowl> webrick is nice if you aren't a newb (rking)
<heftig> webrick is just a server
<fowl> yeah thats not enough for some folks
headius has quit [Quit: headius]
idflyfish has quit [Ping timeout: 246 seconds]
<oxide3> i think we have a failure to communicate here
ananthakumaran has quit [Ping timeout: 240 seconds]
phoe6 has quit [Quit: Bye, leaving for the day.]
<burgestrand> oxide3: I did padrino for a few months about a year ago. I found it too little added over sinatra to be worth the overall unstable feeling of the framework. I had my application break several times because the structure of applications was changed between every padrino release. It’s probably better now, but a word of caution there.
minijupe has quit [Quit: minijupe]
mockra has joined #ruby
chimkan_ has joined #ruby
<burgestrand> As for sinatra, I like the framework but whenever you do something remotely complex you end up needing to set up things, which often ends up being set up the exact same way as all your other sinatra applications. It never feels nice to duplicate that functionality (say, serving assets, common application helpers). That said, it’s either rails or sinatra for me.
ananthakumaran has joined #ruby
<oxide3> thank you burgestrand
<rking> burgestrand: No Padrino?
richardcreme has joined #ruby
<burgestrand> rking: bad experiences to little gain, I rather stick to just sinatra. sorry.
dankest has joined #ruby
<burgestrand> I used to think it was some middleground between rails and sinatra, but when used it felt just as heavy as rails but nowhere near as comfortable.
igotnolegs has joined #ruby
<burgestrand> I know this is some very vague critique, but as I said it’s been a little less than a year.
mattp_ has quit [Read error: Connection reset by peer]
td123 has joined #ruby
aantix has joined #ruby
Mon_Ouie has quit [Read error: Connection reset by peer]
eregon has quit [Read error: Connection reset by peer]
eregon_ has joined #ruby
n_blownapart has joined #ruby
johnduhart has quit [Read error: Connection reset by peer]
johnduhart has joined #ruby
caveat- has quit [Ping timeout: 264 seconds]
Eiam has quit [Ping timeout: 264 seconds]
welterde has quit [Ping timeout: 264 seconds]
taec has quit [Ping timeout: 264 seconds]
jxf has quit [Ping timeout: 240 seconds]
<rking> burgestrand: Nah, that's cool. I've done non-frameworked stuff plenty, and I'm really liking the Rails experience so far, but I, too, wondered about a middle ground.
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
mattp_ has joined #ruby
darkc0met has quit [Ping timeout: 264 seconds]
sixteneighty has quit [Ping timeout: 264 seconds]
sixteneighty has joined #ruby
<rking> I definitely have use cases for little things that don't justify having all of Rails (though I haven't experimented with shaving it down, i.e. going without ActiveRecord, etc.)
mohits has joined #ruby
taec has joined #ruby
<davidcelis> rails-api
taec is now known as Guest61436
<n_blownapart> hi all. anyone willing to help with noob question: what does this sentence mean beginning with Hash.new ...thanks
<n_blownapart> Hashes, in contrast, are different. While the array constructor Array.new takes an initial value for the array, Hash.new takes a default value for the hash, which is the value of the hash for a nonexistent key ^^
<sent-hil> davidcelis: i came across rails-api today, couldn't find examples of anyone using it except to play around
<burgestrand> n_blownapart: Hash.new refers to the method new on the Hash class.
<sent-hil> have you used it in prod/do you know anyone who has?
umttumt has joined #ruby
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<burgestrand> n_blownapart: hashes are collections that map a key to a value.
CaptainJet has quit [Read error: Connection reset by peer]
<davidcelis> sent-hil: It was made and is maintained by Rails core, bro...
<burgestrand> n_blownapart: so, you could have a hash mapping people to phone numbers. You could put phone numbers and the person they belong to in this hash, and then look it up later.
<burgestrand> n_blownapart: the default value is what is returned when you try to look up something in a hash that does not exist in it.
<burgestrand> n_blownapart: for example, if you try to look up the phone number of somebody you do not have the phone number to.
Fretta has quit [Quit: Fretta]
williamherry has quit [Ping timeout: 240 seconds]
<sent-hil> davidcelis: i thought it was just a side project by one of the guys
td123 has quit [Ping timeout: 240 seconds]
noyb has joined #ruby
headius has joined #ruby
<n_blownapart> burgestrand: thanks, Yes and the example has Hash.new(0) to return zero instead of nil. I was just having trouble with the English syntax I think. In other words you don't need to have any values to construct a hash, as opposed to an array.
<burgestrand> n_blownapart: I don’t understand your last sentence. You can create empty arrays, just as you can create empty hashes.
<burgestrand> n_blownapart: http://codepad.org/Kd8lYI5t
KindOne has quit [Ping timeout: 248 seconds]
td123 has joined #ruby
cbuxton has joined #ruby
rizzy has quit [Ping timeout: 244 seconds]
noyb has quit [Ping timeout: 240 seconds]
headius has quit [Client Quit]
welterde has joined #ruby
SuperSonicSound has quit [Quit: Leaving]
ryh has quit [Remote host closed the connection]
aantix has quit [Quit: aantix]
noyb has joined #ruby
fugit_ has joined #ruby
<n_blownapart> burgestrand: ok so line 1 would return a sort of message as opposed to a value if the key doesn't exist. It could be not available or nil or zero. thnx.
locriani has joined #ruby
<burgestrand> :)
<n_blownapart> burgestrand: gratzie
<burgestrand> n_blownapart: prego
jarred has quit [Quit: jarred]
td123 has quit [Quit: WeeChat 0.3.8]
fugit has quit [Ping timeout: 246 seconds]
td123 has joined #ruby
jorge has joined #ruby
chimkan_ has quit [Quit: chimkan_]
<davidcelis> howdy burgestrand
<burgestrand> davidcelis: good mornin' \o.
<davidcelis> burgestrand: i was taking a look at hallon last night
<burgestrand> oh :)
<davidcelis> good stuff, dude
<davidcelis> good code, good gem; thanks for providing that
fugit has joined #ruby
<burgestrand> thanks, a lot of things are changing with hallon/spotify now, got new focus, new things to try :)
<davidcelis> :D
<burgestrand> (hallon didn’t really have any focus at all before, which is why it can be a bit too low level for many things)
dhruvasagar has quit [Ping timeout: 248 seconds]
raid has joined #ruby
<raid> hi, do i really need the ruby source to install the linecache gem?
fugit_ has quit [Ping timeout: 248 seconds]
<raid> i dont use rvm and it always fails when building a native extension because a vm_core.h is missing
baroquebobcat has quit [Quit: baroquebobcat]
<davidcelis> why dont you use rvm
<davidcelis> (or rbenv)
<davidcelis> system ruby == lame
<davidcelis> in multiple ways
<raid> davidcelis: its just supposed to work for now. i may use rvm if i get deeper into ruby development
<raid> davidcelis: gentoo has a nice solution for the problem with multiple versions of languages
dhruvasagar has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
<raid> davidcelis: only installed ruby itself and gems via portage. I know that i should put everything in my ~
td123 has quit [Ping timeout: 240 seconds]
<raid> unpacked ruby source now. "checking for vm_core.h... yes"
td123 has joined #ruby
<raid> "Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers."
<raid> How do I find out what is missing?
<davidcelis> you chould check the output of the make
<davidcelis> not sure where it would be, though
rutkla has joined #ruby
Chryson has quit [Quit: Leaving]
jonathanwallace has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
darkc0met has joined #ruby
jasonLaster has joined #ruby
<raid> this is located in ~/.gem/ruby/1.9.1/gems/linecache19-0.5.12/ext/trace_nums/gem_make.out
locriani has quit [Remote host closed the connection]
<davidcelis> undefined reference to `ruby_current_thread'
<davidcelis> wut
<davidcelis> no idea, sorry
<raid> beats me
<burgestrand> Hm, I’ve seen this before.
moshee has quit [Ping timeout: 244 seconds]
<fowl> raid you'll never hear someone advocate for system ruby
<fowl> install rbenv and dont look back
dhruvasagar has joined #ruby
<burgestrand> I have a theory that this would happen if you try to compile a C extension for 1.9 with ruby 1.8.7, there has been many changes in the thread department between 1.8 and 1.9.
<burgestrand> Trying to verify.
SCommette has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
a_a_g has joined #ruby
<burgestrand> Yeah, appears like that’d be the main guess. Ruby 1.8 does not have ruby_current_thread in its C API, while 1.9 does.
jasonLaster has quit [Remote host closed the connection]
rking has quit [Remote host closed the connection]
jasonLaster has joined #ruby
<burgestrand> raid: I would guess it’s just linking against the wrong ruby library.
<raid> hmm
<burgestrand> raid: there might be a flag that says "—with-ruby-lib" or something that you could use to get around it.
<burgestrand> (just guessing at that name)
baroquebobcat has joined #ruby
mwilson_ has quit [Excess Flood]
baroquebobcat has quit [Client Quit]
mwilson_ has joined #ruby
td123 has quit [Ping timeout: 248 seconds]
roadze has joined #ruby
roadze has quit [Remote host closed the connection]
roadze has joined #ruby
<phanousit> when should i use the "method" method. and is it always used with call?
jasonLaster has quit [Ping timeout: 252 seconds]
td123 has joined #ruby
<burgestrand> Frankly, it’s rarely used. Sometimes you can use it when you want to pass a callback block to a method, but you want to pass a method instead if a block.
<burgestrand> You could also use it to do some funky metaprogramming, and call methods of your superclass’ superclass without going through your superclass.
<burgestrand> I’m sure there are many other creative uses for it.
weasels has joined #ruby
otters has quit [Read error: Connection reset by peer]
<phanousit> thanks
rking has joined #ruby
ukd1 has joined #ruby
rutkla has quit [Ping timeout: 255 seconds]
SCommette has quit [Quit: SCommette]
jgrevich has quit [Quit: jgrevich]
sent-hil has quit [Remote host closed the connection]
mohits has quit [Ping timeout: 240 seconds]
mwilson_ has quit [Excess Flood]
mwilson_ has joined #ruby
banisterfiend has joined #ruby
baroquebobcat has joined #ruby
Banistergalaxy has quit [Ping timeout: 240 seconds]
dhruvasagar has quit [Ping timeout: 240 seconds]
havenn has quit [Remote host closed the connection]
baroquebobcat has quit [Client Quit]
igotnolegs has quit [Quit: Computer has gone to sleep.]
jorge has quit [Remote host closed the connection]
roadze has quit [Remote host closed the connection]
moshee has joined #ruby
frogstarr78 has quit [Quit: Leaving]
darren has quit [Remote host closed the connection]
td123 has quit [Ping timeout: 246 seconds]
aclocal is now known as brcfg
cbuxton has quit [Quit: Leaving.]
jeff_sebring has quit [Quit: Leaving]
chimkan_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
td123 has joined #ruby
zeromodulus has quit [Remote host closed the connection]
arkiver has joined #ruby
Renrea has quit [Remote host closed the connection]
oxide3 has quit []
mrdodo has joined #ruby
KindTwo has joined #ruby
techsurvivor has quit [Read error: Connection reset by peer]
td123 has quit [Ping timeout: 255 seconds]
havenn has joined #ruby
td123 has joined #ruby
arkiver has quit [Quit: Leaving]
jarred has joined #ruby
hemanth has quit [Ping timeout: 272 seconds]
kjellski_ has quit [Quit: This computer has gone to sleep]
ringotwo has joined #ruby
iamjarvo has quit [Quit: Leaving...]
beandip has quit [Ping timeout: 248 seconds]
havenn has quit [Remote host closed the connection]
yugui_zzz is now known as yugui
banghouse has quit [Ping timeout: 244 seconds]
jonathanwallace has joined #ruby
fantazo has quit [Remote host closed the connection]
n_blownapart has quit [Remote host closed the connection]
apeiros_ has quit [Remote host closed the connection]
ukd1 has quit [Quit: leaving]
banghouse has joined #ruby
td123 has quit [Ping timeout: 248 seconds]
savage- has quit [Remote host closed the connection]
<aces23up> how do I assign a variable directly with a .each statement here? http://pastebin.com/A7PDD9ys
eko has joined #ruby
ryanf has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
td123 has joined #ruby
ananthakumaran has joined #ruby
elhu has joined #ruby
ABK has joined #ruby
beandip has joined #ruby
mjb2k has joined #ruby
chimkan_ has quit [Quit: chimkan_]
Eldariof-ru has joined #ruby
chimkan has joined #ruby
<fowl> aces23up: #each returns the object it operates on, you want #find
rodj has quit [Quit: rodj]
christopherdolin has joined #ruby
Taichou_ has quit [Remote host closed the connection]
charlies_ has joined #ruby
charlies_ is now known as charlie_some
christopherdolin has left #ruby [#ruby]
mockra has quit [Remote host closed the connection]
<aces23up> fowl thanks.
yoklov has quit [Quit: computer sleeping]
chimkan__ has joined #ruby
DrShoggoth has quit [Quit: Leaving]
elhu has quit [Quit: Computer has gone to sleep.]
jasonLaster has joined #ruby
KindTwo has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
chimkan has quit [Ping timeout: 246 seconds]
chimkan__ is now known as chimkan
elhu has joined #ruby
td123 has quit [Ping timeout: 252 seconds]
tiripamwe has joined #ruby
td123 has joined #ruby
mxweas has quit [Quit: Computer has gone to sleep.]
jasonLaster has quit [Ping timeout: 240 seconds]
AlbireoX`Laptop has joined #ruby
sebastorama has quit [Ping timeout: 244 seconds]
<aces23up> fowl
<aces23up> @element_hint ||= [:id, :name, :text].find{ |attr| respond_to?(attr) and send(attr) != '' }
charlie_some is now known as charliesome
mockra has quit [Ping timeout: 240 seconds]
<aces23up> I have that which works but its just returning the good attribute, I want to actually get the send(attr) value to be loaded from the find method
dankest has quit [Quit: Leaving...]
<aces23up> how would I structure that?
Banistergalaxy has joined #ruby
dankest has joined #ruby
jarred has quit [Ping timeout: 240 seconds]
td123 has quit [Read error: Operation timed out]
ryanf has joined #ruby
ryanf has quit [Client Quit]
td123 has joined #ruby
shadoi1 has quit [Quit: Leaving.]
reuf has joined #ruby
ananthakumaran has quit [Ping timeout: 240 seconds]
ananthakumaran has joined #ruby
SegFaultAX|work2 has quit [Ping timeout: 260 seconds]
jprovazn has joined #ruby
darkc0met has quit [Ping timeout: 240 seconds]
arturaz has joined #ruby
jarred has joined #ruby
td123 has quit [Ping timeout: 240 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
mxweas has joined #ruby
havenn has joined #ruby
td123 has joined #ruby
elhu has quit [Quit: Computer has gone to sleep.]
goganchic has joined #ruby
jorge has joined #ruby
chimkan__ has joined #ruby
Morkel has joined #ruby
<fowl> aces23up: i'd have to see the context but at a glance i'd say that you should a variable that will be an id, a name or a text.. i dont understand what its for though
goganchic has quit [Client Quit]
friskd has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
chimkan has quit [Ping timeout: 255 seconds]
chimkan__ is now known as chimkan
und3f has joined #ruby
jorge has quit [Ping timeout: 240 seconds]
SegFaultAX|work2 has joined #ruby
manizzle has joined #ruby
td123 has quit [Quit: WeeChat 0.3.8]
maesbn has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
Eldariof-ru has quit []
yugui is now known as yugui_zzz
tsguy52 has quit [Quit: tsguy52]
MissionCritical has quit [Ping timeout: 240 seconds]
aantix has joined #ruby
aantix has quit [Client Quit]
locriani has joined #ruby
mockra has joined #ruby
workmad3 has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
dhruvasagar has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
burgestrand has quit [Quit: Leaving.]
subbyyy has quit [Quit: Leaving.]
aganov has joined #ruby
Mission-Critical has joined #ruby
qwerxy has joined #ruby
quest88 has quit [Quit: quest88]
burgestrand has joined #ruby
jonathanwallace has joined #ruby
alecs has joined #ruby
<alecs> hello!
artOfWar_ has quit [Ping timeout: 244 seconds]
mucker has joined #ruby
<alecs> is rubygems.org working ?
<raid> alecs: yes
mjb2k has left #ruby [#ruby]
abionic has joined #ruby
<alecs> interesting ... Could not reach https://rubygems.org/
<alecs> lol ... i guess it is a dns problem ... thanks
zeromodulus has joined #ruby
ABK has quit [Ping timeout: 248 seconds]
elhu has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
Mission-Critical is now known as MissionCritical
abionic has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
techsurvivor has joined #ruby
KindTwo has joined #ruby
sspiff has joined #ruby
sspiff has joined #ruby
jhunter has quit [Ping timeout: 244 seconds]
ssspiff has quit [Ping timeout: 240 seconds]
jhunter has joined #ruby
mrdodo has quit [Remote host closed the connection]
KindTwo has quit [Ping timeout: 246 seconds]
m4rtijn has joined #ruby
<m4rtijn> hi
<m4rtijn> i just started with cucumber and step defs - is it possible to create a step def. which captures both "and my name is earl" and "then my name is earl"
<aces23up> what is the way in which you can do an equal comparison on a string wether the comparison either by include? exact or regex?
wallerdev has quit [Quit: wallerdev]
ctp has quit [Quit: Linkinus - http://linkinus.com]
<aces23up> what I mean is how can I determine which search method easily based on whats passed into the function?
hoelzro|away is now known as hoelzro
nyuszika7h has joined #ruby
Nisstyre has quit [Read error: Connection reset by peer]
<hoelzro> aces23up: sorry, could you give an example, please?
yugui_zzz is now known as yugui
iori has quit [Read error: Connection reset by peer]
iori has joined #ruby
chichou has joined #ruby
tndrbt has joined #ruby
g_rotbart has quit [Remote host closed the connection]
tndrbt has quit [Quit: tndrbt]
gmci has joined #ruby
mneorr has joined #ruby
chimkan has quit [Quit: chimkan]
umttumt has quit [Remote host closed the connection]
hemanth has joined #ruby
Morkel has quit [Quit: Morkel]
qwerxy has quit [Quit: offski]
bjhaid has joined #ruby
yugui is now known as yugui_zzz
AlbireoX`Laptop has quit [Remote host closed the connection]
Nisstyre has joined #ruby
burgestrand has quit [Ping timeout: 240 seconds]
arkiver has joined #ruby
dhruvasagar has quit [Ping timeout: 240 seconds]
Eldariof-ru has joined #ruby
kolm has joined #ruby
dhruvasagar has joined #ruby
jmil has quit [Quit: jmil]
Jb_ has joined #ruby
yugui_zzz is now known as yugui
yugui is now known as yugui_zzz
umttumt has joined #ruby
<TTilus> m4rtijn: the step would be Given /my name is "(.*)"/ do |name|; ...; end
xorigin has joined #ruby
<TTilus> m4rtijn: theres no technical difference between and, given, when & then
<TTilus> m4rtijn: only semantical
mockra has joined #ruby
<TTilus> m4rtijn: cuke runs them all the same way against the same set of step defs
Asher has quit [Quit: Leaving.]
rutkla has joined #ruby
thisirs has joined #ruby
s1n4 has joined #ruby
dankest has quit [Quit: Linkinus - http://linkinus.com]
mockra has quit [Ping timeout: 246 seconds]
sspiff has quit [Ping timeout: 240 seconds]
zeromodulus has quit [Remote host closed the connection]
bjhaid has left #ruby [#ruby]
jonathanwallace has joined #ruby
apacala_ has joined #ruby
Wizek has quit [Ping timeout: 246 seconds]
zeromodulus has joined #ruby
zeromodulus has quit [Remote host closed the connection]
zeromodulus has joined #ruby
friskd has quit [Quit: friskd]
sspiff has joined #ruby
sspiff has joined #ruby
apacala has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [Ping timeout: 240 seconds]
Markvilla has joined #ruby
apeiros_ has joined #ruby
s1n4 has quit [Ping timeout: 248 seconds]
<banisterfiend> apacala_: sup apeiro-dogg
<banisterfiend> apeiros_* ^
<raid> is there a guide on the internet that just lists the most common development tools for ruby (like gem, rake, rdoc and so on)
iamlacroix has joined #ruby
piotr_ has joined #ruby
Rochefort has joined #ruby
arkiver has quit [Remote host closed the connection]
ph^ has joined #ruby
denysonique has joined #ruby
burgestrand has joined #ruby
friskd has joined #ruby
s1n4 has joined #ruby
reuf has quit [Remote host closed the connection]
lldong has joined #ruby
burgestrand has quit [Quit: Leaving.]
mneorr has quit [Quit: Leaving.]
robotmay has joined #ruby
emiltin has joined #ruby
cantonic_ has joined #ruby
yugui_zzz is now known as yugui
tatsuya_o has joined #ruby
Liothen has quit [Remote host closed the connection]
flype has joined #ruby
Liothen has joined #ruby
Liothen has quit [Changing host]
Liothen has joined #ruby
Liothen has quit [Remote host closed the connection]
tiripamwe has quit [Quit: Leaving]
jarred has quit [Quit: jarred]
cantonic has quit [Ping timeout: 244 seconds]
cantonic_ is now known as cantonic
statarb3 has joined #ruby
statarb3 has quit [Changing host]
statarb3 has joined #ruby
burgestrand has joined #ruby
mucker has quit [Read error: Operation timed out]
runeb has joined #ruby
runeb has quit [Remote host closed the connection]
cezar has joined #ruby
bullicon has joined #ruby
jorum has joined #ruby
cezar has quit [Client Quit]
mneorr has joined #ruby
ephemerian has joined #ruby
stephenjudkins has joined #ruby
Wizek has joined #ruby
stnly has joined #ruby
justsee has joined #ruby
havenn has quit [Remote host closed the connection]
mxweas has quit [Ping timeout: 240 seconds]
andrewh has joined #ruby
jmil has joined #ruby
beneggett has quit [Ping timeout: 240 seconds]
senny has joined #ruby
friskd has quit [Quit: friskd]
manolo has joined #ruby
workmad3 has joined #ruby
beneggett has joined #ruby
burgestrand has quit [Read error: Connection reset by peer]
burgestrand has joined #ruby
mockra has joined #ruby
peterhellberg has joined #ruby
mockra has quit [Ping timeout: 245 seconds]
juha_ has quit [Ping timeout: 244 seconds]
jonathanwallace has joined #ruby
emiltin has quit [Quit: emiltin]
qwerxy has joined #ruby
juha_ has joined #ruby
fermion has joined #ruby
<tommylommykins> Is there any way to easy fully correctly serialize ruby's printing of warnings an error messages?
* tommylommykins is running a single threaded program, and the messages are always a little bit out of place wrt. where they chould be in the output stream
<_br_> tommylommykins: You could capture it in an begin/rescue/end and make sure to map it to the format you want
<_br_> tommylommykins: Otherwise, I am not aware that the ruby interpreter spits out a "proper" machine readable format.
<tommylommykins> :s
nari has quit [Ping timeout: 248 seconds]
<tommylommykins> I guess it's slightly unreasonable to expect stdout and stderr to correctly serialize with each other
jorum has quit [Ping timeout: 265 seconds]
yugui has quit [Ping timeout: 265 seconds]
<tommylommykins> well, correctly serialize my program's output
aces1up has joined #ruby
aces23up has quit [Ping timeout: 252 seconds]
poppiez has joined #ruby
<poppiez> can anyone see why line 55 fails? https://gist.github.com/305778 pear.rb:55: syntax error, unexpected ':', expecting keyword_then or ',' or ';' or '\n' when /^INSTALLED/: return nil
<poppiez> ruby 1.9.3p194
Morkel has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<Hanmac> poppiez ruby 1.9 dont support oneline when anymore ... you need two lines or ;
<poppiez> Hanmac: to be clear: semicolon at the end of the line?
arkiver has joined #ruby
<poppiez> or instead of the colon
yugui has joined #ruby
<fowl> semicolon at the end of the line will always result in an error
pskosinski has joined #ruby
<fowl> when 4; blah or when 4 (newline) blah
<Hanmac> change it to this: when /^INSTALLED/,/^=/,/^PACKAGE/,/^$/,/^\(no packages installed\)$/; return nil
<poppiez> thx guys. much appreciated
jmil has quit [Quit: jmil]
schwap_ has quit [Ping timeout: 252 seconds]
jonathanwallace has quit [*.net *.split]
beneggett has quit [*.net *.split]
workmad3 has quit [*.net *.split]
s1n4 has quit [*.net *.split]
apeiros_ has quit [*.net *.split]
Eldariof-ru has quit [*.net *.split]
gmci has quit [*.net *.split]
elhu has quit [*.net *.split]
MissionCritical has quit [*.net *.split]
maesbn has quit [*.net *.split]
noyb has quit [*.net *.split]
eregon_ has quit [*.net *.split]
Spaceghostc2c has quit [*.net *.split]
NimeshNeema has quit [*.net *.split]
noganex has quit [*.net *.split]
liluo has quit [*.net *.split]
phanousit has quit [*.net *.split]
x0F has quit [*.net *.split]
oddmunds has quit [*.net *.split]
akem has quit [*.net *.split]
philips_ has quit [*.net *.split]
strife25 has quit [*.net *.split]
Bofu2U has quit [*.net *.split]
dekroning has quit [*.net *.split]
kalleth has quit [*.net *.split]
TomRone has quit [*.net *.split]
kennyvb has quit [*.net *.split]
ForSpareParts has quit [*.net *.split]
laen_ has quit [*.net *.split]
Sou|cutter has quit [*.net *.split]
foolove has quit [*.net *.split]
mikalv has quit [*.net *.split]
Kwpolska has quit [*.net *.split]
mksm has quit [*.net *.split]
TheMoonMaster has quit [*.net *.split]
crodas has quit [*.net *.split]
any-key has quit [*.net *.split]
jmcphers has quit [*.net *.split]
wang has quit [*.net *.split]
Poapfel has quit [*.net *.split]
bnagy has quit [*.net *.split]
Gm4n_ has quit [*.net *.split]
goraxe has quit [*.net *.split]
Cork has quit [*.net *.split]
musl has quit [*.net *.split]
danheberden has quit [*.net *.split]
nahhh has quit [*.net *.split]
<Hanmac> poppiez: or there is an unioned regexp: /(?-mix:^INSTALLED)|(?-mix:^=)|(?-mix:^PACKAGE)|(?-mix:^$)|(?-mix:^\(no packages installed\)$)/
mxweas has joined #ruby
mfridh has joined #ruby
beneggett has joined #ruby
workmad3 has joined #ruby
apeiros_ has joined #ruby
gmci has joined #ruby
s1n4 has joined #ruby
Eldariof-ru has joined #ruby
maesbn has joined #ruby
elhu has joined #ruby
noyb has joined #ruby
eregon_ has joined #ruby
Spaceghostc2c has joined #ruby
NimeshNeema has joined #ruby
noganex has joined #ruby
phanousit has joined #ruby
liluo has joined #ruby
x0F has joined #ruby
oddmunds has joined #ruby
akem has joined #ruby
strife25 has joined #ruby
philips_ has joined #ruby
Bofu2U has joined #ruby
dekroning has joined #ruby
kalleth has joined #ruby
TomRone has joined #ruby
kennyvb has joined #ruby
ForSpareParts has joined #ruby
laen_ has joined #ruby
Sou|cutter has joined #ruby
foolove has joined #ruby
mikalv has joined #ruby
Kwpolska has joined #ruby
mksm has joined #ruby
crodas has joined #ruby
TheMoonMaster has joined #ruby
any-key has joined #ruby
jmcphers has joined #ruby
wang has joined #ruby
Poapfel has joined #ruby
bnagy has joined #ruby
Gm4n_ has joined #ruby
musl has joined #ruby
goraxe has joined #ruby
Cork has joined #ruby
danheberden has joined #ruby
nahhh has joined #ruby
rutkla has quit [Excess Flood]
aef has quit [Excess Flood]
aef has joined #ruby
berserkr has joined #ruby
rutkla has joined #ruby
arkiver has quit [Quit: Leaving]
Vert has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
dhruvasagar has joined #ruby
Rajesh__ has joined #ruby
zeromodulus has quit [Remote host closed the connection]
emmanuelux has joined #ruby
MissionCritical has joined #ruby
Rochefort has quit [Remote host closed the connection]
zz_chrismcg is now known as chrismcg
lkba has quit [Quit: Bye]
mwilson_ has quit [Excess Flood]
nari has joined #ruby
mwilson_ has joined #ruby
vijay_ has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
aibo has joined #ruby
vijay_ is now known as vijay
vijay is now known as munsdr62
elhu has quit [Ping timeout: 255 seconds]
<aibo> hey, getting this error: " RubyGem version error: addressable(2.3.2 not ~> 2.2.6) (Gem::LoadError)" how can 2.3.2 version be lower that 2.2.6 ?
workmad3 has joined #ruby
munsdr62 has quit [Quit: ChatZilla 0.9.88.2 [Firefox 14.0.1/20120713224758]]
<Hanmac> aibo "~>" has a special meaning in a gem-version
<aibo> so what does it means?
<Hanmac> "~> 2.2.6" means "> 2.2.6" && "< 2.3"
<aibo> how can I install needed gems to met all dependencies?
<Hanmac> normaly when you install your gem, it should download the currect deps when available
leoncamel has joined #ruby
lldong has quit [Remote host closed the connection]
<shevy> aibo, default "gem install NAME_HERE" takes care of the dependencies as well
Rajesh has joined #ruby
uris has joined #ruby
Rajesh has quit [Max SendQ exceeded]
Rajesh__ has quit [Quit: Leaving to Quit]
<shevy> aibo, some gems change and become incompatible, so gem authors specify certain versions, while not wanting to include incompatible versions
leoncamel has quit [Client Quit]
<aibo> ok, thx
Rajesh has joined #ruby
leoncamel has joined #ruby
Rajesh is now known as Guest98241
<shevy> you can keep a collection of the different .gem versions of addressable, a copy will reside in RUBY_PREFIX/lib/ruby/gems/1.9.1/cache/ i.e. on a sane ruby install, it would be exactly at /usr/lib/ruby/gems/1.9.1/cache/
<shevy> I copy all .gems I keep on using on my backups
mockra has joined #ruby
Rajesh_ has joined #ruby
RichieEvan has quit [Quit: RichieEvan]
mohits has quit [Ping timeout: 240 seconds]
<shevy> anyone of you knows
<shevy> why don't the linux distributions recommend to compile a program into a versioned, standalone directory?
<hoelzro> shevy: you mean like /libs/libffi/3.0.11/?
<JonnieCache> because unix is a total mess and nobody wants to talk about it
<JonnieCache> thats how it seems to me anyway
TPFC-SYSTEM has joined #ruby
reuf has joined #ruby
<hoelzro> I think it's probably for legacy reasons
<hoelzro> GoboLinux tries to change things it that direction, I think
mockra has quit [Ping timeout: 246 seconds]
peterhellberg has quit [Remote host closed the connection]
<shevy> hoelzro somewhat like that, except that rather than /libs it would be $BASE_DIR like /pkg/libffi/3.0.11
<shevy> well
<hoelzro> ok
<hoelzro> it's an interesting idea
<shevy> I can understand that distributions evolve only very slowly, but I am thinking there must be some technical reason why they don't want to switch
<hoelzro> there's no reason you couldn't do that, I think
<shevy> and I have not found out what that reason is :(
<hoelzro> you just need a package manager to handle things that way
<hoelzro> and an army of package maintainers =)
<hoelzro> it also may spell trouble for configure scripts
<hoelzro> because they're used to finding things a certain way
<hoelzro> but you could leverage pkg-config for it
jonathanwallace has joined #ruby
poppiez has quit [Quit: Linkinus - http://linkinus.com]
<shevy> hmmm
raid has left #ruby ["I was eaten by zombies"]
bigkevmcd has quit [Ping timeout: 252 seconds]
Spooner has joined #ruby
jonathanwallace has quit [Ping timeout: 240 seconds]
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
_bart has joined #ruby
x0F has quit [Disconnected by services]
x0F_ has joined #ruby
x0F_ is now known as x0F
depy has joined #ruby
alecs has quit [Ping timeout: 246 seconds]
mxweas has quit [Quit: Leaving...]
darkc0met has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
emiltin has joined #ruby
Foxandxss has joined #ruby
justsee is now known as justsee|away
locriani has joined #ruby
jorum has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<shevy> gaaaah
<shevy> I hate writing shell scripts
<hoelzro> shevy: why not just write it in Ruby?
<hoelzro> =)
<shevy> yeah
poppiez has joined #ruby
<shevy> if [ "$(sha512sum $ckf | awk '{print $1}'" = "$rsum" ]; then
<Spooner> Yes, writing shell scripts when you know Ruby does seem a little daft!
ananthakumaran has quit [Read error: Connection reset by peer]
ananthakumaran has joined #ruby
locriani has quit [Ping timeout: 240 seconds]
savage- has joined #ruby
<rking> Spooner: Except that Ruby's not as ubiquitous as shell.
cantonic has quit [Quit: cantonic]
justsee|away is now known as justsee
<hoelzro> true
<Spooner> rking : I'm guessing shevy's machine might have it installed (as do all macs), but that is a point.
<rking> shevy: Wait, what kind of thing are you trying to do with that?
tndrbt has joined #ruby
<shevy> I autogenerate shell scripts via ruby
virunga has joined #ruby
TPFC-SYSTEM has joined #ruby
<shevy> but I need to match the logic for shell scripts and I hate it
<shevy> all the conditionals look like shit :(
<shevy> (the standalone shell scripts are used to compile programs, in case when ruby is unavailable)
gmci has quit [Quit: Computer has gone to sleep.]
vaks has joined #ruby
<Hanmac> shevy exist something like orca for linux?
<apeiros_> hi banisterfiend
<apeiros_> banghouse: srsly? (nick)
<shevy> Hanmac what is orca... is that the one click installer... or the optical reading thing
<shevy> or sth else
<rking> shevy: There are worse languages than shell. There are many, nuanced idioms that are fun to learn.
<Hanmac> shevy the orca i mean can turn ruby code into a windows binary
gmci has joined #ruby
<shevy> hmm
<shevy> rking, I dunno. even PHP is better than shell in my opinion
<shevy> at least we have phpbb and mediawiki
<hoelzro> whoa, hold on there
tatsuya_o has quit [Remote host closed the connection]
<rking> Ugh
<Spooner> Hanmac : I already have Ocra "effectively" working on Linux/OSX, but I have failed to promote it (or fix the annoying bugs).
<workmad3> shevy: nah, shell is just noisy, PHP is noisy and has a crappy, inconsistent language design
<rking> ☝
* Spooner needs to stop leaving mostly finished projects all over github :D
<workmad3> Spooner: but then you'll make the rest of us look worse!
<rking> Spooner: I'm starting a custom of putting: "[Maturity: ___]" at the end of my project descriptions, so it gives a hint to people.
poppiez has quit [Quit: Linkinus - http://linkinus.com]
<Spooner> I have the problem that it "works well enough for me", but my enthusiasm to make it idiot-proof for everyone else is failing a bit :D
<_br_> Is it possible to get all available routes during startup of sinatra?
arietis has joined #ruby
<rking> Spooner: There's a "[Maturity: ___]" for that.
mneorr has quit [Ping timeout: 252 seconds]
<rking> Actually "[Maturity: Works For Me]" is a useful one. I'll use that sometime.
<Spooner> rking : What? [Maturity: You have to be over this height to use this gem] :P
<Muz> "[Maturity: Fucking childish]"
<shevy> lol
emiltin has quit [Quit: emiltin]
<workmad3> [Maturity: Hands off my toys!]
mneorr has joined #ruby
<Spooner> [Maturity: Too orangey for crows]
savage- has quit [Remote host closed the connection]
<workmad3> Spooner: or, simplified [Maturity: Kiora] :D
<rking> Wow, yes, Kia-Ora is not mature at all.
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
ctp has joined #ruby
ringotwo has quit [Remote host closed the connection]
hemanth has quit [Ping timeout: 248 seconds]
lxsameer has quit [Max SendQ exceeded]
nicoulaj has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
mneorr has quit [Quit: Leaving.]
mockra has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
Rochefort has joined #ruby
monkegjinni has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
liluo has quit [Remote host closed the connection]
Abbas5 is now known as Abbas|
redpanda has joined #ruby
lkba has joined #ruby
dhruvasagar has quit [Ping timeout: 248 seconds]
jonathanwallace has joined #ruby
dhruvasagar has joined #ruby
thisirs has quit [Remote host closed the connection]
Lachryma` has joined #ruby
<shevy> [Maturity: Be cool. use PHP]
<Hanmac> imo object-c is one of the ugliest languages i knew
<shevy> it's a rather annoying language indeed
<shevy> I hated this... what was the name... interface declarations, before you could make use of the [Foo bla] thingies
jonathanwallace has quit [Ping timeout: 244 seconds]
<shevy> but C++ templates are worse
<shevy> template<class T>
<shevy> T Max(const T& a, const T& b){ return (a>b)?a:b: }
abra has quit [Ping timeout: 276 seconds]
mfridh has quit [Changing host]
mfridh has joined #ruby
vaks has quit [Ping timeout: 244 seconds]
hemanth has joined #ruby
jxf has joined #ruby
zii has joined #ruby
jjang has quit [Ping timeout: 252 seconds]
bigkevmcd has joined #ruby
davidpk has joined #ruby
<_br_> shevy: Oh PHP is awesome. Especially since they recently introduced Goto.
<shevy> hehe
Ethan has quit [Ping timeout: 252 seconds]
<zii> According to http://ruby-doc.org/docs/keywords/1.9/Object.html#method-i-yield yield x is the same as block.call x, right?
<Hanmac> zii yeah very similar
<_br_> shevy: I really love this one though. https://bugs.php.net/bug.php?id=54547
<zii> Hanmac, If similar, then there's a difference. What is it?
Abbas| has quit [Ping timeout: 248 seconds]
<zii> Looking at rb_yield and its calls it's almost exactly the same, except for the part that it calls the closest/current method's block.
<Hanmac> when you use yield and not &block the block object is not created
<zii> Oh.
<workmad3> shevy: I don't get this hatred of templates...
<Hanmac> shevy did you see the my usage of templates? ;P
<workmad3> shevy: they're pretty funky things... the error reporting if you screw them up is generally awful though
<zii> If the block that creates things is passed to method x, what would you call that x?
<shevy> workmad3 you like complexity anyway
<shevy> :D
<zii> (note: x does other things with params it has been given)
<dekroning> hi all
<zii> rrelated to the things
<shevy> _br_ I really wonder how PHP developers "design" PHP
s1n4 has quit [Quit: PEACE OUT]
ctp has quit [Quit: Linkinus - http://linkinus.com]
<workmad3> shevy: I don't like complexity for the sake of complexity... and templates can actually make some horrendously complicated things quite simple
<shevy> to me it seems the only design goal is "throw in what could be useful, one day"
<_br_> Templates are awesome. They are so awesome that people invented tools to actually understand debugging output. Oh, but now they are "fixed" in C++11 ^^ (lol)
<workmad3> _br_: I did say the error output is awful :D
BlackShadow has joined #ruby
<workmad3> _br_: and yes, that should be extended to debugging output too
<Hanmac> workmad3 look at my cool templates: https://github.com/Hanmac/libogre-ruby/blob/master/ext/main.hpp :P
seitensei has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
iori has quit [Remote host closed the connection]
<Hanmac> shevy PHP was designed? i thought that, it crew out of a deep dark hole?
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
<_br_> Hanmac: :D
<Muz> Hanmac: you only really need to see Rasmus Lehrdorf's Wikiquote page
<Muz> "I was really, really bad at writing parsers. I still am really bad at writing parsers. "
lzhz has joined #ruby
<shevy> workmad3 well I wonder about that a lot
<workmad3> Hanmac: heh :) ever taken a look at Boost's Template Metaprogramming library, and template metaprogramming in C++ in general? :)
<shevy> is python or ruby the more complex language?
<shevy> C vs C++ vs Java
<workmad3> shevy: depends on how you're measuring complexity
<shevy> hehe
mneorr has joined #ruby
emiltin has joined #ruby
<shevy> oh wow
<Hanmac> workmad3 i copied the remove_pointer from boost ... but currently i dont need it anymore
<shevy> I just tried to google for "matz c++"
<workmad3> shevy: and what aspects of language you're measuring
<shevy> did you know that there is a second matz? :)
<workmad3> Hanmac: :)
<shevy> an imposter!
<shevy> Michael Matz !!!!!
freeayu has joined #ruby
<shevy> that's better
<shevy> the real matz
<shevy> s->iseq[s->pc-1] = MKOP_AB(c0, GETARG_A(i), GETARG_B(i0));
<shevy> C is a weird language
tatsuya_o has joined #ruby
<zii> Not really, no.
<Muz> Consider I have an Array, what would be the most graceful way of enforcing that all objects ever added to this Array are of a certain class?
<_br_> shevy: At least you don't need to read tons of books to understand the language (see C++).
<Muz> I can imagine there's some Rails thing that does it, but me not being a Rails-type person wouldn't know .
<zii> ^
Ethan has joined #ruby
<Hanmac> workmad3 what do you think about my wrap templates?
<shevy> yeah but you compare it to more complicated languages
<shevy> I wonder if it would be possible to go "there is more than one way to do something", but also "use only one way to solve a given problem"
<shevy> in german this would be called "Die Quadratur des Kreises."
<shevy> Hanmac, translate this into english pls. I dont know how :)
Abbas5 is now known as Abbas|
<zii> _br_, That's what I so like C.
<workmad3> Muz: if you wanted it with a plain array, you'd probably need to monkey-patch the instance to add type-checking to the add methods
<zii> also, is the *real* matz creating another ruby?
<workmad3> Muz: or you can wrap it in a proxy object that does similar
<shevy> oh... the dictionary says: "squaring the circle"
<shevy> to try to square the circle
<_br_> Actually regarding the C issue I have to mention "worse is better" http://www.jwz.org/doc/worse-is-better.html
<shevy> try to fit a square peg into a round hole
emmanuelux has quit [Ping timeout: 248 seconds]
<shevy> hehe cool, didnt know this phrase exists in english as well
<_br_> zii: Ditto, C is not beautiful, but works fine. At least you can understand what is happening under the hood.
<workmad3> shevy: to 'attempt to square the circle' is more an old mathematical idiom
<workmad3> shevy: going back to greek geometry :)
<shevy> yeah _br_ - worse is better, it seems to be a very practical term. perhaps it is not as clean and pure, but it kinda works
<workmad3> shevy: squaring the circle is provably impossible using just a straight-edge and compass
<shevy> workmad3, hmm never heard that in geometry. we had unamusing teachers, they only used 1:1 copies of the textbooks
<workmad3> shevy: by which they mean constructing a square with the same area as a given circle
<Hanmac> Muz array.map(&:class).uniq.size == 1
<shevy> aha
<shevy> cool link _br_
<shevy> "The New Jersey guy said that the Unix solution was right because the design philosophy of Unix was simplicity and that the right thing was too complex."
<_br_> shevy: Yeah, jwz is a really interesting guy.
<shevy> lol "The MIT guy then muttered that sometimes it takes a tough man to make a tender chicken"
<workmad3> shevy: so attempting to square the circle is sometimes (although not commonly nowadays I believe) an idiom for a futile endeavour :)
<_br_> ah s/jwz/richard gabriel/
<_br_> <- brain slow
<shevy> yeah workmad3 ... didn't know about the part squaring a circle with compass and straight-edge... for some reason we never had to try this. we always used a compass when trying to draw a circle... hehehe
<workmad3> shevy: yeah... as I said, it's provably impossible ;)
<shevy> and a ruler for rectangles
<shevy> but nowadays, I would rather try to use computers to draw for me
<Mon_Ouie> provably looks way to much like probably to my mental parser
kpshek has joined #ruby
<shevy> when I finished drawing something after 1 hour, I never was 100% accurate
<shevy> in "descriptive geometry". I hated it
g_rotbart has joined #ruby
<shevy> "Unix and C are the ultimate computer viruses."
<workmad3> shevy: yeah... this is more geometric proofs... so things like using a ruler and a compass to create angles and triangles
<shevy> he uses nice slogans :)
IPGlider has joined #ruby
emiltin has quit [Quit: emiltin]
<workmad3> shevy: you can construct a proof of pythagoras using just compass and ruler I believe :)
<workmad3> shevy: although I'll be very happy if you don't ask me to do it personally...
<zii> ha
embraceyourlove has joined #ruby
<shevy> pythagoras seems simple compared to many other things
burgestrand has quit [Ping timeout: 252 seconds]
<workmad3> yeah, it is... however, I was drawing an example of what can be done with geometric proofs (rather than just drawing geometric shapes :) )
tndrbt has quit [Quit: tndrbt]
<embraceyourlove> guys, i need to install 2 ruby versions on my PC, what shall i do?
<zii> rvm
Guest91275 is now known as Jackneill
<embraceyourlove> it requires cygwin?
<_br_> embraceyourlove: what zii said or rbenv
Jackneill has quit [Changing host]
Jackneill has joined #ruby
<embraceyourlove> ok, thx
<Hanmac> embranceyourlove so your os is windows?
<embraceyourlove> yes
redpanda has quit [Ping timeout: 248 seconds]
Berglund has joined #ruby
<zii> I don't really know how to use ruby on windows.
<shevy> embraceyourlove I compile into versioned directories
<Hanmac> then rvm should the best ... maybe comined with cygwin
<shevy> like /Programs/Ruby/{1.8.7,1.9.3}
<Mon_Ouie> There's Pik
<embraceyourlove> shevy, and what about Command line? shall i replace PATH?
<xorigin> rvm doesn't work on windows, the rvm faq suggests pik
<Mon_Ouie> (part of the rubyinstaller project)
<shevy> embraceyourlove in my variant I dont need to because only one ruby is "active" in $PATH at any given time, I just switch the versions when I have to use the other one
<shevy> embraceyourlove though I am on linux so that probably wont work for you :\
* m4rtijn loves rvm
<embraceyourlove> sry mb i missed something, but how you change versions?
<m4rtijn> rvm use [version number]
<embraceyourlove> oh, i think that this is the solution. Thx.
<embraceyourlove> Can i ask redmine related questions in this channel?
<shevy> not many use redmine
<shevy> you can try but there are only few who know about redmine here
<embraceyourlove> oh, never mind
BlackShadow has quit [Remote host closed the connection]
iamlacroix has quit [Remote host closed the connection]
galymzhan has joined #ruby
elhu has joined #ruby
<galymzhan> I'm having a trouble using Zenity from ruby code http://pastebin.com/zcm1smkR
<galymzhan> this shows a dialog when I run script from terminal, but when I right click it inside nautilus it doesn't work
<galymzhan> s/right click/double click
<_br_> embraceyourlove: Whats your problem?
<galymzhan> Zenity doesn't show a dialog, seems like it's exiting immediately, without blocking execution of the script
<galymzhan> So the user never sees a dialog window
yakko has quit [Ping timeout: 260 seconds]
<galymzhan> it works when I use rewrite it in plain bash though
mockra has joined #ruby
nari has quit [Ping timeout: 245 seconds]
<hoelzro> galymzhan: try printing out some debugging information to a file, perhaps?
<shevy> when I do it
<shevy> `zenity --info --text="Hello"`
<shevy> in irb
<shevy> it works
<shevy> and I can click on it too
<galymzhan> it works when running from inside terminal
<shevy> perhaps nautilus modifies the meaning
<zii> galymzhan, is DISPLAY set?
<shevy> perhaps this? `zenity --info --text="Hello" &`
<zii> $DISPLAY*
<zii> shevy, nope
<galymzhan> zii: no. How do I set it
<zii> export DISPLAY=something
<hoelzro> DISPLAY should be inherited from Nautilus, though
<galymzhan> like `export DISPLAY=0` before `zenity` ?
<zii> or in rb
<hoelzro> galymzhan: ENV['DISPLAY'] = ':0'
`brendan has joined #ruby
mockra has quit [Ping timeout: 255 seconds]
<galymzhan> Still doesn't work. Tried DISPLAY and & trick. When I choose "Run in Terminal" , terminal window flashes for a moment, there isn't any output
jonathanwallace has joined #ruby
<shevy> ok
<shevy> so something happens
<hoelzro> galymzhan: but doing the same thing in a bash script works?
a_a_g has quit [Quit: Leaving.]
<shevy> we are debugging here :-)
<galymzhan> yes when I use bash it works
tvw has joined #ruby
<galymzhan> both from terminal and from nautilus
<hoelzro> and running the Ruby script from the terminal works?
<hoelzro> ok
<galymzhan> yes, Ruby from terminal works too
<galymzhan> seems like it's inheriting something from bash
<hoelzro> try system instead of ``, maybe
<hoelzro> just for the hell of it
Progster has joined #ruby
<galymzhan> system() behaves similarly. I also tried everything like `bash -c zenity` and the like
iamtakingiteasy has joined #ruby
tommyvyo has joined #ruby
<shevy> ok
<shevy> can you try this with perl or python instead?
<galymzhan> what exactly happens when `thing` is called?
<shevy> I think it asks the shell to run that command
<shevy> possibly /bin/sh
<shevy> or
<shevy> it uses a syscall directly... I am not sure
<shevy> trying to find the official docu... :)
<galymzhan> let me check it in php )
<hoelzro> galymzhan: try system 'zenity', '--info', '--text=Hello'
<shevy> "Returns the standard output of running cmd in a subshell. The built-in syntax %x{...} uses this method. Sets $? to the process status."
<shevy> port = pipe_open_s(str, "r", FMODE_READABLE|DEFAULT_TEXTMODE, NULL);
<shevy> if (NIL_P(port)) return rb_str_new(0,0);
<iamtakingiteasy> hi, which FOSS IDE for ruby/rails available under linux do you recommend?
<shevy> iamtakingiteasy use the simplest editor. IDEs generally suck. sublime text editor is ok. geany too.
<iamtakingiteasy> shevy: i came from java world. there IDEs are god tools.
<shevy> yes but java needs a lot of boilerplate code
[Neurotic] has quit [Quit: Leaving]
<shevy> ruby class Foo; def bla; puts 'yippie eye yo ' * 20; end; end; Foo.new.bla
<iamtakingiteasy> yeah, thats true
<_br_> iamtakingiteasy: Real men use "ed"
<shevy> iamtakingiteasy, Hanmac uses eclipse I think
Supaku has joined #ruby
<zii> iamtakingiteasy, Vim, if you know it already.
Markvilla has quit [Quit: Markvilla]
<_br_> .oO(let the flame wars begin)
<zii> No flame wars.
<iamtakingiteasy> i use vim for haskell, but is there good standard library autocompletions vim plugins for ruby?
<depy> emacs! fus ro daaaaaaah!
<zii> Vim is not superior.
<galymzhan> Zenity works from PHP )
<zii> iamtakingiteasy, Quite.
<iamtakingiteasy> zii: nice! can you name some?
<zii> iamtakingiteasy, Make sure it's compiled with +ruby and generate tags.
vadmeste has joined #ruby
<zii> Oh, I mean vim does it itself.
<zii> But in it's own way.
<vadmeste> Hello everybody. I executed this in my console : MyMap = [{"1" => "one"}, {"2" => "two"}] ; MyHash = Hash[]; MyHash.clear ; MyMap.each { |x| MyHash.merge(x)} ; puts MyHash
<vadmeste> but MyHash is still empty, Anyone can help me ?
<zii> iamtakingiteasy, There's supertab, that makes completions usable through tab, by default they're usable through ^n/^p.
<hoelzro> does Hash#merge alter the existing hash, or return a new one?
<zii> New one.
<zii> no !
<zii> hoelzro, Check the docs.
<hoelzro> vadmeste: Hash#merge returns the new Hash, I believe
<hoelzro> zii: I just tested it in pry =)
<zii> Stdlib's docs are usually badass.
krusty_ar has joined #ruby
Axsuul has quit [Ping timeout: 246 seconds]
<vadmeste> thanks you all, it works when I do MyHash = MyHash.merge(x)
<vadmeste> but is it a good idea ?
<zii> Do enterprise-coddish-people support of using Object#tap as a let/return construct?
<hoelzro> vadmeste: sure, why not?
<zii> vadmeste, Mmm, that looks like dynamic constant assignment, don't do that.
<zii> Since it's not a constant.
<hoelzro> oh, I didn't think about the constant part
<hoelzro> zii += 1
<zii> haha ^
<zii> ruby's ++
<embraceyourlove> hey guys, i got pik for windows, but now cant install another ruby instance
<embraceyourlove> its written that
<embraceyourlove> install|in Downloads and installs different ruby versions.
<Hanmac> vadmeste use lowercase for variables
<hoelzro> galymzhan: did you try system?
<vadmeste> Hanmac: oh thanks
<galymzhan> hoelzro: yes, system didn't work
<hoelzro> hmm
greywolf` has joined #ruby
<Hanmac> zii do you know whats the difference between ("-1" and "- 1")
<galymzhan> hoelzro: PHP's exec() works as I want
<zii> Hanmac, Yes.
<Hanmac> and? ;P
<zii> Hanmac, x -1 is Fixnum#-@, x - 1 is Fixnum-, is that what you mean?
<zii> Wait, why are you asking?
<hoelzro> galymzhan: maybe you should just try writing something to a file from within your Ruby script to make sure it's actually getting run?
lzhz has left #ruby [#ruby]
<shevy> embraceyourlove perhaps it is buggy :)
Squarepy has joined #ruby
geekbri has joined #ruby
<embraceyourlove> 1 sec i will show screen
<shevy> zii, Hanmac wants to find out if you are worthy for him to marry
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<zii> lol
schwap has joined #ruby
<zii> Ruby can do this! http://sprunge.us/Ddha Nice.
<Hanmac> "-1" is an expession, while "- 1" is -@
robbyoconnor has quit [Ping timeout: 248 seconds]
<zii> mmm
<zii> really now
<shevy> arent those dynamic constants?
* zii tests that.
<zii> shevy, Ruby allows it without complaining, guess not.
<embraceyourlove> 1 sec, its coming
<zii> Hanmac, Hmm, you're right.
<embraceyourlove> look at this
dhruvasagar has quit [Ping timeout: 240 seconds]
<embraceyourlove> i am rly retarded or something
<zii> Hanmac, Hand't tested when exactly -@ gets unvoked.
<Hanmac> defined? can it show you:
<Hanmac> defined?(-1)#=> "expression"
<Hanmac> defined?(- 1)#=> "method"
<zii> I already tested that otherwise.
dhruvasagar has joined #ruby
infinitiguy has joined #ruby
<embraceyourlove> when i type pik install|in it says that "in
<embraceyourlove> 'in' is neither a program or a command
shashin has joined #ruby
<hoelzro> embraceyourlove: try pik install
<hoelzro> the | probably just means "you can say pik install or pik in"
* iamtakingiteasy is compiling vim with +ruby
<hoelzro> in the shell, | means pipe
<hoelzro> do you need +ruby to use Ruby omnicompletion?
<iamtakingiteasy> zii: also, there is neocomplcach plugin for vim, which makes autocompletion works just as you type
<hoelzro> I didn't think you did
<iamtakingiteasy> neocomplcache*
<embraceyourlove> pik install says - error undefined method "downcase" for nil:NilClass
<zii> iamtakingiteasy, I don't think it's neccessary, but you may find it usable.
<vadmeste> hoelzro: myhash = myhash.merge(x) won't make some memory leaks ?
<zii> iamtakingiteasy, I'd find it rather annoying.
<hoelzro> vadmeste: nah
<hoelzro> Ruby'll clean it up
<workmad3> Hanmac: you can also redefine -@ in Fixnum and then do -1 and - 1 :)
Taichou has joined #ruby
<shevy> embraceyourlove yeah the | means either
<shevy> so either "pik in" or "pik install"
<workmad3> Hanmac: I was curious as to whether -1 was an expression that used -@ anyway ;)
<workmad3> (note, it isn't)
<hoelzro> embraceyourlove: you probably need to say "pik install some-version-of-ruby"
<embraceyourlove> sry, im a newby
<embraceyourlove> pik install says - error undefined method "downcase" for nil:NilClass
<hoelzro> embraceyourlove: right; you probably have to provide it an additional argument
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<hoelzro> like pik install ruby-1.9.3 or something
* hoelzro has never used pik
<embraceyourlove> There was an error.
<embraceyourlove> Error: Pik isn't aware of an implementation called 'ruby-1.9.3' for Windows.
FlyingFoXy is now known as FlyingFoX
<embraceyourlove> ok, im overly retarded to get over this, i try RVM
sendoushi has joined #ruby
berserkr has quit [Quit: Leaving.]
galymzhan has quit [Quit: Leaving.]
around has joined #ruby
Jake232 has joined #ruby
krusty_ar has quit [Read error: Operation timed out]
[diecast] has joined #ruby
nyuszika7h is now known as Guest20664
Guest20664 has quit [Killed (holmes.freenode.net (Nickname regained by services))]
around is now known as nyuszika7h
Tomasso has joined #ruby
phanousit has quit [Ping timeout: 255 seconds]
<shevy> Pik probably is buggy as hell
<shevy> but someone here said that RVM does not work on windows
infinitiguy1 has joined #ruby
infinitiguy1 has quit [Client Quit]
<embraceyourlove> i am following this instruction
niklasb has joined #ruby
infinitiguy has quit [Ping timeout: 240 seconds]
vaks has joined #ruby
Stalkr_ has joined #ruby
sendoushi has quit [Read error: Connection reset by peer]
sendoushi has joined #ruby
tommyvyo has joined #ruby
<shevy> sounds scary
<embraceyourlove> what?
<shevy> Does RVM work on windows? Will it in the future?
<shevy> NO. If you would like to manage multiple versions of ruby on windows please use pik which is an excellent tool by Gordon Thiesfeld. You can find it on GitHub.
<shevy> and pik does not work
heftig has quit [Ping timeout: 248 seconds]
<shevy> embraceyourlove, using cygwin + rvm on windows
<shevy> one day you may join us all and use either mac or linux :>
<shevy> when I stopped using windows because of games, there was no real reason not to switch
<embraceyourlove> i think that mac is better alternative
dhruvasagar has quit [Ping timeout: 248 seconds]
jgarvey has joined #ruby
<shevy> dunno. possibly better than windows. better than a well adapted linux? not convinced really
<hoelzro> after a few years using a Mac, I'm convinced I'd rather do my work on Linux
<zii> Why so?
jrajav has joined #ruby
<zii> You can do almost exactly the same thing on a mac.
<hoelzro> </2¢>
dhruvasagar has joined #ruby
<hoelzro> zii: I'm frustrated, because there is software I want to use that doesn't want to compile on a Mac
<hoelzro> particularly on later versions of OS X
<zii> Oh, okay. Such as?
<hoelzro> mplayer
<hoelzro> qemu (compiles, doesn't work)
<hoelzro> rakudo
<hoelzro> there is no package manager integrated with the system
<zii> Hmm, valid reasons. :] Fortunately I haven't had to use those.
<hoelzro> (save the App Store)
<zii> Well there's homebrew.
<hoelzro> yes, and I use it and enjoy it
<hoelzro> but
<hoelzro> it's not integrated =)
<zii> Yeah, that sucks.
<hoelzro> I still don't have a freaking clue which compilers are actually used for what on my system
<hoelzro> I think I have GCC, but then some programs complain that I don't?
<hoelzro> and Clang is quite nice (and a really cool project!), but there are some programs that still won't compile with it
uris has quit [Quit: leaving]
<hoelzro> and trying to convince to compile with GCC is tedious, and sometimes configure reports "WTF GCC NOT FOUND"
<zii> Magical ways of mac are sometimes magical.
<embraceyourlove> my latest Linux Ubuntu 9 was such a frustration
<hoelzro> zii: Magical ways of mac get in my way =P
<embraceyourlove> for a simple program, it required 300mb other packages
<shevy> embraceyourlove there are lots of shit distributions out there
<hoelzro> I also like a system where I can (conceptually) modify pretty much anything
<zii> Ubuntu's ways are magical and not dev-friendly as well.
<shevy> ubuntu is one of those shit distributions. but it kinda made things easy and dumb for people, so they use it, sheep as they are
paolooo has joined #ruby
<hoelzro> zii: yeah, I'm seeing that now
* hoelzro was trying 12.04 this morning
<shevy> I think in the long run, there simply is no real substitute for user-knowledge
<zii> shevy, Where are you from?
<hoelzro> I'll probably just put Arch on it
<shevy> zii Europe, Austria, Vienna
<embraceyourlove> and what are good linux distributions?
<zii> Yes, arch is the way!
<shevy> arch is acceptable
<shevy> gentoo is acceptable in the sense that gentoo-users, like rking here, really know a LOT
Criztian has joined #ruby
<hoelzro> shevy: I used to use Gentoo; taught me a lot
<shevy> :)
<hoelzro> and before the crash, the Gentoo wiki was the best
<zii> Arch taught me a lot.
<shevy> yeah they had a good wiki
<zii> *had*?
<hoelzro> Arch is also good at teaching, and its wiki is superb
<hoelzro> zii: it died =(
<zii> What happened?
<zii> It's gone?
<shevy> ubuntu has a good wiki too
<hoelzro> zii: HDD failure, I think
<hoelzro> not sure
<zii> What about the info?
ken_barber has joined #ruby
<hoelzro> zii: someone could have mirrored it; not sure
<embraceyourlove> i am extremely spoiled by these mac style apps, one click-installs, iphones, is there a way to get into Linux now?
<zii> Use arch or gentoo for a year.
<zii> Arch is less painful.
<zii> IMO
Synthead has quit [Quit: sqooq]
<hoelzro> well, arch/gentoo is not going to expose you to one click installs
<hoelzro> but it will teach you a *lot*
subbyyy has joined #ruby
<hoelzro> about Linux, and about your computer
subbyyy has quit [Client Quit]
Taichou has quit [Remote host closed the connection]
<zii> You will start to hate things you've never thought possible. or something like that
dv310p3r has joined #ruby
<hoelzro> if a problem occurs on a Mac or a Windows machine, I'm seldom sure on how to solve it (aside from common ones)
<hoelzro> if a problem occurs on my Linux machine, I almost always know
<zii> Myeah, that's true.
<hoelzro> because of what I've learned
banseljaj is now known as imami|afk
<embraceyourlove> But, what these knowledge gives to you?
<hoelzro> I'd rather use a car with some assembly required than a car with the hood welded shut
<embraceyourlove> this*
<hoelzro> embraceyourlove: satisfaction, fun, the ability to understand how things work, the ability to fix things
<kalleth> hoelzro: if a problem happens on a windows machine, i can always solve it without any prior knowledge by fucking about with menus
<zii> General know-how, fun if you're into that.
pu22l3r has joined #ruby
mockra has joined #ruby
<kalleth> hoelzro: if, on the other hand, a problem happens on a windows machine, goddamnit i have no clue about anything or which dodgy file somewhere to fix it
<kalleth> and spend 4 hours on google and eight boxing with a config file
<hoelzro> and I like to think it helps me know to write programs
<kalleth> just sayin', that argument has multiple sides ;)
<zii> Linux is for nerds, let's face it.
<hoelzro> kalleth: no matter what, it comes down to experience
linoj has joined #ruby
Renrea has joined #ruby
_adeponte has quit [Remote host closed the connection]
<kalleth> hoelzro: i can generally find whichever option is in whichever menu by playing around with it on windows... on linux i have no hope, no matter how many esoteric man pages i stare at
<kalleth> ;p
<kalleth> but yeah
<kalleth> i prefer neither OS
adeponte has joined #ruby
<hoelzro> with Linux, though, *everything* is open to you
<kalleth> though when windows 8 comes out i will change my mind
<shevy> Linux is semi for nerds, the problem is that developers are often either idiots or lazy and don't want to polish things to perfection
<hoelzro> if you really want, you can dig into the kernel/init system/whatever and figure out what happens where
<kalleth> hoelzro: open, as in "if i am an excellent C developer i have a chance at changing this with some compileflags etc"
<kalleth> not "I JUST WANT TO CLICK SOMETHIGN AND HAVE IT WORK
<kalleth> i have no axe to grind either way, though ;p
<hoelzro> kalleth: yes
<kalleth> linux is only free if your time has no value
<kalleth> ^ one of my favorite sayings
<shevy> I am not defending distributions at all. I think they should all die
<hoelzro> kalleth: well, what do you do when your machine blue screens for no reason?
<hoelzro> what menus do you click then?
<hoelzro> my time has value
<shevy> the restart button
<shevy> :D
<embraceyourlove> *linux is only free if your time has no value* dat
<hoelzro> I just prefer to translate it into knowledge
<hoelzro> and knowledge is power =)
<kalleth> hoelzro: that hasn't happened in literally 5 years
<shevy> real knowledge yeah
<zii> kalleth, You do everything on a abacus, do you?
<hoelzro> kalleth: I'm just saying, it could happen
<zii> an*
<kalleth> hoelzro: what has happened though is my linux machines have hard locked several times due to kernel incompatibilities or upgrades not being compat with my gfx card etc ;p
<zii> That happens.
mockra has quit [Ping timeout: 245 seconds]
<hoelzro> kalleth: so the graphics card was incompatible with a particular kernel version?
<kalleth> which had automatically installed itself anyway due to distro automatic updates
<shevy> no
<kalleth> guess how many times a windows update that happens automatically has fucked my PC
<shevy> that sounds like a shit distribution
<kalleth> *shrug*
<kalleth> largest distro ever, it was ubuntu
<shevy> what was it :)
<shevy> yes
<shevy> largest shit ever too
<kalleth> don't care
<zii> kalleth, Try to develop something on a windows.
<kalleth> zii: i 'develop' stuff on windows all the damn time
<kalleth> not rails though, i locally edit but remotely run for that
adeponte has quit [Ping timeout: 240 seconds]
<shevy> what editor do you use on windows?
<hoelzro> kalleth: I had a kernel problem with my laptop a few months ago
<kalleth> that's down to ruby/rails windows support being cack for native extensions though
<zii> Well I consider an it awful. painful and terrifying experience.
<kalleth> shevy: gvim
<embraceyourlove> ok i got it, i better go and install arch linux or something on the virtual machine and code there
<kalleth> zii: use it for the same amount of time as you do windows, its really not that bad
<hoelzro> so I downgraded and told my package manager to not upgrade until the problem was fixed
<shevy> kalleth do you use cygwin or msys?
<hoelzro> linux isn't easier to use
<kalleth> shevy: i use the gvim distribution native to windows
<hoelzro> I won't argue that
<shevy> hoelzro what package manager. debian again? :D
<hoelzro> shevy: pacman
<zii> hoelzro, Depends highly.
<shevy> ah ok
<hoelzro> what linux gives you is the power to do pretty much anything with your computer
yoklov has joined #ruby
<hoelzro> if you're willing to take the time to learn
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
<kalleth> and the disadvantage of that is that for anyone who isn't a supernerd, its still annoying as hell to do the most basic tasks
<kalleth> i'm fine with it, but for 99% of people, its not usable
<hoelzro> fair enough
<chiel> i wanted to use linux for my htpc, but there wasn't a good graphics driver at the time for my chipset. :(
<kalleth> ^
<kalleth> that too
<hoelzro> I like Linux and I'm willing to learn everything I can about it because I am passionate about learning about computers
sailias has joined #ruby
<hoelzro> not everyone is
<hoelzro> and that's ok
<kalleth> i have never once got any linux installation anywhere ever to support my graphics card and monitor setup
pu22l3r has quit [Remote host closed the connection]
<kalleth> whearas windows supports it perfectly
<kalleth> out of the box
<kalleth> quad monitor across dual graphics cards
<chiel> i had an amd e-450 apu
<kalleth> gg kthx cu later
<chiel> it was just out
<hoelzro> this is mincing words, but it's more like the device manufacturer supports Windows perfectly =)
pu22l3r has joined #ruby
<kalleth> "oh, you wanted to DRAG WINDOWS BETWEEN THESE SCREENS? sry, can't do that for you"
<chiel> but now it's been out a while, so might be able to install linux on it now
m4rtijn has quit [Remote host closed the connection]
<kalleth> hoelzro: i get that, but from my perspective, windows does what i want, linux doesn't.
kpshek has quit []
<hoelzro> fair enough
krusty_ar has joined #ruby
<kalleth> from a desktop machine, that is
<kalleth> all my servers run linux ;p
<chiel> if your server does not run some kind of *nix you should be shot :p
<chiel> windows servers *shudders*
noyb has quit [Quit: Leaving.]
<kalleth> chiel: mate of mine has a home server that is literally 2k8
<kalleth> i want to cringe every time i go round his for beer
<chiel> haha
<kalleth> considering spilling a pint "accidentally" on it
<chiel> haha :p
<chiel> i don't have an actual server machine
<kalleth> right, fag, then back to "work"
abra has joined #ruby
<chiel> but i have a htpc with a nas on it
<kalleth> chiel: i have 5 machines running in my flat
<chiel> hah :)
<kalleth> dmz/server/gaming/htpc/laptop
<chiel> i have a pc, mbp 13" and htpc
<chiel> and well, a nas
<kalleth> i have 3 different network ranges too, static/dhcp/wifi ip ranges
<kalleth> all with dyndns ;)
<chiel> yeah I am not THAT great at that stuff
depy has quit [Quit: Leaving]
<chiel> I do everything but gaming on my pc
<chiel> all dev etc on my mbp
<kalleth> i'll be getting a macbook soon
<chiel> since I have a big monitor
<kalleth> when i move jobs
<kalleth> (notice periods fucking suck)
<chiel> 27" 2560x1440 omnom :
<kalleth> fu
<kalleth> i want one
<chiel> yeah, I had to leave my 15" mbp at my previous job
<kalleth> although, chiel
<kalleth> my home setup is
<chiel> at my new job I got a 27" imac... so i bought my own mbp
<kalleth> [24"1920x1200]
<jrajav> Anyone have any suggestions for eval'ing arbitrary Ruby code in a safe sandbox?
<kalleth> [19][24][19]
<jrajav> I'm trying to get a Ruby bot set up for this chan :3
<chiel> kalleth: yeah, I'm just not that fond of multiple monitors
<kalleth> ..
<kalleth> they help SO MUCH
<chiel> so I opted for one, but with a high resolution
<jrajav> I'm checking out freaky-freaky but I'm not sure if it's what I need
<jrajav> Or even how to use it
<jrajav> lol
pete_ has joined #ruby
<kalleth> going from 1 screen to 2 is insanely better for me
pete_ is now known as Guest64333
alienaut has quit [Quit: Leaving.]
<kalleth> 2-3/3-4 is negligible
<kalleth> doesn't matter about res because i don't use a tiling WM
<chiel> I've never had two *proper* screens though, I must admit
kpshek has joined #ruby
<chiel> used to be mbp with the monitor
<Guest64333> Where in github can I find the file this document is generated from: http://ruby-doc.org/core-1.9.3/Object.html ?
<kalleth> two display devices
<chiel> but the mbp screen is just too small in comparison
<chiel> makes it weird
fearoffish has joined #ruby
Morkel has quit [Quit: Morkel]
<kalleth> kinda
<kalleth> but you use the mpb screen for reviewing docs + specs etc
<chiel> If they are similarly sizes, it's probably a lot better
<kalleth> and then the external for your vim window with splits ;)
<kalleth> :sp / :vsp
<kalleth> :D
<chiel> yeah
<kalleth> anyway
<kalleth> moff /afk
<chiel> I edit in fullscreen terminal with vim
<chiel> with vs, sp and tabe
<chiel> :D
<zii> kalleth, <C-w> s/v
Guest64333 is now known as peteretep
<hoelzro> Guest64333: it's the repo is mirrored in ruby/ruby
locriani has quit [Remote host closed the connection]
busybox42 has joined #ruby
<hoelzro> peteretep: and the file is probably objecgt.c
<hoelzro> ugh
<hoelzro> object.c
Renrea has quit [Read error: Connection reset by peer]
<peteretep> I started tehre, but didn't see it - I'll look again, thanks
statarb3 has quit [Quit: Leaving]
<peteretep> Can someone confirm that 'frozen' is a state on a reference, and 'tainted' is a state on an object?
<hoelzro> I thought an object was frozen too?
SeanLazer has joined #ruby
niklasb has quit [Read error: Connection reset by peer]
jrist-afk is now known as jrist
Taichou has joined #ruby
niklasb has joined #ruby
poppiez has joined #ruby
<peteretep> hoelzro: hrmmm
<peteretep> Perhaps the Ruby devs here were wrong
* peteretep goes to do something else
peteretep has left #ruby [#ruby]
<hoelzro> huh?
Markvilla has joined #ruby
locriani has joined #ruby
<hoelzro> oh, re: freezing
ReTFEF has joined #ruby
stephenjudkins has joined #ruby
<hoelzro> embraceyourlove: haha
<SeanLazer> hi guys, i'm having an inheritance issue, probably because i'm doing something wrong: https://gist.github.com/3232551
freeayu has quit [Read error: Connection reset by peer]
<SeanLazer> the method on ParentController gets called before ChildController has a chance to set its options
<SeanLazer> so there's no way to override the options that i can see
<hoelzro> SeanLazer: that's probably because you're calling it on line 5
<hoelzro> before the child class is even born!
hynkle has joined #ruby
<SeanLazer> right!
tobym_ has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<SeanLazer> so what's the correct way to implement this?
<hoelzro> hmm
nari has joined #ruby
<hoelzro> well, when do you need these options to be processed?
<hoelzro> when a controller object is created?
<hoelzro> or another time?
TheTFEF has quit [Ping timeout: 240 seconds]
ThaDick has joined #ruby
<hoelzro> embraceyourlove: this is why I typically recommend people to start with something like Ubuntu =)
<hoelzro> I tend to recommend Arch to more experienced users who want a little more control
<chiel> i use debian squeeze myself
<jrajav> No one has experience with any Ruby sandboxers? :/
<chiel> mainly cause it was used at my previous job though
<mneorr> anyone using a 'whois' gem ?
<hoelzro> debian is a fine distro
<chiel> at my current job we use centos
erichmenge has joined #ruby
<hoelzro> jrajav: sorry, I didn't see your question about them!
<chiel> or well.. some aws version of centos
<workmad3> jrajav: safe code eval?
<jrajav> Yup
<hoelzro> jrajav: implementing a sandbox in the same process seems challenging
carloslopes has joined #ruby
<hoelzro> (at least it did when I looked at it)
<workmad3> jrajav: and what sort of sandbox are you thinking? so it can't affect a larger ruby system? or can't affect the operating environment?
<hoelzro> I was thinking about making a binding for mRuby so that you can have a tightly controlled sandbox
<jrajav> Just the operating environment
<jrajav> No Kernel.exec, etc.
<workmad3> jrajav: hmm... why not chroot it instead? :)
<jrajav> Spawning a new Ruby interpreter for each eval would be preferrable to make it robustish
<hoelzro> jrajav: you probably should run it in a separate process
<hoelzro> so you can set CPU limits and such
<workmad3> jrajav: create a separate folder for each 'script', and run a chrooted ruby interpreter inside it
<jrajav> workmad3: I'm not very familiar with chroots, except what they are. Can you run a ruby interpreter that lies outside the chroot jail?
<workmad3> jrajav: you could hard-link the interpreter into the jail
<jrajav> Also, I'd like to set this up quickly if possible; it would be nice to use something already made rather than write this all myself
<workmad3> jrajav: and permission it appropriately
<jrajav> workmad3: An in-Ruby sandbox would still be good to avoid things like infinite forking
infinitiguy has joined #ruby
joshman_ has joined #ruby
jasonLaster has joined #ruby
Markvilla_ has joined #ruby
<Spooner> jrajav : There are a number of gems that provide (for better or worse) sandboxing. Don't think you want to roll your own if you want it even vaguely robust.
<jrajav> I'm checking out Sandrbox right now
freeayu has joined #ruby
heftig has joined #ruby
internet_user has joined #ruby
<Spooner> Check which one something like TheRubyGame uses.
<SeanLazer> hoelzro: sorry i was called away from my desk. i guess i need that code to be run when a controller is instantiated? but i need to be able to override the options
<jrajav> I think I'll use Jerk (dead simple node.js IRC bot) to spawn one-off Ruby instances that just do require 'sandrbox'; Sandrbox.perform(['code to eval']).output
Markvilla has quit [Ping timeout: 252 seconds]
Markvilla_ is now known as Markvilla
<SeanLazer> hoelzro: i tried putting it in self.inherited but the class still hasn't been born at that point
<jrajav> Think I should still run the bot/interpreter in a chroot?
<Spooner> SeanLazer : But the thing you are trying to override is a class method, run at the time the class is defined.
phanousit has joined #ruby
<hoelzro> SeanLazer: you could define initialize to look at the options of the class object
<hoelzro> ex. def initialize puts self.class.options end
<SeanLazer> hmm
vaks has quit [Ping timeout: 245 seconds]
jasonLaster has quit [Remote host closed the connection]
levieraf has joined #ruby
jasonLaster has joined #ruby
levieraf has quit [Client Quit]
levieraf has joined #ruby
levieraf has quit [Client Quit]
levieraf has joined #ruby
levieraf has quit [Client Quit]
gregorg has joined #ruby
gregorg has quit [Changing host]
gregorg has joined #ruby
uris has joined #ruby
levieraf has joined #ruby
flype has joined #ruby
mohits has quit [Ping timeout: 252 seconds]
<SeanLazer> hoelzro: that may have done it!
burgestrand has joined #ruby
jasonLaster has quit [Ping timeout: 248 seconds]
infinitiguy has quit [Quit: Leaving.]
velikasha has joined #ruby
velikasha has quit [Client Quit]
<SeanLazer> hoelzro: looks like it did… i have no idea why i didn't think to override initialize, sometimes when i'm working with rails i totally forget that it's just ruby
tatsuya_o has quit [Remote host closed the connection]
Morkel has joined #ruby
tatsuya_o has joined #ruby
Hanmac has quit [Ping timeout: 248 seconds]
monkegjinni has quit [Remote host closed the connection]
mengu has joined #ruby
yoklov has quit [Quit: computer sleeping]
elhu has quit [Quit: Computer has gone to sleep.]
bothra has joined #ruby
<shevy> SeanLazer hehehe
<embraceyourlove> I am actually trying to install RVM through cygwin on Windows, will see how it works out
<shevy> good luck embraceyourlove
nacengineer has quit [Remote host closed the connection]
<embraceyourlove> thank you
br4ndon has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
jearvondharrie has joined #ruby
iamjarvo has quit [Read error: Connection reset by peer]
tk__ has joined #ruby
weasels is now known as otters
poppiez has quit [Quit: Linkinus - http://linkinus.com]
Rochefort has quit [Remote host closed the connection]
infinitiguy has joined #ruby
zodiak has quit [Ping timeout: 272 seconds]
johnlcox has joined #ruby
cantbecool has joined #ruby
<jrajav> Someone pick a name for the new Ruby bot
<jrajav> QUICK
<jrajav> GO
banisterfiend has joined #ruby
rippa has joined #ruby
jjbohn has joined #ruby
monkegjinni has joined #ruby
LBRapid has joined #ruby
<zii> jrajav, stick
Jay_Levitt has joined #ruby
<GeekOnCoffee> jrajav: QUICK
<jrajav> stick.
jearvondharrie has quit [Read error: Connection reset by peer]
<jrajav> Why stick lol
<pipopopo> Hi *
chimkan has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
<zii> jrajav, Rhymes.
sailias has joined #ruby
vaks has joined #ruby
strife25 has quit [Quit: Computer has gone to sleep.]
chylli has quit [Remote host closed the connection]
zodiak has joined #ruby
Rochefort has joined #ruby
stefanp_ has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
Stalkr_ has quit [Quit: Leaving...]
heftig has quit [Ping timeout: 248 seconds]
awarner has joined #ruby
g_rotbart has quit [Remote host closed the connection]
stefanp has quit [Ping timeout: 265 seconds]
Abbas| has quit [Ping timeout: 256 seconds]
mockra has joined #ruby
<rking> embraceyourlove: Should work fine.
stopbit has joined #ruby
bj0ern has joined #ruby
<rking> embraceyourlove: How's it going so far?
joesavage has joined #ruby
jprovazn has quit [Quit: Leaving]
<joesavage> How can I get the full name of a file in Ruby when I only know the path and a unique identifier to the file? i.e. dynamic/category_one/1 needs to go to dynamic/category_one/1--Some-name.html
elhu has joined #ruby
<lectrick> Anyone know how I run just 2 tests of my suite, consecutively, in the same memory space (without reloading the rails stack for example)? Usually I design my tests to run purely with "ruby /path/to/test.rb" (which gives me the excuse to ask the question here I guess lol)
Abbas5 is now known as Abbas|
<rking> lectrick: Hrm. Well, you could probably come up with something involving DRb directly, but I wonder if you maybe really want Guard + Spork + DRb ?
justsee has quit [Quit: Leaving...]
<lectrick> rking: I could use Guard/Spork/what have you, but I was wondering if there was a pure-Ruby way to just run 2 Ruby files consecutively
<lectrick> like could I do ruby /path/to/file/1.rb /path/to/file/2.rb ?
crankycoder has joined #ruby
thisirs has joined #ruby
mockra has quit [Ping timeout: 248 seconds]
<lectrick> (without it aborting the memory space in between I mean)
centipedefarmer has joined #ruby
heftig has joined #ruby
cakehero has joined #ruby
rutkla has quit [Ping timeout: 246 seconds]
<rking> lectrick: This is a little wonky, but how about: ruby < /path/to/file/1.rb < /path/to/file/2.rb
<rking> (Making a single stream of their text)
<lectrick> nice
v0n has joined #ruby
ken_barber1 has joined #ruby
EPIK has quit [Ping timeout: 264 seconds]
s1n4 has joined #ruby
chimkan has quit [Quit: chimkan]
v0n has quit [Client Quit]
<embraceyourlove> omg blast it. Tomorrow I am installing hackintosh.
<lectrick> rking: I was also thinking just telling ruby to -r (require) the first files first, then the last parameter is the last file
<rking> lectrick: That would work.
senny has quit [Remote host closed the connection]
davidpk has quit [Quit: Computer has gone to sleep.]
jprovazn has joined #ruby
ken_barber has quit [Ping timeout: 246 seconds]
ken_barber1 is now known as ken_barber
<rking> lectrick: But you'll have to mess with the require path stuff.
<lectrick> rking: I can't just give the full path to the file?
strife25 has joined #ruby
davidpk has joined #ruby
adeponte has joined #ruby
theRoUS has joined #ruby
<rking> lectrick: Well, you can in your case, I bet.
<rking> If it was working as: ruby < test/foo.rb < test/bar.rb , it will work (and probably better, because you'll retain filenames) with: ruby -r test/foo test/bar.rb
nari has quit [Ping timeout: 252 seconds]
<joesavage> How can I get the full name of a file in Ruby when I only know the path and a unique identifier to the file? i.e. dynamic/category_one/1 needs to go to dynamic/category_one/1--Some-name.html
cantbecool has quit [Quit: Textual IRC Client: www.textualapp.com]
mockra has joined #ruby
<rking> joesavage: Dir['dynamic/category_one/1*'] ?
verto|off is now known as verto
<rking> joesavage: It'll always return an array (even if there's only 1 result, or even if 0)
sebastorama has joined #ruby
liluo has joined #ruby
al2o3cr has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> IT LIIIIIIVES
<jrajav> Now for the true test
<jrajav> >> 1 + 2
<al2o3cr> 3
<jrajav> ZOMGAFDASFD
<joesavage> rking: Works great, thanks!
<lectrick> rking: joesavage: yeah, something like what rking said will get you an array of 1 file, typically... but not sure what you mean by "unique identifier to the file". Also rking you need the -- as part of that string
<jrajav> Well, al2o3cr is our new utterly bland, utterly featureless Ruby bot.
<jrajav> I'm out for half an hour; everyone feel free to play around with it. Please try to break it
<rking> lectrick: What do you mean re: '--'?
<shevy> is there a difference between:
<shevy> File.delete and FileUtils.rm
<shevy> ?
chimkan has joined #ruby
<jrajav> Wait, I need to try something quick
<jrajav> >> puts 'One thing'; puts 'Another thing'
al2o3cr has quit [Remote host closed the connection]
<jrajav> Heh
<jrajav> welp
<jrajav> bbl
NimeshNeema has quit [Max SendQ exceeded]
<rking> shevy: Looks like they're minor. For example, FileUtils.rm has a force: true parameter that will cause it to not raise an exception on failure.
denysonique has quit [Excess Flood]
<shevy> hmmm
<shevy> decisions decisions ...
nateberkopec has joined #ruby
<lectrick> rking: Consider a file starting with 1--filename and one starting with 100--filename. So you actually need Dir['dynamic/category_one/1--*']
<shevy> rking, if you want to delete files, what would you use? File.delete or FileUtils.rm
<lectrick> If you want the 1--filename and not the 100--filename
<shevy> for 100 .rb scripts
<shevy> :)
<rking> lectrick: I see what you mean. Yes, if that's what he means (and maybe he does). I was being more literal with the question.
<lectrick> shevy: I think the only diff is that FileUtils gives you a unix-y API to the filesystem and File.whatever is just your standard file I/O api
mockra has quit [Remote host closed the connection]
emmanuelux has joined #ruby
Spaceghostc2c has quit [Max SendQ exceeded]
MetaCosm has quit [Max SendQ exceeded]
<rking> shevy: It'd depend on which I'd used more recently, I guess, File or FileUtils (like in the context of the method), but otherwise I'd go with File.delete
_marvin has quit [Max SendQ exceeded]
<shevy> yeah ok
<shevy> I like the name File. more
Guest98241 has quit [Quit: Leaving to Quit]
Rajesh_ has quit [Quit: Leaving to Quit]
relix has quit [Max SendQ exceeded]
locriani has quit [Remote host closed the connection]
BrianE has quit [Max SendQ exceeded]
Rochefort has quit [Remote host closed the connection]
lectrick has quit [Max SendQ exceeded]
SeanTAllen has quit [Max SendQ exceeded]
dkannan has quit [Max SendQ exceeded]
Rochefort has joined #ruby
dekz has quit [Ping timeout: 248 seconds]
Criztian has quit []
SCommette has joined #ruby
locriani has joined #ruby
locriani has quit [Changing host]
locriani has joined #ruby
anildigital_work has quit [Max SendQ exceeded]
mneorr has quit [Quit: Leaving.]
burgestrand has quit [Quit: Leaving.]
dnyy has quit [Max SendQ exceeded]
[diecast] has quit [Ping timeout: 252 seconds]
andrew___ has joined #ruby
mockra has joined #ruby
jjbohn has quit [Remote host closed the connection]
elhu has quit [Ping timeout: 255 seconds]
kaichanvong has quit [Max SendQ exceeded]
mockra has quit [Remote host closed the connection]
jjbohn has joined #ruby
_bart has quit [Read error: Operation timed out]
shell0x has quit [Read error: Operation timed out]
dotemacs has quit [Max SendQ exceeded]
moeSeth has quit [Ping timeout: 240 seconds]
lorandi has joined #ruby
elhu has joined #ruby
<Spooner> shevy So just "include FileUtils" and you don't have to look at it :D
franckverrot has quit [Max SendQ exceeded]
<shevy> hmm
mucker has joined #ruby
<shevy> then I'd have to use rm() or?
<Spooner> Yes, just "rm file"
franckverrot has joined #ruby
ryh has joined #ruby
<Spooner> Really though, File is fine unless you need something extra that FileUtils offers (like rm_rf).
davidboy has quit [Ping timeout: 252 seconds]
notbrent has quit [Max SendQ exceeded]
Morkel has quit [Quit: Morkel]
jhowarth has quit [Max SendQ exceeded]
pvh has quit [Max SendQ exceeded]
elhu has quit [Client Quit]
Foxandxss|2 has joined #ruby
philcrissman has quit [Max SendQ exceeded]
Foxandxss has quit [Read error: Connection reset by peer]
<shevy> I like rm_rf :)
randym has quit [Max SendQ exceeded]
br4ndon has quit [Read error: Operation timed out]
jrajav has quit []
randym has joined #ruby
Jay_Levitt has quit [Quit: Linkinus - http://linkinus.com]
Foxandxss|2 has quit [Read error: Connection reset by peer]
kaichanvong has joined #ruby
Jay_Levitt has joined #ruby
yoklov has joined #ruby
dekz has joined #ruby
kapowaz has quit [Read error: Connection timed out]
GoGoGarrett has joined #ruby
spanx has quit [Read error: Connection timed out]
yoklov has quit [Client Quit]
moeSeth has joined #ruby
sgronblom has joined #ruby
relix has joined #ruby
Rochefort has quit [Remote host closed the connection]
joesavage has quit [Quit: Page closed]
elhu has joined #ruby
Rochefort has joined #ruby
axl_ has joined #ruby
dkannan has joined #ruby
pvh has joined #ruby
emmanuelux has quit [Ping timeout: 246 seconds]
SeanTAllen has joined #ruby
thisirs has quit [Remote host closed the connection]
lectrick has joined #ruby
br4ndon has joined #ruby
burgestrand has joined #ruby
mahmoudimus has joined #ruby
Foxandxss has joined #ruby
philcrissman has joined #ruby
mneorr has joined #ruby
greywolf` has quit [Quit: Linkinus - http://linkinus.com]
Renrea has joined #ruby
vaks has quit [Ping timeout: 260 seconds]
andrew___ is now known as andrewhl
jasonLaster has joined #ruby
mahmoudimus has quit [Client Quit]
ph^ has quit [Remote host closed the connection]
freeayu has quit [Quit: 离开]
embraceyourlove has quit []
andrewhl has quit [Remote host closed the connection]
nari has joined #ruby
bbttxu has joined #ruby
_marvin has joined #ruby
nacengineer has joined #ruby
milanj has joined #ruby
kapowaz has joined #ruby
jhowarth has joined #ruby
aibo has quit [Quit: Leaving]
jasonLaster has quit [Ping timeout: 252 seconds]
charliesome has quit [Quit: Textual IRC Client: www.textualapp.com]
nacengineer has quit [Quit: Leaving.]
digitalcakestudi has joined #ruby
<milanj> hey, why FIleUtils escapes file names properly but doesn't do the same with directories
<digitalcakestudi> trying to do something similar in ruby http://stackoverflow.com/questions/10055839/php-ping-minecraft-server-using-curl
notbrent has joined #ruby
<milanj> (on linux)
<hoelzro> milanj: how do you mean?
<digitalcakestudi> I have figured out the TCPSocket.open but thats about it
<hoelzro> what doesn't it do properly?
denysonique has joined #ruby
davidboy has joined #ruby
<milanj> well, you get "No such file or directory" if directory has blank spaces
elhu has quit [Ping timeout: 246 seconds]
shadoi1 has joined #ruby
<milanj> but it's working without problems with blank spaces in files
shadoi1 has quit [Client Quit]
chichou_ has joined #ruby
<hoelzro> milanj: can you give an example, please?
Synthead has joined #ruby
<milanj> sec, I will make small test case
<hoelzro> ok
tk__ has quit [Quit: ばいばい]
chichou has quit [Ping timeout: 240 seconds]
jrajav has joined #ruby
dotemacs has joined #ruby
elhu has joined #ruby
anildigital_work has joined #ruby
Ethan has quit [Ping timeout: 246 seconds]
<digitalcakestudi> any minecraft fans out there feel like helping me with this https://gist.github.com/3237614 ?
twinturbo has joined #ruby
<twinturbo> hey
<twinturbo> why does @thread.kill report aborting, then a second later report sleeping?
<twinturbo> I want that thread dead :/
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
minijupe has joined #ruby
_bart has joined #ruby
<Petit_Dejeuner> One more reason to use fibers over threads. ;)
Hanmac has joined #ruby
mohits has joined #ruby
mohits has quit [Changing host]
mohits has joined #ruby
<twinturbo> I just want to spawn an HTTP server for this test and kill it when the test it over
Squarepy has quit [Read error: Connection reset by peer]
manolo has quit [Ping timeout: 246 seconds]
Squarepy has joined #ruby
Squarepy has quit [Changing host]
Squarepy has joined #ruby
D4T has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
TorpedoSkyline has joined #ruby
stkowski has joined #ruby
<Petit_Dejeuner> Wish I could help.
IrishGringo has joined #ruby
Fretta has joined #ruby
billiam|| has joined #ruby
<milanj> hoelzro, you already helped, I think I did screw something ... sorry for noise
jprovazn_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<milanj> (write smallest test case before asking on irc)
adeponte has quit [Remote host closed the connection]
jprovazn has quit [Ping timeout: 248 seconds]
adeponte has joined #ruby
iamjarvo has joined #ruby
maletor has joined #ruby
jgrevich has joined #ruby
kolm has quit [Ping timeout: 248 seconds]
burgestrand has quit [Quit: Leaving.]
IPGlider has quit []
adeponte has quit [Ping timeout: 244 seconds]
Clooth has joined #ruby
_bart has quit [Ping timeout: 252 seconds]
_bart has joined #ruby
axl__ has joined #ruby
sailias has quit [Ping timeout: 252 seconds]
codespectator has joined #ruby
axl_ has quit [Ping timeout: 255 seconds]
axl__ is now known as axl_
stefanp_ has quit [Ping timeout: 265 seconds]
davidcelis has quit [Quit: K-Lined.]
burgestrand has joined #ruby
heftig has quit [Ping timeout: 248 seconds]
nacengineer has joined #ruby
shevy has quit [Ping timeout: 248 seconds]
milanj has left #ruby ["Leaving"]
bj0ern has quit [Ping timeout: 248 seconds]
darren has joined #ruby
Renrea has quit [Remote host closed the connection]
chrismcg is now known as zz_chrismcg
quest88 has joined #ruby
_bart has quit [Ping timeout: 248 seconds]
Taichou has quit [Remote host closed the connection]
v0n has joined #ruby
Eldariof-ru has quit [Read error: Operation timed out]
maletor has quit [Quit: Computer has gone to sleep.]
<Synthead> is there a "global" way I can catch an Interrupt? It seems kinda goofy to wrap all my code in a begin, rescue Interrupt, end.
vitoravelino is now known as vitoravelino`afk
<Petit_Dejeuner> Synthead, well you don't NEED to use begin.
<Synthead> Petit_Dejeuner: oh yeah? just rescue? how would that work?
<Petit_Dejeuner> A "def method" works as a begin, that way you don't need to indent everything.
<Petit_Dejeuner> http://pastie.org/4378263
<Mon_Ouie> trap("INT") { … }
<Mon_Ouie> (works for other signals too)
headius has joined #ruby
<lectrick> There's no way to ask a class or module where it was loaded from, is there?
maesbn has quit [Remote host closed the connection]
<Mon_Ouie> No, due to open classes mostly
shevy has joined #ruby
flype has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<Mon_Ouie> (notice Pry can look up the loaded files to find where a module has been opened in its show-source command)
m_3 has quit [Remote host closed the connection]
<Synthead> hmmmmmm
heftig has joined #ruby
jjbohn is now known as jjbohn|afk
m_3 has joined #ruby
mengu has quit [Remote host closed the connection]
vadmeste has quit [Quit: Lost terminal]
aganov has quit [Quit: aganov]
[diecast] has joined #ruby
<Synthead> suppose I'd need to handle interrupts differently for every method
asobrasil has joined #ruby
bglusman has joined #ruby
erratic is now known as icanhaz
BrokenCog has joined #ruby
Rochefortes has joined #ruby
resure has joined #ruby
levieraf has quit [Remote host closed the connection]
levieraf has joined #ruby
Rochefort has quit [Ping timeout: 252 seconds]
Taichou has joined #ruby
ananthakumaran has joined #ruby
porco has joined #ruby
moshee has quit [Ping timeout: 240 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
jxf has quit [Ping timeout: 240 seconds]
Berglund has quit [Quit: Computer died.]
bluenemo has joined #ruby
bluenemo has quit [Changing host]
bluenemo has joined #ruby
Taichou has quit [Ping timeout: 240 seconds]
arturaz has quit [Ping timeout: 240 seconds]
icanhaz is now known as erratic
v0n has quit [Ping timeout: 246 seconds]
benson has joined #ruby
Gab0 has joined #ruby
Goles has joined #ruby
v0n has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
gmci has quit [Quit: Computer has gone to sleep.]
<Synthead> is there a way I can make a method ignore a Interrupt?
<Synthead> s/a/an
Taichou has joined #ruby
emmanuelux has joined #ruby
jprovazn_ is now known as jprovazn_away
gmci has joined #ruby
jjbohn|afk has quit [Read error: Connection reset by peer]
leoncamel has quit [Remote host closed the connection]
leoncamel has joined #ruby
jxf has joined #ruby
hoelzro is now known as hoelzro|away
berserkr has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
<jrajav> Okay.
<jrajav> NOW he should be mostly ready
al2o3cr has joined #ruby
carloslopes has quit [Ping timeout: 244 seconds]
<jrajav> Everyone meet al2o3cr, the extremely young and extremely simple Ruby-interpreting bot
<jrajav> al2o3cr: version
<al2o3cr> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
axl_ has joined #ruby
<jrajav> >> 6 + 7
<al2o3cr> [13]
AlbireoX`Laptop has joined #ruby
<jrajav> >> 'A string'
<al2o3cr> ["A string"]
<jrajav> Use like so
<jrajav> Please try to break
<jrajav> I'm trying to make it relatively robust (obviously) :P
mikepack has joined #ruby
<Hanmac> >> exit
<al2o3cr> ["NameError: undefined local variable or method `exit' for Kernel:Module"]
mramaizng has joined #ruby
<jrajav> It's running in a sandbox with dangerous kernel and io methods removed
<jrajav> Switching locations, I'll brb ( the bot will stick around)
jrajav has quit [Quit: The best darkness is strange and surprising]
<Hanmac> >> Kernel.methods
<al2o3cr> [[:sprintf, :format, :Integer, :Float, :String, :Array, :warn, :raise, :fail, :global_variables, :__method__, :__callee__, :eval, :local_variables, :iterator?, :block_given?, :catch, :throw, :loop, :caller, :trace_var, :untrace_var, :at_exit, :syscall, :open, :printf, :print, :putc, :puts, :gets, :readline, :select, :readlines, :`, :p, :test, :srand, :rand, :trap, :exec, :fork, :exit!, :system, :spawn, :sleep, :exit, :abort, :load, :require, :require_relative,
<al2o3cr> :lambda, :binding, :set_trace_func, :Rational, :Complex, :freeze, :===, :==, :<=>, :<, :<=, :>, :>=, :to_s, :included_modules, :include?, :name, :ancestors, :instance_methods, :public_instance_methods, :protected_instance_methods, :private_instance_methods, :constants, :const_get, :const_set, :const_defined?, :const_missing, :class_variables, :remove_class_variable, :class_variable_get, :class_variable_set, :class_variable_defined?, :public_constant, :private_c
<al2o3cr> ance_variables, :instance_variable_get, :instance_variable_set, :instance_variable_defined?, :instance_of?, :kind_of?, :is_a?, :tap, :send, :public_send, :respond_to?, :respond_to_missing?, :extend, :display, :method, :public_method, :define_singleton_method, :object_id, :to_enum, :enum_for, :equal?, :!, :!=, :instance_eval, :instance_exec, :__send__, :__id__]]
<al2o3cr> exec, :module_eval, :class_eval, :method_defined?, :public_method_defined?, :private_method_defined?, :protected_method_defined?, :public_class_method, :private_class_method, :instance_method, :public_instance_method, :nil?, :=~, :!~, :eql?, :hash, :class, :singleton_class, :clone, :dup, :initialize_dup, :initialize_clone, :taint, :tainted?, :untaint, :untrust, :untrusted?, :trust, :frozen?, :inspect, :methods, :singleton_methods, :protected_methods, :private_m
hynkle has quit [Quit: Computer has gone to sleep.]
apok has joined #ruby
<Spooner> >> require 'fileutils'; FileUtils.respond_to?(:rm_rf)
<al2o3cr> ["NameError: undefined local variable or method `require' for Kernel:Module", "NameError: uninitialized constant FileUtils"]
<twinturbo> are you serious
Rochefortes has quit [Remote host closed the connection]
<shevy> al2o3cr wtf
bbttxu has quit [Quit: bbttxu]
<Spooner> >> while true; end
<al2o3cr> ["SyntaxError: sandrbox: syntax error, unexpected $end\nwhile true;\n ^", "SyntaxError: sandrbox:1: syntax error, unexpected keyword_end"]
kolm has joined #ruby
<Hanmac> Spooner: try this: >> `ruby -v`
<Spooner> Er, ok.
<Spooner> >> `ruby -v`
<al2o3cr> Spooner: ... Wha?
Berglund has joined #ruby
emmanuelux has quit [Ping timeout: 252 seconds]
liluo has quit [Remote host closed the connection]
vmatiyko has joined #ruby
Jortiny has joined #ruby
jrajav has joined #ruby
<Spooner> Has someone tried 100000000.times.map {"x" * 1000} ? I don't want to kill the channel if it works :D
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> Yay it's not dead yet
<Jortiny> howdy. i suppose this isn't strictly a ruby question, but is there an easy way to specify a regexp that escapes punctuation, except for '*'? i'm using word.gsub!(/[[:punct:]]/, ' ')
<jrajav> Spooner: It should run in its own process
<Hanmac> jrajav: try >> `ruby -v` :P
<jrajav> Won't work
<jrajav> ` is ignored
<jrajav> >> `ruby -v`
<al2o3cr> jrajav: ... Wha?
<jrajav> See
<Hanmac> :P
mahmoudimus has joined #ruby
<jrajav> I don't do that because of eval; I do that because I use %` … ` as the string to contain the script
v0n has quit [Ping timeout: 246 seconds]
<Spooner> jrajav : I don't mean breaking the system, but I don't want to get that much string written to #ruby if it does let me do that.
Taichou has quit [Ping timeout: 248 seconds]
<jrajav> Spooner: Yeah, I didn't think of that. I don't print out any stdout the script generates, but I didn't restrict the 'p result' string at all. It could be an arbitrary length
<Spooner> Presumably it has a timeout to stop infinite stuff?
robotmay has quit [Remote host closed the connection]
<jrajav> Spooner: Yes
<jrajav> Haven't tested it though
<Spooner> >> sleep 10000000
<al2o3cr> ["Timeout::Error: execution expired"]
<Spooner> Yep, times out :)
<jrajav> Woot
centipedefarmer has quit [Quit: Leaving]
geekbri has quit [Remote host closed the connection]
<jrajav> It should also be able to run multiple scripts simultaneously, just in case
davidcelis has joined #ruby
<Spooner> Just need to limit the output string that it sends to #ruby then, to eating the channel :)
xorigin has quit [Quit: leaving]
Taichou has joined #ruby
<jrajav> Is there no string length limit for IRC/Freenode in general?
<Hanmac> this is nice:
<Hanmac> >> Kernel.instance_method(Kernel.instance_methods[44]).bind(self).call
<al2o3cr> ["NameError: undefined local variable or method ``' for Kernel:Module"]
<Spooner> It will just wrap, as it did with Kernel.methods earlier.
bj0ern has joined #ruby
<Spooner> Though I imagine spam-protectionwill kick in eventually.
<jrajav> What to limit it to, though? Sometimes we might want a reasonably long result
geekbri has joined #ruby
bradhe has quit [Remote host closed the connection]
<Spooner> If it is longer than a couple of hundred chars it probably should either be suppressed or sent in a PM (rather than to channel).
Berglund has quit [Quit: Computer died.]
<jrajav> Ah, great idea
phanousit has quit [Ping timeout: 240 seconds]
<jrajav> >> asdf
<al2o3cr> ["NameError: undefined local variable or method `asdf' for main:Object"]
<jrajav> >> !@#$%^
<al2o3cr> asdf
<jrajav> heh
<jrajav> Those 'asdf's had nothing to do with each other :P
randomautomator has joined #ruby
<jrajav> The bot sends back 'asdf' when the ruby interpreter itself errors out
kolm has quit []
mramaizng has left #ruby [#ruby]
mramaizng has joined #ruby
<jrajav> I should probably make that a little more informative
savage- has joined #ruby
<jrajav> Any other ideas for breaking it?
Jake232 has quit [Quit: Computer has gone to sleep.]
jonathanwallace has quit [Remote host closed the connection]
maletor has joined #ruby
yakko has joined #ruby
TPFC-SYSTEM has joined #ruby
jonathanwallace has joined #ruby
<al2o3cr> []
<jrajav> :O
<jrajav> Did that actually work?
<jrajav> I would have expected a NameError
und3f has quit [Quit: Leaving.]
<Muz> >> f=File.open("/etc/passwd", "r");puts f.readlines;
<al2o3cr> ["NameError: uninitialized constant File", "NoMethodError: private method `readlines' called for nil:NilClass"]
<jrajav> That reminds me; I forgot to chroot the bot
<Muz> :)
<jrajav> If the sandboxing works it shouldn't matter, but still
<Hanmac> jrajav ... did you change something between 18:19:37 and 18:21:36 ?
bj0ern has quit [Quit: bj0ern]
<jrajav> No
aantix has joined #ruby
apeiros_ has quit [Remote host closed the connection]
<jrajav> Any changes would result in the bot leaving and rejoining
Xethron has quit [Ping timeout: 272 seconds]
adeponte has joined #ruby
<jrajav> Why?
apok has quit [Quit: apok]
lunitikcalm has joined #ruby
<Hanmac> i try to play with remove_const ...
_bart has joined #ruby
dv310p3r has quit [Ping timeout: 252 seconds]
<jrajav> And?
<jrajav> I forgot to mention the bot works fine in pm too; I'm sure you found that out already
ixx is now known as _hal9000
<Hanmac> jrajav: look at this:
<Hanmac> >> Object.send(:remove_const,:Array)
<Hanmac> >> Object.send(:remove_const,:Object)
<Hanmac> >> Object.constants.include?(:Array)
<al2o3cr> [Array]
<al2o3cr> asdf
<al2o3cr> [true]
_hal9000 is now known as _jim
_jim is now known as ixx
<jrajav> Each of those are going to be completely separate instances of Ruby, running their own sandbox, on a separate input file representing the snippet
Morkel has joined #ruby
<jrajav> asynchronously
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
<Hanmac> why did Object.send(:remove_const,:Object) returns asdf?
Xethron has joined #ruby
<jrajav> That means that Ruby errored out
<jrajav> Again, I should probably make it more informative; probably with the actual error message
ryh has quit [Remote host closed the connection]
vmatiyko has quit [Quit: Leaving.]
ennui has joined #ruby
<Hanmac> hm it may be a problem with the each ...
<jrajav> Huh; that runs fine in irb
<ennui> i have a weird url like "www.%C2%ADfreetype.%C2%ADorg/%C2%ADfreetype2". what's the ruby way to decode it?
<jrajav> Maybe the sandbox is doing something to prevent it. That should never cause Ruby to return an error code though
<Muz> ennui: where did you get that string from?
<Muz> That'd probably hint as to what the encoding method is first.
<Jortiny> ennui: require 'uri'; URI.unescape(str)
<jrajav> >> require 'uri'; URI.unescape("www.%C2%ADfreetype.%C2%ADorg/%C2%ADfreetype2")
<al2o3cr> ["NameError: undefined local variable or method `require' for Kernel:Module", "NameError: uninitialized constant URI"]
<jrajav> D:
bradhe has joined #ruby
<Jortiny> :(
<jrajav> Hmmmmmm
<Jortiny> i don't think URI has anything especially naughty in it for a bot
quest88 has quit [Quit: quest88]
<ennui> Jortiny, that's excactly what i needed. (although my specific freetype string example was flawed)
Eiam has joined #ruby
<ennui> thanks!
<Jortiny> ennui: yar, that URI is hella malformed. but I assumed you have some good ones
<ennui> Jortiny, yes, my other URI is well-formed.
fantazo has joined #ruby
artur_ has joined #ruby
<Sou|cutter> is there a variety of malformedness? or can you just gsub those sequences out?
vitoravelino`afk is now known as vitoravelino
artur_ has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Vert has quit [Ping timeout: 252 seconds]
kidoz has joined #ruby
ianbrandt has joined #ruby
dv310p3r has joined #ruby
rizzy has joined #ruby
ReTFEF has quit [Ping timeout: 240 seconds]
codespectator has quit [Ping timeout: 240 seconds]
kenichi has joined #ruby
oxide3 has joined #ruby
Hawklord has joined #ruby
yugui is now known as yugui_zzz
baroquebobcat has joined #ruby
hynkle has joined #ruby
ephemerian has quit [Quit: Leaving.]
geekbri has quit [Remote host closed the connection]
nari has quit [Ping timeout: 248 seconds]
phanousit has joined #ruby
oxide3 has quit [Read error: Operation timed out]
minijupe has quit [Quit: minijupe]
jrajav has quit [Quit: The best darkness is strange and surprising]
SirFunk has quit [Ping timeout: 245 seconds]
tommyvyo has quit [Quit: Computer has gone to sleep.]
apok has joined #ruby
rakm has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
bullicon has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
flype has joined #ruby
SirFunk has joined #ruby
jrajav has joined #ruby
hynkle has quit [Ping timeout: 252 seconds]
bier has quit [Ping timeout: 248 seconds]
ryh has joined #ruby
al2o3cr has quit [Remote host closed the connection]
rakm has joined #ruby
wallerdev has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
cakehero has quit [Quit: Computer has gone to sleep.]
<_bart> Okay so I found that it is not possible to call methods inside a module: http://stackoverflow.com/questions/6197578/ruby-module-nomethoderror
paradoja has joined #ruby
hynkle has joined #ruby
vlad_starkov has joined #ruby
al2o3cr has joined #ruby
artOfWar has joined #ruby
artOfWar has quit [Remote host closed the connection]
<Hanmac> _bart you could also define the method as module_function
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> >> !@#$%^
<al2o3cr> jrajav: Error: Command failed: r1.rb:2: syntax error, unexpected $undefined
<al2o3cr> p Sandrbox.perform([%`!@#$%^`]).output
<al2o3cr> ^
<al2o3cr> r1.rb:2: unterminated string meets end of file
<jrajav> Eep
Abbas| has quit [Ping timeout: 248 seconds]
cakehero has joined #ruby
al2o3cr has quit [Remote host closed the connection]
bbttxu has joined #ruby
<Hanmac> :( where is the funny bot :(
<jrajav> :P
<jrajav> I thought of a compromise that will also solve that spam without sacrificing info
bglusman_ has joined #ruby
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
bricker88 has joined #ruby
Abbas- is now known as Abbas5
al2o3cr has joined #ruby
<jrajav> What's a one-liner that will generate >150 chars of output for 'p result'?
ringotwo has joined #ruby
al2o3cr has quit [Remote host closed the connection]
<jrajav> result being the evalutation result of the one liner
<Hanmac> "Object.constants" is big
codespectator has joined #ruby
<SeanLazer> does anyone know how i can use .dup on an rspec mock and get the mock AND its methods back?
<SeanLazer> i want the mock to act the same way an AR object will
<jrajav> Hanmac: You killed it
<jrajav> Nice job
<jrajav> :P
\13k has joined #ruby
tatsuya_o has quit [Remote host closed the connection]
<jrajav> I suppose I need to add remove_const to the list of unallowed methods
nyuszika7h has quit [Quit: Here we are, going far to save all that we love - If we give all we've got, we will make it through - Here we are, like a star shining bright on your world - Today, make evil go away!]
<jrajav> And lament that Sandrbox is not perfect ;(
ringotwo has quit [Remote host closed the connection]
RichieEvan has joined #ruby
ringotwo has joined #ruby
<Hanmac> jrajav realy? yeah
* Hanmac +1 kills
<jrajav> haha
<jrajav> I would add a kill counter but I'd have to hook into the exit method of the bot framework, too lazy
elhu has quit [Ping timeout: 248 seconds]
<jrajav> That's Module#remove_const, right?
<SeanLazer> anyone? dup'ing mocks? help?
<Hanmac> jrajav thats right
bier has joined #ruby
<Spooner> jrajav : Wouldn't it be safer with a whitelist than a blacklist?
<shevy> only a dead bot is a good bot
* Hanmac : the "Bot-slayer"
<_bart> Hanmac: cool, but I used the module to wrap some methods and include those later in a big class, and by making them module_functions will not allow them to use methods of the super/parent class
crankycoder has quit [Remote host closed the connection]
Stalkr_ has joined #ruby
andrewh has quit [Ping timeout: 240 seconds]
<jrajav> Spooner: Probably, but it's also a lot more work :P
<jrajav> The sandbox I'm using is already set up to work this way
crankycoder has joined #ruby
Abbas5 is now known as Abbas|
<jrajav> Security isn't ESSENTIAL to me. The absolute worst-case scenario is my linux vm gets trashed, and this is all that's running on it
adeponte has quit [Remote host closed the connection]
umttumt has quit [Remote host closed the connection]
<jrajav> Launching untested code into production ho!
al2o3cr has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> Hanmac: Try it again
<jrajav> :)
chichou_ has quit [Remote host closed the connection]
<jrajav> I hope there's not a practical use for remove_const
adamkittelson has joined #ruby
<jrajav> (In the context of running small code snippets on IRC)
<_bart> Hanmac, you still there?
<jrajav> Hanmac: Erm
<Hanmac> >> p 12
<al2o3cr> Hanmac: ["NameError: wrong constant name remove_const"]
<jrajav> >_
<Hanmac> XD
<jrajav> >_>
<rcassidy> >> 1 + 2
<al2o3cr> rcassidy: ["NameError: wrong constant name remove_const"]
al2o3cr has quit [Remote host closed the connection]
<jrajav> Yeah so um
<jrajav> Ha
jonathanwallace has quit [Remote host closed the connection]
stephenjudkins has joined #ruby
<rcassidy> lol.
<Hanmac> the bot may be thread-safe but he isnt hanmac-safe :P
<jrajav> No, I just configured the sandbox wrong
<jrajav> That error was from my code, nothing to do with the snippets
sebastorama has quit [Quit: Computer has gone to sleep.]
tommyvyo has joined #ruby
jonathanwallace has joined #ruby
apok has quit [Remote host closed the connection]
<Synthead> With an Array, is there a way I can select indexes 1 to the last index without knowing how many elements are in it?
apok has joined #ruby
<Mon_Ouie> index -1 refers to the last element
<Mon_Ouie> (and -2 to the one before that)
<Synthead> Mon_Ouie: oooooh, brilliant! so [1..-1] will work?
KindTwo has joined #ruby
<Mon_Ouie> Yes
<Synthead> Mon_Ouie: nice, thank you! I'll be using this in the future for sure
khakimov has joined #ruby
KindTwo has quit [Changing host]
KindTwo has joined #ruby
SQLStud has joined #ruby
apeiros_ has joined #ruby
<_bart> Okay let's say I wrap some methods in a module A, and that module in another module B which I then include in a class (include B). Now how do I call that method in module A? B::A::method_name does not work. And the method in B::A should also be able to call the other class methods in the main/parent class.
sailias1 has joined #ruby
Eldariof-ru has joined #ruby
Goles has quit [Quit: Computer has gone to sleep.]
<shevy> ok guys
nateberkopec has quit [Quit: Leaving...]
<shevy> is luis lavena on IRC
_bart has quit [Quit: _bart]
qwerxy has quit [Quit: offski]
ennui has quit [Ping timeout: 240 seconds]
KindTwo is now known as KindOne
Wizek has quit [Ping timeout: 246 seconds]
ringotwo has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 244 seconds]
porco has quit [Quit: Leaving...]
beneggett has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
jxf has quit [Ping timeout: 248 seconds]
<_br_> Ok. Beer time.
* Hanmac is now known as "Wreck-it-Hanmac"
resure has quit [Ping timeout: 248 seconds]
SeySayux has joined #ruby
<shevy> lol
<shevy> gcc -Wreck-it-Hanmac test.cpp
flype has quit [Quit: Computer has gone to sleep.]
sailias1 has quit [Ping timeout: 240 seconds]
al2o3cr has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> Try it now
williamcotton_ has joined #ruby
<jrajav> Hanmac: ^
williamcotton has quit [Ping timeout: 240 seconds]
williamcotton_ is now known as williamcotton
lynxy has joined #ruby
<jrajav> :D
<Hanmac> shevy try to remove some const with the bot
<_br_> shevy: Hanmac: gcc -Wreck-it-Hanman -fstack-protector-all test.cpp .... so much for wrecking it ^^
al2o3cr has quit [Remote host closed the connection]
<_br_> s/Hanman/Hanmac/
<jrajav> Good one
v0n has joined #ruby
* Hanmac 's kill counter has been increased
<shevy> this bot is useless
<jrajav> I call foul play, though; you knew exactly how it worked :P
voodoofish430 has joined #ruby
<jrajav> shevy: D;
<_br_> uhuh
<_br_> :D
<shevy> but this is evolution
<shevy> Hanmac forces the bot to adapt or perish
mrdodo has joined #ruby
<_br_> I thought Hanmac is more like Chuck Norris.
geekbri has joined #ruby
khakimov has quit [Quit: Computer has gone to sleep.]
al2o3cr has joined #ruby
<Hanmac> shevy the funny thing is: the sandbox does not allow to block :remove_const ... , when you try it the sandbox itself does fail
<shevy> fail built on top of more fail
<jrajav> Yeah it's the sandbox's fault
al2o3cr has quit [Remote host closed the connection]
<jrajav> We're just trying to patch over it
<banisterfiend> Hanmac: hello
<jrajav> Hey!
<jrajav> lol
<jrajav> I'm just trying to test the flooding control now
manolo has joined #ruby
<jrajav> Stop killing it :P
al2o3cr has joined #ruby
<rcassidy> >> p #{RUBY_VERSION}
<shevy> wat
Stalkr_ has quit [Quit: Leaving...]
<jrajav> >> 1 + 2
<al2o3cr> jrajav: [3]
<jrajav> al2o3cr: version
<al2o3cr> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<Hanmac> shevy: try this: >> Object.send(:remove_const,:Array)
<Hanmac> and look at the error message
<jrajav> WAIT
<jrajav> lol
<jrajav> Let me test the damn flooding
Markvilla has quit [Quit: Markvilla]
<jrajav> >> Kernel.instance_methods
<jrajav> Okay, good
<jrajav> So if the result is longer than 150 chars it pms it to you instead
<jrajav> Now channel flooding won't ever be an issue
<shevy> hehe
ryh has quit [Remote host closed the connection]
jbw has quit [Ping timeout: 264 seconds]
<shevy> ok Hanmac
<shevy> you know the challenge
<Muz> Other than people flooding the channel with bot commands.
<shevy> jrajav said flooding is no longer an issue. let's break his bot
<jrajav> :(
<jrajav> I'm going to lunch, so you can kill it if you want, but then it's gone
<Hanmac> shevy did you try my line?
<shevy> al2o3cr eval(Object.send(:remove_const, :Array))
<jrajav> shevy: >>
<shevy> I hate this bot
<jrajav> >> eval(Object.send(:remove_const, :Array))
<al2o3cr> Hanmac, no
<jrajav> :D
<virunga> >> 42
<al2o3cr> virunga: [42]
chrisja has joined #ruby
<jrajav> Okay, gotta go
jrajav has quit [Quit: The best darkness is strange and surprising]
<Hanmac> >> :remove_const
<al2o3cr> Hanmac, no
<virunga> >> [42, 5, 6].unshift
<al2o3cr> virunga: [[42, 5, 6]]
<Hanmac> did you see shevy? :P
<shevy> http://pastie.org/4378926 this is the current list of binaries I managed to assign to programs
<shevy> lol
<shevy> the bot said no to you?
manizzle has quit [Read error: No route to host]
<virunga> >> [42, 5, 6].unshift 3
<al2o3cr> virunga: [[3, 42, 5, 6]]
<shevy> >> eval(eval(1/0))
<al2o3cr> shevy: ["ZeroDivisionError: divided by 0"]
<shevy> al2o3cr you stupid thing
lkba has quit [Ping timeout: 240 seconds]
<virunga> i see your message
<virunga> the al2o3cr message to shevy
<Hanmac> >> "remove_const"
<al2o3cr> Hanmac: ["remove_const"]
<Hanmac> :remove_const is blocked , but "remove_const" not :P
davidcelis has quit [Ping timeout: 252 seconds]
<virunga> from when is there an interpreter on the channel?
<shevy> hmmm
<virunga> ?
<shevy> >> Object.send :remove_const, :Kernel
<al2o3cr> Hanmac, no
<shevy> >> Object.send :remove_const, :Kernel
<al2o3cr> Hanmac, no
<shevy> HAHAHAHAHA
kirun has joined #ruby
<shevy> he hates Hanmac
<Hanmac> virunga its today-new
davidcelis has joined #ruby
<virunga> very nice
radic has quit [Disconnected by services]
radic_ has joined #ruby
radic_ is now known as radic
<virunga> go work
<virunga> good work
apeiros_ has quit [Remote host closed the connection]
<rcassidy> >> require 'socket'; defined? TCPServer
<al2o3cr> rcassidy: []
antonvattay has joined #ruby
cbuxton has joined #ruby
<rcassidy> hm
<Hanmac> shevy the bot dont like it when i remove his constants :P
badfish129 has joined #ruby
<shevy> yeah
antonvattay has left #ruby [#ruby]
<shevy> but he thinks it's only you doing so
<badfish129> whats the best way to start a process in the background and get its pid to kill it later
cbuxton has quit [Remote host closed the connection]
<shevy> >> require 'foo'; eval 'Object.send :remove_const, :Kernel'
<al2o3cr> Hanmac, no
<virunga> >> module M; C = 42; class C1; def f; "C1 class, C = "+ C.to_s; end; end; end;
<al2o3cr> virunga: []
<shevy> lol
<shevy> what
<virunga> c = C1.new
<virunga> >> c = C1.new
<al2o3cr> virunga: ["NameError: uninitialized constant C1"]
<shevy> oh
<shevy> he does not remember anything
<shevy> >> M::C1.new
<al2o3cr> shevy: ["NameError: uninitialized constant M"]
<virunga> >> module M; C = 42; class C1; def f; "C1 class, C = "+ M::C.to_s; end; end; end;
<al2o3cr> virunga: []
<virunga> >> c = C1.new
<al2o3cr> virunga: ["NameError: uninitialized constant C1"]
<rcassidy> >> something=5; something
<al2o3cr> rcassidy: [5, 5]
<virunga> >> c = M::C1.new
<al2o3cr> virunga: ["NameError: uninitialized constant M"]
<virunga> no
<virunga> :(
<virunga> it's state less ahaha
<rking> >> "sweet bot!".upcase
<al2o3cr> rking: ["SWEET BOT!"]
<virunga> this is ugly
<virunga> >> x = 4
<al2o3cr> virunga: [4]
<rking> virunga: Are you its owner?
<virunga> >> x
<al2o3cr> virunga: ["NameError: undefined local variable or method `x' for main:Object"]
<virunga> >> RUBY_PLATFORM
<al2o3cr> virunga: ["x86_64-linux"]
<rking> I would imagine each statement would be executed in its own session. Though it would be fun for them to carry over, actually.
Criztian has joined #ruby
<virunga> >> RUBY_VERSION
<al2o3cr> virunga: ["1.9.3"]
phanousit has quit [Quit: phanousit]
<rking> >> system 'ls'
<al2o3cr> rking: ["NameError: undefined local variable or method `system' for Kernel:Module"]
<rking> Had to try. =)
<rking> >> Dir['*']
<al2o3cr> rking: ["NameError: uninitialized constant Dir"]
<rking> Ok I'll stop.
jbw has joined #ruby
apeiros_ has joined #ruby
<badfish129> anyone?
<davidcelis> whose bot is this
LBRapid has quit [Quit: Farewell.]
<Hanmac> rking try :remove_const
leoncamel has quit [Ping timeout: 240 seconds]
eywu has joined #ruby
<shevy> >> require 'tempfile'
<al2o3cr> shevy: ["NameError: undefined local variable or method `require' for Kernel:Module"]
<rcassidy> bot is jrajav's
<rcassidy> he is at lunch
<shevy> why
<shevy> what
ringotwo has joined #ruby
<shevy> what is happening
<rking> shevy: Another security hole.
<shevy> lol
<shevy> let's hijack his system
<rking> I mean it's a locked-down thing.
<shevy> hmmm
rontec76 has joined #ruby
<virunga> what's the used sandbox?
<rking> I think a better way to do a bot like this is in an LXC container, then you can let it do anything (except maybe net)
<davidcelis> >> BasicObject.instance_methods.grep(/^[^_]/).each { |m| undef_method m }
<al2o3cr> davidcelis: []
vlad_starkov has quit [Remote host closed the connection]
<Hanmac> davidcelis remove_const is more funnier :P
Squarepy has quit [Quit: Leaving]
<virunga> >> module M; C = 42; class C1; def f; "C1 class, C = "+ M::C.to_s; end; end; end; c = C1.new; c1.f
<al2o3cr> virunga: []
<davidcelis> >> Kernel.instance_methods.grep(/^[^_]/).each { |m| undef_method m }
<al2o3cr> davidcelis: []
<virunga> >> module M; C = 42; class C1; def f; "C1 class, C = "+ M::C.to_s; end; end; end; c = C1.new; c1.f;
<al2o3cr> virunga: []
<virunga> >> module M; C = 42; class C1; def f; "C1 class, C = "+ M::C.to_s; end; end; end; c = C1.new; c.f
<al2o3cr> virunga: []
<davidcelis> >> 4.is_a? Numeric
<al2o3cr> davidcelis: [true]
<davidcelis> ಠ_ಠ
<virunga> class Klass; end; k = Klass.new
<virunga> >> class Klass; end; k = Klass.new
<al2o3cr> virunga: [nil, #<Klass:0x00000002751780>]
<virunga> >> k
<al2o3cr> virunga: ["NameError: undefined local variable or method `k' for main:Object"]
chrxn_ has joined #ruby
carloslopes has joined #ruby
<davidcelis> >> class NotClass < BasicObject; instance_methods.grep(/^[^_]/).each { |m| undef_method m }; def initialize(o) @o = o end; def method_missing(m, *args, &block) !@o.send(name, *args, &block) end; end
<al2o3cr> davidcelis: []
<virunga> module M; end; class M::Klass; end; k = M::Klass.new
<virunga> >>module M; end; class M::Klass; end; k = M::Klass.new
<al2o3cr> virunga: [nil, nil, #<M::Klass:0x000000018c11e8>]
<davidcelis> >> class Object; def not() NotClass.new self end; end
<al2o3cr> davidcelis: [nil]
<rcassidy> >> $:
geekbri has quit [Remote host closed the connection]
<davidcelis> >> nil.not.nil?
<al2o3cr> davidcelis: ["NoMethodError: undefined method `not' for nil:NilClass"]
<davidcelis> fuck this
_bart has joined #ruby
nwest has joined #ruby
Supaku has quit [Quit: Leaving.]
kvirani has joined #ruby
<apeiros_> >> self.class
<al2o3cr> apeiros_: []
geekbri has joined #ruby
kvirani has quit [Remote host closed the connection]
<davidcelis> lol wut
<virunga> >>module M; CONST= "Hi Ruby"; end; class M::Klass; def f; CONST; end; k = M::Klass.new; k.f;
<al2o3cr> virunga: []
<virunga> >>module M; CONST= "Hi Ruby"; end; class M::Klass; def f; CONST; end; k = M::Klass.new;
<al2o3cr> virunga: []
manolo has quit [Remote host closed the connection]
<apeiros_> >> Object.instance_method(:class).bind(self).call
<al2o3cr> apeiros_: []
<apeiros_> >> ::Object.instance_method(:class).bind(self).call
<al2o3cr> apeiros_: []
<apeiros_> >> RUBY_DESCRIPTION
<al2o3cr> apeiros_: ["ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]"]
<davidcelis> >> NotClass
<al2o3cr> davidcelis: ["NameError: uninitialized constant NotClass"]
<apeiros_> >> ::Object.constants
theRoUS has quit [Ping timeout: 246 seconds]
<davidcelis> bitch i just defined that!
lkba has joined #ruby
<virunga> apeiros_: do you know what's the sandbox used?
<davidcelis> >> class NotClass; end
<al2o3cr> davidcelis: [nil]
<davidcelis> >> NotClass
<al2o3cr> davidcelis: ["NameError: uninitialized constant NotClass"]
<apeiros_> virunga: nope
<davidcelis> lol.
<Hanmac> https://github.com/Veraticus/Sandrbox << this is used for the sandbox
<virunga> Hanmac: thanks
* Hanmac can still break the sandbox :P
mascool has joined #ruby
<apeiros_> wasjust going to say
<rcassidy> hmm... i can't get defined? to give me anything but nil
<apeiros_> $" reveals sandrbox
carloslopes has quit [Ping timeout: 246 seconds]
<rcassidy> >> defined? String
<al2o3cr> rcassidy: []
Supaku has joined #ruby
_bart has quit [Client Quit]
hndsmrob has joined #ruby
<apeiros_> objectspace might be an avenue
<apeiros_> but I'm not inclined enough to waste my precioussss time
al2o3cr has quit [Remote host closed the connection]
<shevy> >> require 'pp'
tatsuya_o has joined #ruby
<shevy> damn
<shevy> where is the bot
<Hanmac> sorry shevy :(
<rcassidy> check your PMs
<Hanmac> i was it
carloslopes has joined #ruby
<virunga> noooooo
<rcassidy> oh did you kill it hanmac?
<rcassidy> +1 kills
<rcassidy> lol
<rcassidy> >> 1 + 2
<rcassidy> how'd you do it?
<Hanmac> ObjectSpace.each_object {|o| p o }
dekroning has quit [Read error: Connection reset by peer]
<shevy> lol
<shevy> Hanmac absolutely destroyed that bot
<shevy> computers may be faster than humans but humans are more creative
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
<Hanmac> bots may be faster, when hanmac would not destroy them :P
stopbit has quit [Read error: Connection reset by peer]
stopbit has joined #ruby
arkiver has joined #ruby
i0n has quit [Quit: Lost terminal]
arkiver has quit [Max SendQ exceeded]
v0n has quit [Ping timeout: 252 seconds]
gmci has quit [Read error: Connection reset by peer]
arkiver has joined #ruby
arkiver has quit [Max SendQ exceeded]
ryh has joined #ruby
minijupe has joined #ruby
Jortiny has quit [Quit: Page closed]
arkiver has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
<apeiros_> Hanmac: if you can break the sandbox, why do I still see "Issues (0)" on the github page? baaad citizen! :-p
tatsuya_o has quit [Remote host closed the connection]
eko has quit [Ping timeout: 252 seconds]
<Hanmac> apeiros_ hm yeah i could post some Issuses
<Hanmac> shevy ... i could make an automessage, so then the bot avives, he dies again :P
<shevy> hehe
theRoUS has joined #ruby
theRoUS has quit [Changing host]
theRoUS has joined #ruby
jrajav has joined #ruby
<Hanmac> jarjav sorry i did it again ... "ObjectSpace.each_object {|o| p o } "
bitsar has joined #ruby
dekroning has joined #ruby
<jrajav> Yeah i saw
Criztian has quit [Read error: Connection reset by peer]
gmci has joined #ruby
<jrajav> I'm actually confused why that breaks it
Criztian has joined #ruby
<Petit_Dejeuner> Does the bot timeout properly when given an infinite loop?
<jrajav> Yes
johnmilton has joined #ruby
<kalleth> ok, just found a windows terminal client thats actually not bad at all
<kalleth> \o~
<kalleth> ConEmu
<jrajav> !
kidoz has quit [Quit: Ухожу я от вас]
al2o3cr has joined #ruby
stephenjudkins has quit [Quit: stephenjudkins]
<rcassidy> jrajav: am confused as to why it broke too... any errors upon exit?
Criztian has quit [Read error: Connection reset by peer]
<jrajav> Yes, the bot itself gave an error: maxBuffer exceeded on an internal .match call
Criztian has joined #ruby
<jrajav> (The bot is node.js)
twinturbo has quit [Quit: twinturbo]
<rcassidy> must have just been too much text
<jrajav> I'm guessing it just prints out too many lines to stdout for .match to handel :/
<jrajav> yeah
<jrajav> Not sure how to prevent that though
<Mon_Ouie> I'm guessing just adding ObjectSpace to the list of bad constants would help?
Abbas| has quit [Ping timeout: 244 seconds]
v0n has joined #ruby
<rcassidy> >> $:
<jrajav> :O
chrxn_ has quit [Ping timeout: 244 seconds]
<Mon_Ouie> ObjectSpace#each_object is going to allow access to any object you're trying to hide anyway
<jrajav> Hm.
<rcassidy> >> File.expand_path(__FILE__)
<al2o3cr> rcassidy: ["NameError: uninitialized constant File"]
<jrajav> Hanmac: Can you try that one that broke it originally?
luckyruby has quit [Remote host closed the connection]
<jrajav> Hanmac: The remove_const
<rcassidy> >> __FILE__
<al2o3cr> rcassidy: ["sandrbox"]
niklasb has quit [Quit: WeeChat 0.3.8]
<Hanmac> jrajav be happy that my autorespond does not work ... otherwise the bot would die, in the same moment it appears
<jrajav> I want to see why it causes the *bot* to crash and not just the Ruby instance
<jrajav> hahaha
<jrajav> ....
al2o3cr has quit [Remote host closed the connection]
<jrajav> okay
<Hanmac> >> a = Object; a.constants.each { |s| a.send("remove" + "_" + "const",s)}
<rcassidy> lol!
fermion has quit [Quit: P]
* rcassidy is learning so much about ruby
<rcassidy> ty jrajav
<jrajav> :P
<jrajav> Ohhh wait. I may be doing something naughty when I check (or don't check) stdout
shashin has quit [Quit: shashin]
oddmunds has quit [Ping timeout: 255 seconds]
artOfWar has joined #ruby
niklasb has joined #ruby
<rcassidy> jrajav: what's the reason for the name of the bot?
<jrajav> jrajav: Chemical formula for ruby
artOfWar has quit [Remote host closed the connection]
imami|afk is now known as banseljaj
vlad_starkov has joined #ruby
wallerdev has quit [Quit: wallerdev]
artOfWar has joined #ruby
<rcassidy> jrajav: word.
burgestrand has quit [Quit: Leaving.]
Bosma has joined #ruby
oddmunds has joined #ruby
cakehero has quit [Ping timeout: 244 seconds]
the_jeebster has joined #ruby
khakimov has joined #ruby
emsilva has joined #ruby
emsilva has quit [Changing host]
emsilva has joined #ruby
johnernaut has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
Taichou has quit [Remote host closed the connection]
i0n has joined #ruby
vaks has joined #ruby
cakehero has joined #ruby
v0n has quit [Ping timeout: 240 seconds]
<Hanmac> jrajav can you let the bot out? his friend whats to play
iDulys has joined #ruby
<iDulys> hello
<jrajav> I'm trying to make it so that whatever the heck you're doing to Ruby, it doesn't cause the bot to die
<iDulys> HELLO!
<jrajav> Because it shouldn't be, and it's probably something to do with me being stupid
<iDulys> jrajav
iDulys has left #ruby [#ruby]
<Petit_Dejeuner> Use a sandbox?
<jrajav> I am
<jrajav> lol
<jrajav> He's breaking the *sandbox*, which proceeds to break ruby
<jrajav> Hanmac's a beast
ThaDick has quit [Quit: zzzZZZ ...]
* Hanmac the great Destroyer
<shevy> hehe
<badfish129> I'm starting a process with pid = fork { exec "process" } and then killing it with Process.kill. However, right now when i run this script, i get all the output from the process. How can I start it silently?
vaks has quit [Ping timeout: 260 seconds]
<Hanmac> shevy i tested ... the autorespond does work :P
<jrajav> That makes this testing easy :P
strife25 has quit [Quit: Computer has gone to sleep.]
<jrajav> HA!
<jrajav> Yeah it was just me being stupid
<Hanmac> what was the problem?
<badfish129> anyone?
<apeiros_> badfish129: shameless plug: take a look at the fork gem
mneorr has quit [Quit: Leaving.]
Guest20023 has quit [Ping timeout: 240 seconds]
<shevy> written by?
<jrajav> I'm using child_process.exec, and apparently passing the 'error' object of the callback to my IRC bot's "say" function causes the say function to go haywire on .match
<apeiros_> badfish129: with exec process it might be difficult. I'd probably double fork
<Mon_Ouie> shevy: apeiros_ I assume
<jrajav> Even though this is in the 'else' block of (error === null)
<apeiros_> badfish129: change $stdout in the first fork and capture the output from the second fork's exec
<shevy> heeh
<apeiros_> badfish129: alternatively don't use exec but `process`
<jrajav> So either the string coercion of error is messing up or the IRC bot framework
<jrajav> I honestly can't tell
<badfish129> apeiros_: so I could do something like pid = fork { Process.start "ls" }
xyzodiac has joined #ruby
<jrajav> I'm too lazy to try and figure it out, so I'm just going to go back to printing a constant message when Ruby errors out
mucker has quit [Remote host closed the connection]
<apeiros_> badfish129: ?
xyzodiac has quit [Client Quit]
<rcassidy> badfish: if you use Process::spawn you can pass in a hash as a second argument i.e. :out=>/dev/null
<apeiros_> badfish129: look into `` (Kernel#`), Process::spawn and popen
<apeiros_> spawn is probably your best bet
wallerdev has joined #ruby
<Hanmac> rcassidy, i prefer File::NULL over the path
<rcassidy> ty Hanmac - as i said, i'm still learning a lot about ruby, didn't know that one
jorge has joined #ruby
Taichou has joined #ruby
eko has joined #ruby
eko has quit [Changing host]
eko has joined #ruby
lynxy has quit [Quit: Leaving]
Axsuul has joined #ruby
Axsuul has quit [Excess Flood]
Axsuul has joined #ruby
<jrajav> Okay.
al2o3cr has joined #ruby
<jrajav> al2o3cr: Yar
Speed has joined #ruby
Speed has quit [Changing host]
Speed has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> >> a = Object; a.constants.each { |s| a.send("remove" + "_" + "const",s)}
<al2o3cr> jrajav: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
Goles has joined #ruby
<jrajav> :3
dhruvasagar has joined #ruby
Boohbah has joined #ruby
<Hanmac> XDDDD
<rcassidy> lol.
<jrajav> Henceforth, your punishment is constantly getting pinged in channel
<jrajav> Until I get bored and change it
Boohbah is now known as Guest68285
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
<jrajav> Or, funner, I could have it give a random message
Abbas- has quit [Changing host]
Abbas- has joined #ruby
<jrajav> I'll put that on todo
Abbas- is now known as Abbas5
<rcassidy> >> require 'socket'
<al2o3cr> rcassidy: ["NameError: undefined local variable or method `require' for Kernel:Module"]
<jrajav> It's fixed for now, though. Shouldn't die for anything now
elhu has joined #ruby
<jrajav> Hanmac: That's your cue to kill it again
davidpk has quit [Quit: Computer has gone to sleep.]
maletor has quit [Quit: Computer has gone to sleep.]
eko has quit [Ping timeout: 248 seconds]
justinv has joined #ruby
zeromodulus has joined #ruby
Wizek has joined #ruby
adeponte has joined #ruby
Supaku has quit [Quit: Leaving.]
trope has joined #ruby
Guest71198 has joined #ruby
<shevy> >> require 'pp'
<al2o3cr> shevy: ["NameError: undefined local variable or method `require' for Kernel:Module"]
<shevy> >> load 'pp'
<al2o3cr> shevy: ["NameError: undefined local variable or method `load' for Kernel:Module"]
<shevy> >> eval 'load "pp"'
<al2o3cr> shevy: ["NameError: undefined local variable or method `load' for Kernel:Module"]
<shevy> grrrr
<jrajav> Hehe
<shevy> where is it hidden
<shevy> Hanmac, help me
<jrajav> NameError usually means the sandbox is blocking you
mramaizng has quit [Quit: mramaizng]
<shevy> there must be a workaround
<shevy> Hanmac will find out
<jrajav> I wouldn't doubt it. The sandbox is only blacklisting certain constants and methods
<Mon_Ouie> >> a = Object; a.send("req" + "uire", "pp")
<al2o3cr> Mon_Ouie: [Object, "NameError: undefined local variable or method `require' for main:Object"]
<Mon_Ouie> >> a = ObjectSpace
<al2o3cr> Mon_Ouie: [ObjectSpace]
<shevy> hmmm
justinv has left #ruby [#ruby]
<Mon_Ouie> Then it's easy
<shevy> >> ObjectSpace._id2ref(x).upcase!
<al2o3cr> shevy: ["NameError: undefined local variable or method `x' for main:Object"]
<shevy> >> ObjectSpace._id2ref("foo").upcase!
<al2o3cr> shevy: ["TypeError: can't convert String into Integer"]
<shevy> >> ObjectSpace._id2ref(y).class_eval "def hello; :hello.to_s; end; puts hello"
<al2o3cr> shevy: []
<shevy> >> ObjectSpace._id2ref(y).class_eval "def hello; :hello.to_s; end; hello"
<al2o3cr> shevy: []
<Mon_Ouie> >> a = ObjectSpace; a.send("each" + "_" + "object").find { |o| o.to_s == "Object" }
<al2o3cr> Mon_Ouie: [ObjectSpace, "Object"]
mohits has quit [Ping timeout: 255 seconds]
phantasm66 has joined #ruby
<Hanmac> shevy: no require or load are not accessable ...
<Hanmac> jrajav: i tryed, but i only get "nonzero status" error :P
Abbas5 is now known as Abbas|
<jrajav> Yay
<jrajav> :D
nacengineer has quit [Ping timeout: 252 seconds]
<jrajav> Also, you *can* still kill it by printing out a crapton of lines to stdout. I'm aware of that and it's on the todo list
<Mon_Ouie> Can we talk to it in a private query?
<jrajav> Yes.
<jrajav> I'm not sure why it's saying it can't message you Mon_Ouie
<jrajav> It says it has to be registered
<jrajav> Possibly a mode you have set?
<jrajav> (I haven't registered the bot with nickserv; too lazy to configure that)
manizzle has joined #ruby
<Mon_Ouie> Oh, that's because it was required indeed
<Hanmac> >> a = "a" ; (200 ** 200).times {|i| a << i.to_s }
<al2o3cr> Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> lol
<shevy> HAHAHA
xyzodiac has joined #ruby
<shevy> >> a = "a" ; (200 ** 200**195595).times {|i| a << i.to_s }
<al2o3cr> shevy: ["a", "NoMethodError: undefined method `times' for Infinity:Float"]
<shevy> cool
<shevy> I reached the Float section of Infinity
brianpWins has quit [Quit: brianpWins]
<Hanmac> >> a = "a" ; (0..(200 ** 200**195595)).each {|i| a << i.to_s }
<al2o3cr> Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> shevy: Sounds trippy
<shevy> hey
<shevy> does the bot eval Hanmac's code differently?
<shevy> is there a bias?!?!
<Hanmac> >> a = "a" ; (0..(200 ** 200**195595)).each {|i| p a << i.to_s }
<shevy> >> a = "a" ; (0..(200 ** 200**195595)).each {|i| a << i.to_s }
<al2o3cr> Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<al2o3cr> shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> hah
<jrajav> The downside of this is that now even I can't see the actual error message Ruby is giving
<shevy> >> a = "a" ; (0..(200 ** 50)).each {|i| a << i.to_s }
<al2o3cr> shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> >> a = "a" ; (0..(100 ** 10)).each {|i| a << i.to_s }
<jrajav> So if you want to know why it's bugging out, you gotta run it yourself in irb or something
<al2o3cr> shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> I'll probably add that to the todo list too
<shevy> >> a = "a" ; (0..(5 ** 4)).each {|i| a << i.to_s }
<shevy> hey
<shevy> perhaps we can stall it
elhu has quit [Quit: Computer has gone to sleep.]
<shevy> >> puts 'hi'
<al2o3cr> shevy: [nil]
<shevy> >> a = "a" ; (0..(5 ** 4)).each {|i| p a << i.to_s }
<al2o3cr> shevy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> lol
<shevy> Hanmac, can you stall the bot?
qualiabyte has joined #ruby
<jrajav> It has a timeout
<shevy> Hanmac, can you work around the timeout and stall the bot?
<jrajav> And the interpreter runs in a separate process from the bot
<shevy> Hanmac, can you work around the timeout, stall the bot and break out of the separate process?
<jrajav> XD
<shevy> ack
<shevy> the bot just messaged me with the result
<jrajav> Yup haha
<shevy> if I could just break it ...
<jrajav> I set it to PM if the result is greater than 150 chars, but I didn't set any limit for the pm
savage-_ has joined #ruby
chrxn_ has joined #ruby
<shevy> hehe
<shevy> 5 years later ...
<jrajav> Freenode flooding might kick in if you make it big enough
sgronblom has quit [Ping timeout: 252 seconds]
<jrajav> Please don't try :(
<jrajav> (Added that to the todo list too)
<shevy> I only want to break it
<apeiros_> shevy: go to pm with the bot
<apeiros_> and break it there
<jrajav> Good call, that
<rcassidy> that's what i'm doing
<rcassidy> lol
<shevy> \o/
<shevy> we should even donate for a prize money
<shevy> or free beer
maletor has joined #ruby
<jrajav> You're basically saying that you'd really like Hanmac to have some beer
* Hanmac dont drink beer or coffee
<jrajav> :O
TPFC-SYSTEM has quit [Quit: TPFC-SYSTEM]
<jrajav> You're missing out man
savage- has quit [Ping timeout: 246 seconds]
billiam|| has quit [Read error: Connection reset by peer]
ennui has joined #ruby
<jrajav> Mon_Ouie: I can see you're playing around with ObjectSpace, let me know if you can actually pull off one of the exploits that you thought would be possible
strife25 has joined #ruby
<Hanmac> coffee should increase your imagination (or something similar) ... on me it should be like blowing oxygen into an fireball
<jrajav> I only drink for the taste
strife25 has quit [Read error: Connection reset by peer]
<jrajav> I have decaf even in the morning
adeponte has quit [Remote host closed the connection]
phinfonet has joined #ruby
abra has quit [Ping timeout: 276 seconds]
Lachryma` has quit [Quit: Leaving]
<Mon_Ouie> Yay! exited with a non-zero status error.
lunitikcalm has quit [Remote host closed the connection]
<jrajav> Mon_Ouie: Hmm. I really need to log the errors. I can't tell if it's actually unsafe or if you just crashed it somehow
abra has joined #ruby
<Hanmac> Mon_Ouie what did you do?
fbernier has joined #ruby
<Mon_Ouie> I just overrode a method in Sandrbox::Response
<Hanmac> XD
<rcassidy> >> clone
<al2o3cr> rcassidy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Hanmac> XD
<jrajav> Mon_Ouie: That's not that worrying, it'll just crash that instance. The only real problem is if you manage to access a constant or method that Sandrbox has disallowed
<Mon_Ouie> You can access any constant you want with ObjectSpace
ryh has quit [Remote host closed the connection]
<jrajav> Example?
<jrajav> Try listing the directory the bot is in, through ObjectSpace
<Mon_Ouie> >> ObjectSpace.each_object(Module).find { |m| m.to_s == "Process" }
<al2o3cr> Mon_Ouie: [Process]
savage-_ has quit [Ping timeout: 248 seconds]
bitsar has quit [Remote host closed the connection]
<jrajav> :O
<Mon_Ouie> It's /sand
<jrajav> Good job. Damn.
strife25 has joined #ruby
<jrajav> ObjectSpace is out, I guess
al2o3cr has quit [Remote host closed the connection]
<jrajav> Bot down for a bit
<rcassidy> aww, back to work
bluOxigen has joined #ruby
<jrajav> let's see if that fixes it
al2o3cr has joined #ruby
<jrajav> Mon_Ouie: Try the same query
<Hanmac> fu ... i try to access the Sandrbox::Config object
lunitikcalm has joined #ruby
savage- has joined #ruby
<jrajav> Mon_Ouie: Get /sand again
chrxn_ has quit [Ping timeout: 244 seconds]
<jrajav> :D
<jrajav> Yay
<jrajav> So ObjectSpace is gone. Sorry
elhu has joined #ruby
paolooo has quit [Ping timeout: 245 seconds]
ThaDick has joined #ruby
sent-hil has joined #ruby
samrose has joined #ruby
thomas is now known as filch
lunitikcalm has quit [Ping timeout: 246 seconds]
<jrajav> Hanmac: the hell?
Guest71198 has quit [Ping timeout: 244 seconds]
nateberkopec has joined #ruby
<shevy> ok
<shevy> I declare Hanmac the winner
<shevy> and Mon_Ouie a close second
burgestrand has joined #ruby
<jrajav> I don't know how, but he managed to raise a SyntaxError that did *not* cause Ruby to exit with a nonzero status
tewecske has joined #ruby
rodj has joined #ruby
<rcassidy> >> self.methods
deryl-android has joined #ruby
theRoUS has quit [Ping timeout: 248 seconds]
tvw has quit [Ping timeout: 260 seconds]
<Hanmac> hm isteresting ... self.methods shows methods wich are not "accessable"
Berglund has joined #ruby
mneorr has joined #ruby
<jrajav> Hanmac: But can you call them?
<Mon_Ouie> No
<Mon_Ouie> They swapped their implementation with something that raise a NameError
<rcassidy> >> self.dup while true
<al2o3cr> rcassidy: ["Timeout::Error: execution expired"]
filch is now known as thomas
<jrajav> I just realized that the bot is adding nick: even in PMs
<banisterfiend> Mon_Ouie: do u like kfc?
dekroning has quit [Read error: Connection reset by peer]
<Mon_Ouie> Never been there
<jrajav> This todo list is getting long >_>
dekronin1 has joined #ruby
<Mon_Ouie> I've never seen one either actually; we have Quick and McDonald's here
<Hanmac> Mon_Ouie when some method is owerritten, is it possible to get the old method back?
<banisterfiend> Mon_Ouie: srsly?
<Mon_Ouie> Not sure, possibly
nadirvardar has joined #ruby
manizzle has quit [Remote host closed the connection]
<Mon_Ouie> banisterfiend: Yeah
<banisterfiend> Mon_Ouie: werent u from brussels? thats a big city
manizzle has joined #ruby
arkiver has joined #ruby
rutkla has joined #ruby
workmad3 has joined #ruby
n1x has joined #ruby
<Mon_Ouie> I think there just isn't any KFC in Belgium
<shevy> without a reference to the old method?
<rcassidy> >> $$
<al2o3cr> rcassidy: ["SecurityError: Insecure operation at level 2"]
arkiver has quit [Max SendQ exceeded]
dekronin1 is now known as dekroning
<shevy> >> eval "$$"
<al2o3cr> shevy: ["SecurityError: Insecure operation at level 2"]
<shevy> hmm
<shevy> perhaps alias a method... then remove it ... and then... no idea
<Mon_Ouie> Well, the methods are in Sandrbox::Value; try to get a hold to that
deryl-android is now known as deryl
arkiver has joined #ruby
n1x has quit [Max SendQ exceeded]
<Mon_Ouie> Basically store the method object, replace the method with a no-op, and later restore the method
davidpk has joined #ruby
arkiver has quit [Read error: Connection reset by peer]
<rcassidy> >> puts \cc
<al2o3cr> rcassidy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<rcassidy> >> puts \cd
<al2o3cr> rcassidy: [nil]
arkiver has joined #ruby
krusty_ar_ has joined #ruby
<banisterfiend> Mon_Ouie: weird, you're right. What is the population of belgium?
tatsuya_o has joined #ruby
<Mon_Ouie> 11 millions now
<Hanmac> >> $SAFE = 4
<al2o3cr> Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
krusty_ar has quit [Ping timeout: 248 seconds]
mengu has joined #ruby
arkiver has quit [Max SendQ exceeded]
ananthakumaran has quit [Quit: Leaving.]
<banisterfiend> Mon_Ouie: hmm that's not too small, it's really surprising you dont have a KFC.
<rcassidy> >> puts \cg
<al2o3cr> rcassidy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> Mon_Ouie cool
<rcassidy> >> puts \c[
<al2o3cr> rcassidy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<rcassidy> >> puts \cc while true
<al2o3cr> rcassidy: ["Timeout::Error: execution expired"]
<rcassidy> sorry, back to PM now
stephenjudkins has joined #ruby
<shevy> see, that would be kinda nice to have
theRoUS has joined #ruby
<shevy> a ruby project that scans a given source code for some kind of potential abuses or vulnerabilities or something like that
kjellski has joined #ruby
bglusma__ has joined #ruby
tatsuya_o has quit [Ping timeout: 252 seconds]
<Mon_Ouie> It doesn't exist (partly) because it totally depends on the intent of the programmer
bglusm___ has joined #ruby
<Mon_Ouie> For instance, one can run system("rm -rf .") in Pry — yeah, but it's supposed to evaluate any code you give it
bglusman_ has quit [Ping timeout: 252 seconds]
bglusman has quit [Ping timeout: 252 seconds]
workmad3 has quit [Ping timeout: 240 seconds]
elhu has quit [Quit: Computer has gone to sleep.]
TorpedoSkyline has joined #ruby
axl_ has quit [Read error: Connection reset by peer]
Stalkr_ has joined #ruby
_bart has joined #ruby
axl_ has joined #ruby
<Hanmac> i think you could count this bot as safe ... i only get nonzero, no direct crashing
BrokenCog has quit [Quit: leaving]
<Mon_Ouie> Yeah, looks pretty hard to break now
nacengineer has joined #ruby
lorandi has quit [Quit: Leaving]
elhu has joined #ruby
<shevy> damn
<shevy> Hanmac trained it
<rontec76> Wondering if anyone has ever seen this error in a Sinatra app: "Unexpected error while processing request: you need to set up a session middleware *before* Rack::Protection::FormToken"
<rontec76> I'm getting that when posting to my callback route in a custom omniauth strategy
bluenemo has quit [Ping timeout: 252 seconds]
Supaku has joined #ruby
scant has joined #ruby
<Hanmac> rontec76 look into #sinatra
<scant> i want to print out all of the files within a directory, but not any of the subdirectories. how can i do this?
<shevy> scant, use Dir.glob
rontec76 has quit [Quit: rontec76]
<shevy> Dir.glob('*').reject {|x| File.file? x}
<shevy> or
<shevy> Dir.glob('*').reject {|x| ! File.file? x}
<shevy> require 'pp'; pp Dir.glob('*').reject {|x| ! File.file? x}
yakko has quit [Ping timeout: 248 seconds]
<shevy> hmm perhaps even with .glob() alone
<matti> shevy: .select {|i| File.file? i }
<Spooner> shevy Why not select {|x| File.file? x} or reject {|x| File.directory? x} :P
xyzodiac_ has joined #ruby
<matti> Spooner: He likes the hard way ;p
<Synthead> is there a ruby-only way to check the user/group ownership of a directory?
<shevy> I usually use .reject for some reason
<matti> Spooner: Define "check ownership"
<shevy> I am like this... "ok we have a huge array... but I dont need the shit, so I will throw it away"
<Synthead> matti: the UNIX permissions, like mysql:mysql for /var/lib/mysql
<Spooner> matti: Nothing to do with me :D
<shevy> whereas with .select it is "we have a beautiful array, I will tenderly select only the nice bits within it"
<shevy> as you can see
<shevy> .select is for girls
codespectator has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<scant> oh nice, thanks
<matti> LOL
<matti> shevy: ;ppp
<Synthead> bwahahahah
<shevy> why are there no girls programming anyway?
<Synthead> shevy: we have a female dev here
<matti> shevy: They are.
<Spooner> Because everyone assumes everyone online is a bloke unless there name is "Betty"?
krz has joined #ruby
<Spooner> *their
lxsameer has quit [Ping timeout: 248 seconds]
<Hanmac> shevy: Dir.to_enum(:glob,"*").select(&File.method(:file?))
xyzodiac_ has quit [Client Quit]
<shevy> Spooner hehehe
badfish129 has quit [Read error: Connection reset by peer]
<shevy> or silent, like yugui_zzz here :-)
<virunga> >> :c
<al2o3cr> virunga: [:c]
<dereknelson> Anyone used Rake-Pipeline?
<shevy> Hanmac, your code scares me
<virunga> >> require 'benchmark'
<al2o3cr> virunga: ["NameError: undefined local variable or method `require' for Kernel:Module"]
<shevy> that sandbox reminds me of mruby
<shevy> both can not use load() or require()
<Mon_Ouie> Because so far most girls I've seen here were shemales
<shevy> Mon_Ouie hahaha
adeponte has joined #ruby
<Hanmac> Mon_Ouie it sounds that you checked that :P
Supaku has quit [Ping timeout: 240 seconds]
<Muz> That line is so great out of context.
yakko has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<Synthead> any thoughts? I see .chown in File, but nothing to display permissions
<jrajav> Yay, no one managed to kill the bot while I was gone
<shevy> jrajav Hanmac won the battle still
lxsameer has quit [Max SendQ exceeded]
cjs226 has joined #ruby
<shevy> Synthead, displaying permissions is a bit annoying. how do you want to display that?
<shevy> I think its the octal thing by default
<jrajav> His victory is enshrined, shevy
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
<jrajav> >> @#$%^&
<al2o3cr> jrajav: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Muz> Which permissions exactly? The POSIX permissions? ACLs?
<Muz> NTFS permissions?
_bart has quit [Quit: _bart]
<shevy> stat = File.stat("your_file_here")
<Muz> The permissions of the ruby instance?
kjellski has quit [Quit: Leaving]
<virunga> jrajav: thanks for added the interpreter
<jrajav> I'll probably set up the bot on a 'forever' instance if it seems to be fairly stable-ish now
<jrajav> np :)
<shevy> permissions = ('%o' % stat.mode)[-3,3]
<shevy> that's what I usually use Synthead
Taichou has quit [Remote host closed the connection]
<matti> Synthead: I am hacking on this one ;]
<matti> Synthead: One moment ;]
<Synthead> shevy: File.something('file') would equal [ 'mysql', 'mysql' ] for example
lxsameer has quit [Max SendQ exceeded]
<shevy> hmm
<shevy> that is in the etc module I think
<shevy> require 'etc'
<matti> It is.
<matti> etc + File.stat
<shevy> require 'etc'; Etc.group {|g| puts g.name + ": " + g.mem.join(', ') }
mramaizng has joined #ruby
<shevy> seems to be a struct
Guedes is now known as Guedes_out
<Synthead> shevy: not the rwx bits, but the user/group that owns it :)
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
lxsameer has quit [Read error: Connection reset by peer]
<shevy> .name gives back the name, or?
<virunga> >> h = Hash.new {|h, k| h[k] = Hash.new(&defauld_proc)}; puts h[:a][:b]
<al2o3cr> virunga: []
nyuszika7h has joined #ruby
<virunga> >> h = Hash.new {|h, k| h[k] = Hash.new(&defauld_proc)};
<al2o3cr> virunga: []
rodj has quit [Quit: rodj]
xyzodiac has left #ruby [#ruby]
<virunga> >> h = Hash.new {|h, k| h[k] = Hash.new(&default_proc)};
<al2o3cr> virunga: []
banghouse is now known as banghouseAFK
<jrajav> virunga: Don't 'puts', al2o3cr isn't nice enough to give you stdout. Just inline any expressions you want to see the value of
mikepack has quit [Remote host closed the connection]
<Synthead> shevy: not the current running user, but the user/group ownership of a file
<virunga> jrajav: ok
<shevy> aha
w400z has joined #ruby
<apeiros_> virunga: please use private message to test the bot
<Synthead> shevy: if I were to run ls -ld on /var/lib/mysql, I get drwxr-xr-x 6 mysql mysql 4096 Aug 2 15:41 /var/lib/mysql
<shevy> file = '/tmp/foo.txt'; uid_stat = File.stat(file).uid; uid_number = Etc.getpwuid(uid_stat)
<shevy> does that work?
Criztian has quit []
<virunga> apeiros_: ok
<Synthead> shevy: I'm looking to get mysql:mysql from that directory without running subshells (`...`)
strife25 has quit [Quit: Computer has gone to sleep.]
Supaku has joined #ruby
<shevy> uid_number.group
<shevy> uid_number.name
<shevy> that gives you the info you need, right?
<Synthead> shevy: from what class?
sebastorama has joined #ruby
ryh has joined #ruby
<shevy> what class where
<shevy> for Etc, you have to do require 'etc' first
<Synthead> shevy: NoMethodError: undefined method `uid_number' for Etc:Module
otters has quit [Read error: Connection reset by peer]
xorigin has joined #ruby
<shevy> uid_number = Etc.getpwuid(uid_stat) worked?
<shevy> it was just a variable name :)
kenichi has quit [Remote host closed the connection]
<shevy> I am copy pasting from my all display_directory_content.rb script :P
<matti> Synthead: Would that do? https://gist.github.com/3240206
<Synthead> shevy: I'm not trying to get information about the current user
mahmoudimus has quit [Quit: Computer has gone to sleep.]
mikepack has joined #ruby
<shevy> there is a file owner for a file, and a group that owner belongs to
<Synthead> matti: YEAH
<Synthead> shevy: ok, now I see what toy were getting at!
otters has joined #ruby
<Synthead> this is great guys :D saved the day again!
<shevy> oh that is nice code
strife25 has joined #ruby
<matti> ?
<Synthead> on second hand, I could even use the uid and gids from File.stat :)
<matti> LOL
<matti> ;p
<Synthead> I didn't realize it had _that_ information, though!
geekbri has quit [Remote host closed the connection]
<shevy> matti your code
<shevy> that is nice code
kenichi has joined #ruby
<matti> shevy: Thanks ;)
<Synthead> ooh baby your code is so hot
<Synthead> can I debug it
<Synthead> j/k
<matti> LOL
workmad3 has joined #ruby
<shevy> well
<shevy> does not seem to have a bug
<shevy> it's also shorter than what I use in my display*director*.rb
<Synthead> code must be playing hard to get, then
<shevy> lol
<shevy> good code wants to believe that it is "worth it" to get it
<otters> can I see the code
<Synthead> what if you reference an invalid file?
<otters> I like nice code
<Synthead> I think there should be an exception for nice, large files
<Synthead> and put a sleep at the end
<Synthead> def make_breakfast
<matti> Synthead: No, no.
<matti> Synthead: sudo make breakfast
<Synthead> make me {} browns, bitch!
<Synthead> haha
Abbas| has quit [Ping timeout: 248 seconds]
koshii has quit [Ping timeout: 244 seconds]
<s1n4> what is '||=' ? what does "x ||= something" mean ?
<Hanmac> i thought is like this: (x || x = something)
burgestrand has quit [Quit: Leaving.]
tatsuya_o has joined #ruby
<Mon_Ouie> It's that, only it defines the variable anyway
<Synthead> s1n4: if x is not defined, define it
<Synthead> s1n4: if it is, don't
<s1n4> hum
<s1n4> nice
<Synthead> s1n4: there's also x &&= 'that'
<s1n4> Synthead: thanks
<scant> what's the equivalent of print_r (recursive print) for hashes in ruby?
<Synthead> scant: what do you mean by 'recursive'?
<scant> if i have hashes within hashes, it should print each of those too
<scant> and hashes within those hashes, etc.
<Synthead> scant: for debugging?
<scant> yes
<Mon_Ouie> All print methods in Ruby do that
<Synthead> scant: try awesome_print
<s1n4> Synthead: what does x &&= 'that' do ?
<Mon_Ouie> p, pp, puts, …
<Synthead> scant: gem install awesome_print
<Mon_Ouie> Same as ||= with && instead of ||
<Synthead> scant: require 'rubygems'; require 'awesome_print'; ap hash
<Synthead> scant: you could also do hash.inspect
<scant> haha at first i thought you were messing with me :)
<Synthead> scant: but try awesome print ;)
<scant> awesome thanks
<virunga> s1n4: look it like this x = x && 'that'
<Synthead> s1n4: don't define it if it isn't already defined
<Synthead> s1n4: try (in irb): a = 2; a ||= 1
elux has joined #ruby
<Synthead> s1n4: b ||= 1
<Synthead> then
<Synthead> s1n4: c &&= 1; c = 2; c &&= 1
<rcassidy> is the bot here?
<rcassidy> >> a=1; a||=2; a;
<al2o3cr> rcassidy: [1, 1, 1]
<Mon_Ouie> More importantly, try it with a method; the setter won't actually be called if the getter returns neither nil nor false.
<Synthead> ooooh, didn't know there was a bot here
<rcassidy> a||=2; a;
<Synthead> >> puts 'boobs'
<al2o3cr> Synthead: [nil]
<Synthead> noooo
<rcassidy> >> a||=2; a
<al2o3cr> rcassidy: [2, 2]
<Synthead> >> 'boobs'
<al2o3cr> Synthead: ["boobs"]
<Mon_Ouie> Don't spam the channel with its output though
<rcassidy> but i have never seen &&= before, what's the difference from &&=? it just always sets it anyway?
<s1n4> hummm
<Synthead> Mon_Ouie: for sure ;) that's what /msg is for :)
<s1n4> thanks
<rcassidy> >> a=4; a&&=7; a;
<al2o3cr> rcassidy: [4, 7, 7]
<rcassidy> weird...
awarner has quit [Remote host closed the connection]
<Synthead> rcassidy: if the var is not defined, don't define it
<s1n4> >> a ||= 'hmmm'
<al2o3cr> s1n4: ["hmmm"]
<rcassidy> that's... oh.
<Mon_Ouie> &&= *will* always define the variable
<s1n4> >> Time.now
<al2o3cr> s1n4: [2012-08-02 15:22:33 -0500]
<Mon_Ouie> As will ||=
<Mon_Ouie> It may however not *set* it in some cases
<workmad3> a = false; a &&= true; a
<Synthead> Mon_Ouie: ah, semantics
<s1n4> >> system 'uptime'
<al2o3cr> s1n4: ["NameError: undefined local variable or method `system' for Kernel:Module"]
<rcassidy> i see. as in, it might set it to nil, but not to a value?
<rcassidy> please help me with my semantics :)
<Mon_Ouie> nil is a valid value, but yeah
<rcassidy> word
<rcassidy> >> b
<al2o3cr> rcassidy: ["NameError: undefined local variable or method `b' for main:Object"]
<rcassidy> >> b&&=7; b;
<al2o3cr> rcassidy: [nil, nil]
<rcassidy> perfect, thanks.
chrisja has quit [Quit: leaving]
<workmad3> ooh, do we have a ruby bot in here now? :)
<Hanmac> workmad3 yeah, and its hanmac-safe
<banisterfiend> >> 4
<al2o3cr> banisterfiend: [4]
<Mon_Ouie> jrajav wrote it
<banisterfiend> >> def hello
<al2o3cr> banisterfiend: []
<Mon_Ouie> (And I messed around with it too; can't find a way to break it anymore)
<workmad3> >> def hello; "foo"; end; hello
<banisterfiend> >> loop {}
<al2o3cr> banisterfiend: ["Timeout::Error: execution expired"]
<shevy> there must be a way
<Mon_Ouie> banisterfiend: Use /msg al2o3cr to mess arround with it
<Petit_Dejeuner> >> BasicObject.new
<al2o3cr> Petit_Dejeuner: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Petit_Dejeuner> lol
chimkan has quit [Quit: chimkan]
<shevy> lol
<Petit_Dejeuner> >> 2 + 2
<al2o3cr> Petit_Dejeuner: [4]
<shevy> it kinda removed the fun bits of ruby
<workmad3> >> RUBY_VERSION
<al2o3cr> workmad3: ["1.9.3"]
<Petit_Dejeuner> >> $:
<Petit_Dejeuner> >> $"
<Petit_Dejeuner> >> puts $"
<al2o3cr> Petit_Dejeuner: [nil]
<Petit_Dejeuner> :/
<workmad3> >> LOAD_PATH
<al2o3cr> workmad3: ["NameError: uninitialized constant LOAD_PATH"]
<Hanmac> >> $LOAD_PATH
shadoi has joined #ruby
<shevy> Hanmac
<shevy> did you break the bot again...
<jrajav> Doesn't seem broken
<jrajav> >> 'Hiya!'
<al2o3cr> jrajav: ["Hiya!"]
<shevy> >> p $LOAD_PATH
<shevy> the bastard
<Hanmac> no i didnt ... when there is to much output you get a private message
<shevy> HE HIDES INFORMATION FROM US
<shevy> oh wait
<shevy> he PMed
<jrajav> haha
<shevy> [["/home/jrajav/.gem/ruby/1.9.1/gems/sandrbox-0.1.0/lib", "/usr/lib/ruby/site_ruby/1.9.1", "/usr/lib/ruby/site_ruby/1.9.1/x86_64-linux", "/usr/lib/ruby/site_ruby", "/usr/lib/ruby/vendor_ruby/1.9.1", "/usr/lib/ruby/vendor_ruby/1.9.1/x86_64-linux", "/usr/lib/ruby/vendor_ruby", "/usr/lib/ruby/1.9.1", "/usr/lib/ruby/1.9.1/x86_64-linux"]]
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<jrajav> Yeah I have it on the todo list to say in-chan that the result was pmed
<shevy> ok good
<shevy> now we need to break into /home/jrajav
vaks has joined #ruby
<jrajav> .gem is literally the only thing in there
<jrajav> And a node_modules that isn't used
<shevy> what did Mon_Ouie say... use a method object, change it, hook it back in again...
<Hanmac> shevy ... changing the loadpath or something has no effect because require and load is broken
<jrajav> and .bash_profile if you want to see me adding .gem/ruby/etc. to the path
* shevy *confused*
<shevy> Hanmac hmmmmmm
<Synthead> ever use the bot on #bash?
<shevy> no what can it do
<Mon_Ouie> And you're gonna have a hard time finding the IO-related classes without ObjectSpace
<Synthead> it's done in in a really clever way
<shevy> hehe
<Synthead> I think it uses pcre
TomRone has quit [Ping timeout: 255 seconds]
<Synthead> after it executes a command, it restores from a snapshot
AlbireoX`Laptop has quit [Remote host closed the connection]
<workmad3> >> Dir["*"]
<al2o3cr> workmad3: ["NameError: uninitialized constant Dir"]
snearch has joined #ruby
<Synthead> so you can rm -rf /lib on it and it'll always work after
<workmad3> >> File
<al2o3cr> workmad3: ["NameError: uninitialized constant File"]
<Synthead> and it'll let you do it too
<shevy> Synthead interesting
AlbireoX`Laptop has joined #ruby
TomRone has joined #ruby
<Synthead> shevy: ooh, qemu, not pcre
tiripamwe has joined #ruby
<shevy> cool idea
<shevy> reminds me of TRON
<shevy> :)
<Synthead> shevy: GAMES
<Synthead> RECTIFY
<banisterfiend> >> RUBY_VERSINO
<al2o3cr> banisterfiend: ["NameError: uninitialized constant RUBY_VERSINO"]
<banisterfiend> >> RUBY_VERSION
<al2o3cr> banisterfiend: ["1.9.3"]
<Synthead> I wonder if there's r34 fanart of when someone "flips bit"
<Synthead> man I feel so perverted right now, hah
<banisterfiend> >> def foo; binding; end; b = foo { puts 'hi!' }; b.eval('Proc.new').call
carlyle has joined #ruby
<banisterfiend> ^ that should cause a segfault
Husel has joined #ruby
<banisterfiend> >> 3
<al2o3cr> banisterfiend: [3]
<banisterfiend> damn
workmad3 has quit [Ping timeout: 240 seconds]
<banisterfiend> >> def foo; binding; end; b = foo { 'hi!' }; b.eval('Proc.new').call
<Petit_Dejeuner> >> def foo; next; end
<Petit_Dejeuner> >> 2 + 2
<al2o3cr> Petit_Dejeuner: [4]
<robert_> I need to invent a reversible token-y text format, not all too dissimilar from C++'s name mangling.. though I have no idea where to begin. :p
<Petit_Dejeuner> >> def foo; next; end; foo()
i0n has quit [Quit: Lost terminal]
<banisterfiend> Petit_Dejeuner: that will just result in exception
<banisterfiend> nothing very special
Eldariof-ru has quit []
tfitts has quit [Ping timeout: 246 seconds]
Goles has quit [Quit: Computer has gone to sleep.]
<Petit_Dejeuner> :<
stephenjudkins has quit [Quit: stephenjudkins]
Abbas5 has joined #ruby
Abbas5 is now known as Abbas-
Abbas- has quit [Changing host]
Abbas- has joined #ruby
Abbas- is now known as Abbas5
<Petit_Dejeuner> >> fiber.New{|x| x}.resume(2)
<al2o3cr> Petit_Dejeuner: ["NameError: undefined local variable or method `fiber' for main:Object"]
strife25 has quit [Quit: Computer has gone to sleep.]
<Petit_Dejeuner> >> Fiber.new{|x| x}.resume(2)
<al2o3cr> Petit_Dejeuner: ["NameError: uninitialized constant Fiber"]
<Petit_Dejeuner> ...
rerntzdb has joined #ruby
<rcassidy> it's in a sandbox Petit_Dejeuner
<rcassidy> with a bunch of stuff disabled for this reason :) we were breaking it a few hours ago
<rcassidy> and it's been decently impenetrable since jrajav updated it
Taichou has joined #ruby
<rcassidy> >> clone
<al2o3cr> rcassidy: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<rcassidy> crashing the interpreter will just give that message
Clooth has quit [Quit: Bye!]
<rcassidy> also it's got a decent timeout recognition
<rcassidy> >> self.dup while true
<al2o3cr> rcassidy: ["Timeout::Error: execution expired"]
<Petit_Dejeuner> rcassidy, it can't live forever
sendoushi has quit [Remote host closed the connection]
<rcassidy> Petit_Dejeuner: Hanmac is the current champion, do your worst :p
<Petit_Dejeuner> >> undef Timeout::Error
<al2o3cr> Petit_Dejeuner: []
<Petit_Dejeuner> >> self.dup while true
<al2o3cr> Petit_Dejeuner: ["Timeout::Error: execution expired"]
<Mon_Ouie> Each interpreter is run in its own process
<rcassidy> yeah
<rcassidy> >> a=5
<al2o3cr> rcassidy: [5]
<rcassidy> >> a
<al2o3cr> rcassidy: ["NameError: undefined local variable or method `a' for main:Object"]
<Petit_Dejeuner> >> undef Timeout::Error; self.dup while true
<al2o3cr> Petit_Dejeuner: []
<Mon_Ouie> I don't think you'll be able to do anything actually dangerous with it
swankier has joined #ruby
<rcassidy> most of the dangerous keywords are plain blocked
<Petit_Dejeuner> >> killTheChildren
<al2o3cr> Petit_Dejeuner: ["NameError: undefined local variable or method `killTheChildren' for main:Object"]
<rcassidy> you used to be able to set at them via ObjectSpace
<rcassidy> but then that got blocked
kwerle has joined #ruby
<rcassidy> *get at them
<jrajav> By the way
<banisterfiend> Mon_Ouie: hey sweety
<jrajav> Since we're on the subject of the bot
<Petit_Dejeuner> >> `rm *`
<al2o3cr> Petit_Dejeuner: ... Wha?
<shevy> lol
<Petit_Dejeuner> lol
<jrajav> I'm about to leave work after setting it up on a forever instance
<shevy> ok
<shevy> we will break it while you are gone
<Petit_Dejeuner> >> `fortune | cowsay`
<al2o3cr> Petit_Dejeuner: ... Wha?
<banisterfiend> damnit there's no ObjectSpace
<jrajav> shevy: It will rise from the dead
<jrajav> That's the point of forever
theRoUS has quit [Ping timeout: 244 seconds]
darren has quit [Remote host closed the connection]
JustinCampbell has joined #ruby
JustinCampbell has quit [Remote host closed the connection]
<Petit_Dejeuner> >> x{ rm * }
<al2o3cr> Petit_Dejeuner: ["SyntaxError: sandrbox: syntax error, unexpected '}'\nx{ rm * };\n ^"]
<shevy> nothing a loaded shotgun can't fix
cantonic has joined #ruby
<Petit_Dejeuner> >> x%{ rm * }
<al2o3cr> Petit_Dejeuner: ["SyntaxError: sandrbox: syntax error, unexpected '}'\nx%{ rm * };\n ^"]
<rcassidy> Petit_Dejeuner: it also responds via PM if you want to hack at it
<swankier> Hi there. I am not a ruby developer, but I am having a problem with ruby code (in puppet). The puppet channel is a little more focused on the puppet DSL than ruby, so I was wondering if someone in here could offer some assistance. The problem code in question and the output is here: http://pastebin.com/Gzq7qX1k
<Petit_Dejeuner> >> %x{ rm * }
<al2o3cr> Petit_Dejeuner: ["NameError: undefined local variable or method ``' for Kernel:Module"]
<jrajav> You could keep breaking it the same way over and over again if you want; but I (and everyone) would probably prefer it if you just remember what went wrong and tell me when I get back
mneorr has quit [Quit: Leaving.]
Taichou has quit [Ping timeout: 246 seconds]
<jrajav> Of course, this is assuming you manage to break it, I doubt you can
<shevy> swankier that is very puppet specific code
<shevy> people who wont know puppet wont really be able to know what this does
cantonic has quit [Client Quit]
<kwerle> I would like to execute a method when a class is first loaded - preferably at the end. Is there a mechanism to do that kind of thing? Maybe I just want to subclass from some parent and do something clever with inherited?
<shevy> all we know is that a rescue clause is triggered
<swankier> okay, but the chmod command is not. and chmod is returning that it cannot convert a string to integer. is that not general enough?
<shevy> and the cant convert string into integer means
<shevy> a "foo".to_i failed or something like that
Abbas5 is now known as Abbas|
<shevy> swankier, well
<shevy> .chmod in pure ruby code can be used like this:
<shevy> File.chmod('a+wt','sources')
<shevy> File.chmod(01666,'test.txt')
zleslie has left #ruby ["WeeChat 0.3.7"]
<shevy> you can try to see what the variables are
bglusm___ has quit [Remote host closed the connection]
cjs226 has quit []
<shevy> or change:
<shevy> file.chmod(mode)
<shevy> to
<swankier> 5 digit permissions?
<shevy> File.chmod(mode,file)
<jrajav> Bot down to transition to forever
al2o3cr has quit [Remote host closed the connection]
<Petit_Dejeuner> >> Dir.getdir()
<shevy> swankier, it will work
<Petit_Dejeuner> the fuck?
<jrajav> Haha great timing, huh?
<shevy> if you have ruby, try it in irb swankier
<jrajav> :P
<shevy> Petit_Dejeuner, could be it PRIVMSG you
<Petit_Dejeuner> Was that you or me jrajav?
<banisterfiend> jrajav: it died?
<jrajav> Me
<jrajav> <jrajav> Bot down to transition to forever
<jrajav> Doesn't anybody read
<shevy> ohhhh
<shevy> :(
<Petit_Dejeuner> shevy, it was
<shevy> and I was so happy
<banisterfiend> jrajav: what does "transition to forever" mean?
<Petit_Dejeuner> jrajav <-- stick in the mood
<Petit_Dejeuner> and by mood I mean mud
<shevy> lol
<jrajav> I prefer stick in the mood
<jrajav> It's more hipster
<shevy> I am going to kill you
<shevy> and by kill I mean kiss
elux has quit [Quit: Bye!]
berserkr has quit [Quit: Leaving.]
<shevy> rod in the mood?
<jrajav> banisterfiend: forever is a node.js module to … run scripts forever
<Petit_Dejeuner> I am going to code this script. And by code I mean break.
<shevy> I dont like hipsters, they dont seem to be doing anything useful
chson has joined #ruby
<rerntzdb> is there a way to get an expression in ruby which evaluates to a function that is called using regular syntax, rather than via "<expr>.call(foo,bar,baz)"?
<Petit_Dejeuner> They weren't doing anything useful before everyone else was.
<banisterfiend> jrajav: interesting, why use node for this?
<Petit_Dejeuner> I think some kind of proc can be called with []
<jrajav> It's not important that it's node
stephenjudkins has joined #ruby
<Mon_Ouie> All Procs can be called with #[]; also foo.(bar) is another syntax for calling #call
al2o3cr has joined #ruby
qakka has joined #ruby
<jrajav> Okay, he's back
cantonic has joined #ruby
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<Petit_Dejeuner> >> Dir.getdir
<al2o3cr> Petit_Dejeuner: ["NameError: uninitialized constant Dir"]
<Hanmac> whevy: "And you look at Romney, and I’m sure he’s a nice guy, but I think he’s like the Thing. He only imitates human behavior. He’s not actually human himself."
<Hanmac> i mean shevy
Berglund has quit [Quit: Computer died.]
rippa has quit [Ping timeout: 240 seconds]
sent-hil has quit [Remote host closed the connection]
awarner has joined #ruby
<jrajav> So, from now on, if the bot itself dies (which shouldn't happen), it will restart and rejoin after a short delay
awarner has quit [Remote host closed the connection]
<shevy> so you say
<qakka> hey, is it possible to make ruby lazy?
<shevy> but Hanmac will come up with a counter
<shevy> qakka, yes. Stop. Writing. Code.
<jrajav> I think he means in the sense of functional programming :P
erichmenge has quit [Quit: Be back later]
<shevy> they are all lazy
<banisterfiend> qakka: just pass lambdas everywhere :)
<shevy> qakka, try things like .tap {} and so forth
<qakka> :) yeah I mean lazy evaluation
erichmenge has joined #ruby
<shevy> banister is the master of lazy
bigdc1 has joined #ruby
<banisterfiend> shevy: no..i actually finish projects. what about u? :)
<jrajav> Mon_Ouie is doing scary things with global_variables
<jrajav> I think he's determined to wrest Hanmac's crown
<banisterfiend> jrajav: you still keep RubyVM exposed, i wonder if something could be done with that
<Hanmac> qakka, you mean something like this? : [4,3,2,1].each_with_index.with_object({}) {|(i,idx),o| o[idx]=i}
erichmenge has quit [Client Quit]
<banisterfiend> >> Object.constants
<jrajav> banisterfiend: Feel free to try
<qakka> hmm how could I create a lambda to return an infinite sequence?
<Petit_Dejeuner> >> $myValue = 10
<al2o3cr> Petit_Dejeuner: [10]
<Petit_Dejeuner> >> $myValue
<al2o3cr> Petit_Dejeuner: [nil]
<banisterfiend> qakka: oh that's easy
<Petit_Dejeuner> :\
<shevy> banisterfiend so pry is finished?
<qakka> scratch that actually...
<qakka> its obvious..
<jrajav> I would love it if anyone could actually get through to process or filesystem calls; it would expose another hole in the sandbox
minijupe has quit [Quit: minijupe]
<jrajav> Just please exercise good taste in not actually *using* that for anything that's not demonstrative :P
<jrajav> And hopefully noe more such holes are found
<banisterfiend> qakka: e = Enumerator.new { |y| (1..Float::INFINITY).each { |v| y << v } }
<banisterfiend> qakka: e.next; e.next; e.next
<shevy> jrajav, you kinda removed everything cool with the bot :(
stopbit has quit [Read error: Connection reset by peer]
mengu has quit [Ping timeout: 252 seconds]
ThaDick has quit [Quit: I'm outta here!]
<banisterfiend> shevy: it's released and stable :) It's still having features added it to for future versions, but the versions released are stable
stopbit has joined #ruby
<rcassidy> >> e=Enumerator.new{|y|(1..Float::INFINITY).each{|v|y<<v}}; e.next; e.next; e.next;
hynkle has quit [Quit: Computer has gone to sleep.]
<qakka> @banisterfiend: ah simpler that I thought
<jrajav> Petit_Dejeuner: Were you expecting that to work?
<Petit_Dejeuner> jrajav, Right, well my BLT drive on my computer just went AWOL, and I've got this big project due tomorrow for Mr. Kawasaki, and if I don't get it in, he's gonna ask me to commit Hari Kari...
<jrajav> ?
<Petit_Dejeuner> jrajav, Could you, uh, read me the number on the modem?
<jrajav> ...
<Petit_Dejeuner> :D
<shevy> lol
<rcassidy> jrajav: did you see the output from what i just tried, there?
lunitikcalm has joined #ruby
<jrajav> rcassidy: Do it again
<shevy> there must be some way to sneakily replace some component of the bot at runtime
<rcassidy> >> e=Enumerator.new{|y|(1..Float::INFINITY).each{|v|y<<v}}; e.next; e.next; e.next;
<banisterfiend> >> e = Enumerator.new { |y| (1..Float::INFINITY).each { |v| y << v } }; e.next
<al2o3cr> banisterfiend: [#<Enumerator: #<Enumerator::Generator:0x00000002544f50>:each>, 1]
<jrajav> Interesting
<rcassidy> but the second time it errors, banisterfiend
<rcassidy> "Error: Fiber caled across threads"
eggie5 has joined #ruby
<shevy> hmm
bigdc1 has quit []
<Petit_Dejeuner> oooh, I had a fun idea
<qakka> darn it can't copy and paste on android to try that out...
<eggie5> why does bundle package skip local gems added like: gem "nokogiri", :path => "~/sw/gems/nokogiri"
<eggie5> ??
<banisterfiend> >> Thread.current.exit
lledet has joined #ruby
<al2o3cr> banisterfiend: ["NameError: uninitialized constant Thread"]
<eggie5> * nokogiri at `../sw/gems/nokogiri/` will not be cached.
pu22l3r has quit [Ping timeout: 255 seconds]
<Petit_Dejeuner> >> begin; 3 + "3"; rescue; raise SystemExit; end
kwerle has quit [Quit: Page closed]
<Petit_Dejeuner> >> raise fatal
<al2o3cr> Petit_Dejeuner: ["NameError: undefined local variable or method `fatal' for main:Object"]
<rcassidy> ooooh
tommyvyo has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
<Petit_Dejeuner> >> raise Exception
<al2o3cr> Petit_Dejeuner: ["Exception: Exception"]
Morkel has quit [Quit: Morkel]
<Hanmac> >> fatal
<al2o3cr> Hanmac: ["NameError: undefined local variable or method `fatal' for main:Object"]
eywu has quit [Quit: Leaving.]
<Petit_Dejeuner> >> Exception
<al2o3cr> Petit_Dejeuner: [Exception]
<Hanmac> >> warn
<al2o3cr> Hanmac: ["ArgumentError: wrong number of arguments(0 for 1)"]
<rcassidy> >> warn "WARNING!"
<al2o3cr> rcassidy: [nil]
<Hanmac> >> Object.new
<al2o3cr> Hanmac: [#<Object:0x007f032400dfb0>]
<Hanmac> >> BasicObject.new
<al2o3cr> Hanmac: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<shevy> hehe
<shevy> I think you will have to come up with something cleverer
<Petit_Dejeuner> >> class NewError; end; raise NewError;
<al2o3cr> Petit_Dejeuner: [nil, "TypeError: exception class/object expected"]
<banisterfiend> >> :Hanmac ? "evil german" : "polite european gentleman"
mahmoudimus has joined #ruby
<al2o3cr> banisterfiend: ["evil german"]
<banisterfiend> i thoguht so
<Petit_Dejeuner> >> class NewError < BaseException; end; raise NewError;
<al2o3cr> Petit_Dejeuner: ["NameError: uninitialized constant BaseException", "NameError: uninitialized constant NewError"]
<robert_> hai banisterfiend :D
<Petit_Dejeuner> >> class NewError < Exception; end; raise NewError;
<al2o3cr> Petit_Dejeuner: [nil, "NewError: NewError"]
mikepack has quit [Remote host closed the connection]
<shevy> >> method = "cat".method(:upcase); p method.class
<al2o3cr> shevy: []
qakka has quit [Ping timeout: 240 seconds]
<Petit_Dejeuner> >> Kernel
<al2o3cr> Petit_Dejeuner: [Kernel]
<shevy> what the heck
<shevy> the bot is lying
beneggett has joined #ruby
<shevy> Irb outputs
<shevy> Method
<jrajav> :O
<Petit_Dejeuner> >> undef Kernel.raise
<al2o3cr> Petit_Dejeuner: []
<jrajav> Are you sure it's p and not puts shevy ?
<Petit_Dejeuner> >> undef Kernel.raise; 2 + "3"
<al2o3cr> Petit_Dejeuner: []
<shevy> jrajav, hmmm
<shevy> >> method = "cat".method(:upcase); puts method.class
<al2o3cr> shevy: []
bothra has quit [Ping timeout: 245 seconds]
<shevy> !!!!!
<shevy> the bot is not valid ruby!
<jrajav> puts is basically a no-op for al2o3cr
<jrajav> stdout gets written to but it doesn't show it
<shevy> but the result is stil wrong
<shevy> hmm
<jrajav> >> method = "cat".method(:upcase); method.class
<al2o3cr> jrajav: []
<shevy> >> method = "cat".method(:upcase); return method.class
<al2o3cr> shevy: []
<jrajav> Huh
<Petit_Dejeuner> Can we flood the stdout?
<Mon_Ouie> jrajav: I think I got something
<shevy> the bot is cheating!
<jrajav> Petit_Dejeuner: There's no way to get it, in chan or in pm
<Mon_Ouie> I wrote to a File
* shevy listens to Mon_Ouie
<Petit_Dejeuner> Mon_Ouie,
<Petit_Dejeuner> oh boy
<jrajav> Petit_Dejeuner: Unless you mean, can you flood it even if you can't see it; and the answer is yes, and DON'T :P
und3f has joined #ruby
<jrajav> It's a known bug that I'm going to fix tomorrow
<Mon_Ouie> (I'm gonna keep the line a secret for now :p)
mikepack has joined #ruby
<Petit_Dejeuner> jrajav, "DON'T" <-- where's the fun in that?
<shevy> :((((
<shevy> ok Mon_Ouie gave a hint
<swankier> shevy, thanks for your help.
<shevy> Petit_Dejeuner help me with your brain... how can we write to a File
carlyle has quit [Remote host closed the connection]
<Petit_Dejeuner> require 'open-uri': open('www.google.com')
<Petit_Dejeuner> >> require 'open-uri'; open('www.google.com')
<al2o3cr> Petit_Dejeuner: ["NameError: undefined local variable or method `require' for Kernel:Module", "NameError: undefined local variable or method `open' for main:Object"]
<Petit_Dejeuner> fu
<rcassidy> >> gets
<al2o3cr> rcassidy: ["Timeout::Error: execution expired"]
<shevy> jrajav, still... why is "cat".method(:upcase); p method.name not returning what irb or ruby gives me?
<rcassidy> >> p "4"
<al2o3cr> rcassidy: ["4"]
<jrajav> Mon_Ouie: Wow
<jrajav> Mon_Ouie: So how'd you do it? (Pm maybe)
darkc0met has quit [Quit: ZNC - http://znc.in]
<Mon_Ouie> Bah, everybody can now
<jrajav> (Idc really)
<rcassidy> >> File
lledet_ has joined #ruby
<al2o3cr> rcassidy: ["NameError: uninitialized constant File"]
jmil has joined #ruby
<Mon_Ouie> $stdin.send("cla" + "ss")
KindOne has quit [Quit: ZNC from TrekWeb Internet Services - https://trekweb.org/]
nyuszika7h has quit [Quit: ZNC - http://znc.in]
<Mon_Ouie> Then you get the IO class, with which you can call any IO method you want
<Mon_Ouie> I used IO.write
<Petit_Dejeuner> >> begin; 2 + "2"; rescue; retry; end;
<Mon_Ouie> (Do I win?)
<jrajav> So I guess some global variables need to be knocked out too
<jrajav> Yes, yes you do
<Petit_Dejeuner> >> begin; 2 + "2"; rescue; redo; end;
<Petit_Dejeuner> >> 2 +2
<al2o3cr> Petit_Dejeuner: [4]
<jrajav> Mon_Ouie: Is it just $stdout and $stdin or could it be done with other vars?
<Petit_Dejeuner> >> $stdout = $stdin
<al2o3cr> Petit_Dejeuner: []
<Petit_Dejeuner> >> $stdin = $stdout
<al2o3cr> Petit_Dejeuner: []
<Mon_Ouie> Actually it was only with $stdin for some reason
<Petit_Dejeuner> >> $stdout
<al2o3cr> Petit_Dejeuner: []
<jrajav> Yeah, huh
<Petit_Dejeuner> >> $stdin
<al2o3cr> Petit_Dejeuner: [#<IO:<STDIN>>]
<fowl> who is al2o3cr
<Petit_Dejeuner> odd
<fowl> tsfu
<fowl> what is this
<Petit_Dejeuner> fowl, bot
<jrajav> al2o3cr: version
<al2o3cr> ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
<Mon_Ouie> Ah, you can get it with stdout to, but you have to trick it
<fowl> >> abort
<al2o3cr> fowl: ["NameError: undefined local variable or method `abort' for Kernel:Module"]
<jrajav> Okay, he's going down while I block $stdin
al2o3cr has quit [Remote host closed the connection]
<Mon_Ouie> >> eval("$std" + "out")
<Petit_Dejeuner> fowl, have fun
lledet has quit [Ping timeout: 244 seconds]
lledet_ is now known as lledet
<Petit_Dejeuner> >> begin; 2 + "2"; rescue; redo; end;
tatsuya_o has quit [Remote host closed the connection]
<Petit_Dejeuner> >> begin; 2 + "2"; rescue; retry; end;
<jrajav> It's down
<Hanmac> fowl the bot is thread-safe and hanmac-safe too
awarner has joined #ruby
<Petit_Dejeuner> oh :<
<Petit_Dejeuner> sounds like skynet
<jrajav> Okay
<jrajav> $stdin is dead
al2o3cr has joined #ruby
<jrajav> >> $stdin
<al2o3cr> jrajav: ["TypeError: #<IO:<STDIN>> is not a symbol"]
<fowl> >> instance_methods
<al2o3cr> fowl: ["TypeError: #<IO:<STDIN>> is not a symbol"]
<Mon_Ouie> Nothing works any more
<jrajav> ...
<jrajav> hah
al2o3cr has quit [Remote host closed the connection]
<Petit_Dejeuner> It's exploit proof.
<Petit_Dejeuner> Heh
<jrajav> XD
eggie5 has quit [Quit: eggie5]
<rcassidy> >> 1+2
<rcassidy> oh oops
<rcassidy> /fail
workmad3 has joined #ruby
<jrajav> Erm.
<jrajav> hm.
<workmad3> >> "hello world"
<Petit_Dejeuner> Mon_Ouie, has infected it
<shevy> good
<workmad3> hey, where'd the rubybot go? :'(
<shevy> the bot is down
<jrajav> I'm trying to figure out how to block $stdin
<workmad3> bah
<shevy> Mon_Ouie found a way to knock it out
<shevy> jrajav, it's game over
<Mon_Ouie> Don't forget STDIN, STDOUT and STDERR
<Petit_Dejeuner> Mon_Ouie, Did you put a script in that rewrites the bots script?
vlad_starkov has quit [Remote host closed the connection]
erichmenge has joined #ruby
<workmad3> jrajav: re-open it with a StringIO?
<Mon_Ouie> Petit_Dejeuner: No. That was theoretically possible though.
<shevy> the bot was Hanmac safe but not Mon_Ouie safe
tommyvyo has joined #ruby
<workmad3> jrajav: or spawn the bot with < /dev/zero?
linoj has quit [Quit: linoj]
<Petit_Dejeuner> Mon_Ouie, Should have been quicker.
jimeh has quit [Quit: bye]
<jrajav> That's not the issue
<shevy> lol
Guest68285 has quit [Ping timeout: 252 seconds]
<jrajav> The issue is that $stdin returns a reference to IO
<jrajav> That can be used to do anything IO can do
<jrajav> I'm still confused why that works
<fowl> File.open(DATA,'w+'){|f| f.puts "Hi <3"}
<jrajav> That's basically what Mon_Ouie did
<jrajav> :P
<fowl> lol
itnomad has joined #ruby
<workmad3> jrajav: then StringIO it ;)
<Petit_Dejeuner> jrajav, just making sure, are you deleting the reference before you reassign it?
<Mon_Ouie> I did $stdin.send("cla" + "ss").write("
<workmad3> jrajav: StringIO doesn't make use of IO at all ;)
snearch has quit [Quit: Verlassend]
<Mon_Ouie> and called the file Mon_Ouie :)
<rcassidy> jrajav: I think it makes some sense, isn't $stdin an IO object?
<robert_> workmad3: sup :D
<workmad3> robert_: hey :)
<Mon_Ouie> I think you're gonna need to set them all to nil and put them in other variables
<Mon_Ouie> (that the input script won't be able to get a hold on)
<workmad3> rcassidy: by default, yes, $stdin and $stdout are IO objects
<rcassidy> thought so
yakko has quit [Remote host closed the connection]
<Mon_Ouie> Hey, actually, what does opening DATA in write mode do?
<Mon_Ouie> Does it even work?
<fowl> yea
<robert_> how goes it, workmad3?
<fowl> it will overwrite the current file
<fowl> Mon_Ouie: it doesnt work as expected lol
<workmad3> robert_: not bad :)
<jrajav> AHA
elhu has quit [Quit: Computer has gone to sleep.]
BrokenCog has joined #ruby
<robert_> fun fun.
wallerdev has quit [Quit: wallerdev]
<jrajav> >> $stdin
al2o3cr has joined #ruby
<jrajav> >> $stdin
<al2o3cr> jrajav: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> Muahahaha
<workmad3> >> $stdout
<al2o3cr> workmad3: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<fowl> you might think hey writing to DATA might work to mess with the stuff under __end__ but nope, file gone
<fowl> >> File.open(DATA,'w+'){|f| f.puts "Hi <3"}
<al2o3cr> fowl: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<workmad3> >> STDIN
<al2o3cr> workmad3: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> >> 1 + 3
<al2o3cr> jrajav: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<jrajav> godammit
<jrajav> XD
al2o3cr has quit [Remote host closed the connection]
<robert_> workmad3: I'm trying to find a way to reliably encode/decode strings via a method similar to name mangling in a language like C++
<workmad3> >> STDIN.send('cla' 'ass')
pskosinski has quit [Ping timeout: 244 seconds]
<Mon_Ouie> I suggest you use a local IRC server for testing though
<workmad3> >> STDIN.send('cl' 'ass')
<rcassidy> workmad, the bot is gone
<fowl> or at least a diff channel
iamjarvo has quit [Quit: Leaving...]
<workmad3> bah, missed it leaving
<robert_> workmad3: a reliable way*
Markvilla has joined #ruby
<workmad3> leave it here for us to subvert! :)
<robert_> heh :D
wallerdev has joined #ruby
vaks has quit [Ping timeout: 260 seconds]
<workmad3> robert_: sorry, not sure how string encodings bear relation to method name mangling
Boohbah has joined #ruby
<jrajav> I *am* testing it in a different channel
lunitikcalm has quit [Remote host closed the connection]
<jrajav> I'm just stupid about when I think I got it working
Boohbah is now known as Guest83725
<jrajav> D;
lunitikcalm has joined #ruby
<robert_> hm I guess I'm going to have to roll my own. Oh well.
mramaizng has quit [Quit: mramaizng]
s1n4 has quit [Quit: peace out]
EPIK has joined #ruby
<shevy> this is the way man
<shevy> do it yourself
<shevy> this is how UNIX emerged
jxf has joined #ruby
<Mon_Ouie> Yeah, who'd use someone else's code — that's gross!
<workmad3> robert_: it would help if you explained what you're trying to do...
SeanLazer has quit [Quit: SeanLazer]
<workmad3> robert_: in a different way than the one you've already used that is confusing :)
strife25 has joined #ruby
<shevy> he tried to explain it to me too
<shevy> I didn't quite understand it
<shevy> <robert_> 1.) I need to ensure valid token format
<shevy> <robert_> 2.) I need to decompose said token format for the information contained in it
<robert_> yeah
<shevy> all I know is that it is not an easy problem so I ran away
<shevy> :)
<robert_> heh
michaelmartinez has joined #ruby
Markvilla has quit [Ping timeout: 255 seconds]
<jrajav> OKAY
al2o3cr has joined #ruby
<shevy> no
<jrajav> It's hacky as hell
<shevy> it wont work
<shevy> Mon_Ouie killed it before
<jrajav> But it should… damn you
<shevy> he can do it again
<jrajav> Yes it will
<shevy> :)
<jrajav> al2o3cr: ping
<al2o3cr> jrajav: pong
<jrajav> >> 1 + 3
<al2o3cr> jrajav: [4]
<jrajav> >> $stdin
<al2o3cr> jrajav: ["Nice try, Mon_Ouie"]
<jrajav> :D
<shevy> hahaha
<shevy> >> "cat".method(:upcase); p method.name
<al2o3cr> shevy: [#<Method: String#upcase>, "ArgumentError: wrong number of arguments(0 for 1)"]
<jrajav> And thus has Mon_Ouie, too, been immortalized in the bot
<shevy> cool
banghouseAFK is now known as banghouse
GoGoGarrett has quit [Remote host closed the connection]
<shevy> >> method = "cat".method(:upcase); p method.name
<al2o3cr> shevy: [#<Method: String#upcase>, :upcase]
<jrajav> Okay.
<jrajav> I seriously need to go
<shevy> we'll break it whiel you are gone
cirwin has joined #ruby
<jrajav> See ya guys
aempirei has joined #ruby
kyrylo has joined #ruby
<shevy> he somehow changed the output format...
rutkla has quit [Ping timeout: 244 seconds]
<fowl> >> p eval "niddts$".reverse
<al2o3cr> fowl: [nil]
<rcassidy> lol.
<shevy> oh??? eval works?
<workmad3> >> STDIN
<al2o3cr> workmad3: [#<IO:<STDIN>>]
<fowl> :p
<Mon_Ouie> Yeah, so it's not actually fixed
<jrajav> .....
Markvilla has joined #ruby
<shevy> lol
<workmad3> >> STDIN.send('cl' 'ass')
<al2o3cr> workmad3: [IO]
<aempirei> whats the best memoization technique or LRU datastructure in ruby right now?
<jrajav> I need to go anyway
<jrajav> So please be sensible
<jrajav> :P
<shevy> sure sure
<shevy> BYE jrajav
<banisterfiend> jrajav: we're going to hack the bot and find all your porns
idoru has quit [Ping timeout: 600 seconds]
<workmad3> jrajav: bet you're wishing you'd chrooted the bot now? ;)
<fowl> >> Dir[?*].join(' ')
<al2o3cr> fowl: ["NameError: uninitialized constant Dir"]
<banisterfiend> well that's my plan anyway..
<shevy> >> $stdin.gets.chomp
<al2o3cr> shevy: ["NoMethodError: private method `gets' called for \"Nice try, Mon_Ouie\":String"]
<fowl> >> instance_methods
<al2o3cr> fowl: ["NameError: undefined local variable or method `instance_methods' for main:Object"]
<shevy> lol
<kyrylo> >> p `whoami`
<al2o3cr> kyrylo: ... Wha?
<fowl> >> methods
<jrajav> workmad3: It technically is "chrooted", it's all running in a linux vm
<jrajav> workmad3: And I don't care about that
fbernier has quit [Ping timeout: 252 seconds]
<workmad3> jrajav: cool :)
<shevy> >> require 'pp'
<al2o3cr> shevy: ["NameError: undefined local variable or method `require' for main:Object"]
<jrajav> So if you really want to bring down my vm and cause me an hour of work
<jrajav> Go ahead
<shevy> hmmm
crankycoder has quit [Remote host closed the connection]
<kyrylo> >> load 'pp'
<al2o3cr> kyrylo: ["NameError: undefined local variable or method `load' for main:Object"]
<shevy> is there a way to add require-like functionality somehow?
<workmad3> jrajav: that sounds like a challenge!!!
<jrajav> shevy: That's a good question; the answer is probably not
<shevy> :(
<shevy> go away jrajav
<shevy> :)
<jrajav> Yup bye
<shevy> shame we can't use fileutils
<fowl> >> methods.map { |m| eval "undef #{m}" }.size
<al2o3cr> fowl: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Mon_Ouie> jrajav: I suggest you hide Object#class and Class#superclass (and related) altogether
<workmad3> >> STDIN.send('cl''ass')
<al2o3cr> workmad3: [IO]
<fowl> ez
<shevy> noooo Mon_Ouie don't give him hints! :(
<jrajav> Mon_Ouie: Thanks, I'll put that on the todo list
<shevy> noooooooooo
<robert_> shevy, workmad3: I'm looking to transform something like "_Z12MyModuleName10MethodCallE" into something like, [{ :type => :ClassNameIdentifier, :id => :MyModuleName }, { :type => :MethodIdentifier, :id => :MethodCall }]
jrajav has quit [Quit: The best darkness is strange and surprising]
kyrylo has left #ruby ["WeeChat 0.3.8"]
<shevy> ewww
<shevy> that's an ugly name
ryh has quit [Remote host closed the connection]
<shevy> ok so it is some code you use
<workmad3> robert_: ah, you kind of want to undo an exported, mangled symbol
<Mon_Ouie> Simple example of how to ge access to Object:
<Mon_Ouie> >> send("cl" "ass")
<al2o3cr> Mon_Ouie: [Object]
<workmad3> >> __send__('cl' 'ass')
<al2o3cr> workmad3: [Object]
<workmad3> >> __send__('require','pp')
<al2o3cr> workmad3: ["NameError: undefined local variable or method `require' for main:Object"]
<robert_> workmad3: yeah. I picked C++ because it serves both my requirements; I can check to see if it's valid (because it demangles) and I can extract information from it.
<fowl> >> def method_missing(*) "<>< "*80 end
<al2o3cr> fowl: []
<workmad3> robert_: bear in mind that name mangling is not consistent across compilers
<robert_> yeah, I actually don't care about that; I'm just borrowing the format for something.
johnlcox has quit [Ping timeout: 248 seconds]
<workmad3> robert_: right, well you'll need to make some assumptions about format then
<robert_> so in essence, it will ALWAYS be in that format
<robert_> yeah
<cantonic> hmm… i need to run a specific task for 50 000 records in my database. each one takes around 10 seconds… what is the best way to run multiple threads of that task at the same time? else it would take tooo long
<robert_> I'm just not sure where to start.
<workmad3> robert_: well, start by pulling it apart
<robert_> oh, so don't try to parse it as I pull it apart
<fowl> >> ksfdj
al2o3cr has quit [Excess Flood]
<aempirei> whats the best memoization technique or LRU datastructure in ruby right now?
<robert_> parse it later?
mramaizng has joined #ruby
<workmad3> robert_: I'd do it that way, yeah
al2o3cr has joined #ruby
<robert_> alrighty.
<workmad3> robert_: keeps the concerns separate and simpler ;)
<robert_> yeah. :p
<workmad3> robert_: and also means you can check if the entire thing is valid before attempting to do stuff with it
khakimov has quit [Quit: Computer has gone to sleep.]
<robert_> yeah
nwest has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
sdwrage has joined #ruby
<workmad3> robert_: I'd not have called that encoding/decoding a string btw :)
w400z_ has joined #ruby
<robert_> yeah, probably wrong choice of description
Jackneill has quit [Quit: Jackneill]
<robert_> but I think of it as encoding a string. :p
<workmad3> robert_: it's basically a custom serialisation of some details
yakko has joined #ruby
w400z has quit [Read error: Connection reset by peer]
<robert_> True. That's probably a better way to put it.:D
phantasm66 has quit [Quit: *sleeeeep*]
phantasm66 has joined #ruby
phantasm66 has quit [Client Quit]
davidcelis has quit [Ping timeout: 248 seconds]
headius has quit [Quit: headius]
tfitts has joined #ruby
sebastorama has quit [Quit: Computer has gone to sleep.]
thone_ has quit [Ping timeout: 240 seconds]
bluOxigen has quit [Ping timeout: 246 seconds]
strife25 has quit [Quit: Computer has gone to sleep.]
thone has joined #ruby
davidcelis has joined #ruby
vaks has joined #ruby
tewecske has quit [Ping timeout: 248 seconds]
counterbeing has joined #ruby
<rcassidy> >> p "!syug eyb".reverse
<al2o3cr> rcassidy: ["bye guys!"]
rcassidy has quit [Quit: leaving]
und3f has quit [Quit: Leaving.]
cj3kim has joined #ruby
fettx has joined #ruby
swankier has left #ruby ["Leaving"]
<davidcelis> >> NotClass
<al2o3cr> davidcelis: ["NameError: uninitialized constant NotClass"]
<davidcelis> >> class NotClass; end;
<al2o3cr> davidcelis: [nil]
<davidcelis> >> NotClass
<al2o3cr> davidcelis: ["NameError: uninitialized constant NotClass"]
<davidcelis> >> NotClass = Class.new(BasicObject)
<al2o3cr> davidcelis: [#<Class:0x00000001b40f90>]
<davidcelis> >> NotClass
<al2o3cr> davidcelis: ["NameError: uninitialized constant NotClass"]
<davidcelis> >> ಠ_ಠ
<al2o3cr> davidcelis: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<Mon_Ouie> It creates a new process every time
<davidcelis> seriously!?
meskyanichi has quit [Quit: Linkinus - http://linkinus.com]
<Mon_Ouie> Yeah. The bot itself is written in JS from what I understand.
<davidcelis> >> def hi() loop { fork { hi } } end; hi
<al2o3cr> davidcelis: ["NameError: undefined local variable or method `fork' for main:Object"]
<davidcelis> :(
<davidcelis> >> Thread
<al2o3cr> davidcelis: ["NameError: uninitialized constant Thread"]
<Mon_Ouie> It's pretty safe. In the current version, the only real flaw I found is that you can get a reference to IO.
Husel has quit [Quit: Page closed]
<davidcelis> >> IO
<al2o3cr> davidcelis: ["NameError: uninitialized constant IO"]
<davidcelis> some other way i'm guessing haha
bglusman has joined #ruby
<davidcelis> >> Module
<al2o3cr> davidcelis: [Module]
<Mon_Ouie> >> STDIN.send("cl" "ass")
<al2o3cr> Mon_Ouie: [IO]
iamjarvo has joined #ruby
<davidcelis> lol
`brendan has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
<davidcelis> >> Kernel.panic!
<al2o3cr> davidcelis: ["NoMethodError: undefined method `panic!' for Kernel:Module"]
fettx has left #ruby [#ruby]
smw_work has joined #ruby
phinfonet has quit [Quit: Leaving...]
chson has quit [Remote host closed the connection]
davidpk_ has joined #ruby
bglusman has quit [Ping timeout: 245 seconds]
davidpk_ is now known as Bee
[Neurotic] has joined #ruby
xorigin has quit [Quit: leaving]
jrist is now known as jrist-afk
balki_ has quit [Read error: Connection reset by peer]
alanp has quit [Read error: Connection reset by peer]
atmosx has joined #ruby
SeanLazer has joined #ruby
internet_user has quit [Remote host closed the connection]
balki has joined #ruby
alanp has joined #ruby
krzkrzkrz has joined #ruby
nicoulaj has quit [Remote host closed the connection]
Bee has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
krzkrzkrz_ has joined #ruby
<workmad3> >> IO = STDIN.send("cl" "ass")
<al2o3cr> workmad3: [IO]
<workmad3> >> IO
<al2o3cr> workmad3: ["NameError: uninitialized constant IO"]
alindeman has quit [Read error: Operation timed out]
krz has quit [Ping timeout: 244 seconds]
krzkrzkrz_ is now known as krz
bbttxu has quit [Quit: bbttxu]
krzkrzkrz has quit [Ping timeout: 248 seconds]
jgarvey has quit [Quit: Leaving]
phinfonet has joined #ruby
Supaku has quit [Quit: Leaving.]
vaks has quit [Ping timeout: 240 seconds]
SeanLazer has quit [Quit: SeanLazer]
awarner has quit [Remote host closed the connection]
Synthead has quit [Quit: p33 ba115]
sebastorama has joined #ruby
<RubyPanther> does anybody know of any documentation discussing extconf.rb differences in 2.0?
alindeman has joined #ruby
levieraf has quit [Remote host closed the connection]
<scant> how do i filter everything from a string except for anything that matches a regex?
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
mramaizng has left #ruby [#ruby]
mramaizng has joined #ruby
cj3kim has quit [Quit: This computer has gone to sleep]
moshee has quit [Ping timeout: 248 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
TorpedoSkyline has quit [Quit: Computer has gone to sleep.]
erichmenge has quit [Quit: Be back later]
<virunga> scant: if you do a scan it returns an array of matches
erichmenge has joined #ruby
sevvie has joined #ruby
dhruvasagar has quit [Ping timeout: 246 seconds]
vlad_starkov has joined #ruby
dhruvasagar has joined #ruby
stopbit has quit [Quit: Leaving]
<scant> perfect thanks
alindeman has quit [Ping timeout: 240 seconds]
KindTwo has joined #ruby
asobrasil has left #ruby [#ruby]
erichmenge has quit [Client Quit]
SeanLazer has joined #ruby
banseljaj is now known as imami|afk
joshman_ has quit [Quit: Computer has gone to sleep.]
atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
<apeiros_> scant: if you want a string back, also look at gsub/gsub!
alindeman has joined #ruby
darkc0met has joined #ruby
<voodoofish430> is there a to_byte method for characters so I can convert a char to a byte value?
<otters> ord?
dv310p3r has quit [Ping timeout: 252 seconds]
<voodoofish430> no, fails on certain characters
SeanLazer has quit [Quit: SeanLazer]
<otters> >> STDIN.send("cl" + "ass")
<al2o3cr> otters: [IO]
<voodoofish430> I need it to be convert the whole range of 0-256
<otters> >> STDIN.send("cl" + "ass").popen("uname -a"){|f|f.read}
<al2o3cr> otters: ["SecurityError: Insecure operation `popen' at level 2"]
<otters> lol
delinquentme has joined #ruby
<virunga> voodoofish: yes there is.
<banisterfiend> >> ARGV
<al2o3cr> banisterfiend: [[]]
<otters> >> STDIN.send("cl" + "ass").send("po" + "pen", "uname -a"){|f|f.read}
<al2o3cr> otters: ["SecurityError: Insecure operation `popen' at level 2"]
verto is now known as verto|off
tcopp has joined #ruby
<voodoofish430> virunga: and it is what?
tommyvyo has quit [Quit: http://twitter.com/tommyvyo]
<virunga> voodoofish: bytes
tcopp has left #ruby [#ruby]
tcopp has joined #ruby
arietis has quit [Quit: Textual IRC Client: http://www.textualapp.com/]
the_jeebster has quit [Quit: Leaving.]
<voodoofish430> yeah, I tried that, but it doesn't return the value.
ennui has quit [Ping timeout: 240 seconds]
<voodoofish430> or at least I wasn't getting it to work as I would have expected.
erichmenge has joined #ruby
<delinquentme> is something like wrest a better option for authenticated JSON APIs than nokogiri?
<voodoofish430> not sure what I can do with an enum.
cpruitt has quit [Quit: cpruitt]
<virunga> voodoofish: do you want each symbol of the string converted in byte?
verto|off is now known as verto
justsee has joined #ruby
tcopp has left #ruby [#ruby]
jorge has quit [Remote host closed the connection]
<voodoofish430> I want the decimal value of each char.
<voodoofish430> if the char is A, I want 65
w400z_ has quit [Quit: Computer has gone to sleep.]
<virunga> >> a = []; "Ruby".each_char { |c| a << c.to_i }
<al2o3cr> virunga: [[0, 0, 0, 0], "Ruby"]
<workmad3> voodoofish430: "a".ord
<workmad3> >> "Ruby".each_char.map {|c| c.ord }
<al2o3cr> workmad3: [[82, 117, 98, 121]]
<voodoofish430> will that work with backspace as well?
<workmad3> should do
<workmad3> just hard to demonstrate a non-printable character here :)
jorge has joined #ruby
<voodoofish430> hmmm...okay.
<shevy> I HATE YOU ALL!!!!
<shevy> oops
<shevy> wrong channel
phinfonet has quit [Remote host closed the connection]
<workmad3> it's hard to demonstrate backspace in particular, as it's frequently interpreted by whatever is processing the input...
wallerdev has quit [Quit: wallerdev]
<workmad3> shevy: yeah... I don't believe you :P
eywu has joined #ruby
eywu has quit [Client Quit]
<shevy> hehe
<voodoofish430> workmad3: well, for a little context, I'm pulling data from uProc basically adc readings and sending it serially. I'm sending that as chars and having ruby read this serial data(via ruby serial gem) and saving it to a file. That file I then parse, but I run into issues when hitting the backspace char...and other chars I think...so I've been using the bytes method, but that became a problem as I had other stuff that was processing the data after
chichou has joined #ruby
<workmad3> voodoofish430: yeah... just send bytes
<voodoofish430> so yeah....thats what I was trying to do....and ord worked great for a while...
chrxn_ has joined #ruby
<voodoofish430> I only have the option to send chars, technically they are bytes....just depends on how they are interpreted I guess...
SQLStud has quit [Read error: Connection reset by peer]
kpshek has quit []
cakehero has quit [Quit: Leaving...]
KindTwo has quit [Changing host]
KindTwo has joined #ruby
KindTwo is now known as KindOne
SCommette has quit [Quit: SCommette]
uris has quit [Quit: leaving]
justsee is now known as justsee|away
piotr_ has quit [Ping timeout: 252 seconds]
justsee|away is now known as justsee
chrxn_ has quit [Ping timeout: 244 seconds]
nari has joined #ruby
emmanuelux has joined #ruby
darren has joined #ruby
lledet has quit [Quit: lledet]
<otters> >> "Ruby".bytes
<al2o3cr> otters: [#<Enumerator: "Ruby":bytes>]
<otters> >> "ಠ_ಠ".bytes
<al2o3cr> otters: The Ruby interpreter exited with a nonzero status. Hanmac is probably to blame.
<otters> aw
phinfonet has joined #ruby
<Petit_Dejeuner> >> "Ruby".bytes.to_a
<al2o3cr> Petit_Dejeuner: [[82, 117, 98, 121]]
<otters> That looks like a nested array, but it isn't.
<Petit_Dejeuner> >> begin; 2 + "2"; rescue; retry; end;
<Petit_Dejeuner> >> "Ruby".bytes.to_a
<al2o3cr> Petit_Dejeuner: [[82, 117, 98, 121]]
<Petit_Dejeuner> >> begin; 2 + "2"; rescue; redo; end;
<voodoofish430> if I had the file available, I'd post it for you guys to see.
<voodoofish430> though I have some stuff I can try at least
<Petit_Dejeuner> >> begin; 2 + "2"; rescue Exception; redo; end;
jorge has quit [Remote host closed the connection]
<Petit_Dejeuner> >> $stdin
<al2o3cr> Petit_Dejeuner: ["Nice try, Mon_Ouie"]
<Petit_Dejeuner> >> $stdout
<al2o3cr> Petit_Dejeuner: nil
<Muz> >> $_
<al2o3cr> Muz: [nil]
jorge has joined #ruby
<Petit_Dejeuner> >> $".each {|item| puts item}
<otters> >> set_trace_func
Foxandxss has quit [Read error: Connection reset by peer]
<al2o3cr> otters: ["NameError: undefined local variable or method `set_trace_func' for main:Object"]
<otters> ffs
<otters> >> __send__(:set_trace_func)
<al2o3cr> otters: ["NameError: undefined local variable or method `set_trace_func' for main:Object"]
<Muz> >> puts `uptime`
<al2o3cr> Muz: ... Wha?
<otters> >> `uptime`
<al2o3cr> otters: ... Wha?
<otters> :|
<Petit_Dejeuner> >> __send__($__FILE__, :$stdout)
<al2o3cr> Petit_Dejeuner: nil
<otters> >> __FILE__
<al2o3cr> otters: ["sandrbox"]
Foxandxss has joined #ruby
<otters> lawl
<Petit_Dejeuner> otters?
<otters> yes?
<Petit_Dejeuner> oh, nm
<otters> >> __LINE__
<al2o3cr> otters: [1]
<otters> >> __LINE__
<al2o3cr> otters: [1]
<otters> wow!
<otters> that is one compact bot
<Petit_Dejeuner> thought that was part of the response
<Petit_Dejeuner> otters, I really need to read about the Ruby enviorment...
bradhe has quit [Ping timeout: 248 seconds]
ken_barber has quit [Remote host closed the connection]
CannedCorn has joined #ruby
tbrock has joined #ruby
<otters> that's weird, you can't assign to __FILE__
<otters> or __LINE__
<fowl> >> $_
<al2o3cr> fowl: [nil]
<otters> >> $/
<al2o3cr> otters: ["\n"]
<otters> >> $'
<fowl> >> $VERBOSE
<al2o3cr> fowl: [false]
<al2o3cr> otters: [nil]
<Petit_Dejeuner> >> $:
<fowl> >> $VERBOSE = true
<al2o3cr> fowl: [true]
<fowl> >> $VERBOSE
<al2o3cr> fowl: [false]
<fowl> you dick.
<otters> >> sleep 10
<Spooner> I think this has turned into the al2o3cr channel. Didn't it used to be #ruby?
<al2o3cr> otters: ["Timeout::Error: execution expired"]
samrose has quit [Quit: Ex-Chat]
<fowl> >> $$
<al2o3cr> fowl: ["SecurityError: Insecure operation at level 2"]
<Petit_Dejeuner> Spooner, you're just jealous
CannedCorn has quit [Client Quit]
tbrock has quit [Client Quit]
<Spooner> Why doesn't anyone want to hang out in the #spooner channel; that is what I want to know!
<Petit_Dejeuner> Spooner, perhaps because nobody, including you, is in there
SuperSonicSound has joined #ruby
<Spooner> Petit_Dejeuner: I just don't go there so I don't get disappointed.
<fowl> dont come in there now we're having a private party
cjs226 has joined #ruby
tiripamwe has quit [Ping timeout: 255 seconds]
axl_ has quit [Quit: axl_]
bradhe has joined #ruby
g_rotbart has joined #ruby
flaviodesousa has joined #ruby
Guedes has joined #ruby
Guedes has quit [Changing host]
Guedes has joined #ruby
sailias has joined #ruby
mramaizng has quit [Quit: mramaizng]
nyuszika7h has joined #ruby
thedonvaughn has quit [Ping timeout: 252 seconds]
chson has joined #ruby
workmad3 has quit [Ping timeout: 246 seconds]
mengu has quit [Remote host closed the connection]
davidpk has quit [Quit: Computer has gone to sleep.]
kirun has quit [Quit: Client exiting]
Wizek has quit [Ping timeout: 246 seconds]
davidpk has joined #ruby
jorge has quit [Remote host closed the connection]
davidpk has quit [Client Quit]
strife25 has joined #ruby
<shevy> Spooner it sounds scary
<shevy> I'd have to watch my back
<shevy> I mean after all
<shevy> why are you called "spoon"er
tiripamwe has joined #ruby
dankest has joined #ruby
carloslopes has quit [Quit: Leaving.]
jjang has joined #ruby
Chryson has joined #ruby
teej_m has joined #ruby
<teej_m> Why is Array#uniq spelled that way?
<fowl> unique
<teej_m> why isn't it just Array#unique
<teej_m> (totally random, arbitrary question)
<teej_m> I'm wondering if there's some history behind it
<fowl> because if you see "uniq" you dont think it means a man with his genitals removed, you realize its short for unique
nateberkopec has quit [Quit: Leaving...]
<fowl> or was that eunic
banisterfiend has quit [Remote host closed the connection]
michaelmartinez has left #ruby [#ruby]
sgronblom has joined #ruby
nu7hatch has joined #ruby
<crazed> does ruby have a special method for classes that gets invoked when inherited?
mengu has joined #ruby
<davidcelis> self.inherited()
CoverSlide has quit [Read error: No route to host]
lledet has joined #ruby
<crazed> davidcelis: thanks
mengu has quit [Remote host closed the connection]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
infinitiguy has quit [Ping timeout: 246 seconds]
justsee is now known as justsee|away
jasonLaster has joined #ruby
seanstickle has joined #ruby
jimeh has joined #ruby
yakko has quit [Remote host closed the connection]
<crazed> here's one that i can't seem to crack, at least easily, i have a module (module Foo; extends Bar; end), how can i show the list of modules that Foo extends
denysonique has quit [Excess Flood]
hndsmrob has quit [Quit: Linkinus - http://linkinus.com]
<cirwin> crazed: Foo.ancestors
<crazed> cirwin: that doesn't seem to show what i want, i think that just works for class inheritence
jasonLaster has quit [Remote host closed the connection]
teej_m has quit [Quit: teej_m]
lledet has quit [Quit: lledet]
Markvilla has quit [Quit: Markvilla]
<cirwin> oh, Foo.singleton_class.ancestors for extend
<cirwin> modules are included in the ancestor chain
jasonLaster has joined #ruby
relix has quit [Max SendQ exceeded]
<Banistergalaxy> Foo.singleton_class.included_modules
_marvin has quit [Max SendQ exceeded]
lectrick has quit [Max SendQ exceeded]
mikepack has quit [Remote host closed the connection]
[diecast] has quit [Ping timeout: 252 seconds]
<crazed> interesting
vlad_starkov has quit [Remote host closed the connection]
<crazed> seems like a strange place to hide that, but i'm sur eit makes sense some how
fflush has joined #ruby
anildigital_work has quit [Ping timeout: 244 seconds]
dkannan has quit [Ping timeout: 252 seconds]
<fowl> god damn metalclass
dotemacs has quit [Max SendQ exceeded]
tommyvyo has joined #ruby
moeSeth has quit [Max SendQ exceeded]
<fflush> salut
Progster has quit [Ping timeout: 248 seconds]
SeanTAllen has quit [Ping timeout: 240 seconds]
<Petit_Dejeuner> bonjour
verto is now known as verto|off
jasonLaster has quit [Ping timeout: 248 seconds]
kenichi has quit [Remote host closed the connection]
octarine has quit [Ping timeout: 265 seconds]
erichmenge has quit [Quit: Be back later]
dekz has quit [Ping timeout: 240 seconds]
sent-hil has joined #ruby
infinitiguy has joined #ruby
stnly has quit [Quit: leaving]
kaichanvong has quit [Max SendQ exceeded]
franckverrot has quit [Ping timeout: 244 seconds]
<fflush> Petit_Dejeuner: ca va?
moshee has quit [Ping timeout: 246 seconds]
moshee has joined #ruby
moshee has quit [Changing host]
moshee has joined #ruby
Banistergalaxy has quit [Ping timeout: 252 seconds]
notbrent has quit [Max SendQ exceeded]
baroquebobcat has quit [Quit: baroquebobcat]