mmitchell has quit [Remote host closed the connection]
<shevy>
Vulix ruby tries to make you happy while coding
<shevy>
Vulix that means you have more freedom to do things how you want to do, in some ways. example: cat.meow is the same as cat.meow(), in python it would be a dictator cat, and only cat.meow() would be allowed
Virunga has quit [Remote host closed the connection]
garbagecollect-1 has quit [Quit: garbagecollect-1]
niklasb has quit [Ping timeout: 245 seconds]
DrShoggoth has joined #ruby
garbagecollectio has joined #ruby
bricker`LA has quit [Ping timeout: 256 seconds]
zoonfafer has joined #ruby
mockra has joined #ruby
mxweas has joined #ruby
<epitron>
chairman meow
<epitron>
the dictator cat
gosshedd has quit [Read error: Connection reset by peer]
kristofers has quit []
ryanf has quit [Ping timeout: 256 seconds]
toekutr has quit [Remote host closed the connection]
V8Energy has joined #ruby
lethjakman has quit [Ping timeout: 276 seconds]
octoberry has joined #ruby
<V8Energy>
I can access the localhost with the same credentials using a web browser but not with NET::HTTP. any ideas why? uri = URI('http://localhost') req = Net::HTTP::Get.new(uri.request_uri) req.basic_auth 'admin', 'password' res = Net::HTTP.start(uri.hostname, uri.port) {|http| http.request(req) } data = res.body
<V8Energy>
i am getting: #<Net::HTTPUnauthorized 401 Unauthorized readbody=true>
<canton7>
I seem to remember that working for me at some point
msuszczy has joined #ruby
<canton7>
also check your server logs
arturaz has quit [Remote host closed the connection]
<Vulix>
is ruby really readable because everyone can just code stuff in different ways
jjbohn has joined #ruby
<canton7>
sorry?
<canton7>
you can code things in different ways in all languages
<apeiros_>
Vulix: no. ruby is readable. and ruby allows more than just one way.
<apeiros_>
canton7: well, pythons philosophy is somewhat "there is one true way"
cctv43 has joined #ruby
<apeiros_>
and ruby leans more towards "there's more than one way"
<apeiros_>
but IMO that's not a very important point
<Vulix>
i mean in terms of simple things like method calls
beilabs has quit [Ping timeout: 244 seconds]
<canton7>
"one obvious way to do it", wasn't it? and yeah, the obvious way was invariable a number of lines, whereas rub usually has a single funciton to do the same :P
<Vulix>
hm im coming from java..python is easier to learn it seems but ruby intrigues me for some reason
<Vulix>
cant say im having the easiest time getting used to some parts of it
<nosleep77>
Vulix: me too
lushious has joined #ruby
<canton7>
you'll get sick of the contents 'self' and the ton of first-class functions, I'll bet
spaceships has quit [Quit: Lost terminal]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
jslowe has quit [Read error: Connection reset by peer]
jeffreybaird has joined #ruby
stevechiagozie has joined #ruby
<Vulix>
i feel like ruby could lose some syntax
<Vulix>
like why do for loops require | for something do |x|
Vulix has left #ruby [#ruby]
dEPy has quit []
Vulix has joined #ruby
backjlack has quit [Remote host closed the connection]
<canton7>
Vulix, C has almost the same with its lambdas
<Vulix>
hm well right now im comparing py to ruby
<canton7>
and java for that matter
<Vulix>
main reason im leaning ruby to be honest is because django seems to not be developing well right now
<canton7>
python's lambas have a colon, but python has much much shittier lambdas
<canton7>
and no concept of a block
miskander has joined #ruby
<canton7>
s/of a block/of blocks
mmitchell has joined #ruby
<canton7>
and s/C/C# way above
<Vulix>
Blocks is another thing im having to get used too
<Vulix>
i like the procedural nature of python, i feel the language stays out of the way and doesnt force form on me
<Vulix>
rubys a bit different, not bad just different
nat_home has joined #ruby
etcetera has joined #ruby
<canton7>
the functional style is making quite an impression outside of functional languages atm. C#'s LINQ is taking off in a big way, and java's catching up iirc
pavilionXP has quit [Ping timeout: 248 seconds]
<banisterfiend>
Vulix: you're appreciate it when u 'get' ruby
<canton7>
when you see how much less syntax using functional style requires, and how much clearer it is, you'll agree
<canton7>
(loosely defining "functional style" to mean chaining method which take lambas as arguments, give or take)
etcetera has quit [Client Quit]
<Vulix>
Yup I definitely plan to dive deeper and hang out here for the next few weeks\months, I want to actually get to know the language as well as I know python or better before I decide what to stick with for most of my work
<canton7>
python has list comprehensions which are ok, but a lot less clear and have limited power
<banisterfiend>
Vulix: you should buy "metaprogramming ruby" do get a sense of what's possible
<Vulix>
I do a lot of text minign work so I'm also interested to see how ruby handles string encodings because Python sucks at that sometimes depending on the encoding
<nat_home>
what is a rubyich way to do a program that check if there is something in stdin and then use that as an input else display a prompt and do something like gets.chomp ?
<canton7>
Vulix, good man. I wish more people had that level of patience :P
bricker`LA has joined #ruby
<Vulix>
i saw matz's interview about encodings and japanese characters so it seems like its something considered more deeply here
<jrabbit>
Vulix: japan and ruby don't like utf8 sort story
beilabs has joined #ruby
<jrabbit>
better story: utf8 is getting better
wyhaines has joined #ruby
pyrac has quit [Quit: pyrac]
jeffreybaird has quit [Quit: jeffreybaird]
<Vulix>
also is there any gem that is the equivalent of SciPy\NumPy
tjbiddle has quit [Quit: tjbiddle]
<Skofo>
All that takes to find out is a simple Google search :)
ryez has joined #ruby
ryez has quit [Max SendQ exceeded]
<nanothief>
nat_home: STDIN.tty? could be what you want. ruby -e 'p $stdin.tty?' prints true, while echo 'hello' | ruby -e 'p $stdin.tty?' prints false
<V8Energy>
canton7: same problem: #<Net::HTTPUnauthorized 401 Unauthorized readbody=true>
ryez has joined #ruby
PanPan_ has joined #ruby
ryez has quit [Max SendQ exceeded]
admin0 has quit [Quit: admin0]
ryez has joined #ruby
ryez has quit [Max SendQ exceeded]
elaptics is now known as elaptics`away
ryez has joined #ruby
ryez has quit [Max SendQ exceeded]
vlad_starkov has quit [Remote host closed the connection]
jeffreybaird has joined #ruby
jeffreybaird has quit [Remote host closed the connection]
pdamer has joined #ruby
ryez has joined #ruby
jeffreybaird has joined #ruby
wyhaines has quit [Remote host closed the connection]
PanPan_ has quit [Ping timeout: 252 seconds]
mxweas has quit [Remote host closed the connection]
mengu has joined #ruby
jonathanwallace1 has joined #ruby
jonathanwallace has quit [Ping timeout: 264 seconds]
pskosinski has quit [Ping timeout: 248 seconds]
Banistergalaxy has quit [Ping timeout: 252 seconds]
nari has quit [Ping timeout: 264 seconds]
mmitchell has quit [Remote host closed the connection]
<nanothief>
Is there any mixins that automatically define the ==, eql? and hash that works using the instance variables of the class?
msuszczy has quit [Remote host closed the connection]
ssds has joined #ruby
hybris has joined #ruby
alx- has quit [Quit: alx-]
ssds has quit [Read error: Connection reset by peer]
maletor has quit [Quit: Computer has gone to sleep.]
<canton7>
nanothief, that's not an easy problem. are we talking about comparing all the instance variables? sounds a bit iffy if not all of them are exposed
<nanothief>
it is fairly simple with the instance_variables method, ie self.class == other.class && instance_variables == other.instance_variables && <compare instance variable values>
<cmyers>
seems like you could be easily broken by other mixins too - like say something inserted the "last_accessed" field, then two different copies would no longer be equal
<cmyers>
and you'd never realize why
<nat_home>
nanothief: thanks, let me read more about that
<nanothief>
cmyers: true, but you can always reimplement it yourself it that becomes a problem in the future
<cmyers>
yeah, just a gotcha to watch out for
r0bby has joined #ruby
bricker`1A has joined #ruby
<ner0x>
Can I use nokogiri to add a class to a node?
ryanf has joined #ruby
r0bby_ has joined #ruby
bean has quit [Quit: Computer has gone to sleep.]
agarie has joined #ruby
SeanLazer has quit [Quit: SeanLazer]
angusiguess has quit [Ping timeout: 255 seconds]
<canton7>
ner0x, yes
SeanLazer has joined #ruby
mockra has quit [Remote host closed the connection]
robbyoconnor has quit [Ping timeout: 248 seconds]
bricker`LA has quit [Ping timeout: 252 seconds]
<ner0x>
canton7: I've read the docs a bunch of times. Can you show me how?
etcetera has joined #ruby
chichou has quit [Ping timeout: 248 seconds]
<canton7>
ner0x, node['class'] << ' mynewclass'
<canton7>
(assuming the node already has a class)
r0bby has quit [Ping timeout: 252 seconds]
<canton7>
if not, node['class'] = 'foo'
kaen has joined #ruby
<ner0x>
I tried that.
<ner0x>
It didn't work.
matchaw has joined #ruby
<ner0x>
Let me get the code.
kaen has quit [Max SendQ exceeded]
matchaw___ has quit [Ping timeout: 248 seconds]
generalissimo has quit [Remote host closed the connection]
CraHan is now known as CraHan|out
ryez has quit [Ping timeout: 276 seconds]
Lemtzas is now known as ZombieMoses
<canton7>
hmm modifying the class using << doens't work
beliveyourdream has quit [Read error: Connection reset by peer]
hybris has quit [Quit: hybris]
pavilionXP has joined #ruby
mark___ has joined #ruby
radosch has quit [Quit: radosch]
eka has quit [Quit: Computer has gone to sleep.]
<mark___>
Hi everyone, I am a Ruby newbie trying to use HTTParty in a Ruby script to authenticate into different web services like Hacker News. Unfortunately I haven't been able to post the request correctly. What here looks wrong?
vlad_starkov has quit [Read error: Connection reset by peer]
thufir_ has quit [Remote host closed the connection]
Banistergalaxy has quit [Ping timeout: 248 seconds]
ben_h has joined #ruby
<mark___>
havenwood, thanks, what do you recommend for a newbie?
ahokaomaeha has quit [Ping timeout: 245 seconds]
Kuifje has quit [Ping timeout: 240 seconds]
<havenwood>
mark___: Hrmm. A couple good options, HTTParty amongst them depending on what you're doing. Good, very detailed comparison here: http://bit.ly/RubyHTTPClients2012
hbpoison has joined #ruby
<havenwood>
mark___: httparty, rest-client, mechanize, httpclient and faraday are all nice options
havenwood has quit [Remote host closed the connection]
<spaceships>
Is there an easy way to speed up Spreadsheet?
ahokaomaeha has joined #ruby
<banisterfiend>
spaceships: !spreadsheet.speed_up
monkegjinni has quit [Remote host closed the connection]
mockra has joined #ruby
max_ has joined #ruby
yxhuvud has joined #ruby
ahokaomaeha has quit [Ping timeout: 260 seconds]
<Vulix>
if you are going to make a new programming language (why would you anyway?) why in the hell would you base it off ruby lol
atal421 has quit [Quit: atal421]
nignaztic has quit [Ping timeout: 255 seconds]
<Vulix>
C++ is easy enough and will give you more flexibility
<jrajav>
"if you are going to make a new programming language (why would you anyway?)" <-- well that's kind of a stupid mindset.
<Vulix>
not really
<Vulix>
its the same problem with linux
<Vulix>
too many distros\languages that are scarcely used
<jrajav>
Why the hell does anyone try to make new cars? ICEs work great, are extremely well tested, very efficient, etc. etc.
<Vulix>
developers re-inventing the wheel instead of working to make just a few projects better
<ben_h>
not all work has to be productive
pdamer has quit [Quit: pdamer]
<ben_h>
"because i want to" is as good a reason as any
xardas has quit [Ping timeout: 244 seconds]
<Vulix>
i cant honestly think of how i could write a programming language that would be better than an already existing language in any one task
angusiguess has joined #ruby
<jrajav>
Therefore, by extension, it's a futile gesture for literally anyone.
<ben_h>
Vulix: sometimes the journey is more important than the destination. :)
Myk267 has quit [Quit: Whee!]
<Vulix>
Fair enough I know what you guys are saying
<Vulix>
why was I set as an operator lol
atal421 has joined #ruby
<Vulix>
i will eventually be writing a machine learning algorithm library in either Ruby or Python when I pick one to stick with, i suppose i find applications like that more interesting
Banistergalaxy has joined #ruby
angusiguess has quit [Ping timeout: 255 seconds]
SIFTU has quit [Quit: WeeChat 0.3.8]
chrishough has quit [Quit: chrishough]
chico_chicote has quit [Read error: Connection reset by peer]
reactormonk has quit [Ping timeout: 252 seconds]
postmodern has joined #ruby
yxhuvud has quit [Ping timeout: 256 seconds]
Starrfish has joined #ruby
Myconix has joined #ruby
charliesome has joined #ruby
Hanmac1 has joined #ruby
nat_home has quit [Quit: Leaving.]
SCommette has quit [Quit: SCommette]
Hanmac has quit [Ping timeout: 248 seconds]
nat_home has joined #ruby
atal421 has quit [Quit: atal421]
nomenkun_ has quit [Remote host closed the connection]
adkron_ has quit [Ping timeout: 264 seconds]
Takehiro has joined #ruby
adkron has quit [Ping timeout: 264 seconds]
daniel_- has joined #ruby
Konboi has joined #ruby
subbyyy has quit [Quit: none 0.3.9.2]
subbyyy has joined #ruby
c0rn has joined #ruby
subbyyy has quit [Client Quit]
Takehiro has quit [Ping timeout: 252 seconds]
subbyyy has joined #ruby
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
subbyyy has quit [Client Quit]
Myconix has quit [Quit: Leaving]
tylersmith has quit [Quit: tylersmith]
Starrfish is now known as Myconix
jonathanwallace1 has quit [Ping timeout: 252 seconds]
adamjleonard has joined #ruby
emmanuelux has joined #ruby
caleb_io has joined #ruby
jonathanwallace1 has joined #ruby
hashtree has joined #ruby
jimeh has joined #ruby
mark___ has quit [Remote host closed the connection]
subbyyy has joined #ruby
stormetrooper has quit [Quit: Leaving]
DanKnox has quit [Remote host closed the connection]
mockra has quit [Remote host closed the connection]
<Vulix>
you know whats great
<Vulix>
bulgar wheat
cisco has quit [Quit: Leaving.]
aedorn has joined #ruby
Beoran has joined #ruby
noxoc has quit [Quit: noxoc]
ferdev is now known as ferdev|away
pdamer has joined #ruby
skrewler has quit [Quit: skrewler]
otherj has quit []
ner0x has quit [Quit: Leaving]
angusiguess has joined #ruby
<Vulix>
what are some good gui libs for ruby
dallasm has quit [Remote host closed the connection]
<eric|eh>
shoes
eric|eh has quit [Remote host closed the connection]
mattbl has joined #ruby
angusiguess has quit [Ping timeout: 256 seconds]
heftig has quit [Quit: leaving]
Vulix has left #ruby [#ruby]
billiam has quit [Read error: Connection reset by peer]
Vulix has joined #ruby
etcetera has quit []
crackfu has joined #ruby
otherj has joined #ruby
otherj has quit [Client Quit]
mockra has joined #ruby
otherj has joined #ruby
otherj has quit [Max SendQ exceeded]
mockra has quit [Ping timeout: 252 seconds]
mark____ has joined #ruby
mark___ has quit [Read error: Connection reset by peer]
v0n has joined #ruby
bricker`LA has joined #ruby
<Dwarf>
Hello folks
<Dwarf>
Can anyone help me with something?
<Dwarf>
I have an array with data, and I want to add another array to it, but only keep the non-unique values
heftig has joined #ruby
heftig is now known as Guest67633
Guest67633 has quit [Changing host]
Guest67633 has joined #ruby
Guest67633 is now known as heftig
TheFuzzball has joined #ruby
bricker`1A has quit [Ping timeout: 276 seconds]
nilobject has joined #ruby
mark____ has quit [Read error: Connection reset by peer]
mark___ has joined #ruby
mark___ has quit [Remote host closed the connection]
heftig has quit [Client Quit]
heftig has joined #ruby
stormetrooper has joined #ruby
emergion has joined #ruby
jonathanwallace1 has quit [Ping timeout: 240 seconds]
ahokaomaeha has joined #ruby
nomenkun has joined #ruby
mockra has joined #ruby
adeponte has quit [Remote host closed the connection]
<apeiros_>
Dwarf: the non-unique values after combining or before?
crackfu has quit [Remote host closed the connection]
ahokaomaeha has quit [Ping timeout: 248 seconds]
jonathanwallace1 has joined #ruby
jetblack has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
<Dwarf>
After combining
stkowski has joined #ruby
crackfu has joined #ruby
nomenkun has quit [Ping timeout: 248 seconds]
mercwith1mouth has quit [Ping timeout: 256 seconds]
mercwithamouth has quit [Ping timeout: 256 seconds]
wiiw has joined #ruby
<apeiros_>
Dwarf: do you have an approach at keeping only non-unique values from a single array?
mockra has quit [Ping timeout: 244 seconds]
<Dwarf>
No, that's what I was wondering on how to do
<apeiros_>
use a "seen"-hash (seen = Hash.new(0)), count occurrences, remove any with <1, get the keys
nilobject has quit [Quit: nilobject]
<Dwarf>
I don't think I understand, I'm quite new to ruby I guess
<apeiros_>
do you know what a Hash is?
crackfu has quit [Ping timeout: 256 seconds]
<apeiros_>
(should have been <2, not <1 before, my fault)
kyle__ has quit [Disconnected by services]
<Boohbah>
<3
beilabs has quit [Ping timeout: 252 seconds]
jimeh has joined #ruby
toekutr has quit [Remote host closed the connection]
caleb_io has quit [Quit: caleb_io]
sailias has joined #ruby
Konboi has quit [Remote host closed the connection]
<apeiros_>
Dwarf: I'm going to bed soon. so hurry up if you want the help.
PanPan_ has joined #ruby
otherj has joined #ruby
<Dwarf>
I know what a hash is
otherj has quit [Client Quit]
<Dwarf>
I believe. It's an associative array
<apeiros_>
it's similar
<apeiros_>
you store key/value pairs. lookup by key is very fast.
<Dwarf>
Yup
nat_home has quit [Quit: Leaving.]
<apeiros_>
Hash.new(0) creates a hash with 0 instead of nil as the default value
<Dwarf>
Mhm
nat_home has joined #ruby
<apeiros_>
seen[key] += 1 # works now without having to add `seen[key] ||= 0` first
<nat_home>
what's a good way to find the index of the first element of an array A that exists in an array B ?
halfie has joined #ruby
c0rn has quit [Quit: Computer has gone to sleep.]
<halfie>
hi, the variable I am creating / assigning to inside if block does not exist outside the if block. any tips to make this work?
<apeiros_>
so you create the `seen` hash like that, you iterate over both arrays and do += 1 for each item. then you use Hash#reject! to remove keys with a value less than 2 (<2)
<apeiros_>
and at the end you use Hash#keys to get the remaining keys (which are the non-unique values after combining)
Takehiro has joined #ruby
<banisterfiend>
halfie: r u telling lies
<apeiros_>
halfie: if does not introduce a new lexical scope. lvars should be visible
<fruers>
apeiros_: I'm not talking about using the declarations together, just trying to understand the difference between the two (and which one I should use)
<apeiros_>
fruers: `class X` opens (or in case it doesn't exist already: creates) the class X
Guest16060 has quit [Ping timeout: 245 seconds]
twoism has joined #ruby
<apeiros_>
fruers: `module X` opens (or in case it doesn't exist already: creates) the module X
<apeiros_>
module X; end; X.class # => Module
<apeiros_>
class X; end; X.class # => Class
thibauts has quit [Quit: leaving]
idkazuma has joined #ruby
<garbagecollectio>
facebook is offline
<fruers>
apeiros_: That makes more sense the way you've said it
vierja has quit [Read error: Connection reset by peer]
<apeiros_>
modules and classes both are containers for instance methods. a class can be instantiated, a module can't. a module can be included into a class or module, an object can be extended with a module. include/extend does not work with a class.
<fruers>
apeiros_: So the Thor code I posted, why does it open the class first?
<apeiros_>
other traits shared by modules/classes: both serve as namespaces, both are objects
<apeiros_>
fruers: because wycats does the right thing and puts all his code into a single namespace: Thor
pdamer has quit [Quit: pdamer]
mark___ has quit [Remote host closed the connection]
<apeiros_>
so he gets the modules Thor::Base and Thor::Shell instead of toplevel Base and Shell (which are likely to create collisions)
clooth has quit [Quit: clooth]
danneu has quit [Remote host closed the connection]
mark___ has joined #ruby
jonathanwallace1 has quit [Ping timeout: 256 seconds]
ryanf has quit [Ping timeout: 248 seconds]
<fruers>
apeiros_: Sweet, got it
<fruers>
Thanks
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
dallasm has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
twoism has quit [Remote host closed the connection]
mark___ has quit [Ping timeout: 252 seconds]
sandGorgon has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
mark___ has joined #ruby
ryanf has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
twoism has joined #ruby
vierja has joined #ruby
twoism has quit [Remote host closed the connection]
ben_h has joined #ruby
davetherat has quit [Remote host closed the connection]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
joofsh has quit [Remote host closed the connection]
rippa has joined #ruby
lethjakman has quit [Quit: WeeChat 0.3.9]
hbpoison has joined #ruby
mark___ has quit [Remote host closed the connection]
mark___ has joined #ruby
mark___ has quit [Remote host closed the connection]
SDr has quit [Ping timeout: 246 seconds]
beachandbytes has joined #ruby
twoism has joined #ruby
stormetrooper has quit [Ping timeout: 248 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
twoism has quit [Remote host closed the connection]
Fezzler has joined #ruby
ddd has joined #ruby
IceDragon has quit [Quit: Space~~~]
ddd is now known as Guest87249
Fezzler has quit [Client Quit]
Spooner has quit [Remote host closed the connection]
jrajav has quit [Quit: I tend to be neutral about apples]
qubit has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
wmoxam has quit [Remote host closed the connection]
qubit has joined #ruby
PanPan_ has quit [Ping timeout: 256 seconds]
flexd has quit [Ping timeout: 244 seconds]
PanPan has joined #ruby
thufir_ has joined #ruby
kn330 has joined #ruby
angusiguess has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
angusiguess has quit [Ping timeout: 252 seconds]
<fruers>
If I had "module Foo; module Bar; class Baz" how would I reference Baz?
<fruers>
Foo::Bar::Baz?
<ben_h>
fruers: exactly :)
jpfuentes2 has joined #ruby
garbagecollectio has joined #ruby
<fruers>
ben_h: ...and if I had require "foo/bar", would I still explicitly reference it?
<fruers>
Or could I just say Baz?
<ben_h>
no, require doesn't alter that
<fruers>
Ok
<ben_h>
require is purely concerned with files on disk. it just loads code
sailias has quit [Quit: Leaving.]
<ben_h>
to refer to it as just Baz, you'd have to include Foo::Bar into your current scope -- but it's generally good to avoid that unless you have a good reason to.
<fruers>
Ok, thanks
<ben_h>
keeping separate scopes separate is one part of keeping things decoupled, which is very important
<fruers>
Is there some kind of autoloader, I am looking at code that refers to Net::HTTP.new without any require
<ben_h>
it was most likely just required from a different file
<ben_h>
(if this is a rails app, then yeah there's an autoloader it hooks methods like #const_missing and requires them inline.)
<fruers>
yes it looks like it, it's not rails
yacks has quit [Quit: Leaving]
<ben_h>
but once a file is required, it's loaded globally. there's no per-file context like python and friends
<ben_h>
another reason why keeping namespaces separate is important :)
v0n has quit [Ping timeout: 252 seconds]
<fruers>
Ah I see, so it doesn't even matter if it was required in another module namespace?
<fruers>
At the moment my interpretation of module is purely for namespacing, it doesn't do any isolation or anything else
<ben_h>
no it makes no difference
<ben_h>
yep. modules are purely for namespacing. you can turn them into a class-like structure where their methods are directly callable, but in general they're for e.g. wrapping your gem's code up inside a single constant
garbagecollectio has quit [Quit: garbagecollectio]
<ben_h>
require expands the path to an absolute, and only requires each absolute path once.
<fruers>
How does that work with editors, how do they know you have undeclared names if the require is in another file?
<fruers>
Heh, I'm probably asking too specific questions... I can work it out from there
<fruers>
Very helpful, thanks. Ruby language is easy to understand... just getting my head around the idioms
garbagecollectio has joined #ruby
thone has joined #ruby
mahmoudimus has joined #ruby
psyprus has quit [Ping timeout: 248 seconds]
macmartine has joined #ruby
_justin has quit [Quit: _justin]
thone_ has quit [Ping timeout: 248 seconds]
Skofo has quit [Remote host closed the connection]
ogonec has quit [Quit: Leaving]
sandGorgon has quit [Ping timeout: 248 seconds]
Es0teric has joined #ruby
<Vulix>
i have wet dreams about ruby
Xeago has quit [Read error: Connection reset by peer]
Xeago has joined #ruby
icole has quit [Remote host closed the connection]
icole has joined #ruby
ben_h has quit [Read error: Connection reset by peer]
ben_h has joined #ruby
<ben_h>
fruers: the editors don't know, for the most part :) rubymine does because it loads and parses the whole source tree
malealone has joined #ruby
<malealone>
saliref cndht salidgo wgaug refcndht salidgo wsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcddht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug rexgaug refcndht sal digo wgaug reccndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht salidgo wgaugsalirefsaliref cndht salidgo fgaug
<malealone>
refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgau real idg o wga rdgu wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref cndht salidgo wolf iefcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaugsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaug real idg o wgaug rdgo wgaug
<malealone>
wgaug refcddht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug rexgaug refcndht sal digo wgaug reccndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht salidgo wgaugsalirefsaliref cndht salidgo fgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgau real idg o wga rdgu wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref
<malealone>
cndht salidgo wolf iefcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaugsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref real idg o wgaug rdgo wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug
<malealone>
refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref real idg o wgaug rdgo wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref refcn dht salidgo wgaug refcndht salidgo wgaug refsaliref cndht salidgo wgaug refcndht salidgo wsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaug real idg o wgaug rdgo
<malealone>
ref refcn dht salidgo wgaug refcndht salidgo wgaug refsaliref cndht salidgo wgaug refcndht salidgo wsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcddht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug rexgaug refcndht sal digo wgaug reccndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht
<malealone>
salidgo wgaugsalirefsaliref cndht salidgo fgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgau real idg o wga rdgu wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref cndht salidgo wolf iefcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaugsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht
<malealone>
sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref real idg o wgaug rdgo wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref refcn dht salidgo wgaug refcndht salidgo wgaug refsaliref cndht salidgo wgaug refcndht salidgo wsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug
<malealone>
refcndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcddht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug rexgaug refcndht sal digo wgaug reccndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht salidgo wgaugsalirefsaliref cndht salidgo fgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgau real idg o wga rdgu wgaug refcndht salidgo wgaug
<malealone>
refcn dht salidgo wgaug refcndht salidgo wgaug ref cndht salidgo wolf iefcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaugsaliref cndht salidgo wgaug refcndht salidgo wgaug refcndht sal digo wgaug refcndht sa l idg o wgaug real idg o wgaug rdgo wgaug refcndht salidgo wgaug refcn dht salidgo wgaug refcndht salidgo wgaug ref real idg o wgaug rdgo wgaug refcndht salidgo
<apeiros_>
you don't decide "I namespace using a class" or "I namespace using a module"
<apeiros_>
you decide "X must be a class" or "X must be a module". it then "just happens" to also serve as a namespace.
fedza_ has quit [Ping timeout: 248 seconds]
<apeiros_>
and whether you use a class or a module depends on how you want to use "X". scroll back, I told you the differences and commonalities of modules and classes
<fruers>
Perhaps I should ask why Thor encapsulates everything in the Thor class and Vagrant encapsulates everything in the Vagrant module
* fruers
goes back
<emergion>
Why would you do that, module inside a class? Maybe if you wanted to call a init method every time you created new class?
<emergion>
fruers, that is probably why, is there an initialize method ?
<apeiros_>
-_-
<emergion>
he wants to setup a bunch of stuff every time a Thor.new happens
<apeiros_>
the decision class/module is independent of the namespacing part
<apeiros_>
namespacing is not part of the considerations whether Thor should be a class or a module. simply because to the namespacing aspect, it doesn't matter whether it is a class or a module.
<apeiros_>
again, looking in the wrong direction.
Hanmac1 is now known as Hanmac
fedza_ has joined #ruby
mahmoudimus has quit [Quit: Computer has gone to sleep.]
<fruers>
I'm kinda getting it, or at least seeing the differences
<ben_h>
fruers: it's not really important; either can be used to wrap things up. if it's just grouping (like Vagrant) then a module makes sense; perhaps the Thor class is something that's instantiated on its own (i've never used thor). but if not, a module would also have worked for Thor.
<emergion>
ben_h, that's true
<emergion>
From what I have seen that pattern used in Thor is a bit of an exception
<apeiros_>
not at all
<apeiros_>
there's plenty of code with constants in classes.
<emergion>
apeiros_, eh ?
<apeiros_>
Foo::Bar is first and foremost a constant
xscc_ has joined #ruby
<apeiros_>
iff the code is `class Foo; module Bar`, then it happens to reference a module.
<apeiros_>
(well, or `module Foo; module Bar`)
<apeiros_>
the common case is `class Foo; Bar = "some value"`
<apeiros_>
iow, classes as namespaces are quite widespread.
mlr has joined #ruby
<emergion>
I don't recall saying there is never constants in classes ? All I said is I've so rarely seen a module encapsulated in a class I didn't know it was possible or people did it. But I stand corrected on that.
Jeaye has quit [Quit: reboot]
<emergion>
I'm not as advanced as some and I would generally use modules for name spacing and to contain a bunch of mixin methods. Happy to find out what else people use them for ;)
PanPan has quit [Remote host closed the connection]
<apeiros_>
you're stuck on thinking a module was a special case. it isn't. it's just a constant nested in a class/module.
<emergion>
apeiros_, nope I can accept it, just haven't seen a lot of it is all
fixl has joined #ruby
garbagecollectio has quit [Quit: garbagecollectio]
xscc_ has quit [Ping timeout: 252 seconds]
Nisstyre-laptop has quit [Quit: Leaving]
angusiguess has joined #ruby
<danneu>
emergion: active record itself is a good example of a monolithic library with classes within modules within classes!
adeponte has quit [Remote host closed the connection]
<danneu>
always a fun saturday night clicking around active record source!
<emergion>
It looks like a train wreck or something
v0n has joined #ruby
<danneu>
interesting didn't know train wrecks looked like pure fun then!
<emergion>
haha
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<emergion>
Rails...
Jeaye has joined #ruby
<danneu>
active record has a lot of nice features. one of my favorites is that it's an ORM but you still type out string queries
<danneu>
not many other orms have that feature!
<emergion>
danneu, yup I've seen that come in handy before
<danneu>
i bet
<emergion>
Never looked at the rails source code, I actually never felt really confident enough to dig around source code like that until a little while ago.
cyong has joined #ruby
<danneu>
User.where(name: names). wait I need a NOT IN. User.where("names NOT IN ?", names). nice!
<danneu>
i love strings!
<danneu>
emergion: Yeah, and it's no trivial matter
ben_h has quit [Read error: Connection reset by peer]
octoberry has joined #ruby
<emergion>
danneu, what isn't ?
<danneu>
emergion: rails source
<apeiros_>
File::Constants, IO::WaitReadable, IO::WaitWritable # <- modules nested in classes in ruby core
<emergion>
danneu, sure! I actually learned ruby initially from working with rails, I think that was the worst way EVER to learn ruby.
<apeiros_>
sad that the =~ /::/ bit is needed
<danneu>
emergion: dunno, i learned them concurrently. only thing i remember throwing me off a few times was thinking that some ActiveSupport niceties were part of ruby stdlib
<cmyers>
I am confused about how to call methods in other packages. in lib.rb, I have module A; Module B; def some_method ... end; end; end; the in some other file, i require that file, then have def foo; some_method(); end. How do I call some method? A::B::some_method?
<danneu>
but other than that, can't say i would recommend against it from my own experience
nat_home has quit [Quit: Leaving.]
<apeiros_>
cmyers: you can't directly call methods defined in modules
<cmyers>
uh...oh.
<emergion>
Fair enough
<apeiros_>
if you have `module A; module B; def self.bar; end; end; end`, then it is `A::B.bar`
<danneu>
emergion: just sharin. what gave u the most trouble
<apeiros_>
but that `self.` part is important
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<emergion>
Know when the line was being crossed between what ruby did and what rails did :)
<emergion>
*Knowing
<cmyers>
apeiros_: I see - I use the methods in some places by including the module, but in this script I don't have an enclosing class to include it. maybe I should just make one
<apeiros_>
if you have `module A; module B; def bar; end; end; end`, then you can't call the method on the module directly. you have to either include the module into a class, instantiate that class and call it there, or extend an object with the module
uris has quit [Quit: Leaving]
<Hanmac>
apeiros_ you could even do: object.singleton_class::B.bar when you defined the class/module :P
<apeiros_>
emergion: I love how rails makes it almost impossible for newbies to understand @ivars, by "magically" passing them around (controllers -> views, e.g.)
dmiller has quit [Ping timeout: 252 seconds]
<emergion>
apeiros_, I totally agree with that
<danneu>
emergion: ah, i guess i had some trivial background in programming that probably helped
<emergion>
It wasn't till I played with Capistrano and Puppet till I started to get it more.
<apeiros_>
a lot of the magic which rails uses is unecessary, and unecessary confusing too
<emergion>
danneu, I had a whole bunch of self taight Perl Bash and C mess
<emergion>
*taught
Nisstyre-laptop has joined #ruby
<emergion>
Object orientation was a totally new thing and on top of that all that rails wizardry was confusing, but anyway working out ok now
<danneu>
ive had some luck recommending newbies to padrino
<emergion>
I know some fairly "proficient" rails programmers that would not be able to right much "Ruby"
<emergion>
*write
macmartine has quit [Quit: Computer has gone to sleep.]
<emergion>
Ah ok never checked it out
<danneu>
emergion: yeah but that's the thing about large frameworks. it's about learning framework idiosyncrasies. average rails developer isn't having to do ruby backflips
Edward_ has quit [Ping timeout: 248 seconds]
<emergion>
danneu, yup that's right
<emergion>
I think it's also why they abuse things like Active Record
<danneu>
what do you mean
ben_h has joined #ruby
ben_h has quit [Client Quit]
<emergion>
Ah look, I can just look 5000000 objects and manipulate them, not actually knowing under the hood it might be using a poorly optimised query, because most of the time it just does stuff.
<emergion>
and does a good job of it ;)
<apeiros_>
it can even be a good query, but deserializing the whole table just to get a couple of records using a bit of ruby code - and then complain because ruby is slow…
nari has quit [Ping timeout: 276 seconds]
<danneu>
how poor AR is at query generation is one of my pain points with rails
<emergion>
apeiros_, yup
<emergion>
Anyway, cheers, learned something new again today :)
<apeiros_>
danneu: don't use ORMs to generate complex queries
skcin7 has joined #ruby
<apeiros_>
not really an AR issue, ORMs are a leaky abstraction.
<danneu>
why
<danneu>
query algebra isn't leaky at all
<danneu>
it's what sql is
<apeiros_>
no, the ORM part is
<emergion>
fruers, how's it going over there ?
<apeiros_>
objects don't always map that well to rdbms
<danneu>
i'm talking about AR being built on top of Arel, yet it's painful to use Arel, and Arel is hardly documented
<apeiros_>
yes, that part is sad
<danneu>
compare AR to Sequel for instance
<danneu>
it's just unfortunate the AR is THE orm
<danneu>
that AR*
<danneu>
i'm just letting off steam after spending some time today trying to convert large sql strings to AR
<apeiros_>
anyway, I've used Sequel too for complex query generation. I won't do it again.
<danneu>
it depends what complex is
<apeiros_>
I move more stuff to the DB nowadays, using e.g. views
<danneu>
yeah, i'd like to learn more about postgres-specific things for example
<apeiros_>
that's usually magnitudes less complex than building the query on the ruby side
<danneu>
rails doesn't even have a convention for things like foreign keys and constraints
<apeiros_>
as said, leaky abstraction :-p
<danneu>
yeah but it's not even leaky. it seems like orm failure in that regard.
PanPan has joined #ruby
nidhimj22 has joined #ruby
<fruers>
emergion: Good, just heading out... see you at work tomorrow
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<emergion>
fruers, cool, have a good one
nidhimj22 has left #ruby [#ruby]
Slivka has joined #ruby
fruers has quit [Quit: leaving]
<Es0teric>
question -- so observable makes ruby evented?
mercwith1mouth has quit [Ping timeout: 248 seconds]
mercwithamouth has quit [Ping timeout: 248 seconds]
<Es0teric>
the observable library
<danneu>
no id say that you can write something in an event-driven way
<emergion>
Is it possible to completely destroy a class once it has been instantiated ?
<emergion>
Sorry I should say decaled
<emergion>
*declared
<apeiros_>
emergion: a class is like any other object there
<apeiros_>
if there are still references to it, it won't be GCed
<Es0teric>
oh, i see danneu
<emergion>
Ok cool :)
Vulix has left #ruby [#ruby]
PanPan has quit [Ping timeout: 255 seconds]
xaq has quit [Remote host closed the connection]
<Es0teric>
danneu is there anything that makes ruby behave like nodejs? as in recieving information in real time?
<danneu>
Es0teric: dunno what your context is but when people speak of evented code they generally are referring to leaning on evented libraries like ruby's eventmachine
<Es0teric>
reciving/sending
xaq has joined #ruby
<apeiros_>
>> class X; end; x = X.new; Object.send :remove_const, :X; p x.class
<Es0teric>
danneu that is compatible with rails, right?
xaq has quit [Remote host closed the connection]
<danneu>
Es0teric: well, it's a different thing
thufir_ has quit [Quit: Leaving.]
<Es0teric>
danneu what do you mean?
<danneu>
Es0teric: dunno what you mean by compatible with rails, but your rails app could certainly call out to processes that leverage something like Celluloid
mockra has quit [Remote host closed the connection]
zzing has quit [Quit: Computer has gone to sleep.]
relix has joined #ruby
dmiller has quit [Read error: Operation timed out]
V8Energy has quit [Ping timeout: 252 seconds]
Umren has joined #ruby
octoberry has quit [Ping timeout: 248 seconds]
cyong has quit [Quit: Leaving.]
OliverJAsh has joined #ruby
<OliverJAsh>
I've got a shell script that is executed via SSH. The trouble is, the SSH script doesn't load my bash_profile, and my script needs access to Ruby gems. I have installed Ruby with RVM.
<OliverJAsh>
What's the easiest way of sourcing the binaries I need in the shell script? Do I have to provide the absolute paths to each binary?
rburton- has joined #ruby
adeponte has joined #ruby
shock_one has joined #ruby
<Hanmac>
OliverJash you may put the stuff in .bashrc
cyong has joined #ruby
joeycarmello has quit [Remote host closed the connection]
mityaz has joined #ruby
<OliverJAsh>
Is .bashrc always loaded when bash loads?
adeponte has quit [Ping timeout: 252 seconds]
<OliverJAsh>
Always get confused with bash profile, etc.
Banistergalaxy has quit [Ping timeout: 248 seconds]
agarie has quit [Remote host closed the connection]
PanPan has joined #ruby
<shock_one>
OliverJAsh, I think they're just synonyms. But don't use both
icole has quit [Remote host closed the connection]
<Hanmac>
i thought that they may react different
icole has joined #ruby
<shock_one>
Hanmac, what do you mean?
benlieb has quit [Quit: benlieb]
<Hanmac>
i have seen a problem that some file was not loaded when opening an new terminal, or login on one of the 6 console shells ...
<Hanmac>
but i dont use rvm so i can not say it
Banistergalaxy has joined #ruby
mockra has joined #ruby
<shock_one>
On my mac .bashrc didn't work and on Ubuntu the same with .bash_profile. So, I had to use different names for the same file on this systems (ln to dropbox). But then I opened for myself ZSH and world became a better and brighter place
icole has quit [Ping timeout: 255 seconds]
Ouroboros has left #ruby ["Leaving"]
browndawg has joined #ruby
mockra has quit [Ping timeout: 244 seconds]
crackfu has joined #ruby
PanPan has quit [Remote host closed the connection]
<shock_one>
opened for myself → discovered. Don't translate idioms literally, idiot.
halfie has quit [Quit: Changing server]
Mon_Ouie has joined #ruby
stormetrooper has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
vlad_starkov has quit [Remote host closed the connection]
koopa_ has quit [Read error: Operation timed out]
nicoulaj has joined #ruby
OliverJAsh has quit [Quit: OliverJAsh]
danneu has joined #ruby
agarie has joined #ruby
agarie has quit [Remote host closed the connection]
icole has joined #ruby
toekutr has joined #ruby
lkba has quit [Ping timeout: 248 seconds]
Banistergalaxy has quit [Ping timeout: 248 seconds]
emergion has quit [Quit: Computer has gone to sleep.]
Banistergalaxy has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
vierja has quit [Read error: Connection reset by peer]
zzing has joined #ruby
joeycarmello has joined #ruby
Takehiro_ has joined #ruby
pyrac has joined #ruby
angusiguess has quit [Ping timeout: 244 seconds]
stormetrooper has joined #ruby
Takehiro has quit [Ping timeout: 248 seconds]
Konboi has quit [Remote host closed the connection]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
Asher has quit [Quit: Leaving.]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
bluOxigen has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
Asher has joined #ruby
vierja has joined #ruby
wallerdev has quit [Quit: wallerdev]
ryanf has quit [Quit: leaving]
lkba has joined #ruby
emergion has joined #ruby
qubit has joined #ruby
icole has quit [Remote host closed the connection]
bricker`LA has joined #ruby
Vuxil has left #ruby [#ruby]
pepee has joined #ruby
<pepee>
hi. is this for ruby in windows too?
Es0teric has quit [Quit: Computer has gone to sleep.]
icole has joined #ruby
icole has quit [Remote host closed the connection]
<shock_one>
pepee, yes
EPIK has quit [Ping timeout: 276 seconds]
toekutr has quit [Read error: Connection reset by peer]
<pepee>
hi shock_one
<shock_one>
aloha, pepee
matled has joined #ruby
<pepee>
well, I recently installed windows on a xp sp3 vm, and I'm getting an error: ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::EMFILE: Too many open files - socket(2) (http://rubygems.org/specs.4.8.gz)
<pepee>
dunno what that means, but I can't install gems, or well, do anything with the gem command...
mpfundstein has joined #ruby
decoponio has joined #ruby
<pepee>
installer: rubyinstaller-1.8.7-p371.exe
Xeago has quit [Remote host closed the connection]
Takehiro_ has quit [Remote host closed the connection]
DrShoggoth has quit [Quit: Leaving]
Takehiro has joined #ruby
<pepee>
also, is there any way to check what in what version of ruby can an script run? (other than running them)
OliverJAsh has joined #ruby
<Hanmac>
pepee: you can do ruby -c file ... this checks if the syntax is valid
pdamer has joined #ruby
pdamer has quit [Client Quit]
<pepee>
ah, thanks Hanmac
sandGorgon has quit [Ping timeout: 248 seconds]
elkclone has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<pepee>
I guess it has something to do with my system, win xp sp3 "FLP"...
<shock_one>
pepee, you can find RVM installation instructions for win somewhere else.
<pepee>
ok, thanks shock_one
Xeago has joined #ruby
braoru has joined #ruby
cyong has quit [Quit: Leaving.]
mockra has joined #ruby
Xeago has quit [Remote host closed the connection]
timols has quit [Quit: timols]
OliverJAsh has left #ruby [#ruby]
subbyyy has quit [Ping timeout: 256 seconds]
Trudko has joined #ruby
<Trudko>
Guys I am confused. I am using rails app and I have simple class and I would like to have class variable -> it is share between all instances and I would like to have default value for it. so i dont have nil exception when i first access it
kja has joined #ruby
<Trudko>
Problem is that it is number , i want to set it to 0, so if I can use it in code like this my_object.some_number_attr += 2
ntzrmtthihu777 has joined #ruby
thinkclay has quit [Quit: Leaving.]
<ntzrmtthihu777>
quic question, nothing more: in a html webpage you can use javascript; can you do the same with ruby?
bluOxigen has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 256 seconds]
bluOxigen has joined #ruby
yxhuvud has joined #ruby
<Trudko>
not in same way
<Trudko>
ntzrmtthihu777: ruby could be server side it cant be on front end AFAIK
vikhyat has quit [Remote host closed the connection]
* Hanmac
thinks the browser should add something like that .P
<Trudko>
javascript is compiled in browsers but browsers does not have support for ruby - they dont have ruby compiler built in
admin0 has joined #ruby
kja is now known as SilverKey
<Trudko>
I think having one buil in language which is as good as javascript is good enough :D
<Trudko>
btw I found answer to my question I should either doo foo.age = foo.age.to_i + 1 or foo.age = foo.age.to_i.succ
<shock_one>
Wow, there is ruby to javascript compiler http://opalrb.org/
<Trudko>
hh
<Trudko>
but it cant be implemented into browser can it?
<Trudko>
it will probably generate js files which you can then included in webpage
<shock_one>
No, it's like coffeescript
<Hanmac>
Trudko wounld it be cool if brower can do ruby? :D
<ntzrmtthihu777>
no, I think you are all missing my question, lol
<pepee>
apparently, there are lots of software that does that, lol
<ntzrmtthihu777>
I don't want to use javascript, I want to make a local "website" with ruby code in it, in a manner similar to how javascript is used, not to convert ruby to javascript
<pepee>
anyway, I can't run 'gem' in windows. cool... :not (
<pepee>
err * not :(
<ntzrmtthihu777>
linux +1
<pepee>
yeah, but in this case I need it on windows
<ntzrmtthihu777>
why, exactly?
mpfundstein has quit [Ping timeout: 252 seconds]
jeffreybaird has quit [Quit: jeffreybaird]
<pepee>
I need it for some windows app
<pepee>
gonna try installing manually
<pepee>
but gem is throwing this error...
<ntzrmtthihu777>
what ap? what's it do?
<pepee>
an app run tracer
<ntzrmtthihu777>
ah, ok. not my area of knowledge, carry on
<ntzrmtthihu777>
hmm, eruby seems to be what I need
maxmanders has quit [Ping timeout: 248 seconds]
relix has joined #ruby
PanPan has quit [Ping timeout: 248 seconds]
PanPan has joined #ruby
maxmanders has joined #ruby
nomenkun has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
mpfundstein has joined #ruby
beachandbytes has quit []
bluOxigen has joined #ruby
Hecatic has joined #ruby
niklasb has joined #ruby
bluOxigen has quit [Read error: Connection reset by peer]
ntzrmtthihu777 has left #ruby [#ruby]
bradleyprice has quit [Remote host closed the connection]
tchebb has quit [Read error: Connection reset by peer]
bluOxigen has joined #ruby
tchebb has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
workmad3 has joined #ruby
shock_one has joined #ruby
marr has joined #ruby
nomenkun has quit [Remote host closed the connection]
<cmyers>
I have a complex acyclic directed graph (like software dependencies). I'd like to draw it. Any advice for what a good package is to use in my rails app? There seem to be a lot (https://www.ruby-toolbox.com/categories/graphing )
<Trudko>
GUys I have hashmap and I put there object of class Foo and then I want to sort it by integer value age what should I do? this didnt work http://pastie.org/6201830
Elhu has joined #ruby
<shock_one>
Trudko, sory_by!
<cmyers>
also, I don't think the args are key,value, they are |a, b|, right?
<shock_one>
or you can chain each to sort_by
emergion has joined #ruby
<shock_one>
cmyers, it doesn't matter how you name them
nari has joined #ruby
<cmyers>
right, but if you use them wrong...
adamjleonard has quit [Quit: Leaving...]
<shock_one>
cmyers, the first is usually the best (talking about graphing)
<cmyers>
shock_one: thanks, I will check it out first
<cmyers>
(more usefully - python only allows 4-space indents, and is white-space sensitive, which is a sin uncomparable among sins programming languages can make)
nomenkun has quit [Ping timeout: 248 seconds]
mockra has joined #ruby
<cmyers>
dusag: the documentation is versioned, but it is shitty and hard to find... a few other things on that list I wouldn't call bad
<cmyers>
but generally, I agree with most things on it
<dusag>
cmyers: so python wins?
<dusag>
whatis the advantage of ruby over python
emergion has quit [Quit: Computer has gone to sleep.]
<cmyers>
fuck no
<cmyers>
every language has bad things
<cmyers>
see python in that same list?
pskosinski has joined #ruby
<Hanmac>
dusag: this page sucks because: "Redundant operators: ||/or, &&/and, !/not. " this is not true, they react totaly different
<cmyers>
I don't understand why the first, second, third, and fourth thing in the python list isn't "whitespace sensitive what the frucking fuck motherfuckers??????"
answer_42 has joined #ruby
<canton7>
and it's a bad idea to interchange them
xardas has joined #ruby
<canton7>
foo = bar and baz is utterly different to foo = bar && baz
<cmyers>
dusag: suffice to say, anyone who asks "which is better, X or Y" is obviously a novice. The real unbiased answer is always "it depends on what you are trying to do"
<Hanmac>
" Standard containers (Array, Hash) have a very big interfaces that make them hard to emulate. " thats wrong too, the most of the stuff cames from the Enumerable module
<cmyers>
also, everything is easy to emulate in ruby, it's simple duck typing.
noxoc has joined #ruby
colonolGron has joined #ruby
<cmyers>
the only language I would literally never defend in any situation ever, no matter what, and I am absolutely positive should die in a fire immediately and with extreme prejudice, is php.
workmad3 has quit [Ping timeout: 276 seconds]
TheFuzzball has joined #ruby
niklasb has quit [Ping timeout: 252 seconds]
PanPan has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
mockra has quit [Ping timeout: 252 seconds]
pepee has quit [Quit: goto Quit;]
staafl has joined #ruby
blacktulip has joined #ruby
Dwarf has quit [Ping timeout: 256 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
companion has quit [Ping timeout: 246 seconds]
<dusag>
they say hackers use ruby a lot right
<dusag>
with metasploit and stuff
ferdev|away is now known as ferdev
<dusag>
its the hackers language
companion has joined #ruby
<cmyers>
a real hacker uses the best tool for the job. it isn't always the same tool.
Xeago has joined #ruby
<Xeago>
shock_one: Indeed, setting the sticky bit — If you didn't receive the memo.
_bart has joined #ruby
m8 has joined #ruby
<shock_one>
Xeago, no I didn't.
<Xeago>
You are shock_one at nickserv right?
<shock_one>
Xeago, yes.
<Xeago>
never used MemoServ before, but that is how I send it
<Xeago>
4115 Xeago: SEND shock_one Indeed, setting the sticky bit.
<Xeago>
4116 MemoServ: The memo has been successfully sent to shock_one.
<Xeago>
that was last night after you timed out
Hecatic has quit [Quit: Àá¼ö]
<shock_one>
Xeago, I still didn't get it. So, this sticky bit should set the user or anyone from the group?
himsin has quit [Quit: Leaving]
<postmodern>
dusag, "hackers" who use metasploit don't really use Ruby, they just use metasploit's console or GUI
companion has quit [Ping timeout: 248 seconds]
<postmodern>
dusag, if you want to use Ruby for writing exploits or automating tasks, might checkout Ronin: http://ronin-ruby.github.com/
niklasb has joined #ruby
himsin has joined #ruby
d3vic3 has quit [Ping timeout: 264 seconds]
companion has joined #ruby
<shock_one>
Xeago, If I understand correctly, The owner sets default permissions using setfacl -d -m g::rw. So, if you're group, you can't change anything.
staafl has quit [Quit: Leaving]
Elhu has joined #ruby
Umren|2 has joined #ruby
<shock_one>
Xeago, I have two questions — why two colons and why do I need to set this sticky bit?
hbpoison has quit [Ping timeout: 252 seconds]
Umren has quit [Ping timeout: 264 seconds]
backjlack has joined #ruby
senayar has joined #ruby
<Xeago>
shock_one: I haven't done more than obtain that information
<Xeago>
haven't tried applying the fix
<Xeago>
shock_one: to all your other questions, no idea
jean-louis has joined #ruby
kraljev has joined #ruby
senayar has quit [Remote host closed the connection]
Catbuntu has quit [Quit: <Bradford> ILVerano: acabo de instalar algunso temas nuevo para mi windows7 (------------8 <-- AHAHAHAHAHHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAHAH ROFLMAO]
Chinorro has quit [Remote host closed the connection]
<kraljev>
ERB took 11.5ms
<kraljev>
completely equivalent output
hbpoison has quit [Ping timeout: 256 seconds]
pyrac has joined #ruby
<e-dard>
While the topic of discussion is on caching templates output for static pages. What are the typical approaches here? Something inbuilt in framework, Redis, Memcached? Or Varnish on web-server?
samphippen has joined #ruby
<kraljev>
Currently, I am using a "global" ruby variable for that
<kraljev>
this way, there is no connection overhead
<e-dard>
kraljev: so you're checking for a key in a hash of strings or something before calling tempting engine?
wereHamster has quit [Changing host]
wereHamster has joined #ruby
<kraljev>
yes, or any other resource for that matter
<apeiros_>
kraljev: that surprises me. good to know.
<kraljev>
you get rid of all connection overheeads
<kraljev>
but downside - it is not scallable
<e-dard>
kraljev: one issue with that I guess is if you (say) modify a blog post later on - expiring the cache
<kraljev>
multiple servers, etc...
browndawg has joined #ruby
<apeiros_>
hm? local caching scales well
<kraljev>
then one of the requests has to delete the key
<apeiros_>
caching's N is the amount of data to cache, not amount of requests
<kraljev>
that means your cache is in fact part of memory for ruby process
<e-dard>
yeah that makes sense. My use-case is different (file-based pages maintained via git). I think i will make a post-receive hook maybe to release associated post from cache :)
<kraljev>
if you have multiple servers, then you have to use connection-based solution, like memcached
<apeiros_>
kraljev: I disagree
<kraljev>
feel free to say why you disagree :(
<kraljev>
:)
<apeiros_>
as said, caching's scaling factor is the amount of data to cache. and usually that's connected to the app, not to the requests.
<apeiros_>
walterheck: ah, I said what I said because I thought you said your ruby version was 1.9, while the error said it was 1.8. but then I noticed that it was Mo0O asking something entirely unrelated, and it was him who said he was using 1.9
<apeiros_>
walterheck: what does `rails -v` say?
<walterheck>
apeiros_: oh right, haha. Well, i'm now on 1.9.2 either way :)
<apeiros_>
walterheck: well, if you upgraded, you should have gone for 1.9.3 :-p
<user666>
However, it seems there is no ncurses-dev package
<apeiros_>
i.e., that you've not yet stabilized on the API
<apeiros_>
user666: may be just ncurses
<user666>
ncurses-base I presume
<apeiros_>
no idea how your distro names its packages
<walterheck>
apeiros_: of course that wasn't the end of it. Now my rails app has rails 2.3.5 in configuration.rb, can I blindly update that to 3.2.12 and hope it all works? Seems unlikely :)
<zorbyte>
user666: libncurses-dev ?
<apeiros_>
walterheck: absolutely not
<user666>
zorbyte, probably yea
Elhu has joined #ruby
<apeiros_>
walterheck: rails 2.3 -> 3.2 is quite an upgrade, many things changed. depending on the size of your app, you have a couple of days of work ahead of you upgrading it to 3.2…
Dwarf has joined #ruby
<apeiros_>
there are a couple of guides on how to properly migrate a rails app
<user666>
Might as well install libncurses-ruby1.9.1
<apeiros_>
there even is a gem
<walterheck>
pff, considering I was following a tutorial and I was on chapter 3 I'll just redo what I did so far ;)
<apeiros_>
ah, in that case - yes
<apeiros_>
but if your tutorial is for rails 2.3, you can can it
Elhu has quit [Client Quit]
<walterheck>
so, 2 hours of versioning mess and I'm back to scratch. Not super-excited here :)
<_bart>
shock_one: ah good one, thanks. The gem is production ready, so that's a 1.0
<shock_one>
_bart, should be 1.0.0
<walterheck>
shock_one: yeah, was probably just my ignorance that led me down the 1.8.7 / 2.3.5 path. Debian comes with that, I didn't know :)
<apeiros_>
debian (or apt) is the enfant terrible in the ruby community
<apeiros_>
I wished they'd to solve to mess they create themselves - maybe that'd change their attitude.
<apeiros_>
*have to solve
cousine has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
Dave has joined #ruby
Dave is now known as Guest21629
<shock_one>
apeiros_, what OS do you use?
<apeiros_>
osx
arya has joined #ruby
<whitequark>
apeiros_: packaging gems with native extensions as debs is a good idea
<whitequark>
especially given that ruby infrastructure handles that (almost) well
<apeiros_>
whitequark: I'd rather not discuss that topic. IMO the whole packaging idea is completely messed up in *nix world.
beilabs has quit [Ping timeout: 260 seconds]
<whitequark>
meh
<walterheck>
apeiros_: well, I view the rpoblem the other way around as a sysadmin. Why can't these languages not just stick to the rpm/apt paradigms. Managing servers with three different package management systems is a nightmare
postmodern has quit [Quit: Leaving]
<whitequark>
walterheck: there is a simple answer: because there is too much OS-specific package managers
<whitequark>
not even talking about OSes without one.
<walterheck>
but yeah, 20 people = 45 opinions, noone is completely right or wrong :)
<apeiros_>
walterheck: because people work around problems. it's not like I was happy with the situation.
<apeiros_>
the "language" itself doesn't do anything. there is ruby for apt. there are gems repackaged as apt packages.
<walterheck>
whitequark: well, if we look at production environments for ruby on rails specific, i'll bet that 90% is on yum or apt.
<apeiros_>
but walterheck, if you wrote a library, would you repackage it for every OS and package manager?
<apeiros_>
or by what rationale do you pick some?
<whitequark>
walterheck: first, that's already two. second, if you're ignorant about non-rails envs, it doesn't mean that everyone is
tk_ has joined #ruby
<apeiros_>
walterheck: 90% of rails dev envs is not apt/yum
<walterheck>
whitequark: true and true. As I said, I see the points being made on both sides of the table here, and I'm not sure who is right. I just know I'm sitting on the sysadmin side of the table, and it doesn't look pretty when you run a server with perl, ruby and nodejs apps
<whitequark>
bundler would solve the deployment problem, albeit in OS X way, if only it wasn't for native extensions
<apeiros_>
go to a railsconf, you'll see like 95% macs there (of course, they might run a debian or whatever, I think it's unlikely that the number is in the high percentages, though)
wmoxam has joined #ruby
<whitequark>
apeiros_: the majority of developers don't go to conferences
<whitequark>
neither the devs who do a representative slice of the entire population
<whitequark>
*neither are
<walterheck>
apeiros_: yeah, so then the discussion is more about what is more important: catering to devs or to ops? I personally am a big fan of devops, which is why I'm trying to develop in a system equal to production
<apeiros_>
walterheck: there is no one or the other. it's all about communication. the moment it is a versus situation, both lose.
<walterheck>
anyway, megatron isn't coming any close to life with this discussion. Thanks for all the help, I imagine I'll be back :)
<apeiros_>
and I don't know where the problem lies with apt, but it has been a notoriously bad experience wrt ruby. no idea who is the culprit there.
<whitequark>
apeiros_: I've read some communication logs in the debian bug tracker
spider-mario has quit [Remote host closed the connection]
<whitequark>
it seems that the packaging was, and still is, done by people who don't understand how is it commonly done in Ruby.
Virunga has joined #ruby
<apeiros_>
so communication issues indeed…
<whitequark>
also a lot of people hate (literally) them, which creates even more problems.
<whitequark>
as in hate mail.
<shock_one>
I was removing gstreamer1.0 using apt-get yesterday and it removed like half of my system including, for example, software-center and indicator-date.
<apeiros_>
why am I not surprised
<whitequark>
shock_one: the question is why were you removing gstreamer
<whitequark>
I wouldn't be surprised if removing libc removed your *entire* system.
<shock_one>
whitequark, because mplayer don't use it
<whitequark>
shock_one: that is not an answer
<whitequark>
or, in other words, APT removed half of your system because you told it to do so.
<shock_one>
Right. I wanted to reinstall it because it didn't work correctly. In totem I was seeing vertical coloured lines.
arya_ has joined #ruby
<shock_one>
whitequark, I had no idea indicator-date depends on gstreamer
jpfuentes2 has joined #ruby
<whitequark>
shock_one: AFAIK gtk depends on gstreamer
<whitequark>
for various reasons having all to do with debian not being gentoo
<apeiros_>
1 week of holidays + 1 open pack of bacon = lots of bacon that needs to be eaten immediately
<apeiros_>
awesomo breakfast, here I come :D
pyrac has joined #ruby
<whitequark>
apeiros_: I heard it's bad for your heart to eat too much bacon
<whitequark>
(which is a pity)
<apeiros_>
lots of things are bad
<apeiros_>
never stopped me either :)
* whitequark
doesn't want to have a heart attack at 45
joofsh has joined #ruby
Xeago has joined #ruby
deodu has joined #ruby
deodu is now known as Agis_
skattyadz has quit [Ping timeout: 244 seconds]
Agis_ is now known as deodu
deodu is now known as artofraw
PanPan has quit [Ping timeout: 276 seconds]
PanPan has joined #ruby
* apeiros_
won't have one
skattyadz has joined #ruby
io_syl has quit [Quit: Computer has gone to sleep.]
skattyadz has quit [Client Quit]
<whitequark>
apeiros_: there isn't a lot of reasons to be so sure about your fate
arya has joined #ruby
* apeiros_
doesn't need any :)
<apeiros_>
overall, I live pretty healthy
<whitequark>
oblivion is bliss :D
<apeiros_>
I'm not afraid of getting a heart attack at 45 due to a bit of bacon
<shock_one>
whitequark, do you use some script to upload to imgur?
<kraljev>
i do too, except I'm smoking
* whitequark
was mostly trolling
<whitequark>
shock_one: fingers
arya has quit [Client Quit]
<apeiros_>
I was rather surprised how well that one week of holidays went
arya has joined #ruby
<apeiros_>
I was skiing for a week, and I raced the tracks
<shock_one>
Holidays?
<whitequark>
apeiros_: hey, why did you have a week of holidays? no country I know of has them officially
<apeiros_>
whitequark: switzerland has official school holidays
<apeiros_>
but I'm not bound by school holidays anyway ;-)
<whitequark>
I would be rather surprised :D
<apeiros_>
I have 22 days I can take whenever I want (as long as bigboss agrees)
<apeiros_>
I'm also pondering to reduce my work contract to ~92%, and take a full month off each year. no idea whether I get that.
<apeiros_>
*I'll
* whitequark
has some colleagues working remotely from Thailand
<whitequark>
because that's how they roll
<apeiros_>
I'd love to do that, but even if was allowed to, I wouldn't
<apeiros_>
I'm too easily distracted
<apeiros_>
and thailand… full of distractions :D
<whitequark>
apeiros_: Earth is full of islands which are boring as fuck
<apeiros_>
ok, let me put it differently - it's good if somebody else is working in the same room :)
<whitequark>
this is why I'm still in Russia, yeah.
<Hanmac>
whitequark: "Universe is full of Planets which are boring as fuck" :P
<whitequark>
or else: what's the point of going 10Mm to the south if all you're going to do is stare to the screen
<whitequark>
Hanmac: that is indeed very true
<shock_one>
whitequark, still saving for a traktor?
arya has quit []
<apeiros_>
whitequark: well, living costs in thailand are like *waaay* lower than here, so remote work with the same salary == awesome
<apeiros_>
also I'd probably get a massage twice a day
arya has joined #ruby
* atmosx
cooking and watching depeche mode documentary
<whitequark>
apeiros_: I'm more concerned about outdoor temperature
<whitequark>
because COLD AS FUCK and crap all over the roads is very uncool
<apeiros_>
oh, just work in an air conditioned room
<apeiros_>
ah, in russia you mean?
<whitequark>
... not in Thailand :)
<whitequark>
yea
<atmosx>
Or work from a Greek island
ananthakumaran has quit [Quit: Leaving.]
<atmosx>
Crete for example
<atmosx>
When you are working remotely, how do taxes apply?
admin0 has quit [Quit: admin0]
ananthakumaran has joined #ruby
<atmosx>
you pay taxes in Thailand or elsewhere?
<apeiros_>
good question - no idea
<apeiros_>
probably depends on the law of both countries
<whitequark>
atmosx: our folks just re-enter thailand every month
<whitequark>
you get the idea
<atmosx>
ah i see
<atmosx>
That would be awesome though, work remotely. I had some friends that worked on github and another almost-famous company… remotely but they can't disclose any info no their contract.
<apeiros_>
hm, actually… that 1 month off… I could spend that in any country…
<apeiros_>
could combine that with language studies
<atmosx>
although they didn't seem to do anything *of outter importance*
<atmosx>
apeiros_: you study languages?
<apeiros_>
s/study/learning/
jonathanwallace1 has joined #ruby
<apeiros_>
I'm trying to pick up languages again, yes. failing at getting my work morale up, though. it's a wonder I'm still following in classes :)
<atmosx>
apeiros_: But your swiss so you should speak Italian, English, German and French right? :-P
<apeiros_>
atmosx: I do
<banisterfiend>
atmosx: you're*
<apeiros_>
my french and italian are rather rusty, though
<apeiros_>
atmosx: also latin ;-)
* whitequark
can listen to german, like, forever. it just sounds good.
Guest21629 has quit [Read error: Connection reset by peer]
<apeiros_>
seriously? funny :D
<whitequark>
apeiros_: totally
dangerousdave has joined #ruby
khismetix has quit [Quit: Computer has gone to sleep.]
jpfuentes2 has quit [Quit: Computer has gone to sleep.]
<apeiros_>
interesting… I think the only language I found remotely pleasant to listen to was latin.
* whitequark
looks at this database where an equivalent period has a length of 1 day, 23:59:59 and 23:59:59.99999.
* whitequark
cries.
<whitequark>
well, either of those in different rows.
<apeiros_>
"but it works!" :)
<whitequark>
I want to fucking kill that guy with a spade and then dig him a grave with my bare hands, after working with this codebase for half a year.
zoonfafer has quit [Ping timeout: 248 seconds]
tensil_ has joined #ruby
gyre007 has joined #ruby
tensil has quit [Ping timeout: 248 seconds]
tensil_ is now known as tensil
<kraljev>
0.999(9) == 1
<whitequark>
kraljev: this isn't math
<kraljev>
sure :)
<kraljev>
Does anyone know a good resource on ruby (operator) precendece?
<banisterfiend>
whitequark: what about his wife and kids, who will support them
<apeiros_>
oooh, haha, haven't visited for years, funny: "NOTE: 1.9 has a horrible extension to allow you to define != and !~. A special place in hell is reserved for you if you define those."
<whitequark>
banisterfiend: what
<whitequark>
ah, that guy
<apeiros_>
life insurance
<whitequark>
he's single and a drug addict, which is IMMEDIATELY CLEAR from his code
<apeiros_>
:D
<banisterfiend>
whitequark: drug addict ==> occasionally smokes weed? :)
F1skr has quit [Quit: WeeChat 0.4.0]
<whitequark>
banisterfiend: weed, cocaine, meth... afaik. maybe more
<banisterfiend>
krokodil
<apeiros_>
weed is bad enough for the brain
<whitequark>
apeiros_: weed doesn't do anything irreversible
<sam113101>
is it?
<apeiros_>
whitequark: yes it does
<apeiros_>
it renders your short term memory rather useless
TMM has quit [Quit: Bye]
<whitequark>
apeiros_: yea, that effect fades off after a year
<apeiros_>
no
<apeiros_>
it is reduced
<apeiros_>
but not removed
meoblast001 has joined #ruby
nanothief has quit [Ping timeout: 264 seconds]
<whitequark>
last time I searched pubmed, the consensus seemed to be that it does. *shrugs* maybe you know better
ferdev|away is now known as ferdev
<apeiros_>
I'd love to see how a guy I knew fares
<apeiros_>
he smoked ~400$/week of weed
<apeiros_>
he had literally no short term memory at all. you could tell him something and he'd not remember it 5min later if his life depended on it
<apeiros_>
I have no idea how that guy manages his life
<whitequark>
apeiros_: note that while THC itself is, to my knowledge, pretty harmless, byproducts aren't; in particular, heavy metals and remains of pesticides.
miskander has joined #ruby
<apeiros_>
whitequark: ah, that may be. I haven't read the full study, only excerpts.
<whitequark>
which is why you should only smoke good weed :D
mpfundstein has quit [Remote host closed the connection]
kn330 has quit [Ping timeout: 240 seconds]
<whitequark>
banisterfiend: if he did _that_, it'd render him pretty harmless. which at least could save our codebase.
<whitequark>
unfortunately he didn't.
solidoodlesuppor has joined #ruby
<kraljev>
i doubt pesticides play any role here
spider-mario has joined #ruby
zz_chrismcg is now known as chrismcg
<kraljev>
if you see what kind of food we eat
<kraljev>
we'd all be brainless up to time
<whitequark>
kraljev: it's not good to inhale organosulphur compounds. at any circumstances and any level
miskander has quit [Read error: Connection reset by peer]
miskander has joined #ruby
<kraljev>
and tobacco is without it?
mpfundstein has joined #ruby
<apeiros_>
tobacco being legal is regulated
<whitequark>
eating is one thing; acidic and then basic environment in your digestive tract is kinda hardcore
<apeiros_>
that's one of the issues with illegal substances - no regulation, no tests
<whitequark>
also what apeiros_ said.
<kraljev>
legalize weed! :)
punkrawkR^Home has joined #ruby
hbpoison has quit [Ping timeout: 276 seconds]
io_syl has joined #ruby
<apeiros_>
our government started to provide drug tests free of prosecution due to that
enebo has joined #ruby
RurouniJones has quit [Remote host closed the connection]
<whitequark>
yeah, it's like needle exchange programs. far easier to make it way more harmless than to deal with results.
<whitequark>
and thousands times cheaper
<shock_one>
apeiros_, you don't remember whether you did drugs and want to test?
enebo has quit [Client Quit]
<apeiros_>
kraljev: It'd probably be better to legalize all drugs and regulate it instead. it's not like prohibition ever managed to limit availability
<apeiros_>
shock_one: hu?
<apeiros_>
shock_one: no, drug tests, as in, you bring the drugs, they test it and tell you whether it's clean
<whitequark>
apeiros_: it did/does limit availability, but at enormous cost
<apeiros_>
and they do that under the promise not to legally prosecute you
<kraljev>
wow, that is amazing
<apeiros_>
it's a cost/benefit thing
<shock_one>
apeiros_, can they clean them for me?
<apeiros_>
and yes, it's amazing. because it means somebody used rational thinking in government.
<apeiros_>
shock_one: no
<apeiros_>
they only test
<whitequark>
mass spectrometry is cheap nowadays :D
arya has quit [Ping timeout: 248 seconds]
<apeiros_>
they do not want to support your drug use. they want to reduce the costs incurred through dirty drugs.
<whitequark>
"Somebody in government uses rational thinking. It is not very effective."
<whitequark>
or, in this case, it is...
baker_ has joined #ruby
Z_Mass has joined #ruby
sayan has joined #ruby
baker_ has left #ruby [#ruby]
kofno has quit [Remote host closed the connection]
Al__ has joined #ruby
kofno has joined #ruby
mockra has joined #ruby
evenix_ has quit [Read error: Connection reset by peer]
garbagecollectio has joined #ruby
evenix has joined #ruby
ferdev is now known as ferdev|away
<Sp4rKy>
:D
kraljev3 has joined #ruby
arya has joined #ruby
ahokaomaeha has joined #ruby
ahokaomaeha is now known as Guest31528
jean-louis has quit [Ping timeout: 252 seconds]
mockra has quit [Ping timeout: 248 seconds]
kraljev has quit [Ping timeout: 276 seconds]
Spooner has joined #ruby
<apeiros_>
whitequark: I did a bit of superficial googling. it might be that reversability of the effect depends on the age when you start smoking
kirun has quit [Ping timeout: 245 seconds]
yfeldblum has quit [Ping timeout: 248 seconds]
<artofraw>
people using iTerm, do you use tmux with it?
yfeldblum has joined #ruby
jimeh has quit [Quit: Computer has gone to sleep.]
tk_ has quit [Quit: ばいばい]
<whitequark>
apeiros_: AIUI, from the biochemistry POV, THC reversibly binds to GABA neurons
<whitequark>
so the THC itself simply cannot cause irreversible effects on that level.
<apeiros_>
AIUI = as I understand it?
<whitequark>
yea
eldariof has joined #ruby
<apeiros_>
now I'm curious, I wish I could get my hands at what I read again… :-/
<apeiros_>
well, if it's reversible, great. I understood that it would only be partially restored. maybe I misremember.
<whitequark>
why would it be used as a medical drug otherwise? note that you don't get to smoke weed; what you inhale is basically vaporized THC--and pretty pure one.
<whitequark>
exactly because the harmful part is byproducts of burning tons of unknown (in the case of illegal drugs) substances.
<shock_one>
whitequark, how to translate «bored grunt»?
<whitequark>
shock_one: slovari.yandex.ru
jrajav has joined #ruby
<shock_one>
whitequark, I believe it's some sort of idiom. It can't just mean «похрюкивание от скуки»
<kraljev3>
zdolgočasen kmet
fedza has joined #ruby
octoberry has joined #ruby
ferdev|away is now known as ferdev
<whitequark>
shock_one: I don't know it any better than you
<shock_one>
whitequark, OK, sorry.
ddd has joined #ruby
CreativeEmbassy has joined #ruby
ddd is now known as Guest54235
monkegjinni has quit [Remote host closed the connection]
V8Energy has joined #ruby
bulldog1 has joined #ruby
bulldog1 has left #ruby [#ruby]
<apeiros_>
wow, iphone's panorama functionality is amazing
<apeiros_>
seamless even for some things which were moving
<whitequark>
apeiros_: I guess those things didn't cross the internal photo boundary
<apeiros_>
probably
<apeiros_>
still amazing
browndawg has joined #ruby
arya has quit [Ping timeout: 248 seconds]
hbpoison has joined #ruby
b1rkh0ff has joined #ruby
xaq has joined #ruby
kn330 has joined #ruby
arya has joined #ruby
Neomex has joined #ruby
AndChat| has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
vierja has quit [Ping timeout: 252 seconds]
banisterfiend has quit [Ping timeout: 255 seconds]
Al__ has quit [Quit: Al__]
<Mo0O>
hi, I've an error: bundle: command not found unicorn.
Banistergalaxy has quit [Ping timeout: 248 seconds]
vierja has joined #ruby
baroquebobcat has joined #ruby
vierja has quit [Max SendQ exceeded]
<Mo0O>
but I've install it with: gem install unicorn
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
miskander has quit [Quit: miskander]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
maxmanders has joined #ruby
hbpoison has quit [Ping timeout: 256 seconds]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
xaq has quit [Remote host closed the connection]
vierja has joined #ruby
nomenkun has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
pyro111 has joined #ruby
_md has joined #ruby
timonv has joined #ruby
vierja has joined #ruby
sayan has quit [Quit: Leaving]
pavilionXP has joined #ruby
CreativeEmbassy has quit [Quit: Computer has gone to sleep.]
SDr has joined #ruby
carloslopes has joined #ruby
Slivka has quit [Ping timeout: 248 seconds]
adambeynon has joined #ruby
visof has joined #ruby
visof has left #ruby [#ruby]
jekotia has joined #ruby
crackfu has joined #ruby
backjlack_ has joined #ruby
pskosinski has joined #ruby
stevechiagozie has joined #ruby
backjlack has quit [Read error: Operation timed out]
zorbyte has joined #ruby
k610 has joined #ruby
miskander has joined #ruby
_nitti has joined #ruby
himsin has joined #ruby
x0F_ has joined #ruby
x0F has quit [Disconnected by services]
vikhyat has quit [Remote host closed the connection]
x0F_ is now known as x0F
mockra has joined #ruby
zz_Inoperable is now known as Inoperable
shock_one has quit [Ping timeout: 252 seconds]
cousine has quit [Ping timeout: 256 seconds]
Edward_ has joined #ruby
banisterfiend has joined #ruby
atmosx has quit [Quit: And so the story goes…]
mattbl has joined #ruby
octoberry has quit [Ping timeout: 248 seconds]
mockra has quit [Ping timeout: 252 seconds]
swex_ has joined #ruby
mattbl has quit [Client Quit]
adeponte has joined #ruby
<_bart>
How do I turn [ 1, 1, 1, 1] into [ [ 1, 1], [1, 1] ] by specifying that it should be in parts of 2?
motto has joined #ruby
a_a_g has joined #ruby
<Mon_Ouie>
each_slice(2).to_a
<V8Energy>
any ideas why using this code to retrieve data from a page that requires authentication, i get authentication error? http://pastebin.com/Ni67QZfb
<V8Energy>
it works for me if i user browser to connect with the same credentials
<V8Energy>
but in ruby i get: #<Net::HTTPUnauthorized 401 Unauthorized readbody=true>
<_bart>
Mon_Ouie: thanks!
miskander has quit [Quit: miskander]
m8 has quit [Ping timeout: 256 seconds]
<Mon_Ouie>
V8Energy: I don't really know, but another issue with that code is that the response variable is not defined.
swex has quit [Ping timeout: 256 seconds]
kirun has joined #ruby
yshh has joined #ruby
Neomex has quit [Quit: Neomex]
Z_Mass has quit [Quit: WeeChat 0.4.0]
<V8Energy>
my bad, i am missing a line in pastebin
generalissimo has quit [Ping timeout: 260 seconds]
ndboost has quit [Remote host closed the connection]
<V8Energy>
anybody?
braoru has quit [Ping timeout: 260 seconds]
francisfish has joined #ruby
dallasm has joined #ruby
sn0wb1rd has joined #ruby
jpfuentes2 has joined #ruby
dmiller has joined #ruby
hbpoison has joined #ruby
AndChat| has quit [Ping timeout: 240 seconds]
Banistergalaxy has joined #ruby
<V8Energy>
:[
sepp2k1 has quit [Remote host closed the connection]
matchaw___ has joined #ruby
<V8Energy>
it's really quiet here lol
matchaw has quit [Ping timeout: 248 seconds]
Mon_Ouie has quit [Ping timeout: 276 seconds]
SCommette has quit [Quit: SCommette]
pandawarrior has joined #ruby
browndawg has quit [Quit: Leaving.]
EPIK has joined #ruby
<canton7>
sunday - no-one's at work:P
timhaines has joined #ruby
cousine has joined #ruby
tommyvyo has joined #ruby
carloslopes has quit [Remote host closed the connection]
Mchl has joined #ruby
browndawg has joined #ruby
PanPan has quit [Ping timeout: 256 seconds]
a_a_g_0 has joined #ruby
a_a_g has quit [Ping timeout: 248 seconds]
jekotia has quit [Quit: ChatZilla 0.9.90-rdmsoft [XULRunner 18.0.2/20130201065344]]
benlieb has joined #ruby
spychalski has joined #ruby
budmang has quit [Read error: Operation timed out]
cousine_ has joined #ruby
PanPan has joined #ruby
monkegjinni has joined #ruby
spychalski has left #ruby [#ruby]
cousine has quit [Ping timeout: 256 seconds]
tvw has joined #ruby
pavilionXP has quit [Read error: Connection reset by peer]
otherj has joined #ruby
admin0 has joined #ruby
adamjleonard has joined #ruby
<zorbyte>
V8Energy: your code works for me (tested on a httpd basic auth)
Pandaen has quit [Read error: Connection reset by peer]
<V8Energy>
strange
LouisRoR has joined #ruby
<V8Energy>
why doesn't it work for me then?
<zorbyte>
no typo in url or login/passwd?
<V8Energy>
nope.. i tried over and over with different browsers
<V8Energy>
and it is localhost
joofsh has quit [Remote host closed the connection]
dallasm has quit [Remote host closed the connection]
<V8Energy>
hmm, when i am trying to open the same page from IE, it tries to open it as a file for some reason
<_bart>
How do I load all the pixels of a png in a 2D array using chunky png?
<V8Energy>
but it's a json response
pyrac has quit [Quit: pyrac]
<_bart>
ah think I got it -.- just file[x, y]
meoblast001 has quit [Remote host closed the connection]
budmang has joined #ruby
dallasm has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
thufir_ has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
mockra has joined #ruby
dallasm has quit [Remote host closed the connection]
pskosinski has quit [Quit: silly dwm reexec…]
chrismcg is now known as zz_chrismcg
benlieb has quit [Quit: benlieb]
pskosinski has joined #ruby
beiter has quit [Quit: beiter]
dallasm has joined #ruby
pskosinski has quit [Client Quit]
kofno has quit [Remote host closed the connection]
baroquebobcat has quit [Quit: baroquebobcat]
tvw has quit []
pyro111 has quit [Quit: Leaving]
pskosinski has joined #ruby
backjlack_ has quit [Remote host closed the connection]
mockra has quit [Ping timeout: 244 seconds]
backjlack has joined #ruby
nonchalanto has joined #ruby
<nonchalanto>
does anyone know if sidekiq is run per project or if it can be used like a daemon for the entire system (i.e. other ruby projects on the same box)
ferdev is now known as ferdev|away
<apeiros_>
I'd suspect that it's a daemon. I'm sure its website tells the full story.
<_bart>
I think it's because I'm testing on an image file with charlie sheen in it, I can't think of another explanation
shock_one has joined #ruby
sandGorgon has joined #ruby
<_bart>
any idea why image[x, y] is not allowed?
<apeiros_>
_bart: you're missing a line from the backtrace I think
<apeiros_>
usually it states the class the method is called upon
<_bart>
apeiros_: no this is it
<apeiros_>
ah, no, it doesn't - bad ruby, bad
joofsh has joined #ruby
<apeiros_>
_bart: emit `image.class` prior to that line
LouisRoR has quit [Disconnected by services]
<apeiros_>
then check that class' docs
n8888 has joined #ruby
<_bart>
good one
<apeiros_>
well, should be ChunkyPNG::Image
<apeiros_>
given the last part of your code :)
joofsh has quit [Remote host closed the connection]
<_bart>
apeiros_: ChunkyPNG::Image
<_bart>
Fixnum
emmanuelux has joined #ruby
<_bart>
so the very first time it runs properly, the second loop it's a fixnum
<_bart>
that's weird
d3vic3 has joined #ruby
<_bart>
ah it's not weird, haha
LouisRoR has joined #ruby
<apeiros_>
line 15 & 17 ;-)
<_bart>
I forgot the [x, y] below on line 15, 17, gah
<_bart>
Pff, I feel stupid
joofsh has joined #ruby
<apeiros_>
it'd really help if rubys default ArgumentError included the class :(
nicoulaj has joined #ruby
sailias has joined #ruby
n8888 has quit [Ping timeout: 256 seconds]
joofsh has quit [Remote host closed the connection]
sailias has quit [Client Quit]
hbpoison has joined #ruby
<apeiros_>
_bart: also take a look at ChunkyPNG::Canvas#pixels + Array#map
timonv has quit [Read error: Connection reset by peer]
timonv_ has joined #ruby
havenwood has joined #ruby
GuidovanPossum has joined #ruby
hbpoison has quit [Ping timeout: 260 seconds]
<apeiros_>
_bart: btw., red/green/blue have different intensities on the human eye. if you want to do it well, you should multiply the values accordingly :)
<apeiros_>
WOW
<_bart>
apeiros_: yes good advice, but this is just for a quick joke
<_bart>
:)
<apeiros_>
gist editor has collapsable thingies now
caleb_io has joined #ruby
timhaines has quit [Quit: timhaines]
kofno has joined #ruby
syamajala has joined #ruby
kokainepizza has joined #ruby
ToTo has quit [Quit: Leaving...]
a_a_g_0 has quit [Quit: Leaving]
kokainepizza has quit [Client Quit]
a_a_g has joined #ruby
mercwith1mouth has joined #ruby
mercwithamouth has joined #ruby
CreativeEmbassy has joined #ruby
a_a_g1 has joined #ruby
a_a_g has quit [Client Quit]
Xeago has quit [Remote host closed the connection]
Xeago has joined #ruby
<_bart>
How do I find the deepness of a multidimensional array in ruby?
decoponio has quit [Ping timeout: 244 seconds]
<Hanmac>
_bart i think you cant :P
Xeago has quit [Remote host closed the connection]
<shevy>
_bart perhaps try to compare via .flatten
<shevy>
would be nice if you could give .flatten an argument
decoponio has joined #ruby
<shevy>
oh
<shevy>
you actually can
<shevy>
_bart, you can try to run several .flatten with different arguments to it
shock_one has quit [Ping timeout: 276 seconds]
matchaw___ has quit [Quit: No Ping reply in 180 seconds.]
matchaw has joined #ruby
syamajala has quit [Quit: leaving]
francisfish has quit [Remote host closed the connection]
mmitchell has joined #ruby
eldariof has quit []
jekotia has joined #ruby
vikhyat has quit [Remote host closed the connection]
generalissimo has joined #ruby
maycon_ has joined #ruby
xardas has joined #ruby
a_a_g1 has quit [Quit: Leaving.]
colonolGron has joined #ruby
yshh has quit [Read error: Connection reset by peer]
maycon has quit [Ping timeout: 245 seconds]
jgrevich has joined #ruby
maycon__ has joined #ruby
KevinSjoberg has joined #ruby
_nitti has quit [Remote host closed the connection]
JohnBat26 has joined #ruby
adeponte has quit [Remote host closed the connection]
timhaines has joined #ruby
whowantstolivef1 has joined #ruby
maycon_ has quit [Ping timeout: 252 seconds]
a_a_g has joined #ruby
a_a_g has quit [Client Quit]
blueOxigen has joined #ruby
atno has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
<apeiros_>
_bart: by recursion
elaptics is now known as elaptics`away
vikhyat has joined #ruby
<apeiros_>
_bart: don't forget to check against circular references
bluOxigen has quit [Ping timeout: 264 seconds]
kofno has quit [Remote host closed the connection]
kofno has joined #ruby
igor_ has quit [Remote host closed the connection]
mockra has joined #ruby
noxoc has quit [Quit: noxoc]
Vuxil has joined #ruby
velCzupa has joined #ruby
shock_one has joined #ruby
velCzupa is now known as czupa
czupa has quit [Quit: Leaving]
mockra has quit [Ping timeout: 252 seconds]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
jonathanwallace1 has quit [Ping timeout: 256 seconds]
<beaky>
I thought delegation was like having a big object respond to messages by dispatching that message to subordinate object(s)
gyre008 has quit [Remote host closed the connection]
<Hanmac>
beaky & whitequark i had wrote an delegator that is totaly hidden, so when you call dele.class it returns the class of the object :P ... but with my delegator you can call to_s!(2) :P
admin0 has quit [Quit: admin0]
workmad3 has joined #ruby
<apeiros_>
whitequark: given that ruby is not prototypal, I see no reason why one wouldn't use the term "delegate". terms do mean different things in different contexts.
<whitequark>
apeiros_: well, delegation does mean that thing in CS.
<whitequark>
what you're thinking about is "indirection".
<beaky>
all problems in CS can be solved by applying an extra layer of indirection ^^
punkrawkR^Home has quit [Read error: Connection reset by peer]
<whitequark>
delegation isn't a form of abstraction as far as I understand it, but it's related nevertheless
arietis has joined #ruby
<shock_one>
Hanmac, thank you.
sandGorgon has quit [Ping timeout: 252 seconds]
<apeiros_>
well, I'm a fan of proper terminology. so thanks for the hint whitequark
razibog has quit [Quit: Leaving.]
<apeiros_>
and the links, oc
<beaky>
wow those links cleared up lots for me :D thanks
<pepee>
I get these erros when I try to install any gem (for example, gem install rdiscount): ERROR: Could not find a valid gem 'rdiscount' (>= 0) in any repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::EMFILE: Too many open files - socket(2) (http://rubygems.org/latest_specs.4.8.gz)
<beaky>
didn't know that delegation was really related to prototype OOP
<shock_one>
whitequark, navigation on the zedshaw site is mindblowing
<apeiros_>
whitequark: but the WP example looks like it was message forwarding too then, not delegation - no?
Takehiro has quit [Remote host closed the connection]
razibog has joined #ruby
razibog1 has joined #ruby
razibog has quit [Client Quit]
carloslopes has quit [Remote host closed the connection]
<whitequark>
while we're at it; .net is indeed a better platform than JVM due to a variety of reasons
<whitequark>
mainly value types
_nitti has joined #ruby
<shock_one>
whitequark, windows only.
<whitequark>
shock_one: not even opening it; .ch domain? research? not interested
kofno has joined #ruby
<whitequark>
windows only? discover mono
thinkclay has joined #ruby
<whitequark>
the real problem is that it's patented to death
<whitequark>
and MS 'promised' not to sue
<whitequark>
well, it's the best they can do, since patents cannot be undone
adeponte has joined #ruby
Guest54235 has quit [Read error: Connection reset by peer]
<whitequark>
value types and no type erasure, yeah.
workmad3 has quit [Read error: Operation timed out]
grzywacz has joined #ruby
grzywacz has quit [Changing host]
grzywacz has joined #ruby
LouisRoR has quit [Disconnected by services]
n8888 has joined #ruby
<Hanmac>
you can break the type of an object ... but this is very black magic code ...
_nitti has quit [Ping timeout: 248 seconds]
atno has quit [Read error: No route to host]
<whitequark>
break?
ddd has joined #ruby
ddd is now known as Guest41942
swex has joined #ruby
<Hanmac>
whitequark i mean normally an object cant change its type ... with a bit blackest magic its possible
miskander has quit [Quit: miskander]
LouisRoR has joined #ruby
atno has joined #ruby
<whitequark>
Hanmac: I'd wish that each time someone 'invents' such 'black magic' one'd be hit with a proverbial ruler over their fingers
<whitequark>
or maybe a literal ruler...
adeponte has quit [Ping timeout: 276 seconds]
n8888 has quit [Ping timeout: 252 seconds]
blf has joined #ruby
<V8Energy>
I just tried using rest-client gem and I am still getting the same error 401 unauthorized. here is the line i use in IRB: RestClient.get 'http://admin:password@localhost:80/index.html', {:accept => :json}
<V8Energy>
I am able to copy the link and paste it into the browser and it works just fine
<whitequark>
yeah I know one can hook via ffi to ruby from inside ruby code
<whitequark>
you are missing the point completely
LouisRoR has quit [Ping timeout: 244 seconds]
<Hanmac>
the reason why someone would write something that can break the "restriction" its because they can :P thats the reason why someone would push red buttons
<whitequark>
Hanmac: there is a reason you won't go around and hammer the nails with the side of your hammer, or your bare hands, right?
<whitequark>
and if you do, you won't then brag about it
<az7ar>
hi, I was going through camping source code and finding it difficult to understand the Object like hash's implementation >> https://gist.github.com/az7arul/4973012 , can any one explain how the chaining works here ?
mlr has joined #ruby
kofno has quit [Remote host closed the connection]
<whitequark>
az7ar: it is not a miracle :D
<whitequark>
camping source code is difficult to understand indeed.
<apeiros_>
fun, `undef id, type if ?? == 63` - not 1.9 compatible
<apeiros_>
ah
<apeiros_>
it actually is
<apeiros_>
funny abuse of implementation differences…
<blf>
shock_one: Ah, much nicer. You removed a layer of nesting :) Thanks indeed. I'm going to play around with it a little more. But again, thanks!
<az7ar>
whitequark, I dont understand how m.to_s=~/=$/?self[$`]=a[0]:a==[]?self[m.to_s]:super part is working
<shock_one>
blf, no problem
<apeiros_>
az7ar: if it's a method ending with =, assing
kofno has joined #ruby
<apeiros_>
if not, test whether arguments were passed, if not, access hash element
<apeiros_>
if there was, call super
<apeiros_>
*assign, not assing
miskander has joined #ruby
hbpoison has quit [Ping timeout: 264 seconds]
pothibo has joined #ruby
LouisRoR has joined #ruby
<shock_one>
what the heck does the last line mean?
<apeiros_>
I typoed
<az7ar>
apeiros_, I thanks, got it, I did not see the 'condition ? x : y' pattern
<apeiros_>
I wrote assing instead of assign and corrected that
<shock_one>
I mean «undef id, type if ?? == 63»
<apeiros_>
shock_one: remove id and type if it's ruby 1.8
relix has quit [Quit: relix]
<az7ar>
shock_one, me 2
<apeiros_>
*remove id and type +method
<az7ar>
apeiros_, thanks again
jarjar_prime has quit [Quit: Ready? Set? Go!]
<apeiros_>
in 1.9, ?? != 63
<apeiros_>
in 1.8, ?? == 63
<apeiros_>
("?".ord == 63)
<whitequark>
if you'd only seen the blasphemous depths ruby lexer has to go to correctly parse all the possible meanings of ?...
<shock_one>
apeiros_, oh, everybody should know that. Very readable code.
<apeiros_>
I don't even want to know :D
<az7ar>
apeiros_, should I try any other frameworks source code to learn instead of camping ?
mattbl has joined #ruby
<apeiros_>
shock_one: camping isn't supposed to be readable
<apeiros_>
it's supposed to be <4k
<whitequark>
it still gives me nightmares, even months after
<apeiros_>
anybody using it as role model code should be flayed :-p
<apeiros_>
(except for golfed code)
<apeiros_>
whitequark: see, that's why I don't even want to know :D
mmitchell has quit [Remote host closed the connection]
atno has joined #ruby
marcopod has joined #ruby
cisco has joined #ruby
cisco has left #ruby [#ruby]
<whitequark>
apeiros_: consider that ? (QUESTION MARK, SPACE) and a ?b:c (LATIN LETTER A, SPACE, QUESTION MARK, LATIN LETTER B, SPACE, COLON, LATIN LETTER C)
jarjar_prime has joined #ruby
<whitequark>
are separate and valid occurences
<apeiros_>
I said I don't wanna know!!!!! AAAAAAAAAAH
* apeiros_
runs
<whitequark>
(with the former giving you a warning)
atmosx has quit [Remote host closed the connection]
* apeiros_
plays HOTS
<whitequark>
apeiros_: watch FLCL
<banisterfiend>
apeiros_: what's hots
atmosx has joined #ruby
<apeiros_>
banisterfiend: sc2, second part
<banisterfiend>
oh ok
<apeiros_>
btw., how do you like sc2?
<banisterfiend>
haven't played it still
<banisterfiend>
:)
<atmosx>
camping!
<apeiros_>
(HOTS = heart of the swarm)
<Hanmac>
whitequark: NO-Channel is the coolest way to travel :D
<havenwood>
whitequark: "don't include tests. tests just bloat the code base. just commit, the users will complain if you break anything."
<az7ar>
thnx again guys, bye
az7ar has quit [Quit: Leaving]
muminz has joined #ruby
<whitequark>
Hanmac: well, maybe. but given my unfortunate tendency to watch the entire series straight, it doesn't seem that I will get to do it any time soon
<whitequark>
I've code to write and features to deliver.
<whitequark>
113 episodes is... somewhat a lot.
adkron has joined #ruby
adkron_ has joined #ruby
apoch632 has quit [Quit: Leaving.]
adambeynon has joined #ruby
<V8Energy>
I just tried using rest-client gem and I am still getting the same error 401 unauthorized. here is the line i use in IRB: RestClient.get 'http://admin:password@localhost:80/index.html', {:accept => :json}. it works fine in my browser when i paste this into the address bar: http://admin:password@localhost:80/index.html
marcopod has quit [Remote host closed the connection]
SeanLazer has joined #ruby
SeanLazer has quit [Client Quit]
Catbuntu has quit [Quit: MrTeenSmoking = <3]
mityaz has quit [Quit: See ya!]
<pepee>
can anyone help me please :(
havenwood has quit [Remote host closed the connection]
relix has joined #ruby
razibog1 has quit [Ping timeout: 256 seconds]
chrisramon has left #ruby [#ruby]
arya has joined #ruby
ElderFain has joined #ruby
havenwood has joined #ruby
<pepee>
I get these erros when I try to install any gem (for example, gem install rdiscount): ERROR: Could not find a valid gem 'rdiscount' (>= 0) in any repository ERROR: While executing gem ... (Gem::RemoteFetcher::FetchError) Errno::EMFILE: Too many open files - socket(2) (http://rubygems.org/latest_specs.4.8.gz)
ferdev is now known as ferdev|away
lizzin has left #ruby [#ruby]
banisterfiend has quit [Remote host closed the connection]
br4ndon has joined #ruby
octoberry has quit [Ping timeout: 248 seconds]
stkowski has quit [Quit: stkowski]
relix has quit [Ping timeout: 256 seconds]
arya has quit [Ping timeout: 248 seconds]
ElderFain has quit [Quit: I'm Gone]
banisterfiend has joined #ruby
havenwood has quit [Remote host closed the connection]
entrenador has joined #ruby
maletor has joined #ruby
rippa has quit [Ping timeout: 240 seconds]
wallerdev has quit [Quit: wallerdev]
wallerdev has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
stevechiagozie has quit [Quit: Computer has gone to sleep.]
<Vulix>
decision trees, SVMs, regression models
<heftig>
you could use WEKA from jruby
<Vulix>
yeah I know that is an option
<Vulix>
I am actually considering writing everything in ruby as a hobby project which is why I am asking =P
acriax has joined #ruby
bluOxigen has joined #ruby
codezombie has quit [Read error: Connection reset by peer]
<acriax>
Uh, I'm having a brainfreeze right now and can't figure out how to google my problem. I have a key-value-pair hash, and the values are integers. How can I multiply these values by 100? I already have the each-loop set up
mike has joined #ruby
maletor has joined #ruby
<acriax>
But like, if i do value *= 100, it doesn't save it to the value
kofno has quit [Remote host closed the connection]
ctp has joined #ruby
arturaz has quit [Remote host closed the connection]
mike is now known as Guest26351
Guest26351 has quit [Client Quit]
<acriax>
as soon as the loop ends it reverts back
zodiak has quit [Quit: Leaving]
br4ndon has quit [Quit: Lorem ipsum dolor sit amet]
v0n has joined #ruby
<ctp>
Hi folks. How to replace 'ab' by 'a/b', 'abc' by 'a/b/c' etc. but 'a' should remain 'a'. a,b,c are any alphanumerical chars.
<havenwood>
acriax: or: your_hash.each_pair.with_object({}) do |(key, value), result|; result[key] = yield value; end
`p has joined #ruby
<apeiros_>
alternatively gsub with a clever regex
<apeiros_>
e.g. one using a lookaround
Spooner has quit [Remote host closed the connection]
gommo has joined #ruby
<acriax>
havenwood: wow, that stuff looks advanced.
<havenwood>
acriax: The normal way I see people do it though is: hash.each { |k, v| hash[k] = v * 100 }
<ctp>
apeiros_: exactely looking for the regex :)
mehwork has joined #ruby
<apeiros_>
acriax: or just Hash[hash.map(&block)]
<acriax>
havenwood: and is that a bad way_
<acriax>
?
<Hanmac>
ctp. str.each_char.join('/') ?
Spooner has joined #ruby
<havenwood>
acriax: seems fine to me :)
<apeiros_>
Hanmac: iirc Enumerable does not define join, does Enumerator?
<acriax>
Great :)
<apeiros_>
ctp: what regex have you tried?
<Hanmac>
ach fu you are right
eka has quit [Quit: Computer has gone to sleep.]
<Hanmac>
ctp. str.each_char.to_a.join('/')
<apeiros_>
Hanmac: well, str.chars.join is shorter anyway
noxoc has joined #ruby
<Hanmac>
i often like the each_
<acriax>
ctp, the regex /\w+/ matches all groups of alphanumeric chars
<apeiros_>
yeah, but here it'll be slower, is more to write and IMO harder to follow :)
<havenwood>
acriax: It has been proposed to add Hash#map_value to the language in 2.1, but Matz hasn't said whether it will be or not. The hashy gem is tiny if you want Hash#map_pair, Hash#map_key, and Hash#map_value before then.
<Hanmac>
so it shows that it does with enumerator ... chars should be an Array
<apeiros_>
acriax: he wants single chars, so no +
<acriax>
oh, but he pulls in the groups, then splits the chars and adds slashes in between
jonathanwallace1 has joined #ruby
<apeiros_>
Hanmac: it is. but each_*.to_a is a verbose way for *
<Hanmac>
inst chars only a alias for each_char ?
<acriax>
havenwood: alright, good to know
<ctp>
cool, thanks guys. "abc".each_char.to_a.join('/') works fine
<apeiros_>
Hanmac: ach fu you are right
* apeiros_
thinks String#chars should == String#each_char.to_a
beaky has quit [Quit: leaving]
<apeiros_>
ctp: I have a gsub solution also, but I'd like to know first how you tried :)
ryanf has quit [Ping timeout: 252 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
nicoulaj has quit [Remote host closed the connection]
ahokaomaeha has quit [Ping timeout: 256 seconds]
hbpoison has joined #ruby
<acriax>
havenwood: I get "can't add a new key into hash during iteration (RuntimeError)" using the last method you mentioned
* Hanmac
has also a gsub solution
<acriax>
using wordPairs[word] = value * 100
miskander has quit [Quit: miskander]
<ctp>
apeiros_: something like that: "abc".gsub(/(?=\w)/, '/')
<havenwood>
acriax: Not sure what is happening - might want to paste a gist of the code? It *should* work: hash = { one: 1, two: 2 }; hash.each { |k, v| hash[k] = v * 100 }; hash; #=> {:one=>100, :two=>200}
Morkel has quit [Quit: Morkel]
<ctp>
but a / is added at str[0] too
maletor has quit [Quit: Computer has gone to sleep.]
<Hanmac>
ctp he had str.gsub(/.(?=.)/, '\0/') and my was str.gsub(/(\w?)(\w)/,'\1/\2')
BRMatt has joined #ruby
ryanf has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
hbpoison has quit [Ping timeout: 252 seconds]
<Hanmac>
ctp but my was wrong, so use his variant
<ctp>
ok, cool, str.gsub(/.(?=\w)/, '\0/') is what i was looking for
mikeycgto has quit [Read error: Connection reset by peer]
garbagecollectio has joined #ruby
<acriax>
Ah, I figured out the problem.
shock_one has quit [Ping timeout: 255 seconds]
ferdev|away is now known as ferdev
garbagecollectio has quit [Client Quit]
jbw has joined #ruby
dallasm has quit [Remote host closed the connection]
ctp has quit [Ping timeout: 260 seconds]
whowantstolivef1 has quit [Ping timeout: 276 seconds]
blf has quit [Quit: Page closed]
rh1n0 has joined #ruby
`p has quit [Remote host closed the connection]
colonolGron has quit [Quit: leaving]
<Hanmac>
acriax and where was it?
mockra has joined #ruby
mattbl has quit [Quit: This computer has gone to sleep]
stevechiagozie has joined #ruby
jbw has quit [Ping timeout: 255 seconds]
<acriax>
It's embarrasing, but earlier in the same loop I had deleted the pair if certain conditions were true, and when it tried to do the multiplication on those deleted values using that line, it got confused. So now I call next after I had deleted a pair.
agarie has joined #ruby
jbw has joined #ruby
zoonfafer has joined #ruby
dagnachew has joined #ruby
emergion has joined #ruby
czupa has quit [Read error: Connection reset by peer]
<garbagecollectio>
whats the equivalent of this in haml" <%= link_to "My Blog", posts_path %>
ZachDragon has joined #ruby
<miskander>
=link_to "My Blog", posts_path
<havenwood>
= link_to "My Blog", posts_path
skrewler has joined #ruby
etcetera has joined #ruby
idkazuma has joined #ruby
workmad3 has joined #ruby
alienaut has quit [Quit: Leaving]
etcetera has quit [Client Quit]
monkegjinni has quit [Remote host closed the connection]
arya has quit [Ping timeout: 248 seconds]
etcetera has joined #ruby
moos3 has joined #ruby
monkegjinni has joined #ruby
jbw has joined #ruby
codecop has quit [Remote host closed the connection]
arya has joined #ruby
wmoxam has joined #ruby
ahokaomaeha has joined #ruby
Nisstyre-laptop has quit [Quit: Leaving]
etcetera has quit []
tjbiddle has joined #ruby
stormetrooper has quit [Quit: Leaving]
<vabenjamin>
So gem == user created library?
dagnachew has quit [Remote host closed the connection]
miskander has quit [Quit: miskander]
syamajala has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
<havenwood>
vabenjamin: yes, RubyGems is Ruby's package manager and packages are called gems.
Nisstyre-laptop has joined #ruby
<vabenjamin>
Is it the most common way, or do people distribute packages in other ways more commonly?
adambeynon has joined #ruby
<hashmal>
vabenjamin it's the most common way, by far
<vabenjamin>
ty
<hashmal>
iirc the default library has been moved to gems for ruby 2.0 (can someone confirm or correct me?)
emergion has quit [Ping timeout: 264 seconds]
ryanf has joined #ruby
<vabenjamin>
im going to be rewriting some of my java code in ruby just to learn the language, was wondering what the best way to package it is, tyvm
staafl has quit [Read error: Connection reset by peer]
miskander has joined #ruby
`p has quit [Quit: Leaving]
staafl has joined #ruby
adambeynon has quit [Client Quit]
Littlex has quit [Quit: Littlex]
`p has joined #ruby
lazyguru has quit [Ping timeout: 252 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
TheFuzzball has quit [Quit: Computer has gone to sleep.]
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
`p has quit [Client Quit]
artofraw has quit [Remote host closed the connection]
maxmanders has joined #ruby
TheFuzzball has joined #ruby
syamajala has quit [Quit: leaving]
moos3 has quit [Quit: Computer has gone to sleep.]
lazyguru has joined #ruby
`p has joined #ruby
ahokaomaeha has quit [Quit: When I come back, please tell me in what new ways you have decided to be completely wrong.]
<danneu>
vabenjamin: you could port maven to ruby so we dont miss out on that fun
ryanf has quit [Ping timeout: 255 seconds]
TheFuzzball has quit [Client Quit]
banister_ has joined #ruby
blacktulip has quit [Remote host closed the connection]
Takehiro has joined #ruby
ahokaomaeha has joined #ruby
ahokaomaeha is now known as Guest18304
chrishough has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
<havenwood>
vabenjamin: Yes, gems are the One True Way. A really nice Ruby implementation on the JVM is JRuby if you haven't checked it out yet! (Uses gems as well, but native extensions in Java rather than C.)
<havenwood>
Most gems don't have native extensions.
<havenwood>
I guess.
Guest18304 has quit [Client Quit]
Playground has joined #ruby
kofno has quit [Remote host closed the connection]
james has joined #ruby
Playground is now known as ahokaomaeha
ryanf has joined #ruby
james is now known as Guest41034
ninp0 has joined #ruby
v0n has joined #ruby
Takehiro has quit [Ping timeout: 255 seconds]
justsee has joined #ruby
staafl has quit [Read error: Connection reset by peer]
staafl has joined #ruby
hbpoison has joined #ruby
plotter has quit [Remote host closed the connection]
grzywacz has quit [Read error: Connection reset by peer]
xardas has quit [Ping timeout: 245 seconds]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vikhyat has quit [Remote host closed the connection]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
mercwith1mouth has quit [Ping timeout: 252 seconds]
mercwithamouth has quit [Ping timeout: 252 seconds]
andrewhl has joined #ruby
vierja has joined #ruby
mockra has quit [Remote host closed the connection]
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
miskander has quit [Quit: miskander]
<garbagecollectio>
how does this work
<garbagecollectio>
@posts = Post.all
dmonjo has joined #ruby
<havenwood>
garbagecollectio: looks like rails?
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<garbagecollectio>
yeah
<havenwood>
garbagecollectio: Try #RubyOnRails
<garbagecollectio>
they won't answer my questions
<garbagecollectio>
im quieted there
miskander has joined #ruby
vierja has joined #ruby
<havenwood>
garbagecollectio: How bout?: #RailsNoob
vierja has quit [Max SendQ exceeded]
vierja has joined #ruby
<garbagecollectio>
u don't want to tell me?
vierja has quit [Max SendQ exceeded]
rh1n0 has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
erlingur has joined #ruby
<dcope>
lol
brian___ has joined #ruby
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<epochwolf>
havenwood: garbagecollectio was +q'd on #rubyonrails for not reading documentation and arguring with people.
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<havenwood>
epochwolf: aha
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<epochwolf>
havenwood: just fyi, not trying to get him banned here. He'll do that to himself.
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<havenwood>
epochwolf: Roger that. :)
<epochwolf>
garbagecollectio: a hint, people who really like ruby tend to hate rails and the people assocated with it.
jtharris has joined #ruby
vierja has joined #ruby
banister_ has quit [Read error: Connection reset by peer]
vierja has quit [Max SendQ exceeded]
<epochwolf>
the feeling is pretty mutual
SilverKey has joined #ruby
vierja has joined #ruby
<havenwood>
epochwolf: That really does seem to kinda be true...! Hehe.
banisterfiend has joined #ruby
_veer is now known as lolsuper_
lolsuper_ is now known as _veer
<epochwolf>
havenwood: I got my ass chewed out by the Seattle Ruby Brigade for working on a rails project at thier working meetup. I didn't even ask questions.
<havenwood>
epochwolf: rofl...
<epochwolf>
havenwood: more than once, I'm not a smart wolf.
jtharris has quit [Client Quit]
mlr has quit [Ping timeout: 256 seconds]
alanp_ has joined #ruby
alanp_ has quit [Read error: Connection reset by peer]
brian___ has left #ruby [#ruby]
crackfu has quit [Remote host closed the connection]
alanp_ has joined #ruby
<garbagecollectio>
right
<garbagecollectio>
rails programers are conformists
Rizzle has joined #ruby
<garbagecollectio>
they like constraints and boundaries
<garbagecollectio>
its a weird scene
<vabenjamin>
not necessarily
<garbagecollectio>
its like the frat scene of programming
<garbagecollectio>
thats what i think
<vabenjamin>
I like rails because its quick
<garbagecollectio>
thats why i like it
<vabenjamin>
if I want something very customizable I will use java spring
<garbagecollectio>
but I'm talking about the community
<vabenjamin>
the community if full of a lot of ruby-only programmers is why
<vabenjamin>
or rails-only people
<epochwolf>
banisterfiend: this happened about 18 months ago.
<Xeago>
0323 vabenjamin: if I want something very customizable I will use java spring
<Xeago>
rofl, I'd go with html :3
<epochwolf>
banisterfiend: I went 3~4 times. They weren't nice to me.
<vabenjamin>
Xeago not really sure what you mean, Java Spring is a very powerful framework
<banisterfiend>
epochwolf: they're anti rails there i takeit?
goraxe has joined #ruby
<epochwolf>
banisterfiend: that group was.
mercwithamouth has joined #ruby
mercwith1mouth has joined #ruby
<banisterfiend>
epochwolf: doesn't it include tenderlove ?
<epochwolf>
banisterfiend: no idea.
<banisterfiend>
epochwolf: zenspider etc?
<epochwolf>
banisterfiend: zensider yes.
<garbagecollectio>
why are rails people so crazy?
<Xeago>
vabenjamin: even if it is powerful, so is html5 :P
<banisterfiend>
garbagecollectio: i will ban you from this channel if you dont shut up
<epochwolf>
garbagecollectio: because we deal with fuck ups like you every day of the week.
<garbagecollectio>
exactly
<garbagecollectio>
ruby people don't like rails people and vice versa
<garbagecollectio>
according to ruby peple
<garbagecollectio>
and then if you criticize rails you get threatened with a ban
alanp has quit [Ping timeout: 276 seconds]
<garbagecollectio>
no other programming environment does this
<vabenjamin>
garbage rails is what it is, a very linear way to create a web application. that is by design - if you want something that lets you play more, that goes against the rails philosophy
<garbagecollectio>
not on free node or in real life
<vabenjamin>
hence its on rails
<epochwolf>
garbagecollectio: python does
<banisterfiend>
garbagecollectio: i'm not a rails programmer, i just find you annoying
<banisterfiend>
garbagecollectio: you just babble incessantly and do not contribute anything interesting to the conversation
<garbagecollectio>
i think i do
<garbagecollectio>
has anyone actually had this conversation about the rails world
<Xeago>
garbagecollectio: yes
<epochwolf>
garbagecollectio: hundreds of times.
<garbagecollectio>
I'm new to it, what was the discussion?
<epochwolf>
garbagecollectio: it's a frequent topic and you don't know enough to add anything to it
<garbagecollectio>
i dont
<garbagecollectio>
what are the themes of the discussion?
<vabenjamin>
garbagecollectio you would be more productive going to a framework that suits your needs instead of trying to force rails to do the exact opposite of what it is designed to do
<garbagecollectio>
I'm not doing that it all
<garbagecollectio>
what are u talking about lol
arya has quit [Ping timeout: 248 seconds]
<garbagecollectio>
I'm asking about the social community
<epochwolf>
vabenjamin: he's been hired to work at a startup with no ruby or rails experience.
<havenwood>
garbagecollectio: Have you tried hanging out in #python or #php, or #django or #cakephp?
<dmonjo>
*calling garbage collection*
<garbagecollectio>
yeah they are all cool
<havenwood>
garbagecollectio: Really??
<garbagecollectio>
yeah
<vabenjamin>
ah you were talking about rails being too constrained
<garbagecollectio>
javascript is also really nice
<vabenjamin>
maybe i misinterpreted
<garbagecollectio>
php is definitely
<garbagecollectio>
cakephp is
<garbagecollectio>
python idk
SilverKey has quit [Read error: Connection timed out]
<epochwolf>
vabenjamin: he was talking about the community being restrictive because Radar +q'd him
kja has joined #ruby
<garbagecollectio>
no i wasnt
<garbagecollectio>
this is my experience with rails devs
<garbagecollectio>
they are dicks and don't actually care about learning and stuff
<garbagecollectio>
and often times very linear minded
mockra has joined #ruby
<epochwolf>
garbagecollectio: we don't care to spend the 3 months it takes to learn the framework holding your hand.
<garbagecollectio>
thats not the issue
<garbagecollectio>
its your attitude
<garbagecollectio>
epoch wolf i will go toe to toe with you in programming fundamentals anytime
<garbagecollectio>
and destroy you
kja is now known as SilverKey
<garbagecollectio>
because i am smarter
<garbagecollectio>
you don't talk to other devs the way rails devs talk to ppl
<garbagecollectio>
its a cult
<havenwood>
I like the idea of a cult headed by DHH, but I don't think it is. :P
<garbagecollectio>
and i don't get why
<havenwood>
I get _why.
<garbagecollectio>
its definitely turned into that
<garbagecollectio>
why?
jpoz_mobile has joined #ruby
<vabenjamin>
garbage do you know ruby or are you trying to jump into rails directly
<epochwolf>
garbagecollectio: sure, you just graduated from college so you probably have the theory memorized. I haven't used much theory for the last 3 years I've spent out of college.
<garbagecollectio>
epochwolf: actually I'm 5 years out
<epochwolf>
garbagecollectio: clearly you haven't been on irc long enough to learn not to paste code into an active channel.
<garbagecollectio>
epochwolf: the rule is more than
<garbagecollectio>
3
<garbagecollectio>
I've been on for like 15 years now ?
<garbagecollectio>
thanks
zoonfafer has quit [Ping timeout: 248 seconds]
<garbagecollectio>
and stop talking about conventions
<garbagecollectio>
jesus
<epochwolf>
you called?
Virunga has quit [Read error: Connection reset by peer]
stormetrooper has joined #ruby
<X-Jester>
does anyone have any ideas why when i dump a hash to yaml, some keys are being single-quote escaped, while others aren't? any way to control the format of that output with psych?
vierja has quit [Ping timeout: 252 seconds]
erlingur has joined #ruby
maletor has joined #ruby
<X-Jester>
it's happening for hashes i construct from a BSON::OrderedHash
justsee has joined #ruby
mlr has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
arya has joined #ruby
zorbyte has quit [Ping timeout: 264 seconds]
Spooner has joined #ruby
<Xeago>
X-Jester: the only thing I can think of, that said I have never used haml or bson, is that symbols are serialized differently than strings
<epochwolf>
garbagecollectio: sorry, I missed the topic. I've been in here for over a year. I've kind of stopped reading it.
vierja has joined #ruby
<garbagecollectio>
?
vierja has quit [Max SendQ exceeded]
<garbagecollectio>
this shit is so funny
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<garbagecollectio>
i don't know how i can own nyc
<garbagecollectio>
if I'm just starting out in rails and coffee and haml
<garbagecollectio>
why are they having me do that shit i just want to hack on javascript
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
samphippen has quit [Quit: Computer has gone to sleep.]
<Boohbah>
now i get in `readline_nonblock': undefined method `read_nonblock' for IO:Class (NoMethodError) http://pastie.org/6207368
alolalol has joined #ruby
vierja has joined #ruby
<epochwolf>
Boohbah: you haven't changed anything?
vierja has quit [Max SendQ exceeded]
<epochwolf>
Boohbah: change line 4 to def self.readline_nonblock
danneu has quit [Quit: WeeChat 0.3.8]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<X-Jester>
Xeago: now that you mention it, it's only happening for symbols
motto has quit [Quit: Sto andando via]
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<Boohbah>
epochwolf: i changed line 3
miskander has quit [Quit: miskander]
<Boohbah>
epochwolf: now i have a different undefined method
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<Boohbah>
also line 7
vierja has joined #ruby
vierja has quit [Max SendQ exceeded]
<pepee>
so... to install rvm from https://rvm.io/ , you need bash 3.2.5, but mingw distributes 3.1.17...
vierja has joined #ruby
Takehiro has joined #ruby
<pepee>
I will have to build ruby by myself, only to install a couple gems
<epochwolf>
pepee: mingw is for windows, right?
<pepee>
yeah
<epochwolf>
pepee: don't use rvm, there is a windows ruby picker available
<pepee>
or msys, or whatever is called
kofno has joined #ruby
<pepee>
epochwolf, gems gives me errors when I try to install gems...
<pepee>
havenwood, I just need ruby to run some scripts
<pepee>
*ruby and some gems that use the davekit
<pepee>
*devkit
<X-Jester>
Xeago: thank you, your advice was exactly what i needed. if i have a symbol name in a literal from bson, i strip the : and run to_sym() on it, and it works splendidly. thank you.
<epochwolf>
havenwood: ninjas end up getting crucified.
<pepee>
havenwood, I get the same error from 1.9.2
tjbiddle has joined #ruby
<havenwood>
epochwolf: \o/T
<epochwolf>
havenwood: 1700s Japan was not a nice place to live. The japanese really feel in love with crucifixion.
Virunga has joined #ruby
wargasm has quit [Ping timeout: 252 seconds]
<pepee>
ok, I'm gonna try that, thanks havenwood
<havenwood>
pepee: Lemme know what you think, if it works well. I'm curious!
<vabenjamin>
so as I build my data mining library, is there any string manipulation tasks or text mining tasks anyone would like to see implemented in ruby?
<epochwolf>
now wizard… I can do that. I played a sorcerer in a DnD campanion
<epochwolf>
*
hbpoison has quit [Ping timeout: 255 seconds]
<havenwood>
I am a developer Paladin, lvl 28.
<epochwolf>
campaign*
<epochwolf>
hehe 2d8 Wolf + 5d4 Dev + 1d6 SysAdmin
<Xeago>
for what it is worth, I have over 2 years of ingame time on my warlock?
<Xeago>
damn I played the shit out of wow..
<epochwolf>
Xeago: ouch
<epochwolf>
okay, church time, laterz!
caleb_io has joined #ruby
<havenwood>
Xeago: I hired a gnome, irl! Don't play wow anymore but asked for a dev in IronForge, inspected his equipment, and hired em.
eka has joined #ruby
<havenwood>
Xeago: Had a masters in cs, but his gear choice helped me see his competence.
<Xeago>
true story?
<havenwood>
Xeago: yup
<Xeago>
cool xD :)
<havenwood>
Xeago: Still works for the company. Asked me not to tell them how he was hired, embarassed.
ZachDragon has quit [Quit: Leaving]
<Xeago>
I do agree, gear (and optimizations) tends to be a good indicator of competence :P
Monie has joined #ruby
<Xeago>
bummer :<
Mattix has joined #ruby
<Xeago>
"I asserted his skills, knowledge and expertise, through unconventional means. I was immediately convinced and derp.. :"
<havenwood>
Xeago: haha, indeed!
<havenwood>
Explain your offhand to my satisfaction, and you're hired!
<Xeago>
xD
<Xeago>
got 1 realm first, killed the 'ol naxx before patches
kofno has quit [Remote host closed the connection]
<havenwood>
Xeago: Did you see the D3 Ruby bot talk at RubyConf?
<Xeago>
after vanilla I became gm, and really sinked time