achen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dessm>
Good evening. I've been wondering about the following: Often times when dealing with external APIs I'll get back some rather large JSON payload which I then parse into a Ruby hash. Usuallly I need specific parts of that hash so I might make a bunch of new hashes like: random_hash = payload[:some_key][:another_key] etc. Now the problem that I run into is that I need to transform that data. But when I modify the new hashes random_hash
<dessm>
changes as well. I'd like to keep the original payload around without modifying it, so I usually marshal dump/load the new hashes before modifying them. This seems absurdly kludgy and leads me to believe that I'm somehow approaching the problem in a wholly un-Rubyesque way. What is the Ruby way to handle this situation?
<keithy>
you know what I think bash is so much simpler
cdg has quit [Remote host closed the connection]
<keithy>
put together a bash script using “sub” to roll several commands into one. script A, checks out code with git, checks out deploy bash scripts , rsyncs them up to the server and then ou can run the scripts there!
lupine has quit [Quit: No Ping reply in 180 seconds.]
logoscoder has quit [Read error: Connection reset by peer]
logoscoder_ has joined #ruby
SirFunk has joined #ruby
willmichael has joined #ruby
Burgestrand has joined #ruby
cschneid has joined #ruby
mikecmpbll has joined #ruby
Fusselgesicht has joined #ruby
bkxd has quit [Quit: Lost terminal]
cschneid has quit [Ping timeout: 245 seconds]
moei has joined #ruby
ShekharReddy has joined #ruby
nadir has joined #ruby
sidx64 has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has quit [Client Quit]
sidx64 has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
apeiros has joined #ruby
phaul has joined #ruby
armyriad has quit [Ping timeout: 276 seconds]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
fribmendes has joined #ruby
cliq has joined #ruby
ramfjord has joined #ruby
connor_goodwolf has quit [Ping timeout: 256 seconds]
sidx64 has joined #ruby
nfsnobody has quit [Ping timeout: 248 seconds]
guille-moe has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ramfjord has quit [Ping timeout: 252 seconds]
fullstack_ has quit [Ping timeout: 240 seconds]
shoogz has quit [Ping timeout: 276 seconds]
fullstack has joined #ruby
shoogz has joined #ruby
shoogz has quit [Max SendQ exceeded]
nfsnobody has joined #ruby
shoogz has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has joined #ruby
aufi_ has joined #ruby
connor_goodwolf has joined #ruby
aufi has quit [Ping timeout: 240 seconds]
eroux has joined #ruby
mozzarella has quit [Ping timeout: 256 seconds]
kapil___ has quit [Quit: Connection closed for inactivity]
willmichael has quit [Ping timeout: 256 seconds]
connor_goodwolf has quit [Ping timeout: 248 seconds]
connor_goodwolf has joined #ruby
mozzarella has joined #ruby
riotjones has joined #ruby
armyriad has joined #ruby
Blackraider has joined #ruby
jaruga has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
Blackraider has quit [Client Quit]
KeyJoo has quit [Ping timeout: 256 seconds]
connor_goodwolf has quit [Ping timeout: 245 seconds]
fribmendes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Serpent7776 has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
GodFather has quit [Read error: Connection reset by peer]
GodFather has joined #ruby
sidx64 has joined #ruby
fribmendes has joined #ruby
sagax has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
fribmendes has quit [Client Quit]
fribmendes has joined #ruby
<dionysus69>
is singleton class same as metaclass?
<apeiros>
it's usually used interchangeably, yes
<apeiros>
even though if you were pedantic, the terms mean different things
<dionysus69>
ok cause I read two different articles and they used both of them, just made sure they were meaning the same :)
<apeiros>
singleton class, metaclass and eigenclass usually refer to what you get from Object#singleton_class (or via `class << obj`)
<dionysus69>
just explored metaprogramming, it's interesting but so far I didn't have a chance to use it in real life xD
mtkd has joined #ruby
<dionysus69>
so as I understood correctly, class methods are defined TO singleton/metaclass/eigenclass instead of just main class
fribmendes has quit [Client Quit]
thinkpad has quit [Quit: lawl]
maufart__ has joined #ruby
<apeiros>
s/TO/on the/
<apeiros>
yes. ruby only has instance methods. class methods don't really exist.
<dionysus69>
I see ^.^ thanks
fribmendes has joined #ruby
<apeiros>
what we call class methods are instance methods on the singleton_class of the class/module.
<apeiros>
and since it's much easier to say/write, and known in other languages too, it stuck :)
<dionysus69>
hmm very interesting, never though of class methods not existing, but actually it makes sense, if everything is an object, every method has to be an instance method, if I formulated it correctly
aufi_ has quit [Ping timeout: 265 seconds]
<dminuoso>
11:13 dionysus69 | is singleton class same as metaclass?
<dminuoso>
dionysus69: Depends on what you are looking at.
<dminuoso>
In the ruby source code itself no.
atmosx has quit [Quit: WeeChat 1.4]
drewmcmi_ has joined #ruby
atmosx has joined #ruby
<dionysus69>
the force is not that close to me yet xD
<dminuoso>
dionysus69: Internally "metaclass" is the class of class objects (i.e. objects that are not of RClass), while "singleton class" is the class object of.. everything else.
<dminuoso>
Suddenly the entire project, even every gem and library has access to it.
<dionysus69>
hahahaha
<dionysus69>
well yea, I need such thing in my rails app, various parts of application use this
<dminuoso>
Singletons seem to be the answer to "Oh boy, we have a dependency on multiple things, and I dont know/am to lazy to provide this dependency to the respective modules"
larcara has joined #ruby
cschneid has quit [Ping timeout: 260 seconds]
<dionysus69>
so you are saying to change class into module and import it only wherever it's necessary?
drewmcmi_ has joined #ruby
sameerynho has joined #ruby
<dionysus69>
include* sorry
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcmillan has quit [Ping timeout: 260 seconds]
<dionysus69>
other than that though, I don't see what much else could change
<dminuoso>
dionysus69: Whenever I see the singleton pattern, I ask myself first: "Why do we have a singleton? Are we trying to enforce that only one object can possibly exist?"
<dminuoso>
dionysus69: What's wrong with just using `RPC::JSON::Client.new` every time you need it?
<dionysus69>
actually I just inherited this piece of code, I didn't come up with it :D
<dminuoso>
It's just a basic first thought, not that its a good idea.
<dionysus69>
the only problem I see atm with it is that it will be recreated multiple times
<dionysus69>
@service ||=
<clemens3>
anyone on debian? I have ruby installed, but no gem in the path..?! Anyone know the package that would be in?
sidx64 has joined #ruby
<clemens3>
on jessie
<clemens3>
maybe something for #debian, but they are sleeping
<darix>
clemens3: packages.debian.org
<darix>
use the file search at the bottom
ledestin has joined #ruby
<dionysus69>
clemens3: use rvm ^.^
<clemens3>
darix: oki, thnx..
<dionysus69>
and I am on debian btw hehe
<clemens3>
dionysus69: I used for ages on mac.. but I don't like it for security reasons not that much anymore..
<darix>
dionysus69: RVM is not the solution
<clemens3>
dionysus69: I might just compile ruby myself in the future and make sure all gems are used with a single installation only
<dionysus69>
I dont really know security implications of using rvm ^.^
<darix>
clemens3: and who does security backports for this ruby version?
<clemens3>
dionysus69: for a start, installing it is downloading some bash script and immediately running it..
<darix>
dionysus69: many people just oneshot install ruby with it and then get stuck
tvw has joined #ruby
<darix>
so no security fixes and so on
<clemens3>
darix: one problem vs another
<darix>
software life cycle doesnt end with "install"
<dionysus69>
dunno, I didn't have any problems with rvm, I use it both in production and dev :D I had some problems but not related to ruby itself
<darix>
dionysus69: personally I even rpm-ify gems, so i can backport fixes on those as well.
<dionysus69>
what do you mean by backport fixes? to modify them?
<darix>
yes
<clemens3>
dionysus69: rvm is nice, just how to you check what you just downloaded and installed is really what you think it is?
<darix>
simple_rss had broken non ascii charset handling and upstream was dead and not doing releases
<clemens3>
to=do
<darix>
and backporting security fixes when you can just upgrade the whole stack
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<darix>
and upstream only released a new version which doesnt match the version limits of your current stack
schneider has quit [Ping timeout: 245 seconds]
<dionysus69>
dunno, I only use gems installed by bundler, never used a OS packaged gem
cdg has joined #ruby
<clemens3>
darix: strangely, on my system it is called gem2.1
<clemens3>
must do a symlink
<darix>
clemens3: probably so you can use multiple versions in parallel
<clemens3>
darix: yeah..
<darix>
clemens3: I would have expected that debian has update-alternative handling for a /usr/bin/gem
talntid has quit [Ping timeout: 256 seconds]
<darix>
dionysus69: funny story. I package discourse for opensuse. I applied the simple-rss fix to my package and all was good. then a friend asks me if i can install discourse for him - on an ubuntu machine ... ok ... we install via git ... run bundle install ... and test his install. run into the rss bug again. "i thought I had this fixed ... oh damn ... not using rpms"
roshanavand has joined #ruby
<darix>
so we had to patch the copy in the vendor tree *again*
talntid has joined #ruby
<darix>
a few months later we moved his instance to opensuse and now we both enjoy the same backported fixes. ;)
Beams_ has joined #ruby
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dionysus69>
ah I see, so vendor tree is the "main repo" for gems?
<dionysus69>
and from there people do all sorts of packaging?
Beams has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 276 seconds]
<clemens3>
darix: actually I wanted to generate all standard documentation, but actually the documentation was there, just ri was also named ri2.1..
<darix>
clemens3: :D
<clemens3>
darix: I skip the alternative way for now, just linked it manually..
<clemens3>
oki, thanks - later
<darix>
dionysus69: naw. vendor tree is where "bundle install" dumps the things
amatas_ has joined #ruby
connor_goodwolf has joined #ruby
sidx64 has joined #ruby
kapil___ has joined #ruby
schneider has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has quit []
xfbs has joined #ruby
fribmendes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
sidx64 has joined #ruby
amatas_ has quit [Quit: amatas_]
amatas_ has joined #ruby
Dimik has quit [Ping timeout: 252 seconds]
apparition has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gregf_ has quit [Ping timeout: 260 seconds]
nowhere_man has joined #ruby
ldnunes has joined #ruby
byte512 has quit [Ping timeout: 265 seconds]
nowhereman_ has quit [Ping timeout: 240 seconds]
sidx64 has joined #ruby
sidx64 has quit [Client Quit]
ramfjord has joined #ruby
adlerdias has joined #ruby
konsolebox has quit [Ping timeout: 276 seconds]
Cavallari has joined #ruby
ramfjord has quit [Ping timeout: 260 seconds]
Burgestrand has quit [Quit: Closing time!]
KeyJoo has joined #ruby
konsolebox has joined #ruby
workmad3 has quit [Ping timeout: 240 seconds]
fribmendes has joined #ruby
fribmendes has quit [Client Quit]
d9867eb has joined #ruby
za1b1tsu has joined #ruby
<d9867eb>
hello, please tell me, is nested methods ie dynamic methods considred a bad thing?
<apeiros>
my attention is elswhere. ping me if you write something I should read.
goatish has joined #ruby
soniya29 has quit [Remote host closed the connection]
soniya29_ has quit [Remote host closed the connection]
soniya29 has joined #ruby
soniya29_ has joined #ruby
roshanavand has quit [Ping timeout: 276 seconds]
roshanavand has joined #ruby
<d9867eb>
apeiros, thanks
drewmcmi_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
meadmoon has quit [Quit: I am functioning within established parameters.]
<zenspider>
keithy: rake_remotetask
<zenspider>
the older I get... the more I hate the word "best"
shinnya has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
minimalism has quit [Quit: minimalism]
karapetyan has quit [Remote host closed the connection]
cschneid has joined #ruby
<apeiros>
zenspider: hah, I know that feeling
<apeiros>
zenspider: btw., imagescience is no longer maintained?
<apeiros>
or is it just flawless at this point? :)
cdg has joined #ruby
jaruga has quit [Quit: jaruga]
karapetyan has joined #ruby
<zenspider>
so flawless
sidx64 has joined #ruby
<zenspider>
not not maintained... just hasn't had anything pushing on it for a long while
<zenspider>
I am minimizing THE STRANGEST BUG... in did_you_mean
achen has joined #ruby
aguestuser has quit [Remote host closed the connection]
aguestuser has joined #ruby
cschneid has quit [Ping timeout: 240 seconds]
cdg has quit [Ping timeout: 240 seconds]
* zenspider
goes to bed
anjen has joined #ruby
jeffreylevesque has quit [Ping timeout: 248 seconds]
xfbs has quit []
John_Ivan has joined #ruby
John_Ivan has joined #ruby
John_Ivan has quit [Changing host]
oroborous has joined #ruby
oroborous has joined #ruby
oroborous has quit [Changing host]
shinnya has quit [Ping timeout: 260 seconds]
Papierkorb has joined #ruby
Papierkorb has left #ruby ["Konversation terminated!"]
larcara has quit []
drewmcmillan has joined #ruby
sanscoeur has joined #ruby
schneider has quit [Ping timeout: 256 seconds]
cschneid has joined #ruby
cliq has joined #ruby
sanscoeur has quit [Ping timeout: 245 seconds]
schneider has joined #ruby
bigblind has joined #ruby
adlerdias_ has joined #ruby
achen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schneider has quit [Ping timeout: 260 seconds]
lxsameer has joined #ruby
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
achen has joined #ruby
adlerdias has quit [Ping timeout: 260 seconds]
adlerdias_ is now known as adlerdias
mtkd has quit [Ping timeout: 256 seconds]
cschneid has quit [Ping timeout: 276 seconds]
faces has joined #ruby
soniya29_ has quit [Ping timeout: 240 seconds]
soniya29 has quit [Ping timeout: 245 seconds]
sidx64 has joined #ruby
soniya29 has joined #ruby
soniya29_ has joined #ruby
schneider has joined #ruby
mtkd has joined #ruby
fribmendes has joined #ruby
adlerdias_ has joined #ruby
<phaul>
what's the best lib atm to do fast matrix dot products, map func over matrices and basic matrix arithmetics ie elemwise +, - or multiply by scalar? Tried nmatrix, but Im getting issues.
Burgestrand has quit [Quit: Closing time!]
<Iambchop>
phaul: share a gist of your code and issues?
adlerdias has quit [Ping timeout: 260 seconds]
adlerdias_ is now known as adlerdias
willmichael has quit [Read error: Connection reset by peer]
achen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ams__ has joined #ruby
jaruga has joined #ruby
<tobiasvl>
beyer: the readme file has installation instructions
<beyer>
i have installed ruby 2.4.3 but after when i try to run it it says "C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- delayed_job_active_record (LoadError)"
<tobiasvl>
did you "bundle install"?
<beyer>
im on windows 10 ...
<beyer>
i dont know what is bundle install or how to do it
<tobiasvl>
ok, I don't know anything about windows, but did you install the bundle?
<tobiasvl>
ok so you did not install it
<beyer>
nop
karapetyan has quit [Remote host closed the connection]
<tobiasvl>
ok, well, I don't know anything about windows unfortunately, so maybe someone else can answer
<tobiasvl>
but your question is essentially "how do I install bundler on windows" then
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
kapil___ has joined #ruby
<tobiasvl>
on linux you would do "gem install bundler"
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<tobiasvl>
beyer: do you have the "gem" command?
<beyer>
yes
<tobiasvl>
ok, then do what I said earlier
<tobiasvl>
"gem install bundler"
<tobiasvl>
then you can follow the installation instructions in the readme
<beyer>
ERROR: While executing gem ... (Errno::EADDRNOTAVAIL) L’adresse demandée n’est pas valide dans son contexte. - connect(2) for "0.0.0.0" port 53
cpruitt has joined #ruby
<beyer>
the requested adress is not valid (translation..)
schneider has joined #ruby
<tobiasvl>
ok, never seen that before, but googling "gem install eaddrnotavail" has some results
<tobiasvl>
possibly dns configuration
<beyer>
im in china, it can be the cause?
<tobiasvl>
possibly
<tobiasvl>
the great firewall of china
<beyer>
fuck it
ramfjord has joined #ruby
<beyer>
ok its working trough openvpn
<beyer>
1 gem installed
<dminuoso>
>> -> f { -> y { y[y] }[->x { f[-> v { x[x][v] }] }] }[-> f, x { x == Math.cos(x) ? x : f[Math.cos(x)]}.curry][3]
<beyer>
i got this C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- lib/youtube_multiple_dl (LoadError) from C:/Ruby24-x64/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in `require' from youtube-multiple-dl:3:in `<main>'
<tobiasvl>
beyer: and is youtube-multiple-dl installed, like the readme says it must be?
Psybur has quit [Ping timeout: 252 seconds]
synthroid has joined #ruby
<tobiasvl>
please just read the installation instructions in the readme now that I helped you get to the point it starts from
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
karapetyan has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
<Bish>
dminuoso: enlighten us with your 0day exploit
<dminuoso>
Nope!
<Bish>
:(
<Bish>
enlighten me then?
achen has joined #ruby
achen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Ping timeout: 268 seconds]
oroborous has quit [Remote host closed the connection]
<dminuoso>
Bish: Mmm irrelevant, its fixed.
<beyer>
C:\Ruby24-x64\bin>ruby rake db:migrate rake aborted! No Rakefile found (looking for: rakefile, Rakefile, rakefile.rb, Rakefile.rb) rake:23:in `load' rake:23:in `<main>' (See full trace by running task with --trace)
<dminuoso>
Bish: I managed to seg fault 2.4.1 in some strange combinations, but it does not seem reproducible in 2.5.0
<beyer>
i have rakefile what it says that i dont?
<dminuoso>
Bish: -> f { -> y { y[y] }[->x { f[-> v { x[x][v] }] }] }[-> f, x { x == Math.cos(x) ? x : f[Math.cos(x)]}.curry][10]; RubyVM::InstructionSequence.compile_option = { tailcall_optimization: true, trace_instruction: false }; -> f { -> y { y[y] }[->x { f[-> v { x[x][v] }] }] }[-> f, x { x == Math.cos(x) ? x : f[Math.cos(x)]}.curry][10]
<dminuoso>
Bish: Repeat this a few times in 2.4.1 (possibly newer too) and watch it segfault
ShekharReddy has quit [Quit: Connection closed for inactivity]
achen has joined #ruby
aufi_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
mikecmpbll has joined #ruby
karapetyan has joined #ruby
maufart__ has quit [Ping timeout: 240 seconds]
fribmendes has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
momomo has quit [Remote host closed the connection]
darkhanb has joined #ruby
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shpoont has joined #ruby
jaruga has quit [Quit: jaruga]
rybarra has joined #ruby
guille-moe has quit [Ping timeout: 265 seconds]
Beams_ has quit [Remote host closed the connection]
terens has joined #ruby
Beams has joined #ruby
ramfjord has joined #ruby
aufi has quit [Quit: Leaving]
hahuang65 has joined #ruby
schneider has quit [Ping timeout: 276 seconds]
vondruch has quit [Ping timeout: 268 seconds]
memo1 has quit [Ping timeout: 276 seconds]
hahuang65 has quit [Client Quit]
hahuang65 has joined #ruby
kies has quit [Ping timeout: 245 seconds]
Xentil has joined #ruby
agent_white has quit [Quit: bbl]
schneider has joined #ruby
logoscoder_ is now known as logoscoder
mniip has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ShekharReddy has quit [Quit: Connection closed for inactivity]
sanscoeur has joined #ruby
Tempesta has quit [Quit: See ya!]
karapetyan has joined #ruby
Tempesta has joined #ruby
cdg has quit [Ping timeout: 268 seconds]
cdg_ has joined #ruby
karapetyan has quit [Ping timeout: 256 seconds]
dionysus69 has joined #ruby
hahuang65 has quit [Quit: WeeChat 2.0.1]
eckhardt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cdg_ has quit [Ping timeout: 248 seconds]
hahuang65 has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
faces has quit [Ping timeout: 276 seconds]
AndBobsYourUncle has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
nmeum has joined #ruby
ski7777 has joined #ruby
<nmeum>
I have an instance of a class Foo which inherits from class Bar and I want to get a list of all instance variables defined by the class Bar without the once defined by the class Foo, is that somehow possible?
guest123 has joined #ruby
hahuang62 has joined #ruby
shpoont has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
guest123 has quit [Client Quit]
guest has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<havenwood>
nmeum: No, there's not an easy way to tell where an instance variable came from. You can tell with methods but not with instance variables.
John_Ivan has quit [Ping timeout: 260 seconds]
John_Ivan has joined #ruby
<weaksauce>
anyone have a suggestion on a free email service to use to send low volume emails through a ruby script to myself?
<terens>
you can send using gmail to yourself as far as i know
catphish has joined #ruby
terens has quit [Quit: Leaving]
terens has joined #ruby
<weaksauce>
well i was going to go that route but didn't want to hard code a password into it and couldn't find what google did with the temp passwords for applications
<catphish>
does rack by any chance provide the original http request? or would it need to be reconstructed?
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<havenwood>
catphish: what does that have to do with reconstructing the request??
<catphish>
havenwood: i was intending to use a websocket protocol library that expects to be given an incoming http request, hence i would have needed the request
<catphish>
that's the websocket protocol library i usually use, but this would require the original http request, all this is moot though if tubesock does it all :)
karapetyan has joined #ruby
alaing has joined #ruby
karapetyan has quit [Remote host closed the connection]
alaing has quit [Changing host]
alaing has joined #ruby
<alaing>
hi
<havenwood>
catphish: Why not use ActionCable (or AnyCable)?
<havenwood>
alaing: hi
<catphish>
isn't actioncable a messaging framework? i just need a raw socket
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<havenwood>
catphish: ah
<havenwood>
catphish: just hijack then
<catphish>
that's the plan
<alaing>
i'm using activerecord, what is the difference between update and update!
<catphish>
i'm a little worried about how hijack will interact with the thread model of puma
sanscoeur has quit [Read error: Connection reset by peer]
sanscoeur has joined #ruby
<havenwood>
catphish: Puma supports hijack at least.
hahuang62 has quit [Quit: WeeChat 2.0.1]
<havenwood>
alaing: See the docs: "Updates its receiver just like update but calls save! instead of save, so an exception is raised if the record is invalid."
<catphish>
i've only ever done websockets in my own servers before, where i could make an unlimited number of threads, or event driven
<havenwood>
catphish: <3 H2
<catphish>
but for this project i'm hoping to keep things simple and use puma
sanscoeur has quit [Read error: Connection reset by peer]
<catphish>
there shouldn't be too many WS connections, so hopefully not a big problem
<alaing>
havenwood: i thought update would run through validations
<catphish>
i actually do want a new message bus (i've had a falling out with rabbitmq), but today's project is a VNC server, so neeeds to be pure websocket
<havenwood>
catphish: Use HTTP2!
<catphish>
i have no idea how that helps, but i'm intrigued, i've never used it
<catphish>
does it have a new approach to sockets?
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<havenwood>
I guess I'd need to know more about what you're doing to give a real recommendation, but HTTP/2 is really quite nice. Yeah, no more Request/Response - It's a new paradigm.
<catphish>
i could really do with a good alternative to rabbitmq to distribute messages
<havenwood>
catphish: Phoenix Channels ftw.
bmurt has quit [Remote host closed the connection]
<catphish>
that's quite a sidestep :)
<havenwood>
catphish: Erlang.
<catphish>
i still have a lot of rails going on :)
<havenwood>
catphish: Step 1) Port Rails to Erlang.
<catphish>
good idea
bmurt has joined #ruby
<catphish>
can i just do it in assembler?
<catphish>
after all, ruby doesn't scale
<havenwood>
I was really happy to see Phoenix getting H2 support.
rrutkowski has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
tvw has quit [Ping timeout: 252 seconds]
n0m4d1c has joined #ruby
rrutkowski has quit [Client Quit]
rrutkowski has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<catphish>
well after all that, tubesock doesn't seem to support binary websockets, so back to the beginning
starseed0000 has joined #ruby
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
cdg has joined #ruby
hahuang65 has quit [Ping timeout: 240 seconds]
<catphish>
and digging into the source of the websocket gem i usually use, it has a "from_rack()" method that gets the necessary data from a rack request hash instead of a raw http request, so everyone wins
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
AgentVenom has joined #ruby
cdg has quit [Ping timeout: 245 seconds]
conta has quit [Remote host closed the connection]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 256 seconds]
jeffreylevesque has quit [Ping timeout: 256 seconds]
imanc_ has left #ruby [#ruby]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
Sauvin has quit [Read error: Connection reset by peer]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
drewmcmi_ has joined #ruby
claudiuinberlin has joined #ruby
guacamole has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
drewmcm__ has joined #ruby
drewmcmillan has quit [Ping timeout: 276 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
drewmcmi_ has quit [Ping timeout: 240 seconds]
guacamole has joined #ruby
guacamole has joined #ruby
guacamole has quit [Changing host]
Puffball has quit [Remote host closed the connection]
drewmcm__ has quit [Ping timeout: 240 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
eckhardt has joined #ruby
drewmcmi_ has joined #ruby
pastorinni has quit [Ping timeout: 255 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
achen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
dmitriy_ has quit [Read error: Connection reset by peer]
Beams has quit [Quit: .]
Vapez has quit [Remote host closed the connection]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
SynSynack has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
willmichael has quit [Ping timeout: 256 seconds]
netherwolfe has quit [Ping timeout: 245 seconds]
cdg_ has joined #ruby
rgiscard has joined #ruby
cdg_ has quit [Remote host closed the connection]
cdg has quit [Ping timeout: 245 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
<darix>
catphish: huh?
jamiejackson has quit [Ping timeout: 240 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
nadir has joined #ruby
<catphish>
darix: i wanted to know if i could use net/ssh with epoll, so rather than blocking, i can process ssh events whenever they occur, along with events on other sockets
<catphish>
i haven't worked out the answer yet, will know when i have some more code in place
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
workmad3 has joined #ruby
karapetyan has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
karapetyan has quit [Remote host closed the connection]
willmichael has joined #ruby
workmad3 has quit [Ping timeout: 268 seconds]
achen has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
karapetyan has joined #ruby
rrutkowski has quit [Ping timeout: 265 seconds]
hahuang65 has joined #ruby
nowhereman_ has joined #ruby
mtkd has quit [Ping timeout: 240 seconds]
alex`` has quit [Ping timeout: 276 seconds]
zenspider_ has quit [Quit: bye]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
nowhere_man has quit [Ping timeout: 245 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
mtkd has joined #ruby
karapetyan has quit [Remote host closed the connection]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
xerxes has joined #ruby
morfin60 has quit [Ping timeout: 248 seconds]
cagomez has joined #ruby
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
n0m4d1c has joined #ruby
pastorinni has quit [Ping timeout: 252 seconds]
pastorin_ has joined #ruby
gr33n7007h is now known as al2o3-cr
<darix>
catphish: thread
<darix>
probabyl
aguestuser has quit [Ping timeout: 255 seconds]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
n0m4d1c has quit [Remote host closed the connection]
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
logoscoder has joined #ruby
tomphp has quit [Client Quit]
logoscoder has quit [Max SendQ exceeded]
logoscoder has joined #ruby
logoscoder has quit [Max SendQ exceeded]
<catphish>
threads aren't a great way to do it, but they make a good fallback
logoscoder has joined #ruby
<catphish>
anyway, the answer is yes, you can, select([ssh_session.transport.socket]); ssh_session.process(0)
dmitriy_ has joined #ruby
dmitriy_ has quit [Read error: Connection reset by peer]
postmodern has joined #ruby
rflec028 has joined #ruby
<catphish>
i now have a server that bridges between websocket and vnc-over-ssh :)
aguestuser has joined #ruby
desperek has quit [Quit: xoxo]
n0m4d1c has joined #ruby
cschneid has quit [Remote host closed the connection]
sanscoeu_ has joined #ruby
drewmcmi_ has joined #ruby
n0m4d1c has quit [Read error: Connection reset by peer]