<r0bglees0n>
robert_: construct() requires at least 3 args, you pass 1, line 11.
adeponte has quit [Ping timeout: 268 seconds]
<robert_>
oh
thatRD has quit [Ping timeout: 256 seconds]
<robert_>
I think I see.
intuxicated has quit [Ping timeout: 240 seconds]
smathieu has joined #ruby
popl has joined #ruby
<robert_>
okay, nevermind. I got it. :D
djdeluxe76 has joined #ruby
ferdev has quit [Quit: ferdev]
intuxicated has joined #ruby
djdeluxe76 has quit [Client Quit]
djdeluxe76 has joined #ruby
Deele has quit [Ping timeout: 240 seconds]
GeissT has joined #ruby
djdeluxe76 has quit [Client Quit]
gildo has quit [Ping timeout: 245 seconds]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
smathieu has quit [Ping timeout: 264 seconds]
chihhsin has quit [Ping timeout: 240 seconds]
devoldmx has joined #ruby
havenwood has quit [Remote host closed the connection]
speakoftrees has joined #ruby
<speakoftrees>
hello
JZTech101 has quit [Ping timeout: 276 seconds]
<r0bglees0n>
hey speakoftrees
devoldmx3 has quit [Ping timeout: 268 seconds]
<speakoftrees>
i'm new to ruby. i'm interested in learning to program, and also interested in android development. i'm wondering if any of you use ruby to program for android, like with ruboto, or if you use the android sdk. also just curious what most of you use ruby for. total n00b. here :)
<Andrevan>
most people probably use ruby for rails
myu has joined #ruby
apeiros has joined #ruby
<Andrevan>
I've also used it for puppet/chef (dev ops provisioning), gosu (games), etc
<speakoftrees>
i'm going through the ruby on rails 2nd edition tutorial right now. the i was looking at the eloquent ruby book next i think. a good place to start?
<r0bglees0n>
speakoftrees: if you want to develop on android, i wouldnt recommend ruby as a first choice. it's not a first class citizen on android, and you'll probably have more success with Java; that said, jruby is ruby built on the JVM and it can talk to Java APIs, it might be a good mix to blend the two (learning Java/JVM APIs/Android/Ruby)
<r0bglees0n>
also, adopting the JVM platform exposes you to jruby, clojure, scala..
<r0bglees0n>
it has some nice/interesting langs now
Alaude has joined #ruby
xcv has joined #ruby
<speakoftrees>
thanks, r0bglees0n. for some reason i've just really taken to the "vibe" of the ruby community. there's also a healthy dose of companies that use rails here in portland it seems like, so i've gravitated toward it. i definitely want to look at java too. i have heard a lot of good things about scala.
<speakoftrees>
what's a good resource for "adopting the jam platform?"
<speakoftrees>
jvm, sorry
<speakoftrees>
java virtual machine right?
apeiros has quit [Ping timeout: 268 seconds]
<Andrevan>
yeah so jvm is a platform that ruby can run on also
<Andrevan>
see JRuby
<r0bglees0n>
eh dont take what i said too literally, yeah the java virtual machine - if you invest in it, it opens up a few language choices & there's inter-op between them.
<r0bglees0n>
by invest I mean, learn Java, or use Java APIs from jruby
<r0bglees0n>
something that got you involved in using it everyday
<robert_>
how would I call a method in another scope with arguments?
<speakoftrees>
ok i see thanks
bradhe has joined #ruby
<r0bglees0n>
robert_: by calling the method on the appropiate receiver, sorry, but the question can't have a better answer.
<r0bglees0n>
robert_: in your example, because of instance_eval, the receiver is the class.
<robert_>
"ArgumentError at /: wrong number of arguments (1 for 0)"
<r0bglees0n>
so 'self' is equal to your class/module
eoinkelly has quit [Quit: eoinkelly]
<r0bglees0n>
that error has nothing to do with scope of method calls
<robert_>
yeah, I'm trying to wire up a method_missing for my class now
<r0bglees0n>
you have to provide more information
<r0bglees0n>
method_missing won't help
<r0bglees0n>
the method is found
<r0bglees0n>
you just dont pass enough arguments
Kricir has joined #ruby
<r0bglees0n>
as said, construct() takes at least 3 args
<r0bglees0n>
also, if you call construct() inside construct() what do you think will happen?
bradhe has quit [Ping timeout: 240 seconds]
<r0bglees0n>
you'll go into infinite recursion
Shirakawasuna has joined #ruby
iliketurtles has joined #ruby
ffio_ has joined #ruby
<speakoftrees>
thanks for the advice. will be checking back in i'm sure!
zigomir_ has quit [Ping timeout: 245 seconds]
BRMatt has quit [Ping timeout: 245 seconds]
ffio has quit [Ping timeout: 264 seconds]
Kricir has quit [Ping timeout: 264 seconds]
cj3kim has joined #ruby
Shirakawasuna has quit [Client Quit]
gz0 has quit [Ping timeout: 245 seconds]
bradsmith has joined #ruby
zachrab_ has quit [Remote host closed the connection]
cj3kim has quit [Ping timeout: 240 seconds]
Shirakawasuna has joined #ruby
jarin has joined #ruby
ehaliewicz has quit [Ping timeout: 264 seconds]
Shirakawasuna has quit [Read error: Connection reset by peer]
yfeldblum has quit [Ping timeout: 264 seconds]
<robert_>
r0bglees0n: it's okay if I mock up the data in a real use-case, right?
Shirakawasuna has joined #ruby
n_blownapart has quit [Remote host closed the connection]
byprdct has joined #ruby
razi has quit [Ping timeout: 240 seconds]
tommyvyo has quit [Quit:]
larissa has quit [Quit: Leaving]
goleldar has joined #ruby
hackeron_ has joined #ruby
brennanMKE has quit [Read error: Connection reset by peer]
<r0bglees0n>
robert_: what are you doing?
hackeron has quit [Ping timeout: 248 seconds]
goleldar has quit [Ping timeout: 264 seconds]
<robert_>
r0bglees0n: trying to get back to the point where it errors so you can see in non-web code what's going on.
devoldmx3 has joined #ruby
myu has left #ruby ["Leaving"]
<r0bglees0n>
ok, well, i dont know what 'mock up the data in a real use-case' means, but probably not ok no
devoldmx has quit [Ping timeout: 256 seconds]
<Andrevan>
I think he just means he wants to show you the code but not with the production data
<robert_>
exactly
<robert_>
it's fake data
thomasle_ has quit [Read error: Connection reset by peer]
<robert_>
but formatted such that it would pass if it were real.. if that makes any sense.
thomasl__ has joined #ruby
gz0 has joined #ruby
<Andrevan>
that is probably fine robert_
<robert_>
sweet. :D
<r0bglees0n>
i think that fine too
<r0bglees0n>
are you under NDA?
speakoftrees has quit [Quit: speakoftrees]
<r0bglees0n>
if you are you probably shouldnt be sharing this code
JZTech101 has joined #ruby
zachrab_ has joined #ruby
pkh has quit [Ping timeout: 264 seconds]
`Chris` has quit [Read error: Connection reset by peer]
goleldar has joined #ruby
`Chris` has joined #ruby
<goleldar>
Is it more common to use private or protected in Ruby active record models?
Alaude_ has joined #ruby
<r0bglees0n>
goleldar: #rubyonrails probably has a good answer if no one here knows, there's some Rails-specific guidelines regarding that iirc
pkh has joined #ruby
Alaude has quit [Ping timeout: 256 seconds]
<goleldar>
r0bglees0n: thanks :) I'll try there
<r0bglees0n>
goleldar: in ruby, private is generally used over protected. may be opposite in rails.
<r0bglees0n>
where "private" belongs to the framework
<r0bglees0n>
and protected belongs to private application code
<r0bglees0n>
the distinction is pretty.. i donno, just a guideline :)
<r0bglees0n>
if ppl understand it it makes sense
xcv has quit [Remote host closed the connection]
VegBerg has quit [Remote host closed the connection]
<r0bglees0n>
goleldar: btw the distinction between protected & private is pretty subtle in ruby, which is why people just use private when something isn't part of the public interface.
<epitron>
private helps documentation
<epitron>
i don't see the point of protected
<epitron>
ruby has no real security constraints
<epitron>
Object.send(:secret_method)
VegBerg has joined #ruby
iliketurtles has quit [Quit: zzzzz…..]
<kaspergrubbe>
epitron: most languages I can think about allows you to invoke private methods from the outside. an example is C# and Java with reflection.
<kaspergrubbe>
but with Ruby it is stupidly simple :)
<epitron>
EYJAFJÖLL, ICELAND — Java programmers around the globe are in a panic today over a Wikileaks press release issued at 8:15am GMT. Wikileaks announced that they will re-release the source code for thousands of Open Source Java projects, making all access modifiers 'public' and all classes and members non-'final'.
cads has joined #ruby
<Andrevan>
LOL
<popl>
That's sort of off-topic.
<epitron>
chillax, this is just #ruby
<epitron>
;)
wesside has quit [Quit: Computer has gone to sleep.]
robustus has joined #ruby
Alaude has joined #ruby
Alaude_ has quit [Ping timeout: 264 seconds]
bleubeard has joined #ruby
gyre007 has quit [Remote host closed the connection]
bleubeard has quit [Remote host closed the connection]
thomasl__ has quit [Read error: Connection reset by peer]
ner0x has joined #ruby
Alaude_ has joined #ruby
Alaude has quit [Ping timeout: 245 seconds]
mary5030 has quit [Remote host closed the connection]
Kricir has joined #ruby
peterdecroos has joined #ruby
mtvee has joined #ruby
mtvee has left #ruby [#ruby]
<robert_>
r0bglees0n: nevermind! I got it. It's just me being an idiot. :D
Kricir has quit [Ping timeout: 268 seconds]
DonRichie has quit [Quit: Verlassend]
sepp2k1 has quit [Read error: Connection reset by peer]
Alaude_ has quit [Ping timeout: 240 seconds]
havenwood has joined #ruby
Alaude has joined #ruby
Lewix has quit [Ping timeout: 264 seconds]
joshsmith has quit [Quit: joshsmith]
Spami has quit [Quit: This computer has gone to sleep]
Alaude has quit [Remote host closed the connection]
cj3kim has joined #ruby
jonahR has quit [Ping timeout: 264 seconds]
Lewix has joined #ruby
Lewix has quit [Changing host]
Lewix has joined #ruby
<r0bglees0n>
robert_: glad to hear you figured it out
<robert_>
I had the right context, but was using it at the wrong time, I think.
freerobby has joined #ruby
devoldmx has joined #ruby
<r0bglees0n>
cool
<robert_>
yeah
<r0bglees0n>
:)
<r0bglees0n>
ruby 0, robert_ 1
<robert_>
indeed. :D
jonahR has joined #ruby
<robert_>
I had the old self, but wasn't paying attention to how I wanted to use it.
freerobby has quit [Client Quit]
zachrab_ has quit [Remote host closed the connection]
<robert_>
so now the blocks fall through to padrino as expected.
<r0bglees0n>
well, in the code you pasted there wasn't an old self, just one self, which you instance_eval'ed through and tried to recursively call the same method
cj3kim has quit [Ping timeout: 245 seconds]
<r0bglees0n>
cool
<robert_>
I'll show oyu where I was running into issues
DonRichie has quit [Read error: Connection reset by peer]
<robert_>
yeah my tabs are off, but that's because of my editor, lol
<r0bglees0n>
well cool
<r0bglees0n>
bit hard to read
<r0bglees0n>
but cool
devoldmx3 has quit [Ping timeout: 240 seconds]
Alaude has quit [Ping timeout: 264 seconds]
<robert_>
r0bglees0n: yeah, sorry. Lines 52 - 80.
Alaude has joined #ruby
yfeldblum has joined #ruby
freerobby has joined #ruby
<r0bglees0n>
i see ok
<robert_>
r0bglees0n: I had (block).call there before, so it was getting bound to Factory and not whatever class/scope the caller is.
The-Mad-Pirate has quit [Read error: Connection reset by peer]
brennanMKE has joined #ruby
<robert_>
r0bglees0n: it's all good now. :D
Alaude_ has joined #ruby
Alaude has quit [Ping timeout: 268 seconds]
gyre007 has joined #ruby
Alaude has joined #ruby
Alaude_ has quit [Ping timeout: 240 seconds]
tgunr has quit [Quit: Nity nite]
echevemaster has quit [Quit: Leaving]
CaptainLex has joined #ruby
johnkary has joined #ruby
<CaptainLex>
I cloned a Rails app from GitHub to a computer with a fresh rails install and am reinstalling all the gems -- bundler isn't working. Every time it tries to install a new gem, it says there's an error and asks to make sure installing them gem with gem install works
<CaptainLex>
Every time it does
<CaptainLex>
Have I got bundler hooked up wrong or some such a thing, potentially?
nignaztic has quit [Read error: Connection reset by peer]
<havenwood>
CaptainLex: Rails channel is #RubyOnRails, but depending on your setup you may need to prefix your command with `bundle exec`.
Alaude has quit [Ping timeout: 264 seconds]
<CaptainLex>
havenwood: Oh, is Bundler a rails-only sort of deal? Sorry about that. And thanks for the tip!
<havenwood>
CaptainLex: Bundler isn't rails-only. Certain bundler issues come up commonly in Rails.
<CaptainLex>
Ah, okay, thanks!
intuxicated has quit [Quit: Leaving]
havenwood has quit [Ping timeout: 240 seconds]
Alaude_ has joined #ruby
camio has quit [Quit: Leaving.]
tommyvyo has joined #ruby
cads has quit [Ping timeout: 245 seconds]
baroquebobcat has joined #ruby
justsee has joined #ruby
arya_ has joined #ruby
thomaslee has quit [Read error: Connection reset by peer]
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
sevenseacat has joined #ruby
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
jetblack has quit [Quit: leaving]
cads has joined #ruby
tommyvyo has quit [Quit:]
jellosea has joined #ruby
<jellosea>
hey how do i insert a datetime into a sqlite3 db
<jellosea>
it says can't prepare DateTime (RuntimeError)
<jellosea>
haha i thought i remembered something that like
<jellosea>
thatnks
<bnagy>
np
arya_ has joined #ruby
pen has quit [Remote host closed the connection]
sanav has joined #ruby
jonathanwallace has joined #ruby
vikhyat has quit [Read error: Connection reset by peer]
Bosox20051 has joined #ruby
jetblack has joined #ruby
Neomex has joined #ruby
Neomex has quit [Client Quit]
Kricir has joined #ruby
optimusprimem has quit [Excess Flood]
jetblack has quit [Client Quit]
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
optimusprimem has joined #ruby
<sanav>
i'm trying to install rails on windows (64 bit) but i encounter some dependencies problem .Please resolve my problem http://pastebin.com/MSjy450Y
Bosox20051 has quit [Changing host]
Bosox20051 has joined #ruby
<zendeavor>
sanav: libraries and/or headers. Check the mkmf.log file for more details. You may
<zendeavor>
did you check the mkmf.log file for more details
optimusprimem has quit [Excess Flood]
<sanav>
zendeavor: no .Ok , wait
jetblack has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
optimusprimem has joined #ruby
Kricir has quit [Ping timeout: 240 seconds]
optimusprimem has quit [Excess Flood]
<epitron>
the ABC's of rubygems:
<epitron>
A - Always
<epitron>
B - Be
<epitron>
C - Checking the mkmf.log file for more details
<pontiki>
*snerk*
optimusprimem has joined #ruby
optimusprimem has joined #ruby
optimusprimem has quit [Changing host]
<pontiki>
ABCtmffmd
<epitron>
:)
<epitron>
it just rolls off the tongue
<pontiki>
or the palate
<sevenseacat>
lol
<pontiki>
i am tired
thomasle_ has quit [Remote host closed the connection]
arya_ has quit [Ping timeout: 245 seconds]
arya_ has joined #ruby
optimusprimem has quit [Excess Flood]
joshsmith has joined #ruby
gnuyoga has joined #ruby
wesside has joined #ruby
n_blownapart has quit [Remote host closed the connection]
VegBerg has quit [Remote host closed the connection]
cj3kim has joined #ruby
Nisstyre has quit [Quit: Leaving]
<sanav>
Hehe ...i founded "mkmf.txt" but i can't find mkmf.log .Its stupid but can you please tell me exact location of log file so that i can tell you.Sorry for asking stupid question .
adeponte has joined #ruby
Bandu has quit [Quit: Page closed]
<kaspergrubbe>
sanav: mkmf.txt is probably the file that you are looking for
<sanav>
kaspergrubbe: ok
osvico has quit [Ping timeout: 256 seconds]
<r0bglees0n>
we're dealing with the complexixities of software and i'm full of shit
<bnagy>
it's trying to compile a trivial test program and failing
<kaspergrubbe>
sanav: it looks like a sanity check for the compiler
<bnagy>
not sure why though
adeponte has quit [Read error: Connection reset by peer]
<bnagy>
have you installed any other native gems?
freerobby has quit [Quit: Leaving.]
<sanav>
bnagy: yes , many
adeponte has joined #ruby
cj3kim has quit [Ping timeout: 264 seconds]
<sanav>
bnagy: like postgres
<sanav>
bnagy: it means i have to reinstall devkit
<bnagy>
maybe search around and see if anyone else has had the same problem with that particular gem with 2.0 and devkit on windows then
<bnagy>
well my first hypothesis would be a dodgy gem
<bnagy>
but who knows
<sanav>
bnagy: yes
<bnagy>
devkit is a bit voodoo
<sanav>
bnagy: i agree
<r0bglees0n>
computers are voodoo
<r0bglees0n>
how do they work
<voltagex>
there will be another config.log from the mingw compiler
<voltagex>
and it will have the real error
<voltagex>
failing that, pastebin the whole log
Bosox20051 has joined #ruby
bjeanes has quit [Ping timeout: 245 seconds]
tommyvyo has joined #ruby
zeropx has quit [Quit: has left the room … Or did he?]
matti has quit [Quit: Oh dear...]
dhruvasagar has quit [Ping timeout: 276 seconds]
bjeanes has joined #ruby
ewnd9 has joined #ruby
vlad_starkov has joined #ruby
Lewix has quit [Remote host closed the connection]
forgot has joined #ruby
Inside has joined #ruby
<Inside>
Why does the ruby syntax have the use of => in a rescue clause?
<Inside>
isn't => for dictionaries?
<Inside>
key/val thing
CaptainLex has quit [Ping timeout: 246 seconds]
<bnagy>
it's just syntax
gnuyoga has quit [Quit: gnuyoga]
optimusprimem has joined #ruby
rodacato has quit [Remote host closed the connection]
<Inside>
Yeah, but surely it stands for something
<Inside>
or some rationale for it
vlad_starkov has quit [Remote host closed the connection]
<zendeavor>
rationale is academic, otherwise meaningless
<bnagy>
I dunno.. cause it looks like a little arrow?
<bnagy>
I think you're thinking about this too hard
vikhyat has joined #ruby
sanav has quit [Ping timeout: 250 seconds]
gnuyoga has joined #ruby
optimusprimem has quit [Ping timeout: 245 seconds]
IceDragon has quit [Quit: Space~~~]
<Inside>
I'm just trying to think where else => is used
<Inside>
and it's just there and in key=>value pairing, no/
`Chris` has quit [Ping timeout: 268 seconds]
JZTech101 has quit [Quit: Bye]
<bnagy>
afaik, and as the last 66% of the spaceship operator :)
bjeanes has quit [Quit: quitting]
freerobby has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
<pontiki>
me, i'm awfully fond of the name: "Hashrocket" :)
* Inside
pokerfaces.
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ssvo has quit [Ping timeout: 245 seconds]
freerobby has quit [Ping timeout: 245 seconds]
noop has joined #ruby
noop has quit [Client Quit]
noop has joined #ruby
swistak35 has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
ehaliewicz has joined #ruby
swistak35 has joined #ruby
Kricir has quit [Ping timeout: 264 seconds]
gnuyoga has quit [Quit: gnuyoga]
Lewix has joined #ruby
Lewix has joined #ruby
The-Mad-Pirate has quit []
BadQuanta has quit [Quit: Leaving]
Tarential has quit [Excess Flood]
heftig has quit [Quit: Quitting]
Tarential has joined #ruby
bradsmith has quit [Remote host closed the connection]
Senjai has quit [Read error: Operation timed out]
vikhyat has quit [Remote host closed the connection]
cj3kim has joined #ruby
`Chris` has joined #ruby
guns has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
gyre007 has joined #ruby
jrp has joined #ruby
<jrp>
I have a really random question. Im trying to reliably exploit a race condition, and I need a client's connect() to take a while. Is there any way using ruby I can just make a tcp handshake... slower?
`Chris` has quit [Ping timeout: 268 seconds]
<jellosea>
jrp: just use a wait?
<jellosea>
sleep
gyre007 has quit [Read error: Connection reset by peer]
nathancahill has quit [Quit: nathancahill]
gyre007 has joined #ruby
jellosea has left #ruby [#ruby]
milesforrest has joined #ruby
<jrp>
but that wont delay connect(), right?
Alaude has joined #ruby
<milesforrest>
what's the difference between #ruby and #ruby-lang?
<bnagy>
jrp: only way I can think of is to do the handshake manually ( offhand )
<bnagy>
milesforrest: #ruby-lang is the official channel, but it requires nick registration
<bnagy>
in effect that means that this channel gets more people, higher SNR, more activity, but is less suited to deeply technical questions about the language itself
peterdecroos has quit [Remote host closed the connection]
jonahR has quit [Ping timeout: 256 seconds]
`Chris` has joined #ruby
<jrp>
bnagy: thats kinda what i figured, was hoping it wasnt the case
<jrp>
thanks
Alaude_ has quit [Ping timeout: 264 seconds]
<bnagy>
jrp: you can use the Socket class to drop raw packets onto the wire
<bnagy>
you don't need to mess with the C or anything
<milesforrest>
bnagy: ah, thanks :)
<jrp>
bnagy: i think that might be more work than its actually worth. I can get it by just spamming it a lot, but was hoping to make it deterministic
sailias has joined #ruby
freerobby has joined #ruby
baroquebobcat has joined #ruby
ananthakumaran has joined #ruby
<bnagy>
I guess it depends where the race is
jonahR has joined #ruby
rezzack has joined #ruby
<bnagy>
like, I'm assuming just leaving the acceptor half-open isn't going to be enough :P
wesside has quit [Quit: Computer has gone to sleep.]
<jrp>
yeah, i dont think so
dhruvasagar has joined #ruby
<bnagy>
but it could be interesting to mess with
Shirakawasuna has quit [Quit: Leaving]
<bnagy>
there are tools that are much better suited to that just for testing though
<jrp>
racket seems to be the answer im finding via google
<bnagy>
for pure spam?
vikhyat has joined #ruby
freerobby has quit [Ping timeout: 268 seconds]
<bnagy>
oh.. hm that's not what I thought at all
<jrp>
also packetfu
wesside has joined #ruby
<bnagy>
yeah or just netcat I'd imagine
<bnagy>
or crappy
<bnagy>
I mean scapy
spidergears_ has quit [Remote host closed the connection]
<jrp>
yeah, i googled for scapy equivs
spidergears_ has joined #ruby
Megtastique has quit [Quit: Megtastique]
three18ti has quit [Read error: Connection reset by peer]
platforms has quit [Ping timeout: 264 seconds]
three18ti has joined #ruby
brennanMKE has quit [Remote host closed the connection]
JimmyNeutron has joined #ruby
tkuchiki has joined #ruby
fridim_ has quit [Read error: Operation timed out]
johnkary has quit [Quit: @johnkary]
tkuchiki has quit [Ping timeout: 264 seconds]
crazysim has quit [Excess Flood]
crazysim has joined #ruby
adeponte has quit [Remote host closed the connection]
`Chris` has quit [Read error: Connection reset by peer]
cads has quit [Ping timeout: 264 seconds]
vlad_starkov has joined #ruby
`Chris` has joined #ruby
gnuyoga has joined #ruby
platforms has joined #ruby
tkuchiki has joined #ruby
three18ti has quit [Read error: Connection reset by peer]
three18ti has joined #ruby
browndawg has joined #ruby
axeman- has joined #ruby
vlad_starkov has quit [Ping timeout: 264 seconds]
c3l has joined #ruby
akashj87 has joined #ruby
browndawg has quit [Client Quit]
BizarreCake has joined #ruby
Alaude_ has joined #ruby
Alaude has quit [Ping timeout: 264 seconds]
twer has joined #ruby
endash has quit [Quit: endash]
lethjakman has quit [Ping timeout: 264 seconds]
c3l has quit [Ping timeout: 240 seconds]
lethjakman has joined #ruby
tomzx_mac has quit [Ping timeout: 240 seconds]
axeman- has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
crazysim has quit [Excess Flood]
tommyvyo has quit [Quit:]
decoponio has joined #ruby
Myrth has left #ruby [#ruby]
crazysim has joined #ruby
Kricir has joined #ruby
crazysim has quit [Excess Flood]
crazysim has joined #ruby
platforms has quit [Ping timeout: 264 seconds]
CaptainLex has joined #ruby
bleubeard has joined #ruby
axeman- has quit [Ping timeout: 264 seconds]
crazysim has quit [Max SendQ exceeded]
Alaude_ has quit [Ping timeout: 256 seconds]
axeman- has joined #ruby
Alaude has joined #ruby
crazysim has joined #ruby
Kricir has quit [Ping timeout: 268 seconds]
_seanc_ has quit [Quit: _seanc_]
crazysim has quit [Ping timeout: 245 seconds]
Andrevan has quit []
heftig has joined #ruby
eldariof has joined #ruby
_seanc_ has joined #ruby
crazysim has joined #ruby
platforms has joined #ruby
tvw has joined #ruby
NealJ has quit [Quit: :c]
CaptainLex has quit [Ping timeout: 246 seconds]
axeman- has quit [Ping timeout: 276 seconds]
axeman- has joined #ruby
Alaude has quit [Ping timeout: 264 seconds]
bradsmith has joined #ruby
Alaude has joined #ruby
axeman- has quit [Read error: Connection reset by peer]
mosheee has quit [Ping timeout: 264 seconds]
huoxito has quit [Quit: Leaving]
axeman- has joined #ruby
n_blownapart has joined #ruby
n_blownapart has quit [Remote host closed the connection]
<rickruby>
trying to do a simple tweet type example
Alaude has joined #ruby
<Quadlex>
rickruby: what's your actual problem?
teddyp1cker has joined #ruby
<MrZYX>
rickruby: you need attribute writers, methods like def lat=(val) @lat = val; end, there's a shortcut to define them via the attr_writer method. Also google attr_reader and attr_accessor
<rickruby>
undefined method `lat=' for #<Status:0x007f8528963de0> (NoMethodError)
Alaude_ has quit [Ping timeout: 276 seconds]
<MrZYX>
that being said the tweet method clearly should be your constructor instead
<rickruby>
thank I will look into attr_reader and accessors
<MrZYX>
if you'd like the tweet method for its name you should do def tweet(*args); Status.new(*args); end; instead
subbyyy has joined #ruby
<MrZYX>
or def tweet(*args); Status.new(*args).post; end;
yxhuvud has joined #ruby
<MrZYX>
or yet better class Status; def self.tweet(*args); new(*args); end; end; Status.tweet(...)
yxhuvud2 has quit [Ping timeout: 264 seconds]
subbyyy_ has quit [Ping timeout: 264 seconds]
ffio_ has quit [Quit: WeeChat 0.4.1]
<rickruby>
thanks MrZYX & Quadlex trying out different the suggestions and reading through google searches to try gain better understanding
vince_prignano has joined #ruby
mityaz has joined #ruby
Alaude_ has joined #ruby
Alaude has quit [Ping timeout: 264 seconds]
adambeynon has joined #ruby
freerobby has joined #ruby
quale has joined #ruby
clocKwize has joined #ruby
Kricir has joined #ruby
RustyShackleford has quit [Quit: Leaving]
blackmesa has joined #ruby
freerobby has quit [Ping timeout: 264 seconds]
justsee has quit [Ping timeout: 264 seconds]
frem_ has joined #ruby
Kricir has quit [Ping timeout: 256 seconds]
arya_ has quit [Ping timeout: 245 seconds]
anay has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 256 seconds]
m8 has joined #ruby
zmike123 has joined #ruby
justsee has joined #ruby
justsee has joined #ruby
Alaude_ has quit [Ping timeout: 245 seconds]
anay has joined #ruby
Alaude has joined #ruby
anay has quit [Remote host closed the connection]
adeponte has joined #ruby
Kelet_ has joined #ruby
Kelet has quit [Read error: Connection reset by peer]
arya_ has joined #ruby
spidergears_ has quit [Ping timeout: 276 seconds]
bleubeard has joined #ruby
Alaude_ has joined #ruby
Alaude has quit [Ping timeout: 240 seconds]
Nss has joined #ruby
JimmyNeutron has quit [Quit: Leaving]
peterdecroos has joined #ruby
adeponte has quit [Ping timeout: 240 seconds]
mityaz has quit [Quit: See ya!]
devoldmx3 has joined #ruby
reactormonk has quit [Ping timeout: 260 seconds]
corehook has joined #ruby
the_fallen has quit [Remote host closed the connection]
dhruvasagar has quit [Ping timeout: 264 seconds]
Alaude has joined #ruby
Alaude_ has quit [Ping timeout: 276 seconds]
axeman- has quit [Ping timeout: 276 seconds]
devoldmx27 has joined #ruby
devoldmx has quit [Ping timeout: 245 seconds]
devoldmx has joined #ruby
devoldmx3 has quit [Ping timeout: 264 seconds]
devoldmx3 has joined #ruby
devoldmx27 has quit [Read error: Connection reset by peer]
mityaz has joined #ruby
zeromodulus has quit [Remote host closed the connection]
zeromodulus has joined #ruby
devoldmx has quit [Ping timeout: 264 seconds]
corehook has quit [Remote host closed the connection]
bluOxigen has joined #ruby
devoldmx has joined #ruby
brennanMKE has joined #ruby
freerobby has joined #ruby
<rickruby>
what is the best way to learn ruby & rails ? How did you guys initially learn ?
<sevenseacat>
getting a tutorial, following it
Alaude_ has joined #ruby
<sevenseacat>
trying things, hanging out on IRC, reading SO
bleubeard has quit [Remote host closed the connection]
Alaude has quit [Ping timeout: 264 seconds]
<rickruby>
is there any specific resource you'd recommend?
anay has joined #ruby
The-Mad-Pirate has quit [Read error: Connection reset by peer]
zeromodulus has quit [Ping timeout: 264 seconds]
devoldmx3 has quit [Ping timeout: 276 seconds]
ananthakumaran1 has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
maroloccio has joined #ruby
ananthakumaran has quit [Ping timeout: 245 seconds]
dagen has quit []
hadees_ has joined #ruby
The-Mad-Pirate has joined #ruby
colonolGron has joined #ruby
brennanMKE has quit [Ping timeout: 245 seconds]
jonahR has quit [Quit: jonahR]
hadees has quit [Ping timeout: 245 seconds]
hadees_ is now known as hadees
The-Mad-Pirate has quit [Client Quit]
lethjakman has quit [Ping timeout: 256 seconds]
bleubeard has joined #ruby
spidergears_ has joined #ruby
axeman- has joined #ruby
Es0teric has quit [Quit: Computer has gone to sleep.]
ferdev has joined #ruby
nari has quit [Ping timeout: 264 seconds]
sevenseacat has quit [Quit: Leaving.]
hadees has quit [Quit: hadees]
zigomir_ has joined #ruby
rezzack has quit [Quit: Leaving.]
The-Mad-Pirate has joined #ruby
goleldar has quit [Ping timeout: 264 seconds]
<clocKwize>
rickruby: try doing stuff yourself, if you have problems, go to stackoverflow.com and you'll find lots of very good answers, if not ask here :)
forgot has quit [Ping timeout: 268 seconds]
devoldmx3 has joined #ruby
vikhyat has quit [Remote host closed the connection]
krainboltgreene has joined #ruby
justsee has quit [Ping timeout: 264 seconds]
Kelet_ is now known as Kelet
devoldmx has quit [Ping timeout: 276 seconds]
rippa has joined #ruby
devoldmx has joined #ruby
gyre008 has joined #ruby
gyre007 has quit [Read error: Connection reset by peer]
TheRealPygo is now known as pygospa
freerobby has joined #ruby
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
devoldmx3 has quit [Ping timeout: 264 seconds]
Kricir has joined #ruby
freerobby has quit [Ping timeout: 240 seconds]
thomasle_ has joined #ruby
Matriks has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
joshsmith has quit [Quit: joshsmith]
Kricir has quit [Ping timeout: 264 seconds]
ebanoid has joined #ruby
codecop has joined #ruby
axeman- has quit [Remote host closed the connection]
Xeago has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
adeponte has joined #ruby
Matriks has quit [Remote host closed the connection]
workmad3 has joined #ruby
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
pallavi has quit [Ping timeout: 264 seconds]
relix has joined #ruby
Xeago has quit [Remote host closed the connection]
v0n has joined #ruby
jefflyne has quit [Ping timeout: 268 seconds]
adeponte has quit [Ping timeout: 268 seconds]
jefflyne has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
axeman- has joined #ruby
devoldmx3 has joined #ruby
devoldmx3 has quit [Read error: Connection reset by peer]
devoldmx3 has joined #ruby
timonv has joined #ruby
codecop has quit [Read error: Connection reset by peer]
devoldmx has quit [Ping timeout: 256 seconds]
codecop has joined #ruby
jbpros has joined #ruby
ebanoid has quit [Quit: brbomgwtfbbq]
gyre008 has quit [Remote host closed the connection]
anay has quit [Remote host closed the connection]
gyre007 has joined #ruby
razi has joined #ruby
Es0teric has joined #ruby
gyre007 has quit [Remote host closed the connection]
ferdev has quit [Quit: ferdev]
freerobby has joined #ruby
gyre007 has joined #ruby
jbpros has quit [Quit: jbpros]
workmad3 has joined #ruby
brennanMKE has joined #ruby
AndChat| has quit [Ping timeout: 256 seconds]
Deele has joined #ruby
freerobby has quit [Ping timeout: 245 seconds]
workmad3 has quit [Read error: Operation timed out]
axeman- has quit [Ping timeout: 245 seconds]
axeman- has joined #ruby
timonv has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 245 seconds]
ori-l has joined #ruby
<ori-l>
hey, i'm having trouble adjusting to the fact that there's no difference in ruby between attribute access and a method call
<ori-l>
what do you do when the method does some work to compute a value, and you need to query it in a loop?
<ori-l>
cache it in a local variable?
robert_ has joined #ruby
<MrZYX>
well, attribute accessors are methods, the attr_* methods are just a shortcut to define them
ericboehs has quit [Read error: Connection reset by peer]
<MrZYX>
you can perfectly fine define them by hand and do whatever you want in them
bobjohnson has quit [Quit: bobjohnson]
<Nilium>
Just store it in a local.
<Nilium>
Same as you'd do in any language, really.
<MrZYX>
the usual pattern to cache a computed value is def attribute; @attribute ||= compute_attribute; end
vlad_starkov has joined #ruby
trivol has joined #ruby
bleubeard has quit [Remote host closed the connection]
cj3kim has quit [Remote host closed the connection]
bhaak has quit [Ping timeout: 245 seconds]
<Nilium>
I don't get the impression that he wants to cache it in whatever's computing it, though I also find his question kind of confusing because it feels like he's implying that other languages cache things for him.
ehaliewicz has quit [Remote host closed the connection]
<ori-l>
no, i didn't mean to imply that
<ori-l>
sorry, I can see that my question was inarticulate, but I think you folk answered it
<Nilium>
Obviously you'd locally store both expensive things.
Lewix has quit [Remote host closed the connection]
<MrZYX>
perfect use case for the @expensive ||= ... pattern
<Nilium>
Mostly because I assume you don't want to actually cache them class-side because then you'd have to clear the cache later if it needs to be recomputer.
<Nilium>
*recomputed
<apeiros>
assuming that do_something doesn't change the outcome of these expensive things
krainboltgreene has quit [Ping timeout: 276 seconds]
<Nilium>
Well, if it did, that'd be silly.
<ori-l>
I think what struck me as odd is the fact that if you just look at 'foo', it's not clear why you're just copying some value
nari has joined #ruby
anay has joined #ruby
<Nilium>
Copying?
amacgregor_ has joined #ruby
tonini has joined #ruby
<ori-l>
assigning
<apeiros>
Nilium: not really. he didn't give any details.
<Nilium>
Far as I know, the only thing you could maybe say gets copied is fixnums and some floats (but not all).
<Nilium>
apeiros: True.
amacgregor__ has joined #ruby
<apeiros>
MrZYX: @foo ||= is only a good pattern if for a given object @foo will never change after its first computation (but then it's a very nice pattern, but we too don't know whether that's the case here)
amacgregor has quit [Ping timeout: 240 seconds]
<MrZYX>
sure
<ori-l>
I think I got the answer I was hoping for, which is that it looks weird because I'm not used to Ruby, not because I've dug myself into some unidiomatic confused hole.
<apeiros>
btw., I tend to use @_foo for that
<apeiros>
just to indicate that @_foo should not be accessed directly
<Nilium>
Anyway, my recommendation is that if you don't want to cache it object-side, maybe make the method name clear that it's computing something (e.g., prefixes like build_, compute_, etc. -- whatever's most appropriate and specific)
timonv has joined #ruby
<ori-l>
yeah, that makes sense.
<MrZYX>
I guess, I tend to name methods that aren't cachable not like attributes but do get_foo or compute_foo instead
<MrZYX>
or something similar fitting
<Nilium>
If you want to cache it object-side, then maybe add an argument to each function to let it know you don't want the cached object (e.g., def compute_butts(use_cache: true) ; end).
nomenkun has joined #ruby
<MrZYX>
I'd prefer two methods instead
<MrZYX>
def foo; @foo ||= compute_foo; end
amacgregor_ has quit [Ping timeout: 240 seconds]
<MrZYX>
then directly call compute_foo if you need a fresh one
<Nilium>
That also works, though then the question comes up as to which one clears the cache.
gyre007 has quit [Remote host closed the connection]
<apeiros>
hm, interesting. I know I've done what MrZYX describes before, but I don't think I've a strict rule about when and how to do it that way
<Nilium>
If it's compute_foo, then does it also assign to @foo? And if it's not, then does @foo take an argument to clear the cache?
<MrZYX>
well, I guess I'd also try to not have a cache that goes over more than one method call
popl has quit [Quit: We must make an idol of our fear, and call it God.]
<Nilium>
Or do you then have three methods?
<Nilium>
clear_foo_cache, compute_foo, and foo
gyre007 has joined #ruby
<MrZYX>
actually I never did that before, I always could get around by caching locally in the method or just passing the value as argument if the method is composed by other methods that process the value
nomenkun has quit [Remote host closed the connection]
<MrZYX>
I never had the requirement to have both, a cache over several external calls and a non cached version
Es0teric has quit [Quit: Computer has gone to sleep.]
ChristianS has quit [Excess Flood]
Neomex has joined #ruby
nomenkun has joined #ruby
ChristianS has joined #ruby
<Nilium>
My preference is to just invalidate a cache when necessary since I assume something would do that.
<ori-l>
MrZYX: can you give me a full example of the '@expensive ||= ... pattern'?
threesome has joined #ruby
<apeiros>
ori-l: `def foo; @_foo ||= 1+1; end`
justsee has joined #ruby
justsee has joined #ruby
<apeiros>
the 1+1 is only executed the first time foo is called
<Nilium>
E.g., change_a_butt would set the @butt cache to nil or set a @butts_dirty ivar to true to signal that the cached value is no longer valid
<ori-l>
ah, right. clever.
<apeiros>
if you need something over multiple lines, you can use begin/end, like so:
<apeiros>
def foo; @_foo ||= begin; x = 1; y = 2; x+y; end; end
<MrZYX>
I prefer to move that into a method though
<apeiros>
I think I only move it to a method if it makes sense to have it accessible separately
<apeiros>
but I don't think I'd be opposed to move it into a method generaly
<apeiros>
*generally
<apeiros>
holy fuck, watching somebody play super meat boy. that game looks insanely difficult :D
<Nilium>
I usually only move something into another method if it exceeds about 8-10 lines of code.
trivol has quit [Quit: trivol]
<MrZYX>
ori-l: that all being sad, if you want to know the right way for your real code you need to show it ;)
<MrZYX>
*said
<Nilium>
Also it's mostly a style thing.
<apeiros>
MrZYX+1
<ori-l>
oh, jeez, it's a bit of a mess. i'm learning about modules and trying things out as i go.
<MrZYX>
I'd say we're used to that, so don't be afraid :P
<apeiros>
we've become exceedingly good at reading peoples mind and untangle the messiest code imaginable
eldariof has quit [Ping timeout: 268 seconds]
<ori-l>
well, OK: https://dpaste.de/wphTb/ the 'VagrantRoleManager' module is clearly misplaced and maybe should not be a module, but i'm just thinking through Ruby OO.
freerobby has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
<apeiros>
ori-l: IMO if you have to comment what a variable is about, you should rename it ;-)
<apeiros>
e.g. $VP -> $VagrantPath
<MrZYX>
yeah, +1
<apeiros>
(that's what we've got tab-completion for)
<Nilium>
Vaguely tempted to smack you for extending String.
<rickruby>
clockKwize: thank you that is great advice, I think I've been overloaded by the vast amount of resources and scuttling back and forth between then, never really finishing any to completion.
<ori-l>
Nilium: coming from Python I can't even begin to express the thrill of violating that that gives me
tonini has quit [Remote host closed the connection]
<ori-l>
*violation
<Nilium>
I use Obj-C regularly, I'm sort of used to it by now.
<Nilium>
Though I'm still disturbed when people using Obj-C decide to write a class category and call it a 'polyfill'.
<apeiros>
(or did you want 9 bytes?)
<ori-l>
no, I probably miscounted.
<ori-l>
read(8) is better.
<rickruby>
question for anyone making a living programming ruby / RoR here: do you have a CS degree, or any degree ? Do the other rubyist you know have degrees? And do you think it matters in this field ?
freerobby has quit [Ping timeout: 240 seconds]
<apeiros>
string[0..8] means "from offset 0 to offset 8", which is 9 characters
<Nilium>
I wish I made a living coding in Ruby.
spider-mario has joined #ruby
<apeiros>
string[0,8] means "from offset 0 a length of 8 characters"
<apeiros>
Nilium: I do. though I have to accept rails :-(
<Nilium>
Well, I implicitly meant 'and not rails'
<apeiros>
hah
<Nilium>
I also don't have a CS degree, but since I'm not employed in the first place, that's probably not much help to you.
<apeiros>
I prefer rails over lots of other things
<banisterfiend>
rickruby: having a degree will make u a better programmer, though you can learn that stuff manually, you'll have to work harder to acquire the same knowledge
<Nilium>
I'd probably prefer rails over some alternatives, but I still prefer zero web dev at all.
<Nilium>
I harp on about that constantly though, so no point going into that further
<banisterfiend>
rickruby: it depends how self motivated you are i guess
<rickruby>
well, I enjoy learning Ruby and have been self studying for the past 25 weeks
<Nilium>
If you don't have a CS degree and you really like programming, chances are you'll learn whatever comes up.
<rickruby>
I have been to many traditional colleges, transferr3ed alot, and finishing up a semester at an online college
<banisterfiend>
rickruby: if you're just an average dude, not particularly hard working and not particularly bright, then not having a degree just makes u one more dude, nothing special, and people will have to wonder why they should give u a job
<rickruby>
but I feel like college is just a waste of precious time
Kricir has quit [Ping timeout: 256 seconds]
<Nilium>
Having a degree and being average and not particularly bright also makes one a typical CS major.
<banisterfiend>
rickruby: but if you're very smart and self motivated you could build up an open source portfolio demonstrating mastery over the topics u'd learn in college, and esp if you develop a successful opensource project, you can distinguish yourself
<banisterfiend>
Nilium: sure but rather be average/not bright + a degree than without a degree ;)
Gardel has joined #ruby
smathieu has joined #ruby
<rickruby>
do companies (read: HR) just weed you out because you don't have a degree? Or would a better question be would you work for such companies that employ such practices ?
<Nilium>
I suppose, but I would feel bad for the company that hired the average-not-bright-degree person because they'd probably spend a lot of time undoing the damage.
<Nilium>
Some do. Some don't. It's impossible to make a blanket statement there.
motto has joined #ruby
<Nilium>
If you've already got past work experience in the areas you're applying for, most will probably overlook the education stuff because they'll probably assume you demonstrated some level of competency in your previous work.
<rickruby>
I'm kind of waking up and realizing how important time is, and I'm going to a dev school next year (9-12 weeks) for RoR, but wondering if its worth to do 3 years to finish degree in CS
motto has quit [Read error: Connection reset by peer]
<Nilium>
You might as well, if it's not going to cripple you financially.
cj3kim has joined #ruby
<rickruby>
cost is not too bad, but it saps time and energy
<ori-l>
rickruby: so do long, ponderous therapy sessions on IRC :P
<rickruby>
wondering if I should just go through it anyways for the paper
<rickruby>
I've already exhausted quora
<rickruby>
lol
<Nilium>
I'd go through it and try to find internships.
<Nilium>
Quora is garbage and we shall not speak of it again.
adeponte has joined #ruby
<Nilium>
Also, as an FYI, don't just learn Ruby.
<rickruby>
right now I know Ruby/Java and by "know" I mean, beginner level, I can muddle my way through things, but haven't built anything significant
axeman- has quit [Ping timeout: 240 seconds]
<Nilium>
You should probably try a language that doesn't impose a GC on you.
nomenkun has quit [Remote host closed the connection]
axeman- has joined #ruby
<Nilium>
In most cases, you want GC, but it's better to know than not.
lkba has joined #ruby
<rickruby>
like, assembler ? or what would be the most practical language without gc ?
<Nilium>
C++ or C are good choices.
<Nilium>
Preferably start with C++ and then try C.
ewnd9 has quit [Remote host closed the connection]
anay has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 264 seconds]
cj3kim has quit [Read error: Connection reset by peer]
<rickruby>
does knowing how to manually do gc make one a better programmer ?
<banisterfiend>
Nilium: though C is a cool language, most ruby programmers i know dont know it at all, he doesnt really need to know it if he just wants to be a web developer
<rickruby>
c++ is serious time investment
<banisterfiend>
(which is what he probably wants)
ewnd9 has joined #ruby
<rickruby>
would like to do web dev / mobile (ios/android) eventually, someday, hopefully starting with web dev next year
<banisterfiend>
rickruby: if you just want to be a web dev you can probably just stick to learning ruby/javascript/html/css
<Nilium>
banisterfiend: Possibly, but I'm more in the camp of learning whatever you can
<Nilium>
It'd be pretty boring to just be a web dev or just be a game programmer or just be an apps guy
workmad3 has joined #ruby
<Nilium>
That way when one of them turns into your job and you hate it more than anything else, you can do the other things at home.
<Z3tta>
Jack of all trades, master of none, but often better than a master of one.
<banisterfiend>
Nilium: well the web is taking over in all areas
<banisterfiend>
Nilium: learning webdev alone is enough to write games and even local apps
adeponte has quit [Ping timeout: 245 seconds]
<Nilium>
I certainly think browsers are becoming more powerful, though I don't think they're quite there yet -- probably the next five years, though.
<spider-mario>
it is possible to write web apps in C++
<Nilium>
Brute-force hardware and smart people will make sure browsers keep improving.
<MrZYX>
ori-l: so my style notes would be: avoid modifier rescue, I'd use constants for your globals, $VP is already a pathname, so $VP.join(..) instead of $VP + ..., also there's stuff like $VP.join(...).exist?, && over and and || over or, uniq.sort over sort.uniq could be a little bit faster, in general I'd avoid most of the sorts, just sort the thing before your output it once, always use parens for method calls with arguments if in an expression, like if foo(bar) && baz(
vlad_starkov has joined #ruby
<banisterfiend>
Nilium: have you seen the webgl port of quake?
<Nilium>
Yeah. I believe there was also a Quake 2 port as well, plus a friend of mine was porting Radiant to JS/HTML.
Spami__ has joined #ruby
freerobby has joined #ruby
emergion has joined #ruby
krz has joined #ruby
brennanMKE has joined #ruby
Spami has quit [Ping timeout: 268 seconds]
Peej has joined #ruby
anay has joined #ruby
love_color_text has joined #ruby
emergion has quit [Ping timeout: 260 seconds]
freerobby has quit [Ping timeout: 276 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
brennanMKE has quit [Ping timeout: 268 seconds]
axeman- has quit [Ping timeout: 264 seconds]
axeman- has joined #ruby
kirun has joined #ruby
wy_stack has joined #ruby
intuxicated_ has joined #ruby
workmad3 has quit [Read error: Operation timed out]
Neomex has quit [Quit: Neomex]
Lewix has joined #ruby
Lewix has joined #ruby
oktapodi_ has joined #ruby
twer has quit [Ping timeout: 268 seconds]
intuxicated has quit [Ping timeout: 268 seconds]
nfk has joined #ruby
nfk has joined #ruby
nfk has quit [Changing host]
mercwithamouth has joined #ruby
allsystemsarego has joined #ruby
cj3kim has joined #ruby
oktapodi has quit [Ping timeout: 240 seconds]
ferdev has joined #ruby
ismlages has joined #ruby
workmad3 has joined #ruby
Tony has joined #ruby
Speed has joined #ruby
xerxas has quit [Quit: Connection closed for inactivity]
anay has quit [Remote host closed the connection]
Lewix has quit [Ping timeout: 268 seconds]
vlad_sta_ has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
vince_prignano has quit [Remote host closed the connection]
maxmanders has joined #ruby
duper has quit [Ping timeout: 260 seconds]
blackmesa has joined #ruby
duper has joined #ruby
cj3kim has quit [Ping timeout: 240 seconds]
Zolo has joined #ruby
ebanoid has joined #ruby
workmad3 has quit [Ping timeout: 245 seconds]
Zolo has quit [Remote host closed the connection]
ebanoid has quit [Client Quit]
banisterfiend has quit [Remote host closed the connection]
Ciscoridze has joined #ruby
Nahra has quit [Quit: leaving]
ebanoid has joined #ruby
trivol has joined #ruby
Nahra has joined #ruby
freerobby has joined #ruby
maxmanders has quit [Quit: Computer has gone to sleep.]
neonlex has joined #ruby
Kricir has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
teddyp1cker has joined #ruby
marr has joined #ruby
freerobby has quit [Ping timeout: 276 seconds]
yacks has quit [Ping timeout: 264 seconds]
Kricir has quit [Ping timeout: 276 seconds]
teddyp1cker has quit [Ping timeout: 245 seconds]
krz has quit [Quit: krz]
blackxored has joined #ruby
<blackxored>
Hello guys, any ruby devs near st. pete, russ, please pv me
sailias has joined #ruby
spidergears_ has quit [Ping timeout: 264 seconds]
<blackxored>
no job spam, just socializing
GeissT has quit [Ping timeout: 245 seconds]
kirun has quit [Ping timeout: 276 seconds]
maxmanders has joined #ruby
thomasle_ has quit [Remote host closed the connection]
mneorr has joined #ruby
linux_noob_666 has quit [Ping timeout: 264 seconds]
trivol has quit [Quit: trivol]
mneorr has quit [Ping timeout: 245 seconds]
eldariof has joined #ruby
nomenkun has joined #ruby
love_color_text has quit [Read error: Connection reset by peer]
coder_neo has joined #ruby
coder_neo has quit [Client Quit]
nomenkun has quit [Ping timeout: 245 seconds]
neonlex has quit [Quit: neonlex]
v0n has quit [Ping timeout: 268 seconds]
linux_noob_666 has joined #ruby
freerobby has joined #ruby
brennanMKE has joined #ruby
kirun has joined #ruby
malcolmva has quit [Read error: No route to host]
blackmesa has quit [Ping timeout: 240 seconds]
love_color_text has joined #ruby
malcolmva has joined #ruby
vikhyat has joined #ruby
tvw has quit []
freerobby has quit [Ping timeout: 240 seconds]
mhillsman has joined #ruby
brennanMKE has quit [Ping timeout: 276 seconds]
twer has joined #ruby
mhillsman has quit [Read error: Connection reset by peer]
browndawg has joined #ruby
hidensoft has joined #ruby
smathieu has joined #ruby
thejoecarroll has quit [Ping timeout: 248 seconds]
intuxicated_ has quit [Ping timeout: 240 seconds]
gildo has quit [Ping timeout: 268 seconds]
oktapodi_ has quit [Remote host closed the connection]
zachrab_ has quit [Remote host closed the connection]
mgorbach has joined #ruby
zachrab_ has joined #ruby
atno has quit [Remote host closed the connection]
Kricir has joined #ruby
Kricir has quit [Read error: No route to host]
mary5030 has joined #ruby
Kricir has joined #ruby
cj3kim has joined #ruby
allsystemsarego has joined #ruby
nayena_ has joined #ruby
_honning_ has joined #ruby
bradsmith has quit [Remote host closed the connection]
Nss has joined #ruby
lebek has joined #ruby
<nayena_>
I am using Net::HTTP.get_response to fetch remote content, and it works flawlessly - but with this particular url, it simply times out. The url works perfectly when accessed with my browser, and also with wget. How should I approach this problem?
_seanc_ has joined #ruby
mary5030 has quit [Remote host closed the connection]
<nayena_>
correction: wget did not work when I tried again, is this a thing that could be set up on the remote server?
Nss has quit [Read error: Connection reset by peer]
_seanc_ has quit [Client Quit]
<pontiki>
you might look at the headers you're sending, nayena; i've encountered servers that balk when user agent isn't something they recognize, or accepts, or other things. try to duplicate the request headers sent by your browser
Kricir has quit [Ping timeout: 256 seconds]
cj3kim has quit [Ping timeout: 276 seconds]
krawchyk has quit [Remote host closed the connection]
Inside has joined #ruby
teddyp1cker has quit [Remote host closed the connection]
anay has joined #ruby
yfeldblum has quit [Ping timeout: 264 seconds]
<pontiki>
an easy way to find out what is being sent is to set up a listener with netcat: 'nc -l 9999' - then in your browser, 'http://localhost:9999'
krawchyk has joined #ruby
Nss has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
vlad_starkov has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
_seanc_ has joined #ruby
brennanMKE has quit [Ping timeout: 240 seconds]
brennanMKE has joined #ruby
bradsmith has joined #ruby
goshakkk has joined #ruby
spidergears_ has joined #ruby
cantonic has joined #ruby
k610 has joined #ruby
lebek has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gyre007 has quit [Remote host closed the connection]
bradsmith has quit [Ping timeout: 260 seconds]
lebek has joined #ruby
ravster has joined #ruby
ewnd9 has quit [Remote host closed the connection]
lebek has quit [Client Quit]
mneorr has joined #ruby
vedic has joined #ruby
aqil has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
yfeldblum has joined #ruby
<vedic>
I am using postgres 9.1 and design is single database with multiple schema and one user per schema. A user can't access data except from his own schema. Now the issue is, how to know which schema to send the query when a request comes to the server?
anay has quit [Remote host closed the connection]
wallerdev has joined #ruby
ewnd9 has joined #ruby
goshakkk has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
maxmanders has joined #ruby
vlad_starkov has quit [Ping timeout: 245 seconds]
jonahR has joined #ruby
vlad_starkov has joined #ruby
nathancahill has joined #ruby
Nahra has quit [Ping timeout: 264 seconds]
v0n has joined #ruby
ewnd9 has quit [Remote host closed the connection]
nayena_ has left #ruby [#ruby]
ewnd9 has joined #ruby
bleubeard has joined #ruby
arietis has quit [Ping timeout: 264 seconds]
bleubeard has quit [Remote host closed the connection]
ssvo has joined #ruby
bleubeard has joined #ruby
zachrab_ has quit [Remote host closed the connection]
zachrab_ has joined #ruby
timonv has joined #ruby
v0n has quit [Read error: Connection reset by peer]
browndawg has quit [Quit: Leaving.]
sayan has joined #ruby
anay has joined #ruby
mary5030 has joined #ruby
CaptainLex has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
tkuchiki has quit [Remote host closed the connection]
eka has quit [Quit: Computer has gone to sleep.]
SpinningWheels has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
virtualize has joined #ruby
lushious has quit [Remote host closed the connection]
SpinningWheels has left #ruby [#ruby]
baroquebobcat has joined #ruby
chxane has quit [Remote host closed the connection]
Opettaja has joined #ruby
timonv has joined #ruby
krawchyk_ has joined #ruby
ewnd9 has quit [Remote host closed the connection]
arietis has joined #ruby
timonv has quit [Remote host closed the connection]
vince_prignano has joined #ruby
timonv has joined #ruby
chxane has joined #ruby
krawchyk has quit [Ping timeout: 264 seconds]
ananthakumaran has joined #ruby
browndawg has joined #ruby
ewnd9 has joined #ruby
jbpros has quit [Ping timeout: 260 seconds]
habanany has quit [Ping timeout: 256 seconds]
Fire-Dragon-DoL has joined #ruby
Fire-Dragon-DoL has quit [Max SendQ exceeded]
Fire-Dragon-DoL has joined #ruby
jbpros has joined #ruby
arietis has quit [Ping timeout: 276 seconds]
* apeiros
wants Dir.empty?
anay has quit [Remote host closed the connection]
anay has joined #ruby
* apeiros
also wants Enumerable#empty?
tkuchiki has joined #ruby
krawchyk_ has quit [Remote host closed the connection]
k610 has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
tgunr has joined #ruby
tkuchiki has quit [Ping timeout: 245 seconds]
Kricir has quit [Ping timeout: 260 seconds]
stuartrexking has joined #ruby
fmcgeough has joined #ruby
popl has joined #ruby
markalanevans has joined #ruby
nitish has joined #ruby
Inside has quit [Ping timeout: 264 seconds]
JZTech102 has joined #ruby
goshakkk has joined #ruby
tkuchiki has joined #ruby
JZTech101 has quit [Disconnected by services]
nbouscal has quit [Quit: Computer has commenced electric sheep tracking protocol.]
pen has joined #ruby
Inside has joined #ruby
Inside has joined #ruby
JZTech102 has quit [Read error: Connection reset by peer]
JZTech101 has joined #ruby
goleldar has joined #ruby
bradsmith has joined #ruby
tkuchiki has quit [Ping timeout: 276 seconds]
brennanMKE has quit [Ping timeout: 245 seconds]
v0n has joined #ruby
relix has joined #ruby
relix has quit [Client Quit]
gildo has joined #ruby
Krajsnick has joined #ruby
eldariof has joined #ruby
freerobby1 has quit [Quit: Leaving.]
relix has joined #ruby
bradsmith has quit [Ping timeout: 276 seconds]
brennanMKE has joined #ruby
xcv has quit [Remote host closed the connection]
dorei has joined #ruby
ksmth has joined #ruby
larissa has joined #ruby
<dorei>
hello
rezzack has joined #ruby
<dorei>
let's say I want to to match "joke" but not "no joke", what's the regexp for that?
workmad3 has joined #ruby
nbouscal has joined #ruby
subbyyy has quit [Ping timeout: 245 seconds]
MarcWebe1 is now known as MarcWeber
Matriks has joined #ruby
twer has quit [Ping timeout: 240 seconds]
ebanoid has quit [Quit: brbomgwtfbbq]
cj3kim has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
cj3kim has quit [Read error: Connection reset by peer]
<zendeavor>
try rubular
gyre007 has joined #ruby
<MrZYX>
dorei: negative lookbehind
freerobby has joined #ruby
timonv has quit [Remote host closed the connection]
<dorei>
MrZYX: that whitespace is giving me trouble xD
Spooner has joined #ruby
<MrZYX>
it's just another character, just include it into the lookbehind
tjbiddle has joined #ruby
mad_hatter_1 has joined #ruby
<dorei>
if I include it as \s, not prob, but if I inculde it as \s? then invalid pattern in look behind
dankest has joined #ruby
<Mon_Ouie>
Look behinds need to have a fixed width IIRC
timonv has joined #ruby
<Mon_Ouie>
Can you just use two regular expressions? Alternatively you can do it explicitly, but it's sort of tedious
anay has quit [Remote host closed the connection]
<Mon_Ouie>
/[^ ]joke|[^t] joke|…/
Lewix has quit [Remote host closed the connection]
<spider-mario>
dorei : /(?<!no )joke/
<apeiros>
well, you can have two negative lookbehinds. question is whether you phrased your problem right for regex matching.
<spider-mario>
oh, you do not want no joke either
dhruvasagar has quit [Read error: Operation timed out]
<spider-mario>
my bad
<apeiros>
also, \bjoke\b to avoid nojoke to match
Krajsnick has quit [Remote host closed the connection]
<apeiros>
depending on what you want, the answer might also be anchoring
robscomputer has quit [Ping timeout: 276 seconds]
<apeiros>
e.g. /\Ajoke/
<spider-mario>
dorei : you could do something like : /no\s*/.match(/joke/.match(string).pre_match)
fgo has quit [Remote host closed the connection]
<spider-mario>
i.e. store your match against /joke/ and test whether there was “no ” in front of it
<Mon_Ouie>
Another potential solution might be to split the text in words and find cases where the current word is joke and the previous one wasn't "no"
<apeiros>
in other words: more information what the problem to be solved actually is
<spider-mario>
split on \s+, join with ' ' and use the regexp with negative look-behind
<spider-mario>
:p
axeman- has joined #ruby
<spider-mario>
or substitute instead of join→split
<spider-mario>
silly me.
<dorei>
thanx a lot for your ideas :)
<waxjar>
i find it's better to avoid regexps when you want to not match something
<spider-mario>
I obviously meant instead of split→join.
banisterfiend has joined #ruby
mary5030 has quit [Remote host closed the connection]
IceDragon has joined #ruby
Kricir has joined #ruby
zeromodulus has joined #ruby
zeromodulus has joined #ruby
zeromodulus has quit [Changing host]
davehimself has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
maxmanders has quit [Quit: Computer has gone to sleep.]
<apeiros>
IMO the idiomatic way is to have properly initialized values
adeponte has quit [Ping timeout: 240 seconds]
<tjbiddle>
apeiros: Such as in the OP of that?
timonv has quit [Remote host closed the connection]
Andrevan has joined #ruby
<apeiros>
OP = initial post?
jaimef has quit [Ping timeout: 264 seconds]
<apeiros>
IMO having both, foo ||= [] and << in the same method reeks. something has gone wrong there already.
<tjbiddle>
apeiros: Yeah
<apeiros>
but to answer that, more context is necessary
VegetableSpoon has joined #ruby
<tjbiddle>
apeiros: It's nothing in particular - If want to return an array of whatever, and you're iterating over something else to get the resource you want to append to the array, the array needs to be initialized at some point prior
amacgregor__ has joined #ruby
Speed has joined #ruby
<apeiros>
tjbiddle: the question is why you initialize it with ||=
<apeiros>
i.e., how can it be that foo is nil?
<apeiros>
care to show the full method?
<tjbiddle>
apeiros: I'm just putzing around. Let me gist an example though
<tjbiddle>
apeiros: ||= wasn't exactly what I was pointing out, sorry - should have specified that. I'm just talking about initializing it to begin with.
<apeiros>
no <<, no ||=
agent_white has joined #ruby
<tjbiddle>
apeiros: Well that answers that :-)
<tjbiddle>
Thanks!
verto has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nitish has quit [Remote host closed the connection]
SeySayux has quit [Ping timeout: 245 seconds]
jaimef has joined #ruby
SeySayux has joined #ruby
maycon has joined #ruby
rodacato has quit [Remote host closed the connection]
bradhe has joined #ruby
vince_prignano has quit [Remote host closed the connection]
oktapodi has quit [Remote host closed the connection]
oktapodi has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
pr0filer_ has joined #ruby
dorei has left #ruby [#ruby]
wy_stack has quit [Ping timeout: 240 seconds]
spidergears_ has quit [Remote host closed the connection]
Kricir has joined #ruby
banisterfiend has quit [Remote host closed the connection]
relix has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spidergears_ has joined #ruby
oktapodi has quit [Ping timeout: 264 seconds]
dangerousdave has joined #ruby
pyx has joined #ruby
_adeponte has joined #ruby
Lewix has joined #ruby
pyx has quit [Client Quit]
Kricir has quit [Ping timeout: 245 seconds]
BizarreCake has quit [Ping timeout: 264 seconds]
brennanM_ has quit [Remote host closed the connection]
thepumpkin has quit [Remote host closed the connection]
spidergears_ has quit [Remote host closed the connection]
gesh has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
spidergears_ has joined #ruby
gesh has joined #ruby
amacgregor_ has joined #ruby
v0n has quit [Ping timeout: 260 seconds]
hagzag_ has joined #ruby
<hagzag_>
can anyone help with Mechanize ?
cj3kim has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
verto has joined #ruby
amacgregor__ has quit [Ping timeout: 240 seconds]
pr0filer_ has quit []
<hagzag_>
I need to use htaccess on a certain url, login then create a user all from within a ruby code block - what is the recomended method ? I was looking @ Mechanize but had issues with authnticating ?
<waxjar>
certainly not an expert, but Mote is really neat and really fast.
<waxjar>
most people seem to use haml, though.
_seanc_ has quit [Quit: _seanc_]
wy_stack has joined #ruby
bradhe has quit [Remote host closed the connection]
bradsmith has joined #ruby
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
mikepack has joined #ruby
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
Bosox20051 has joined #ruby
Bosox20051 has quit [Excess Flood]
<hagzag_>
anyone on #ruby have ideas regarding: use htaccess on a certain url, login then create a user all from within a ruby code block - what is the recomended method ? I was looking @ Mechanize but had issues with authnticating ?
fgo has quit [Remote host closed the connection]
bradsmith has quit [Ping timeout: 240 seconds]
_adeponte has quit [Remote host closed the connection]
davehimself has joined #ruby
atno has quit [Remote host closed the connection]
decoponio has quit [Quit: Leaving...]
workmad3 has quit [Read error: Operation timed out]
timonv has joined #ruby
axeman- has quit [Remote host closed the connection]
amacgregor__ has joined #ruby
_helloworld_ has quit [Remote host closed the connection]
michael_mbp is now known as zz_michael_mbp
matti has joined #ruby
_helloworld_ has joined #ruby
<waxjar>
hagzag_: your question is a bit vague.
amacgregor_ has quit [Ping timeout: 240 seconds]
timonv has quit [Remote host closed the connection]
adeponte has joined #ruby
Bosox20051 has joined #ruby
S0da has joined #ruby
<hagzag_>
I am trying to automate a user creation by connecting to a url [which has http basic auth], then once you pass the basic auth I need to login via a login page then fill in a form and submit it - that is basicly it - I wasen't sure what is the method to use for this
davehimself has quit [Ping timeout: 256 seconds]
aqil has joined #ruby
adeponte has quit [Remote host closed the connection]
<hagzag_>
BTW I can perform it with curl via bash
Opettaja has quit [Remote host closed the connection]
habanany has joined #ruby
Es0teric has joined #ruby
<waxjar>
sounds like you need an HTTP library of some sort :)
<waxjar>
there's net/http in the stdlib and there are a few others
thepumpkin has joined #ruby
<hagzag_>
yep iv'e tried Mechanize which looked promising ... but I am having some issues accessing a page because of http basic auth
gyre007 has quit [Remote host closed the connection]
<Andrevan>
btw, though, as waxjar said you should probably not being doing this through a web form anyway, but through an HTTP request
adeponte has joined #ruby
JZTech101 has quit [Read error: Connection reset by peer]
<Andrevan>
as in, instead of filling out the form
JZTech101 has joined #ruby
<Andrevan>
post the parameters directly to the server through something like Net::HTTP, excon, HTTParty etc
banisterfiend has joined #ruby
_helloworld_ has joined #ruby
machuga is now known as machuga|away
lxsameer has joined #ruby
Alaude has joined #ruby
dangerousdave has quit [Read error: Connection reset by peer]
dangerousdave has joined #ruby
<lxsameer>
hi I teaching my friend to solve a ruby problem, do you any service which we can see a ruby code in realtime ?
<hagzag_>
thanks Anderevan looking into your sugesstions
sepp2k1 has joined #ruby
_helloworld_ has quit [Remote host closed the connection]
<Inside>
lxsameer: as in..
<Inside>
code together?
<Inside>
or as in see the execution step-by-step?
<Inside>
I've been looking for a good light-weight ruby debugger
<Inside>
and unfortunately the eclipse IDE for RUBY is the only thing that comes close
<Inside>
and it's a hog
<lxsameer>
Inside: hmm code together and run the code so both can see the result
Alaude_ has quit [Ping timeout: 276 seconds]
<Inside>
as in from two different computers?
sepp2k has quit [Ping timeout: 264 seconds]
frem_ has joined #ruby
<lxsameer>
Inside: yeah
<Inside>
skype screen sharing
<MrZYX>
lxsameer: do you need it as a service? otherwise look into wemux
<lxsameer>
Inside: In context of you problem , did you used pru and binding.pry ?
<Inside>
They're not quite what I wanted
verto has joined #ruby
<lxsameer>
MrZYX: i looking for something like a online IDE or something
<Inside>
lxsameer: Try tightvnc
<Inside>
or uhh
<Inside>
windows comes with screen sharing/remote screen viewing
<Inside>
but requires some setup
<lxsameer>
we both are linux users
<Inside>
oh
<Inside>
vnc it is then
<spike|spiegel>
Inside: debugger/debugger2 are the only sanish choices for ruby
<spike|spiegel>
they kind of suck too
sayan has quit [Ping timeout: 256 seconds]
<MrZYX>
+1 for pry for debuggin
<MrZYX>
g
<banisterfiend>
spike|spiegel: i think pry's pretty good
<banisterfiend>
:D
<spike|spiegel>
lmao
`Chris` has quit [Ping timeout: 264 seconds]
zachrab_ has quit [Remote host closed the connection]
<spike|spiegel>
that's not too far from puts/print debugging
rdg has joined #ruby
<banisterfiend>
spike|spiegel: how's that exactly? pry has up/down next/step, and a bunch of introspection commands
<spike|spiegel>
can it attach to already running process?
eldariof has quit [Ping timeout: 240 seconds]
mikepack has quit [Remote host closed the connection]
<banisterfiend>
spike|spiegel: Yeah
<spike|spiegel>
how so?
<banisterfiend>
spike|spiegel: pry-rescue and peek
<spike|spiegel>
"Start a pry session whenever something goes wrong." LOL
<banisterfiend>
spike|spiegel: but the number of times i've wanted to do that i can count on one hand
sailias has joined #ruby
<banisterfiend>
spike|spiegel: even when writing code in C, it's a relatively rare thing for me, most of the time i'm examining core files, or i start the program in gdb and set breakpoints
<banisterfiend>
attaching to a running process is something i hardly ever do
<banisterfiend>
so that should not be the criteria for a good debugger at all IMO
<banisterfiend>
but nonetheless pry can do it
<banisterfiend>
spike|spiegel: err, read further down the page.
<banisterfiend>
spike|spiegel: to the discussion on 'peek'
workmad3 has joined #ruby
Speed has quit [Quit: When two people dream the same dream, it ceases to be an illusion.]
<spike|spiegel>
sigh you guys will never get a good debugger if you are pleased by it
jbpros has joined #ruby
<banisterfiend>
spike|spiegel: sigh, you dont know what you're talking about.
<banisterfiend>
and saying "lmao" without backing up anything doesn't help your case
<MrZYX>
spike|spiegel: what do you expect from a good debugger that pry doesn't do?
<MrZYX>
a gui?
zeropx has joined #ruby
<spike|spiegel>
sigh, a simple one: to be able to break on condition
<awwaiid>
I just learned about pry today and am already familiar with all this -- very good stuff
adeponte has quit [Remote host closed the connection]
Kricir has joined #ruby
_seanc_ has joined #ruby
<spike|spiegel>
MrZYX: lost me on just the 2nd? :)
<spike|spiegel>
and first is as good as debugger if condition :)
<awwaiid>
unrelatedly -- can anyone point me to a document on how/why ruby patchesets are created, and why they aren't just minor version increments? ie -p247 instead of 2.0.1
<awwaiid>
er, instead of 2.0.247 I suppose
maycon has quit [Quit: Saindo]
rdg has quit [Quit: ttfn]
<MrZYX>
I'm expecting a continuation after a ":". And "as good as" without arguing why it is bad is not arguing at all
atmosx_desktop has joined #ruby
<spike|spiegel>
not saying it's bad... the debuggin facilities avialable for ruby are LMAO compared to many others
<spike|spiegel>
and you guys are just easily pleased
Kricir has quit [Ping timeout: 256 seconds]
<banisterfiend>
spike|spiegel: wait, so far you've complained that you can't debug a running process -- i showed you how. THen you said you cant break on condition -- i showed you how to do that too. What else was there?
<davidcelis>
dont feed the troll, he was banned from #rubyonrails for similarly being an asshole in there
<spike|spiegel>
What else was there? :) ok.
Xiti has quit [Ping timeout: 240 seconds]
<yfeldblum>
awwaiid, it makes more sense if you look at "1.8", "1.9", and "2.0" as being the major part of the version
zigomir_ has quit [Read error: Connection reset by peer]
kobain has joined #ruby
Xiti has joined #ruby
<banisterfiend>
spike|spiegel: i showed you how to do both those things, so they're not things that pry can't do. What was there that pry actually can't do that you want to complain about next?
<awwaiid>
yfeldblum: ah, so (2.0),(0.247) kinda. Makes sense, I was wondering if that strategy was described somehwere or is just folk knowledge
zigomir_ has joined #ruby
aqil has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
<yfeldblum>
awwaiid, not that i'm aware of
<awwaiid>
ok, cool. thanks
<yfeldblum>
awwaiid, 2.0.0-p247 <--> (2.0).0.247
Krajsnick has joined #ruby
<Andrevan>
I've been using jazz_hands
<spike|spiegel>
banisterfiend: didn't you read up? eg. break when a certain variable changes.
<yfeldblum>
awwaiid, ruby was first released many years before semver was considered
<zendeavor>
versioning is arbitrary and essentially meaningless
<banisterfiend>
spike|spiegel: you mean "watch points" ? strange for someone who's so passionate about it you don't even know the terminology
nathancahill has quit [Quit: nathancahill]
<banisterfiend>
spike|spiegel: watchpoints are trivial to implement, no one has requested them yet so they're not implemented. If you want watch points, file an issue. It would probably take about 1-2 hours to implement
atmosx_desktop has quit [Quit: Computer has gone to sleep.]
<awwaiid>
zendeavor, yfeldblum: yeah. I come from perl, and perl5 v10 verses perl6 has taught us that version numbers are both meaningless and a source of endless pain from outsiders :)
<yfeldblum>
concrete versions in any particular concrete versioning scheme are well-defined, so long as the scheme is well-defined
<awwaiid>
right. and the scheme for ruby uses a fourth octet of patchset
<yfeldblum>
in such a scheme, versions can be sorted (not bytewise, of course)
<davidcelis>
banisterfiend: honestly he did this on #rubyonrails too and got banned for it. he just likes to complain about asinine shit that he can't back up
<awwaiid>
ya
atmosx has joined #ruby
allsystemsarego has quit [Quit: Leaving]
<awwaiid>
thank you yfeldblum et al, I'm satisfied :)
<yfeldblum>
awwaiid, not octets
<zendeavor>
yfeldblum: 3.2.n is less than 3.10.n
<awwaiid>
yfeldblum: handwave, sorry
<zendeavor>
but not numerically
<MrZYX>
spike|spiegel: that can't be all, c'mon
<yfeldblum>
awwaiid, octet is a very specific technical term; "parts" is great for handwaving
<spike|spiegel>
well, watch_point.rb is buggy :)
<awwaiid>
s/octet/part/ then :)
<yfeldblum>
zendeavor, then, obviously, don't sort using the normal bytewise string-sort
<banisterfiend>
spike|spiegel: your personality is buggy
<yfeldblum>
awwaiid, :D
atmosx has quit [Client Quit]
<zendeavor>
how is that you'd sort those then?
<davidcelis>
spike|spiegel: then open an issue or submit a PR and make it less buggy.
henn has quit [Read error: Connection reset by peer]
`Chris` has joined #ruby
<spike|spiegel>
it's looking at hash of object to detect change: ... your object can change without change in hash.
<zendeavor>
i've not had a need to sort version strings, but an insight is always welcome
<banisterfiend>
spike|spiegel: if you were nicer about it i would have implemented them for you tonight
Lewix has quit [Remote host closed the connection]
Megtastique has quit [Quit: Megtastique]
CaptainLex has joined #ruby
xcv has joined #ruby
<yfeldblum>
zendeavor, that's specific to rubygems's versioning scheme for ruby gems, of course
<zendeavor>
break into segments, compare zero-padded
<yfeldblum>
zendeavor, but the method of defining your own <=> and including Comparable in your custom class is one of the standard templates
<apeiros>
break into segments, compare numerically
Megtastique has joined #ruby
<apeiros>
natural sorting works fine for versions
fridim_ has joined #ruby
<zendeavor>
i'm thinking linux kernel versioning here
<zendeavor>
3.2 < 3.10, but not by natural sort
<apeiros>
you can compare about all versions which stick to the same scheme by using natural sort. what you can't compare is versions of different schemes.
bradsmith has joined #ruby
Lewix has joined #ruby
Lewix has joined #ruby
Lewix has quit [Changing host]
`Chris` has quit [Ping timeout: 264 seconds]
<yfeldblum>
zendeavor, but [3, 2] < [3, 10]
<apeiros>
22:25 zendeavor: 3.2 < 3.10, but not by natural sort
<apeiros>
nonsense
<zendeavor>
numerically, 3.2 is 3.20 which is > 3.10 but versions are strings and makes it all nonsense
<apeiros>
that's exactly the point of natural sort. "3.10".natcmp("3.2") should return 1 (as in "3.10" is bigger than "3.2")
<apeiros>
zendeavor: no, versions are segmented numbers
<zendeavor>
boggle
<zendeavor>
they're version strings
_helloworld_ has joined #ruby
<apeiros>
yes, because you use a string to represent a segmented number
<yfeldblum>
zendeavor, so "3.2".split(/\./).map{|s| Integer(s)} <=> "3.10".split(/\./).map{|s| Integer(s)}
<zendeavor>
sure, you can have version strings which consist of numerical segments
kobain has quit [Ping timeout: 264 seconds]
<apeiros>
but?
<zendeavor>
but then you get silly people who append things like -p448 or use version strings like 1.0.1b
<yfeldblum>
zendeavor, there is a proper and anticipated way to sort versions, and bytewise isn't it
<apeiros>
zendeavor: that still works
`p has quit [Remote host closed the connection]
<zendeavor>
perhaps i'm confused on the meaning of "natural sort"
<yfeldblum>
zendeavor, so of course attempting to sort version strings using a bytewise sort won't give good results
bradsmith has quit [Ping timeout: 240 seconds]
<apeiros>
zendeavor: google it then
<zendeavor>
i'm accustomed to people relying on numerical sorts
<apeiros>
it means that numerical segments in a string are compared by their numerical value
<spike|spiegel>
3.10 is greater than 3.2 in natural sort. base 10+
<zendeavor>
and as i've not had a need to compare versions, i'm not equipped to really interject
<yfeldblum>
zendeavor, "natural sort" means "sorting in accordance with the meaning that humans would attribute to the byte-sequences"
ksmth has quit []
<apeiros>
you only run into problems when the versioning scheme is being changed
<zendeavor>
i will keep this in mind for future reference though, this all makes lots of sense
<spike|spiegel>
3.10 == 4 makes more sense for non-programming humans
<zendeavor>
i'm rather used to fielding "how to sort by version" questions in #bash where it's an ugly solution
<apeiros>
e.g. when you have a gem "foo" with once "1.2.3" and another time "2 alpha3", since comparing "2" with "alpha3" depends on a meaning not represented in the string itself.
Andrevan has quit []
eka has joined #ruby
<yfeldblum>
zendeavor, the answer is "shell out to ruby" :D
<apeiros>
another issue is when you have non-numeric parts which have their own ordering, e.g. "alpha", "beta", "gamma", "delta" - where "gamma" > "delta", but actual meaning is "gamma" < "delta".
<apeiros>
but the standard segmented-number versions are trivial
bradhe has joined #ruby
<zendeavor>
nah we can do the same thing with shell builtins, it's just always an ad-hoc one-time thing yfeldblum
Mattix has joined #ruby
doggfrank has quit [Quit: Computer has gone to sleep.]
ewnd9 has quit [Ping timeout: 240 seconds]
Inside has quit [Ping timeout: 276 seconds]
eka has quit [Ping timeout: 264 seconds]
<_helloworld_>
string.split(' ').each.collect { |word| little_words.include? word ? word : word.capitalize }
kaspergrubbe has quit [Remote host closed the connection]
<_helloworld_>
How do i get the above to return the word, and not true or false? It works, just give me back the wrong value
fgo has joined #ruby
bradhe has quit [Ping timeout: 264 seconds]
nbouscal has joined #ruby
`Chris` has joined #ruby
Krajsnick has quit [Remote host closed the connection]
<waxjar>
little_words.include?(word) && word
JimmyNeutron has joined #ruby
<_helloworld_>
I would still keep the else portion though right?
fgo has quit [Ping timeout: 276 seconds]
<_helloworld_>
waxjar: I changed it so that word is (word) that made all the difference
<_helloworld_>
waxjar: Thanks. I need to lookup why it worked now :)
smoothbutta has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
stuartrexking has quit [Quit: Leaving...]
stuartrexking has joined #ruby
adeponte has joined #ruby
Guest10893 has joined #ruby
rodacato has joined #ruby
jalcine has joined #ruby
<yfeldblum>
_helloworld_, because ?: (the ternary operator) hash higher precedence than application (passing an argument to a method)
gemmy has joined #ruby
<_helloworld_>
yfeldblum: Thanks. I see what youa re saying.
<yfeldblum>
_helloworld_, you were in effect doing `little_words.include?(word ? word : word.capitalize)`
dangerousdave has quit [Read error: Connection reset by peer]
<_helloworld_>
I see, so that is why it is returning the boolean value
dangerousdave has joined #ruby
<_helloworld_>
when you isolate the tenary operator it allows it to execute the rest of the statement?
s0ber_ has joined #ruby
<yfeldblum>
_helloworld_, i'm not sure what you mean
rodacato has quit [Ping timeout: 260 seconds]
hagzag_ has quit [Remote host closed the connection]
bradhe has quit [Remote host closed the connection]
querymyquery has joined #ruby
<joshu_>
I just read someone's comment on stack overflow that you can't iterate from time in Ruby 2.0 is this correct?
<querymyquery>
anyone have a recommendatino for a comment gem?
Gnubie has joined #ruby
maxmanders has joined #ruby
Kricir has joined #ruby
brennanMKE has joined #ruby
Kricir has quit [Read error: Connection reset by peer]
classix has quit [Ping timeout: 245 seconds]
bradsmith has quit [Ping timeout: 256 seconds]
Kricir has joined #ruby
rodacato has quit [Remote host closed the connection]
adambeynon has joined #ruby
<querymyquery>
or does it exist? lol
<pontiki>
joshu_: i can't make it work either, but i can if i use epocs for the ranges and compare epoc
ehc has joined #ruby
verto has joined #ruby
vince_prignano has joined #ruby
<joshu_>
pontiki what I need to do is check the current time and if it is between 8:30 - 12:00, 12:00 - 13:00 and 13:00 -17:00 depending on those three time ranges three different things will happen. How would you do this?
zigomir_ has quit [Read error: Connection reset by peer]
braoru has joined #ruby
stuartrexking has quit [Quit: Leaving...]
<pontiki>
you seriously can't make that leap from the other?
goleldar has quit [Read error: Connection reset by peer]
SHyx0rmZ has quit [Quit: ネウロイを負かさなきゃならないね]
goleldar has joined #ruby
vince_prignano has quit [Remote host closed the connection]
freerobby has quit [Quit: Leaving.]
bradsmith has joined #ruby
Krajsnick has quit [Remote host closed the connection]
kirun_ has quit [Quit: Client exiting]
<bsdbandit>
anyone using sinatra for big projects ?
rickruby has joined #ruby
<banisterfiend>
bsdbandit: no, i tried once, gave up
Lewix has quit [Remote host closed the connection]
gemmy has quit [Quit: leaving]
<bsdbandit>
yeah im reading through the sinatra book right now just trying out something differeny
<bsdbandit>
different
agjacome has joined #ruby
Guest10893 has quit [Ping timeout: 276 seconds]
kreeves has quit [Ping timeout: 240 seconds]
brennanM_ has joined #ruby
bradsmith has quit [Ping timeout: 264 seconds]
codecop has quit [Remote host closed the connection]
brennanMKE has quit [Ping timeout: 264 seconds]
vikhyat has quit [Remote host closed the connection]
daniel_hinojosa has quit [Ping timeout: 240 seconds]
agent_white has quit [Quit: leaving]
mad_hatter_1 has quit [Quit: Leaving.]
braoru has quit [Remote host closed the connection]
io_syl has quit [Read error: Connection reset by peer]
tgunr has quit [Quit: Nity nite]
MrZYX is now known as MrZYX|off
bradhe has joined #ruby
tgunr has joined #ruby
aedornm has joined #ruby
apeiros has quit [Remote host closed the connection]
bradhe has quit [Ping timeout: 245 seconds]
tgunr has quit [Quit: Nity nite]
redmaverick has joined #ruby
redmaverick has left #ruby [#ruby]
shadoi has joined #ruby
shadoi1 has quit [Read error: Connection reset by peer]
doritostains has joined #ruby
m8 has quit [Quit: Sto andando via]
<aedornm>
how's the market for web based configuration file/environment/other looking these days? I think my next open source project will be something that can handle those things since we (company wise) have a need.
Davey has joined #ruby
<zendeavor>
poor
<zendeavor>
web panels already exist and companies already use them
<zendeavor>
it's a massive headache to migrate to a different one
rubyclone has joined #ruby
<rubyclone>
hi, i need some help with warden, anybody?
platforms has quit [Quit: Coyote finally caught me]
Kricir has quit [Remote host closed the connection]
<aedornm>
zendeavor: ah.. oddly enough nothing out there does what we need but it's no surprise. We're very special snowflakes.
platforms has joined #ruby
emergion has quit [Quit: Computer has gone to sleep.]
<zendeavor>
well that shouldn't stop you from building one
<zendeavor>
i'm just saying there's not really an existing free market
Alaude_ has quit []
spider-mario has quit [Remote host closed the connection]
Kricir has joined #ruby
<aedornm>
Oh, we have to build it. This manual management thing is not working any more. But still going to open it up, maybe others will be special snowflakes too ;)
tgunr has joined #ruby
<zendeavor>
for sure, just take note your primary competitor is cpanel
<zendeavor>
huge installed userbase
tgunr has quit [Client Quit]
rubyclone is now known as kriptik
woolite64_ has joined #ruby
<kriptik>
warden anybody?
<zendeavor>
hey, if you're not using php you've got a leg up already.
slimmah has joined #ruby
mikepack has joined #ruby
ehc has joined #ruby
Mon_Ouie has quit [Ping timeout: 264 seconds]
bradhe has joined #ruby
|2yan has quit [Ping timeout: 240 seconds]
<aedornm>
heh, well, and it's meant for internal services so not a hosted solution. And not selling anything. (Definitely not php)
<zendeavor>
cpanel can be installed locally as well
woolite64 has quit [Ping timeout: 264 seconds]
tgunr has joined #ruby
vikhyat has joined #ruby
<zendeavor>
it just happens to be offered on hosted services, for the right price
woolite64 has joined #ruby
vikhyat has quit [Remote host closed the connection]
tgunr has quit [Client Quit]
<zendeavor>
kriptik: asking whether somebody uses something, or knows about something, is not going to get you any closer to solving your problem. it's highly unlikely your question must necessarily target warden experts, or indeed anyone who knows a thing about warden at all.
woolite64_ has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
mityaz has quit [Quit: See ya!]
mikepack has quit [Remote host closed the connection]
<zendeavor>
instead, skip to the part where you ask your real question accompanied by necessary details such as error messages or log outputs.
elaptics is now known as elaptics`away
echevemaster has joined #ruby
jarray52 has quit [Quit: Leaving.]
<RubyPanther>
You have to be pretty Special to need web based system management
c3l has quit [Quit: Leaving]
<kriptik>
@zendeavor thnx
threesome has quit [Ping timeout: 276 seconds]
zenergi has quit [Quit: zenergi]
vlad_starkov has quit [Ping timeout: 256 seconds]
<zendeavor>
also this is not twitter
<kriptik>
is there a way to easily configure mountable warden, example: use line to use warden, comment the use line to stop using warden?? i am lost
<RubyPanther>
I always try to at least get those sorts of Special managers onto webmin because then when they break something, I can still just ssh in and fix it. With cpanel it likes to just stomp your toes.
jalcine has quit [Excess Flood]
<zendeavor>
yeah, that's why panels aren't supported by places like #centos
Morrolan has quit [Ping timeout: 264 seconds]
emergion has joined #ruby
gstamp has joined #ruby
JZTech101 has quit [Quit: Bye]
mary5030 has quit [Remote host closed the connection]
jbpros has quit [Quit: jbpros]
justsee has joined #ruby
miclorb has joined #ruby
adeponte has quit [Remote host closed the connection]
kriptik has quit [Quit: leaving]
kaspergrubbe has quit [Remote host closed the connection]
jbpros has joined #ruby
adeponte has joined #ruby
apeiros has joined #ruby
kaspergrubbe has joined #ruby
kriptik has joined #ruby
<kriptik>
is there a way to make rack middlewares faster?
<waxjar>
write them in c?
<kriptik>
how to do that??
<zendeavor>
you sound like a middle-manager
<kriptik>
i thought ruby complies to c
<zendeavor>
you should talk to your dev team
<kriptik>
i am not a manger, i am just starting
<waxjar>
ruby does not compile to c
<zendeavor>
then you should focus on learning rather than premature optimizations
<kriptik>
bytecode, sorry
<yfeldblum>
kriptik, probably - refactor rack to stop making so darn many objects
<kriptik>
i am learning rack, i managed to do a mountable appliation yesterday, today i wanna use warden
<kriptik>
and i also wanna do somthing like a middleware that will inject a top menu in my app
<kriptik>
i also wanna do somthing like a middleware that will inject a top menu in my app
Z3tta has joined #ruby
<kriptik>
@fryguy is there a way to search the env easily and replace portions of it?
bklane has quit [Remote host closed the connection]
<kriptik>
i think of middlewares as something like facebook features.. turn it on, turn it off! am i too optimistic about this?
emergion has quit [Quit: Computer has gone to sleep.]
pzuraq has joined #ruby
<pzuraq>
trying to figure out how to convert a string to an int iff it is an int, and not a symbol
<pzuraq>
oh huh
<pzuraq>
I guess that's not the issue then...
mercwithamouth has quit [Quit: leaving]
mercwithamouth has joined #ruby
Ortuna has joined #ruby
mary5030 has quit [Remote host closed the connection]
jalcine has quit [Excess Flood]
<yfeldblum>
kriptik, a rack application handles http requests, taking as input rack-http-request-hashes and offering as output rack-http-response-arrays
jeffreylevesque has joined #ruby
miclorb has quit [Ping timeout: 276 seconds]
<yfeldblum>
kriptik, a rack application is a function A : req -> resp, and it may have side-effects
<yfeldblum>
kriptik, a rack middleware is a function M : app -> app, taking one rack application and returning another rack application
<yfeldblum>
kriptik, from one perspective, one might say a middleware "wraps" an application
Kricir has joined #ruby
<yfeldblum>
kriptik, injecting HTML fragments into HTML documents from a rack middleware is complex work
<yfeldblum>
kriptik, newrelic_rpm does it, so you can have a look at it to see how it might be done
stuartrexking has joined #ruby
LaPetiteFromage has joined #ruby
wmoxam_ has quit [Ping timeout: 245 seconds]
<yfeldblum>
kriptik, if you're building a rails application, though, that's typically best handled from a rails layout
gyre007 has joined #ruby
miclorb has joined #ruby
Shirakawasuna has joined #ruby
DonVitoCorleone has quit [Ping timeout: 245 seconds]