vjacob has quit [Remote host closed the connection]
devbug has quit [Quit: ZZZzzz…]
jaguarmagenta has quit [Remote host closed the connection]
vjacob has joined #ruby
Asher has joined #ruby
mostlybadfly has joined #ruby
wrkrcoop has quit [Quit: wrkrcoop]
moeabdol3 has joined #ruby
bgmarx has quit [Remote host closed the connection]
sepp2k has quit [Quit: Leaving.]
pandaant has quit [Remote host closed the connection]
al2o3-cr1 has joined #ruby
SirOliver has joined #ruby
moeabdol3 has quit [Ping timeout: 250 seconds]
jhack has quit [Quit: jhack]
ReK2 has joined #ruby
abhinavmehta has joined #ruby
ReK2GnULinuX has quit [Ping timeout: 260 seconds]
abhinavmehta has quit [Client Quit]
al2o3-cr has quit [Ping timeout: 260 seconds]
ledestin has joined #ruby
ddffg has quit [Ping timeout: 258 seconds]
finisherr has quit [Quit: finisherr]
ry4nn has joined #ruby
Rickmasta has joined #ruby
zacts has quit [Ping timeout: 258 seconds]
agent_white has quit [Quit: leaving]
Nawn has joined #ruby
Nawn has quit [Remote host closed the connection]
kitikonti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
SirOliver has quit [Quit: ZZZzzz…]
nankyokusei has joined #ruby
Uranio has quit [Quit: Leaving]
macsteps has joined #ruby
Asher has quit [Ping timeout: 276 seconds]
nankyokusei has quit [Ping timeout: 272 seconds]
djbkd has quit [Quit: My people need me...]
jenrzzz has quit [Ping timeout: 276 seconds]
replay has quit []
chipotle has joined #ruby
smathy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zacts has joined #ruby
saneax is now known as saneax_AFK
SirOliver has joined #ruby
kab has quit [Read error: Connection reset by peer]
Asher has joined #ruby
dunpeal has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
daffy_duck_3 has quit [Ping timeout: 258 seconds]
brixen has quit [Ping timeout: 240 seconds]
mattwashere has joined #ruby
madgen has quit [Ping timeout: 264 seconds]
haydenc has joined #ruby
douglascorrea has joined #ruby
ss_much has joined #ruby
brixen has joined #ruby
Sucks has quit [Ping timeout: 264 seconds]
TheHodge has quit [Quit: Connection closed for inactivity]
SilverKey has joined #ruby
mikecmpbll has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
chipotle has quit [Quit: cheerio]
jhack has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
<zacts>
hi rubyists
bgmarx_ has joined #ruby
cyphase has quit [Ping timeout: 272 seconds]
jhack has quit [Client Quit]
marr has quit [Ping timeout: 276 seconds]
chipotle has joined #ruby
Devalo has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
chipotle has quit [Max SendQ exceeded]
al2o3-cr1 is now known as al2o3-cr
chipotle has joined #ruby
bgmarx_ has quit [Ping timeout: 258 seconds]
cyphase has joined #ruby
SilverKey has quit [Quit: Halted.]
DanKnox has quit [Quit: ZNC - 1.6.0 - http://znc.in]
dikaio has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arescorpio has joined #ruby
davedev24 has quit []
Devalo has quit [Ping timeout: 260 seconds]
macsteps has quit [Remote host closed the connection]
abhinavmehta has joined #ruby
yfeldblum has joined #ruby
abhinavmehta has quit [Client Quit]
chipotle has quit [Quit: cheerio]
yfeldblu_ has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
LoneHerm_ has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
<banisterfiend>
anyone here familiar with puma? how do i turn off the worker timeout? (for local development so i can debug during a request without the puma worker being killed)
neilvilela has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
neilvilela has joined #ruby
dunpeal has joined #ruby
KCmetro has joined #ruby
neilvilela has quit [Client Quit]
niftylettuce has joined #ruby
Hobogrammer has joined #ruby
kavanagh has joined #ruby
Mia has quit [Read error: Connection reset by peer]
KCmetro has quit [Ping timeout: 276 seconds]
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
Rodya_ has joined #ruby
madgen has joined #ruby
matp has quit [Remote host closed the connection]
ReK2 has quit [Ping timeout: 244 seconds]
ReK2 has joined #ruby
sneakerhax has quit [Quit: Back later]
govg has quit [Ping timeout: 240 seconds]
madgen has quit [Ping timeout: 250 seconds]
blackmesa has joined #ruby
AngryBuzzy has quit [Quit: This computer has gone to sleep]
<haydenc>
trying to make ruby work in windows makes me want to kill myself
<zacts>
lol
<zacts>
lol @ haydenc
blackmesa has quit [Ping timeout: 260 seconds]
bgmarx has joined #ruby
<haydenc>
is there a decent alternative to rvm for windows? since apparently rvm isn't supported on windows
<haydenc>
pik is no longer maintained
pawnbox has joined #ruby
jiblet has left #ruby [#ruby]
yoongkan_ has joined #ruby
memorasus has quit [Ping timeout: 240 seconds]
A_Drone has quit [Remote host closed the connection]
mattwashere has quit [Remote host closed the connection]
kavanagh has quit [Read error: Connection reset by peer]
yoongkan_ has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
<zacts>
haydenc: are you using cygwin, or vanilla windows?
<zacts>
and which version of windows?
AndyBotwin has joined #ruby
<haydenc>
Windows 7
<zacts>
(I didn't mean my lol to sound rude, I meant that I think we have all dealt with windows issues at one time or another)
<zacts>
but yeah. let's see
AngryBuzzy has joined #ruby
<haydenc>
yeah normally i'd tell windows to fuck off but I don't have a linux machine at home ATM (laptop died) and have a deadline for getting this small project done
<haydenc>
and i'm new to ruby so it's just more headaches there
<zacts>
sure, hope it helps, but do wait if someone has a better answer
<haydenc>
If anyone wants to help me with homework assignment I'd very very grateful. Not asking you to code anything for me, just answer questions in PM
<zacts>
I would help, but I'm working on some projects right now myself for school :-P
<haydenc>
no worries
ramfjord has quit [Ping timeout: 264 seconds]
dionysus69 has joined #ruby
JeanCarloMachado has quit [Read error: No route to host]
JeanCarloMachado has joined #ruby
bgmarx has left #ruby [#ruby]
patteh has joined #ruby
patteh_ has quit [Read error: Connection reset by peer]
chipotle has quit [Quit: cheerio]
pawnbox has quit [Ping timeout: 244 seconds]
rajs has quit [Ping timeout: 276 seconds]
nankyokusei has joined #ruby
<haydenc>
nothing works. i'm calmly pulling back the hammer on my gun and pointing it at my temple
<haydenc>
i hate this so much
daivyk has quit [Quit: Quit]
<haydenc>
sweet jesus just realized i had mint installed already on a VM
<eam>
haydenc: I'll probably answer your questions if you share them in channel
<eam>
not via pm though
<haydenc>
thank you. I was thinking PM just to avoid spamming the channel
<haydenc>
up to you though
nankyokusei has quit [Ping timeout: 276 seconds]
pawnbox has joined #ruby
patteh_ has joined #ruby
pawnbox_ has joined #ruby
aries_liuxueyang has quit [Ping timeout: 244 seconds]
patteh has quit [Read error: Connection reset by peer]
pawnbox has quit [Ping timeout: 264 seconds]
patteh has joined #ruby
patteh_ has quit [Read error: Connection reset by peer]
SilverKey has joined #ruby
ramfjord has joined #ruby
aries_liuxueyang has joined #ruby
Ropeney has joined #ruby
Guest60828 has quit [Ping timeout: 276 seconds]
epitron has quit [Ping timeout: 244 seconds]
Asher has quit [Ping timeout: 250 seconds]
ss_much has quit [Quit: Connection closed for inactivity]
rajs has joined #ruby
epitron has joined #ruby
<zacts>
haydenc: what kind of course is this, that is using Ruby?
<zacts>
:-)
Guest60828 has joined #ruby
<eam>
haydenc: won't be spam, ruby questions are why we're here - often folks can learn ruby by following along!
<zacts>
it sounds like a cool course
blackmesa has joined #ruby
cyphase has quit [Ping timeout: 272 seconds]
saneax_AFK is now known as saneax
karapetyan has joined #ruby
khizar has joined #ruby
Asher has joined #ruby
johnny56_ has quit [Ping timeout: 264 seconds]
<haydenc>
zacts: it's more of an internship really, and it's "homework" in that it's a problem that isn't really something you'd do in the real world. given as a learning exercise
techietrash has quit [Max SendQ exceeded]
techietrash has joined #ruby
johnny56_ has joined #ruby
cyphase has joined #ruby
bogdanteleaga has quit [Ping timeout: 252 seconds]
blackmesa has quit [Ping timeout: 276 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
mistergibson has quit [Read error: Connection reset by peer]
rajs_ has joined #ruby
Mia has quit [Read error: Connection reset by peer]
<zacts>
oh cool
braincras has quit [Quit: bye bye]
rajs has quit [Ping timeout: 272 seconds]
bogdanteleaga has joined #ruby
Mia has joined #ruby
Mia has quit [Changing host]
Mia has joined #ruby
ramfjord has quit [Ping timeout: 244 seconds]
<eam>
haydenc: so, what is it?
rajs_ has quit [Client Quit]
Sucks has quit [Ping timeout: 264 seconds]
govg has joined #ruby
LoneHermit has joined #ruby
daffy_duck has quit [Ping timeout: 240 seconds]
c0mrad3 has joined #ruby
c355e3b has quit [Quit: Connection closed for inactivity]
LoneHermit has quit [Ping timeout: 240 seconds]
Jayson_Virissimo has joined #ruby
alfiemax has quit [Ping timeout: 252 seconds]
aryaching has quit [Quit: Bye]
khizar has quit [Quit: Leaving]
Devalo has joined #ruby
k3rn31 has joined #ruby
jenrzzz has quit [Ping timeout: 258 seconds]
zacts has quit [Quit: WeeChat 1.4]
SilverKey has quit [Quit: Halted.]
Devalo has quit [Ping timeout: 244 seconds]
wald0 has quit [Quit: Lost terminal]
<postapocallyptic>
http://pastebin.com/4HExeUDr <--- this code doesn't output the desired results. How can I fix this?
skade has quit [Quit: Computer has gone to sleep.]
Rickmasta has joined #ruby
TomyWork has joined #ruby
xall_ has joined #ruby
mrgrieves has quit [Ping timeout: 276 seconds]
blackgoat has quit [Ping timeout: 276 seconds]
Dimik-- has quit [Ping timeout: 240 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
epitron has quit [Ping timeout: 258 seconds]
blackmesa has joined #ruby
Hounddog has joined #ruby
epitron has joined #ruby
raeoks has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has joined #ruby
atom_ has joined #ruby
Sucks has joined #ruby
tulak has joined #ruby
atom_ has quit [Client Quit]
Daneel is now known as Guest42930
Guest42930 has quit [Killed (rajaniemi.freenode.net (Nickname regained by services))]
atom_ has joined #ruby
the_drow has joined #ruby
<atom_>
Hi, I have an array of hashes and each hash has the same keys - What's the most elegant way to get a certain value from all hashes? Instead of iterating of j[0]["name"] and so on
<atom_>
I remember I saw something for this in RubyMonk but can't remember :(
beilabs_ has quit [Read error: Connection reset by peer]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
beilabs has joined #ruby
tulak has quit [Remote host closed the connection]
abhinavmehta has joined #ruby
<atom_>
Array#map is the only thing that comes to mind really
tulak has joined #ruby
haxrbyte_ has joined #ruby
tulak has quit [Ping timeout: 240 seconds]
haxrbyte has quit [Ping timeout: 240 seconds]
<Radar>
atom_: did you try map?
troulouliou_div2 has joined #ruby
roamingdog has quit [Remote host closed the connection]
mark_66 has joined #ruby
pawnbox has quit [Remote host closed the connection]
anisha has quit [Ping timeout: 260 seconds]
bused has quit [Remote host closed the connection]
<atom_>
yeah map works, I was just wondering about other possible solutions (or maybe some syntax that I don't know of)
dminuoso has quit [Quit: Lost terminal]
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beilabs has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
<shevy>
interesting that php is so high up there
minimalism has joined #ruby
A124 has quit [Ping timeout: 260 seconds]
blackmesa has quit [Ping timeout: 258 seconds]
<shevy>
worse is better stands the test of time
beilabs has joined #ruby
LoneHermit has joined #ruby
roamingdog has quit [Ping timeout: 272 seconds]
Azure has quit [Ping timeout: 272 seconds]
matp has joined #ruby
epitron has joined #ruby
LoneHermit has quit [Ping timeout: 264 seconds]
workmad3 has joined #ruby
madgen has joined #ruby
fraktalize has quit [Remote host closed the connection]
tercenya has quit [Ping timeout: 244 seconds]
der-landgraf has quit [Quit: WeeChat 1.5]
madgen has quit [Ping timeout: 264 seconds]
sdothum has joined #ruby
epitron has quit [Ping timeout: 258 seconds]
xall_ has quit [Ping timeout: 258 seconds]
mbreedlove has joined #ruby
tercenya has joined #ruby
yoongkan_ has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
spudowiar has quit [Quit: gtg]
epitron has joined #ruby
zenlot has quit [Ping timeout: 250 seconds]
xue has quit [Ping timeout: 244 seconds]
xue has joined #ruby
zenlot has joined #ruby
epitron has quit [Ping timeout: 258 seconds]
eprasad has joined #ruby
moei has quit [Quit: Leaving...]
beilabs has quit [Read error: Connection reset by peer]
mrd_ has joined #ruby
beilabs_ has joined #ruby
abhinavmehta has joined #ruby
roshanavand has joined #ruby
davee_ has joined #ruby
davee_ has quit [Remote host closed the connection]
mrd_ has quit [Client Quit]
mbreedlove has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
moei has joined #ruby
tvw has quit [Ping timeout: 250 seconds]
SirOliver has joined #ruby
tulak has joined #ruby
aspiers has quit [Ping timeout: 264 seconds]
tulak has quit [Client Quit]
c355e3b has joined #ruby
epitron has joined #ruby
conta has quit [Ping timeout: 276 seconds]
astrobun_ has quit [Remote host closed the connection]
epitron has quit [Ping timeout: 258 seconds]
astrobun_ has joined #ruby
epitron has joined #ruby
xall_ has joined #ruby
CharlesN has quit [Ping timeout: 276 seconds]
blackmesa has joined #ruby
Azure has joined #ruby
aspiers has joined #ruby
ur5us has joined #ruby
codecop has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 272 seconds]
karapetyan has joined #ruby
LoneHermit has joined #ruby
mbreedlove has joined #ruby
blackmesa has quit [Ping timeout: 240 seconds]
xue has quit [Ping timeout: 276 seconds]
bused_ has joined #ruby
bused_ is now known as bustaraz
CharlesN has joined #ruby
LoneHermit has quit [Ping timeout: 240 seconds]
Rickmasta has joined #ruby
bused has quit [Ping timeout: 240 seconds]
kedare has joined #ruby
postmodern has quit [Quit: Leaving]
xue has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
nankyokusei has quit [Ping timeout: 240 seconds]
madgen has joined #ruby
jaruga____ has quit [Remote host closed the connection]
jaruga____ has joined #ruby
KCmetro has joined #ruby
aufi has quit [Remote host closed the connection]
aufi has joined #ruby
CodeAleks has joined #ruby
minimalism has quit [Quit: minimalism]
KCmetro has quit [Ping timeout: 260 seconds]
astrobun_ has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
madgen has quit [Quit: Lost terminal]
rodfersou has joined #ruby
blackmesa has joined #ruby
platzhirsch has joined #ruby
aspiers has quit [Read error: Connection reset by peer]
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
bruce_lee has joined #ruby
hk238 has joined #ruby
killerkamel has joined #ruby
GodFather has joined #ruby
nhhc has joined #ruby
moeabdol has joined #ruby
yfeldblum has quit [Ping timeout: 258 seconds]
jmignault has joined #ruby
killerkamel has quit [Ping timeout: 250 seconds]
johnmilton has quit [Remote host closed the connection]
conta has joined #ruby
karapetyan has quit [Remote host closed the connection]
alfiemax has quit [Ping timeout: 252 seconds]
karapetyan has joined #ruby
aspiers has joined #ruby
contradictioned has quit [Read error: Connection reset by peer]
contradictioned has joined #ruby
Ishido has quit [Remote host closed the connection]
JeanCarloMachado has joined #ruby
anisha has quit [Quit: Leaving]
JeanCarloMachado has quit [Read error: Connection reset by peer]
trillozazza has joined #ruby
LoneHermit has joined #ruby
<trillozazza>
!list
moeabdol has quit [Ping timeout: 276 seconds]
<trillozazza>
!home
JeanCarloMachado has joined #ruby
beilabs_ has quit [Remote host closed the connection]
<trillozazza>
\list
beilabs has joined #ruby
<jhass>
trillozazza: can we help you with anything?
mbreedlove has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
skade has joined #ruby
alfiemax has joined #ruby
Regulati_ has joined #ruby
tvw has joined #ruby
RegulationD has quit [Ping timeout: 258 seconds]
LoneHermit has quit [Ping timeout: 272 seconds]
beilabs has quit [Ping timeout: 276 seconds]
hanmac has quit [Ping timeout: 272 seconds]
antgel has quit [Ping timeout: 240 seconds]
yardenbar has quit [Ping timeout: 240 seconds]
armyriad has quit [Ping timeout: 244 seconds]
lessless has joined #ruby
<shevy>
!cats
lessless has quit [Client Quit]
phredus has joined #ruby
ldnunes has joined #ruby
trillozazza has quit []
Asher has quit [Ping timeout: 252 seconds]
moeabdol has joined #ruby
Bish has quit [Ping timeout: 240 seconds]
Asher has joined #ruby
AlexRussia has quit [Ping timeout: 250 seconds]
jaguarmagenta has joined #ruby
mbreedlove has joined #ruby
chip_ has joined #ruby
johnmilton has joined #ruby
jaguarmagenta has quit [Ping timeout: 250 seconds]
raeoks has joined #ruby
Bish has joined #ruby
hanmac has joined #ruby
mbreedlove has quit [Client Quit]
rbaron has joined #ruby
skade has quit [Read error: Connection reset by peer]
minimalism has joined #ruby
raeoks has quit [Client Quit]
mbreedlove has joined #ruby
skade has joined #ruby
camilasan has quit [Remote host closed the connection]
armyriad has joined #ruby
raeoks has joined #ruby
camilasan has joined #ruby
skade has quit [Client Quit]
mbreedlove has quit [Ping timeout: 240 seconds]
araujo_ has quit [Quit: Leaving]
Guest69909 has joined #ruby
Guest69909 has quit [Max SendQ exceeded]
antgel has joined #ruby
chipotle has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
AlexRussia has joined #ruby
xall_ has joined #ruby
Guest69909 has joined #ruby
vondruch_ has joined #ruby
Guest69909 has quit [Max SendQ exceeded]
yardenbar has joined #ruby
Guest69909 has joined #ruby
Guest69909 has quit [Max SendQ exceeded]
Guest69909 has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
vondruch has quit [Ping timeout: 252 seconds]
Guest69909 has quit [Max SendQ exceeded]
Guest69909 has joined #ruby
Guest69909 has quit [Max SendQ exceeded]
synthroid has joined #ruby
<AndyWojo>
If I use the peach gem (parallel each) can I safely have each 'thread' write to a file at the same time?
<AndyWojo>
Or do I need to do something specia
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
karapetyan has quit [Remote host closed the connection]
c0mrad3 has quit [Quit: Connection closed for inactivity]
AngryBuzzy has joined #ruby
cd-rum has joined #ruby
<toretore>
AndyWojo: no
<ljarvis_>
AndyWojo: nope
<ljarvis_>
heh
<toretore>
all peach does is create some threads and run your code in them
<toretore>
quite useless
<toretore>
and dangerous
augcesar has joined #ruby
<AndyWojo>
So I can't just have them all write to a file? I have a 1000 files I want to loop through and append them all to one master file
<toretore>
no
<toretore>
you can't
<toretore>
if you want to use threads, create them yourself and take care of the synchronization yourself
<AndyWojo>
Ah
<toretore>
don't use peach
<AndyWojo>
Yeah, not gonna do that
<ljarvis_>
sounds like a bad idea to use threads for that kind of job
<AndyWojo>
Yeah I'll just do it serially
<toretore>
you'll probably not save much cpu time on mri anyway
<toretore>
s/cpu//
kspencer has quit [Ping timeout: 276 seconds]
czerasz has joined #ruby
<AndyWojo>
Thanks for the advice
cd-rum has quit [Ping timeout: 258 seconds]
cd-rum has joined #ruby
bkxd has joined #ruby
thoraxe has quit [Ping timeout: 264 seconds]
l4v2 has joined #ruby
umdstu has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
madsa has joined #ruby
<postapocallyptic>
hi shevy, in the code you fixed for me, on line 24 why do you call the join method right after creating a new ? and on line 28 why run the iterator even? and finally pp array_of_threads.
<postapocallyptic>
a new Thread. array_of_threads << Thread.new{ arr[$iter].print_out }.join
blackgoat has joined #ruby
zotherst1 has joined #ruby
zotherstupidguy has quit [Ping timeout: 276 seconds]
thoraxe has joined #ruby
dionysus69 has joined #ruby
nankyokusei has joined #ruby
LoneHermit has joined #ruby
vondruch_ has quit [Quit: Ex-Chat]
vondruch has joined #ruby
ur5us has quit [Remote host closed the connection]
swills has quit [Remote host closed the connection]
zotherst1 has quit [Quit: WeeChat 1.5]
<shevy>
postapocallyptic I just modified your code; as you can see when you compare to your code, the output is different
<shevy>
that time we have a collection of dead threads
<shevy>
in your case, we had nil objects
LoneHermit has quit [Ping timeout: 244 seconds]
nankyokusei has quit [Ping timeout: 240 seconds]
blackmesa has quit [Ping timeout: 272 seconds]
<madsa>
postapocallyptic, that code will create threads that run synchronously which defeats the purpose of the threads
aufi_ has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
Guest60828 has quit [Ping timeout: 276 seconds]
Ishido has joined #ruby
inukshuk_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
hahuang65 has quit [Read error: Connection reset by peer]
epitron has joined #ruby
hahuang65 has joined #ruby
GodFather has quit [Ping timeout: 240 seconds]
ramortegui has joined #ruby
aupadhye has joined #ruby
aupadhye has quit [Client Quit]
malconis has joined #ruby
malconis has quit [Remote host closed the connection]
malconis has joined #ruby
dunpeal has joined #ruby
koooge has quit [Quit: Leaving...]
greister has joined #ruby
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
desmondhume has joined #ruby
jaiks has quit [Ping timeout: 250 seconds]
greister has quit [Client Quit]
bkxd has quit [Ping timeout: 240 seconds]
edwardly has quit [Ping timeout: 244 seconds]
moeabdol has quit [Ping timeout: 244 seconds]
nadir has quit [Quit: Connection closed for inactivity]
<dminuoso>
Is there an interface an object must satisfy to be used inside Ranges?
edwardly has joined #ruby
edwardly has quit [Changing host]
edwardly has joined #ruby
dvinciguerra_ has joined #ruby
greister has joined #ruby
<Mon_Ouie>
Yes, you must implement #<=> (see Comparable) and #succ (returns the successor of the receiver)
<dminuoso>
Mon_Ouie: Ah thank you.
greister has quit [Client Quit]
greister has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
ChiefAlexander has joined #ruby
moeabdol has joined #ruby
<jhass>
the latter only if you want to actually be able to expand the range though
goeast has joined #ruby
Macaveli has joined #ruby
<dminuoso>
jhass: Well I have the need to iterate over it. That makes the need for <=> obvious.
<goeast>
Hello ! db.execute("SELECT name FROM artists ORDER BY name ASC") I would like this statement to returns an array of strings. Any hints ?
Guest60828 has quit [Ping timeout: 260 seconds]
chip_ has quit [Ping timeout: 260 seconds]
fmcgeough has joined #ruby
<jhass>
goeast: what's db?
<goeast>
database its because I have a sql database
zotherstupidguy has joined #ruby
<jhass>
no, which class
<dminuoso>
Object! :-P
* jhass
slaps dminuoso
jaiks has joined #ruby
<goeast>
def sorted_artists(db)
<goeast>
puts db.execute("SELECT name FROM artists ORDER BY name ASC")
<goeast>
end
<goeast>
(remove the puts)
blackmesa has quit [Ping timeout: 240 seconds]
<AndyWojo>
So I have a 23GB log file with 2 colums I care about, I'm looping through the file and creating a simple k => v hash (where v is an array of things). But the columns contain many of the same things, and I'm doing a .uniq after it's loaded all of the data into the array... would it be faster to not insert it into the array and check to see if the duplicate
<AndyWojo>
already exists?
aegis3121 has joined #ruby
<manveru>
goeast: where does the `db` variable come from?
<AndyWojo>
Also, I'm loading the file into an array to loop over by doing %x[cat file].split("\n"), I'm thinking that's also bad.
<manveru>
goeast: do you use sequel or activerecord?
<goeast>
sqlite3
<goeast>
no activerecord
Guest60828 has joined #ruby
<manveru>
ok
<dminuoso>
AndyWojo: First, use File.readlines
<manveru>
and what does it return right now?
<goeast>
should return something like this ["A Cor Do Som", "AC/DC"]
<AndyWojo>
Okay
<dminuoso>
AndyWojo: That will avoid a bizarre shell command/output/split logic.
madsa has quit [Ping timeout: 276 seconds]
<goeast>
["A Cor Do Som"], ["AC/DC"],
<AndyWojo>
is it quicker to check to see if an array already has an element before inserting or just inserting and doing a uniq at the end?
<jhass>
do you understand why some_hash.has_key? "foo" is faster than some_hash.keys.include? "foo" ?
desmondhume has quit [Remote host closed the connection]
skade has quit [Client Quit]
<AndyWojo>
I do not, I am a newbie.
desmondhume has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<jhass>
do you understand hashtables?
<AndyWojo>
I understand the concept
<jhass>
Set is an abstraction over Hash, it uses its keyset to implement the set, so effectively a hashtable
<AndyWojo>
gotcha, that makes sense
<AndyWojo>
so.. it's a structured 'indexed' array?
<AndyWojo>
Kind of?
blackgoat has quit [Quit: WeeChat 1.5]
xall_ has quit [Ping timeout: 260 seconds]
<jhass>
eh, probably the right thing in your head but the terms used make me say no
gregf has quit [Quit: WeeChat 1.5]
desmondhume has quit [Ping timeout: 240 seconds]
vuoto has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
Rickmasta has joined #ruby
vuoto has joined #ruby
<AndyWojo>
Sure, in my head it makes sense. but the terms are probably definitely wrong
killerkamel has joined #ruby
<AndyWojo>
I use ruby purely from a sysadmin perspective, so I probably learned a lot of things wrong
gregf has joined #ruby
<ljarvis_>
question: why Ruby?
<ljarvis_>
you're processing a 23gb file, ruby is the last thing in my toolbox I'd want to use
trifling-jest has joined #ruby
desmondhume has joined #ruby
SirOliver has quit [Quit: ZZZzzz…]
SirOliver has joined #ruby
<AndyWojo>
Well at this point I'm extremely comfortable with ruby, even more so then bash (except for fringe cases with large data sets)
<AndyWojo>
I do want to learn python
<AndyWojo>
but I find it obtuse compared to Ruby
Guest60828 has quit [Ping timeout: 276 seconds]
GodFather has joined #ruby
<ljarvis_>
ah fair enough
<ljarvis_>
do you know any other languages?
elaptics`away is now known as elaptics
<jhass>
for a task like this python won't be significantly faster anyhow
jenrzzz has quit [Ping timeout: 276 seconds]
<AndyWojo>
Bash, some perl,
SirOliver has quit [Client Quit]
<AndyWojo>
I converted over to each_line and using sets, and the script is no longer locking my workstation up, so that's good
<ljarvis_>
it's a log file, you say?
<Papierkorb>
tbh, sounds like a good fit for a shell pipeline out of cut, sed and sort -u
<ljarvis_>
yeah bash tools would be way better imo, but still
<AndyWojo>
Yeah it's 23 GB of http logs. I'm looping through them and finding all of the users and URLs each user goes to (no dupes) and creating a CSV with user,url
<ljarvis_>
ruby will be all "oh hey bud lemme take all this memory off your hands"
<AndyWojo>
haha, true
<ljarvis_>
that's intense
<ljarvis_>
what format is the log in?
<AndyWojo>
I'm running it with time, we'll see how long it takes
<AndyWojo>
So I'm doing a split on each line for the user[2] and the url[6]
<ljarvis_>
so you're just doing line.split(" ") or something?
<Papierkorb>
AndyWojo: `cut` to the rescue
mattwash_ has joined #ruby
<ljarvis_>
heh :)
mattwashere has quit [Read error: Connection reset by peer]
<AndyWojo>
yup
<AndyWojo>
I'll write it in bash, and compare the times
<ljarvis_>
honestly it's probably a relatively simple one liner
A124 has joined #ruby
zotherst1 has joined #ruby
<ljarvis_>
but I'm not sure of the specifics so can't say for sure
<Papierkorb>
AndyWojo: cut -d' ' -f3,8|sort -u
Guest60828 has joined #ruby
ChiefAlexander has joined #ruby
<ljarvis_>
right, something like that, then you could re-join and spit out a CSV
macsteps has joined #ruby
<ljarvis_>
then bill for 1 days work
abhinavmehta has joined #ruby
<shevy>
are we getting rich again here
<Papierkorb>
just |sed 's/ /;/' :P
<AndyWojo>
oh sure
* shevy
feels excited!
<AndyWojo>
however
<ljarvis_>
; pff
<AndyWojo>
you're missing the part where I am a ruby newbie, and I now learned some valuable lessons about sets and f.each_lines
<AndyWojo>
:P
<ljarvis_>
that's true, success
zotherstupidguy has quit [Ping timeout: 244 seconds]
<ljarvis_>
now put the ruby down and use something better :D
<Papierkorb>
AndyWojo: And you learned about a use-case where ruby (nor any other language/toolkit which pulls the file into RAM as a whole) does not excel :3
<AndyWojo>
I bet, I could probably find the open file and see where the read position is in the 23GB file to see how far ruby has gotten
madsa has joined #ruby
<ljarvis_>
you'll probably be able to see at a glance how bit your set is in memory
SirOliver has joined #ruby
cdg has joined #ruby
tvw has quit [Remote host closed the connection]
macsteps has quit [Remote host closed the connection]
SirOliver has quit [Client Quit]
SirOliver has joined #ruby
the_drow has joined #ruby
lessless has joined #ruby
Ishido has quit [Ping timeout: 260 seconds]
alfiemax has joined #ruby
TomyWork has quit [Ping timeout: 276 seconds]
<dminuoso>
Hash[*[:house_number, :house_number_addon].zip(str.match(/\A#{PATTERN}\z/x)[1..2]).flatten] # I just noticed I still have this in my code. Would you say that I should make this more readable?
jaguarmagenta has quit [Remote host closed the connection]
Ishido has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
zacstewart has quit [Quit: Lost terminal]
SirOliver has quit [Quit: ZZZzzz…]
davedev24 has joined #ruby
daffy_duck has joined #ruby
Bish has quit [Read error: Connection reset by peer]
zacstewart has joined #ruby
Bish has joined #ruby
kaleido has joined #ruby
jhack has joined #ruby
<ljarvis_>
yes
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ChiefAlexander has quit [Remote host closed the connection]
trifling_jest2 has joined #ruby
CybrGhost has joined #ruby
Jet4Fire has joined #ruby
<ljarvis_>
>> m = "14 something".match(/\A(?<house_number>\S+)\s(?<house_addon>\S+)\z/); m.names.zip(m.captures).to_h
ljarvis_ is now known as ljarvis
<ljarvis>
ffs
<ljarvis>
>> m = "14 something".match(/\A(?<house_number>\S+)\s(?<house_addon>\S+)\z/); m.names.zip(m.captures).to_h
bhrgunatha has quit [Quit: ChatZilla 0.9.92 [Firefox 47.0.1/20160630070928]]
polishdub has joined #ruby
Terens has joined #ruby
underplank has joined #ruby
pawnbox has quit [Remote host closed the connection]
isberg has joined #ruby
pdoherty has quit [Ping timeout: 276 seconds]
SilverKey has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
mostlybadfly has quit [Quit: Connection closed for inactivity]
mark_66 has quit [Quit: Leaving.]
ChiefAlexander has joined #ruby
shinnya has joined #ruby
conta has quit [Ping timeout: 258 seconds]
pawnbox has joined #ruby
<jhass>
?vagrant
<ruby[bot]>
please join #vagrant for help with it.
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tmtwd has joined #ruby
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
dminuoso has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
Ishido has joined #ruby
underplank has quit [Quit: underplank]
pawnbox has joined #ruby
unreal_ has joined #ruby
jaguarmagenta has joined #ruby
jishankai has quit [Ping timeout: 244 seconds]
kab has quit [Quit: Leaving]
renier has joined #ruby
unreal has quit [Ping timeout: 272 seconds]
jordanm has joined #ruby
blackmesa has joined #ruby
Bounga has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
lxsameer has quit [Ping timeout: 250 seconds]
chipotle has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
<dunpeal>
Truffle Ruby seems to perform really well: over 30 times faster than MRI according to this benchmark: http://jruby.org/bench9000/
<dunpeal>
Have people started using it in production?
<chrisseaton>
I wouldn't recommend using it in production yet - we don't have things like openssl yet
bustaraz has joined #ruby
<dunpeal>
chrisseaton: any estimate on when we should take a serious look at potentially deploying it?
<chrisseaton>
Maybe the first half of next year
<chrisseaton>
But if you tell me what your app does and what libraries you use I can say if there's any blockers on that
aganov has quit [Quit: Leaving]
<chrisseaton>
We're working on a system to test all gems on JRuby+Truffle, so we can tell you if your app should work based on your dependencies
<dunpeal>
That's great, but the main app is Rails (with a ton of Ruby and Rails gems), so probably not the most obvious first candidate.
blackmesa has quit [Ping timeout: 250 seconds]
<dunpeal>
Truffle Ruby doesn't run Rails yet, right?
chipotle_ has joined #ruby
chipotle_ has quit [Max SendQ exceeded]
davedev24 has quit [Read error: Connection reset by peer]
<chrisseaton>
We pass all of the ActiveSupport, ActiveModel and most of the ActionPack specs, so we're getting there quickly
jaguarmagenta has quit [Remote host closed the connection]
davedev24 has joined #ruby
dennisvennink has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<chrisseaton>
ActiveView and Railties basically work, but not all the specs pass
<chrisseaton>
But we pass more language specs than JRuby or Rubinius do
GNUYawk has joined #ruby
tmtwd has quit [Ping timeout: 272 seconds]
<dunpeal>
Also, is the x30 figure at all accurate? Because if so, it's going to launch Ruby to a whole new performance class. x30 MRI would make Ruby faster than pretty much all dynamic languages, even those running on state-of-the-art JITs like V8. In fact, it should make Ruby competitive against Java HotSpot for speed.
Vingador has joined #ruby
chipotle has quit [Ping timeout: 264 seconds]
<chrisseaton>
dunpeal: well they're accurate for those benchmarks
<chrisseaton>
I'm not sure how much faster an off the shelf Rails app is going to be
<dunpeal>
right, but how representative are those benchmarks.
chipotle has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<chrisseaton>
But Truffle does best on programs with lots of small intermediate arrays and hashes and lots of string concat, and that's what Rails apps do
<chrisseaton>
dunpeal: most of those benchmarks are from ChunkyPNG and PSD.rb, which are really gems people are running in production today
<jhass>
how much more memory do you use compared to MRI?
<dunpeal>
OK, that's promising then. FWIW, if Ruby does get an x30 speedup, Rails speed matters less, because Ruby will start being used for tasks you'd use Java/C++ right now.
Guest-ru has joined #ruby
<chrisseaton>
jhass: I don't have numbers against MRI, but let me just check out CI which compares against JRuby...
<chrisseaton>
jhass: we use about 3x the heap that JRuby uses
<jhass>
Thanks, I have to admit I never looked up for JRuby, do you have MRI vs JRuby at hand?
<chrisseaton>
Sorry, it's very hard to measure that
<chrisseaton>
You can't just compare RSS, because the way that the JVM works is it will use as much heap as you give it
<jhass>
just curious about ballparks, about the same, twice as much?
<chrisseaton>
Maybe 4 or 5x at the moment?
<jhass>
I see
<chrisseaton>
So yeah, you may need a larger instance, but you should be able to serve many more requests much quicker with that bigger instnace
<jhass>
does the JVM ever give back to the OS?
<chrisseaton>
You mean if you have a surge and then it goes back down? Sorry I don't know
<jhass>
yeah
<jhass>
I know MRI doesn't and it's something I hate about it
<chrisseaton>
tenderlove was making fun a while ago of a comment I made about how adding more memory to a server is easy. My argument is that at the moment how can you reduce the response time for individual customers?
<chrisseaton>
You can't buy a faster processor, as we don't really have those any more
<chrisseaton>
You can't use more than one processor or core for a single request, as we can't program that well to do that
<chrisseaton>
The only degree of freedom you have is you can add more RAM - you can add as many GB of RAM as you want
<chrisseaton>
It scales perfectly
edwinvdgraaf has quit [Ping timeout: 272 seconds]
<chrisseaton>
So let's use that RAM to improve the performance of Ruby
<Papierkorb>
well, RAM, while getting much cheaper, is still finite
<chrisseaton>
What I hope to do in the future is to run web request benchmarks on different size droplets and AWS instances, and say on each instance how much faster it is, or if the instance is too small
<jhass>
yes, that argument is good for the company/commercial perspective
<Papierkorb>
The box my private stuff runs on has 16GiB of memory, but those have to last for more things than just one of my ruby apps
<jhass>
it's a sad viewpoint for the CLI app, desktop app or self hosted movement perspective
<chrisseaton>
Papierkorb: well servers that large are fine - it's the people running 512 MB DO droplets who may be disappointed the Truffle probably won't run fast there
DoubleMalt has joined #ruby
KCmetro has joined #ruby
<Papierkorb>
chrisseaton: I also want to spend less than those 512MiB of memory for a single app :3
<chrisseaton>
I guess if Ruby is too slow for you, you're probably already running on many DO droplets, and we'd say that Truffle will make it fast, but you might need just one bigger droplet
<Papierkorb>
under load, the I/O bound app I'm working on atm peaks at 350MiB, after which it goes down to 190MiB again. MRI 2.3
<Papierkorb>
Not too slow, fast enough. But faster is always better :)
<chrisseaton>
Truffle uses a lot of memory to compile, but the other side of it is when the compiled code runs it uses much less memory. So hopefully for lots of concurrent clients it will balance out
rodfersou is now known as rodfersou|lunch
<chrisseaton>
Eg a Rails view will allocates MB of heap for each request normally could run allocating hardly anything after our optimisations, so actually save heap
<Papierkorb>
If one could precompile that stuff, so the daemon process would save some of that memory, it #would be a non-issue
xall_ has joined #ruby
govg has quit [Ping timeout: 276 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
cleopatra has quit [Read error: Connection reset by peer]
harfangk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
vondruch has quit [Ping timeout: 276 seconds]
Vingador has quit [Remote host closed the connection]
Vingador has joined #ruby
[Butch] has joined #ruby
blaxter has joined #ruby
sepp2k has joined #ruby
abhinavmehta has joined #ruby
jenrzzz has joined #ruby
mattwash_ has quit [Remote host closed the connection]
Rickmasta has joined #ruby
Wildfyr has joined #ruby
Wildfyr has left #ruby [#ruby]
abhinavmehta has quit [Client Quit]
skade has joined #ruby
skade has quit [Client Quit]
ledestin has joined #ruby
aryaching has quit [Ping timeout: 252 seconds]
dennisvennink has joined #ruby
aufi_ has quit [Ping timeout: 264 seconds]
amclain has joined #ruby
cdg has quit [Remote host closed the connection]
zacts has joined #ruby
Rutix has joined #ruby
Rutix has quit [Changing host]
Rutix has joined #ruby
ruby-lang921 has joined #ruby
spudowiar has joined #ruby
platzhirsch has quit [Quit: WeeChat 1.4]
roshanavand has quit [Ping timeout: 250 seconds]
Couch has quit [Ping timeout: 264 seconds]
Coldblackice_ has joined #ruby
kedare has quit [Quit: Leaving]
FooMunki has joined #ruby
roamingdog has quit [Remote host closed the connection]
pdoherty has joined #ruby
banisterfiend has joined #ruby
madsa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
atom_ has quit [Quit: WeeChat 1.5]
bustaraz has quit []
<xpitr>
mri, jruby and rbx are about the only usable versions right?
aegis3121 has quit [Ping timeout: 276 seconds]
ruby-lang921 has quit [Quit: Page closed]
blaxter has quit [Quit: foo]
zacts has quit [Quit: WeeChat 1.4]
blackmesa has joined #ruby
harfangk has joined #ruby
beilabs has joined #ruby
<dunpeal>
people are using RBX?
blackmesa has quit [Ping timeout: 260 seconds]
<dunpeal>
chrisseaton: also, it's weird to me that Truffle already passes motr languages specs than older implementations that are considered more mature, like JRuby and Rubinius.
<dunpeal>
s/motr/more/
blackmesa has joined #ruby
kaleido has left #ruby [#ruby]
<xpitr>
i used it until at some point i realized mri is faster... much faster :P
<dunpeal>
Yeah, I'm not really sure what the status of that project is any more. Originally it was supposed to be a fast JITing VM for Ruby, something like V8. Since it's not faster, nor complete, what's its purpose at this stage?
<chrisseaton>
dunpeal: not all the language specs make a lot of sense but we did them all to show we could
GodFather has quit [Ping timeout: 264 seconds]
<chrisseaton>
dunpeal: I don't think rubinius has a JIT any more, and I never found it be very fast even when it did
ledestin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dunpeal>
chrisseaton: aren't the specs a bit broken if Truffle currently passes them all, yet some pure-Ruby applications are still breaking on it?
senayar has quit []
andikr has quit [Remote host closed the connection]
<xpitr>
it has no jit? then what does it have?
Bounga has quit [Ping timeout: 240 seconds]
<xpitr>
i thought thats the whole idea
<xpitr>
well, real threads are nice :)
<dunpeal>
xpitr: it used to be, but they never got it right. I don't think Rubinius is a viable contender anymore. their current homepage has one mention of actual real-world usage, and otherwise just "Testimonials" from Darth Vader and Gandalf
jenrzzz has quit [Ping timeout: 272 seconds]
xall_ has joined #ruby
<xpitr>
i see. it is pretty impressive, never had any problems with any app on it. unlike jruby
czerasz has quit [Quit: Ex-Chat]
<dunpeal>
Getting JIT right his harder than it seems. Google had a project to do it for Python, and failed. The only reason V8 succeeded is they got a whole bunch of senior engineers who previously worked on Hotspot, and Self before that.
boogeyman has joined #ruby
vuoto has quit [Remote host closed the connection]
<xpitr>
it would be neat if we could just directly run ruby apps on nodejs, via opal :P
<xpitr>
but i don't think thats possible
moeabdol has quit [Ping timeout: 244 seconds]
xall_ has quit [Ping timeout: 240 seconds]
<xpitr>
also looking at rvm list known, checked all. goruby is the most sad one i think
<xpitr>
anyways guess i'll just stick to mri, its so good and fast these days :)
AgentVenom has joined #ruby
<dunpeal>
uhm, it's not really fast :)
Ishido has quit [Remote host closed the connection]
mattwashere has joined #ruby
<xpitr>
ok, its fast enough :P
binaryplease has joined #ruby
SCHAAP137 has joined #ruby
<dunpeal>
"fast enough" doesn't really exist. there's many tasks that need to be as fast as possible. for example, processing records.
whathappens has joined #ruby
diegoviola has joined #ruby
nankyokusei has joined #ruby
<xpitr>
so what other option do we have? jruby-somethingsomething-trouffle?
Ishido has joined #ruby
tjbiddle has joined #ruby
beilabs has quit [Remote host closed the connection]
beilabs has joined #ruby
<dunpeal>
well, for now, a lot of people are simply using other languages for these tasks. if JRuby-Truffle ultimately becomes x30 times faster than MRI, or even "just" x10 times, Ruby will become a viable alternative for those tasks. Which is pretty huge.
<dunpeal>
xpitr: for a bit of perspective: most of Ruby's usage nowadays is for RoR. I suspect performance issues are a major reason for that.
<xpitr>
right. no one writes a game in ruby
<chrisseaton>
dunpeal: no because there's also core library specs and we don't pass all of them
harfangk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jenrzzz has joined #ruby
nankyokusei has quit [Ping timeout: 276 seconds]
<dunpeal>
xpitr: right. So if JRuby-Truffle accelerates Ruby to the same ballpark as say Java, then Ruby's usage in all these other areas would skyrocket. that would easily be the most important development for Ruby since it was created. in fact, if the benchmarks are any indication, it would be a major event for dynamic languages as a whole, not just Ruby.
<xpitr>
i think even then it might take some time for people to drop the "ruby is slow" mantra
beilabs has quit [Ping timeout: 250 seconds]
<Papierkorb>
java is slow too. they never got rid of that mantra. In fact, Java is fast, except for some cases which are important to some people
<xpitr>
uh and also comparing to java will not help that, "java is slow" is everywhere :P
<Papierkorb>
Like GUI tools
<xpitr>
start time is unacceptably slow, even if its close to native performance in processing stuff
<xpitr>
and gui looks horrible
tycoon177 has joined #ruby
<xpitr>
looks bad across all platforms
<Papierkorb>
Yes, for gui tools, java is: Code once, runs and looks like shit everywhere
<chrisseaton>
We're solving the Java startup time by having a statically compiled version of JRuby Truffle so there no need to have a JVM installed even
skweek has quit [Ping timeout: 260 seconds]
<dunpeal>
that's amazing
<xpitr>
how big is it?
beilabs has joined #ruby
<dunpeal>
chrisseaton: but how would importing libaries work without a JVM?
zacts has joined #ruby
tercenya has quit [Ping timeout: 276 seconds]
jenrzzz has quit [Ping timeout: 272 seconds]
devbug has joined #ruby
rodfersou|lunch is now known as rodfersou
aryaching has joined #ruby
cdg has joined #ruby
Snowy has quit [Quit: ragequit]
Cohedrin has joined #ruby
xall_ has joined #ruby
abhinavmehta has joined #ruby
mbreedlove has joined #ruby
abhinavmehta has quit [Client Quit]
replay has joined #ruby
nerium has quit [Quit: nerium]
zacts_pi has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mbreedlove has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cdg has quit [Ping timeout: 258 seconds]
nbg has joined #ruby
zacts has quit [Ping timeout: 244 seconds]
FooMunki has quit [Quit: FooMunki]
jaruga____ has quit [Quit: jaruga____]
mbreedlove has joined #ruby
elaptics is now known as elaptics`away
aryaching has quit [Ping timeout: 272 seconds]
desmondhume has quit [Remote host closed the connection]
mbreedlove has quit [Max SendQ exceeded]
lxsameer has joined #ruby
mbreedlove has joined #ruby
harfangk has joined #ruby
yoongkan_ has quit [Remote host closed the connection]
madsa has joined #ruby
ur5us has joined #ruby
nettoweb has joined #ruby
Regulati_ has quit [Remote host closed the connection]
govg has joined #ruby
tercenya has joined #ruby
gizmore has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
ur5us has quit [Ping timeout: 244 seconds]
Hounddog has quit [Ping timeout: 272 seconds]
jenrzzz has joined #ruby
rcvalle has joined #ruby
aegis3121 has joined #ruby
kitikonti has joined #ruby
macsteps has joined #ruby
spudowiar has quit [Quit: gtg]
tercenya has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
klaas has joined #ruby
jmignault has quit [Remote host closed the connection]
<chrisseaton>
It's a few hundred MB for the standalone binary
<chrisseaton>
You compile in any Java libraries you need, but you can load C exts at runtime
tercenya has joined #ruby
Vingador has quit [Read error: Connection reset by peer]
aegis3121 has quit [Ping timeout: 276 seconds]
hutch34 has joined #ruby
Snowy has joined #ruby
nettoweb has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
douglascorrea has quit [Read error: Connection reset by peer]
tvon has joined #ruby
douglascorrea has joined #ruby
FooMunki has joined #ruby
Rickmasta has joined #ruby
SilverKey has quit [Quit: Halted.]
tvon has quit [Client Quit]
devbug has quit [Quit: ZZZzzz…]
aegis3121 has joined #ruby
xall_ has quit [Ping timeout: 252 seconds]
firstdayonthejob has quit [Quit: WeeChat 1.5]
zacts_raincity has joined #ruby
firstdayonthejob has joined #ruby
devbug has joined #ruby
zacts_pi has quit [Ping timeout: 250 seconds]
skade has joined #ruby
zacts has joined #ruby
mattwashere has quit [Remote host closed the connection]
Silthias1 has quit [Quit: Leaving.]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mattwashere has joined #ruby
zacts_raincity has quit [Ping timeout: 240 seconds]
<micalexander>
If I am building an app and would like to use helpers from another gem say middleman. How could I pull it in to be able to use it. I am trying to use the helper link_to
nadir has joined #ruby
araujo has quit [Ping timeout: 258 seconds]
dionysus69 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nankyokusei has joined #ruby
isberg has quit [Quit: I'm out]
jackjackdripper has joined #ruby
miqlas-H has joined #ruby
jeremyhall has joined #ruby
<hellcode>
anyone here has used any of the pcap libraries available in gems?
abhinavmehta has joined #ruby
zacts has joined #ruby
nankyokusei has quit [Ping timeout: 272 seconds]
abhinavmehta has quit [Client Quit]
macsteps has joined #ruby
kirun has joined #ruby
chipotle has joined #ruby
karapetyan has quit [Remote host closed the connection]
GinoMan2440 has joined #ruby
<micalexander>
never mind, seem to have got it
macsteps has quit [Ping timeout: 250 seconds]
micalexander has quit [Quit: Leaving...]
jaruga___ has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jaruga___ is now known as jaruga____
johnmilton has quit [Remote host closed the connection]
mdw has quit [Quit: Sleeping Zzzzz]
yardenbar has joined #ruby
douglascorrea has joined #ruby
conta has joined #ruby
desmondhume has quit [Remote host closed the connection]
desmondhume has joined #ruby
Rickmasta has joined #ruby
conta has quit [Ping timeout: 264 seconds]
desmondhume has quit [Ping timeout: 240 seconds]
mbreedlove has quit [Ping timeout: 272 seconds]
jaruga____ has quit [Quit: jaruga____]
troulouliou_div2 has joined #ruby
wrkrcoop has joined #ruby
whathappens has joined #ruby
<wrkrcoop>
so i have to build this retry mechanism that publishes a message to sqs if it hasn’t been retried <3 times
Coldblackice_ has quit [Ping timeout: 240 seconds]
mbreedlove has joined #ruby
<havenwood>
wrkrcoop: Nope! Do you just want to return from the method if the if statement condition isn't met?
<wrkrcoop>
havenwood: mm i want to send it to the dead letter queue
<wrkrcoop>
so i want to call the method that sends it to the DLQ
jhack has joined #ruby
mbreedlove has quit [Max SendQ exceeded]
araujo__ has joined #ruby
mbreedlove has joined #ruby
yardenbar has joined #ruby
<havenwood>
wrkrcoop: In your example you're not calling the method with a block, so your `yield` will result in a: LocalJumpError: no block given (yield)
mbreedlove has quit [Max SendQ exceeded]
<wrkrcoop>
havenwood: yeah, so if i want to call a method if the condtion is not true, and i want the user to decide what method that is, how should i go about that? use procs?
vuoto has quit [Remote host closed the connection]
mbreedlove has joined #ruby
aegis3121 has joined #ruby
czk has quit [Ping timeout: 240 seconds]
vuoto has joined #ruby
jaguarmagenta has quit [Remote host closed the connection]
araujo_ has quit [Ping timeout: 276 seconds]
mbreedlove has quit [Max SendQ exceeded]
jeremyhall has joined #ruby
lunaelli has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
<havenwood>
wrkrcoop: Do you want to invoke the method with a mandatorily-provided block to be called in the `else` case?
beilabs has quit [Remote host closed the connection]
killerkamel has quit [Ping timeout: 244 seconds]
<wrkrcoop>
havenwood: i dont think so if i understand the question, i just want to call a user defined method
beilabs has joined #ruby
<havenwood>
wrkrcoop: Does it suffice to just pass a symbol corresponding to the method to be called?
<wrkrcoop>
havenwood: idk, i was wondering the same thing
<havenwood>
wrkrcoop: It does suffice.
Coldblackice_ has joined #ruby
<wrkrcoop>
haha
<wrkrcoop>
so i pass the method name like this :dead_letter_queue
<havenwood>
wrkrcoop: yeah, you can just call a method if you know what the method is to be
<havenwood>
wrkrcoop: I thought you were trying to have the invoker of the method provide the method to then be called. If you know what you're calling, just do it! :-)
beilabs has quit [Ping timeout: 276 seconds]
vuoto has quit [Remote host closed the connection]
pawnbox has quit [Remote host closed the connection]
<wrkrcoop>
yeah, i want to call the method with a hash as an argument and one of the key’s values to be the method
<wrkrcoop>
name
vuoto has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
Asher has quit [Quit: Leaving.]
Xiti has quit [Quit: Xiti]
spudowiar has quit [Quit: Leaving.]
Authenticator has joined #ruby
Xiti has joined #ruby
dennisvennink has joined #ruby
Asher has joined #ruby
abhinavmehta has joined #ruby
mbreedlove has joined #ruby
tercenya has quit [Ping timeout: 244 seconds]
davedev24 has quit [Read error: Network is unreachable]
abhinavmehta has quit [Client Quit]
vuoto_ has joined #ruby
blackmesa has quit [Quit: WeeChat 1.5]
karapetyan has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto_ has quit [Remote host closed the connection]
davedev24 has joined #ruby
Coldblackice_ has quit [Ping timeout: 252 seconds]
<wrkrcoop>
how do i get around that? pass it as a symmbol?
<havenwood>
>> def say word; word end; arg = :say; public_method(arg).call('wrkrcoop')
<ruby[bot]>
havenwood: # => method `say' for class `#<Class:#<Object:0x41ea5344>>' is private (NameError) ...check link for more (https://eval.in/609603)
JeanCarloMachado has quit [Ping timeout: 258 seconds]
KCmetro has quit [Remote host closed the connection]
<wrkrcoop>
what do you think of my code?
yoongkan_ has joined #ruby
<wrkrcoop>
ill change last_resort to something else
<havenwood>
wrkrcoop: Yeah, just showing you #method because you can do more this it and I'm not sure what you're actually doing from glancing at your code. #public_send or #send if you actually want to call private methods might be what you're looking for.
<Authenticator>
I'm using Net::Ping::External to ping my servers and I'm getting odd results trying to run a bunch at once.
<spudowiar>
hmm, I want to do something really "evil" here
<spudowiar>
Well, not evil
<spudowiar>
But anyhow
KCmetro has joined #ruby
<spudowiar>
I want to intercept the pipe operator in all uses
<Authenticator>
I had to modify the gem to call thread.exitstatus.value to prevent it from finishing too quickly. As if it's not waiting after stdin.close ...
<spudowiar>
e.g. for any object
<spudowiar>
And check if the operand is a certain type
Rodya_ has joined #ruby
<spudowiar>
If so, do something, else fallback to the old pipe operator
<havenwood>
wrkrcoop: Just for fun, currying: def consider greeting, name; "#{greeting} #{name}!" end; provide_a_name = method(:consider).curry(2).call 'Hiya'; provide_a_name.call 'wrkrcoop'
<wrkrcoop>
what is that?
tmtwd has quit [Ping timeout: 272 seconds]
<spudowiar>
Essentially, I want to override a binary operator for the second operand, rather than the first as is usual.
<havenwood>
wrkrcoop: Or you can do like: method(:say).owner
<havenwood>
wrkrcoop: Or: method(:say).parameters
nanoz has quit [Read error: Connection reset by peer]
<wrkrcoop>
do those pass the params to the say method?
KCmetro has quit [Read error: Connection reset by peer]
<havenwood>
wrkrcoop: But in your case you'll probably just want to #send or #public_send. Try em in your REPL!
SilverKey has quit [Quit: Halted.]
ChiefAlexander has quit [Remote host closed the connection]
<wrkrcoop>
i AM
yoongkan_ has quit [Ping timeout: 240 seconds]
<havenwood>
wrkrcoop: Just try `send` and see if it works for you. I'd encourage exploring Method in Pry though! :-)
<havenwood>
Authenticator: Are you joining the threads in the main process?
doublemalt_ has joined #ruby
openstruct has quit []
mtkd has quit [Ping timeout: 276 seconds]
banisterfiend has joined #ruby
mbreedlove has joined #ruby
toretore has quit [Ping timeout: 240 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
blackgoat has joined #ruby
mtkd has joined #ruby
RegulationD has quit [Remote host closed the connection]
conta has quit [Ping timeout: 264 seconds]
rodfersou is now known as rodfersou|afk
<wrkrcoop>
yeah send works
mbreedlove has quit [Client Quit]
DoubleMalt has quit [Ping timeout: 252 seconds]
ChiefAlexander has joined #ruby
dhollinger has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
<wrkrcoop>
havenwood: i feel like this isn’t good enough because i’m forcing the user to always accept message[“body”] as an argument …
<havenwood>
Authenticator: "Any threads not joined will be killed when the main program exits."
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
dhollinger has joined #ruby
solars has joined #ruby
<wrkrcoop>
havenwood:
vuoto has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
binaryplease has quit [Quit: Goodbye cruel world]
<spudowiar>
Anyone got any ideas for me?
mattwashere has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
mattwashere has joined #ruby
swills has quit [Ping timeout: 240 seconds]
mbreedlove has joined #ruby
irregular has joined #ruby
skade has joined #ruby
<irregular>
hi guys, I have res = JSON.parse(response.body)\n if res.dig("id") != null then ??? end
<irregular>
what is this .dig method ?
<irregular>
I get no implicit conversion of String into Integer (TypeError) on the line with res.dig
tacit7 has quit [Remote host closed the connection]
<jhass>
sounds like you got an array where you expected a hash
skade has quit [Client Quit]
<jhass>
dig with a single argument is fairly pointless though
mbreedlove has quit [Client Quit]
JeanCarloMachado has quit [Ping timeout: 258 seconds]
JeanCarloMachado has joined #ruby
<irregular>
jhass:indeed I think that's it, actually the next line is elseif res.dig("data", 0) != nil then ??? but I'll have to look into this error first
Raj_ has joined #ruby
mustmodify has joined #ruby
<irregular>
trying to account for multiple response body types (which come back after a request to a rest api)
roamingdog has joined #ruby
JakFrist has joined #ruby
<mustmodify>
Here's what would make me really happy.
roamingdog has quit [Remote host closed the connection]
<Authenticator>
havenwood: I was just closing stdin, assuming that would thread.join, but it doesn't seem to...
wrkrcoop has quit [Quit: wrkrcoop]
<jhass>
mustmodify: in crystal you could write a macro to almost do that :P
hutch34 has joined #ruby
<Authenticator>
The threads are running to completion, but at the end of the block, not after the stdin.close....
JakFrist has quit [Ping timeout: 276 seconds]
<havenwood>
Authenticator: If you haven't already, maybe have the Threads abort on exception to see if something's going amiss: Thread.abort_on_exception = true
dhollinger has quit [Ping timeout: 250 seconds]
<havenwood>
In 2.4 get a nice warning instead of aborting with: Thread.report_on_exception = true
araujo_ has joined #ruby
skade has joined #ruby
<havenwood>
Seems the latter might be nice to have on by default.
<Authenticator>
That's a nice addition. I'm looking forward to trying 2.4 later today.
<spudowiar>
Anyone got any ideas for me?
nobitanobi has joined #ruby
<spudowiar>
I need to override the pipe operator when the second operand is a certain class (or descendant)
<spudowiar>
mustmodify: I bet I can make that work :P
araujo__ has quit [Ping timeout: 276 seconds]
<jhass>
if you can make that work answering your own question should be a piece of cake
<chrisseaton>
mustmodify: I think you want their Gitter channel nowadays
dvinciguerra_ has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
madsa has quit [Ping timeout: 260 seconds]
l4v2 has quit [Quit: l4v2]
yoongkan_ has joined #ruby
ddffg has quit [Remote host closed the connection]
_whitelogger has joined #ruby
<yorickpeterse>
OK I have a feeling I'm being a total idiot here but my brain is not co-operating. Is there a way using bit masking to go from 0x7ff723f2a260 to 0x7ff723f22280? Note that when doing this only 0x7ff723f22280 is known (so we can't just subtract something from it)
asianMike has joined #ruby
<yorickpeterse>
(for those wondering, the difference between the two values is 1023 * 32)
<yorickpeterse>
eam: the go-to pointer is not known
<yorickpeterse>
essentially the idea is to take a pointer to a sequence of aligned memory, then get a pointer to the start of it
<eam>
so you mean only 0x7ff723f2a260 is known?
<yorickpeterse>
yes
mustmodify___ has joined #ruby
<yorickpeterse>
what we do know is that every value in this range is 32 bytes, and there can be at most 1024 values
xall_ has quit [Ping timeout: 244 seconds]
der-landgraf has joined #ruby
der-landgraf has quit [Changing host]
der-landgraf has joined #ruby
memorasus has quit [Read error: Connection reset by peer]
neanderslob has joined #ruby
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
xall_ has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
<yorickpeterse>
not sure if it's even possible without knowing the start :/
<soahccc>
Okay I figured it out :D I had to reverse an ease_in_expo instead... Auto lower volume when someone talks in teamspeak? Ruby serves! :)
mustmodify has quit [Ping timeout: 258 seconds]
SilverKey has quit [Quit: Halted.]
memorasus has joined #ruby
yfeldblu_ has joined #ruby
dhollinger has quit [Quit: WeeChat 1.5]
swills has joined #ruby
neanderslob_ has quit [Ping timeout: 244 seconds]
eljimbo has joined #ruby
banisterfiend has joined #ruby
maloik has quit [Remote host closed the connection]
yfeldblum has quit [Ping timeout: 250 seconds]
newbism has joined #ruby
maloik has joined #ruby
weaksauce has quit [Ping timeout: 240 seconds]
<newbism>
Hi I'm trying to use activerecord alone in my ruby script, I have gem 'activerecord', '4.2.7' in my Gemfile, run bundle update... try to run the app and I get 'require' cannot load such file. Whats wrong here?
postmodern has joined #ruby
electrostat has joined #ruby
macsteps has joined #ruby
ramfjord_ has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
Guest60828 has quit [Ping timeout: 240 seconds]
<newbism>
arg... require active_record is the correct
vjacob has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
pawnbox has joined #ruby
macsteps has quit [Remote host closed the connection]
<bleep>
Which would you prefer: An interviewer who didn't know the concepts but learned them quickly, or someone who was experienced with the concepts already
<bleep>
interviewee*
<spudowiar>
Depends
<spudowiar>
Could the experienced interviewee learn new concepts quickly as well?
<bleep>
unknown, didn't test for that
macsteps has joined #ruby
<spudowiar>
bleep: well, it's risky but most companies would opt for the experienced one? idk
<spudowiar>
I personally would have tested that :P
<Zarthus>
bleep: what does the ad ask for?
<Zarthus>
interviewing someone is a lot more complex than "can you do what we want you to do"
SilverKey has quit [Quit: Halted.]
KCmetro has quit [Ping timeout: 244 seconds]
<Zarthus>
if both are equal fits in the team i'd roll with the one with most experience
Jonathel has joined #ruby
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<Zarthus>
but you do some before screening (of their github, so, etc.) and can judge code quality as well
yfeldblum has joined #ruby
tristanp has quit [Remote host closed the connection]
<bleep>
anyone know of a bash command that takes a boolean as a parameter?
skade has quit [Quit: Computer has gone to sleep.]
<mustmodify___>
||
<Zarthus>
ruby -e
<Zarthus>
¯\_(ツ)_/¯
troulouliou_div2 has joined #ruby
solars has joined #ruby
aegis3121 has quit [Ping timeout: 252 seconds]
neanderslob has quit [Ping timeout: 258 seconds]
troulouliou_div2 has quit [Remote host closed the connection]
augcesar has quit [Quit: Connection closed for inactivity]
pdoherty has quit [Ping timeout: 260 seconds]
kitikonti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
yoongkan_ has quit [Remote host closed the connection]
blandflakes has joined #ruby
blandflakes has quit [Client Quit]
SilverKey has joined #ruby
ascarter has joined #ruby
ascarter has quit [Client Quit]
killerkamel has joined #ruby
memorasus has quit [Ping timeout: 264 seconds]
<drbrain>
Mirubiri: you asked a few days ago why rspec is less expressive than ruby
<drbrain>
ruby doesn't give authors the ability to redefine syntax
<drbrain>
so your expressiveness as a ruby API designer is limited
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
jaguarma_ has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 272 seconds]
<Jonathel>
is there a way to daemonize a ruby app without any gems?
<al2o3-cr>
Jonathel: Process.daemon
weaksauce has joined #ruby
<Jonathel>
thx
<drbrain>
don't forget to Dir.chdir '/' and so-forth
<drbrain>
oh, I guess Process.daemon does all that now, doesn't it?
<Papierkorb>
Process.daemon does that
killerkamel has quit [Ping timeout: 264 seconds]
<Papierkorb>
but also, by default, closes stdout. uargh
nizzlefritz has joined #ruby
<drbrain>
if it is a daemon where would stdout appear?
<Papierkorb>
in the current TTy. Though, daemonizing is not something I want my applications do. Annoying enough atom does it.
<Jonathel>
so do you schedule it Papierkorb? like via a cron job?
<Papierkorb>
Jonathel: what is "it"?
roshanavand has quit [Quit: This computer has gone to sleep]
<Jonathel>
your application
<Papierkorb>
If it's a server, I write a systemd.service unit for it. Dead simple, and easy to debug as I still have stdout and friends if I need it. If it's a CLI application .. why should it daemonize itself? Same for GUI applications
<Papierkorb>
And if it should be run periodically, yes, cronjob, or .service and .timer units for it
Parko has joined #ruby
<Papierkorb>
Jonathel: what kind of application are you writing?
jaguarmagenta has joined #ruby
<Jonathel>
well i guess mine does not need to be daemonized. The app needs to make "frequent" calls to a web service, download a file process is it and update a database thats the main one
bruce_lee has quit [Read error: Connection reset by peer]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
zenlot6 has joined #ruby
<Papierkorb>
Sounds like a cronjob, or if it should be triggered differently to that, a usual system .service
<Jonathel>
i just wonder how to implement concurrency and especially if ruby crashes :/
zenlot has quit [Ping timeout: 244 seconds]
<Jonathel>
yeah i guess
<Papierkorb>
what does concurrency have to do with daemonizing your application?
<Papierkorb>
ruby doesn't crash (... Usually!), if it does you have an issue you need to debug regardless
neanderslob_ has joined #ruby
firstdayonthejob has quit [Ping timeout: 276 seconds]
<Jonathel>
well if i spawn a new thread for a task and the main process crashes not sure how to handle it
neanderslob has joined #ruby
<Jonathel>
well yeah i guess if its cron it can "recover" with some logic hopefully
<Papierkorb>
Are you using threads or processes?
<Jonathel>
threads
<Papierkorb>
If the main thread crashes, you forgot to catch an error or to do a nil check. Fix it.
mustmodify___ has left #ruby [#ruby]
cyphase has quit [Ping timeout: 264 seconds]
nankyokusei has joined #ruby
<Jonathel>
good point
polishdub has quit [Quit: Leaving]
<Papierkorb>
The dispatcher shall not crash. There's no real recovery from this. So, it better not crash ;)
<Jonathel>
hehe
<oleksandriuzikov>
I would use a separate script to schedule tasks in a db and many workers for the task processing
jeremyhall has quit [Ping timeout: 240 seconds]
SilverKey has quit [Quit: Cheerio!]
danman has joined #ruby
<Papierkorb>
Jonathel: also make sure that you actually need workers. If all you do is 1) download file 2) stuff it into some database 3) do this every hour or so, you could be well served by using a cronjob calling a simple ruby script doing just that
neanderslob_ has quit [Ping timeout: 272 seconds]
neanderslob has quit [Ping timeout: 276 seconds]
memorasus has joined #ruby
electrostat has quit [Ping timeout: 264 seconds]
cyphase has joined #ruby
<Jonathel>
yeah the thing is that it might download several files and process them depending on what the service returns
nankyokusei has quit [Ping timeout: 244 seconds]
<Papierkorb>
Your systems service scheduler is there to help you. Make use of it. If you're on a recent distro, chances are good you're on systemd, in which case, you are all set
genpaku has quit [Ping timeout: 264 seconds]
<Jonathel>
the idea is to have each thread grab the file process them and update the db saying it finished
<drbrain>
Papierkorb: yep, I agree
GNUYawk has quit [Quit: GNUYawk]
genpaku has joined #ruby
<Jonathel>
yeah i guess i might have a look on that, not that experienced with systemd despite its capabilities
<Papierkorb>
Jonathel: So you don't need much of a dispatcher. A simple: files.map{|url| Thread.new{ ... } }.each(&:join) # probably already suffices
<Papierkorb>
Jonathel: Happy to help with systemd. You'll need a .service file. If you want to schedule that like a cronjob, a .timer file afterwards.
<Jonathel>
Thank you Papierkorb you gave me some ideas. I ll have a look on systemd i feel guilty for not playing with it
jenrzzz has quit [Quit: Lost terminal]
<bleep>
is there considered an accepted/default formatting for commenting the top of a file to describe what the class does?
jenrzzz has joined #ruby
<Papierkorb>
The man pages are quite good, but overwhelming at first. Instead, check how other .service files are written, they're in /usr/lib/systemd/system, yours will be placed in /etc/systemd/system
<shevy>
bleep I do that
<Jonathel>
thx!
<bleep>
shevy: in what way?
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<elomatreb>
bleep: Rubocop default configuration makes it an error to not have documentation for a class, so I'd say it's accepted
<elomatreb>
In the rare case you really don't want/need docs you can always just say "# nodoc"
<bleep>
elomatreb: i meant more, what's the accepted format? Having a big row of ########################### as a doc block? or something else?
<shevy>
bleep I only write a short header usually and I use another class to extract that header and display it on the commandline, if I request it via that class
douglascorrea has quit [Read error: Connection reset by peer]
<shevy>
I don't think there is any standard. most people probably do not write any comments at all
<Papierkorb>
In-source documentation is only really worthwhile if you have a tool which can generate something readable out of it
pdoherty has joined #ruby
<elomatreb>
But there are so many tools that can use in-source docs (eg. IDE stuff and similar) that I'd say it's almost always worth it
<shevy>
:)
tjbiddle has quit [Quit: tjbiddle]
<elomatreb>
shevy: btw, "Encoding: ISO-8859-1"?
<shevy>
yep
macsteps has quit [Remote host closed the connection]
<Papierkorb>
it burnnnns
<elomatreb>
Huh, didn't even know that there are more than one valid encoding comment formats
<shevy>
you can get a list of the valid encoding formats
<Papierkorb>
Just use UTF-8 for everything...
<elomatreb>
I just meant that I thought that "# -*- ..." was the only valid format for that
mattwashere has quit [Remote host closed the connection]
<shevy>
Encoding.list
<Mirubiri>
drbrain: I don't get the point
mattwashere has joined #ruby
nemish has quit [Ping timeout: 258 seconds]
<shevy>
elomatreb I think it scans for the minimum tokens required... I have seen different variants all working fine
nibbo has quit [Remote host closed the connection]
nibbo has joined #ruby
<elomatreb>
But still, what reason is there to use 8859-1 in a newly written program?
abhinavmehta has joined #ruby
nemish has joined #ruby
<shevy>
what reason is there not to?
<drbrain>
elomatreb: your input documents are ISO-8859-1 and your new program is modifying them
<drbrain>
when the strings in your code are also ISO-8859-1 you have the easiest time
<elomatreb>
That utf-8 is the generally accepted standard that also supports all characters 8859 does?
newbism has quit [Ping timeout: 250 seconds]
abhinavmehta has quit [Client Quit]
<elomatreb>
drbrain: I guess, but I really don't see that happening anywhere accept when interacting with some really old legacy systems
<shevy>
that has not been my experience
<elomatreb>
*except
Rodya_ has joined #ruby
<drbrain>
I'm not very familiar with what programmers outside English-speaking countries uses as their typical document encoding
<Papierkorb>
drbrain: UTF-8.
mattwashere has quit [Ping timeout: 244 seconds]
<drbrain>
Papierkorb: even in Japan, China, Korea?
<Papierkorb>
Please, for the love of everything holy, use it. There's not enough time to tinker with the encoding selection to get it right
pdoherty has quit [Ping timeout: 264 seconds]
<Papierkorb>
drbrain: European countries seem to mostly use UTF-8 by now. No idea about asian countries, some may still use their local encoding :|
<shevy>
everything works fine there
<drbrain>
Papierkorb: that's my understanding
<Papierkorb>
But, that's no reason to not use UTF-8 everywhere you can :)
neanderslob has joined #ruby
creat has joined #ruby
<elomatreb>
Given how broken the ISO encodings were in Europe, I really don't want to have to use some local Asian encoding
ceej has quit [Remote host closed the connection]
<drbrain>
shevy: last I heard there were some round-trip issues with CJK countries because Unicode made some poor choices
<Papierkorb>
Well, afaik, many of their characters are encoded as 3 bytes in utf-8
marr has quit [Ping timeout: 276 seconds]
<Papierkorb>
which more often than not, increases file size significantly for them
<elomatreb>
But emoji originated from Japan, so I'd imagine they'd be on the forefront of unicode acceptance
<shevy>
well they used to have $KCODE in the old days :)
<Papierkorb>
sadly they are...
postmodern has quit [Quit: Leaving]
<shevy>
not sure if this is still needed in ruby past 1.9.x era
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
yfeldblum has quit [Remote host closed the connection]
<xpitr>
ugh i hate encodings so much
<xpitr>
and why i love charlock_holmes
electrostat has joined #ruby
CodeAleks has quit [Remote host closed the connection]
Dimik has quit [Ping timeout: 250 seconds]
l4v2 has joined #ruby
SCHAAP137 has quit [Quit: Exiting...]
neanderslob_ has quit [Ping timeout: 240 seconds]
neanderslob has joined #ruby
neanderslob_ has joined #ruby
neanderslob has quit [Disconnected by services]
neanderslob has joined #ruby
Sembei has quit [Read error: Connection reset by peer]
<bleep>
I have a very small Ruby project that doesn't use any gems, but I want to use the memfs gem for unit testing. Would it make more sense to put the test in a /test folder and have the Gemfile there, or to use the root directory to store the Gemfile?
Sucks has quit [Ping timeout: 264 seconds]
<elomatreb>
bleep: put the Gemfile in the root directory, but put the gem you want in a :development group?
KnownSyntax_ has joined #ruby
KnownSyntax_ has quit [Changing host]
KnownSyntax_ has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
saneax_AFK is now known as saneax
<bleep>
elomatreb: thanks
KnownSyntax has quit [Ping timeout: 252 seconds]
roamingdog has quit [Remote host closed the connection]
mattwashere has joined #ruby
Xiti has quit [Quit: Xiti]
roamingdog has joined #ruby
cdg_ has joined #ruby
paradisaeidae_ has joined #ruby
yfeldblum has joined #ruby
aries_liuxueyang has quit [Ping timeout: 272 seconds]
cdg has quit [Ping timeout: 250 seconds]
yfeldblu_ has joined #ruby
yfeldblum has quit [Read error: Connection reset by peer]
whathapp_ has quit [Remote host closed the connection]
whathappens has joined #ruby
paradisaeidae_ has quit [Remote host closed the connection]
paradisaeidae has joined #ruby
asianMike has joined #ruby
douglascorrea has joined #ruby
aries_liuxueyang has joined #ruby
skweek has joined #ruby
agent_white has quit [Quit: goinhome]
Xiti has joined #ruby
isberg has joined #ruby
asianMike has quit [Client Quit]
yfeldblu_ has quit [Remote host closed the connection]
Jayson_Virissimo has joined #ruby
pawnbox has joined #ruby
Rodya_ has quit [Remote host closed the connection]
whippythellama has joined #ruby
Rodya_ has joined #ruby
koooge has joined #ruby
pawnbox has quit [Ping timeout: 252 seconds]
yardenbar has joined #ruby
oleksandriuzikov has quit [Quit: Leaving.]
ryker has quit [Ping timeout: 240 seconds]
<bleep>
I'm using RubyMine and trying to run `rake test` is throwing an error. Googling shows it might be because test/unit version is too new for my version of Ruby (2.2.2)