<julian-delphiki>
so we're parsing this into verse, grouped by chapter and sub grouping
<Sicp>
yea, Matta F1 has some subheadings and for each subheading there are several verses
<julian-delphiki>
ok
entr0py__ has left #ruby [#ruby]
entr0py__ has joined #ruby
<julian-delphiki>
and those sub headings are what you call "grouping"
backjlack has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
<Sicp>
sections_names is where the subheadings are, but they are also where Matta F1 the chapter name was extracted from because upon reading what books.open did, I saw that all headings were an array of nil, SOMETHING, nil and that all verses were an array of SOMETHING,SOMETHING,nil
mootpointer has joined #ruby
* julian-delphiki
thinks there has to be a better way to parse this
<Sicp>
relying on that to figure out which is a Chapter name, Subheading and verse
<julian-delphiki>
yeah
ephemerian has quit [Quit: Leaving.]
ph^ has quit [Ping timeout: 256 seconds]
pitzips has joined #ruby
<julian-delphiki>
where did you get this excel from?
tantalum has left #ruby [#ruby]
Xeago_ has quit [Remote host closed the connection]
<Sicp>
what's it matter? guy who wants the project
<julian-delphiki>
just cuz i was wondering if theres a better source :P
* julian-delphiki
is just trying to find a better way to store the data.
generalissimo has joined #ruby
<Sicp>
of course that's something to consider
lolzie has joined #ruby
freakazoid0223 has quit [Read error: Connection reset by peer]
<Sicp>
but this is only a 1-time thing, later that DB will be fed to somewhere else and that's that for the DB
i_s has quit [Quit: i_s]
willob has quit [Quit: Leaving.]
mosez has joined #ruby
freakazoid0223 has joined #ruby
<Sicp>
won't be used after it's been stored correctly
willob has joined #ruby
<Sicp>
correctly meaning getting that loop to understand that this subheading has THOSE verses
<lectrick_>
banister`sleep: works. ty :)
<banister`sleep>
lectrick_: you might need to add private_instance_methods(false) + public_instance_methods(false) + protected_instance_methods(false)
<banister`sleep>
as the full list
gabrielrotbart has quit [Read error: Connection reset by peer]
daniel_- has joined #ruby
lewix has quit [Remote host closed the connection]
jetblack has quit [Ping timeout: 240 seconds]
breadtk has quit [Ping timeout: 240 seconds]
gabrielrotbart has joined #ruby
agarie has joined #ruby
<lolzie>
Hey guys. I have a string which may be like this: "a", "a b c" or "a b c #d e". I wish to reduce them to their individual words, but in the last case, I wish to reduce it to ["a", "b", "c", "d e"]
<lolzie>
How could I best go about doing that? I tried Regexp at first but it's failing, and I suspect the necessary complexity for it would make it a less than preferable solution
breadtk has joined #ruby
SCommette has quit [Quit: SCommette]
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<lolzie>
(i.e., the element (if split by space) beginning with # should be merged in a single string with all successors)
hogeo has joined #ruby
axl_ has quit [Quit: axl_]
wyhaines has quit [Remote host closed the connection]
jdunck has quit [Quit: Computer has gone to sleep.]
<bean>
imo Sicp you were trying too hard w/ all the processing :P
freeayu has quit [Ping timeout: 245 seconds]
rasbonics has joined #ruby
dzhulk has quit [Quit: Leaving.]
bubblehead has joined #ruby
predator117 has quit [Ping timeout: 255 seconds]
jon_w has joined #ruby
<lolzie>
bakingbread: that seems to be correct :) I just finished a little solution of my own
Tricon has quit [Quit: Leaving...]
<jon_w>
if notice || alert || flash[:error]
pioz has joined #ruby
<jon_w>
s it possible to map which one of those values returned true?
<jon_w>
and use it?
<jon_w>
say if "notice" is not nil use the value that notice holds?
<bakingbread>
jon_w: ??
<lolzie>
>> a = "a b :c d".split(" "); join_index = a.index { |x| /^:/.match(x) }; if join_index; a = a[0...join_index] + [a[join_index..-1].join(" ")]; end; a
<lolzie>
bakingbread: isn't that what I've done? join_index = a.index { ... }
<jon_w>
bean: thx for now :D
mercwithamouth has quit [Ping timeout: 256 seconds]
<bakingbread>
lolzie: no... `sett join_index = a.index { |x| /^:/.match(x) }` just can be substituted with `join_index = a.find_index ?:
Tricon has joined #ruby
<lolzie>
bakingbread: maybe I'm taking you too literally but that didn't seem to work for me
bigoldrock has quit [Ping timeout: 245 seconds]
mercwithamouth has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
<bakingbread>
lolzie: yes, one more change should be made then
<bakingbread>
lolzie: nevermind
kornnflake has quit [Read error: Operation timed out]
hmarr has joined #ruby
kofno has joined #ruby
tewlz_ has quit [Quit: leaving]
jjbohn has joined #ruby
marr has quit []
mediko_ has quit [Ping timeout: 255 seconds]
entr0py__ has quit [Remote host closed the connection]
marwinism has quit [Ping timeout: 245 seconds]
nari has joined #ruby
LennyLin_ has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 256 seconds]
s00pcan has quit [Remote host closed the connection]
atno has quit [Read error: No route to host]
neurone-1337 has quit [Ping timeout: 248 seconds]
bradleyprice has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
girija has joined #ruby
atno has joined #ruby
pencilcheck has joined #ruby
bradleyprice has joined #ruby
pen has quit [Ping timeout: 240 seconds]
terrorpup has quit [Remote host closed the connection]
reppard has joined #ruby
brian_000_ has joined #ruby
<reppard>
is there a way to stop std/gets from printing to stdout automatically?
Sicp has quit [Ping timeout: 246 seconds]
<reppard>
stdin/gets that is
Voodoofish430 has quit [Quit: Leaving.]
etcetera has quit []
<bean>
reppard, do you mean like, for passwords to stop input/
icole has quit [Remote host closed the connection]
<bean>
from showing?
terrorpup has joined #ruby
nari has quit [Ping timeout: 248 seconds]
<reppard>
bean: sorta yeah, i'm working on my irc client and it works...using it right now. but everything i type, when i send the return character, gets posted to stdout
freeayu has joined #ruby
<reppard>
but i want to store it and print it myself, so it can be parsed and styled
<reppard>
so basically i see double of everything i input
robscomputer has quit [Remote host closed the connection]
daniel_- has quit [Ping timeout: 256 seconds]
yfeldblum has joined #ruby
Tricon has joined #ruby
<_br_>
If you guys would need to write your own tiny url service, what kind of tech stack would you use? (taking massive scalability into consideration)
whowantstolivefo has quit [Ping timeout: 245 seconds]
jetblack has joined #ruby
Chryson has quit [Ping timeout: 264 seconds]
gstudent2 has quit [Ping timeout: 248 seconds]
sduckett has joined #ruby
NewRubys has quit [Ping timeout: 264 seconds]
chico_chicote has quit [Remote host closed the connection]
<waxjar>
some in-memory database and maybe node.js
gstudent2 has joined #ruby
pioz has quit [Remote host closed the connection]
<_br_>
waxjar: Interesting choice, node.js for asynchronious operation I suppose.
<_br_>
would be equal to ruby eventmachine I guess
cobragoat has quit [Remote host closed the connection]
<Inside>
so.. what's everyone's recommended ruby book of choice?
<Inside>
I read through why's book, but now I want something with more substance
<waxjar>
i hear they're running javascript almost at C-speed now
<_br_>
waxjar: ah with asm.js I guess?
ckrailo has quit [Quit: Computer has gone to sleep.]
<waxjar>
yeah. not entirely sure what it's all about, but it sounds pretty impressive :p
<_br_>
Inside: if you know the basics I would strongly recommend to start reading into various code repositories to get a feeling for ruby
<Inside>
well I know the basics in the sense that I could get some real C++-esque ruby done
<_br_>
waxjar: true, very impressive if it keeps its promise :)
<_br_>
You wouldn't consider e.g. erlang for such a task?
xpen has joined #ruby
idkazuma has joined #ruby
wmoxam has quit [Read error: Connection reset by peer]
wmoxam has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
<waxjar>
maybe, i don't know enough about erlang,tbh
brian_000_ has quit [Quit: Leaving]
brianherman has quit [Quit: Leaving]
<_br_>
sure, stick with what you know is always important... thanks for the input waxjar
hashmal has quit [Quit: Computer has gone to sleep.]
<eval-in>
breakingthings => /tmp/execpad-5f46e2fbdba0/source-5f46e2fbdba0:2:in `<main>': undefined local variable or method `str' for main:Object (NameError) (http://eval.in/13771)
<waxjar>
you need parenthesis around the arguments
brhelwig has quit [Remote host closed the connection]
<waxjar>
oh, i was scrolled up :/
<breakingthings>
waxjar: yes we are aware of how to fix it
<breakingthings>
:d
<breakingthings>
I find it strange
gstudent2 has quit [Ping timeout: 248 seconds]
<end_guy>
eval-in....is a bot?
<breakingthings>
/late
<end_guy>
that's some awesome stuff right there.
<end_guy>
yes, /late
Targen has joined #ruby
dmerrick has joined #ruby
<end_guy>
anyone know if cURL has been patched against those arbitrary code execution sploits yet?
<end_guy>
guess I could just check their github
<waxjar>
because x && y takes three arguments could mean (x && y takes) three arguments or x && y takes(three arguments), etc :)
<XxBlakeFailxX>
Hey, I am having a thread locking issue and was wondering if anyone could take a look and see if they might be able to explain / see what is wrong. https://gist.github.com/xxblakefailxx/5242760
<eval-in>
breakingthings => /tmp/execpad-766e6444ca6f/source-766e6444ca6f:2:in `include?': no implicit conversion of true into String (TypeError) ... (http://eval.in/13774)
<breakingthings>
huuuuuuuh?
hamakn has joined #ruby
<bnagy>
&& binds tightly
* breakingthings
breaks ruby
<bnagy>
you could just go and actually read about this instead of spamming the channel
<eval-in>
end_guy => /tmp/execpad-32d75a06116e/source-32d75a06116e:3: void value expression (http://eval.in/13777)
<bnagy>
breakingthings: no it's not
<bnagy>
it's doing str.include? false
<TorpedoSkyline>
quick question: I have two strings that are going to be used again and again in a project and need to be accessible from everywhere in the program but I want them to be read only. Being new, I'm not sure if I should use a global variable or create and object to store this information and access it using attr_reader. Thoughts?
<breakingthings>
bnagy: How so?
<bnagy>
because first it does "something truthy" && false ( which is false )
<breakingthings>
oh, the second example
<breakingthings>
I meant the original example.
<end_guy>
looks like eval-in is forkbomb safe.
<bnagy>
TorpedoSkyline: nothing is ever completely read-only, tbh
slocate has quit [Remote host closed the connection]
<bnagy>
you can just make them CONSTANTS
voodoofish has joined #ruby
<bnagy>
if you want to go over the top you could freeze them
<lewix>
breakingthings: && takes precedence
<breakingthings>
lewix: Yes, I'm aware.
newUser1234 has joined #ruby
<breakingthings>
I just didn't realize that it was doing that.
<TorpedoSkyline>
bnagy how do you freeze them? Just curious. I guess this means I should use a CONSTANT, but are they global?
<bnagy>
TorpedoSkyline: freeze is just a method on String
<breakingthings>
I was not thinking about the fact that that precedence would cause it to rip through the method args
<waxjar>
the point it that ruby won't if z is an expression (?) or an argument if you do x && y z
<breakingthings>
yes, I understand
<TorpedoSkyline>
ah ok. and bnagy just to confirm what I'm thinking, constants are global in nature?
<waxjar>
*won't know
<breakingthings>
Again, I get it now, I just didn't realize that it was playing that way at first.
tylersmith has quit [Client Quit]
<bnagy>
TorpedoSkyline: constants have pretty liberal visibility rules, especially if you declare them toplevel
v0n has quit [Ping timeout: 252 seconds]
<bnagy>
they're not globals though
<bnagy>
but globals are wrong in every single use case ever
<TorpedoSkyline>
yes that's what I thought. =\
<TorpedoSkyline>
I'll give the constants a shot.
<end_guy>
bnagy: except $LOAD_PATH
<end_guy>
:D
<TorpedoSkyline>
thanks man and lol end_guy =P
<waxjar>
a namespaced constant should work fine
elux has quit [Quit: Bye!]
<TorpedoSkyline>
ah, thanks waxjar. That looks like exactly what I need to do. Namespaced constant.
wallerdev has joined #ruby
pkh has quit [Read error: Connection reset by peer]
mahmoudimus has quit [Quit: Computer has gone to sleep.]
ffranz has quit [Quit: Leaving]
beneggett has quit [Remote host closed the connection]
<Nom->
Anyone know of any debian packages with falcon / gc patches applied that I could build from? I'd like to incorporate those changes into my p392 build for production :)
goraxe has quit [Read error: Connection reset by peer]
goraxe has joined #ruby
goraxe has quit [Read error: Connection reset by peer]
twoism has quit [Ping timeout: 256 seconds]
goraxe has joined #ruby
TorpedoSkyline has quit [Quit: Don't follow me if you don't want hilarity and QUITing to ensue. Also, freelancing and iOS. @TorpedoSkyline]
averiso has quit [Quit: Computer has gone to sleep.]
yfeldblum has quit [Ping timeout: 256 seconds]
matayam has quit [Remote host closed the connection]
_veer has joined #ruby
_veer has joined #ruby
<end_guy>
Nom-: Try #debian or #ubuntu?
tay1 has joined #ruby
jamie_ca_ has joined #ruby
brhelwig has joined #ruby
momomomomo has joined #ruby
SCommette has quit [Quit: SCommette]
<Nom->
Very unlikely to get any help in there since I'm specifically after packaged ruby :)
<Nom->
All good... rolling my own
goraxe has quit [Read error: Network is unreachable]
<end_guy>
Nom-: Do you typically use RVM or compile from source for a production server?
<Nom->
Neither
<Nom->
I deploy from debian packages
<ddd>
rvm (until recently) was the same thing. though now it does binary installs (unless you set an rvmrc option)
<Nom->
But it's usually a recent version built from source
<end_guy>
oh, i see what you're doing
goraxe has joined #ruby
<Nom->
My production machines don't have compiler tools
<ddd>
I don't use pacakges like Nom-, I use RVM installations
<waxjar>
rvm on a server?
<ddd>
yep
<end_guy>
I've heard of this. I've even heard of people making debian packages for each deploy. Do you guys do that too?
<waxjar>
hm, just for simplicity?
<ddd>
when used with nginx + unicorn its easy to run multiple ruby versions per server. I don't like passenger
<X-Jester>
i repackage a sandboxed ruby rpm for my distros
<Nom->
Nope, I've gone with the following:
jonahR has quit [Quit: jonahR]
<end_guy>
waxjar: I'd have to say yes. RVM makes it easy to apply patches.
<ddd>
wayeah, pretty much
<Nom->
Build .debs for Ruby, Bundler, Rake and install
tomsthumb has joined #ruby
<ddd>
err waxjar even (sorry hit a wrong keyset)
<Nom->
Do everything else via bundle exec
<waxjar>
ah ok.
<ddd>
there's a slew of different ways to do things. none of them are really 'wrong'. unless your company has a set policy for how to do things of coure
<ddd>
err course
<Nom->
Well our main requirements are around not having compiler tools on production
<Nom->
That kind of restricts what you can do a fair bit and we have experience with debian packaging
<end_guy>
Nom-: deb packages for setting up a server and applying patches, and even deploys is something I've wanted to do. At work we just use chef to setup new servers and capistrano for deployments though. Here recently we've been migrating to heroku though.
<ddd>
even with rvm you can remove the compiler once you build any native gems you use. you don't really need it for the rubies since rvm can do binary installs (precompiled rubies)
gabrielrotbart has quit [Read error: Connection reset by peer]
tay1 has quit [Remote host closed the connection]
NewRubys has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
gabrielrotbart has joined #ruby
pitzips has quit [Quit: Leaving]
tay1 has joined #ruby
jurassic_ has quit [Quit: jurassic_]
hamakn has quit [Remote host closed the connection]
tay1 has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
<Nom->
I don't even install compiler tools for building native gems
<Nom->
I bundle on a developent machine (which has compiler tools) and identical configuration and deploy the app already bundled
dhruvasagar has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
<ddd>
how are you building them? prebuilding elsewhere then shipping over the gems?
tay1 has joined #ruby
<ddd>
hehe you answered before i asked. nice
brhelwig has quit [Ping timeout: 272 seconds]
tay1 has quit [Read error: Connection reset by peer]
jurassic_ has joined #ruby
tay1 has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
tay1 has quit [Read error: Connection reset by peer]
<ddd>
I totally understand the no-compiler stance. I don't know why I don't change my processes to do that, think its more a matter of being stuck in old ways of doing things
<ddd>
lewix: o/
tay1 has joined #ruby
yfeldblum has joined #ruby
jurassic_ has quit [Client Quit]
jgrevich has quit [Ping timeout: 240 seconds]
tay1 has quit [Read error: Connection reset by peer]
freeayu has quit [Ping timeout: 246 seconds]
<bnagy>
not sure I really see the point of no compiler
tay1 has joined #ruby
<ddd>
bnagy: keep people from dropping source on your boxes and compiling exploits there
<bnagy>
yeah but nobody does that anymore
<bnagy>
plus, you've got a fully functional HLL which can spit binary
tay1 has quit [Read error: Connection reset by peer]
goraxe has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
<bnagy>
might have made sense 25 years ago, but it's really only only to buy you a 5 second delay and a chuckle
bubblehead has quit [Remote host closed the connection]
mikurubeam has joined #ruby
<ddd>
not true. most of the larger botnets do check for locally installed compiler sets and then use the machines as factories
<bnagy>
"Oh how cute, they have no compiler"
hamakn has joined #ruby
<ddd>
heh
tay1 has quit [Read error: Connection reset by peer]
ckrailo_ has joined #ruby
etcetera has quit []
tay1 has joined #ruby
goraxe has joined #ruby
jgrevich has joined #ruby
<Nom->
Yeah... it might be an antiquated practice in this day and age, but it's still our policy. If nothing else it encourages staff to not do things the lazy way and do local builds
<Nom->
If you're forced to make a .deb, you've at least got half a chance of having the same version installed on everything
pcarrier_ has quit [Quit: Computer has gone to sleep.]
peteyg_ has quit [Ping timeout: 245 seconds]
<bnagy>
fair point
willbrad1ey is now known as willbradley
willbradley has quit [Changing host]
willbradley has joined #ruby
freeayu has joined #ruby
<ddd>
well that sucks. Paypal Here app is incompatible with my phone. Hate the way Android OS is so fragmented. works with this or that phone but not that or this one.. sheesh
thinkclay has quit [Quit: Leaving.]
<Nom->
We're pretty new to Ruby too... last thing I want is for 20 different versions to be installed
nfk has quit [Quit: yawn]
<Nom->
That's just a recipe for disaster... want consistency from day one as much as practical :)
hamakn has quit [Remote host closed the connection]
mattbl has quit [Quit: Leaving]
mattbl has joined #ruby
jon_w has quit [Quit: Page closed]
andy753421-away is now known as andy753421
<ddd>
Nom-: also depends on if you have like rails 2.3 + ruby 1.8.7 legacy apps, rails 3.x + ruby 1.9.2, and say ramaze + ruby 1.9.3 apps etc.
jbueza has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<ddd>
for shops where they;re working with single framework + specific ruby, sure, its probably not a real option / need to run rvm or multiple rubies on a machine
cgore has joined #ruby
IrishGringo has quit [Ping timeout: 272 seconds]
<XxBlakeFailxX>
Anyone know why calling a Thread.join, would cause the server to stall?
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
<bnagy>
depends what the Thread you're joining does, and what you mean by 'stall'
<bnagy>
basically join says 'wait until this Thread is done'
jjbohn has joined #ruby
kofno has joined #ruby
<XxBlakeFailxX>
So I guess my question is what is the default behavior when you don't use join. So what the thread is doing is receiving a block that just runs an Eval()
<XxBlakeFailxX>
If I don't use any thread methods to try and close it up like join, it returns the eval, if I try to use thread.join thread.exit or anything the server just sorta hangs and says it is blocked and I end up just having to kill the server.
<bnagy>
if you don't join a Thread it will just keep doing whatever it's doing
neurone-1337 has joined #ruby
danneu has quit [Quit: WeeChat 0.3.8]
<XxBlakeFailxX>
So with what I understand, all the current thread should be handling the block passed in. I get the result from the block passed in when it just keeps going about it's way, is it like a timeout that is happening because of the suspend?
<bnagy>
so if you start a Thread and the main program comes to an end, then it will go ahead and exit, and kill your happy little background thread
jjbohn has quit [Quit: Leaving...]
<bnagy>
I would recommend reading one of the existing threadpool libs
Akuma has joined #ruby
jgrevich has quit [Ping timeout: 252 seconds]
<Nom->
If you're using a thread to do 'worker' type roles, I would suggest you use one of the several gems out there to manage it
<XxBlakeFailxX>
Any threadpool lib you suggest?
<bnagy>
parallel is written quite nicely
vlad_starkov has quit [Remote host closed the connection]
<bnagy>
and I think someone recommended soe ara howard stuff to you yesterday - he writes older style code but it's extremely clear
ner0x has quit [Quit: Leaving]
<Nom->
It really depends on what you're doing
cobragoat has joined #ruby
<Nom->
Celluloid is really good for actor concurrency if that's what you need
<Nom->
If you really just want a background process, there's things to do that
MrZYX is now known as MrZYX|off
jgrevich has joined #ruby
<Nom->
You also need to consider whether using threads is appropriate for your workload... if it's heavily I/O bound it probably is, but if it's compute bound then threads are probably a bad idea
<bnagy>
JRuby! \o/
lewix has quit [Remote host closed the connection]
<Nom->
JRuby comes with it's own set of challenges :)
<bnagy>
lies
reset has quit [Ping timeout: 255 seconds]
kofno has quit [Ping timeout: 256 seconds]
tay1 has quit [Read error: Connection reset by peer]
superninkendo has joined #ruby
<havenwood>
fork, as the gods intended :P
d-snp has quit [Read error: Operation timed out]
<Nom->
I would know... I started out trying to push JRuby here but discovered there was a stack of bugs with Nokogiri which really threw a spanner in the works for me
<Nom->
So now we're using MRI
<bnagy>
hahaha
angusiguess has quit [Ping timeout: 246 seconds]
tay1 has joined #ruby
matayam has joined #ruby
d-snp has joined #ruby
Guedes0 has quit [Ping timeout: 245 seconds]
<Nom->
The startup time is really painful for development too :)
tay1 has quit [Read error: Connection reset by peer]
<bnagy>
pff
tay1 has joined #ruby
<havenwood>
Was checking out Trinidad web server on JRuby the other day, pretty impressive.
<havenwood>
<3 Rainbows::EventMachine on MRI though.
<Nom->
Yeah, I was using that in my prototypes
cobragoat has quit [Ping timeout: 256 seconds]
tay11 has joined #ruby
breakingthings has quit []
tay11 has quit [Read error: Connection reset by peer]
lewix has joined #ruby
tay11 has joined #ruby
tay11 has quit [Read error: Connection reset by peer]
tay11 has joined #ruby
Nisstyre-laptop has joined #ruby
<XxBlakeFailxX>
Mainly for learning purposes, I am trying to make something similar to CodeSchool, where you can evaluate the code that someone puts in.
<momomomomo>
cool
<momomomomo>
where are you stuck?
wallerdev has quit [Quit: wallerdev]
tay1 has quit [Ping timeout: 256 seconds]
<momomomomo>
oh, just scrolled up and saw your conversation :)
NewRubys has quit [Ping timeout: 248 seconds]
brianherman has quit [Quit: Leaving]
vjacob has joined #ruby
IceDragon has quit [Quit: Space~~~]
vjacob has left #ruby [#ruby]
Asher has joined #ruby
averiso has joined #ruby
hemanth has joined #ruby
Banistergalaxy has quit [Ping timeout: 256 seconds]
dhruvasagar has quit [Ping timeout: 252 seconds]
drale2k has quit [Quit: Leaving...]
j^2 has joined #ruby
drale2k has joined #ruby
ph^ has joined #ruby
tay11 has quit [Remote host closed the connection]
lapidary has quit [Quit: lapidary]
tay1 has joined #ruby
<XxBlakeFailxX>
I will spend some time looking over these libraries, thanks for the direction : )
emocakes has quit [Quit: emocakes]
tay1 has quit [Read error: Connection reset by peer]
jurassic_ has joined #ruby
tay1 has joined #ruby
IrishGringo has joined #ruby
j^2 has quit [Ping timeout: 240 seconds]
faulkner has quit [Quit: boo.]
mockra has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
faulkner has joined #ruby
etcetera has joined #ruby
ph^ has quit [Ping timeout: 272 seconds]
cobragoat has joined #ruby
rsampaio_ has joined #ruby
etcetera has quit [Client Quit]
newUser1234 has quit [Remote host closed the connection]
daniel_hinojosa has joined #ruby
Inside has quit [Ping timeout: 245 seconds]
daniel_hinojosa has quit [Client Quit]
mikurubeam has joined #ruby
mattbl has joined #ruby
Targen has quit [Ping timeout: 245 seconds]
Artheist has joined #ruby
browndawg has joined #ruby
macmartine has joined #ruby
ananthakumaran has joined #ruby
tay1 has quit [Remote host closed the connection]
tay1 has joined #ruby
macmartine has quit [Client Quit]
tay1 has quit [Read error: Connection reset by peer]
tay1 has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
tommyvyo has quit [Quit:]
tay1 has joined #ruby
tay1 has quit [Read error: Connection reset by peer]
keanehsiao has joined #ruby
superninkendo has quit [Quit: Leaving.]
thinkclay has joined #ruby
keanehsiao has quit [Client Quit]
icole has quit [Remote host closed the connection]
mediko has joined #ruby
Opettaja has joined #ruby
toekutr has quit [Remote host closed the connection]
matayam has quit [Remote host closed the connection]
<lewix>
XxBlakeFailxX: what framework are you going to use for it
twoism has joined #ruby
tommyvyo has joined #ruby
sayan has quit [Ping timeout: 272 seconds]
Domon has quit [Remote host closed the connection]
nga4 has joined #ruby
matayam has joined #ruby
lewix_ has joined #ruby
atno has quit [Read error: Connection reset by peer]
atno has joined #ruby
brhelwig has joined #ruby
lewix has quit [Ping timeout: 272 seconds]
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
brianherman has joined #ruby
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
uris has quit [Quit: Leaving]
radic has joined #ruby
<mercwithamouth>
any nokogiri experts around?
brianherman has quit [Read error: Connection reset by peer]
daniel_hinojosa has joined #ruby
twoism has quit [Ping timeout: 245 seconds]
radic_ has quit [Ping timeout: 276 seconds]
matayam has quit [Read error: Connection reset by peer]
matayam has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
momomomomo has quit [Quit: momomomomo]
danslo has quit [Quit: danslo]
ananthakumaran has quit [Quit: Leaving.]
marwinism has joined #ruby
kornnflake has joined #ruby
<Nom->
Define expert.
<Nom->
:)
<Nom->
I've used it enough to know how broken it is in JRuby :)
sayan has joined #ruby
arya_ has joined #ruby
baba has joined #ruby
stkowski has joined #ruby
browndawg has quit [Quit: Leaving.]
fire has quit [Ping timeout: 245 seconds]
thecreators has joined #ruby
marwinism has quit [Ping timeout: 264 seconds]
thinkclay has quit [Quit: Leaving.]
girija has joined #ruby
mahmoudimus has joined #ruby
sleetdrop has joined #ruby
pasties has quit [Ping timeout: 240 seconds]
aces1up has joined #ruby
<aces1up>
can someone help me with this bit of code?
matayam has quit [Remote host closed the connection]
stillEPIK has joined #ruby
danman has joined #ruby
mduvall has joined #ruby
EPIK has quit [Ping timeout: 256 seconds]
Domon has joined #ruby
JohnBat26 has joined #ruby
<aces1up>
yes it works, but was wondering if there is a more elegant way especially when i have random hash / array that is unknown.
kornnflake has quit [Ping timeout: 252 seconds]
browndawg has joined #ruby
SCommette has joined #ruby
BSaboia has quit [Read error: Connection reset by peer]
alanp has joined #ruby
kornnflake has joined #ruby
marwinism has joined #ruby
robscomputer has joined #ruby
<ddd>
random hash? random array? arrays are anything but random. they're ordered. so you should know what should be at a specific index. its why you'd use an array over a hash. whats random about your hash? will it not always have :username or :password?
<ddd>
don't think i understand the issue
mattbl has joined #ruby
mduvall has quit []
banjara has joined #ruby
robscomp_ has joined #ruby
robscomp_ has quit [Client Quit]
robscomp_ has joined #ruby
robscomp_ has quit [Client Quit]
robscomp_ has joined #ruby
daniel_hinojosa has quit [Read error: Connection reset by peer]
nomenkun has joined #ruby
yashshah has joined #ruby
robscomp_ has quit [Client Quit]
mattbl has quit [Client Quit]
robscomp_ has joined #ruby
robscomp_ has quit [Remote host closed the connection]
robscomputer has quit [Ping timeout: 246 seconds]
robscomputer has joined #ruby
marwinism has quit [Ping timeout: 240 seconds]
etcetera has joined #ruby
marwinism has joined #ruby
daniel_hinojosa has joined #ruby
tommyvyo has quit [Quit:]
etcetera has quit [Client Quit]
kornnflake has quit [Ping timeout: 245 seconds]
decoponio has joined #ruby
jurassic_ has quit [Quit: jurassic_]
ananthakumaran has joined #ruby
julian-delphiki has quit [Quit: Computer has gone to sleep.]
twoism has joined #ruby
Loaft has joined #ruby
ckrailo_ has quit [Quit: Computer has gone to sleep.]
V8Energy has quit [Ping timeout: 256 seconds]
mattbl has joined #ruby
kornnflake has joined #ruby
faulkner has quit [Quit: boo.]
dhruvasagar has joined #ruby
marwinism has quit [Ping timeout: 240 seconds]
mockra has joined #ruby
jurassic_ has joined #ruby
marwinism has joined #ruby
danman has quit [Quit: danman]
ckrailo has quit [Quit: Computer has gone to sleep.]
newUser1234 has joined #ruby
<mercwithamouth>
Nom-: sorry i didn't see your reply. So funny you said that...i'm actually using jruby =(
yfeldblum has quit [Ping timeout: 272 seconds]
<mercwithamouth>
do tell...
yshh_ has joined #ruby
yshh has quit [Read error: Connection reset by peer]
twoism has quit [Remote host closed the connection]
<mercwithamouth>
i originally was going to use feedzirra...which is..dun dun dun. broken in jruby. I thought nokogiri was safe
twoism has joined #ruby
shock_one has joined #ruby
mockra has quit [Ping timeout: 256 seconds]
marwinism has quit [Ping timeout: 248 seconds]
agarie_ has joined #ruby
faulkner has joined #ruby
brhelwig has quit [Remote host closed the connection]
brhelwig has joined #ruby
twoism has quit [Ping timeout: 252 seconds]
emocakes has joined #ruby
g4mm4 has quit [Remote host closed the connection]
<kosine>
so this is where i ask questions about ruby?
<havenwood>
kosine: good place for that!
yashshah has joined #ruby
yshh_ has quit [Remote host closed the connection]
SCommette has quit [Quit: SCommette]
g4mm4 has quit [Read error: Connection reset by peer]
marwinism has joined #ruby
g4mm4 has joined #ruby
<Nom->
mercwithamouth: There's a stack of documented bugs around canonicalization and parsing in JRuby
<Nom->
I even lodged some of them and they haven't been touched yet
Kirotan has quit [Ping timeout: 256 seconds]
markalanevans has quit [Ping timeout: 245 seconds]
<Nom->
The two main issues where around canonicalization and parsing of DTD's within an XML file completely breaking
<mercwithamouth>
hmm
<mercwithamouth>
well damn. i'm debating on going back to standard ruby...
Loaft has quit [Ping timeout: 248 seconds]
<mercwithamouth>
i planned on using celluloid as well so jruby seemed awesome there
<mercwithamouth>
i'm also using puma.
jurassic_ has joined #ruby
<Nom->
Celluloid works on MRI too, but it's only useful with I/O bound tasks
<Nom->
You could always live dangerous and go with rbx :)
<mercwithamouth>
my original goal was to use it to grab/work with multiple feeds at once...as well as some recommendation stuff in the far far future maybe
<mercwithamouth>
lol...it would appear i'm living dangerously with jruby
shock_one has quit [Ping timeout: 256 seconds]
<havenwood>
mercwithamouth: Celluloid::IO works very well with MRI. Unicorn is a great web server too.
<mercwithamouth>
i haven't had any issues yet though feedrizza seems like it would make dealing with multiple rss feeds easier
<mercwithamouth>
havenwood: i may just make that change today then...
<Nom->
Pulling RSS feeds is largely I/O bound
<Nom->
So you would probably be fine threading that in MRI
<mercwithamouth>
Nom-: i'll give it a whirl
Loaft has joined #ruby
<havenwood>
mercwithamouth: If you unicorn on 2.0.0, enable `preload_app true` for reduced memory usage with 2.0.0's CoW-friendly GC. :D
marwinism has quit [Ping timeout: 240 seconds]
<mercwithamouth>
havenwood: thanks..making a note of that right now
emocakes has quit [Ping timeout: 246 seconds]
EPIK has joined #ruby
drale2k has quit [Quit: Leaving...]
<havenwood>
Unicorn behind Nginx is a glorious UNIX sight to behold.
shevy has joined #ruby
<mercwithamouth>
i'm making a personal rss reader...TECHNICALLY the feeds should follow a standard/naming convention, no?
marwinism has joined #ruby
<mercwithamouth>
good to know. nginx is the only thing i've deployed so far
stillEPIK has quit [Ping timeout: 256 seconds]
matayam has joined #ruby
marwinism has quit [Ping timeout: 245 seconds]
noop has joined #ruby
<mercwithamouth>
so, honestly i have no experience dealing with threads. i imagined being able to sift through multiple entries or even different users feeds simultaneously and pulling relevant information. i'm looking at celluloid::io now and they mention mri can only execute 1 thread at a time.
arya_ has quit [Ping timeout: 248 seconds]
<mercwithamouth>
what's the benefits of using actors when constrained to one thread? *newb question* =P
marwinism has joined #ruby
Beoran_ has quit [Ping timeout: 252 seconds]
Beoran_ has joined #ruby
Loaft has quit []
Loaft has joined #ruby
d34th4ck3r has joined #ruby
<nga4>
its like coroutines or cooperative threading, the advantages usually have to do with splitting up contexts and using continuations to manage the scope of a given task
pencilcheck has quit [Remote host closed the connection]
arya_ has joined #ruby
ARCADIVS has joined #ruby
<mercwithamouth>
nga4: hmmm
<mercwithamouth>
like inexpensive events you don't necessarily have to 'wait on' before other tasks can be completed?
bean has quit [Read error: Connection reset by peer]
newUser1234 has quit [Remote host closed the connection]
<nga4>
concurrent programming is a design
bean has joined #ruby
marwinism has quit [Ping timeout: 246 seconds]
kornnflake has quit [Ping timeout: 246 seconds]
<nga4>
it will help you design clean tasks and events in a way that looks like parallelism
<havenwood>
mercwithamouth: Also things like disk or network reads and other things the VM doesn't lock on get full threading. More things than there used to be with the GIL.
<mercwithamouth>
nga4: hah thanks. reading now
<havenwood>
GVL FTW.
yashshah has quit [Read error: Connection reset by peer]
yashshah_ has joined #ruby
<havenwood>
Well... kinda. :P
<nga4>
the advantages don't including going faster
<nga4>
but just structural
<mercwithamouth>
i see, that's something i've definitely misinterpreted on the little i've read about actors
<nga4>
its a good habbit to have, it will allow you to play better with langauges like GO, Erlang or what-have-you with network programming
<mercwithamouth>
scala!
<nga4>
If you're looking for an analog you might observe lua's co-routines
<nga4>
clever as hell
<nga4>
not quite the same, but you'll see some similarities
<mercwithamouth>
funny enough i'm learning scala as well but i was excited to see celluloid and i decided to put scala down and get a strong grasp on ruby as well as rails(<-- more fun to work with)
<nga4>
No kidding
<nga4>
I live in C like 90% of the time
<nga4>
ruby is a walk in the park
<mercwithamouth>
lol, sorry =)
<havenwood>
mercwithamouth: Agent is a nice example of Go-style channels in Ruby. Celluloid is Erlang actors, like so many languages have adopted, but it takes the concept a bit further with thinks like DCell.
<mercwithamouth>
i'm almost tempted to try rubinus out...
<nga4>
mercwithamouth: I couple rails wiht some co-operative threads and c and lua and haskell and python together in establish a network of software to help run a distributed real-time telephone network
<havenwood>
I like the webpage view thing for DCell, cool to watch your nodes. :O
luckyruby has joined #ruby
<nga4>
it's hardly as good as it could, but if you dig into the fundamentals you can really build whatever you want
bakingbread has joined #ruby
<mercwithamouth>
havenwood: you're killing me =( I have a habit of researching opposed to get anything done. lol
RebelBunny has quit [Quit: Leaving.]
* mercwithamouth
takes a look at dcell
marwinism has joined #ruby
yannis has joined #ruby
<mercwithamouth>
nga4: maybe i'll tough it out with jruby. i haven't really run into any issues beyond my own ignorance of the library so far. i only plan on dealing with xml really. most of the issues i'm seeing deal with the HTML Reader classes, etc
kornnflake has joined #ruby
x1337807x has joined #ruby
<nga4>
Its all about the goals of what you're doing, if you're new to ruby you'll find there is always like 16 ways to do the same thing with relative ease
<nga4>
the biggest problem if picking the "right" solution for you so you dont have to rewrite in a few months using the library you didn't use before
<mercwithamouth>
yeah i think i have what i want...though i'm a little confused about how people consistently get the information they want from xml documents
<nga4>
generally though, its kind of hard to utterly screw yourself, just pick something you can get your head around and that has general applications you might be able to use later
<nga4>
so you can capitalize on your experience
<mercwithamouth>
i'm looking at mashables feed and rubyinside and the elements don't appear to be the same
generalissimo has quit [Remote host closed the connection]
<nga4>
I'd use json if that were an option
<nga4>
I don't know if it is
<mercwithamouth>
hmm i'm preparing for that as well
<nga4>
json translates well between hashes and text
<nga4>
and back again
<nga4>
you can manage with xml, but its not as obvious
sayan has joined #ruby
marwinism has quit [Ping timeout: 246 seconds]
bakingbread has quit [Client Quit]
bakingbread has joined #ruby
ananthakumaran1 has joined #ruby
kornnflake has quit [Ping timeout: 256 seconds]
ananthakumaran has quit [Ping timeout: 240 seconds]
S_O_B has joined #ruby
S_O_B has left #ruby [#ruby]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
tonini has joined #ruby
kornnflake has joined #ruby
ttt has quit [Remote host closed the connection]
<Nom->
XML is, as a general rule, horrible for a data exchange format
zigomir has joined #ruby
<mercwithamouth>
hmm dunno if you saw my code. is that the best way to handle dealing with multiple types...though the code is incomplete...a switch and regex to pick up on what sort of feed is being added
newUser1234 has quit [Remote host closed the connection]
ttt has joined #ruby
nomenkun has quit [Remote host closed the connection]
<mercwithamouth>
Nom-: won't argue that one. =)
<Nom->
If you're using a switch statement, it's a good sign that you might need to subclass something somewhere instead :)
<mercwithamouth>
alright, i think it's time to crash. i'll be on later hopefully with some decent progress
<mercwithamouth>
Nom-: hmmm
<Nom->
If you have different kinds of things, and all of those things are stored in a database, consider something like STI
thecreators has quit [Quit: thecreators]
<mercwithamouth>
=P i swore never to use STI again...
<mercwithamouth>
well at least not with a sql based db
<nga4>
I like sti when applied correctly
<Nom->
Well, STI in ActiveRecord is actually really simple and easy to do. When it's done correctly, it's a very effective tool in the arsenal.
<nga4>
no kidding
razibog has joined #ruby
MrZYX|off is now known as MrZYX
stkowski has quit [Quit: stkowski]
<mercwithamouth>
i forget why i actually attempted it
<nga4>
I can't image why one wouldn't like it unless your STI was like 30 columns of non-uniform data
<nga4>
then it would be quite the burden
<nga4>
but thats the implementation not the tool
ph^ has joined #ruby
<mercwithamouth>
dealing with different sorts of items though all of the items had a few attributes that were the same. it bit me when trying to grab certain fields. i don't remember exactly.
<nga4>
use a hammer to drive in screws and I might imagine you'd find the hammer rather...ineffective
<Nom->
Yeah, that's possibly not the beest use case for STI then
<mercwithamouth>
ahh i should be more clear. i was using it with rails and activerecord....
aganov has joined #ruby
<mercwithamouth>
so inheritance was fine...then i learned that crazy unexpected things can happen when dealing with db associations...
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<Fuzai>
is there a command that can turn special characters into http safe characters ( like " " into %20 so it can be called in a complex url ) ?
<Nom->
So where STI makes the most sense is when you have lots of really similar things which require slightly different logic
ph^ has quit [Ping timeout: 248 seconds]
marwinism has joined #ruby
<mercwithamouth>
yeah, i think it use case wise for the other project(that i dropped) it would have been great.
<nga4>
check out abstract base classes, they're your friend in rails just like STI
<nga4>
for when you have things that are logically similar
<nga4>
but store different data
rsampaio_ has quit [Ping timeout: 264 seconds]
<mercwithamouth>
nga4: will do.
Asher has quit [Quit: Leaving.]
<mercwithamouth>
so do you suggest i drop jruby for this project or no? I do plan on using scala later on but that doesn't mean the rails portion has to be on the jvm(though it would be nice)
MrZYX is now known as MrZYX|off
<Nom->
mercwithamouth: That's a decision only you can make, but I can say that I did recommend it for my organisation because there are just too many things that don't quite work properly in it
<mercwithamouth>
i think i'm worrying about problems that don't exist =)
<Nom->
And I wanted Ruby to be successful here..... failure wasn't an option
<mercwithamouth>
Nom-: you recommended mri? or jruby?
<Nom->
I mean we are stuck in the Perl era... if I don't get Ruby adopted, I'll be writing Perl code forever ! :P
<Nom->
MRI
<mercwithamouth>
lol
<mercwithamouth>
perl doesn't seem SO bad.
<Nom->
Oh it is.
<Fuzai>
Perl isn't that bad
<nga4>
perl is capable of doing everything you want, its just lexically dated
<mercwithamouth>
uh oh. language war.
<Nom->
Yes it is. Don't try and defent it, healthens!
<Nom->
*heathens
<Fuzai>
At least it's not RPG/400
* mercwithamouth
sleeps!
<Nom->
Oh let me clarify. Perl 5.6 code.
<nga4>
Alternatively there is always python, pypy and django
marwinism has quit [Ping timeout: 256 seconds]
<Nom->
Yeah, Python is good too
<mercwithamouth>
i really don't like django...
<mercwithamouth>
love python
<Fuzai>
i don't like python
<nga4>
I like how it doesnt make assumptions for you
<mercwithamouth>
pyramid was cool my few days mucking with it but scary as well
<Nom->
Honestly when picking up languages my top 3 were Ruby, Groovy and Python in no particular order
<nga4>
I don't get the luxury of choice
<nga4>
Lua/C/Ruby
<Nom->
I only landed on the Ruby side because of things like NewRelic :)
<Fuzai>
My current project is ruby, js, and php
braoru has joined #ruby
<havenwood>
Ruby, Perl6, Elixir
MrZYX|off is now known as MrZYX
<Nom->
lol Perl6
<Nom->
What a laugh
ddd has quit [Quit: heading home]
dangerousdave has joined #ruby
marcdel has quit []
<nga4>
python is right there on the edge with haskell as "things Im going to have to pick up sooner or later"
<havenwood>
Nom-: In a world where Javascript is considered a useable language... Perl6 is nice. :P
<nga4>
ew
<nga4>
I still don't get node.js
<Fuzai>
since when did perl6 go client side into our browsers?
<Nom->
Perl6 is probably another 5 years away from being useful... minimum
<Fuzai>
node.js is for lazy people that don't want to learn a real language
<Nom->
And it's already 5 years too late :)
sayan has quit [Ping timeout: 272 seconds]
<havenwood>
Nom-: Too late for what? Its point is to be around in 30 years, not ride a short term wave.
V8Energy has joined #ruby
<Nom->
Drifting slightly off topic... if I get started I'll be ranting for hours :P
<nga4>
If everyone used erlang then we wouldn't have these problems
<havenwood>
nga4: Elixir ftw.
<nga4>
Official langauge of the british royal family
sayan has joined #ruby
<Nom->
heh... one day I'll look at Erlang. Heard good things about it though :)
mafolz has joined #ruby
<havenwood>
nga4: Playing with iex is fun. Tab-completion plus separating methods by arity make for good exploration.
mercwithamouth has quit [Ping timeout: 264 seconds]
<havenwood>
Elixir, all the win of Erlang with a Rubyish feel. :D
<nga4>
I'll have to look into it, I really like erlang
Hanmac has quit [Quit: Leaving.]
<havenwood>
nga4: nice
<nga4>
but Im stuck with c and zeromq to eachieve similar ends
<havenwood>
nga4: mmm
mattbl has quit [Quit: This computer has gone to sleep]
<nga4>
massive non-state-sharing parallelism via messages
end_guy has quit [Ping timeout: 276 seconds]
<nga4>
seems like erlang would've done the job, but I wasn't allowed
mootpointer has quit [Quit: Computer has gone to sleep.]
<havenwood>
I need to get further into Elixir. Really enjoyed dabbling so far.
zavier has quit [Quit: WeeChat 0.3.8]
<nga4>
if someone would pay me to adapt it
<nga4>
or adopt rather
haxrbyte has joined #ruby
razibog has quit [Quit: Leaving.]
cyro has joined #ruby
carraroj has joined #ruby
cyro has left #ruby [#ruby]
browndawg has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Ping timeout: 272 seconds]
tagrudev has joined #ruby
marwinism has joined #ruby
ph^ has joined #ruby
tagrudev has quit [Remote host closed the connection]
mattbl has joined #ruby
tagrudev has joined #ruby
luckyruby has quit [Remote host closed the connection]
yshh has quit [Remote host closed the connection]
V8Energy has quit []
akashj87 has joined #ruby
Atrophius has quit [Quit: Leaving]
daniel_hinojosa has quit [Ping timeout: 264 seconds]
yshh has joined #ruby
_veer has quit [Ping timeout: 245 seconds]
marwinism has quit [Ping timeout: 245 seconds]
ryanf has joined #ruby
tagrudev has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
tonini has quit [Remote host closed the connection]
brhelwig has quit [Remote host closed the connection]
dr_bob has joined #ruby
Elhu has joined #ruby
marwinism has joined #ruby
tagrudev has joined #ruby
arya_ has quit [Ping timeout: 248 seconds]
agarie_ has quit [Remote host closed the connection]
haxrbyte has quit [Remote host closed the connection]
haxrbyte has joined #ruby
DrShoggoth has quit [Quit: Leaving]
Vainoharhainen has joined #ruby
hiyakashi has quit [Quit: お前は知りすぎた]
marwinism has quit [Ping timeout: 240 seconds]
arya has joined #ruby
tonini has joined #ruby
bluOxigen has joined #ruby
marwinism has joined #ruby
restarted has joined #ruby
<restarted>
hello
yshh has quit [Remote host closed the connection]
<restarted>
this maybe asked once too many but I could find an reference in the web or i may have missed it.
<restarted>
here i go, is there a way to switch back and from to rubies installed outside rvm?
pduin has joined #ruby
andikr has joined #ruby
kosine has quit [Quit: Leaving]
browndawg has joined #ruby
timonv has joined #ruby
zavier has joined #ruby
charliesome_ has joined #ruby
BizarreCake has joined #ruby
marwinism has quit [Ping timeout: 248 seconds]
Hanmac has joined #ruby
anderse has joined #ruby
tonini has quit [Remote host closed the connection]
matayam has quit [Remote host closed the connection]
tonini has joined #ruby
bakingbread has quit [Quit: gotta go]
charliesome_ is now known as charliesome
apeiros_ has joined #ruby
dzhulk has joined #ruby
g4mm4 has quit [Remote host closed the connection]
g4mm4 has joined #ruby
marwinism has joined #ruby
g4mm4 has quit [Remote host closed the connection]
NewRubys has joined #ruby
idkazuma has quit [Remote host closed the connection]
mattbl has quit [Quit: This computer has gone to sleep]
dawkirst has joined #ruby
bradleyprice has quit [Remote host closed the connection]
d34th4ck3r has quit [Quit: Konversation terminated!]
lele has quit [Ping timeout: 252 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
marwinism has quit [Ping timeout: 245 seconds]
brhelwig has joined #ruby
ryanf has quit [Quit: leaving]
lele has joined #ruby
dzhulk has left #ruby [#ruby]
dzhulk has joined #ruby
Morkel has joined #ruby
kofno has joined #ruby
mattbl has joined #ruby
icole has joined #ruby
neku has joined #ruby
backjlack has joined #ruby
yshh has joined #ruby
dzhulk has quit [Quit: Leaving.]
brhelwig has quit [Ping timeout: 272 seconds]
yacks has quit [Ping timeout: 240 seconds]
mattbl has quit [Client Quit]
kofno has quit [Ping timeout: 252 seconds]
crimezone20xx has quit [Ping timeout: 246 seconds]
emergion has joined #ruby
dhruvasagar has quit [Ping timeout: 264 seconds]
yacks has joined #ruby
dhruvasagar has joined #ruby
timonv has quit [Remote host closed the connection]
Targen has joined #ruby
hiyakashi has joined #ruby
jgrau has joined #ruby
<restarted>
anyone can help me out here?
yacks has quit [Ping timeout: 245 seconds]
quazimodo has joined #ruby
arturaz has joined #ruby
Nisstyre-laptop has quit [Ping timeout: 264 seconds]
swingha has joined #ruby
arturaz_ has joined #ruby
franks2 has joined #ruby
yashshah_ has quit [Quit: Konversation terminated!]
<Hanmac>
restarted: do you mean /quit ?
yashshah- has joined #ruby
<restarted>
not quite
<v2px>
/part ?
<restarted>
nice tricks..
icole has quit [Remote host closed the connection]
<MrZYX>
restarted: rvm help
<restarted>
/part
<restarted>
/quit
yashshah__ has joined #ruby
<restarted>
:)
<restarted>
thanks MrZYX..
bean has quit [Read error: Connection reset by peer]
arturaz_ has quit [Client Quit]
<Hanmac>
MrZYX how did you know that he means rvm?
<MrZYX>
scroll up
yacks has joined #ruby
yashshah- has quit [Ping timeout: 245 seconds]
daniel_- has joined #ruby
idkazuma has joined #ruby
<Hanmac>
MrZyx until what time? because i didnt have his message on my log
<MrZYX>
8:36 CET
<restarted>
here it was
<restarted>
[15:35] <restarted> this maybe asked once too many but I could find an reference in the web or i may have missed it.
<restarted>
[15:36] <restarted> here i go, is there a way to switch back and from to rubies installed outside rvm?
duosrx has joined #ruby
<Hanmac>
MrZYX i was offline between 08:05 - 08:43 ... an good irc clent should have show you that
<MrZYX>
lol, I'm not reading through all the join/parts
io_syl has quit [Quit: Computer has gone to sleep.]
francisfish has quit [Remote host closed the connection]
marwinism has joined #ruby
<apeiros_>
MrZYX: that is *OUTRAGING!*
timonv has joined #ruby
<apeiros_>
;-)
<MrZYX>
:P
jurassic_ has quit [Quit: jurassic_]
<MrZYX>
Hanmac: get a bouncer so you aren't offline anymore :P
Stelian1 has left #ruby [#ruby]
quazimodo has quit [Ping timeout: 256 seconds]
goganchic has joined #ruby
anderse has quit [Quit: anderse]
quazimodo has joined #ruby
ferdev has quit [Quit: ferdev]
nomenkun has joined #ruby
xpen_ has quit [Ping timeout: 256 seconds]
fourq has quit [Ping timeout: 264 seconds]
nomenkun_ has joined #ruby
dhruvasagar has quit [Ping timeout: 252 seconds]
sayan has quit [Ping timeout: 272 seconds]
codecop has joined #ruby
akemrir has joined #ruby
dhruvasagar has joined #ruby
marwinism has quit [Ping timeout: 252 seconds]
VinceThePrince has joined #ruby
nomenkun has quit [Ping timeout: 245 seconds]
yashshah__ has quit [Ping timeout: 245 seconds]
marwinism has joined #ruby
Guest99422 has quit [Changing host]
Guest99422 has joined #ruby
Guest99422 has joined #ruby
peterhellberg has joined #ruby
Guest99422 is now known as Boohbah
marwinism has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
<shevy>
Hanmac hehe I also dont see any times
elaptics`away is now known as elaptics
jprovazn has joined #ruby
NewRubys has quit [Ping timeout: 245 seconds]
<Hanmac>
shevy normaly there is minimun one hanmac there and listening ... but it seems my home pc is broken :(
<shevy>
hehe
<shevy>
you should not have used osx man
<Hanmac>
oO i never used osx oO
<shevy>
:D
<shevy>
I should have tried it
noxoc has joined #ruby
banjara has quit [Quit: Leaving.]
<shevy>
but now I am stuck with this server OS called linux
<shevy>
:(
reactormonk has joined #ruby
<peterhellberg>
Heh :)
VinceThePrince has quit [Remote host closed the connection]
freeayu__ has joined #ruby
<peterhellberg>
I just recently started using CrunchBang Waldorf, it is a pretty nice distro.
<shevy>
linux has some nice parts though, I like bash still and konsole/gnome-terminal
<Boohbah>
linux > *
<shevy>
Waldorf?
<peterhellberg>
Especially when you need to run Linux in a VM
<shevy>
that sounds ... german hahaha
* Zelest
hails FreeBSD
<peterhellberg>
(Low memory footprint)
<shevy>
Rammstein in Waldorf
ferdev has joined #ruby
<shevy>
Hanmac in Waldorf ... hahaha, man I am easily amused... :D
<shevy>
Zelest wow, do you use ruby too? and what ruby version?
danslo has joined #ruby
<Zelest>
shevy, havn't done in ages :)
freeayu has quit [Ping timeout: 256 seconds]
mahmoudimus has joined #ruby
<Boohbah>
i am trying to write indivdual bits to a file without having to string them together into bytes to use Array#pack. is there an easier way to write single bits to a file?
adambeynon has joined #ruby
horrror has joined #ruby
dzhulk has joined #ruby
<horrror>
what is ? in ruby?
<Hanmac>
Boohbah File.write has an offset param
MrZYX is now known as MrZYX|off
Elhu has joined #ruby
<Boohbah>
i will check it out, thanks
mediko has quit [Ping timeout: 248 seconds]
cableray has quit [Quit: cableray]
<peterhellberg>
horrror: As in foo = true ? 'bar' : 'baz'
<horrror>
yea
<horrror>
it's like if/else?
<peterhellberg>
Yes, shorthand version
<peterhellberg>
horrror: It is a ternary expression
RORgasm_ has joined #ruby
<Boohbah>
Hanmac: but doesn't File.write still only write bytes? i want to be able to write less than a full byte without having to pad it with zeroes
fivethre1o has joined #ruby
eval-in has quit [Read error: Connection reset by peer]
dayepa_ has joined #ruby
afd__ has joined #ruby
mattp__ has joined #ruby
HobGoblin has joined #ruby
oz` has joined #ruby
g4mm4 has joined #ruby
HobGoblin is now known as Guest80121
idkazuma has quit [Remote host closed the connection]
mfridh_ has joined #ruby
musl_ has joined #ruby
xibalba_ has joined #ruby
akashj87 has quit [Ping timeout: 252 seconds]
tommylommykins has quit [Read error: Operation timed out]
Xeago has quit [Remote host closed the connection]
haxrbyte_ has joined #ruby
alup has joined #ruby
Xeago has joined #ruby
haxrbyte has quit [Ping timeout: 252 seconds]
d34th4ck3r has quit [Quit: Konversation terminated!]
mark_locklear has joined #ruby
bakingbread has quit [Quit: quit]
klip has joined #ruby
Giorgio has quit [Ping timeout: 272 seconds]
divout has quit [Remote host closed the connection]
cobragoat has quit [Remote host closed the connection]
cobragoat has joined #ruby
etcetera has joined #ruby
Xeago has quit [Ping timeout: 264 seconds]
jetblack has joined #ruby
<Sicp>
bean, where art thou!
k610 has joined #ruby
includex has quit [Quit: Leaving...]
<Sicp>
I made it work flawlessly with the database ops
<Sicp>
the task is done
Spooner_ has joined #ruby
etcetera has quit [Client Quit]
jnoob22 has quit [Read error: Connection reset by peer]
eka has quit [Quit: Computer has gone to sleep.]
jjbohn has joined #ruby
cobragoat has quit [Ping timeout: 240 seconds]
haxrbyte_ has quit [Read error: Connection reset by peer]
jjbohn has quit [Client Quit]
<Sicp>
wouldn't have been possible without Ruby
swingha has quit [Quit: WeeChat 0.4.0]
jnoob22 has joined #ruby
xpen has quit [Remote host closed the connection]
happydude has joined #ruby
blaxter has quit [Remote host closed the connection]
haxrbyte has joined #ruby
<happydude>
what is the best practice to write code that works with ruby 2.0 new features as well as the previous ruby?
chussenot has joined #ruby
<happydude>
for instance i want to use refine
ArchBeOS has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
ArchBeOS has quit [Changing host]
ArchBeOS has joined #ruby
ArchBeOS has left #ruby [#ruby]
Squarepy has quit [Changing host]
Squarepy has joined #ruby
<JonnieCache>
i dont think theres a way to use stuff like refine but have the 1.9 interpreter not choke
osvico has joined #ruby
<JonnieCache>
afaik you cant rescue from the errors those keywords will cause
<JonnieCache>
but maybe im wrong
duosrx has joined #ruby
<tobiasvl>
keep the 1.9 code in one file and the 2.0-only code in another, check for the version and include the correct code?
<Spooner_>
The way to make backwards compatible code is to not use new features ;)
blaxter_ has joined #ruby
<Hanmac>
be happy that he does not ask to make something working with 1.8 too :P
davorb_laptop has quit [Quit: Computer has gone to sleep.]
<JonnieCache>
just write ruby2 code and forge ahead to a bright future
blaxter_ is now known as blaxter
realDAB has quit [Quit: realDAB]
dustint has joined #ruby
girija has quit [Ping timeout: 256 seconds]
yashshah has joined #ruby
tommyvyo has quit [Quit:]
<happydude>
okay
lolzie has joined #ruby
Xeago has joined #ruby
entr0py_ has quit [Ping timeout: 240 seconds]
<lolzie>
Beautiful people - I was hoping if anyone may be able to advise me :)
pioz has quit [Ping timeout: 256 seconds]
swex has quit [Read error: Connection reset by peer]
swex has joined #ruby
IrishGringo has joined #ruby
<lolzie>
I have a class which is used to parse a line of input. obj.parse(line)
darmou has joined #ruby
<lolzie>
A symbol is created from the first word found in the line, and an associated method is called within that class based upon that
<lolzie>
(i.e. parse() does self.send :word_found)
yfeldblum has joined #ruby
<lolzie>
However.. something about that seems a bit fishy. If 'parse' was the first word found, it'd call itself - not cool! I could do an if-check but that seems like a bit of a hacky solution
<lolzie>
Does anybody have any thoughts just from that?
kn330 has quit [Remote host closed the connection]
<MrZYX>
I'd build a whitelist, (self.methods-Object.instance_methods-[:parse]).include? word_found
<Xeago>
making symbols from input is tricky business
<Xeago>
and the source of many exploits
<Xeago>
cause*
<Xeago>
whitelisting before you make it a symbol could be an option
<MrZYX>
send takes strings fine (I'm sure it calls to_sym internally though)
BizarreCake has joined #ruby
wmoxam has joined #ruby
<JonnieCache>
well if you whitelist first it should be fine
tommyvyo has joined #ruby
sayan has quit [Quit: Leaving]
yannis has quit [Quit: yannis]
<JonnieCache>
you'd need to call to_s on the stuff you get out of .methods though
jpfuentes2 has joined #ruby
GetStuffDan is now known as tevio
slainer6_ has quit [Remote host closed the connection]
<Hanmac>
MrZYX send does not allways create symbols,
slainer68 has joined #ruby
sayan has joined #ruby
<MrZYX>
hm in which cases not?
ericmathison has quit [Ping timeout: 256 seconds]
sayan has quit [Read error: Connection reset by peer]
etcetera has joined #ruby
lewix has joined #ruby
TomJ has joined #ruby
TomJ has quit [Changing host]
TomJ has joined #ruby
<lolzie>
Xeago: gosh yes I just thought about how many other methods could have been invoked that are inherited... lol
<Hanmac>
MrZYX if method_missing is not overwritten
<JonnieCache>
if at all possible you should use a hard coded whitelist though
<JonnieCache>
this isnt really the place for metaprogramming
carloslopes has joined #ruby
<lolzie>
JonnieCache: before you said that about metaprogramming I was literally just about to say "I was always scared of metaprogramming as doing so in Java is really sneered upon (reflection)"
<lolzie>
Is this not more acceptable / Rubyish here?
<JonnieCache>
metaprogramming is very rubyish
idkazuma has joined #ruby
piotr404 has joined #ruby
bakingbread has joined #ruby
d2dchat has quit [Remote host closed the connection]
<JonnieCache>
but youre basically writing a security check here, so using metaprogramming is kinda reckless
<Hanmac>
metaclassing is also a bit rubyish :P
etcetera has quit []
adkron has quit [Ping timeout: 245 seconds]
sailias has joined #ruby
swingha has joined #ruby
jpcamara has joined #ruby
<lolzie>
JonnieCache: sorry I don't quite follow how metaprogramming after security checking is reckless
<lolzie>
Is there an alternative you had in mind?
<JonnieCache>
metaprogramming can introduce unexpected edge cases by its very nature, which is very bad news when dealing with security
benwoody_ has left #ruby [#ruby]
<JonnieCache>
for example, you noted how that code could bring in inherited methods
<lolzie>
Isn't the security of a whitelist clearly delineating those edges?
<JonnieCache>
and how you can get an infinite loop if the first line contained "parse"
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
sambio has joined #ruby
mikurubeam has joined #ruby
_nitti has joined #ruby
sepp2k has quit [Quit: Leaving.]
yacks has joined #ruby
maxmanders has joined #ruby
axl_ has joined #ruby
EPIK has quit [Ping timeout: 252 seconds]
maxmanders has quit [Read error: Connection reset by peer]
yashshah_ has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby
angusiguess has joined #ruby
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
Eiam has quit [Ping timeout: 256 seconds]
samir has quit [Ping timeout: 256 seconds]
cout_ is now known as cout
sambao21 has joined #ruby
samir has joined #ruby
d2dchat has joined #ruby
superninkendo has joined #ruby
skattyadz has quit [Read error: Connection reset by peer]
sleetdrop has joined #ruby
akashj87 has joined #ruby
stevechiagozie has joined #ruby
sleetdrop has quit [Ping timeout: 256 seconds]
m8 has quit [Quit: Sto andando via]
sleetdrop has joined #ruby
Taranis has joined #ruby
freerobby has joined #ruby
mengu has joined #ruby
pixie79 has joined #ruby
realDAB has joined #ruby
mikurubeam has joined #ruby
platzhirsch has quit [Quit: Leaving.]
platzhirsch1 has joined #ruby
heliumsocket has joined #ruby
<lupine>
so, I'm currently using webmock to test a HTTP client library (fat wrapper around Net::HTTP) and I'm looking at adding support for Net::HTTP::Proxy. anyone know how the two interacT?
skattyadz has joined #ruby
codecop has quit [Quit: Išeinu]
sayan has joined #ruby
_veer has quit [Ping timeout: 272 seconds]
Neomex has joined #ruby
whitedawg has joined #ruby
ananthakumaran1 has quit [Quit: Leaving.]
Neomex has quit [Client Quit]
zetaspartan2552 has quit [Quit: zetaspartan2552]
interactionjaxsn has joined #ruby
Paradox has quit [Ping timeout: 245 seconds]
ananthakumaran has joined #ruby
jtharris has joined #ruby
<JonnieCache>
is anyone else getting super slow git speeds from github?
sayan has quit [Max SendQ exceeded]
urbanmonk has joined #ruby
urbanmonk has left #ruby [#ruby]
jtharris has quit [Client Quit]
jtharris has joined #ruby
noop has quit [Quit: Leaving]
sayan has joined #ruby
raddazong has quit [Read error: Operation timed out]
piotr404 has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
backjlack has joined #ruby
sayan has quit [Read error: Connection reset by peer]
madhatter has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
gstudent2 is now known as germanstudent
failshell has joined #ruby
thufir_ has quit [Quit: Leaving.]
jjbohn has joined #ruby
frem has joined #ruby
axl_ has quit [Quit: axl_]
neku has quit [Read error: Connection reset by peer]
superninkendo has quit [Quit: Leaving.]
neku has joined #ruby
mengu has quit [Quit: Leaving]
ericmathison has joined #ruby
piotr404 has joined #ruby
invisime has joined #ruby
danman has joined #ruby
jnoob22 has quit [Remote host closed the connection]
v0n has joined #ruby
jerius_ has joined #ruby
jpcamara_ has joined #ruby
Morkel has quit [Quit: Morkel]
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I was trying to tell you).]
piotr404 has left #ruby [#ruby]
jerius has quit [Read error: Operation timed out]
jerius_ is now known as jerius
jpcamara has quit [Ping timeout: 256 seconds]
browndawg has quit [Quit: Leaving.]
tish has joined #ruby
lewix has joined #ruby
drfreeze has joined #ruby
phantasm66 has joined #ruby
phantasm66 has quit [Changing host]
phantasm66 has joined #ruby
mikurubeam has joined #ruby
syamajala has joined #ruby
niftylettuce has joined #ruby
tish has left #ruby [#ruby]
_nitti has quit [Ping timeout: 245 seconds]
drfreeze_ has quit [Ping timeout: 240 seconds]
_nitti has joined #ruby
ahokaomaeha has joined #ruby
realDAB has quit [Quit: realDAB]
carraroj has quit [Ping timeout: 256 seconds]
mikurubeam has quit [Read error: Connection reset by peer]
<barraponto>
What's the difference between installing a gem with bundle+Gemfile versus just "gem install" it?
SCommette has joined #ruby
chris___ has joined #ruby
mikurubeam has joined #ruby
oddraisin has joined #ruby
jlast has joined #ruby
xpen has joined #ruby
superninkendo has joined #ruby
<MrZYX>
barraponto: bundler additionaly provides you a way to manage the exact versions and let you require them (and nothing else)
xkickflip has quit [Quit: xkickflip]
<chris___>
How would do this pyhon code in ruby : http://pastie.org/7124534 It's how to implement the observer pattern in python.
realDAB has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
razibog has quit [Ping timeout: 245 seconds]
<barraponto>
MrZYX: thanks :)
<Hanmac>
chris___ 1. there is an observer module in ruby stdlib, 2. you are looking for alias to rename a method
barraponto has left #ruby ["Gone."]
_nitti has quit [Ping timeout: 264 seconds]
<chris___>
Hanmac: I'm really looking for a language level feature that would allow the same thing.
Davey has joined #ruby
_nitti has joined #ruby
Sicp has quit [Quit: Leaving]
<Hanmac>
chris___ method() returns an method object, you can use it later, and both things, observer module and alias are both always in ruby (and alias is an keyword)
lewix has quit [Remote host closed the connection]
momomomomo has joined #ruby
_nitti_ has joined #ruby
_nitti_ has quit [Remote host closed the connection]
Sou|cuttr is now known as Sou|cutter
<Dwarf>
Good afternoon. I have a dynamic string that I use in a query with SQLite, and it may happen that there is a ' in there. Is there a function that escapes it?
DaniG2k has joined #ruby
osvico has quit [Ping timeout: 264 seconds]
_nitti_ has joined #ruby
<DaniG2k>
guys what' the best way to install linux ruby on linux Mint
superninkendo has quit [Quit: Leaving.]
generalissimo has joined #ruby
Sou|cutter has quit [Changing host]
Sou|cutter has joined #ruby
<DaniG2k>
oops, I meant
<MrZYX>
Dwarf: db.execute("SQL QUERY WHERE something = ?", your_string)
<chris___>
banister`sleep: yeah that'll do it, thanks. Although It's not quite as slick, concise or as readable as the python version.
<chris___>
banister`sleep: it also requires you to know the name of the method being decorated
jacktrick has joined #ruby
_nitti_ has joined #ruby
darmou has quit [Ping timeout: 264 seconds]
Hanmac has joined #ruby
_nitti__ has quit [Ping timeout: 272 seconds]
<Hanmac>
banister`sleep: nice, but where is the decorate_after method?
Rioji has joined #ruby
<banister`sleep>
chris___: i prefer the ruby version as i can define the decorating code inline
DaniG2k has left #ruby ["Leaving"]
maxmanders has quit [Quit: Computer has gone to sleep.]
<banister`sleep>
chris___: note i am providing the code for the decoration inline with the decoration, the python version requires me to hide that code away in a method, further, it's hardcoded, meaning i can't decorate different methods in different ways
ffranz has joined #ruby
<chris___>
banister`sleep: the python version allows you to decorate any method on any object, not just those that I extend with the Decorator class.
<chris___>
s/class/module
_nitti has quit [Ping timeout: 245 seconds]
<banister`sleep>
chris___: i could do that too in ruby, but i chose not to as as top-level method is ugly in RUby
browndawg has joined #ruby
newUser1234 has joined #ruby
<Hanmac>
chris___ you can extend mostly any object with the Decorator module
<banister`sleep>
chris___: we prefer an OO/model approach to defining "top level methods" -- which i could do, but i dont like.
yacks has quit [Remote host closed the connection]
<banister`sleep>
chris___: to make it a toplevel method instead, just define 'decorate' outside of the module :)
<lectrick_>
banister`sleep: I wrote a way to profile memory utilization for any arbitrary ruby block, from anywhere https://gist.github.com/pmarreck/5245761 . I wrote this because time spent in GC seems to be a significant problem :O
<banister`sleep>
lectrick_: cool
<chris___>
banister`sleep: you can't seriously be telling me that "worker.go = wrap_method(worker.go)" is not as good as using all that Proc and define_method guff?
jacky has quit [Ping timeout: 245 seconds]
mmitchell has joined #ruby
newUser1234 has quit [Read error: Connection reset by peer]
alex__c2022 has joined #ruby
_nitti_ has quit [Ping timeout: 272 seconds]
newUser1234 has joined #ruby
<banister`sleep>
chris___: they're not equivalent. Your code decorates a method in ONE particular way and also HIDES the decoration code inside a method. THe code i defined is a general decorator, you can decorate any method in any way you like and the decoration code is visible
_nitti has joined #ruby
<banister`sleep>
chris___: decorate(:go) { puts "method fired!" } vs wrap_method(worker.go) <-- i dont even know what that's doing...
skattyadz has quit [Quit: skattyadz]
Spooner_ has quit [Remote host closed the connection]
<banister`sleep>
chris___: also it's clear you dont really want to know how to do it in ruby, you just came here to argue about which language is better ;)
<Hanmac>
you could also do: wrap_method = proc { puts "method fired!" }; decorate(:go,&wrap_method)
<chris___>
banister`sleep: that's not true. I'm primarily a ruby developer. This last 2 days I've been learning python.
<banister`sleep>
chris___: you're primarily a ruby developer but didnt know how to decorate a method? :P
jacktrick has quit [Quit: Leaving]
<banister`sleep>
metaprogramming 101
<chris___>
banister`sleep: I knew how. I just wondered if there was a better way than the ugly method you gave me.
<banister`sleep>
chris___: the reason it's 'ugly' is because it's more general than your approach
slocate has joined #ruby
<chris___>
and because Python supports true first class functions.
eka has joined #ruby
mikewintermute has joined #ruby
<jsaak>
anyone has an idea how to embed ruby in a c++ program AND schedule the vm from that? something like green threads for example
<bean>
um
<bean>
the ruby one isn't that bad
<bean>
and
<bean>
your method is hard coded in the python
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
freerobby has quit [Quit: Leaving.]
<Hanmac>
banister`sleep: i need to tell you ... your decorator gaves me FUNNY ideas ... like i may do: decorate(:elementar_damage) {@abilities.map(&:elementar_damage)} ... or maybe different
k3rn3lito has joined #ruby
<jsaak>
or send signal to the VM periodically to stop pause execution?
<bean>
really not a fan of the python one.
jurassic_ has joined #ruby
<chris___>
bean: it doesn't have to be hard coded
<bean>
you could also have a top-level method in ruby, but typically thats not 'good style'
<banister`sleep>
chris___: then define one that isn't hard coded, i'd like to see it :)
<banister`sleep>
chris___: given python's crippled lambda support it would be fun to see how you pull it off
pi3r has quit [Quit: Leaving]
<chris___>
banister`sleep: ok now im not sure about which bit you're saying is hardcoded
jprovazn has quit [Quit: Leaving]
<banister`sleep>
chris___: also, ruby 'methods' aren't just functions like they are in python/javascript, you can't just assign them/move them around to slots in your object. It's perhaps also the reason python/javascript have this annoying 'self'/'this' parameter
freerobby has joined #ruby
jurassic_ has quit [Client Quit]
<banister`sleep>
so although it may look ok that you can just move them around by assigning them to slots
<banister`sleep>
you have to pay for it 5-fold by having to self.blah or this.blah absolutely everything
<banister`sleep>
which is terrible
<chris___>
banister`sleep: your describing first class functions there
cearls has joined #ruby
<chris___>
that's a language feature
<chris___>
"terrible?" - an overreaction?
xclite has joined #ruby
<banister`sleep>
chris___: i disagree, i think it's horrible. typing self.blah this.blah all the frikkin time is an incredibly anonyance. I agree that it's cute in the situation you want to move your function to a different object, but this is not hte common case, the common case is it'll be mostly bound to ONE object
cmarques has joined #ruby
drale2k has joined #ruby
aryasam has joined #ruby
Rioji has quit [Remote host closed the connection]
unflores has quit [Quit: unflores]
<banister`sleep>
and as it's the common case things should be optimized that way, forced to always self.blah or this.blah just because there's a possibility the function might be later bound to another object seems silly to me, and optimizing the wrong thing
tobago has joined #ruby
jurassic_ has joined #ruby
<lectrick_>
banister`sleep: chris___ yeah methods in ruby are "bound"... is that what this is about?
<Hanmac>
you can move methods arround when using Method objects or UnboundMethod objects
syamajala has quit [Quit: leaving]
iambic has joined #ruby
interactionjaxsn has quit [Remote host closed the connection]
<Hanmac>
lectrick_ yes and no, normaly they are bound but you can unbind them
jgarvey has joined #ruby
<chris___>
Hanmac: can you rebind them to another object?
realDAB has quit [Quit: realDAB]
<banister`sleep>
chris___: also, ruby doesn't need free functions, nor to rebind method to other objects, we achieve that kind of stuff with blocks, which are syntactically better looking
<lectrick_>
banister`sleep: chris___ yeah, the __self__ everything in python turned me off bigtime. also that typing "exit" in the python REPL said "type control-D to exit", because... it knew what I wanted... and didn't just do it, which is kind of a dick move. which is why I ended up in ruby. funny how tastes work.
pavilionXP has joined #ruby
<lectrick_>
ruby is so libertarian compared to python
tomsthumb has quit [Quit: Leaving.]
<lectrick_>
"you want to do that? Go ahead, skin your knees and run with scissors, I'll be here to patch you up when you return"
realDAB has joined #ruby
daniel_-_ has joined #ruby
interactionjaxsn has joined #ruby
<lectrick_>
also because ruby stole the best parts of a bunch of other languages :)
<Hanmac>
chris___ yes, if they are from the same Tree, like when you have A < B < C you can unbind an method from the C class and then bind it against an object from the A class, withthat you can call the C method without calling the B an A methods with the same name
<banister`sleep>
chris___: i already explained they're not equivlent
platzhirsch1 has quit [Quit: Leaving.]
platzhirsch has joined #ruby
<Hanmac>
lectrick_: its called "copyrightpiraty" ARR :P
<banister`sleep>
the ruby one is a general decorator, yours just wraps a method with another hardcoded method
<tobago>
I want to code some lines to create a canvas for testing reasons. What is to be prefered to contain the pixel values: 2 dimensional array or hash?
<Hanmac>
PS: there is also an difference when you define methods inside methods in ruby ...
<chris___>
banister`sleep: the hardcoded method could just be a method that is passed in.
<banister`sleep>
chris___: right..so say you had 5 methods that you awnt to decorate in different ways
<chris___>
banister`sleep: I could pass in a method_before and method_after methods.
daniel_- has quit [Ping timeout: 240 seconds]
danman has quit [Quit: danman]
<banister`sleep>
chris___: not only would you have the original 5 methods, you'd also need 5 other methods that exist only to wrap those original 5
pavilionXP has quit [Read error: Connection reset by peer]
<lectrick_>
chris___: In that particular instance, yeah, it looks simpler. But I believe the general use case might pay for that simplicity? I don't know enough about language design honestly to know what the cost of bound vs. unbound methods is
<banister`sleep>
chris___: and unless you define those wrapper methods immediately above or near where the wrapping actually takes place, you really have no idea what kind of wrapping is going on
<banister`sleep>
chris___: so basically you've traded boilerplate around the *call site* where you do the decoration, to boiler plate that appears ONCE and is nicely hidden away inside the ruby decorator method
<banister`sleep>
i prefer the ruby approach :)
<lectrick_>
yeah, what he said basically. :)
xpen has quit [Remote host closed the connection]
jurassic_ has quit [Quit: jurassic_]
<lectrick_>
might just be another case of "where/when/how do we hide the complexity?"
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I was trying to tell you).]
xpen has joined #ruby
ARCADIVS has quit [Ping timeout: 264 seconds]
<chris___>
When using the Observer pattern you don't normally add the wrapping code near the code you are wrapping.
<lectrick_>
banister`sleep: is the block accepting a block arg thing new in 2.0 or is that ruby 1.9?
<chris___>
It's done externally, away from the code you want to tap into
<banister`sleep>
chris___: i'm talking about the Observer pattern to general method decoration approaches
<banister`sleep>
talking beyond*
<banister`sleep>
bbs shower
<chris___>
banister`sleep: do you see any benefits to the Python first class function approach?
<tobago>
I want to code some lines to create a canvas for testing reasons. What is to be prefered to contain the pixel values: 2 dimensional array or hash?
BadLarry_ has quit [Quit: quitting]
chrishough has joined #ruby
<banister`sleep>
chris___: it makes it easier to pass functions around, but as i said, we have blocks for that in ruby instead, so we dont really miss it
daniel_-_ has quit [Ping timeout: 272 seconds]
<banister`sleep>
chris___: but there are a couple of situations where they could be nice, but they're pretty rare
<banister`sleep>
and generally we're pretty spoiled with blocks
<_br_>
Just a quick question is it valid to write <something> if: <something else> in ruby?
aryasam has quit [Ping timeout: 256 seconds]
<tobiasvl>
yes
razibog has joined #ruby
<tobiasvl>
drop the colon
<tobiasvl>
>> puts "hi" if true
BadLarry has joined #ruby
<chris___>
Doesn't block usage seems to be on the decline? I've noticed that in rails they've moved from using blocks to just to naming the method to be called. e.g. from validates {...} to validates :some_method
<_br_>
thats what I thought, where there some some changes in the syntax which would allow if: ? I'm just wondering because I see a sample file here from some guy which uses it
newUser1234 has quit [Remote host closed the connection]
s__dana has joined #ruby
<tobiasvl>
_br_: huh?
chussenot has quit [Quit: chussenot]
mikurubeam has joined #ruby
<bean>
_br_: are you talking about ternary?
mellowMike has joined #ruby
<bean>
> if true : puts "true" ? puts "false"
<_br_>
e.g. validates :first_optin_message, format: /\A[\x20-\x7F\r\n\s]+\Z/, message: 'contains characters that cannot be sent in a text message.', if: Proc.new { |m| !m.first_optin_message.blank? }
<bean>
>> if true : puts "true" ? puts "false"
lewix has joined #ruby
<bean>
WHERE IS EVAL IN
chussenot has joined #ruby
<_br_>
That can't be valid right?
<banister`sleep>
chris___: people have moved away from instance_eval i guess, which is a good thing. :)
<bean>
chris___: I would not say that block usage is on the decline at all. blocks are awesome
nullenc0de has joined #ruby
<_br_>
(I'm reviewing some code here and I just thought huh, did I miss something is there new syntax in ruby?)
<nullenc0de>
can Nokogiri::HTML(open(url)) handle multiple urls
daniel_hinojosa has joined #ruby
<MrZYX>
_br_: real world snippet?
<_br_>
MrZYX: Apparently... wth, right?
<MrZYX>
I mean could we see one :)
newUser1234 has joined #ruby
<_br_>
MrZYX: Nah, its just some potential developer's code I'm reviewing... might submit it to wtf .. :)
robscomputer has quit [Ping timeout: 264 seconds]
<MrZYX>
so it's not actually valid runnable ruby? :P
platzhirsch has left #ruby [#ruby]
failshell has quit [Read error: Connection reset by peer]
ttt has quit [Remote host closed the connection]
jekotia has joined #ruby
<banister`sleep>
chris___: let me give you an example of ruby code using blocks, and u rewrite it in python
matayam has quit [Remote host closed the connection]
<chris___>
banister`sleep: good example.
realDAB has quit [Quit: realDAB]
* lupine
uses with_* methods like that a lot
<chris___>
banister`sleep: there's no doubt that that is awesome
<sepp2k>
_br_: That's just 1.9 hash syntax, no? key: value. The key in this case being :if
<chris___>
banister`sleep: I'm not arguing for Python here.
yost3d has joined #ruby
<_br_>
sepp2k: Is that allowed? Funny... crazy
jamie_ca_ has joined #ruby
X-Jester_ is now known as X-Jester
<lupine>
it's a little nicer than begin_*() ; ... end_*(); but doesn't show off blocks *that* well
<MrZYX>
sepp2k: _br_: I too have the suspiscion that this is just rails validates method being passed the if parameter, that's why I asked for the real line
mellowMike has quit [Ping timeout: 252 seconds]
<_br_>
I'm not a rails person, but is this the standard way of doing things in rails?
atno has quit [Ping timeout: 245 seconds]
<MrZYX>
passing named parameters as hashes? in rails too, yeah
<chris___>
Ruby 2 has named parameters!
moted has quit [Ping timeout: 245 seconds]
<sepp2k>
_br_: It's allowed to write if:, yes, though my irb seems to choke on it for some reason.
<_br_>
I see... ok my bad then, seems I'm behind the moon
<_br_>
Thanks guys for the feedback
moted has joined #ruby
iamevan has joined #ruby
newUser1234 has quit [Remote host closed the connection]
<banister`sleep>
Hanmac: if you were offered a job programming rails instead of php/magneto, would u take it?
chrishough has joined #ruby
cearls has quit [Remote host closed the connection]
<havenwood>
banister`sleep: I'm having fun learning Sinatra, beyond the homepage level I was on, for an API I'm working on.
mahmoudimus has quit [Quit: Computer has gone to sleep.]
includex has quit [Quit: Leaving...]
<havenwood>
banister`sleep: But you've got a point with Rails. :P
<banister`sleep>
havenwood: cool
etcetera has joined #ruby
<Hanmac>
banister`sleep: the next project i get in my current job might be in rails ... so i will see
<lewix>
banister`sleep: did you forget require 'stringio'
huoxito has quit [Quit: Leaving]
<banister`sleep>
lewix: probably
Alan has joined #ruby
tobago has joined #ruby
atno has quit [Ping timeout: 256 seconds]
<havenwood>
The thing I used to think of when PHP came up was that my favorite chess app was written on a PHP framework... but then I checked back and the author ported it to Scala! (en.lichess.org)
<havenwood>
banister`sleep: No CS classes, I shoulda said.
rdark has joined #ruby
<banister`sleep>
tommylommykins: not bad actually
akashj87 has quit [Ping timeout: 245 seconds]
<rdark>
Is there are valid way to pass an array of templates to ERB.new? ([header_template, group_template, footer_template ].map{|t| render(t)} )
<Alan>
heh
<havenwood>
banister`sleep: Always feel like I **must** be missing something. Did philosophy in undergrad, never took a CS class in my life. I don't know C or Java.
mafolz has quit [Ping timeout: 264 seconds]
<Alan>
yes, the python and the ruby look very similar
<carlzulauf>
rdark: wouldn't it make more sense to render a single template that itself rendered the other templates?
dhruvasagar has quit [Ping timeout: 256 seconds]
sleetdrop has quit [Quit: Computer has gone to sleep.]
<havenwood>
banister`sleep: Been dabbling with a little C/C++/C# just to get a grounding. But Scala and Elixir are so much more exciting to play with!
tylersmith has joined #ruby
<rdark>
The output from above evaluates the template variables ok, but the resulting file is a little messed up with non-escaped line breaks and the like apparing
<banister`sleep>
havenwood: C is definitely worth learning
<rdark>
carlzulauf: Yeah, I guess I could do that..
<carlzulauf>
you could put it in a folder called layouts
<havenwood>
banister`sleep: I should probably just pick up a book on C, and slog through it.
<havenwood>
Maybe I'll do that today.
a_a_g has joined #ruby
<banister`sleep>
havenwood: read one of those books on 'modern c', i think o'reilly has one
<havenwood>
nice, <3 o'reilly
<rdark>
havenwood: The C programming language is supposedly 'The Book' on C
<havenwood>
The Ruby Programming Language is a great book!
<havenwood>
rdark: Cool, will check it out.
s__dana has joined #ruby
_nitti has quit [Read error: No route to host]
_nitti has joined #ruby
<havenwood>
Maybe I'll try to pick up Eloquent Ruby while I'm at it, can't remember why I want to read that but I remember I do.
crazysim has quit [Ping timeout: 256 seconds]
xpen_ has quit [Ping timeout: 256 seconds]
brhelwig has quit [Remote host closed the connection]
_nitti has quit [Read error: Connection reset by peer]
<banister`sleep>
rdark: i dont think it covers c99 thought does it?
_nitti has joined #ruby
<banister`sleep>
maybe they updated it
Uranio has joined #ruby
<rdark>
banister`sleep: no, published in something like 1988
<banister`sleep>
ah
bricker is now known as bricker`L
_nitti has quit [Read error: No route to host]
bricker`L is now known as bricker`LA
brhelwig has joined #ruby
_nitti has joined #ruby
guilleiguaran__ is now known as guilleiguaran_
BSaboia has quit [Remote host closed the connection]
peterhellberg has quit [Remote host closed the connection]
carloslopes has joined #ruby
<rdark>
banister`sleep: I thought there was a c11 out now as the latest ANSI spec?
<banister`sleep>
rdark: yeah
<banister`sleep>
rdark: i dont think it has that many cool things though
duosrx has quit [Remote host closed the connection]
<banister`sleep>
it does have anonymous structs
<banister`sleep>
i think
sambao21 has quit [Quit: Computer has gone to sleep.]
<rdark>
automated memory management? I always remember that being fun back in my CS days
mockra has joined #ruby
<banister`sleep>
no, i dont think C will ever have that ;)
twoism has joined #ruby
jpcamara_ has quit [Quit: jpcamara_]
shock_one has quit [Ping timeout: 245 seconds]
noxoc has quit [Quit: noxoc]
_nitti has quit [Read error: No route to host]
_nitti has joined #ruby
<ismell>
what does X-Cascade do in rack?
a_a_g has quit [Quit: Leaving.]
banister`sleep has quit [Remote host closed the connection]
whitenoise has quit [Quit: This computer has gone to sleep]
crazysim has joined #ruby
crazysim has quit [Excess Flood]
atyz has quit [Quit: Leaving...]
breakingthings has quit []
crazysim has joined #ruby
sambao21 has joined #ruby
r0bby has joined #ruby
_nitti has quit [Read error: Connection reset by peer]
daniel_hinojosa has joined #ruby
_nitti has joined #ruby
_nitti_ has joined #ruby
shirokuro11 has quit [Remote host closed the connection]
Eiam has joined #ruby
Proshot has joined #ruby
brhelwig has quit [Remote host closed the connection]
Alan has left #ruby [#ruby]
robbyoconnor has quit [Ping timeout: 256 seconds]
<threesome>
I get a problem with installling rbenv on Ubuntu: I get an error about openssl: "You must recompile Ruby with OpenSSL support or change the sources in your Gemfile from 'https' to 'http'. Instructions for compiling with OpenSSL using RVM are available at rvm.io/packages/openssl." How can I solve it?
<threesome>
Doing 'require openssl' fails
mikurubeam has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
realDAB has joined #ruby
_nitti has quit [Ping timeout: 252 seconds]
atno has joined #ruby
ianbrandt_ has joined #ruby
_nitti_ has quit [Ping timeout: 248 seconds]
_nitti has joined #ruby
duosrx has joined #ruby
ferdev has quit [Quit: ferdev]
danneu has joined #ruby
BSaboia has joined #ruby
ianbrandt has quit [Ping timeout: 256 seconds]
ianbrandt_ is now known as ianbrandt
arturaz has quit [Ping timeout: 272 seconds]
bricker`LA has quit [Ping timeout: 245 seconds]
mahmoudimus has joined #ruby
_bart has quit [Ping timeout: 240 seconds]
cobragoat has joined #ruby
realDAB has quit [Ping timeout: 248 seconds]
chussenot has quit [Quit: chussenot]
twoism has quit [Remote host closed the connection]
tobor_one has quit [Read error: Connection reset by peer]
jrajav has quit [Quit: phunq, sandwich store loop, WHAT NO UNIVERSE]
slainer68 has quit [Remote host closed the connection]
codecop has joined #ruby
_maes_ has quit [Ping timeout: 245 seconds]
wgosling_ has left #ruby ["Konversation terminated!"]
<Hanmac>
threesome: or apt-get build-dep ruby1.9.1
markalanevans has quit [Quit: markalanevans]
crazysim has joined #ruby
crazysim has quit [Excess Flood]
ArchBeOS has joined #ruby
ArchBeOS has joined #ruby
ArchBeOS has quit [Changing host]
ParanoidSP has joined #ruby
marcdel has joined #ruby
swex has quit [Read error: Operation timed out]
aedorn has joined #ruby
bpfh has joined #ruby
apeiros_ has quit [Remote host closed the connection]
krisfremen has quit [Read error: Connection reset by peer]
krisfremen has joined #ruby
Mon_Ouie has quit [Ping timeout: 245 seconds]
twoism has quit [Ping timeout: 248 seconds]
nomenkun has quit [Read error: Operation timed out]
dhruvasagar has joined #ruby
banjara has joined #ruby
swex has joined #ruby
c0rn has joined #ruby
akashj87 has joined #ruby
dawkirst has joined #ruby
mlpinit has quit [Quit: mlpinit]
r0bby_ has joined #ruby
celestius has joined #ruby
atyz has joined #ruby
rupee has joined #ruby
r0bby has quit [Ping timeout: 264 seconds]
jgrevich has joined #ruby
obfuscate2 has joined #ruby
Dave has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave is now known as Guest73253
_br_ has quit [Excess Flood]
celestius has quit [Client Quit]
celestius has joined #ruby
jnoob22 has quit [Ping timeout: 248 seconds]
dylan has quit [Quit: Leaving]
_br_ has joined #ruby
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
theRoUS has quit [Ping timeout: 264 seconds]
musl has quit [Quit: WeeChat 0.3.9.2]
musl has joined #ruby
akashj87_ has joined #ruby
akashj87 has quit [Quit: leaving]
kennyvb has quit [Ping timeout: 252 seconds]
ferdev has joined #ruby
akashj87_ has quit [Client Quit]
atyz has quit [Ping timeout: 256 seconds]
_br_ has quit [Excess Flood]
cmarques has quit [Ping timeout: 246 seconds]
mlpinit has joined #ruby
musl has quit [Remote host closed the connection]
ParanoidSP has quit [Ping timeout: 245 seconds]
<threesome>
Hanmac, havenwood: do I need to do this if I'm not installing a 'system ruby' (i.e. not doing 'sudo apt-get install ruby'), but rather only having Ruby available to one user through rbenv?
ephemerian has left #ruby [#ruby]
musl has joined #ruby
kennyvb has joined #ruby
<Hanmac>
threesome build-dep only installs the stuff needed to build ruby, it does not install any "system ruby" ...
musl has quit [Remote host closed the connection]
<havenwood>
threesome: If you are compiling Ruby yourself you need those libs so Ruby can static link to them. With a dynamic link build of Ruby you don't.
_br_ has joined #ruby
<havenwood>
threesome: Are you compiling yourself or using ruby-build+rbenv?
musl has joined #ruby
cearls has joined #ruby
<Hanmac>
PS: okay i was lying ... it does install an system ruby but only because you need ruby to build ruby :P
<havenwood>
threesome: Or you can use apt-get's Ruby. :P
<threesome>
havenwood, how can I tell whether the 'rbenv install' command does a static or dynamic install?
breakingthings has joined #ruby
mityaz has joined #ruby
maxmanders has joined #ruby
<havenwood>
threesome: Ahh, yeah, `rbenv install` is just a shortcut to ruby-build.
crazysim has joined #ruby
crazysim has quit [Excess Flood]
<threesome>
Hanmac, the build-dep wants to bring in 50 new packages, does that sound about right? What's the difference between bringing in the packages that havenwood suggested?
crazysim has joined #ruby
razibog has quit [Quit: Leaving.]
akashj87 has joined #ruby
<threesome>
havenwood, so with rbenv install that means I do need to bring in dependencies?
akashj87 has quit [Read error: Connection reset by peer]
<Hanmac>
threesome yes, havenwood maybe miss some packages, or the packages that havenwood sugesst require another packages
<havenwood>
The latter, I think.
sambio has joined #ruby
jgrau has joined #ruby
chris___ has quit [Ping timeout: 245 seconds]
jonathanwallace has joined #ruby
<havenwood>
threesome: Yes. You need them if you want all features of Ruby to work. As long as you don't use anything that depends on one of those it should be fine. But stuff like OpenSSL is likely to get used. :P
akashj87 has joined #ruby
musl has quit [Remote host closed the connection]
<havenwood>
threesome: I'd install the list of Ruby dependencies, for sure.
musl has joined #ruby
banister_ has joined #ruby
browndawg has joined #ruby
jurassic_ has joined #ruby
banister`sleep has quit [Read error: Connection reset by peer]
<nullenc0de>
is it possible to run ruby script on apache?
zetaspartan2552 has joined #ruby
mikewintermute has quit [Quit: mikewintermute]
<havenwood>
nullenc0de: Yes.
ananthakumaran has quit [Quit: Leaving.]
<threesome>
Hanmac, I should do build-dep with ruby1.9.1 or ruby1.9.3 or ruby?
jpcamara has joined #ruby
akashj87 has quit [Client Quit]
girija has quit [Ping timeout: 245 seconds]
<nullenc0de>
everytime i try it doesnt work
<havenwood>
threesome: ruby1.9.1
<threesome>
havenwood, why is that?
<havenwood>
Hanmac: Isn't ruby1.9.3 just an alias to ruby1.9.1
<Hanmac>
threesome: ruby1.9.3 and ruby are metapackages
whitenoise has joined #ruby
obfuscate2 has quit [Ping timeout: 240 seconds]
akashj87 has joined #ruby
<havenwood>
Hanmac: ahhh
<MrZYX>
debian (thus ubuntu) uses the ABI version in their packages
maxmanders has quit [Quit: Computer has gone to sleep.]
akashj87 has quit [Read error: Connection reset by peer]
crazysim has quit [Ping timeout: 256 seconds]
<threesome>
Ah I see
<MrZYX>
and that's still 1.9.1 for the 1.9 branch
<threesome>
So if I don't want a system ruby I should bring in just the few dependencies listed by havenwood, otherwise is it preferrable to do the 'build-dep ruby1.9.1' suggested by Hanmac?
<havenwood>
threesome: The dependencies I listed are the Ruby dependencies. If you want MRI then good idea to install them. I don't know what all the build-deps are for apt-get's Ruby package.
akashj87 has joined #ruby
pi3r has quit [Quit: Leaving]
mikurubeam has quit [Remote host closed the connection]
<havenwood>
Hanmac: I guess that gist isn't really using apt-get to install Ruby-2.0, just doing build-dep like you said then compiling. Nvm.
havenwood has quit [Remote host closed the connection]
jacktrick has joined #ruby
mercwithamouth has joined #ruby
etcetera has quit []
markalanevans has joined #ruby
markalanevans has quit [Read error: Connection reset by peer]
brhelwig has joined #ruby
etcetera has joined #ruby
ferdev has quit [Read error: Connection reset by peer]
<threesome>
havenwood, it's bringing in the following 50 dependencies, seems like a bit much: autoconf automake autotools-dev bison cdbs chrpath debhelper dh-apparmor dh-translations html2text intltool libbison-dev libencode-locale-perl libfile-listing-perl libgdbm-dev libhtml-parser-perl
<havenwood>
Hanmac: Good! Now if they can fix the horrible performance regressions I'll jump back on ruby-head!
Zai00_ has joined #ruby
<havenwood>
Hanmac: Glad they are giving named keyword params more love.
<banister`sleep>
Hanmac: very coool
idkazuma has quit [Remote host closed the connection]
<Hanmac>
havenwood: there is :keyreq as type too, but its not in 2.0
<otters>
are kwargs causing performance regressions?
<havenwood>
otters: Don't think that is what is causing the issues. Not sure why it is slow clunky, might be I was using too old a 2.1. Updating to dev now.
<Hanmac>
otters not more than when you do it yourself
aedorn has quit [Quit: Leaving]
ckrailo has joined #ruby
<otters>
heh
hiyakashi has quit [Quit: お前は知りすぎた]
Zai00 has quit [Ping timeout: 264 seconds]
Zai00_ is now known as Zai00
<havenwood>
Nope, same issues on most recent build. Everything I run on 2.1 is twice as slow as 2.0. >.>
jtharris has quit [Ping timeout: 248 seconds]
sonda has quit [Remote host closed the connection]
obs_ has quit [Quit: Konversation terminated!]
Elhu has quit [Quit: Computer has gone to sleep.]
danslo has joined #ruby
jtharris has joined #ruby
timmow has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 245 seconds]
ianbrandt has quit [Remote host closed the connection]
ianbrandt has joined #ruby
lewix_ has joined #ruby
Giorgio has joined #ruby
bubblehe_ has quit [Ping timeout: 245 seconds]
ToApolytoXaos has joined #ruby
crazysim has joined #ruby
atmosx has quit [Quit: And so the story goes…]
aedorn has joined #ruby
dr_bob has left #ruby [#ruby]
josefrichter has quit [Quit: josefrichter]
lewix has quit [Ping timeout: 264 seconds]
Tricon has joined #ruby
ianbrandt has quit [Quit: ianbrandt]
sambao21 has joined #ruby
spider-mario has joined #ruby
crazysim has quit [Ping timeout: 256 seconds]
_nitti has joined #ruby
Nisstyre has quit [Ping timeout: 264 seconds]
jacktrick has quit [Quit: Leaving]
mercwithamouth has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
Al____ has quit [Quit: Al____]
duosrx has quit [Remote host closed the connection]
crazysim has joined #ruby
pioz has joined #ruby
tylersmith has quit [Quit: tylersmith]
huoxito has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
xardas has joined #ruby
_nitti has quit [Ping timeout: 245 seconds]
Spooner has joined #ruby
brhelwig has joined #ruby
tricon_ has joined #ruby
Tricon has quit [Read error: Connection reset by peer]
daniel_-_ has joined #ruby
Zai00 has quit [Quit: Zai00]
pitzips has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
br4ndon has joined #ruby
daniel_-_ has quit [Client Quit]
Hanmac has quit [Ping timeout: 264 seconds]
sambao21 has joined #ruby
blaxter has quit [Ping timeout: 248 seconds]
atyz has joined #ruby
Nisstyre has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
icole has joined #ruby
jacktrick has joined #ruby
crazysim has quit [Ping timeout: 245 seconds]
haxrbyte_ has joined #ruby
krisfremen has quit [Read error: Connection reset by peer]
blueOxigen has joined #ruby
theRoUS has joined #ruby
haxrbyte has quit [Ping timeout: 272 seconds]
chson has joined #ruby
chson has quit [Remote host closed the connection]
atno has quit [Ping timeout: 240 seconds]
atyz has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Read error: No route to host]
mmitchel_ has joined #ruby
bluOxigen has joined #ruby
fire has joined #ruby
sambio has quit [Ping timeout: 264 seconds]
krisfremen has joined #ruby
krisfremen has quit [Changing host]
krisfremen has joined #ruby
mmitchell has quit [Read error: Connection reset by peer]
cableray has joined #ruby
tobago has joined #ruby
blueOxigen has quit [Ping timeout: 264 seconds]
_nitti has joined #ruby
crazysim has joined #ruby
Rhy0lite has left #ruby ["Leaving"]
<xibalba>
would ruby be fast enough to create a TCP or UDP relay/proxy?
blueOxigen has joined #ruby
_nitti_ has joined #ruby
<apeiros_>
xibalba: I don't see how that's related with "fast"
<xibalba>
i'm sure at small volumes, but lets say for example 20-50mbit/sec
eldariof has joined #ruby
ArchBeOS has left #ruby ["Leaving"]
<xibalba>
fast as opposed to trying to do it in C. Ruby would be quicker, obviously C is faster. I'm looking for a balance
<apeiros_>
performance is not just a property of the implementing language
<apeiros_>
I suggest you do a proof of concept and measure.
swingha has quit [Quit: WeeChat 0.4.0]
alvaro_o has joined #ruby
bluOxigen has quit [Ping timeout: 252 seconds]
mattbl has joined #ruby
NiteRain has quit [Ping timeout: 240 seconds]
mellowMike has joined #ruby
rsampaio_ has quit [Ping timeout: 246 seconds]
dhruvasagar has quit [Ping timeout: 264 seconds]
sepp2k has quit [Quit: Leaving.]
<bpfh>
hey guys, I have a module that defines a method and I'd like this method shared between the many classes that I have inside this module, is there a way to do that?
lushious has joined #ruby
<apeiros_>
you include the module into those classes
_nitti has quit [Ping timeout: 248 seconds]
dhruvasagar has joined #ruby
<bpfh>
without including
<apeiros_>
bpfh: anything else you "forgot" to say?
<bpfh>
no lol
supergiantrobot has joined #ruby
<apeiros_>
also: why without including?
tenmilestereo has joined #ruby
supergiantrobot has quit [Client Quit]
<breakingthings>
apeiros_: also, you have to do it without ever running a "require" statement!
<apeiros_>
breakingthings: and with less than 10 chars!
supergiantrobot has joined #ruby
<apeiros_>
for no apparent reason, of course
<breakingthings>
because performant code!
<breakingthings>
webscale!
<bpfh>
come on, guys
<apeiros_>
webscale is yestermillenial
* breakingthings
finishes trolling and goes on to other things again
Hanmac has joined #ruby
<apeiros_>
roflscale is IT!
<bpfh>
I just don't want to include the parent module ten times in my classes that live inside it
jgrevich_ has joined #ruby
<apeiros_>
well, then you just can't have those methods shared.
jgrevich has quit [Ping timeout: 246 seconds]
jgrevich_ is now known as jgrevich
maxmanders has joined #ruby
musl has quit [Quit: WeeChat 0.3.9.2]
DanKnox has quit [Ping timeout: 256 seconds]
mvangala_ has joined #ruby
<bpfh>
ok, you could have said 'no' without bashing me for asking that
juarlex_ has joined #ruby
juarlex has quit [Read error: Connection reset by peer]
cmarques has joined #ruby
mvangala has quit [Read error: Connection reset by peer]
<breakingthings>
bpfh: I'm just a regular pain in the bum, don't mind me
anonico has joined #ruby
musl has joined #ruby
<breakingthings>
my existence serves merely to suit my own entertainment purposes
arietis has joined #ruby
<apeiros_>
bpfh: if the methods are unrelated to the classes, you can define them as a module_function and call them on the defining module.
<apeiros_>
c.f. Math module, Math.sin(x) and include Math; sin(x) both work.
slocate has joined #ruby
anonico has left #ruby [#ruby]
ph^ has joined #ruby
shock_one has joined #ruby
<bpfh>
yes, I know this alternative but before using it I'd like to ask if there was a more practical method of making a method 'trickle down' in the lower contexts
tevio has quit [Remote host closed the connection]
<bpfh>
I just didn't think this question would offend people here lol
<apeiros_>
it's not the question. it's how you go about it.
<apeiros_>
if you don't want to annoy people (or me) the way you just did - show your code, say what you don't like about it and ask how to improve
banister`sleep has quit [Remote host closed the connection]
colonolGron has joined #ruby
<jblack>
bpfh: I think they gave you the answer, and you _did_ change question after you asked it. I'd just say "thanks for the answer" and not bash them for having given you an answer. They didn't call you names.
r0bby_ is now known as robbyoconnor
<apeiros_>
this "hey I want do do X", with an obvious way to do it, and then come again and saying "oh, but without that!" and in the end claiming you knew alternatives - that's just utter douchy.
jpcamara has quit [Ping timeout: 245 seconds]
jpcamara has joined #ruby
<jblack>
you could be evil and add a coulpe lines to your toplevel script that finds and adds all *.rb files.
_nitti_ has quit [Remote host closed the connection]
heliumsocket has quit [Quit: heliumsocket]
<apeiros_>
right, use Kernel. don't mind the fallout
_nitti has joined #ruby
atno has joined #ruby
Nisstyre-laptop has joined #ruby
mikurubeam has joined #ruby
lkba has joined #ruby
<jblack>
I don't think namespace pollution is a concern of his at this point in time. It's ok to leave your toys out on the floor if ya only have a couple. =)
ARCADIVS has quit [Quit: WeeChat 0.3.8]
Spooner has quit [Remote host closed the connection]
<apeiros_>
I disagree. IMO coding is a lot about habits. don't build bad habits.
<apeiros_>
also IME :)
<bpfh>
jblack, I didn't bash anyone for giving me an answer, I just added an extra condition in my question and that guy came with sarcastic comments
<Hanmac>
if you want to avoid namespace pollution you could use anonymous modules :D
<jblack>
apeiros_: I'm not going to argue with someone that has 18 times my experience and probably 140% that of my intelligence.
nomenkun has quit [Remote host closed the connection]
<Hanmac>
nik_-_: class << self is some kind of magic to open the singleton class of self
<nik_-_>
i get that.. i just find it strange that it is not part of the api anywhere
dhruvasagar has quit [Ping timeout: 264 seconds]
<nik_-_>
i.e. it seems like there should be a property/method called class and your performing << on that property.. just saying its magic doesnt make sense to me
robbyoconnor has quit [Remote host closed the connection]
<nik_-_>
and also opens singleton class somehow
hamakn has quit [Ping timeout: 240 seconds]
<Hanmac>
Boohbah: and does append Strings and does append Arrays ... etc
slocate has quit [Ping timeout: 264 seconds]
robbyoconnor has joined #ruby
banisterfiend has quit [Ping timeout: 245 seconds]
<nik_-_>
an operator can do different things based on how the class defines it
<nik_-_>
im just looking for this definition
<Boohbah>
aye
<nik_-_>
in the context of class << self
<Boohbah>
not sure where those docs are
<nik_-_>
me either :(
<Boohbah>
what class implements that method in that context?
<nik_-_>
yeah
<nik_-_>
i looked at Class Object and Module
ryanf has joined #ruby
<nik_-_>
and did not see anything there
mikurubeam has joined #ruby
_veer has joined #ruby
_veer has quit [Changing host]
_veer has joined #ruby
<Boohbah>
not BasicObject either
AtoxIO has quit [Remote host closed the connection]
<Hanmac>
apeiros_: ... i tryed instance_eval, class_eval and module_eval ... but with all of them i cant get that the block {class A;end} defines the class in my wanted (singleton_class) scope :( ... it only works with class <<
shock_one has quit [Ping timeout: 248 seconds]
<Hanmac>
Boohbah & nik_-_ "class << self" is not an method its part of the Parser
m8 has joined #ruby
<nik_-_>
hmm
wolcanus_ has joined #ruby
pioz has quit [Remote host closed the connection]
<nik_-_>
Hanmac is that documented somewhere?
pioz has joined #ruby
<nik_-_>
what you're saying sounds plausible but i just want to see it
<nik_-_>
i think its weird that theres so many descriptions of this mechanism but no actual file that says 'this is defined here'
mmitchel_ has quit [Remote host closed the connection]
sk87 has joined #ruby
wolcanus has quit [Ping timeout: 248 seconds]
mmitchell has joined #ruby
wallerdev has joined #ruby
ukd1 has joined #ruby
danslo has quit [Quit: danslo]
fire has quit [Ping timeout: 246 seconds]
<ukd1>
Is there a better way to instantiate a class from a string than Module.const_get(the_string).new....?
duosrx has joined #ruby
tevio has joined #ruby
momomomomo has joined #ruby
flayer has joined #ruby
pioz has quit [Remote host closed the connection]
<Hanmac>
ukd1: i dont think so
pioz has joined #ruby
<ukd1>
Hanmac, ok great!
<Hanmac>
ha i knew it !! the rails devs dont read the Documentations!!! http://ruby-doc.org/core-2.0/doc/security_rdoc.html there is a section about YAML: " Do not use YAML to deserialize untrusted data." ... but the rails devs are to dump to read :D
pioz has quit [Remote host closed the connection]
rdark has quit [Ping timeout: 245 seconds]
atyz has joined #ruby
yannis has quit [Quit: Bye!]
<MrZYX>
Hanmac: that's in the 1.8 version too?
chrishough has quit [Quit: chrishough]
yacks has quit [Quit: Leaving]
<Hanmac>
MrZYX: hm no i think the doc is new in 2.0 ... maybe because of the annoying rails devs :P
<Hanmac>
... but i dont think that that rails devs will ever read that :D
<MrZYX>
good just wanted to double check that you're still as arrogant as they are ;P
whitedawg has quit [Quit: Leaving.]
mattbl has joined #ruby
Morkel_ has joined #ruby
duosrx has quit [Remote host closed the connection]
robbyoconnor has quit [Remote host closed the connection]
wolcanus_ has quit [Remote host closed the connection]
tevio has quit [Remote host closed the connection]
<shevy>
hmm
Morkel has quit [Ping timeout: 245 seconds]
Morkel_ is now known as Morkel
<shevy>
they wrote something used by many people
tobago has quit [Ping timeout: 264 seconds]
<BadQuanta>
Any suggestions about not being able to load a DLL from an arbitrary location with FFI under Windows?
banister_ has quit [Read error: Connection reset by peer]
<BadQuanta>
It works fine when the DLL is sitting in it's originally installed directory with the application it comes with.
banisterfiend has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
robbyoconnor has joined #ruby
<BadQuanta>
Yet it is intended to be re-distributed with other applications that integrate and operates over TCP/IP
cantonic has joined #ruby
<shevy>
what type of windows? XP?
<BadQuanta>
Windows 7 & XP
<BadQuanta>
However, Windows 7 if it becomes an issue between versions.
jgrau has quit [Remote host closed the connection]
<BadQuanta>
I've included the DLL in my repo's vendor folder.
jgrau has joined #ruby
<BadQuanta>
When I give it an absolute path to the original install DIR, it loads fine.
<BadQuanta>
When I point it to the copy in my vendor dir, it fails to load.
atyz has quit [Ping timeout: 248 seconds]
<shevy>
hmm and this happens on XP as well? win 7 somehow can behave strangely, I think the trusted-thingy is strange, require pp; pp Dir['*'] would display different results from other things
fire has joined #ruby
<BadQuanta>
I'm not an experienced windows programmer, but I've used FFI under Linux
<BadQuanta>
I'll double check on XP now.
<BadQuanta>
(pushing changes)
<shevy>
I forgot what way is used to list files
<shevy>
on win 7
divout has joined #ruby
hmarr has quit [Ping timeout: 240 seconds]
<shevy>
aedorn or someone else here tried that command... hmm
mengu has joined #ruby
* Hanmac
is a binding writer, he points and laugh about FFI
devdazed_ has quit [Quit: Bye]
rasbonics has quit [Quit: rasbonics]
devdazed has joined #ruby
rezzack has joined #ruby
<BadQuanta>
shevy: Looks like you are right, the issue isn't occuring on my XP machine.
<BadQuanta>
Win7 is where I'm developing, but the XP machine is the current testing machine.
<platzhirsch>
I have been playing around with pry and debugger-pry a bit, I really enjoyed it so far. The only thing I am missing it setting breakpoints inside of pry. While binding.pry works just fine, any idea how to approach this in library code?
mikurubeam has joined #ruby
MrZYX is now known as MrZYX|off
<joofsh>
When you're installing a gem (like rmagick) and you want to point it at the source of a dependency (like imagemagick), what's the correct command to say "look at this directory for files you need while installing"
<joofsh>
i've seen posts that do C_INCLUDE_PATH=/some/path gem install rmagick Is that the correct syntax or is there another one I should be using? I can't seem to get that one to see the files that clearly do exist
<Hanmac>
joofsh there may be some option like --with-imagemagick-dir or something
i_s has joined #ruby
jgrau has quit [Remote host closed the connection]
<rontec76_>
At the risk of being scorned I'll warn you all up front that I'm dealing with a Ruby on Windows issue. Specifically, I'm writing some simple wrappers for some Win based command line tools. Overall this is working well but I've run into a couple of the commands which apparently set encoding on their output to UTF-16. The side affect is when I call the commands through my methods in irb the output is all garbled. Any
<rontec76_>
one have experience dealing with such encodings in cli output?
marcdel has joined #ruby
jgrau has joined #ruby
angusiguess has quit [Ping timeout: 240 seconds]
<banisterfiend>
platzhirsch: why not use pry-debugger instead
rmcafee has joined #ruby
maxmanders has quit [Ping timeout: 264 seconds]
davidmz has joined #ruby
davidmz has left #ruby [#ruby]
tenmilestereo has quit [Quit: Leaving]
nomenkun has joined #ruby
<lectrick>
How can I tweak what the "rake" command does, with no arguments, for my rails app?
Rioji has joined #ruby
rmcafee has quit [Client Quit]
<platzhirsch>
banisterfiend: I tried that one, too. But inside the pry mode I cannot step through the code
<banisterfiend>
platzhirsch: yeah u can, using 'step' :)
kofno has joined #ruby
<platzhirsch>
banisterfiend: ok, let me try that one again. I thought I did that already
maxmanders has joined #ruby
_nitti has quit [Read error: No route to host]
bradleyprice has joined #ruby
<bean>
platzhirsch: banisterfiend knows a thing or two about pry ;) I'd trust him :p
<platzhirsch>
bean: I do already, I am just confused with myself ^^
chriskk has joined #ruby
jgrau has quit [Remote host closed the connection]
k610 has joined #ruby
<Hanmac>
bean he wrote it so he SHOULD know about it :P
blaines has joined #ruby
k610 has quit [Client Quit]
<bean>
Hanmac: i know thus the ;) face
finishingmove has joined #ruby
Nisstyre-laptop has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
davidmz_ has joined #ruby
ritek has quit [Remote host closed the connection]
<chriskk>
I'm fiddling with this gem and can't figure out how to call the hira_to_kata method
supergiantrobot has quit [Read error: Operation timed out]
<chriskk>
it's a gem that adds methods to the String class
matburt has joined #ruby
matburt has left #ruby [#ruby]
geekbri has quit [Remote host closed the connection]
bakingbread has joined #ruby
supergiantrobot has joined #ruby
_nitti has joined #ruby
chessguy has quit [Remote host closed the connection]
havenwood has joined #ruby
<Boohbah>
>> ("%2X" % 68).split(//).map(&:to_i)
flayer has quit []
<chriskk>
agh, figured it out, I need to chain it onto a string
kofno has quit [Ping timeout: 248 seconds]
<chriskk>
which doesn't make sense, because you need to feed it the string to convert ...
jgrau has joined #ruby
<davidmz_>
I want to use both Sinatra and ActionMailer together but I get a Gem::LoadError saying that rack 1.5.2 is in conflict with 1.4.5, they seem to be the same major version, how can fix this issue,
<ismell>
is it possible to add instance methods to a specific object instance?
<banisterfiend>
and install pry-debugger
<banisterfiend>
ismell: yeah
<ismell>
hows that work?
<banisterfiend>
ismell: def my_instance.my_method; end
hadees has joined #ruby
etcetera has joined #ruby
<tommylommykins>
hmm
<ismell>
so if i have a = MyClass.new; def a.my_method; end;
<ismell>
that will work?
<tommylommykins>
if the . operator is a 'subset' of the :: operator, why does it even exist?
<tommylommykins>
you could just use :: everywhere...
tjbiddle has joined #ruby
<platzhirsch>
banisterfiend: good call, that's what I wanted to do anyway. Okay, now also the finish alias command works, no seg faults
<platzhirsch>
thanks for talking me through this, now let's get productive
eldariof has quit []
jcrawford has quit [Ping timeout: 240 seconds]
sebastianb has quit [Ping timeout: 246 seconds]
rontec76_ is now known as sadmonkee
sebastianb has joined #ruby
<banisterfiend>
platzhirsch: k00
<banisterfiend>
tommylommykins: '.' is nicer
<banisterfiend>
tommylommykins: :: is clumsy to type :)
carloslopes has quit [Remote host closed the connection]
<lectrick>
banisterfiend: apeiros_ I just want a slick way to add to $LOAD_PATH in a test helper. $LOAD_PATH.tap{|lp| lp.push(*%w[ test lib ].map{|d| File.join(Dir.pwd, d)})}.uniq!
rupee has quit [Quit: Leaving]
failshell has quit [Remote host closed the connection]
sambio has joined #ruby
<lectrick>
That works... but it's a little fugly. Or dense? Something. :)
lewix_ is now known as lewix
lewix has quit [Changing host]
lewix has joined #ruby
lucaspiller___ has joined #ruby
skbierm_ has quit [Quit: Verlassend]
<banisterfiend>
lectrick: Hanmac will give u a hand ;)
<banisterfiend>
he's attracted to weird code like a lioness to a wounded and dying warthog
<bean>
loll
<bean>
I'd be terrified to work with any of hanmac's code.
<bean>
i'll be honest
<bean>
no offense to Hanmac
<tommylommykins>
"ohai"::length #=> 4
<tommylommykins>
so what's going on there?
<lectrick>
banisterfiend: LOL
<tommylommykins>
I assume that still does normal message passing?
<lectrick>
I did not realize that "autoload" was core, and not something Rails added. interesting
tommyvyo has quit [Quit:]
<bean>
>> "ohai"::length
<banisterfiend>
lectrick: it's being removed soon enough i think
<bean>
oh right eval in bot is dead.
<banisterfiend>
tommylommykins: yes, it's exactly like '.' in that case
rburton- has joined #ruby
tonini has joined #ruby
theRoUS has quit [Ping timeout: 276 seconds]
<tommylommykins>
banisterfiend: Is there any document that explains the exact semantics?
<Hanmac>
:: and . are only different for uppercase stuff
FDj has quit [Remote host closed the connection]
slainer68 has joined #ruby
<bean>
:: is just a scope resolution operator
j^2 has quit [Quit: for i in `/names` ; do adios $i; done]
Xeago_ has quit [Ping timeout: 245 seconds]
<banisterfiend>
tommylommykins: im sure books explain it, not sure about books per se though
<banisterfiend>
err
<banisterfiend>
docs
<tommylommykins>
bean: It's a scope resolution operator... that also does message passing?
<Hanmac>
bean yes and no, you could use it for method calls too
<bean>
tommylommykins: what Hanmac says :)
<Hanmac>
IF the methods are lowercase OR (parentheses) are used
sebastianb has quit [Ping timeout: 246 seconds]
<Hanmac>
uppercase stuff without () and parameters are treated as constants
chessguy has joined #ruby
davidmz_ has joined #ruby
sebastianb has joined #ruby
musl has quit [Remote host closed the connection]
musl has joined #ruby
musl has quit [Client Quit]
<banisterfiend>
Hanmac: what's your opinion of the "<3" emoticon?
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
<Hanmac>
its an icecorn with two ice balls
angusiguess has joined #ruby
sebastorama has joined #ruby
slainer68 has quit [Ping timeout: 248 seconds]
mityaz has quit [Quit: See ya!]
freerobby has quit [Quit: Leaving.]
bradleyprice has quit [Remote host closed the connection]
jjbohn has joined #ruby
jcrawford has joined #ruby
Matip has joined #ruby
_nitti has quit [Remote host closed the connection]
<shevy>
Hanmac did you, like apeiros_, ever want to create your own language?
pkrnj has joined #ruby
<Hanmac>
hmmm no ... ruby is fine :P
skattyadz has joined #ruby
bradleyprice has joined #ruby
<shevy>
hehe
mercwithamouth has quit [Ping timeout: 245 seconds]
<davidmz_>
I want to use ActionMailer and Sinatra together but I get a gem load error over rack version collision 1.5.2 and 1.4.5 seems like this suppose to work as those are both same major version, how can I fix this problem
<lectrick>
banisterfiend: so basically, don't use it? (re: autoload)
<chriskk>
banisterfiend: thx
TooTubular has quit [Quit: Leaving...]
<banisterfiend>
lectrick: Yeah, probably dont use it, matz has hinted strongly he wants to kill it
musl has joined #ruby
m8 has quit [Ping timeout: 264 seconds]
wolcanus has left #ruby ["Leaving..."]
postmodern has joined #ruby
<Hanmac>
rubygems itself does still use autoload, but i think matz does not like it
<lectrick>
banisterfiend: Hanmac Is it due to the threading issue? And if so, doesn't "require" basically have that same issue?
tonini has quit [Remote host closed the connection]
jjbohn|afk has quit [Ping timeout: 248 seconds]
<Hanmac>
i dont know
baphled has quit [Client Quit]
moos3 has quit [Quit: Computer has gone to sleep.]
adkron has joined #ruby
motto has quit [Ping timeout: 245 seconds]
musl has quit [Client Quit]
kofno has quit [Ping timeout: 240 seconds]
newUser1234 has quit [Remote host closed the connection]
<Hanmac>
i would like to have to have autoload_relative that uses require_relative compared to the other autoload, ... and i want require_into where you can give it a binding and the required one does not polute the main scope :P
chessguy has quit [Remote host closed the connection]
baphled has joined #ruby
newUser1234 has joined #ruby
baphled has quit [Client Quit]
<shevy>
gcc: error: /Programs/Glib/2.35.8/lib/libgio-2.0.so: No such file or directory
phantasm66 has quit [Quit: *sleeeep….]
<shevy>
this is why I hate libtool
<shevy>
time to rewrite it in ruby
m8 has joined #ruby
mikurubeam has quit [Quit: +1 (Yes). -1 (No). i (What I have been trying to tell you all along).]
newUser1234 has quit [Remote host closed the connection]
sadmonkee has quit [Remote host closed the connection]
g4mm4 has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
skattyadz has quit [Ping timeout: 248 seconds]
generalissimo has quit [Remote host closed the connection]
<platzhirsch>
if I want to invoke a method of the class instance itself, do I do so with self.send(:method_name)?
sambao21 has joined #ruby
akashj87_ has joined #ruby
jjbohn has joined #ruby
geggam_wk has quit [Remote host closed the connection]
<havenwood>
platzhirsch: Or just: method_name
akashj87 has quit [Ping timeout: 240 seconds]
<havenwood>
class Ex; def method_name; puts 'yup' end; def call_eet; method_name end end; Ex.new.call_eet; # yup
freerobby has quit [Quit: Leaving.]
iamevan has quit [Quit: iamevan]
v0n has quit [Ping timeout: 264 seconds]
akashj87__ has joined #ruby
<shevy>
hey
mattbl has joined #ruby
_br_ has quit [Excess Flood]
<shevy>
oops
faen has quit [Read error: Connection reset by peer]
<shevy>
for a moment I thought havenwood is Hanmac ... both are coloured in deep pink in my IRC client
<havenwood>
shevy: Thats how I roll, deep pink!
interactionjaxsn has quit [Remote host closed the connection]
jpcamara has quit [Quit: jpcamara]
platzhirsch has left #ruby [#ruby]
<lectrick>
So does anyone know what controls Rake's default behavior (no arguments)?
<banisterfiend>
havenwood: he's too foreign to get that joke :P
faen has joined #ruby
NiteRain has quit [Ping timeout: 264 seconds]
<TTilus>
lectrick: you mean like Rakefile?
ckrailo has quit [Quit: Computer has gone to sleep.]
cmarques has joined #ruby
<lectrick>
oh duh. it's in there. nevemind!
bean has quit [Quit: Computer has gone to sleep.]
akashj87_ has quit [Ping timeout: 252 seconds]
forrest has quit [Quit: Leaving]
<shevy>
lectrick madness
<shevy>
this is what controls it's default behaviour
axl_ has joined #ruby
_br_ has joined #ruby
Targen has joined #ruby
<shevy>
hmm
<shevy>
*its default behaviour?
<shevy>
think that would have been the right one :\
breakingthings has quit []
<lectrick>
shevy: i know, i get it. my bad lol
<shevy>
lectrick nah I was kidding
<shevy>
lectrick I never really got much into Rake, it always seemed easier for my local stuff to use an alias (in bash) call a method in a .rb file
_br_ has quit [Excess Flood]
<lectrick>
use "it's" only when it can be replaced with "it is" without sounding weird. << the grammar rule with the worst difficulty-to-track-record ratio
<lectrick>
difficulty low, everyone screws it up
<lectrick>
shevy: ^
jlast has quit [Remote host closed the connection]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<lectrick>
shevy: yeah i tend to just give things straight to ruby myself
jerius has quit [Ping timeout: 240 seconds]
mercwithamouth has joined #ruby
davetherat has quit [Remote host closed the connection]
davetherat has joined #ruby
kpshek has joined #ruby
kpshek has quit [Client Quit]
<shevy>
lectrick yeah, strange... I learned it in school
<shevy>
I think the internet & IRC is screwing my grammar knowledge over immensely, I was honestly much better in school ... :\
afex has joined #ruby
LennyLinux has joined #ruby
adkron has quit [Read error: Connection reset by peer]
ToApolytoXaos has quit [Quit: Leaving]
matchaw_ is now known as Matchaw
_br_ has joined #ruby
i_s has quit [Quit: i_s]
<`p>
Depends on what irc channels you idle in. Some channels have grammar nazis. So you tend to watch yourself, especially with it's and its
Al__ has joined #ruby
matayam has joined #ruby
<lectrick>
but that one is SO EASY. I think the possible possession trips people up
adkron has joined #ruby
Giorgio has quit [Ping timeout: 245 seconds]
<shevy>
yeah
kpshek has joined #ruby
<shevy>
I think my brain tries to do error correction, and sometimes it corrects something that would have actually been correct in the first place :\
<banisterfiend>
Hanmac: you like fiona and cake (adventure time) ?
cmarques has quit [Quit: leaving]
Axsuul has joined #ruby
dustint has quit [Ping timeout: 240 seconds]
<Hanmac>
banisterfiend: they are mathemathical! :P
<xibalba>
ohh i see, regarding my earlier message about a tcp/udp proxy
<shevy>
celluloid
slainer68 has joined #ruby
emmanuelux has joined #ruby
Xeago has quit [Remote host closed the connection]
jdolitsky has joined #ruby
m8 has quit [Quit: Sto andando via]
<Hanmac>
shevy i dont think so, FB is currently together with Finn, Marceline are often "lesbian" with PB ... good that they all look better than Gary the Mermaid :D
swounding60 has quit [Ping timeout: 245 seconds]
swounding60 has joined #ruby
chrishough has quit [Quit: chrishough]
robbyoconnor has quit [Ping timeout: 252 seconds]
kirun has quit [Quit: Client exiting]
girija has joined #ruby
Inside has joined #ruby
chessguy has quit [Remote host closed the connection]
<davidcelis>
what the fuck happened to object_ids in ruby 2
<davidcelis>
nil.object_id # => 8
<davidcelis>
true.object_id # => 20
<davidcelis>
THIS ISN'T SUPPOSED TO HAPPEN
<Spooner>
davidcelis, And :black.object_id == :white.object_id!
<banisterfiend>
davidcelis: probably due to flonums
<DanKnox>
xibalba yeah that's what i was referncing
<davidcelis>
banisterfiend: yep
<davidcelis>
fucking flonums
<DanKnox>
referencing
<shevy>
Hanmac please, I'd preferred it if you would not have told me ... :(((
slash_nick has quit [Ping timeout: 245 seconds]
dagnachew has joined #ruby
<Hanmac>
davidcelis: why do you have a problem with that?
_wtw_ has joined #ruby
k610 has quit [Ping timeout: 245 seconds]
<davidcelis>
Hanmac: it breaks my tests checking for object_id of nil, true, and false, obviously
<Hanmac>
... why do you check for that?¿ they are arch depending
<davidcelis>
i dont, really
<davidcelis>
i'm being facetious
<davidcelis>
i just wanted to know why, and now i do
perun_ has joined #ruby
Proshot has quit [Quit: Leaving]
mlpinit has quit [Quit: mlpinit]
rupee has joined #ruby
rasbonics has joined #ruby
rasbonics has left #ruby [#ruby]
<Kzim>
hello can i filter Rubygems-mirror to not have 100Go of gem ?
MehLaptop has joined #ruby
<Hanmac>
davidcelis do you know that "unless obj" and "if not obj" are not the same?
<davidcelis>
i remember that they aren't
<davidcelis>
but i can't remember how
wmoxam has quit [Ping timeout: 264 seconds]
mikepack has quit [Remote host closed the connection]
robscomp_ has joined #ruby
mephux has quit [Excess Flood]
robscomputer has quit [Read error: Connection reset by peer]
robscomp_ has quit [Client Quit]
<Hanmac>
"not" calls the "!" method, unless is optimized ... so it does not call the "!" method ...
robscomputer has joined #ruby
mephux has joined #ruby
girija has quit [Ping timeout: 256 seconds]
araujo has quit [Ping timeout: 276 seconds]
<Hanmac>
that makes unless a very little bit faster, but makes a difference
<davidcelis>
ahhh
<davidcelis>
i thought they had slightly different behavior depending on circumstance or precedence or something
pkrnj has joined #ruby
Shadow_S has joined #ruby
Shadow_S has quit [Remote host closed the connection]
<Hanmac>
not that i know, only the "!" thing
miso1337 has quit [Quit: unplugging]
gchristensen has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
v0n has joined #ruby
<gchristensen>
Hi, I'm developing a gem, and in order for me to test changes I have to re-build the gem and then install it with `gem install foobar-0.0.1.gem' which is quite frustrating. Is there a way to short-circuit this and skip this entirely? everything I'm running goes through ./bin/foobar
<gchristensen>
or perhaps information and guides on developing a gem might be useful (especially if they focus around providing an executable)
<Spooner>
gchristensen, ruby -Ilib ./bin/foobar
<Spooner>
gchristensen, Though if you drop 1.8.7 compatibility and use require_relative you won't have problems.
wmoxam has joined #ruby
chessguy has joined #ruby
<gchristensen>
I'm writing for 2.0.0 at the moment, and its all-internal. so I could (from bin/foobar) run require_relative '../lib/foobar'?
<Spooner>
And then, obviously, lib/foobar has to use require_relative too.
<gchristensen>
yeah
<gchristensen>
thank you for the tip!
sambio has quit [Read error: Connection reset by peer]
endzyme has quit [Remote host closed the connection]
nik_-_ has quit [Quit: nik_-_]
lkba has quit [Ping timeout: 240 seconds]
hadees has quit [Quit: hadees]
ShellFu has left #ruby [#ruby]
tbrock has joined #ruby
kofno has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
dangerousdave has quit [Quit: Leaving...]
punchfac_ has joined #ruby
punchfacechamp has quit [Ping timeout: 260 seconds]
Voodoofish4301 has joined #ruby
mikepack has joined #ruby
kofno has quit [Ping timeout: 248 seconds]
jamie_ca_ has quit [Quit: Computer has gone to sleep.]
Voodoofish430 has quit [Ping timeout: 246 seconds]
bean has joined #ruby
Voodoofish4301 is now known as Voodoofish430
kpshek has quit []
DonRichie has quit [Quit: Verlassend]
maxmanders has quit [Quit: Computer has gone to sleep.]
mikeg has joined #ruby
_maes_ has quit [Read error: Connection reset by peer]
dustint has joined #ruby
w400z has joined #ruby
mattbl has joined #ruby
larissa has joined #ruby
cpruitt has joined #ruby
GreatSUN has joined #ruby
<GreatSUN>
hi all
<GreatSUN>
is there someone still alive?
idkazuma has joined #ruby
gchristensen has left #ruby ["WeeChat 0.4.0"]
tantalum has left #ruby [#ruby]
forced_request has joined #ruby
louism2__ has joined #ruby
mikepack has quit [Remote host closed the connection]
Nahra has quit [Ping timeout: 256 seconds]
Nahra has joined #ruby
toekutr has quit [Remote host closed the connection]
sambio has joined #ruby
piotr_ has quit [Ping timeout: 272 seconds]
<louism2__>
hey everyone, if I use a methods return value as a the test condition for an if statement, if that method throws an error and enters into a rescue block, will that if statement evaluate to false? Essentially what I am asking is, does a method that throws an error always return false regardless of what happens in the rescue block? Thanks.