adam12 changed the topic of #ruby to: Rules: https://ruby-community.com | Ruby 3.1.2, 3.0.4, 2.7.6: https://www.ruby-lang.org | Paste 4+ lines to: https://gist.github.com | Books: https://goo.gl/wpGhoQ | Logs: https://libera.irclog.whitequark.org/ruby/
reset has quit [Quit: reset]
cartdrige has joined #ruby
Al2O3 has quit [Quit: I'm quitting, thanks for all the sharks.]
Al2O3 has joined #ruby
stirl has quit [Quit: stirl]
cartdrige has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
cocalero has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
ur5us has quit [Quit: Leaving]
ur5us has joined #ruby
grokify has joined #ruby
grokify has quit [Ping timeout: 248 seconds]
cocalero has quit [Quit: Going offline, see ya! (www.adiirc.com)]
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
havenwood has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
Linux_Kerio has joined #ruby
cartdrige has joined #ruby
sickdyd has joined #ruby
<sickdyd> hello guys
ur5us has joined #ruby
jpn has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
sickdyd has left #ruby [#ruby]
otisolsen70 has joined #ruby
otisolsen70 has quit [Remote host closed the connection]
otisolsen70 has joined #ruby
D_A_N has quit [Quit: leaving]
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
crax23 has quit [Ping timeout: 248 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 260 seconds]
crax23 has joined #ruby
Y05hito__ has quit [Ping timeout: 248 seconds]
crax23 has quit [Ping timeout: 252 seconds]
moldorcoder7 has joined #ruby
walez has joined #ruby
walez has quit [Client Quit]
wra1th has quit [Quit: wra1th]
pvalenta has quit [Quit: ZNC - https://znc.in]
teclator has joined #ruby
pvalenta has joined #ruby
pvalenta has quit [Client Quit]
grokify has joined #ruby
darkstarx has quit [Quit: Leaving]
grokify has quit [Ping timeout: 248 seconds]
kerunaru has joined #ruby
Rounin has joined #ruby
Rounin has quit [Changing host]
Rounin has joined #ruby
grokify has joined #ruby
srirang has joined #ruby
<srirang> Hi all, I am getting an error while building 2.7.6 on macOS 13.
<srirang> The error is this : ./vm_insnhelper.c:5045:43: error: use of undeclared identifier 'RUBY_FUNCTION_NAME_STRING'
<srirang> I tried a bunch of recommendations that people have posted on the internet (delete and reinstall command line tools, install llvm, update brew etc). But nothing seems to help.
seisatsu has quit [Ping timeout: 255 seconds]
<srirang> The system was indeed recently updated to macOS 13 (Ventura). I already have various Ruby versions installed and running on the same machine (the latest being 2.7.1 installed before the system update).
<srirang> Does anyone know of anything extra that is needed to build 2.7.6 on macOS 13?
fandre1986 has joined #ruby
ur5us has joined #ruby
seisatsu has joined #ruby
srirang has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
seisatsu has quit [Ping timeout: 252 seconds]
fandre1986 has quit [Ping timeout: 252 seconds]
grokify has joined #ruby
infinityfye has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
kerunaru has quit [Remote host closed the connection]
kerunaru has joined #ruby
grokify has quit [Remote host closed the connection]
srirang has joined #ruby
John_Ivan has quit [Ping timeout: 248 seconds]
Manouchehri has quit [Ping timeout: 252 seconds]
dionysus69 has joined #ruby
Manouchehri has joined #ruby
jvalleroy has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
jvalleroy has joined #ruby
willfish has joined #ruby
pvalenta has joined #ruby
hightower3 has quit [Ping timeout: 248 seconds]
jpn has joined #ruby
cartdrige has joined #ruby
ur5us has quit [Ping timeout: 260 seconds]
srirang has quit [Remote host closed the connection]
srirang has joined #ruby
Guest54 has joined #ruby
<Guest54> Is there anyone active on this channel so I can ask a question about something I am stuck on?
<leftylink> https://libera.irclog.whitequark.org/ruby/2022-11-09 shows the activity on this channel, and it says there have been maybe a dozen people over the past day, so the answer is yes
<leftylink> but I don't see why there needs to be someone active to ask a question. you're not supposed to ask to ask, you're supposed to just ask
<Guest54> Great! Apologies, I didnt mean anything about it. I heard something about IRC channels moving from freenode so was unsure if this is the official place
srirang has quit [Remote host closed the connection]
srirang has joined #ruby
<Guest54> I am new to Ruby and came across this script. https://paste.centos.org/view/raw/67750716
<Guest54> It looks simple enough, it creates a listener socket and then reads data from the socket and passes that data to the "Parser" class. If you look on line "def compressed_payload(&block)" it tries to uncompres the data. In this def I want to add a logic to say that if the inflate has an error then catch that error and raise an error with the sending
<Guest54> client's IP address
<Guest54> Here is what I have so far:
<Guest54>     def compressed_payload(&block)
<Guest54>       begin
<Guest54>         original = Zlib::Inflate.inflate(get)
<Guest54>       rescue
<Guest54>         raise "The IP address of the client sending incorrect data was: #{}"
<Guest54>       end
TomyWork has joined #ruby
srirang has quit [Remote host closed the connection]
srirang has joined #ruby
<srirang> @Guest54 Code pasted here largely looks fine. Are you facing any issues?
<leftylink> no question was asked so I assumed that they were still in the process of typing up the question, so I didn't want to interrupt
catphish has joined #ruby
<srirang> Ok.. :-)
<Guest54> The question is, how do I get the IP address of the client when this fails. original = Zlib::Inflate.inflate(get)
nik has joined #ruby
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
<leftylink> well, the client's address has to be accessed through the socket. https://ruby-doc.org/stdlib-3.1.0/libdoc/socket/rdoc/TCPSocket.html says its parent is https://ruby-doc.org/stdlib-3.1.0/libdoc/socket/rdoc/IPSocket.html. and indeed IPSocket has the correct function that does this.
crax23 has quit [Ping timeout: 260 seconds]
wand has quit [Remote host closed the connection]
aeris has quit [Remote host closed the connection]
Aminda has quit [Remote host closed the connection]
wand has joined #ruby
Aminda has joined #ruby
aeris has joined #ruby
Sankalp has quit [Ping timeout: 252 seconds]
<Guest54> leftylink I didnt understand what you mean
Guest54 has quit [Quit: Client closed]
Guest54 has joined #ruby
cartdrige has joined #ruby
<leftylink> then perhaps looking at existing examples will make it clear. the Lumberjack::Beats::Connection already has code that shows the client's IP, so there's no need to reinvent the wheel
crax23 has joined #ruby
Y05hito__ has quit [Ping timeout: 260 seconds]
willfish has quit [Quit: WeeChat 3.7.1]
willfish has joined #ruby
cartdrige has quit [Ping timeout: 255 seconds]
_aeris_ has joined #ruby
Aminda has quit [Read error: Connection reset by peer]
Aminda has joined #ruby
aeris has quit [Remote host closed the connection]
_aeris_ is now known as aeris
<Guest54> The problem is that the code in Connection is separate to the code in Parser class right? The parser class is the one that inflates the data, when the method in the parser class is called, only the data gets passed, not the connection information
<Guest54> How do I get the connection information passed into the parser class?
<leftylink> that would ordinarily be a sign that the parser should remain ignorant of the connection information, not an indication that it should be passed in
<leftylink> if it is to be passed in, then it can be passed in as an argument to either `initialize` or `feed`
<leftylink> but it shouldn't be
<Guest54> I get that. The parser class is to take data only and parse it. However what i want to do is to raise an exception whenever a bit of data is not able to be parsed
crax23 has quit [Ping timeout: 255 seconds]
<leftylink> Connection#run already re-raises any exceptions that happen
<Guest54> I tried to pass the IP address (by execution of the "peer" method in the connection class) into the feed method of parser. However then there is a "transition" method which calls the rest of the methods. What does this mean: `transition(:header, 2)`
<Guest54> Yes Connection#run does but i would also like the ip address with the exception
<leftylink> the definition of `transition` is already shown in Parser
cartdrige has joined #ruby
<Guest54> Many thanks for trying to help. Maybe someone else will know what I can do.
<Guest54> What does `transition(:header, 2)` mean. As in what is : what is 2
crax23 has joined #ruby
<Guest54> Is header, in this calling the header method?
<leftylink> no, :header is a symbol. symbols are values of type Symbol
<leftylink> pandabot: rb :header
<pandabot> stderr: playpen: timeout triggered! - exit 1 - https://carc.in/#/r/e1ae
<leftylink> pandabot: rb :header
<pandabot> :header - https://carc.in/#/r/e1af
<leftylink> pandabot: rb :header.class
<pandabot> Symbol - https://carc.in/#/r/e1ag
hightower2 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
crax23 has quit [Ping timeout: 260 seconds]
<leftylink> so as we can see in the definition of Parser#transition, it sets @state to the value :header. that's it
<Guest54> How does this method get called: `def header(&block)`
<leftylink> by `send(@state, &block)`
<leftylink> pandabot: ri Object#send
<Guest54> Will this work, change `@parser.feed(@fd.sysread(READ_SIZE)) do |event, *args|` line to `@parser.feed(@fd.sysread(READ_SIZE), "#{@fd.peeraddr[3]}:#{@fd.peeraddr[1]}" "abc") do |event, *args|`
<Guest54> Then in `def feed(data, &block)` change to `def feed(data, peerip, &block)`
<Guest54> Is this ok so far?
Guest88 has joined #ruby
Guest88 has quit [Client Quit]
htjfgttjhtfgrj has joined #ruby
htjfgttjhtfgrj has quit [Client Quit]
<Guest54> Correction:
<Guest54> Will this work, change `@parser.feed(@fd.sysread(READ_SIZE)) do |event, *args|` line to `@parser.feed(@fd.sysread(READ_SIZE), "#{@fd.peeraddr[3]}:#{@fd.peeraddr[1]}") do |event, *args|`
supay has joined #ruby
<leftylink> regardless of whether it will work, then all those functions in Parser will need to take an argument they never use. even disregarding the design question, it's too much work. the question was that when Zlib::Inflate.inflate fails, it should result in an exception with the IP. well, https://ruby-doc.org/stdlib-3.1.0/libdoc/zlib/rdoc/Zlib/Error.html is, in their words, "The superclass for all exceptions
<leftylink> raised by Ruby/zlib."
<leftylink> so that implies rescuing that exception
srirang has quit [Remote host closed the connection]
D_A_N has joined #ruby
Guest54 has quit [Quit: Client closed]
hightower2 has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Remote host closed the connection]
grokify has joined #ruby
hightower2 has joined #ruby
catphish has left #ruby [Leaving]
Ziyan has joined #ruby
<Ziyan> Any of you guys used dry-struct to create a form object for file upload? I am wondering what to use for the type for the file field. 🤔
kerunaru has quit [Remote host closed the connection]
grawity has joined #ruby
<grawity> now that OpenSSL::Engine is gone in openssl3 in favor of providers, how do I actually load a provider via ruby?
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
<adam12> Ziyan: You're going through dry-validation or dry-schema first, right?
grokify has quit [Remote host closed the connection]
<adam12> Ziyan: If you are, and then serializing to struct, maybe Types.Nominal(File)? I think it's a File/Tempfile you receive from Rack.
grokify has joined #ruby
cartdrige has joined #ruby
hightower2 has quit [Ping timeout: 260 seconds]
grokify has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 252 seconds]
stirl has joined #ruby
<gr33n7007h> grawity: pretty sure you have to define them in the openssl config file
<grawity> global config or can I load a specific config via API?
<gr33n7007h> grawity: either, i think.
<gr33n7007h> for global: OpenSSL::Config.load OpenSSL::Config::DEFAULT_CONFIG_FILE
<grawity> hmm I thought that just parses the file, doesn't apply it
<grawity> will try anyway
<grawity> I'm hoping to get hardware keys working again via pkcs11-provider
repo has quit [Ping timeout: 246 seconds]
idkwtf has joined #ruby
<gr33n7007h> grawity: i've not looked through it properly yet tbh. stick around though, someone maybe more helpful at the moment.
<gr33n7007h> i'll take a proper look when i get back.
dionysus69 has joined #ruby
repo has joined #ruby
nik has quit [Quit: Leaving]
<idkwtf> just for closure, libressl is supersweet
grokify has joined #ruby
caleb has quit [Remote host closed the connection]
caleb has joined #ruby
shokohsc has quit [Read error: Connection reset by peer]
shokohsc has joined #ruby
grokify has quit [Remote host closed the connection]
cartdrige has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
cartdrige has joined #ruby
grokify has quit [Remote host closed the connection]
<idkwtf> Howdy! I got this clunky multisite (ActsAsTenant) setup here and was wondering if my attempt to clean/DRY things up are correct? https://gist.github.com/basicfeatures/9d137795396b00e53fa22331cc8752f4
crax23 has joined #ruby
szkl has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
crax23 has quit [Ping timeout: 246 seconds]
finsternis has joined #ruby
cartdrige has joined #ruby
___nick___ has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
Y05hito__ has quit [Ping timeout: 252 seconds]
cartdrige has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 252 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 252 seconds]
crax23 has joined #ruby
Y05hito__ has quit [Ping timeout: 248 seconds]
Y05hito__ has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
crax23 has joined #ruby
hightower2 has joined #ruby
Y05hito__ has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 252 seconds]
infinityfye has quit [Quit: Leaving]
crax23 has joined #ruby
Y05hito__ has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
havenwood has quit [Quit: The Lounge - https://thelounge.chat]
crax23 has quit [Ping timeout: 260 seconds]
havenwood has joined #ruby
crax23 has joined #ruby
Y05hito__ has quit [Ping timeout: 260 seconds]
cartdrige has joined #ruby
crax23 has quit [Ping timeout: 246 seconds]
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 246 seconds]
crax23 has quit [Ping timeout: 252 seconds]
Ziyan has quit [Ping timeout: 260 seconds]
Ziyan has joined #ruby
willfish has quit [Ping timeout: 255 seconds]
Ziyan has quit [Ping timeout: 252 seconds]
dionysus69 has quit [Ping timeout: 248 seconds]
jpn has quit [Ping timeout: 248 seconds]
cartdrige has joined #ruby
crax23 has joined #ruby
cartdrige has quit [Ping timeout: 260 seconds]
ur5us has joined #ruby
supay has quit [Quit: Connection closed for inactivity]
___nick___ has quit [Quit: https://quassel-irc.org - Chat comfortably. Anywhere.]
TomyWork has quit [Quit: Leaving]
___nick___ has joined #ruby
___nick___ has quit [Client Quit]
___nick___ has joined #ruby
some14u has joined #ruby
some14u has quit [Client Quit]
gschanuel has joined #ruby
otisolsen70 has quit [Quit: Leaving]
dionysus69 has joined #ruby
hightower2 has quit [Ping timeout: 260 seconds]
grokify has joined #ruby
grokify has quit [Ping timeout: 252 seconds]
hightower2 has joined #ruby
crax23 has quit [Ping timeout: 260 seconds]
teclator has quit [Quit: http://quassel-irc.org - Chat comfortably. Anywhere.]
_aeris_ has joined #ruby
aeris has quit [Ping timeout: 255 seconds]
_aeris_ is now known as aeris
stirl has quit [Quit: stirl]
gonix has joined #ruby
gonix has quit [Ping timeout: 260 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
Linux_Kerio has quit [Ping timeout: 248 seconds]
hightower2 has quit [Ping timeout: 260 seconds]
Aminda has quit [Remote host closed the connection]
aeris has quit [Write error: Connection reset by peer]
aeris has joined #ruby
cyberbanjo has joined #ruby
cyberbanjo has quit [Remote host closed the connection]
Aminda has joined #ruby
hightower2 has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
jpn has joined #ruby
reset has joined #ruby
cyberbanjo has joined #ruby
jpn has quit [Ping timeout: 260 seconds]
moldorcoder7 has quit [Ping timeout: 260 seconds]
howdoi has joined #ruby