<craysiii>
does ruby expect you to set Encoding.default_internal or is it nil for a reason?
<Ox0dea>
Well, the magic comment doesn't set Encoding.default_internal, so I guess it's meant to be set explicitly.
zenguy_pc has joined #ruby
truenito has joined #ruby
<pontiki>
can we get 2 minutes of hate on character encoding?
<Ox0dea>
Starting now.
finisherr has joined #ruby
valetudo has quit [Quit: Leaving]
symm- has quit [Quit: Leaving...]
bffff_ has joined #ruby
messysaurus has joined #ruby
truenito has quit [Quit: truenito]
jenrzzz has quit [Ping timeout: 256 seconds]
zenguy_pc has quit [Ping timeout: 260 seconds]
<Ox0dea>
> That was all, and he was already uncertain whether it had happened.
truenito has joined #ruby
dfinninger has joined #ruby
mary5030 has joined #ruby
jenrzzz has joined #ruby
<dfinninger>
Alright, so this is a bit of an embarrassing question - I've got a friend who programs in Haskell and Clojure and he keeps asking me what is so great about coding in Ruby. Specifically the UX and syntax of the language. After these years programming in Ruby, I know it's a lot of fun, but putting it into words on the spot is kinda hard... Does anyone have some pointers about putting it into words?
juanpablo_ has joined #ruby
truenito has quit [Client Quit]
<pontiki>
for me, it's *all* about the fun
mjuszczak has quit []
<pontiki>
the joy of writing ruby far exceeds the other languages i've worked in, making me remember learning lisp and how exceedingly fun that was
michael_mbp has quit [Excess Flood]
<pontiki>
i happen to relly like clojure as well, and haven't done enough in haskell to get interested in pursuing it, more a matter of time, really
<shevy>
dfinninger ruby can read like succinct poetry
jtdowney has quit [K-Lined]
jokester has quit [K-Lined]
sparr has quit [K-Lined]
Hijiri has quit [K-Lined]
Sthebig has quit [K-Lined]
larissa has quit [K-Lined]
<pontiki>
haskell is like maths haiku
Sthebig has joined #ruby
Sthebig has quit [Changing host]
Sthebig has joined #ruby
<pontiki>
also beautiful in its way
<shevy>
probably
<shevy>
I found the mindset of haskell insanely difficult
<pontiki>
extreme functional programming is a very different mindset
juanpablo_ has quit [Ping timeout: 246 seconds]
jtdowney has joined #ruby
jtdowney has joined #ruby
<shevy>
dfinninger has your friend programmed in any of perl python ruby lua php?
truenito has joined #ruby
<dfinninger>
toyed with python, but quickly switched to R (he's into data science)
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michael_mbp has joined #ruby
truenito has quit [Client Quit]
<baweaver>
People are less likely to inflict physical violence against me for using Ruby in pair programming
<baweaver>
funny
<baweaver>
much the same happens with Vim
<pontiki>
heehee baweaver
truenito has joined #ruby
<pontiki>
you want to scala?
<craysiii>
scala is nice
<shevy>
he could scale a dam
<pontiki>
i've been finding it difficult to learn new languages, lately
mary5030 has quit [Ping timeout: 244 seconds]
mary5030 has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenguy_pc has joined #ruby
mdxprograms has joined #ruby
<Ox0dea>
dfinninger: Ruby just makes it crazy-easy to intuitively manipulate one's data.
<baweaver>
in the end it comes down to a matter of preference for most things
mdxprograms has quit [Remote host closed the connection]
<Ox0dea>
There is something to be said for delayed gratification, but Ruby is largely silent on the matter.
<pontiki>
my preference is to learn new languages :) (and frameworks)
<Ox0dea>
baweaver: See Python's "lambdas".
maletor has joined #ruby
<baweaver>
why do you think I use Ruby?
<Ox0dea>
Aye.
<baweaver>
:P
<baweaver>
that and Python 2/3
* baweaver
is done taking shots at Python
charliesome has joined #ruby
<Ox0dea>
I mentioned it as a point against the preference argument.
<baweaver>
I don't mind it, you end up using other features.
<Ox0dea>
Name all the one-off functions!
<baweaver>
rarely do you use them in python honestly
<baweaver>
most of the time it's variants of list comprehensions
<Ox0dea>
True enough.
<Ox0dea>
s/list/generator/, mind.
<pontiki>
isn't that basically what python is about?
malf has joined #ruby
<pontiki>
mind you, i haven't done anything in python
<baweaver>
I know enough to be dangerous
doopdapper has quit [Ping timeout: 255 seconds]
tmtwd has joined #ruby
charliesome has quit [Client Quit]
profelm has joined #ruby
icarus has joined #ruby
<pontiki>
now you're just bragging :)
luffy has joined #ruby
<baweaver>
dangerous is not a point I would brag on :P
solocshaw has quit [Ping timeout: 256 seconds]
dfinninger has quit [Remote host closed the connection]
Swappticon has joined #ruby
unreal has joined #ruby
jher has joined #ruby
mary5030 has quit [Remote host closed the connection]
j_mcnally has joined #ruby
mary5030 has joined #ruby
Llama4146 has quit [Read error: Connection reset by peer]
unreal_ has quit [Ping timeout: 244 seconds]
toxicbet4 has joined #ruby
casadei has joined #ruby
doopdapper has joined #ruby
sdfgsdfg has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
mary5030 has quit [Ping timeout: 250 seconds]
devoldmx has joined #ruby
t0rrieri has joined #ruby
Torrieri has quit [Ping timeout: 240 seconds]
zacts has quit [Ping timeout: 240 seconds]
zacts has joined #ruby
Encapsulation has quit [Ping timeout: 240 seconds]
wldcordeiro__ has quit [Read error: Connection reset by peer]
wldcordeiro__ has joined #ruby
Encapsulation has joined #ruby
matp_ has joined #ruby
pocketprotector has quit [Ping timeout: 244 seconds]
jeadre has quit [Remote host closed the connection]
pocketprotector has joined #ruby
cgfbee has quit [Ping timeout: 240 seconds]
matp has quit [Ping timeout: 240 seconds]
silverdust has quit [Ping timeout: 240 seconds]
iamninja has joined #ruby
jeadre has joined #ruby
duggiefresh has joined #ruby
cgfbee has joined #ruby
Swappticon has quit [Read error: Connection reset by peer]
minimuffins has quit [Ping timeout: 255 seconds]
minimuffins has joined #ruby
rushed has joined #ruby
tokik_ has joined #ruby
jher has quit [Quit: leaving]
iamninja has quit [Ping timeout: 240 seconds]
tubuliferous has quit [Read error: Connection reset by peer]
tkuchiki has joined #ruby
tokik has quit [Ping timeout: 240 seconds]
bestbrents__ has quit [Read error: Connection reset by peer]
bestbrents__ has joined #ruby
messysaurus has quit [Remote host closed the connection]
solocshaw has joined #ruby
silverdust has joined #ruby
silverdust is now known as Guest52447
profelm has quit [Quit: Leaving]
davedev24 has quit [Read error: Connection reset by peer]
GPrime has joined #ruby
_blizzy_ has quit [Ping timeout: 255 seconds]
maletor has quit [Quit: Computer has gone to sleep.]
truenito has quit [Quit: truenito]
_whitelogger has joined #ruby
northfurr has quit [Quit: northfurr]
Swappticon has joined #ruby
minimuffins has quit [Ping timeout: 255 seconds]
ghr has joined #ruby
rakm has joined #ruby
Mia has quit [Read error: Connection reset by peer]
AlexAltea has quit [Ping timeout: 265 seconds]
rbennacer has quit [Remote host closed the connection]
A124 has quit [Remote host closed the connection]
v0n has quit [Ping timeout: 244 seconds]
allcentury has quit [Ping timeout: 268 seconds]
v0n has joined #ruby
chipotle_ has joined #ruby
toretore has quit [Read error: No route to host]
toertore has joined #ruby
rushed has quit [Quit: rushed]
chipotle has quit [Ping timeout: 260 seconds]
rushed has joined #ruby
lucyinthesky has joined #ruby
juanpablo_ has joined #ruby
A124 has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
juanpablo_ has quit [Ping timeout: 246 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
messysaurus has joined #ruby
jenrzzz has joined #ruby
ssd7 has joined #ruby
lucyinthesky has left #ruby ["Leaving"]
umgrosscol has joined #ruby
System42 has joined #ruby
charliesome has joined #ruby
ssd7 has quit [Ping timeout: 250 seconds]
bruno- has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
sparr has joined #ruby
larissa has joined #ruby
jenrzzz has joined #ruby
duggiefresh has quit []
messysaurus has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 246 seconds]
luffy has quit [Remote host closed the connection]
System42 has quit [Quit: Leaving]
Vile` has quit [Ping timeout: 244 seconds]
jesterfraud has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Vile` has joined #ruby
<gambl0re>
would you say ruby is easier to learn than javascript
System42 has joined #ruby
<baweaver>
too vague, it depends on a lot
<baweaver>
though thinking in terms of easier will do you a lot more harm than good
<baweaver>
chess is easy to learn, go is easy to learn, but I challenge you to even touch a master at either game
<cscheib>
the basics are quite easy
<cscheib>
of most languages these days
<baweaver>
better question is what do you want to do?
<baweaver>
that should influence your choice far more than what's easiest
<gambl0re>
well im only going to learn ruby for web development
<baweaver>
both then
<baweaver>
you won't get away with either/or, if it's web development
luffy has joined #ruby
<toertore>
js is easier to learn, it's a much simpler language
<gambl0re>
both is easy to laern?
<baweaver>
are easy to learn
<gambl0re>
for web development?
<gambl0re>
ok thanks
<baweaver>
and it's entirely based on opinion
<baweaver>
if you want to do web dev with ruby, you need both
_blizzy_ has joined #ruby
<gambl0re>
well mainly ruby for rails...
_blizzy_ has quit [Read error: Connection reset by peer]
<gambl0re>
javascript for everything else
<baweaver>
that still means both
<sevenseacat>
gambl0re: you've been here for months and you still havent started learning yet?
<gambl0re>
i have but im mostly doing rails
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
<sevenseacat>
so? thats still ruby
<gambl0re>
i know that...but i havent gone deep into ruby
<sevenseacat>
and you likely never will
<sevenseacat>
as you don't need to for doing basic rails dev
agent_white has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<gambl0re>
most of the rails stuff i've been doing has very little ruby code
<baweaver>
....
<sevenseacat>
erm, its all ruby code
<sevenseacat>
100%
<baweaver>
^
<cscheib>
rails is just a curated set of gems that do a lot of common tasks for you
<gambl0re>
yea but most of the code is alraedy generated for oyu
<baweaver>
doesn't make it not ruby
dgutierrez1287 has joined #ruby
casadei has quit [Remote host closed the connection]
<gambl0re>
im talking about ruby code that is written...
<gambl0re>
not generated
<sevenseacat>
and if you're generating and using code without understanding it, well thats an entirely different problem
<baweaver>
at some point you're going to need to just go out and do things, build things, read, and learn.
<baweaver>
IRC is substantially more useful when you put base effort into it.
<sevenseacat>
this is why we recommend newbies to rails don't use scaffolding, because it generates a lot of code that you have zero idea about
jenrzzz_ has joined #ruby
<sevenseacat>
write it from scratch so you know how it works, and then later you can generate it to save time
jenrzzz has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 265 seconds]
<agent_white>
shevy: I hope there's more out there... I asked around and found there's quite a few alternatives for python that aren't just bindings. Made me sad there's not some for ruby.
<agent_white>
shevy: No worries, couldn't care less! More excited theres something other than vanilla curses!
jeadre has joined #ruby
<agent_white>
shevy: Thank you! Checking it out now!
<shevy>
curses is no fun
kwd has joined #ruby
michael_mbp has joined #ruby
<agent_white>
It is not...
<agent_white>
shevy: This looks promising :D
startupality has quit [Quit: startupality]
tonios57 has joined #ruby
<shevy>
\o/
iamninja has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
majjoha has quit [Ping timeout: 244 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Vile` has quit [Ping timeout: 240 seconds]
marsjaninzmarsa has quit [Quit: ZNC - http://znc.in]
Vile` has joined #ruby
pranny has quit [Remote host closed the connection]
yeticry has quit [Read error: Connection reset by peer]
yeticry has joined #ruby
Macaveli has joined #ruby
hs366 has joined #ruby
atomical has joined #ruby
moeabdol has joined #ruby
Mendenhall has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
jenrzzz has joined #ruby
krz has joined #ruby
tmillc has joined #ruby
jas02 has joined #ruby
towski_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
ta has joined #ruby
pawnbox has joined #ruby
atomical has quit [Ping timeout: 255 seconds]
towski_ has quit [Remote host closed the connection]
<shevy>
hmm
kies has joined #ruby
ohaibbq has quit [Quit: Leaving...]
<shevy>
Do I understand this correctly: STDIN.getch will not work for arrow keys because they will have more than one char, e. g. "\e[" right?
closer has quit [Ping timeout: 272 seconds]
dopie has quit [Ping timeout: 265 seconds]
dfinninger has joined #ruby
pawnbox_ has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Ping timeout: 264 seconds]
marsjaninzmarsa has joined #ruby
Rollabunna has joined #ruby
closer has joined #ruby
moeabdol has quit [Ping timeout: 255 seconds]
Mendenhall has quit [Ping timeout: 264 seconds]
majjoha has joined #ruby
arup_r_ has joined #ruby
dfinninger has quit [Ping timeout: 260 seconds]
tennis has joined #ruby
arup_r has quit [Ping timeout: 244 seconds]
gamename has quit [Read error: No route to host]
Rollabunna has quit [Ping timeout: 268 seconds]
ndrei has quit [Ping timeout: 240 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
jalnt has joined #ruby
ndrei has joined #ruby
jenrzzz has joined #ruby
mon_ has quit [Quit: somewhere over the rainbow ...]
<Ox0dea>
shevy: Yes, that's right. You might also be displeased to learn that not all "special keys" generate "\e[x", where 'x' is a single character; <PageUp> generates "\e[5~", for example.
pranny has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 252 seconds]
<ramadoka>
hmm... not necesarily singleton method I guess.
arup_r_ has quit []
<brunops>
Is there a way to know what properties are trying to be accessed in an object? Like, define an object and have `obj.foo` -> `nil` and `obj.foo.bar` => `nil` ?
<Ox0dea>
brunops: Sounds like an XY problem.
jas02 has quit [Quit: jas02]
<brunops>
What is a XY problem?
<Ox0dea>
ramadoka: Then you're wondering whether classes with memoized methods will get collected?
<Ox0dea>
?xy brunops
<ruboto>
brunops, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<ramadoka>
0x yeah
<baweaver>
The Ox has spoken
<Ox0dea>
baweaver: Do classes get collected?
<baweaver>
in what context?
* baweaver
reads up a bit
<Ox0dea>
I can't imagine how it would work.
<baweaver>
I would guess singletons would be fine
Rinzlit has joined #ruby
<baweaver>
but GC is not my strong suite by far.
skade has joined #ruby
vondruch has joined #ruby
lxsameer has joined #ruby
juanpablo_ has joined #ruby
arup_r has joined #ruby
jas02 has joined #ruby
<Ox0dea>
Nope, classes don't get collected.
<brunops>
Ox0dea: I'll try to rephrase it. I want to define a nested Hash, but have it return `nil` in case the property is not defined and have it not raise an exception in case nested undefined properties are trying to be accessed. So given `obj = { :foo => { :bar => 1 } }`, `obj[:foo] => { :bar => 1 }`, `obj[:foo][:bar] => 1`, `obj[:a] => nil`, `obj[:a][:b] => nil`
<brunops>
Awesome, will play around with this, thanks Ox0dea
<ytti>
cool, i had no idea of #default_proc
<Ox0dea>
brunops: Happy to help.
<Ox0dea>
Careful, though; not knowing exactly what's in your Hash is usually a smell.
gener1c has quit [Ping timeout: 264 seconds]
<ramadoka>
brunops: maybe you might want to check Maybe monad.
<ramadoka>
it's an interesting pattern.
<ramadoka>
can't be hash though.
bruno- has quit [Ping timeout: 264 seconds]
<ramadoka>
0x0dea: what about object method?
jeadre has quit [Remote host closed the connection]
<ramadoka>
do you know if it'll collected?
moeabdol has quit [Ping timeout: 256 seconds]
<Ox0dea>
ramadoka: Well, Memoist stores its memory in instance variables, which are certainly collected with the object.
jeadre has joined #ruby
Synthead has quit [Ping timeout: 244 seconds]
<Ox0dea>
An alternative would have been to #prepend a Module with the relevant methods defined to simply return the memoized value, but Memoist doesn't take that approach.
eGGsha is now known as eGGshke
<Ox0dea>
Wait, never mind. That's exactly what it's doing.
<ramadoka>
thank you!
<ramadoka>
eh, pardon?
pranny has joined #ruby
<brunops>
Ox0dea: This is super interesting, but not exactly what I'm looking for, because in your example, av[1], av[1][2], etc. will be defined at the end. I want to be able to handle the props like `method_missing?` not sure if this is confusing, but I'd like to return `nil` for `obj.foo.bar` and if I call `obj.foo` later it still returns `nil`
toertore has quit [Quit: This computer has gone to sleep]
<ramadoka>
yeah, I did, but I'm not sure about using myobject.mymethod not raising exception.
<ramadoka>
kinda risky imo
<jhass>
NoMethodError != NoMethodError on nil
<jhass>
and a true maybe also hides valid methods on nil
<jhass>
and just skips all calls when its target is nil
mon_ is now known as [mon]
<ramadoka>
teach me more mastah << not sarcasm
[mon] is now known as mon-
Pumukel has joined #ruby
<shevy>
show him the monad boss
timonv has quit [Quit: WeeChat 1.3]
mon- is now known as mon_
<ramadoka>
well, in my defense, Nothing.map(anything) == Nothing
jgt3 has joined #ruby
krz has quit [Read error: Connection reset by peer]
<jhass>
I think stuff like tomstuart does can be interesting for a language like Ruby
<jhass>
whether we really should call these monads, I'm not sure
<jhass>
that concept probably just doesn't translate to Ruby
<ramadoka>
still good to know though. (I'm not sure I know it full well either)
jgt2 has quit [Ping timeout: 264 seconds]
Pathfinder has joined #ruby
nofxx has quit [Ping timeout: 255 seconds]
bronson has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
krz has joined #ruby
postmodern has quit [Quit: Leaving]
qba73 has joined #ruby
[k- has joined #ruby
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bronson has quit [Ping timeout: 244 seconds]
apfeluser has joined #ruby
psy_ has quit [Ping timeout: 246 seconds]
zeroDivisible has joined #ruby
<yorickpeterse>
monring
<yorickpeterse>
* morning
<Ox0dea>
jhass: Your last statement seems to belie a fundamental misunderstanding of monads.
Motoservo has quit [Quit: Motoservo]
<yorickpeterse>
great start of the week, a typo
<adaedra>
hell, yorickpeterse
<adaedra>
hello*
ferhaty has quit []
<Ox0dea>
yorickpeterse: I thought you'd written a script to send "morning" to #ruby when your webcam detected that you were seated for the first time on a given day.
michael_mbp has quit [Excess Flood]
<jhass>
Ox0dea: or everybody else's. Nowadays I categorize it into a buzzword when talking outside the context they were invented in
<shevy>
monring yorickpeterse
<jhass>
the short circuit argument is "it's a monad, it comes from the FP world, FP concepts are good/the future"
<shevy>
we are educating ourselves about monads today here on #ruby yorickpeterse
<jhass>
I'd rather evaluate if the actual proposed solution has a benefit for my current context and don't care if somebody calls it monad or not
<[k->
your face is a monad
<adaedra>
-_-
<jhass>
probably, I don't even care!
<yorickpeterse>
Ox0dea: Nah, this screen I'm using doesn't have a webcam
<yorickpeterse>
(I use an external screen with my laptop closed)
<jhass>
it serves well as, well, my face
<[k->
:o i expected the nickserv thing to kick in
Mendenhall has joined #ruby
michael_mbp has joined #ruby
<shevy>
it kicks into your face!
<[k->
your face is a nickserv
<Ox0dea>
jhass: How can you know that?
<shevy>
jhass is wise
<Ox0dea>
I take no umbrage with that observation.
<Ox0dea>
Nevertheless, einmal ist keinmal.
<jhass>
how can you know it for any of the GoF patterns? You take a look at it, think about it, maybe adapt it
ferhaty has joined #ruby
timonv has joined #ruby
Hounddog has joined #ruby
<Ox0dea>
jhass: I was talking about your face, and your claim that it serves well as such.
<jhass>
granted, I only have anecdotal evidence
<Ox0dea>
And an n of 1.
<adaedra>
let's face it
<shevy>
lol
<jhass>
but then the evaluation is only relevant to me
<jhass>
so that's good enough
marr has joined #ruby
<shevy>
monads cure diseases
<Ox0dea>
No man is an island.
<Ox0dea>
Except your mom.
<jhass>
thanks to your mom she can be seen as an island
Iskarlar has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
dopamean_ has quit [Ping timeout: 244 seconds]
wldcordeiro__ has quit [Remote host closed the connection]
<shevy>
the island of thousand faces
ramadoka has quit [Quit: leaving]
Iskarlar has quit [Client Quit]
<adaedra>
I'm sorry, I though this was #ruby, not #urface
<ruboto>
Rancid-punk, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
ramadoka has quit [Quit: leaving]
pawnbox has quit [Ping timeout: 268 seconds]
_blizzy_ has quit [Read error: Connection reset by peer]
iamninja has quit [Quit: WeeChat 1.3]
ramadoka has joined #ruby
ndrei has joined #ruby
seaned has quit [Read error: Connection reset by peer]
sevenseacat has quit [Quit: .]
_blizzy_ has joined #ruby
seaned has joined #ruby
senayar has joined #ruby
Hounddog has quit [Remote host closed the connection]
platzhirsch has joined #ruby
araujo has joined #ruby
siaw has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
eGGshke is now known as eGGsha
jenrzzz has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dopamean_ has joined #ruby
ssd7 has joined #ruby
DLSteve has joined #ruby
Rancid-punk has quit []
pandaant has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
<ramadoka>
so quiet here ?
<jhass>
some days
lkba has quit [Ping timeout: 244 seconds]
<adaedra>
we talk when we have something to say.
jenrzzz has joined #ruby
<shevy>
nobody is doing cool things in ruby here anymore
<jhass>
and play hangman in #ruby-offtopic otherwise
arup_r has quit [Remote host closed the connection]
CloCkWeRX1 has quit [Ping timeout: 252 seconds]
A124 has joined #ruby
timonv has quit [Ping timeout: 244 seconds]
khebbie has quit [Remote host closed the connection]
suchness has joined #ruby
meph has joined #ruby
<shevy>
not really :(
<shevy>
the recent heatwave knocked me out again...
<adaedra>
shevy melted
ddrmanxbxfr has quit [Read error: Connection reset by peer]
ddrmanxbxfr has joined #ruby
Iskarlar has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
solocshaw has joined #ruby
solocshaw has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 264 seconds]
Iskarlar has quit [Client Quit]
solocshaw has joined #ruby
codecop has joined #ruby
<shevy>
yeah I dunno what is happening... the last 5 years it wasn't anywhere near as bad
jenrzzz has joined #ruby
dionysus69 has joined #ruby
<apeiros>
ruboto needs a ?plenking factoid :D
Pathfinder has quit [Ping timeout: 264 seconds]
juanpablo_ has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devoldmx has joined #ruby
solocshaw has quit [Ping timeout: 246 seconds]
lkba has joined #ruby
havenwood has quit [Ping timeout: 265 seconds]
juanpablo_ has quit [Ping timeout: 250 seconds]
eiGHttt has joined #ruby
devoldmx has quit [Ping timeout: 268 seconds]
Guest46259 is now known as nw
ddrmanxbxfr has quit [Read error: Connection reset by peer]
sepp2k has joined #ruby
ddrmanxbxfr has joined #ruby
ferhaty has quit []
jenrzzz has quit [Ping timeout: 260 seconds]
rubie has joined #ruby
jenrzzz has joined #ruby
<yorickpeterse>
plenking?
bw_ has joined #ruby
startupality has joined #ruby
Iskarlar has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
<jhass>
plenking !
<jhass>
this is plenking ? yes this is plenking !
mprelude has joined #ruby
<jhass>
this isn't.
krz has quit [Quit: WeeChat 1.2]
<adaedra>
ah
rubie has quit [Remote host closed the connection]
<shevy>
godly plenking
arup_r has joined #ruby
dopamean_ has quit [Ping timeout: 260 seconds]
poguez_ has quit [Quit: Connection closed for inactivity]
auzty has joined #ruby
Mendenhall has quit [Ping timeout: 272 seconds]
<mon_>
<shevy> nobody is doing cool things in ruby here anymore <-- @@
<shevy>
gone are the days of cool ruby games
<mon_>
gem. i always related it to final fantasy games
<platzhirsch>
woopy
<shevy>
yeah, I don't know how popular ruby is in japan
<platzhirsch>
I guess everyone moved to Go
<shevy>
platzhirsch :(
<platzhirsch>
:|
<Ox0dea>
:\
astrobun_ has quit [Remote host closed the connection]
<adaedra>
:-
eGGsha is now known as eGGshke
chipotle_ is now known as chipotle
qba73_ has joined #ruby
* platzhirsch
gets depressed
qba73 has quit [Read error: Connection reset by peer]
dopamean_ has joined #ruby
<shevy>
well
<shevy>
mruby will turn the tide \o/
leat has joined #ruby
qba73 has joined #ruby
Cust0sLim3n has quit [Ping timeout: 250 seconds]
<yorickpeterse>
I have strong doubts about mruby every taking over Lua
<yorickpeterse>
Though it wouldn't be a bad thing
dopamean_ has quit [Ping timeout: 260 seconds]
eGGshke is now known as eGGsha
AlexAltea has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
<shevy>
perhaps if there is a productivity gain and the speed penalty not excessive
qba73_ has quit [Ping timeout: 264 seconds]
mhenrixon has joined #ruby
mhenrixon has quit [Client Quit]
jenrzzz has joined #ruby
scripore has joined #ruby
Cust0sLim3n has joined #ruby
suchness has quit [Read error: Connection reset by peer]
Vile` has quit [Ping timeout: 268 seconds]
qba73_ has joined #ruby
Vile` has joined #ruby
qba73 has quit [Read error: Connection reset by peer]
qba73 has joined #ruby
<yorickpeterse>
it will be hard to beat LuaJIT
<superrorc>
i need to get all files in some dir, what is the best structure so store it ? string ? array?
<superrorc>
storing file names
<yorickpeterse>
Do you need to store all of them together?
<yorickpeterse>
as in, in one field?
<superrorc>
no
<yorickpeterse>
An array is probably best
<superrorc>
next i will count md5 of this files
<yorickpeterse>
it makes no sense to store file names in a string
<superrorc>
ok i got it, ty yorickpeterse
michael_mbp has quit [Excess Flood]
qba73_ has quit [Ping timeout: 264 seconds]
Vile` has quit [Ping timeout: 272 seconds]
mhenrixon has joined #ruby
Vile` has joined #ruby
michael_mbp has joined #ruby
ramadoka has quit [Remote host closed the connection]
mhenrixon has quit [Remote host closed the connection]
mhenrixon has joined #ruby
ndrei has joined #ruby
eightfold has joined #ruby
bruno- has joined #ruby
stardiviner has joined #ruby
leat has quit [Ping timeout: 246 seconds]
anisha has quit [Ping timeout: 246 seconds]
mhenrixon has quit [Remote host closed the connection]
jeadre has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
<atmosx>
hello
jeadre has joined #ruby
<adaedra>
hi atmosx
allcentury has joined #ruby
leat has joined #ruby
mon_ is now known as mon-
scripore has quit [Quit: This computer has gone to sleep]
mon- is now known as mna
mna is now known as mon_
Vile` has quit [Ping timeout: 240 seconds]
mon_ is now known as mon`
Vile` has joined #ruby
leat has quit [Remote host closed the connection]
leat has joined #ruby
mon` is now known as mon_
anisha has joined #ruby
<atmosx>
gonna grab something to eat :-)
zeroDivisible has quit [Remote host closed the connection]
stardiviner has quit [Ping timeout: 244 seconds]
ebbflowgo has joined #ruby
leat has quit [Ping timeout: 250 seconds]
lkba has quit [Ping timeout: 244 seconds]
Azure has quit [Quit: Oops.]
leat has joined #ruby
Azure has joined #ruby
linduxed has quit [Quit: WeeChat 1.1.1]
sdothum has joined #ruby
ebbflowgo has left #ruby [#ruby]
suchnes__ has joined #ruby
Pathfinder has joined #ruby
arup_r has quit [Remote host closed the connection]
linduxed has joined #ruby
eightfold_ has joined #ruby
Gnomethrower has quit [Read error: Connection reset by peer]
skade has joined #ruby
pranny has joined #ruby
eightfold has quit [Ping timeout: 246 seconds]
eightfold_ is now known as eightfold
arup_r has joined #ruby
pranny has quit [Remote host closed the connection]
suchnes__ has left #ruby [#ruby]
suchnes__ has joined #ruby
leat has quit [Ping timeout: 240 seconds]
suchnes__ has quit []
suchness has joined #ruby
livathinos has joined #ruby
sarkyniin has joined #ruby
ecnalyr has joined #ruby
jkldfg has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
suchness has left #ruby [#ruby]
suchness has joined #ruby
mikenovikov has joined #ruby
jenrzzz has joined #ruby
ecnalyr has quit [Ping timeout: 246 seconds]
eGGsha is now known as eGGshke
millerti has joined #ruby
mhenrixon has joined #ruby
rikai_ has quit [Quit: No Ping reply in 180 seconds.]
vali has left #ruby ["Leaving"]
rikai has joined #ruby
rodfersou has joined #ruby
Rollabunna has joined #ruby
pawnbox_ has quit [Remote host closed the connection]
pawnbox has joined #ruby
khebbie has joined #ruby
dhjondoh has joined #ruby
<platzhirsch>
We use Lua for our Nginx configuration, pretty sick
Gnomethrower has joined #ruby
Gnomethrower has quit [Changing host]
Gnomethrower has joined #ruby
qba73_ has joined #ruby
qba73_ has quit [Remote host closed the connection]
ghr has joined #ruby
qba73 has quit [Ping timeout: 244 seconds]
eGGshke is now known as eGGsha
Rollabunna has quit [Ping timeout: 244 seconds]
rikai has quit [Quit: No Ping reply in 180 seconds.]
juanpablo_ has joined #ruby
rikai has joined #ruby
khebbie has quit [Remote host closed the connection]
gener1c has joined #ruby
ebbflowgo has joined #ruby
ghr has quit [Ping timeout: 264 seconds]
juanpablo_ has quit [Ping timeout: 255 seconds]
leafybasil has joined #ruby
Voker57 has quit [Remote host closed the connection]
<[spoiler]>
platzhirsch: did you notice if it impacts performance?
<platzhirsch>
mhm, no
pranny has joined #ruby
<[spoiler]>
Ah cool. I considered using it, but assumed it might be bad for the performance
tkuchiki has quit [Remote host closed the connection]
dgutierrez1287 has joined #ruby
devoldmx has joined #ruby
CloCkWeRX has joined #ruby
devoldmx has quit [Ping timeout: 244 seconds]
tmillc has quit [Ping timeout: 260 seconds]
startupality has quit [Quit: startupality]
startupality has joined #ruby
dopamean_ has joined #ruby
loechel has joined #ruby
Pumukel has quit [Ping timeout: 240 seconds]
eiGHttt has quit [Quit: eiGHttt]
loechel is now known as Pumukel
leat has joined #ruby
PlasmaStar has quit [Ping timeout: 246 seconds]
phutchins has joined #ruby
codenapper has quit [Ping timeout: 244 seconds]
malf has quit [Quit: Leaving.]
dopamean_ has quit [Ping timeout: 268 seconds]
rushed has quit [Quit: rushed]
PlasmaStar has joined #ruby
[k-_ has joined #ruby
ldnunes has joined #ruby
syath has joined #ruby
dopamean_ has joined #ruby
duncannz has quit [Remote host closed the connection]
dhjondoh has quit [Quit: dhjondoh]
Musashi007 has joined #ruby
senayar has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
senayar has joined #ruby
jalnt has quit [Ping timeout: 250 seconds]
ramadoka_ has joined #ruby
dopamean_ has quit [Ping timeout: 255 seconds]
oo_ has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
ndrei has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
GreekFreak has joined #ruby
<GreekFreak>
hi all
<jhass>
hi
<GreekFreak>
I am running ' system "ls /path/to/dir" '. This returns true or false. How do I get the files it returns?
ndrei has joined #ruby
relix has joined #ruby
dhjondoh has joined #ruby
<apeiros>
GreekFreak: use backticks. or better yet: the Dir class
<jhass>
GreekFreak: why are you running ls and not Dir.glob or Dir.entries?
<GreekFreak>
apeiros, jhass, My problem with the Dir class is that I can't sudo into a protected directory, which is why I'm taking this route
<GreekFreak>
I'm actually doing ' system "echo 'mypasswd' | sudo -S ls /var/path/to/dir" '
atomical has joined #ruby
roxtrongo has joined #ruby
<jhass>
sounds like you want to write a shellscript, not a rub script
cantaberry has quit [Ping timeout: 250 seconds]
<jhass>
*ruby, even
cantaberry has joined #ruby
<GreekFreak>
jhass, I need the file to get the path to read the files that are in that directory
<jhass>
either you run your script as the wrong user then or the directory has the wrong owner/group/permissions
<jhass>
it's an issue you should solve with system administration, not code
pawnbox has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
<GreekFreak>
jhass, I'm reading files from a folder in Dovecot, and I don't want to change the way dovecot works.
<GreekFreak>
backticks gives me the result I'm looking for
<jhass>
run it as the same user that dovecot runs under then
bruno- has joined #ruby
<GreekFreak>
jhass, does Dir allow me to do that? Cause the ruby script is run as my local user
<jhass>
and I'm saying you shouldn't run it as your local user if it needs to access stuff your local user doesn't have access to
atomical has quit [Ping timeout: 255 seconds]
Blaguvest has quit []
Pumukel has quit [Ping timeout: 244 seconds]
Ropeney has joined #ruby
<GreekFreak>
jhass, oh ok. makes sense. I'll try it out
<GreekFreak>
jhass, apeiros thanks guys
<jhass>
GreekFreak: but please don't just run it as root either, more like sudo -u dovecot ruby foo.rb ;)
<apeiros>
no risk no fun!
Voker57 has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
moeabdol has quit [Ping timeout: 268 seconds]
<GreekFreak>
jhass, no I'm not. lol I think I have some braincells left haha. I added my local user as a sudoer
gagrio__ has quit [Ping timeout: 255 seconds]
gagrio has quit [Ping timeout: 272 seconds]
ndrei has joined #ruby
leat has quit [Remote host closed the connection]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ramadoka_>
what would happen if i refactor all my local variable inside a function, into a function?
<ramadoka_>
inside an object
Musashi007 has quit [Quit: Musashi007]
<ramadoka_>
for example from: def something; a = 5; b = a + 3; end
<ramadoka_>
def something; a + 3; end
<jhass>
you would think refactoring works by blindly applying some patterns and techniques without thinking about your code and you would be mistaken, I guess?
<ramadoka_>
def a; 5; end
rbennacer has joined #ruby
havenwood has joined #ruby
<jhass>
there's always tradeoffs between variants
<jhass>
what fits best is highly contextual
<ramadoka_>
also throw memoization there.
<ramadoka_>
reusability++, bonus lazy-evaluation.
<jhass>
method invocation overhead--, loc increase--, available name decrease--
<jhass>
neither of those makes it a good or bad idea under all circumstances
<apeiros>
cognitive overhead--
<apeiros>
but that one actually depends on the complexity of your original method
ghr has joined #ruby
<jhass>
see above, really
<apeiros>
decomposing a large method into a couple of smaller ones can actually reduce cognitive overhead
<apeiros>
yes, highly context sensitive
<jhass>
it's all highly contextual, within the scope of a line more often than not even
gagrio has joined #ruby
exadeci has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
atomical has joined #ruby
dwithers is now known as pl1ght
<ramadoka_>
yeah, decomposing, is the original purpose.
centrx has joined #ruby
ghr has quit [Ping timeout: 250 seconds]
kwd has quit [Quit: kwd]
leat has joined #ruby
unver has joined #ruby
khebbie has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
segmond has quit [Ping timeout: 244 seconds]
anisha has quit [Ping timeout: 250 seconds]
leat has quit [Remote host closed the connection]
leat has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
devoldmx has joined #ruby
leafybasil has quit [Read error: Connection reset by peer]
leafybasil has joined #ruby
Pumukel has joined #ruby
<shevy>
yum
<shevy>
composing
devoldmx has quit [Ping timeout: 264 seconds]
Iskarlar has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tennis has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 240 seconds]
tvw has quit [Remote host closed the connection]
iceyec has joined #ruby
tomaz_b has quit [Ping timeout: 250 seconds]
juanpablo_ has joined #ruby
kgirthofer has joined #ruby
scripore has joined #ruby
<kgirthofer>
hey all - is there a default folder structure for a ruby application? I currently just have a bunch of files in a folder and I would like to organize it a bit
scripore has quit [Client Quit]
<adaedra>
yes, code in lib, tests in test or spec
<adaedra>
and then, name your files like your classes, with folders for "namespaces"
<cirenyc>
okay...makes sense. thanks for the input.
codenapper has joined #ruby
sevenseacat has quit [Quit: .]
luksaur has joined #ruby
LinkRage has joined #ruby
icarus has joined #ruby
bruno- has joined #ruby
mary5030 has joined #ruby
malconis has joined #ruby
messysaurus has quit [Read error: Connection reset by peer]
messysaurus has joined #ruby
mjuszczak has joined #ruby
<LinkRage>
"Line: 5 ; Detail: undefined method `sort' for #<String:0x00000003ed5b40>" -> http://pastebin.com/3Q4ksrL5 - this is a erb from an old Puppet manifest. What has to be updated to works with ruby 1.9.3 ?
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
bruno- has quit [Ping timeout: 244 seconds]
icarus has quit [Ping timeout: 246 seconds]
jas02 has quit [Quit: jas02]
AlexAltea has joined #ruby
hs366 has quit [Read error: Connection reset by peer]
ksteck has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
messysaurus has quit [Ping timeout: 265 seconds]
ajun has joined #ruby
messy has joined #ruby
livathinos has quit []
ksteck has joined #ruby
ajun has left #ruby [#ruby]
_blizzy_ has quit [Ping timeout: 265 seconds]
jstodberg has joined #ruby
leat has joined #ruby
mna has quit [Changing host]
mna has joined #ruby
<apeiros>
LinkRage: in ruby 1.8, String#each existed and String included Enumerable. that's no longer the case.
<apeiros>
LinkRage: use String#lines
<apeiros>
i.e., some_str.lines.sort
xcesariox has joined #ruby
ICantCook has quit [Ping timeout: 265 seconds]
<centrx>
String#each_line also now
tkuchiki has quit [Remote host closed the connection]
<apeiros>
yes. though if you call .sort on it, .lines is almost certainly the better choice.
jonathan1 has joined #ruby
pranny has joined #ruby
jonathan1 has quit [Client Quit]
truenito has joined #ruby
chinmay_dd has quit [Ping timeout: 255 seconds]
chinmay_dd has joined #ruby
<LinkRage>
apeiros, I changed .sort to .lines.sort , now it says: Line: 26 ; Detail: undefined method `each' for nil:NilClass - this is this one: <% val.each do |croncmd| -%>
ICantCook has joined #ruby
<apeiros>
I sense more bugs
<apeiros>
your code says crontab_vars_*hsh*
<apeiros>
yet your error from before said it was a string. look elsewhere for why this is a string instead of a hash
<apeiros>
(and with a hash, you don't need to do .lines.sort.each either)
cball has quit [Quit: Leaving]
chussenot has quit [Quit: chussenot]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Guest50 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ElSif has quit [Read error: Connection reset by peer]
chussenot has joined #ruby
t0rrieri has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Ping timeout: 244 seconds]
pranny has quit [Remote host closed the connection]
gamename has joined #ruby
ngscheurich has joined #ruby
t0rrieri has joined #ruby
gamename has quit [Remote host closed the connection]
gamename has joined #ruby
troulouliou_div2 has quit [Quit: Leaving]
codecop has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
michael_mbp has quit [Excess Flood]
cball has joined #ruby
troulouliou_div2 has joined #ruby
messy has quit [Ping timeout: 264 seconds]
hinbody has joined #ruby
ta has joined #ruby
sarkyniin has quit [Read error: Connection reset by peer]
sarkyniin has joined #ruby
davejlong has joined #ruby
<davejlong>
Does anyone know of a Ruby gem similar to Forever.js that will keep a process running forever and restart automatically if it crashes?
<davejlong>
I don't want to use something like Supervisord as this will only be for one process and I feel like Supervisord is meant for a larger scale
chinmay_dd has quit [Read error: Connection reset by peer]
neonalpine has joined #ruby
Guest50 has joined #ruby
rubie has joined #ruby
jpfuentes2 has quit [Client Quit]
michael_mbp has joined #ruby
dfockler has joined #ruby
<davejlong>
And of course then I find what I'm looking for. God is what I was looking for.
messysaurus has joined #ruby
<jhass>
davejlong: eye, god, monit
gener1c_ has joined #ruby
<jhass>
I just use systemd if available though
<jhass>
daemontools for a non-Ruby solution
<davejlong>
jhass: I am using CentOS/RHEL so I probably could use systemd. I'm just not super familiar with auto-restarting processes in systemd.
tuxero has joined #ruby
gener1c has quit [Ping timeout: 265 seconds]
bmn has quit [Quit: obai]
<jhass>
Restart=on-failure (or always), done
<jhass>
see man systemd.exec
leat has quit [Remote host closed the connection]
messy has joined #ruby
pranny has joined #ruby
bmn has joined #ruby
havenwood has quit [Ping timeout: 250 seconds]
messysaurus has quit [Ping timeout: 250 seconds]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
leonmaia has joined #ruby
messy has quit [Ping timeout: 255 seconds]
ehth77 has joined #ruby
gagrio has quit [Remote host closed the connection]
s2013 has joined #ruby
messysaurus has joined #ruby
dionysus69 has quit [Ping timeout: 244 seconds]
messysaurus has quit [Read error: Connection reset by peer]
messysaurus has joined #ruby
t0rrieri has quit [Quit: Be back later ...]
t0rrieri has joined #ruby
t0rrieri has quit [Client Quit]
mary5030 has quit [Ping timeout: 244 seconds]
dopamean1 has joined #ruby
d10n-work has joined #ruby
mary5030 has joined #ruby
araujo has quit [Quit: Leaving]
leat has joined #ruby
roxtrongo has quit [Remote host closed the connection]
truenito has quit [Quit: truenito]
bmn has quit [Quit: obai]
dopamean_ has quit [Ping timeout: 246 seconds]
perrier has joined #ruby
majjoha_ has quit [Ping timeout: 240 seconds]
pawnbox has quit [Remote host closed the connection]
baroquebobcat has joined #ruby
bmn has joined #ruby
meatherly has joined #ruby
Mon_Ouie has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 250 seconds]
Lucky__ has joined #ruby
fedexo has joined #ruby
psy has joined #ruby
psy has quit [Max SendQ exceeded]
casadei has quit [Remote host closed the connection]
baroquebobcat has quit [Read error: Connection reset by peer]
chussenot has quit [Quit: chussenot]
jenrzzz has joined #ruby
baroquebobcat has joined #ruby
psy has joined #ruby
casadei has joined #ruby
charliesome has joined #ruby
t0rrieri has joined #ruby
mleung has joined #ruby
mleung has quit [Client Quit]
riotjones has joined #ruby
linduxed has quit [Ping timeout: 252 seconds]
rcvalle has joined #ruby
pawnbox has joined #ruby
mjuszczak has quit []
Lucky__ has quit [Read error: Connection reset by peer]
leat has quit [Ping timeout: 252 seconds]
riotjones has quit [Ping timeout: 272 seconds]
mleung has joined #ruby
scripore has joined #ruby
leat has joined #ruby
bruno- has joined #ruby
AlexRussia has quit [Ping timeout: 244 seconds]
leat has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 260 seconds]
meatherly has quit []
jenrzzz has joined #ruby
ayonkhan has quit []
leat has joined #ruby
prestorium has joined #ruby
marr has quit [Read error: Connection reset by peer]
CloCkWeRX has quit [Remote host closed the connection]
chinmay_dd has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
pyon has joined #ruby
messy has joined #ruby
meatherly has joined #ruby
DoubleAC has joined #ruby
solars has joined #ruby
roxtrongo has joined #ruby
messysaurus has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
devoldmx has quit [Ping timeout: 240 seconds]
_lazarevsky_ has joined #ruby
<_lazarevsky_>
howdy
<_lazarevsky_>
#repost warning
AlexRussia has joined #ruby
pranny has quit [Ping timeout: 265 seconds]
towski_ has joined #ruby
pranny has joined #ruby
messysaurus has joined #ruby
zendrix has quit [Remote host closed the connection]
messy has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
meatherly has quit []
maletor has joined #ruby
DLSteve has joined #ruby
JFlash has joined #ruby
<JFlash>
guys I need some help
<JFlash>
I'm trying to install RoR
<JFlash>
after succefully installing evryting using rbenv, I get this error
<JFlash>
"Rails is not currently installed on this system."
<JFlash>
could this be because I changed directories?
<JFlash>
I was on /usr/local when I installed evrything
phtephen has joined #ruby
<JFlash>
but now I'm on /Users/myname/
<phtephen>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
pranny has quit [Remote host closed the connection]
<havenwood>
JFlash: I'm not an rbenv user but it seems often the answer to rbenv questions is: rbenv rehash
<JFlash>
handsome gentlemen, please help
<phtephen>
?gentlemen
<ruboto>
I don't know anything about gentlemen
<havenwood>
?rails JFlash
<ruboto>
JFlash, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<phtephen>
?feminazi
<ruboto>
I don't know anything about feminazi
<havenwood>
phtephen: ?
<phtephen>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<havenwood>
phtephen: Please don't spam the bot.
<JFlash>
this question is actually about ruby not specific to rails. it could be happening with any gem, I guess
chinmay_dd has quit [Read error: Connection reset by peer]
barhum2013 has joined #ruby
<JFlash>
it's actually related with how rbenv works, I suppose
iateadonut has quit [Quit: Leaving.]
pranny has joined #ruby
<havenwood>
phtephen: Enjoy Ruby?
t0rrieri has quit [Quit: Be back later ...]
<JFlash>
havenwood: did try rehash before, but no luck
Valeness has joined #ruby
<havenwood>
JFlash: There's are #chruby and #rvm channels but no #rbenv that I'm aware of (maybe some folk who were looking for one lingering).
<JFlash>
is it right to assume that rbenv only installs stuff locally (as in inside an specific directory)
<JFlash>
could it be that if I changed directories I have to reinstall the whole shebang?
radgeRayden has joined #ruby
skade has joined #ruby
kinduff has quit []
ItSANgo has joined #ruby
kinduff has joined #ruby
<miah>
JFlash: rbenv installs into /usr/local/rbenv/versions in a system install, i have no idea on a local user. its been so long.
<havenwood>
JFlash: I think rbenv has pretty decent documentation about how it works. There are a lot more chruby and RVM users here but I'm sure some rbenv too.
<_lazarevsky_>
hey guys
messysaurus has quit [Ping timeout: 268 seconds]
<_lazarevsky_>
how can I serialize just the object, without its associations?
<JFlash>
?hey guys
<ruboto>
guys, I don't know anything about hey
<JFlash>
?hey hey guys
<ruboto>
hey, I don't know anything about hey
<havenwood>
Please do not spam the bot.
<JFlash>
sorry
sp` has joined #ruby
sp_ has quit [Quit: leaving]
axl_ has joined #ruby
decoponio has joined #ruby
<havenwood>
_lazarevsky_: hey gal
<havenwood>
_lazarevsky_: what's an Object association?
sp` is now known as sp_
<apeiros>
_lazarevsky_: the term "associations" makes me think by "object" you're actually referring to an active record model instance - is that correct?
troulouliou_div2 has quit [Read error: Connection reset by peer]
<havenwood>
There's a helpful #RubyOnRails channel that's best for Rails-related questions.
<_lazarevsky_>
apeiros: correct
darwingr has quit [Quit: bye bye]
<_lazarevsky_>
havenwood: ya I know.. got no responses over there
<apeiros>
_lazarevsky_: #rubyonrails is indeed the right choice. though, a plain model.to_yaml iirc should work
<havenwood>
_lazarevsky_: It's IRC so do linger as it may take a while for a response even in a populated channel.
leat has quit [Remote host closed the connection]
zendrix has joined #ruby
<apeiros>
sometimes getting no answer can also mean that your question did not make sense to people. e.g. because of too much missing context/information
<havenwood>
_lazarevsky_: And please mention in both channels when you cross-post. That way those invested can follow both conversations, not waste time repeating and hopefully learn.
jalljo has quit [Changing host]
jalljo has joined #ruby
leat has joined #ruby
<apeiros>
in your case e.g. that object = AR model, also which kind of serialization (JSON, YAML, Marshal, etc.)
araujo has joined #ruby
messysaurus has joined #ruby
<apeiros>
havenwood: they actually announced it. took a couple of minutes after that, though :D
<apeiros>
(18:29 _lazarevsky_: #repost warning )
spider-mario has joined #ruby
troyready has quit [Remote host closed the connection]
<havenwood>
:)
pietr0 has joined #ruby
sarkyniin has quit [Ping timeout: 255 seconds]
t0rrieri has joined #ruby
braintwist has joined #ruby
bronson has joined #ruby
t0rrieri has quit [Client Quit]
howdoi has quit [Quit: Connection closed for inactivity]
kinduff has quit []
kinduff has joined #ruby
zekriad has quit [Read error: Connection reset by peer]
<ruboto>
_lazarevsky_, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
ksteck has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Tempesta has quit [Quit: Going offline, see ya! (( www.adiirc.com )]
t0rrieri has quit [Client Quit]
davejlong has joined #ruby
suchness has quit [Ping timeout: 250 seconds]
benlovell has quit [Ping timeout: 240 seconds]
rehat_ has joined #ruby
<phtephen>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
jpfuentes2 has joined #ruby
cirenyc has joined #ruby
havenwood has quit [Ping timeout: 240 seconds]
marr has joined #ruby
startupality has quit [Quit: startupality]
messysaurus has quit [Ping timeout: 250 seconds]
Mon_Ouie has quit [Ping timeout: 250 seconds]
_djbkd has joined #ruby
davejlong has quit [Remote host closed the connection]
davejlong has joined #ruby
<shevy>
phtephen spammer
Mon_Ouie has joined #ruby
meatherly has joined #ruby
Synthbread has quit [Quit: Leaving]
messysaurus has joined #ruby
_djbkd has quit [Remote host closed the connection]
_djbkd has joined #ruby
spidermario has joined #ruby
spider-mario has quit [Ping timeout: 252 seconds]
<jhass>
shevy: please just ignore and say nothing
<jhass>
for the future
shadoi has joined #ruby
northfurr has joined #ruby
poli has quit [Ping timeout: 244 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
<failshell>
im pretty sure im doing something silly
ekinmur has quit [Max SendQ exceeded]
<apeiros>
failshell: are you sure you don't shadow that initialize?
<failshell>
apeiros: what do you mean?
<apeiros>
failshell: does Robut::Plugin or Robut::Plugin::WorkFlow define an initialize?
<failshell>
apeiros: plugin does
ekinmur has joined #ruby
<apeiros>
does it call super?
<failshell>
no
postmodern has joined #ruby
<apeiros>
then you shadow Robut::API's initialize
lapide_viridi has joined #ruby
bffff_ has quit [Quit: Connection closed for inactivity]
<apeiros>
when you include a module, it ends up in the inheritance chain
bnizzle has joined #ruby
<apeiros>
works the same as inheriting from a class. if B < A, and B defines initialize without calling super, A's initialize is never called.
ekinmur has quit [Max SendQ exceeded]
baweaver has quit [Remote host closed the connection]
mprelude has quit [Ping timeout: 255 seconds]
dionysus69 has joined #ruby
lapide_viridi has quit [Client Quit]
ekinmur has joined #ruby
havenwood has quit [Ping timeout: 252 seconds]
messysaurus has joined #ruby
<failshell>
apeiros: well, i still dont know how to fix it ;p
<failshell>
when i turn my variables in class variables it all starts to work
<apeiros>
a) call super in your initialize
<apeiros>
b) don't use initialize
_djbkd has quit [Remote host closed the connection]
eGGsha has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
b) cont.: provide initialize_api and initialize_plugin in your modules, call those in your class' initialize
<jhass>
b) -> private def client; @client ||= ... end; etc.
neonalpine has quit [Remote host closed the connection]
<jhass>
well, b2
<apeiros>
c)
<phtephen>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
jeadre has quit [Remote host closed the connection]
<failshell>
apeiros: so having an initialize in a module is a bad idea?
_djbkd has joined #ruby
<apeiros>
failshell: depends
<apeiros>
failshell: not calling super when you're defining a basic method like initialize is likely to be a bad idea
jeadre has joined #ruby
<BraddPitt>
i like to have explicit intiialize calls
luksaur has quit [Ping timeout: 260 seconds]
Musashi007 has quit [Quit: Musashi007]
<apeiros>
it might be a bad idea to rely on state which requires initialization in a module
<apeiros>
no silverbullets there. sorry.
snockerton1 has quit [Quit: Leaving.]
<centrx>
failshell, Does Robut::Plugin define initialize? Have you checked whether @client and @room are in fact nil? Perhaps it is @client[@room] that is nil?
baweaver has quit [Remote host closed the connection]
Kricir has quit []
northfurr has joined #ruby
messy has joined #ruby
Koy has joined #ruby
devoldmx has joined #ruby
<Koy>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
Koy was banned on #ruby by jhass [jhass]
AccordLTN has quit [Ping timeout: 272 seconds]
AccordLTN has joined #ruby
Koy was kicked from #ruby by apeiros [don't worry, we have enough endurance]
Vile` has joined #ruby
messysaurus has quit [Ping timeout: 268 seconds]
troyready has joined #ruby
bluOxigen has joined #ruby
_djbkd has quit [Remote host closed the connection]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<jhass>
roshanavand: do we have to guess the line?
<jhass>
also please consider two spaces for indentation
<roshanavand>
jhass, sorry, 69
<JoshL>
prefixed: I'm guessing here that `instance_vars` is an array of symbols you got from `Object#instance_variables` and so what you actually want is something like `instance_vars.delete(:@status)`
<jhass>
roshanavand: it's @is_day = !@is_day
chouhoulis has quit [Read error: Connection reset by peer]
<roshanavand>
jhass, thanks
chouhoulis has joined #ruby
roxtrongo has quit [Ping timeout: 264 seconds]
rbennacer has quit [Remote host closed the connection]
pranny has quit [Ping timeout: 246 seconds]
benlovell has quit [Ping timeout: 240 seconds]
* apeiros
somewhat sad that there's no .force_encoding equivalent which returns a copy of the string
luksaur has quit [Ping timeout: 268 seconds]
mary5030 has quit [Remote host closed the connection]
<apeiros>
.dup.force_encoding it is, I guess :-|
kadoppe has quit [Ping timeout: 256 seconds]
Xiti has quit [Quit: Xiti]
<JoshL>
If it's OK to ask for gem recommendations in here, could anyone recommend a ruby thread pool / process concurrency implementation? If not, ignore me
<apeiros>
might help you find one which is popular
<JoshL>
apeiros: Thank you, I'll give that a look :)
<apeiros>
jhass: you thief! :<
* jhass
runs
* apeiros
runs right after jhass
<roshanavand>
well, I get "TypeError: no implicit conversion of Player into Integer" on line 32 when I run the code
<roshanavand>
should I add any to_s methods?
<jhass>
roshanavand: delete_at
<jhass>
delete searches for the obejct
<jhass>
oh, wait, nvm
<jhass>
no, I'm right
<jhass>
it's too hot :/
hanmac has quit [Quit: Leaving.]
<roshanavand>
btw, coz I'm printing players names
<roshanavand>
how can I fix it?
<jhass>
oh, line 32, dammit
<jhass>
roshanavand: so, @players is an array, right?
paulcsmith has joined #ruby
patrick_star has joined #ruby
phutchins has quit [Ping timeout: 272 seconds]
<roshanavand>
jhass, yes right
<jhass>
roshanavand: and you access arrays with an index, @players[0], @players[1] ...
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
and .sample returns an item from the array, ["a", "b", "c"].sample #=> "b"
<roshanavand>
jhass, I try to choose them randomly using @players.sample
<jhass>
@players[player]
<jhass>
is what you're doing
<jhass>
now thing about the things I pointed out in that context
yqt has joined #ruby
<jhass>
er, think even
nzst has joined #ruby
jgt3 has joined #ruby
Pumukel has joined #ruby
symm- has joined #ruby
gix has joined #ruby
freerobby has quit [Quit: Leaving.]
leat has quit [Remote host closed the connection]
mprelude has joined #ruby
gambl0re has joined #ruby
leat has joined #ruby
freerobby has joined #ruby
Jayno has joined #ruby
jgt3 has quit [Ping timeout: 244 seconds]
pranny has joined #ruby
<Jayno>
hi all. I’m having trouble installing Sass using Ruby on my Mac 10.9. This is the error message: http://dpaste.com/1Y5Q8SS Might anyone recognize anything wrong with my setup?
northfurr has quit [Quit: northfurr]
majjoha has joined #ruby
mleung has quit [Quit: mleung]
baweaver has joined #ruby
pranny_ has quit [Ping timeout: 246 seconds]
<Sou|cutter>
would you say... it's giving you sass?
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 244 seconds]
luksaur has joined #ruby
<Sou|cutter>
Jayno: Have you tried recompiling your ruby? looks like maybe a linking error?
<ruby-lang477>
also is there any way I can get all the entries associated with single key in associative array
<apeiros>
or array of arrays
<apeiros>
or structs
<baweaver>
better question, what do you want to do with it?
ehth77 has quit [Quit: Leaving]
<dfockler>
I'm still trying to split out my database dependency in my code so I can unit test, any good tips or ideas?
<apeiros>
ruby-lang477: ruby only has Array and Hash. Hash is one-value per key only (that value can be an array)
messysaurus has quit [Read error: Connection reset by peer]
<apeiros>
and if you use an array, search is linear. but you can use Array#select to do that
messysaurus has joined #ruby
<ruby-lang477>
@baweaver basically I have a data structure of "hash of hash of hash of data" so I wanted to simplify it a bit if possible
<baweaver>
showing us what the code is or what the end result is will help
snockerton has quit [Quit: Leaving.]
<apeiros>
yeah, xy
<apeiros>
?xy ruby-lang477
<ruboto>
ruby-lang477, it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<baweaver>
that's what that was.
codecop has quit [Remote host closed the connection]
davejlong has quit [Remote host closed the connection]
jeadre has quit [Remote host closed the connection]
davejlong has joined #ruby
<ruby-lang477>
ok, to keep it simple is there any way to get all the entries associated with a key in assoicative array
ruurd has joined #ruby
<ruby-lang477>
for a = [[1,2,3],[1,4,5]]
<ruby-lang477>
a.assoc(1) = [1,2,3]
<ruby-lang477>
but i want to get [1,2,3] , [1,4,5]
<al2o3-cr>
ruby-lang477: values_at ?
JoshL has quit []
<Mon_Ouie>
See Array#select as mentioned
einarj has joined #ruby
<arup_r>
>> a = [[1,2,3],[1,4,5]]; p a.select { |e| e.include? 1 }
<ruby-lang477>
@ruboto so there's no inbuilt assoc array function ?
<Mon_Ouie>
?justabot
<ruboto>
I'm just a bot. You don't need to address me.
messy has joined #ruby
ruby[bot] has joined #ruby
<arup_r>
why you don't link #select ? ruby-lang477
messysaurus has quit [Read error: Connection reset by peer]
Mendenhall has quit [Ping timeout: 240 seconds]
christiandsg has joined #ruby
pranny has quit []
<ruby-lang477>
becasu if there is some method then I can think of another solution
<apeiros>
22:11 apeiros: ruby-lang477: ruby only has Array and Hash. Hash is one-value per key only (that value can be an array)
<apeiros>
as said before
<baweaver>
that's how you do things in Ruby, you're not in Java
<apeiros>
there's no dedicated AssociativeArray class in ruby.
<baweaver>
treating Ruby like Java is done greatly at your own peril.
leat has quit [Remote host closed the connection]
Vile` has quit [Ping timeout: 246 seconds]
<apeiros>
and #select can be used to do exactly what you want
<apeiros>
though as said, AAs are slow on lookup (linear search)
leat has joined #ruby
jeadre has joined #ruby
<apeiros>
so maybe that's the wrong tool?
solocshaw has quit [Ping timeout: 255 seconds]
platzhirsch has joined #ruby
anisha has quit [Quit: Leaving]
apfeluser has quit [Quit: Leaving]
<apeiros>
and you're still stuck at asking about how you implement your solution, instead of asking about your problem
<baweaver>
Probably wants a hash, but unless they say what problem they're trying to solve it's useless.
<yxhuvud>
I don't get it, what is the problem with Array#assoc?
<apeiros>
yxhuvud: only gets one value
<apeiros>
assoc array can have repeated keys
havenwood has joined #ruby
<apeiros>
whether that's a good idea is another question altogether, though
<baweaver>
which is why we keep asking what the actual problem is
<baweaver>
because ruby-lang477 is trying to think in Java terms of addressing their problem
<apeiros>
indeed. and which is why I leave now. enough cooks already :)
<baweaver>
which will lead to a lot of confusion on both sides.
<baweaver>
I'm back and forth working on a generic pager in angular so might not be paying full attention.
Mon_Ouie has quit [Ping timeout: 260 seconds]
messy has quit [Ping timeout: 264 seconds]
<shevy>
The Angular Dam Project
<ruby-lang477>
@baweaver As I said I have a data structure in which I will have "Hash of Hash of Hash of Struct" and instead of simple creating these many hashes and make the code unreadable I wanted to have some flatten structure so was trying to use array
<nzst>
shevy: what is that?
<ruurd>
More like Dam Angular Project
syath has quit [Quit: WeeChat 1.2]
skade has joined #ruby
<ruurd>
why do you want a hash of hash of hash of struct?
devoldmx has joined #ruby
ruby[bot] has quit [Quit: leaving]
majjoha has joined #ruby
<ruurd>
what is the PROBLEM you are trying to solve.
messysaurus has joined #ruby
mleung has joined #ruby
ruby[bot] has joined #ruby
<baweaver>
echo echo echo
_blizzy_ has joined #ruby
<al2o3-cr>
Who is ruby[bot]?
<ruby-lang477>
@ruurd don't know why you want to understand the overall problem statement when you know the exact piece of problem
<baweaver>
not a blue
solars has joined #ruby
<baweaver>
ruby-lang477: because you're thinking like this is Java
<baweaver>
which is bad
<ruurd>
because that is not the problem that is the solution you came up with for the problem
<baweaver>
so we need to know the problem in order to tell you how to solve it in Ruby
<atmosx>
ruby-lang477: because everyone in here senses that your approach is wrong and unecessarily complicated.
<baweaver>
s/blue/clue/
roshanavand has joined #ruby
<ruurd>
or just to tell you that your solution stinks.
<ruby-lang477>
may be you are right ,let me reframe it
toertore has quit [Quit: Leaving]
<baweaver>
ruby-lang477: entire problem
<arup_r>
yes
<atmosx>
arup_r!
dionysus69 has quit [Ping timeout: 246 seconds]
toretore has joined #ruby
<arup_r>
I meant we convinced him to reframe.. :)
MVPhelp has quit [Remote host closed the connection]
jackjackdripper1 has quit [Quit: Leaving.]
devoldmx has quit [Ping timeout: 250 seconds]
bronson_ has joined #ruby
jackjackdripper has joined #ruby
Musashi007 has quit [Quit: Musashi007]
majjoha has quit [Ping timeout: 256 seconds]
<atmosx>
good night all
doublemalt__ has quit [Remote host closed the connection]
sarkyniin has left #ruby ["Left"]
jenrzzz has quit [Ping timeout: 255 seconds]
solocshaw has joined #ruby
jgt3 has joined #ruby
relix has joined #ruby
jenrzzz has joined #ruby
rubie has quit [Remote host closed the connection]
MVPhelp has joined #ruby
truenito has joined #ruby
rubie has joined #ruby
messysaurus has quit [Ping timeout: 265 seconds]
devdazed has quit [Quit: Bye]
bronson_ has quit [Ping timeout: 264 seconds]
ruby-lang477 has quit [Ping timeout: 246 seconds]
Mendenhall has joined #ruby
saddad has joined #ruby
Jackneill has quit [Ping timeout: 255 seconds]
<prefixed>
ok. why is this code failing with the following error: http://pastebin.com/bKRixU0s block (2 levels) in list_file_changes': undefined method `first' for :@file_path:Symbol (NoMethodError)
<dstarh>
anyone have experience decrypting data from attr_encrypted in java, specifically BouncyCastle
<prefixed>
ruboto i will end u skynet
leat has joined #ruby
<dstarh>
woops wrong chanel sorry
<toretore>
and gist the entire file so that file numbers match
<baweaver>
Ruboto is a bot
<toretore>
use gist prefixed
einarj has quit [Read error: Connection reset by peer]
<prefixed>
I can't send you the entire file
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<baweaver>
Then it's suggested to hire a consultant
<baweaver>
because your error is not in what you sent.
<prefixed>
i love this channel
einarj has joined #ruby
opensource_ninja has joined #ruby
prefixed has left #ruby [#ruby]
jaequery has joined #ruby
<baweaver>
left
gambl0re has quit [Ping timeout: 246 seconds]
chussenot has quit [Quit: chussenot]
paulcsmith has quit [Quit: Be back later ...]
skade has quit [Quit: Computer has gone to sleep.]
jottr has joined #ruby
<Zarthus>
at least he has shown appreciation for the things you do
<baweaver>
Sarcasm, but anyways
<baweaver>
Can't magically divine an issue in code they won't show us
<baweaver>
I bet you they come back and try the exact same thing after they think we've left
<baweaver>
and when they do they'll likely find out the same thing.
ginah has joined #ruby
JakFrist has joined #ruby
northfurr has quit [Quit: northfurr]
dawkirst has joined #ruby
nettoweb has joined #ruby
<jhass>
at least ruboto properly scolds now \o/
gambl0re has joined #ruby
dawkirst has quit [Client Quit]
<toretore>
:thumbsup:
Mendenhall has quit [Ping timeout: 246 seconds]
benlovell has joined #ruby
einarj has quit [Read error: Connection reset by peer]
einarj has joined #ruby
bigredboots has quit [Remote host closed the connection]
<shevy>
lol
<shevy>
ruboto is becoming interactive
jacaballero has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
umgrosscol has quit [Remote host closed the connection]
einarj has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 260 seconds]
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
benlovell has quit [Ping timeout: 272 seconds]
einarj has joined #ruby
yfeldblum has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler>
is there a way to mock chained method calls, or am I doing something wrong?
baweaver has quit [Remote host closed the connection]
<al2o3-cr>
ruboto: intelligence quotient is greater than mine :(
<BlueShoesYes>
al2o3-cr: you're not alone
<al2o3-cr>
:P
bmurt has quit []
davejlong has quit []
bigredboots has joined #ruby
einarj has quit [Ping timeout: 264 seconds]
roxtrongo has joined #ruby
roxtrongo has quit [Remote host closed the connection]
ddrmanxbxfr has quit [Quit: leaving]
jgpawletko has quit [Quit: jgpawletko]
hinbody has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 250 seconds]
Spami_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
jenrzzz has joined #ruby
ruurd has quit [Quit: ZZZzzz…]
arup_r has quit [Quit: Leaving]
Mendenhall has joined #ruby
s2013_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
messysaurus has joined #ruby
gambl0re has quit [Ping timeout: 264 seconds]
scottschecter has joined #ruby
christiandsg has quit [Remote host closed the connection]
messysaurus has quit [Read error: Connection reset by peer]
axl_ has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
AlexAltea has joined #ruby
jottr_ has joined #ruby
<havenwood>
anyone want to hack on some RVM shell scripts to get mvnw wrapper working for jruby-head installs?
<havenwood>
not my idea of fun either! >.>
* havenwood
cries
jottr has quit [Ping timeout: 260 seconds]
failshell has quit [Remote host closed the connection]
<havenwood>
If anyone wants an RVM stable release for TravisCI or another reason, this is the blocker.
<BlueShoesYes>
you just said a lot of things I would like to understand, but have zero understanding of....
jgt3 has joined #ruby
rbowlby has joined #ruby
<havenwood>
BlueShoesYes: RVM is a Ruby version manager and installer. You can install the JRuby binaries without Maven but Maven 3.3.1+ is required to compile modern JRuby. If you don't have Maven installed RVM will install Maven 3.3.3, which is great.
bronson_ has joined #ruby
<shevy>
ewwww
<shevy>
shell scripts!
<shevy>
why tis be not ruby scripts!!!
<havenwood>
BlueShoesYes: The problem is that if you have an old Maven it'll fail. But, JRuby ships with a ./mvnw wrapper for a good version of Maven.
<havenwood>
shevy: It will be in RVM2.
<shevy>
yay \o/
<pipework>
shevy: If you try hard enough, you can have a ruby shell.
<havenwood>
shevy: RVM1 is tens of thousands of lines of shell. Wheee!
<shevy>
pipework well, typing ruby syntax is extra work so this is not good, all strings in '' or "" is no fun
<BlueShoesYes>
havenwood: so your attempting to make a workaround to make the vm scripts to work for jruby? Maybe? lol
<pipework>
shevy: I use quotes for strings in shell too.
<havenwood>
So the goal is to switch to using the mvnw wrapper for new JRubies.
<havenwood>
BlueShoesYes: Something like that! :)
<pipework>
I'm a human, I shouldn't have to escape shit.
<havenwood>
Seems the goal is to just use ./mvnw instead of mvn, so probably mostly just finding the right RVM env vars to get at the wrapper.
<havenwood>
It's in the root dir of the JRuby src.
last_staff has quit [Ping timeout: 255 seconds]
messysaurus has quit [Read error: Connection reset by peer]
messy has joined #ruby
einarj has quit [Read error: Connection reset by peer]
nettoweb has quit [Ping timeout: 264 seconds]
einarj has joined #ruby
einarj has quit [Remote host closed the connection]
baweaver has joined #ruby
nettoweb has joined #ruby
rbennacer has quit [Ping timeout: 264 seconds]
majjoha has joined #ruby
Jardayn has joined #ruby
<Jardayn>
asdas
<Jardayn>
wow, im ID'd
<havenwood>
Jardayn: hi
scripore has joined #ruby
<Jardayn>
yo guys, im trying to do bundle install on Win 8.1 and i'm getting this
<Jardayn>
.Retrying dependency api due to error (2/4): Bundler::HTTPError Network error while fetching
<Jardayn>
havenwood, gday!
Usaur has joined #ruby
<havenwood>
Jardayn: What version of Bundler?: bundle -v
christiandsg has joined #ruby
<Jardayn>
onna drop browserify for webpac
<Jardayn>
Bundler version 1.10.6
<havenwood>
So latest.
<Jardayn>
yeah
<Jardayn>
testing
<Jardayn>
?guys
<ruboto>
Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<BraddPitt>
despite the @dictionary hash being initialized in the class constructor
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<zenspider>
Jardayn: based on backchannel convo... you're on a short leash. behave.
<Jardayn>
o_O
<shevy>
BraddPitt word is included?
Mon_Ouie has joined #ruby
<toretore>
BraddPitt: class vs instance
<shevy>
oh yeah
<BraddPitt>
oof
<shevy>
the @ used there is not the same as the one above
Musashi007 has joined #ruby
skade has joined #ruby
einarj has joined #ruby
<BraddPitt>
can you expand shevy
<BraddPitt>
oh
<BraddPitt>
since its a class method
<BraddPitt>
it cant access the defined instance var
<zenspider>
BraddPitt: exactly. self is different
Mendenhall has quit [Ping timeout: 250 seconds]
Contigi has joined #ruby
<shevy>
BraddPitt yeah, you can solve this by defining a reader method e. g. attr_reader :dictionary above, and in the self.bla one, instantiate, then call that method, e. g. object.dictionary[word]
dgutierrez1287 has quit [Remote host closed the connection]
<BraddPitt>
you mean create a new dictionary hash inside the class method?
<zenspider>
BraddPitt: pretty sure I've said this before: stop using tabs. All ruby errors come from tabs
<baweaver>
tabs and windows
<shevy>
BraddPitt yeah an instance of the class, an object e. g. object = Dictionary.new
messysaurus has quit [Read error: Connection reset by peer]
<shevy>
ah
<shevy>
the name is Markov so Markov.new
<BraddPitt>
I want to keep the state between multiple method calls so ill just make it a class var
<toretore>
other way around
<zenspider>
but is it Markov.new.analyze(text) ? how is it being called?
<toretore>
make it instance
<pipework>
If your markov chain generator's first name isn't Marky, I'm disappointed in you.
<BraddPitt>
its Markov.analyze(text)
<zenspider>
constant, class var, class ivar... doesn't matter.
uri_ has quit [Read error: Connection reset by peer]
<BraddPitt>
hmmm constant could work
<zenspider>
BraddPitt: then why do you have an initialize method?
einarj has quit [Remote host closed the connection]
messysaurus has joined #ruby
<BraddPitt>
other things need to be initialized in it
pawnbox has quit [Remote host closed the connection]
jgt3 has quit [Ping timeout: 265 seconds]
ssd7 has quit [Ping timeout: 264 seconds]
<BraddPitt>
hmm maybe this could benefit from some refacoring
dfinninger has quit [Remote host closed the connection]
<zenspider>
BraddPitt: you need to focus on knowing the difference between instances and classes. because your current design doesn't get it
<shevy>
and documentation!
<BraddPitt>
I understand the difference between instance and classes, I got confused with variable scope
<zenspider>
no, you don't
<zenspider>
if the analyzer is a class method, and you're expecting its state to be initialized via an instance, then you're conflating the concept of class and instance, not variable scope
<zenspider>
BraddPitt: don't be daft. I'm trying to help you. If you don't want help, don't ask for it in here.
<toretore>
though the two are not mutually exclusive, i suppose
messysaurus has quit [Read error: Connection reset by peer]
prestorium has quit [Ping timeout: 252 seconds]
messysaurus has joined #ruby
<BraddPitt>
You can give help without being a prick, as evidenced by everyone else that answered
hellyeah has joined #ruby
<hellyeah>
what was the name of channel for ruby on rails?
<havenwood>
be nice
<pipework>
BraddPitt: You get what you pay for though.
<pipework>
hellyeah: Try #rubyonrails
<havenwood>
hellyeah: #RubyOnRails
<hellyeah>
thanks
messy has joined #ruby
messysaurus has quit [Read error: Connection reset by peer]
Musashi007 has quit [Quit: Musashi007]
<zenspider>
BraddPitt: pretty sure you're projecting at this point.
uri_ has joined #ruby
dfinninger has joined #ruby
messysaurus has joined #ruby
messy has quit [Read error: Connection reset by peer]
<BraddPitt>
ok
Mendenhall has joined #ruby
<zenspider>
BraddPitt: again, if the analyzer is called via a class method, then all of your initializer code needs to either be in another class method, or open in the class scope.
<zenspider>
OR... make your class method call a singleton's instance method (not recommended)
<zenspider>
I'd probably go with lazy accessors
<pipework>
Why can't he make the class method just call new, assuming that #initialize doesn't need any arguments, or can be punted over to the class method?
<pipework>
I might not have enough context though.
victortyau has quit [Quit: Leaving]
<zenspider>
def self.analyzer text; self.new.analyzer text; end ?
EllisTAA has joined #ruby
<zenspider>
as I understand it, he wants the data to be shared across invocations
Queeniebee has quit [Ping timeout: 264 seconds]
ngscheur1 has quit [Ping timeout: 250 seconds]
<pipework>
Yeah, I guess in that case you need a singleton of some fashion, even if it's a cache/persisted thing or not.
Vile` has joined #ruby
<zenspider>
I try to avoid singletons at all cost
moeabdol has quit [Quit: WeeChat 1.3]
decoponio has quit [Read error: Connection reset by peer]
<hal_9000>
btw zenspider - i figured out the twitter cli issue
<EllisTAA>
i’m trying to create a threaded program so i’m trying to get some practice with using threads. when i run this program it prints 1 about 6 times then stops but the program doesn’t stop running (it seems like it’s stuck) can someone help me understand what i’m doing wrong? https://gist.github.com/ellismarte/cc7c0a8896387c385fbe
<zenspider>
hal_9000: hah
<pipework>
zenspider: Sometimes, I notice you'll write things that really shouldn't be used, but provides convenience. I've got a project like that. It's a way to easily test any number of implementations against one set of tests. It feels like a mostly bad idea.
BlueShoesYes has quit [Ping timeout: 246 seconds]
hellyeah has quit [Remote host closed the connection]
decoponio has joined #ruby
<hal_9000>
zenspider: i was logging in with the same acct each time - you need to do one, then the other - docs just say to be logged in.
ssd7 has joined #ruby
qwebirc44785 has joined #ruby
<shevy>
EllisTAA it does not stop running? isn't that what you want to achieve anyway since you invoke .join on each thread there?
<zenspider>
pipework: I'm not a fan of leaving options out to "save them"... I'll mention it, but then recommend against it.
bazbing80 has quit [Ping timeout: 264 seconds]
qwebirc44785 has left #ruby [#ruby]
opensource_ninja has quit [Ping timeout: 244 seconds]
eightfold_ has joined #ruby
<EllisTAA>
shevy: i read that you have to call join to join the threads to the main thread before you can end …
<shevy>
ah
<shevy>
I see
<pipework>
zenspider: minitest-mocks seem like one of those things. But maybe I'm just enamored with your opinion on what to do instead of using mocks.
messysaurus has quit [Read error: Connection reset by peer]
<shevy>
EllisTAA some of your threads are already dead when you reach .each
akurilin has quit [Read error: Connection reset by peer]
<pipework>
I'll pump out this project and maybe you can vindicate my opinion by telling me to delete it.
ap4y has joined #ruby
<shevy>
so you get sorta "random" deadness results and thus randomly different output
<EllisTAA>
shevy 0_O how would you write this program?
<zenspider>
haha
messysaurus has joined #ruby
<zenspider>
OK. I need to go punch / get punched. later
<toretore>
EllisTAA: you need to pass array_counter into Thread.new: `Thread.new(array_counter){|c| puts array[c] }`
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
enebo has quit [Quit: enebo]
eightfold has quit [Ping timeout: 246 seconds]
<toretore>
EllisTAA: it won't produce your "expected output" however
sp_ has quit [Quit: leaving]
truenito has quit [Quit: truenito]
eightfold_ is now known as eightfold
<toretore>
it will puts each number in random order
ruby[bot] has quit [Quit: leaving]
neohunter has joined #ruby
<EllisTAA>
toretore: why would they be random
platzhirsch has left #ruby [#ruby]
<toretore>
threads
<toretore>
as in, you don't know when each thread will execute
<shevy>
EllisTAA the old pickaxe had a nice example on threads... lemme see
<shevy>
havenwood damn you are like repeating that for the next 20 years to come ... :(
dgutierrez1287 has joined #ruby
<havenwood>
shevy: You're famous!
<shevy>
I don't even know how you have all that time to listen to ruby podcasts!
<havenwood>
shevy: I guess we could let them know to fix the typo.
<havenwood>
shevy: 4x speed
<BraddPitt>
With some practice you can be as famous as me, shevy
icarus has joined #ruby
<shevy>
I think the only talks I listen to is when matz gives a talk
<shevy>
havenwood 4x speed? lol
jher has joined #ruby
<baweaver>
ludicrous speed
<Ox0dea>
BraddPitt: Are you the famous 4chan, then?
<baweaver>
I just go straight to plaid
<Ox0dea>
I heard he doesn't afraid of stealing algorithms. :P
jottr_ has joined #ruby
<_rukh>
so what are your respective backgrounds in relation to ruby? I'm just beginning to learn the language, I have no real prior programming experience, thought I'd drop by the IRC.
paulcsmith has joined #ruby
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atomical has joined #ruby
dgutierrez1287 has quit [Ping timeout: 240 seconds]
<bootstrappm>
_rukh there's also #ruby-offtopic if you want to be really social
jottr has quit [Ping timeout: 264 seconds]
<havenwood>
_rukh: I think Ruby is a good language to learn.
<bootstrappm>
we try to keep things in here at least tangentially code related
jottr_ has quit [Client Quit]
<_rukh>
what I asked is related directly to ruby
<_rukh>
but I get your point
<havenwood>
_rukh: There are folks from many backgrounds here.