jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nettoweb has joined #ruby
toretore has joined #ruby
<ruby785>
I'm currently trying to implement insertion sort in Ruby - it works fine, but anytime I have it compare numbers of two different lengths - like 2 and 78, it won't recognize that 78 is larger than 2, and keep it in place. Thus the rest of my array is sorted except for where the 2 is.
pawnbox has quit [Ping timeout: 252 seconds]
cyphase has quit [Ping timeout: 252 seconds]
CloCkWeRX has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
ruby785 has quit [Ping timeout: 240 seconds]
rodfersou has joined #ruby
Channel6 has joined #ruby
lifted has quit [Quit: lifted]
cdg has joined #ruby
Snowy has quit [Remote host closed the connection]
Snowy has joined #ruby
elenatanasoiu has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
Snowy has quit [Ping timeout: 256 seconds]
pwnd_nsfw has quit [Read error: Connection reset by peer]
pwnd_nsfw has joined #ruby
rakm has joined #ruby
elenatanasoiu has quit [Ping timeout: 256 seconds]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nettoweb has quit [Ping timeout: 252 seconds]
ur5us has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
Bellthoven has quit []
pawnbox has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
cyphase has joined #ruby
gnufied has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
TPug has joined #ruby
JeanCarloMachado has quit [Ping timeout: 256 seconds]
<rakm>
anyone know any ruby libs to parse a python setup.py file ?
duderonomy has joined #ruby
cyphase has quit [Ping timeout: 252 seconds]
brianpWins_ has joined #ruby
dtscode has joined #ruby
optiz0r has quit [Ping timeout: 272 seconds]
inteq has joined #ruby
pragmaticus has quit [Ping timeout: 264 seconds]
rodfersou has quit [Quit: leaving]
zukin has joined #ruby
brianpWins has quit [Ping timeout: 264 seconds]
brianpWins_ is now known as brianpWins
hiro_ has quit [Ping timeout: 240 seconds]
cyphase has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jaguarmagenta has joined #ruby
Coldblackice has joined #ruby
Coldblackice has quit [Max SendQ exceeded]
TPug has joined #ruby
babblebre has quit [Quit: Connection closed for inactivity]
pwnd_nsfw has quit [Read error: Connection reset by peer]
jaguarmagenta has quit [Ping timeout: 272 seconds]
pwnd_nsfw has joined #ruby
ichkv has joined #ruby
duncannz has quit [Ping timeout: 256 seconds]
|ifei5good has joined #ruby
blackmesa has joined #ruby
|ifei5g00d has quit [Ping timeout: 272 seconds]
johnmilton has quit [Ping timeout: 264 seconds]
jaguarmagenta has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
duderonomy has quit [Ping timeout: 272 seconds]
luong has joined #ruby
inteq has quit [Read error: Connection reset by peer]
h1fuelcell has joined #ruby
inteq has joined #ruby
eljimbo has joined #ruby
TPug has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
eljimmy has quit [Ping timeout: 264 seconds]
blackmesa has quit [Ping timeout: 264 seconds]
h1fuelcell has quit [Ping timeout: 272 seconds]
FINbit has joined #ruby
duncannz has joined #ruby
blandflakes has joined #ruby
nankyokusei has joined #ruby
johnmilton has joined #ruby
blandflakes has quit [Client Quit]
FINbit has quit [Ping timeout: 256 seconds]
x0f has quit [Ping timeout: 256 seconds]
eljimmy has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 244 seconds]
x0f has joined #ruby
bovis has joined #ruby
eljimbo has quit [Quit: This computer has gone to sleep]
eljimbo has joined #ruby
eljimbo has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
TPug has joined #ruby
harai has quit [Ping timeout: 252 seconds]
GodFather has quit [Ping timeout: 265 seconds]
<bovis>
Is it considered good practice to call global constants from a separate class, such as Environment::FILENAME, when referencing those values in a working class? I'm new, so the syntax seems bloated, perhaps bc of the ALL CAPS, but trying other options such as using a module to store the globals seems to have its headaches.
<bovis>
toretore: once, I fooled with inheritance for those values, but that doesn't solve them being globals, and it takes up the only space I'm allowed (no multiple inheritance)
<bovis>
ok
hahuang62 has joined #ruby
<toretore>
no, inheritance is not going to do you any good in this case
crankharder has quit [Ping timeout: 272 seconds]
aries_liuxueyang has quit [Quit: No Ping reply in 180 seconds.]
<bovis>
toretore: I'd like to avoid having to change the 'path/to/file' in all cases where that would be listed... my tasklist file alone is mentioned ~5 times
<bovis>
and this is a small program
aries_liuxueyang has joined #ruby
<toretore>
that doesn't have anything to do with how Operations gets to know about it
<toretore>
what language are you coming from?
<bovis>
I have only a basic grasp of C otherwise
<toretore>
ok. do you understand how classes, instances and their state works?
BTRE has quit [Remote host closed the connection]
<bovis>
classes hold methods and are supposed to contain methods that pertain to specific ideas, such as my Operations containing methods that complete user-defined tasks
<bovis>
instances allow you to access the methods in classes, so like instance=Operations.new gives me access to my add, list, etc. methods
<bovis>
instance.add
<bovis>
and I can pass values to add, though my program doens't support that yet
<bovis>
I don't know about state
Madplatypus has quit [Quit: Connection closed for inactivity]
<toretore>
without state, there is no point in creating instances
<toretore>
that's the way you're using classes right now, and you might as well just use top-level methods
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<matthewd>
A class ties a set of methods to a set of related data (the instance state -- what you might put in a struct in C)
<bovis>
toretore, matthewd: you're talking about initializing variables, attr_reader and so on?
JoshS has joined #ruby
<bovis>
toretore, matthewd: it's clear I don't use those in the program yet
<toretore>
bovis: for now, just remove all the class statements surrounding your methods and constants and use them directly
<toretore>
they serve no purpose
<matthewd>
bovis: Well I'm not sure how to answer a question about good practice if the only acceptable answers involve the things you're already doing :/
<toretore>
later, when you learn more about them, you can refactor
A_Drone has joined #ruby
<bovis>
toretore: the program looked before like you described, with just methods that performed various tasks
<bovis>
toretore: I used the classes to hopefully give it some categorization
<bovis>
apparently incorrectly
<matthewd>
If you're not up to that point yet, that's fine... but the answer to your question remains: no, this is not good practice [and perhaps a later chapter will move you further in that direction]
<toretore>
bovis: the point is that classes aren't just things you can use to lump a bunch of methods together
braincrash has quit [Quit: bye bye]
<bovis>
toretore: I'm just making headaches for myself by putting more blocks in my way to getting to the variables/data I need?
<toretore>
if you want to use classes properly, you'll have to read up on how they work, how instances store state
<matthewd>
And perhaps further: if you're working through a book and it's introducing things piecemeal (as it necessarily must do, of course), it's probably not worth worrying too much about whether your first few rounds look elegant -- you're not working with a full set of tools yet, so things are going to feel clunkier
<toretore>
you are until you understand what it is you're working with
<bovis>
matthewd: I only commented on the clunkiness of its because it felt awkward to do what I was doing, and sometimes the awkward move can be the wrong one
<matthewd>
bovis: Yep, that's fair
TPug has joined #ruby
<matthewd>
So is your current objective to include a class, per the comments up the top?
<bovis>
matthewd, toretore: I feel like the program works OK with a bunch of methods defined and eliminating the classes; it worked that way before what you can see with the classes involved
<bovis>
matthewd, toretore: my objective is to take this program and hopefully change it according to the chapters in the well-grounded rubyist as various topics arise
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<matthewd>
Right. But is "use a class" a current objective?
<bovis>
matthewd: as you pointed out, it can be piecemeal; this obviously is causing me some confusion and perhaps moving me out of my scope regarding what the program demands at this point
<bovis>
matthewd: yes; however incorrect that may be, it's why I've tried to include them
<matthewd>
Okay, cool. Let's look for a good class to include :)
<matthewd>
Classes represent things; they're nouns, and their methods are verbs that act upon the instance.
armyriad has quit [Read error: Connection reset by peer]
<matthewd>
(so, not just a grouping of related functions)
watersoul has quit [Ping timeout: 265 seconds]
<bovis>
matthewd: then perhaps listing the nouns would be a good start?
<matthewd>
Yup
armyriad has joined #ruby
<matthewd>
Particularly, the ones who might reasonably be asked to do the things we want to do
<matthewd>
e.g., I would venture that a TaskList might be a good candidate on which to call #add
<matthewd>
Note it's no longer a 'global' add method -- it's "add a thing to this particular task list"
astrobunny has joined #ruby
Channel6 has quit [Ping timeout: 272 seconds]
<bovis>
matthewd: Tasklist in that fashion would also include the remove and update methods, right? Though maybe I should remove list, which isn't a task to perform on the list itself; it's more of a user curiousity.
<matthewd>
Right.
Channel6 has joined #ruby
<matthewd>
For this round, I think list is okay on there
watersoul has joined #ruby
pawnbox has joined #ruby
etehtsea has joined #ruby
<matthewd>
Ultimately, you'll generally want to separate UI concerns like talking to the user from the things that manipulate your domain objects -- so add would live in two halves, for example. And at that point, maybe list only lives in the UI.
blackmesa has joined #ruby
cdg_ has joined #ruby
<bovis>
matthewd: (As an aside: Is it fine for some of my methods to live outside of classes?)
<bovis>
I feel like I got myself into trouble trying to put them somewhere. But maybe I just didn't have the "classes as nouns" concept in the right place?
<matthewd>
For now, definitely. As they coalesce together and more shared state becomes visible, most will normally end up in classes... or in modules.
<toretore>
bovis: as you get better at creating classes, none of your methods will be outside of a class, but there is no harm in doing so in the beginning
<bovis>
toretore: ok
cdg has quit [Ping timeout: 256 seconds]
braincrash has joined #ruby
<bovis>
matthewd, toretore: Other nouns I see are the files themselves. Maybe the user.
<bovis>
..and maybe permissions?
pawnbox has quit [Ping timeout: 256 seconds]
<bovis>
But Entrance as a class doesn't do anything useful.
twalla has joined #ruby
<toretore>
you are on to something with Entrance, but maybe it should be something like Application or CommandParser
cdg_ has quit [Remote host closed the connection]
<toretore>
i.e. a loop that asks for input from the user and executes the desired action
Devalo has joined #ruby
<matthewd>
UserInterface#run, perhaps
blackmesa has quit [Ping timeout: 265 seconds]
rakm has joined #ruby
<matthewd>
And the other kind-of important one would be Task :)
<bovis>
toretore: Are you saying that it would be better for the hypothetical CommandParser simply because it can execute an action? This is opposite of what my Entrance does, where it just leads the user in a blind way. The benefit with the change being that CommandParser invites itself to similar user actions, whereas now I have a vague blob.
<bovis>
matthewd: The Task class wouldn't be like the TaskList we mentioned earlier, which included add, delete?
<matthewd>
Right. So far, it seems to have some data fields, but maybe no behaviour unto itself.
igniting has quit [Ping timeout: 256 seconds]
nettoweb has joined #ruby
JoshS has quit [Read error: Connection reset by peer]
jshjsh has joined #ruby
<matthewd>
It probably knows how to format its fields into a string, ready to be written to a file, though
jshjsh is now known as JoshS
<bovis>
matthewd: TaskList#add would have to call Task for the name of a task and its date to be written to a file?
tuxaddicted has quit [Ping timeout: 252 seconds]
<bovis>
Why not cram all that into TaskList#add?
<matthewd>
TaskList#add would construct a Task, then write it to a file
chrisgopher has joined #ruby
<matthewd>
Separation of responsibilities -- keeps each chunk of code to a manageable size. The TaskList is busy knowing how to read and write files... it doesn't need to worry about how best to format a Task.
nettoweb has quit [Ping timeout: 252 seconds]
gix has quit [Ping timeout: 252 seconds]
optiz0r has joined #ruby
chrisgopher has quit [Client Quit]
chrisgopher has joined #ruby
<chrisgopher>
hello
<havenwood>
chrisgopher: welcome
<bovis>
matthewd: I guess then I'm confused about how I get information from Task to TaskList
nettoweb has joined #ruby
<matthewd>
You can leave it for now, I'm probably running too far ahead. Small steps.
<bovis>
matthewd: TaskList#add calls something like Task.name to grab the name of the user's desired task to add?
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<bovis>
ok
SteenJobs has joined #ruby
tuxaddicted has joined #ruby
fuzzyhorns has quit [Read error: Connection reset by peer]
fuzzyhorns has joined #ruby
gix has joined #ruby
<bovis>
matthewd, toretore: Anything else to add before I go dismantle some things?
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
dtscode has joined #ruby
twalla has quit [Ping timeout: 272 seconds]
<matthewd>
I don't think so. I guess don't try to add too many classes at once -- so, not necessarily for all the nouns we found. But as you look at where to put methods, that's when I'd look to the noun list to see which one should "do" that thing.
A_Drone has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
A_Drone has joined #ruby
<bovis>
matthewd, toretore: thanks for the help
arescorpio has quit [Quit: Leaving.]
<matthewd>
You're welcome :)
chrisgopher has quit [Remote host closed the connection]
Asher has quit [Quit: Leaving.]
chrisgopher has joined #ruby
Asher has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
elenatanasoiu has joined #ruby
chrisgopher has quit [Client Quit]
ChiefAlexander has joined #ruby
dtscode is now known as crouchingtigerhi
crouchingtigerhi is now known as hidtsden
pawnbox has joined #ruby
elenatanasoiu has quit [Ping timeout: 264 seconds]
ChiefAlexander has quit [Client Quit]
A_Drone has quit [Ping timeout: 265 seconds]
gnufied has quit [Ping timeout: 256 seconds]
pawnbox has quit [Ping timeout: 244 seconds]
ur5us_ has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
craigp_ has quit [Ping timeout: 272 seconds]
twalla has joined #ruby
A_Drone has joined #ruby
ZeroTresBR has joined #ruby
twalla has quit [Ping timeout: 244 seconds]
aries_liuxueyang has quit [Ping timeout: 252 seconds]
A_Drone has quit [Remote host closed the connection]
nettoweb has joined #ruby
tuxaddicted has quit [Ping timeout: 265 seconds]
ur5us has joined #ruby
ur5us_ has quit [Ping timeout: 264 seconds]
tuxaddicted has joined #ruby
RTFM[away] has quit [Ping timeout: 244 seconds]
chrisgopher has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
Well, not empty in the sense that :"" is also a symbol :P
<dminuoso>
But I get what you mean
jenrzzz has joined #ruby
<apeiros>
[] is an array, yet it's an empty array.
<apeiros>
the same way :"" is an empty symbol, and "" is an empty string
<apeiros>
I'd say the wording is correct
<dminuoso>
apeiros: Im not sure a "symbol" can be empty. The question of whether something is emtpy makes only sense for something that is a collection of things.
<ljarvis>
the biggest thing to me is still that i'd prefer parens required a first class methods
<dminuoso>
apeiros: a string is a collection of characters, so the notion of "emptiness" makes sense
<dminuoso>
but a symbol is basically just an internal numer
<dminuoso>
*number
<ljarvis>
elixir is almost the perfect language for me, and it's also missing this
<ljarvis>
it's no coincidence my toy language *everything* is a function
ctp has joined #ruby
blaxter has joined #ruby
<dminuoso>
sounds functional.
mvxlr has quit [Client Quit]
<dminuoso>
I should get into Haskell development.
<baweaver>
I'm doing bad things to hashes again
charliesome has joined #ruby
<apeiros>
dminuoso: and an array is internally a pointer + a counter. it can still be empty.
Burgestrand has joined #ruby
mvxlr has joined #ruby
<dminuoso>
apeiros: Im not talking about "how its implemented" but rather "what it is"
<dminuoso>
apeiros: I mean what is a symbol to you?
<dminuoso>
it's definitely not a string.
<apeiros>
dminuoso: I agree with you that it is a number. but that's an implementation detail.
<apeiros>
the exhibited and observed behaviour is that of an identifier, which is stringlike.
<apeiros>
and that's what it is used for too
<apeiros>
"I call the method with the name 'foo'"
<apeiros>
not "I call the method with the number 12314"
<dminuoso>
apeiros: I don't think an "identifier can be empty"
<dminuoso>
apeiros: the string representation for the identifier can be.
<apeiros>
I disagree.
<dminuoso>
Mmm
<apeiros>
it's identifier is the empty identifier. makes sense to me.
<dminuoso>
09:54 < apeiros> dminuoso: I agree with you that it is a number. but that's an implementation detail.
<dminuoso>
apeiros: symbols are ruby internals exposed to the user
<apeiros>
I know
<apeiros>
its internals for naming things. not numbering.
<apeiros>
it does associate a number with the name for performance reasons. i.e. implementation detail.
<ljarvis>
:/
<apeiros>
of course from the runtime's PoV, it's more a number with a string than a string with a number. but again, as said, that's now how as you're using it as a programmer
<ljarvis>
this is not fun party talk
<apeiros>
ljarvis: fun party talk is over in #ruby-offtopic :)
<ljarvis>
no no it can be fun in here too
<dminuoso>
apeiros: You make a valid point there. It's purely a matter of perspective I guess.
<apeiros>
can tell you about my "friend ships" which go to "party" with my neighbours in stellaris :D
djbkd has quit [Remote host closed the connection]
<ljarvis>
but this, this pedant talk isn't
<ljarvis>
ha
Qommand0r has quit [Ping timeout: 256 seconds]
<apeiros>
dminuoso: I think we can savely stop at "we disagree" ;-)
<matthewd>
> SyntaxError: compile error: empty symbol literal
<matthewd>
Oh, for simpler times
<apeiros>
matthewd: when was that last? 1.8?
* apeiros
remembers
<matthewd>
Yeah
<apeiros>
weren't arbitrary binary symbols valid back then?
<apeiros>
dminuoso: what's the purpose of that? enable embedding the pointers in other structures?
eizua has quit [Quit: Leaving]
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
<dminuoso>
apeiros: Byte size is 16 bits, and pointers are usually 24 bits. However, they separate data and function pointers - function pointers always have the MSB at 0, giving you only 23 bits to work with at maximum.
c355e3b has quit [Quit: Connection closed for inactivity]
h1fuelcell has joined #ruby
<apeiros>
I see
<dminuoso>
apeiros: Its a strange architecture where you have data sizes of 16, 23, 24, 32 and 40 bits.
<dminuoso>
A DSP of course.
<apeiros>
and does it align to 3 byte boundaries?
<dminuoso>
I dont know about alignment requirements. Those are implementation details behind the compiler.
<apeiros>
ah well, DSPs are usually about "as compact as possible", no?
<dminuoso>
apeiros: DSPs are domain specific packages! :P
<dminuoso>
As such all their strangeness comes from solving specific problems.
<apeiros>
yes, and usually "as fast as possible" and/or "with as little memory as possible", otherwise a CPU would do :)
<apeiros>
7bits is the difference between small and large :D
<apeiros>
well, it is 7 orders of magnitudes more
h1fuelcell has quit [Ping timeout: 256 seconds]
armyriad has quit [Ping timeout: 256 seconds]
harold_ has joined #ruby
Qommand0r has joined #ruby
wingwalker has quit [Ping timeout: 264 seconds]
nofxx has quit [Remote host closed the connection]
harold_ has quit [Client Quit]
armyriad has joined #ruby
ur5us has joined #ruby
Dimik has quit [Ping timeout: 252 seconds]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
sp_ has quit [Ping timeout: 265 seconds]
salut has joined #ruby
tvw has joined #ruby
gingray has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
tomphp has joined #ruby
ARCADIVS has joined #ruby
samof76 has quit [Ping timeout: 265 seconds]
bsrd has joined #ruby
Chair has joined #ruby
h1d has joined #ruby
h1d has quit [Client Quit]
pawnbox has joined #ruby
elenatanasoiu has joined #ruby
twalla has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
wingwalker has joined #ruby
pawnbox has quit [Ping timeout: 264 seconds]
Oclair has quit [Quit: Bye Bye]
Oclair has joined #ruby
nankyokusei has joined #ruby
twalla has quit [Ping timeout: 272 seconds]
ctp has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 256 seconds]
TvL2386 has joined #ruby
pawnbox has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
senayar has joined #ruby
senayar has joined #ruby
senayar has quit [Changing host]
workmad3 has joined #ruby
soulisson has joined #ruby
jsrn_ has joined #ruby
nikivi has joined #ruby
<soulisson>
Hi, sorry to bother you, I have been trying to make sense of that for 3 days now. I would be really greatful if someone could help me. What's the difference about a "function" and "a function definition"?
<dminuoso>
soulisson: Honestly?
<soulisson>
dminuoso, yes
nikivi has quit [Client Quit]
<dminuoso>
soulisson: Ask the author of the book who uses those terms to decribe two different things.
<dminuoso>
Because apparently you seem to be hunting for something very spceific.
<hanmac>
it depends on the language ... in others like C(++) it would probably make more sense than ruby
<dminuoso>
Especially the question of "what a function is"
<dminuoso>
In C++ a function is a type, nothing more.
<dminuoso>
The function declaration declares the type, and the definition defines the type.
gingray_ has joined #ruby
gingray has quit [Ping timeout: 264 seconds]
rajdesai has quit [Remote host closed the connection]
rajdesai has joined #ruby
gingray_ has quit [Ping timeout: 264 seconds]
<dminuoso>
It seems the same thing holds true for C. A function is just a type.
blackgoat has quit [Ping timeout: 272 seconds]
oakeem has joined #ruby
tvw has quit [Remote host closed the connection]
rajdesai has quit [Ping timeout: 252 seconds]
FINbit has joined #ruby
boogibugs has joined #ruby
<boogibugs>
Hi trying to search for a whitelist of ips ranges for rubygems.org so we can allow our fw to access when doing gem installs from clients. web search hasn't really given any good ides.
Snickers has quit [Read error: Connection reset by peer]
samof76 has joined #ruby
erlingur_ has joined #ruby
marr has joined #ruby
<apeiros>
boogibugs: should be just https, i.e. 443
<canton7>
ip range, I think, not port range
<apeiros>
ah
<apeiros>
I guess the main problem there would be mirrors?
<canton7>
nslookup gives a set of 4 ips. Those appear to belond to a CDN called fastly, which has these assigned ips: https://api.fastly.com/public-ip-list
<canton7>
not sure whether everything goes through the CDN, or whether other requests are made to the origin
<matti>
apeiros: :)
DoubleMalt has joined #ruby
Hyuk has joined #ruby
boogeyman has quit [Quit: bb]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
emilkarl has joined #ruby
elenatanasoiu has quit [Ping timeout: 264 seconds]
<boogibugs>
canton7, yep that's the issue like you said using nslookup because our fw is ip based we cant just give the first ip we see there...or if they change or route you somewhere else when you run `gem install .....`
boogeyman has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
twalla has joined #ruby
mvxlr has joined #ruby
k200 has quit [Ping timeout: 264 seconds]
ur5us has quit [Ping timeout: 244 seconds]
twalla has quit [Ping timeout: 272 seconds]
nankyokusei has joined #ruby
koooge has joined #ruby
AlphaAtom has quit [Read error: Connection reset by peer]
Qommand0r has quit [Quit: WeeChat 1.6]
nankyokusei has quit [Ping timeout: 265 seconds]
AlphaAtom has joined #ruby
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ljarvis>
k200: no, that's not how that code works
k200 has joined #ruby
cjbischof_ has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
tvw has quit [Read error: Connection reset by peer]
tvw has joined #ruby
<dminuoso>
k200: Also Ruby has no NULL. Are you talking about nil perhaps?
<dminuoso>
atmosx: Is this a Rails application?
<k200>
dminuoso: i have object.column where this column contais a json hash. now, both of them can be nill. hence i want to check if both exists. i wanted to use try here. but doing object.try(:column["key"]) does not work
<atmosx>
dminuoso: no it's Sinatra MVC, I'm building an API
tvw has quit [Client Quit]
<ljarvis>
k200: object.&.column.to_h["key"]
<ljarvis>
- .
<k200>
no i got it.
<k200>
object.column.try(:[], 'key')
<ljarvis>
try is a code smell
<k200>
why?
zacstewart has joined #ruby
<ljarvis>
because foo.try(:omg_i_dont_exist) will return nil, so you either want try! or Ruby 2.2's &. operator
<dminuoso>
ljarvis: How is &. better than .try though?
antgel has quit [Ping timeout: 252 seconds]
<ljarvis>
anyway, you dont need try here, just default to object.column being a hash if it's otherwise nil
<ljarvis>
dminuoso: because it'll raise if the method doesn't exist
<dminuoso>
ljarvis: Ah. At any rate, it was added in 2.3
<ljarvis>
try() is awful, try!() is ok, and like &.
<ljarvis>
right sorry 2.3
<k200>
ljarvis: whats wrong in it returing ni?
<k200>
nil
<ljarvis>
if you don't see a problem with that then i guess it doesn't matter
<k200>
ljarvis: i am doing if (try) else (something) so if that try gives nil it will execute that else block no?
<ljarvis>
k200: the issue is that if you did a typo for the method name you actually want, you may never know about it
<ljarvis>
k200: yes, the problem is about the method name being incorrect
M-manveru has quit [Remote host closed the connection]
bascht has quit [Remote host closed the connection]
davix has quit [Read error: Connection reset by peer]
cpfeilschifter[m has quit [Write error: Connection reset by peer]
<ljarvis>
try() doesn't just check against nil
fladson[m] has quit [Read error: Connection reset by peer]
<ljarvis>
it catches incorrect method calls
<k200>
ok
<ljarvis>
so, try! will avoid that issue
zacstewart has quit [Ping timeout: 244 seconds]
<ljarvis>
and better yet, so will &. which is pure ruby
<k200>
ljarvis: so i have to just do object.column.try!(:[], 'key') is that right?
<ljarvis>
k200: yes that would work, but it's not very nice looking is it
<ljarvis>
k200: what is object in this code? a model instance?
<k200>
yes
<ljarvis>
and 'column' is an actual column or a method name?
<k200>
column.
harai has quit [Ping timeout: 252 seconds]
<ljarvis>
what db type is it?
<k200>
text
<k200>
no wait
<ljarvis>
hstore or json perhaps?
<k200>
no. its just text.
<ljarvis>
do you serialize it?
<k200>
and the actual value is google map api resurt.
<k200>
yes.
<k200>
yes we serialize.
<ljarvis>
right, I would probably have something like `def column; super || {}; end`, so column never returns nil
<ljarvis>
then you can remove the try altogether
Gasher has joined #ruby
<ljarvis>
or some kind of google map api null object if necessary
<k200>
ljarvis: but i want it to rutern nil. that means it do not have data. hence execute else block and fethc data from google and store.
<ljarvis>
heh ok
raeoks has joined #ruby
rodfersou has joined #ruby
sonikspin has joined #ruby
davix has joined #ruby
ocbtec has joined #ruby
bsrd has joined #ruby
maloik has quit [Remote host closed the connection]
cpfeilschifter[m has joined #ruby
bascht has joined #ruby
M-shine has joined #ruby
M-mistake has joined #ruby
M-manveru has joined #ruby
fladson[m] has joined #ruby
maloik has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
k200 has quit [Quit: leaving]
bsrd has quit [Client Quit]
face has joined #ruby
bsrd has joined #ruby
workmad3 has joined #ruby
ken_barber has quit [Ping timeout: 272 seconds]
kent\n has quit [Quit: No Ping reply in 180 seconds.]
Qommand0r has joined #ruby
ken_barber has joined #ruby
zukin has quit [Quit: leaving]
pragmaticus has joined #ruby
kent\n has joined #ruby
JeanCarloMachado has joined #ruby
Naz has joined #ruby
spk has quit [Ping timeout: 272 seconds]
samof76 has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
spk has joined #ruby
pawnbox has joined #ruby
mitsuhiko has quit [Read error: Connection reset by peer]
nh_cham has quit [Quit: AtomicIRC: The nuclear option.]
mitsuhiko has joined #ruby
auzty has quit [Quit: Leaving]
Wizznt has joined #ruby
pawnbox has quit [Ping timeout: 256 seconds]
ldnunes has joined #ruby
Guest76247 has quit [Read error: Connection reset by peer]
nettoweb has joined #ruby
nuck has joined #ruby
nuck is now known as Guest29767
AckZ has quit []
JeanCarloMachado has quit [Ping timeout: 244 seconds]
chouhoulis has joined #ruby
eizua has joined #ruby
leitz has joined #ruby
samof76 has joined #ruby
emilkarl has joined #ruby
johnmilton has quit [Remote host closed the connection]
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JeanCarloMachado has joined #ruby
grh has quit [Ping timeout: 244 seconds]
sdothum has joined #ruby
DoubleMalt has quit [Ping timeout: 256 seconds]
h1fuelcell has quit [Remote host closed the connection]
jeffreylevesque has quit [Ping timeout: 272 seconds]
c355e3b has joined #ruby
anisha has joined #ruby
anisha has quit [Read error: Connection reset by peer]
dionysus69 has quit [Ping timeout: 264 seconds]
SteenJobs has joined #ruby
tonini has quit [Quit: Connection closed for inactivity]
workmad3 has quit [Ping timeout: 272 seconds]
leitz has quit [Quit: Nappy time]
grh has joined #ruby
dionysus69 has joined #ruby
h1fuelcell has joined #ruby
barajasfab has quit [Ping timeout: 272 seconds]
DoubleMalt has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
gnufied has joined #ruby
nettoweb has joined #ruby
murilo has joined #ruby
h1fuelcell has quit [Client Quit]
User458764 has joined #ruby
jaguarmagenta has joined #ruby
antgel has joined #ruby
mark_66 has quit [Remote host closed the connection]
synthroid has joined #ruby
fusmu has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
User458764 has quit [Remote host closed the connection]
johnmilton has joined #ruby
platzhirsch has joined #ruby
pawnbox has joined #ruby
jaguarmagenta has quit [Ping timeout: 256 seconds]
ARCADIVS has quit [Quit: ARCADIVS]
blackgoat has joined #ruby
inteq has quit []
User458764 has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
brendan- has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
pawnbox has joined #ruby
barajasfab has joined #ruby
tyang has joined #ruby
babblebre has joined #ruby
SteenJobs has quit [Quit: SteenJobs]
bruce_lee has quit [Ping timeout: 265 seconds]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
User458764 has quit [Ping timeout: 252 seconds]
SteenJobs has joined #ruby
zacstewart has joined #ruby
sander has quit [Quit: Leaving]
samof76 has quit [Ping timeout: 265 seconds]
User458764 has joined #ruby
Snowy has quit [Remote host closed the connection]
nankyokusei has joined #ruby
CloCkWeRX has joined #ruby
jeffreylevesque has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nankyokusei has quit [Ping timeout: 264 seconds]
User458764 has quit [Ping timeout: 265 seconds]
poikon has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
nadir has quit [Ping timeout: 252 seconds]
beawesomeinstead has quit [Read error: Connection reset by peer]
chadhs has joined #ruby
gizless has joined #ruby
gizmore has quit [Ping timeout: 264 seconds]
poikon has joined #ruby
beawesomeinstead has joined #ruby
Burgestrand has joined #ruby
Junaos has quit [Read error: Network is unreachable]
chouhoulis has quit [Remote host closed the connection]
Tempesta has quit [Quit: AdiIRC is updating to v2.6 Beta Build (2016/10/05) 32 Bit]
lidenbrock has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
mark_66 has joined #ruby
_sfiguser has joined #ruby
mhoogkamer has joined #ruby
<_sfiguser>
hello all i'm doing a matching of a regex and i did, b = time.scan(/(\d\d):(\d\d):(\d\d)(AM|PM)/) but i get as result an array of array... the result is this [["02", "06", "05", "PM"]] which is correct but i don't want to store it in an array of array...just in an array... how do i do this ? is there a smarter way ? or i should flatten ?
workmad3 has joined #ruby
tk__ has joined #ruby
jenrzzz has quit [Ping timeout: 256 seconds]
blackwind_123 has quit [Ping timeout: 272 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
|ifei5good has quit [Ping timeout: 264 seconds]
ChiefAlexander has joined #ruby
TvL2386 has quit [Remote host closed the connection]
bmurt has joined #ruby
a7d7p has joined #ruby
haylon has joined #ruby
Silthias has joined #ruby
blackmesa has quit [Ping timeout: 265 seconds]
<haylon>
has anyone else been having issues with gem v2.5.1 not verifying SSL recently?
tristanp has quit []
<a7d7p>
Learning Ruby… with Unix’s “ls -la” … I’d like to know what the different info returned is (in columns). I’m only finding basic explanations on the web. Anyone have a suggestion?
jaequery has joined #ruby
<ljarvis>
a7d7p: man ls
tristanp has joined #ruby
<ljarvis>
file mode, number of links, owner name, group name, number of bytes in the file, abbreviated month, day-of-month file was last modified, hour file last modified, minute file last modified, and the pathname
AlexRussia_ has quit [Ping timeout: 252 seconds]
last_staff has quit [Quit: last_staff]
grh has quit [Ping timeout: 264 seconds]
<haylon>
of course, this SSL issues seems to be affecting just Windows versions of Ruby.
<a7d7p>
@lgarvis … does “wheel” mean anything to you? :-)
<haylon>
fun.
<haylon>
a7d7p: its the sort of Admin group on *nix systems
<waxxy>
@RippyDippy Googling for the #each method and the Enumerable module should be interesting :)
dminuoso has joined #ruby
bkxd has joined #ruby
aswen has quit [Quit: WeeChat 1.5]
lifted has joined #ruby
gigetoo has quit [Ping timeout: 244 seconds]
gigetoo has joined #ruby
frankiee_ has quit [Ping timeout: 244 seconds]
<RippyDippy>
waxxy: But doesn't each start from the begining each time?
dionysus69 has quit [Ping timeout: 252 seconds]
<canton7>
yeah, I was thinking the only bits you might be able to change are the whiles on lines 7 and 10
<waxxy>
@RippyDippy Not if you take the appropriate slice of the array. In ruby you can use array indeces such as 13..80
<dminuoso>
waxxy: thats a range index, not an array index.
yardenbar has joined #ruby
<canton7>
slicing the arrays would create a ton of new arrays though, which 1) would make things more complex, and 2) would be hugely inefficient
tyang has joined #ruby
rodfersou is now known as rodfersou|lunch
blasius has joined #ruby
brendan- has joined #ruby
<waxxy>
true, but I don't think the goal here is the most efficient quick sort implementation ever
<canton7>
it does make the indexing harder though
<canton7>
as, at the end of the day, you've got to return a single sorted array, which means your swaps have to be done to one single array
<canton7>
so if you start creating sub-arrays, you've got indexes for those subarrays, and you have to translate those back to indexes on the original array
<canton7>
I can't see any way that that will do anything other than make life more compex...
eljimbo has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
nettoweb has joined #ruby
Eleeleth has quit [Ping timeout: 244 seconds]
kmckelvin has quit [Ping timeout: 244 seconds]
lifted has quit [Quit: lifted]
wldcordeiro has quit [Ping timeout: 252 seconds]
HashNuke has quit [Ping timeout: 265 seconds]
cardoni has quit [Ping timeout: 265 seconds]
edorf has quit [Ping timeout: 265 seconds]
bestie has quit [Ping timeout: 265 seconds]
quoboo has quit [Ping timeout: 265 seconds]
Tony-St4rk has quit [Ping timeout: 272 seconds]
wsmoak has quit [Ping timeout: 272 seconds]
darthvorik has quit [Ping timeout: 265 seconds]
podman has quit [Ping timeout: 265 seconds]
rippa has joined #ruby
ggherdov has quit [Ping timeout: 244 seconds]
daxroc has quit [Ping timeout: 244 seconds]
spiette has joined #ruby
tfitts has quit [Ping timeout: 244 seconds]
Jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
discopatrick has quit [Ping timeout: 272 seconds]
zipkid has quit [Ping timeout: 272 seconds]
meinside has quit [Ping timeout: 272 seconds]
kireevco_ has quit [Ping timeout: 272 seconds]
jxf has quit [Ping timeout: 256 seconds]
rann has quit [Ping timeout: 265 seconds]
sent-hil has quit [Ping timeout: 240 seconds]
c355e3b has quit [Ping timeout: 256 seconds]
aganov has quit [Quit: Leaving]
<lucasb_>
pivot = ary.shift
jmcc____________ has quit [Ping timeout: 265 seconds]
jlyndon has quit [Ping timeout: 265 seconds]
peteretep has quit [Ping timeout: 265 seconds]
mjc_ has quit [Ping timeout: 265 seconds]
caw has quit [Write error: Connection reset by peer]
twodayslate has quit [Write error: Connection reset by peer]
pmarreck has quit [Remote host closed the connection]
machty has quit [Write error: Connection reset by peer]
JackMc has quit [Write error: Connection reset by peer]
zero7 has quit [Remote host closed the connection]
aarongodin has quit [Write error: Connection reset by peer]
im0b has quit [Write error: Connection reset by peer]
jabreity has quit [Remote host closed the connection]
joaomdmoura__ has quit [Remote host closed the connection]
iamdevnul has quit [Read error: Connection reset by peer]
Lloyd has quit [Write error: Connection reset by peer]
andersh has quit [Write error: Connection reset by peer]
shelling__ has quit [Write error: Connection reset by peer]
imanc has quit [Remote host closed the connection]
lancetw has quit [Remote host closed the connection]
AndyWojo has quit [Read error: Connection reset by peer]
yo61 has quit [Remote host closed the connection]
mrsolo has quit [Write error: Connection reset by peer]
bove has quit [Read error: Connection reset by peer]
sp_ has joined #ruby
<lucasb_>
smaller, greater = ary.partition {|x| x <= pivot }
hiasinho has quit [Ping timeout: 272 seconds]
boxrick1 has quit [Ping timeout: 272 seconds]
<lucasb_>
smaller + [pivot] + greater
<lucasb_>
would this qualify as a quicksort?
<lucasb_>
oops, I forgot to recurse into smaller and greater. but you get the idea :)
nettoweb has quit [Ping timeout: 265 seconds]
<RippyDippy>
canton7: If you dont support slicing, what do you suggest?
bsrd has quit [Quit: WeeChat 1.5]
<canton7>
tbh, I'm not sure I'd change that code
ghostlight has quit [Ping timeout: 244 seconds]
murilo has quit [Quit: murilo]
yardenbar has quit [Ping timeout: 272 seconds]
twalla has quit [Ping timeout: 265 seconds]
craigp has quit [Ping timeout: 264 seconds]
ghostlight has joined #ruby
igniting has quit [Quit: Ex-Chat]
frankiee_ has joined #ruby
gregf_ has quit [Quit: Page closed]
pmarreck has joined #ruby
aarongodin has joined #ruby
im0b has joined #ruby
grh has joined #ruby
nettoweb has joined #ruby
roamingd_ has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
cpruitt has joined #ruby
<RippyDippy>
canton7: Sweet ...
<RippyDippy>
Thanks!
zero7 has joined #ruby
roamingd_ has quit [Remote host closed the connection]
roamingdog has joined #ruby
dminuoso has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
shelling__ has joined #ruby
roamingdog has quit [Remote host closed the connection]
abernstein has quit [Quit: abernstein]
twodayslate has joined #ruby
roamingdog has joined #ruby
Kero has quit [Quit: Lost terminal]
roamingdog has quit [Remote host closed the connection]
jenrzzz has joined #ruby
twalla has joined #ruby
wldcordeiro has joined #ruby
machty has joined #ruby
yo61 has joined #ruby
aryaching has joined #ruby
lifted has joined #ruby
bove has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
DoubleMalt has quit [Ping timeout: 264 seconds]
twalla has quit [Ping timeout: 252 seconds]
lifted has quit [Client Quit]
Immune has joined #ruby
mrsolo has joined #ruby
lancetw has joined #ruby
lifted has joined #ruby
conta has quit [Ping timeout: 244 seconds]
AlexJakeGreen has joined #ruby
podman has joined #ruby
synthroid has quit [Remote host closed the connection]
meinside has joined #ruby
imanc has joined #ruby
Eleeleth has joined #ruby
lifted has quit [Client Quit]
wsmoak has joined #ruby
HashNuke has joined #ruby
blaxter has quit [Quit: foo]
sp_ has quit [Ping timeout: 265 seconds]
zipkid has joined #ruby
thoolihan has joined #ruby
lifted has joined #ruby
sent-hil has joined #ruby
lifted has quit [Client Quit]
kmckelvin has joined #ruby
caw has joined #ruby
Devalo has joined #ruby
Tony-St4rk has joined #ruby
Oclairi has joined #ruby
saneax is now known as saneax-_-|AFK
erlingur_ has quit [Quit: WeeChat 1.5]
jlyndon has joined #ruby
bestie has joined #ruby
iamdevnul has joined #ruby
Oclair has quit [Ping timeout: 252 seconds]
twalla has joined #ruby
JackMc has joined #ruby
Lloyd has joined #ruby
Devalo has quit [Ping timeout: 256 seconds]
cjbischo_ has joined #ruby
darthvorik has joined #ruby
edorf has joined #ruby
cjbischof_ has quit [Ping timeout: 256 seconds]
cardoni has joined #ruby
quoboo has joined #ruby
joaomdmoura__ has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
hiasinho has joined #ruby
mjc_ has joined #ruby
tfitts has joined #ruby
gingray has joined #ruby
jabreity has joined #ruby
discopatrick has joined #ruby
boxrick1 has joined #ruby
jxf has joined #ruby
rann has joined #ruby
c355e3b has joined #ruby
daxroc has joined #ruby
kireevco_ has joined #ruby
andersh has joined #ruby
wugy has quit []
flashpoint9 has quit [Remote host closed the connection]
Xeago has joined #ruby
nattan has joined #ruby
Coldblackice has joined #ruby
<nattan>
hi there
peteretep has joined #ruby
jmcc____________ has joined #ruby
<nattan>
i recently started learning ruby and i am confused between class instance variables , instance variables , class variables . i google about it but i didnt get any clarity on those. any help would be appreciated.
<Zarthus>
do you understand scopes?
ggherdov has joined #ruby
<nattan>
yes , i do
zemmihates has joined #ruby
synthroid has joined #ruby
<Zarthus>
roughly speaking, the difference between them is where you can (and cannot) access or modify them from
<Zarthus>
I think the most common one seen in production is class instance variables (one @)
<hanmac>
nattan: if you have a ParentClass A and the ChildClasses B and C. if you have @@class_var defined in A, and set it in B to "x" then its in C "x" too. (all classes share the same class variable)
<nattan>
ok
<hanmac>
the difference if it would be a class instance variable, in that case its only set for B, not for A or C
harai has joined #ruby
<nattan>
i know that class instance variable is belong to a specific class . so how do u define them?
<gheegh>
basically i've got a string of key=value pairs.. but some of the values have whiteapace in their keys, so I need to match the = then backout the key values from the values.
A124 has quit [Quit: '']
zemmihates has quit [Quit: Connection closed for inactivity]
nettoweb has joined #ruby
peteykun has joined #ruby
DoubleMalt has quit [Ping timeout: 252 seconds]
hahuang62 has quit [Ping timeout: 256 seconds]
<eam>
gheegh: keys don't have whitespace?
<gheegh>
keys do not have whitespace
<gheegh>
the person that wrote the logging.. got that part right. .:-)
<eam>
don't regex. Split on '=', then remove the last word from each element except the first and last
<matthewd>
gheegh: Are there '=' in values?
<gheegh>
there might be.. but i'm not worried about a few busted logs.. proabably a 1 in 1 million situation
postmodern has joined #ruby
<gheegh>
eam: good idea.
<SeepingN>
is the data fixable? ;)
<SeepingN>
the text message should be quoted
roamingdog has joined #ruby
<gheegh>
yeah.. i'll go into their logging, and quote out the message
<gheegh>
but in the interium.. trying to get the ELK stack logs to not be basica strings..
<gheegh>
no point in having a ELK log solution, if there are no fields in it..
<gheegh>
:-)
sp_ has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<sonOfRa>
Does setting an object to nil force it being garbage collected? I'm investigating a strange double-free error in a native binding
Joufflu has quit [Read error: Connection reset by peer]
siaw23 has joined #ruby
chouhoulis has joined #ruby
Joufflu has joined #ruby
elenatanasoiu has quit [Ping timeout: 256 seconds]
<matthewd>
gheegh: /(\w+)=(.*?)(?=$|\s+\w+=)/
<gheegh>
matthewd: Awesome!
<gheegh>
totally works.
dionysus69 has joined #ruby
<gheegh>
thanks.
cschneid_ has quit [Remote host closed the connection]
<matthewd>
sonOfRa: Not until the GC runs (and even then, not strictly guaranteed)
<SeepingN>
/(\w+=.+) \w+=/ take $1. then grab last pair separately. ..?
craigp has joined #ruby
<sonOfRa>
matthewd, alright, that seems like a step in the right direction, then
<siaw23>
i wrote a simple scraper to get content from a web. however i want to have it done in a way so that it copies formatting, like bold, italics, colours etc along with the text so i can put it in a word document. is this possible? if yes, i could use some guidelines: https://gist.github.com/siaw23/3925bff1d1fe437ead78d0c445b6ab4b
GodFather has quit [Ping timeout: 256 seconds]
mhoogkamer has quit [Ping timeout: 256 seconds]
<SeepingN>
probably best to use some sort of html parsing library
<siaw23>
i’m using Nokogiri
<siaw23>
it’s copying just raw text
Devalo has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
catphish has joined #ruby
<catphish>
i'm looking at OpenSSL::PKey::PKey#sign, and this method seems to expect both a digest algorithm and some data, does anyone know if one can sign raw data without first hashing it?
pwnd_nsfw` has quit [Read error: Connection reset by peer]
skweek has quit [Ping timeout: 252 seconds]
pwnd_nsfw` has joined #ruby
<catphish>
perhaps the hashing is an integral part of the signing process
synthroid has quit [Remote host closed the connection]
PhishPho1 has joined #ruby
<matthewd>
catphish: Pretty much all signing systems work by signing a digest of the data, AFAIK
ramfjord has joined #ruby
claudiuinberlin has joined #ruby
<catphish>
i assumed it was 2 separate operations (hashing then signing)
<catphish>
but it seems they're quite closely tied together
<matthewd>
The signature has to include the information of how it was hashed, for a verifier to be able to do the same
redpants has joined #ruby
tyang has joined #ruby
conta has quit [Ping timeout: 252 seconds]
machinewar has joined #ruby
flashpoint9 has joined #ruby
roamingdog has quit [Remote host closed the connection]
claudiuinberlin has quit [Client Quit]
roamingdog has joined #ruby
cchadwicka1 has quit [Read error: Connection reset by peer]
Devalo has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
dionysus70 has joined #ruby
roamingdog has joined #ruby
<machinewar>
can I set instance_variables on instance via extending a module or no?
<machinewar>
I pretty much want to have a class method so I can do class Thing mappable key: :value, where the instance will get @key = :value
cchadwicka has joined #ruby
dionysus69 has quit [Ping timeout: 265 seconds]
dionysus70 is now known as dionysus69
siaw23 has left #ruby [#ruby]
<machinewar>
would proabably have to prepend and use initialize
nh_cham has quit [Ping timeout: 264 seconds]
frozengeek has quit [Quit: frozengeek]
cdg has quit [Remote host closed the connection]
cchadwicka1 has joined #ruby
cchadwicka1 has quit [Read error: Connection reset by peer]
cchadwicka has quit [Ping timeout: 265 seconds]
cchadwicka has joined #ruby
cchadwicka has quit [Read error: Connection reset by peer]
chouhoul_ has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
cchadwicka has joined #ruby
Gar-Bob has joined #ruby
conta has joined #ruby
nettoweb has quit [Ping timeout: 265 seconds]
matp has quit [Quit: ZZzzzZz...]
chouhoulis has quit [Ping timeout: 252 seconds]
whathappens has joined #ruby
nettoweb has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
cchadwicka1 has joined #ruby
matp has joined #ruby
cchadwicka has quit [Ping timeout: 252 seconds]
DoubleMalt has joined #ruby
nullwork has quit [Ping timeout: 252 seconds]
Immune has joined #ruby
govg has quit [Ping timeout: 265 seconds]
Dimik has joined #ruby
grh has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 265 seconds]
<_sfiguser>
hello all i'm using TK with ruby, is there a way to let a label take the background of another label ?
<_sfiguser>
since i have an image set as label
<_sfiguser>
and this other label should just be a text
tyang has quit [Read error: Connection reset by peer]
marxarelli has joined #ruby
nullwork has joined #ruby
Silthias has quit [Ping timeout: 252 seconds]
frozengeek has joined #ruby
jaguarmagenta has joined #ruby
Silthias has joined #ruby
Devalo has joined #ruby
Joufflu_ has joined #ruby
Robtop__ has joined #ruby
tyang has joined #ruby
leksster has joined #ruby
nzst has quit [Quit: ERC (IRC client for Emacs 24.5.1)]
grh has joined #ruby
eljimmy has quit [Read error: Connection reset by peer]
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
Joufflu has quit [Ping timeout: 272 seconds]
frozengeek has quit [Client Quit]
Devalo has quit [Ping timeout: 244 seconds]
jaguarmagenta has quit [Ping timeout: 244 seconds]
duderonomy has joined #ruby
nankyokusei has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
abernstein_ has joined #ruby
machinewar has quit []
User458764 has joined #ruby
User458764 has quit [Client Quit]
RippyDippy has quit [Ping timeout: 256 seconds]
roamingdog has quit [Read error: Connection reset by peer]
roamingd_ has joined #ruby
roamingd_ has quit [Remote host closed the connection]
abernstein has quit [Ping timeout: 265 seconds]
abernstein_ is now known as abernstein
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
vdamewood has joined #ruby
roamingdog has joined #ruby
djbkd has joined #ruby
nankyokusei has quit [Ping timeout: 244 seconds]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
spudowiar has quit [Quit: Leaving.]
roamingdog has quit [Remote host closed the connection]
roamingdog has joined #ruby
roamingdog has quit [Remote host closed the connection]
saneax-_-|AFK has quit [Ping timeout: 272 seconds]
chocoelho has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
frozengeek has quit [Remote host closed the connection]
<atmosx>
Are ordered tests considered poor/weak?
<pragmatism>
atmosx yes.
<pragmatism>
Means you have a problem somewhere.
<pragmatism>
(typically)
<pragmatism>
There are always edge cases.
<atmosx>
pragmatism: so, when I want to test the 'delete' api function, how should I go about? Have a single test to create and delete a user?
yuung has joined #ruby
<pragmatism>
Yup!
<atmosx>
great thanks
<pragmatism>
np
lxsameer has joined #ruby
behemot has quit [Quit: leaving]
synthroid has joined #ruby
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
DoubleMalt has quit [Ping timeout: 252 seconds]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ur5us has quit [Read error: Connection reset by peer]
ur5us_ has joined #ruby
[Butch] has joined #ruby
Naz has quit [Ping timeout: 244 seconds]
workmad3 has quit [Ping timeout: 265 seconds]
TPug has joined #ruby
_whitelogger has joined #ruby
shmuli has joined #ruby
ur5us_ has quit [Read error: Connection reset by peer]
kirun has joined #ruby
ur5us has joined #ruby
Joufflu__ has joined #ruby
jokester has quit [Ping timeout: 265 seconds]
_whitelogger_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
tomphp has joined #ruby
jokester has joined #ruby
RegulationD has quit []
whathappens has quit [Ping timeout: 256 seconds]
Joufflu_ has quit [Ping timeout: 272 seconds]
pokalyis has joined #ruby
marxarelli has joined #ruby
cschneid_ has joined #ruby
Alayde has joined #ruby
johnmilton has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yqt has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
yuung has quit [Quit: leaving]
vdamewood has left #ruby ["Life beckons."]
blackmes1 has joined #ruby
banisterfiend has joined #ruby
blackmesa has quit [Ping timeout: 252 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
synthroid has quit [Remote host closed the connection]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yqt has quit [Ping timeout: 256 seconds]
hahuang65 has joined #ruby
pokalyis has joined #ruby
ponga has quit [Quit: Connection closed for inactivity]
Snowy has joined #ruby
RippyDippy has joined #ruby
camm has left #ruby [#ruby]
gusrub_ has joined #ruby
s2013 has joined #ruby
NTrash has joined #ruby
haylon has quit [Quit: Leaving]
Silthias has quit [Ping timeout: 252 seconds]
hahuang65 has quit [Ping timeout: 244 seconds]
pokalyis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
RippyDippy has quit [Ping timeout: 265 seconds]
conta has quit [Ping timeout: 265 seconds]
gusrub_ has quit [Remote host closed the connection]
Silthias has joined #ruby
guardian has joined #ruby
gusrub_ has joined #ruby
vuoto has joined #ruby
elenatanasoiu has joined #ruby
sdwrage has quit [Quit: Leaving]
<guardian>
hello, I'm a ruby beginner. Apparently I can't use a oneliner to define a nested module "module Foo::Bar" -- is there an idiomatic to avoid too much indentation caused by nesting then?
magellanicloud has joined #ruby
DoubleMalt has joined #ruby
<Papierkorb>
guardian: you can use that, but Foo has to exist prior
<havenwood>
guardian: You shouldn't need to indent too often. If you wanted you could `module Foo; end` then: module Foo::Bar
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
yannj has joined #ruby
TPug has joined #ruby
<guardian>
ok thanks
<guardian>
gonna try that
johnmilton has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
isan32 has joined #ruby
ta_ has joined #ruby
guest58673 has joined #ruby
<guardian>
is there a way to disambiguate when 2 different gems extend the String class with the same method?
<matthewd>
No; one overwrites the other
roamingdog has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
dionysus69 has quit [Remote host closed the connection]
Gasher has quit [Ping timeout: 244 seconds]
guest58673 has quit [Remote host closed the connection]
ocbtec has quit [Quit: leaving]
synthroid has joined #ruby
whathappens has quit [Ping timeout: 265 seconds]
SCHAAP137 has joined #ruby
loechel has quit []
RTFM[away] has quit [Quit: Leaving]
RTFM[away] has joined #ruby
Renich_ has quit [Ping timeout: 256 seconds]
<pragmatism>
railstutorial.org is good too for learning basic TDD. It's in Rails, but definitely applicable to Ruby alone.
yqt has joined #ruby
mahlon_ is now known as mahlon
FINbit has quit [Ping timeout: 272 seconds]
Joufflu__ has quit [Read error: Connection reset by peer]
FINbit has joined #ruby
tyang has quit [Ping timeout: 264 seconds]
fmcgeough has quit [Quit: fmcgeough]
<postmodern>
what would be a good method name for something that coercers/transforms parsed JSON back into Ruby objects (ex: Time.parse'ing a JSON time string)
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zacts has quit [Ping timeout: 252 seconds]
Silthias has quit [Ping timeout: 272 seconds]
Silthias has joined #ruby
flashpoint9 has joined #ruby
<matthewd>
postmodern: JSON.rce(hash) ? ;)
<postmodern>
matthewd, this would be explicit for each model I'm loading back from JSON
<matthewd>
Ahh, okay
helpa has quit [Remote host closed the connection]
chouhoulis has quit [Remote host closed the connection]
ronin has joined #ruby
hahuang65 has joined #ruby
TPug has joined #ruby
whathappens has joined #ruby
chouhoulis has joined #ruby
jaguarmagenta has quit [Ping timeout: 264 seconds]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
RippyDippy has joined #ruby
marxarelli has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tdy has quit [Ping timeout: 264 seconds]
duderonomy has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit []
pawnbox has quit [Remote host closed the connection]
duderonomy has quit [Client Quit]
roamingdog has joined #ruby
y2mq37 has joined #ruby
RippyDippy has quit [Ping timeout: 265 seconds]
whathappens has quit [Read error: Connection reset by peer]
roamingdog has quit [Client Quit]
whathappens has joined #ruby
mistergibson_ has joined #ruby
mistergibson_ has quit [Remote host closed the connection]
mistergibson has quit [Quit: Leaving]
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ruby_ has quit []
nankyokusei has joined #ruby
KillerFox has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
NTrash has quit [Quit: Konversation terminated!]
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
NTrash has joined #ruby
AnarchyAo has joined #ruby
jeffreylevesque has quit [Ping timeout: 256 seconds]
Silthias has quit [Ping timeout: 265 seconds]
barajasfab has quit [Ping timeout: 256 seconds]
Silthias has joined #ruby
cyphase has joined #ruby
pawnbox has joined #ruby
jaiks has quit [Ping timeout: 264 seconds]
djbkd has joined #ruby
moneylotion has quit [Read error: Connection reset by peer]
forgot has joined #ruby
xrlabs has joined #ruby
JeanCarloMachado has quit [Ping timeout: 272 seconds]
tomphp has joined #ruby
et09 has joined #ruby
<et09>
is it bad to use "attr" as a variable name? i have it in like a hundred places, didn't seem to cause a problem but i guess it's a built in keyword (along with attr_accessible etc.)
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
synthroid has quit []
vF3hNGxc47h8 has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
pawnbox has quit [Ping timeout: 256 seconds]
Silthias has quit [Ping timeout: 244 seconds]
Silthias has joined #ruby
craigp has quit [Ping timeout: 256 seconds]
TPug has joined #ruby
benjwadams has joined #ruby
blackmesa has joined #ruby
JeanCarloMachado has joined #ruby
SuperLag has quit [Quit: leaving]
<benjwadams>
Hi, usually a Python guy here. How can I install libraries system-wide with `gem` or similar? right now it appears i need to `require "rubygems"` before i import other libraries and i can't refactor the libraries
whathappens has quit [Read error: Connection reset by peer]
sp_ has quit [Ping timeout: 272 seconds]
blackmes1 has quit [Ping timeout: 244 seconds]
<gusrub_>
benjwadams: what do you mean system wide, so that all users can require them?
whathappens has joined #ruby
ronin has quit [Quit: Page closed]
elenatanasoiu has quit [Ping timeout: 264 seconds]
<benjwadams>
gusrub_: so that i can for example run irb and say `require 'somelib'` and it won't throw an exception
flopsec has joined #ruby
SuperLag has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
duderonomy has joined #ruby
bkxd has joined #ruby
axisys has quit [Quit: leaving]
nankyokusei has quit []
shmuli has quit [Remote host closed the connection]
zipace has joined #ruby
blackmesa has quit [Client Quit]
craigp has joined #ruby
axisys has joined #ruby
_sfiguser has quit [Ping timeout: 264 seconds]
<gusrub_>
benjwadams: do you want to do that on a server or just your local machine? It depends on how you have ruby installed (by package manager, rvm, rbenv etc.)
symm- has joined #ruby
<benjwadams>
I have to maintain a Windows box
nankyokusei has joined #ruby
<benjwadams>
It was via some installer (rubyinstaller). gem and ruby paths are working
<catphish>
rather a specific question, i'm encrypting a block of data with AES-256-ECB, and the output is larger than the input, is this normal? i was expecting everything to be the same length http://paste.codebasehq.com/pastes/gaxokxyq5m2g6div10
frozengeek has joined #ruby
gnufied has quit [Quit: Leaving]
craigp has quit [Ping timeout: 244 seconds]
DarthGandalf has quit [Remote host closed the connection]
barajasfab has joined #ruby
DarthGandalf has joined #ruby
ixti has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 252 seconds]
bsrd has joined #ruby
bsrd has quit [Client Quit]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
nankyokusei has quit [Remote host closed the connection]
nankyokusei has joined #ruby
nankyokusei has quit [Read error: Connection reset by peer]
pawnbox has joined #ruby
nankyokusei has joined #ruby
patarr has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Ping timeout: 244 seconds]
harai has joined #ruby
rodfersou is now known as rodfersou|dinner
shmuli has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moneylotion has joined #ruby
eljimbo has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 252 seconds]
elenatanasoiu has joined #ruby
a7d7p has quit [Quit: a7d7p]
arashb has joined #ruby
sp_ has joined #ruby
nankyokusei has quit [Remote host closed the connection]
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
RTFM[away] has quit [Ping timeout: 265 seconds]
gfvcastro has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
charliesome has joined #ruby
arashb has quit [Ping timeout: 256 seconds]
last_staff has quit [Quit: last_staff]
last_staff has joined #ruby
abernstein has quit [Quit: abernstein]
last_staff has quit [Client Quit]
eljimmy has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
anisha has joined #ruby
naftilos76 has quit [Quit: Αποχώρησε]
gingray has quit [Ping timeout: 265 seconds]
prawnzy has joined #ruby
Snowy has quit [Remote host closed the connection]
whathappens has quit [Read error: Connection reset by peer]
Snowy has joined #ruby
whathappens has joined #ruby
marxarelli has joined #ruby
Snowy has quit [Ping timeout: 264 seconds]
prawnzy has quit [Ping timeout: 256 seconds]
elastix has joined #ruby
workmad3 has joined #ruby
tdy has joined #ruby
raeoks has joined #ruby
benjwadams has quit [Quit: WeeChat 1.4]
<SeepingN>
ugh. I'm in Net:SSH exec hell
<SeepingN>
apparently ssh.exec!("Somecommand") runs bash -c "Somecommand" in the shell, which means Somecommand shows up twice in ps. And of course the script I'm trying to start looks for exactly that and bails out. :(
gfvcastro has quit [Ping timeout: 244 seconds]
<SeepingN>
Anyone have any fancy ideas on how to keet it from starting a subshell or hiding that fact from ps?
<SebastianThorn>
how do you copy files in ruby? you use FileUtils.cp_r ?
<SebastianThorn>
does not seem to work good
<soahccc>
SebastianThorn: why not?
<SebastianThorn>
i get this: ruby/2.3.0/fileutils.rb:1387:in `copy': unknown file type: base/* (RuntimeError)
<soahccc>
SeepingN: I don't really know what you mean. If you execute a shell in a shell you end up with two processes?
<SebastianThorn>
but if i run the command with :verbose => true, and after it jumpes out, i run that command, it works just fine
<SebastianThorn>
the command that FileUtils echos is: cp -r base/* export_rb/aaa_2016-10-06_23.53.43/.
<SeepingN>
My command that I'm sending to ssh.exec! is: "source /etc/profile; #{command}"
<SeepingN>
command shows up twice in ps because it starts as: bash -c source /etc/profile; command
<soahccc>
SebastianThorn: I'm pretty certain that you have to give it actual file names (no globbing) and do you need -r?
<matthewd>
SeepingN: If you're relying on 'source', you clearly depend on the fact it's running a shell
<SeepingN>
command is a ruby script, so that loads another process: ruby /path/to/command
<matthewd>
SeepingN: Would exec solve your probem?
SCHAAP137 has quit [Ping timeout: 272 seconds]
<matthewd>
"source /etc/profile; exec #{command}"
<SebastianThorn>
soahccc: the base-folder contains 3 files and one other folder, that i wish to copy
<SeepingN>
worth a shot. seems like it hangs up tho
whathappens has quit [Read error: Connection reset by peer]
bsrd has joined #ruby
whathappens has joined #ruby
<soahccc>
SebastianThorn: I think you have to iterate over a list and give it actual filenames. The example in the docs uses Dir.glob as first argument
bsrd has quit [Client Quit]
whathappens has quit [Read error: Connection reset by peer]
<SeepingN>
well shit, that did start it. Looks like ssh.exec is going to wait for it to run. back to trying to put that in background, which didn't work before. but it wasn't working anyway!
<SebastianThorn>
ok, guess ill just`backtick it :P
<SebastianThorn>
`echo "fun times!"`
whathappens has joined #ruby
<SeepingN>
so what does the shell "exec" do differently?
<bougyman>
exec replaces the current running process with whatever you exec
zukin has joined #ruby
<bougyman>
oh, ssh.exec, sorry
<bougyman>
I should have read the context.
<matthewd>
bougyman: No, you were right. The context was in fact shell-exec-in-ssh.exec :)
<bougyman>
gotcha
<matthewd>
SeepingN: .. which is going to complicate things if you want to background it (and it's not self-daemonizing)
AnarchyAo has quit [Excess Flood]
leksster has quit [Quit: Leaving]
<SeepingN>
well there's 2 execs. I'm EXECuting a command over the ruby ssh connection. And also passing a bash "exec" in there to avoid the command showing up twice in `ps` and the command bailing becaue it thinks it's running twice
<SeepingN>
well this is something at least. thanks.
<matthewd>
SeepingN: I assume you can't just fix the process to be less.. wrong
jenrzzz_ has joined #ruby
<matthewd>
"Does this word appear anywhere in `ps` output" isn't the most fine-tuned anti-concurrency mechanism
<SeepingN>
no, it's already in place on thousdands of devices. So I'm stuck with how it detects 2 copies running. I can change the call itself, and the ruby code which implements it, though that affects other things people may try to run so I can't hack it to far
<SeepingN>
no. it's quite horrible
<SeepingN>
but already implemented and in the real world :(
duncannz has joined #ruby
<SeepingN>
bbiab, thanks for the tips so far!
anisha has quit [Quit: This computer has gone to sleep]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JeanCarloMachado has quit [Ping timeout: 252 seconds]
ramfjord has quit [Ping timeout: 252 seconds]
jenrzzz has quit [Ping timeout: 256 seconds]
ramfjord has joined #ruby
elastix has quit [Quit: elastix]
claw has quit [Ping timeout: 244 seconds]
abernstein has joined #ruby
frozengeek has quit [Quit: frozengeek]
ChiefAlexander has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
shmuli has quit [Remote host closed the connection]
craigp has joined #ruby
jenrzzz_ has quit [Ping timeout: 265 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
banisterfiend has joined #ruby
shmuli has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
jenrzzz has joined #ruby
claw has joined #ruby
mtkd has quit [Ping timeout: 244 seconds]
c0mrad3 has quit [Quit: Connection closed for inactivity]
mtkd has joined #ruby
ruby_ has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
whathappens has joined #ruby
kirun has quit [Quit: Konversation terminated!]
ruby_ has quit [Client Quit]
babblebre has quit [Quit: Connection closed for inactivity]
harai has quit [Ping timeout: 256 seconds]
AnarchyAo has joined #ruby
jaguarmagenta has joined #ruby
flashpoint9 has quit [Remote host closed the connection]
<SeepingN>
So now I'm back to my old problem that I don't think is fixable in this context. the above "command" is a script to upgrade the device (embedded linux box). when it finishes upgrading it reboots and of course the ssh connection drops. But not in the best way, it seems. My ruby net:ssh connection doesn't realize the device has gone away and just sits there waiting for the command to finish. what a PITA!
abernstein has quit [Quit: abernstein]
TPug has joined #ruby
coolboy has joined #ruby
jaguarmagenta has quit [Ping timeout: 264 seconds]
chouhoulis has quit [Ping timeout: 265 seconds]
<soahccc>
SeepingN: indeed. doesn't the remote close the connection on a reboot?
lucasb_ has quit [Quit: leaving]
jenrzzz has quit [Ping timeout: 272 seconds]
jackjackdripper has joined #ruby
jenrzzz has joined #ruby
sp_ has quit [Ping timeout: 264 seconds]
twalla has quit [Ping timeout: 252 seconds]
hahuang65 has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
xentity1x has quit [Ping timeout: 272 seconds]
postmodern has quit [Quit: Leaving]
jenrzzz has quit [Ping timeout: 265 seconds]
blackwind_123 has quit [Ping timeout: 264 seconds]
nofxx has joined #ruby
nofxx has joined #ruby
nofxx has quit [Changing host]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackwind_123 has joined #ruby
charliesome has joined #ruby
magellanicloud has quit [Quit: Leaving]
NTrash has quit [Quit: Konversation terminated!]
JeanCarloMachado has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
icarus has joined #ruby
jenrzzz has joined #ruby
cschneid_ has quit [Remote host closed the connection]
sumobob has joined #ruby
pawnbox has joined #ruby
Devalo has joined #ruby
Silthias1 has joined #ruby
AnarchyAo has quit [Ping timeout: 252 seconds]
Silthias has quit [Ping timeout: 272 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
pawnbox has quit [Ping timeout: 256 seconds]
jenrzzz has quit [Ping timeout: 265 seconds]
Devalo has quit [Ping timeout: 272 seconds]
saneax-_-|AFK is now known as saneax
tdy has quit [Ping timeout: 264 seconds]
lxsameer has quit [Quit: WeeChat 1.5]
dhk has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
ur5us has quit [Remote host closed the connection]
marxarelli is now known as marxarelli|afk
whathappens has joined #ruby
ur5us has joined #ruby
elenatanasoiu has quit [Ping timeout: 265 seconds]
jenrzzz has joined #ruby
ur5us has quit [Ping timeout: 264 seconds]
<pragmatism>
SSH yes, maybe not SSL.
<pragmatism>
Oh sry, misread.
yqt has quit [Ping timeout: 272 seconds]
<SeepingN>
soahccc: Supposedly, but however it's doing it, it isn't ... "nice"
<pragmatism>
SeepingN Could you have the process that ruby is calling on the remote side kick off a script that waits 5 and then reboots when Ruby DCs?
<SeepingN>
well the exec worked to solve the problem of the script "seeing itself twice" and bailing, but I've changed this particular upgrade command to run via a modified ssh which passes our fancy password automatically. From there it's a normal command-line ssh call, which properly responds to "nohup command.rb &" and deosn't stick around for the Cold Shoulder Hangup
barajasfab has quit [Quit: Ex-Chat]
<SeepingN>
well the reboot is after an upgrade has finished which can take 5 minutes or 50, depending on what has to be done
<SeepingN>
plus the remote device is very ... "light". Some commands aren't there (no 'at'), and no man pages either
Batholith has quit [Ping timeout: 250 seconds]
raldu has quit [Ping timeout: 264 seconds]
<SeepingN>
"at" probably would have solved my problem immediately if it were available
nankyokusei has joined #ruby
<pragmatism>
Ohh, that stinks.
raldu has joined #ruby
Batholith has joined #ruby
catphish has left #ruby ["Leaving"]
frozengeek has joined #ruby
flashpoint9 has joined #ruby
elenatanasoiu has joined #ruby
marxarelli|afk is now known as marxarelli
nankyokusei has quit [Ping timeout: 256 seconds]
flashpoint9 has quit [Remote host closed the connection]
abernstein has joined #ruby
flashpoint9 has joined #ruby
raldu has quit [Ping timeout: 264 seconds]
raldu has joined #ruby
x0f has quit [Ping timeout: 252 seconds]
Immune has quit [Ping timeout: 264 seconds]
elenatanasoiu has quit [Ping timeout: 244 seconds]
shmuli has quit [Remote host closed the connection]
ghr has quit [Ping timeout: 272 seconds]
gusrub_ is now known as gusrub
kobain has joined #ruby
Immune has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
ghr has joined #ruby
moneylotion has quit [Read error: Connection reset by peer]