<surtin>
would anyone be around able to help a newbie with some coding issues, and potential explain what i've done wrong as if i were a 5 year old?
<centrx>
Coochie coochie coo!
ultraflash3 has joined #ruby
senayar__ has quit [Remote host closed the connection]
_HolyCow has joined #ruby
<surtin>
so was that the equivalent of a raised hand centrx?
gh has quit [Quit: Leaving]
ultraflash3 has quit [Ping timeout: 246 seconds]
tharindu has joined #ruby
Guest98184 is now known as OrangejuiceJames
<sXar_>
I'm back, ericwood I solved that. Now I have a string between doble quotes, what is the best way to remove them?
<sXar_>
"var 2" --> var2
<centrx>
surtin, Ask away!
<centrx>
Debian bot says "If you have a question, just ask! For example: "I have a problem with ___; I'm running Debian version ___. When I try to do ___ I get the following output ___. I expected it to do ___." Don't ask if you can ask, if anyone uses it, or pick one person to ask. We're all volunteers; make it easy for us to help you. If you don't get an answer try a few hours later or on debian-user@lists.debian.org. See <smart questions
<centrx>
><errors>.
<centrx>
Replace "Debian" with "Ruby"
ZeeLiDoX has quit [Ping timeout: 260 seconds]
ZeeLiDoX has joined #ruby
<centrx>
sXar_, Wasn't that the issue before?
<centrx>
sXar_, Double quotes indicate a string in Ruby, they are not necessarily _part_ of the string
angusiguess has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
stonevil_ has quit [Quit: Computer has gone to sleep.]
dx7 has quit [Remote host closed the connection]
<sXar_>
but they are scaped
<sXar_>
so, I have "\"var 2\""
dx7 has joined #ruby
<centrx>
ok
<centrx>
ericwood basically had it: <ericwood> >> 'NumberVar="var 2"'.match(/\S+="(.+)"/)[1]
dingus_khan has quit [Remote host closed the connection]
aryaching has joined #ruby
<RubyPanther>
the website and mailing list were ruby-lang already
vlad_starkov has joined #ruby
timonv has quit [Remote host closed the connection]
kitak_ has joined #ruby
yfeldblu_ has joined #ruby
_Andres has joined #ruby
yfeldblu_ has quit [Ping timeout: 252 seconds]
vlad_starkov has quit [Ping timeout: 246 seconds]
yfeldblum has joined #ruby
burlyscudd has joined #ruby
mneorr has joined #ruby
senayar has joined #ruby
sergicles has joined #ruby
senayar has quit [Remote host closed the connection]
aryaching_ has joined #ruby
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
xaq has quit [Remote host closed the connection]
senayar has joined #ruby
aryaching has quit [Ping timeout: 248 seconds]
yacks has joined #ruby
phansch has joined #ruby
senayar has quit [Remote host closed the connection]
<shevy>
hmm
burlyscudd has quit [Ping timeout: 260 seconds]
mneorr has quit [Ping timeout: 245 seconds]
<phansch>
mh?
deadlock has quit [Ping timeout: 245 seconds]
senayar has joined #ruby
kitak_ has quit [Remote host closed the connection]
kitak_ has joined #ruby
kobain_ has quit []
stonevil_ has joined #ruby
<shevy>
mh?
Salve has quit [Ping timeout: 260 seconds]
<daemonsr_>
capistrano anyone ??
<agent_white>
daemonsr_: As said before, #rubyonrails
<daemonsr_>
sorry, but there is no capistrano channel
<agent_white>
But there is... a... #rubyonrails channel!
<daemonsr_>
plus its in ruby
* agent_white
omg wow capi wow
kitak_ has quit [Ping timeout: 245 seconds]
<agent_white>
By the time you typed that, you _could've_ typed "/join #rubyonrails" and been WELL on your way.
stonevil_ has quit [Ping timeout: 252 seconds]
<agent_white>
BUT
<agent_white>
I drink water from the tap.
<shevy>
you dont want to type that
<shevy>
you want to ask agent_white about capistrano related questions
<agent_white>
NOPE
<shevy>
agent_white, is capistrano cool?
<shevy>
daemonsr_ come on, help me
<shevy>
capistrano is in ruby so the folks here must know about it
<agent_white>
I will feed you bullshit, upon the shit of bulls. I will google your results and find you answers I know nothing about. But I am agent_white.
<shevy>
hehe
shevy is now known as agent_shevy
<agent_shevy>
we make a great team man
<agent_white>
shevy: I had capi'ed a strano many times!
<agent_white>
:D
<agent_shevy>
it sounds so italian
<agent_white>
I do like pasta
<agent_shevy>
agent_daemonsr will be pleased to hear it has some connections to the mafia
atmosx is now known as agent_atmosx
<agent_shevy>
hey agent_atmosx!
<daemonsr_>
lol
<agent_atmosx>
hey agent_shevy :-D
<agent_shevy>
are you still working for that med-tech company agent_atmosx?
<daemonsr_>
thats so misuse of irc :D
<agent_white>
So miuse? agent_daemonsr_ you are using irc incorrectly
<agent_white>
Where is your pasta?
<agent_shevy>
we just for a team of agents, it's a meetup, then we split up again to do our assigned tasks agent_daemonsr
<agent_shevy>
*form
<agent_atmosx>
agent_shevy: it's mine, so yet. It didn't startup yet, I'm burried with the paperwork. On Monday I'll fly to Brno so I have to prepare the papers for others to do by biddings :-P
<agent_shevy>
ahhh ok
jackneill has joined #ruby
<agent_atmosx>
s/yet/yes
<agent_atmosx>
agent_shevy: are you workin on the perl-posessed company ?
<agent_shevy>
agent_atmosx well at least it gets you started!
<agent_shevy>
yeah :(
<agent_white>
agent_atmosx: Inquire Jerry about the relations prior to the meeting
<agent_shevy>
agent_atmosx but thankfully ruby 1.9.3 is available, I write everything in ruby
<agent_white>
I thought this is Haskell? Jerry misinformed me.
<agent_shevy>
pffft
<agent_atmosx>
agent_shevy: well yes. I'm eager to see how it will come through. I'm using a patient's software that sucks (patient-emr) pased on OpenEMR. I'm thinking about writing mine using Rails as a project as soon as I finnish the book.
<agent_shevy>
haskell is a sign of russian agents agent_white
<agent_atmosx>
Rails & JS, will be a nice learning project.
<agent_atmosx>
agent_white: Inquire Jerry who? :-p
<agent_white>
agent_shevy: They would find me out if my pasta disguise was readily apparent.
daemonsr_ has quit [Quit: Page closed]
<agent_shevy>
hehe
<agent_atmosx>
Walter White
<agent_shevy>
hmm that reminds me, I have to shop for some pasta today
<agent_white>
DON'T LEAD THEM IN agent_shevy!
<agent_white>
Yes... the pasta...
* agent_white
winks
<agent_shevy>
we agents took over #ruby
<agent_white>
daemonsr_: Jerry isn't in #rubyonrails, you have nothing to worry about.
<agent_shevy>
reminds me of the old game ... syndicate, they wore proper cloaks
srji has joined #ruby
tharindu has quit [Quit: Leaving...]
xaq has joined #ruby
agent_atmosx has quit [Quit: ["Textual IRC Client: www.textualapp.com"]]
[gmi] has joined #ruby
vlad_starkov has joined #ruby
<agent_white>
agent_shevy: Are you implying the agents do not carry proper cloaks?
<agent_white>
Jerry will be mad. And my Mom. She will be SO mad.
<agent_shevy>
I wear a cloak and only a cloak
<agent_white>
We are communists afterall
ace_striker has joined #ruby
ace_striker is now known as Guest35214
kate_r has joined #ruby
vlad_starkov has quit [Ping timeout: 252 seconds]
<agent_white>
.igignore ftw
ultraflash3 has joined #ruby
aryaching_ has quit [Ping timeout: 252 seconds]
Hobogrammer has joined #ruby
Hanmac1 is now known as Hanmac
mansi_ has joined #ruby
ktosiek has joined #ruby
ultraflash3 has quit [Ping timeout: 260 seconds]
jsaak has joined #ruby
Salve has joined #ruby
Hobogrammer has quit [Ping timeout: 246 seconds]
mansi_ has quit [Ping timeout: 252 seconds]
diegovio1 has joined #ruby
diegovio1 is now known as diegoviola
SHyx0rmZ has joined #ruby
flak has joined #ruby
e^0 has joined #ruby
flak is now known as Guest54397
rippa has quit [Ping timeout: 248 seconds]
sergicles_ has joined #ruby
sergicles has quit [Ping timeout: 245 seconds]
sergicles_ is now known as sergicles
sparrovv has joined #ruby
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zigomir has joined #ruby
Hanmac1 has joined #ruby
lkba has quit [Ping timeout: 252 seconds]
OdNairy has joined #ruby
<agent_shevy>
ok time to uncloak
agent_shevy is now known as shevy
Hanmac has quit [Ping timeout: 260 seconds]
<pipework>
more like disrobe
sree has joined #ruby
spider-mario has joined #ruby
OdNairy has quit [Client Quit]
thomasxie has quit [Ping timeout: 272 seconds]
penzur has joined #ruby
heftig has joined #ruby
Hiall has joined #ruby
OdNairy has joined #ruby
jlebrech has joined #ruby
tungd has quit [Quit: leaving]
tungd has joined #ruby
jlebrech has quit [Read error: Connection reset by peer]
Salve has quit [Ping timeout: 245 seconds]
jlebrech has joined #ruby
jlebrech has quit [Read error: Connection reset by peer]
<shevy>
pipework disrobe now man!
jlebrech has joined #ruby
sree has quit []
jlebrech has quit [Read error: Connection reset by peer]
burlyscudd has joined #ruby
OdNairy has quit [Ping timeout: 260 seconds]
jlebrech has joined #ruby
jlebrech has quit [Read error: Connection reset by peer]
<agent_white>
- the Coors. Who drinks that piss. :P
<agent_white>
g'night
agent_white has left #ruby [#ruby]
burlyscudd has quit [Ping timeout: 272 seconds]
zigomir has quit [Remote host closed the connection]
Kruppe has quit [Ping timeout: 265 seconds]
Morrolan has quit [Ping timeout: 265 seconds]
Kruppe has joined #ruby
Morrolan has joined #ruby
kevinykchan has joined #ruby
alex88 has joined #ruby
stonevil_ has joined #ruby
sepp2k has joined #ruby
diegoviola has quit [Quit: WeeChat 0.4.3]
thomasxie has joined #ruby
<pyk>
in my current time it's was 17:00 , so to speak, good evening too everyone :D
havv has joined #ruby
stonevil_ has quit [Ping timeout: 245 seconds]
Shidash has quit [Ping timeout: 248 seconds]
zigomir has joined #ruby
pyk has left #ruby [#ruby]
tvw has joined #ruby
eka has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
Salve has joined #ruby
lethjakman has quit [Ping timeout: 272 seconds]
carraroj has joined #ruby
koell has joined #ruby
Andrevan has joined #ruby
kirun has joined #ruby
ktosiek has quit [Ping timeout: 260 seconds]
ktosiek has joined #ruby
mansi_ has joined #ruby
gja has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
fgo has joined #ruby
kotk has joined #ruby
mansi_ has quit [Ping timeout: 260 seconds]
penzur has quit [Quit: WeeChat 0.4.2]
razibog has joined #ruby
timonv has joined #ruby
ephemerian has joined #ruby
zigomir has quit [Read error: Connection reset by peer]
mojjojo has joined #ruby
zigomir has joined #ruby
senayar has quit [Remote host closed the connection]
timonv has quit [Ping timeout: 246 seconds]
<shevy>
hmm
<certainty>
hmm!
slowcon has joined #ruby
Davey has joined #ruby
lxsameer_ is now known as lxsameer
timonv has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
Guest35214 is now known as RoR-admin
<shevy>
on github you can create projects with the same name as other users
<shevy>
on rubygems you can not
RoR-admin is now known as Guest35214
VTLob has joined #ruby
alexherbo2 has joined #ruby
danijoo_ has joined #ruby
danijoo has quit [Read error: Connection reset by peer]
<shevy>
so some of my gems have the same names as other projects have
ultraflash3 has joined #ruby
pinage404 has quit [Excess Flood]
OdNairy has joined #ruby
burlyscudd has joined #ruby
slowcon has quit [Quit: slowcon]
<certainty>
shevy: doesn't that make sense? on github all projects are scoped under the user
<shevy>
certainty yeah
<certainty>
that's not the case for rubygems
hamakn_ has quit [Ping timeout: 272 seconds]
<shevy>
right
<certainty>
i might be missing the point
pinage404 has joined #ruby
burlyscudd has quit [Ping timeout: 246 seconds]
zigomir has quit [Remote host closed the connection]
fgo has quit [Remote host closed the connection]
<shevy>
no
<shevy>
you got the point
<shevy>
the model github uses is superior
<shevy>
the only difference is that github does not have a "global" scope (grouping) of projects like rubygems
<certainty>
true
lkba has joined #ruby
zigomir has joined #ruby
dangerousdave has joined #ruby
platzhirsch has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nisstyre has quit [Ping timeout: 248 seconds]
kitak_ has joined #ruby
senayar has joined #ruby
oso96_2000 is now known as oso|away
nichtdiebohne has joined #ruby
Czupa has joined #ruby
nichtdiebohne has quit [Client Quit]
Andrevan has quit [Quit: WeeChat 0.4.2-rc1]
koell has quit [Quit: So say we all!]
senayar has quit [Ping timeout: 246 seconds]
senayar has joined #ruby
tharindu has joined #ruby
danshultz has joined #ruby
vlad_starkov has joined #ruby
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
blackmesa has quit [Ping timeout: 240 seconds]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
postmodern has joined #ruby
tharindu has quit [Ping timeout: 260 seconds]
klaut has joined #ruby
poulson has joined #ruby
AlexRussia has joined #ruby
vlad_starkov has quit [Ping timeout: 272 seconds]
zigomir has quit [Remote host closed the connection]
marcdel has quit []
zigomir has joined #ruby
evilbug has quit [Quit: Leaving]
Czupa has quit [Remote host closed the connection]
ktosiek has quit [Read error: No route to host]
ktosiek has joined #ruby
mansi_ has joined #ruby
<shevy>
I am a little bored
mehlah has joined #ruby
marr has joined #ruby
<shevy>
anyway wanna say on which ruby project he worked with lately?
tharindu has joined #ruby
mojjojo has quit [Quit: mojjojo]
zigomir has quit [Ping timeout: 260 seconds]
mojjojo has joined #ruby
nuck has quit [Read error: Connection reset by peer]
mansi_ has quit [Ping timeout: 248 seconds]
<certainty>
tooling to expose a hosting interface an our servers. It's the backend that is used when customers configure their products in the user interface for their dedicated servers
<certainty>
also we implemented a binding to the realtime interface of the german nic denic
sensen has quit [Ping timeout: 260 seconds]
gnephiak has joined #ruby
<shevy>
hmm I don't think I understood it quite yet
<certainty>
which part?
<shevy>
the first sentence :-)
<shevy>
ah
<shevy>
the customers have a way to configure the thing through an user interface of some kind
<shevy>
but that is not in ruby or?
<certainty>
shevy: exactly
<certainty>
it's ruby
<shevy>
oh
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
stonevil__ has joined #ruby
<certainty>
shevy: so what's your latest project?
Monk_code has joined #ruby
<shevy>
dunno really, work consumes me. I have to build taxonomy related stuff (using postgresql, working on web interface to it) on a stupid windows machine (but I can use putty). even in my free time right now I kinda do some more research related to that.... in 2 weeks that is over thankfully
dangerousdave has joined #ruby
PLejeck has joined #ruby
<certainty>
what kind of taxonomy?
<certainty>
(doesn't sound so bad, if you ignore the windows detail)
Monk_code has quit [Remote host closed the connection]
<certainty>
i hear developing ruby on windows is a major pain
browndawg has joined #ruby
browndawg has quit [Client Quit]
<shevy>
certainty well normal biological taxonomy... datasets from bacteria, and other eukaryotic species like mouse... fruitfly and so forth
francisfish has joined #ruby
<shevy>
the dataset is so huge which makes everything kinda annoying, or I am just incompetent... reading in 200MB files from a .sql file into postgre takes quite a long while
<shevy>
the only good thing on windows is that I can use ruby, otherwise I'd quit right away now
<certainty>
is that a university job?
Deele has joined #ruby
blackmesa has joined #ruby
DariusPHP has joined #ruby
<shevy>
semi-related, the overall campus area is shared between different companies and (2) different universities. I work in one of the companies there
<jxport>
wtf
<jxport>
I didn't even realise ruby had a 'for'
<jxport>
Should it ever be used, or permanently shunned?
<certainty>
shevy: i see. wrt to postgres performance. I guess you already did the obvious, like using copy and disabling index and such?
yfeldblum has joined #ruby
no0code has joined #ruby
kirun has quit [Ping timeout: 272 seconds]
slowcon has joined #ruby
Karkizz has joined #ruby
zoscoy has joined #ruby
zoscoy has quit [Client Quit]
<certainty>
jxport: why not? i don't know if it's idiomatic though. I guess most rubyists would just use .each or specialized operations on the collection
<certainty>
i've not seen for much in real code
yfeldblum has quit [Ping timeout: 252 seconds]
<shevy>
jxport for is not very elegant, I avoid it when possible
<shevy>
certainty hmm did not yet try that, I am a database noob. but I will give this a try the coming week
burlyscudd has joined #ruby
_Andres has quit [Read error: Connection reset by peer]
DariusPHP has quit [Quit: Leaving]
pushpak has joined #ruby
burlyscudd has quit [Ping timeout: 245 seconds]
<jxport>
shevy: 'for' leaking the variable's final value outside of the iteration scope seems sloppy too
<jxport>
shevy: perhaps when that is necessary is the real usecase of 'for'
<shevy>
hmm
<shevy>
for is leaky?
razibog has quit [Ping timeout: 252 seconds]
p8952 has joined #ruby
AlecTaylor has joined #ruby
<AlecTaylor>
hi
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
<certainty>
hi
<AlecTaylor>
What's the output of your ruby --version?
<certainty>
depends
* AlecTaylor
just wants the syntax
<shevy>
>> for i in 0..5; puts "Value of local variable is #{i}"; end; i
<shevy>
platzhirsch well I dont like to use both variants, it confuses my brain
<platzhirsch>
I used both, glob and [], didn't felt different. Maybe you should make some statistics through the GitHub API
<shevy>
do you use array.map and array.collect
<platzhirsch>
that would be a nice tool, The Ruby Idiom Decider, runs fights between two Ruby idioms
<platzhirsch>
map
<shevy>
why dont you use .collect more often
<shevy>
I also use map by the way
deadlock has joined #ruby
<shevy>
Dir.glob vs Dir[] ... 5 mandatory chars vs 2 chars
<platzhirsch>
Because map is the function name also known in functional programming languages -> Haskell
<certainty>
shevy: i use .map it's known in other languages
<shevy>
yeah, I think map is more common in general. I remember map from LPC too
vlad_starkov has quit [Read error: Connection reset by peer]
Al_____ has joined #ruby
<certainty>
also map clearly says what it does
<certainty>
mapping values
<certainty>
or a function over values rather
MindfulMonk has joined #ruby
<certainty>
ok the word values can be misleading since most ruby-objects aren't really values as known in the functional world
MindfulMonk has quit [Remote host closed the connection]
MindfulMonk has joined #ruby
top4o has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
tungd has quit [Read error: No route to host]
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
mansi_ has quit [Ping timeout: 272 seconds]
<shevy>
guys, this keeps on coming back to me, I Just want to make sure
tala12 has joined #ruby
<shevy>
given a project called 'foo', and a separate module
<shevy>
is this the same:
<shevy>
require 'foo; module Bla; end
<shevy>
vs
<shevy>
module Bla; require 'foo; end
<shevy>
I have some old projects where I have require inside modules, I dunno why I did that, so I am considering moving all requires on top of the files
browndawg has quit [Ping timeout: 260 seconds]
Hanmac has joined #ruby
Hanmac1 has quit [Ping timeout: 260 seconds]
mehlah has joined #ruby
mehlah has quit [Client Quit]
Guest54397 has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
kirun has joined #ruby
tala12 has quit []
<pontiki>
o/
yfeldblum has joined #ruby
Monk_code has joined #ruby
prc has joined #ruby
vermele has joined #ruby
burlyscudd has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
<shevy>
hey pontikers
phansch has quit [Quit: Leaving]
burlyscudd has quit [Ping timeout: 245 seconds]
sh1nji has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
platzhirsch has quit [Ping timeout: 252 seconds]
tharindu_ has joined #ruby
tkuchiki has joined #ruby
Solnse has quit [Remote host closed the connection]
tharindu has quit [Ping timeout: 272 seconds]
ixti has joined #ruby
tkuchiki has quit [Remote host closed the connection]
blackmesa has quit [Quit: WeeChat 0.4.2]
elaptics is now known as elaptics`away
kotk1 has joined #ruby
Davey has quit [Quit: Computer has gone to sleep.]
kotk has quit [Ping timeout: 246 seconds]
Fire-Dragon-DoL has quit [Quit: Leaving.]
deadlock has quit [Read error: Connection reset by peer]
timonv has quit [Remote host closed the connection]
ixti has quit [Ping timeout: 260 seconds]
alex88 has quit [Quit: Leaving...]
alex88 has joined #ruby
joelbrewer has joined #ruby
angerman has joined #ruby
tonni has quit [Ping timeout: 252 seconds]
<angerman>
I have the cocoapods gem installed, but I'd like to debug and fix an issue, so I cloned the cocoapods repo, what do I need to make sure, so that the installed gem does not interfere with the code I'm trying to alter?
Davey_ has joined #ruby
ixti has joined #ruby
yasushi has joined #ruby
Slavox is now known as Slavox|AFK
bricker`LA has quit [Ping timeout: 246 seconds]
<shevy>
do you guys prefer
<shevy>
if ! bla
<shevy>
vs
<shevy>
unless bla
<shevy>
angerman can't you just install your local test gem?
<certainty>
shevy: unless bla, but it depends
WormDrink has quit [Ping timeout: 265 seconds]
<certainty>
if there is an else
<certainty>
i never use unless
<shevy>
angerman you can also modify the .rb file directly
<shevy>
hmm
Al_____ has quit [Quit: Al_____]
<angerman>
shevy: hm... can I have a development environment with just the dev code?
<certainty>
also i don't know why i've split that across two line p
Mapley has joined #ruby
<shevy>
angerman well when you have the .gemspec, you can always build a gem, then install that gem.
<shevy>
angerman or you directly open the .rb file on your HDD
<shevy>
require 'pp'; x = 'string'; x = [1,2,3,4] if 5 > 4; puts 'DEBUGGING!'; pp x
soulisson has joined #ruby
<shevy>
angerman another idea - append '-debug' to the gem, and install that and test it
<shevy>
in the .gemspec file the entry would be: s.name = 'foo-debug'
<shevy>
to create a .gem file, one can do: 'gem build *.gemspec'
mansi has joined #ruby
ahawkins has joined #ruby
Ariadeno has joined #ruby
alx- has joined #ruby
<shevy>
File.stat("testfile").ino
<shevy>
what do you guys think would this ^^^ do
<certainty>
shevy: get the inode of the file
<shevy>
yeah
monkegjinni has quit [Ping timeout: 272 seconds]
<certainty>
shevy: does that even work on windows?
mansi has quit [Ping timeout: 252 seconds]
<soulisson>
Hi, i'm beginning OOP and often i have troubles knowing what class should implement what method
monkegjinni has joined #ruby
tungd has joined #ruby
<soulisson>
do you have some advice about that ?
soulisson has left #ruby ["Quitte"]
soulisson has joined #ruby
<shevy>
certainty not sure, can not test unless at work, but thankfully I can use putty and connect to the central server, and there every unixy thing works
<certainty>
alright
Davey_ is now known as Davey
<shevy>
soulisson well the first question is why you want to make methods
shabgard has quit [Quit: Aji maji la taraji]
<shevy>
as for what methods a class should have, usually it should have methods that make sense pertaining to the job that class has
<shevy>
like: class Remove
<soulisson>
Let's say i have Email Class should i implement the send method in this class or should i for instance have an another class like SMTPServer
<shevy>
we could assume that such a class may do remove-related activities
angerman has quit [Quit: Gone]
<shevy>
_ = Remove.new '/home'
<shevy>
_.nuke!
<shevy>
"Oh noes, now removing /home ..."
<shevy>
that's a bad name for a method but you get the idea
<shevy>
well
<certainty>
soulisson: probably not. You might have another class that knows how to deliver a Mail. Also you might be careful about naming a method #send
RSTJNII has quit [Remote host closed the connection]
<shevy>
.send is a problematic name
RSTJNII has joined #ruby
<soulisson>
certainty, ok, that's what i tought, i should have an SMTPServer class or something like it to deliver a Mail object
<certainty>
soulisson: more like a client, but yes that's the idea
<certainty>
soulisson: i was assuming Email would only deal with the representation of an Email
<soulisson>
certainty, that make sense, a ClientMail should be able to send Email, an Email shouldn't be able to send itself
<soulisson>
certainty, thank you
dekz__ has quit [Ping timeout: 265 seconds]
<certainty>
soulisson: correct, in my IMHO an Email shouldn't care about the delivery
kapowaz has quit [Ping timeout: 265 seconds]
ItSANgo_ has quit [Quit: Leaving...]
<certainty>
erm, -i in my
dekz__ has joined #ruby
Dwarf has quit [Ping timeout: 265 seconds]
kapowaz has joined #ruby
monkegjinni has quit [Remote host closed the connection]
monkegjinni has joined #ruby
Dwarf has joined #ruby
fgo has joined #ruby
yfeldblum has joined #ruby
dangerousdave has joined #ruby
monkegjinni has quit [Ping timeout: 272 seconds]
ItSANgo has joined #ruby
Salve has quit [Remote host closed the connection]
Salve has joined #ruby
angerman has joined #ruby
burlyscudd has joined #ruby
yfeldblum has quit [Ping timeout: 260 seconds]
danijoo_ has quit [Quit: Leaving...]
jle` has quit [Ping timeout: 260 seconds]
postmodern has quit [Quit: Leaving]
no0code has quit [Ping timeout: 260 seconds]
jsilver_ has joined #ruby
jsilver has quit [Read error: Connection reset by peer]
burlyscudd has quit [Ping timeout: 248 seconds]
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pu22l3r has joined #ruby
agjacome has joined #ruby
platzhirsch has joined #ruby
angerman has quit [Quit: Gone]
raphaelivan has joined #ruby
asmodlol has joined #ruby
carraroj has quit [Read error: Connection reset by peer]
carraroj has joined #ruby
dangerousdave has quit [Quit: My Mac Pro has gone to sleep. ZZZzzz…]
timonv has quit [Remote host closed the connection]
<certainty>
oh actually the lambda version does interfere with variables that have already been defined. It just doesn't create them visible to the outside if they haven't. Does that make sense? My english is off
<AntelopeSalad>
sounds like you're describing a closure
<certainty>
AntelopeSalad: yeah you're right. That's what happens when i has been defined before
wallerdev has joined #ruby
JasmeetQA has quit [Read error: Connection reset by peer]
<certainty>
>> ->{ for i in (1..2); end; }.call; i
<eval-in>
certainty => undefined local variable or method `i' for main:Object (NameError) ... (https://eval.in/101921)
<certainty>
better
maroloccio has quit [Quit: WeeChat 0.4.2]
pravinmishra876 has quit [Quit: irc2go]
<AntelopeSalad>
i almost forgot how long ruby takes to compile hah
soulisson has quit [Ping timeout: 252 seconds]
<Spitfire>
is dat a joke
soulisson has joined #ruby
sergicles has quit [Quit: sergicles]
_Andres has quit [Ping timeout: 248 seconds]
maroloccio has joined #ruby
tanema has joined #ruby
<platzhirsch>
well there certainly are Ruby compilers :P
<AntelopeSalad>
i'm switching over to chruby from rbenv
jonr22 has joined #ruby
<AntelopeSalad>
so i decided to blow out rbenv and just recompile ruby from scratch
tkuchiki has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
zigomir has quit [Remote host closed the connection]
_Andres has joined #ruby
Guest35214 has quit [Ping timeout: 245 seconds]
<platzhirsch>
ah you are compiling the source code, sweet
marr has quit [Ping timeout: 260 seconds]
<platzhirsch>
very vintage, are you a hipster?
<AntelopeSalad>
no? it does it by itself when you run the ruby install command
banister has joined #ruby
marr has joined #ruby
tanema has quit [Ping timeout: 252 seconds]
tgkokk has joined #ruby
marr has quit [Client Quit]
zigomir has joined #ruby
carraroj has joined #ruby
carraroj has quit [Client Quit]
<platzhirsch>
alright
sergicles has joined #ruby
GinoMan has joined #ruby
WormDrink has joined #ruby
WormDrink has quit [Changing host]
WormDrink has joined #ruby
estebistec has joined #ruby
joelbrewer has quit [Ping timeout: 260 seconds]
vlad_starkov has joined #ruby
<AntelopeSalad>
i still can't believe this same editor issue happens with chruby
pfg has joined #ruby
mark_locklear has quit [Ping timeout: 260 seconds]
tanema has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
tgkokk has quit [Quit: tgkokk]
mityaz has joined #ruby
aef has joined #ruby
tgkokk has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<certainty>
AntelopeSalad: which issue?
mansi has joined #ruby
<AntelopeSalad>
certainty: if you try to run a command like: system 'rails -v' as a test you will get all sorts of system errors if you run the test through an editor like sublime using the rubytest plugin or rubymine
jhass|off is now known as jhass
* Hanmac
point and laugh about rails
<AntelopeSalad>
but if you run the test directly in the console it works -- however the crazy part is the command to run the test is identical
stef_204 has joined #ruby
<AntelopeSalad>
Hanmac: replace rails with any gem that you installed with gem install and happens to be a binary
yarou has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Hanmac>
then it seems chruby or rubyenv or what ever you use is not correct configured ... (and i cant help you with that)
mansi has quit [Ping timeout: 260 seconds]
<AntelopeSalad>
it's configured exactly how the readme of chruby states
<AntelopeSalad>
it's not really hard to mess up copy/pasting 3 commands
MyStartx has quit [Ping timeout: 245 seconds]
meatherly has joined #ruby
<AntelopeSalad>
and it works great outside of the context of running tests from within multiple editors that happen to support test running shortcuts
<Hanmac>
AntelopeSalad: then does system 'ruby -v' works ?
jetblack has quit [Remote host closed the connection]
<AntelopeSalad>
outside of those editors and in the terminal? yes absolutely
<Hanmac>
nono i mean at the place where you use the "rails -v"
joelbrewer has joined #ruby
aef has quit [Remote host closed the connection]
aef has joined #ruby
yasushi has quit [Remote host closed the connection]
<AntelopeSalad>
Hanmac: only outside of the editor
<AntelopeSalad>
in the terminal? test passes , the app itself tested directly? it works , running the test through sublime or rubymine? fail
Guest69296 has quit [Quit: Leaving]
joelbrewer has quit [Ping timeout: 260 seconds]
<Hanmac1>
i dont know capture_subprocess_io ... is it a minitest thing? i dont know if its works with system as you want ... i think the MAIN problem is that PATH
<Hanmac1>
specialy the CURRENT DIR because '../../bin/foo version' is relative to the CURRENT DIR, not the FILE
Hanmac1 is now known as Hanmac
<AntelopeSalad>
Hanmac1: it's a minitest thing to capture the output of a subshell -- if i put something like system 'rails -v' it works (the out variable is filled with the output of running rails -v)
kayloos has quit [Remote host closed the connection]
<AntelopeSalad>
Hanmac: that's interesting...
ghr has joined #ruby
<AntelopeSalad>
Hanmac: when i run the test in the terminal i've been directly inside of my test/integration/ directory which is where foo_test.rb resides
<Hanmac>
thats excactly what i sayid
<AntelopeSalad>
when i run it through sublime, rubytest (the sublime plugin) runs this command: ruby -Itest test/integration/foo_test.rb -n 'test_my_binary'
xxpor_ has quit [Read error: Connection reset by peer]
<AntelopeSalad>
if i run that exact command in the terminal it also fails with the identical error as sublime
yfeldblum has joined #ruby
<AntelopeSalad>
Hanmac: you're my hero
<AntelopeSalad>
now the fun question is how can i inject that binary path into the LOAD_PATH so i can just have bin/foo as my path and it works everywhere?
habanany has joined #ruby
<AntelopeSalad>
or ideally ./foo (to ensure i run the local copy of the gem instead of the one installed on the system)
<certainty>
AntelopeSalad: likely an environment issue
<certainty>
AntelopeSalad: have you tried bash -l -c 'rails -v'?
mansi has joined #ruby
<AntelopeSalad>
certainty: Hanmac's comment about the bin path confirms it was a path issue
<certainty>
AntelopeSalad: oh sorry, missed that part. Then you already found it :)
<AntelopeSalad>
yeah but i'm not sure how to fix it tho haha
<AntelopeSalad>
Hanmac: that's always going to be the absolute path of the method that calls it right?
tgkokk has joined #ruby
<certainty>
so sublime is the hot new kid on the block?
vlad_starkov has quit [Ping timeout: 252 seconds]
<AntelopeSalad>
i wouldn't say new hot kid haha, but it's the only editor i've found that lets you run ruby tests in nice way
<Hanmac>
certainty: more like the little bastard that wants attention ;P
bpuzzled has joined #ruby
silicong has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tharindu has quit [Ping timeout: 272 seconds]
<certainty>
Hanmac: hah!
<AntelopeSalad>
i like being able to hit a hot key and run the test under my cursor, it lets me do that
<AntelopeSalad>
or a different hotkey to run all tests in the current file
<ddd>
i tried sublime / sublime 2. I'll stick with (g)vim under linux and textmate under OSX.
<certainty>
AntelopeSalad: i see, but i somehow can't believe that this is impossible in vi or emacs
IceDragon has joined #ruby
Hobogrammer has joined #ruby
<AntelopeSalad>
it's very possible you can get it to work with vi or emacs, but is it going to be as simple as installing a package and having it just work instantly?
<certainty>
AntelopeSalad: dunno. I don't have a need for that. I use guard to only run tests selectively, running all tests is easy in emacs, possibly there even is a binding to run a single test
<certainty>
ddd: nope, i'm not a vim user. But i guess we found a way to do it in vi :)
<ddd>
hehe
<Hanmac>
ib needed an recent IDE that support more than one language ... (and can point me between defination and declaretion from C(++) methods)
<shevy>
ack
<shevy>
emacs
<AntelopeSalad>
certainty: selectively as in the active method your cursor is on?
<certainty>
skipping editors is not an option for me. emacs is hard-wired in my brain
<shevy>
yeah that is my problem with vi and emacs
<shevy>
they infiltrate the brain
<certainty>
AntelopeSalad: more like the test under point or something
<ddd>
i tried seriously hard to like emacs. Tried so many times over the last oh 10 years or so. I just can't 'get into it'
RoxasShadowRS has quit [Read error: Connection reset by peer]
<certainty>
yeah, i understand
<AntelopeSalad>
certainty: point? hmm
<AntelopeSalad>
the mouse pointer? heh
<AntelopeSalad>
or do you mean a predefined method that you setup in guard?
stonevil__ has quit [Quit: Computer has gone to sleep.]
<certainty>
i use vi for most of my admin tasks since every server in our datacenter has vi, but for all other things it's emacs
<certainty>
AntelopeSalad: the point is the carret
<AntelopeSalad>
oh
<AntelopeSalad>
yeah same thing then
<certainty>
emacs terminolgy sorry
<AntelopeSalad>
the blinking cursor
<certainty>
yeah :)
mercwithamouth has joined #ruby
<AntelopeSalad>
yeah that is what rubytest does with sublime
<ddd>
i won't knock it as an editor. i've seen how powerful it is first hand (well watching others use it and there's just so many plugins and the like for it.) but for my own personal workflow i just can't seem to get into it. I always seem to come back to vim and RubyMine (when I want an IDE) both of which I barely scratch the surface of their capabilities.
<certainty>
ddd: imho it's not worth fighting it IMHO. I for example like the logic behind VI's keys
<certainty>
-imho
habanany has quit [Ping timeout: 260 seconds]
<certainty>
still i wouldn't want to program in VI
<AntelopeSalad>
would i need to do ,_ to ignore anything after the first space?
<ddd>
i learn what i need on the fly with most things. only as i run into the need to learn them. i don't usually go out of my way to learn stuff (meaning I don't sit down and say OK, today is vim tutorial day and I'm going to learn all I can)
tanema has quit [Remote host closed the connection]
<certainty>
ddd: oh you should do it. Not all that you can but for example a set of things.
MyStartx has joined #ruby
St_Marx has joined #ruby
<ddd>
yeah, i probably should. I use maybe 1/10th of the editor's capabilities including all my plugins.
<certainty>
ddd: so you take a set of bindings for example that you want to learn and put it on a card. Then put it on your desk and use it during work until you're confident that you've memorized
Hobogrammer has quit [Ping timeout: 248 seconds]
huhze has left #ruby [#ruby]
Aryasam has joined #ruby
<ddd>
hey that's an idea!
<ddd>
gotta love simple ideas that never cross your mind hehe
cmoylan has joined #ruby
<certainty>
concentrate on the things you do the most. These are naturally the things you want to do fast
sassamo has quit [Read error: Connection reset by peer]
estebistec has quit [Remote host closed the connection]
<ddd>
right
sassamo has joined #ruby
<AntelopeSalad>
i started using cards a few months ago, they really help
<ddd>
i have been meaning to go back and backfill tests that i *should* have been writing from the beginning. So I think I'll start there
<ddd>
physical cards or a card program?
<certainty>
ddd: i like physical cards
<shevy>
cards?
<AntelopeSalad>
physical cards that i have scattered around my desk so they are an eye's glance away
<ddd>
(like I could put electric cards on my phone next to me)
<AntelopeSalad>
then instead of having to google some command that i forgot, i move my eyes a bit and read the card
<AntelopeSalad>
until eventually i memorize it
<ddd>
i've a bunch in my dresser that I use for college. I'll grab a handful for this. thanks for the idea. don't know why something that simple didn't dawn on me
<AntelopeSalad>
having to stop programming, open google, google for the command, find that one article you want that has it, ... that takes so long compared to darting your eyes over a foot
saltsa has joined #ruby
<ddd>
i'm using a hubot but the language eval plugin just plain out doesn't work
<ddd>
antelopesalad exactly
koell has quit [Ping timeout: 260 seconds]
<AntelopeSalad>
Hanmac: you're full of good insight today
<ddd>
i think i spend more time researching than I do doing, and it heavily impacts how much work i can get done
RoxasShadowRS has joined #ruby
<ddd>
i mean i'm good with ruby, getting good with rails, but there's just so damned much to learn in both ruby and the rails framework, i hate fighting my editor at the same time
<platzhirsch>
ddd: That's part of the process, keep on hustling
<certainty>
heh, time to get good with your editor
jonr22 has quit [Remote host closed the connection]
jonr22 has joined #ruby
havenwood has joined #ruby
Spleeze has quit [Quit: QUIT]
<ddd>
platzhirsch i will. just feels like i should be a lot further along than i am. so trying to identify where i'm lacking in my workflow so I can bone up on those aspects. I love coding, whether I'm any good or not is immaterial to me. I'll get good over the years to come, i just want to streamline a bit more
pedda has joined #ruby
<certainty>
the longer i code the more i learn how bad i am at it
Cache_Money has joined #ruby
<certainty>
i must be doing something wrong
<platzhirsch>
ddd: Well, I guess this comes down to choosing priorities and how to breakdown your project into tasks
<certainty>
so time may not be the only factor :)
<AntelopeSalad>
the problem i have with any editor is none of them do everything i want
<platzhirsch>
certainty: no, that's also a typical observation
stonevil__ has joined #ruby
<AntelopeSalad>
it's always X does 5 things great but without foobar feature it really makes it unusable , or Y only does 1 thing great but it's missing those 5 other good features
tgkokk has quit [Remote host closed the connection]
<ddd>
platzhirsch yeah. i think i originally broke down the priorities right, but chose the wrong implementation sequence.
tgkokk has joined #ruby
<certainty>
AntelopeSalad: i find that there are only a few features that are really essential.
<platzhirsch>
Projects can never be approached in an optimal way where you do most of it correctly. If that would be the case, than it wouldn't be a project
mojjojo has joined #ruby
<platzhirsch>
then
<ddd>
i've never worked professionally as a coder. I am a professional admin. i can do that in my sleep. my goal is to get as good at coding as i am system administration. but i had to stop and think, i didn't learn to be one overnight.,
tgkokk has quit [Client Quit]
<ddd>
just time needed i guess
<AntelopeSalad>
certainty: running tests efficiently, being able to refactor quickly, editor runs very fast, multiple cursors very easy, flawlessly split panel abilities, excellent syntax highlighting and "as good as you can hope for" code complete
S0da has quit [Remote host closed the connection]
<AntelopeSalad>
those are my demands for an editor
<havenwood>
I like being able to eval code in the text editor.
<ddd>
i google and research like crazy, read tons of ebooks and stuff. but everytime i settle on something (like take a page from Agile, or from testing), there's always several people that tell me i'm doing it wrong, i should be using XYZ over ABC, so I look into ABC and end up wasting tons of time flipflopping between stuff
<ddd>
aggravating
<AntelopeSalad>
and code complete includes both snippets so you can do things like "def foo[hit tab]" and it expands to "def foo; end" but also being able to pickup on what's on your path and help you out like showing all of string's methods when you "foo".
<ddd>
havenwood ahh so eval-in is an irc bot with customized backend api integration code? or is it offered as a package?
<certainty>
AntelopeSalad: i find multiple cursors confusing. The rest is something i like as well. There are other things though like the ability to work on a structural level
Czupa has joined #ruby
<certainty>
also it should be easy to add features it doesn't currently have
<certainty>
and it must be free software
<AntelopeSalad>
certainty: i use multiple cursors for things like find/replace -- it's great for single file simple refactorings -- like rename a variable or method
<ddd>
antelopesalad i might have mine misconfigured. idk. but ctags is supposed to give that to you on vim projects but it A) is definitely NOT intellisense-like, and B) seems to only do the current file
<havenwood>
ddd: I don't know the bot charliesome uses, but yeah eval.in backend.
klaut has quit [Remote host closed the connection]
hello_world has joined #ruby
<certainty>
AntelopeSalad: yeah i do find/replace in this case
<ddd>
havenwood better than repl.it?
<AntelopeSalad>
with sublime you just highlight something and hit ALT+F3 and it instantly highlights every occurrance of the thing and puts cursors there so you can just type and replace them all
<AntelopeSalad>
with no windows or anything annoying
<havenwood>
I like the in-editor Ruby eval in TextMate and LightTable. Though Avdi has it setup nicely to do that in emacs.
<certainty>
havenwood: is LightTable stable yet?
<ddd>
hehe i've seen so many cool setups in the confreaks vids and stuff like that
<havenwood>
ddd: Yes, for sure. Can choose from multiple Ruby versions (more than listed even).
<ddd>
nice!
<ddd>
thanks for the info
<certainty>
yeah it's easy to send code to inferior ruby in emacs
<havenwood>
certainty: I think relatively so. And importantly GPL now!!
<havenwood>
TextMate and LightTable are both GPL. \o/
aspiers has quit [Ping timeout: 272 seconds]
<AntelopeSalad>
certainty: i have yet to find a single editor that meets those demands
<ddd>
i miss textmate
<certainty>
havenwood: nice, i've been looking at it a while back. It looked nice for clojure
<ddd>
i used a LOT of ryan bates's setup and finally got good enough with it i could jump right in and work. then my wife's pugs pissed on my MBP when she put it down on the floor (after I told her not to) and lost my $4000 rig. (friggin dogs) which means I lost my setup too.
<certainty>
havenwood: cool. it definitely has some nice ideas. only problem being the Emacs in my head :) can't get it out
<AntelopeSalad>
but rubymine just feels too clunky and slow for me, also i couldn't find a test work flow that i liked (too many key presses and popup menus)
<ddd>
pita to try to set up other editors to mimic that workflow
<havenwood>
certainty: mmm
<AntelopeSalad>
certainty: you said you use guard for testing under your caret, but it's emacs that's providing the caret functionality right?
<ddd>
antelopesalad yeah I have both an opensource and paid license for rubymine. but it definitely feels clunky, slow, and unnatural
tgkokk has joined #ruby
<AntelopeSalad>
ddd: did you find running tests with it awful?
<ddd>
antelopesalad oh yeah
<certainty>
AntelopeSalad: nope i use guard to run tests selectively. And there might be a binding in emacs that allows me to run the test under point
habanany has joined #ruby
zachallett has joined #ruby
<AntelopeSalad>
certainty: oh
<AntelopeSalad>
ddd: the slowless can probably be solved by not using it inside of a 1 gig VM on an old computer but i can't get past the poor test flow, i would have to use a totally diff tool
<AntelopeSalad>
*slowness
alx- has joined #ruby
alx- has quit [Client Quit]
<AntelopeSalad>
certainty: does guard just them in the background when you save the test file?
<AntelopeSalad>
i might look into that, if you just park a terminal somewhere to read the output that seems pretty good
pushpak has quit [Ping timeout: 260 seconds]
tgkokk has quit [Remote host closed the connection]
zachallett has quit [Remote host closed the connection]
<certainty>
AntelopeSalad: yeah i have a terminal running guard. It watches your files and runs the tests if they change. It's smart enough to run only the tests that are needed. Also this can be configured
carraroj has quit [Ping timeout: 260 seconds]
<ddd>
wish it was smart enough to run just the test you were currently working on rather than *all* failed tests
rootshift has quit [Quit: My MacBook has decided to go to sleep. Zzzz..]
<certainty>
i usually have a bunch of tmux windows open anyway
mark_locklear has joined #ruby
<AntelopeSalad>
i used tmux for a bit, pretty neat util
<ddd>
i run guard, edit a test in the editor and save it which kicks off guard, but rather than just running that one singular test, it runs all failed tests (so I can't work on just a single test and get THAT test's failure info) which drives me bananas
tkuchiki has quit [Remote host closed the connection]
<AntelopeSalad>
ddd: you can get that with rubytest using sublime, but it doesn't use guard, it uses its own thing
<ddd>
I use tmuxinator+tmux and set up windows and panes for like logs, running a rails server, editor and pry in one window with dual panes. stuff like that
<certainty>
ddd: use tags to mark tests that are work in progress
<ddd>
@wip you mean?
<certainty>
ddd: i use tmuxinator as well
<ddd>
love that gem :)
<certainty>
ddd: yep like @wip
<ddd>
ok cool
<certainty>
it "is interesting", wip: true { ... }
<certainty>
than configure to run tests marked as that. Rspec has a configuration for that
<ddd>
guard will respect that and only run *that* test?
<ddd>
oh i can do that with rspec without guard, its guard that seems to rerun all the failed tests
timonv has joined #ruby
<certainty>
ddd: it's not guard, it's rspec that does it :)
<ddd>
I can even do rspec spec/requests/this_feathre_spec.rb:L#
<certainty>
yeah
<AntelopeSalad>
i wonder if minitest has something similar
<certainty>
ddd: oh sorry that i misunderstood you
<ddd>
certainty np
tgkokk has joined #ruby
<ddd>
so many items involved its easy to get lost
GinoMan has quit [Ping timeout: 260 seconds]
<ddd>
where does one end and the other begin, etc hehe
Cache_Money has quit [Quit: Cache_Money]
phansch has quit [Quit: Leaving]
meatherl_ has joined #ruby
GinoMan has joined #ruby
Vivekananda has joined #ruby
Salve has joined #ruby
<AntelopeSalad>
ddd: another thing that annoyed me with rubymine was the really bad markdown support
meatherly has quit [Ping timeout: 246 seconds]
LexicalScope has quit [Ping timeout: 272 seconds]
<ddd>
yeah even with the plugin
Davey has quit [Quit: Computer has gone to sleep.]
<AntelopeSalad>
yeah the plugin was like... hello citizen of earth, welcome to 1997
yfeldblum has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
<ddd>
lol true that
<AntelopeSalad>
it stinks that to editor markdown in a semi-reasonable way involved installing ghost
<ddd>
wonder if you can change ':focus' to 'wip' time to play in this project
tharindu has joined #ruby
burlyscudd has joined #ruby
Vivekananda has quit [Read error: No route to host]
alx- has joined #ruby
xaq has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 265 seconds]
tharindu_ has quit [Ping timeout: 272 seconds]
joelbrewer has quit [Ping timeout: 272 seconds]
<ddd>
ok term doesn't matter (ie it doesn't require ':focus' you can use what yoiu want) nice
burlyscudd has quit [Read error: Operation timed out]
kayloos has joined #ruby
Davey has joined #ruby
banister has joined #ruby
Erenzie- has joined #ruby
itadder has joined #ruby
<itadder>
hi
<itadder>
This may have known and unaccounted for security vulnerabilities.Please consider upgrading to ruby-2.1.0 which will have all of the latest security patches.”
<itadder>
should I be worried about this "
alx- has quit [Quit: Leaving...]
senayar has quit [Remote host closed the connection]
<itadder>
I am not just following the advice in the pixaxe book
meatherly has joined #ruby
<itadder>
that said to use rvm to install 2.0
senayar has joined #ruby
Vivekananda has joined #ruby
xaq has joined #ruby
Rickmast- has joined #ruby
sassamo has quit [Remote host closed the connection]
danman has quit [Quit: danman]
sassamo has joined #ruby
Rickmasta has quit [Quit: Leaving]
Erenzie has quit [Quit: Time for a true display of fail!]
Solnse has quit [Remote host closed the connection]
m104 has joined #ruby
mengu has joined #ruby
carter_ has joined #ruby
<shevy>
show your ruby speed tricks!
carter_ has quit [Client Quit]
mikepack has joined #ruby
endash_ has quit [Quit: endash_]
eka has quit [Quit: My computer has gone to sleep. ZZZzzz…]
LexicalScope has quit [Ping timeout: 260 seconds]
<platzhirsch>
so, now I need to implement it. So I put this to discussion again
e^0 has quit [Ping timeout: 252 seconds]
<platzhirsch>
I am implementing a crawler which stays on the specified domain and collects links. The result is sitemap/visualization of what pages there are, how they are interlinked and on which static assets they depend on
<platzhirsch>
I want to use a graph structure for that and a hash to index the nodes in the process of building the graph
kayloos has joined #ruby
maximski has joined #ruby
kate_r has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Mattx>
I guess I didn't read it but it's somewhere :)
<apeiros>
"In Files", top left
<apeiros>
require is file based
jonno11 has joined #ruby
<Mattx>
isn't it the case with gems that they can have whatever name the developer want?
<Mattx>
wants*
tonni has joined #ruby
<apeiros>
the gem, yes
<apeiros>
require itself is still file based, even with gems.
chrisseaton has joined #ruby
vermele has quit [Quit: Leaving]
<Mattx>
require "mygem"
<apeiros>
no
<Mattx>
does it mean there must be a file called mygem.rb?
<apeiros>
yes
<apeiros>
ignore the "no", I thought you were asking something else :)
<Mattx>
I really thought there was something mapping gem names into real filenmaes
<Mattx>
ok..
<Mattx>
thanks
<apeiros>
it means that in *any* directory listed in $LOAD_PATH or *any* gem's lib dir, there's a "mygem.rb" file
mneorr has joined #ruby
v0n has joined #ruby
Kricir has quit [Remote host closed the connection]
<apeiros>
search order is just that too - $LOAD_PATH from lowest to highest index, then gems. don't know in which order the gems are search. activated gems are searched first, and per gem it'll be newest first, though, afaik.
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
if given the choice plain ruby .cgi vs. sinatra, I should possibly opt to use sinatra or?
<AntelopeSalad>
i took this style of organization from the bundler source code but i can't get it to play nice for some reason
<shevy>
AntelopeSalad it means that constants is not yet known
<platzhirsch>
Let's say your gem has three classes so far: Worker, Graph and Graph::Node. Would you put node into a subdirectory graph just for the sake of module = directory separation?
xaq has quit [Remote host closed the connection]
<centrx>
AntelopeSalad, Foo::CLI is not defined, yet you try to define class CLI::Bar
<centrx>
Foo::CLI::Bar
<shevy>
AntelopeSalad also I rarely see class CLI::Bar used ever
claymore has joined #ruby
<AntelopeSalad>
centrx: hmm, do you think bundler is doing something extra to make it work in some other area of the code?
<shevy>
people would usually do this: class Cli; class Bar instead
<AntelopeSalad>
i updated my gist to link to the bundler source
<shevy>
platzhirsch in your example, Node would clearly reside in Graph namespace
<shevy>
platzhirsch I would make a directory. first graph.rb, and also graph/ and inside, put a node.rb file
<centrx>
AntelopeSalad, In the bundler source, binstubs.rb is required only after class CLI is already defined
<platzhirsch>
shevy: alright then, this is how I started and I found it annoying, because there is just one file with actual content, but I guess more will join
<shevy>
platzhirsch I would not call it "for the sake of module / directory separation" but rather that it is a simple, elegant, consistent and very effective way to group or put things
<AntelopeSalad>
centrx: i see, so that's why they required it in the method call instead of up top?
Atrumx has quit []
MindfulMonk has quit [Quit: Leaving]
<shevy>
platzhirsch I myself always put one class in one .rb file and almost never more than one class
<AntelopeSalad>
i figured that was just a code style thing -- do think bundler's way of doing it is good or bad?
<shevy>
I even started to put one method in one .rb file for my larger projects :)))
mengu has quit [Ping timeout: 246 seconds]
<centrx>
AntelopeSalad, It may be organized in this manner to improve performance
<centrx>
Only requiring the file if #binstubs is called
<shevy>
once a single .rb file reaches +10.000 lines I figured it would be easier to use separate files
<AntelopeSalad>
centrx: i like having the /cli/ folder which has classes that the cli uses
phansch has joined #ruby
<platzhirsch>
shevy: yes, that's a good way to organize, especially for people are going to read your code
<centrx>
but that seems silly
<platzhirsch>
it also demonstrates that you are a Java mistress
sambao21 has joined #ruby
havenwood has quit [Remote host closed the connection]
<shevy>
hehe
<AntelopeSalad>
centrx: why is it silly? not from a performance POV, but from a naming convention POV wouldn't it be confusing if the class wasn't named CLI::Binstubs?
<shevy>
I dont use java though
koell has joined #ruby
<AntelopeSalad>
because it lives in the /cli/ folder
Aryasam has joined #ruby
<centrx>
I mean the performance argument is silly
<AntelopeSalad>
oh
<shevy>
but as the years pass by, a lot of code can be aggregated into various files
<AntelopeSalad>
is the bundler way super standard from a naming convention stance?
<centrx>
Looks super-nonstandard
endash_ has joined #ruby
<AntelopeSalad>
how would you do it differently given that type of use case?
endash_ has quit [Client Quit]
<AntelopeSalad>
ie. you have a cli app, then you have a bunch of commands and each command has its own class located in /cli/bar.rb
vlad_starkov has joined #ruby
sambao21 has quit [Client Quit]
cashnguns has joined #ruby
<shevy>
you have a class for every command?
<ericwood>
classy
<shevy>
you have a class for every method?!?!?!?!?!
<AntelopeSalad>
shevy: i'm still fooling around with how i want to organize it
<AntelopeSalad>
but one of the cli's commands is pretty complicated, it could easily end up being 5-6 methods on its own
<centrx>
Use class for every variable
<AntelopeSalad>
so i don't see why it's a terrible idea to put that in a class
<centrx>
class MyInteger; class MyBool
<shevy>
right, but how many classes do you really use ... if your project has 20 .rb files, how many "class Foo" definitions will you have there
nichtdiebohne has quit [Quit: Leaving...]
nszceta has quit [Remote host closed the connection]
<AntelopeSalad>
well, bundler seemed like a good/popular app -- i tried to mimic its style
<shevy>
foo_5 = Fixnum.new 5
<AntelopeSalad>
i guess you guys are saying the people who coded bundler are idiots?
<RubyPanther>
you probably shouldn't have 20 cli apps/commands
<shevy>
well if you ask me then yeah
<shevy>
but let's Hanmac1 - Hanmac1 can you recommend the bundler way?
<RubyPanther>
AntelopeSalad: bundler is written by one of the top #5 most respected Rubyists of all time
havenwood has joined #ruby
<shevy>
zenspider!
<pipework>
RubyPanther: Jesus?
<ericwood>
where's the rankings list?
<shevy>
lol pipework that's even better
<shevy>
rbJesus
<AntelopeSalad>
RubyPanther: yeah and it happens to be a cli which is exactly what i'm making but everyone seems to think the code base is total garbage and non-standard
<RubyPanther>
No, Matz didn't write it
<shevy>
nah look what centrx wrote above
<ericwood>
I thought we all worshipped DHH?
<shevy>
"<centrx> Looks super-nonstandard"
<shevy>
he was very nice and polite
francisfish has quit [Remote host closed the connection]
<pipework>
RubyPanther: God wouldn't have a mormon for a son. Everyone knows that.
havenwood has quit [Client Quit]
<shevy>
pipework but he has like 20 kids man!
jonah_k has joined #ruby
<shevy>
and all will soon join forces on mruby
dangerousdave has joined #ruby
<RubyPanther>
ericwood: stuff.rubypanther.com/dhh.mov worship if you can
chipotle has quit [Ping timeout: 272 seconds]
vlad_starkov has quit [Ping timeout: 260 seconds]
chipotle_ has joined #ruby
<AntelopeSalad>
centrx: what type of style would you recommend then since you seem to think the bundler code is trashcan worthy?
<centrx>
Just unusual in my experience
<centrx>
I would name CLI as a module
<centrx>
and what is currently in CLI would be class Base, like CLI::Base, ActiveRecord::Base
Es0teric has quit [Ping timeout: 272 seconds]
francisfish has joined #ruby
<AntelopeSalad>
a few recommended that CLI apps have a class of CLI
<AntelopeSalad>
*people
<shevy>
who
francisfish has quit [Remote host closed the connection]
<AntelopeSalad>
Radar
<shevy>
Radar confirm this please
i8igmac has quit [Ping timeout: 272 seconds]
x77686d has joined #ruby
<RubyPanther>
Yehuda Katz wrote it, and people who complain about Yehuda's code should probably avoid code reviews ;)
<AntelopeSalad>
it's in his "how to create and test a gem" guide
<AntelopeSalad>
"Oh, by the way, our class doesn't have to be called CLI, it's just best practice to do so."
<AntelopeSalad>
i didn't know he wrote bundler tho
chrisseaton has quit [Read error: Connection reset by peer]
<RubyPanther>
rails said it couldn't be done, it couldn't be fixed, so Merb was born, and then after proving all these better ways to do things, he came back and merged Merb and Rails so that rails doesn't have to suck
<RubyPanther>
he's like, the one important person in Ruby who isn't Japanese lol
<itadder>
oh wow
timonv has joined #ruby
<itadder>
do any of the ruby team members hang out here
Kricir has quit [Remote host closed the connection]
mikepack has quit [Remote host closed the connection]
mikepack has joined #ruby
Traxnov has joined #ruby
nichtdiebohne has joined #ruby
<RubyPanther>
the only celebrity that ever came here was _why, one time in 2005
kitak_ has quit [Remote host closed the connection]
brunops has joined #ruby
decoponio has quit [Quit: Leaving...]
<itadder>
were do the normaly hang out or how do they get work done and peer chat
kitak_ has joined #ruby
Aryasam_ has joined #ruby
<RubyPanther>
They have some sort of secret clubhouse
Xeago has quit [Remote host closed the connection]
Traxnov has quit [Remote host closed the connection]
troyready has joined #ruby
<itadder>
hey any idea why one of the first things in the picaxe book it says to rvm install 2.0.0
<RubyPanther>
platzhirsch: neither
gbt has joined #ruby
<itadder>
is it becuse they want to teach you just 2.0
<platzhirsch>
RubyPanther: why, lecture me
mikepack has quit [Ping timeout: 252 seconds]
<itadder>
and not 2.1 or what
<RubyPanther>
I'm a pescetarian, I'm against killing ducks
tanema has joined #ruby
<RubyPanther>
platzhirsch: what is it you really want from this object? Who cares what class it is? What interface do you need it to have? Check for a representative method
<platzhirsch>
RubyPanther: oh, haven't thought about this
koell has quit [Read error: Connection reset by peer]
JBreit has joined #ruby
<centrx>
duck.respond_to?
zipper has joined #ruby
joshu has joined #ruby
GinoMan has joined #ruby
<zipper>
I am using the wolfram gem which outputs stuff in IRB but returns the object when outside IRB. So anyway which is the best way to parse such data https://gist.github.com/urbanslug/9024912
oso|away is now known as oso96_2000
<matti>
Mattx: Indeed, always too little.
nisstyre has quit [Quit: WeeChat 0.4.3]
nisstyre_ has quit [Quit: WeeChat 0.4.3]
troyready has quit [Ping timeout: 245 seconds]
<itadder>
wow LEAH SILBER is pretty hot
<platzhirsch>
RubyPanther: But why pescetarian? :D and not vegetarian
tanema has quit [Ping timeout: 260 seconds]
Speed has quit [Ping timeout: 260 seconds]
<shevy>
does ruby 2.x tell you which when entries in case when are duplicated?
nisstyre has joined #ruby
koell has joined #ruby
<RubyPanther>
because fish are good for the brain nom nom nom
<platzhirsch>
RubyPanther: lol
<shevy>
fish are very clever
einarj has joined #ruby
<shevy>
it makes sense to assume that you will become as smart as the stuff you eat
<RubyPanther>
My wife is Thai, there is like... zero chance I would give up the fish sauce lolol
zigomir has quit [Read error: Connection reset by peer]
Es0teric has joined #ruby
joshu__ has quit [Ping timeout: 264 seconds]
eka has joined #ruby
tanema has joined #ruby
Traxnov has joined #ruby
<platzhirsch>
shevy: like the savage who eats the heart of a hero, to become as brave as she was?
<shevy>
yah
<shevy>
fish hearts are the best
<platzhirsch>
flawless logic is flawless
Hobogrammer has joined #ruby
<snkcld>
is it possible to, if i have a _huge_ json file, which is an array of objects, only load one object at a time?
<snkcld>
instead of json parsing the entire json file at once, just do one element at a time
Jdubs_ has quit [Remote host closed the connection]
troyready has joined #ruby
Aryasam_ has quit [Ping timeout: 260 seconds]
<platzhirsch>
so much code to write, so much more tests to write. TDD can sometimes be exhausting
Aryasam has joined #ruby
Traxnov has quit [Quit: Traxnov]
zigomir has joined #ruby
firewater has joined #ruby
Speed has joined #ruby
<firewater>
Does anyone know where I can find a good ruby tutuorial on Factory methods?
gomix has joined #ruby
brunops has quit [Ping timeout: 260 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
blahwoop has joined #ruby
<shevy>
platzhirsch you have to write tests before code?
<shevy>
It kinda defeats the purpose of using a dynamic language if you have to do micro perfection
<platzhirsch>
shevy: that's because I do software engineering and not your mainschtream scripting
<platzhirsch>
:P
klaut has quit [Remote host closed the connection]
Vivekananda has quit [Read error: Operation timed out]
<shevy>
software engineering without a C based language is like a guy who goes to build a skyscraper with just ten nails and one hammer
<firewater>
Anyone know a good idea of how to make factory methods in a class?
Aryasam has quit [Ping timeout: 246 seconds]
<shevy>
I dont even know what is a factory method, it most definitely is not a main ruby jargon
<yxhuvud>
firewater: SomeClass.new
<yxhuvud>
;)
<platzhirsch>
+1
<shevy>
wow
<shevy>
that is a factory method? one that returns an instance of a class?
<firewater>
yxhuvud: What is that, I don't think that is a factory method.
<shevy>
hehe
<firewater>
Factory methods are not exclusive to ruby.
<shevy>
you are being doubted yxhuvud
<shevy>
good then what is the definition
tris has joined #ruby
Aryasam has joined #ruby
<firewater>
IDK, that is why I am asking the question. I'm trying to solve an rspec puzzle.
<firewater>
And it is asking me to make factory methods.
<yxhuvud>
of course it is, it builds instances of SomeClass. if you have another class called OtherClass, then you can create a method like def build(something) if something; SomeClass.new; else; OtherClass.new; end;end
<platzhirsch>
It's a design pattern, it's expected that you have a method that is responsible for constructing the object. It's useful when it's expected that you override this method to provide your more-specific object instantiation
<blahwoop>
so thats what a factory method is
<blahwoop>
makes sense
<yxhuvud>
oh. factories in rspec probably refer to FactoryGirl gem. Do a google for that
Jetchisel has joined #ruby
<shevy>
k so simply a method that returns an instance of a class
<firewater>
yxhuvud: No its not asking that.
yekta has joined #ruby
binaryhat has quit [Ping timeout: 245 seconds]
<blahwoop>
some more context of the problem might help
brunops has joined #ruby
<RubyPanther>
shevy: Ruby IS C
<shevy>
but he has a factory method now
<RubyPanther>
Ruby is just a really fancy C stdlib replacement/macro pack
<shevy>
RubyPanther but we don't write C, you are only the exotic exception to the average mass
<RubyPanther>
Sure we do, we just use a lot of indirection
<firewater>
It wants me to make class methods, methods defined on the class rather than the instance of the class.
<firewater>
How do I do that?
<shevy>
firewater a class method is done via def self.
cmoylan has quit [Ping timeout: 252 seconds]
<itadder>
oh wow it snowing again
<shevy>
so you could do: class Foo; def self.happy_factory; return HappyFactory.new; end; end; Foo.happy_factory
<firewater>
shevy: So, I basically just make a method and put self in front of it?
<shevy>
firefly2013 don't forget the .
<shevy>
oops
<shevy>
firewater don't forget the .
<firewater>
Right, the dot, but that is all this is?
<firewater>
A method with self. in front of it?
<shevy>
and the class you return must be known to the .rb file
cashnguns has quit [Ping timeout: 252 seconds]
<firewater>
Everything else is the same?
<shevy>
yeah
<shevy>
yeah
endash_ has joined #ruby
<firewater>
That sounds really silly, what is the point?
chipotle has joined #ruby
<firewater>
of a class method?
<shevy>
I am not sure what is silly?
<shevy>
you can omit .new for instance, which is cool
<shevy>
unless you wanna do .new all the time everywhere
<firewater>
I don't get the point of a class method, why would you need it?
<shevy>
I just told you, you can avoid .new
<firewater>
ok.
<shevy>
File.parse
<shevy>
File.stat
<shevy>
File.anything
<shevy>
if it is a module, you could of course do: include File but you don't always want that, or you can't do that in case it is a class
asmodlol has joined #ruby
v0n has quit [Ping timeout: 252 seconds]
<RubyPanther>
What is the difference between your wallet, and humanity's wallet? That is the difference between the instance method #wallet and the class method .wallet
<shevy>
for modules this is very flexible
jonno11 has joined #ruby
<shevy>
module Foo; def test; def self.test <--- now you have two ways to use it at least
maximski has quit []
<shevy>
you could even do this:
<centrx>
I thought humanity's wallet belonged to my wallet
<shevy>
class Bla; def self.[](i)
<centrx>
Was I mislead?
Amnesia has joined #ruby
<shevy>
Bla['yuipp']
chipotle_ has quit [Ping timeout: 260 seconds]
<shevy>
firewater try that in perl or python or php
dubsteph has quit [Ping timeout: 260 seconds]
<Amnesia>
does anyone over here have any experience with ruby's aes methods?
<firewater>
shevy: I don't know that language.
<shevy>
I don't know python but I used perl and php a long time ago
<firewater>
I'm trying to solve this puzzle and it frusterating. I don't get this stuff.
<shevy>
there, we used Foo.test to return an instance of class Test
<firewater>
I don't think my code is asking for another class to be made.
dik_dak has joined #ruby
<shevy>
well you write your own code I assume
<firewater>
yes.
<shevy>
so the question is what your (factory?) method is doing
chrisseaton has joined #ruby
<firewater>
Although I am new.
ahawkins has joined #ruby
<firewater>
So, this is a learning puzzle.
oskarpearson has joined #ruby
kyle___ is now known as kyle__
<firewater>
Its taking an input, then it is calling on another method from that same class.
<firewater>
Its traking in a temperature. The factory method labels the tempterature as celcius or fahreinhiet, there are two calss methods. Then it calls a method on on of those methods.
<firewater>
And expects a result.
<firewater>
No idea.
<firewater>
lost.
<firewater>
It's frusterating.
<Amnesia>
anyone?>
kevinykchan has quit [Quit: Computer has gone to sleep.]
<shevy>
firewater ok so based on the input alone it decides which method to call
<shevy>
firewater why don't you simply return an instance at the end of your method with the proper class?
<slowcon>
what up guys
zigomir has quit [Read error: Connection reset by peer]
ahawkins has quit [Ping timeout: 252 seconds]
<firewater>
shevy, not to sound ignorant, but its like your talking to me in a foreign language. Sorry, I'm having trouble translating what is being said to what I'm trying to solve. Its probalby not you, I am still learning. But just going to be honest.
<shevy>
firewater well, every method in ruby returns something ok?
<RubyPanther>
naw, it is probably all shevy's fault
<firewater>
yes.
<shevy>
firewater ok, and you write the code, you are in control of what your methods will return
intuxicated has quit [Ping timeout: 252 seconds]
<shevy>
firewater now you can have methods that work on your object directly, or methods that are not bound to the specific object at hand, a class method
troyready has quit [Remote host closed the connection]
<shevy>
class Foo; def hi; # code here; end; end
zigomir has joined #ruby
<shevy>
versus
<snkcld>
can anyone recommend a good way with working with a ton of small files? i am spending almost a minute in Dir[], i have 500k files
venkat has quit [Remote host closed the connection]
<shevy>
class Foo; def self.hi; # some other code here OR you can also return Foo.new at the end; end; end
<shevy>
this is the first important distinction
<centrx>
snkcld, Show code?
<shevy>
snkcld cool, I think ruby will always be slow when you have that many files
<shevy>
snkcld alternatively, you could iterate via Dir.foreach for such a case
chrisramon has joined #ruby
<shevy>
I always have to wait a long time when I do: Dir['/**/*'] :)
<firewater>
Can I just show you my code and the rspec code I'm trying to get to pass? I feel like I'm just spinning my wheels.
venkat_ has joined #ruby
<firewater>
I got through this thing all on my own up to this point, but I'm just stuck now.
<shevy>
firewater you can always paste the code, others could try and help - use pastie.org or gist github
<shevy>
firewater I think it is odd to go and want to learn rspec first before learning the foundation of ruby though
ixti has quit [Quit: WeeChat 0.4.2]
<firewater>
shevy: The rspec is not what I'm learning. rspec is the "teaching tool" that has puzzles made in rspec.
<firewater>
I code and make the code pass.
<firewater>
Its TDD.
<shevy>
sounds like a test
<firewater>
I'm not learning rspec.
<shevy>
I code and my code either works when I invoke it or it does not, and if it does not I correct it
<shevy>
ok then who teaches you to have to use factory methods?
danman has joined #ruby
<shevy>
and more importantly for what purpose exactly
<firewater>
No one, I work a full time job. Its just part of the test in rspec. This puzzle was dealing with hashes.
<firewater>
Its towards the end. I got through the main part, this is a side puzzle.
<Amnesia>
has one of you folks ever used the openssl module?
<snkcld>
centrx: maybe if i just move all the json files into one directory?
<shevy>
is that part available online
<snkcld>
i was going to concat them all, but that occupies too much memory and crashes jruby
<firewater>
Is that to me shevy?
<centrx>
snkcld, Possibly. Do you really need the "**" instead of "*" (not sure how much time that saves)
<centrx>
snkcld, Also, I am thining it is because of the database connection
<shevy>
firewater yeah, I am just too lazy to tab complete the name all the time
<centrx>
snkcld, You are waiting for round-trip database/network response for every single file
<snkcld>
centrx: its actually an embedded database ssession ;P
<firewater>
shevy: No, its just something I downloaded a long time ago. I don't know where it is from really.
<centrx>
snkcld, What do you mean by that
<snkcld>
the profile.flat from jruby is showing Dir[] occupies the most time
<firewater>
shevy: I was trying to learn ruby, got a job and took a break, and now going back to learning it again.
<centrx>
snkcld, Just because it is on the same machine it is still slower
<snkcld>
well, im using neo4j embedded, that is to say, i have the neo4j source code included in my classpath with the jruby code, and i access the java code directly to operate on the database files
<shevy>
firewater I see. well there are many ways to learn ruby, I never went the rspec path myself
gbt has quit [Quit: Leaving...]
<centrx>
hmm
Aryasam has quit [Read error: Connection reset by peer]
<firewater>
I have done other paths. Already made a gem through a class I did.
<snkcld>
there is not network connection, though there is IO to the filesystem, but my profiling shows that isnt as bad as Dir[]
<firewater>
This is just a second things I'm doing.
<snkcld>
i will provide the profile
<firewater>
After this, I am going to move onto RoR.
<centrx>
snkcld, Are you sure you are reading the profile result correctly? It could be saying the entire block is what is taking the time, because the Dir[] heads the block
<firewater>
But want to get through these puzzles first.
unholycrab has joined #ruby
dtcrshr has joined #ruby
<unholycrab>
Anyone get this message with the mysql module? "./mysql.so: ./mysql.so: undefined symbol: PL_phase - ./mysql.so (LoadError)"
<snkcld>
centrx: that would be designated in the second column though, in "chidlren", i believe
<snkcld>
it is actually "self" which is where the time is
<snkcld>
gimme a couple minutes to run this and ill provide it on gist
<firewater>
There is my code so far, the factory method is what is messed up. Also, left else empty because pretty sure I need to have an else for these factory methods.
<centrx>
snkcld, If Dir is the slow part, I would try not using the "**" recursive directory
<centrx>
glob
bluehavana_ has quit [Ping timeout: 245 seconds]
<unholycrab>
its pointing to line 2, which is require 'mysql'
<shevy>
firewater well ok that shows that you did not understand class methods yet
<snkcld>
centrx: thing is, the source data comes in as such:
<shevy>
firewater so that is the code you have essentially
angerman has quit [Quit: Gone]
<snkcld>
centrx: ah! that makes perfect sense.
<snkcld>
so ** is _recursive_ in what way?
<shevy>
firewater you invoke your class method by doing this: Temperature.from_celsius
<snkcld>
ohhh... it looks for the json file in _every_ dir
<shevy>
firewater you pass in the argument 50 to it
<shevy>
now, we look at the class method code
<snkcld>
but if i know the depth which would have it, i can specify */*/*/ until the depth is hit
<shevy>
def self.from_celsius(number=0)
<shevy>
number
<shevy>
so you return the input unaltered, so that method gives you back 50
<centrx>
qq/**/*.rb -> qq/a/z.rb and qq/b/c/z.rb and qq/b/c/d/z.rb
_HolyCow has joined #ruby
<shevy>
firewater so the first question is - if you return the input unaltered, why do you have two methods called in_celsius and in_fahrenheit at all ?
<firewater>
Those methods were for passing the other tests.
<shevy>
oh man
<zipper>
If I have "Result: 22 °C (wind chill: 23 °C)\n(37 hours 26 minutes ago) [Show non-metric...]" as my string assigned to realstr. How would I match everything up to the new line?
pico-pete has quit [Ping timeout: 245 seconds]
<snkcld>
centrx: awesome.
<zipper>
\B is a fail
pico-pete has joined #ruby
<shevy>
firewater so your tests are happy but I think your method is useless, it returns to me the input I give it, that is like a mirror. good for looking at yourself and see how pretty you are but it is not very useful
<shevy>
firewater in your code, you have the two methods, you can call them when you instantiate
<shevy>
so change this:
<shevy>
def self.from_celsius(number=0)
<shevy>
number
<shevy>
to
<shevy>
def self.from_celsius(number=0)
<firewater>
ok
robbyoconnor has joined #ruby
nisstyre has quit [Read error: No route to host]
<shevy>
Temperature.new(number).in_celsius
danman has quit [Quit: danman]
<shevy>
but you must change the methods
<shevy>
return something specifically in both
<shevy>
firewater if methods confuse you, use 'return' explicitely for now
<shevy>
def foo(i)
<shevy>
result = 2 + i
<shevy>
return result
<shevy>
end
<firewater>
I understand the last line in a method is returned.
<firewater>
so result would be returned in the end.
dingus_khan has joined #ruby
chrisramon has quit [Ping timeout: 252 seconds]
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
phansch has quit [Quit: Leaving]
<shevy>
looking at your code
<shevy>
I have no idea what is returned
<shevy>
and I don't trust your code at all unless it becomes specific
timonv has joined #ruby
gyre007_ has quit [Ping timeout: 246 seconds]
<shevy>
but if you make the test succeed with your code, all the more power to you
<firewater>
Ok, I will try to do some reading and see if I can make some progress on this.
ggherdov has quit [Ping timeout: 245 seconds]
<firewater>
I'm still learning, so I don't claim that this is great code.
<shevy>
yeah, I just said it because you wrote "<firewater> so result would be returned in the end.", as long as you understand code this is fine, it would only be a problem if your code does things you don't expect it to be
gyre007_ has joined #ruby
dingus_khan has quit [Read error: Connection reset by peer]
estebistec has quit [Remote host closed the connection]
dingus_khan has joined #ruby
<firewater>
shevy: Yeah, I think I'm just not good right now describing it in perfect terms.
<firewater>
But I understand what is going on in that code.
<firewater>
I made it after all.
ggherdov has joined #ruby
<firewater>
Not claiming its perfect, but i get what is going on.
<ddd>
i use iftt. i like the service availability. it calls me daily to tell me to get up for school using their service :)
<platzhirsch>
its*
<itadder>
you can have it call you
sepp2k has joined #ruby
<itadder>
hmm maybe I need that as a alarm trigger
<itadder>
to get to work early
xaq has quit [Remote host closed the connection]
<itadder>
platzhirsch: nice song
Aryasam has quit [Ping timeout: 248 seconds]
mneorr has quit []
<itadder>
for some reason I can't seem to code today
<ddd>
itadder hey it gets me up for the kids, and then off to school on time
<platzhirsch>
I just thought of watching another episode Mad Men, but I need to get hustling again
venkat_ has quit [Remote host closed the connection]
tjr9898 has quit [Remote host closed the connection]
Aryasam has joined #ruby
<itadder>
tat great ddd I may chekc that out
maroloccio has joined #ruby
<itadder>
does pixaxe want me to just use 2.0
ner0x has joined #ruby
intuxicated has joined #ruby
thelamest has quit [Quit: yolo swag 420 jesus]
Czupa has joined #ruby
speakingcode has joined #ruby
MattStratton has joined #ruby
venkat has joined #ruby
itadder has quit []
<platzhirsch>
anyone seen 'American Hustle'?
agjacome has quit [Quit: Lost terminal]
claymore has quit [Quit: Leaving]
gregf has joined #ruby
v0n has quit [Ping timeout: 248 seconds]
francisfish has quit [Remote host closed the connection]
evilbug has quit [Quit: Leaving]
<shevy>
not me
Czupa has quit [Remote host closed the connection]
<shevy>
code more, then you have less time for movies platzhirsch
<platzhirsch>
:*
<platzhirsch>
:(
Hobogrammer has quit [Ping timeout: 260 seconds]
ndrei has quit [Ping timeout: 260 seconds]
Karkizz has quit [Read error: Connection reset by peer]
yakko_air has joined #ruby
ndrei has joined #ruby
<platzhirsch>
So you mean actual hustling *sigh* no shortcuts
tanema has quit [Remote host closed the connection]
jonr22 has quit [Remote host closed the connection]
chrisramon has joined #ruby
<yakko_air>
hey guys, is there a command or global var to tell me what process I'm currently running? my goal is to be able to tell whem I'm on puma, sidekiq or console. thanks in advance.
yakko_air is now known as yakko
tanema has joined #ruby
jonr22 has joined #ruby
<platzhirsch>
yakko: what happened to your air?
<yakko>
platzhirsch: it's become the main computer now =P
kitak_ has quit [Remote host closed the connection]
kitak_ has quit [Remote host closed the connection]
chrisramon has quit [Client Quit]
<platzhirsch>
also __FILE__ might be useful
brunops has quit [Changing host]
brunops has joined #ruby
<platzhirsch>
respectively the constant $0
bpuzzled has quit [Quit: Leaving]
<jxport>
I want to use environmental variables for config in my ruby script. How can I best pass those environmental variables to my script at runtime in production?
<yakko>
platzhirsch: $0 == 'bin/rails'
firewater has quit [Quit: Page closed]
zigomir has quit [Read error: Connection reset by peer]
brunops has quit [Quit: leaving]
<yakko>
__FILE__ == "(irb)"
e^0 has quit [Quit: WeeChat 0.4.1]
tanema has quit [Ping timeout: 245 seconds]
<jxport>
I could start my program via a .sh script invoked which has: a=1 b=2 c=3 ruby software.rb # but that seems wrong
jonr22 has quit [Ping timeout: 260 seconds]
<shevy>
jxport environment variables are available in ENV
<yakko>
yeah, __FILE__ and $0 won't be useful :(
zigomir has joined #ruby
<jxport>
shevy: from inside the Ruby code - yes, but how can I pass that environment in production at runtime
loxis has joined #ruby
marcdel has joined #ruby
<shevy>
jxport as said, ENV is always available in every .rb file. if your .rb file in question does not have an ENV setting, it was not passed into it in the first place
[krisbulman] is now known as krisbulman
Shidash has quit [Ping timeout: 272 seconds]
krisbulman is now known as [krisbulman]
Salve has joined #ruby
<shevy>
in my .cgi scripts a different ENV, much smaller, is available
DaniG2k has quit [Ping timeout: 248 seconds]
jle` has joined #ruby
Shidash has joined #ruby
<shevy>
setting temporary environment variables for commandline .rb files is as easy as i.e. : ABC="hi" ruby env_testing.rb
black0ut has joined #ruby
platzhirsch has left #ruby [#ruby]
<shevy>
then ENV will have a key called ENV['ABC'] available
platzhirsch has joined #ruby
<jxport>
yes that's starting to relate a little more to what I'm looking for
angusiguess has joined #ruby
<jxport>
I don't care about *inside* the .rb files - ENV as you mention, exists;
<yakko>
platzhirsch: $0 will def be able to help tell sidekiq, but not puma from console
<jxport>
It's the passing it. I could launch my ruby in production with run.sh containing ABC="hi" ruby application.rb # but that seems wrong
<shevy>
so you want to use a .sh script to start a .rb script and have the environment set in the .sh script
<jxport>
My question is: is that the best way?
<jxport>
It seems almost hacky, or, rather - I've not seen that mentioned everywhere as a standard way, which suggests it might not be the best
<platzhirsch>
yakko: no idea, maybe something like defined?(Puma::...)
DaniG2k has joined #ruby
<shevy>
well if you ask if that is the best way then I am not sure what answer I can give you
<shevy>
I dont need shell scripts for instance
<shevy>
setting temporary environment variables via the above syntax directly before invoking a .rb file works just fine for me, I am not sure why your use case requires the shell script in the first place
<yakko>
platzhirsch: guess I'm just gonna have to assume web==console, it does suit my purpose anyways =D
<platzhirsch>
rock on
<yakko>
platzhirsch: I guess Puma is defined as long as it's required
<yakko>
platzhirsch: it really fits my need already =D
<jxport>
shevy: the application will not always be manually started
<platzhirsch>
so Puma yes? What Ruby are you using?
<yakko>
platzhirsch: I just need a safety proof thing to build a couple of methods, so I can have shit run only when in sidekiq =)
<yakko>
latest 2.0 I guess, no plans to moving to 2.1 unless I'm installing new servers
<shevy>
jxport I still don't understand the problem. you can even hardcode entries into ENV in your .rb file just as well
Vivekananda has joined #ruby
<platzhirsch>
can someone name me a typical console ruby gem?
<platzhirsch>
just need some code to look at
<shevy>
platzhirsch asciitable!
<yakko>
platzhirsch: hirb
jonno11 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
itadder, Ruby Enterprise Edition was a faster implentation of Ruby 1.8
<centrx>
implementation
<jxport>
shevy: I want to separate database credentials from the source code. Environmental variables seem perfect. My application won't always be started manually, and I don't want to pass those values each time
<itadder>
so I thought it was just a cormecial version, with things to use in a enterprise like auditing tools
<centrx>
itadder, Most of the improvements were added into Ruby 1.9 and REE is no longer maintained.
<itadder>
like something that security deparment at work would require
mark_locklear has joined #ruby
<itadder>
this is how my programing windows looks like
Shidash has quit [Ping timeout: 252 seconds]
<itadder>
on my macbookpro screen is lime chat and preview for the pdf and on my 19 inch screen external is this http://snag.gy/PdK61.jpg
holsee has quit [Quit: Connection closed for inactivity]
maximski has quit []
apeiros has quit [Remote host closed the connection]
<platzhirsch>
How should I name the module method of my gem which starts the whole processing shit? I don't want to put it into bin
<itadder>
I just trying to learn and not get distracted
aspires has joined #ruby
<shevy>
itadder that you can even use something like that is amazing
<shevy>
itadder come to linux man
<platzhirsch>
oh yeah, let's open the eigenclass so we can drop the .self, super hot
<itadder>
can I run code directly from textmate thru some bundle
<shevy>
ewwww
[gmi] has quit [Quit: Leaving]
zigomir has quit [Remote host closed the connection]
zigomir has joined #ruby
saarinen has joined #ruby
<itadder>
ahh yea cmd r
<itadder>
are you on skype
<itadder>
I just need someone in the background to just talk to me while I read
<centrx>
creepy
<centrx>
Can I sing you to sleep
<itadder>
I can't seem to focus
<itadder>
even though I have focusatwill.com in the background
chrisseaton has quit []
<yakko>
platzhirsch: $0 will be different when running tests =P
<yakko>
f**k =D
<platzhirsch>
yakko: you can always set your own variables
<centrx>
itadder, You need to meditate and get off the drugs
zigomir has quit [Ping timeout: 272 seconds]
<itadder>
I am on adderal
<platzhirsch>
this sucks, I wanted to use yield, but I would need different yields with different arguments. Which is possible, but doesn't feel clean
<shevy>
yield your way to enlightenment man
Aryasam has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 260 seconds]
<platzhirsch>
or I pass procs, that would still be pretty cool
<itadder>
centrx: yea
<itadder>
centrx: I think that a great idea, I been thinking of finding a great meditation class
<itadder>
I may ask tomorrow at yoga if they know of one
<centrx>
Excellent
apeiros has quit [Remote host closed the connection]
<itadder>
the insturctor she very friendly with me and knows I am shy / social aneixty
apeiros has joined #ruby
<itadder>
I wish my gym was right next door to my job
mark_locklear has quit [Ping timeout: 272 seconds]
<itadder>
my gym is NJ about 10 min in car and 10 min back in the AM, it fine some mornings, but I wish it was next door to my job.
<centrx>
Your gym can be any where you are
<itadder>
thier a NYC sport club in grand central, I work right near grand central station in NYC
<itadder>
but it cost a lot of money
<itadder>
plus I would be paying for two gym
<itadder>
one think that had me going to the gym and more alert was my fitbit flex
<platzhirsch>
I also want to work near Grand Central
<itadder>
I lost the dam bracelt that worked thrue blue tooth
<itadder>
platzhirsch: for me it great becuase my comute rocks
<itadder>
I live two blocks away from lincon tunnel, and the buss takes right to port authority and then it only one stop subway ride to grand central or 10 min cititi bike ride to work
<itadder>
if it not to cold or snow or rain
<platzhirsch>
H1B Visa Applications start 1st April, I need to get a offer by this time. I don't want to go to London, work for the blokes
mikepack has quit [Remote host closed the connection]
<itadder>
centrx: true
mikepack has joined #ruby
angusiguess has quit [Ping timeout: 272 seconds]
gregf has quit [Quit: WeeChat 0.4.3]
<itadder>
were do ruby freelancer or somoene looking for full time work doing web development in ruby or someting like that get a job
<itadder>
craiglist
<itadder>
or consulting / staffing firm liek I do
alexherbo21 has joined #ruby
<itadder>
brb
itadder has quit []
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
itadder has joined #ruby
ixti has joined #ruby
<platzhirsch>
Cracklist
alexherbo21 has quit [Client Quit]
alexherbo2 has joined #ruby
<dorei>
itadder: hnn hiring i guess
<itadder>
what is hnn
<itadder>
I know that if this then that is hiring
tylersmith has joined #ruby
<dorei>
itadder: at hackernewsnetwork there's an account called "who-is-hiring" and each month opens a thread for this
alx- has quit [Read error: Connection reset by peer]
alx- has joined #ruby
<itadder>
oh dorei cool
theskript has joined #ruby
<dorei>
but since hnn has a shitty interface there are some sites that present this information in a more user friendly way
<platzhirsch>
dorei: yeah, reading that every month like a heroin addict
<dorei>
google hnnhiring and u'll get a couple of this
mikepack has quit [Ping timeout: 248 seconds]
<dorei>
these even
<dorei>
also there's http://wfh.io/ listing work from home vacancies
asmodlol has quit [Remote host closed the connection]
<theskript>
how can i access an instance variable defined in another method within the same class?
<itadder>
Sweet
<itadder>
dorei: also how does one charge when one works from home
<itadder>
I know by the hour, but say I a litte slow at first and take a whole day say 14 hours coding
<itadder>
I not going to charge for 14 hours each day
<itadder>
or else they will fire me
gregf has joined #ruby
Es0teric has quit [Ping timeout: 248 seconds]
mengu has quit [Read error: Connection reset by peer]
Guest28444 has quit [Quit: Guest28444]
mengu has joined #ruby
mengu has quit [Changing host]
mengu has joined #ruby
lkba has joined #ruby
mercwithamouth has quit [Ping timeout: 246 seconds]