lmwood has quit [Read error: Connection reset by peer]
GeissT has joined #ruby
<dorei>
if I want to scrap a site that uses javascript for its links, I need to use something like selenium or watir, right?
<jblack>
That's definitely something I've noticed too. Fellow developers in anything rubyish are polite, professional and generally caring.
mansi has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<blackmesa>
well said jblack
nathandial has joined #ruby
zorg24 has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
airlok has quit [Remote host closed the connection]
moos3 has quit [Quit: Computer has gone to sleep.]
<blackmesa>
I mean look at this response in #C: "If you like people spoon-feeding you, you'll grow weak, emotionally dependent on people and unable to achieve things on your own". ok I wouldnt disagree with this, but hey :)
<jblack>
That said... =) Though thier reaction in #C wasn't exactly professional, you did ask something from chapter 1 of any given book on C.
jimeh has joined #ruby
<blackmesa>
ya that right
hamakn has joined #ruby
airlok has joined #ruby
<dorei>
blackmesa: yeah, seriously, no irc channel can help you trully undestand pointers in C
airlok has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 264 seconds]
<jblack>
That doesn't excuse them forgetting that it was a new concept for you.
<blackmesa>
hehe
ilyam has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
<jblack>
I remember when I started picking up ruby last year, and for some reason I just didn't grasp the distinction between class variables and instance variables.
maniacal has quit [Remote host closed the connection]
airlok has joined #ruby
zeade has quit [Quit: Leaving.]
marr has quit [Ping timeout: 260 seconds]
<zendeavor>
why are you asking
airlok has quit [Remote host closed the connection]
<Nilium>
troulouliou_dev: No, that's not accepted in anything.
<Nilium>
"test" is not an integer.
tommyvyo has quit [Quit:]
blip99 has joined #ruby
<troulouliou_dev>
zendeavor, i m seeing this in a soft that is throwing an error in 1.9.3
<Nilium>
A soft?
<Nilium>
Also, space is not an apostrophe. Stop doing that. >_>
<troulouliou_dev>
in a program
froy has quit [Ping timeout: 264 seconds]
<troulouliou_dev>
Nilium, what do you mean ?
<Nilium>
See where you said "i m"? Should be "I'm" or "I am"
JZTech101 has joined #ruby
<zendeavor>
im not putting up with this grammar nazi
<Nilium>
I just get irritated by seeing all these non-native speakers using "i m".
<troulouliou_dev>
Nilium, ha ok :)
<Nilium>
It's not even saving space by skipping an apostrophe, it's just making the message worse >_>
<troulouliou_dev>
Nilium, ok will do better next time :)
<Nilium>
It's like the opposite of efficient chat-speak D:
huoxito has joined #ruby
<troulouliou_dev>
Nilium, like windows 2K12 :)
<Nilium>
Basically.
ssvo_ has quit [Ping timeout: 248 seconds]
<Nilium>
I care less about the grammar and more about whether it makes sense to do.
JZTech101 has quit [Read error: Connection reset by peer]
<Nilium>
Could even just use 'im' and people would probably still know what you're saying.
_helloworld_ has quit [Remote host closed the connection]
<zendeavor>
what about the actual question
<Nilium>
I already answered it.
arya_ has quit [Ping timeout: 246 seconds]
athst has quit [Quit: athst]
popl has joined #ruby
<zendeavor>
but there's gotta be a good reason he's asking if 1.8 will allow it
<Nilium>
Also, it doesn't work in 1.8.7 either, in case anyone thinks the behavior might be different.
<zendeavor>
or more likely a bad reason
<Nilium>
Might be, but it sounds like a programmer error on his part. Bad data or something.
<zendeavor>
like, if it works in 1.8 then i'll just downgrade and rely on the bug
<dorei>
is there a lightweight ruby gem that'll set up a fake dom and excecute js so as to scrap webpages that use js?
Inside has quit [Ping timeout: 240 seconds]
<Nilium>
What's a fake dom? O_o
supernullset has quit [Ping timeout: 264 seconds]
<dorei>
a Dom then :p
Kruppe has joined #ruby
<dorei>
how could I scrap/crawl webpages that contain links like: <a href="javascript:__doPostBack('ctl00$MainContent$gvSearchResults','Page$2')">2</a> ?
akerl has left #ruby ["valete"]
<bnagy>
have you looked at celerity or capybara with phantomjs?
Inside has joined #ruby
<Nilium>
Does mechanize do JS?
<dorei>
no, mechanize cant do js
<Nilium>
Then look at what bnagy suggested.
hadees has joined #ruby
<Nilium>
Also, the word you're looking for is scrape, not scrap.
<dorei>
eXodussz: try putting an "env" like %(env GIT_COMMITTER_DATE=
Nisstyre has joined #ruby
<eXodussz>
dorei same error.
hogeo has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
hogeo has joined #ruby
tealmage has joined #ruby
<dorei>
eXodussz: r u sure?
sambao21 has joined #ruby
<eXodussz>
Yes.
jackjackdrpr has quit [Client Quit]
<dorei>
eXodussz: does the error complains about missing env?
Spami has joined #ruby
<eXodussz>
dorei No, it points to the cmd method as 'No such file or directory'
<dorei>
after that, is it still - GIT_COMMITTER_DATE=... ?
<bnagy>
does it work without the env var?
<bnagy>
probably...
[zX] has joined #ruby
Vivekananda has quit [Ping timeout: 256 seconds]
<bnagy>
I'm guessing that this is the diff between bash running a command and directly exec() ing from ruby, like it's probably looking for GIT_BLAHBLAH as a command
<dorei>
yeap
<dorei>
that why your prepend it with env
<dorei>
env is /usr/bin/env
<eXodussz>
dorei yes same error message except when having env in there, it just adds env before 'GIT_COMITTER_DATE='
<dorei>
at least at my system, env is part of coreutils
something has joined #ruby
<bnagy>
you can also access the env from ruby
<something>
is anyone here familiar with websockets?
Domon has joined #ruby
<something>
specifically using JavaScript to connect to a websockets server
<dorei>
eXodussz: i guess ur system lacks /usr/bin/env
Shirakawasuna has joined #ruby
<eXodussz>
On Windows lol..
<dorei>
oh, i see
<bnagy>
that would do it
<eXodussz>
Just installed Ruby 1.9.3 for a quick run of something.
huoxito has quit [Quit: Leaving]
<bnagy>
see if you can get it working by setting whatever you need via the ENV hash
<bnagy>
that's crossplatform
sparr_ has joined #ruby
<dorei>
it 'll work :)
<eXodussz>
Trying to look it up, still new to Ruby..
endash has quit [Quit: endash]
Guest10893 has quit [Ping timeout: 264 seconds]
pitzips has quit [Ping timeout: 248 seconds]
thomasle_ has quit [Remote host closed the connection]
Spami has quit [Quit: This computer has gone to sleep]
thomaslee has joined #ruby
wy_stack has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
ntus1017 has joined #ruby
mootpointer has joined #ruby
<eXodussz>
Welp still lost lol.
<eXodussz>
Damn Windows.
saintcajetan has joined #ruby
thomaslee has quit [Ping timeout: 240 seconds]
<something>
Does anyone have any experience with websockets? I have a websockets server I pulled from github (em-websockets) and I'd like to see what the data values look like when going through the server. Is there a way to make some info appear in the terminal similar to a console.log() on the front end?
marcgg has quit [Read error: Connection reset by peer]
Kricir has quit [Remote host closed the connection]
labrat__ has joined #ruby
marcgg has joined #ruby
Lewix has quit [Remote host closed the connection]
Tricon has joined #ruby
ehc has quit [Quit: ehc]
RichardBaker has joined #ruby
xpirator has joined #ruby
Lewix has joined #ruby
jp- has joined #ruby
hackingoff has quit [Ping timeout: 240 seconds]
<eXodussz>
bnagy The ENV hash isn't working for me, maybe I'm putting it in the wrong place.
<eXodussz>
cmd = %(ENV GIT_COMMITTER_DATE ... isn't working, gives same error as before
<bnagy>
hm?
<eXodussz>
It is being run like so `#{cmd}`
snath has joined #ruby
<bnagy>
nono, you need to set that key in ENV, then run your command
<dorei>
eXodussz: remove ENV GIT_COMITTER_DATE from cmd
<bnagy>
although I don't see why you have to have it in an env variable, isn't there an option for it?
<bnagy>
ENV['BLAH'] = "thing"; `run some command`
<dorei>
and do something like ENV['GIT_COMITTER_DATE'] = ... before executing cmd
miskander has joined #ruby
jblack has quit [Ping timeout: 240 seconds]
lebek has joined #ruby
dorei has quit []
freerobby has joined #ruby
iliketurtles has quit [Ping timeout: 248 seconds]
miskander has quit [Quit: miskander]
lebek has quit [Client Quit]
dankest has quit [Quit: dankest]
<rkeene>
Is there anything like TclKit from Tcl for Ruby ?
iliketurtles has joined #ruby
Lewix has quit [Remote host closed the connection]
adeponte has quit [Remote host closed the connection]
<pontiki>
whatever is the last value in the function is what is returned
<mantas322>
something else was the issue
<mantas322>
im drunk and mu output loop was confusing me
<pontiki>
even if it's an object pointer
<pontiki>
drunk coding is never the answer -- but i can be fun !!
mantas322 has quit [Quit: so ... embarrassing]
tylersmith has quit [Ping timeout: 240 seconds]
something has quit [Quit: Page closed]
araujo has joined #ruby
tanema has joined #ruby
zachrab has joined #ruby
zachrab has quit [Remote host closed the connection]
jblack has joined #ruby
cj3kim has quit [Remote host closed the connection]
radic_ has joined #ruby
Mattix has joined #ruby
subbyyy has joined #ruby
wy_stack has joined #ruby
[zX] has quit [Quit: leaving]
kaspergrubbe has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
radic__ has quit [Ping timeout: 248 seconds]
bradhe has joined #ruby
jefflyne has quit [Ping timeout: 246 seconds]
dankest has joined #ruby
sarkis has quit [Ping timeout: 248 seconds]
eXodussz has quit [Quit: irc2go]
i8igmac has quit [Quit: Leaving]
airlok has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
bradhe has quit [Ping timeout: 248 seconds]
saintcajetan has quit [Ping timeout: 240 seconds]
mstksg has quit [Remote host closed the connection]
justsee has quit [Ping timeout: 240 seconds]
robscomputer has joined #ruby
jefflyne has joined #ruby
anonymuse has quit [Remote host closed the connection]
robscomputer has quit [Remote host closed the connection]
robscomputer has joined #ruby
Tricon has quit [Quit: Leaving...]
iliketurtles has quit [Ping timeout: 256 seconds]
JZTech101 has joined #ruby
Tricon has joined #ruby
Tricon has quit [Client Quit]
uxp_ has joined #ruby
baroquebobcat has joined #ruby
xargoon has quit [Ping timeout: 264 seconds]
uxp has quit [Ping timeout: 264 seconds]
robscomputer has quit [Ping timeout: 248 seconds]
Alasdairrr has quit [Ping timeout: 264 seconds]
justsee has joined #ruby
justsee has joined #ruby
aucahuasi has joined #ruby
iFire_ has quit [Read error: Connection reset by peer]
Alasdairrr has joined #ruby
airlok has quit [Remote host closed the connection]
xargoon has joined #ruby
supernullset has joined #ruby
<aucahuasi>
Hi guys, wich IDE is better for ruby/ror: aptana or netbeans? is there other good IDE out there?
saintcajetan has joined #ruby
iFire has joined #ruby
alpha123 has joined #ruby
dodosan has quit [Remote host closed the connection]
<sevenseacat>
why do you need an IDE
<zendeavor>
preferably not an IDE
DonRichie has joined #ruby
<alpha123>
Vim is quite excellent for Ruby with a few extensions, IDEs are highly overrated IMO
<aucahuasi>
ok thanks for reply, so wich editor is good then? kate?
<sevenseacat>
i like sublime text.
<alpha123>
aucahuasi: Vim is the best editor hands down, it just has an extremely steep learning curve. I recommend Sublime Text as well.
mootpointer has quit [Quit: Computer has gone to sleep.]
<zendeavor>
i'm a vim fanatic too, but don't do that.
<zendeavor>
don't speak in such absolutes.
<zendeavor>
sublime text, textmate and emacs are all equally viable editors, better or worse in various ways.
stuartrexking has quit [Quit: Leaving...]
<alpha123>
zendeavor: I guess I should have prepended that with an "IMO," although I do believe than an experienced Vim user is usually more productive than an experienced Emacs or Sublime user.
<zendeavor>
gedit, geany are also modular and extensible
stuartrexking has joined #ruby
<zendeavor>
you must have never seen a serious emacs user...
<sevenseacat>
probably true, but how many years does it take you to get that productive
<alpha123>
zendeavor: I *was* a serious emacs user.
<zendeavor>
about 3 months
cpruitt has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
<alpha123>
sevenseacat: Quite a while, that's why I recommended Sublime Text to him.
freerobby has joined #ruby
<sevenseacat>
:)
cpruitt has joined #ruby
<zendeavor>
anyway, it all depends on taste and the task at hand
<zendeavor>
if you just need to insert a lot of code, they're equivalent
<alpha123>
(I do really like Vim for editing Ruby though, there are some really great Ruby extensions although I can't remember which ones I have installed currently.)
<zendeavor>
if you need to navigate a lot of code, nothing beats text-objects imo
stuartrexking has quit [Client Quit]
<zendeavor>
alpha123: :scriptnames
ravster has left #ruby [#ruby]
<alpha123>
zendeavor: I'm in a VM right now, not at my primary development computer. But thanks. :)
justsee has quit [Quit: leaving]
stuartrexking has joined #ruby
<aucahuasi>
hehe is ok, I get the idea, so it isn't important any IDE to develop ruby, also, I'll try sublime text editor for sure, thanks to all ;)
justsee has joined #ruby
justsee has quit [Changing host]
justsee has joined #ruby
<zendeavor>
if you need to automagically manipulate large bodies of code, emacs probably understands code the best
cj3kim has joined #ruby
Demo_of_doom_ has joined #ruby
<zendeavor>
partiularly awful about vim is the syntax highlighting
<zendeavor>
yeugh.
<alpha123>
aucahuasi: Yeah, you really can't go wrong with Sublime. It's fast, functional, and pretty, and has a boatload of extensions. IDEs tend not to work as well for Ruby since it's a highly dynamic language without static typing.
machuga has quit [Changing host]
machuga has joined #ruby
Kricir has joined #ruby
<alpha123>
zendeavor: The default color scheme is fairly awful, agreed.
sadwork has quit [Remote host closed the connection]
<zendeavor>
not that
AkashicLegend has joined #ruby
<zendeavor>
though :diff-mode is disgusting by default for sure
<alpha123>
oh? I haven't had much of a problem with its syntax highlighting otherwise.
ilyam has quit [Quit: ilyam]
<zendeavor>
it's awfully slow, and completely crippled with sufficiently large files
<zendeavor>
like, it will just stop highlighting code partway through a file.
<aucahuasi>
alpha123: I'll try to compare sublime with kate and see wich one is for me thanks mate
becky_ has joined #ruby
<zendeavor>
it's also based around extremely naive pattern-matching using vim's builtin regex engine
<alpha123>
hm. I evidentally haven't opened a large enough file for that to happen then, but I'll keep that in mind, thanks.
gr33n7007h has joined #ruby
<alpha123>
aucahuasi: Sublime is more powerful by far. It's got some good Ruby and RoR-specific extensions as well. :)
<alpha123>
r0bgleeson: Kate. I think it's like gEdit for KDE
<sevenseacat>
god I hate KDE software
Kricir has quit [Ping timeout: 246 seconds]
<zendeavor>
he's probably already using the full KDE desktop
<r0bgleeson>
oh i see.
<r0bgleeson>
yeah it probably is but its been a while.
<aucahuasi>
yes, but this is about features ;)
<sevenseacat>
KDE4 is ugly as sin
<aucahuasi>
zendeavor: true
osvico has joined #ruby
<zendeavor>
see my above link
<zendeavor>
the KATE features are *essentially* equivalent to sublime text, give or take a couple
<aucahuasi>
sevenseacat: true but it works for me ;)
<alpha123>
zendeavor: Kate is more powerful than I thought but Sublime's multiple cursors alone pretty much blow Kate out of the water.
<zendeavor>
same for gedit
<sevenseacat>
i was so sad when my favorite KDE app moved from KDE3 to KDE4, i couldnt use it anymore :/
<alpha123>
Not to mention the more numerous extensions for Sublime.
<sevenseacat>
gedit actually isnt too bad either
mootpointer has joined #ruby
<r0bgleeson>
and the fact that sublime runs everywhere :)
<sevenseacat>
sublimes cross-platformness is a good thing.
<zendeavor>
and a rabbit hole
<r0bgleeson>
with the same feature set.
* sevenseacat
uses it on all the platforms
<zendeavor>
then it's like "but vim/emacs are even more universally compatible and have more features and more plugins"
Domon has quit [Remote host closed the connection]
machuga has quit [Remote host closed the connection]
machuga has joined #ruby
<aucahuasi>
yes good points, kate lacks portabillity ... let me try sublime ... installing :)
<r0bgleeson>
probably are, much bigger ecosystem, they're just harder to use and take much more time to become a power user of.
Domon has joined #ruby
<r0bgleeson>
i use emacs myself.
cj3kim has quit [Read error: Connection reset by peer]
<zendeavor>
i mean, i personally just wish everyone would stfu and give up the ghost
<rkeene>
Is there anything like TclKit from Tcl for Ruby ?
<r0bgleeson>
what ghost?
<alpha123>
zendeavor: Hey, like I said, I do prefer Vim. :) But both of those have way bigger learning curves.
<popl>
give up the goatse?
<sevenseacat>
i wouldnt consider myself a power user of any editor
<zendeavor>
r0bgleeson: misappropriated use of the phrase really
zeade has joined #ruby
<r0bgleeson>
umm maybe power user is a bad word, but i'll be more proficient in kate or sublime than i will be in emacs(if i'm new to both editors)
machuga has quit [Remote host closed the connection]
ChronocityLC has joined #ruby
<aucahuasi>
I see, the scripting system is in python
wesside has joined #ruby
<sevenseacat>
or vim - 'how do i save a file!?!?' (i know how, but i can see that being a common question)
zeade has quit [Client Quit]
<r0bgleeson>
i used vim before, now emacs, and i don't think any is "better". emacs suits me better. i like to develop in a tmux session, so anything GUI doesn't work for me.
iFire has quit [Read error: Connection reset by peer]
iFire_ has joined #ruby
<r0bgleeson>
sevenseacat: it's not that much easier in emacs really, even though that joke is often thrown at vim users.
Domon has quit [Ping timeout: 246 seconds]
<sevenseacat>
i see - ive never used emacs
<alpha123>
r0bgleeson: Hehe, I used to be an Emacs user who switched to Vim because I think it fits *me* better. But both are cool editors, and Emacs makes a decent OS as well....
JZTech101 has quit [Quit: Bye]
osvico has quit [Ping timeout: 276 seconds]
<r0bgleeson>
alpha123: it ain't an editor if it isn't also a full fledged LISP REPL & interpreter.
<alpha123>
r0bgleeson: slimv :)
<alpha123>
(I'm actually a Common Lisp programmer)
thesheff17 has quit [Ping timeout: 245 seconds]
<r0bgleeson>
i am dabbling with lisp
<r0bgleeson>
looking at clojure
<r0bgleeson>
probably flow with go in the end
<alpha123>
(one of about 10 who use Vim for Common Lisp - sometimes I switch back to Emacs for things slimv can't do well)
rkeene has left #ruby [#ruby]
machuga has joined #ruby
<alpha123>
They say Ruby is an acceptable Lisp though ;)
<r0bgleeson>
oh well
<r0bgleeson>
i can probably make you a emacs user again
<r0bgleeson>
type "lambda { }" in foo.rb
* alpha123
is on a VM without emacs installed
<r0bgleeson>
in transforms into the unicode representation
<r0bgleeson>
so awesome ^_^
<alpha123>
Ah yeah, I used to have my Emacs do that for Lisp
<alpha123>
pretty-mode?
adeponte has joined #ruby
<r0bgleeson>
it was automatic for me, works in lisp & ruby files.
<alpha123>
Did you install some sort of starter pack like the Emacs Starter Kit or whatever that other one is?
<r0bgleeson>
yep
<r0bgleeson>
the one for osx
<alpha123>
I'm pretty sure that includes pretty-mode
bzitzow has joined #ruby
araujo has quit [Ping timeout: 248 seconds]
<r0bgleeson>
the in-editor package manager is cool
<alpha123>
I had mine set up to do the Unicode not-equal character, the nil set symbol, and a few Greek characters as well. It was sick, I miss it in Vim.
bsaboia_ has joined #ruby
<alpha123>
Vim has Vundle which is at least as good as package.el IMO
<r0bgleeson>
i cant understand how you would write lisp but go to vim :O
* sevenseacat
over in the corner going 'yay package control' >_>
<r0bgleeson>
maybe vim is just better at a much more fundamental level for you
Spami has joined #ruby
<alpha123>
I'm not sure how I can write Lisp but go to Vim. :P I am more productive with it though, modal editing is really quite awesome.
<r0bgleeson>
mhm yeah
<aucahuasi>
all the plugins in sublime are from 3rd party developers? btw nice editor
<r0bgleeson>
i guess i gauge it like this
cads has joined #ruby
<r0bgleeson>
when i used vim, it beeped all the time
<r0bgleeson>
when i use emacs, it beeps less
twoism has quit [Remote host closed the connection]
<alpha123>
lol
<r0bgleeson>
(im making less mistakes)
<r0bgleeson>
so more natural
<alpha123>
slimv has a paredit-mode like thing that makes Lisp pretty decent in Vim
<alpha123>
You probably didn't grasp the Zen of Vim then
twoism has joined #ruby
<r0bgleeson>
definitely not
<r0bgleeson>
i was by no means an engrossed vim user
<r0bgleeson>
ive seen some leet power users :)
ehc has quit [Quit: ehc]
<alpha123>
It takes a while to realize that you're speaking a language to your editor. In effect, you program Vim to modify your code.
adeponte has quit [Ping timeout: 264 seconds]
<r0bgleeson>
but emacs is as just programmable :P
i_s has joined #ruby
<alpha123>
In a different way, yes
<aucahuasi>
ping :)
<r0bgleeson>
pong
jblack has quit [Ping timeout: 276 seconds]
alpha123 has quit [Quit: Vision[0.9.7-H-090423]: i've been blurred!]
babykosh has joined #ruby
twoism has quit [Ping timeout: 276 seconds]
lethjakm1 has joined #ruby
johnkary has joined #ruby
moos3 has joined #ruby
[Neurotic] has quit [Quit: Connection closed for inactivity]
lethjakman has quit [Ping timeout: 276 seconds]
stuartrexking has quit [Quit: Leaving...]
bleubeard has quit [Read error: Connection reset by peer]
pr0ggie has joined #ruby
bleubeard has joined #ruby
jblack has joined #ruby
Kruppe has quit [Remote host closed the connection]
bsaboia_ has quit [Read error: Operation timed out]
baroquebobcat has quit [Quit: baroquebobcat]
tanema has quit [Remote host closed the connection]
thesheff17 has joined #ruby
<aucahuasi>
sublime text multiselection feature =O
bklane has quit [Remote host closed the connection]
freeayu has joined #ruby
<aucahuasi>
well thanks again for your help bye :)
arya_ has joined #ruby
tomzx_mac has quit [Ping timeout: 256 seconds]
tomzx_mac_ has joined #ruby
aucahuasi has left #ruby ["Konversation terminated!"]
babykosh has quit [Quit: babykosh]
jblack has quit [Ping timeout: 256 seconds]
tjbiddle has joined #ruby
viszu has joined #ruby
stuartrexking has joined #ruby
kaspergrubbe has joined #ruby
mercwithamouth has quit [Quit: Lost terminal]
pkrnj has quit [Quit: Computer has gone to sleep.]
bradhe has joined #ruby
mercwithamouth has joined #ruby
iliketurtles has quit [Ping timeout: 248 seconds]
shadoi has quit [Quit: Leaving.]
kaspergrubbe has quit [Ping timeout: 264 seconds]
pkrnj has joined #ruby
druonysus has quit [Read error: Connection reset by peer]
iliketurtles has joined #ruby
druonysus has joined #ruby
mootpointer has quit [Quit: Computer has gone to sleep.]
MissionCritical has quit [Ping timeout: 245 seconds]
bradhe has quit [Ping timeout: 240 seconds]
stuartrexking has quit [Quit: Leaving...]
zorg24 has quit [Ping timeout: 240 seconds]
arya_ has quit []
arya_ has joined #ruby
whitenoise has joined #ruby
arya__ has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
stkowski has quit [Quit: stkowski]
scarolan1 has quit [Ping timeout: 260 seconds]
arya__ has quit [Client Quit]
scarolan2 has quit [Ping timeout: 264 seconds]
arya_ has quit [Ping timeout: 264 seconds]
iliketurtles has quit [Quit: zzzzz…..]
Domon has joined #ruby
IceDragon has quit [Quit: Space~~~]
ilyam has joined #ruby
Mission-Critical has joined #ruby
tabolario has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cj3kim has joined #ruby
Mission-Critical is now known as MissionCritical
bradsmith has joined #ruby
sevenseacat has left #ruby [#ruby]
wargasm has joined #ruby
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
Demo_of_doom_ has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 240 seconds]
dodosan has joined #ruby
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
Inside has quit [Ping timeout: 240 seconds]
viszu has quit [Quit: Leaving.]
Domon has quit [Ping timeout: 246 seconds]
browndawg has joined #ruby
twoism has joined #ruby
sevenseacat has joined #ruby
adeponte has joined #ruby
anay has joined #ruby
lepht_afk has quit [Quit: lepht->out]
Domon has joined #ruby
twoism has quit [Remote host closed the connection]
twoism has joined #ruby
nanoxd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ChronocityLC has quit [Ping timeout: 248 seconds]
nanoxd has joined #ruby
cj3kim has joined #ruby
druonysus has quit [Quit: Konversation terminated!]
druonysus has joined #ruby
druonysus has joined #ruby
druonysus has quit [Changing host]
Domon has quit [Remote host closed the connection]
Domon has joined #ruby
twoism has quit [Ping timeout: 264 seconds]
freeayu has quit [Ping timeout: 264 seconds]
randomau_ has joined #ruby
iliketurtles has joined #ruby
Domon has quit [Ping timeout: 264 seconds]
freeayu has joined #ruby
iliketurtles has quit [Client Quit]
randomautomator has quit [Ping timeout: 276 seconds]
randomau_ has quit [Ping timeout: 256 seconds]
kevinykchan has joined #ruby
Kobrakao has joined #ruby
axsuul has joined #ruby
johnkary has quit [Quit: @johnkary]
druonysuse has joined #ruby
druonysuse has joined #ruby
browndawg has quit [Quit: Leaving.]
tanema has joined #ruby
swordsmanz has quit [Read error: Connection reset by peer]
anay has quit [Remote host closed the connection]
Bhaveshkumar has joined #ruby
swordsmanz has joined #ruby
cj3kim has quit [Remote host closed the connection]
anay has joined #ruby
freerobby has quit [Quit: Leaving.]
cj3kim has joined #ruby
tommyvyo has joined #ruby
<fuzzy>
Is is possible to do an if then else in one line? x=1 if true else x=2
druonysus has quit [Ping timeout: 264 seconds]
AkashicLegend is now known as Akashic_Afk
Kricir has joined #ruby
<gr33n7007h>
fuzzy, Yes
<Nilium>
fuzzy: x = if true ; 1 else 2 end or x = true ? 1 : 2
<Nilium>
I'd probably avoid the first one.
<pontiki>
prolly the second too
* fuzzy
groks
<zendeavor>
i'd avoid anything that goes by the description "in one line"
<pontiki>
x ? 1 : 2
tanema has quit [Ping timeout: 276 seconds]
<Nilium>
Unless it's a really, really simple ternary, I'd avoid it.
<zendeavor>
"in one line" is an ugly, ugly pitfall
<fuzzy>
it's really a really really simple return
<zendeavor>
would it be clearer as a multiline statement
<Nilium>
I don't think fuzzy's a good judge of whether it'd be clearer.
<Nilium>
The fuzz is already in the brain.
<pontiki>
i see what you did thar
<whitenoise>
lol
<zendeavor>
fuzzy: prefer expressiveness over SLOC count
<Nilium>
He touched a lot of fuzzies.
<whitenoise>
fuzzy: basically, while the language allows you to do pretty much anything in one line...it's not "the ruby way"/convention/readable code
bradsmith has quit [Remote host closed the connection]
<fuzzy>
it's not so much that it has to be a one line I just think it would look alot cleaner then return 1 if found ; return 0 if !found
eldariof has joined #ruby
<Nilium>
Could you just do if found\n return 1\nelse\n return 2\nend?
<pontiki>
you only need: return 1 if found; 0
timonv has joined #ruby
<Nilium>
pontiki: Unless it's an early return
<pontiki>
right
<Nilium>
I'm assuming it's an early return or there's no reason for return in the first place
kaldrenon has joined #ruby
Bhaveshkumar has quit [Remote host closed the connection]
ntus1017 has quit [Remote host closed the connection]
decoponio has joined #ruby
<fuzzy>
pontiki: I thought that might work, I just wasn't 100% sure on how ruby treated returns
<pontiki>
quite; i'm assuming something like shooting an array or list, and bouncing out with the early return so you don't have to continue the list
<pontiki>
how did you think it might?
<fuzzy>
I figured if I had more then one return statement only the last one would be valid
<zendeavor>
an added bonus of multiline conditionals is you can later extend it by simply adding another line in the middle of the statement
<pontiki>
fuzzy: the first one executed wins
axeman- has joined #ruby
<pontiki>
return "WAAH" if false
supernullset has quit [Quit: leaving]
<pontiki>
the return will NOT be executed there
tomzx_mac_ has quit [Ping timeout: 240 seconds]
<fuzzy>
so can return be used to terminate a sub function early?
<pontiki>
BINGO
<fuzzy>
schweet
<fuzzy>
:)
<pontiki>
that is it's function entirely
kaldrenon has quit [Ping timeout: 240 seconds]
<fuzzy>
I thought it was just to set the return variable on exit of the sub function
<fuzzy>
thank you
cyong has joined #ruby
redmenace has quit [Ping timeout: 264 seconds]
daniel_hinojosa has quit [Quit: Leaving.]
redmenace has joined #ruby
marcgg has quit [Read error: Connection reset by peer]
<pontiki>
fuzzy: "The body of a method contains normal Ruby expressions, except that you may not define an instance method, class, or module within a method. The return value of a method is the value of the last expression executed, or the result of an explicit return expression."
<pontiki>
well, actually, yeah, it'd have to, wouldn't it
<Nilium>
And third: cooks tacos.
* whitenoise
hates java, because java is slow.
<whitenoise>
lul.
<popl>
Java isn't slow.
<Nilium>
The JVM certainly isn't, anyway.
<popl>
A programmer can write shitty Java code.
<popl>
I implemented RSA in Java and it was comparable in speed to a C++ implementation.
<Nilium>
You can also write code that is literally in the shape of a shit.
Kobrakao has quit [Quit: This computer has gone to sleep]
<popl>
Nilium: It's a loose definition.
<Nilium>
Reminds me, I was going to look up what, if anything, java does to avoid cache misses. Seems like it should be able to rearrange objects in memory to help with that, but I actually have no idea.
<whitenoise>
i think just in general a compiled binary will always be slightly faster than bytecode, right?
<popl>
Neither do I. I haven't really written anything serious in Java since university.
<whitenoise>
even if by negligible amounts.
<bnagy>
why would that be so?
<popl>
whitenoise: There's nothing to suggest that.
<whitenoise>
hm
<popl>
whitenoise: Why do you think so?
baroquebobcat has quit [Client Quit]
<whitenoise>
seems like the java implementation would have more overhead.
<whitenoise>
like .NET and the CLR, for example.
<whitenoise>
except not as bad.
<popl>
whitenoise: Why?
<whitenoise>
but yes, there are huge Java applications that run really quickly.
<whitenoise>
bnagy: a central processing unit that takes in a simple set of instructions in a stack and does whatever they say by shuffling data through a small number of registers with simple mathematical operations.
<popl>
thanks Nilium
<whitenoise>
i would not call it a VM, no.
<sanav>
no language is perfect .huhh !!! python :easy but not pure OOP and slow ; Ruby : sexy but still slow ; SCALA : fast but ugly .Is Their any new PL ?
lethjakman has joined #ruby
tjad has joined #ruby
<bnagy>
why not? :)
<pontiki>
i am finding this quite tedious
<Nilium>
bnagy - question anarchist
<popl>
pontiki: just ignore it
<pontiki>
does your application *really* require that much speed?
dawkirst has joined #ruby
<whitenoise>
because it *is* the machine. a VM is an implementation of instructions that then translate to the instruction set its meant to run on.
<bnagy>
wellll.. the CPU does a lot of stuff with your machine code once it gets it, as well
<bnagy>
modern cisc cpus are actually pretty trippy
<popl>
interfering CPUs
<bnagy>
you're not really programming them as closely as you might imagine
<whitenoise>
not even in C?
<bnagy>
not even if you write raw machine code
<whitenoise>
hm
* popl
gets his tesla coil programming unit out of the closet
saintcajetan has quit [Ping timeout: 240 seconds]
cj3kim has quit [Read error: Connection reset by peer]
<whitenoise>
i am not aware of this. I have light experience with gdb and stepping through all that jazz and some NASM experience...as well as basic emulator programming, for like a Z80.
workmad3 has joined #ruby
<whitenoise>
and that is where I am pulling my understanding.
cj3kim has joined #ruby
<pontiki>
microcode+picocode
<popl>
millicode!
macmartine has joined #ruby
<zendeavor>
nanocode
fridim_ has joined #ruby
<popl>
femtocode?
<whitenoise>
reverse-petacode.
<whitenoise>
that's not a real thing; i apologize.
<popl>
neither is nanocode or femtocode
<popl>
we were just getting tiny
<bnagy>
anyways, the diff between x86 machine code and the theorectical concept of bytecode is kind of just a question of degrees
<pontiki>
wrote some microcode for the PDP8
<whitenoise>
get tiny or go home.
<pontiki>
that's trippy
<popl>
whitenoise: that's not what she said
<bnagy>
so a poor compiler could easily lose to a really good vm
<bnagy>
well.. maybe strike 'easily'
<whitenoise>
bnagy: which that makes sense to me.
nathandial has joined #ruby
<whitenoise>
i guess when you talk about theoretical speeds of languages, you have to assume that the code being run is 100% optimized to the platform its running on
<whitenoise>
which i would say is never the case.
<pontiki>
bnagy: what *are* you saying now?
<bnagy>
13:25 < whitenoise> i think just in general a compiled binary will always be slightly faster than bytecode, right?
<bnagy>
pontiki: just exploring that
<whitenoise>
bnagy: with the assumption of complete optimization
<whitenoise>
if you write a shoddy binary
<pontiki>
if you run poorly compiled code on the bare metal, compiling and running the code using the same bad compiler will be *worse*
* Nilium
munches on some crackers
<pontiki>
... on the VM
<whitenoise>
well
<popl>
Nilium: racist
<Nilium>
They had it coming.
<zendeavor>
i was gonna eat a brownie
* whitenoise
munches on some...can't think of any food-related racial slurs
<zendeavor>
but now i can't stomach it.
<whitenoise>
i have an idea.
<zendeavor>
i'd feel like a bigot
<whitenoise>
zendeavor: an active bigot, as sociology would call it.
<whitenoise>
lets all get together..in Switzerland, and write a really terrible C interpreter, and then write in our new C language a VM
<whitenoise>
that is also terrible
<whitenoise>
and we can call it...
<whitenoise>
Espresso
<sanav>
dreamy . huhh !!!
<whitenoise>
sanav: yes.
<zendeavor>
huhh !!!
<zendeavor>
that keeps happening
<zendeavor>
i'm curious where the compulsion to express oneself in text forums with such marked enthusiasm derives from
<bnagy>
you mean like some kind of low-level virtual machine?
<whitenoise>
i need to go to bed. i have been writing a lot of javascript tonight and it has messed up my perception of reality.
<sevenseacat>
lol
<pontiki>
how curious, zendeavor ?
<whitenoise>
i also am meeting a potential future employer for a second interview in the morning at 7, and i don't want to speak to him in this manner with ideas for us to go to switzerland.
<sanav>
whitenoise: sleep well .
baroquebobcat has joined #ruby
<zendeavor>
actually i'm more curious why non-english speakers tend towards it so often
<pontiki>
best of luck, whitenoise -- knock 'em dead
<whitenoise>
lol. night all.
browndawg has joined #ruby
<popl>
dream of hot cocoa and skiing
<pontiki>
i haven't noticed anyone here not speaking English...
<whitenoise>
and you, popl, writing steamy Java with pontiki
<whitenoise>
with zendeavor just standing in the background critiquing everything
<pontiki>
i will not write java
<popl>
pontiki: you know you want to
<zendeavor>
that's what i'm good at
<pontiki>
i know i don't
<whitenoise>
well
<whitenoise>
my actual complaint with Java is that its syntax is way too verbose.
<whitenoise>
System.out.println("hi");
<whitenoise>
rather than printf("hi"); print "hi" / puts "hi" / cout << "hi";
<popl>
pontiki: come on. say it with me.
<popl>
pontiki: public static void main(String [] argv)
<shredding>
canton7: Okay, i tracked the error down, it lies somewhere else. Sorry, i'm newby :)
relix has joined #ruby
<shredding>
I somewhat struggle at require from within the same directory, but i think i can figure it out
tatsuya__ has joined #ruby
parzo has joined #ruby
byprdct has joined #ruby
<shredding>
I know found that i wrote "Not found" as error message and ruby did the require correct.
zmansiv_ has joined #ruby
zmansiv has quit [Ping timeout: 276 seconds]
<shredding>
Maybe i should have another coffee.
gstamp has quit [Quit: Computer has gone to sleep.]
lkba has joined #ruby
ferdev has quit [Quit: ferdev]
zmansiv_ is now known as zmansiv
Bry8Star{T2 has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<Spooner>
shredding, Just use require_relative
linux_noob_666 has joined #ruby
<shredding>
Spooner: i found that require works from the start of my gem /lib folder.
kjellski has joined #ruby
tatsuya_o has quit [Ping timeout: 264 seconds]
<shredding>
Is it better practise to use require_relative?
anay has quit [Remote host closed the connection]
<shredding>
(I am quite familiar with the ruby syntax already, but my code still looks a bit like a mixture of java and python)
relix has quit [Client Quit]
<Spooner>
shredding, it does because gems add the lib dir to the require path. require_relative doesn't rely on current working dir. I only ever "require" gems.
relix has joined #ruby
<shredding>
Spooner: Okay.
<shredding>
Sounds reasonable.
mneorr has quit [Remote host closed the connection]
<Spooner>
require_relative can be faster too, if you are loading _many_ files.
MrZYX|off is now known as MrZYX
<shredding>
It makes as well the underlined warning from my ide go away!
<Spooner>
Yeah, requiring files is pretty much just if you need to support 1.8.7.
<hanmac>
require_relative also works if you download the gem from an repository (and do not build them)
anay has joined #ruby
jim0thy_ has quit [Quit: jim0thy_]
gildo has joined #ruby
klaut has joined #ruby
mneorr has joined #ruby
shaunbaker has joined #ruby
<pagios_>
hello, appreciate if you can allow me to ask a sinatra/ruby question in this channel, tried asking in sinatra but it looks like a kind of idle channel for the time being. So i have xmlrequest going into sinatra/ruby and calling a bash script which pings some hosts continously. I need to get this continuous ping output back into xmlrequest and display in realtime the output in a textarea on my browser. Can someone guide me in this matter? Thank you.
terlar has joined #ruby
Matriks has joined #ruby
aaronmcadam has joined #ruby
justsee has quit [Ping timeout: 246 seconds]
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Speed has joined #ruby
<Nilium>
What did you try and how are you running the script?
joonty has joined #ruby
<Nilium>
Admittedly couldn't care less about the sinatra part and can't give you a single ounce of help there, but the output part is pretty simple if you didn't do it in a stupid way.
<pagios_>
get '/getstats' do `sh /var/www/netspeed.sh wlan4` end <-- Nilium thats how i am calling the bash script which outputs in turn on the STDOUT
sjltaylor has joined #ruby
<Nilium>
Nevermind, you did it the stupid way
<Nilium>
Ok, that can be fixed.
<Nilium>
So 1) the Process module is your friend.
redmenace has joined #ruby
<Nilium>
2) Process::spawn is also your friend and you should be using it.
sevenseacat has quit [Quit: Leaving.]
<Nilium>
The documentation for Process::spawn will give you a ton of options you can use, you're interested in the ones under redirection, probably.
Es0teric has quit [Quit: Computer has gone to sleep.]
<pagios_>
in the approach you suggesting can i use the single xmlrequest to respond back the realtime data at different time interval? or do i need to open a new xmlrequest evertime i want to refresh the data back?
eka has quit [Quit: Computer has gone to sleep.]
<Nilium>
I don't know anything about Sinatra, so I can't help you there.
<pagios_>
thanks anyways
<Nilium>
That said, if you want an easy way to read data the shell script writes to stdout (or stderr), Process is the way to do it. Especially if the script doesn't exit.
timonv has joined #ruby
jim0thy_ has joined #ruby
<pagios_>
yea the script keeps outputting continously.. similar to a ping command from a linux shell
RichardBaker has quit [Quit: RichardBaker]
redmenace has quit [Ping timeout: 240 seconds]
AndChat| has joined #ruby
GeissT has quit [Quit: MillBroChat AdIRC User]
Domon has quit [Read error: Connection reset by peer]
Domon has joined #ruby
ferdev has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
Banistergalaxy has quit [Ping timeout: 264 seconds]
gildo has quit [Ping timeout: 264 seconds]
maxmanders has quit [Ping timeout: 240 seconds]
Domon has quit [Ping timeout: 264 seconds]
saintcajetan has quit [Ping timeout: 240 seconds]
maxmanders has joined #ruby
lkba has quit [Ping timeout: 260 seconds]
pagios_ has left #ruby ["Leaving"]
<Nilium>
In that case, yeah, you're going to want to use Process::spawn to launch it, get its pid, and read output from it.
_honning_ has quit [Ping timeout: 260 seconds]
Zai00 has joined #ruby
Mon_Ouie has joined #ruby
io_syl has quit [Quit: io_syl]
vlad_starkov has joined #ruby
Astralum has joined #ruby
BRMatt has joined #ruby
ChristianS has quit [Excess Flood]
ChristianS has joined #ruby
tatsuya_o has joined #ruby
Domon has joined #ruby
Astral_ has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
tatsuya__ has quit [Ping timeout: 264 seconds]
saintcajetan has joined #ruby
pygospa has quit [Disconnected by services]
TheRealPygo has joined #ruby
hogeo_ has joined #ruby
justsee has joined #ruby
saintcajetan has quit [Max SendQ exceeded]
smathieu has quit [Ping timeout: 276 seconds]
hogeo has quit [Ping timeout: 276 seconds]
goodgame has joined #ruby
jonkri_ has joined #ruby
kaspergrubbe has joined #ruby
jonkri has quit [Ping timeout: 276 seconds]
BizarreCake has joined #ruby
kaspergrubbe has quit [Ping timeout: 264 seconds]
Elhu has quit [Ping timeout: 256 seconds]
noodletraveler has joined #ruby
ChristianS has left #ruby ["Ciao"]
xcv has joined #ruby
Elhu has joined #ruby
Astralum has quit [Ping timeout: 264 seconds]
tommyvyo has joined #ruby
saintcajetan has joined #ruby
lurch__ has joined #ruby
saintcajetan has quit [Max SendQ exceeded]
lurch_ has quit [Ping timeout: 240 seconds]
lurch__ is now known as lurch_
testo has quit [Quit: Lost terminal]
tommyvyo has quit [Quit:]
fuzzy_ has joined #ruby
lurch_ has quit [Client Quit]
fuzzy has quit [Ping timeout: 276 seconds]
justsee has quit [Ping timeout: 264 seconds]
dodosan has joined #ruby
saintcajetan has joined #ruby
gildo has joined #ruby
adeponte has quit [Remote host closed the connection]
dodosan has quit [Ping timeout: 248 seconds]
lkba has joined #ruby
emergion has joined #ruby
vishal has joined #ruby
erry is now known as plush
plush is now known as erry
is_null has quit [Changing host]
is_null has joined #ruby
timonv has quit [Remote host closed the connection]
ananthakumaran has quit [Ping timeout: 256 seconds]
Astralum has joined #ruby
ananthakumaran has joined #ruby
popl has quit [Quit: We must make an idol of our fear, and call it God.]
fantazo has joined #ruby
mklappstuhl has joined #ruby
timonv has joined #ruby
nathandial has quit [Quit: Leaving.]
anay has quit [Remote host closed the connection]
outmyself has quit [Quit: Leaving.]
fgo has joined #ruby
anay_ has joined #ruby
fgo has quit [Remote host closed the connection]
mklappstuhl has quit [Remote host closed the connection]
colonolGron has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
noodletraveler has quit [Ping timeout: 264 seconds]
ebanoid has quit [Quit: brbomgwtfbbq]
tommyvyo has joined #ruby
predator117 has quit [Remote host closed the connection]
camilasan has quit [Remote host closed the connection]
saintcajetan has quit [Ping timeout: 240 seconds]
timonv has quit []
camilasan has joined #ruby
ElCapitanMarklar has quit [Quit: Textual IRC Client: www.textualapp.com]
xargoon has quit [Read error: Operation timed out]
tommyvyo has quit [Ping timeout: 264 seconds]
timonv has joined #ruby
boblu has quit [Quit: Leaving]
colonolGron has quit [Quit: Lost terminal]
k610 has joined #ruby
hogeo_ has quit [Remote host closed the connection]
justsee has joined #ruby
hogeo has joined #ruby
timonv has quit [Remote host closed the connection]
xargoon has joined #ruby
saintcajetan has joined #ruby
justsee has quit [Ping timeout: 240 seconds]
timonv has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
saintcajetan has quit [Max SendQ exceeded]
cascalheira has joined #ruby
predator117 has joined #ruby
AlSquire has joined #ruby
ebanoid has joined #ruby
hogeo has quit [Remote host closed the connection]
blackmes1 has joined #ruby
ewnd9 has quit [Ping timeout: 264 seconds]
tmi has quit [Quit: tmi]
<shredding>
hash['foo'] = 'bar' at the end of a method return 'bar', i found out. So in order to have the hash returned i have to add hash in the next line.
<shredding>
Is there a more elegant way?
<canton7>
no. to be fair, I think it's better to bemore obvious about what you're returning
blackmesa has quit [Ping timeout: 240 seconds]
kiri has quit [Ping timeout: 264 seconds]
freeayu has quit [Quit: This computer has gone to sleep]
_honning_ has joined #ruby
cdelo has joined #ruby
Zai00 has quit [Quit: Zai00]
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
xpirator has quit [Quit: Leaving...]
<apeiros>
shredding: use another method
Domon has quit [Remote host closed the connection]
Criztian has joined #ruby
<apeiros>
none exists yet, but classes in ruby are open. so add one.
Domon has joined #ruby
<shredding>
I'll read into that apeiros
<apeiros>
class Hash; def storing(key, value); store(key, value); self; end; end
<Mon_Ouie>
There's merge!, sort of
<Mon_Ouie>
hash.merge!("foo" => "bar")
<Mon_Ouie>
(Perhaps a bit pointless for a single pair though)
<shredding>
apeiros: Wow, that's a blast.
calife has joined #ruby
<shredding>
Normally, where'd you put that patched class?
<apeiros>
I'd usually put that into /lib/patches/ruby/hash.rb
niceguyjames has quit [Quit: Computer has gone to sleep.]
<shredding>
apeiros: and then you'd require that patch?
<apeiros>
sure. otherwise you can't use it
<apeiros>
/lib is of course PROJECT/lib
<shredding>
apeiros: It works, but from my understanding it's an override not a patch.
<apeiros>
not a "lib" dir in your root.
<shredding>
apeiros: lib in my gem, i guess.
Domon has quit [Ping timeout: 240 seconds]
<apeiros>
I don't know where you've got your terminology from :)
calife has quit [Client Quit]
kaspergrubbe has joined #ruby
<shredding>
I do not really understand why the other methods are still available.
ras63 has quit [Quit: ras63]
<apeiros>
yes, lib in your gem
<shredding>
Because, I essentially am redefining "String"
<apeiros>
shredding: because as said, classes in ruby are open
outbleed02 has joined #ruby
<shredding>
apeiros: I will read into that as well.
<apeiros>
you can reopen any class any time and add stuff as you want
<shredding>
Cool. just out of curiosity: why patches/ruby?
<apeiros>
if you define a method of the same name multiple times, then the last one wins.
anay_ has quit [Remote host closed the connection]
kung has quit [Read error: Connection reset by peer]
<shredding>
what else are you patchting, other than ruby ...
<apeiros>
because I also have patches/somegem/
vishal has quit [Remote host closed the connection]
filipe has quit [Ping timeout: 264 seconds]
<apeiros>
things which are too much work to maintain as a fork of the gem
outbleed02 has quit [Client Quit]
<shredding>
apeiros: Makes sense.
shaunbaker has quit [Remote host closed the connection]
<shredding>
This is an exciting language feature.
saintcajetan has joined #ruby
calife has joined #ruby
amacgregor_ has quit [Ping timeout: 264 seconds]
calife has quit [Client Quit]
maxmanders has quit [Ping timeout: 264 seconds]
calife has joined #ruby
<jrobeson>
shredding, until it bites you..
d3 has joined #ruby
<apeiros>
yupp, monkey patching ruby or foreign gems should be done only very carefully.
saintcajetan has quit [Max SendQ exceeded]
archer_ has joined #ruby
<jrobeson>
ruby will give you nearly unlimited rope to hang yourself with ... no matter how high your gallows platform is..
archer_ is now known as Guest39625
maxmanders has joined #ruby
calife has quit [Client Quit]
calife has joined #ruby
osvico has joined #ruby
camilasan has quit [Remote host closed the connection]
calife_ has joined #ruby
calife has quit [Client Quit]
calife_ has quit [Client Quit]
calife has joined #ruby
hanmac has quit [Quit: Leaving.]
saintcajetan has joined #ruby
shredding has quit [Quit: shredding]
camilasan has joined #ruby
nfk has joined #ruby
ndrei has quit [Quit: leaving]
nicoulaj has joined #ruby
camilasan has quit [Remote host closed the connection]
camilasan has joined #ruby
<apeiros>
jrobeson: heh, yes. nicely put.
<apeiros>
it also gladly hands you the rocket launcher to shoot your foot with.
osvico has quit [Client Quit]
<jrobeson>
BOOOM!!!!
k610 has quit [Ping timeout: 240 seconds]
shaunbaker has joined #ruby
Astralum has quit [Ping timeout: 264 seconds]
<jrobeson>
i'm not much of a ruby programmer .. but i've certainly read plenty about it over the years
<jrobeson>
i submitted a patch today even
osvico has joined #ruby
<apeiros>
I think a language should make it easy to avoid shooting yourself in the foot. however, I don't think it should ever prevent you.
<apeiros>
hm, too bad, shredding has gone. In ruby 2.0 you could do it in a safer way using refinements.
<apeiros>
less prone to foot-shootery
adeponte has joined #ruby
shaunbak_ has joined #ruby
<MrZYX>
do you like the way refinements are currently done?
filipe has joined #ruby
tanema has joined #ruby
ChronocityLC has joined #ruby
Kar- has joined #ruby
lurch_ has joined #ruby
osvico has quit [Ping timeout: 260 seconds]
shaunbaker has quit [Ping timeout: 240 seconds]
anay has joined #ruby
adeponte has quit [Ping timeout: 264 seconds]
sjltaylor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
filipe has quit [Ping timeout: 260 seconds]
Kibs has joined #ruby
<apeiros>
MrZYX: haven't spent any time with them. So no idea.
<apeiros>
also haven't read up on unwanted side-effects (like invalidating global method cache etc.)
<MrZYX>
I don't like that they're on a per file basis
<MrZYX>
I want them on a per class or even per block of code basis
<MrZYX>
and there was another issue I forgot because I don't use them for the reasons mentioned
_honning_ has quit [Ping timeout: 276 seconds]
Kibs has left #ruby [#ruby]
Guest39625 has quit [Remote host closed the connection]
jlebrech has quit [Read error: Connection reset by peer]
<apeiros>
well, a class usually is in one file, no?
saintcajetan has quit [Ping timeout: 241 seconds]
hanmac has joined #ruby
<Spooner>
Can anyone recommend a good dedicated programming tutor site (where I'd be the tutor). I use Odesk and Elance are for general freelancing, but I'd like to do more teaching.
shredding has joined #ruby
eka has joined #ruby
smathieu has joined #ruby
colonolGron has joined #ruby
ldnunes has joined #ruby
St_Marx has quit [Remote host closed the connection]
blackmes1 has quit [Ping timeout: 240 seconds]
<parzo>
Just wondering if anyone could possibly point me in the right direction as to how I would access something rails specific like request.env in a rubygem that I am trying to build?
rdark has quit [Quit: leaving]
filipe has joined #ruby
<jrobeson>
i can't speak for rails. but i think you're looking for rack.reqeust
<parzo_>
sorry I am relatively new to ruby and this is my first ever gem but where do I require that? Is it something that would go in the gemspec itself ?
<jrobeson>
well.. you might already be getting rack through other parts in your app
<jrobeson>
do you have a config.ru in your app?
bsaboia_ has joined #ruby
<jrobeson>
acdtually i don't know why i'm helping you troubleshoot this.. i've only used these things mostly standalone or via sinatra
postmodern has quit [Quit: Leaving]
zygotic33 has joined #ruby
subbyyy has joined #ruby
parzo has quit [Ping timeout: 264 seconds]
<parzo_>
:) it's ok
jmeeuwen has quit [Ping timeout: 264 seconds]
tealmage has quit [Remote host closed the connection]
St_Marx has joined #ruby
saintcajetan has joined #ruby
BizarreCake has quit [Read error: Connection reset by peer]
Elhu has quit [Quit: Computer has gone to sleep.]
saintcajetan has quit [Max SendQ exceeded]
Kelet_ has joined #ruby
decoponyo has joined #ruby
tommyvyo has joined #ruby
k610 has joined #ruby
Kelet has quit [Read error: Connection reset by peer]
shredding has quit [Ping timeout: 240 seconds]
mklappstuhl has joined #ruby
decoponio has quit [Ping timeout: 246 seconds]
Xeago has quit [Remote host closed the connection]
jmeeuwen has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
mklappstuhl has joined #ruby
mneorr_ has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
forced_request has quit [Read error: Connection reset by peer]
kjellski_ has joined #ruby
forced_request has joined #ruby
elaptics is now known as elaptics`away
saintcajetan has joined #ruby
Evixion` has joined #ruby
saintcajetan has quit [Max SendQ exceeded]
kjellski has quit [Ping timeout: 246 seconds]
Evixion has quit [Ping timeout: 246 seconds]
elaptics`away is now known as elaptics
fmcgeough has joined #ruby
Elhu has joined #ruby
<kek>
would it be possible to reuse the outer scope of this class definition in order to not have to pass in message and &block to the constructor? https://gist.github.com/kek/6192831
zygotic33 has quit [Quit: zygotic33]
jp- has quit [Ping timeout: 248 seconds]
<kek>
or something along those lines
emergion has joined #ruby
sjltaylor has joined #ruby
theRoUS has quit [Ping timeout: 246 seconds]
niceguyjames has joined #ruby
ereslibre has quit [Ping timeout: 264 seconds]
aalmenar has quit [Ping timeout: 264 seconds]
jlebrech has joined #ruby
decorist76 has joined #ruby
saintcajetan has joined #ruby
<apeiros>
kek: huh? why do you create a new anonymous class for this every time?
decorist76 has quit [Client Quit]
huoxito has joined #ruby
<apeiros>
why not just move that class definition to a class `Rule`, and then just do Rule.new(message, &block)?
ElCapitanMarklar has joined #ruby
<apeiros>
also, `@rules ||= []` - seriously, just put `@rules = []` in your initializer.
saintcajetan has quit [Max SendQ exceeded]
Astralum has joined #ruby
Maoko has quit [Read error: Connection reset by peer]
d2dchat_ has quit [Remote host closed the connection]
<kek>
apeiros: It's not a real world case, trying to experiment with what is possible with anonymous classes.
enebo has joined #ruby
<apeiros>
an anonyomous class has all the same possibilities as a named class
<apeiros>
having it accessible via a constant is the only difference.
mark_locklear has joined #ruby
<kek>
So the class has really no access to the scope outside of it it seems
enebo has quit [Client Quit]
ananthakumaran has quit [Quit: Leaving.]
ereslibre has joined #ruby
ereslibre has joined #ruby
aalmenar has joined #ruby
aalmenar has joined #ruby
<kek>
Anonymous (inline) or not
<apeiros>
well, in your gist, the block in line 3-14 have access to the lexical scope defined by `rule`
shaunbak_ has quit [Remote host closed the connection]
<apeiros>
but that's a property of blocks, not of classes
jbpros has joined #ruby
ChronocityLC has quit [Ping timeout: 264 seconds]
<apeiros>
also, line 6-9 and line 11-13 being method definitions have no access again
<apeiros>
you could use define_method with block syntax to retain access
Kricir has quit [Remote host closed the connection]
sambao21 has quit [Client Quit]
rlb3 has quit [Remote host closed the connection]
maycon_ has joined #ruby
maxmanders has joined #ruby
Guest10893 has joined #ruby
codecop has quit [Remote host closed the connection]
bklane_ has joined #ruby
maxmanders has quit [Max SendQ exceeded]
maxmanders has joined #ruby
Heero has joined #ruby
maycon has quit [Ping timeout: 240 seconds]
JDHankle has quit [Ping timeout: 264 seconds]
bklane has quit [Read error: Operation timed out]
devoldmx has joined #ruby
blaxter has quit [Ping timeout: 240 seconds]
ersmith has joined #ruby
ewnd9 has joined #ruby
s__dana has joined #ruby
kraljev1 has joined #ruby
pothibo has joined #ruby
maycon_ has quit [Client Quit]
jprovazn has joined #ruby
pagios has joined #ruby
Kar- has quit []
<pagios>
executing as root and making sure the port is not being used i get: /usr/local/lib/ruby/gems/1.9.1/gems/eventmachine-1.0.3/lib/eventmachine.rb:526:in `start_tcp_server': no acceptor (port is in use or requires root privileges) (RuntimeError)
Kabaka has quit [Remote host closed the connection]
St_Marx has quit [Remote host closed the connection]
<pagios>
anyidea?
bklane_ has quit [Remote host closed the connection]
Xiti has joined #ruby
apeiros has joined #ruby
St_Marx has joined #ruby
Speed has quit [Ping timeout: 240 seconds]
bklane has joined #ruby
adambeynon has joined #ruby
<kraljev1>
Is it possible to bind constant to the local scope
rubyist has quit [Remote host closed the connection]
Spami has joined #ruby
<Vis3r>
i just can't get past that command
kaspergrubbe has quit [Ping timeout: 264 seconds]
saintcajetan has quit [Max SendQ exceeded]
<Vis3r>
i'm using mysql 5.6.12
<Vis3r>
ruby 1.9.3
<Vis3r>
windows 7
robbyoconnor has quit [Ping timeout: 260 seconds]
<Vis3r>
and the tdm-32-4.5.2 devkit
colonolGron has quit [Quit: Lost terminal]
lepht_afk has joined #ruby
sambao21 has joined #ruby
<Vis3r>
i'm willing to pay for a solution at this point.. cause i'm going mad over this thing
filipe has quit [Read error: Operation timed out]
<parzo_>
Wondering if anyone can possibly help me out with something a newbieish but I am trying to build my first ever gem and I am trying to require 'action_dispatch/http/request' but I get a uninitialized constant ActiveSupport::Concern as a result just from the require statement
geekbri has joined #ruby
Heero has quit [Quit: Leaving]
interactionjaxsn has joined #ruby
shevy2 has joined #ruby
scarolan has joined #ruby
scarolan_ has joined #ruby
baordog has joined #ruby
sjltaylor has joined #ruby
chase-work has joined #ruby
dodosan has joined #ruby
parzo_ has quit [Remote host closed the connection]
_honning_ has joined #ruby
hamakn has joined #ruby
vince_prignano has joined #ruby
hamakn_ has joined #ruby
hamakn has quit [Read error: Connection reset by peer]
ntus1017 has quit [Remote host closed the connection]
Zai00 has quit [Ping timeout: 240 seconds]
<Vis3r>
yeh 64bit
anay has joined #ruby
<MrZYX>
that thread has plenty of ideas to try
Megtastique has joined #ruby
blaxter has quit [Ping timeout: 264 seconds]
<Vis3r>
alright thank you i'll try them now
<Vis3r>
haven't seen that one yet
cj3kim has joined #ruby
nanoxd has quit [Ping timeout: 256 seconds]
<MrZYX>
then you likely haven't googled for "checking for main() in -llibmysql... no" (with the quotes), that yields quite a few more threads
JDHankle_ has joined #ruby
anonymuse has joined #ruby
<chase-work>
i'm having trouble with some regexp, I want to grab all occurrences of string:another_string, where sometimes another_string can be wrapped in quotes. but my regex just matches the whole blob - (\w+:{1}"?.+"?)* with string: email:"email@me.com" or day:tuesday Obviously the .+ is going too far, but i'm not sure how to stop it, since there may not always be a space after the pair
forced_request has quit [Remote host closed the connection]
Zai00 has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
<MrZYX>
make it non-greedy (.+?) or do not match : ([^:]+)
filipe has joined #ruby
nanoxd has joined #ruby
anay has quit [Remote host closed the connection]
<chase-work>
hm
anay has joined #ruby
lepht_afk has quit [Quit: lepht->out]
anay has quit [Read error: Connection reset by peer]
<MrZYX>
with some forks actually containing some improvements
JDHankle has joined #ruby
mansi has joined #ruby
stef1a has joined #ruby
blip99 has quit [Ping timeout: 248 seconds]
<chase-work>
MrZYX thanks. i've gotten into the habit of c heckling the branch graph on github and checking commit messages. lots of good nuggets out there
<MrZYX>
yeah, me too
<stef1a>
how do you capitalize the first char of the word at the beginning of each line in a string? like if the string is: "- running \n-biking \n-swimming"
lebek_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Villadelfia has joined #ruby
<apeiros>
it uses tabs for indentation. so no? :)
<kraljev1>
ok, ignore that
<MrZYX>
.empty -> .empty? ?
<kraljev1>
and that :)
<kraljev1>
thanks
JDHankle has joined #ruby
fredjean has joined #ruby
<kraljev1>
what I meant to ask is, is this kind of nesting a good style
redmenace has quit [Ping timeout: 260 seconds]
<apeiros>
kraljev1: will controller.send call, *path use/access @body?
<kraljev1>
or should the immediate variable be used
<apeiros>
if not, then it's horrible code
<apeiros>
if not, then you should do a reverse-find with a fallback and invoke only that one
sarkis has joined #ruby
pagios has quit [Read error: Operation timed out]
sailias1 has joined #ruby
<MrZYX>
map {}.compact also smells for select
Villadelfia has quit [Read error: Connection reset by peer]
mklappstuhl has quit [Remote host closed the connection]
Villadelfia_ has joined #ruby
nathandial has joined #ruby
<apeiros>
e.g. invoke = calls.reverse.find(:other) { |call| controller.respond_to?(call) }
<apeiros>
and then just @body = controller.__send__(invoke, …)
sailias has quit [Ping timeout: 276 seconds]
jbpros has joined #ruby
timonv has joined #ruby
IceyEC has quit [Quit: IceyEC]
Villadelfia_ has quit [Read error: Connection reset by peer]
IceyEC has joined #ruby
Villadelfia has joined #ruby
Villadelfia has quit [Changing host]
Villadelfia has joined #ruby
kaspergrubbe has quit [Ping timeout: 276 seconds]
sailias has joined #ruby
<MrZYX>
I'm not sure what @body should contain once that's run, I mean what the intention is
blackmes1 has joined #ruby
akashj87 has quit [Ping timeout: 276 seconds]
ZoanthusR has joined #ruby
arya_ has quit []
arya_ has joined #ruby
akashj87 has joined #ruby
sparr_ has joined #ruby
Xeago has joined #ruby
S0da has joined #ruby
akashj87_ has joined #ruby
<apeiros>
I'd assume the value returned by the last `call` to which controller respondet
<apeiros>
*responded
<apeiros>
the question is whether later calls depend on earlier ones. but seems kraljev1 doesn't bother to reply to follow up questions.
sailias1 has quit [Ping timeout: 276 seconds]
Villadelfia has quit [Read error: Connection reset by peer]
Villadelfia_ has joined #ruby
aganov has quit [Remote host closed the connection]
JumpMast3r has quit [Quit: JumpMast3r]
akashj87 has quit [Ping timeout: 276 seconds]
freeayu has quit [Ping timeout: 276 seconds]
mklappstuhl has joined #ruby
<aedorn>
Sometimes I want to DDoS my coworker's internet connection so I can stop listening to him play League of Legends all day.
jonkri_ has quit [Quit: jonkri_]
<MrZYX>
just pull the plug?
freeayu has joined #ruby
<aedorn>
it's in his cube. Besides, he wouldn't know how to figure out it was a DDoS attack (which is amusing because he's a QA person for networking equipment)
jlebrech has quit [Quit: Konversation terminated!]
sailias has quit [Ping timeout: 248 seconds]
<MrZYX>
or get one of these remotely controlled sockets
sailias has joined #ruby
wallerdev has joined #ruby
lethjakman has joined #ruby
BeLucid has joined #ruby
bradsmith has quit [Remote host closed the connection]
Fire-Dragon-DoL has quit [Ping timeout: 240 seconds]
k610 has quit [Quit: Leaving]
<MasterAsia>
aedorn: coworker plays league of legends at work and no one gives a shit?
Kricir has joined #ruby
sailias1 has joined #ruby
arya_ has quit []
sailias has quit [Ping timeout: 264 seconds]
splittingred_ has joined #ruby
splittingred has quit [Read error: Operation timed out]
splittingred_ is now known as splittingred
Matriks has quit [Remote host closed the connection]
<aedorn>
Nope. I've complained about it before (here), but the general philosophy is you get your work done and nobody cares. He just happens to never really get work. We like our inefficiency I guess.
<lectrick>
Is there a test suite runner that will run both minitest and rspec test types and compile all results into a single report?
iliketurtles has joined #ruby
rodacato has quit [Remote host closed the connection]
<MasterAsia>
aedorn: Can I get a job there?
<MasterAsia>
You'll have TWO coworkers playing league of legends
<aedorn>
I should just give in and play Dota2 all day.
akashj87__ has joined #ruby
<MasterAsia>
aedorn: I want to get paid to develop Rubinius.
<lectrick>
aedorn: Also, what kinds of noise does someone make who is playing LoL? (assuming they don't have the gall to not use headphones)... "...Fuck! You motherfucker!" etc.
<MasterAsia>
Different philosophies.
lurch_ has quit [Quit: lurch_]
<MasterAsia>
lectrick: "You KSER". "DEFEAT".
<aedorn>
lectrick: Yes, exactly that ... and it's weird how constant mouse clicking will also start to become irritating.
Villadelfia_ has quit [Ping timeout: 260 seconds]
akashj87_ has quit [Ping timeout: 276 seconds]
ewnd9 has quit [Read error: Operation timed out]
<lectrick>
1) record yourself constantly mouse clicking 2) watch psych videos of mice pressing bar for cocaine and ignoring food until they die 3) think about your life
lebek has joined #ruby
<aedorn>
MasterAsia: If I could pay people to work on Rubinius, I would. I really want that to succeed.
<aedorn>
lol
<banisterfiend>
MasterAsia: do you have many commits on rbx?
akashj87 has quit [Ping timeout: 276 seconds]
ixti has joined #ruby
<MasterAsia>
banisterfiend: No I'm just a hardcore fan of it. I -should- check how one contributes though, maybe I can actually lend a hand. Brb checking repo
rodacato has joined #ruby
Villadelfia has quit [Quit: Leaving.]
<banisterfiend>
MasterAsia: cool, what do you like about it?
<MasterAsia>
Hmm.I suppose I can help with ruby spec compliance/core/stdlib, not the low-level c stuff.
bradhe has quit [Remote host closed the connection]
axl_ has joined #ruby
<MasterAsia>
banisterfiend: What's not to like about a high-performance JIT for Ruby, with true threads?
nathandial has quit [Quit: Leaving.]
bradhe has joined #ruby
cgore has joined #ruby
<banisterfiend>
MasterAsia: im not following it too closely, but is it in reality actually faster than MRI for example? or are you talking theoretically?
<MasterAsia>
If it ever catches up feature-wise to MRI, there would be no reason to use MRI except for maybe odd c-extensions that don't work in rbx
dankest has joined #ruby
Fire-Dragon-DoL has joined #ruby
brennanMKE has joined #ruby
lethjakm1 has joined #ruby
lethjakman has quit [Ping timeout: 264 seconds]
bradsmith has joined #ruby
BlakeRG has joined #ruby
ssvo has joined #ruby
TTimo has joined #ruby
<aedorn>
I like that I understand Rubinius' code base better than MRI's.
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maxmanders has quit [Ping timeout: 276 seconds]
fantazo has quit [Ping timeout: 276 seconds]
wting has quit [Remote host closed the connection]
benlieb has joined #ruby
<MasterAsia>
banisterfiend: You'll have to look at benchmarks for that. All the benchmarks I've seen are pretty dated now. Theoretically, rbx does have a very solid base with a core/stdlib written in ruby.
bradhe has quit [Ping timeout: 276 seconds]
wsterling has joined #ruby
huoxito has joined #ruby
timonv has quit [Remote host closed the connection]
akashj87__ has quit [Ping timeout: 276 seconds]
maxmanders has joined #ruby
DrShoggoth has quit [Quit: Leaving]
filipe has joined #ruby
chasep_work has joined #ruby
<lectrick>
hey banisterfiend... ever hear of a test suite runner that will run both minitest and rspec test types and compile all results into a single report?
<banisterfiend>
no sry
<chasep_work>
how do I write a regex where I need to match a #? /\b#(\d+)\b/ isn't working, nor if I do \#
<breakingthings>
MasterAsia: banisterfiend: A few benchmarks say it was faster than both MRI 1.9.2 and JRuby at the time, by a significant margin.
<breakingthings>
But of course, only once it hit a certain churn.
shaunbak_ has quit [Remote host closed the connection]
<MasterAsia>
breakingthings: Makes sense, dat jit
<waxjar>
in most benchmarks ive seen rbx was actually slower. dunno how old they were tho
<TTimo>
but it looks like the answer is pseudocode
<TTimo>
and not ruby code that I can directly use
Spami has quit [Quit: This computer has gone to sleep]
sanguisdex has joined #ruby
snath has quit [Ping timeout: 248 seconds]
dodosan has joined #ruby
<TTimo>
the old_sys = system line is giving an error about argument count
<cmyers>
google/stackoverflow fail. =| I need to convert a date like this: "2013-06-17T11:09:14.000-0700" into a Time object. ruby 2.0, no rails loaded. Is there a built-in module that can do that, or any advice on what gem to use?
<TTimo>
anybody can workout the proper syntax ?
cgore has quit [Remote host closed the connection]
lurch_ has joined #ruby
<spike|spiegel>
cmyers: that format has a name... you can just Time.parse it.
<spike|spiegel>
(after require 'time' ofcouse)
dodosan has quit [Read error: No route to host]
cj3kim has joined #ruby
tvw has quit []
<cmyers>
spike|spiegel: hmm, I must have missed that API - I'll go look up the names and try it out - thx
dodosan has joined #ruby
Vivekananda has joined #ruby
narsqt has quit [Remote host closed the connection]
nomenkun has quit [Read error: Operation timed out]
lethjakm1 is now known as lethjakman
io_syl has quit [Quit: io_syl]
<cloaked1>
TTimo: using $?.to_s in a conditional expression should work
<cmyers>
spike|spiegel: oh, I see, it just works
<cmyers>
I think I hadn't require'd time and that is why it didn't work for me before
shadoi has joined #ruby
<cloaked1>
TTimo: in other words, after running a command that is, you can use $?.to_s to test the exit code. Is that what you're looking for?
jbpros has quit [Quit: jbpros]
<TTimo>
cloaked1: I have a lot of system statements .. I was hoping I could make the first answer work
<TTimo>
e.g. redefining the system call
<cloaked1>
just out of curiosity...if you have a lot of system commands, why aren't you just writing a shell script? :)
<TTimo>
well
noname001 has quit [Ping timeout: 248 seconds]
<TTimo>
it's windows
<TTimo>
trying to stay away from powershell and all that
<TTimo>
and the rb script isn't mine in the first place
utdemir has joined #ruby
<spike|spiegel>
ruy is the new shell?
<spike|spiegel>
ruby*
benlieb has quit [Quit: benlieb]
<cloaked1>
ah... I see. That would have been good to know in the first place. =} My responses might be limited now.
<cloaked1>
the docs say something about using mrbgems, but I don't have the source built yet *and* I am hoping I can just pull the require source into the mruby source and let it all just happily build in one go.
jonahR has joined #ruby
<MasterAsia>
cloaked1: No clue. Did you try to check for a mailing list?
Neomex has joined #ruby
<cloaked1>
but I'm unable to find good info on how to do this.
<apeiros>
runixo: that doesn't really answer the question. also while gregorian was invented 1582, it wasn't introduced until much later :)
Neomex has quit [Client Quit]
<cloaked1>
MasterAsia: I haven't found one yet. Just thought I'd try IRC first.
<apeiros>
runixo: anyway, assuming backdated gregorian - did you do leap years correctly?
<cloaked1>
it's faster and I'm working on a time-sensitive project. :)
<apeiros>
runixo: as in: 4 years yes, 100 years no, 400 years yes?
<BlakeRG>
If i do: rescue StandardError => e how do i get the exception of the e ?
Criztian has quit [Remote host closed the connection]
_honning_ has joined #ruby
anay has quit [Remote host closed the connection]
Astral_ has quit [Ping timeout: 264 seconds]
mklappstuhl has joined #ruby
apeiros has quit [Remote host closed the connection]
devoldmx3 has joined #ruby
jim0thy_ has quit [Quit: jim0thy_]
the_mentat has joined #ruby
chrisja has joined #ruby
phantasm66 has quit [Quit: *poof*]
saintcajetan has quit [Max SendQ exceeded]
devoldmx has quit [Ping timeout: 240 seconds]
mando has joined #ruby
runixo_ has joined #ruby
runixo has quit [Ping timeout: 264 seconds]
stkowski has joined #ruby
timonv has quit [Remote host closed the connection]
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pkrnj has joined #ruby
arya__ has quit [Ping timeout: 256 seconds]
zorg24 has joined #ruby
io_syl has joined #ruby
bzitzow has joined #ruby
kaldrenon has quit [Remote host closed the connection]
jbpros has joined #ruby
Diranged has joined #ruby
ersmith has joined #ruby
thomaslee has joined #ruby
tealmage has joined #ruby
momomomomo has joined #ruby
twoism has joined #ruby
CuteAlien has joined #ruby
c0rn has joined #ruby
rupee has joined #ruby
shaunbaker has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
bsaboia_ has joined #ruby
kraljev1 has quit [Ping timeout: 246 seconds]
<CuteAlien>
Hello. Probably wrong channel, but I was wondering if anyone in here is experienced in the specific ruby API for SketchUp. I've spend all day there on trying to optimize some stuff, but I'm new with both - ruby and sketchup and pretty stuck. Basically all operations which have to go over all entities are incredible slow - even just getting all entities of a certain type can already take seconds (code examle: http://ideone.com/aS9r8
<Nilium>
Man, whoever is running the local blood donor mailing list is .. not remembering that they sent out emails already today
<havenwood>
pagios_: Or better yet, chruby ^
<Nilium>
Just don't use rvm.
Kelet_ has quit [Read error: Connection reset by peer]
<Nilium>
Unless you absolutely need rvm for some reason, don't use it.
blaxter has quit [Ping timeout: 264 seconds]
ixti has quit [Quit: WeeChat 0.4.1]
Kruppe has quit [Remote host closed the connection]
Al_ has quit [Quit: Al_]
Kruppe has joined #ruby
ffio has quit [Quit: WeeChat 0.4.1]
c0rn has quit [Ping timeout: 246 seconds]
Kruppe has quit [Remote host closed the connection]
DrCode has joined #ruby
barratt has quit [Quit: Leaving...]
athst has joined #ruby
Kelet has joined #ruby
mklappstuhl has quit [Remote host closed the connection]
barratt has joined #ruby
blaxter has joined #ruby
ixti has joined #ruby
c0rn has joined #ruby
alpha123 has joined #ruby
blip99 has quit [Ping timeout: 240 seconds]
<e-dard>
seems http.Request does not set content-length automatically. Is it usual that http clients don't se their content-length automatically, when making requests? Aside from browsers of course
<e-dard>
wrong channel, sorry for the noise.
devoldmx has quit [Ping timeout: 240 seconds]
test6478452 has joined #ruby
barratt has quit [Client Quit]
<test6478452>
can you pass a function to another function in ruby?
mklappstuhl has joined #ruby
<havenwood>
test6478452: Yes.
<MrZYX>
kind of, if you absolutely need to. But most of the time you want a block or a proc
<havenwood>
Semantics aside.
maxmanders has quit [Quit: Computer has gone to sleep.]
freeayu has quit [Remote host closed the connection]
devoldmx has joined #ruby
<test6478452>
do you pass it as a string ?
olivier_bK has quit [Ping timeout: 260 seconds]
<MrZYX>
no
<MrZYX>
describe your actual problem
<havenwood>
test6478452: Ruby has methods not functions. There are also procs, blocks and lambdas.
barratt has joined #ruby
AlHafoudh has joined #ruby
AlHafoudh has quit [Max SendQ exceeded]
barratt has quit [Client Quit]
asteve has joined #ruby
<test6478452>
its for sass which is ruby, wanting to pass a function to another function to control its output
AlHafoudh has joined #ruby
<endash>
lambdas procs and blocks, oh my
athst has quit [Ping timeout: 256 seconds]
athst has joined #ruby
<endash>
sounds like a block
_honning_ has quit [Ping timeout: 264 seconds]
elaptics is now known as elaptics`away
vlad_sta_ has joined #ruby
<test6478452>
so in principle it is possible, dont pass it as a string, look up procs and blocks, thats it?
<endash>
for instance when you call map {} or each {} <- you're passing the map and each methods a block
<havenwood>
pagios_: For starters, you need libyaml. :P
kraljev1 has joined #ruby
BizarreCake has joined #ruby
Fire-Dragon-DoL2 has quit [Quit: Leaving.]
interactionjaxsn has quit [Remote host closed the connection]
<havenwood>
pagios_: Do you have libyaml package installed?: dpkg -s libyaml
vlad_sta_ has quit [Ping timeout: 276 seconds]
interactionjaxsn has joined #ruby
bradleyprice has joined #ruby
<pagios_>
aie. The following packages have unmet dependencies:ibc6 : Breaks: locales (< 2.17)
diegoviola has joined #ruby
<pagios_>
E: Internal Error, No file name for libc6 whn trying to install it
<havenwood>
oh, package is libyaml-dev
<pagios_>
yea i did that... got that error
<havenwood>
pagios_: sudo dpkg --configure -a
nerdman has quit [Quit: leaving]
ramblex has quit [Remote host closed the connection]
saarinen has joined #ruby
<havenwood>
I dunno, maybe `sudo apt-get clean && apt-get update`
<cmyers>
anyone have a suggestion for a ruby library for printing tabular data on the CLI? Currently using terminal-table gem and it is pretty nice but it can't wrap or handle long data nicely...
stuartrexking has quit [Quit: Leaving...]
vlad_st__ has quit [Remote host closed the connection]
d2dchat_ has quit [Remote host closed the connection]
bsaboia_ has quit [Ping timeout: 256 seconds]
interactionjaxsn has quit [Ping timeout: 264 seconds]
awarner_ has quit [Remote host closed the connection]
<havenwood>
So you dun have to build Ruby over and over. :P
blip99 has joined #ruby
<havenwood>
pagios_: Just building Ruby yourself and pointing chruby to it might save you a good bit of headache. Hardest part is adding it to your dotfiles. :P
graft has joined #ruby
awarner has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
<pagios_>
how can i remove my current ruby installation
<pagios_>
want to wipe it off
[2]jadams has joined #ruby
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<havenwood>
pagios_: To use a tool like chruby or rbenv you don't have to remove system Ruby by the way.
<norm>
i'm occasionally getting a segfault that i believe is in ruby itself (no mention of any external libraries in the stacktrace). what's the best way to go about debugging?
<havenwood>
norm: What kind of segfault? What Ruby version?
Elhu has quit [Quit: Computer has gone to sleep.]
Matriks has joined #ruby
[1]jadams has quit [Ping timeout: 264 seconds]
<norm>
havenwood: 1.9.3-448, i can pastie the output
<havenwood>
norm: I'd be curious to see it. Wonder if it is still segfaulting in trunk.
<alpha123>
norm: GDB I guess. If you can reproduce it and get a backtrace that would be pretty helpful.
<norm>
yeah, gdb would be nice. i haven't gotten to that step yet
<zaargy>
from within a class do you access a instance var as @foo or just foo?
<norm>
unfortunately it's very sporadic and i haven't seen it in dev/test. just on our production servers :)
mklappstuhl has quit [Remote host closed the connection]
<havenwood>
zaargy: @
<zaargy>
thanks...
<alpha123>
zaargy: @ is just short for self, so @foo (since foo would be a local variable and self.foo would be the instance variable)
altamic has joined #ruby
<Nilium>
self.foo isn't an instance variable.
rodacato has joined #ruby
momomomomo has quit [Quit: momomomomo]
<havenwood>
class method
blaxter has quit [Quit: foo]
<zaargy>
yep
<alpha123>
Nilium: Bah, yes. I got somewhat confused (that's what I get for coming to Ruby through coffeescript)
<zaargy>
i always used @foo
<Nilium>
If it's defined using an attr_* method, then it'll return something stored in an ivar.
<zaargy>
but i noticed that foo worked too
<havenwood>
class instance method >.> confusing name if there is one
mattinahat has joined #ruby
<Nilium>
I just call 'em instance methods.
<mattinahat>
does anyone have any experience with watir
<mattinahat>
i can't get my download confirmation dialog to go away
<Nilium>
Waste of time calling it a class instance method since you're not going to instantiate a module.
c0rn has quit [Quit: Computer has gone to sleep.]
dtcrshr has quit [Quit: poff]
relix has joined #ruby
<mattinahat>
i've changed the profile settings, but it doesn't seem to do much
ilyam has quit [Quit: ilyam]
wargasm has joined #ruby
forced_request has joined #ruby
benlieb has joined #ruby
Hail_Spacecake has joined #ruby
marcdel has joined #ruby
<Hail_Spacecake>
in ruby 1.8, I need to put a non-printable unicode character in a regexp
<Hail_Spacecake>
how do I go about doing that, without literally typing the non-printable unicode character into the source code file?
<zaargy>
what is the best command line argument lib for when you have lots of subcommands? e.g. ./foo create -h something -l dfd ./foo delete -y sdfsd -p dsf etc
sambao21 has quit [Quit: Computer has gone to sleep.]
<spike|spiegel>
it depends on whether or not you want "isolation"
<tjbiddle>
zaargy: Bundler will: Install all gems in a gem file - And when using 'bundle exec some_command' it will make sure only the gems in the gemfile are loaded.
<zaargy>
i have read the source
<zaargy>
i know what bundler does
<davidcelis>
zaargy: so what's the question, then?
parzo has quit [Remote host closed the connection]
jfelchner has quit [Quit: zzzzzzzzzzzzz………]
<davidcelis>
there's a very key comment in there: # Add bundler to the load path after disabling system gems
<zaargy>
sometimes yu see people using require 'bundler/setup' in their progs
<alpha123>
tjbiddle: I think he's looking specifically for information on bundler/setup, not Bundler itself
<tjbiddle>
I think he meant bundler/setup specifically.
* tjbiddle
looks
<kaldrenon>
Is there a technique comparable to include? which checks whether any elements in an array are NOT the argument? e.g. if it were called only?, [true,true,true].only? true would return true, and [true,false,true] would return false
parzo has joined #ruby
<davidcelis>
zaargy: I just showed you what bundler/setup is :P
<zaargy>
so that always seems like a good idea to me
maniacal has joined #ruby
<zaargy>
so i was wondering why people always do that
<kaldrenon>
[true, false, true].only? false would return false, that is.
BlakeRG has quit [Remote host closed the connection]
blip99 has joined #ruby
saarinen has quit [Quit: saarinen]
jnix|w has joined #ruby
hellome has joined #ruby
tatsuya_o has joined #ruby
eldariof has quit [Read error: Operation timed out]
gustavn has joined #ruby
gustavn has left #ruby [#ruby]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
popl has joined #ruby
mattinahat has quit [Quit: Page closed]
Evixion` has quit [Ping timeout: 246 seconds]
Hail_Spacecake has left #ruby ["Leaving"]
apeiros has joined #ruby
tealmage has quit [Ping timeout: 276 seconds]
kirun has joined #ruby
parzo_ has joined #ruby
pagios_ has quit [Ping timeout: 260 seconds]
saarinen has joined #ruby
saintcajetan has joined #ruby
parzo has quit [Ping timeout: 240 seconds]
m8 has joined #ruby
itcharlie has left #ruby [#ruby]
dodosan has quit [Remote host closed the connection]
dodosan has joined #ruby
jflowers has joined #ruby
saintcajetan has quit [Max SendQ exceeded]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jflowers>
does anyone know of a gem or way of taking a ruby script with classes and includes, and actually generating 1 file of the prodecural code that gets run
<jflowers>
like I have a script with a bunch of includes of different modules
sventon has quit [Ping timeout: 276 seconds]
freerobby has quit [Quit: Leaving.]
<jflowers>
for instruction of the interns, I just want to be able to show them what we have, and what it would look like if I just had it all in one file
barratt has joined #ruby
hellome has quit [Remote host closed the connection]
hellome has joined #ruby
<gf3>
jflowers: Sounds like a thing that's not that useful in practice, will probably have to do it manually
<endash>
i suggest having an intern do it
<jflowers>
gf3: I completely agree that it's not useful, only a learning thing
<jflowers>
just figured I'd ask haha, thanks guys
<gf3>
"And that, interns, is the *opposite* of refactoring"
<gf3>
"Now fix it"
end_guy has quit [Remote host closed the connection]
altamic has left #ruby [#ruby]
<spike|spiegel>
who says it's not useful? one can look at how much dump rails takes on ruby proper
m8 has quit [Quit: Sto andando via]
<havenwood>
i like the idea of an unfactoring gem
<endash>
you could compare methods and methods(false) to get an idea
<spike|spiegel>
it's a character from Indian script
carlyle has joined #ruby
asteve has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
marcdel has joined #ruby
dash_ has joined #ruby
terlar has joined #ruby
<jflowers>
havenwood: I might make one if you guys think there really isn't one that exists
kpshek has quit [Ping timeout: 264 seconds]
<jflowers>
probably can't be to hard
<jflowers>
says every optimistic programmer ever
<havenwood>
unfactoring: "the process of taking well designed software and, through an iterative series of small changes, making it completely unmaintainable by anyone but you"
<spike|spiegel>
aka. rails.
end_guy has joined #ruby
<havenwood>
jflowers: Would be neat to do an unfactor and have visualization of where stuff came from.
browndawg1 has left #ruby [#ruby]
g0bl1n has joined #ruby
brbcoding has quit []
Mattix has quit [Ping timeout: 276 seconds]
<gf3>
jflowers: How would you do it? Build an AST of all the files, merge into master AST?
rodacato has quit [Remote host closed the connection]
burlyscudd has joined #ruby
x1337807x has joined #ruby
jflowers has left #ruby [#ruby]
Tacit_AFK is now known as TacitBlue
NatyMiami15 has joined #ruby
fridim_ has quit [Ping timeout: 248 seconds]
evenix has joined #ruby
NatyMiami15 has quit [Client Quit]
blip99 has quit [Ping timeout: 264 seconds]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tealmage has joined #ruby
pkrnj has joined #ruby
kumarat9pm has joined #ruby
blip99 has joined #ruby
intuxicated has joined #ruby
Es0teric has joined #ruby
ziggles has joined #ruby
rodacato has joined #ruby
burlyscudd has quit [Quit: Leaving.]
Hobogrammer_ has quit [Ping timeout: 248 seconds]
<ziggles>
hey guys... I'm using VCR to test some of my code that makes requests to various APIs... Should i checkin the cassettes, or is it better to have them in a tmp directory that's discarded?
burlyscudd has joined #ruby
cj3kim has joined #ruby
goleldar has joined #ruby
<goleldar>
hello
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<goleldar>
Do you guys study for coding challenges?
<Nilium>
What sort of coding challenge?
<pontiki>
like in an interview?
<goleldar>
ya.. I am trying to get my first jr role
<pontiki>
ziggles: i check them in
<goleldar>
he asked me to send over what I have been using to learn
<RubyPanther>
27 #each loops every morning at sunrise
<goleldar>
and it was quite a bit
<Nilium>
If they told me what to expect, I'd research it.
<Nilium>
Otherwise I'd just go by the job requirements.
<goleldar>
thats the thing I thought he was going to limit it a little but he just said it looks like you are ready and asked for a time when I was free
<Nilium>
And I'd pray nobody brings up fizzbuzz.
<havenwood>
^ install that gem, you'll be ready
<ziggles>
pontiki: is there any particular reason why? I had a situation yesterday where an endpoint i access changed it's response... but i didn't know about it all day because my cassettes were out of sync.
<pontiki>
if they do, just drop them on FizzBuzzEnterpriseEdition
<goleldar>
he said that it is too easy to write a challenge that would screen me out and wanted to know where I was
<ziggles>
pontiki: i was thinking that if someone cloned my repo and wanted to work on the gem... they would have been screwed too. but if i had not included the cassettes at least that person would have known immediately that shit was fucked
marr has joined #ruby
<aedorn>
lol, yeah, I'd probably hire someone that installed and use that. Amusement is awesome.
<pontiki>
ziggles: i test the live connections during integration test
<Nilium>
goleldar: What do you mean "where [you are]?"
_honning_ has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
workmad3 has joined #ruby
<goleldar>
Nilium: in terms of how much I have learned..
x1337807x has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
<Nilium>
Well, tell them.
<havenwood>
aedorn: right tool for the right job :P
a7d7p has joined #ruby
<onewheelskyward>
a7d7p oh, hi. :)
<aedorn>
havenwood: Indeed!
<goleldar>
I am being honest with them.. its just like a test where anything from the semester could be on it.. hard to study for
<ziggles>
pontiki: that's a good approach.
<Nilium>
I never studied for tests at university.
<ziggles>
pontiki: didnt even think of that...
kpshek has quit [Ping timeout: 264 seconds]
<ziggles>
now i need integration tests lol
klaas_ is now known as klaas
<Nilium>
I figure if I wasn't learning it in the first place, studying for the test wasn't going to do me any good.
decoponyo has quit [Quit: Leaving...]
cortexman1 has joined #ruby
chriskk has joined #ruby
<pontiki>
i have mixed feelings about code tests during interviews
<goleldar>
at first he mentioned limiting the material the challenge would be based on and letting me know so I could review it and get back to him when I was ready.. but now it could be anything
<Nilium>
Just have fun with it.
<goleldar>
oh well I'll just let him know a time
efrainolivares has joined #ruby
devoldmx3 has joined #ruby
<goleldar>
another person gave me a challenge I could work on by myself
<Nilium>
Worst case scenario, you get something challenging and show them how you work through things.
<ziggles>
I had an interview for a perl position once where they sent me home with homework... Basically i had to write a script that would bring up/down vmware instances and send it back to them in a day. i think that was a good code exercise because i wasn't nervous and it showed how i could work w/ something unfamiliar
devoldmx has quit [Ping timeout: 264 seconds]
JDHankle has quit [Remote host closed the connection]
<goleldar>
ziggles: exactly
<goleldar>
thats what i think too
<goleldar>
give an exercise and let someone solve it in a certain amount of time.. not so much with someone watching you
<Nilium>
goleldar: Ask if you have access to anything for researching stuff while doing the exercise.
<goleldar>
ok
<havenwood>
access to irc and google
<Nilium>
Maybe ask the interviewer to be your google.
Elhu has joined #ruby
<ziggles>
goleldar: lol i interviewed @ Gap when i was SUPER green and they asked me to write some code that loops over an array... i was pretty nervous and for a second forgot about #each and then on top of it... when i remembered it, that seemed so ridiculously easy it made me MORE nervous lolol
<goleldar>
I have not done a lot of these types of interviews.. the ones I have done you solve a problem together over some shared ide
<Nilium>
Depends on what it is, really, but not having a way to look up things while you're coding just means the people doing the interview are ignorant of how programmers work
<havenwood>
had fun doing a few project eulers in Blockly
<goleldar>
So you think it would be OK to ask for some idea of what will be on the challenge? I think he wants to see how well I learn stuff so almost test what I *should* know based on what I have been using to learn.. but that material is pretty broad
kjellski has joined #ruby
scarolan has joined #ruby
scarolan_ has joined #ruby
ananthakumaran has quit [Quit: Leaving.]
graft has quit [Quit: Lost terminal]
BizarreCake has quit [Ping timeout: 260 seconds]
<ziggles>
pontiki: thanks for the help.
<ziggles>
bye guys. goleldar good luck!
ziggles has quit [Remote host closed the connection]
Kricir has quit [Ping timeout: 248 seconds]
platzhirsch has joined #ruby
RichardBaker has quit [Quit: RichardBaker]
Mattix has joined #ruby
Jeep has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
m8 has joined #ruby
* Nilium
shrugs
<platzhirsch>
I am unable to understand the Markup Reference of RDoc, how can I document the parameter function in a comment block above a method?
<platzhirsch>
I don't care if I have to write it out
<platzhirsch>
hence the quotes :D cannot measure quality, can you
<platzhirsch>
ok, I go for RDoc, at least I can compare it then
<platzhirsch>
thanks for the input
Mattix has quit [Ping timeout: 240 seconds]
<Nilium>
Yard is for people who don't mind having documentation that `gem rdoc` will hate and rdoc is for people who are fine with rdoc.
<popl>
when in Rome…
<Nilium>
Yard will generally produce better results, but it absolutely hates C extensions, in my experience
<havenwood>
seems to me rdoc is on its way out
relix has joined #ruby
<platzhirsch>
havenwood: why?
<Nilium>
I don't think it's possible to axe rdoc 'til Yard gets its shit together with C extensions and gem recognizes it.
<Nilium>
That said, it's a royal pain in the neck parsing C extensions.
<platzhirsch>
I wouldn't have thought that the doc tools are so shitty, maybe writing my own doc tool would be a nice side project
Appineer has joined #ruby
<Nilium>
Would probably be an interesting experiment.
Appineer has left #ruby [#ruby]
nari has quit [Ping timeout: 246 seconds]
Emmanuel_Chanel has quit [Ping timeout: 246 seconds]
JZTech101 has joined #ruby
brennanMKE has quit [Remote host closed the connection]
<Nilium>
Reminds me of back when I used BlitzBasic and wrote doc generators for it using Ruby.
<Nilium>
That was fun.
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ctp has joined #ruby
<platzhirsch>
heh
<havenwood>
yard server --gems
brennanMKE has joined #ruby
athst has quit [Quit: athst]
brennanMKE has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
jfelchner has quit [Quit: jfelchner]
relix has quit [Read error: Operation timed out]
freerobby has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
cortexman1 has quit [Quit: Leaving.]
Neomex has joined #ruby
evenix has quit [Ping timeout: 240 seconds]
iliketurtles has quit [Quit: zzzzz…..]
cads2 has quit [Ping timeout: 264 seconds]
BRMatt has quit [Read error: Operation timed out]
cads has quit [Ping timeout: 264 seconds]
gr33n7007h has quit [Ping timeout: 246 seconds]
wargasm has quit [Ping timeout: 264 seconds]
tealmage has quit [Remote host closed the connection]
<Nilium>
havenwood: Unfortunately, that makes all the gems using rdoc look really ugly.
dtcrshr has joined #ruby
dtcrshr has quit [Changing host]
dtcrshr has joined #ruby
Neomex has quit [Client Quit]
<Nilium>
Not a fault of yard, though, since they don't support rdoc markup
Uranio has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
vlad_starkov has joined #ruby
mtvee has joined #ruby
nathandial has quit [Quit: Leaving.]
mtvee has quit [Client Quit]
Elhu has joined #ruby
jjbohn has joined #ruby
nathandial has joined #ruby
nari has joined #ruby
Emmanuel_Chanel has joined #ruby
tealmage has joined #ruby
nathandial has quit [Client Quit]
<platzhirsch>
btw. the Rails documentation looks nicely, although that's only a stylesheet of course
norm has left #ruby [#ruby]
iliketurtles has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
michaeldeol has joined #ruby
nathandial has joined #ruby
axl_ has left #ruby [#ruby]
robustus has quit [Ping timeout: 264 seconds]
blackmes1 has quit [Ping timeout: 240 seconds]
robustus has joined #ruby
devoldmx3 has quit [Ping timeout: 264 seconds]
amacgregor has quit [Ping timeout: 240 seconds]
Vivekananda has joined #ruby
rippa has quit [Read error: Connection reset by peer]
clocKwize has joined #ruby
St_Marx has quit [Ping timeout: 240 seconds]
<Xeago>
for what it is worth, tomdoc is supported by rdoc, it is farily nice to write and read
cortexman has joined #ruby
blip99 has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
jefflyne has quit [Quit: My Mac Mini has gone to sleep. ZZZzzz…]
vlad_sta_ has joined #ruby
efrainolivares has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
St_Marx has joined #ruby
shoully has joined #ruby
shoully has quit [Max SendQ exceeded]
fredjean has quit [Quit: Computer has gone to sleep.]
Mattix has joined #ruby
shoully has joined #ruby
marcdel has joined #ruby
c0rn has joined #ruby
parzo_ has quit [Remote host closed the connection]
parzo has joined #ruby
huoxito has joined #ruby
c0rn has quit [Client Quit]
iliketurtles has quit [Quit: zzzzz…..]
ixti has quit [Ping timeout: 246 seconds]
sailias has quit [Read error: Connection reset by peer]
shoully has left #ruby ["Quit now, see you!"]
banisterfiend has joined #ruby
splittingred has quit [Quit: splittingred]
workmad3 has joined #ruby
geekbri has quit [Remote host closed the connection]
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
peregrine81 has quit [Quit: peregrine81]
<platzhirsch>
do you think it's idiomatic to pass in a string variable entity and then replace the string variable entity with the object of a class modelling that entity?
<platzhirsch>
entity = Entity.find(entity)
<platzhirsch>
or is that confusing
workmad3 has quit [Read error: Operation timed out]
Spami has joined #ruby
Spami has joined #ruby
Spami has quit [Changing host]
Elhu has quit [Quit: Computer has gone to sleep.]
zorg24 has quit [Ping timeout: 240 seconds]
St_Marx has quit [Remote host closed the connection]
bsaboia_ has joined #ruby
St_Marx has joined #ruby
Kricir has joined #ruby
peregrine81 has joined #ruby
peregrine81 has quit [Client Quit]
peregrine81 has joined #ruby
Mattix has quit [Ping timeout: 264 seconds]
noop has quit [Ping timeout: 240 seconds]
parzo_ has joined #ruby
Astral__ has quit [Ping timeout: 264 seconds]
Elhu has joined #ruby
<pontiki>
quite
twoism has quit [Remote host closed the connection]
mark_locklear has quit [Read error: Operation timed out]
twoism has joined #ruby
Kricir has quit [Ping timeout: 276 seconds]
<platzhirsch>
pontiki: too quite
Astralum has joined #ruby
kaspergrubbe has quit [Remote host closed the connection]
parzo has quit [Ping timeout: 264 seconds]
krawchyk_ has quit [Remote host closed the connection]
redmenace has joined #ruby
michaeldeol has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
devoldmx has joined #ruby
freerobby has quit [Quit: Leaving.]
twoism has quit [Ping timeout: 276 seconds]
michaeldeol has joined #ruby
amacgregor has joined #ruby
freerobby has joined #ruby
carlyle has quit [Remote host closed the connection]
m_3 has quit [Ping timeout: 268 seconds]
redmenace has quit [Ping timeout: 246 seconds]
m_3 has joined #ruby
<jp->
Is ruby dbi the recommended approach to interfacing with databases? It's the only option with paramterized queries that i've seen so far.
Kruppe has joined #ruby
ixti has joined #ruby
amacgregor_ has joined #ruby
Kruppe has quit [Remote host closed the connection]
Mattix has joined #ruby
joast has quit [Ping timeout: 260 seconds]
a7d7p has quit [Quit: a7d7p]
c0rn has joined #ruby
iliketurtles has joined #ruby
amacgregor has quit [Ping timeout: 260 seconds]
Elhu has quit [Quit: Computer has gone to sleep.]
rcedillor has quit [Ping timeout: 240 seconds]
pen has joined #ruby
athst has joined #ruby
St_Marx has quit [Remote host closed the connection]
St_Marx has joined #ruby
jonathanwallace1 has joined #ruby
<Nilium>
I like how most of the time, when I look in this channel, the entire screen is join/part/quit messages
mansi has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
Mattix has quit [Ping timeout: 276 seconds]
marcdel has joined #ruby
jonathanwallace has quit [Ping timeout: 248 seconds]
rcedillor has joined #ruby
saarinen has joined #ruby
St_Marx has quit [Remote host closed the connection]
pyx has joined #ruby
sailias has joined #ruby
<pontiki>
Nilium: i have all that ignored
v0n has quit [Ping timeout: 248 seconds]
<pontiki>
so it's just a solid stream of conversation
<pontiki>
downside is, i can't tell that you just left
x1337807x has joined #ruby
<Nilium>
I have it visible but the part/join text in my client is tiny.
ilyam has joined #ruby
<Nilium>
Maybe I could also inline all the part/join stuff..
<Nilium>
Nah, then it'd just be ugly.
mando has quit [Remote host closed the connection]
rbento has quit [Quit: ZZZzzz…]
Uranio has quit [Quit: while you reading this, a kitty dies]
jonathanwallace1 has quit [Ping timeout: 240 seconds]
Z3tta has quit [Ping timeout: 264 seconds]
pyx has quit [Quit: WeeChat 0.4.1]
Tricon has joined #ruby
mary5030 has joined #ruby
Z3tta has joined #ruby
<platzhirsch>
I should change the join/leave text font, too
<jp->
I just did, good idea.
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diegoviola has quit [Ping timeout: 240 seconds]
<platzhirsch>
anyone else using Pidgin? I think I cannot configure
<platzhirsch>
ah, there are dynamic hiding rules
marcdel has joined #ruby
Elico has quit [Ping timeout: 264 seconds]
joast has joined #ruby
Astralum has quit [Ping timeout: 260 seconds]
Zai00 has joined #ruby
clocKwize has quit [Quit: clocKwize]
benlieb has quit [Quit: benlieb]
zacts has quit [Quit: leaving]
elaptics`away is now known as elaptics
c0rn has quit [Quit: Computer has gone to sleep.]
Coolhand_ is now known as Coolhand
Elhu has joined #ruby
Elhu has quit [Client Quit]
dash_ has quit [Quit: dash_]
v0n has joined #ruby
Elico has joined #ruby
froy has quit [Ping timeout: 264 seconds]
tealmage has quit [Remote host closed the connection]
Astralum has joined #ruby
saarinen has quit [Quit: saarinen]
froy has joined #ruby
Companion is now known as companion
freerobby has quit [Quit: Leaving.]
allure has joined #ruby
<platzhirsch>
What you think is more common, moving private methods at the end of the class definition below the keyword private
<platzhirsch>
or providing a list of method names when calling the private method?
theRoUS has quit [Ping timeout: 248 seconds]
tanema has quit [Remote host closed the connection]
tanema has joined #ruby
madumo has quit [Quit: Dumb message bragging about my macbook pro]
<mlpinit>
i would say moving them under the private at the end of the class. I find that easier to visualize.
madumo has joined #ruby
Nolose has joined #ruby
Nolose has left #ruby [#ruby]
rbento has joined #ruby
vlad_sta_ has quit [Remote host closed the connection]
froy has quit [Read error: Connection reset by peer]
<Eiam>
hmm why isn't Match an array?
froy has joined #ruby
<Eiam>
it has a length, but no .empty?
<Eiam>
MatchData
marcdel has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sailias has quit [Quit: Leaving.]
cody-- has quit [Quit: Computer has gone to sleep.]
IceyEC has quit [Quit: IceyEC]
kaldrenon has quit [Remote host closed the connection]
tanema has quit [Ping timeout: 276 seconds]
Astral_ has joined #ruby
jarray52 has joined #ruby
JZTech101 has quit [Quit: Bye]
cortexman has quit [Ping timeout: 240 seconds]
ilyam_ has joined #ruby
Hobogrammer has joined #ruby
postmodern has joined #ruby
efrainolivares has quit [Quit: efrainolivares]
lnormous has joined #ruby
ilyam has quit [Ping timeout: 240 seconds]
ilyam_ is now known as ilyam
cortexman has joined #ruby
rodacato has joined #ruby
efrainolivares has joined #ruby
jonahR has quit [Quit: jonahR]
Elico has quit [Read error: Connection reset by peer]
<platzhirsch>
mlpinit: yes, I think that's more idiomatic. I stick to what ever most of the people say... not dangerous at all
Elico has joined #ruby
Guest53602 has joined #ruby
v0n has quit [Ping timeout: 264 seconds]
orionstein is now known as orionstein_away
Guest53602 is now known as diegoviola
johnnyfuchs has joined #ruby
jp- has quit [Quit: OK, I believe you… but my tommy gun don't]
Astralum has quit [Ping timeout: 256 seconds]
Diranged has quit [Quit: Leaving.]
dtcrshr has quit [Quit: poff]
<Eiam>
I have them at the end under private
bsaboia_ has quit [Ping timeout: 240 seconds]
<Eiam>
I'm personally partial to self.blah so its very obvious, esp since a lot of my classes are longer than a page so I lose context
<Eiam>
but my code base (that more than just I work on) doesn't use that convention, so I don't get to
a7d7p has joined #ruby
rbento has quit [Quit: ZZZzzz…]
travisjeffery has joined #ruby
dodosan has quit [Remote host closed the connection]
vlad_starkov has joined #ruby
johnnyfuchs has quit [Remote host closed the connection]
Elico has quit [Read error: Connection reset by peer]
<platzhirsch>
btw. I must admit 'Well Grounded Rubyist' is a nice book so far
<Eiam>
I'm working through confident ruby
dodosan has joined #ruby
<Eiam>
I like it mostly. wish he had some more specific "FAQ" style section
vlad_starkov has quit [Remote host closed the connection]
Elico has joined #ruby
<Eiam>
or maybe like a summary section
Elico has quit [Client Quit]
<Eiam>
"If you find yourself going down this rat hole, you should probably look at A or B or C.. you are find yourself commonly doing F, you should probably try E or G"
<platzhirsch>
Eiam: sounds like a great book for my case
<Eiam>
platzhirsch: well he has some good stuff in there about
<platzhirsch>
Eiam: yeah, at least that's how the description sounds like. A pattern book
efrainolivares has quit [Quit: efrainolivares]
<Eiam>
if you find yourselff doing lots of if/else, or lots of nil checking & such
<Eiam>
then you should try following these patterns to avoid that kind of code
i_s has quit [Remote host closed the connection]
<Eiam>
I've not actually applied any of it yet, and A LOT of my code falls into these paradigms
Tricon has quit [Quit: Leaving...]
<Eiam>
I'm looking for a project where I have enough time to sit down and stare at the book and every time I dos something stupid, I have the time to go back and fix it to be more "correct"
<platzhirsch>
And why do you think is that so?
<Eiam>
platzhirsch: time.
allure has quit [Quit: Saindo]
<Eiam>
platzhirsch: It requires little to no thought for me to take executive feedback and go "if this case, then do this"
<platzhirsch>
ah ok, yeah.. refactoring
<Eiam>
boom done, push it.
<Eiam>
5 hours later "oh but also if you do that, they want this too"
<Eiam>
okay great, another if/else
<Eiam>
ad naseum and now you've got a giant state machine in your code
<Eiam>
constantly managing state all over the place, its a total mess
<Eiam>
its a hard problem for me to solve because "I'm done, it works" is a hard argument for me to be able to justify fixing it
<Eiam>
"Why aren't you working on that other thing now? that old thing is done it works fine"
<Eiam>
well, I wanted to practice my confident ruby by rewriting it all..
<Eiam>
=)
kumarat9pm has quit [Read error: Connection reset by peer]
IceyEC has joined #ruby
mary5030 has quit [Remote host closed the connection]
ravster has quit [Quit: Leaving.]
bradsmith has quit [Remote host closed the connection]
<platzhirsch>
heh, well in this case I think lying would be fine :P
Xeago has quit [Remote host closed the connection]
<Eiam>
he isn't an idiot ;)
<Eiam>
I'll manage something one day
<Eiam>
I was going to re-write one of our gems using Typheous
<Eiam>
and hopefully apply confident ruby to the whole thing
<Eiam>
just need to find the time to give it a whirl
<Eiam>
(on my own)
anonymus_ has joined #ruby
ldnunes has quit [Quit: Leaving]
anonymuse has quit [Read error: Connection reset by peer]
maasdesigner1 has joined #ruby
maasdesigner1 is now known as maasdesigner
<platzhirsch>
I am probably consuming the author's talk
<platzhirsch>
Typheous is great
<platzhirsch>
I am firing some thousand HTTP header requests with it in few time
<banisterfiend>
Eiam: you might like refactoring: ruby edition too
<Eiam>
for doing stress & load testing against some servers. worked great
<Eiam>
banisterfiend: is it going to tell me a bunch of things different from avdi's stuff?
<Eiam>
cause I kind of like his general philosophy I just want to apply it somewhere
Tricon has joined #ruby
<platzhirsch>
Eiam: maybe you should stop reading the book and start applying it, there's your time
<banisterfiend>
Eiam: Probably, it's co-written by kent beck so has a lot of smalltalk influence (which i've heard is a good thing:)
<platzhirsch>
your welcome
efrainolivares has joined #ruby
<Eiam>
platzhirsch: =)
Mon_Ouie has quit [Ping timeout: 264 seconds]
<platzhirsch>
Kent effing Beck, wooooh
dodosan has quit [Remote host closed the connection]
johnnyfuchs has joined #ruby
BillCriswell has quit [Remote host closed the connection]
vince_prignano has quit [Remote host closed the connection]
echevemaster has quit [Ping timeout: 260 seconds]
<platzhirsch>
ah ok, I was totally startled, because since when are Beck and Fowler into Ruby, but okay..
<banisterfiend>
platzhirsch: since ages, thoughtworks do a lot of ruby
<banisterfiend>
platzhirsch: google fowler and ruby, and you'll probably get a few hits
<platzhirsch>
banisterfiend: oh so this is for real. I thought they took the refactoring patterns of both
<platzhirsch>
this is great
<platzhirsch>
this makes me a bit more confident after some Ruby hate
bradsmith has joined #ruby
freerobby has joined #ruby
kaspergrubbe has joined #ruby
freerobby has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
thomaslee has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 246 seconds]
workmad3 has joined #ruby
stef1a has quit [Quit: Lost terminal]
jlast has quit [Remote host closed the connection]
Roa has quit [Ping timeout: 256 seconds]
Roa has joined #ruby
Roa has quit [Changing host]
Roa has joined #ruby
TheDick has joined #ruby
rodacato has quit [Ping timeout: 264 seconds]
redmenace has joined #ruby
twoism has joined #ruby
<banisterfiend>
platzhirsch: what ruby hate are you talking about?
kaspergrubbe has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
twoism has quit [Remote host closed the connection]
<platzhirsch>
banisterfiend: nothing serious, just some opinions from peers of mine "ugh, what a horrible language", or a Anti-Rails post on Hacker News
twoism has joined #ruby
kjellski has quit [Ping timeout: 260 seconds]
<banisterfiend>
platzhirsch: and what language do they use?
<platzhirsch>
Go, Haskell
LaPetiteFromage has joined #ruby
<banisterfiend>
well ruby can't compete with haskell ;)
<Eiam>
so.. language snobs =)
<banisterfiend>
haskell is extremely elegant
<platzhirsch>
I hate Haskell for being so effing pretty :D
<zendeavor>
terse
Zai00 has quit [Quit: Zai00]
<zendeavor>
not elegant
<zendeavor>
terse.
cmarques_ has quit [Ping timeout: 264 seconds]
<Eiam>
been looking for a project as an excuse to learn haskell =)
<zendeavor>
^.^
Neener54 has joined #ruby
<banisterfiend>
zendeavor: elegant IMO
<banisterfiend>
zendeavor: the terseness just falls out of very good design decisions
<banisterfiend>
it's not that they just chose very short-named functions :) (though they have that too)
<platzhirsch>
I wanted to rewrite a course scheduler in Haskell. Scheduler in Haskell, web front-end in Java. But I think Scala would bring more practicable benefit in the near future
<zendeavor>
oh i agree completely
<madumo>
A language is a tool that have properties. These properties can fit well in a situation, or not. Hating a tool for the sake of hating it is really damn stupid.
hackingoff has joined #ruby
burlyscudd has quit [Quit: Leaving.]
<banisterfiend>
zendeavor: i use this example all the time, but i love it: map (+1) [1..5]
<banisterfiend>
zendeavor: equivalent to ruby's (1..5).map { |v| v + 1 } :)
<zendeavor>
yeah it's really nice
<zendeavor>
now do it in J
breakingthings has quit [Quit: breakingthings]
grits_ has joined #ruby
labrat__ has quit [Ping timeout: 256 seconds]
<zendeavor>
intermediate variables are bogus
<zendeavor>
down with all tmpvars
interactionjaxsn has quit [Remote host closed the connection]
madumo has quit [Quit: madumo]
<zendeavor>
someone get me a torch
dodosan has joined #ruby
i_s has joined #ruby
interactionjaxsn has joined #ruby
Tricon has quit [Quit: Leaving...]
<aedorn>
I like my temp vars to have temp vars
<banisterfiend>
zendeavor: you can also do crazy shit like this: map (10/) [1..5] or map (/10) [1..5] (defive 10 by every number and divide every number by 10:)
<banisterfiend>
partial application of binary operators ;)
kaspergrubbe has joined #ruby
<zendeavor>
defive?
<banisterfiend>
divide
<banisterfiend>
sorry, i was rolling a cigarette :)
<zendeavor>
had to be sure
<zendeavor>
defive sounds evil
Tricon has joined #ruby
<zendeavor>
like, stealing a high-five from someone
graft has joined #ruby
<zendeavor>
what a jerk
<graft>
hey, anyone into writing C modules? i'm looking for some good tutorials
<banisterfiend>
graft: i've written a bunch, what are you trying to do?
<popl>
zendeavor: makes me think of degloving.
<graft>
specifically I'm trying to understand how to pass variables into C functions (e.g., if i have an open File object, how do i send the file descriptor to a C method for seeking?)
<zendeavor>
dogloving?
<zendeavor>
...
rdg has joined #ruby
vlad_starkov has joined #ruby
blackmes1 has joined #ruby
<popl>
zendeavor: Degloving is an injury where the skin (usually from a limb) is completely ripped off.
<banisterfiend>
graft: that's a good question, i haven't had to do that yet, but i'm sure there's API for it, try asking on #ruby-lang
<banisterfiend>
ping charliesome perhaps
<zendeavor>
yuk
<popl>
It's more common in motorcycle accidents and the like.
interactionjaxsn has quit [Ping timeout: 264 seconds]
<popl>
zendeavor: It's very yuck.
olivier_bK has joined #ruby
<aedorn>
That sounds awesome... I'm going to go buy a motorcycle right now!
<popl>
aedorn: Or work in some factory and fall into some dangerous equipment.
<aedorn>
hmmm.. "I accidentally ignored all the warning signs, the bars, the fencing, and that cement block over there and fell into this dangerous equipment"
<popl>
Or have one of those old-school washing machines.
jonathanwallace1 has joined #ruby
amacgregor has joined #ruby
poga has quit [Remote host closed the connection]
<aedorn>
You sure do know an awful lot of ways to experience this degloving situation.
peregrine81 has quit [Quit: peregrine81]
amacgregor_ has quit [Ping timeout: 260 seconds]
<popl>
aedorn: I read a lot and know some medical professionals.
<zendeavor>
accidentally all the warnings
<tjbiddle>
popl: You should host 1001 ways to die
<popl>
aedorn: As for the washing machine thing, I know someone who got their hand caught in one. It was only a partial degloving though, didn't affect his hand.
<aedorn>
mmm.. it's like falling down the stairs and getting your girlfriend's best friend pregnant. So I've heard.
carlyle has joined #ruby
<popl>
aedorn: It did however rip his muscle from the forearm and twist it up into his elbow. That took some surgery to fix.
rcedillor has left #ruby [#ruby]
<Eiam>
how about getting stuck in a cold-extruding machine? =0
<popl>
Didn't fix it completely, either.
<Eiam>
that might deglove your entire body
<platzhirsch>
How would I implement my own in-place method!
<Eiam>
inside out meat popsicle!
<popl>
Eiam: Mmmm sausage.
<platzhirsch>
I pass an object and then? just modify it
<aedorn>
popl: That makes me want to go buy a new, safe, human loving washing machine right now!
<platzhirsch>
what if I need to completely re-assign the value
<popl>
aedorn: Machines are uncaring.
<banisterfiend>
platzhirsch: what do you mean exactly?
<Eiam>
since you are smarter than me, I believe you know something, but I don't understand what it is
<platzhirsch>
like this, I wanted to pass a variable, where the method checks, is this a symbol? no? ok. Yes, then retrieve the equivalent class object
<banisterfiend>
Eiam: i'm talking about modifying the variable in the calling binding
<banisterfiend>
caller*
<banisterfiend>
>> def modify(x) x = 10; end; x = "hello"; modify(x); x
barratt has quit [Read error: Connection reset by peer]
archer_ has joined #ruby
<platzhirsch>
btw. if I want to extend a library class like String somewhere in my code, where should I do that? In a separate file somewhere?
archer_ is now known as Guest45066
Astral_ has quit [Ping timeout: 246 seconds]
mlpinit has quit [Ping timeout: 240 seconds]
<zendeavor>
MetaAllTheThings.rb
gr33n7007h has joined #ruby
Guest45066 has quit [Remote host closed the connection]
<Eiam>
monkeypatch.rb?
rndstr has quit [Quit: Connection closed for inactivity]
<zendeavor>
supersubclass.rb
<banisterfiend>
platzhirsch: most people put it in core_exts.rb
lepht is now known as lepht_afk
<banisterfiend>
platzhirsch: and it's polite if you put that stuff in a module that you then *include* into the core class
<Eiam>
<<!
<platzhirsch>
Eiam: a_aaaa_eha.rb
Elhu has quit [Quit: Computer has gone to sleep.]
<banisterfiend>
that way you give way to other redefinitions of those methods, and also give precedence to a core method if ruby decides to implement it
a7d7p has quit [Quit: a7d7p]
<platzhirsch>
banisterfiend: yes, mix-in the module that's great
<banisterfiend>
platzhirsch: if you have multiple core_exts to various classes then u can have a lib/core_exts/string.rb etc
<banisterfiend>
otherwise just put them in a lib/core_ext.rb file
jeffreylevesque has quit [Remote host closed the connection]
michaeldeol has quit [Remote host closed the connection]
<platzhirsch>
great thanks
<banisterfiend>
obviously it's only lib/ if it's a gem, otherwise i guess you'd put it in something like app/core_ext/
travisjeffery has joined #ruby
graft has quit [Quit: Lost terminal]
freerobby has quit [Quit: Leaving.]
Es0teric has quit [Quit: Computer has gone to sleep.]
carlyle has quit [Remote host closed the connection]
travisjeffery has quit [Remote host closed the connection]
GeissT has joined #ruby
banisterfiend has quit [Read error: Connection reset by peer]
terracatta has quit [Remote host closed the connection]
<gr33n7007h>
Does ruby always evaluate the last expression in a method everytime?
<apeiros>
odd question
<apeiros>
ruby doesn't do magic caching
<pontiki>
ruby returns the last expression evaluated from a method
<apeiros>
what are you aiming at, gr33n7007h?
<gr33n7007h>
What is the need for return in ruby?
<Eiam>
you can return sooner?
michaeldeol has joined #ruby
<gr33n7007h>
ah, ok
<zendeavor>
you can be explicit
<Eiam>
if (blah) return blah else keep on
<gr33n7007h>
Got it!
<Eiam>
and that too. sometimes I just put return blah at the end of my methods cause I feel like it ;)
<apeiros>
Eiam: well, if you use if/else, then you can leave the return away
bklane has quit [Remote host closed the connection]
<zendeavor>
base-case condition
michaeldeol has quit [Remote host closed the connection]
<Eiam>
apeiros: sure
<Eiam>
i just like to put the word "return" If I'm ever leaving a function before the last line
spacemud has quit [Ping timeout: 245 seconds]
michaeldeol has joined #ruby
<Eiam>
could potentially be reached
<gr33n7007h>
Thanks Ruby guru's for clearing that up!
kpshek has quit []
jjbohn has joined #ruby
<Eiam>
gr33n7007h: ok title for apeiros , not for me =)
<zendeavor>
modesty is overrated
twoism has quit [Ping timeout: 276 seconds]
<gr33n7007h>
:)
lushious has quit [Ping timeout: 240 seconds]
jerius has quit [Ping timeout: 264 seconds]
ccolorado has joined #ruby
nathandial has quit [Quit: Leaving.]
scarolan1 has joined #ruby
lushious has joined #ruby
twoism has joined #ruby
<gr33n7007h>
Ruby is one great language \o/
olivier_bK has quit [Ping timeout: 246 seconds]
freerobby has joined #ruby
s0ber has quit [Read error: Connection reset by peer]
spider-mario has quit [Remote host closed the connection]
ferr has joined #ruby
scarolan2 has joined #ruby
ferr is now known as asdasdasd
jjbohn has quit [Client Quit]
hellome has quit [Write error: Connection reset by peer]
asdasdasd has quit [Client Quit]
* lectrick
agrees
twoism has quit [Remote host closed the connection]
s0ber has joined #ruby
ferr has joined #ruby
ferr has quit [Client Quit]
scarolan_ has quit [Ping timeout: 264 seconds]
<lectrick>
If only it was a tiny bit faster. OK, a lot faster. And method cache expiration was less ugly.
Yakko has joined #ruby
<lectrick>
And GC was a lot faster. And immutability was emphasized a little more.
twoism has joined #ruby
scarolan has quit [Ping timeout: 276 seconds]
devoldmx3 has joined #ruby
ferr has joined #ruby
goleldar has quit [Ping timeout: 246 seconds]
nicoulaj has quit [Remote host closed the connection]
<platzhirsch>
and strong typing
spacemud has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
<pontiki>
noooooo
Swizzy has joined #ruby
goleldar has joined #ruby
<platzhirsch>
sorry, couldn't resist
<Beoran__>
platzhirsch, ruby is already strongly typed
<Beoran__>
just not statically typed
<RubyPanther>
And nobody would use it, so there would be less newbs
brennanMKE has joined #ruby
rhys has quit [Quit: Leaving]
huoxito has quit [Ping timeout: 246 seconds]
<platzhirsch>
Beoran__: oh you are right, I mixed that up with static and dynamic
<platzhirsch>
there are 2 dimensions
<Swizzy>
since #rails seems dead, can I ask a question in this room?
<pontiki>
Swizzy: the official change for rails is #rubyonrails
<platzhirsch>
Swizzy: it's #RubyOnRails you are looking for
<pontiki>
channel*
<platzhirsch>
These are not the droids you are looking for
<Swizzy>
Thanks pontiki and platzhirsch
* platzhirsch
waves his hand
<dorei>
pontiki is the greek word for mouse
<pontiki>
== 'mouse' in Greek: ποντίκι
lnormous has quit [Ping timeout: 264 seconds]
<popl>
monchichi?
<dorei>
pontiki: do you study/speak greek?
ixti has quit [Ping timeout: 264 seconds]
<pontiki>
i do not
rodacato has joined #ruby
<popl>
I imagine a mix between pontoon and tiki mask
<RubyPanther>
Dune fan?
<pontiki>
but my regular nick is tamouse, and i'm really quite stupidly fond of them
Matriks has quit [Remote host closed the connection]
<pontiki>
also that RubyPanther
<platzhirsch>
= ελάφι
<popl>
pontiki: I knew someone who used to experiment on mice in a lab.
<dorei>
platzhirsch: elafi ?
<platzhirsch>
popl: what happened? did you experiment on HIM/HER in a lab?
<popl>
Currently I know someone who experimented with fruit flies.
<pontiki>
but i was poking around with google translate one day, and i became enourmously fond of the word pontiki
<popl>
platzhirsch: No.
<platzhirsch>
dorei: what's that?
<popl>
platzhirsch: The subject of animal experimentation is controversial.
<popl>
I should not have mentioned it. :|
<lectrick>
Does (100..199).include?(...) first expand the array, or is it smart and just checks the boundaries?
<dorei>
platzhirsch: the pronounciation of that greek word you put after =
<RubyPanther>
lectrick: what array?
<platzhirsch>
popl: haha, no problem. I do not have a very strong opinion on that
Kabaka has quit [Ping timeout: 240 seconds]
<platzhirsch>
...not yet
<apeiros>
lectrick: "If begin and end are numeric, comparison is done according to the magnitude of the values"
<pontiki>
lectrick: a Range is not an Array
<apeiros>
straight from the docs :-p
<apeiros>
pontiki: that doesn't change that normally Range#include? uses .each to determine inclusion.
<Beoran__>
platzhirsch, yeah, for example C is a statically, weakly typed language. Ruby OTOH is dynamicaly and strongly typed.
<lectrick>
pontiki: yes, but many methods on Ranges can end up making an Array as an intermediate step
<lectrick>
or?
<platzhirsch>
Beoran__: I think there are combinations which do not exist, at least in the real world
<apeiros>
lectrick: also cf. #include? and #cover?
<pontiki>
which methods are those, lectrick ?
<popl>
platzhirsch: I saw a pig's heart in which the pig cells were washed away and replaced by human stem cells. The heart started twitching of its own accord and by simulating blood pressure the scientists were able to direct it to beat.
<lectrick>
apeiros: Exactly!
<platzhirsch>
popl: so?
<apeiros>
pontiki: #include? is one. Numeric ranges are an exception.
<RubyPanther>
(1..2).include?(1.5) => true
<apeiros>
pontiki: as I told lectrick, see #cover? vs. #include?
<popl>
platzhirsch: It was neat. I suppose it is related to animal experimentation. Nevermind. :)
snath has joined #ruby
<lectrick>
pontiki: .each maybe?
<apeiros>
*sob*, nobody reads the docs.
brennanMKE has quit [Ping timeout: 264 seconds]
<platzhirsch>
popl: heh sure, it sounds great, just wondered what the purpose was, but I guess this is more about fundamental experimentation
<lectrick>
there's an easy way to check without reading the docs... (1..10000000000).methodname?(arg) and either wait or not wait :)
codecop has quit [Remote host closed the connection]
burlyscudd has joined #ruby
Inside has joined #ruby
Inside has quit [Changing host]
Inside has joined #ruby
<popl>
platzhirsch: Transplantation, ultimately. If the heart is grown from a recipient's own stem cells then the chances of rejection are virtually nil.
<platzhirsch>
it's about avoiding "nil checks, error handling, and other interruptions which steal attention away from the essential purpose of the code."
<pontiki>
great! (saves for later)
<platzhirsch>
and the presenter has written the book "Confident Ruby"
<Eiam>
yeah its an ebook
<Eiam>
i bought it a few months ago, i think he's about ready to release it
<Eiam>
someone here recommended it to me awhile ago
Kabaka has joined #ruby
<Eiam>
I forgot who, probably apeiros =)
AlSquire has quit [Quit: This computer has gone to sleep]
Kricir has quit [Ping timeout: 264 seconds]
subbyyy has joined #ruby
<apeiros>
I'm not very knowledgeable about books, so probably not me
<apeiros>
(and I didn't know "confident ruby")
<platzhirsch>
maybe someone drugged you
TIJ has joined #ruby
fredjean has joined #ruby
pkrnj has quit [Quit: Computer has gone to sleep.]
michaeldeol has quit [Remote host closed the connection]
carlyle has quit [Ping timeout: 245 seconds]
<platzhirsch>
Eiam: I mean the concepts are not that special and exceptional to the Ruby language, but you know... you tend to forget some patterns after spending some time in another language
ixti has joined #ruby
Nisstyre has quit [Quit: Leaving]
kaspergrubbe has quit [Remote host closed the connection]
lebek has joined #ruby
pel_daniel1 has left #ruby [#ruby]
phantummm has quit [Quit: phantummm]
xcv has joined #ruby
wallerdev has quit [Quit: wallerdev]
mlpinit has joined #ruby
wallerdev has joined #ruby
robbyoconnor has joined #ruby
tanema has joined #ruby
twoism_ has joined #ruby
_honning_ has quit [Ping timeout: 240 seconds]
robbyoconnor has quit [Read error: Connection reset by peer]
mlpinit has quit [Remote host closed the connection]
Buuyo has joined #ruby
ehc has quit [Quit: ehc]
ferr has quit [Remote host closed the connection]
twoism has quit [Ping timeout: 240 seconds]
robbyoconnor has joined #ruby
burlyscudd has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
<apeiros>
Buuyo: the call itself is safe. but whether the thing as a whole is safe depends on the code in the block and how it interacts with state and other threads.
tabolario has joined #ruby
<waxjar>
you're probably fine if you don't reference things outside the scope of the block?
<Buuyo>
which thread does the block's code run in, in that situation?
GeissT has quit [Ping timeout: 276 seconds]
<apeiros>
in the new thread
ehaliewicz has joined #ruby
<Buuyo>
it's a pretty neat way to operate. :)
<apeiros>
code always runs in the thread it is called in. only exception is the block of Thread.new (and all code within that)
<apeiros>
(oh, well, and then there's fibers, can't tell you much about these, though)
platzhirsch has left #ruby [#ruby]
<waxjar>
and fork and friends, of course :P
platzhirsch has joined #ruby
<Buuyo>
heh
<apeiros>
fork is entirely different
<apeiros>
with fork, no state is shared, so many pitfalls of threading are not on the table
AlHafoudh has quit [Quit: Computer has gone to sleep.]
maasdesigner has quit [Ping timeout: 264 seconds]
reset has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
nathandial has quit [Read error: Connection reset by peer]
nathandial has joined #ruby
jacktrick has joined #ruby
michaeldeol has joined #ruby
ephemerian has quit [Quit: Leaving.]
ewnd9 has joined #ruby
zmansiv has joined #ruby
michaeldeol has quit [Remote host closed the connection]
Senjai has joined #ruby
michaeldeol has joined #ruby
bradsmith has quit [Remote host closed the connection]
c0rn has quit [Ping timeout: 260 seconds]
saarinen has joined #ruby
ismlages has quit [Remote host closed the connection]
kaspergrubbe has joined #ruby
twoism has quit [Remote host closed the connection]
ssvo_ has joined #ruby
michaeldeol has quit [Remote host closed the connection]
m8 has quit [Quit: Sto andando via]
twoism has joined #ruby
agjacome has joined #ruby
ssvo has quit [Ping timeout: 256 seconds]
apeiros has quit [Remote host closed the connection]
pkrnj has joined #ruby
staafl has quit [Ping timeout: 264 seconds]
twoism has quit [Ping timeout: 240 seconds]
nathandial has quit [Quit: Leaving.]
lethjakman has quit [Ping timeout: 264 seconds]
poga has joined #ruby
tommyvyo has quit [Quit:]
<havenwood>
FORK ALL THE THINGS! \o/
<popl>
hey, fork yourself buddy
<zendeavor>
i'm not your buddy, pal
saarinen has quit [Quit: saarinen]
<popl>
zendeavor: I'm not your pal, homie.
Kricir has joined #ruby
<zendeavor>
i'm not your homie, guy
<popl>
zendeavor: I'm not your guy, bro
* popl
can do this for hours.
vjacob has joined #ruby
<zendeavor>
i'm not your bro, friend
rbento has joined #ruby
<vjacob>
hiya, fellow human beings
<popl>
Well, theoretically, until me and/or zendeavor gets kicked. :P
<popl>
vjacob: I am not a human being.
<popl>
vjacob: I am a meat popsicle.
<vjacob>
or should I say all life forms.
<vjacob>
capable of writing the human language English
<vjacob>
...
devoldmx has joined #ruby
jonathanwallace1 has quit [Quit: WeeChat 0.4.1]
baroquebobcat has quit [Quit: baroquebobcat]
<vjacob>
I?m reading a book on Rails, and it mentions three sublibraries: ActiveRecord, ActionView and ActionController...
sparr_ has joined #ruby
Kricir has quit [Ping timeout: 246 seconds]
jonathanwallace has joined #ruby
<vjacob>
do these still exist in >= ruby-1.9.3
<vjacob>
or was this back in the day?
marcdel has joined #ruby
TIJ has quit [Quit: Konversation terminated!]
<waxjar>
i think they do. the folks at #rails or #rubyonrails are much better informed vjacob :)
* vjacob
updates locatedb
zeade has quit [Quit: Leaving.]
<vjacob>
cheers waxjar
vlad_starkov has joined #ruby
maniacal has quit [Remote host closed the connection]