ap433d has quit [Remote host closed the connection]
gsav has joined #ruby-lang
tgriffin2081 has quit []
tgriffin2081 has joined #ruby-lang
yankov has joined #ruby-lang
guns has joined #ruby-lang
saxy has quit [Remote host closed the connection]
dgs has joined #ruby-lang
<dgs>
if you're using sockets in ruby, is it possible to get the source port of a tcp connection. (eg not the port you are listening on, but the port the request left the other machine on)
<JoelMcCracken>
what is miniruby?
<JoelMcCracken>
nvm, found link on mailing list reference
alvaro_o has quit [Quit: Ex-Chat]
bfreeman has joined #ruby-lang
mrsolo has quit [Quit: Leaving]
<eam>
dgs: sure, that's returned by accept
wpaulson has joined #ruby-lang
<eam>
oh wow, the ruby socket api is ugly
<eam>
it returns a string?
<dgs>
hmmm. that returns a Tcpsocket
<eam>
dgs: second thing it returns
<eam>
client, client_sockaddr = accept
bryancp has joined #ruby-lang
<eam>
but, it appears you have to unpack the string yourself. man, this is raw
<dgs>
hmm, i'm just getting an empty string
<eam>
ruby version
<eam>
?
havenn has quit [Ping timeout: 260 seconds]
WillMarshall has joined #ruby-lang
<eam>
over here it looks like I need to: client, client_sockaddr = socket.accept # client is a Socket, client_sockaddr is a String
<eam>
and then sin_family, sin_port, sin_addr = client_sockaddr.unpack("sSL")
<eam>
wtf isn't there a utility function for this
<lianj>
s = socket.accept; s.remote_address
<lianj>
s = socket.accept; s.remote_address.ip_port
<eam>
that's way nicer
<eam>
are the docs for my ruby just lame?
havenn has joined #ruby-lang
<lianj>
i just did p s.methods and s.remote_address.methods
<eam>
lianj: uh, I don't have a remote_address method for Socket
<eam>
1.9?
<JoelMcCracken>
Better question. Every time I find myself writing any kind of bash, I find that I really wish that I was writing ruby. The only way I really could do that though is with the knowledge that I could basically easily download an executable for any platform and have it up and running within a few mins
<lianj>
eam: yes
<eam>
that's probably why, I have 1.8 here
Axsuul has quit [Read error: Connection reset by peer]
<JoelMcCracken>
it cant require sudo, compiling, or anything like that
<JoelMcCracken>
does anything like this exist?
<lianj>
eam: try .peeraddr
<eam>
nope
Axsuul has joined #ruby-lang
<eam>
> client.methods.grep /addr/ => []
<eam>
I think 1.8's socket class is just hella ghetto
<eam>
as long as it's fixed in 1.9 I can't complain I guess
<ghanima>
sorry your right: reqBody = resp[url].send(:op) @jsonHeader.merge('Auth-Token' => token)
CapnKernul has joined #ruby-lang
setmeaway has quit [Quit: Leaving]
<ghanima>
drbrain: That work thanks man
<drbrain>
this will probably work: reqBody = resp[url].op sessionData.to_json, @jsonHeader.merge('Auth-Token' => token)
<ghanima>
to answer your question... this is my first pass I will be cleaning up the script after I prove function and will be removing the camelcase
d3vic3 has joined #ruby-lang
setmeaway has joined #ruby-lang
<drbrain>
you don't *have* to, but rubyists will be confused by it
<drbrain>
:D
<Defusal_>
camels in rubies?!? no compute
krz has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
<drbrain>
Defusal_: it's fine for ClassNames
CapnKernul has quit [Quit: Leaving...]
<Defusal_>
ok, i did mean lower camel case of course
khoa has joined #ruby-lang
Dreamer3 has quit [Ping timeout: 256 seconds]
gsav has joined #ruby-lang
Dreamer3 has joined #ruby-lang
S1kx has joined #ruby-lang
S1kx has quit [Changing host]
S1kx has joined #ruby-lang
dgs has quit [Ping timeout: 248 seconds]
EvilJStoker has quit [Excess Flood]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
<ghanima>
drbrain: you still around
<ghanima>
The option you gave me works but it now seems to break my function
<ghanima>
this line reqBody = resp[url].send(op); @jsonHeader.merge('Auth-Token' => token)
<ghanima>
everything after ; seems to be excluded from the method
<ghanima>
and I need that data passed to that function
rue has quit [Remote host closed the connection]
rue has joined #ruby-lang
rue|w has joined #ruby-lang
ivanoats has quit [Ping timeout: 244 seconds]
rue|w has quit [Remote host closed the connection]
khoa has quit [Read error: Connection timed out]
chimkan has joined #ruby-lang
khoa has joined #ruby-lang
sepp2k has joined #ruby-lang
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
dgs has joined #ruby-lang
CapnKernul has joined #ruby-lang
banisterfiend has quit [Remote host closed the connection]
tonni has quit [Remote host closed the connection]
nazty has quit [Ping timeout: 260 seconds]
tonni has joined #ruby-lang
EvilJStoker has joined #ruby-lang
illingsworth has joined #ruby-lang
illingsworth has quit [Remote host closed the connection]
tonni has quit [Ping timeout: 246 seconds]
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
ryanf has joined #ruby-lang
yats has joined #ruby-lang
ghanima has quit [Read error: Connection reset by peer]
nXqd has quit [Ping timeout: 246 seconds]
t27430 has quit [Remote host closed the connection]
t27850 has joined #ruby-lang
ghanima has joined #ruby-lang
towski has quit [Remote host closed the connection]
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
banisterfiend has joined #ruby-lang
nXqd has joined #ruby-lang
burgestrand has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
Cherrum has quit [Ping timeout: 245 seconds]
Cherrum has joined #ruby-lang
ivanoats has quit [Ping timeout: 244 seconds]
Guest65367 has quit [Read error: Operation timed out]
cschneid has quit [Read error: Operation timed out]
rue|w has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
nXqd has quit [Ping timeout: 256 seconds]
gsav has quit [Read error: Connection reset by peer]
vlad_starkov has joined #ruby-lang
nXqd has joined #ruby-lang
gsav has joined #ruby-lang
vlad_sta_ has joined #ruby-lang
chimkan has quit [Quit: chimkan]
<yorickpeterse>
Morning
vlad_starkov has quit [Ping timeout: 244 seconds]
t27850 has quit [Remote host closed the connection]
t57793 has joined #ruby-lang
<bnagy>
mornin
<bnagy>
ghanima: they do different things a=1,2 => [1,2] a=1; 2 is two statements
vlad_sta_ has quit [Read error: Connection reset by peer]
Guest98701 has joined #ruby-lang
lsegal has quit [Quit: Quit: Quit: Quit: Stack Overflow.]
khoa has quit [Read error: Connection timed out]
chimkan has joined #ruby-lang
Guest98701 has quit [Quit: Leaving]
khoa has joined #ruby-lang
khoa has quit [Client Quit]
vlad_starkov has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
dhruvasagar has joined #ruby-lang
dhruvasagar has quit [Remote host closed the connection]
cschneid has joined #ruby-lang
chimkan has quit [Quit: chimkan]
tonni has joined #ruby-lang
kitallis has joined #ruby-lang
dhruvasagar has joined #ruby-lang
Musfuut has joined #ruby-lang
headius has joined #ruby-lang
mytrile has joined #ruby-lang
mytrile has quit [Remote host closed the connection]
lele|w has quit [Ping timeout: 272 seconds]
ghanima1 has joined #ruby-lang
s1n4 has joined #ruby-lang
lele|w has joined #ruby-lang
ghanima has quit [Ping timeout: 260 seconds]
zmack has joined #ruby-lang
Theueip has quit [Quit: Bye!]
gsav has quit [Read error: Connection reset by peer]
saxy has quit [Remote host closed the connection]
rue|w has quit [Remote host closed the connection]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ghanima1 has quit [Ping timeout: 248 seconds]
ivanoats has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
solars has joined #ruby-lang
ghanima has joined #ruby-lang
tbuehlmann has joined #ruby-lang
Quatrerwin has quit [Quit: Leaving]
wallerdev has quit [Quit: wallerdev]
kitallis has quit [Ping timeout: 244 seconds]
thone_ has joined #ruby-lang
krz has quit [Quit: krz]
thone has quit [Ping timeout: 252 seconds]
t57793 has quit [Remote host closed the connection]
t63481 has joined #ruby-lang
Criztian has joined #ruby-lang
jxie_ has joined #ruby-lang
jxie has quit [Read error: Connection reset by peer]
rue|w has joined #ruby-lang
wallerdev has joined #ruby-lang
sn0wb1rd has quit [Quit: I will be right back]
yankov_ has quit [Quit: yankov_]
Musfuut has quit [Read error: Operation timed out]
Criztian has quit [Remote host closed the connection]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
IPGlider has joined #ruby-lang
cdt has joined #ruby-lang
rue|w has quit [Ping timeout: 260 seconds]
cschneid has quit [Ping timeout: 245 seconds]
kain has quit [Ping timeout: 248 seconds]
dous has quit [Ping timeout: 244 seconds]
Theueip has joined #ruby-lang
cschneid has joined #ruby-lang
Musfuut has joined #ruby-lang
Musfuut is now known as Guest19822
solars has quit [Ping timeout: 245 seconds]
wallerdev has quit [Quit: wallerdev]
charliesome has joined #ruby-lang
major_majors has quit [Ping timeout: 246 seconds]
nick_h has quit [Ping timeout: 246 seconds]
cout has quit [Ping timeout: 252 seconds]
t63481 has quit [Remote host closed the connection]
t51740 has joined #ruby-lang
foca has quit [Ping timeout: 260 seconds]
rking has quit [Ping timeout: 272 seconds]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
foca has joined #ruby-lang
rking has joined #ruby-lang
solars has joined #ruby-lang
cout has joined #ruby-lang
ghanima has quit [Quit: Leaving.]
ivanoats has quit [Ping timeout: 246 seconds]
jlangvand has joined #ruby-lang
foca has quit [Ping timeout: 252 seconds]
rking has quit [Ping timeout: 265 seconds]
cout has quit [Ping timeout: 268 seconds]
jstemmer_ has quit [*.net *.split]
cout has joined #ruby-lang
runeb has joined #ruby-lang
gloomer has joined #ruby-lang
foca has joined #ruby-lang
gnufied has joined #ruby-lang
rking has joined #ruby-lang
major_majors has joined #ruby-lang
nick_h has joined #ruby-lang
|Vargas| has quit [Quit: ...]
qwerxy has joined #ruby-lang
workmad3 has joined #ruby-lang
CapnKernul has quit [Quit: Leaving...]
d3vic3 has quit [Read error: Connection reset by peer]
|Vargas| has joined #ruby-lang
|Vargas| has quit [Changing host]
|Vargas| has joined #ruby-lang
Criztian has joined #ruby-lang
d3vic3 has joined #ruby-lang
cout has quit [Ping timeout: 246 seconds]
jlangvand has quit [Quit: leaving]
cout has joined #ruby-lang
t51740 has quit [Remote host closed the connection]
t30322 has joined #ruby-lang
robotmay has joined #ruby-lang
rue|w has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
rue|w has joined #ruby-lang
rue|w has quit [Remote host closed the connection]
s1n4 has left #ruby-lang ["leaving"]
burgestrand1 has joined #ruby-lang
fromhet has joined #ruby-lang
burgestrand has quit [Ping timeout: 245 seconds]
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
jstemmer has joined #ruby-lang
foca has quit [Ping timeout: 264 seconds]
major_majors has quit [Ping timeout: 260 seconds]
nick_h has quit [Ping timeout: 244 seconds]
cout has quit [Ping timeout: 245 seconds]
rking has quit [Ping timeout: 264 seconds]
cout has joined #ruby-lang
nick_h has joined #ruby-lang
toretore has joined #ruby-lang
rking has joined #ruby-lang
foca has joined #ruby-lang
dgs|2 has joined #ruby-lang
dgs has quit [Ping timeout: 260 seconds]
major_majors has joined #ruby-lang
khoa has joined #ruby-lang
rking has quit [Read error: Operation timed out]
rking has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
foca has quit [Ping timeout: 240 seconds]
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
nick_h has quit [Ping timeout: 245 seconds]
dgs|2 has quit [Read error: Connection reset by peer]
cout has quit [Ping timeout: 246 seconds]
major_majors has quit [Ping timeout: 244 seconds]
rking has quit [Ping timeout: 248 seconds]
dgs|2 has joined #ruby-lang
nick_h has joined #ruby-lang
foca has joined #ruby-lang
ivanoats has quit [Ping timeout: 246 seconds]
rking has joined #ruby-lang
vlad_starkov has joined #ruby-lang
Quatrerwin has joined #ruby-lang
Quatrerwin has quit [Changing host]
Quatrerwin has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
chendo_ has quit [Ping timeout: 252 seconds]
Virunga has joined #ruby-lang
cout has joined #ruby-lang
chendo_ has joined #ruby-lang
chendo_ has quit [Changing host]
chendo_ has joined #ruby-lang
major_majors has joined #ruby-lang
khoa has joined #ruby-lang
ryanf has quit [Quit: leaving]
foca has quit [Ping timeout: 264 seconds]
major_majors has quit [Ping timeout: 246 seconds]
nick_h has quit [Ping timeout: 265 seconds]
workmad3 has quit [Ping timeout: 245 seconds]
rking has quit [Ping timeout: 264 seconds]
cout has quit [Ping timeout: 260 seconds]
burgestrand1 has quit [Ping timeout: 244 seconds]
sandbags has joined #ruby-lang
sandbags has quit [Changing host]
sandbags has joined #ruby-lang
jbsan has quit [Quit: jbsan]
ramonmaruko has quit [Remote host closed the connection]
foca has joined #ruby-lang
rking has joined #ruby-lang
rue|w has joined #ruby-lang
workmad3 has joined #ruby-lang
cout has joined #ruby-lang
major_majors has joined #ruby-lang
ramonmaruko has joined #ruby-lang
Criztian has quit [Remote host closed the connection]
nick_h has joined #ruby-lang
t30322 has quit [Remote host closed the connection]
t91170 has joined #ruby-lang
gloomer has quit [Ping timeout: 268 seconds]
judofyr has joined #ruby-lang
khoa has quit [Read error: Connection timed out]
khoa has joined #ruby-lang
gloomer has joined #ruby-lang
celinedior has joined #ruby-lang
iani has joined #ruby-lang
adambeynon has joined #ruby-lang
cantonic has quit [Quit: cantonic]
khoa has quit [Quit: khoa]
<yorickpeterse>
whitequark: ping
<whitequark>
pong
<yorickpeterse>
So I'm dealing with parsing method parameters and bumped into this thing called a "more" parameters (https://gist.github.com/20646fe08510830b6c1c). Any idea what syntax is required for them?
<whitequark>
oh
<yorickpeterse>
parse.y isn't very helpful :?
<whitequark>
the most expanded variant of syntax would be: def F(a=1, b=2, c, *d, e, &f)
<yorickpeterse>
* :/
<yorickpeterse>
hmm
<whitequark>
note that you cannot use both a,b and *d
<whitequark>
and e is what was called the "more" parameter there
<whitequark>
i.e. a mandatory parameter after the rest argument
<yorickpeterse>
Why exactly wouldn't this be stored in the required parameters in this case?
<yorickpeterse>
since it is a required parameter
<whitequark>
because nodes are placed in lexical order?
Leeky_afk is now known as Leeky
<whitequark>
and the handling of it is indeed different from regular required parameters
<whitequark>
i.e. c would be spliced from start of argument list, and e from the end
<whitequark>
so whatever is receiving the parser state would need to know that too
aki__ has joined #ruby-lang
t91170 has quit [Remote host closed the connection]
t28914 has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
<yorickpeterse>
hmm
<yorickpeterse>
Thanks, that should get me going
<whitequark>
you're welcome
<banisterfiend>
whitequark: i wonder how difficult it would be to create a continuation on a parent stack frame, are you familiar with this part of internals?
x0F has quit [Disconnected by services]
x0F_ has joined #ruby-lang
wpaulson has joined #ruby-lang
x0F_ is now known as x0F
dhruvasagar has quit [Ping timeout: 244 seconds]
<whitequark>
banisterfiend: I guess it won't be trivial. Continuations capture the entire stack at the point of creation, so you'd need to figure out how to partially unwind the stack
<banisterfiend>
whitequark: i was thinking instead of capturing the entire stack, i could capture only from the nth parent
dhruvasagar has joined #ruby-lang
<banisterfiend>
clealry i would need to copy/paste the callcc code and modify it
<banisterfiend>
clearly*
<banisterfiend>
i just wonder if there's any other considerations..
Guest19822 has quit [Read error: Operation timed out]
<whitequark>
and, well, I guess that with some mucking with the internals you could achieve that
<banisterfiend>
not necessarily too hard, i just wonder how many static function are involved..
<whitequark>
the setjmp might pose a problem, because it captures the current %rsp which won't even nearly match the captured machine stack
<banisterfiend>
probabl a lot of copy/pasting of header structs and so on too
<whitequark>
but I'm not quite sure how is it restored
<banisterfiend>
whitequark: basically i'm trying to recover from C-level exceptions, unfortunately we can only intercept C level exceptions after they've been raised, so i was thinking if we set a continuation on the paretn stack frame prior the raise, then u could fix the issue that caused the exception and then continue
cschneid has quit [Ping timeout: 246 seconds]
<banisterfiend>
whitequark: maybe u can think of an easier way to achieve it ;)
<whitequark>
well, you would definitely need to adjust the return address in your capture_parent_cont just to make it work
<whitequark>
because continuation restoration is done through swapcontext
<judofyr>
I feel like 20% if my contributions these days is saying good morning to zzak
m3nd3s has quit [Remote host closed the connection]
<matti>
Hi judofyr
<bnagy>
normal person: that means you should contribute more; me: you could improve your ratio by being ruder
<matti>
Hi hi zzak
<judofyr>
bnagy: fuck you
<matti>
;d
<matti>
Hahah
<bnagy>
lol
<judofyr>
hey Mr. Matti
<matti>
Teh love ;]
<matti>
Hello there Sir
<injekt>
:|
<matti>
Oh dear.
<matti>
Hi injekt
<matti>
:)
<injekt>
hi matti
<injekt>
zzak, judofry, bnagy
<matti>
Ruby community is a polite one. People greet each-other.
<bnagy>
\o
<injekt>
MINASWAN
<hemangpatel>
is there any similarities between ruby & c ?
<judofyr>
Minnesota is nice and so we are nice?
<hemangpatel>
new in ruby
<injekt>
judofyr: mom is nice and so we are nice
<injekt>
close
<judofyr>
ah
<injekt>
hemangpatel: sure, there are lots of similarities between most programming languages. What are you looking for specifically?
<matti>
hemangpatel: Ruby also uses memory and requires CPU time ;]
_rohit has quit [Quit: Leaving]
<matti>
hemangpatel: There!
<matti>
;]
<hemangpatel>
is ruby a general purpose lang ?
<matti>
hemangpatel: Sure :)
<injekt>
corundum: books?
<judofyr>
hemangpatel: yes, but it's more high-level than C; you don't have much control over memory layout etc.
<corundum>
books is "The Ruby Programming Language", "Eloquent Ruby", "Programming Ruby 1.9” (‘Pickaxe’) or see http://ruby-doc.org/bookstore/
<injekt>
read the first few pages of any of them
<zzak>
judofyr and an honorable contribution it is
<hemangpatel>
So means its better than c ?
<judofyr>
hemangpatel: it's different
<zzak>
inkjet matti hi!
<judofyr>
you wouldn't use Ruby to write hardware drivers
<injekt>
lol better
<judofyr>
you wouldn't use Ruby to write performance-critical code
<judofyr>
I wouldn't use C to write web applications :)
<judofyr>
I wouldn't use C for simple scripts
<injekt>
pull up a chair
<hemangpatel>
ok
m3nd3s has joined #ruby-lang
<judofyr>
injekt: me too?
<injekt>
judofyr: sure your legs might hurt after a while otherwise
* zzak
pretends to sit, then just stands
* judofyr
pulls up a chair
jbsan has quit [Quit: jbsan]
<gnufied>
*sitting on bean bag here*
<injekt>
hipster
<gnufied>
a dot com office and writing rails and going to le mans next year
jbsan has joined #ruby-lang
<bnagy>
was that supposed to evoke sympathy or jealousy? I'm honestly not sure...
dgs has quit [Ping timeout: 252 seconds]
<injekt>
rails, must be the former
<judofyr>
#lolrails
<matti>
Hi gnufied
t9647 has quit [Remote host closed the connection]
<matti>
gnufied: I think mailing John was a bad idea (TM) :)
<gnufied>
hello matti.
t38861 has joined #ruby-lang
m3nd3s has quit []
<gnufied>
no, I spoke with john so all is good. it is just that, things move slowly here
hemangpatel has left #ruby-lang ["Leaving"]
IPGlider has quit []
carloslopes has joined #ruby-lang
jbsan has quit [Quit: jbsan]
<whitequark>
banisterfiend: it's a C extension, just not an MRI C extension
<whitequark>
you aren't required to use extconf.rb just for building MRI exts
ricardovaleriano has quit [Remote host closed the connection]
jxie_ has quit [Quit: leaving]
jbsan has joined #ruby-lang
* zzak
still waiting for inkjet to begin his talk
hackeron has joined #ruby-lang
banisterfiend has quit [Read error: Connection reset by peer]
banisterfiend has joined #ruby-lang
<andrewvos>
injekt is doing a talk?
<banisterfiend>
whitequark: it'll have all teh build settings for an MRI C ext though
<banisterfiend>
linking to libruby and so on, which i just dont need
<banisterfiend>
unless i mess with the exconf.rb to spit out my own makefile
t38861 has quit [Remote host closed the connection]
laszlokorte_ has joined #ruby-lang
t79799 has joined #ruby-lang
<rking>
andrewvos: Not IRL. A user said, "is X better than Y?" and injekt said, "Pull up a chair", as if to say such questions are nonsense to the point that it would require a lengthy explanation to get someone to stop asking them.
olivererxleben has joined #ruby-lang
stayarrr has quit [Ping timeout: 268 seconds]
<Defusal_>
heftig, please let me know when you're around
<injekt>
tehe rking
<injekt>
i like you
laszlokorte has quit [Ping timeout: 268 seconds]
<andrewvos>
rking: Ummm thanks :)
<heftig>
Defusal_: hm?
sailias has joined #ruby-lang
Axsuul has quit [Ping timeout: 268 seconds]
<Defusal_>
heftig, using SCHED_FIFO OR SCHED_RR with priority 90 or 99 is still allowing these processing to miss a small crucial time slice once in a while (very rarely, but it is noticable), any ideas why?
wyhaines has joined #ruby-lang
Jay_Levitt has joined #ruby-lang
mistym has quit [Remote host closed the connection]
Jay_Levitt has quit [Client Quit]
judofyr has quit [Read error: Connection reset by peer]
<heftig>
Defusal_: how are you measuring that?
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
judofyr has joined #ruby-lang
wyhaines has quit [Remote host closed the connection]
jbwiv has joined #ruby-lang
<Defusal_>
heftig, i was up all night testing different configuration while creating load on the other services but cannot really reproduce the rare spikes that happen multiple times a day (on probably all the services) with SCHED_FIFO or SCHED_RR
<Defusal_>
i personally have already noticed the spikes many times
<heftig>
all spike at the same time?
<Defusal_>
but i have also gotten complaints from many users
<Defusal_>
no
<Defusal_>
i don't think so
wyhaines has joined #ruby-lang
<Defusal_>
i think they happen to different services at different times
<whitequark>
banisterfiend: exactly like that
<heftig>
are you sure the bottleneck isn't somewhere else?
<heftig>
network, for example
<Defusal_>
heftig, definitely not
mistym has quit [Remote host closed the connection]
<whitequark>
File.open("Makefile", 'r') and so on
<Defusal_>
heftig, the only thing i can think of is one of the other SCHED_FIFO/SCHED_RR services is using the timeslice and not giving it up to the services when they need it very rarely
<Defusal_>
which is why i now tried changing it to SCHED_RR
<Defusal_>
heftig, i see very short FPS drops on the services but it's when those drops become longer that they are noticable
dous has quit [Ping timeout: 245 seconds]
<Defusal_>
i'm really not sure what to do about this
<heftig>
SCHED_FIFO does not use timeslices
<Defusal_>
but it is a major issuew
<Defusal_>
issue*
<Defusal_>
yeah, which is why i thought maybe at some point a number of services were using all available cores and not giving one up fast enough
totallymike has joined #ruby-lang
<Defusal_>
which is why i changed it to SCHED_RR for today
hackeron has quit [Ping timeout: 240 seconds]
<Defusal_>
otherwise i really can't understand what could cause this issue
<heftig>
the problems disappear when you reduce the load?
<Defusal_>
heftig, im pretty sure i've noticed it when load was minimal
beiter has joined #ruby-lang
<Defusal_>
it just happens very rarely
ricardovaleriano has joined #ruby-lang
<heftig>
my guess is it's not a scheduling issue
<heftig>
otherwise it would get worse with higher load
<Defusal_>
heftig, what could it be then?
<heftig>
too many variables
<Defusal_>
im can't be totally sure that it doesn't get worse at a higher load
<Defusal_>
im just saying it still happens at a reasonably low load
<heftig>
servers are badly programmed?
lcdhoffman has joined #ruby-lang
<Defusal_>
possible, but doubtful, i don't think anyone has experienced any such issue on any other providers servers
<Defusal_>
i will confirm shortly
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
t79799 has quit [Remote host closed the connection]
t49014 has joined #ruby-lang
bytephilia has joined #ruby-lang
dejongge has joined #ruby-lang
burgestrand1 has joined #ruby-lang
solars has quit [Ping timeout: 246 seconds]
Virunga has quit [Read error: Connection reset by peer]
Kero has quit [Ping timeout: 246 seconds]
Kero has joined #ruby-lang
burgestrand has quit [Ping timeout: 268 seconds]
ivanoats has quit [Ping timeout: 246 seconds]
havenn has quit [Remote host closed the connection]
mistym has joined #ruby-lang
mistym has quit [Changing host]
mistym has joined #ruby-lang
havenn has joined #ruby-lang
sandbags has quit [Remote host closed the connection]
lcdhoffman has quit [Quit: lcdhoffman]
totallymike has quit [Quit: WeeChat 0.3.7]
m3nd3s has joined #ruby-lang
yats has quit [Read error: Connection reset by peer]
yats has joined #ruby-lang
voker57 has quit [Read error: Connection reset by peer]
havenn has quit [Ping timeout: 244 seconds]
sailias has quit [Ping timeout: 244 seconds]
t49014 has quit [Remote host closed the connection]
t40437 has joined #ruby-lang
solars has joined #ruby-lang
My_Hearing has joined #ruby-lang
burgestrand1 is now known as burgestrand
ricardovaleriano has quit [Remote host closed the connection]
Jay_Levitt has joined #ruby-lang
stardiviner has joined #ruby-lang
Mon_Ouie has quit [Ping timeout: 264 seconds]
rue_XIW has quit [Remote host closed the connection]
enroxorz-work has joined #ruby-lang
enroxorz-work has quit [Changing host]
enroxorz-work has joined #ruby-lang
My_Hearing is now known as Mon_Ouie
rue|w has joined #ruby-lang
dhruvasagar has quit [Ping timeout: 245 seconds]
<Defusal_>
heftig, yeah theres definitely still small spikes when at minimal load
<mfn>
I just fired up "binding.pry" in the middle of my problem app, I see the nicely colored source. How do I proceed, i.e. "execute next command" or line or whatever? Looked at the output of "help" and it didn't came to me ...
<judofyr>
mfn: ^D
<judofyr>
Ctrl-D
<mfn>
then I leasve the session and it continues; but I only want it to executed the next command/function/step/method ...
<banisterfiend>
mfn: you want to move to the next line ?
<mfn>
banisterfiend: using it for debugging; I put bindung.pry where I want to jump in and then step through my app, inspecting objects, etc.
<banisterfiend>
mfn: you need the pry-debugger plugin
<mfn>
ops
<judofyr>
mfn: there's a plugin for that! :)
<banisterfiend>
then you get break/next/step/continue/
rue|w has quit [Remote host closed the connection]
<mfn>
thanks, installing right now. weird, I thought this was always part of pry; were there earlier version already including the debugger stuff? because I could swear I've used pry a long time ago with this out of the box. but maybe I just get old
rue|w has joined #ruby-lang
<judofyr>
mfn: I have that feeling all the time
t40437 has quit [Remote host closed the connection]
t48295 has joined #ruby-lang
<banisterfiend>
mfn: naw, we dont include that by default because we wanted the core of pry to work on all implementations, but debugging stuff (next/step/up/down) is kind of implementation dependent
<banisterfiend>
hopefully we'll bake it in after we write versions of pry-debugger for each of the major implementations
<steveklabnik>
zenspider: I ended up making the lazy stuff work. it was annoying because of over-mocking, so I moved to integration... but it works now.
<steveklabnik>
zenspider: thanks
qwerxy has quit [Ping timeout: 244 seconds]
qwerxy has joined #ruby-lang
<judofyr>
I always mock my mocks, y'know, just to be sure
|Vargas| has quit [Quit: ...]
<steveklabnik>
:p
runeb has quit [Remote host closed the connection]
gloomer has quit [Ping timeout: 245 seconds]
<judofyr>
steveklabnik: how's life these day? when did you start joining IRC again btw?
<steveklabnik>
writing your own fake actionpack: i dont agree with it
<steveklabnik>
life's good!
<steveklabnik>
about two weeks ago ish
<steveklabnik>
still going to waay too many conferences
<judofyr>
17:08 steveklabnik: writing your own fake actionpack: i dont agree with it
<steveklabnik>
ah
<steveklabnik>
because then you write code that should work, but doesn't. because you're lying.
<steveklabnik>
as for erector
<steveklabnik>
i dunno
<steveklabnik>
it seems okay i guess, if you want ruby views
<judofyr>
wat? lying? :S
<judofyr>
oh, I think I see your point
<judofyr>
well, you just have to stop thinking about the view as something that belongs to the request/response
<judofyr>
makes it easier for scaling too (e.g. Reddit always precomputes views outside the req/res-cycle)
solars has quit [Ping timeout: 244 seconds]
<judofyr>
but anyway, I don't really care about this idea; it's working for me :)
<zzak>
steveklabnik: hollywood eh? another east-coaster gone :(
fgomez has joined #ruby-lang
<steveklabnik>
it's more that i think that dumb templates + view model matches how i think about the point better
<steveklabnik>
s/point/problem
rolfb has joined #ruby-lang
<steveklabnik>
zzak: hey! just treat it like when you dissapeared for a year :p
<mfn>
I use Nokogiri and find three methods for Nodes which, in one case for me, seem to do the same: #content, #text, #inner_text . All of them return me plain text (no HTML) of the node; is there supposed to be a difference?
nXqd has quit [Ping timeout: 244 seconds]
L0rdShrek has joined #ruby-lang
<zzak>
ouch
wmoxam has joined #ruby-lang
wmoxam has quit [Changing host]
wmoxam has joined #ruby-lang
<zzak>
steveklabnik: its good to be back, glad youre on irc again too
bfreeman has quit [Quit: bfreeman]
m3nd3s has joined #ruby-lang
king_warr has joined #ruby-lang
t4743 has quit [Remote host closed the connection]
lsegal has joined #ruby-lang
t54881 has joined #ruby-lang
savage- has joined #ruby-lang
goshakkk has quit [Ping timeout: 244 seconds]
king_warr has left #ruby-lang [#ruby-lang]
kain has joined #ruby-lang
jxie has joined #ruby-lang
ap433d has joined #ruby-lang
goshakkk has joined #ruby-lang
kain has quit [Client Quit]
kain has joined #ruby-lang
<steveklabnik>
<3
kain has quit [Remote host closed the connection]
g0bl1n has joined #ruby-lang
saxy has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
kain has joined #ruby-lang
kain has quit [Remote host closed the connection]
kain has joined #ruby-lang
dous has joined #ruby-lang
dous has quit [Changing host]
dous has joined #ruby-lang
fgomez has quit [Quit: Lost terminal]
zmack has quit [Remote host closed the connection]
gnufied has quit [Quit: Leaving.]
gsav has joined #ruby-lang
<rolfb>
any recommendations on a well executed code blog?
ap433d has quit [Remote host closed the connection]
erichmenge has joined #ruby-lang
alvaro_o has joined #ruby-lang
gnufied has joined #ruby-lang
justinmcp has quit [Remote host closed the connection]
<ivanoats>
It's from a Rails app called Instructure Canvas - a learning management system
<steveklabnik>
i think
<ivanoats>
i thought so too but YAML.parse didn't seem to get it, I can post output of that too
<steveklabnik>
yeah, one or two bits look slightly strange
CarlB_the_great has joined #ruby-lang
<judofyr>
seems pretty YAML to me
<judofyr>
no problems parsing it here
Leeky_afk has joined #ruby-lang
Paul-Atreides is now known as enroxorz
<judofyr>
1.9.3 + Psych
fgomez has joined #ruby-lang
<judofyr>
ivanoats: are you on 1.8.7?
<manveru>
encoding issue?
<ivanoats>
this app, yes. generally no. I'm trying to recover some data right from the DB
<ivanoats>
can't get the old version of the app to run. and my rails course quizzes are stuck in it :( I had a backup but should have done a course export
<ivanoats>
oh, there's an #canvas-lms channel. I should just ask there
<ivanoats>
thanks all
<manveru>
oO
<manveru>
i'm sure this is making some sense to somebody, but ivanoats sounds like a markov chain to me :(
tonni has quit [Remote host closed the connection]
* ivanoats
changes state
<steveklabnik>
...makes sense to me.
<manveru>
see :)
elux has joined #ruby-lang
<judofyr>
...makes state to me.
* ivanoats
processes my Bernoullis
Leeky_afk is now known as Leeky
totallymike has joined #ruby-lang
fgomez has quit [Ping timeout: 256 seconds]
NemesisD has joined #ruby-lang
robotmay_ has quit [Remote host closed the connection]
qwerxy has quit [Ping timeout: 244 seconds]
fgomez has joined #ruby-lang
<NemesisD>
hi all. i noticed when running bundle install that a native library fails to compile. it can't find libmpc.so.2, it turns out i have libmpc.so.3. is there something to be done to make it use the correct library? i'm guessing symlinking is a bad idea
qwerxy has joined #ruby-lang
<darix>
NemesisD: check where the symlink for libmpc.so points
<darix>
normally linking is done via the unversioned symlink
<NemesisD>
darix: it was pointing to libmpc.3.0.0
t54881 has quit [Remote host closed the connection]
<darix>
can you copy paste the exact error message to paste site?
<NemesisD>
it would seem like it went directly for libmpc.so.2, i made a symlink libmpc.so.2 <- libmpc.so.3 and i was able to install the gem successfully, though it makes me uneasy for obvious reasons
ricardovaleriano has quit [Remote host closed the connection]
ricardovaleriano has joined #ruby-lang
vlad_starkov has quit [Remote host closed the connection]
qwerxy has joined #ruby-lang
lcdhoffman has joined #ruby-lang
banisterfiend has quit [Ping timeout: 246 seconds]
banisterfiend has joined #ruby-lang
ricardovaleriano has quit [Ping timeout: 245 seconds]
<MrPunkin>
andrewvos: right, but do any of those run as bash, vs just sh?
hkhalidh has quit []
naz has quit [Ping timeout: 252 seconds]
rue_XIV has joined #ruby-lang
ivanoats has joined #ruby-lang
ivanoats has quit [Changing host]
ivanoats has joined #ruby-lang
ivanoats has quit [Remote host closed the connection]
saxy has quit [Remote host closed the connection]
malev has joined #ruby-lang
rue has quit [Ping timeout: 256 seconds]
<eam>
MrPunkin: you can chose your shell by saying system "/bin/sh", "-c", yourcmd
<eam>
there is no "current shell" though
<eam>
ruby doesn't run within a shell
<eam>
MrPunkin: can you describe your end goal in a bit more detail?
<MrPunkin>
eam: trying to get STDOUT from passenger-status within a ruby script to send data to collectd
<MrPunkin>
but have RVM installed, and passenger-status needs to run within the bash environment and using rvmsudo apparently
AlHafoudh has quit [Quit: Computer has gone to sleep.]
<eam>
ok. It sounds like you want to invoke the standard shell of the user who ran the script, and you want to invoke a login shell (parsing the dotfiles where RVM environment is set)
<eam>
is that accurate?
wmoxam has quit [Ping timeout: 268 seconds]
CoverSlide has quit [Ping timeout: 252 seconds]
<eam>
MrPunkin: in this case ENV["SHELL"] most likely has the shell you want
<eam>
and if not, Etc.getpwnam(ENV["USER"]).shell
qwerxy has quit [Quit: offski]
<MrPunkin>
eam: yes, needs to be a bash shell
mistym has quit [Remote host closed the connection]
<eam>
MrPunkin: then, you probably want to run something like: system user_shell, "-i", "-c", command_string
<eam>
you can just run the shell you want
<MrPunkin>
yeah. I need to capture STDOUT so I've been using the back tick method, but it isn't working properly.
<bougyman>
drbrain: yes, but if it's already text you can't File.readlines it
<bougyman>
more like: irb(main):008:0> "aoiudfudasf\nasoidufasjdfads\n".lines.entries.last
<bougyman>
=> "asoidufasjdfads\n"
<drbrain>
[/(.*)\Z/, 1]
t48487 has quit [Remote host closed the connection]
<drbrain>
rather, string[/(.*)\Z/, 1]
t81309 has joined #ruby-lang
Leeky_afk is now known as Leeky
qpingu has quit [Quit: Leaving.]
<drbrain>
lines.entries.last creates too much garbage
<eam>
worth pointing out that optimizing for speed is different than optimizing for readability
qpingu has joined #ruby-lang
<eam>
do the latter until the former is shown to matter
BigFatFatty has joined #ruby-lang
<bougyman>
i mentioned the inefficiency. regex is a fairly heavy thing, too.
<bougyman>
of coure #lines may be using regex, too.
Carnage\ has quit []
goshakkk has quit [Quit: Computer has gone to sleep.]
qwerxy has joined #ruby-lang
<drbrain>
using lines.entries.last is reaching through too many objects, a Demeter violation
RomyRomy has quit [Quit: RomyRomy]
<MrPunkin>
I ended up simply using regex
<MrPunkin>
thanks though
<MrPunkin>
still can't seem to get what I need even with IO.popen… can't initialize my RVM shell within my bash -c call… something is happening
Leeky is now known as Leeky_afk
loincloth has quit [Remote host closed the connection]
<havenn>
MrPunkin: I'm benchmarking #split("\n").reverse_each.first as faster than regex. >.> https://gist.github.com/3519999
<eam>
drbrain: not sure that's applicable to primitives (or what qualifies as them in ruby)
<eam>
hard to say any object shouldn't access Array
bfreeman has quit [Quit: bfreeman]
<drbrain>
eam: I didn't say that
<eam>
am I misunderstanding the meaning of Demeter violation?
<drbrain>
getting the last line by asking for the string's line enumerator's array's last element is definitely a violation
<MrPunkin>
havenn: thanks. This is on an interval run to simply read output of a shell script so I'm not THAT into how long it takes but may switch it up anyways.
<eam>
yeah, I don't think that applies to fundamental classes
<drbrain>
that's too many collaborators in your method that does other stuff
<drbrain>
it's fine to put that somewhere else and say invoke last_line(string)
vlad_starkov has joined #ruby-lang
<drbrain>
… and bougyman's first example, starting from File.read, takes a rather circuitous route to get the last line
<MrPunkin>
I don't think I'm setting that anywhere, but could use a second pair of eyes for sure
<whitequark>
you don't
<whitequark>
well, in case it won't work on 1.9 I could help
<whitequark>
I literally didn't touch 1.8 for years
<whitequark>
I doubt it would even compile on my system.
<MrPunkin>
the only prob is my 1.9 install requires my RVM stuff which is just too hard to get working in this environment. I'll try go go back to it though I guess.
ootoovak has joined #ruby-lang
<eam>
MrPunkin: does your regex not match at *all*? or does it match the wrong thing?
<eam>
pastebin the output, if you can
<MrPunkin>
it isn't returning any match data in this script
<MrPunkin>
the second half for the memory stats works fine
<eam>
what's the full line.inspect output?
<MrPunkin>
but the first half isn't working
qpingu has quit [Quit: Leaving.]
<MrPunkin>
of all lines from the loop, or a single line?
<eam>
all
<MrPunkin>
one sec
<MrPunkin>
reload gist eam
fgomez has quit [Ping timeout: 244 seconds]
<MrPunkin>
so those first set of lines are what I'm trying to capture, which works fine in 1.9.3
macmartine has quit [Ping timeout: 264 seconds]
khoa has quit [Read error: Connection timed out]
ootoovak has quit [Quit: ootoovak]
<eam>
MrPunkin: I think your problem is that String.match doesn't take a block in 1.8
<MrPunkin>
how come the second half works then?
Brainix has joined #ruby-lang
<MrPunkin>
the memory one
<eam>
collect the return value instead
<MrPunkin>
oh wait, it's not,
<MrPunkin>
okay… gotcha
<eam>
bam
<MrPunkin>
let me try
wmoxam has joined #ruby-lang
<MrPunkin>
eam: now it's saying my variable I'm storing the return val in is nil
<MrPunkin>
so no match
Virunga has quit [Quit: Sto andando via]
t81309 has quit [Remote host closed the connection]
t95341 has joined #ruby-lang
<eam>
MrPunkin: every time? Most of your lines don't match
<eam>
some of them ought to
<MrPunkin>
it should match lines 2-6
<MrPunkin>
which is all I need
<MrPunkin>
and pull out the relevant name and value from each line
<MrPunkin>
I get no matches, however.
<MrPunkin>
well wait, ugh
<MrPunkin>
never mind, I'm being dumb again
titaniumNoob has joined #ruby-lang
nXqd has joined #ruby-lang
qwerxy has quit [Quit: offski]
JoshWines has joined #ruby-lang
havenn has quit [Remote host closed the connection]
wyhaines has quit [Remote host closed the connection]
m3nd3s has joined #ruby-lang
qpingu has joined #ruby-lang
S1kx has quit [Ping timeout: 260 seconds]
wpaulson has joined #ruby-lang
wpaulson has quit [Read error: Connection reset by peer]