<epitron>
hrmmm... i can't insert more than 30,000 rows/sec into an sqlite3 database...
_helloworld_ has joined #ruby
<epitron>
but i can spew 120-130k rows/sec into leveldb or a flat file
axl_ has quit [Ping timeout: 264 seconds]
akerl has joined #ruby
<epitron>
while bin/sqlite3's .import command can do 150k
airlok has quit [Ping timeout: 246 seconds]
Lewix has quit [Read error: Connection reset by peer]
lewis has joined #ruby
<epitron>
i'm thinking the sqlite3 bindings have some overhead here
<epitron>
i looked at the source to .import, and i'm doing the same thing that it's doing
<epitron>
just in ruby instead of C
justsee has quit [Quit: leaving]
<pontiki>
that is a hecka overhead
<pontiki>
5x slow down?
<akerl>
So... I'm trying to do string variable expansion after-the-fact... for instance, my script has 'Hello #{func(#$1)}' stored, and later on I want to have that interpolated using those values and functions
justsee has joined #ruby
<pontiki>
akerl: run through ERB?
<akerl>
Using `my_string % (var, other_var) doesn't work, because I can't use function calls or a dynamic number of arguments
<epitron>
pontiki: well, it is ruby, after all. :)
<ecart>
ok
<ecart>
thank you all
i_s has joined #ruby
<ecart>
for help?
<ecart>
;/
<epitron>
i should probably profile this
hamakn has joined #ruby
<Nilium>
Alrighty, got my transform class working. Hello simplified 3D transformations.
gildo has quit [Ping timeout: 245 seconds]
<pontiki>
w00t!
airlok_ has quit [Ping timeout: 246 seconds]
<akerl>
pontiki: I'm reading the ruby docs for ERB, and I'm having trouble seeing how I'd use it; any chance you're aware of a better intro to ERB somewhere?
JZTech102 has joined #ruby
<ecart>
remember not paste my code the next time you ask for help
<ecart>
it hurts the copyright law
<pontiki>
sadly, no, akerl :(
<akerl>
No worries, I'll keep hunting; thanks for pointing me in the right direction :)
<pontiki>
but it seems like you should just be able to do ERB.new('Hello #{func($1)').result
<pontiki>
as long as func and $1 are defined at that point...
<akerl>
Yea, they are
JZTech101 has quit [Ping timeout: 240 seconds]
<pontiki>
oh wait
<akerl>
The current hideous solution is `eval '"' + my_string + '"'`
<akerl>
Which works... but makes me cry tears of pain
<jeromelanteri>
hello all, and hello pontiki (wahou... you are a dinosorus here... you practice A LOT)
jackjackdrpr has joined #ruby
<pontiki>
*snerk*
m104 has joined #ruby
<pontiki>
or should i say "RAAARRRKKK RAAARRRRKKKK"
<sevenseacat>
lol
<jeromelanteri>
is someone know how to make a correct use of the ".rvmrc" files for choose the ruby version to run with for project with aptana studio 3 ?
mrsolo has quit [Quit: Leaving]
m104 has quit [Max SendQ exceeded]
<banister>
pontiki: which features do you use?
<reactormonk>
pontiki, I suspect I will do a stateful iteration
smathieu has quit [Remote host closed the connection]
terrellt has quit [Ping timeout: 264 seconds]
wicked has joined #ruby
<Eiam>
banister: well, I like what pry-nav brought in with the step & next, so all the runtime invocation stuff. the view & history replay, and state navigation =)
<pontiki>
banister: i've been using the internal ri a lot, and the cd/ls thing i *love*
thomasle_ has quit [Remote host closed the connection]
<banister>
pontiki: interesting, why do you prefer to to show-doc ?
<Eiam>
banister: when I modified a generated SQL statement from some random gem after stepping through their damn code, then saw it run with the *right* values that I dropped in from Pry..
<pontiki>
and i am really liking the syntax highlighting
<Eiam>
banister: it was pretty hot.
<pontiki>
and debugging stuff
<pontiki>
heehee Eiam -- perdy sexy shtuff
<jeromelanteri>
is someone know how to make a correct use of the ".rvmrc" files for choose the ruby version to run with for project with aptana studio 3 ?
nari has joined #ruby
chxane has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
<banister>
pontiki: just curiuos, why do you prefer 'ri' to show-doc?
<banister>
i wrote show-doc as a replacment for 'ri' :)
<pontiki>
i didn't know it!
<pontiki>
i shall use it!
<banister>
aliased to ? btw
<banister>
? Blah#foo
anonymuse has joined #ruby
<pontiki>
!!!
mikepack has quit [Remote host closed the connection]
<pontiki>
hmmm
<pontiki>
show-doc only works for methods?
<banister>
works for classes too, at least it should
<pontiki>
show-doc Array isn't
devoldmx has quit [Ping timeout: 264 seconds]
<banister>
pontiki: because there's also an Array method, so it'll pick that up first. If you want Array class try: ? ::Array (i think)
<pontiki>
says Error: Cannot locate this method: Array.
<banister>
pontiki: ah, u need to install pry-doc
<pontiki>
ah ha!
<banister>
pry-doc also lets you look up the C source for core methods
<banister>
after u install pry-doc, try going: show-source Array#sort
* pontiki
twiddles waiting for network
rare-felt40 has quit [Quit: rare-felt40]
isosporic53 has joined #ruby
<pontiki>
hmm
<pontiki>
well, 'ri Array' gives me a whole lot of documentation
jeromelanteri has left #ruby [#ruby]
<pontiki>
'show-dow ::Array' give some info, but not documentation.
<pontiki>
clearly i need more info
<banister>
pontiki: try it on another (pure ruby) class
ilyam has joined #ruby
bradhe has quit [Remote host closed the connection]
<pontiki>
so nothing from core, probably?
bradhe has joined #ruby
<banister>
pontiki: i'm just checking to see what ri offers, generating docs takes a while ;)
<pontiki>
kk
<banister>
pontiki: can u show me a screengrab of the ri Array output?
<pontiki>
one sec
_helloworld_ has quit [Remote host closed the connection]
<banister>
pontiki: those aren't class docs, they're general docs for the library...if we were just to display all of a README.rdoc for a given class in a library i think it would annoy people more..is that way ri does?
<banister>
what*
<pontiki>
yes
xpirator has joined #ruby
<pontiki>
which is fine
<pontiki>
i'm usually more often interested in method doc
<banister>
pontiki: i thought about making that available (the readme) via a gem command inside pry, i.e: gem readme rsyncbackup
whitenoise has joined #ruby
<banister>
would display the readme for rsyncbackup etc
brisbin has quit [Read error: Connection reset by peer]
smathieu has quit [Ping timeout: 264 seconds]
<banister>
we currently have a few gem commands, gem-cd, gem-list, gem-install, gem-readme (or more likely gem readme) could be supported too
banister is now known as banister`sleep
bricker`LA has quit [Quit: leaving]
<banister`sleep>
anyway bed time, thanks for the feedback pontiki :)
<banister`sleep>
nite
brisbin has joined #ruby
<whitenoise>
bonne nuit
saarinen has quit [Quit: saarinen]
<pontiki>
sure :)
amacgregor_ has joined #ruby
<pontiki>
ok, i'm embarassed to ask, how can i load a specific version of a gem i have installed in pry? (in this case i have a few versions of activesupport, and of course it's picking the oldest)
_helloworld_ has joined #ruby
amacgregor__ has joined #ruby
huoxito has quit [Read error: Connection reset by peer]
adeponte has joined #ruby
LaPetiteFromage has quit [Quit: LaPetiteFromage]
amacgregor has quit [Ping timeout: 264 seconds]
<banister`sleep>
pontiki: gem 'foo', '0.1.2'
<banister`sleep>
require 'foo'
<pontiki>
ta
ssvo has joined #ruby
<banister`sleep>
pontiki: tell me if: ? gem works ;)
huoxito has joined #ruby
amacgregor_ has quit [Ping timeout: 260 seconds]
bklane has quit [Remote host closed the connection]
<pontiki>
crud
DrShoggoth has joined #ruby
<whitenoise>
create read update destroy
tatsuya_o has joined #ruby
radic__ has joined #ruby
<pontiki>
c'est ma faute
<whitenoise>
lol
adeponte has quit [Ping timeout: 276 seconds]
benlieb has joined #ruby
tianyu has joined #ruby
<whitenoise>
qu'avez-vous fait?
tianyu has quit [Remote host closed the connection]
Vivekananda has quit [Ping timeout: 260 seconds]
hamakn has quit [Read error: Connection reset by peer]
radic_ has quit [Ping timeout: 276 seconds]
hamakn has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
robbyoconnor has quit [Remote host closed the connection]
Kruppe has joined #ruby
ccb has joined #ruby
narcan has joined #ruby
_helloworld_ has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 256 seconds]
<pontiki>
dk
bradsmith has quit [Remote host closed the connection]
<pontiki>
i am suddenly being stymied by gem
<pontiki>
if i say '$ gem list activesupport -i' it returns true
robbyoconnor has joined #ruby
<pontiki>
if i say '$ gem list activesupport' it returns activesupport (4.0.0, 3.2.13, 3.2.8)
<pontiki>
but if i say '$ gem which activesupport -a' it returns 'ERROR: Can't find ruby library file or shared library activesupport'
<whitenoise>
try active_support
<whitenoise>
pontiki: who taught you how to be inconsistent>
<pontiki>
oh crikey
<pontiki>
apeiros did
ehaliewicz has joined #ruby
efrainolivares has joined #ruby
ilyam has quit [Quit: ilyam]
freeayu has joined #ruby
JZTech101 has quit [Read error: Operation timed out]
<whitenoise>
i'm going to disappear for a bit. be back soons.
_helloworld_ has joined #ruby
whitenoise has quit [Remote host closed the connection]
ccb has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
ch_ has joined #ruby
ch_ has quit [Remote host closed the connection]
ch_ has joined #ruby
ch_ has quit [Remote host closed the connection]
JZTech101 has joined #ruby
_helloworld_ has quit [Remote host closed the connection]
bricker`LA has joined #ruby
Kricir has joined #ruby
endash has quit [Quit: endash]
madumo has quit [Quit: Dumb message bragging about my macbook pro]
anonymuse has quit [Remote host closed the connection]
<jerome__>
do u use jruby (i read have some implemented GUI inside)
<terrellt>
I've never needed to write a GUI for my ruby stuff?
<terrellt>
They're either command line utilities or things meant for the web.
stuartrexking has joined #ruby
<terrellt>
I mean, I guess HTML could count, but that's not what you mean. ;)
<jerome__>
ok.
<jerome__>
so you can not answer the question i ask, thanks...
narcan has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
enroxorz has joined #ruby
<zendeavor>
jerome__: whichever one suits your needs. there is no other valid answer.
nitish has joined #ruby
nanoxd has joined #ruby
<jerome__>
sure, i would like somethink for all OS portability and not to heavy to use.
ArchBeOS has quit [Ping timeout: 264 seconds]
enroxorz is now known as ArchBeOS
<jerome__>
so... i tried Tk, shoes (litlle bit), Fxruby, Qt...
ElCapitanMarklar has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jerome__>
Qt seems good for me due to the power back... and shoes easy to do it... Tk to old looking and not real portable as i want, wxwidget i just try now but dev seems to be stop
lewis has joined #ruby
kevinykchan has joined #ruby
<jerome__>
Fx ruby was good, but... complicate to make portable.
<zendeavor>
yeah from what i've gathered wx is stagnant
<jerome__>
coca is only for mac
airlok has quit [Remote host closed the connection]
<jerome__>
cocoa
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
<jerome__>
so... i don't know swing...
terrellt has quit [Ping timeout: 264 seconds]
<jerome__>
what did you think about swing ?
airlok has joined #ruby
ElCapitanMarklar has joined #ruby
<zendeavor>
nothing to comment, i don't write GUIs
ArchBeOS has quit [Read error: Connection reset by peer]
<jerome__>
thanks, next... (please, if you not use GUI, cool to not speak aboutu don't know, there is no way on this)
<jerome__>
how... zendeavor, for information, i arrived install wxruby and ruby on osx-10.6.8 i386
<jerome__>
i'm happy with this and you help me yesterday a little bit. Thanks man.
justsee has quit [Ping timeout: 264 seconds]
<sevenseacat>
oh not this guy again
airlok has quit [Ping timeout: 276 seconds]
syst3ml00t has joined #ruby
<zendeavor>
he'll get the netiquette down eventually
<popl>
before heat death?
<popl>
;P
BSaboia has quit [Ping timeout: 264 seconds]
syst3ml00t has quit [Read error: Connection reset by peer]
stkowski has quit [Quit: stkowski]
syst3ml00t has joined #ruby
corehook has joined #ruby
fgo has joined #ruby
r0bgleeson has quit [Ping timeout: 264 seconds]
<jerome__>
ok, bye ladies and gentlemen...
<jerome__>
and ladie-boys...
<sevenseacat>
lol
jerome__ has quit [Quit: jerome__]
apeiros_ has joined #ruby
Neener54 has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
<ravster>
hey all, how do I find the api docs for rspec's 'post' function?
x1337807x has joined #ruby
uris77 has quit [Quit: leaving]
ksmth has quit [Ping timeout: 248 seconds]
bzitzow has joined #ruby
<popl>
ravster: it's not on the rspec site?
<popl>
or linked to from
<popl>
?
<sevenseacat>
it is
ntus1017 has joined #ruby
<popl>
sevenseacat: I know it is because I'm looking at it.
<sevenseacat>
hehe
<popl>
sevenseacat: I see you're unfamiliar with the Socratic method.
<ravster>
doing a search for 'post' on the relishapp or rspec.info isn't giving me anything.
adambeynon has joined #ruby
adeponte has joined #ruby
<popl>
ravster: That's because the documentation is hosted elsewhere.
huttan has quit [Quit: leaving]
Spaceghost|cloud has joined #ruby
<popl>
ravster: But there are links on the website itself.
<popl>
ravster: There are also rdoc gems you can install
<ravster>
ok, thanks
bradhe has joined #ruby
Kruppe has quit [Remote host closed the connection]
<ElCapitanMarklar>
Has anyone ever struck this issue before? I've got a weird issue with bundler where it's setting a non existent SHA in the lock for a particular gem when I include a tag number in the Gemfile.
<ElCapitanMarklar>
e.g. If I put gem "my_gem", "0.1.1", :git => 'git@github.com:marklar/my_gem.git', :tag => '0.1.1' in the Gemfile
<ElCapitanMarklar>
The sha for that tag and the head of that repo which has just been bumped to 0.1.1 are both the same
<ElCapitanMarklar>
When I remove the tag info from the Gem file I get the correct sha in the lock file
<popl>
:|
kaspergrubbe has joined #ruby
kizzx2 has joined #ruby
Senjai has joined #ruby
Senjai has joined #ruby
kaspergrubbe has quit [Ping timeout: 240 seconds]
lewis has quit [Ping timeout: 246 seconds]
timonv has joined #ruby
smathieu has joined #ruby
dcope has joined #ruby
apeiros_ has quit [Remote host closed the connection]
wookiehangover has quit [Quit: i'm out]
Kabaka has quit [Ping timeout: 240 seconds]
tianyu69` has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 264 seconds]
dcope has quit [Ping timeout: 260 seconds]
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
ntus1017 has quit [Remote host closed the connection]
wookiehangover has joined #ruby
robert_ has joined #ruby
<robert_>
I don't get it; I'm trying to generate a CSV file for something, yet when the data has spaces in it, it won't quote it, but when I try to quote it, it over-quotes it. AND IT'S.. UUUGH.
corehook has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
nitish has quit [Remote host closed the connection]
redmenace has quit [Ping timeout: 240 seconds]
yfeldblum has joined #ruby
pen has joined #ruby
Kabaka has joined #ruby
chriskk has quit [Quit: chriskk]
<ryanf>
robert_: what is "it"? the csv library?
wallerdev has quit [Quit: wallerdev]
<ryanf>
it sounds like it doesn't think it's necessary to quote data just because it has spaces in it
sarkis has joined #ruby
<robert_>
well it is, otherwise the other end rejects it. :/
<popl>
what is "it"?
<robert_>
a company that has a csv parser
dtcrshr has quit [Ping timeout: 276 seconds]
<robert_>
I can't say much more than that- you would have to be in my position. it's not that I'm not allowed, just that it would take all night to explain the sitation. :P
nomenkun has joined #ruby
<sevenseacat>
well it doesnt sound like we can help you
<ryanf>
(if you aren't actually using that csv libary, you're fired)
<robert_>
lol, of course I am.
ntus1017 has joined #ruby
graydot has joined #ruby
<robert_>
ryanf: I also tried using a :converter, but that doesn't work.
<ryanf>
I'm sure it works for somebody
<ryanf>
force_quotes sounds like what you're looking for, though
<sevenseacat>
'doesnt work' is the most useless errror message ever
mfridh has quit [Ping timeout: 241 seconds]
huoxito has quit [Quit: Leaving]
sayan has joined #ruby
senayar has quit [Remote host closed the connection]
senayar has joined #ruby
adambeynon has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mfridh has joined #ruby
bzitzow has quit [Ping timeout: 248 seconds]
<Eiam>
man its a bit weird when the cleaning ladies start to talk to me cause they see me here every night =/
<Eiam>
"why are you here, go home!"
<Eiam>
yes, thank you for that, I was not aware
baroquebobcat has quit [Quit: baroquebobcat]
airlok has joined #ruby
baroquebobcat has joined #ruby
<pontiki>
they care about you
<pontiki>
no one should work as late as they do
senayar has quit [Ping timeout: 260 seconds]
pen has quit [Remote host closed the connection]
airlok has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
ilyam has joined #ruby
<robert_>
ryanf: yeah, it's what I'm looking for. Now I just have to normalize the CSV.
eldariof has quit [Ping timeout: 246 seconds]
bradhe has quit [Remote host closed the connection]
timonv has quit [Remote host closed the connection]
bradhe has joined #ruby
decoponio has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
brianpWins has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
dhruvasagar has quit [Read error: Connection reset by peer]
stevenrockarts has left #ruby [#ruby]
iliketurtles has joined #ruby
dhruvasagar has joined #ruby
iliketurtles has quit [Max SendQ exceeded]
pen has joined #ruby
Animawish has quit [Quit: Animawish]
<Eiam>
pontiki: lol
macmartine has joined #ruby
iliketurtles has joined #ruby
macmartine has quit [Client Quit]
justsee has quit [Quit: leaving]
justsee has joined #ruby
justsee has quit [Client Quit]
<Eiam>
i wonder for how many years they have walked into my office ,taking out my trash & cleaning it, wondering "what asshole works in this office"
<Eiam>
and now, the truth is out. they know.
<Eiam>
I'm that asshole.
syst3ml00t has quit [Ping timeout: 276 seconds]
ahawkins has quit [Ping timeout: 276 seconds]
<Eiam>
the guy with the words "Be Nice" on his whiteboard and strike marks slowly ticking out the # of times I've actually "been nice"
crucify_me has joined #ruby
airlok has joined #ruby
decoponio has quit [Quit: Restarting my PC]
pen has quit [Remote host closed the connection]
workmad3 has joined #ruby
centr0 has quit [Quit: centr0]
pranny has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
aganov has joined #ruby
Senjai has quit [Ping timeout: 276 seconds]
dagobah has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
pranny1 has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
smathieu has joined #ruby
ravster has quit [Quit: Leaving.]
ebanoid has joined #ruby
pranny has quit [Quit: Leaving.]
pranny has joined #ruby
grumpwork has quit [Remote host closed the connection]
stuartrexking has quit [Quit: Leaving...]
<sevenseacat>
literally? that would be awesome.
<Eiam>
yeah.. I literally have the words "Be Nice" on my whiteboard with tick marks next to it
graydog has joined #ruby
relix has joined #ruby
<sevenseacat>
haha
smathieu has quit [Ping timeout: 264 seconds]
<pontiki>
how many?
dhruvasagar has quit [Read error: Connection reset by peer]
<Eiam>
for the year?
baroquebobcat has joined #ruby
<pontiki>
sure
<Eiam>
2
dhruvasagar has joined #ruby
pranny1 has quit [Ping timeout: 240 seconds]
<pontiki>
heh
<Eiam>
yeah =/
noop has quit [Ping timeout: 246 seconds]
<Eiam>
my job basically entails telling people "No" a lot
zmansiv has quit [Ping timeout: 268 seconds]
<Eiam>
like, a lot.
<Eiam>
and people don't generally like being told no
<sevenseacat>
that wouldnt be fun after a while
<pontiki>
nod
<pontiki>
that is tough
<Eiam>
so being nice amounts to me saying "yes" to someone
larissa has quit [Quit: Leaving]
cads has quit [Ping timeout: 246 seconds]
<pontiki>
hmm
<Eiam>
without having a good reason behind feeling like being nice!
<Eiam>
sevenseacat: takes a certain kind of personality for sure! our team is pretty well knit I think we all get along really well =)
graydot has quit [Ping timeout: 276 seconds]
graydog is now known as graydot
<Eiam>
(its all our jobs to say no!)
decoponio has joined #ruby
<pontiki>
is that why you have to work past when the cleaning folks come in?
<sevenseacat>
:)
<Eiam>
pontiki: I work past when the cleaning folks come in because I wear many hats and sometimes those hats compete for my attention.
GeissT has joined #ruby
<Eiam>
products & software won't ship itself, and someone has to do the work
<pontiki>
no, i know, i was being sort of silly
<pontiki>
but not
<pontiki>
here's something i found odd
<Eiam>
i sent my wife & kids to her parents for a few weeks
<Eiam>
so i could just work -> sleep -> work
<Eiam>
without someone bothering me =)
<pontiki>
the company i worked for until recently is a small startup
<pontiki>
really sort of on the teetering edge
workmad3 has quit [Ping timeout: 260 seconds]
<pontiki>
no one, and i mean NO ONE, but me worked past 5
skasio has joined #ruby
<pontiki>
3 ppl came in before me
<Eiam>
different strokes I suppose!
<pontiki>
one person worked from home after hours
<Eiam>
I'm the only one here on this floor for sure
<Eiam>
the building next to me.. full of people
<Eiam>
lots & lots of people =)
<pontiki>
this is unusual for me
<pontiki>
but apparently that is the norm for this region
<Eiam>
i left at 1am last night and the parking lot was like, full of peoples
<Eiam>
i felt like a slacker for a minute!
<sevenseacat>
i like my job but working that much would drive me absolutely crazy.
dfjkl has joined #ruby
jprovazn has joined #ruby
<sevenseacat>
work to live, not live to work
<Eiam>
sevenseacat: I don't do it too often
<pontiki>
i know, sevenseacat, it never pays to be the hardest working person
<Eiam>
sevenseacat: ah, well. I love my job, where I work & what I do and what I work on. I wouldn't want to work like this all the time, but I don't mind it when my wife & kids aren't here
<Eiam>
I do mind it when they are here, and don't do it, I leave at 5:30 every day!
<Eiam>
... then when they go to sleep I work for 4 more hours haha
<sevenseacat>
lol
<Eiam>
but ssh don't tell them =)
vince_prignano has joined #ruby
<pontiki>
when it's something i love doing, and a project i love producing, i'll work long and hard
withnale has joined #ruby
<pontiki>
but it really never works out when i care more about things than the founders/managers do
<pontiki>
one of the reasons i prefer freelance
<pontiki>
"never work harder than your client"
stef_204 has joined #ruby
i_s has quit [Remote host closed the connection]
dfjkl_ has joined #ruby
mklappstuhl has joined #ruby
dfjkl_ has left #ruby [#ruby]
pranny has quit [Quit: Leaving.]
dfjkl has quit [Ping timeout: 264 seconds]
nomenkun has quit [Remote host closed the connection]
obiwahn has quit [Ping timeout: 276 seconds]
noop has joined #ruby
sarkis has quit [Ping timeout: 276 seconds]
ilyam has quit [Quit: ilyam]
mklappstuhl has quit [Ping timeout: 248 seconds]
ananthakumaran has joined #ruby
kaspergrubbe has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
tjad has quit [Remote host closed the connection]
hanmac has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
ahawkins has joined #ruby
blaxter_ has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
stanely_sobolev has quit [Ping timeout: 264 seconds]
goodgame has joined #ruby
threesome has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
sjltaylor has joined #ruby
_helloworld_ has joined #ruby
ElCapitanMarklar has quit [Quit: Textual IRC Client: www.textualapp.com]
airlok has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
Jdubs has joined #ruby
<Jdubs>
Hello! Anyone around tonight? Need some quick help with a rails problem but no one in #rails is there :(
_helloworld_ has quit [Ping timeout: 240 seconds]
druonysus has joined #ruby
* sevenseacat
looks at the 600 people in #rubyonrails
druonysus has quit [Read error: Connection reset by peer]
pranny has joined #ruby
cha1tanya has joined #ruby
cha1tanya has joined #ruby
druonysus has joined #ruby
druonysuse has quit [Client Quit]
clocKwize has joined #ruby
BizarreCake has joined #ruby
Jdubs has left #ruby [#ruby]
staafl has joined #ruby
max_ has joined #ruby
predator217 has quit [Quit: Reconnecting]
FranckyU has joined #ruby
predator117 has joined #ruby
FranckyU has quit [Client Quit]
bradhe has joined #ruby
<Eiam>
okay so brain lapse here..
<Eiam>
lets say you wanted to create a progress bar. You know done is 100%. You start at 0%. Your only value is how many un-applied values you have left. e.g. you start at 20, then move to 19, 18, 17,16,15
<Eiam>
so progress would be 100% at 0
jonkri has joined #ruby
amacgregor has joined #ruby
<Eiam>
so... abs(((18/20)*100) - 100)
<Eiam>
so at 18 remaining you'd be at 10%
bradhe has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby
cyong has quit [Quit: Leaving.]
<Eiam>
seem right?
<Eiam>
better way to do it?
<pontiki>
not really
amacgregor__ has quit [Ping timeout: 264 seconds]
sjltaylor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Eiam>
not really right
<Eiam>
or not really better way?
<pontiki>
i can't think of another way
<Eiam>
okay thanks
<Eiam>
=)
tonini has joined #ruby
<pontiki>
100 - (n/m)*100 might look simpler
<pontiki>
then you don't need the abs
<Eiam>
oh, right
<Eiam>
nice, thakns
coyo has quit [Ping timeout: 240 seconds]
wesside has quit [Quit: Computer has gone to sleep.]
coyo has joined #ruby
St_Marx has quit [Remote host closed the connection]
sayan has quit [Ping timeout: 240 seconds]
jim0thy_ has joined #ruby
MrZYX|off is now known as MrZYX
smathieu has joined #ruby
athst has quit [Quit: athst]
yfeldblum has quit [Quit: Leaving]
browndawg has quit [Ping timeout: 264 seconds]
browndawg has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
Ciscoridze has joined #ruby
Tacit_AFK has quit [Ping timeout: 264 seconds]
BizarreCake has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
mupkoo has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
jim0thy_ has quit [Quit: jim0thy_]
Tacit_AFK has joined #ruby
ananthakumaran has joined #ruby
marr has joined #ruby
browndawg has quit [Ping timeout: 264 seconds]
threesome has joined #ruby
troessner has joined #ruby
senayar has joined #ruby
mneorr has joined #ruby
sayan has joined #ruby
hagzag has joined #ruby
browndawg has joined #ruby
marr123 has joined #ruby
arturaz has joined #ruby
marr123 has quit [Client Quit]
marr has quit [Ping timeout: 264 seconds]
Coffers has joined #ruby
freeayu has quit [Read error: Connection reset by peer]
freeayu has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
dhruvasagar has quit [Read error: Connection reset by peer]
withnale has quit [Remote host closed the connection]
dhruvasagar has joined #ruby
withnale has joined #ruby
withnale has quit [Remote host closed the connection]
marr has joined #ruby
benlieb has quit [Quit: benlieb]
ananthakumaran has joined #ruby
barratt has joined #ruby
olivier_bK has joined #ruby
amacgregor has quit [Ping timeout: 264 seconds]
withnale has joined #ruby
ilyam has joined #ruby
benlieb has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
hamakn has quit [Read error: Connection reset by peer]
hamakn has joined #ruby
flou has joined #ruby
blackmesa has joined #ruby
airlok has joined #ruby
kaspergr_ has joined #ruby
trepidaciousMBR has quit [Quit: trepidaciousMBR]
allsystemsarego has joined #ruby
freeayu has quit [Ping timeout: 240 seconds]
tatsuya_o has joined #ruby
airlok has quit [Ping timeout: 264 seconds]
rpgsimmaster has quit [Remote host closed the connection]
freeayu has joined #ruby
rpgsimmaster has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
freeayu__ has joined #ruby
jfelchner has joined #ruby
gstamp has quit [Quit: Computer has gone to sleep.]
noname001 has joined #ruby
crucify_me has quit [Remote host closed the connection]
freeayu has quit [Ping timeout: 264 seconds]
stef_204 has quit [Remote host closed the connection]
ephemerian has joined #ruby
sayan has quit [Read error: Connection reset by peer]
pontiki has quit [Quit: "Poets have been mysteriously silent on the subject of cheese." -- G.K.Chesterson]
zoee has joined #ruby
robbyoconnor has quit [Remote host closed the connection]
Xeago has joined #ruby
robbyoconnor has joined #ruby
mikecmpbll has joined #ruby
lkba has quit [Read error: Connection reset by peer]
<mikecmpbll>
i didn't realise, but it seems like it's kind of possible to pass a method to instance_eval? it executes and then returns error.
ahawkins has quit [Quit: Lost terminal]
freeayu__ has quit [Ping timeout: 264 seconds]
<mikecmpbll>
def do_it() puts "hi!" end instance_eval(&do_it)
jim0thy_ has joined #ruby
<mikecmpbll>
ah never mind, seems it's evaluating the method before instance_eval. thought it was kinda odd.
ahawkins has joined #ruby
ilyam has quit [Quit: ilyam]
<Eiam>
nite all
<sevenseacat>
see ya dood
fgo has quit [Remote host closed the connection]
camilasan has joined #ruby
fixl has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
ananthakumaran has quit [Read error: Connection reset by peer]
kaspergr_ is now known as kaspergrubbe
browndawg has quit [Ping timeout: 260 seconds]
xcv has joined #ruby
ananthakumaran has joined #ruby
elaptics`away is now known as elaptics
smathieu has joined #ruby
dhruvasagar has joined #ruby
kek has joined #ruby
ghr has joined #ruby
sayan has joined #ruby
browndawg has joined #ruby
freeayu has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
shredding has joined #ruby
camilasan has quit [Remote host closed the connection]
pallavi has joined #ruby
nomenkun has joined #ruby
camilasan has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
hamed_r has joined #ruby
trepidaciousMBR has joined #ruby
Al_ has joined #ruby
sjltaylor has joined #ruby
rdark has joined #ruby
lkba has joined #ruby
Macaveli has joined #ruby
<Macaveli>
Hello what's the tutorial to learn on how to do select on your Rails Table: e.g. Users.first, but I want for example to search for a specific user. Where can I learn thsi? :)
Gonzih has joined #ruby
<sevenseacat>
not in a non-rails channel, for starters.
Macaveli has left #ruby [#ruby]
fgo has joined #ruby
coder_neo has joined #ruby
Ciscoridze has quit [Quit: WeeChat 0.4.1]
Ciscoridze has joined #ruby
pedda has joined #ruby
xpirator has joined #ruby
klaut has joined #ruby
adeponte has quit [Remote host closed the connection]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
brianpWins has quit [Quit: brianpWins]
lapsa has joined #ruby
s2r2 has left #ruby [#ruby]
sdkjdfgkj has joined #ruby
Neener54 has quit [Ping timeout: 248 seconds]
sdkjdfgkj is now known as TaiftaX
browndawg has joined #ruby
staafl has quit [Ping timeout: 240 seconds]
Neener54 has joined #ruby
AlSquire has joined #ruby
mercwithamouth has quit [Ping timeout: 248 seconds]
gokul has joined #ruby
Bry8Star{T2 has quit [Remote host closed the connection]
mercwithamouth has joined #ruby
jeremy_c_ has joined #ruby
octarine has quit [Ping timeout: 245 seconds]
BizarreCake has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
Bry8Star{T2 has joined #ruby
gadgetoid has quit [Ping timeout: 240 seconds]
hamakn has joined #ruby
jeremy_c has quit [Ping timeout: 264 seconds]
jeremy_c_ is now known as jeremy_c
smathieu has joined #ruby
cam`_ has quit [Ping timeout: 264 seconds]
nari has quit [Ping timeout: 245 seconds]
bluehavana has quit [Ping timeout: 264 seconds]
TheHodge has quit [Ping timeout: 264 seconds]
jgrevich has quit [Ping timeout: 245 seconds]
Mon_Ouie has joined #ruby
smathieu has quit [Ping timeout: 240 seconds]
mootpointer has quit [Ping timeout: 256 seconds]
pygospa has quit [Ping timeout: 246 seconds]
aces1up has quit []
jgrevich has joined #ruby
mneorr has quit [Ping timeout: 260 seconds]
gadgetoid has joined #ruby
mneorr has joined #ruby
TheHodge has joined #ruby
pygospa has joined #ruby
tonini has quit [Remote host closed the connection]
trepidaciousMBR has quit [Quit: trepidaciousMBR]
trepidaciousMBR has joined #ruby
AlSquire has quit [Read error: Connection reset by peer]
threesome has quit [Read error: Operation timed out]
threesome has joined #ruby
fgo has joined #ruby
ananthakumaran has quit [Read error: Connection reset by peer]
fgo has quit [Remote host closed the connection]
browndawg has quit [Quit: Leaving.]
ananthakumaran has joined #ruby
fgo has joined #ruby
dhruvasagar has quit [Read error: Connection reset by peer]
dhruvasagar has joined #ruby
ghr has joined #ruby
fuzzy has joined #ruby
lapsa has left #ruby [#ruby]
jonkri has quit [Quit: jonkri]
<fuzzy>
Hi i'm trying to use google's i feel lucky with nokogiri and i'm getting a bunch of javascript stuff which i believe is the re-direct code. Could anyone tell me how to get nokogiri to follow this or some other method to solving this problem?
poga has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
adeponte has joined #ruby
postmodern has quit [Quit: Leaving]
ehaliewicz has quit [Remote host closed the connection]
lkba has quit [Ping timeout: 276 seconds]
akemrir has joined #ruby
akemrir has quit [Client Quit]
osvico has joined #ruby
akemrir has joined #ruby
shaunbak_ has joined #ruby
drizz has quit [Read error: Operation timed out]
S0da has quit [Read error: Operation timed out]
foobArrrr has quit [Read error: Operation timed out]
klaas has quit [Read error: Connection reset by peer]
kung has joined #ruby
realDAB has joined #ruby
parus has quit [Read error: Operation timed out]
klaas has joined #ruby
akerl has quit [Read error: Operation timed out]
kek has quit [Read error: Connection reset by peer]
airlok has joined #ruby
shaunbaker has quit [Read error: Operation timed out]
kek has joined #ruby
Neener54 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MrZYX is now known as MrZYX|off
adeponte has quit [Ping timeout: 256 seconds]
devyn has quit [Read error: Operation timed out]
<hanmac>
fuzzy, nokogiri cant do what, nokogiri its can only parse or build xml code, it does not know about javascript
maxmanders has quit [Ping timeout: 240 seconds]
ewnd9 has quit [Read error: Operation timed out]
<fuzzy>
Is there any way around it via Ruby?
chinkung has quit [Ping timeout: 256 seconds]
vlad_starkov has joined #ruby
ewnd9 has joined #ruby
sayan has quit [Remote host closed the connection]
kaspergrubbe has quit [Remote host closed the connection]
akerl has joined #ruby
aganov has quit [Ping timeout: 246 seconds]
cj3kim has quit [Remote host closed the connection]
<shevy>
shredding you could make it your own rule to use "" only when you also use #{} or #
<claymore>
Mon_Ouie: but how does it know to call new on it?
<claymore>
I figured it was calling new somewhere
<shevy>
shredding, $x = 'test'; y = "this is a #$x" # => "this is a test"
<AikiLinux>
when i put the 'depends-on' value in a single quote string - it works , but in the example i provided it does not create the text at all
raphaelivan_ has joined #ruby
<shredding>
shevy: Okay, i got the difference, just thought there'd be a common standard.
vlad_starkov has joined #ruby
<Mon_Ouie>
What do you mean? It just calls it directly
<shredding>
Thanks.
<Mon_Ouie>
def Vector.[](*array)
<waxjar>
for loops are a big nono AikiLinux :p
<shevy>
shredding but it's not a huge deal either. you could use '' too and append ... y = 'this is a '+$x or rather y = 'this is a '+$x.to_s to safeguard against nil (which #{} in "" is doing, I think it calls .to_s on the object)
anay has quit [Ping timeout: 276 seconds]
<Mon_Ouie>
def Vector.[](*array); new convert_to_array(array, false); end
<shevy>
shredding hmmm trying to find a standard in ruby can be difficult :)
hamakn has joined #ruby
<shevy>
shredding I think most people tend to use "" all the time, I use '' mostly
ananthakumaran has joined #ruby
mneorr has quit [Remote host closed the connection]
<shredding>
shevy: Okay, it's because I use PHP and python and standardization is a big thing there.
<claymore>
Mon_Ouie: hmm, ok
<shevy>
cool
<shredding>
(Not so much in python though)
<waxjar>
standardization a big thing in php?
<shevy>
you are kinda multilingual
relix has joined #ruby
<claymore>
it's a bit clearer now, thanks
raphaelivan_ has left #ruby [#ruby]
BSaboia has joined #ruby
<heftig>
php is an organically grown mess
niceguyjames has quit [Quit: Computer has gone to sleep.]
<shredding>
come on guys, not everytime.
<shevy>
php is like 100 cooks cooking a meal as quickly as possible :D
<shevy>
python is where there is only one cook, he is very strict but knows what he is doing
anay has joined #ruby
<shredding>
I found python very similar to ruby so far.
<shevy>
ruby is like a cook who starts to cook, then wanders off to do random other things... like writing a book while also cooking at the same time
<shevy>
shredding hmm it depends
<clocKwize>
python is good, php not so. No flame wars though :D
<shredding>
But i really start to like ruby, this passing around code blocks is very cool.
<shevy>
from the syntax I think they are quite similar
niceguyjames has joined #ruby
vlad_sta_ has joined #ruby
<shevy>
but the philosophy is very, very different
cody-- has joined #ruby
<shredding>
shevy: is it?
<shevy>
implicit vs. explicit self for instance
<heftig>
that's also a consequence of ruby ALWAYS having a "self"
<heftig>
there's no context where self is unavailable
<shevy>
shredding, yeah.. the "there is more than one way to solve a problem", this shows in ruby and can become more complex :( It can be hard to understand code written by others, python code seems easier to understand most of the time
emergion has joined #ruby
<waxjar>
was python an OO language from the start?
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has quit [Remote host closed the connection]
<shevy>
what I dislike about explicit self is that I wonder why an OO language needs to always be told where self is
<shevy>
waxjar I am not sure... it depends on the definition perhaps... but I think they always said they are an OO language
<heftig>
rust transitioned from implicit self to explicit self
grumpwork has quit [Remote host closed the connection]
<shevy>
I heard of python in ... 1998 or 1999 or something like that first, right after discovering perl .cgi, a guy from germany wrote his scripts in python back then, when perl was quite the hype still (for old school browser games)
ecart has left #ruby ["[CyberScript]"]
<shevy>
I heard of ruby only later
vlad_starkov has joined #ruby
sevenseacat has joined #ruby
<shredding>
shevy: it python everything is basically a property.
<heftig>
to distinguish functions and methods, and because there are multiple ways self can be passed
MrZYX|off is now known as MrZYX
Xeago has quit [Remote host closed the connection]
anay has quit [Remote host closed the connection]
Matriks has quit [Remote host closed the connection]
<shredding>
So methods do not have any real binding to it's class, they are just function patched to an object.
<shredding>
But e.g. django does thinks like defining a model property like id = model.Integer(…) and then allows you to request id and get an integer in return and not an instance of the model.Integer() class.
<shevy>
haha me neither :)
<clocKwize>
I don't think I've used method
<shevy>
I am often trying to find use cases for things in ruby...
tomzx_mac has joined #ruby
* hanmac
used method for callbacks
tanema has joined #ruby
<clocKwize>
hanmac: not blocks :o
<shevy>
lambda is a good example, I still have not found a great use case for it
r0bgleeson has joined #ruby
<shredding>
I've used method already once :)
<shevy>
rack code uses lambda a lot
<hanmac>
clocKwize: i mean that the callback works with blocks but it also works with method objects with &
<clocKwize>
ahh hanmac
<clocKwize>
I've used that, but only used not written support for
udoprog has quit [Read error: Operation timed out]
<shredding>
shevy: What's rack code?
v0n has joined #ruby
<clocKwize>
I map(&:something) then reduce(&:+) like a pro
nezumi has quit [Ping timeout: 240 seconds]
corehook has quit [Ping timeout: 264 seconds]
<clocKwize>
shredding: rack is the layer between a web server and a ruby web app… everything runs on it, rails, sinatra, etc, etc
<shredding>
Ah, nice to know.
<shevy>
shredding rack the famous webserver interface look at this page briefly http://rack.github.io/
geekbri has joined #ruby
<clocKwize>
then web servers just have to know how to talk to a rack app
<shredding>
I've used method to reuse a code block like this: orders.collect!(&method(:extract_foreign_ids))
<shredding>
Ah, like mod_wsgi
<shevy>
clocKwize, yeah, I use & for short things like that too
<clocKwize>
rack at its most basic is a class with a method called call, which takes the request hash and returns an array [status_code, headers-hash, response-body]
<shevy>
%w( a b c ).map(&:upcase) # => ["A", "B", "C"]
<shevy>
I can avoid having to use a variable that way
brbcoding has joined #ruby
<shevy>
%w( a b c ).map {|_| _.upcase } # => ["A", "B", "C"]
banister`sleep has joined #ruby
<hanmac>
clocKwize: for sample some code of my bindings: Button.new(self,id: :close).tap {|button| button.bind(:button_clicked,method(:on_close)}
<clocKwize>
shevy: _ shouldn't be used like that
Kibs has joined #ruby
agatha has joined #ruby
jfine has joined #ruby
<banister`sleep>
shredding: if you use funkify you can just do this: orders.collect(&extract_foreign_ids)
<shevy>
hehe why not? It's the coolest variable... it has no name! :D
BizarreCake has quit [Read error: Connection reset by peer]
ewag has joined #ruby
Xeago has joined #ruby
scarolan has joined #ruby
tomzx_mac has quit [Ping timeout: 248 seconds]
blackmesa has joined #ruby
claymore has quit [Ping timeout: 264 seconds]
DrCode has quit [Ping timeout: 240 seconds]
binary1985 has quit []
vlad_starkov has quit [Remote host closed the connection]
mneorr has joined #ruby
tabolario has joined #ruby
<olivier_bK>
how i can find in ruby all file with ending by .avi ?
pentameter has joined #ruby
mneorr has quit [Remote host closed the connection]
<olivier_bK>
i try File.extname("*.avi") i get nothing or i try File.basename("*.avi") idem
<canton7>
Dir['*.avi']
<canton7>
(looks in the current directory)
DrCode has joined #ruby
allthingsdg has joined #ruby
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jonathanwallace has joined #ruby
sparr_ has joined #ruby
BSaboia has quit [Ping timeout: 264 seconds]
tonini has joined #ruby
<olivier_bK>
i found Dir.glob('*.mp4')
sparr_ has quit [Max SendQ exceeded]
<olivier_bK>
thanks canton7
ravster has joined #ruby
asteve has joined #ruby
<canton7>
yup, Dir.glob(...) and Dir[...] do the same thing
<pontiki>
hallo
Xeago has quit [Ping timeout: 248 seconds]
mmitchell has joined #ruby
<olivier_bK>
hallo
<olivier_bK>
:)
<ravster>
aloha
wald0 has joined #ruby
grumpwork has joined #ruby
ehc has quit [Ping timeout: 246 seconds]
ehc_ has joined #ruby
sparr_ has joined #ruby
<billy_ran_away>
If I have a hash and some of the keys are strings of numbers (and others aren't) anyone know a slick one-liner to convert those that are numbers into integers?
<wald0>
Im deciding if to switch or not to ruby for develop simple GUI applications, so Im doing a few tests, unfortunately Im unable to make this simple test working, any idea ? http://paste.debian.net/23667/
DaniG2k has joined #ruby
tanema has quit [Remote host closed the connection]
banister has quit [Remote host closed the connection]
<pontiki>
billy_ran_away: do you need to do this conversion recursively through the hash? or just at the top level?
<MrZYX>
wald0: go beyond "does not work", error message, expect vs actual output, anything
<billy_ran_away>
pontiki: Just top level thank God!
hashbangchris has quit [Quit: mt]
<pontiki>
lol
tmme has joined #ruby
Matriks has joined #ruby
<wald0>
my test should simply open a dialog window with a message in your language
<wald0>
MrZYX: it should run the "zenity" command with the message inlcluded in the variable "text", but instead of that, the zenity command shows an error, it is strange so it looks like it is correctly run
atmosx has joined #ruby
<MrZYX>
you're unspecific again
baordog has joined #ruby
<MrZYX>
what is the error
Matriks has quit [Read error: Connection reset by peer]
<wald0>
MrZYX: the zenity command shows an error instead of run, the error is: This option is not available. Please see --help for all possible usages.
<MrZYX>
pontiki: DaniG2k also in this case #delete
<billy_ran_away>
I got this… { "1" => :foo, "also string" => :bar }.reduce({}) { |memo, (k, v)| { k.to_i == 0 ? k : k.to_i => v }.merge(memo) }
<billy_ran_away>
Anyone got anything slicker?
maxmanders has quit [Quit: Computer has gone to sleep.]
<wald0>
MrZYX: so basically seems like something is wrong using subexec, or me using my variable inside the command, maybe im doing it wrong ? (novice here)
atmosx has quit [Client Quit]
<MrZYX>
there's no ' in the argument your interpolating?
<pontiki>
billy_ran_away: what if k = "0" ?
<billy_ran_away>
Can't happen.
<billy_ran_away>
Won't happen.
<billy_ran_away>
Shouldn't happen.
<Sou|cutter>
billy_ran_away: that's more or less what I would have come up with
maxmanders has joined #ruby
<pontiki>
haha
<pontiki>
that's when it WILL happen :)
<billy_ran_away>
:)
<billy_ran_away>
There record IDs...
<billy_ran_away>
They're I mean.
AikiLinux has left #ruby ["Leaving is such sweet sorrow."]
<billy_ran_away>
Sou|cutter: Sweet, great minds think alike?
<pontiki>
i did k=k.to_if if k.match(/^([+-])?\d+$/
<billy_ran_away>
Also mediocre ones too...
<pontiki>
well
axl_ has joined #ruby
ntus1017 has joined #ruby
<billy_ran_away>
pontiki: Never seen that regex before...
<billy_ran_away>
the [+-] what's that for?
<Sou|cutter>
pontiki: yeah, that is more accurate for 0
<Sou|cutter>
billy_ran_away: negative numbers
<pontiki>
hash.each{|k,v| k=k.to_i if k.match(/^([+-])?\d+$/)}
<pontiki>
"+1" is a number
<pontiki>
"-12" is a number
<billy_ran_away>
pontiki: Now that would just return an array of the keys wouldn't it?
<pontiki>
the merge at the end will leave your array with both "1" and 1 as keys, btw
sjltaylor has joined #ruby
Kricir has joined #ruby
<pontiki>
oh crikey yeah
<billy_ran_away>
No, that merge is inside the proc block for the reduce, the memo object starts fresh as {}
<pontiki>
oh right, ok
<DaniG2k>
if i have an xml file with a bunch of <resource url.../> tags that I'd like to split into an array
<pontiki>
i should go back to bed
<DaniG2k>
how can i do this?
<billy_ran_away>
I like doing merges for reducing hashes so I don't have to explicity return the hash, unlike say this form… memo[new_key…] = v; memo
brennanMKE has quit [Remote host closed the connection]
<billy_ran_away>
since the merge returns the new hash
<billy_ran_away>
err modified hash
binary1985 has joined #ruby
<DaniG2k>
im trying with file.split(/(<resource.*\/>)/) but it doesnt seem to make it into an array
BillCriswell has joined #ruby
cj3kim has joined #ruby
<pontiki>
split throws away whatever your splitting on
<pontiki>
i think you'd rather have scan there instead of split
<pontiki>
that regexp is greedy tho
<pontiki>
it will match everything up the last /> it can find
bklane has quit [Remote host closed the connection]
joshu_ has quit [Ping timeout: 276 seconds]
<DaniG2k>
well its greedy cause i need to get all of them
<DaniG2k>
but split on the regex
rhys has joined #ruby
zalesz_driv3r has joined #ruby
tmme has quit [Ping timeout: 246 seconds]
devoldmx3 has joined #ruby
anay has joined #ruby
freerobby has joined #ruby
bradsmith has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
kiri has quit [Ping timeout: 240 seconds]
jonathanwallace has quit [Quit: WeeChat 0.4.0]
Kruppe has quit [Remote host closed the connection]
DaniG2k has quit [Quit: Lost terminal]
devoldmx has quit [Ping timeout: 260 seconds]
Matriks has joined #ruby
DaniG2k has joined #ruby
jlast has joined #ruby
Kricir has quit [Ping timeout: 248 seconds]
ffranz has joined #ruby
zachrab has joined #ruby
anay has quit [Remote host closed the connection]
d2dchat_ has joined #ruby
bklane has joined #ruby
_kylc has quit [Ping timeout: 276 seconds]
mercwithamouth has quit [Ping timeout: 264 seconds]
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<MrZYX>
in fact it proves that it isn't an array
<pontiki>
olivier_bK: please post your *actual* code in a gist
<MrZYX>
Array#to_str doesn't append .file
<shevy>
olivier_bK that does not make any sense man
<olivier_bK>
ohhh
bradsmith has quit [Remote host closed the connection]
gemmy has joined #ruby
Kricir has joined #ruby
JZTech101 has joined #ruby
nanoxd has joined #ruby
<shevy>
really do require 'pp'; pp @video_file.class <--- on all your variables. in your above code you have a string object, not an array. if you really would have an array, you could do this:
arya_ has quit [Ping timeout: 264 seconds]
<MrZYX>
also your variable names should be plurals if they're intended to be arrays
mansi_ has quit [Remote host closed the connection]
ChristianS has quit [Excess Flood]
ChristianS has joined #ruby
camilasa_ has quit [Read error: Connection reset by peer]
mklappst_ has quit [Remote host closed the connection]
arya_ has joined #ruby
arya_ has quit [Client Quit]
tanema has joined #ruby
rodacato has joined #ruby
smathieu has quit [Ping timeout: 246 seconds]
cody-- has quit [Quit: Computer has gone to sleep.]
kaspergrubbe has quit [Remote host closed the connection]
cmarques_ has joined #ruby
cody-- has joined #ruby
arya_ has joined #ruby
Kricir has quit [Remote host closed the connection]
joshu has joined #ruby
joshu has quit [Remote host closed the connection]
rbento has quit [Quit: ZZZzzz…]
joshu has joined #ruby
kobain has joined #ruby
blaxter_ has quit [Quit: foo]
jerius has joined #ruby
Spooner has quit [Remote host closed the connection]
nathandial has quit [Quit: Leaving.]
cody-- has quit [Client Quit]
cmarques has quit [Ping timeout: 264 seconds]
hamed_r has quit [Quit: Ex-Chat]
robert__ has quit [Quit: Connection reset by traffic clause.]
kiri has quit [Ping timeout: 264 seconds]
devoldmx has quit [Read error: Connection reset by peer]
flou has joined #ruby
cody-- has joined #ruby
alex__c2022 has joined #ruby
threesome has quit [Read error: Operation timed out]
cody-- has quit [Client Quit]
w1zeman1p has joined #ruby
blaxter_ has joined #ruby
freerobby has quit [Quit: Leaving.]
cody-- has joined #ruby
nathandial has joined #ruby
stuartrexking has joined #ruby
freerobby has joined #ruby
devoldmx has joined #ruby
rodacato has quit [Remote host closed the connection]
danman has joined #ruby
JZTech101 has quit [Quit: Bye]
kaspergrubbe has joined #ruby
baroquebobcat has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
axl_ has quit [Quit: axl_]
sparr_ has joined #ruby
Vivekananda has joined #ruby
airlok has joined #ruby
Vivekananda has quit [Read error: Connection reset by peer]
Vivekananda has joined #ruby
<wald0>
MrZYX: sorry, i was out... right, there's no ' values
mneorr has quit [Remote host closed the connection]
hogeo has joined #ruby
<wald0>
MrZYX: i have noticed that including #{var} without '' it shows only the single word (correctly translated), but not the entire sentence
zalesz_driv3r has quit [Quit: Wychodzi]
Morrolan has quit [Ping timeout: 245 seconds]
tmme has joined #ruby
blaxter_ is now known as blaxter
banister_ has joined #ruby
aganov has quit [Remote host closed the connection]
<MrZYX>
if I copy paste your example it works for me
<wald0>
with "echo" it shows correctly the sentence, this is very strange
<MrZYX>
using english as system locale
theRoUS has quit [Ping timeout: 264 seconds]
<wald0>
MrZYX: try to prepend a different locale, for example mine (which is hte one that not works) is spanish, so: LC_ALL=es_ES.UTF-8 zenity --info...
<wald0>
or try to prepend set_locale "value" which i think that is the correct ruby equivalent
<wald0>
i mean, previous line (not tried)
abstrusenick has joined #ruby
rodacato has joined #ruby
troessner has quit [Ping timeout: 246 seconds]
<MrZYX>
I guess I just don't have the necessary translations
<wald0>
MrZYX: well, tried, it works too on english but translating the message to spanish for example returns an error in zenity
iliketurtles has joined #ruby
<MrZYX>
so copy paste the translated message
iliketurtles has quit [Max SendQ exceeded]
loye1234 has joined #ruby
Tricon has joined #ruby
b00stfr3ak has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
iliketurtles has joined #ruby
lebek has joined #ruby
<wald0>
MrZYX: maybe your OS has not the spanish locale generated (which i dont know if is a reason for not work, but maybe), otherwise it should work for you using "echo" instead of zenity (correctly shows the translated message" and including a previous line saying: set_locale "es_ES.UTF-8"
<wald0>
Todas las actualizaciones están terminadas.
splittingred_ has joined #ruby
bricker`LA has quit [Quit: leaving]
lunarjar has quit [Ping timeout: 245 seconds]
zoee has quit [Read error: Operation timed out]
airlok has quit [Remote host closed the connection]
splittingred has quit [Ping timeout: 264 seconds]
splittingred_ is now known as splittingred
<MrZYX>
it still works for me if I do text = "Todas las actualizaciones están terminadas."
Morrolan has joined #ruby
tommyvyo has joined #ruby
sethetter has joined #ruby
lunarjar has joined #ruby
cj3kim has joined #ruby
marcdel has joined #ruby
sjltaylor has joined #ruby
Megtastique has quit [Quit: Megtastique]
rbento has joined #ruby
stuartrexking has quit [Quit: Leaving...]
<wald0>
MrZYX: very strange, doing the same thing as you doens't works for me... at least using á
rodacato has quit [Remote host closed the connection]
JDHankle has joined #ruby
<MrZYX>
which ruby version?
<wald0>
1.9.3
DaniG2k has quit [Quit: leaving]
cj3kim has quit [Ping timeout: 264 seconds]
rodacato has joined #ruby
daniel_hinojosa has joined #ruby
<wald0>
MrZYX: btw if i do "echo $LANG" it shows me "C", which i think that it should have problems showing utf8 chars... this can be the cause that subexec doesn't runs correctly the command
<MrZYX>
try adding the magic comment as first/second line to interpret the file as utf8: # encoding: utf-8
stuartrexking has joined #ruby
abstrusenick has quit [Quit: abstrusenick]
<wald0>
same thing
axl_ has joined #ruby
flou has quit [Ping timeout: 264 seconds]
ghr has quit [Quit: Computer has gone to sleep.]
Uranio has joined #ruby
<MrZYX>
with that it works for me on 1.9 too
iliketurtles has quit [Quit: zzzzz…..]
bamdad has joined #ruby
xargoon has quit [Ping timeout: 245 seconds]
hogeo has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
theRoUS has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
<wald0>
MrZYX: tell me if this one popups you the window correctly in spanish, and also see if in the last line in your terminal it says "C" or other thing (before :END) http://paste.debian.net/23688/
<ryanf>
you can probably use a match group instead of lookbehind
<ryanf>
what exactly are you trying to do?
havenwood has joined #ruby
shaunbaker has joined #ruby
AndChat| has joined #ruby
devoldmx has quit [Read error: No route to host]
<ryanf>
actually you might not even need that
<ryanf>
[10] pry(main)> "should this not be valid".gsub(/this .*/, "\\0 be valid")
<ryanf>
=> "should this not be valid be valid"
iliketurtles has quit [Quit: zzzzz…..]
athst has joined #ruby
bradsmith has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
tricon_ has joined #ruby
devoldmx has joined #ruby
devoldmx has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
devoldmx has joined #ruby
bradsmith has joined #ruby
airlok has quit [Ping timeout: 264 seconds]
Banistergalaxy has quit [Ping timeout: 260 seconds]
<Torstein>
im trying to convert a line of text into a markdown headline. that is, i know that the headline is in the form "Breaking: something something unique".
<Torstein>
so the next line should be "=====..."
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Tricon has quit [Ping timeout: 245 seconds]
tmme has quit [Remote host closed the connection]
Tricon has joined #ruby
<MrZYX>
so you're condition is that it starts with Breaking and you want to insert ======= at the next line?
<Torstein>
yeah
lebek has joined #ruby
<MrZYX>
iterate all lines, build a new array on the go, insert the additional line if line =~ /^Breaking:/
hamakn has quit [Remote host closed the connection]
<ryanf>
gsub with a block wouldn't be a bad call here actually
hamakn has joined #ruby
S0da has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
<ryanf>
but you don't need lookbehind. you can just write the pattern normally, then make the block add the appropriate number of =s etc
tricon_ has quit [Ping timeout: 240 seconds]
heftig_ has joined #ruby
<ramblex>
Torstein: or you could use atx-style headers: # Breaking:
vlad_starkov has joined #ruby
JZTech102 has joined #ruby
<Torstein>
thats probably the best way ramblex :)
endzyme has quit []
vlad_starkov has quit [Read error: Connection reset by peer]
IceDragon has joined #ruby
JZTech101 has quit [Disconnected by services]
vlad_starkov has joined #ruby
heftig_ has joined #ruby
heftig_ has quit [Changing host]
saintcajetan has joined #ruby
JZTech102 has quit [Client Quit]
JZTech101 has joined #ruby
benlieb has joined #ruby
olivier_bK has quit [Read error: Operation timed out]
<joelteon>
also "Symbol not found: _ruby_digitmap" returns 4 google results which are all useless
anay has quit [Remote host closed the connection]
<cek>
why isn't db:migrate:reset showing at me?
anay has joined #ruby
<MrZYX>
cek: -> #RubyOnRails
jonathanwallace has quit [Quit: WeeChat 0.4.1]
jonathanwallace has joined #ruby
brianpWins has joined #ruby
jonathanwallace has quit [Client Quit]
airlok has joined #ruby
freerobby has quit [Quit: Leaving.]
jonathanwallace has joined #ruby
mneorr has joined #ruby
airlok has quit [Remote host closed the connection]
jonathanwallace has quit [Client Quit]
Zai00 has quit [Quit: Zai00]
cj3kim has quit [Ping timeout: 240 seconds]
Al_ has quit [Quit: Al_]
jprovazn has quit [Quit: Odcházím]
athst has quit [Quit: athst]
kpshek has quit []
freerobby has joined #ruby
mtmcfarl has quit [Remote host closed the connection]
anay has quit [Ping timeout: 246 seconds]
workmad3 has quit [Ping timeout: 248 seconds]
banister_ has quit [Remote host closed the connection]
ilyam has joined #ruby
burlyscudd has joined #ruby
jonathanwallace has joined #ruby
futile has joined #ruby
athst has joined #ruby
<joelteon>
ah, never mind, I got it
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
splittingred has quit [Quit: splittingred]
havenwood has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
ehc_ has quit [Quit: ehc_]
splittingred has joined #ruby
zastern has quit [Remote host closed the connection]
zastern has joined #ruby
kirun has joined #ruby
Es0teric has joined #ruby
companion is now known as Companion
Adawerk has quit [Quit: Leaving]
burlyscudd has quit [Ping timeout: 276 seconds]
diegoviola has joined #ruby
<diegoviola>
hi
goodgame has joined #ruby
<diegoviola>
excuse me for the question, but i just got some offer for a job from some recruiter, they are offering a low-pay python/c++ (possibly ruby) job, the pay is less than average, i could use the experience but i'm not sure whether to get the job or not, what would you guys do?
ephemerian has joined #ruby
nari has joined #ruby
<r0bgleeson>
diegoviola: have you had a developer job before?
<diegoviola>
r0bgleeson: yes
<r0bgleeson>
so not great for experience then?
jp- has joined #ruby
<MasterAsia>
diegoviola: I wouldn't go through recruiters
<MasterAsia>
they are scum and just want a cut of your paycheck.
<MasterAsia>
Go organic.
interactionjaxsn has quit [Remote host closed the connection]
jonathanwallace has quit [Quit: WeeChat 0.4.1]
alx- has quit [Quit: Leaving...]
jonathanwallace has joined #ruby
berkes has joined #ruby
interactionjaxsn has joined #ruby
<diegoviola>
well, maybe i'll learn something new there or maybe i won't, who knows, what disappointed me though is that i asked for X pay and they called next day offering Y, but they also offered dental, lunch and transport (bus), they need me to have a checking bank account, and all that stuff is going to subtract from the salary they already lowered down, and all that is like 10-12 hours per day of work
jonathanwallace has quit [Client Quit]
<diegoviola>
so in other words, it sucks
<kaldrenon>
diegoviola: Generally, if it is a low-pay position and you are contacted by a recruiter, you are not the one who will profit from the deal.
Zolo has quit [Remote host closed the connection]
<diegoviola>
right
Zolo has joined #ruby
jonathanwallace has joined #ruby
jonathanwallace has quit [Client Quit]
Zolo has quit [Remote host closed the connection]
jonathanwallace has joined #ruby
jonathanwallace has quit [Client Quit]
mando has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
mando has quit [Remote host closed the connection]
<futile>
Got a Ruby challenge for anyone interested:
<futile>
Write idiomatic code that does two things. Given an input string, give a list of all lines ending in \n, with the \n included. If the last line does not end with \n, give that separately. Perform some user-defined action on each line from the first step, omitting any final line not ending with \n.
jonathanwallace has joined #ruby
mando has joined #ruby
Ciscoridze has quit [Quit: WeeChat 0.4.1]
<diegoviola>
kaldrenon: right
<diegoviola>
thanks guys
becky_ has joined #ruby
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
kpshek has joined #ruby
interactionjaxsn has quit [Ping timeout: 264 seconds]
<MasterAsia>
futile: sounds like you need that for school. :P
Ciscoridze has joined #ruby
interactionjaxsn has joined #ruby
<futile>
MasterAsia: I'm doing a blog post comparing languages, so I need the most idiomatic version of each.
<futile>
MasterAsia: I could write my own version but I'm sure you can do better.
<popl>
futile: have you heard of rosettacode.org?
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<futile>
And I don't want to taint your creativity.
Astralum has quit [Ping timeout: 264 seconds]
airlok has joined #ruby
browndawg has left #ruby [#ruby]
airlok has quit [Remote host closed the connection]
<MasterAsia>
futile: What do you mean by 'lastline'?
<MasterAsia>
The last line of the input string?
d2dchat_ has joined #ruby
<futile>
MasterAsia: yes, if you were to do lines.split('\n'), the last element
<waxjar>
is comparing languages very useful if you need to ask other people for idiomatic code?
maxmanders has joined #ruby
<futile>
waxjar: I'd like to see what "the best Ruby people" come up with.
ehc has joined #ruby
jorge___ has joined #ruby
<MasterAsia>
futile: ask mats. :P
workmad3 has joined #ruby
alx- has joined #ruby
<kaldrenon>
waxjar: I can see the logic; if I wanted to see idiomatic code for multiple languages, I'd ask language experts in each language to help me out.
<waxjar>
it seems to me that it would be quite a superficial comparison, then
loye1234 has quit [Quit: loye1234]
<waxjar>
along the lines of "language x uses curly braces, language y uses do .. end statements"
<MrZYX>
you only ever expect one or zero "other" lines?
<MrZYX>
and empty string has to be returned not nil/null?
<kaldrenon>
waxjar: That depends how different things get when you talk about 'idiomatic' code. You could write a for i; i < 10; i++ style loop in any language but a for look in C++ looks fairly different from a ruby map{}, and other languages have other iteration styles.
<futile>
MrZYX: right
Elhu has quit [Quit: Computer has gone to sleep.]
havenwood has quit [Remote host closed the connection]
Elhu has joined #ruby
c0rn has joined #ruby
burlyscudd has joined #ruby
<waxjar>
fair enough i guess
Elhu has quit [Client Quit]
zz_pinage404 is now known as pinage404
blaxter has quit [Quit: foo]
burlyscudd has quit [Client Quit]
airlok has quit [Remote host closed the connection]
jorge___ has quit [Remote host closed the connection]
burlyscudd has joined #ruby
redmenace has quit [Quit: leaving]
nari has quit [Ping timeout: 246 seconds]
Astralum has joined #ruby
mark_locklear has quit [Ping timeout: 276 seconds]
<popl>
11:17 < futile> waxjar: I'd like to see what "the best Ruby people" come up with.
<popl>
futile: that statement is almost guaranteed not to produce work from "the best Ruby people"
<popl>
unless you meant that sarcastically
JZTech101 has quit [Quit: Bye]
<popl>
in which case it will
<popl>
:)
<MrZYX>
hard to measure anyway IMO
Companion is now known as companion
<popl>
indubitably :)
<futile>
MrZYX: it works
bradsmith has quit [Remote host closed the connection]
<futile>
popl: :)
Kricir_ has quit [Read error: Connection reset by peer]
pinage404 is now known as zz_pinage404
Kricir has joined #ruby
<popl>
ask bnagy
<futile>
well, at least you guys are giving solutions
<futile>
the other language channels are gonna look really bad in this blog post for not giving any
<MrZYX>
don't want to say it's "the perfect solution", certainly shows some idioms though
<futile>
and you guys are gonna come off as very generous and kind :)
<popl>
pfft
<futile>
on account of thats what people think of people who help out
<popl>
to your entire readership, huh?
<kaldrenon>
Something tells me this blog post will be a futile effort.
<popl>
I guess what your mom thinks about people on IRC is important.
<waxjar>
badum tsssh
<futile>
ha
<futile>
good one
devoldmx has quit [Read error: Connection reset by peer]
<futile>
i laughed at it
<futile>
cuz it was funny
<futile>
i said "oh burrrn!"
<futile>
and then "o snap bruh!"
fyz1x has joined #ruby
adambeynon has joined #ruby
vince_prignano has quit [Remote host closed the connection]
<kaldrenon>
Gawrsh.
zastern has quit [Remote host closed the connection]
zastern has joined #ruby
tsykoduk_ has joined #ruby
devoldmx has joined #ruby
c0rn has joined #ruby
rondale_sc has joined #ruby
pitzips has joined #ruby
workmad3 has quit [Read error: Operation timed out]
tsykoduk_ has left #ruby [#ruby]
SeySayux has quit [Read error: Connection reset by peer]
bklane has quit [Remote host closed the connection]
sailias has joined #ruby
d2dchat_ has joined #ruby
<futile>
MrZYX: can you split steps 1 and 2 into two separate functions?
brennanM_ has quit [Read error: Connection reset by peer]
<MrZYX>
what would be the return value? [lines, last_line] ?
timonv has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
<MrZYX>
that makes no sense, if the lines are already separated by the first method, why should the second one separate them again? also that would require to undo the separation
cascalheira has quit [Quit: Leaving...]
marcdel has joined #ruby
athst has quit [Quit: athst]
Asher has joined #ruby
SeySayux has joined #ruby
chriskk has joined #ruby
codezombie has quit [Read error: Connection reset by peer]
codezomb has joined #ruby
nezumi has joined #ruby
<futile>
k
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<MrZYX>
I'm starting to wonder if you ever tried implementing the requirements yourself...
<MrZYX>
given the abstraction is at different levels in do_with_lines now
jlast has quit [Read error: Operation timed out]
<futile>
MrZYX: it could be a class too if thats easier in ruby
sambao21 has joined #ruby
<futile>
i explicitly omitted any mention of how the action was to be performed
adambeynon has quit [Quit: Computer has gone to sleep.]
<MrZYX>
as said I'm not sure what the practical use would be so it makes it a bit harder
cortexman1 has joined #ruby
<futile>
MrZYX: you can test them individually more easily
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<futile>
MrZYX: and you can re-use one without the other.
<futile>
or at another time than the other.
<futile>
etc etc
Kricir has joined #ruby
Zai00 has joined #ruby
bradsmith has joined #ruby
cortexman has quit [Ping timeout: 276 seconds]
rererered has joined #ruby
<wald0>
what is a good IDE for ruby for linux ? specially for novice/learning ruby
LMolr has joined #ruby
benlieb has quit [Quit: benlieb]
<rererered>
go to the best chenel #pki
rererered has quit [Killed (idoru (Spam is off topic on freenode.))]
alvaro_o has joined #ruby
relix has joined #ruby
Niamkik_ has joined #ruby
<wald0>
i personally know/like vim, but is for a friend which is discovering ruby (and linux)
bsaboia_ has quit [Ping timeout: 240 seconds]
marcdel has joined #ruby
<onewheelskyward>
wald0 RubyMine.
<kaldrenon>
wald0: Don't give up on persuading your friend that vim is delightful.
Niamkik has quit [Ping timeout: 248 seconds]
seich- has quit [Ping timeout: 240 seconds]
<onewheelskyward>
vim is many things, but delightful? :)
<kaldrenon>
onewheelskyward: Yes.
fmcgeough has joined #ruby
<kaldrenon>
Vim is the only editor I've ever used where discovering a new feature actually made me *laugh* with pleasant surprise.
<MrZYX>
futile: class version http://paste.mrzyx.de/p524afc72/ take whatever you like, I can't recommend any for the reasons already mentioned
brennanMKE has joined #ruby
<futile>
thanks
badabim has quit [Remote host closed the connection]
badabim has joined #ruby
<Neener54>
Sublime Text is a great editor if they don't want to learn vim and don't want to buy rubymine
lewis_ has joined #ruby
jerius_ has joined #ruby
<ericwood>
it's like $50
danman has quit [Quit: danman]
S0da has quit [Remote host closed the connection]
<ericwood>
but keep in mind if you actually work somewhere they'll most likely expense it
lewis has quit [Ping timeout: 256 seconds]
elaptics is now known as elaptics`away
jerius has quit [Read error: Operation timed out]
Kobrakao has quit [Quit: This computer has gone to sleep]
elux has joined #ruby
supernullset has quit [Ping timeout: 256 seconds]
b00stfr3ak has quit [Ping timeout: 256 seconds]
badabim has quit [Ping timeout: 240 seconds]
kiela_ is now known as kiela
danman has joined #ruby
<Rylai>
ericwood: actually
<Rylai>
it'sl ike uhh
<Rylai>
$70 by now
danman has quit [Client Quit]
<ericwood>
aah okay
<ericwood>
I just use macvim
<ericwood>
so...
<Rylai>
way too much imo :p
asobrasil has left #ruby [#ruby]
<Rylai>
when you've got such great editors as vim for free (and open source)
Dreamer3 has quit [Ping timeout: 240 seconds]
maxmanders has quit [Quit: Computer has gone to sleep.]
<ericwood>
eh it's a quality piece of software, and probably the primary tool you use to do your job if you use itw
<ericwood>
so $70 honestly isn't that bad
dr_neek has quit [Quit: dr_neek]
<ericwood>
but if your job will pay for it you don't have to worry about that
huoxito has joined #ruby
<onewheelskyward>
$70 isn't bad at all for something you'll spend most of your days using.
<onewheelskyward>
If it makes anything easier, it's worth the money.
<ericwood>
^^^^^^^^
carlyle has joined #ruby
maxmanders has joined #ruby
phracker has joined #ruby
cj3kim has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
<wald0>
kaldrenon: its just about that she has just started, i dont want to saturate her
<wald0>
just tried Arcadia, but it gives me a "permission denied" trying to run a simple line, otherwise it looks pretty nice
axeman- has joined #ruby
devoldmx27 has joined #ruby
<wald0>
onewheelskyward: i checked it and looks pretty nice, but.. is not free (of charge) ?
Emmanuel_Chanel has quit [Ping timeout: 264 seconds]
barratt has joined #ruby
nezumi is now known as snath
<onewheelskyward>
Not for commercial use. There's a 30 day trial and you can get it for free if you work on open source projects.
<wald0>
ouch Sublime Text is also paying :/
<onewheelskyward>
Free wasn't one of your requirements. :)
fyz1x has joined #ruby
gildo has quit [Read error: Operation timed out]
Emmanuel_Chanel has joined #ruby
<MrZYX>
sublime text is free to evaluate for ever, it just bugs you with a "please buy me" every couple saves
<whitenoise>
i converted my entire office to Sublime Text from Aptana and TextMate
devoldmx has quit [Ping timeout: 264 seconds]
seich- has joined #ruby
<futile>
wald0: i recommend sublime text. even if you dont pay.
<wald0>
oh well, that sounds nice then for just learning a bit of ruby
freerobby has quit [Quit: Leaving.]
ndrei has joined #ruby
<onewheelskyward>
Aptana...wow.
<wald0>
thx for the suggstions, i will give a try :)
lnormous has joined #ruby
<whitenoise>
i call myself the Sublime Text evangelist
gr33n7007h has quit [Quit: Leaving]
<wald0>
Arcadia nobody uses ?
linux_noob_666 has quit [Read error: Connection reset by peer]
<onewheelskyward>
Sublime is nice, if you get the right plugins.
noop has quit [Ping timeout: 276 seconds]
<futile>
i use emacs for work but only because Sublime Text doesnt have mature Clojure plugins yet
mark_locklear has joined #ruby
Kricir has quit [Ping timeout: 276 seconds]
<whitenoise>
when I was a PHP Developer I used Eclipse.
<whitenoise>
but i hated how heavy it was.
futile has left #ruby [#ruby]
<Mattias>
vim for everything
Zai00 has quit [Quit: Zai00]
<whitenoise>
i can go just as fast in Sublime as a really good VIM person can in VIM.
<whitenoise>
especially since you can enable VIM shortcuts in Sublime.
<wald0>
only 5 mb ? wtf... this interface looks really nice, i need to look which interface it uses
graft has quit [Ping timeout: 264 seconds]
havenwood has joined #ruby
d2dchat_ has joined #ruby
<Mattias>
whitenoise: what about in the terminal? can sublime do that?
<whitenoise>
Mattias: why do you need to on a development machine? i use vim when i'm doing remote server work for configurations and that's it.
freerobby has joined #ruby
<whitenoise>
and it does have the 'subl' cli tool for opening files or entire directories as projects from the commandline
fyz1x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mattias>
I'm a terminal person
<Mattias>
\(^o^)/
zorg24 has quit [Ping timeout: 264 seconds]
<wald0>
can i re-edit a line that is already writed in "pry" ?
<whitenoise>
Mattias: me too, i have a terminal open all the time and do most everything through it. operating a computer through the terminal is way faster than through a GUI
vlad_starkov has quit [Remote host closed the connection]
<havenwood>
wald0: Yes, the `edit` command. Check out `help edit`.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ixti has joined #ruby
<onewheelskyward>
The thing I like about JetBrains IDEs is that when it loses focus, it writes the file to disk. I haven't hit ⌘-s in years.
<whitenoise>
nice
<onewheelskyward>
Never again would you wonder whether or not your changes take effect.
<whitenoise>
so it sort of has the Google Drive complex
<havenwood>
I'm really happy with TextMate 2.
motto has joined #ruby
<onewheelskyward>
Something like that. And it has a built-in minute-by-minute local revision history.
g0bl1n has quit [Quit: Ex-Chat]
<havenwood>
Been meaning to try rmate from a remote machine, as I just vim it usually.
<whitenoise>
i have one of those via SCM
timonv has quit [Remote host closed the connection]
<onewheelskyward>
you have to commit to the scm though, right?
<whitenoise>
newp
<onewheelskyward>
Oh that is neat, then.
<havenwood>
I <3 how TM2 will eval in-line #=>'s.
m8 has quit [Ping timeout: 240 seconds]
LMolr has quit [Ping timeout: 264 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
Seen the same in Emacs. I'm assuming Sublime has some way to eval inline, or is that a plugin?
<whitenoise>
plugin
<whitenoise>
oh
<whitenoise>
and all textmate plugins will work in sublime
<onewheelskyward>
Everything in sublime is a plugin. That's one of the things that annoys me about it.
sambao21 has quit [Quit: Computer has gone to sleep.]
robustus has quit [Ping timeout: 245 seconds]
<whitenoise>
because i think Ryan Bates made a TM plugin for Rails shortcuts
<havenwood>
I actually bought Sublime but don't use it. I really like the code preview feature.
<whitenoise>
and I know some people who use that, but I don't actually use any plugins for anything...so
Kricir has joined #ruby
<havenwood>
I was stoked to see TM2 go open source.
<havenwood>
And open source contributions rolling in. :)
rbento has quit [Quit: ┐('~`;)┌]
b00stfr3ak has joined #ruby
d2dchat_ has quit [Remote host closed the connection]
<Nilium>
It's been doing pretty well as open source.
<whitenoise>
very nice...guess they figure there's enough free competition out there to charge for it is no longer feasible? ..or that they've just made enough money off of it
robustus has joined #ruby
workmad3 has joined #ruby
tjad has joined #ruby
<Nilium>
I think it's more that Alan just planned to do this from the start and got tired of working on it himself.
devoldmx27 has quit [Ping timeout: 264 seconds]
<zendeavor>
i write code in Acme
<zendeavor>
emacs and vim are *so* passe.
* Nilium
ties up zendeavor and stuffs him in a box.
<whitenoise>
does anyone actually write code in Xcode?
<whitenoise>
because i have found that to be the worst thing ever
<havenwood>
whitenoise: People do.
<zendeavor>
no it's just a fancy compiler
endash has quit [Quit: endash]
<whitenoise>
Xcode, LLVM and a lot of pay-for-me applications was the thing I hated about getting a Mac.
allthingsdg has joined #ruby
<whitenoise>
I still hate LLVM and Xcode.
cortexman1 has quit [Quit: Leaving.]
maxmanders has quit [Ping timeout: 276 seconds]
<zendeavor>
hey man, don't hate on llvm
* whitenoise
hates on llvm
<havenwood>
em-omgwtfbbq-scripten
allthingsdg has quit [Client Quit]
peregrine81 has joined #ruby
<onewheelskyward>
lol
<zendeavor>
=[
<IceDragon>
wow man, let war drizzle and peace rain man... no hating just love.
maxmanders has joined #ruby
* zendeavor
pops out of the box
<zendeavor>
out of the box
<whitenoise>
i have had too many headaches where I'm trying to get some library rolling with homebrew...such as ImageMagick, and Mac's non-standard GCC/LLVM setup giving me problems...when I could just one-line it in a Linux VM...which is why I now keep a Linux VM handy for working on certain projects.
<awpti>
Howdy folks. I've been all over the docs and can't figure this out. How do I include a simple set of variables from an external file? I've tried include, require, require_relative and load. They all proclaim there's no variable defined.
<popl>
zendeavor throws it on the ground
<zendeavor>
Nilium: after i'm done deleting elements from the page
Kricir has joined #ruby
<Nilium>
What do you mean include a set of variables?
<whitenoise>
awpti: mayhaps you should make a gist or pastebin
<Nilium>
Do you mean local variables?
<Nilium>
Constants? Globals?
<Nilium>
I guess constants don't really count as variables even though they're technically modifiable
<awpti>
It's a simple procedural script. Uno momento.
<zendeavor>
sounds like the meet the criteria then
<Nilium>
zendeavor makes Stallman look like a sane, rational human being
pinage404 is now known as zz_pinage404
<whitenoise>
Nilium: I defined a global constant inside of a local scope.
<zendeavor>
thanks, i try
<whitenoise>
did i just blow your mind? probably not.
<Nilium>
Probably not, but you did make me slowly shake my fist.
devoldmx has quit [Ping timeout: 241 seconds]
<whitenoise>
lol
cody-- has joined #ruby
ryannielson has joined #ruby
<shevy>
lol
LMolr has joined #ruby
<Nilium>
Try harder and I might even say something about my lawn and your being on it.
<Nilium>
awpti: You're never going to be able to access those variables.
grumpwork is now known as sadwork
LMolr has quit [Remote host closed the connection]
<awpti>
I've had a hard time finding anything clear on the concept of requiring/including external files. I come from a long background with PHP.. went with some assumptions at first, read the docs.. I guess I don't understand what's required/needed in thius case.
<awpti>
s/thius/this/
carlyle has quit [Remote host closed the connection]
<Nilium>
That stuff is all local to its file. It's not coming out. Use constants.
<shevy>
awpti no no
<shevy>
awpti first, when you want to load a .rb file, you use require() or load() ok?
<shevy>
in your code you use include, which I wonder where you got that from
<Nilium>
Probably a PHP-ism.
<shevy>
well, awpti it is just some basic terminology in ruby. remember... load and require to fetch .rb files, include and extend to work with modules ok
<awpti>
shevy, every tutorial I've read proclaims include is the way to go. I'll ignore them, then. Possibly just old-arse tuts.
<shevy>
awpti, yes but if you want to include a module
<awpti>
That makes more sense.
<shevy>
module Foo; def test; puts 'hi from test'; end; end; include Foo # <-- test() now works in your code, a method call
<shevy>
awpti think of modules just as namespaces
<shevy>
with common functionality and reusability for your projects
<Nilium>
Think of modules as bundles of methods.
<awpti>
It's hard to shift away from phpisms after almost 15 unfortunate years.
<shevy>
I have one module that I called save_file()
pinage404 is now known as zz_pinage404
<Nilium>
Bundles of methods and classes and thingies.
<shevy>
awpti that is good, you had a lot of experience then :)
<shevy>
I did php only for 2 years
<shevy>
it was not that bad ... but ruby has the better design
<shevy>
I did perl for half a year
<zendeavor>
amateurs always say "php wasn't that bad"
<zendeavor>
amateur
x1337807x has joined #ruby
<shevy>
I had a nice book about regexes but other than that, php was better than perl
<awpti>
I've only done it on a hobby basis. Professionally for < a year. PHP's internal stupidity and inconsistency finally got the best of me.
<shevy>
perl is an unusable language
Notte has joined #ruby
<shevy>
yeah, inconsistency is a big problem for every language. or rather, the rise of complexity after a while
saarinen has quit [Quit: saarinen]
<popl>
FUD
ryannielson has quit [Quit: ryannielson]
<awpti>
My primary interest in Ruby is automation. The simplicity and clarity of the language are.. attractive.
zz_pinage404 is now known as pinage404
<popl>
shevy: What sort of Perl were you using?
<shevy>
popl only the basics
<popl>
Probably something from the Perl 4 days.
<popl>
shevy: Moose?
<shevy>
popl after a few months I did not understand my own code
axl_ has quit [Quit: axl_]
<shevy>
popl hmm.. I think in 2001 or 2002
<shevy>
I switched to ruby 2004
<shevy>
the good part of the perl book was about the regexes
sanitypassing has left #ruby ["WeeChat 0.4.1"]
Uranio has quit [Quit: while you reading this, a kitty dies]
<popl>
Someone came into #perl yesterday asking for help in a class.
pinage404 is now known as zz_pinage404
reset has joined #ruby
<popl>
This person was in a university in Canada.
vlad_starkov has joined #ruby
<popl>
The class was a class about web programming.
<popl>
The instructor was using a textbook that was written in 2001.
vlad_starkov has quit [Remote host closed the connection]
<awpti>
shevy, I've replaced the vars with constants and am now using require_relative. It works :)
<patrikf>
ruby is like python done right
<popl>
This is the part of IRC I hate.
<popl>
Constant religio-babble.
<shevy>
awpti, cool that was fast
<popl>
Zealotry doesn't help anyone.
* zendeavor
sacrifices a buffalo to the Zend framework
<shevy>
popl when I say that ruby is a better language than perl, this is a factual statement
graft has joined #ruby
<awpti>
I pretty much like every language. Some are just hard to grasp <for me.. I have a hard time with OOP concepts>
<popl>
shevy: No, it isn't.
<popl>
shevy: It's your opinion.
<shevy>
popl yes it is. give me something where perl is better
jonahR has joined #ruby
<popl>
shevy: Something like that is inherently subjective.
<awpti>
I'm a mild fan of C#, Python, PHP, Java, etc.
ananthakumaran1 has quit [Quit: Leaving.]
<shevy>
popl you deny that objective statements can be made
<popl>
shevy: No.
allsystemsarego has quit [Quit: Leaving]
<shevy>
popl: Yes.
<popl>
Say whatever you want.
<zendeavor>
popl: this is the part of IRC that i hate
badabim has joined #ruby
<zendeavor>
people that hate parts of things and then partiticipate in those things
<awpti>
Objective statements about preference are subjective to everyone else. :p
<popl>
zendeavor: What?
<shevy>
awpti one could compare individual components
<shevy>
lines of code required, amount of time required to solve problems and so forth and so on
zz_pinage404 is now known as pinage404
Al_ has quit [Read error: Connection reset by peer]
ewnd9 has quit [Remote host closed the connection]
<shevy>
speed!
<Eiam>
hmm i need to convert from using curb for my requests to something async
<Eiam>
any recommendations?
Al_ has joined #ruby
<awpti>
shevy, when you drill down, you certainly make statements that are more objectively/evidence based, sure. In the end, you still end up with preference. :p
<popl>
zendeavor: What do you mean by participate?
<Eiam>
faraday + eventmachine?
athst has joined #ruby
<shevy>
awpti sure, but I use what is better still, based on experience. If you climb a mountain with proper tools you may be able to climb up further than without the proper tools
Morrolan has quit [Ping timeout: 246 seconds]
IceDragon has quit [Ping timeout: 248 seconds]
end_guy has quit [Remote host closed the connection]
DanBoy has quit [Remote host closed the connection]
Bry8Star{T2 has quit [Remote host closed the connection]
<awpti>
I concur completely.
tacos1de has quit [Write error: Broken pipe]
IceDragon has joined #ruby
end_guy has joined #ruby
<popl>
zendeavor: If I like Ruby and Python and Perl, then I can hang out in the channels on freenode. People always bash Perl in those other two channels though. That makes me sad.
<whitenoise>
popl: I heard tale of a group of people who were bashing Perl at a convention, and the guy who wrote Perl was sitting behind them. And he turned around and explained that Perl was never supposed to be what it currently it, he just wrote it as some sort of parser.
<havenwood>
Eiam: I recommend looking at HTTPClient.
<shevy>
I see it as a good thing, if the language is still alive, it provides an incentive to change and improve on it.
<Eiam>
thats not even in the list
Es0teric has quit [Quit: Computer has gone to sleep.]
<popl>
heh
<Eiam>
oh there it is
<havenwood>
Eiam: The httpclient author put the list together. :P
<havenwood>
Eiam: If you want to stay in the curl vein, there's typhoeus.
<shevy>
whitenoise, yeah, that makes sense, just how the WWW changed so many things, with all the smartphones and mobile apps becoming so important, barely anyone could know this in 1995
maxmanders has quit [Quit: Computer has gone to sleep.]
Morrolan has joined #ruby
<havenwood>
Eiam: Dunno.
aaronmcadam has quit [Quit: Leaving...]
diegoviola has quit [Quit: WeeChat 0.4.1]
Bry8Star{T2 has joined #ruby
<Eiam>
havenwood: I've got existing code in curb, basically if the user doesn't give me an authenticated session, I have to use curb. if they give me a pre-authenticated session, I want to async/MT the shit out of everything
<havenwood>
shevy: curb/patron/typhoeus are the curl wrappers for ruby
<Eiam>
GSSAPI is important for people that want to do lots of corporate auth stuff
<Eiam>
since its kerberos auth basicaly
<Eiam>
most frameworks/libraries don't implement or support it
<shevy>
ah
<havenwood>
Eiam: I wouldn't be surprised if httpclient actually suported. Typhoeus does parallel curl requests so maybe that would be workable. Faraday supports Typhoeus, hrm.
pinage404 is now known as zz_pinage404
zz_pinage404 is now known as pinage404
<havenwood>
Eiam: httpclient supports more auth than most, dunno though
Kricir has quit [Remote host closed the connection]
<havenwood>
Would it be NTLM auth support that is required?
ewag has quit [Remote host closed the connection]
shiva has joined #ruby
RustyShackleford has joined #ruby
<havenwood>
Eiam: Yeah, looks like one of the curl wrappers or httpclient are a good bet. HTTPClient/Typhoeus are my final recommendation. :P
Al_ has joined #ruby
<RustyShackleford>
I don't mean to offend, but is is ruby used much outside of Rails?
<havenwood>
RustyShackleford: Yes, it actually is. Even super computers.
<shevy>
RustyShackleford, it depends
vince_prignano has joined #ruby
<shevy>
RustyShackleford I think it fills a niche like perl or python, like small things that you want to do on your computer, perhaps in an automated way
berkes has quit [Quit: Ex-Chat]
<havenwood>
shevy: Hundreds of thousands of lines of Ruby in aerospace and defense stuff, etc.
iamjbecker has joined #ruby
<shevy>
RustyShackleford I came to ruby before rails
<zendeavor>
but you came way harder after rails
<shevy>
havenwood sounds cool, I would not know, I have no experience in that at all :) how comes you know such things?
<RustyShackleford>
yeah I'm much better with python. Trying to learn rails and I'm not great at reading ruby
<RustyShackleford>
I should do a project euler with ruby
<havenwood>
shevy: Lockheed threw down big time on Ruby. Simulates hardware and software with Ruby before real stuff exists.
<shevy>
zendeavor nope, whether rails exists or not does not make a big difference to me, it's like a separate community as far as I feel it. extremely specialized too
<zendeavor>
truth
<shevy>
RustyShackleford I see
<Eiam>
yeah seriously
<Eiam>
rails is totally outside my domain now
hanmac has quit [Quit: Leaving.]
Es0teric has joined #ruby
<shevy>
well that is interesting to hear
<Eiam>
i think of it as its own thing
<shevy>
a python guy looking at ruby through rails :)
<zendeavor>
you know what blows my mind about all the programming channels?
<Eiam>
I learned python via Twisted
<Eiam>
and ruby via "rails"=)
<zendeavor>
all the questions are about extremely simple tasks
<Eiam>
"ruby" via rails, rather
<zendeavor>
no one ever has a complex question
zorg24 has joined #ruby
<Eiam>
zendeavor: because its hard to ask a complex question
<zendeavor>
everyone with the complex problems solves them alone
<Eiam>
complex questions usually involve a lot of state
<shevy>
zendeavor, well I used to have... but people rarely answer these :(
<RubyPanther>
indeed, freenode is like a pogo stick the way it bounces
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<RubyPanther>
Thankfully xchat just reconnects and doesn't bother me with it
<awpti>
What are some highly recommended books on ruby? (not rails, couldn't care less about rails :) )
<havenwood>
awpti: The Ruby Programming Language
<zendeavor>
the docs
<havenwood>
awpti: For newbies I hear Learn to Program recommended.
<RubyPanther>
awpti: _why's (poignant) guide, and the pickaxe
<popl>
zendeavor: The documentation is not a book. :)
<havenwood>
awpti: The pickaxe covers a log of the stdlib.
saintcajetan has quit [Ping timeout: 240 seconds]
<awpti>
Nice.
<heftig>
RubyPanther: our webserver's xen dom0 hasn't been rebooted in almost 3 years
<awpti>
Appreciate the list.
<havenwood>
s/log/lot
<RubyPanther>
pickaxe is like 3 books, it has a sortof tut at the start, and then a more serious language section, and then a reference
<awpti>
Also, I'm not a newbie to programming. Just to ruby :)
<johnjay1>
is it possible to declare class members with expressions? ie, class foo { $bar = $::parent_var.to_s()[0..2] } ?
<zendeavor>
popl: it is if you print it and bind it ;D
<AntelopeSalad>
i only read Eloquent Ruby and found it to be a great read
<havenwood>
Avdi is great, but haven't read Eloquent Ruby.
<shevy>
awpti the pickaxe is ok, the reference at the end will have information that you can use for years, the beginning is very easy, but once you read it you will not have to read this again (I noticed that when I bought the new pickaxe, I knew 99% of the things from the beginning already, so that was a waste of money, but I did not regret having bought it the first time)
<popl>
zendeavor: In my estimation there are very few people who would take the time to do that.
<AntelopeSalad>
someone recommended it to me about a month ago
<RubyPanther>
heftig: yeah, I only update my servers every few years when I start getting version mismatches :) "It's not out of date, it is actually just very stable."
<joshu>
hi what is the operator "…" called in Ruby? For instance ("06:00"..."21:00").include?(date.strftime("%H:%M"))?
<shevy>
joshu, Range ... inclusive range
<havenwood>
joshu: Range, inclusive
devoldmx has quit [Read error: Connection reset by peer]
<shevy>
I think that is a specific configuration language to puppet
tylersmith has joined #ruby
<heftig>
johnjay1: that's not ruby
vlad_starkov has quit [Remote host closed the connection]
redmenace has quit [Ping timeout: 256 seconds]
<johnjay1>
commence teeth grinding
breakingthings has quit [Quit: breakingthings]
<shevy>
hehe
<shevy>
I never saw that before though
<shevy>
case $::operatingsystem {
<johnjay1>
stretch here...any idea how I can extend that?
<shevy>
that looks really weird
Elhu has joined #ruby
<johnjay1>
to just give me the first three chars of $::osfamily
<shevy>
no idea but it seems like a classic case menu
<johnjay1>
i'd like to assign the first 3 chars of $::osfamily to a class var
splittingred has quit [Quit: splittingred]
mando has quit [Remote host closed the connection]
<havenwood>
johnjay1: So you're trying to find the OS type outside of Puppet? You want an alternative to $::osfamily or you want to include that stuff?
ch_ has quit [Remote host closed the connection]
<havenwood>
Confuzled.
jerius has joined #ruby
<johnjay1>
havenwood: I'd like to have my own class var that takes the first 3 chars from puppet's $::osfamily
<wald0>
which toolkits (user interfaces) i can use with ruby in linux ? (for do user applications), im searching something nice, not old and ugly interfaces (not tk, gtk1, etc)
saintcajetan has quit [Remote host closed the connection]
<havenwood>
I love the idea of a gemified Shoes being reborn.
<zendeavor>
coming soon
<havenwood>
*SOON*
<zendeavor>
i mean
<zendeavor>
is shoes really that great anyway
Kricir has quit [Remote host closed the connection]
workmad3 has joined #ruby
Elhu has joined #ruby
sethetter has quit [Quit: Lost terminal]
<zendeavor>
or is it mostly about the historical significance
<havenwood>
Historical at this point, unless Shoes 4 takes off.
itcharlie has joined #ruby
ldnunes has quit [Quit: Leaving]
<shevy>
wald0 that is gtk2 and gtk3
<shevy>
wald0 it looks like all other gtk2 or gtk3 projects, depending on the theme engine in use
hellome has quit [Read error: Connection reset by peer]
<shevy>
wald0 download it, install it, run the examples
s__dana has quit [Quit: s__dana]
hellome has joined #ruby
popl has joined #ruby
dodosan has quit [Read error: Connection reset by peer]
dodosan has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
<havenwood>
zendeavor: Part of _why's legacy. Klabnik took it over when _why disappeared. It just lost relevance since it doesn't support latest and greatest guis with modern Ruby. I'm *hoping* the summer of code project successfully revitalizes on SWT and is able to extend to gtk3 or whatev off the JVM>
lewis is now known as Lewix
<zendeavor>
i know it's part of that legacy
devoldmx has quit [Read error: Connection reset by peer]
iliketurtles has quit [Quit: zzzzz…..]
<havenwood>
This book is made of rabbits and lemonade... and a French maid I've dipped in marmalade!
<lewellyn>
speaking of ruby guis... would anyone here have an interest in being able to write gui mobile apps in ruby?
* lewellyn
doesn't have details just yet, but needs to gauge interest to prioritize the task :)
jbpros has joined #ruby
<havenwood>
lewellyn: Like RubyMotion, Ruboto, MobiRuby?
justsee has joined #ruby
justsee has joined #ruby
<lewellyn>
havenwood: not quite :)
freerobby has joined #ruby
<havenwood>
lewellyn: Then what?
maz-dev has quit [Ping timeout: 276 seconds]
<lewellyn>
not ios/android, for starters. ideally fully cross-platform.
jlast has quit [Remote host closed the connection]
<havenwood>
Too few people know about the soundtrack to _why's poignant guide!
<havenwood>
lewellyn: Fully cross platform as in not a native app?
devoldmx has joined #ruby
<aramus_>
Hello, if I have a string like "attrb001" or "attr122232", how would I extract the numbers at the end?
<lewellyn>
native, but i'm not at a point where i can give concrete details yet.
<lewellyn>
for one, i don't want to overpromise ;)
<havenwood>
mmm
jonkri has quit [Quit: jonkri]
workmad3 has quit [Read error: Operation timed out]
<lewellyn>
my foundation is set, but further work is pretty much predicated upon whether there's anything resembling immediate interest.
b00stfr3ak has joined #ruby
<lewellyn>
otherwise, it'll remain a background task until i have a paying client wanting it or i need it myself.
aqil has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
Zai00 has joined #ruby
zorg24 has quit [Ping timeout: 264 seconds]
v0n has quit [Read error: Operation timed out]
jbpros_ has joined #ruby
tyfighter has joined #ruby
seich- has joined #ruby
stuartrexking has quit [Quit: Leaving...]
Notte has quit [Remote host closed the connection]
aramus_ has left #ruby [#ruby]
workmad3 has joined #ruby
tacos1de has quit [Ping timeout: 240 seconds]
interactionjaxsn has quit [Remote host closed the connection]
jbpros has quit [Ping timeout: 264 seconds]
jbpros_ is now known as jbpros
Al_ has quit [Quit: Al_]
cek has quit [Read error: Operation timed out]
ch_ has joined #ruby
ch_ has quit [Remote host closed the connection]
interactionjaxsn has joined #ruby
elux has quit [Quit: Leaving...]
ch_ has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
superscott[8] has joined #ruby
JDHankle has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
tacos1de has joined #ruby
anonymuse has quit [Remote host closed the connection]
Elhu has quit [Quit: Computer has gone to sleep.]
workmad3 has quit [Read error: Operation timed out]
ChristianS has quit [Excess Flood]
elux has joined #ruby
gemmy has joined #ruby
ChristianS has joined #ruby
Kobrakao has quit [Quit: This computer has gone to sleep]
whitenoise has quit [Remote host closed the connection]
interactionjaxsn has quit [Ping timeout: 264 seconds]
airlok has quit [Remote host closed the connection]
c0rn has quit [Quit: Computer has gone to sleep.]
tatsuya_o has joined #ruby
Dreamer3 has joined #ruby
lele has joined #ruby
spider-mario has quit [Remote host closed the connection]
redmenace has joined #ruby
jonahR_ has joined #ruby
jonahR_ has quit [Client Quit]
Zai00 has quit [Quit: Zai00]
<havenwood>
lewellyn: Love the idea. I'd like to explore it if you release. :D
elux has quit [Quit: Leaving...]
emergion has joined #ruby
<lewellyn>
havenwood: ok. that moved it up a notch. ;)
<lewellyn>
it's now squarely above the same for php.
ahawkins has joined #ruby
jonahR has quit [Ping timeout: 256 seconds]
tyfighter has quit [Quit: tyfighter]
tyfighter has joined #ruby
ahawkins has quit [Client Quit]
tjad has quit [Ping timeout: 248 seconds]
amacgregor has joined #ruby
<lewellyn>
and tbh, i'd rather have ruby folks bugging me with issues than php folks anyhow. i expect the ruby folks won't be all "why can't i get my cms to work with this? isn't it a web browser?" :/
bluefish_ has joined #ruby
blip99 has joined #ruby
emergion has quit [Client Quit]
mando has joined #ruby
<blip99>
hi all, I have a very strange issue I've been trying to debug. It turns out that upon accessing a certain object for the first time (even with a simple puts to print it), the object becomes nil after that
saintcajetan has joined #ruby
mmitchel_ has quit [Remote host closed the connection]
<blip99>
the object is the return of ActiveRecord::Base.connection.execute
<Nilium>
blip99: We'd need to see the code.
<Nilium>
Ah, nevermind, it's a rails thing.
<Nilium>
You should probably ask rails people.
<blip99>
Is it a Rails bug ?
<blip99>
ok
<havenwood>
#RubyOnRails
<Nilium>
Dunno, this just isn't really the place for rails stuff.
<blip99>
np
byprdct has joined #ruby
<Nilium>
Try the channel havenwood and g'luck.
<blip99>
Im also asking there but I guess you guys would know the depth of ruby better
<havenwood>
Nilium: :O
<Nilium>
mentioned
<Nilium>
I accidentally a verb
<Nilium>
Made it sound sexy though.
<blip99>
unless ruby is different from every language on earth, this should happen
barratt has quit [Quit: Leaving...]
<zendeavor>
Nilium: havin' wood ain't sexy
<blip99>
once again the broken tracks of Rails cause me suffering
<Nilium>
Well, we'd still need to see the code, anywho.
c0rn has joined #ruby
<Nilium>
So, gist or .. one of those other pastebins that isn't pastebin.com
<havenwood>
Gist eet!
<Nilium>
Something about pastebin.com makes code really horribly unreadable
<havenwood>
zendeavor: it is sooo
<havenwood>
Haven is Anglo Saxon for port.
<onewheelskyward>
Aww. Symbols can't include hyphens.
awarner_ has quit [Remote host closed the connection]
mansi has quit [Ping timeout: 264 seconds]
barratt has joined #ruby
BillCriswell has quit [Remote host closed the connection]
<wald0>
shevy: mmh, strange, I use it packaged in my debian wheezy and it looks like gtk1 (at least the website examples)
<onewheelskyward>
Well, I can't :symbol-this
awarner has joined #ruby
theRoUS has quit [Ping timeout: 260 seconds]
<onewheelskyward>
directly. Anything else is more of a pita than I'd like.
<zendeavor>
how about an underbar.
<onewheelskyward>
Too late. I already named my github repo with the hyphen, and I'm not going to mix them. :)
<davidcelis>
onewheelskyward: why? it's still a symbol
<onewheelskyward>
I was writing cap deplloy tasks.
saarinen has quit [Quit: saarinen]
<zendeavor>
too late?
mando has quit [Remote host closed the connection]
anonymuse has joined #ruby
<zendeavor>
hyphens, blegh.
<onewheelskyward>
davidcelis Because then I'd have to write :"more characters every time I use the symbol, which is quite a lot"
<davidcelis>
assign it to a variable?
machuga|away is now known as machuga
<davidcelis>
what's the repo's name
Heskie has joined #ruby
rdg has joined #ruby
hellome has quit [Remote host closed the connection]
saarinen has joined #ruby
dhruvasagar has joined #ruby
jenskarlsen has joined #ruby
baordog has quit [Remote host closed the connection]
silmawien has quit [Quit: WeeChat 0.3.7]
<Nilium>
onewheelskyward: Jam it in a constant.
<Nilium>
Woops, scrolled up. May no longer be relevant.
hellome has joined #ruby
cj3kim has quit [Remote host closed the connection]
guns has joined #ruby
<davidcelis>
also why does it have to be a symbol
<onewheelskyward>
Interesting ideas, but the whole point was to have the hyphen be consistent from repo to code. I can't have hyphens in the variable names, either.
<havenwood>
may just be premature optimization to symbolize
<onewheelskyward>
I just dropped the hyphen, it's not a big deal. Just a wish. :) It's a symbol because that's how capistrano handles namespacing.
<onewheelskyward>
I'm just following convention.
<zendeavor>
undo the repo name
airlok has joined #ruby
harumph has quit [Ping timeout: 240 seconds]
justsee has quit [Ping timeout: 276 seconds]
Elico has joined #ruby
<zendeavor>
. is valid in repo names
ChristianS has quit [Excess Flood]
<zendeavor>
i chose to use "dot" instead
<Elico>
hey I would like to know if the net-ping issues are resolved on 2.0 ..
Heskie has quit []
ChristianS has joined #ruby
rodacato has joined #ruby
<Elico>
it states that on 1.9.x there is a chance of false positives..
wald0 has quit [Quit: Lost terminal]
klaas_ has joined #ruby
klaas has quit [Read error: Connection reset by peer]
motto has quit [Quit: Sto andando via]
c0rn has quit [Ping timeout: 279 seconds]
dankest has joined #ruby
poga has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
zmansiv_ has joined #ruby
rhys has quit [Quit: Leaving]
elysium has joined #ruby
burlyscudd has quit [Quit: Leaving.]
sarkis has joined #ruby
_honning_ has joined #ruby
wald0 has joined #ruby
c0rn has joined #ruby
<wald0>
what are the alternatives to Subexec ? seems like it doesn't work correctly here
<elysium>
Anyone know the recommended course of action for upgrading a source-installed version of ruby on centos? do different versions of ruby place nice on top of each other? i'm aware of solutions such as RVM and all that, i'm just curious about how to go about fixing my base system install to be a fresher version
rdg has quit [Quit: ttfn]
devoldmx3 has joined #ruby
mando has joined #ruby
nicoulaj has quit [Remote host closed the connection]
cj3kim has joined #ruby
<dankest>
I'm testing a Class that only has a reader for a value. Is there a way for me to make this field a writer just in testing?
ixti has quit [Read error: No route to host]
zmansiv has quit [Ping timeout: 276 seconds]
airlok has quit [Ping timeout: 246 seconds]
<dankest>
i.e. I don't want this value to have a writer inproduction, but in testing I need to be able to change it's value
anonymuse has quit [Remote host closed the connection]
ixti has joined #ruby
sparr_ has quit [Ping timeout: 240 seconds]
gemmy has quit [Quit: ZzzZ]
phantummm has joined #ruby
ch_ has quit [Remote host closed the connection]
alex__c2022 has quit [Quit: alex__c2022]
nathandial has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
splittingred has quit [Ping timeout: 240 seconds]
ersmith has quit [Ping timeout: 246 seconds]
cody-- has quit [Quit: Computer has gone to sleep.]
lebek has joined #ruby
emergion has joined #ruby
ch_ has joined #ruby
ch_ has quit [Remote host closed the connection]
ch_ has joined #ruby
athst has quit [Quit: athst]
_honning_ has quit [Quit: Leaving]
<wald0>
im trying to move from bash to ruby, what can be an equivalent for (for example): cat file.txt | grep "user: " | sed 's|user: ||g' ?
ssvo_ has joined #ruby
ixti has quit [Read error: No route to host]
_honning_ has joined #ruby
<Nilium>
I'm not up on my said, but I take it that's just replacing all instances of "user: " with nothing?
<Nilium>
open('file.txt') { |io| io.each_line { |line| puts line.gsub('user: ', '') if line.include? 'user: ' } } might do it.
sjltaylor has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
justsee has joined #ruby
anonymuse has joined #ruby
Spami has joined #ruby
Spami has joined #ruby
<ch_>
Nilium: thanks i'll give it a shot in a few
burlyscudd has joined #ruby
Kricir has joined #ruby
ssvo has quit [Ping timeout: 276 seconds]
brennanMKE has quit [Remote host closed the connection]
sjltaylor has joined #ruby
Kricir_ has joined #ruby
Kricir_ has quit [Read error: Connection reset by peer]
havenn has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
sjltaylor has quit [Client Quit]
froy has quit [Read error: Connection reset by peer]
froy has joined #ruby
justsee has quit [Quit: leaving]
justsee has joined #ruby
justsee has quit [Client Quit]
Zai00 has joined #ruby
machuga is now known as machuga|away
sailias has joined #ruby
sergiocampama has joined #ruby
tanema has quit [Remote host closed the connection]
<davidcelis>
elysium: it's generally recommended you _not_ mess with the system install
<davidcelis>
if you want a fresher version, that's what you should be using RVM or rbenv or some other ruby version manager for
havenwood has quit [Ping timeout: 240 seconds]
<elysium>
this is not the system install, this is the source install i did a bit ago
<elysium>
i got myself sorted out
sergiocampama_ has joined #ruby
<elysium>
centos's system install of ruby is nonexistent
sergiocampama_ has quit [Client Quit]
sergiocampama has quit [Client Quit]
sergiocampama_ has joined #ruby
sergiocampama_ has quit [Client Quit]
havenn has quit [Ping timeout: 240 seconds]
sergiocampama has joined #ruby
Akuma has joined #ruby
danbeck has quit [Quit: danbeck]
narcan has joined #ruby
marcdel has joined #ruby
kpshek has quit []
goodgame has quit [Ping timeout: 264 seconds]
anonymuse has quit [Remote host closed the connection]
tricon_ has joined #ruby
blip99 has quit [Ping timeout: 264 seconds]
Tricon has quit [Read error: Connection reset by peer]
justsee has joined #ruby
dtcrshr has quit [Quit: poff]
ixti has joined #ruby
_veer has quit [Ping timeout: 264 seconds]
pothibo has joined #ruby
wald0 has quit [Quit: Lost terminal]
pothibo has quit [Client Quit]
pothibo has joined #ruby
elysium has left #ruby [#ruby]
amacgregor has quit [Read error: Connection reset by peer]
mary5030 has quit [Ping timeout: 240 seconds]
zorg24 has joined #ruby
JDHankle has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
hadees has quit [Quit: hadees]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beneggett-alt has joined #ruby
chrisja has quit [Quit: leaving]
vlad_starkov has joined #ruby
JDHankle has quit [Ping timeout: 260 seconds]
colonolGron has joined #ruby
ziggles has joined #ruby
endash has joined #ruby
cads has quit [Quit: Leaving]
athst has joined #ruby
<ziggles>
When creating custom "collection classes" is it pretty common in the ruby world to name the class with "collection" in the name? ie CarCollection or UserCollection etc
Speed has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
mikepack has quit [Remote host closed the connection]
threesome has quit [Ping timeout: 264 seconds]
vlad_starkov has quit [Ping timeout: 264 seconds]
popl has quit [Quit: We must make an idol of our fear, and call it God.]
nathandial has quit [Quit: Leaving.]
ch_ has quit [Remote host closed the connection]
ch_ has joined #ruby
ch_ has quit [Remote host closed the connection]
jarm has joined #ruby
ch_ has joined #ruby
rodacato has quit [Remote host closed the connection]
mando has quit [Remote host closed the connection]
devoldmx has quit [Ping timeout: 264 seconds]
JMcAfreak has left #ruby ["("]
<patrikf>
ziggles: why would you create custom collection classes in the first place?
wallerdev has quit [Quit: wallerdev]
phantummm has quit [Quit: phantummm]
<ziggles>
patrikf: because i want to do extra stuff Array doesn't provide
<patrikf>
can you sketch an example?
JMcAfreak has joined #ruby
<patrikf>
if you want something that makes sense to have for lists of all sorts of objects, you can always extend Array :) but I guess that doesn't suit you for some reason
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Zai00 has quit [Quit: Zai00]
marcdel has joined #ruby
<ziggles>
patrikf: That's exactly what i want to do... is extend array and add on to it. I'm just not sure how to name it. Say i have a bunch of Item objects and i want to do something like ItemsCollection... is that a ruby-friendly name or will someone look at my code and shun me?
<ziggles>
lol
bubbajoness has quit [Quit: leaving]
barratt has quit [Quit: Leaving...]
<ziggles>
patrikf: my last experience was working with Java and we had tons of factories, collections etc.
wallerdev has joined #ruby
<patrikf>
ziggles: you can /literally/ extend array
<ziggles>
patrikf: i get that. `class ItemsCollection < Array`
<patrikf>
>> class Array; def fancy_schmancy; "hooray!"; end; end; [1,2,3].fancy_schmancy
<patrikf>
no, you can re-open the class definition.
<lethjakman>
patrikf: wait, what? you can extend array without making a new object?
<lethjakman>
well not object...class.
pkrnj has quit [Quit: Computer has gone to sleep.]
<patrikf>
I just did.
MrZYX is now known as MrZYX|off
<ziggles>
patrikf: that's just a monkey patch, right?
amacgregor has joined #ruby
<patrikf>
ziggles: yes, that's the proper term, thanks.
<patrikf>
ziggles: but you want something different?
<ziggles>
patrikf: yeah... All im asking is about naming conventions. Is using the word "Collection" considered bad?
mansi has joined #ruby
<patrikf>
I'm just asking so many questions because I never did something like that in ruby, it seems like a very weird pattern, and if you gave me more context I might come up with a better approach.
<ziggles>
patrikf: that guy created a collection class he named "ItemsCollection"
<ziggles>
patrikf: to a seasoned rubyist... would calling something like that a "collection" be looked down on? basically i'm just trying to get my naming conventions right
ndrei has quit [Ping timeout: 276 seconds]
predator217 has joined #ruby
tomzx_mac has joined #ruby
ewnd9 has quit [Ping timeout: 246 seconds]
x1337807x has joined #ruby
<patrikf>
well, I wouldn't know about that. to me, the /intention/ of sublassing array sound somewhat awkward, which is why I'm curious to what you're using it for.