<ruby-lang452>
In this code, can someone explain to me how this code checks for numbers in teh array that are not directly next to each other?
workmad3 has quit [Ping timeout: 240 seconds]
Emmanuel_Chanel has quit [Quit: Leaving]
<ruby-lang452>
[1,2,3,4], how does the code check for 1 and 3, and then 4?
GnuYawk has joined #ruby
Kara has joined #ruby
devbug has quit [Ping timeout: 256 seconds]
phatypus has quit [Quit: .>]
Kara_ has joined #ruby
atomical has quit [Read error: Connection reset by peer]
stamina has joined #ruby
Emmanuel_Chanel has joined #ruby
dorei has quit []
atomical has joined #ruby
Soda has quit [Remote host closed the connection]
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
skcin7 has joined #ruby
bkxd has joined #ruby
swgillespie[GT] has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
gaboesqu_ has joined #ruby
ruby-lang198 has joined #ruby
<ruby-lang452>
Anybody can help me with my question?
devbug has joined #ruby
Kara_ has quit [Read error: Connection reset by peer]
Kara has quit [Read error: Connection reset by peer]
devbug_ has quit [Ping timeout: 260 seconds]
cubicme has joined #ruby
gaboesquivel has quit [Ping timeout: 268 seconds]
arescorpio has joined #ruby
devbug_ has joined #ruby
ruurd has joined #ruby
_blizzy_ has quit [Read error: Connection timed out]
stamina has quit [Ping timeout: 250 seconds]
law has left #ruby [#ruby]
cubicme has quit [Ping timeout: 256 seconds]
Uo9er_ has joined #ruby
wldcordeiro has joined #ruby
devbug__ has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
dikaio has quit [Read error: Connection reset by peer]
to_json has quit [Quit: Leaving.]
devbug_ has quit [Ping timeout: 260 seconds]
U7se6 has quit [Ping timeout: 244 seconds]
rrichardsr3 has joined #ruby
devbug has joined #ruby
favadi has joined #ruby
araujo_ has joined #ruby
araujo has quit [Ping timeout: 240 seconds]
dcarmich has joined #ruby
moeabdol has joined #ruby
atomical has quit [Read error: Connection reset by peer]
atomical_ has joined #ruby
baweaver has quit [Remote host closed the connection]
devbug__ has quit [Ping timeout: 272 seconds]
devbug_ has joined #ruby
<sugardrunk>
ruby-lang452: don't really know what you want (and need some sleep :D) but you are iterating the <nums> and with the first pair in the second while loop it returns the first occurence of result 0... so it finishes there.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
joufflu has joined #ruby
baweaver has joined #ruby
<sugardrunk>
ruby-lang452: it is quite hard to understand your question :) it is saturday an all.... 5am here
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
devbug has quit [Ping timeout: 240 seconds]
<sugardrunk>
ruby-lang452: the first while loop takes the number in order :) then compares it to the others... the first occurance it is done :D (I don't know why I am explaining this)
swgillespie has joined #ruby
rrichardsr3 has quit [Ping timeout: 240 seconds]
Pupeno has joined #ruby
favadi has joined #ruby
<sugardrunk>
dammn... it is sunday :)
atomical_ has quit [Read error: Connection reset by peer]
baweaver has quit [Ping timeout: 252 seconds]
zenguy_pc has quit [Ping timeout: 265 seconds]
rrichardsr3 has joined #ruby
moeabdol has quit [Ping timeout: 260 seconds]
<sugardrunk>
ruby-lang452: and yes, I was reading the comment on your code... not the question or something...
diegoaguilar has quit [Remote host closed the connection]
Pupeno has quit [Ping timeout: 260 seconds]
vigintas1 has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
davedev2_ has quit []
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
vigintas has joined #ruby
vigintas has quit [Client Quit]
vigintas1 has quit [Read error: Connection reset by peer]
vigintas has joined #ruby
rrichardsr3 has quit [Ping timeout: 256 seconds]
rrichardsr3 has joined #ruby
ledestin has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
vigintas1 has joined #ruby
vigintas1 has quit [Read error: Connection reset by peer]
vigintas has joined #ruby
vigintas1 has joined #ruby
vigintas has quit [Read error: Connection reset by peer]
vigintas1 has quit [K-Lined]
Tariq has joined #ruby
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
<Tariq>
Hello. I have a class in AR that is supposedly not initialized even though I can access it in the Rails console, I rebooted it and it does not help. The class in question is inheriting from another class that is connected to an external dataset.
htmldrum has joined #ruby
<Tariq>
Hello?
bkxd has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
NeverDie has joined #ruby
zenguy_pc has joined #ruby
duncannz has joined #ruby
GnuYawk has quit [Ping timeout: 252 seconds]
ruby-lang452 has quit [Ping timeout: 246 seconds]
devbug_ has quit [Ping timeout: 240 seconds]
atomical has joined #ruby
rrichardsr3 has quit [Ping timeout: 240 seconds]
symm- has quit [Ping timeout: 240 seconds]
favadi has joined #ruby
datanoise has joined #ruby
<pontiki>
Tariq: try #rubyonrails channel
gexe has joined #ruby
<shevy>
not many here know AR. I for instance do not know AR
paradisaeidae has joined #ruby
datanoise has left #ruby [#ruby]
rrichardsr3 has joined #ruby
mdih has joined #ruby
Tariq_ has joined #ruby
<Tariq_>
Hey
<Tariq_>
sorry
<Tariq_>
my internet went down
<Tariq_>
what did the last person say?
<Tariq_>
(Or rather, my web browser froze on me)
ruurd has quit [Quit: ZZZzzz…]
rrichardsr3 has quit [Max SendQ exceeded]
rrichardsr3 has joined #ruby
<Tariq_>
hello?
<pontiki>
Tariq: try #rubyonrails channel
<Tariq_>
Ah
rrichardsr3 has quit [Max SendQ exceeded]
<Tariq_>
What is this chat for then?
<pontiki>
that
<Tariq_>
Ah
<pontiki>
ruby
swgillespie is now known as swgillespie[GT]
rrichardsr3 has joined #ruby
fullofcaffeine has joined #ruby
jellyjellyrobot has joined #ruby
jellyjellyrobot has quit [Max SendQ exceeded]
Emmanuel_Chanel has quit [Quit: Leaving]
fullofcaffeine has quit [Ping timeout: 250 seconds]
<shevy>
Tariq_ general ruby questions, like why 15/0 leads to an error and how to fix that
<Tariq_>
Ah, got it
<Tariq_>
Do you recommend that they use javascript?
<Tariq_>
(It's a joke.)
Emmanuel_Chanel has joined #ruby
<shevy>
nah, ruby is superior to javascript
htmldrum has quit [Ping timeout: 252 seconds]
<shevy>
javascript has the advantage of having the monopoly on the browsers
cubicme has joined #ruby
ramfjord has quit [Ping timeout: 246 seconds]
<Tariq_>
I was referring to NaN errors
astrobun_ has joined #ruby
<Tariq_>
which I think can occur with division by zero?
rrichardsr3 has quit [Excess Flood]
kayloos has quit [Remote host closed the connection]
jhn has joined #ruby
<shevy>
I don't know how javasript handles it
<shevy>
in ruby you would get a ZeroDivisionError: divided by 0
<eam>
Tariq_: not a NaN, actually, just an integer divide by zero exception
nofxx has joined #ruby
nofxx has joined #ruby
<eam>
NaN is a floating point value and you *can* divide by 0.0
<above>
know this is the wrong place to ask, but im in search of a vps to further my server side needs. i'm a student trying to eventually accomplish back and front end. im well aqquainted with linux and server installation and configuration. i'd like to host my apps remoteley. is there anyway anyone can help me find or maybe even sponser a bare bones one?
lkba has quit [Read error: Connection reset by peer]
weihan has quit [Ping timeout: 260 seconds]
astrobun_ has quit [Remote host closed the connection]
<Tariq_>
Thanks shevy
devbug has quit [Ping timeout: 256 seconds]
<above>
found solution thanks
<above>
amazon to the rescue
<Tariq_>
I cannot really register onto NickServ
<eam>
above: yeah amazon is really cheap
<Tariq_>
so I cannot ask a question onto RubyOnRails
m0nge has quit [Quit: leaving]
cubicme_ has joined #ruby
JoshL has quit [Ping timeout: 240 seconds]
<Tariq_>
So what should I try to do then?
<Tariq_>
To get help?
lkba has joined #ruby
<eam>
Tariq_: join #freenode and work out how to register your nick so you can participate in #rubyonrails
cubicme has quit [Read error: Connection reset by peer]
<Tariq_>
Ah, okay
<Tariq_>
thansk
<Tariq_>
*Thanks
cubicme_ is now known as cubicme
xxx has quit [Ping timeout: 244 seconds]
konopka has quit [Ping timeout: 264 seconds]
mrtomme has quit [Ping timeout: 260 seconds]
mrtomme_ has joined #ruby
davidcelis has quit [Ping timeout: 240 seconds]
gener1c has joined #ruby
jenrzzz has joined #ruby
konopka has joined #ruby
gaboesquivel has left #ruby [#ruby]
xxx has joined #ruby
xxx is now known as Guest36282
gener1c_ has quit [Ping timeout: 255 seconds]
U7se6 has joined #ruby
bryanray has quit [Ping timeout: 240 seconds]
braincrash has quit [Quit: bye bye]
darkf has joined #ruby
Sthebig has quit [Ping timeout: 244 seconds]
keen____ has joined #ruby
chrisarcand has joined #ruby
JoshL has joined #ruby
gf3 has joined #ruby
Uo9er_ has quit [Ping timeout: 244 seconds]
keen___ has quit [Ping timeout: 260 seconds]
Sthebig has joined #ruby
Sthebig has joined #ruby
davidcelis has joined #ruby
davidcelis has quit [Changing host]
davidcelis has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bigmac_ has joined #ruby
jenrzzz has quit [Ping timeout: 252 seconds]
braincrash has joined #ruby
workmad3 has joined #ruby
bnizzle has joined #ruby
<bigmac_>
BigDecimal.new(100).sqrt(10)
Suzeanne has quit [Ping timeout: 272 seconds]
bkxd has quit [Ping timeout: 272 seconds]
<bigmac_>
should this show 10 * 10 is sqrt of 100?>
bnizzle has quit [Read error: Connection reset by peer]
chopin has quit [Remote host closed the connection]
`tim` has joined #ruby
symm- has quit [Ping timeout: 268 seconds]
<pontiki>
wow
favadi has joined #ruby
`tim` is now known as justbleed
bnizzle has joined #ruby
BSaboia has quit [Ping timeout: 246 seconds]
bkxd has quit [Ping timeout: 260 seconds]
jenrzzz has quit [Ping timeout: 252 seconds]
arup_r has joined #ruby
moeabdol has quit [Ping timeout: 272 seconds]
gix has quit [Ping timeout: 252 seconds]
astrobun_ has joined #ruby
bkxd has joined #ruby
fullofcaffeine has joined #ruby
gix has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
polysics has quit [Remote host closed the connection]
polysics has joined #ruby
freerobby has quit [Quit: Leaving.]
baweaver has joined #ruby
moeabdol has joined #ruby
wildlander has joined #ruby
bigmac_ has joined #ruby
polysics has quit [Ping timeout: 240 seconds]
U7se6 has joined #ruby
Emmanuel_Chanel has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
moeabdol has quit [Ping timeout: 240 seconds]
saddad has joined #ruby
Uo9er_ has quit [Ping timeout: 244 seconds]
fullofcaffeine has joined #ruby
moeabdol has joined #ruby
mary5030 has joined #ruby
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has quit [Read error: Connection reset by peer]
mary5030 has joined #ruby
Guest65 has joined #ruby
Gnomethrower has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
weihan has joined #ruby
rkazak has joined #ruby
beauby has joined #ruby
saddad has quit [Ping timeout: 264 seconds]
Kanibal has joined #ruby
<Kanibal>
Hey! Is it possible in Ruby, to get a block from a member function? I know I can "bind" a "normal" function with the ampersand operator like this: &:foobar, but is it possible for member functions of a class?
ruby-lang199 has joined #ruby
slawrence00 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
arescorpio has quit [Quit: Leaving.]
<shevy>
what is a member function
zenguy_pc has quit [Ping timeout: 250 seconds]
<ruby-lang199>
is there anyone free that I could ask about hashes and array?
bkxd has quit [Ping timeout: 240 seconds]
craysiii has joined #ruby
<Kanibal>
shevy: class Foo def bar end end
<Kanibal>
Foo.bar is the member function
<Kanibal>
err
<Kanibal>
class Foo begin def bar begin end end
<shevy>
the above code is not valid
<Kanibal>
:|
<ruby-lang199>
how would I code this in ruby to get this kind of hash? { 'main_key' : { 'second_key' => [child1,child2] } }
Pupeno has quit [Ping timeout: 268 seconds]
Guest67642 has joined #ruby
<Kanibal>
shevy: class Foo; def bar; end; end
<shevy>
if you want to define class methods on a class, you can do so via def self. as in: class Foo; def self.bar; puts 'hi from bar()'; end; end; Foo.bar
<Kanibal>
Method name is "bar;"
<shevy>
ok
<shevy>
you can tap into a block via the keyword yield, and you can check if a block was given to your method at hand via if block_given?
<Kanibal>
But I guess that Python or some other stuff, according to you?
<Kanibal>
*that's
zenguy_pc has joined #ruby
<bigmac_>
has any one tried cuda gpu scripting with ruby
<bigmac_>
i would like to try and speed up some BigMath using cuda/gpu processing
<bigmac_>
i have found speedgo computing lib
sotojuan has joined #ruby
jun has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
<shevy>
Kanibal which one is the method of the other class that expects a block as a parameter? Aren't blocks optional anyway even in the &foo notation?
<Kanibal>
And I'd like to use the on_message method of my User instance instead
fullofcaffeine has joined #ruby
rkazak_ has joined #ruby
<shevy>
hmm
<shevy>
that is the first time I am seeing something like this: block.(message.data)
<Kanibal>
same for me
Suzeanne has joined #ruby
<Kanibal>
From what I remember, it's just a alias for .call
<Kanibal>
So, block.call(message.data)
<shevy>
ah
bkxd has quit [Ping timeout: 240 seconds]
<shevy>
I find that rather complex :\
<Kanibal>
The current solution works
<Kanibal>
I just wonder, if I could omit the additional block
bkxd has joined #ruby
Rickmasta has joined #ruby
bitsapien has joined #ruby
rickruby has joined #ruby
Tempesta has quit [Quit: AdiIRC is updating to v1.9.9 Beta Build (2015/10/17) 32 Bit]
rkazak_ has quit [Quit: Sleep.....ing....]
rickruby has quit [Client Quit]
ramfjord has joined #ruby
<Kanibal>
shevy: anyway, sorry for the confusion about the member functions - I'm usually coding in C++, there the instance methods are called member functions.
golgaroth has joined #ruby
<shevy>
your ruby code is advanced too, you use lots of lambdas
bitsapien has quit [Client Quit]
<Kanibal>
I tried to design the server code as asynchron as possible
<Kanibal>
The server is based on Reel aka. EventMachine
<Kanibal>
und should hopefully perform well enough :X
<Kanibal>
*and
fullofcaffeine has quit [Ping timeout: 272 seconds]
fullofcaffeine has joined #ruby
nemo_ has joined #ruby
brotatos has joined #ruby
krz has joined #ruby
<brotatos>
Hi all, I'm having the following issues with a gem pristine --all command: http://sprunge.us/DKMg
<brotatos>
Anyone know how to fix this?
mary5030 has joined #ruby
SylarRuby has joined #ruby
<Kanibal>
brotatos: You cannot write to /System (I assume you are using OSX?)
<brotatos>
Kanibal: yup. Do I just chmod /System then?
<Kanibal>
No.
<Kanibal>
Hell, no :D
mary5030 has quit [Remote host closed the connection]
<Kanibal>
I would install ruby in the userspace
mary5030 has joined #ruby
<Kanibal>
Then you even have the freedom to use a more recent version e.g. 2.2.3
Chaoborid has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
<lewis1711>
baweaver, .each in a Dir just gives the string names, not files. so it's not possible. I'll just use strings rather than trying to do things with Dir
Chaoborid has joined #ruby
kies^ has joined #ruby
dikaio has joined #ruby
houhouli_ has quit [Remote host closed the connection]
subscope has quit [Remote host closed the connection]
fullofcaffeine has quit [Ping timeout: 250 seconds]
wallerdev has quit [Ping timeout: 240 seconds]
subscope has joined #ruby
tmtwd has quit [Ping timeout: 240 seconds]
stardiviner has quit [Quit: Code, Sex, Just fucking world.]
Chaoborid has quit [Remote host closed the connection]
Chaoborid has joined #ruby
InemesitAffia has quit [Quit: Page closed]
zotherstupidguy has joined #ruby
ayonkhan has joined #ruby
tredstone has joined #ruby
jsuth has joined #ruby
gexe has quit [Ping timeout: 272 seconds]
wallerdev has joined #ruby
kingplusplus has joined #ruby
patdohere has joined #ruby
SCHAAP137 has joined #ruby
SCHAAP137 has joined #ruby
kingplusplus has left #ruby [#ruby]
finisherr has quit [Quit: finisherr]
tredstone has quit [Ping timeout: 268 seconds]
jun has quit [Remote host closed the connection]
trollga has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
freezevee has joined #ruby
rkazak_ has joined #ruby
bruno- has quit [Ping timeout: 268 seconds]
Chaobori_ has joined #ruby
patdohere has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
peteykun has joined #ruby
Chaoborid has quit [Ping timeout: 240 seconds]
cubicme`` has quit [Remote host closed the connection]
cubicme`` has joined #ruby
jenrzzz has joined #ruby
tjohnson has quit [Quit: Connection closed for inactivity]
U7se6 has joined #ruby
zebulon_pike has joined #ruby
Uo9er_ has quit [Ping timeout: 272 seconds]
cubicme`` has quit [Ping timeout: 252 seconds]
justbleed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zebulon_pike>
hi. is there any way I can get the curses gem to display unicode correctly without having to recompile anything? (I've got ruby 2.2.2p95 and curses 1.0.1 on an ubuntu 14 vagrant box inside a hideously old version of os x. unicode works fine in irb.)
thinkswan has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
Eternal_ is now known as Eternal
devbug has joined #ruby
<zebulon_pike>
or: are there any better alternatives to curses?
VeryBewitching has quit [Quit: Konversation terminated!]
yeticry_ has quit [Read error: Connection reset by peer]
<unshadow>
jhass: well... I want to create a uniqie ID out of the currently running Threads, then, I will check the IDs in a loop and make sure all running threads are the same ones form before, no new ones got created and no old ones died
<apeiros>
unshadow: and what do you need that unique id for?
firoxer_ has left #ruby [#ruby]
<unshadow>
For example: ids = []; 50.times do ids << Thread.new do puts "a"; loop do sleep 5; check if ids are the same ones for currently running Threads
<unshadow>
(super psudo code)
yeticry has joined #ruby
<unshadow>
hope it makes sense
<jhass>
eh
<jhass>
threads.all?(&:alive?) ?
<unshadow>
jhass: no, not alive or dead, but are they the same threads that I started with
<apeiros>
unshadow: just reference the threads
blackmesa has joined #ruby
<jhass>
^, this sounds very much like alive or dead
<unshadow>
lets say I have a pool of Threads, 10 threads of example, now, I want to run on that pool, and make sure that the IDs I gathered before are the same ones that the currently runing threads have
<jhass>
WHY?
<jhass>
?xy
<ruboto_>
it seems like you are asking for a specific solution to a problem, instead of asking about your problem. This often leads to bad solutions and increases frustration for you and those trying to help you. More: http://meta.stackexchange.com/a/66378
<apeiros>
a) why would they change? b) why test against ids instead of the threads themselves?
<unshadow>
apeiros: I may test against threads themselves, this could work for my case.
<unshadow>
jhass: .... well, it's part of a security design I can't give too much detail about ... sorry
<jhass>
then let me try to remember on what product to not give too much about ...
<apeiros>
ah well, common answer to "can't give you the details" is: go hire a consultant then.
_blizzy_ has quit [Ping timeout: 246 seconds]
<eam>
sounds like a bad idea though, given that all these identifiers and so on are easiliy manipulatable
tvw has joined #ruby
<unshadow>
eam: can they ? are they not unique ?
<eam>
unshadow: it's just a ruby object
atomical has quit [Max SendQ exceeded]
<unshadow>
can I create a Thread with the same ID as another running Thread ?
<eam>
if you can mess with a thread inside a process, certainly you can arbitrarily mess with any ruby object in said process as well
<adaedra>
Also, unique means that if an object disappears, a new one can pick up the old ID, theorically.
leafybasil has joined #ruby
<unshadow>
hm.... good points
<unshadow>
I guess back to the drawing board XD
bMalum has joined #ruby
<jhass>
unshadow: I think you're seeking for the tid if anything, that's not related to the ruby object's memory address in any way
Icey has quit [Quit: Leaving]
<jhass>
and not a portable property afaik, that is it may not even exist
<unshadow>
jhass: apeiros: the Idea is to have somekind of a checksum for the currently running Threads, so those cannot be changed or messed with by external manipulation
<eam>
not really possible
<apeiros>
unshadow: maybe I was unclear before: I'm utterly uninterested in helping with non-public problems.
<unshadow>
apeiros: Ok, NP.
Bellthoven has joined #ruby
<unshadow>
I gueese I wasn't aware this was a "GPL Ruby" group and not a "All are welcome to ask questions" Ruby group
<unshadow>
anyway Thanks guys, I guess I'll go do more reading
<apeiros>
unshadow: careful
<apeiros>
I did not forbid you to ask the question, what you just did is tempting me to actually kick you.
<apeiros>
you're not entitled to my help. you equating me telling you that *I* don't want to help you with *this group not welcoming you* is a dick move.
stenofilen has joined #ruby
<unshadow>
apeiros: Dude... take it easy, I asked a question, you answered and I accepted your answer, you then asked *why*, I told you that I cannot give too much info and you got mad. I'm sorry if I got over the line, anyway, I dont want to make this a big issue. I like this group you are doing a good job here, if you dont want to help it's your right of curse. Have a good day :)
<shevy>
hmm you people asked him why he wanted to know
<apeiros>
unshadow: "you got mad" no. I reiterated that I'm not interested. I got mad at your dick move. and still am.
<jhass>
mmh, I just can't think of any reasonable security property to come out of such a check. especially in ruby done in process
atomical has joined #ruby
bruno- has quit [Ping timeout: 250 seconds]
<unshadow>
apeiros: Again... sorry, lets end this now, it's a dumb argument.
<jhass>
apeiros: go work on ruboto :P
<adaedra>
bim
<shevy>
?cookie
<ruboto_>
here's your cookie:
<shevy>
cookie time for #ruby
Alina-malina has quit [Read error: Connection reset by peer]
<adaedra>
That's a nice underscore you have here, ruboto_
<unshadow>
jhass: well, Lets say you have a root control over a Linux machine running a program using ruby. I want to do a check every few secound to make sure non of my Threads (Ruby Threads) havn't been tampared with
ruboto_ is now known as ruboto
<jhass>
how could I tamper with them?
michael_mbp has quit [Excess Flood]
<adaedra>
I guess that if "something" can tamper with your threads, it can tamper with your whole process, including your security check.
michael_mbp has joined #ruby
<jhass>
^
<unshadow>
You could initiate the program again with different parameters, you can change the config file and re-run the program , etc ...
<eam>
unshadow: you could attach with a debugger and redefine whatever methods you have in place to return "everything's ok"
roxtrongo has joined #ruby
<adaedra>
That may not be the best place to place mitigations processes.
<eam>
a general rule of unix security is: if you're running with the same permission as another process you have full control over the behavior and data inside that process
fastAndSlow has joined #ruby
<unshadow>
So there isn't a way to do a validety check without the "checker" being also susceptible to compromise , right ?
<adaedra>
If one thread of your program get compromised, all of the process is
<eam>
unshadow: correct. Additionally, no validity check is going to be meaningful since the thread's state will change significantly over time
<unshadow>
eam: hhm..... What if .... the checker is on another machine ? using DRB or some other technology ?
roxtrongo has quit [Ping timeout: 264 seconds]
SCHAAP137 has quit [Quit: Leaving]
<eam>
unshadow: what exactly are you going to check that's meaningful, though?
<eam>
if you have that kind of separation, why not rely on it?
<jhass>
unshadow: what prevents me from monkey patching DRb
<jhass>
?
<unshadow>
I wanted to make sure the same Threads that were created on startup (3 threads) are the same ones (they should stay alive untill the program is shutdown) when the program is running
<eam>
why?
<eam>
here's the thing: The thread ID is one of the less interesting attributes involved here -- checking it is a smell
<unshadow>
So I know they started clean, and if they are tampered with (as in the program restarted, the code changed , etc..) I can kill the process
<eam>
it says "I don't really trust my abstractions and security boundaries"
<eam>
and if you can't trust those, it's game over anyway
U7se6 has joined #ruby
<adaedra>
Code tempering would mean you have remote code execution
<unshadow>
I'm basing my "solution" on the thought that the machine I'm running on has being compromised
<adaedra>
If you detect that code has been tempered, it's already too late, imo
<unshadow>
adaedra: Not if I can detect it live
<unshadow>
Then I can kill the connection, or at lest alert someone (or something)
<adaedra>
you were saying "every n seconds", earlier.
<unshadow>
adaedra: not live , you are right, but close to it
<unshadow>
So the question is, what a unique value could I check that cannot be duplicate while the Thread is running
Feyn has quit [Quit: Leaving]
<eam>
no, the question is "why do you think this check is relevant" in the event of a compromise?
Uo9er_ has quit [Ping timeout: 246 seconds]
<adaedra>
That would tell you nothing useful
<unshadow>
eam: the machine which will be compromised is a EXT machine, compromising it will get you nothing (in my usecase) the only thing that will get you something, is manipulating the code mid-run
<unshadow>
EXT = External (as in resides in an isolated DMZ)
<adaedra>
If you have a remote execution problem, it can act without changing your thread objects.
Blaguvest has quit [Read error: Connection reset by peer]
<unshadow>
adaedra: Take it a step forward, no need for a remote code exec, the idea is the machine started with a root user access for the attacker
patrick_star has quit [Quit: Leaving]
<shevy>
all power to the superusers!
<unshadow>
shevy: XD
<adaedra>
unshadow: and you think your attacker would care for your ruby program with root access?
<unshadow>
adaedra: Yes, becuase the access give him nothing, to get into anything valuble he will have to manipulate the software (which is a GateWay to the internal network)
<adaedra>
A root access on a machine, not valuable?
<unshadow>
adaedra: Yes, becuase the machine is isolated and have nothing of importance on it, it can be changed and restarted in a matter of sec , So my only "achilles heel" is the program.
<adaedra>
I still think you're taking the problem from the wrong angle, but have fun anyway.
iateadonut has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
daffy_duck has joined #ruby
<unshadow>
adaedra: Yeha, I guess :) thanks though for helping me with the thinking process
<Ebok>
Hmmm. is there an easy way to look through an array and move all instances of one result into another array? In one step I mean.
<jhass>
my counter arguments would be: not always wanted so you get fragmented codebase, harder to understand for people new to the codebase, more verbose and not being able to use constants is a major drawback, using a constant for a constant value carries a lot of useful intent
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
lessless has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beauby has joined #ruby
<stannard>
jhass: Good points. I would counter that the added flexibility to change is more than worth the verbosity. You can still use constants, you just need to define and call them in a more verbose manner.
DoubleMalt has joined #ruby
doublemalt_ has joined #ruby
skweek has quit [Ping timeout: 252 seconds]
mart1wtf has joined #ruby
<jhass>
well, I guess the thing is that the thing it wants to solve was never even a slight pain point for me
<jhass>
ymmv of course
nemo_ has quit [Remote host closed the connection]
kobain has joined #ruby
atomical_ has quit [Ping timeout: 255 seconds]
mart1wtf has left #ruby [#ruby]
sdothum has joined #ruby
pathrocle has quit [Remote host closed the connection]
nemo_ has joined #ruby
Rollabunna has joined #ruby
kobain has quit [Max SendQ exceeded]
<stannard>
jhass, do you use an IDE?
<jhass>
no, just sublime
karapetyan has quit [Remote host closed the connection]
ndrei has joined #ruby
favadi has joined #ruby
<stannard>
you are just really good at remembering to change the file name and class name at the same time?
<jhass>
I guess so
<stannard>
alright
kobain has joined #ruby
<stannard>
maybe I rename clases a lot
<jhass>
but I'm also not constantly renaming things, rather take some more time when creating stuff I guess
sdothum has quit [Client Quit]
<Ebok>
If I want a single variable within a class to be a constant... only within that class... what symbol do I use again?
* kristian_on_linu
apologies for saying "hi" twice
<jhass>
you basically never want to use $global or @@class_variable
Akagi201 has quit [Remote host closed the connection]
<kristian_on_linu>
what install method do you recommend? I need to update a gem from Github, and I'm getting dependency issues. RVM seems relatively easy?
khebbie has joined #ruby
nemo_ has quit [Remote host closed the connection]
<Ebok>
I'm surrently using the @ but it has occurred to me that this particular variable never changes between instances of the class, and its somewhat lenghty. So I just wanted to have one singular global for the class, so it doesnt get replicated.
acke has joined #ruby
<jhass>
if you keep mind to always use the same user account for everything related to it (and not root for anything), yes
<eam>
Ebok: why don't you want it to be replicated?
<jhass>
kristian_on_linu: ^
<Ebok>
Because its an array with like 120 variables that dont ever change >_>
<Ebok>
Mostly.
<kristian_on_linu>
jhass: I'd prefer that
<Ebok>
Its not large enough to matter, but it bugged me
<kristian_on_linu>
RVM it is
favadi has quit [Ping timeout: 240 seconds]
<eam>
Ebok: if you've profiled your program and the optimization makes sense, do it. But premature optimization tends to create more problems than it corrects
<Ebok>
Fairenough
<canton7>
if it's never changed, wouldn't a CONSTANT make most sense?
<eam>
Ebok: keep in mind, if you have two instances referencing the same array they won't copy any data anyway
<eam>
>> a = [1,2,3]; b = a; [a.object_id, b.object_id]
<notmorpheus>
that part doesn't happen from the sudo make install above
ericjphillips has joined #ruby
<notmorpheus>
oh ok
blackmesa has joined #ruby
<notmorpheus>
the chruby install from the first part was system wide too
<notmorpheus>
hence sudo make install and i think this from looking at the Makefile
DoubleMalt has quit [Ping timeout: 255 seconds]
doublemalt_ has quit [Ping timeout: 268 seconds]
arturmartins has joined #ruby
<notmorpheus>
wonder why this setup.sh just wasn't part of that
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<notmorpheus>
rather, why have people run "sudo make install" in that first install section vs. just "sudo scripts/setup.sh"
kraljev11 has joined #ruby
Asher has joined #ruby
roxtrongo has joined #ruby
atomical has joined #ruby
<notmorpheus>
never mind, i get what you meant by system wide now
<notmorpheus>
thanks jhass
bluish has quit [Ping timeout: 246 seconds]
jgt has quit [Ping timeout: 255 seconds]
dragon_inspactor has joined #ruby
Rollabunna has quit [Read error: Connection reset by peer]
Rollabun_ has joined #ruby
roxtrongo has quit [Ping timeout: 252 seconds]
beauby has quit [Ping timeout: 268 seconds]
saddad has joined #ruby
Uo9er_ has joined #ruby
ericjphillips has quit [Quit: Leaving.]
stryek has quit [Remote host closed the connection]
Porfa has quit [Quit: Porfa]
Us54er has quit [Ping timeout: 255 seconds]
The_Phoenix has quit [Read error: Connection reset by peer]
jgt has joined #ruby
polysics has quit []
DEA7TH has quit [Quit: DEA7TH]
Rickmasta has joined #ruby
aryaching has joined #ruby
nemo_ has quit [Ping timeout: 240 seconds]
nemo_ has joined #ruby
bluish has joined #ruby
GnuYawk has joined #ruby
idefine has quit [Remote host closed the connection]
karapetyan has quit [Remote host closed the connection]
veduardo has quit [Ping timeout: 246 seconds]
karapetyan has joined #ruby
govt_official has joined #ruby
DEA7TH has joined #ruby
<govt_official>
whats the best way to accomplish a sparse n-dimensional array? I need to be able to do something like m[z][y][x][a][b][c], but potentially way deeper than that
<jhass>
static sizes?
lxsameer has quit [Quit: Leaving]
khebbie has quit [Ping timeout: 252 seconds]
Akagi201 has joined #ruby
davedev24 has quit []
<govt_official>
I want to have a maximum size that I might know beforehand, but I don't know how large. I'm working with extremely large datasets of NL, and I'm writing markov chains
n008f4g_ has quit [Ping timeout: 272 seconds]
<govt_official>
I thought about just dumping it all into redis and doing it that way
nemo_ has quit [Remote host closed the connection]
<jhass>
might not be a bad approach actually
karapetyan has quit [Remote host closed the connection]
nemo_ has joined #ruby
<jhass>
and with size I meant the maxima for a, b, c, x, y, z
karapetyan has joined #ruby
arturmartins has quit [Quit: Leaving...]
rkazak has quit [Quit: Sleep.....ing....]
<govt_official>
thousands
sankaber has quit [Ping timeout: 265 seconds]
<govt_official>
I mean it would be like, words["I"]["mean"]["it"]["would"]... etc
sankaber has joined #ruby
chopin has quit [Remote host closed the connection]
<govt_official>
so thousands or maybe more than that
<jhass>
so it's not actually an array but a map or tree
<Coraline>
A tree would be a great way to structure that.
<Coraline>
Or a graph database with weights attached to associations.
<Coraline>
I would probably use Neo4j rather than Redis or a traditional RDBMS
<govt_official>
I thought about a graph, but I am going to have really intense weights
<Coraline>
I mean why write all that code yourself?
<jhass>
yeah, representing it in Ruby will probably kill for the overhead of each object
<govt_official>
I'm writing a utility for doing bayesian poisoning, I have a baseline for how the weights need to be and I think I can defeat really powerful filters like Akismet, Gmail etc
blue_deref has joined #ruby
<govt_official>
but in order to do it, I need to weigh the generated content with a huge amount of legitimate text
<Coraline>
That sounds nefarious and spammy
<govt_official>
yep
<Coraline>
What's your intent?
zenguy_pc has quit [Ping timeout: 255 seconds]
<govt_official>
I also have a solution for when my spam blots out the sun, a more intelligent filter
<demonlove>
namaskar
acke has joined #ruby
symm-_ has quit [Quit: Leaving...]
fullofcaffeine has joined #ruby
Akagi201 has quit [Ping timeout: 246 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
andersoldahl has joined #ruby
acke has quit [Ping timeout: 240 seconds]
Azure has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
acke has joined #ruby
fullofcaffeine has quit [Ping timeout: 250 seconds]
idefine has quit [Ping timeout: 246 seconds]
gexe has quit [Ping timeout: 240 seconds]
Azure has joined #ruby
symm- has joined #ruby
zenguy_pc has joined #ruby
weihan has quit [Ping timeout: 240 seconds]
andersoldahl has quit [Quit: My Mac has gone to sleep.]
blackmesa has quit [Ping timeout: 272 seconds]
pwnd_nfsw has joined #ruby
bruno- has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
tmtwd has joined #ruby
gexe has joined #ruby
kristian_on_linu has quit [Quit: Leaving]
Asher has quit [Quit: Leaving.]
workmad3 has joined #ruby
mary5030 has joined #ruby
stannard has quit [Remote host closed the connection]
skcin7 has joined #ruby
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
blackmesa has joined #ruby
p1k has quit [Ping timeout: 250 seconds]
minibar has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
<minibar>
hello I'm new to ruby, what should I use simmilar to python virtualenv?
Pupeno has quit [Remote host closed the connection]
<minibar>
to install gems locally and so on
David27 has joined #ruby
<adaedra>
bundler can do that
<adaedra>
(If I understand correctly your need, as I don't know virtualenv)
mary5030 has quit [Ping timeout: 250 seconds]
ixti has joined #ruby
<minibar>
what about sanbox/rvm
hectortrope has quit [Read error: Connection reset by peer]
buharin has joined #ruby
<buharin>
hey
<buharin>
is it better to use ruby for android
<buharin>
or java
<buharin>
mean android sdk
pathrocle has joined #ruby
<adaedra>
better is subjective.
nemo_ has quit [Remote host closed the connection]
bruno- has quit [Ping timeout: 272 seconds]
<havenwood>
minibar: Install Rubies with ruby-install, switch between them with chruby, and use RubyGems itself or Bundler for managing gem dependencies.
<jhass>
minibar: bundler ensures only specific versions of specific gems can be loaded. Additionally it can install those to local site dir if desired. RVM, rbenv and chruby are only primarily useful to install, manage and activate a specific ruby version/implementation these days
<Yzguy>
I was kind of expecting it to be like python's argparse, it spits out usage when its missing
hinbody has quit [Read error: Connection reset by peer]
<Yzguy>
ln 29, 30 doesn't seem like the best way to handle it
aclearman037 has quit [Client Quit]
yosiat has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beast has quit [Ping timeout: 260 seconds]
sankaber has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 240 seconds]
<canton7>
trollop and slop might be more what you're looking for?
jun has quit [Remote host closed the connection]
sankaber has joined #ruby
aryaching has joined #ruby
<Yzguy>
slop looks nice.
<Yzguy>
just curious how you more experienced ruby guys would handle missing arguments in that little snippet
<adaedra>
I'd have used Hash#key? to check for a parameter.
bryanray has joined #ruby
<shevy>
But you are french.
<daed>
do french people write weird ruby code?
fullofcaffeine has joined #ruby
U7se6 has joined #ruby
<shevy>
Look at their comments!!!
Coldblackice has joined #ruby
<adaedra>
shevy: and this information was important to tell because...?
<shevy>
Allow me to quote from adaedra
<shevy>
<adaedra> I prefer cursing in French.
<shevy>
<adaedra> It's like wiping your ass with silk.
<daed>
matrix quote
<adaedra>
Indeed
<shevy>
adaedra everyone is important, especially cookies for ruboto
<shevy>
?cookie
<ruboto>
here's your cookie:
<adaedra>
Let me ask again
<adaedra>
It was important because ?
<shevy>
Yes?
symm- has quit [Quit: Leaving...]
<adaedra>
I see
User458764 has joined #ruby
<daed>
i like cookies
Uo9er_ has quit [Ping timeout: 255 seconds]
finisherr has joined #ruby
marsjaninzmarsa has quit [Quit: ZNC 1.7.x-git-438-e879203 - http://znc.in]
Yzguy has quit [Quit: Zzz...]
stamina has quit [Quit: WeeChat 1.3]
Yzguy has joined #ruby
fullofcaffeine has quit [Read error: Connection reset by peer]
fullofcaffeine has joined #ruby
marsjaninzmarsa has joined #ruby
houhoulis has joined #ruby
BSaboia has joined #ruby
Emmanuel_Chanel has quit [Read error: No route to host]
acke has joined #ruby
symm- has joined #ruby
jsuth has quit [Ping timeout: 250 seconds]
GriffinHeart has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
bruno- has joined #ruby
idefine has joined #ruby
totimkopf has joined #ruby
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idefine has quit [Ping timeout: 246 seconds]
grekkos_ has quit [Ping timeout: 255 seconds]
dagda1_ has joined #ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
grekkos has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
jsuth has joined #ruby
kirun has joined #ruby
Channel6 has joined #ruby
cr3 has left #ruby [#ruby]
jgt has joined #ruby
zenguy_pc has quit [Ping timeout: 244 seconds]
kies^ has quit [Quit: baaaaiiiiiiiiiii~]
kies^ has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
ElFerna has joined #ruby
iamjarvo_ has joined #ruby
fullofcaffeine has joined #ruby
bryanray has joined #ruby
Akagi201 has joined #ruby
arup_r has joined #ruby
fullofcaffeine has quit [Ping timeout: 272 seconds]
purplexed^ has joined #ruby
Akagi201 has quit [Ping timeout: 265 seconds]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
QORRiE has joined #ruby
QORRiE has quit [Changing host]
QORRiE has joined #ruby
ramfjord has joined #ruby
ndrei has quit [Ping timeout: 252 seconds]
nickjj has joined #ruby
workmad3 has joined #ruby
acke has quit [Remote host closed the connection]
ndrei has joined #ruby
yosiat has joined #ruby
stannard has joined #ruby
zenguy_pc has joined #ruby
Emmanuel_Chanel has quit [Read error: No route to host]
idefine has quit [Ping timeout: 246 seconds]
stannard has quit [Remote host closed the connection]
Emmanuel_Chanel has joined #ruby
`tim` has joined #ruby
bryanray has joined #ruby
spuk has joined #ruby
workmad3 has quit [Ping timeout: 260 seconds]
platzhirsch has joined #ruby
acke has joined #ruby
`tim` has quit [Client Quit]
`tim` has joined #ruby
trollga has joined #ruby
bluish has quit [Quit: WeeChat 1.2]
boshhead_ is now known as boshhead
kidoz has quit [Quit: Ухожу я от вас]
_tpavel has joined #ruby
grekkos has quit [Ping timeout: 240 seconds]
nickjj has quit [Read error: Connection reset by peer]
gambl0re has quit [Ping timeout: 246 seconds]
`tim` has quit [Ping timeout: 260 seconds]
grekkos has joined #ruby
framling has joined #ruby
tynamite has joined #ruby
<tynamite>
Hi I'm using an old version of ruby and when I try to insert the % symbol into my database, I get an exception with a stack trace and the page fails to load. How do I know whether it's ruby causing it or my web framework??
nickjj has joined #ruby
<canton7>
that would depend massively on what the exception says and what's in the stack trace
atomical has quit [Ping timeout: 255 seconds]
<canton7>
"my car doesn't work. is it the fuel pump, turbo, steering system, or coolant that's broken"
<canton7>
something caused by line 506/508 or makenew.rb is causing another decode of the data, and that's erroring out because at that point the data isn't encoded
<tynamite>
I changed my makenew.rb file so it's actually lines 296 and 298 causing the error.
<tynamite>
296 is Raven.capture do 298 is data = request.subset(:content, :post_id)
<tynamite>
Raven is a ruby gem for logging errors in ruby code and sending it to my email.
<tynamite>
2
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dragon_inspactor has quit [Ping timeout: 246 seconds]
leafybasil has quit [Ping timeout: 260 seconds]
stenofilen has quit [Ping timeout: 252 seconds]
leafybas_ has quit [Ping timeout: 240 seconds]
bruno- has quit [Ping timeout: 250 seconds]
Galas has joined #ruby
pwnd_nfsw has quit [Ping timeout: 246 seconds]
Channel6 has quit [Quit: Leaving]
blackmes1 has quit [Ping timeout: 265 seconds]
stannard has joined #ruby
ndrei has quit [Ping timeout: 260 seconds]
idefine has joined #ruby
ndrei has joined #ruby
avahey has joined #ruby
<tynamite>
Here's my ruby code for makenew.rb Lines 2 and 4 are referenced in the stack trace.
platzhirsch has joined #ruby
karapetyan has quit [Remote host closed the connection]
idefine has quit [Ping timeout: 246 seconds]
Cyther has joined #ruby
swgillespie has joined #ruby
roxtrongo has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
pwnd_nfsw has joined #ruby
bMalum has quit [Quit: bMalum]
jgt has quit [Read error: No route to host]
bMalum has joined #ruby
Galas has quit [Remote host closed the connection]
roxtrongo has joined #ruby
Akagi201 has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
grekkos has quit [Ping timeout: 240 seconds]
ElFerna has joined #ruby
hakunin_ has joined #ruby
hakunin has quit [Read error: Connection reset by peer]
futilegames has joined #ruby
leafybasil has joined #ruby
ochkoffein has joined #ruby
ochkoffein has quit [Client Quit]
michaeldeol has joined #ruby
Akagi201 has quit [Ping timeout: 255 seconds]
QORRiE has quit [Remote host closed the connection]
aryaching has quit [Ping timeout: 250 seconds]
aryaching has joined #ruby
_wldcordeiro has joined #ruby
wldcordeiro has quit [Ping timeout: 255 seconds]
Rollabunna has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
opensource_ninja has joined #ruby
<hackeron>
hey, anyone familiar with public/private key encryption? - I need to generate a 256 byte public key to activate an IP camera. The example the manufacturer gives is this: "6537560e0ecb7e1663fa8ee924589c1b07874010366aada057396f32369253da3af14c273276fc975d6bc64ba0da48f63e5345ff77fbb8472c619ffba2a5dd1e1797a7e86eb12ed440e7d6a2af37532dda72600335aa2daed31381e877532a30176973ffbac0dc46485fa75d15620d7bc19786b0a3b959f
<hackeron>
fc7de9dc36e80da5f" -- How would you ...
<hackeron>
... generate a public key like this? - Everything I get with openssl or ssh-keygen looks different
<adaedra>
jhass: there's an openssl binding in ruby, for what it's worth
<adaedra>
er
<adaedra>
hackeron ^
Sembei has quit [Ping timeout: 252 seconds]
<jhass>
"encryption with base64" sigh
darkf has quit [Quit: Leaving]
<adaedra>
ahah
<craysiii>
oxymoron?
karapetyan has joined #ruby
<hackeron>
jhass: I think encoding the public key with base64 - when I do base64 decode, I get that string above
mois3x has joined #ruby
<hackeron>
jhass: but the question is, what is the public/private key generated by?
<jhass>
gosh, the way that stuff is written makes me not trust it for a second
gambl0re has joined #ruby
<jhass>
well, they expect an RSA key
<shevy>
haha
<jhass>
didn't figure the keysize yet
nateberkopec has quit [Quit: Leaving...]
ochkoffein has joined #ruby
<hackeron>
jhass: yeh, but any RSA key with various sizes I generate wither with openssl genrsa or with ssh-keygen -t rsa seems to look different and not accepted by the caemra - just returns an Invalid XML Content
decoponio has quit [Quit: Leaving...]
<jhass>
I don't even manage to copy the example out of the PDF
<hackeron>
jhass: with base64 -D it shows: 6537560e0ecb7e1663fa8ee924589c1b07874010366aada057396f32369253da3af14c273276fc975d6bc64ba0da48f63e5345ff77fbb8472c619ffba2a5dd1e1797a7e86eb12ed440e7d6a2af37532dda72600335aa2daed31381e877532a30176973ffbac0dc46485fa75d15620d7bc19786b0a3b959ffc7de9dc36e80da5f
codecop has quit [Remote host closed the connection]
<jhass>
let's see
<hackeron>
jhass: thank you for looking at this :)
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
roxtrongo has quit [Read error: Connection reset by peer]
_tpavel has quit [Quit: Leaving]
shinnya has joined #ruby
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
idefine has joined #ruby
bruno- has joined #ruby
<jhass>
I think the example is just garbage
user083 has joined #ruby
<hackeron>
jhass: it's not, when I POST the example - the camera responds with a challenge
<hackeron>
jhass: when I post anything I generated with openssl or ssh-genkey, it says invalid XML
<hackeron>
jhass: so the question is, what is this and how do you generate your own, heh
Galas has joined #ruby
Uo9er_ has joined #ruby
<jhass>
yeah...
karapetyan has quit [Ping timeout: 246 seconds]
<shevy>
XML!
idefine has quit [Ping timeout: 246 seconds]
gambl0re has quit []
michaeldeol has joined #ruby
U7se6 has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
michaeldeol has quit [Client Quit]
<jhass>
hackeron: no reference implementation by any chance?
gambl0re has quit [Client Quit]
<hackeron>
jhass: nope, just that document - they have not provided anything else at all :/
QORRiE has joined #ruby
michael_mbp has quit [Excess Flood]
ndrei has quit [Ping timeout: 252 seconds]
bove has quit [Ping timeout: 268 seconds]
ndrei has joined #ruby
bruno- has quit [Ping timeout: 246 seconds]
gambl0re has joined #ruby
bove has joined #ruby
bruno- has joined #ruby
blackmes1 has joined #ruby
michaeldeol has joined #ruby
michael_mbp has joined #ruby
beast_ has quit [Quit: Leaving]
arup_r has quit [Quit: Leaving]
kraljev11 has quit [Ping timeout: 265 seconds]
jun has joined #ruby
ochkoffein has quit [Quit: -----------------------------------------------]
GriffinHeart has joined #ruby
ochkoffein has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
ndrei has joined #ruby
<hackeron>
jhass: any wild guesses, heh?
ramfjord has joined #ruby
acke has quit [Remote host closed the connection]
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
not really yet
michaeldeol has joined #ruby
tinyhipp1 is now known as tinyhippo
GriffinHeart has quit [Ping timeout: 260 seconds]
<jhass>
it's interesting that the hexstring is indeed 256 characters
<jhass>
which makes no sense at all
ruurd has joined #ruby
ochkoffein has quit [Quit: -----------------------------------------------]
ElFerna has joined #ruby
ochkoffein has joined #ruby
<hackeron>
jhass: yeh :/ - I know they are a windows shop, they are a fan of SOAP and what not, maybe this is how C# generated public keys look like or something? - whatever they use doesn't appear to be something standard
<hackeron>
which is why I guess they have (or at least used to have) a terrible reputation for security
jgt has joined #ruby
<jhass>
it's custom, likely wrong implementation
<jhass>
it makes no sense to reinvent the keyformat
<jhass>
C# might be bad, but not that bad
blackmes1 has quit [Ping timeout: 255 seconds]
blackmes1 has joined #ruby
Musashi007 has joined #ruby
<hackeron>
jhass: hmm, very peculiar - but they mention RSA and they mention AES128 there - so how are they taking that and generating a 256byte public key, hmmmm
stannard has quit [Remote host closed the connection]
<jhass>
well, it's not a 2048 bit key, even 256 bytes are 2048 bits, if they limit the possible bytes to ASCII 0 to ASCCI f ...
<hackeron>
jhass: we do - essentially it does cryptico.generateRSAKey(new Date + '', 1024) - then sends the ascii-armored version as a POST request
jun has quit [Remote host closed the connection]
yardenbar has quit [Client Quit]
futilegames has quit [Quit: futilegames]
<adaedra>
Tell me doing `+ ''` is not a good way of casting into a string in JS.
firstdayonthejob has joined #ruby
<hackeron>
adaedra: haha, I don't know, but that's what hikvision do
fullofca_ has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
<buharin>
hey I run ruby throw ruby the hard way
<buharin>
and I really enjoy it :D
<buharin>
whats next?
workmad3 has joined #ruby
ochkoffein has quit [Quit: -----------------------------------------------]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Xiti has joined #ruby
<jhass>
buharin: read some styleguides, ruby koans, ruby warrior, exercism, codewars, (partly) automate some task you do regularly
<buharin>
ok :)
<buharin>
jhass, espacially I hate Java
<buharin>
so I find that ruby got good framework
<buharin>
for android and iOS
<buharin>
developing
<buharin>
and I decided to learn it
ochkoffein has joined #ruby
<buharin>
cause I know already Python and it looks both greate languages
PDI has quit [Ping timeout: 240 seconds]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<shevy>
buharin do you already use modules?
mbeasley has joined #ruby
<buharin>
nop ;d I create my own
<jhass>
hackeron: so with above lib I'd try Base64.encode64(RSA::KeyPair.generate(1024, 3).public.modulus.to_s(16))
hinbody has joined #ruby
blackmes1 has quit [Ping timeout: 256 seconds]
malcolmva has quit [Ping timeout: 250 seconds]
workmad3 has quit [Ping timeout: 252 seconds]
PDI has joined #ruby
notmorpheus has quit [Quit: Leaving]
ukd1 has joined #ruby
ochkoffein has quit [Client Quit]
platzhirsch has quit [Ping timeout: 240 seconds]
ochkoffein has joined #ruby
drPoggs has quit [Quit: +++ATH]
doublemalt_ has quit [Ping timeout: 250 seconds]
<hackeron>
jhass: small change: Base64.encode64(RSA::KeyPair.generate(1024, 3).public.modulus.to_s(16)).gsub("\n", '')
<hackeron>
jhass: getting a challenge response from the camera :D
DoubleMalt has quit [Ping timeout: 264 seconds]
blackmes1 has joined #ruby
snath has joined #ruby
David27 has quit [Remote host closed the connection]
<jhass>
hackeron: delete.("\n") btw
<jhass>
eh, sans misplaced dot
<hackeron>
jhass: so now the camera responds with a challenge 17c68103d1310baca6b65c1702d9510f39314d5e4740c3768d24290ee9f641dd6d07c22f2c219e90ac6d8a2050b2cf893a6b304aef53ee0c7673f1f28d6f02dbfb7142f79f27a130aa78524ec9729380bdbfb8845370cec01038f132f155898f0704ad2be165340e0bc980be57116cdfa951e4f7db4578be3bf711b2916b9600 - how do I now go backwards to decode it, heh?
<ruurd>
Ehm would it be possible to have a ruboto in bash btw?
xxneolithicxx has joined #ruby
Voker57 has quit [Read error: Connection reset by peer]
<VeryBewitching>
You mean a bot to process ad-hoc bash commands?
<adaedra>
You mean the eval function?
<VeryBewitching>
Or enclose the code in a function and call it.
<darix>
ruurd: if you have a sandbox function for your bash. sure.
<hackeron>
it seems the !0 is to indicate that the key is in ascii and not in hex, hmmm
minibar has left #ruby ["minibar is closed"]
<jhass>
ruurd: or are you just looking for irb/pry?
bluefalconpunch has joined #ruby
<ruurd>
No
bluefalconpunch has left #ruby [#ruby]
symm- has quit [Ping timeout: 256 seconds]
<ruurd>
a bot to process ad hoc ruby
ramfjord has quit [Ping timeout: 268 seconds]
<shevy>
ruboto in your browser!
minimalism has joined #ruby
<adaedra>
That's eval.in :˚
JDiPierro has quit [Remote host closed the connection]
j5s7 has joined #ruby
Channel6 has joined #ruby
<ruurd>
NOPE
<ruurd>
NOPE
<ruurd>
NOPE
symm- has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<adaedra>
calm down
willharrison is now known as willharrison-awa
Jackneill has quit [Ping timeout: 250 seconds]
blackmes1 has quit [Ping timeout: 260 seconds]
niftylettuce has joined #ruby
bruno- has quit [Ping timeout: 240 seconds]
willharrison-awa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
blackmes1 has joined #ruby
<jhass>
ruurd: still not sure what you want exactly
ElFerna has joined #ruby
lkba_ has joined #ruby
<ruurd>
like here instead on the command line in bash...
Jayno has joined #ruby
<jhass>
alias reval="ruby -e" ?
<ruurd>
if you do >> here and some ruby you get a result.
Galas has quit [Remote host closed the connection]
<ruurd>
now the same but in bash. with something else than >> obviously
<jhass>
function reval() { ruby -e "p ${@}" }
ochkoffein has quit [Quit: -----------------------------------------------]
<Jayno>
hi all. I’m having trouble installing the ruby gem “sass” on my mac. … The error text is here: http://dpaste.com/2JX5G2X It appears to be a problem with openSSL and libSSL … might anyone have had a similar error using ruby or have any recommendations? THank you.
lkba has quit [Ping timeout: 252 seconds]
ochkoffein has joined #ruby
zenguy_pc has quit [Ping timeout: 265 seconds]
<ruurd>
jhass you found that out earlier didn't you?
hays has joined #ruby
<jhass>
what? that ruby takes the -e flag? yeah
<ruurd>
No I knew that. The reval function
<ruurd>
Why not call it ruboto
<jhass>
I just wrote it, call it whatever you want
<Jayno>
“rvm reinstall ruby” was what they recommended
riotjones has joined #ruby
<havenwood>
Jayno: (To relink against OpenSSL.)
<Jayno>
I see. I didn’t specify the version. i’ll give that a try if this doesn’t work.
<ruurd>
Could a brew install openssl help perhaps?
<havenwood>
Jayno: Go ahead and run: rvm requirements ruby-2.0.0-p353
<havenwood>
Jayno: But do update to 2.0.0-p647, or better yet 2.1.7 or 2.2.3! :)
Yzguy has quit [Quit: Zzz...]
<Jayno>
k thanks again
<Jayno>
waiting for this generic install to finish
<havenwood>
ruurd: Aye, betcha it got uninstalled.
mary5030 has joined #ruby
<havenwood>
Jayno: Installing requirements and rebuilding lets it freshly establish dynamic links to OpenSSL et al.
<Jayno>
havenwood: i see
riotjone_ has quit [Ping timeout: 268 seconds]
diegoviola has joined #ruby
<Jayno>
ruurd: yes I think that brew has something to do with it. … the approved Stackoverflow answer outlined uninstalling and reinstalling openssl before reinstalling ruby
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruurd>
Hmmm. Crude but effective.
verto has quit [Quit: see you later xD]
<havenwood>
Jayno: You can manually run `rvm requirements` or set autolibs as you prefer: https://rvm.io/rvm/autolibs
baweaver has quit [Remote host closed the connection]
<havenwood>
But if you remove a package that was dynamically linked to it'll break the link.
<Jayno>
i see. I hope all it takes is reinstalling ruby
<havenwood>
Jayno: You can probably even grab a prebuilt binary.
varunwachaspati has quit [Quit: Connection closed for inactivity]
<havenwood>
(Which will statically link against openssl.)
Akagi201 has joined #ruby
<havenwood>
Jayno: rvm get master
postmodern has joined #ruby
<havenwood>
Jayno: Then uninstall and reinstall Ruby 2.0.
diegoaguilar has joined #ruby
zenguy_pc has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
<havenwood>
Ack, reminds me need to update binaries for El Capitan.
grekkos has quit [Ping timeout: 240 seconds]
Igorshp has quit [Remote host closed the connection]
<ruboto>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<srpski>
i couldn't message there
<srpski>
can you check it
<srpski>
yes it's based on ruby on rails
XxionxX has joined #ruby
devbug_ has joined #ruby
Akagi201 has quit [Ping timeout: 260 seconds]
fullofcaffeine has joined #ruby
devbug has quit [Ping timeout: 250 seconds]
srpski has left #ruby [#ruby]
mloy has quit [Ping timeout: 268 seconds]
giuseppesolinas has quit [Quit: This computer has gone to sleep]
giuseppesolinas_ has quit [Quit: This computer has gone to sleep]
<adaedra>
fullofcaffeine has quit [Ping timeout: 252 seconds]
bryanray has joined #ruby
bMalum has quit [Quit: bMalum]
Musashi007 has joined #ruby
giuseppesolinas_ has joined #ruby
giuseppesolinas has joined #ruby
Ropeney has joined #ruby
beauby_ has joined #ruby
beauby has quit [Read error: Connection reset by peer]
U7se6 has quit [Ping timeout: 255 seconds]
devbug_ has quit [Ping timeout: 244 seconds]
ElFerna has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
j5s7 has quit [Quit: leaving]
devbug has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
Igorshp has joined #ruby
amclain has joined #ruby
Igorshp has quit [Remote host closed the connection]
devbug_ has joined #ruby
devbug has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
diegoaguilar has joined #ruby
blackmes1 has quit [Ping timeout: 272 seconds]
diegoaguilar has quit [Remote host closed the connection]
chopin has joined #ruby
swgillespie has joined #ruby
dikaio has joined #ruby
ngscheurich has joined #ruby
felltir has quit [Remote host closed the connection]
vF3hNGxc47h8 has joined #ruby
firstdayonthejob has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Quit: Musashi007]
finisherr has joined #ruby
shmilan has joined #ruby
finisherr has quit [Client Quit]
ramfjord has quit [Ping timeout: 244 seconds]
blackmesa has quit [Quit: WeeChat 1.3]
ngscheurich has quit [Read error: Connection reset by peer]
DEA7TH has quit [Quit: DEA7TH]
ngscheurich has joined #ruby
bonhoeffer_ has joined #ruby
nertzy has joined #ruby
SCHAAP137 has quit [Quit: Leaving]
apfeluser has joined #ruby
apfeluser has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
Guest67642 has joined #ruby
vF3hNGxc47h8 has quit [Ping timeout: 240 seconds]
andersoldahl has joined #ruby
chale has joined #ruby
bonhoeffer_ has quit [Quit: bonhoeffer_]
chale has left #ruby [#ruby]
jsuth has joined #ruby
<hackeron>
jhass: still can't get this to work :( - quick question though, when you said to do challenge.pack("H*") how do you know it's not "h*" or something else?
moeabdol has joined #ruby
<jhass>
I don't, but usually it's H*
ruurd has quit [Quit: ZZZzzz…]
j4cknewt has joined #ruby
ndrei has quit [Ping timeout: 240 seconds]
<hackeron>
jhass: hmm, going to try emailing the manufacturer - their activation API manual is just pointless :/
CloCkWeRX has joined #ruby
lessless has joined #ruby
<agent_white>
What's that good alternative to rvm to checkout? Is it rbenv? Superior supposedly?
<jhass>
I find rbenv inferior. I'm on chruby myself
workmad3 has joined #ruby
moeabdol has quit [Ping timeout: 264 seconds]
andersoldahl has quit [Quit: My Mac has gone to sleep.]
<agent_white>
Ah okey doke! Thank you.
<hackeron>
jhass: thank you very much for all your help and getting this far, heh :)
Akagi201 has joined #ruby
Rollabunna has joined #ruby
esauOp has joined #ruby
Channel6 has quit [Ping timeout: 244 seconds]
WillAmes has quit [Remote host closed the connection]
jsuth has quit [Ping timeout: 240 seconds]
karapetyan has quit [Remote host closed the connection]
bryanray has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<agent_white>
havenwood: Good deal :) I personally use rvm at the moment, haven't bothered to change since I began using it, but I'm tinkering with a couple servers and figured I should checkout some alternatives. I'll definitely look into chruby :D