<gr33n7007h>
what is the difference between these to commands `Process.euid = Etc.getpwnam("www-data").uid` and `Process::Sys.setuid(Etc.getpwnam("www-data").uid)`?
ghr has quit [Ping timeout: 240 seconds]
gebbione has joined #ruby
matchaw has joined #ruby
jerematic has quit [Read error: Connection reset by peer]
divi_ has joined #ruby
benzrf|offline is now known as benzrf
divi has quit [Ping timeout: 272 seconds]
hiyosi has joined #ruby
matchaw_ has quit [Ping timeout: 244 seconds]
mattmcclure has quit [Quit: Connection closed for inactivity]
Lingos_ has joined #ruby
Lightsword has quit [Quit: Lightsword]
divi_ has quit [Ping timeout: 245 seconds]
econerd4ever has quit [Remote host closed the connection]
<gr33n7007h>
It's to my understanding the latter uid, will saved through the entire program, but I may be mistaken
hiyosi has quit [Ping timeout: 265 seconds]
xenomorph is now known as {xenomorph}
josephndenton has joined #ruby
melik has quit [Quit: (null)]
{xenomorph} is now known as xenomorph
Lingos_ has quit [Ping timeout: 264 seconds]
fabrice31 has joined #ruby
josephndenton has quit [Ping timeout: 256 seconds]
havenwood has joined #ruby
jenrzzz has quit [Ping timeout: 255 seconds]
fabrice31 has quit [Ping timeout: 244 seconds]
danmanstx has joined #ruby
gsd has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NoNMaDDeN has joined #ruby
<danmanstx>
so im running a posgresql function which has a notice in it, when i run my ruby script to call the function i get the notice output. however, when trying to get the data from pg result i can't access the notice.. is there something i'm missing with the pg gem.. or can i out all output to a string and use that?
deric_skibotn has quit [Ping timeout: 250 seconds]
radic has quit [Disconnected by services]
radic_ has joined #ruby
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
slawrence00 has joined #ruby
krz has quit [Quit: WeeChat 1.0.1]
kp666 has joined #ruby
krz has joined #ruby
byprdct has quit [Quit: by]
lemur has joined #ruby
mloveless has quit [Remote host closed the connection]
<gebbione>
i ll ask google about the puppet problem i have
<zacts>
HULK_SMASH: oh cool
<gebbione>
:/
<HULK_SMASH>
There is another good one that shows class/metaclass diagrams
<zacts>
HULK_SMASH: I'm planning on reading Metaprogramming Ruby after this book
<HULK_SMASH>
Let me try to find that for you
<zacts>
but your tutorial seems cool too
josephndenton has quit [Ping timeout: 264 seconds]
sevenseacat has joined #ruby
it0a has quit [Quit: WeeChat 1.0.1]
chenillen has joined #ruby
<HULK_SMASH>
I can't find the specific text with the object diagrams that show how inheritance and instantiation work with object metaclasses. I think it was in a book that I read some years back
Spami has quit [Quit: This computer has gone to sleep]
agent_white has joined #ruby
TinkerTyper has quit [Ping timeout: 240 seconds]
M-Technic has joined #ruby
sinequanon has joined #ruby
<zacts>
ah that's okay. I'm sure I'll be kept busy with your tutorials and my ruby books.
zacstewart has joined #ruby
<zacts>
I think I'm going to go through my books a couple of times, some of this is mindbending
Joufflu has quit [Read error: Connection reset by peer]
nvdpl has quit [Quit: ZZZzzz…]
duncannz has joined #ruby
NoNMaDDeN has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Cache_Money has quit [Quit: Cache_Money]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
fedexo has quit [Ping timeout: 264 seconds]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Guest6644 has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
duncannz has quit [Quit: Leaving]
Lingos_ has quit [Quit: Be back later ...]
<Hanmac>
agent_white: process id maybe?
keso1 has joined #ruby
walterdisney__ is now known as hell_boy
keso1 has quit [Max SendQ exceeded]
<agent_white>
That's what I mean though... PID1 is the init in linux.
hell_boy is now known as hulky
hulky is now known as hulk
hulk is now known as supermario
<agent_white>
Just makes me wonder how it could be the second process :P
supermario is now known as uber_hulk
uber_hulk has quit [Quit: leaving]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
* agent_white
is attempting to make a ruby sandbox
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
uber_hulk has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
jlast has quit [Ping timeout: 258 seconds]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Avahey has quit [Quit: Connection closed for inactivity]
keso1 has joined #ruby
Versality has joined #ruby
keso1 has quit [Max SendQ exceeded]
Megtastique has joined #ruby
clauswitt has joined #ruby
nagaraj has quit [Remote host closed the connection]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
robbyoconnor has joined #ruby
clauswitt has quit [Max SendQ exceeded]
robbyoconnor has joined #ruby
robbyoconnor has quit [Changing host]
keso1 has quit [Max SendQ exceeded]
robbyoconnor has quit [Client Quit]
keso1 has joined #ruby
PotatoChipz has joined #ruby
keso1 has quit [Max SendQ exceeded]
<PotatoChipz>
Can anyone help me with this... thank you in advance. So I have a Class Fruit... and then i have a module DoSomething... I included DoSomething in Class Fruit... from inside DoSomething, i wanna know in which class was I included.
clauswitt has joined #ruby
<PotatoChipz>
self.parent.class just gives me "Class" i want to get "Fruit"
keso1 has joined #ruby
<agent_white>
Is there a way to trace the source (C code) method calls made in ruby?
keso1 has quit [Max SendQ exceeded]
uber_hulk has quit [Read error: Connection reset by peer]
noniusi has joined #ruby
<rpag>
agent_white, TracePoint/set_trace_func, and the "c_call" event
keso1 has joined #ruby
<agent_white>
rpag: Awesome! Thank you!
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
gsd has joined #ruby
keso1 has quit [Max SendQ exceeded]
sdwrage has joined #ruby
cmckee has quit [Quit: cmckee]
keso1 has joined #ruby
uber_hulk has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
kwd has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
fabrice31 has joined #ruby
sdwrage_ has quit [Ping timeout: 264 seconds]
zoink has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Guest63005 has quit [Quit: This computer has gone to sleep]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Lingos_ has joined #ruby
chenillen has quit [Quit: chenillen]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
dts|offtowork is now known as dts
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
chenillen has joined #ruby
weemsledeux has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
apeiros_ has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
krz has quit [Quit: WeeChat 1.0.1]
tobago has joined #ruby
josephndenton has joined #ruby
arup_r has quit [Remote host closed the connection]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
rohit has joined #ruby
<agent_white>
PotatoChipz: Can't help you, but why do you want to do that?
Guest63005 has joined #ruby
olivier_bK has quit [Ping timeout: 265 seconds]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
Jake232 has joined #ruby
josephndenton has quit [Ping timeout: 258 seconds]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
giuseppesolinas has joined #ruby
krz has joined #ruby
krz has quit [Client Quit]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
francisfish has quit [Remote host closed the connection]
despai has joined #ruby
Megtastique has quit []
Soda has quit [Remote host closed the connection]
krz has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
chenillen has quit [Quit: chenillen]
francisfish has joined #ruby
krz has quit [Client Quit]
chenillen has joined #ruby
ferr has quit [Ping timeout: 256 seconds]
Asher has quit [Quit: Leaving.]
D9 has quit [Quit: Leaving]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
francisfish has quit [Remote host closed the connection]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
alex88 has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
arup_r has joined #ruby
Macaveli has joined #ruby
chenillen has quit [Quit: chenillen]
keso1 has joined #ruby
sdwrage has quit [Quit: This computer has gone to sleep]
keso1 has quit [Max SendQ exceeded]
Macaveli has quit [Client Quit]
razieliyo has joined #ruby
razieliyo has joined #ruby
despai has quit [Quit: This computer has gone to sleep]
krz has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
az7ar is now known as az7ar_away
PotatoChipz has quit [Ping timeout: 246 seconds]
lolmaus has quit [Quit: Konversation terminated!]
keso1 has joined #ruby
shevy has joined #ruby
keso1 has quit [Max SendQ exceeded]
econerd4ever has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
samuel02 has joined #ruby
krz has quit [Client Quit]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
krz has joined #ruby
Macaveli has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
last_staff has quit [Quit: last_staff]
msgodf has joined #ruby
echooo has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
soahccc has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
echooo1 has quit [Ping timeout: 255 seconds]
soahccc has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
econerd4ever has quit [Remote host closed the connection]
econerd4ever has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
joonty has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
steak__ has joined #ruby
<steak__>
hello all
econerd4ever has quit [Ping timeout: 258 seconds]
keso1 has joined #ruby
bricker`work has quit [Ping timeout: 264 seconds]
keso1 has quit [Max SendQ exceeded]
<steak__>
could anyone point me to a ruby rpm package >=1.9 that DOESN'T require SCL and works out of the box on CentOS 6.x?
einarj has joined #ruby
sdwrage has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
JohnBat26 has joined #ruby
<crome>
does anything work out of the box on centos?
krz has quit [Quit: WeeChat 1.0.1]
keso1 has joined #ruby
francisfish has joined #ruby
keso1 has quit [Max SendQ exceeded]
arup_r has quit [Remote host closed the connection]
Xeago has joined #ruby
<crome>
noniusi is spamming some crap in privmsg
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
agit0 has joined #ruby
econerd4ever has joined #ruby
keso1 has joined #ruby
atmosx has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
<shevy>
steak__ I don't think anyone here uses centos :-)
jlast has joined #ruby
<shevy>
yeah noniusi must be banned
krz has joined #ruby
nrsk has joined #ruby
keso1 has joined #ruby
noniusi was kicked from #ruby by apeiros_ [noniusi]
noniusi has joined #ruby
keso1 has quit [Max SendQ exceeded]
noniusi was kicked from #ruby by apeiros_ [noniusi]
noniusi has joined #ruby
noniusi was banned on #ruby by apeiros_ [*!~tuuuu@*]
<Hijiri>
my school uses CentOS
noniusi was kicked from #ruby by apeiros_ [noniusi]
keso1 has joined #ruby
Juanchito has joined #ruby
<crome>
does your school work out of the box?
keso1 has quit [Max SendQ exceeded]
<shevy>
\o/
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
<shevy>
Hijiri in the USA?
<Hijiri>
yes
<Hijiri>
I'm still a freshman
<shevy>
I haven't yet seen any school here (in central europe) using linux; they still are windows-only
<shevy>
save for universities of course; the technical university here uses ubuntu on their servers + workstations for student logins
<Hijiri>
The OS depends on the computer lab here
<Hijiri>
the CSE lab is CentOS
livathinos has joined #ruby
<Hijiri>
I think it's synced with Docker or something
<steak__>
well, the OS choice is not mine
<crome>
there used to be a linux server in the highschool I went to back at home. one could telnet to it. as root. without a password.
keso1 has joined #ruby
<crome>
we had so much fun with it
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
divi has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
keso1 has joined #ruby
last_staff has joined #ruby
keso1 has quit [Max SendQ exceeded]
ctp has joined #ruby
keso1 has joined #ruby
noniusi has quit [K-Lined]
keso1 has quit [Max SendQ exceeded]
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
doev has joined #ruby
keso1 has joined #ruby
keso1 has quit [Max SendQ exceeded]
jottr has joined #ruby
keso1 has joined #ruby
francisfish has quit [Remote host closed the connection]
sbar_ has quit [Read error: Connection reset by peer]
<shevy>
hmm
<shevy>
if I want to provide another way to require
<shevy>
let's just for the sake of finding a name, call it require2()
<shevy>
how would I do about this? modify Kernel with it, and alias towards the old require() ?
<workmad3>
shevy: pretty much, yeah
kuda has joined #ruby
<workmad3>
shevy: that's how rubygems does it
ferri has joined #ruby
<shevy>
ok
sbar_ has joined #ruby
<shevy>
sounds easy!
Takle has joined #ruby
lkba has joined #ruby
Takle has quit [Read error: Connection reset by peer]
Takle has joined #ruby
Merec has quit [Ping timeout: 258 seconds]
giuseppesolinas has joined #ruby
kp666 has quit [Quit: Leaving]
razieliyo_ has joined #ruby
kuda has quit [Read error: No route to host]
sprihodko has joined #ruby
jlast has joined #ruby
GGMethos has quit [Ping timeout: 272 seconds]
nobody404 has joined #ruby
i0n has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
cmckee has quit [Quit: cmckee]
doev has joined #ruby
giuseppesolinas has joined #ruby
davedev24_ has joined #ruby
Xiti` has joined #ruby
parzzix has quit [Ping timeout: 240 seconds]
tvw has quit [Ping timeout: 265 seconds]
<DaniG2k>
guys if I have a string like "<img class=\"imagecache imagecache-content_pane_images_590 imagecache-default imagecache-content_pane_images_590_default\">"
postmodern has quit [Quit: Leaving]
<DaniG2k>
and I want to match <img.*?class="(imagecache.*?)">
Xiti has quit [Ping timeout: 244 seconds]
<DaniG2k>
/<img.*?class="(imagecache.*?)">/
<sevenseacat>
dont match html with regex. ever.
<DaniG2k>
and replace the $1 variable with something else
<DaniG2k>
:S
<DaniG2k>
no?
<apeiros_>
no
blackmesa has quit [Ping timeout: 272 seconds]
<DaniG2k>
I basically want to change the class to somethign else
jaequery has joined #ruby
<DaniG2k>
for the images
nobody404 has quit [Ping timeout: 265 seconds]
<apeiros_>
use nokogiri or similar
<sevenseacat>
parsing html should only be done with tools like nokogiri.
<DaniG2k>
why's that
<workmad3>
DaniG2k: HTML is too complex a syntax for regular expressions
<DaniG2k>
hmm ok
<apeiros_>
html is not regular
Pixi_ has joined #ruby
hiyosi has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
giuseppesolinas has joined #ruby
Squarepy has joined #ruby
<apeiros_>
.css('img.imagecache') # selects all the images with class imagecache. you can then mutate the nodes.
<workmad3>
DaniG2k: for starters, the order of items in the class attribute is completely irrelevant to HTML... so you'd need to write a regular expression that also allowed that... and you'd need to make sure you didn't match other attributes as well, you'd need to check if the class was made self-closing or not, and if this is inside a large HTML fragment you'd also need to check that you're not in a comment... or i
catphish has joined #ruby
<workmad3>
nside CDATA tags or....
<workmad3>
DaniG2k: all of which quickly grows beyond the capabilities of even the extended regular expressions used by ruby
suy|BNC is now known as disperso
Versality has quit [Quit: Be back later ...]
Versality has joined #ruby
jaequery has quit [Ping timeout: 255 seconds]
superscalr has quit [Quit: superscalr]
<DaniG2k>
ok
<DaniG2k>
thanks :)
AlSquirrel has joined #ruby
Xiti` has quit [Ping timeout: 265 seconds]
narcan has quit [Quit: -[AppDelegate installMalware]: unrecognized selector sent to instance 0x156109c0]
dkphenom has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 255 seconds]
hiyosi has quit [Ping timeout: 250 seconds]
ptrrr has joined #ruby
workmad3 is now known as wm3|away
rsavage has joined #ruby
govg has joined #ruby
<rsavage>
hello all
sigurding has joined #ruby
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
patrick99e99 has joined #ruby
<rsavage>
Can anyone help me understand why I can't add a hash into another hash? I get this error syntax error, unexpected ')', expecting tASSOC
uber_hulk has quit [Quit: leaving]
blackmesa has joined #ruby
sbar__ has joined #ruby
<catphish>
can anyone briefly explain what the rack library does? how much of an http server does it implement?
sbar_ has quit [Ping timeout: 272 seconds]
patrick99e99 has quit [Ping timeout: 240 seconds]
fsapo has quit [Remote host closed the connection]
govg has quit [Quit: leaving]
govg has joined #ruby
<pontiki>
rsavage: !code
<helpa>
rsavage: We cannot help you with your problem if you don't show us your code. Please put it on http://gist.github.com and give us the URL so we can see it.
Morkel has quit [Quit: Morkel]
pika_pika has joined #ruby
<pontiki>
catphish: rack essential wraps a web service / http server in a uniform interface
<pontiki>
essentially*
rushed has quit [Quit: rushed]
nrsk has joined #ruby
<catphish>
i understand it from the application perspective, but i'm struggling to understand how it interfaces with a web server
jlast has quit [Ping timeout: 258 seconds]
<catphish>
or what it actually does, in terms of what the web server has to do vs what rack does
giuseppesolinas has quit [Quit: This computer has gone to sleep]
anaeem1_ has quit [Remote host closed the connection]
gebbione has joined #ruby
<gebbione>
n i m back
<apeiros_>
catphish: the interface to the webserver is webserver dependent
<apeiros_>
that's why it exists - to abstract that very interface.
<pontiki>
catphish: delve into the rack handlers and see how it interfaces with each of them
<apeiros_>
similar to how database abstraction/independence layers work
<catphish>
apeiros_: oh i see, thanks
<pontiki>
huh
<pontiki>
isn't that what i said?
blackmesa has quit [Ping timeout: 258 seconds]
<apeiros_>
yes, i tis :)
<pontiki>
ok
<catphish>
what i really want is to be able to use a webserver without rack, though i may still want to use some of rack's functionality
<apeiros_>
catphish: then the first thing is to go from "a webserver" to "webserver X"
fsapo has joined #ruby
<Xeago>
there was a time when cgi was a thing…
<pontiki>
still is
<Xeago>
*cough* shevy *cough*
<apeiros_>
and fcgi
techsethi has quit [Ping timeout: 264 seconds]
<apeiros_>
rack can abstract those too
sprihodko has quit [Quit: (null)]
<apeiros_>
they are not a good idea for larger frameworks
superscalr has joined #ruby
<apeiros_>
s/they are/cgi is/
<catphish>
i believe my actual requirement is for a multithreaded server that will provide methods for doing http responses, but also allow me to hijack the socket
Trynemjoel has quit [Ping timeout: 265 seconds]
<catphish>
i have a rack http proxy, but i have a couple of issues 1) rack isn't great for proxying 2) i want to add websockets
<shevy>
Xeago ah, .cgi works without having to fancy up much anything else; rack forces me into a specific model - I can not avoid having to adhere to its lambda-centric model
GGMethos has joined #ruby
ctp has joined #ruby
blackmesa has joined #ruby
claptor has quit [Quit: this channel is bakas]
<catphish>
so i'm just trying to get a feel for how existing http servers work, and whether i can make use of one without being tied down to rack's array based API :)
uber_hulk has joined #ruby
<apeiros_>
catphish: use e.g. event machine?
<shevy>
speaking of rack, see catphish just pointed out a limitation in 1)! ;)
gccostabr has joined #ruby
larissa has joined #ruby
<catphish>
apeiros_: i actually started writing it in eventmachine, the problem, but i'm struggling with event driven programming
lolmaus has quit [Remote host closed the connection]
lolmaus has joined #ruby
<catphish>
for example, in the case of a connection being proxied, i need to accept a connection, make another connection, and proxy data between them, simple enough in eventmachine, but then trying to add intermediate things like doing an http request to determine the endpoint to proxy to is straining my ability to program non-linearly
einarj has quit [Remote host closed the connection]
haroldwu has quit [Ping timeout: 244 seconds]
Trynemjoel has joined #ruby
haroldwu has joined #ruby
<catphish>
not sure if this is simply my lack of understanding of the concept, or if EM isn't really designed for that type of behaviour
timonv_ has quit [Remote host closed the connection]
mikecmpbll has quit [Quit: ciao.]
techsethi has joined #ruby
govg has quit [Quit: leaving]
samuel02 has quit [Read error: Connection reset by peer]
samuel02 has joined #ruby
Bira has joined #ruby
livathin_ has joined #ruby
Areessel1 has quit [Ping timeout: 255 seconds]
apeiros__ has joined #ruby
startupality has quit [Ping timeout: 240 seconds]
<catphish>
i think i will start with a simple multithreaded tcp server, pull in the http request parser and response writer from mongrel, and try that out
timonv_ has joined #ruby
haxr has joined #ruby
startupality has joined #ruby
ptrrr_ has joined #ruby
certainty has quit [Ping timeout: 240 seconds]
ptrrr has quit [Ping timeout: 250 seconds]
ptrrr_ is now known as ptrrr
Areessell has joined #ruby
haxrr has joined #ruby
Xeago_ has joined #ruby
certainty has joined #ruby
livathin_ has quit [Remote host closed the connection]
livathinos has quit [Ping timeout: 264 seconds]
n1lo has quit [Quit: Leaving]
livathinos has joined #ruby
livathinos has quit [Read error: Connection reset by peer]
siso has quit [Read error: Connection reset by peer]
livathinos has joined #ruby
paulfm has joined #ruby
ferr has quit [Ping timeout: 255 seconds]
haxr has quit [Ping timeout: 244 seconds]
govg has joined #ruby
Xeago has quit [Ping timeout: 256 seconds]
n1lo has joined #ruby
Asher has quit [Ping timeout: 264 seconds]
superscalr has quit [Quit: superscalr]
Asher has joined #ruby
vinleod has quit [Ping timeout: 258 seconds]
ptrrr has quit [Quit: ptrrr]
Asher is now known as Guest64107
KnowledgeOwl has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
AFKGeek has joined #ruby
KnowledgeOwl has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
KnowledgeOwl has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
interweb has joined #ruby
KnowledgeOwl has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
DaniG2k has quit [Quit: leaving]
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
AFKGeek has quit [Ping timeout: 245 seconds]
KnowledgeOwl has quit [Remote host closed the connection]
vinleod has joined #ruby
KnowledgeOwl has joined #ruby
KnowledgeOwl has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
russt has joined #ruby
Abhijit has quit [Quit: Leaving]
dkphenom has joined #ruby
arup_r has quit [Remote host closed the connection]
ctp has joined #ruby
superscalr has joined #ruby
KnowledgeOwl has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
interweb has quit [Quit: Leaving]
triple_b has joined #ruby
KnowledgeOwl has quit [Remote host closed the connection]
livathinos has quit [Remote host closed the connection]
KnowledgeOwl has joined #ruby
govg has quit [Quit: leaving]
hamakn has joined #ruby
corehook has quit [Remote host closed the connection]
xenomorph is now known as {xenomorph}
rushed has joined #ruby
nagaraj has quit [Remote host closed the connection]
krz has quit [Ping timeout: 245 seconds]
spyderman4g63 has joined #ruby
{xenomorph} is now known as xenomorph
spyderma_ has joined #ruby
krz has joined #ruby
spastorino has joined #ruby
samuel02 has quit [Remote host closed the connection]
ptrrr has joined #ruby
spyderman4g63 has quit [Ping timeout: 258 seconds]
hiyosi has joined #ruby
Ankhers has joined #ruby
supersym has joined #ruby
corehook has joined #ruby
supersym has quit [Client Quit]
hiyosi has quit [Ping timeout: 240 seconds]
tvw has joined #ruby
Ankhers has quit [Ping timeout: 250 seconds]
Bira has quit [Remote host closed the connection]
byprdct has joined #ruby
Guest64107 has quit [Ping timeout: 250 seconds]
<shevy>
ohhh sevenseacat! I just realized... catphish ... that is also a cat!
Takle has quit [Remote host closed the connection]
<shevy>
or perhaps a hybrid... upper half is cat, lower half is a fish
<sevenseacat>
they do say imitation is the sincerest form of flattery.
Takle has joined #ruby
<shevy>
hehe
jlast has joined #ruby
sigurding has quit [Quit: sigurding]
<shevy>
good thing tomorrow is caturday
<Hanmac>
shevy best pet is still githubs "octocat" ;P
<shevy>
I don't know what that is
bluenemo has joined #ruby
bluenemo has joined #ruby
mhi^ has joined #ruby
Asher has joined #ruby
Asher is now known as Guest61211
einarj has joined #ruby
Takle has quit [Ping timeout: 264 seconds]
techsethi has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
<maasha>
Hanmac: did you ever read the proposal by Linus that lead to Tux?
Takle has joined #ruby
<maasha>
it is brilliant
<Hanmac>
wasnt that something like "a duck that looks like its high" or something like that?
<maasha>
Hanmac: not that I recall.
mkaesz has quit [Remote host closed the connection]
s1|verfox has quit [Remote host closed the connection]
dreinull has quit [Remote host closed the connection]
dreinull has joined #ruby
cpruitt has joined #ruby
livathinos has joined #ruby
wm3|away is now known as workmad3
spookley has quit [Ping timeout: 272 seconds]
l3kn has quit [Ping timeout: 272 seconds]
jaxxstorm has quit [Ping timeout: 272 seconds]
Dwarf has quit [Ping timeout: 272 seconds]
mostlybadfly has quit [Ping timeout: 272 seconds]
ndrei has quit [Ping timeout: 264 seconds]
ndrei has joined #ruby
ptrrr has quit [Quit: ptrrr]
NameNotFound has quit [Ping timeout: 272 seconds]
tessi_zz has quit [Ping timeout: 272 seconds]
comma8 has quit [Ping timeout: 272 seconds]
vcoinminer______ has quit [Ping timeout: 272 seconds]
jimeh has quit [Ping timeout: 272 seconds]
exadeci has quit [Ping timeout: 272 seconds]
AdamMeghji has quit [Ping timeout: 272 seconds]
hellschreiber_ has quit [Ping timeout: 272 seconds]
tiagonobre__ has quit [Ping timeout: 272 seconds]
tris has quit [Ping timeout: 272 seconds]
dreinull has quit [Remote host closed the connection]
jlast has joined #ruby
arrubin has quit [Ping timeout: 272 seconds]
mjc_ has quit [Ping timeout: 272 seconds]
Jello_Raptor has quit [Ping timeout: 272 seconds]
RoryHughes has quit [Ping timeout: 272 seconds]
LBRapid has quit [Ping timeout: 272 seconds]
rotor has quit [Ping timeout: 272 seconds]
pusewicz has quit [Ping timeout: 272 seconds]
SpaceKookie has quit [Ping timeout: 272 seconds]
bauruine has quit [Ping timeout: 272 seconds]
amitchellbullard has quit [Ping timeout: 272 seconds]
mattjbarlow has quit [Ping timeout: 272 seconds]
procat has joined #ruby
Soda has joined #ruby
dreinull has joined #ruby
mostlybadfly has joined #ruby
tiagonobre___ has joined #ruby
AdamMeghji has joined #ruby
charliesome has quit [Quit: zzz]
Jello_Raptor has joined #ruby
rotor has joined #ruby
NameNotFound has joined #ruby
vcoinminer______ has joined #ruby
pusewicz has joined #ruby
shock_one has joined #ruby
arrubin has joined #ruby
amitchellbullard has joined #ruby
l3kn has joined #ruby
Spookley_ has joined #ruby
<shock_one>
Hi. Does anybody know how would I set a Net::HTTPResponse as a current page of Mechanize?
anaeem1_ has joined #ruby
SpaceKookie has joined #ruby
mattjbarlow has joined #ruby
LBRapid has joined #ruby
Lightsword has quit [Quit: Lightsword]
jimbach has joined #ruby
CustosLimen has joined #ruby
exadeci has joined #ruby
jimeh has joined #ruby
tris has joined #ruby
hellschreiber has joined #ruby
<shock_one>
So, I don't want Mechanize to perform HTTP; I already have a response, but want to use some Mechanize power to explore it.
mjc_ has joined #ruby
RoryHughes has joined #ruby
tessi_zz has joined #ruby
Spookley_ is now known as Spookley
<sevenseacat>
thats not really what mechanize is for
<sevenseacat>
you want nokogiri
quimrstorres has quit [Remote host closed the connection]
bauruine has joined #ruby
jimbach_ has joined #ruby
arup_r has joined #ruby
grzywacz has quit [Ping timeout: 240 seconds]
jimbach has quit [Ping timeout: 258 seconds]
ptrrr has joined #ruby
ghr has joined #ruby
shock_one_ has joined #ruby
shock_one has quit [Read error: Connection reset by peer]
jimbach_ has quit [Remote host closed the connection]
comma8 has joined #ruby
Dwarf has joined #ruby
jimbach has joined #ruby
silkfox has joined #ruby
blackmesa has quit [Ping timeout: 256 seconds]
<shock_one_>
sevenseacat, I'd love not to want it, but I'm trying to replace the HTTP client of existing system and not to break the codebase. So, I don't have an option.
exgf_u_v has joined #ruby
banister has joined #ruby
livathinos has quit [Remote host closed the connection]
blackmesa has joined #ruby
<shock_one_>
I understand that the solution will be a hack, but I'm fine with it.
NoNMaDDeN has quit [Remote host closed the connection]
tesaf has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
russt has quit [Quit: russt]
krz has quit [Quit: WeeChat 1.0.1]
giuseppesolinas has joined #ruby
einarj has quit [Remote host closed the connection]
exgf_u has quit [Ping timeout: 250 seconds]
giuseppesolinas has quit [Client Quit]
kwd has quit [Quit: kwd]
St_Marx has joined #ruby
Ulrike_Rayne has quit [Ping timeout: 240 seconds]
<workmad3>
shock_one_: replace the HTTP client in what sense?
Spookley has quit [Quit: Spookley Says Bye]
<cHarNe2>
hi guys, im having some trouble with savon, (soap) i can get it to view the xml that it sends
aboudreault has quit [Ping timeout: 264 seconds]
Ulrike_Rayne has joined #ruby
elcheckito has quit [Ping timeout: 255 seconds]
KnowledgeOwl has quit [Quit: Saindo]
<shock_one_>
workmad3, we were using regular Net::HTTP, but now we need a very special and smart-ass HTTP client, which we wrote on our own. But some parts of code used not Net::HTTP, but Mechanize. And now I'd like to befriend it with our HTTP client.
tier has quit [Remote host closed the connection]
cleopatra has quit [Ping timeout: 244 seconds]
<workmad3>
shock_one_: hmm... then I'd suggest digging through the mechanize code to figure out how to either: 1) replace its internal HTTP client with your own or 2) bypass mechanize requests and create the response objects from mechanize yourself
SolarSailor has joined #ruby
tier has joined #ruby
jaequery has joined #ruby
<shock_one_>
workmad3, yeah, that's what I'm doing. Thank you.
<workmad3>
shock_one_: a quick look at the code indicates that neither is likely to be easy, and will probably require a chunk of time spent fiddling and breaking things
jerius has joined #ruby
<workmad3>
shock_one_: although I suspect the second one will be easier, by instantiating Mechanize::Page objects directly
<workmad3>
but you'll probably lose the ability to traverse links via mechanize
arup_r has quit [Quit: Leaving.]
<shock_one_>
workmad3, actually responses are of type Mechanize::File. If only the authors listened to wise people who suggest to inject dependencies.
<workmad3>
shock_one_: Mechanize::Page is a subclass of file that gets created with HTML responses ;)
noop has quit [Ping timeout: 240 seconds]
Takle has quit [Remote host closed the connection]
<shock_one_>
True that.
Takle has joined #ruby
wald0 has quit [Ping timeout: 255 seconds]
samuel02 has joined #ruby
noop has joined #ruby
russt has joined #ruby
mary5030 has joined #ruby
aboudreault has joined #ruby
wald0 has joined #ruby
mary5030 has quit [Read error: Connection reset by peer]
josephndenton has joined #ruby
mary5030 has joined #ruby
centrx has joined #ruby
Takle_ has joined #ruby
Takle has quit [Read error: Connection reset by peer]
antgel has joined #ruby
Lingos_ has quit [Quit: Be back later ...]
vsipuli has joined #ruby
elcheckito has joined #ruby
patrick99e99 has joined #ruby
<vsipuli>
Is there any way of making Emac 24.4's default ruby-mode not deep indent argument lists without parentheses (or even better, not deep indent anything else either)?
rshetty has joined #ruby
<vsipuli>
(Argument lists within parentheses are not deep indented by default it seems)
yfeldblum has joined #ruby
Lingos_ has joined #ruby
mkaesz has joined #ruby
duggiefresh has joined #ruby
patrick99e99 has quit [Ping timeout: 250 seconds]
ctp has quit [Quit: I've got an 8 hour ticket to dream land. ZZZzzz…]
aboudreault has quit [Ping timeout: 244 seconds]
kith has quit [Quit: kith]
yfeldblum has quit [Ping timeout: 240 seconds]
St_Marx has quit [Quit: WeeChat 1.0.1]
St_Marx has joined #ruby
_JamieD_ has joined #ruby
aboudreault has joined #ruby
samuel02 has quit [Ping timeout: 264 seconds]
St_Marx has quit [Client Quit]
devdazed has joined #ruby
fsapo has quit [Ping timeout: 272 seconds]
workmad3 is now known as wm3|away
arup_r has joined #ruby
NoNMaDDeN has joined #ruby
St_Marx has joined #ruby
benzrf is now known as benzrf|offline
adriancb has joined #ruby
zB0hs has joined #ruby
rshetty has quit [Ping timeout: 256 seconds]
zB0hs has quit [Max SendQ exceeded]
aganov has quit [Quit: Leaving]
paulfm has quit [Read error: Connection reset by peer]
lkba has quit [Ping timeout: 255 seconds]
DrCode has quit [Remote host closed the connection]
DrCode has joined #ruby
anaeem1_ has quit [Remote host closed the connection]
josephnd1nton has joined #ruby
anaeem1_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
mackinto1h has quit [Ping timeout: 250 seconds]
rshetty has joined #ruby
SolarSailor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
aboudreault has quit [Ping timeout: 255 seconds]
apeiros__ is now known as apeiros_
benzrf|offline is now known as benzrf
ctp has joined #ruby
josephnd1nton has quit [Ping timeout: 255 seconds]
anaeem1_ has quit [Ping timeout: 255 seconds]
rodfersou has quit [Ping timeout: 240 seconds]
rodfersou has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
mary5030 has quit [Ping timeout: 265 seconds]
paulfm has joined #ruby
ndrei_ has quit [Ping timeout: 245 seconds]
ndrei has quit [Ping timeout: 240 seconds]
clauswitt has quit [Ping timeout: 244 seconds]
movedx has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
hamakn has quit [Remote host closed the connection]
einarj has joined #ruby
hamakn has joined #ruby
paulfm has quit [Client Quit]
lxsameer has quit [Quit: Leaving]
TinkerTyper has quit [Ping timeout: 264 seconds]
TinkerTyper has joined #ruby
jaequery has joined #ruby
olivier_bK has joined #ruby
jaequery has quit [Client Quit]
movedx has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
jobewan has joined #ruby
b4rbz has quit [Remote host closed the connection]
Shazaum has joined #ruby
krz has joined #ruby
Shazaum has quit [Changing host]
Shazaum has joined #ruby
krz has quit [Client Quit]
zzzbra has quit [Remote host closed the connection]
<movedx>
If I want to 'sudo -u' to a user, a user with rvm and ruby installed to their local account, and then run their ruby instance, how would I do it?
Avahey has joined #ruby
paulfm has joined #ruby
samuel02 has joined #ruby
Bira has quit []
<shevy>
movedx perhaps exec 'sudo -u'
quimrstorres has joined #ruby
<shevy>
though, the running instance of when you run that program may still be the old ruby version; you have to try
<movedx>
Sorry, I've not explained my self very well. I'm looking 'sudo -u someuser ruby' from the root user, or some other user with permission to do this.
kurstin has joined #ruby
<movedx>
Thanks for the spam, kurstin
livathinos has joined #ruby
jottr has joined #ruby
lampd1 has quit []
<movedx>
shevy: So I have user, bob, who has installed rvm locally (--user-install) and then used that rvm to install ruby 2.1. All this is contained in /home/bob/.rvm/
Olipro has quit [Ping timeout: 256 seconds]
<movedx>
shevy: Then from an authorised user, I want to run a task as bob, so I can do: sudo -u bob
<movedx>
But I'm trying to battle with sudo to get it to see the rvm installation, and thus the ruby instance.
ghr has joined #ruby
corehook has quit [Remote host closed the connection]
ikaros has quit [Quit: Ex-Chat]
existensil has quit [Quit: WeeChat 0.4.2]
altamic_ has joined #ruby
sambao21 has joined #ruby
TinkerTyper has quit [Ping timeout: 244 seconds]
sski has quit [Remote host closed the connection]
tagrudev has quit [Read error: Connection reset by peer]
<centrx>
jheg, and board.squares is a one-dimensional array?
<jheg>
yeah with 9 elements
<Hanmac>
jheg: you use #each method, you want #any?
<soahccc>
Anyone uses the backup gem and can share some management insights? Am I supposed to create a new model incl. sync, etc. for each and every backup?
<jheg>
Hanmac: here? Game::WINNING_LINES.each do |the_line|
vinleod has joined #ruby
<Hanmac>
jheg: yes you need to replace that each with "any?"
rubie has joined #ruby
nobody404 has joined #ruby
<jheg>
thanks amending now
nobody404 has quit [Client Quit]
troulouliou_dev has quit [Remote host closed the connection]
Lingos_ has quit [Quit: Be back later ...]
<rubie>
hi all: if a user is in a loop and there input is invalid, is there a way to start the loop over and let them try again?
Jake232 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<rubie>
their* input
Lingos_ has joined #ruby
Lingos_ has quit [Client Quit]
daee has quit [Quit: Page closed]
mkaesz has quit [Ping timeout: 240 seconds]
Versality has quit [Ping timeout: 256 seconds]
t_mmyv has joined #ruby
skyos has joined #ruby
slawrence00 has joined #ruby
wm3|away is now known as workmad3
renderful has joined #ruby
djbkd has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<aces1up9939>
anyone know any good tutorials on ruby fibers?
<shevy>
I don't like that loop condition
<rubie>
why not?
bal has quit [Quit: bal]
<shevy>
it's complex to check that your array tower3 must be like that
<shevy>
I like to reduce things to true and false
treehug88 has joined #ruby
djbkd has quit [Ping timeout: 240 seconds]
drewvanstone has joined #ruby
<shevy>
I also like to decouple fetching user input, and then process it; then you can simply continue
atmosx has joined #ruby
noop has joined #ruby
<shevy>
loop { user_input = $stdin.gets.chomp; check_against_menu(user_input) } <-- this will already loop all over again, what would be missing here is the condition to ensure that it could break out from there again
<shevy>
rubie why won't you change the loop to permanently loop, until some condition happens?
ndrei_ has joined #ruby
ndrei has joined #ruby
treehug88 has quit [Client Quit]
<rubie>
thats that i thought i did
<rubie>
this is towers of hanoi game
<shevy>
note your question above
<shevy>
"if a user is in a loop and their input is invalid, is there a way to start the loop over"
<shevy>
^^^ if this would be the default, you'd not have to ask that question :D
<shevy>
because you'd permanently loop anyway
<atmosx>
hey shevy
<shevy>
hey Dr. atmosx
<atmosx>
hahahaha
<rubie>
ahh
<shevy>
(in 1.5 years)
SloggerKhan has left #ruby [#ruby]
<atmosx>
yes
treehug88 has joined #ruby
superscalr has joined #ruby
<shevy>
atmosx though that waiting time is the stupidest thing I've ever heard; is there no way to get an exception? I mean what is the point of having to wait if you already passed all exams
fgo_ has quit [Ping timeout: 264 seconds]
treehug88 has quit [Max SendQ exceeded]
ki0 has quit [Ping timeout: 250 seconds]
krz has quit [Ping timeout: 240 seconds]
<atmosx>
shevy: no fucking idea, but I've seen the law and it's a crystal-clear statement
<atmosx>
I mean it's a law, might be stupid, but there's not much to argue about it
<shevy>
ah you mean it is just written down like that?
<atmosx>
yes
treehug88 has joined #ruby
<atmosx>
5-year study
<shevy>
hmm
<atmosx>
explicitly stated like "no les sthan 5 years"
<atmosx>
most probably it's the same thing in Austria
<atmosx>
it's a European Union directive too
Takle_ has quit [Remote host closed the connection]
elcheckito has quit [Quit: WeeChat 1.0.1]
sailias has quit [Ping timeout: 256 seconds]
Takle has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<shevy>
well, not sure about the law - but you are right, pharmacy is still a diploma study and takes 5 years; also vetmed studies (for becoming a clinical vetmed doctor that heals animals etc..; it's also a drug pharmacist at the same time with one additional exam after the 5 years studies); most everything else is in 3 years bachelor and 2 years optional master studies addon since almost ... since 10 years I think
rkazak has quit [Quit: Sleep.....ing....]
xrlabs has joined #ruby
<atmosx>
yeap something like that
<shevy>
atmosx now you could study something in addition to that! :>
pwh has joined #ruby
MSY has joined #ruby
sambao21 has joined #ruby
MSY is now known as Guest81173
<atmosx>
shevy: I don't know if I can do it officially
CorySimmons has joined #ruby
<atmosx>
I'd really like the Georgia Tech's computer science OMS
renderful has quit [Remote host closed the connection]
<atmosx>
kurstin is a spam bot or infected client
Takle_ has joined #ruby
Takle has quit [Ping timeout: 256 seconds]
karmatr0n has joined #ruby
Lingos_ has joined #ruby
timonv_ has quit [Remote host closed the connection]
Guest81173 has quit [Quit: Leaving]
gsd has joined #ruby
sdwrage has joined #ruby
elcheckito has joined #ruby
vsipuli has quit []
Juanchito has quit [Quit: Connection closed for inactivity]
krz has joined #ruby
econerd4ever has quit [Remote host closed the connection]
GPH|work has joined #ruby
haxrr has quit [Ping timeout: 258 seconds]
econerd4ever has joined #ruby
mistermocha has joined #ruby
gsd has quit [Client Quit]
rajeshchawla has joined #ruby
nvdpl has joined #ruby
ctp has quit [Ping timeout: 272 seconds]
timonv_ has joined #ruby
fabrice31 has quit [Remote host closed the connection]
krz has quit [Client Quit]
divi has joined #ruby
econerd4ever has quit [Ping timeout: 258 seconds]
maestrojed has joined #ruby
centrx has quit [Quit: The plan is programmed into every one of my one thousand robots]
sailias has joined #ruby
klmlfl has joined #ruby
ki0 has joined #ruby
lucyinthesky has joined #ruby
superscalr has quit [Quit: superscalr]
maasha has quit [Ping timeout: 246 seconds]
jlast has quit [Remote host closed the connection]
uber_hulk has quit [Quit: leaving]
ghr has joined #ruby
Cache_Money has joined #ruby
Takle_ has quit [Remote host closed the connection]
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
Kricir has joined #ruby
divi has quit [Ping timeout: 240 seconds]
sevenseacat has quit [Remote host closed the connection]
corehook has joined #ruby
lucyinthesky has quit [Quit: Leaving]
zzzbra has joined #ruby
CorySimmons has quit [Quit: Bye!]
ki0 has quit [Remote host closed the connection]
fgo_ has joined #ruby
divi has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
diegoviola has joined #ruby
jemendja has joined #ruby
<jemendja>
morning
renderful has joined #ruby
kurstin has quit [K-Lined]
jemendja has quit [Client Quit]
rkazak has joined #ruby
corehook has quit [Ping timeout: 258 seconds]
Unknown2 has joined #ruby
fgo_ has quit [Ping timeout: 255 seconds]
bluenemo has quit [Quit: Verlassend]
chrishough has joined #ruby
sud0x has joined #ruby
giuseppesolinas has joined #ruby
<sud0x>
hey all, trying to make a simple checkbox but I'm getting incorrect # of arguments. I just have: <%= check_box 'name' %>
<sud0x>
kinda confused reading thru the ruby documentation
sambao21 has quit [Quit: Computer has gone to sleep.]
<empyreal>
regardless, I appreciate the help. Pretty new to ruby.
apeiros has quit [Ping timeout: 244 seconds]
drkyro has joined #ruby
ordepdev has joined #ruby
xenomorph is now known as {xenomorph}
koderok has quit [Client Quit]
<ddv>
empyreal, any reason in particular you want to use sqlserver?
lkba has joined #ruby
<empyreal>
ddv: because it's what our business runs for our production SCADA systems. It's beyond optional.
arup_r has quit [Quit: Leaving.]
<ddv>
empyreal, ok
dkb20k has quit [Ping timeout: 245 seconds]
<empyreal>
I'm a C# guy taking a crack at this for a simple project.
rkazak has left #ruby [#ruby]
<ddv>
empyreal, I don't recommend using Rails on Windows, it's far from ideal
nvdpl has joined #ruby
<ddv>
empyreal, also if you know C# maybe you should use ASP.NET MVC
<ddv>
imo
apeiros_ has quit [Ping timeout: 250 seconds]
<shevy>
ack!
<shevy>
he sends people away from our beloved ruby!
<shevy>
thank god he did not suggest php
<ddv>
I just realized that
<angryzor>
i tend to find it more tolerable to install a linux VM on a windows machine just to develop in ruby than to deal with managing all the dependencies in native windows
<shevy>
well actually he seems stuck on the gems-environment so perhaps he won't reach the rails setting at all :D
<shevy>
angryzor haha
apeiros_ has joined #ruby
<shevy>
how sad the state of affairs on windows has become ...
giuseppesolinas has quit [Quit: This computer has gone to sleep]
<empyreal>
ASP.NET is great if you're an old-school Windows forms developer afraid of change.
<ddv>
we have some legacy rails app that needs to talk to sqlserver, tiny_tds has some weird bugs
<ddv>
empyreal, ASP.NET MVC is something totally different
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ddv>
also if you're into the Windows stack (i'm not) than visual studio is pretty nice
<empyreal>
It is, but I'm exploring the Linux world as a way to make my job more interesting.
<empyreal>
hence, the interest in Ruby.
msmith_ has joined #ruby
<ddv>
install a vm or something, you are in a world of pain getting to install some gems on Windows
ptrrr has quit [Quit: ptrrr]
<empyreal>
even in Cygwin? (which is what I'm using)
jaequery has joined #ruby
sambao21 has quit [Quit: Computer has gone to sleep.]
<ddv>
even in cygwin
anarang has quit [Quit: Leaving]
Lingos_ has quit [Quit: Be back later ...]
<angryzor>
thing is, if any gem needs some obscure library that has no prebuilt windows libraries
pacMakaveli has quit [Remote host closed the connection]
<angryzor>
you have to start building everything from source
<angryzor>
assuming it can run under windows
Lingos_ has joined #ruby
<empyreal>
is this why so many Ruby developers use Macs?
timonv_ has quit [Remote host closed the connection]
bricker`work has joined #ruby
<shevy>
I use linux
<ddv>
empyreal, linux or osx is best ruby/rails development
<shevy>
only hipsters use macs
<ddv>
+for
<ddv>
thanks shevy :|
rylev has quit []
<shevy>
you are in the majority here ddv
abuzze has quit [Remote host closed the connection]
lkba has quit [Read error: Connection reset by peer]
lkba has joined #ruby
blackmesa has joined #ruby
sdwrage has quit [Remote host closed the connection]
<shevy>
then again
<shevy>
osx uses objective C right? so that is kinda like the spiritual parent of ruby!
<empyreal>
the fact is I'm using SQL Server for most things here, so if I'm going to be using a buggy, shoddy library to connect I'm probably going to nope out of Ruby.
jheg has quit [Quit: jheg]
<ddv>
empyreal, sounds wise
giuseppesolinas has quit [Quit: This computer has gone to sleep]
sigurding has quit [Quit: sigurding]
<shevy>
we pave you the way towards php!
sailias has quit [Quit: Leaving.]
lmickh has joined #ruby
<empyreal>
yeah, been there, done that
sailias1 has joined #ruby
<empyreal>
not going back
<shevy>
hehehehe
Taylor has joined #ruby
<ddv>
empyreal, doesn't make sense to introduce yet another stack in a Mickeysoft based environment
<shevy>
like many refugees here too ;-)
Taylor is now known as TheWolf
<shevy>
Mickeysoft!
<TheWolf>
get in losers...we're going to go do science
<shevy>
TheWolf does this involve math?
sailias1 has joined #ruby
<TheWolf>
god no
mikepack has joined #ruby
<shevy>
ok then count me in
<TheWolf>
:)
<empyreal>
I was just looking for a script-based environment to do simple things with.
sailias2 has joined #ruby
giuseppesolinas has joined #ruby
<empyreal>
Windows batch is primitive, and Powershell is a mess.
JimmyNeutron has quit [Remote host closed the connection]
<empyreal>
not to mention incompatible with half our servers.
sailias2 has quit [Read error: Connection reset by peer]
sailias3 has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ddv>
powershell is nice and C# is a good language
<TheWolf>
Hey, but random question has anyone worked with running scripts on a Raspberry pi?
apeiros_ has quit [Read error: Connection reset by peer]
samuel02 has quit [Remote host closed the connection]
rh1n0 is now known as rh1n0_away
sailias3 has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
sailias1 has quit [Client Quit]
<ddv>
TheWolf, no one
sailias2 has joined #ruby
ThaDick_ has joined #ruby
<wasamasa>
TheWolf: what is a raspberry pie even?
ThaDick_ has quit [Client Quit]
<empyreal>
alright, guess I'm out then. thanks guys.
empyreal has left #ruby [#ruby]
ThaDick has quit [Ping timeout: 256 seconds]
<shevy>
the poor guy
<shevy>
C# in windows
<TheWolf>
wasamasa: it is a small computer, bare bones, super fun. Google it.
<angryzor>
the concept of powershell is nice, but the learning curve is kinda steep and every commandlet having the most unexpected name possible doesn't really help it
<shevy>
and not having a scripting language
<wasamasa>
TheWolf: and super unfree
<wasamasa>
TheWolf: woop woop
<wasamasa>
TheWolf: the people behind it don't look particularly trustworthy to me
<wasamasa>
TheWolf: first stating it's open, then supplying broadcom blobs
<TheWolf>
my company got us two to play with, but I have no idea what I'm doing.
<shevy>
hahahaha
<shevy>
whatever you do TheWolf
sailias has quit [Ping timeout: 264 seconds]
<shevy>
just look professional
joonty has quit [Quit: Leaving]
<shevy>
wear your SeriousFace
<ddv>
TheWolf, you can use any scripting language you want on that thing
mistermocha has quit [Remote host closed the connection]
jwang__ has joined #ruby
TheWolf has left #ruby ["gotta go work on a new script lator gators"]
giuseppesolinas has joined #ruby
timonv_ has joined #ruby
benzrf is now known as benzrf|offline
anaeem1_ has quit [Remote host closed the connection]
<workmad3>
pontiki: one of these days, I'm planning on setting up a pi as a wifi access point w. radius server and snort running as a passive & active wifi monitor on a second wifi dongle (and, if I'm feeling really bored, I'd have it logging and reporting to a DO server...)
arup_r1 has joined #ruby
<workmad3>
pontiki: my wife wants to set up a pi and a load of cameras so we can record what our cat gets up to while we aren't around...
renderful has quit [Remote host closed the connection]
giuseppesolinas has joined #ruby
haxrr has joined #ruby
haxrr has quit [Max SendQ exceeded]
stunder has quit [Quit: Screw you guys I'm going home]
haxrr has joined #ruby
Squarepy has quit [Read error: Connection reset by peer]
jaequery has joined #ruby
apeiros_ has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 255 seconds]
apeiros has joined #ruby
mattmcclure has joined #ruby
Sirupsen has joined #ruby
drkyro has joined #ruby
clang- has joined #ruby
Guest6644 has quit [Ping timeout: 265 seconds]
<clang->
Why doesn't this output "boom"?
<clang->
ruby -e '$str="boom"; system "echo $str"'
ferr has joined #ruby
<jhass>
clang-: because that's not the same variable
<clang->
ah ok
<clang->
ruby -e '$str="boom"; system "echo " + $str'
<clang->
works
<jhass>
the first $str is a ruby global variable
<jhass>
don't use thos
<jhass>
e
ghostmoth has joined #ruby
benzrf|offline is now known as benzrf
<jhass>
system spawns a shell in this case and passes it your string as script
<jhass>
so the later $str is an environment variable
The_NetZ_ has quit [Remote host closed the connection]
procat has quit [Ping timeout: 264 seconds]
<jhass>
so ruby -e 'ENV["str"] = "boom"; system "echo $str"' would work
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
SCHAAP137 has joined #ruby
cleopatra has quit [Quit: Saliendo]
<jhass>
clang-: interpolate ruby code into strings "like #{this}"
<eam>
I wish ruby's system could pass an env
cleopatra has joined #ruby
checkit has joined #ruby
<jhass>
it can
<jhass>
pass a hash as first argument
<yxhuvud>
rant about system/exec arguemnt parsing incoming from brixen in 3.. 2.. 1..
blackmesa has quit [Ping timeout: 244 seconds]
renderful has joined #ruby
<eam>
jhass: ah excellent. Odd that it only works with parens though
speakingcode has joined #ruby
ruber has joined #ruby
drjfreez1 has joined #ruby
<jhass>
well, yeah, ruby takes it for a block otherwise
<eam>
oh I see
<eam>
hm that's ... lame
dkphenom has joined #ruby
<ruber>
Ruby 2.2.0-preview1 has the same compile bug on OS X (10.8) as in 2.1.4 which was fixed in 2.1.5. I don't have a dev account so could someone let the team know?
<ruber>
It's a miniruby/encdb problem with make
Hanmac has joined #ruby
benzrf is now known as benzrf|offline
phutchin1 has joined #ruby
drjfreeze has quit [Ping timeout: 245 seconds]
jerius has quit [Read error: Connection reset by peer]
benzrf|offline is now known as benzrf
jerius has joined #ruby
cleopatra has quit [Quit: Saliendo]
fgo_ has joined #ruby
klmlfl has quit [Remote host closed the connection]
cleopatra has joined #ruby
dkphenom has quit [Client Quit]
djbkd has joined #ruby
djbkd has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
<eam>
are there any other relevant fields for system?
fgo_ has quit [Ping timeout: 256 seconds]
jaequery has joined #ruby
FooMunki has quit [Quit: FooMunki]
cleopatra has quit [Client Quit]
jaequery has quit [Max SendQ exceeded]
cleopatra has joined #ruby
haxrr has quit [Ping timeout: 265 seconds]
jaequery has joined #ruby
Versality has quit [Ping timeout: 245 seconds]
<eam>
env hash isn't documented in Kernel#system
rajeshchawla has quit [Remote host closed the connection]
Megtastique has quit [Read error: Connection reset by peer]
giuseppesolinas has joined #ruby
jY has joined #ruby
Megtastique has joined #ruby
<jY>
whats the different between event[:action] and event["action"]
henesy has joined #ruby
Avahey has quit [Quit: Connection closed for inactivity]
<apeiros>
jY: you know the difference between "1" and 1?
cpruitt has quit [Quit: cpruitt]
<shevy>
jY "action" is a String object, :action is a Symbol object; :action is always the same, same object id; "action" is different, will have different object ids, see:
rajeshchawla has quit [Remote host closed the connection]
dseitz has joined #ruby
icebourg has quit [Ping timeout: 272 seconds]
Norrin has left #ruby [#ruby]
<apeiros>
ouch
djbkd has joined #ruby
<skyos>
Guys I'm learning ruby, but I find I learn much better/faster with tutor. I'm also learning programing with ruby. In other words ruby is my first language. I started the book "Well Ground Rubist", its going really slow.
<apeiros>
sounds similar to Array#at vs Array#[] (former is supposed to be faster because simpler, but latter is faster because of parser tricks)
<eam>
the perils of dynamic OO, or why C++ objects are so absurdly gigantic
<skyos>
I'm looking for tutor in other words
adriancb has joined #ruby
dkb20k has joined #ruby
<apeiros>
I wonder why they don't apply that optimization to symbols too
giuseppesolinas has quit [Client Quit]
<apeiros>
all immediates, actually
<yxhuvud>
apeiros: they apply it to all symbols now, but not before.
<yxhuvud>
(I doubt >> use head)
<apeiros>
yxhuvud: 2.2?
<eam>
the discovery is just a few weeks old :)
patrick99e99 has joined #ruby
jdj_dk has quit [Remote host closed the connection]
<yxhuvud>
yes. read the Matz and Ko1 enters the fray part of the article
<Guest90721>
I have a problem where my sed command runs correctly in the command line but messes up when in used in a ruby script. Anyone know how to fix this command ? system "sed -i '/^\(goodbye\|hello\)/!d' blah.file"
airdeluxe has joined #ruby
divi has quit [Ping timeout: 240 seconds]
Cork has joined #ruby
Cork is now known as Guest38666
SCHAAP137 has quit [Ping timeout: 265 seconds]
Lightsword has joined #ruby
SCHAAP137_ has quit [Client Quit]
SCHAAP137 has joined #ruby
freerobby has joined #ruby
corehook has joined #ruby
rajeshchawla has quit [Remote host closed the connection]
<wasamasa>
also, your previous example is incorrect
airdeluxe has joined #ruby
<wasamasa>
gives me a syntax error with python
Petein has joined #ruby
<atmosx>
shevy: you here
<atmosx>
?
<wasamasa>
or no, that was python3, damnit
postmodern has joined #ruby
paulfm has joined #ruby
Guest6644 has joined #ruby
<Petein>
Hi. I have a very basic question. Although I have downloaded some ruby library and i found where it is installed, when i try to load it via load 'iso8583-0.1.5\lib\iso8583\message.rb' i get an error that it cannot load such file. gem env: shows that GEM PATHS: - C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1 and my ruby library is here: C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\iso8583-0.1.5\lib\iso8583 (which inside this directory
despai has quit [Quit: This computer has gone to sleep]
paulfm has quit [Client Quit]
<wasamasa>
clang-: anyhow, if it's not a xy problem, then do as the romans do
paulfm has joined #ruby
<wasamasa>
clang-: if it is, explain what you're actually trying to do
Sirupsen_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jottr has joined #ruby
<clang->
wasamasa: what do the romans do?
<wasamasa>
clang-: "When in Rome, do as the Romans do."
Sirupsen has joined #ruby
geggam has quit [Ping timeout: 255 seconds]
<wasamasa>
clang-: or alternatively put, when using ruby, use it the ruby way
claymore has quit [Ping timeout: 264 seconds]
Sirupsen has quit [Client Quit]
tier has quit [Remote host closed the connection]
ramfjord has joined #ruby
kireevco has quit [Read error: Connection reset by peer]
<wasamasa>
clang-: instead of somehow hacking the python feature of writing unicode escapes in octal into ruby
Xeago has joined #ruby
<wald0>
i have a problem with array/hashes
sambao21 has quit [Quit: Computer has gone to sleep.]
<wald0>
let's say that i want to make a list of identifiers with elements
<wald0>
entries[ip] is a unique identifier (ip of user, so same user, unique id)
tier has joined #ruby
yfeldblum has joined #ruby
despai has joined #ruby
<shevy>
atmosx semi; I am playing through some ancient DOS games sort of
<atmosx>
shevy: sensible soccer?
<shevy>
atmosx but on my todo list for today is: run a BLAST search
kireevco has joined #ruby
<wald0>
and i want to add on each one a list of hte different pages that has visited (requests), which also has other values like datetime
sambao21 has joined #ruby
<shevy>
nah, RPG stuff mostly; right now bloodnet
<atmosx>
shevy: awesome wait
quimrstorres has quit [Remote host closed the connection]
<havenwood>
Petein: #load not #require? other gems work?
<wald0>
i should use something like this? request[ip][:request] = request
<wald0>
mmmh, how i set the datetime to this request then ?
mkaesz has quit [Remote host closed the connection]
mjuszczak has joined #ruby
mjuszczak has joined #ruby
<havenwood>
wald0: It's easier for humans to understand complex data rather than complex logic. Show an example input and desired output?
Xeago_ has quit [Ping timeout: 272 seconds]
<wald0>
havenwood: i still designing it in my head lol, so i dont know yet the better structure
procat has joined #ruby
<shevy>
atmosx whoa ... 2 MB as .zip
<Petein>
havenwood: i tried 'load 'lib\multi_json.rb' and i get the same error. this library is in: C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\multi_json-1.10.1\lib
<Petein>
im using Aptana
<shevy>
that's huge
<wald0>
but i think that i should make an array element, with unique id's (ip) and then in each one a list (arrays?) of entries that contains the file requested, and the datetime
elaptics is now known as elaptics`away
<shevy>
atmosx oh I see what is missing yet in README.md - the installation instructions :-)
<havenwood>
Petein: try: require 'multi_json'
yfeldblum has quit [Ping timeout: 264 seconds]
<wald0>
=_=
<wald0>
trying to understand these things is crazy
<Petein>
havenwood: this works. but for message.rb if i try require 'message.rb' i get this error: C:/Aptana_Workspace/myTest/MyMessage.rb:5:in `<main>': uninitialized constant Message (NameError)
<havenwood>
wald0: i don't follow, but if it's unique consider a Set instead of an Array
<wald0>
and if is correct, how i can assign a second value to this entry? for example the datetime/timestamp of this request
<wald0>
what is the arrays/hashes structure that i need to use?
<Petein>
havenwood: what it may be? i would like to use this library. i had a nice plan for tonight. it is the 1st serious program i want to make in ruby
<eam>
wald0: where is the request object in that example? Try writing out an example as yaml or json
aces1up9939 has left #ruby [#ruby]
<wald0>
yaml/json ? i think that this is more difficult that what im trying to do :/
* wald0
learning and practicing ruby
<atmosx>
havenwood: omg, that sounds like the mother of all evils (Kafka at least, believed so!)
<wald0>
what you mean by request eam ?
<Luyt>
havenwood: Larry Wall mentions 'persistence' as a virtue for a software developer, I usually call it 'tenacity'.. when you know something can be done, but you don't know how (yet), never give up until you found out how to do it.
<eam>
wald0: it's just an easy to read syntax for diagramming simple data structures
<atmosx>
havenwood: "Impatience and boredom are the roots of every evil" haha
<havenwood>
Luyt: larry wall is great, i like listening to what he has to say
ReRixo has joined #ruby
<wald0>
actually i have already set a loop for every nginx-log line, and it puts in a different variable every entry (the referal, the request, the timestamp, the code, the bytes transfered, etc)
procat has quit [Ping timeout: 255 seconds]
<atmosx>
Larry Wall is really ugly.
stunder has joined #ruby
Versality has joined #ruby
<shevy>
lol
<wald0>
what i need to do is to know how much users (ip) got from page-1 to page-2 to page-3 etc... well, to calculate the percentages of bounces in every step
<eam>
atmosx: makes me wonder how long you've been in the field
<shevy>
atmosx but he got a big moustache
<wald0>
for that i need first to make an "users" structure
<atmosx>
eam: what makes you think I'm on the field right now?
<havenwood>
Petein: have you heard of $LOAD_PATH before? (it's an Array, take a look at it.) if the file is in a dir in the $LOAD_PATH (you can add it) then you can just require.
<wald0>
but i dont know how i should set it..
<eam>
atmosx: absolutely nothing, that's my point :)
<wald0>
users[ip]["entries"].push "/homepage"
<wald0>
maybe like this, mmh...
<shevy>
atmosx eam is about twice our age
krisquigley has joined #ruby
<Luyt>
My favourite philosopher Ayn Rand, once said: “If you don't know, the thing to do is not to get scared, but to learn.” This perfectly illustrates my point
davidhq has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<atmosx>
shevy: i'm going to a mustache party tonight, he might be welcomed there probably free entrance
<shevy>
hahaha
<atmosx>
eam: so you actually DO have a point
<shevy>
I can't grow a larry wall style moustache :(
gebbione has quit [Ping timeout: 240 seconds]
<atmosx>
shevy: hehe
<eam>
atmosx: there is always a point, the question is whether you're aware of it
<atmosx>
eam: I'm not, r u?
<shevy>
I don't like beards, they are itchy and tend to accumulate food leftovers
<atmosx>
kinda
Merec has joined #ruby
mkaesz has joined #ruby
<Luyt>
shevy: Also, old skin flakes. Yuck.
<Petein>
havenwood: i just found out about $LOAD_PATH. the thing is that i do not want to give the full path. isnt there any other way?
dkphenom has joined #ruby
Synthead has quit [Read error: Connection reset by peer]
<havenwood>
anyone know a good require/require_relative/load/$: tutorial?
pietr0 has quit [Quit: pietr0]
Merec has left #ruby [#ruby]
paulfm has quit [Read error: Connection reset by peer]
Versality has quit [Ping timeout: 255 seconds]
<atmosx>
shevy: oh, I read it the other way around, thought that I was twice eam's age.
<eam>
atmosx: how much older am I than you, do you think?
yeticry has quit [Ping timeout: 255 seconds]
<atmosx>
eam: no idea, 66? :-p
<eam>
damn
<atmosx>
You work at Square?
<godd2>
66 base 10 or base 16?
Sirupsen has quit [Ping timeout: 240 seconds]
<Petein>
havenwood: i did gem install iso8583, why it is so hard to load it into my code using require?
<eam>
atmosx: I do
quimrstorres has quit [Remote host closed the connection]
<Petein>
havenwood: is this normal?
baweaver has joined #ruby
<atmosx>
eam: cool
yeticry has joined #ruby
<atmosx>
eam: makes me wonder how long are you on the field :-P
jottr has quit [Quit: WeeChat 1.0.1]
<havenwood>
Petein: you're on Windows and I'm honestly not familiar with Win Ruby switchers, but with things properly setup you should be able to simply `require`.
<eam>
;-)
<havenwood>
Petein: How'd you install Ruby?
zzzbra has quit [Read error: Connection reset by peer]
zzzbra has joined #ruby
<godd2>
Petein I'm on Windows so I may be able to offer some insight
<atmosx>
godd2: what editor do yo uuse on windows for ruby?
mkaesz has quit [Remote host closed the connection]
<godd2>
also I just did `gem install iso8583` and then in irb did require 'iso8583' and it returned true
<Petein>
godd2: well i did gem install iso8583. it was installed here: C:\RailsInstaller\Ruby1.9.3\lib\ruby\gems\1.9.1\gems\iso8583-0.1.5\lib\iso8583 then i do require 'iso8583' and although inside the iso8583 directory there is message.rb i get => 'C:/Aptana_Workspace/myTest/MyMessage.rb:6:in `<main>': uninitialized constant Message (NameError)'
<havenwood>
godd2: Do you use Chocolatey?
oleo has quit [Ping timeout: 250 seconds]
Versality has joined #ruby
<atmosx>
omg mysql is giving me such a hard time..
<Petein>
godd2: im using Aptana
<havenwood>
ahh, guess i should have realized how (s)he installed Ruby due to the path... hehe
djbkd has quit [Remote host closed the connection]
oleo has joined #ruby
<atmosx>
I'll kill my grief in a crepe with nutella.
<Petein>
godd2: it also gave me true (require iso8583)
<havenwood>
Petein: `true` means it was required successfully and hadn't already been
<Petein>
havenwood: ok, then why i cannot extend a class?
claymore has quit [Ping timeout: 264 seconds]
<Petein>
please try class MyMessage < Message
<Petein>
end
<havenwood>
Petein: doing it wrong? class doesn't exist? dunno.
<godd2>
Petein just because message.rb is inside the directory doesn't mean that file is necessarily being loaded
<Petein>
godd2: ok so how you load it? require 'iso8583\message' ?
<Petein>
godd2: nop.doesnt work
<godd2>
no no
claymore has joined #ruby
<godd2>
one sec. I'm looking through iso8583
<godd2>
ISO8583::Message
<godd2>
that's what you want to inherit from
fgo_ has quit [Ping timeout: 250 seconds]
<godd2>
class MyMessage < ISO8583::Message; end
Xeago has quit [Remote host closed the connection]
<havenwood>
Petein: ^ bit of reading on Ruby namespacing
clang- has quit [Quit: clang-]
nkumari_ has joined #ruby
<godd2>
Petein all of the iso8583 classes are tucked away inside the ISO8583 module, so you have to put ISO8583:: before any of those classes you want to use
cleopatra has quit [Quit: Saliendo]
sinequanon has quit [Remote host closed the connection]
nkumari has quit [Read error: Connection reset by peer]
nkumari_ has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
rodfersou has quit [Quit: leaving]
<havenwood>
godd2: yup, that's the one. just curious to hear from someone who's tried it.
<Petein>
godd2: thank you for the help. havenwood thank you also
fabrice31 has joined #ruby
blackmesa has joined #ruby
nkumari has joined #ruby
nkumari has quit [Remote host closed the connection]
duncannz has joined #ruby
fsapo has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
fabrice31 has quit [Ping timeout: 245 seconds]
jenrzzz has joined #ruby
<shevy>
atmosx ewww nutella
<shevy>
atmosx don't you have sweets from greece? like those yoghurts with honey?
corehook has quit [Remote host closed the connection]
<Petein>
godd2: http://codepad.org/kS5IcQ7x , i opened message.rb and i can see the same example as i have in line 5. why do i get the err: C:/Aptana_Workspace/myTest/MyMessage.rb:5:in `<class:MyMessage>': uninitialized constant MyMessage::N (NameError) from C:/Aptana_Workspace/myTest/MyMessage.rb:3:in `<main>' ?
samuel02 has joined #ruby
<atmosx>
shevy: yes
sambao21 has joined #ruby
<atmosx>
shevy: yogurt with everything, the yogurt is really tasty in Greece
<shevy>
hehehe
teddyp1cker has joined #ruby
Jake232 has joined #ruby
Shazaum has quit [Quit: Leaving]
Unknown2 has quit [Quit: Leaving]
nobitanobi has quit [Remote host closed the connection]
nvdpl has quit [Quit: Quit...]
josephnd1nton has joined #ruby
ferr has quit [Remote host closed the connection]
cpruitt has quit [Quit: cpruitt]
despai has quit [Quit: This computer has gone to sleep]
Maadison has joined #ruby
kasperti_ has joined #ruby
nobitanobi has joined #ruby
freerobby has quit [Quit: Leaving.]
freerobby has joined #ruby
kasperti_ has quit [Client Quit]
Blizzy has joined #ruby
cpruitt has joined #ruby
<Maadison>
I'm debugging with -rdebug and still new to it. (I know, Pry is recommended, but $reasons.) What's the easiest way to have rdebug run to the point where it has processed my class declarations and I can tell it where I want my breakpoint? I find that 'b myfile.rb:1' doesn't always work. Do I have to manually find a safe line number each time I debug a new file?
parabolize has joined #ruby
baroquebobcat has joined #ruby
josephnd1nton has quit [Ping timeout: 265 seconds]
ghostmoth has quit [Quit: ghostmoth]
econerd4ever has quit [Remote host closed the connection]
sinequanon has joined #ruby
econerd4ever has joined #ruby
econerd4ever has quit [Remote host closed the connection]
econerd4ever has joined #ruby
noop has quit [Ping timeout: 250 seconds]
ldnunes has quit [Quit: Leaving]
samuel02 has quit [Remote host closed the connection]
adriancb has quit [Remote host closed the connection]
divi has joined #ruby
lolmaus has joined #ruby
Naeblis has joined #ruby
maletor has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Naeblis>
Hi. How can I quickly look up help interactively in Ruby? Equivalent to python's help() that is.
dangerousdave has joined #ruby
<Naeblis>
Seems like ri doesn't provide a lot of information. `ri Array` just tells me the name of instance methods, nothing else.
wald0 has quit [Quit: Lost terminal]
triple_b has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<parabolize>
Naeblis: Also, its possible to have ri installed while not having the actual docs installed. For example in archlinux I have the packages ruby and ruby-docs. /usr/bin/ri is installed with the ruby package.
Petein has left #ruby [#ruby]
aspires has quit []
ghr has quit [Ping timeout: 244 seconds]
wldcordeiro has quit [Read error: Connection reset by peer]
<fmcgeough>
I want to restrict access of Postgres user to only allow connections when the user is on the actual database box. This is done via the pg_hba.conf file ?
Linell has joined #ruby
maletor has joined #ruby
rsavage has quit [Remote host closed the connection]
hornairs has quit [Ping timeout: 244 seconds]
anaeem1 has joined #ruby
anaeem1 has quit [Remote host closed the connection]
<fmcgeough>
well that certainly wasn’t the right channel. sorry.
anaeem1 has joined #ruby
ghostmoth has quit [Client Quit]
zzzbra has quit [Remote host closed the connection]
claw has quit [Quit: Konversation terminated!]
<ddv>
:/
<ddv>
no shit sherlock
claw has joined #ruby
zzzbra has joined #ruby
claw has quit [Remote host closed the connection]
theotherstupidgu has quit [Ping timeout: 240 seconds]
anaeem1__ has joined #ruby
anaeem1 has quit [Ping timeout: 240 seconds]
theotherstupidgu has joined #ruby
momomomomo has joined #ruby
icebourg_ has quit []
Guest6644 has quit [Ping timeout: 240 seconds]
dcunit3d has quit [Ping timeout: 244 seconds]
jaequery has joined #ruby
josephnd1nton has joined #ruby
giuseppesolinas has quit [Quit: This computer has gone to sleep]
djbkd has quit [Remote host closed the connection]
<parabolize>
oh
<parabolize>
sudo may have been a bad idea
<Naeblis>
You don't have write permissions for the /usr/local/lib/ruby/gems/2.1.0/doc/actionmailer-4.1.8 directory.
treehug88 has joined #ruby
<parabolize>
the mac users may need to help you
<Naeblis>
hence the reason
<Naeblis>
sigh
<Naeblis>
thanks for trying
KC9YDN has quit [Read error: Connection reset by peer]
treehug88 has quit [Max SendQ exceeded]
djbkd has joined #ruby
<parabolize>
I think most of them use rvm and put ruby and all the gems in user land.
treehug88 has joined #ruby
jheg has joined #ruby
* lupine
hides from rvm
ghostmoth has joined #ruby
lkba has quit [Ping timeout: 255 seconds]
<parabolize>
just try it without sudo
<Naeblis>
won't run. gives the error I pasted above
<parabolize>
also, the html is pretty! leave the --no-rdoc out
<Linell>
I'm doing some testing with minitest on an api. One of the calls I want to test won't always return any data. Should I just hardcode it to fetch data from a specific date or what?
<Linell>
(the reason it might not return data is it's testing whether or not something happened on a date that defaults to yesterday)
josephndenton has quit [Ping timeout: 255 seconds]
<Naeblis>
hmm. I think the problem might be
<Naeblis>
my ruby and irb is /usr/local/bin (brew)
<Naeblis>
but gem is /usr/bin/gem
baweaver has joined #ruby
teddyp1cker has quit [Read error: Connection timed out]
<havenwood>
Naeblis: check?: brew doctor
zzzbra has quit [Ping timeout: 240 seconds]
{ordepdev} has joined #ruby
jespada has quit [Ping timeout: 264 seconds]
ghr has joined #ruby
krisquigley has joined #ruby
<havenwood>
Naeblis: edit `/etc/paths` and make sure it's in the order brew doctor suggests
<havenwood>
Naeblis: /usr/local/bin <- at the top
teddyp1cker has joined #ruby
{ordepdev} has quit [Remote host closed the connection]
kobain has joined #ruby
<Naeblis>
$ which gem ▸▸▸▸▸▸▸▸▸▹
<Naeblis>
$ whereis gem ▸▸▸▸▸▸▸▸▸▹
claymore has quit [Ping timeout: 264 seconds]
<havenwood>
Naeblis: Stop that. :P
cleopatra has joined #ruby
<Naeblis>
oh format, my bad
<Naeblis>
anyway, which points me to /usr/local/bin and whereis points to to /usr/bin/
boombadaroomba has quit [Remote host closed the connection]
claw has joined #ruby
momomomomo has quit [Quit: momomomomo]
<claw>
hey there
<claw>
i am looking for a gem that can trigger scheduled events
wald0 has joined #ruby
Musashi007 has joined #ruby
djbkd has quit [Remote host closed the connection]
<havenwood>
Naeblis: brew ruby doesn't put it's gem binaries ahead of others by default
<wald0>
the second entry overwrites any existing user[ip] (it works in a loop), how i can do for just append entries instead of overwrite the only one ?
<havenwood>
Naeblis: if you wanted to, you could just add this to one of your dotfiles that gets sourced: export PATH="$(brew --prefix ruby)/bin:$PATH"
<havenwood>
Naeblis: or chruby
<Naeblis>
doing chruby
Petein has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
<havenwood>
claw: are you at all familiar with sidekiq, resque or beanstalkd
<havenwood>
Naeblis: yeah, looks like the symlink in `~/.rubies` isn't pointing to the brew ruby dir - i think my mistake
fabrice31 has joined #ruby
theotherstupidgu has quit [Ping timeout: 265 seconds]
<claw>
"The delayed queue is stored in redis and is persisted in the same way the standard resque jobs are persisted (redis writing to disk)" << jup there we go
<claw>
thank you havenwood
baweaver has joined #ruby
<havenwood>
claw: no prob
fgo_ has joined #ruby
<havenwood>
Naeblis: sec, i'll fix when off phone, but symlink in ~/.rubies just should point wherever brew ruby dir is
despai has joined #ruby
fabrice31 has quit [Ping timeout: 250 seconds]
<diegoviola>
hola
baweaver has quit [Remote host closed the connection]
razieliyo has joined #ruby
<Naeblis>
wait got it working. Well, at least "chruby ruby". Except now, "chruby system" is also the same thing. o_O
borodin has quit [Quit: Page closed]
jespada has quit [Quit: Leaving]
emmesswhy has joined #ruby
ht__th has quit [Read error: Connection reset by peer]
fgo_ has quit [Ping timeout: 265 seconds]
i0n has quit [Remote host closed the connection]
theotherstupidgu has joined #ruby
tier has joined #ruby
momomomomo has joined #ruby
boombadaroomba has joined #ruby
henesy has joined #ruby
<wald0>
how i can make an array of hashes?
<Luyt>
[{}, {}, {}] ?
<wald0>
mmh, i think so
<Luyt>
but how it is called in Ruby? An array or a list?
<havenwood>
Naeblis: no prob, sorry for the bad gist. i'll fix. :)
<wald0>
godd2: users["fred"] i think, so they are just identifiers
taxen has joined #ruby
<godd2>
jenrzzz is that the singleton class of the singleton class of the singleton class of the singleton class of the singleton class of the Class class?
<jenrzzz>
yes.
<godd2>
:P
<taxen>
anyone know a Rails channel on freenode?
sambao21 has quit [Quit: Computer has gone to sleep.]
<wald0>
making "unique identifiers for each user" in a users[idXX] style
tesaf has quit [Quit: Lost terminal]
<jenrzzz>
taxen: #RubyOnRails
<godd2>
don't forget, of course that it inherits from the singleton class of the singleton class of the singleton class of the singleton class of the BasicObject Class
<taxen>
jenrzzz I cant join...
<jenrzzz>
>> 5.times.inject(Class) {|c| class << c; self; end }.is_a?(BasicObject)
msmith_ has quit [Remote host closed the connection]
<shevy>
blahwoop hi ruby man
<godd2>
hola
<Naeblis>
heh. Interestingly, the ri problem still remains
steffes has joined #ruby
<shevy>
a script per day keeps doctor and sorrows away
<Naeblis>
"nothing known about Array"
<shevy>
Naeblis one has to live with it! ruby docs are not that good
j2p2 has quit [Ping timeout: 240 seconds]
<blahwoop>
whats the best way to create arrays within arrays with only 4 element limit
zzzbra has quit [Ping timeout: 265 seconds]
<Naeblis>
so I am slowly coming to realize. :/
<shevy>
blahwoop don't think youc an easily restrict that
msmith_ has joined #ruby
<blahwoop>
i see
<blahwoop>
im trying to create boggle game
<blahwoop>
and i want to make grides
<shevy>
blahwoop one workaround would be to add to your array through a method and inside that method check; another might be to subclass though people shy away from subclassing Array
<blahwoop>
a grid
msmith_ has quit [Remote host closed the connection]
<wald0>
godd2: i dont think that this is valid for what i want to do, the first fred is a unique identifier and i need to add "entries" (multiple ones) on it, let's say that he can have a different name on each different ip
<godd2>
blahwoop in the command line or a full graphical game?
<blahwoop>
command line
<shevy>
blahwoop ok but you can just initialize the array right?
msmith_ has joined #ruby
<blahwoop>
yup
<blahwoop>
so i have @grid = [[], [], [], []]
<shevy>
ok
<blahwoop>
i am trying to plug in letter objects into each one
fumk has quit [Quit: changing servers]
<blahwoop>
user can put in 16
<shevy>
@grid.freeze
<shevy>
I think
<shevy>
I hate .freeze though
fumk has joined #ruby
msmith_ has quit [Remote host closed the connection]
<godd2>
nah I think he's just having trouble addressing nested elements
<shevy>
but it would freeze that array right?
<shevy>
at 4 elements
msmith_ has joined #ruby
Mateon2 has joined #ruby
Mateon1 has quit [Disconnected by services]
Mateon2 is now known as Mateon1
<godd2>
blahwoop to add elements to the inside arrays, address them like this:
msmith_ has quit [Remote host closed the connection]
<shevy>
blahwoop see! your array would be frozen at 4 members
<blahwoop>
how would it go into the next array
<shevy>
you count
<shevy>
index starts at 0
<godd2>
blahwoop are you using that array as the entire grid or as one row?
<wald0>
i think that users should be an array, not a hash... mmh
<shevy>
so to add to Array nr. 3, you have to deduct 1 from it, so you use [2]
<blahwoop>
as on row
Asher has quit [Quit: Leaving.]
msmith_ has quit [Remote host closed the connection]
<godd2>
wald0 yes it is more sensible to have the list of users be an array where each element is a hash
Asher has joined #ruby
<gomikemike>
i need to get the value after the first "/" of this string: aws-cli/1.6.2 Python/2.6.6 Linux/2.6.32-431.11.2.el6.x86_64
<blahwoop>
okay.
<shevy>
blahwoop also same thing; if you have a pencil you can draw the grid; several Arrays you can access for multiple [0] like [2][1] to add to array at position 3, the second one there
rubie has joined #ruby
<shevy>
gomikemike what do you mean with "value"?
<blahwoop>
looks ugly is there a better way lol
<blahwoop>
ill try that
<gomikemike>
im putting that string (output of command) on a variable awscli
<Linell>
Does anyone have an example of testing an API with minitest and simplecov?
<wald0>
aah, i think that i finally have it working
jimbach has quit [Remote host closed the connection]
<havenwood>
rubie: drop empty parens from methods, so `display` instead of `display()`
<havenwood>
rubie: you can just `puts` instead of `puts " "`
<havenwood>
rubie: seems you have the same if statement twice, but consider switching to a case statement in any case
<shevy>
hmm
ghostmoth has quit [Quit: ghostmoth]
Soda has quit [Remote host closed the connection]
samuel02 has quit [Remote host closed the connection]
<havenwood>
rubie: if you'd like to have them just press a key and not have to hit enter `require 'io/console'` and use `STDIN.getch` instead of `gets` to capture
<godd2>
blahwoop now of course, you'll still have the tedious task of using row and cell indices to check if words are present, but that is one way to represent the grid in ruby
<jheg>
is there an array method that returns true if it contains anything other than nil or false?
msmith_ has joined #ruby
msmith_ has quit [Remote host closed the connection]
siso has quit [Read error: Connection reset by peer]
siso has joined #ruby
RitterJack has quit [Remote host closed the connection]
<havenwood>
jheg: any?
<jheg>
I suppose I could array.empty? == false
<jheg>
ah brilliant thanks havenwood
<blahwoop>
thanks godd2
<blahwoop>
i wish i knew wtf that was doing lol
<rubie>
array.length < 1
<godd2>
jheg array.empty? already returns a boolean. no need to check if it == false
<wald0>
how i can say "if array includes a hash with key1 = foo AND key2 = bar" ?
sambao21 has quit [Quit: Computer has gone to sleep.]
<godd2>
jheg <jheg> I suppose I could array.empty? == false
<rubie>
angryzor: that makes sense, now i can use TOWER[0][1][2] instead of different variables.
<godd2>
that's different from doing array == false
ghr has quit [Ping timeout: 240 seconds]
<havenwood>
!array.empty?
mistermocha has joined #ruby
<havenwood>
or !!!array.empty? if you're feeling emphatic
<jheg>
so if I only had .empty? to work with because for some very strange reason all the methods were off for the day nd I needed to do something if my array wasn’t empty then wouldn’t I writre if array.empty? == false; do something; end
benzrf|offline is now known as benzrf
adriancb has joined #ruby
claymore has quit [Quit: Leaving]
qhartman has joined #ruby
<havenwood>
jheg: no, you'd: unless array.empty?
<jheg>
rather than if array.empty?; do something; end
<jheg>
bloody hell
mjuszczak has quit []
<godd2>
jheg it would make more sense to do !array.empty?
<jheg>
cool thanks for the clarification guys
<wald0>
how i can say "if array includes a hash with key1 = foo AND key2 = bar" ?
<zenspider>
godd2: so? what does block have to do with it?
<zenspider>
or did I misread the question... my_ary.include?(this_hash)
<godd2>
zenspider he wanted to check if the array had at least one hash which included keys
dcunit3d has joined #ruby
<jhass>
that assumes the hash has only these two keys
<godd2>
not just included some hash
<wald0>
mmmh, not sure if im doing it correctly godd2: users.push(hash) unless ( user[:ip] == ip && user[:request] == request )
<zenspider>
he said: 'how i can say "if array includes a hash with key1 = foo AND key2 = bar" ?'
<angryzor>
rubie: yes, i added some more comments below it, adding other improvements step by step
<zenspider>
which I took as: my_ary.include?({key1 => foo, key2 => bar})
tastycode has joined #ruby
it0a has quit [Ping timeout: 265 seconds]
emmesswhy has quit [Quit: Leaving]
User458764 has joined #ruby
<wald0>
mmh, let me try that
<godd2>
wald0 that's getting a little wild. you may want to step back and think about what you're trying to do from a slighlty bigger perspective. you seem to be coding yoruself into a corner
<tastycode>
I would like to rewrite a method that is defined in a module, only in the context of a block. but refine only takes a class :/
<rubie>
angryzor: thanks for doing this
<zenspider>
that looks like you're trying to implement a security model... which you probably shouldn't be doing yourself.
airdeluxe has quit [Remote host closed the connection]
<jhass>
tastycode: yup, you can't really. What are you needing that for?
<angryzor>
np
<wald0>
godd2: i think that my biggest problem is my poor knowledge of ruby (i readed books, but i didn't practiced it much at all)
sambao21 has joined #ruby
<tastycode>
I want something sort of reminiscent of autorelease pool in objective c land, but basically.. i want a temporary in-memory-cache for the duration of a block that intercepts calls to a DB
<godd2>
wald0 lol well no one (almost no one) learns a language over night :P it's okay to not know things yet. by practicing you're learning it :)
<wald0>
aah, seems like hte one of zenspider worked
Linell has quit [Quit: leaving]
<wald0>
godd2: yeah, thats for sure a good step, but is damn frustrating :(
<tastycode>
one thing i could do is use ObjectSpace to list descendants of the included module and refine the classes individually
<wald0>
its like "hell! how i can be so slow! i type other codes just like singing"
<jhass>
tastycode: you could write a decorator that takes a flag to stop forwarding all calls
<jhass>
have a look at SimpleDelegator in delegate stdlib
Lightsword has joined #ruby
<wald0>
in fact, its my first time too with OO style, and this is the hardest part... to think on this way (in fact, im doing my actual ruby code in linear evaluation so.. lol)
<rubie>
angryzor: doesnt the towers in line 1, need to be a constant, otherwise i thought it would be accessable inside a method
workmad3 has joined #ruby
<godd2>
wald0 ruby encourages extraction and abstraction. so you can write things like users.push(hash) unless user.invalid? and then go write the invalid? method for whatever is inside user
<godd2>
plus that reads a ton better
despai has quit [Quit: This computer has gone to sleep]
agjacome has joined #ruby
Mateon1 has quit [Ping timeout: 255 seconds]
fgo_ has joined #ruby
patrick99e99 has joined #ruby
<shevy>
wald0 OOP in ruby is easy if you use classes; of course it gets a bit more complicated when you have to decide inheritance vs. composition; as in subclassing vs. include/extend-ing
St_Marx has quit [Remote host closed the connection]
<angryzor>
rubie: mmhh, yes
<shevy>
wald0 but remember - you are the last man standing in regards to ruby + enlightenment
<shevy>
do not give up!
<angryzor>
rubie: but that's because usually in ruby you don't work with loose methods in the global namespace
<angryzor>
rubie: normally you would wrap those things into a class HanoiGame or something
<rubie>
ahh
govg has joined #ruby
<wald0>
shevy: well, my friend is doing a good work structuring good ruby code to manage these bindings, still in test but looks ok, by other side this little experience make me think that would be much easier and less complex to write it directly in C (im not joking lol)
codecop has quit [Remote host closed the connection]
siso has quit [Quit: siso]
<shevy>
well
<shevy>
ruby is elegant but not simple
<shevy>
it's malleable; like you wish to forge a sword
<wald0>
codecop ? mmh, that dont sounds like a friendly name...
<shevy>
but perhaps also an axe; and a dagger; and a stiletto
<shevy>
with python, you get a great axe
<shevy>
but only a mediocre dagger
fgo_ has quit [Ping timeout: 245 seconds]
<shevy>
because in the factory, there is only one true way - to forge an axe
<shevy>
if you want a dagger you are outside the community
patrick99e99 has quit [Ping timeout: 265 seconds]
<shevy>
at this point everyone will look down at you wald0
<shevy>
do you really want to continue with python?
siso has joined #ruby
mistermocha has quit [Remote host closed the connection]
<eam>
ruby is pretty simple
jobewan has quit [Quit: Leaving]
<rubie>
angryzor: the reason i intially did all the if elsif statements is to kind of make a filter to test the inputs, if the users input passes all those tests then use the else statement to actually change the arrays, that way if the user did enter somethign that would cause an error, the method would return nil and the loop would recycle
geggam has quit [Ping timeout: 240 seconds]
<wald0>
ips += ip, why this not works ?
<wald0>
oh duh
* wald0
hides
<boombadaroomba>
Anyone have experience using devise?
<jhass>
wald0: in many cases you want to use << instead of +=
<godd2>
+ concatenates arrays, it doesn't append the array
<angryzor>
usually when you see a chain of if-else statements it's a sign of bad code design, and they can be changed into one of these: a series of possible exception raises, a new abstraction for 'filters' that you keep in an array and iterate over to check if they all pass, or a switch statement
<shevy>
wald0 what is ips ?
deric_skibotn_ has joined #ruby
<zenspider>
rubie: the only thing I'd change about angryzor's excellent suggestions is the exceptions.
<godd2>
boombadaroomba #rubyonrails will be better able to help you with questions about devise
<zenspider>
instead of: raise RuntimeError.new('Please enter something') if X
<zenspider>
first: raise RuntimeError, 'Please enter something' if X
baweaver has quit [Remote host closed the connection]
<zenspider>
second: raise ArgumentError, 'Please enter something' if X
deric_skibotn has quit [Ping timeout: 240 seconds]
deric_skibotn_ is now known as deric_skibotn
<wald0>
shevy: nope, in ruby you can also do only a mediocre axe (and a dagger), but not a stiletto
<wald0>
see my case
<boombadaroomba>
godd2: sorry, i thought i was there :(
govg has quit [Ping timeout: 240 seconds]
<boombadaroomba>
my apolgies
<wald0>
i cannot do decent gui applications easly :P
mistermocha has joined #ruby
<godd2>
boombadaroomba that's okay, we're used to pointing people in that direction :)
<zenspider>
I think I'd also go ahead and do `if to.nil? or from.nil?` => `unless to and from`
<angryzor>
zenspider: can you explain to me what the difference is between the passing the raise class and creating a new instance? i used to use the former before it gave some problems in a recent project at work
<angryzor>
and the documentation is kind of unclear
<angryzor>
*exception class
pandaant has quit [Remote host closed the connection]
<wald0>
vim users: how i can run my code directly from vim and view the results in a "splitted tab" ? my wrist hurst from so much alt-tab to switch terminal
koderok has joined #ruby
<zenspider>
the syntax allows for `raise msg` and `raise cls, msg`. The former defaults to raising RuntimeError. The latter is equiv to `raise cls.new(msg)`
koderok has quit [Remote host closed the connection]
<angryzor>
strange, i'm sure i had some trouble with it somehow but i can't remember what exactly
blackmesa has joined #ruby
<angryzor>
it lost some information
<zenspider>
you might have if you subclassed an exception and overrode initialize w/ a different arity
dseitz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zenspider>
or non-string or something
axl_ has quit [Quit: axl_]
<angryzor>
aaaaah that was it yes
<angryzor>
of course
axl_ has joined #ruby
axl_ has quit [Client Quit]
Kricir has quit [Remote host closed the connection]
charliesome has joined #ruby
* wald0
see's shevy in silent mode..
St_Marx has joined #ruby
drewvanstone has quit [Ping timeout: 258 seconds]
Kabaka has quit [Ping timeout: 250 seconds]
<zenspider>
angryzor: in which case, you could call super w/ fixed args
baweaver has joined #ruby
<shevy>
wald0 no, you need to wish to forge a katana
<tastycode>
How can you refine a class method?
<godd2>
tastycode monkey patch it?
<tastycode>
:'
Kabaka has joined #ruby
gomikemike has quit [Ping timeout: 240 seconds]
<godd2>
tastycode what do you mean by 'refine'?
<tastycode>
e.g. i have a method User.get(2), i want to temporarily change out #get for the scope of a block
djbkd has quit [Remote host closed the connection]
<shevy>
I don't like the syntax
<tastycode>
ideally it would be “module Meow; refine User; def self.get(2); puts “refined!”; super; end; end; end” “using Meow; User.get(2)” .. but that doesn’t seem to work
jottr has quit [Ping timeout: 244 seconds]
gccostabr has quit [Quit: ZZZzzz…]
<angryzor>
zenspider: i see, thanks :)
NoNMaDDeN has quit [Remote host closed the connection]
econerd4ever has quit [Remote host closed the connection]
<godd2>
shevy ah okay I like it. a bit more functional that way
momomomomo has quit [Ping timeout: 265 seconds]
<tastycode>
ahh.. i could just refine the singleton class!
momomomomo has joined #ruby
<shevy>
godd2 oh, I like the original idea behind it, I just don't like that implementation they went for
<claw>
anybody can help me with confusion about resque workers ?
<shevy>
the C code is funny though
<shevy>
if (prev_frame_func()) { rb_raise(rb_eRuntimeError, "Module#using is not permitted in methods"); }
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
jimmyy has joined #ruby
jimmyy has quit [Max SendQ exceeded]
<wald0>
shevy: i need a katana, but i dont have the time to make it myself (and hte experience to make a GOOD one)
devdazed has quit [Quit: Computer has gone to sleep.]
<wald0>
s/make/forge/
djbkd has joined #ruby
<shevy>
ok
jimmyy has joined #ruby
byprdct has quit [Ping timeout: 240 seconds]
<shevy>
then simply improve the C code
<shevy>
and be done with it
<shevy>
no more ruby for you
freerobby has joined #ruby
<waxjar>
wonder why they went with "patched" over "refined", now you've got two terms :/
<shevy>
translating C into Ruby leads to awfulness like ncurses
<shevy>
waxjar no idea!
econerd4ever has joined #ruby
<shevy>
I think they should rethink the complete mechanism from the get go
<shevy>
for ruby 3.0
<shevy>
AND then we have a python2->3 split too :>
krisquigley has joined #ruby
<godd2>
shevy let's just make a fork called shevruby!
jlast has joined #ruby
<shevy>
my name does not translate well into a programming language
<waxjar>
nah, refinements are still experimental-ish.
<waxjar>
right?
<shevy>
yeah
<zenspider>
yup
<zenspider>
a failed experiment imho... but *shrug*
byprdct has joined #ruby
<shevy>
that's the thing the blog author did not understand I think:
<shevy>
"I don?t know what the reasons are for going to such lengths to make this really hard to achieve."
<shevy>
"I?d love to be enlightened by any obliging reader, and to understand the reasoning behind restricting things so much, because for all the guns Ruby gives you to hang yourself, this is the first time I?ve not been able to shoot myself in the foot."
<wald0>
shevy: but i like ruby :/ thats why i want to use it (and learned it), c is much looonger to write and time wasting
ndrei_ has quit [Ping timeout: 265 seconds]
<shevy>
good
<shevy>
now you must think in the ruby way
ndrei has quit [Ping timeout: 265 seconds]
<shevy>
wald0 see the C code as happy objects that say "papa wald0, let us out! we wanna get a real boy!"
adriancb has quit [Remote host closed the connection]
sambao21 has quit [Quit: Computer has gone to sleep.]
<wald0>
so what this means shevy ? :P
<angryzor>
rubie: gonna leave it at this, i still have some work to do. hope it's helpful though
<shevy>
do not try to understand - try to let ruby flow
keen___________6 has joined #ruby
momomomomo has quit [Quit: momomomomo]
<rubie>
angryzor: thanks this is really helpful
Xeago has joined #ruby
mistermocha has quit [Remote host closed the connection]
<angryzor>
yw
<wald0>
shevy: yeah well, but i still cannot make good gui apps using ruby
keen___________5 has quit [Ping timeout: 250 seconds]
<godd2>
wald0 you *can*, but I don't know if I'd recommend it
krisquigley has quit [Ping timeout: 245 seconds]
<wald0>
FFI is harder to understand than plain C, and trying to use something that has a structure made for C in ruby is another story
<shevy>
wald0 did you have a look at ruby-gnome?
<wald0>
is like trying to make babbies from elephants and watermelons
mhi^ has quit [Ping timeout: 244 seconds]
<angryzor>
rubie: lol, i derped, lemme fix my mistake
lmickh has quit [Remote host closed the connection]
<angryzor>
rubie: ok, fixed
mistermocha has joined #ruby
<rubie>
thanks again
n_blownapart has joined #ruby
yfeldblum has quit [Remote host closed the connection]
andrewlio has quit [Quit: Leaving.]
yfeldblum has joined #ruby
mikepack has quit [Remote host closed the connection]
blahwoop has quit [Remote host closed the connection]
josephndenton has joined #ruby
<wald0>
godd2: it is for sure not so bad for small things, but bigger things like a full gui control which has a ton of callbacks and function talking each others is like... damn
ghr has joined #ruby
<rubie>
angryzor: and anyone else who read his revisions. I'm just wondering about raising the argument errors. By raising them it causes the game to "crash" wouldn't it be better to just let the user know why he made a mistake and give him another change to enter something correct. What is the advantage of raising an ArgumentError?
<rubie>
give him another chance* to enter something correct
<angryzor>
it doesn't actually crash the game, that is what the begin ... rescue ... end statement is for
<angryzor>
ooooh
<angryzor>
did i derp again
<angryzor>
yeah
<angryzor>
wait
<rubie>
ahh
josephndenton has quit [Ping timeout: 240 seconds]
<shevy>
wald0 what if you are aiming too big?
Synthead has joined #ruby
tus has joined #ruby
<shevy>
I mean you could do a few other pure ruby projects which surely would be a lot easier, and you'd still learn a lot
<angryzor>
i had changed the type of the exceptions to ArgumentError as zenspider suggested but forgot to change the rescue .... => e line as well
<wald0>
shevy: i always aim too big
ghr has quit [Ping timeout: 255 seconds]
Musashi007 has joined #ruby
<angryzor>
when you raise an error
<angryzor>
it returns from the current function and keeps travelling up the tree of called functions until it either hits the boundaries of your program or it is caught by a rescue statement
<angryzor>
so that's why there is a begin ... rescue
mistermocha has quit [Remote host closed the connection]
<angryzor>
it stops the exception from crashing your program and instead allows you to inspect it
fabrice31 has joined #ruby
<angryzor>
and read the error message
<angryzor>
so you can show it to your user in a user friendly way
<godd2>
"Something went wrong. :( It was probably your fault. :("
<angryzor>
raise PebkacError
<zenspider>
angryzor: default rescue will catch both ArgumentError and most PebkacErrors :)
msmith_ has joined #ruby
volty has joined #ruby
<godd2>
>> class PebcakError < RuntimeError; end; raise PebcakError, "Something went wrong. :( It was probably your fault :("
<eval-in__>
godd2 => Something went wrong. :( It was probably your fault :( (PebcakError) ... (https://eval.in/224856)
<shevy>
man
<shevy>
czech errors
msmith_ has quit [Remote host closed the connection]
sivoais has quit [Ping timeout: 264 seconds]
<benzrf>
problem exists between chair and keyboard
<workmad3>
godd2: I always spelt it Pebcak
butblack has joined #ruby
freerobby has quit [Quit: Leaving.]
fabrice31 has quit [Ping timeout: 255 seconds]
<benzrf>
er, problem exists between chair and keyboard
<benzrf>
fug
<benzrf>
er, problem exists between chair and keyboard
<godd2>
workmad3 er, did I spell it differently?
<workmad3>
benzrf: :D
<workmad3>
godd2: oh... sorry, it was zenspider who did Pubkac
<workmad3>
*Pebkac
jottr has quit [Ping timeout: 245 seconds]
<godd2>
problem undulates between keyboard and chair
jmdade has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
treehug88 has quit []
<angryzor>
:')
<graft>
blech... python installations are not as easy to manage as ruby installations
<godd2>
havenwood hehe can't wait til he makes induce, deduce, and secude
<godd2>
oops, seduce
DLSteve_ has quit [Quit: Leaving]
nobitanobi has quit [Remote host closed the connection]
n_blownapart has quit []
<parabolize>
graft: What is wrong with pip?
henesy has joined #ruby
benzrf is now known as benzrf|offline
benzrf|offline is now known as benzrf
fgo_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
sud0x has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
mary5030 has joined #ruby
<sud0x>
hey guys, trying to figure out how to parse thru an array of elements, remove one that is not true and pass them as an argument to a function. Can someone give me some tips here? Current code: https://gist.github.com/anonymous/736b28f062437caf854d