havenwood changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.6.5, 2.5.7, 2.7.0-preview2: https://www.ruby-lang.org | Paste 4+ lines of text to https://dpaste.de/ and select Ruby as the language | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby | Can't talk? Register/identify with Nickserv first!
xco has joined #ruby
bvdw has quit [Quit: bvdw]
bvdw has joined #ruby
<havenwood> Net: I've played with implementing a memoizing enumerator with cursor-based pagination. Ruby Enumerators are backed by a Fiber.
<havenwood> def paginate(page:, per_page: @per_page); lazy.flat_map(&:to_a).drop(page.pred * per_page).first(per_page); end
<havenwood> Net: That ^ might give you ideas?
postmodern has joined #ruby
dinfuehr_ has quit [Ping timeout: 265 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
dinfuehr has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
<leftylink> I keep forgetting it. maybe if I type it, I will remember it
<leftylink> the ord in String#ord is short for ordinal.
gix has quit [Ping timeout: 265 seconds]
Guest99129 has quit [Ping timeout: 240 seconds]
ur5us has quit [Read error: Connection reset by peer]
Swyper has quit [Remote host closed the connection]
ur5us has joined #ruby
Swyper has joined #ruby
dbugger has quit [Quit: Leaving]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
matheusmoreira has quit [Ping timeout: 276 seconds]
matheusmoreira has joined #ruby
wymillerlinux has quit [Remote host closed the connection]
ravenousmoose has joined #ruby
teardown has joined #ruby
kyrylo has joined #ruby
AJA4351 has joined #ruby
ravenousmoose has quit [Ping timeout: 246 seconds]
Azure has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
Azure has joined #ruby
chalkmonster has joined #ruby
Swyper has quit [Remote host closed the connection]
Technodrome has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
bvdw has quit [Quit: bvdw]
bvdw has joined #ruby
bvdw has quit [Quit: bvdw]
bvdw has joined #ruby
crella133 has joined #ruby
<Net> havenwood: that's neat, thanks!
<Net> that's pretty similar to what I'm doing, minus the memoization
Nanuq has joined #ruby
<Net> it seems enumerators are an underrated part of ruby
<Net> with yield and ensure and lazy chaining they can be quite powerful
<havenwood> Net: Currently, they oddly can't be called across Threads, due to the current implementation of Fibers.
AJA4351 has joined #ruby
<havenwood> &>> enum = [:example].cycle; Thread.new { enum.next }.join; enum.next
<rubydoc> stderr: playpen: application terminated abnormally with signal 31 (Bad system call) (https://carc.in/#/r/7yqx)
<havenwood> #!> FiberError: fiber called across threads
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
<Net> yikes, that's rather unexpected
<crella133> Hi. I defined a method as " def ffh(a, b, c)" . When used as "ffh(a, b)", it will raise an ArgumentError. How can I write the code in the "ffh" method so I can catch the error in the method?
<havenwood> Net: Yeah, it can bite you...
<crella133> Sample code:
<crella133> return c if ar.length >= 3
<crella133> return a
<crella133> rescue ArgumentError
<crella133> def ffh(a, b, c)
<crella133> end
<crella133> puts 'args count incorrect'
<crella133> puts ffh('a', 'b')
<havenwood> crella133: def ffh(a, b, c = nil)
<havenwood> crella133: To omit `c`, you'd need to make it optional.
cd has quit [Quit: cd]
ogres has joined #ruby
<havenwood> Net: In this experimental spike, I use it directly in JRuby and TruffleRuby but use a crazy TupleSpace and Queue backed Thread proxy in CRuby.
<havenwood> Net: It's an unfortunate implementation detail side effect at the moment in CRuby.
<Net> havenwood: is this crazy Thread proxy public?
<havenwood> Net: No, and I cringe to make it public, haha.
<havenwood> Net: Let me check on making this whole repo public. :)
<Net> what do you work on that leads you to create such things?
<havenwood> Net: I lead the developer marketing, advocacy & evangelism team at Square. :) This was part of an advocacy code spike to explore improving developer SDKs.
shirak has quit [Ping timeout: 276 seconds]
<havenwood> Net: I wrote a from-scratch Ruby SDK that we now target with open api code generators as our new SDK.
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood> Net: I did a little talk at Rails Conf too as part of this project, making an API-backed Rails model: https://youtu.be/6h5TbKBnLws
<Net> the developer in "developer marketing, advocacy & evangelism" refers to external devs?
<adam12> havenwood: I should look at it again since the last time I looked the Square API was .. meh.
<havenwood> adam12: Yeah, sorry about that. :O Take a look at the new SDK. :)
<adam12> havenwood: The feature to push orders directly to the POS was super intriguing.
<havenwood> adam12: :D
<havenwood> adam12: The new SDK is much nicer... If it's not, my fault. >.> Here's an example of the difference: https://github.com/square/connect-ruby-sdk#example-code-migration
<havenwood> (Old SDK README.)
<adam12> havenwood: SDK design is hard :\ No worries here.
<adam12> It definitely looks a lot nicer, and I remember reading that blog post now that I think of it.
<havenwood> adam12: I didn't design the old one ;)
jaequery has joined #ruby
crella133 has quit [Ping timeout: 240 seconds]
<havenwood> Net: Yup!
crella134 has joined #ruby
<adam12> havenwood: This project relies a bunch on connecting third-party accounts and charging on behalf of them. Then charging an application fee. Last I looked it wasn't possible with Square.
<adam12> I should look again because making my clients have two gateways is kinda annoying.
<havenwood> adam12: Ping me on squ.re/slack about early access to marketplaces apis.
<havenwood> adam12: Or in PM. :)
<havenwood> IRC forever!!
Swyper has joined #ruby
crella134 is now known as crella133
<crella133> How can I get the method name directly where the exception is catched? (without string operations)
<crella133> Sample code:
<crella133> return a
<crella133> def ffh(a, b, c)
<crella133> #main
<crella133> end
<crella133> begin
<crella133> puts ffh('a', 'b'); puts ffh('a', 'b', 'c', 'd')
<crella133> rescue ArgumentError => exx
<crella133> puts 'args count incorrect'
<crella133> puts 'error closet in : '; exx_msg = exx.backtrace[0].to_s
<crella133> lbr = exx_msg.index("`"); rbr = exx_msg.rindex("\'")
<crella133> puts exx_msg[lbr + 1, rbr - lbr - 1]
<havenwood> crella133: You can always get a method name inside the method with __method__ or __callee__.
<Net> havenwood: what does it mean for the sdk to be auto-generated?
<havenwood> crella133: Please paste multiple lines to a gist or pastie of some sort.
Swyper has quit [Remote host closed the connection]
Swyper has joined #ruby
<crella133> Thanks
nubie has joined #ruby
<havenwood> Net: We have OpenAPI specs that we use for internal protocol buffer communication over GRPC. Those OopenAPI specs also generate this SDK, which I initially wrote a bespoke version of. At least they generate something approximating the target.
<havenwood> Net: I mean, they're generated *from* the OpenAPI specs. A code generator creates the SDK from the spec.
<Net> ah, your version was a POC?
<havenwood> Net: Yup, exactly. I just did code spikes for feedback and ideas to target for all languages, specifically dynamic ones.
<havenwood> Net: My prototype isn't actually public.
<Net> and as part of that prototype you wrote an entire threading implementation? lol
<havenwood> Net: Yup!
<Net> awesome :D
<havenwood> Net: My prototype uses a thread pool with a pool of persistent connections and a fiber backed response enumerator. :)
<havenwood> And other things that didn't make the cut. ¯\_(ツ)_/¯ Some will eventually!
<Net> that was shared across the pool?
<Net> anyone know what the performance of the splat operator in foo(*bar) looks like?
<havenwood> @connection_pool ||= ConnectionPool.new size: @pool_size, timeout: @pool_timeout do
<havenwood> HTTP.auth("Bearer #{access_token}")
<havenwood> .persistent(HOST)
<havenwood> .timeout(@http_timeout)
<havenwood> .headers(accept_encoding: ACCEPT_ENCODING)
<havenwood> .use(:auto_inflate)
<havenwood> Too few SDKs take advantage of gzip!
<havenwood> Net: HTTP was a gem created at Square. \o/
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
<adam12> havenwood: I didn't realize that (HTTP.rb came from Square)
<Rudolph> havenwood: Please paste multiple lines to a gist or pastie of some sort.
<havenwood> Rudolph: Sorry about that, it was 5 lines and I was going to one-line it but it was ugly so I hit Enter.
<Rudolph> :>
<havenwood> Rudolph: Rule is 4, so I broke the rule.
havenwood was kicked from #ruby by havenwood [Your behavior is not conducive to the desired environment.]
<Rudolph> lol
<leftylink> I knew it!
havenwood has joined #ruby
<Technodrome> Good day
<Rudolph> welcome back. hopefully you wont be a problem this time
<havenwood> Technodrome: Good day!
<havenwood> Rudolph: I promise to behave.
* havenwood lies
* Rudolph shakes his head
<havenwood> Net: It's cheap. I'm not sure what I'd bench comparing it to?
<Net> Just paused for a moment before sticking it in a loop, thought I remembered there was some performance drawback to it. I’m sure it’s negligible.
bacchist_ has joined #ruby
bacchist has quit [Ping timeout: 268 seconds]
<crella133> To havenwood: I run the code in the 'main' part, and how can I know that the ArgumentError is raised by running 'ffh' from 'main'? Code link: https://dpaste.de/24v9. Some pages say that 'method.arity' can be used, but I couldn't find out how to write the code even if I had visited the ruby doc in "https://ruby-doc.org/core-2.6.5/Method.html"
<Technodrome> how are you havenwood
<Technodrome> I passed my github technical test
<havenwood> Technodrome: Congrats!!
<Technodrome> but now they are going to look at my location and all these things, cost of living, and give me a salary or something
<havenwood> crella133: #arity gives you a bit, but #parameters gives you a bit more.
<Technodrome> so much for the 175k that was offered early on
<Technodrome> watch them come back with 90k
<havenwood> crella133: It might help to zoom out a bit and ask about what you're trying to do.
<adam12> Technodrome: Github does that too?
<Technodrome> adam12 who do you know who does that?
<Technodrome> yes apparently
<adam12> Technodrome: Gitlab
<havenwood> ^
<adam12> And Buffer too IIRC
<Technodrome> so stupid, so all of that to get less than what i'm making now
<havenwood> Technodrome: I'd expect GitHub to be a legit offer regardless of geo, but unsure!
<Technodrome> they already told me they are going to lower it
<Technodrome> i bet its 115k
chalkmonster has quit [Quit: WeeChat 2.6]
<havenwood> Technodrome: Yeah, but *lower* varies highly by company. Some it's not so much.
<Technodrome> yeah , i hope so
<Technodrome> we'll see
<havenwood> Technodrome: And look at your total compensation including stock, since it's a publicly traded company and you can sell that for cash.
<Technodrome> yeah, we'll just have to see , hopefully its good
<Technodrome> i'm so sick of the job hunt already
<havenwood> Technodrome: it's rough, huh?
<havenwood> Technodrome: I'm not a fan either.
<Technodrome> its just one recruiter after the next
<Technodrome> i have many regrets , my life was better at 19
chalkmonster has joined #ruby
Swyper has quit [Remote host closed the connection]
AJA4351 has joined #ruby
wildtrees has quit [Quit: Leaving]
Swyper has joined #ruby
<havenwood> Technodrome: my life is better at @old_age_here
<Technodrome> i hear you, not me unfortunately
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
<Technodrome> i worked for a flash agency in nyc, i was their 3rd employee, it grew rather rapidly. Long story short it was 140k a year + big cash bonus in salary yearly, around like 80k. The owner was from Colombia and at least once a month was there. Just an awesome time
<Technodrome> meanwhile here i am looking for rails jobs
<bougyman> Hahaha
<havenwood> Technodrome: stress is all i can currently point to that i intensely dislike. i'm tempted to go back to coding 100% of the time. :)
<bougyman> havenwood: I pretty much did that.
<havenwood> bougyman: glad you did?
<bougyman> After my 4 year stint at Amazon, I just couldn't deal with _any_ politics.
<bougyman> havenwood: happy as fuck.
<havenwood> bougyman: :)
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Technodrome> the world is just a different place now
<bougyman> Got married, do a lot of vacation, and work with great peeps.
<bougyman> No one fighting for a rung on the ladder.
<Technodrome> tech is not very stable in the end
<bougyman> That was so annoying.
<Technodrome> bougyman where do you work now?
jaequery has joined #ruby
drincruz has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
<crella133> havenwood: I described it in https://dpaste.de/KapY . Would you like to take a moment to read this?
<crella133> Error link. The correct one: https://dpaste.de/3B9P
i9zO5AP has joined #ruby
<bougyman> Technodrome: SparkPost
Ai9zO5AP has quit [Ping timeout: 240 seconds]
jenrzzz has joined #ruby
<havenwood> crella133: It seems to me like you're asking about multimethods, like they have in languages including Clojure and Elixir. Ruby doesn't have multimethods, but we do operator overloading where there are default arguments that can be unused and then flow control based on argument type.
<havenwood> crella133: Operator ad hoc polymorphism is another way to say we deal with various arrangements of arguments from a single method.
<havenwood> crella133: You can't have both a f(x) and f(x, y) in Ruby, but you can have a f(x, y = nil) or other variants.
<crella133> Oh, not the way. I am just interested in when to catch the ArgumentError of the 'f(3)' , in the 'main' part or in the 'f(x, y)' definition part?
<crella133> Or else it turns to a slow way by modifying the Exception.backtrace[0].to_s
<havenwood> crella133: You probably explained that well, and I'm just too tired to properly read. Someone else might be able to better help at the moment.
<bougyman> havenwood: I haven't heard generics be called multimethods before.
<bougyman> generic methods is the common lisp term.
<bougyman> I hear them call "overloaded" a lot.
<bougyman> In various other language communities.
AJA4350 has quit [Ping timeout: 240 seconds]
<bougyman> havenwood: yes, I saw. I learned it as "generic dispatch"
<havenwood> bougyman: aye, funny how we have parallel nomenclature
<bougyman> Never took the time to dig in to clojure.
<havenwood> bougyman: very nice lisp
<crella133> OK, and I have think out to design a wrapper for each user-defined function by adding prefix, in the wrapper function, the code can prevent ArgumentError by checking *argc.length.
<bougyman> eh, I started with scheme then settled on CL.
<bougyman> And now I don't use either much. Only think that keeps me attached to CL is stumpwm (my desktop)
<bougyman> It's fabulous to have a lisp machine as a desktop
<bougyman> I can reprogram it in flight all I like.
<havenwood> bougyman: i know a few seattle rb folk are fans of chicken scheme
<bougyman> i've used chicken a few times.
<havenwood> cut a gem or lay an egg?
<bougyman> But i don't move from ruby much anymore. i'm not doing computational heavy shit (at least, not computationally heavey from the client)
<bougyman> If I do have cpu heavy stuff, I'm more likely to Rust it.
<bougyman> :(
<crella133> Sometimes I wonder whether I use Matlab directly rather than designing the calculator with complex parsing logic.
SirFunk has quit [Quit: ZNC - http://znc.in]
jenrzzz has quit [Ping timeout: 265 seconds]
matheusmoreira has quit [Quit: leaving]
<Net> Technodrome: what happened to the flash agency?
<Net> besides the end of flash
chalkmon1 has joined #ruby
markov_twain has quit [Quit: WeeChat 2.6]
duderonomy has joined #ruby
chalkmonster has quit [Ping timeout: 240 seconds]
<Technodrome> Net he sold it to a larger agency for 18M in 2005
SirFunk has joined #ruby
<Technodrome> i remember being in midtown office, the sales guys were old to me (late 20's, early 30's) , and they would go on average of two meetings a day for new projects. After lunch we would review, and literally every project was 300k to 1M with some going over 1m
<Technodrome> it just seemed so normal
AJA4350 has joined #ruby
<Technodrome> today, i can't even imagine it being like that with every agency fighting over every hour
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
matheusmoreira has joined #ruby
Swyper has quit [Remote host closed the connection]
<Technodrome> if it wasn't for my dumb real estate investments (that everyone thought was dumb), I bought some 4 and 6 unit apartment buildings that were in bad shape. Now they are in awesome shape and bring in 85 percent of my income.
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 264 seconds]
AJA4351 is now known as AJA4350
ur5us has quit [Remote host closed the connection]
AJA4350 has quit [Client Quit]
mr-kumar has joined #ruby
crella133 has quit [Quit: crella133]
chalkmonster has joined #ruby
Swyper has joined #ruby
<mr-kumar> could someone help me with bundler, its gets stuck indefinitely at 'bundle install' I am running raspbian
chalkmon1 has quit [Ping timeout: 265 seconds]
<nubie> hi all, if i want to get the user:/homefolder printout from /etc/passwd - is it easier to use etc module / just loop regular from the file directly ?
<nubie> AFAIK etc module already become built in module inside ruby isnt ? please CMIIW
Swyper has quit [Remote host closed the connection]
s3nd1v0g1us has joined #ruby
Swyper has joined #ruby
alfiemax has joined #ruby
<alfiemax> hi
<alfiemax> kind of a ruby internals question here..
<alfiemax> when i do something like `puts my_world`
<alfiemax> how does ruby understand if `my_world` is a method or a variable ?
<leftylink> if both are present, the variable is used
<havenwood> mr-kumar: Any output from?: bundle install --verbose
<leftylink> &>> def foo; :f end; foo = :v; [foo, foo()]
<rubydoc> # => [:v, :f] (https://carc.in/#/r/7ytq)
<alfiemax> yes.. i do know how it behaves.. but trying to understand how ruby interprets it under the hood
brool has quit [Ping timeout: 250 seconds]
Swyper has quit [Ping timeout: 268 seconds]
animo8 has quit [Ping timeout: 268 seconds]
<havenwood> &>> require 'ripper'; Ripper.sexp 'puts my_world'
<rubydoc> # => [:program, [[:command, [:@ident, "puts", [1, 0]], [:args_add_block, [[:vcall, [:@ident, "my_world", [1, 5]]]], false]]]] (https://carc.in/#/r/7ytr)
<havenwood> &>> RubyVM::InstructionSequence.compile('my_world = 42; puts my_world').to_a.last
<rubydoc> # => [1, :RUBY_EVENT_LINE, [:putobject, 42], [:setlocal_WC_0, 3], [:putself], [:getlocal_WC_0, 3],... check link for more (https://carc.in/#/r/7yts)
<havenwood> alfiemax: In your terminal, try: ruby -e "puts my_world" -yydebug
<havenwood> alfiemax: That shows the parse.y lines the grammar goes through in parsing the file.
<alfiemax> let me try that
<havenwood> alfiemax: That results in the YARV IR that is the instruction sequence.
<havenwood> alfiemax: The Ruby VM then turns that into machine code.
<havenwood> &>> require 'ripper'; Ripper.lex 'puts my_world'
<rubydoc> # => [[[1, 0], :on_ident, "puts", #<Ripper::Lexer::State: EXPR_CMDARG>], [[1, 4], :on_sp, " ",... check link for more (https://carc.in/#/r/7ytt)
<havenwood> alfiemax: That's the first step after tokenization.
<havenwood> &>> require 'ripper'; Ripper.tokenize 'puts my_world'
<rubydoc> # => ["puts", " ", "my_world"] (https://carc.in/#/r/7ytu)
<havenwood> alfiemax: So tokens first ^
<havenwood> alfiemax: Then lexing, s-expression, and you have an intermediary representation - that in the case of CRuby is YARV instructions.
<alfiemax> mm.. that's a lot to take in.. :D
<havenwood> alfiemax: The YARV instructions are portable between architectures and OSes. YARV can then compile the appropriate machine code.
suukim has joined #ruby
<havenwood> alfiemax: I wrote this blog post as an intro to Ruby's new JIT: https://developer.squareup.com/blog/rubys-new-jit/
<alfiemax> nice..
<Intelo> I keep on getting new session cookie value _wa_session on every request. Can anyone tell why? https://pastebin.ubuntu.com/p/fmQ75PC6Pz/
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
d^sh has quit [Ping timeout: 276 seconds]
d^sh has joined #ruby
<mr-kumar> havenwood sorry for the delay , my internet connection dropped but this is the output I got https://privatebin.net/?72dce6b5988ac065#7ip4i6YzK2xRZuk36enbC9qBBquN3bB1Lg1XEsevJ8gF
<mr-kumar> I am figuring I have to use sudo to run this ?
<Intelo> which one to modify to add domain. cache.rb: Rails.application.config.cache_store = :redis_store, "#{url}:6379/0/cache", { expires_in: 90.minutes,race_condition_ttl: 5 } or this session_store.rb Rails.application.config.session_store :redis_store, key: '_wa_session'
donofrio has quit [Remote host closed the connection]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bitwinery has joined #ruby
bacchist has joined #ruby
bacchist_ has quit [Ping timeout: 265 seconds]
xco has quit [Ping timeout: 240 seconds]
bitwinery has quit [Remote host closed the connection]
bitwinery has joined #ruby
s3nd1v0g1us has quit [Ping timeout: 276 seconds]
_whitelogger has joined #ruby
orbyt_ has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
Intelo has quit [Ping timeout: 268 seconds]
Intelo has joined #ruby
conta has joined #ruby
jenrzzz has joined #ruby
sauvin has joined #ruby
jenrzzz has quit [Ping timeout: 268 seconds]
* Intelo waits
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
pdcawley has joined #ruby
andikr has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
<nubie> hi sorry, i i used etc module like this Etc.passwd { |val| results = val.name hash = digest::MD5.hexdigest(results) } - what is the best way to put the hash result into the new file
<nubie> ?
Intelo has quit [Ping timeout: 265 seconds]
<nubie> do i need to put the File.new inside the curve of Etc.passwd {} what if i want to separate that as i need to check the hash everytime i run the script for the changes of hash ?
sandstrom has joined #ruby
Intelo has joined #ruby
<bacchist> what are you trying to do, exactly?
dinfuehr_ has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr_ has quit [Ping timeout: 246 seconds]
dinfuehr has joined #ruby
vrih has joined #ruby
<nubie> @bacchist, i'd like to parse the username from /etc/passwd then hash the output into a file "A" - everytime the script run it will check the hash if there's a change will create log files B for the changes occurred & update the hash on file A
<nubie> the hash i can came up is with MD5 for the simplicity
dr_mdma_md has quit [Quit: Connection closed for inactivity]
<nubie> appreciate your advice @bacchist
<Intelo> Will this make cookie available for ALL domains in the world? Rails.application.config.session_store :cookie_store, key: '_my_app_session', domain: :all
dinfuehr has quit [Ping timeout: 246 seconds]
dinfuehr has joined #ruby
crella133 has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
Intelo has quit [Ping timeout: 268 seconds]
<crella133> Are there books or webpages about managing codes for projects? For example, how to start locating the entry of a project from github? Or under what condition should I use a Class or Module/Namespace to wrap some code? It's much better if the books or webpages are for scripting language .
dinfuehr has quit [Ping timeout: 252 seconds]
dinfuehr has joined #ruby
jenrzzz has joined #ruby
ur5us has joined #ruby
dinfuehr has quit [Ping timeout: 240 seconds]
dinfuehr has joined #ruby
<bacchist> nubie: so you want to check if new users have been added to the system?
b100s has joined #ruby
dr_mdma_md has joined #ruby
<nubie> @bacchist actually compare md5 hash output when reading username from /etc/passwd
<bacchist> so you want to see if the username has changed?
dinfuehr has quit [Ping timeout: 276 seconds]
conta has quit [Ping timeout: 246 seconds]
Intelo has joined #ruby
<nubie> @bacchist based on the hash file created from parsing /etc/passwd
dinfuehr has joined #ruby
<bacchist> i'm just going to assume you're trying to do something that's over my head. i don't understand why you would want to create and compare hashes based on a plain text file instead of just using diff
vrih has quit [Quit: Leaving]
loveablelobster has joined #ruby
tsujp has quit [Quit: Textual IRC Client: www.textualapp.com]
conta has joined #ruby
TomyWork has joined #ruby
tsujp has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vrih has joined #ruby
ravenousmoose has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
dinfuehr has joined #ruby
pdcawley has quit [Quit: pdcawley]
muhaha has left #ruby ["The Lounge - https://thelounge.chat"]
dionysus69 has joined #ruby
<nubie> @bacchist apologies forgot to mention its for homework course - thats why it have specific requirements
bitwinery has quit [Quit: Leaving]
Axy has joined #ruby
Axy has joined #ruby
Axy has quit [Changing host]
Intelo_ has joined #ruby
Mia has quit [Ping timeout: 268 seconds]
Intelo has quit [Ping timeout: 268 seconds]
jenrzzz has quit [Ping timeout: 276 seconds]
pdcawley has joined #ruby
pdcawley has quit [Client Quit]
jenrzzz has joined #ruby
reber has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
sandstrom has joined #ruby
schne1der has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
crella133 has quit [Quit: crella133]
jmcgnh has quit [Read error: Connection reset by peer]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Mia has joined #ruby
Axy has quit [Ping timeout: 246 seconds]
SuperLag has quit [Ping timeout: 276 seconds]
jmcgnh has joined #ruby
conta has quit [Remote host closed the connection]
SuperLag has joined #ruby
conta has joined #ruby
ur5us has quit [Remote host closed the connection]
teclator has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
ur5us has joined #ruby
greypack has quit [Ping timeout: 246 seconds]
JohanP has joined #ruby
ur5us has quit [Ping timeout: 240 seconds]
ravenousmoose has quit [Ping timeout: 246 seconds]
sandstrom has joined #ruby
greypack has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
dbugger has joined #ruby
Nicmavr has joined #ruby
mikecmpbll has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
nodes has joined #ruby
<nodes> hi
nodes has quit [Quit: Textual IRC Client: www.textualapp.com]
chens has joined #ruby
chens` has joined #ruby
chens has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
Intelo_ is now known as Intelo
maxpower has joined #ruby
maxpower is now known as nodes
phaul_ has joined #ruby
ur5us has joined #ruby
nubie has quit [Quit: Leaving]
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
teclator has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
ur5us has joined #ruby
ur5us has quit [Ping timeout: 268 seconds]
nodes has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has quit [Ping timeout: 276 seconds]
teclator has joined #ruby
Swyper has joined #ruby
greypack has quit [Ping timeout: 265 seconds]
greypack has joined #ruby
LtHummus has quit [Ping timeout: 276 seconds]
LtHummus has joined #ruby
phaul_ has quit [Ping timeout: 240 seconds]
Ai9zO5AP has joined #ruby
i9zO5AP has quit [Ping timeout: 264 seconds]
Ai9zO5AP has quit [Client Quit]
ellcs has joined #ruby
phaul_ has joined #ruby
cisco has joined #ruby
cisco is now known as Guest59678
chens` has quit [Remote host closed the connection]
teclator has quit [Quit: No Ping reply in 180 seconds.]
teclator has joined #ruby
Guest59678 has quit [Ping timeout: 240 seconds]
teclator has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
kyrylo has joined #ruby
chalkmonster has quit [Quit: WeeChat 2.6]
teclator has quit [Ping timeout: 276 seconds]
Fridtjof has quit [Ping timeout: 240 seconds]
schne1der has quit [Remote host closed the connection]
lalitmee has joined #ruby
tpanarch1st has joined #ruby
tpanarch1st has quit [Client Quit]
jenrzzz has joined #ruby
conta has quit [Remote host closed the connection]
conta has joined #ruby
teclator has joined #ruby
schne1der has joined #ruby
akemhp has joined #ruby
nubie has joined #ruby
loveablelobster has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
dbugger has quit [Remote host closed the connection]
lalitmee has quit [Remote host closed the connection]
shirak has joined #ruby
sleetdrop has joined #ruby
loveablelobster has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
nubie has quit [Remote host closed the connection]
nubie has joined #ruby
dbugger has joined #ruby
AJA4350 has joined #ruby
jinie has quit [Ping timeout: 240 seconds]
vondruch has quit [Ping timeout: 246 seconds]
shirak has quit [Ping timeout: 265 seconds]
NL3limin4t0r_afk is now known as NL3limin4t0r
fanta1 has joined #ruby
AJA4351 has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
sleetdrop has quit [Quit: Textual IRC Client: www.textualapp.com]
vondruch has joined #ruby
ElFerna has joined #ruby
schne1der has quit [Ping timeout: 268 seconds]
yann-kaelig has joined #ruby
mikecmpbll has joined #ruby
suukim has quit [Quit: Konversation terminated!]
zoid has quit [Ping timeout: 245 seconds]
zoid has joined #ruby
schne1der has joined #ruby
cd has joined #ruby
vrih_ has joined #ruby
jenrzzz has joined #ruby
lucasb has joined #ruby
vrih has quit [Ping timeout: 268 seconds]
AJA4351 has joined #ruby
fuzzface has joined #ruby
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
shirak has joined #ruby
postmodern has quit [Quit: Leaving]
Swyper has quit [Remote host closed the connection]
ElFerna_1 has joined #ruby
Technodrome has joined #ruby
ElFerna has quit [Ping timeout: 240 seconds]
AJA4351 has joined #ruby
loveablelobster has quit [Quit: Textual IRC Client: www.textualapp.com]
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
andikr has quit [Remote host closed the connection]
vondruch_ has joined #ruby
ElFerna_2 has joined #ruby
conta has quit [Quit: conta]
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
jenrzzz has quit [Ping timeout: 268 seconds]
conta has joined #ruby
ElFerna_1 has quit [Ping timeout: 240 seconds]
luke8086 has quit [Quit: WeeChat 2.6]
drincruz has quit [Ping timeout: 240 seconds]
ElFerna_2 has quit [Ping timeout: 268 seconds]
cow[moo] has joined #ruby
poontangmessiah has joined #ruby
AJA4351 has joined #ruby
jacksoow has quit [Ping timeout: 246 seconds]
bruce_lee has joined #ruby
jacksoow has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
vrih_ is now known as vrih
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cow[moo] has joined #ruby
kyrylo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
schne1der has quit [Ping timeout: 265 seconds]
nima_m has joined #ruby
AJA4351 has joined #ruby
Intelo has quit [Remote host closed the connection]
Intelo has joined #ruby
fuzzface has quit [Quit: Leaving]
AJA4350 has quit [Ping timeout: 246 seconds]
AJA4351 is now known as AJA4350
fanta1 has quit [Quit: fanta1]
greengriminal has joined #ruby
MrCrackPot has quit [Remote host closed the connection]
MrCrackPot has joined #ruby
Intelo has quit [Ping timeout: 268 seconds]
chalkmonster has joined #ruby
fuzzface has joined #ruby
AJA4351 has joined #ruby
AJA4351 is now known as AJA4350
AJA4350 has quit [Ping timeout: 265 seconds]
alfiemax has quit [Remote host closed the connection]
yann-kaelig has quit [Quit: yann-kaelig]
donofrio has joined #ruby
zoid has left #ruby [#ruby]
Intelo has joined #ruby
fuzzface has quit [Quit: Leaving]
drincruz has joined #ruby
renich has joined #ruby
jinie has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
conta has quit [Ping timeout: 240 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
Intelo has quit [Ping timeout: 276 seconds]
Rapture has joined #ruby
schne1der has joined #ruby
AJA4351 has joined #ruby
\13k has quit [Ping timeout: 246 seconds]
vondruch_ has joined #ruby
AJA4351 is now known as AJA4350
renich_ has joined #ruby
renich has quit [Ping timeout: 240 seconds]
greengriminal has quit [Quit: This computer has gone to sleep]
TomyWork has quit [Ping timeout: 246 seconds]
vondruch has quit [Ping timeout: 240 seconds]
vondruch_ is now known as vondruch
ogres has joined #ruby
shirak has quit [Ping timeout: 246 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
AJA4351 has joined #ruby
Benett has quit [Remote host closed the connection]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
jenrzzz has joined #ruby
Benett has joined #ruby
Benett has quit [Changing host]
Benett has joined #ruby
Sina has joined #ruby
Intelo has joined #ruby
<rapha> hmm
greengriminal has joined #ruby
<rapha> anyone know what's going on with rubyforge.org? :(
<havenwood> rapha: a few years back they shuttered
<havenwood> 2013, yikes—a bit further back than I recalled.
ALowther has joined #ruby
matheusmoreira has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
<rapha> oh interesting ... kramdown README still links there
matheusmoreira has joined #ruby
ElFerna has joined #ruby
alfiemax has quit [Ping timeout: 240 seconds]
spacesuitdiver has joined #ruby
AJA4351 has joined #ruby
AlHafoudh has joined #ruby
ElFerna has quit [Ping timeout: 268 seconds]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
yokel has quit [Ping timeout: 268 seconds]
gigetoo has quit [Ping timeout: 265 seconds]
crella133 has joined #ruby
gigetoo has joined #ruby
<crella133> Hi. I want to debug a part of code, and I want to get notified when a regular Array is pushed with a new item. How to write the code of the event? What's the concept of this?
jenrzzz has quit [Ping timeout: 268 seconds]
<crella133> I have made it by creating a new class inheritin Array and defining a new method with Array.push inside.
yokel has joined #ruby
vondruch has quit [Quit: vondruch]
vondruch has joined #ruby
<rapha> okay, i give up. how do you get kramdown (either through API or through command line) to output a full HTML document, i.e., including doctype, <html>, <meta> tags, </html>?
schne1der has quit [Ping timeout: 265 seconds]
<rapha> Aaaaaaaaaaaaaaaah!!! --template document
<phaul_> crella133: you can look intro TracePoints
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<phaul_> but I guess if you are okay with modifiyng the code you can aslo wrap Array, as you said, but I would use tracepoint
<phaul_> &ri TracePoint
<bougyman> rapha: ew, markdown.
Fridtjof has joined #ruby
<crella133> And how to get the object's class name when the object is created by a_class.new? The keyword isn't __class__.
<rapha> * shrug *
<phaul_> &>> a= Array; b = a.new; b.class
<rubydoc> # => Array (https://carc.in/#/r/7ywa)
<crella133> Oh yes.
<bougyman> rapha: seems the docs of kramdown suggest using --template to wrap the output in a proper html header/etc.
<bougyman> But seriously. asciidoc (and asciidoctor). Check them out.
<rapha> eeeeeew asciidoc
<havenwood> &>> trace = TracePoint.new(:c_call) { |tp| puts 'Notification stuff' if tp.method_id == :push }; trace.enable; [].push 42
<rubydoc> # => Notification stuff... check link for more (https://carc.in/#/r/7ywb)
<rapha> looked at it once, had to close the tab to prevent myself from getting eye cancer
<bougyman> wut?
dionysus70 has joined #ruby
dinfuehr has quit [Ping timeout: 265 seconds]
<baweaver> havenwood: that's a lot slower though
dionysus69 has quit [Ping timeout: 268 seconds]
dionysus70 is now known as dionysus69
<baweaver> crella133: what do you want to subscribe for?
<baweaver> Chances are you could just use some type of pub/sub system instead that'd solve the problem without trying to subclass Array yourself
<rapha> bougyman: one person's opinion is another person's facepalm.
AJA4351 has joined #ruby
dinfuehr has joined #ruby
poontangmessiah has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Ping timeout: 268 seconds]
AJA4351 is now known as AJA4350
<crella133> baweaver: There are few blogs and tutorials in Chinese language about the concept you mentioned. And I am too lazy to buy ssr/v2ray resources. Fortunately, I have downloaded the ruby doc archive.
eljimmy has joined #ruby
<baweaver> You wouldn't need to buy anything.
<crella133> I really feel that Baidu's search quality is reducing.
Intelo has quit [Ping timeout: 245 seconds]
dinfuehr has quit [Ping timeout: 268 seconds]
dinfuehr has joined #ruby
crella133 has quit [Quit: crella133]
KeyJoo has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
chalkmonster has quit [Ping timeout: 250 seconds]
chalkmonster has joined #ruby
Intelo has joined #ruby
shirak has joined #ruby
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
AJA4350 has quit [Ping timeout: 264 seconds]
nubie has quit [Quit: Leaving]
AJA4350 has joined #ruby
Intelo has quit [Ping timeout: 240 seconds]
shirak has quit [Ping timeout: 265 seconds]
ellcs has quit [Remote host closed the connection]
s3nd1v0g1us has joined #ruby
schne1der has joined #ruby
renich has joined #ruby
dionysus69 has joined #ruby
renich_ has quit [Ping timeout: 265 seconds]
orbyt_ has joined #ruby
nima_m has quit [Quit: Connection closed for inactivity]
orbyt_ has quit [Client Quit]
AlHafoudh has quit [Ping timeout: 265 seconds]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
brool has joined #ruby
phaul_ has quit [Ping timeout: 240 seconds]
loveablelobster has joined #ruby
chalkmon1 has joined #ruby
poontangmessiah has joined #ruby
chalkmonster has quit [Ping timeout: 265 seconds]
phaul_ has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
chalkmonster has joined #ruby
petru has joined #ruby
chalkmon1 has quit [Ping timeout: 265 seconds]
phaul_ has quit [Ping timeout: 240 seconds]
sandstrom has quit [Ping timeout: 245 seconds]
loveablelobster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jaequery has joined #ruby
AJA4350 has joined #ruby
nowhereman has quit [Ping timeout: 276 seconds]
orbyt_ has joined #ruby
KeyJoo has quit [Quit: KeyJoo]
NL3limin4t0r is now known as NL3limin4t0r_afk
AndreYuhai has joined #ruby
<AndreYuhai> Hey there, what is wrong with my Regexp? https://rubular.com/r/Q1VHBpejiIikBj
<AndreYuhai> I want to match last_name, first_name, middle name depending on whether a middle name exists. So if middle name does not exist then it would only match last name and first name
brool has quit [Ping timeout: 252 seconds]
NL3limin4t0r_afk is now known as NL3limin4t0r
AJA4350 has quit [Ping timeout: 245 seconds]
<NL3limin4t0r> AndreYuhai: What is the format you use as example? Can we assume "<last name>, <first name> <middle name>"
AJA4350 has joined #ruby
jenrzzz has joined #ruby
lucasb has quit [Quit: Connection closed for inactivity]
<AndreYuhai> NL3limin4t0r, Yes I already inserted the tags in the link.
<NL3limin4t0r> AndreYuhai: And you current issue is that, if there is no middle name, the last character of the last name is used as middle name?
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ElFerna has joined #ruby
<AndreYuhai> NL3limin4t0r, Yes. If there isn't any middle name then the last letter of the first name becomes the middle name.
<AndreYuhai> I would like the regexp to match the word before the comma as last name and then the word following the comma as first name and the rest as middle name, if any.
<al2o3-cr> AndreYuhai: change it to * (zero or more) in middle name.
AlHafoudh has joined #ruby
<al2o3-cr> that's wrong.
alfiemax has joined #ruby
Intelo has joined #ruby
ElFerna has quit [Ping timeout: 265 seconds]
<NL3limin4t0r> AndreYuhai: https://rubular.com/r/A7gTOkGb5xd2KL
<AndreYuhai> al2o3-cr, oh it worked. Thank you. But then if I have more than one middle name it doesn't match the rest, just the first middle name.
<AndreYuhai> NL3limin4t0r, This matches. Thank you.
<al2o3-cr> AndreYuhai: that's why i said it's wrong.
<AndreYuhai> oh sorry I hadn't realized that.
<al2o3-cr> AndreYuhai: np, NL3limin4t0r seems to work fine though.
<NL3limin4t0r> You can find the meaning of \p{Alpha} here: https://ruby-doc.org/core-2.6.5/doc/regexp_rdoc.html#label-Character+Properties
AlHafoudh has quit [Ping timeout: 265 seconds]
<AndreYuhai> NL3limin4t0r, I am checking it right now, thank you. :)
chalkmon1 has joined #ruby
<NL3limin4t0r> You used `[a-zA-Z]` wich in my language doesn't cover many names.
chalkmonster has quit [Ping timeout: 265 seconds]
<NL3limin4t0r> For example: "André" wouldn't match.
<al2o3-cr> yeah, character props are a pretty neat feature.
greengriminal has quit [Quit: This computer has gone to sleep]
akemhp has quit [Ping timeout: 265 seconds]
<AndreYuhai> NL3limin4t0r, Oh I didn't know that. Actually I was just using \w, I found the one I shared on the Internet. Would \w that match?
<al2o3-cr> &>> "$1.00, £1.00 €1.00".scan /\p{Symbol}/
<rubydoc> # => ["$", "£", "€"] (https://carc.in/#/r/7yx9)
Rapture has quit [Ping timeout: 246 seconds]
<NL3limin4t0r> `\w` is a shortcut for `[A-Za-z_]`, so it still doesn't include the character "é".
ElFerna has joined #ruby
<NL3limin4t0r> ^ The above should be `[A-Za-z0-9_]`
<AndreYuhai> Okay, thank you for the info.
gix has joined #ruby
phaul_ has joined #ruby
<NL3limin4t0r> &>> 'André'[/\w+/]
<rubydoc> # => "Andr" (https://carc.in/#/r/7yxa)
<NL3limin4t0r> &>> 'André'[/\p{Alpha}+/]
<rubydoc> # => "André" (https://carc.in/#/r/7yxb)
Technodrome has joined #ruby
<al2o3-cr> NL3limin4t0r: wouldn't it be better using /\p{L}/ ?
greengriminal has joined #ruby
<NL3limin4t0r> al2o3-cr: It might be, I'm not entirly sure what the differnce between \p{L} and \p{Alpha} is.
AJA4351 has joined #ruby
ogres has quit [Quit: Connection closed for inactivity]
<al2o3-cr> NL3limin4t0r: \p{Alpha} letters and numbers
chalkmonster has joined #ruby
<NL3limin4t0r> Isn't that \p{Alnum} ?
<al2o3-cr> NL3limin4t0r: yes.
chalkmon1 has quit [Ping timeout: 265 seconds]
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
<al2o3-cr> NL3limin4t0r: i'm blind, ignore me
<NL3limin4t0r> They look alike
phaul_ has quit [Ping timeout: 265 seconds]
<al2o3-cr> yeah they do lol
<NL3limin4t0r> &>> "foo42bar_baz".scan(/\p{Alpha}+/)
<rubydoc> # => ["foo", "bar", "baz"] (https://carc.in/#/r/7yxc)
poontangmessiah has quit [Ping timeout: 268 seconds]
<NL3limin4t0r> just checking if the underscore is excluded, ^ seems like it is
renich has quit [Ping timeout: 264 seconds]
poontangmessiah has joined #ruby
<al2o3-cr> well, that answers that then ;)
chalkmon1 has joined #ruby
chalkmonster has quit [Ping timeout: 240 seconds]
ElFerna_1 has joined #ruby
poontangmessiah has quit [Quit: Leaving]
poontangmessiah has joined #ruby
ElFerna has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 250 seconds]
NL3limin4t0r is now known as NL3limin4t0r_afk
loveablelobster has joined #ruby
chalkmonster has joined #ruby
AJA4351 has joined #ruby
chalkmon1 has quit [Ping timeout: 240 seconds]
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
s3nd1v0g1us has quit [Quit: WeeChat 2.6]
s3nd1v0g1us has joined #ruby
jenrzzz has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
BTRE has quit [Remote host closed the connection]
rippa has joined #ruby
BTRE has joined #ruby
chalkmonster has quit [Ping timeout: 240 seconds]
chalkmon1 has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
loveablelobster has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
jenrzzz has joined #ruby
s3nd1v0g1us has quit [Quit: WeeChat 2.6]
ElFerna_1 has quit [Quit: WeeChat 1.9.1]
s3nd1v0g1us has joined #ruby
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
jaequery has joined #ruby
yann-kaelig has joined #ruby
AJA4350 has quit [Client Quit]
jenrzzz has quit [Ping timeout: 268 seconds]
s3nd1v0g1us has quit [Quit: WeeChat 2.6]
chalkmonster has joined #ruby
chalkmon1 has quit [Ping timeout: 240 seconds]
s3nd1v0g1us has joined #ruby
dionysus69 has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Ping timeout: 240 seconds]
s3nd1v0g1us has quit [Quit: WeeChat 2.6]
brool has joined #ruby
sandstrom has joined #ruby
sammi`_ has joined #ruby
jaequery has joined #ruby
AlHafoudh has joined #ruby
sammi` has quit [Ping timeout: 276 seconds]
sauvin has quit [Ping timeout: 268 seconds]
ALowther has quit [Remote host closed the connection]
AndreYuhai has quit [Quit: Leaving]
alfiemax has joined #ruby
Nicmavr has quit [Read error: Connection reset by peer]
alfiemax has quit [Ping timeout: 268 seconds]
Nicmavr has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
loveablelobster has joined #ruby
chalkmon1 has joined #ruby
orbyt_ has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
chalkmonster has quit [Ping timeout: 268 seconds]
AlHafoudh has quit [Ping timeout: 268 seconds]
chalkmonster has joined #ruby
chalkmon1 has quit [Ping timeout: 268 seconds]
hiroaki has joined #ruby
vrih has quit [Ping timeout: 276 seconds]
teardown has quit [Ping timeout: 264 seconds]
AlHafoudh has joined #ruby
al2o3-cr has quit [Quit: WeeChat 2.6]
RiPuk_ has joined #ruby
gheegh has joined #ruby
RiPuk has quit [Read error: Connection reset by peer]
alfiemax has joined #ruby
nima_m has joined #ruby
al2o3-cr has joined #ruby
AlHafoudh has quit [Ping timeout: 240 seconds]
Esa_ has joined #ruby
RiPuk has joined #ruby
RiPuk_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
CMoH|notebook has joined #ruby
MentalPower has joined #ruby
<CMoH|notebook> hi. i have a small redmine server running on rails, and i am bothered that every morning the server takes a long time to re-warm itself. I have found some info on this for passenger etc, but not rails. is there any magic option that prevents rails from "hibernating" this app? (I assume this is the actual issue)
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<phaul> I don't know what might be causing this, Iw ould be surprised If rails hibernated but I would start with monitoring the server load at the given time period. It might be soomething else entirely slowing the machine down. Either way I would start with measuring stuff. CPU load, memory load, disk IO, network etc and if that doesn#t help I would go deeper into DB load etc
brool has quit [Ping timeout: 276 seconds]
Technodrome has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jenrzzz has quit [Ping timeout: 268 seconds]
loveablelobster has quit [Quit: Textual IRC Client: www.textualapp.com]
vrih has joined #ruby
unreal has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
etupat has joined #ruby
greengriminal has quit [Quit: This computer has gone to sleep]
SuperLag has quit [Quit: time to kick it]
greengriminal has joined #ruby
jaequery has joined #ruby
greengriminal has quit [Client Quit]
gp has joined #ruby
jenrzzz has joined #ruby
<gp> I am trying to add a check at the top of a vagrant file to trigger proxy configuration if not connected locally... but I cannot seem to make http request tiemout with max of 1s passed
<gp> any tips/
<gp> ?
<gp> both examples seem to wait for the default timeout
etupat has quit [Remote host closed the connection]
etupat has joined #ruby
skx86 has joined #ruby
sandstrom has joined #ruby
dbugger has quit [Quit: Leaving]
schne1der has quit [Ping timeout: 240 seconds]
etupat has quit [Ping timeout: 268 seconds]
solars has quit [Quit: Connection closed for inactivity]
<gp> I posted a question on stackoverflow if you would like the credit: https://stackoverflow.com/questions/58739232/how-to-make-ruby-timeout-http-request-after-x-time-elapsed
JohanP has quit [Quit: ERC (IRC client for Emacs 26.3)]
unreal has quit [Read error: Connection reset by peer]
renich has joined #ruby
ellcs has joined #ruby
wildtrees has joined #ruby
etupat has joined #ruby
<al2o3-cr> gp: would something like this work? https://gist.github.com/gr33n7007h/d041f4fbc08f0e065854bb180330c3ac
AJA4350 has joined #ruby
<gp> al2o3-cr: YES! thank you
<al2o3-cr> gp: yw
<gp> al2o3-cr: if you want SO credit put an answer there an I will accept it right away
<al2o3-cr> gp: its okay, thanks anyway.
nima_m has quit [Quit: Connection closed for inactivity]
<gp> okay. Well thanks. I credited you on the question
<gp> rather simple problem but it stumped me lol
<al2o3-cr> gp: np ;)
jenrzzz has quit [Ping timeout: 264 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
bvdw has quit [Read error: Connection reset by peer]
bvdw has joined #ruby
cow[moo] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<CMoH|notebook> ty phaul
reber has quit [Read error: Connection reset by peer]
ellcs has quit [Ping timeout: 250 seconds]
yann-kaelig has quit [Quit: yann-kaelig]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 265 seconds]
AJA4351 is now known as AJA4350
<al2o3-cr> gp: i've updated the gist to be a little more DRY.
CMoH|notebook has quit [Quit: Konversation terminated!]
<gp> al2o3-cr: code golf!
Swyper has joined #ruby
RiPuk has quit [Ping timeout: 264 seconds]
<al2o3-cr> gp: if you'd edit on SO be appreciated ;)
<gp> will do. You made my afternoon btw =) I only deal with ruby for Vagrantfiles and I've been fooling with that for longer than I'd care to share hah
<al2o3-cr> gp: i've been there before :P
renich has quit [Ping timeout: 240 seconds]
ellcs has joined #ruby
brool has joined #ruby
dinfuehr has quit [Ping timeout: 245 seconds]
dinfuehr has joined #ruby
jenrzzz has joined #ruby
spacesuitdiver has quit [Ping timeout: 264 seconds]
Intelo has quit [Ping timeout: 240 seconds]
Intelo has joined #ruby
etupat has quit [Remote host closed the connection]
AJA4351 has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
shirak has joined #ruby
etupat has joined #ruby
bruce_lee has quit [Remote host closed the connection]
klaas has quit [Quit: ZNC 1.7.4 - https://znc.in]
al2o3-cr has quit [Quit: WeeChat 2.6]
gp_ has joined #ruby
klaas has joined #ruby
gp has quit [Ping timeout: 240 seconds]
al2o3-cr has joined #ruby
AJA4351 has joined #ruby
Swyper has quit [Remote host closed the connection]
gp has joined #ruby
spacesuitdiver has joined #ruby
AJA4350 has quit [Ping timeout: 240 seconds]
AJA4351 is now known as AJA4350
gp_ has quit [Ping timeout: 240 seconds]
ellcs has quit [Ping timeout: 264 seconds]