<seydar>
adam12: single-threaded, the program takes ~2 min. With 2 processes, the program takes >2 min
<seydar>
so that makes me think that the DB calls are not actually being processed in parallel, and that there appears to be substantial overhead in the context switching
<adam12>
seydar: I'd try turning on WAL.
<adam12>
seydar: Actually, nm. You said reads. Hmm.
<adam12>
seydar: I guess you'd have to benchmark it to see if you can see the bottleneck. Could it be IO bound?
<seydar>
adam12: it's cpu-bound
<seydar>
adam12: well i guess that answers my question
<seydar>
adam12: Because I was previously smarter than I am today, I fetched everything from the DB ahead of time
Dreeg has joined #ruby
<Dreeg>
Hi all! I'm using ruby 2.7 and encountered a problem that i didn't understand. I'm using "gsub" to substitute a regular expression in a static file but I'm stuck for strange behavior.
<Dreeg>
a = ' const match = name.match(/(\d{4}-\d{2}-\d{2})((|-)\d{2}:\d{2})/);'
<Dreeg>
"Ruby uses single quote to indicate raw string" ... uhm ... are you sure? hahahaha
jetchisel has joined #ruby
<aesthetikx>
lol if you see this %r!ftp://[^/]*/pub/! its time to give up for the day
<Dreeg>
Great! It works in the software!
<aesthetikx>
awesome
<Dreeg>
Many thanks!
<aesthetikx>
cheers
<Dreeg>
cheers!
Dreeg has quit [Quit: Client closed]
drincruz has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
drincruz has quit [Ping timeout: 268 seconds]
ua_ has quit [Ping timeout: 265 seconds]
Rounin has quit [Ping timeout: 268 seconds]
ua_ has joined #ruby
kwilczynski has quit []
lunarkitty has quit [Quit: Connection closed for inactivity]
ua_ has quit [Ping timeout: 268 seconds]
lucf117 has quit [Quit: Leaving]
drincruz has joined #ruby
drincruz has quit [Ping timeout: 265 seconds]
darkxploit has quit [Read error: Connection reset by peer]
darkxploit has joined #ruby
michigan has quit [Quit: Connection closed for inactivity]
deftclaw has joined #ruby
jmcgnh has joined #ruby
michigan has joined #ruby
<michigan>
hey uhm.. which is more proper, #{ foo } or #{foo}?
<michigan>
or which do u prefer?
<michigan>
gtg
<llua>
the latter
jetchisel has quit [Ping timeout: 252 seconds]
deftclaw has quit [Quit: Client closed]
<michigan>
llua: hmmm
<michigan>
then i shall adopt it
<michigan>
unless anybody has any objections?
<michigan>
speak now or forever hold your peace :-) please
<michigan>
i have to go. i love u guys
* michigan
kisses llua on the mouth
_ht has joined #ruby
ua_ has joined #ruby
rhe has quit [Quit: Ping timeout (120 seconds)]
rhe has joined #ruby
drincruz has joined #ruby
lunarkitty has joined #ruby
drincruz has quit [Ping timeout: 268 seconds]
pwnd_sfw has quit [Ping timeout: 265 seconds]
pwnd_sfw has joined #ruby
entel_ has quit [Quit: Connection closed for inactivity]
gr33n7007h has joined #ruby
gr33n7007h has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
gr33n7007h has quit [Read error: Connection reset by peer]
gr33n7007h has joined #ruby
michigan has quit [Quit: Connection closed for inactivity]
gr33n7001 has joined #ruby
gr33n7007h has quit [Ping timeout: 255 seconds]
gr33n7001 has quit [Ping timeout: 268 seconds]
Guest77 has joined #ruby
gr33n7001 has joined #ruby
gr33n7007h has joined #ruby
gr33n7001 has quit [Ping timeout: 252 seconds]
Rounin has joined #ruby
lunarkitty has quit [Quit: Connection closed for inactivity]
gr33n7007h has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
shokohsc has joined #ruby
menace has quit [Ping timeout: 250 seconds]
lucerne has quit [Quit: Bye]
lucerne has joined #ruby
greyrat_ has joined #ruby
greyrat has quit [Ping timeout: 240 seconds]
gr33n7007h has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
drincruz has joined #ruby
gr33n7001 has joined #ruby
gr33n7007h has quit [Ping timeout: 255 seconds]
drincruz has quit [Ping timeout: 265 seconds]
<aesthetikx>
lol michigan i thought you said you were on the east coast what are you doing up at 2:47 am
gr33n7001 has quit [Ping timeout: 268 seconds]
gr33n7001 has joined #ruby
gr33n7001 is now known as gr33n7007h
jetchisel has joined #ruby
gr33n7001 has joined #ruby
gr33n7007h has quit [Ping timeout: 246 seconds]
drincruz has joined #ruby
easbarbosa has joined #ruby
drincruz has quit [Ping timeout: 268 seconds]
easbarbosa has quit [Ping timeout: 250 seconds]
gr33n7001 has quit [Ping timeout: 268 seconds]
gr33n7001 has joined #ruby
gr33n7007h has joined #ruby
gr33n7001 has quit [Ping timeout: 255 seconds]
willow has quit [Quit: willow]
michigan has joined #ruby
<michigan>
whats up guys, was curious which one you prefer, #{ foo } or #{foo}?
<michigan>
i've always used the former but my lab partner prefers the latter and now we're fighting over which to use
<michigan>
i use [foo] however
<nakilon>
#{foo}
<nakilon>
basically put spaces only: 1. around operators 2. after ",", ";" 3. around |arg| 4. in between multiple bracket to make them read easier like when [{[({[{
<michigan>
hmmm
<nakilon>
and it's awful when people place space before { -- it has no purpose is an obvious inconsistency because after } they don't put the space when there is method chaining
<nakilon>
also why you don't put space before[ and ( ? exactly, no sense
<michigan>
true..
<michigan>
i guess i just found { more visually disturbing, like it was begging me for extra space
<michigan>
no more space for you little one, thanks nakilon
<aesthetikx>
"A #{b} c".tap { |x| x }.map(&:upcase)
<aesthetikx>
that is my preferences
<aesthetikx>
unless we are in a seattle style codebase ;) .map &:upcase
<nakilon>
seattle/google is a good one
<nakilon>
it was a pleasure discover that they write like I do and not like the 99%
<aesthetikx>
yeah its objectively more ruby like but I understand why some (most) codebases dont use it
<aesthetikx>
i only do it that way on small or personal projects when I am going for poetry
<nakilon>
why? because they had no codestyle so they have adopted the most advertised one (that was the one made by a guy with no experience)
<aesthetikx>
haha are you referring to something specific
lzap has quit [Ping timeout: 268 seconds]
<nakilon>
can't tell more
<aesthetikx>
at google are you saying?
<aesthetikx>
i didn't know they even wrote ruby over there
<nakilon>
most (if not all) of the Google Cloud SDK team is there
<aesthetikx>
in seattle? wait are you arguing for or against seattle style
<aesthetikx>
brb
<nakilon>
for
<nakilon>
in the above message with "they had no codestyle" I mean not seattle but the majority of ruby newcomers
<nakilon>
for lots of people it's either first lang or the 2nd after php
<nakilon>
at least it's what I see around
<nakilon>
at prevprevious job I was replaced by a student that didn't yet finish his study and jumper into coding in ruby "because it's the highest paid lang on market here" he said
<nakilon>
*jumped
<nakilon>
99% of IT development in Russia is making websites (half is an outsource orders from Europe) and it's shifting from php to rails, and it's cheaper to hire students, so how much experience would you expect to be put into chosing the codestyle, practices, patterns, etc.
<nakilon>
it's a huge business of paid courses since majority don't understand a single word in English and no one writes free Russian educational websites, books, etc. (the only one was in Wikibooks and no one advertises it because...) so people finish the basic school and asks parents money for a course
<nakilon>
that is usually a low effort short articles in random order and after you finish it you are kind of able to make websites that is as I said the main job here; yesterday I saw someone called his course business a "Rails faculty", like in some university _<>
bandithijo has quit [Ping timeout: 258 seconds]
<nakilon>
and since I don't want to become this narrowminded believer that programming==rails (that's really what all people here believe in) I don't do Rails, and it appears to be easier to win a jackpot than to find a job
bandithijo has joined #ruby
bandithijo has quit [Ping timeout: 268 seconds]
isekaijin has joined #ruby
gr33n7007h has quit [Ping timeout: 265 seconds]
bandithijo has joined #ruby
darkxploit has quit [Remote host closed the connection]
bandithijo has quit [Ping timeout: 268 seconds]
bandithijo has joined #ruby
gr33n7007h has joined #ruby
Guest47 has joined #ruby
Guest47 is now known as ShalokShalom
<ShalokShalom>
I am interested into code patterns and architectures, particularly in form of real world experience, that facilitate mainly functional code in Ruby.
ShalokShalom has quit [Quit: Ping timeout (120 seconds)]
Guest47 has joined #ruby
gr33n7001 has joined #ruby
gr33n7007h has quit [Ping timeout: 255 seconds]
Guest47 has quit [Quit: Client closed]
gr33n7007h has joined #ruby
gr33n7001 has quit [Ping timeout: 265 seconds]
gr33n7007h has quit [Ping timeout: 268 seconds]
gr33n7007h has joined #ruby
bandithijo has quit [Ping timeout: 256 seconds]
gr33n7001 has joined #ruby
gr33n7007h has quit [Ping timeout: 265 seconds]
gr33n7001 has quit [Ping timeout: 268 seconds]
gr33n7001 has joined #ruby
<rg1>
i use standardrb because i don't want to be a code nazi