jhass changed the topic of #ruby to: Rules & more: http://ruby-community.com || Ruby 2.2.3; 2.1.7; 2.0.0-p647: https://ruby-lang.org || Paste >3 lines of text on https://gist.github.com || log @ http://irclog.whitequark.org/ruby/
aryaching_ has quit [Ping timeout: 272 seconds]
rayzaum has quit [Quit: Leaving]
thiagofm has quit [Ping timeout: 264 seconds]
rayzaum has joined #ruby
<rayzaum> hey, someone can help me, im install rails now and show me this msg when a i put "rails server" Usage: rails new APP_PATH [options], and more option..
jgt3 has quit [Ping timeout: 272 seconds]
TheNet has joined #ruby
zarubin has joined #ruby
claw has quit [Ping timeout: 240 seconds]
aryaching_ has joined #ruby
claw has joined #ruby
TheNet has quit [Client Quit]
zarubin has quit [Ping timeout: 240 seconds]
dfinninger has quit [Remote host closed the connection]
Yzguy has joined #ruby
Xentil has quit [Ping timeout: 256 seconds]
ap4y has quit [Quit: WeeChat 1.3]
shanemcd has quit [Remote host closed the connection]
rcvalle has quit [Quit: rcvalle]
dfinninger has joined #ruby
dfinninger has quit [Remote host closed the connection]
ap4y_ has joined #ruby
<BraddPitt> rayzaum first of all you should ask this in the ruby on rails channel. Second you need to create a new rails project before you can start the server
saneax is now known as saneax_AFK
OS-18137 has quit [Quit: leaving]
steffkes has quit [Ping timeout: 250 seconds]
brendan- has quit [Read error: Connection reset by peer]
juddey has joined #ruby
brendan- has joined #ruby
ap4y_ has quit [Quit: WeeChat 1.3]
ap4y has joined #ruby
workmad3 has quit [Ping timeout: 250 seconds]
DrShoggoth has quit [Remote host closed the connection]
rayzaum has quit [Quit: Leaving]
shanemcd has joined #ruby
blackmesa has quit [Quit: WeeChat 1.3]
kmckelvi1 has quit [Ping timeout: 250 seconds]
ibouvousaime has quit [Ping timeout: 272 seconds]
FooMunki has joined #ruby
Renich has quit [Ping timeout: 250 seconds]
Renich has joined #ruby
ethe has quit [Quit: Textual IRC Client: www.textualapp.com]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DiCablo has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Remote host closed the connection]
bMalum has joined #ruby
mary5030 has quit [Remote host closed the connection]
daivyk has joined #ruby
SenpaiSilver_ has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
jessemcgilallen has joined #ruby
SenpaiSilver_ has quit [Read error: Connection reset by peer]
SenpaiSilver_ has joined #ruby
bMalum has quit [Ping timeout: 250 seconds]
RobertBirnie has quit [Ping timeout: 240 seconds]
<zquad> I have an array of [key=value, key2=value2] pairs, how do I iterate through them and get key value pairs
<havenwood> zquad: So like?: [key, value, key, value]
<havenwood> >> [:key, :value, :another, :pair].each_slice(2).to_a
<ruboto> havenwood # => [[:key, :value], [:another, :pair]] (https://eval.in/482993)
<havenwood> >> [:key, :value, :another, :pair].each_slice(2).to_h
<ruboto> havenwood # => {:key=>:value, :another=>:pair} (https://eval.in/482994)
<zquad> you guys are awesome
Uranio has joined #ruby
Uranio has quit [Read error: Connection reset by peer]
tvw has quit [Remote host closed the connection]
nateberkopec has quit [Quit: Leaving...]
RobertBirnie has joined #ruby
SenpaiSilver_ has quit [Quit: Leaving]
SenpaiSilver has joined #ruby
dlitvak has quit [Remote host closed the connection]
hahuang65 has joined #ruby
RobertBirnie has quit [Client Quit]
astrobunny has joined #ruby
maloik has joined #ruby
DLSteve has joined #ruby
RobertBirnie has joined #ruby
RobertBirnie has quit [Client Quit]
<soahccc> Does anyone knows a nifty trick to get N items from an array which are evenly distributed? So if I'd want 10 from a list of 20 I would take every second, etc.
jhonglim has joined #ruby
DurstBurger has joined #ruby
rawrwx has quit [Ping timeout: 272 seconds]
Rickmasta has quit [Read error: Connection reset by peer]
Rickmasta has joined #ruby
circ-user-mgcmJ has quit [Ping timeout: 246 seconds]
Robert___ has joined #ruby
dlitvak has joined #ruby
maloik has quit [Ping timeout: 272 seconds]
casadei has quit [Remote host closed the connection]
<jhass> soahccc: mh, each_slice(size/N).map(&:first)?
jhonglim has quit [Quit: jhonglim]
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
DiCablo has joined #ruby
<soahccc> >> [*0..11].each_slice(11/6).map(&:first)
<ruboto> soahccc # => [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11] (https://eval.in/482995)
<soahccc> jhass: like that? :S
<havenwood> >> 11/6
<ruboto> havenwood # => 1 (https://eval.in/482996)
<havenwood> soahccc: ^
<havenwood> [1, 2, 3, 4, 5, 6] |> Enum.take_every(2) #=> [1, 3, 5]
<havenwood> maybe we need a #take_every ;)
<jhass> >> [*0..11].each_slice(11.fdiv(6).round.to_i).map(&:first)
<ruboto> jhass # => [0, 2, 4, 6, 8, 10] (https://eval.in/482997)
dlitvak has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
<jhass> also 0..11 are actually 12 elements, not 11
podman has quit [Quit: Connection closed for inactivity]
devbug has quit [Ping timeout: 256 seconds]
<havenwood> jhass: I wonder if Crystal-lang would accept an Enumerable#take_every?
<jhass> if you can argue a real world usecase ..
Robert___ has quit [Ping timeout: 240 seconds]
diegoviola has quit [Ping timeout: 240 seconds]
toretore has quit [Ping timeout: 240 seconds]
<havenwood> #take_random is nifty as well
<havenwood> jhass: aye
<soahccc> havenwood: I think I will resort to random if I can't wrap my drunken brain around this math/algo hell :D
elton has joined #ruby
<havenwood> soahccc: sample(10)
<havenwood> >> [*1..20].sample 10
<ruboto> havenwood # => [11, 7, 1, 15, 17, 12, 19, 5, 6, 16] (https://eval.in/482998)
<havenwood> soahccc: ^ no dupes
momomomomo has quit [Quit: momomomomo]
<jhass> depends on how strict the "evenly" property has to be
dlitvak has quit [Read error: Connection reset by peer]
<havenwood> pseudo evenly!
lyoshajapan has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
maloik has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
rawrwx has joined #ruby
elton has quit [Ping timeout: 272 seconds]
SenpaiSilver has quit [Read error: Connection reset by peer]
SenpaiSilver has joined #ruby
<soahccc> I think I'm fine with random :) At least for today
cwong_on_irc has quit [Quit: Leaving.]
nateberkopec has joined #ruby
dlitvak has joined #ruby
sneakerhax has quit [Ping timeout: 240 seconds]
lyoshajapan has quit [Remote host closed the connection]
aryaching_ has quit [Ping timeout: 272 seconds]
lyoshajapan has joined #ruby
rawrwx has quit [Ping timeout: 272 seconds]
SenpaiSilver has quit [Read error: Connection reset by peer]
maloik has quit [Ping timeout: 256 seconds]
SenpaiSilver has joined #ruby
s00pcan has quit [Ping timeout: 272 seconds]
howdoico1 has quit [Ping timeout: 272 seconds]
s00pcan has joined #ruby
rakm_ has joined #ruby
casadei has joined #ruby
Synthead has quit [Read error: Connection reset by peer]
diegoviola has joined #ruby
snockerton has quit [Quit: Leaving.]
Eiam has quit [Ping timeout: 250 seconds]
rakm has quit [Ping timeout: 256 seconds]
akem has quit [Quit: Bye]
SenpaiSilver has quit [Read error: Connection reset by peer]
SenpaiSilver has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
InvGhosttt has quit [Ping timeout: 264 seconds]
payload has joined #ruby
<payload> why is ruby-lang invite only?
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
borodin has quit [Excess Flood]
brendan- has quit [Quit: Textual IRC Client: www.textualapp.com]
BTRE has quit [Quit: Leaving]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saneax_AFK is now known as saneax
<lemur> it doesn't exist anymore out of technicality. The channels have merged
baweaver has quit [Disconnected by services]
lemur is now known as baweaver
fryguy has joined #ruby
symm- has joined #ruby
<baweaver> payload: ^
lemur has joined #ruby
<payload> oh ok th
<fryguy> if i'm using ffi and get caught in a long running function, how can I have signals bubble out of the ffi method to ruby so that I can terminate the program?
<payload> thx*
lyoshajapan has quit [Remote host closed the connection]
<eam> fryguy: it sounds like you want to spin up a timer thread?
lyoshajapan has joined #ruby
TomPeed has joined #ruby
<fryguy> eam: i'm not sure, because once I get out of the long-running function (it's an event loop), the signal happens and the program terminates
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
<fryguy> specifying the blocking option on attach_function didn't seem to change the behavior eihter
marr has quit [Ping timeout: 250 seconds]
<eam> oh, you're sending it a signal and want to respond to it?
tenderlove has joined #ruby
RegulationD has joined #ruby
rgrmatt has joined #ruby
<fryguy> eam: i'm calling a wait_for_event c function that waits for an event to happen. If I hit ctrl-c while this is running, nothing happens. Once an event fires, I receive the interrupt
<fryguy> I want to actually respond to the signal and break out of the long-running c function call
bMalum has joined #ruby
baweaver has quit [Remote host closed the connection]
InvGhosttt has joined #ruby
<eam> I guess the question is whether ffi is blocking the signal, or if the function you're calling is blocking it
<eam> if the latter, you may need to modify the library
<fryguy> it's not the function i'm calling
<fryguy> calling it natively in C interrupts as expected
<dorei> aint signals blocked on a per process basis?
<dorei> sigmask or smt like that
<eam> dorei: yes
Guest93435 has quit [Ping timeout: 250 seconds]
rawrwx has joined #ruby
tenderlove has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 256 seconds]
Lucky__ has joined #ruby
<eam> fryguy: on my system at least, an ffi call doesn't seem to block SIGINT
<eam> from libc, attach_function 'sleep', [:int], :int then call it and send a signal
sunya7a has joined #ruby
bMalum has quit [Ping timeout: 256 seconds]
babblebre has quit [Quit: Connection closed for inactivity]
arescorpio has joined #ruby
<eam> the other interesting question is: are threads involved?
kobain has quit [Read error: Connection reset by peer]
<fryguy> eam: no
rawrwx has quit [Ping timeout: 272 seconds]
<fryguy> eam: so the specific wait_for_event function i'm using is from xcb
gigetoo has quit [Ping timeout: 256 seconds]
<fryguy> let me see if I can put together a very small proof of concept
freerobby has joined #ruby
mfqr has left #ruby [#ruby]
Bellthoven has joined #ruby
<eam> does this POC work for you in terms of not blocking sigint?
gigetoo has joined #ruby
maikowblue has joined #ruby
<eam> fryguy: best thing is to just strace the damn thing and see what it's setting up/doing when that signal goes through
mary5030 has joined #ruby
<fryguy> eam: hrmm, yah yours works
Arnvald has joined #ruby
diegoviola has quit [Ping timeout: 240 seconds]
arooni has joined #ruby
FooMunki has quit [Quit: FooMunki]
samuelkadolph has quit [Ping timeout: 246 seconds]
mary5030 has quit [Ping timeout: 256 seconds]
<eam> fryguy: I can ^C it
samuelkadolph has joined #ruby
<fryguy> weird, I can't
<fryguy> what kind of machine/OS are you on/
<eam> centos6
<eam> ruby 2.0.0p353
<eam> now, I don't have an X server running so maybe I'm never connecting to whatever it is you're blocking on
<fryguy> ah, that's probably it
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
s00pcan has quit [Ping timeout: 256 seconds]
deanj has joined #ruby
kobain has joined #ruby
<deanj> Hey all, does anyone have experience w/ accessing a sqlite database using WAL mode using the sqlite3 ruby gem? We're running into "database file is locked or corrupted" as the error. Any help would be much appreciated! :)
<deanj> If it matters, we're accessing the sqlite file over NFS.
s00pcan has joined #ruby
casadei has quit [Remote host closed the connection]
davedev2_ has joined #ruby
kobain has quit [Max SendQ exceeded]
andersh has quit [Ping timeout: 264 seconds]
c355E3B has quit [Ping timeout: 264 seconds]
halfdan has quit [Ping timeout: 264 seconds]
iamdevnul has quit [Ping timeout: 264 seconds]
mjc_ has quit [Ping timeout: 264 seconds]
bcavileer_ has quit [Ping timeout: 264 seconds]
apipkin has quit [Ping timeout: 264 seconds]
alxndr has quit [Ping timeout: 264 seconds]
pmarreck has quit [Ping timeout: 264 seconds]
braderhart has quit [Ping timeout: 264 seconds]
sfr^ has quit [Ping timeout: 264 seconds]
jds has quit [Ping timeout: 264 seconds]
apipkin has joined #ruby
braderhart has joined #ruby
halfdan has joined #ruby
jds has joined #ruby
alxndr has joined #ruby
pmarreck has joined #ruby
bcavileer_ has joined #ruby
c355E3B has joined #ruby
mjc_ has joined #ruby
crdpink has joined #ruby
iamdevnul has joined #ruby
davedev24 has quit [Ping timeout: 264 seconds]
crdpink2 has quit [Ping timeout: 264 seconds]
jordanm has quit [Ping timeout: 264 seconds]
andersh has joined #ruby
Robert___ has joined #ruby
sfr^ has joined #ruby
elton has joined #ruby
exadeci has quit [Quit: Connection closed for inactivity]
dmolina has quit [Quit: Leaving.]
kalzz has quit [Ping timeout: 264 seconds]
kalz has quit [Ping timeout: 264 seconds]
jessemcgilallen has quit [Quit: jessemcgilallen]
crdpink has quit [Ping timeout: 240 seconds]
crdpink has joined #ruby
<fryguy> move the select to ruby
elton has quit [Ping timeout: 240 seconds]
SenpaiSilver_ has joined #ruby
SenpaiSilver has quit [Read error: Connection reset by peer]
maloik has joined #ruby
dmcp has quit [Ping timeout: 264 seconds]
_SenpaiSilver_ has joined #ruby
SenpaiSilver_ has quit [Read error: Connection reset by peer]
lyoshajapan has quit [Remote host closed the connection]
dmcp has joined #ruby
symm- has quit [Ping timeout: 256 seconds]
dorei has quit []
kalzz has joined #ruby
maloik has quit [Ping timeout: 272 seconds]
dlitvak has quit [Read error: Connection reset by peer]
diego1 has joined #ruby
dlitvak has joined #ruby
Rickmasta has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
kobain has joined #ruby
lyoshajapan has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
diego1 is now known as diegoviola
dlitvak has joined #ruby
lyoshajapan has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
dmcp has quit [Ping timeout: 272 seconds]
saneax is now known as saneax_AFK
kies has joined #ruby
devoldmx has joined #ruby
kalz has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
SenpaiSilver_ has joined #ruby
Rodya_ has joined #ruby
kobain has joined #ruby
_SenpaiSilver_ has quit [Read error: Connection reset by peer]
kobain has quit [Max SendQ exceeded]
tenderlove has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Max SendQ exceeded]
kobain has joined #ruby
kobain has quit [Client Quit]
Arnvald_ has joined #ruby
Arnvald has quit [Read error: Connection reset by peer]
diegoviola has quit [Ping timeout: 250 seconds]
bMalum has joined #ruby
baweaver has joined #ruby
ramadoka has joined #ruby
duncannz has joined #ruby
DeXterbed has quit [Ping timeout: 250 seconds]
bMalum has quit [Ping timeout: 250 seconds]
baweaver has quit [Ping timeout: 250 seconds]
supermarin has quit [Remote host closed the connection]
sneakerhax has joined #ruby
maloik has joined #ruby
s00pcan has quit [Quit: Lost terminal]
sh4d0wD has joined #ruby
payload has quit [Quit: Leaving]
s00pcan has joined #ruby
Arnvald has joined #ruby
Arnvald_ has quit [Read error: Connection reset by peer]
dlitvak has quit [Remote host closed the connection]
QualityAddict has quit []
DeXterbed has joined #ruby
maloik has quit [Ping timeout: 250 seconds]
sh4d0wD has quit [Ping timeout: 240 seconds]
iateadonut has joined #ruby
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saneax_AFK is now known as saneax
Rodya_ has quit [Quit: Leaving...]
Jardayn has quit [Quit: Leaving]
crdpink has quit [Quit: q term]
govg has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
crdpink has joined #ruby
dlitvak has joined #ruby
govg is now known as Guest95708
diegoviola has joined #ruby
Arnvald has quit [Read error: No route to host]
Arnvald has joined #ruby
Bloomer has joined #ruby
devoldmx has quit [Remote host closed the connection]
dmcp has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
tenderlove has joined #ruby
devoldmx has joined #ruby
tenderlove has quit [Remote host closed the connection]
Bloomer has quit [Client Quit]
passerine has joined #ruby
tenderlove has joined #ruby
Bellthoven has quit []
tjbiddle has joined #ruby
lyoshajapan has joined #ruby
mahk_ has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
devoldmx has quit [Ping timeout: 256 seconds]
tenderlove has quit [Ping timeout: 240 seconds]
rakm_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
colleenmcguckin has quit []
Zamerick has quit [Ping timeout: 272 seconds]
DeXterbed has quit [Ping timeout: 272 seconds]
jgt4 has quit [Ping timeout: 272 seconds]
dmcp has quit [Read error: Connection reset by peer]
favadi has joined #ruby
artX000 has quit [Remote host closed the connection]
ICantCook has joined #ruby
_SenpaiSilver_ has joined #ruby
artX000 has joined #ruby
rgrmatt has quit [Remote host closed the connection]
c355E3B has quit [Quit: Connection closed for inactivity]
SenpaiSilver_ has quit [Read error: Connection reset by peer]
Guest95708 has quit [Ping timeout: 240 seconds]
edwinvdgraaf has quit [Ping timeout: 256 seconds]
lyoshajapan has quit [Remote host closed the connection]
Bloomer has joined #ruby
diegoviola has quit [Changing host]
diegoviola has joined #ruby
baweaver has joined #ruby
A124 has quit [Ping timeout: 256 seconds]
Yzguy has quit [Quit: Cya]
Vivekananda has quit [Quit: Leaving]
wmdrossard has quit [Ping timeout: 240 seconds]
cwong_on_irc has joined #ruby
lyoshajapan has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
mahk_ has quit [Ping timeout: 240 seconds]
jbrhbr has quit [Ping timeout: 256 seconds]
lyoshajapan has joined #ruby
lyoshaja_ has joined #ruby
daivyk has quit [Quit: ZZZzzz…]
lyoshaja_ has quit [Remote host closed the connection]
lyoshaja_ has joined #ruby
lyoshajapan has quit [Ping timeout: 272 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Aasha has joined #ruby
newmanships has quit [Quit: Textual IRC Client: www.textualapp.com]
Wsewolod has quit [Ping timeout: 250 seconds]
shadoi has quit [Quit: Leaving.]
kobain has joined #ruby
DeXterbed has joined #ruby
RegulationD has joined #ruby
saneax is now known as saneax_AFK
maxscam1 has joined #ruby
<maxscam1> how do i pass a block in the context of an object, i.e. 2.send { puts self.class } # returning Integer
mclong has joined #ruby
ramfjord_ has quit [Ping timeout: 272 seconds]
bMalum has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
<Nilium> instance_eval or instance_exec
<maxscam1> Nilium: thanks got i
lubarch has joined #ruby
bMalum has quit [Ping timeout: 250 seconds]
mclong has quit [Changing host]
mclong has joined #ruby
Rickmasta has joined #ruby
jgpawletko has quit [Quit: jgpawletko]
mahk_ has joined #ruby
mahk_ has quit [Max SendQ exceeded]
favadi has joined #ruby
rawrwx has joined #ruby
lyoshaja_ has quit [Remote host closed the connection]
amclain has quit [Quit: Leaving]
tenderlove has joined #ruby
rawrwx has quit [Ping timeout: 272 seconds]
tenderlove has quit [Ping timeout: 240 seconds]
DeXterbed has quit [Ping timeout: 272 seconds]
kp666 has joined #ruby
devoldmx has joined #ruby
bronson has quit [Remote host closed the connection]
bigmac has quit [Ping timeout: 250 seconds]
davedev2_ has quit [Ping timeout: 240 seconds]
freerobby has quit [Quit: Leaving.]
lubarch has quit [Ping timeout: 240 seconds]
bigmac has joined #ruby
davedev24 has joined #ruby
NeverDie has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
BTRE has joined #ruby
elton has joined #ruby
dfinninger has joined #ruby
davedev2_ has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
djbkd has quit [Remote host closed the connection]
maneco has joined #ruby
devoldmx has joined #ruby
dopie has joined #ruby
hahuang65 has quit [Ping timeout: 261 seconds]
dlitvak has quit [Remote host closed the connection]
davedev24 has quit [Ping timeout: 245 seconds]
elton has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
baweaver has quit [Remote host closed the connection]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
davedev2_ has quit [Ping timeout: 250 seconds]
fullofcaffeine has quit [Read error: Connection reset by peer]
Robert___ has quit [Ping timeout: 240 seconds]
braincrash has quit [Quit: bye bye]
Rickmasta has joined #ruby
rakm has joined #ruby
passerine has left #ruby ["Leaving"]
sankaber has quit [Remote host closed the connection]
fryguy has left #ruby [#ruby]
sankaber has joined #ruby
glowcoil is now known as incomprehensibly
arescorpio has quit [Quit: Leaving.]
<droptone> Question: Has anyone present ever dumped a database to a YAML-formatted flat file?
rattatmatt has quit [Quit: Leaving]
<Radar> Probably.
<droptone> I"m using ActiveRecord with my ruby script and I want to dump a database to a YAML flat file.
<droptone> In a format that can be restored.
<Radar> Why not dump it to SQL?
<droptone> Although it doesn't have to be restored directly to the DB.
<droptone> Well, yes, I suppose I could just dump the table entirely, but as it's user-specific, I'm not sure the SQL syntax for dumping user-specific sections.
<droptone> For example, I have a Profile table, and I want to, in this example, dump the Profile entry for one specific user to a flat file.
<maxscam1> you could iterate through your records and and store each record to a yaml
<droptone> I could just iterate through all values, create a hash, dump the hash, etc.
<droptone> maxscam1: Yes, not a bad idea.
<maxscam1> droptone: i didn't realize that when i was looking into how to do this ...
<droptone> Say a user had many books, and books belongs_to :user, and as I'm leveraging ActiveRecord as my ORM I'm able to call sub-tables as methods, such as user = User.first; user.books.each do |book|
ICantCook has quit [Quit: bye]
<droptone> I could simply iterate through. That might be the best bet.
<droptone> I could just build a hash and dump it via YAML.dump() as I do with other hashes.
<droptone> I've never attempted to restore a hash I dump via YAML.dump(), I assume it's fairly seamless to load and access that data?
braincrash has joined #ruby
<maxscam1> YAML.load
maxscam1 has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
akem has joined #ruby
<droptone> right, I assume it works as expected for reconstructing data?
<droptone> for example, say I have a simple array, my_arr = [];
<droptone> and then I simply dump digits, my_arr << 1; my_arr << 2; etc
lyoshajapan has joined #ruby
<droptone> and then I YAML.dump() my_arr
<droptone> Never mind, I'm sure it works as expecgted.
<droptone> expected*
dlitvak has joined #ruby
DurstBurger has quit [Ping timeout: 240 seconds]
chipotle has joined #ruby
QualityAddict has joined #ruby
DeXterbed has joined #ruby
system64 has quit [Quit: Connection closed for inactivity]
jgt4 has joined #ruby
qiukun has joined #ruby
lyoshajapan has quit [Ping timeout: 272 seconds]
Lucky__ has quit [Ping timeout: 240 seconds]
dlitvak has quit [Ping timeout: 272 seconds]
diegoviola has quit [Ping timeout: 272 seconds]
gix has quit [Ping timeout: 250 seconds]
zast has joined #ruby
chipotle has quit [Ping timeout: 272 seconds]
lyoshajapan has joined #ruby
jgt4 has quit [Ping timeout: 272 seconds]
akem has quit [Remote host closed the connection]
bMalum has joined #ruby
gix has joined #ruby
rawrwx has joined #ruby
ICantCook has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
diego1 has joined #ruby
diego1 has quit [Changing host]
diego1 has joined #ruby
diego1 is now known as diegoviola
lyoshajapan has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
chipotle has joined #ruby
bMalum has quit [Ping timeout: 250 seconds]
ICantCook has quit [Client Quit]
rawrwx has quit [Ping timeout: 250 seconds]
radgeRayden_ has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby
tenderlove has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
djbkd has joined #ruby
maloik has joined #ruby
yqt has quit [Ping timeout: 256 seconds]
mattyohe has quit [Quit: Connection closed for inactivity]
diegoviola has quit [Ping timeout: 240 seconds]
tenderlove has quit [Ping timeout: 250 seconds]
RichPeterson has joined #ruby
<RichPeterson> When is your step daughter ready to have sex?
<RichPeterson> My step-daughter turned twelve recently. She's very mature and developed for her age, and very pretty I might add. I would love to turn her into a woman. I browsed through her internet history and there was a lot of porn in it. I want to be her first so I can teach her the proper ways of having sex, so she won't make mistakes with others and catch sexually transmitted diseases.
sucks has quit [Ping timeout: 250 seconds]
maloik has quit [Ping timeout: 272 seconds]
RichPeterson has quit [K-Lined]
<droptone> What is this odd phenomenon where users come into the Ruby freenode channels and start talking about various sexual topics?
<droptone> I realize they're trolls but it seems unusually consistent.
<droptone> ouch, old boy got K-Lined.
haylon has joined #ruby
haylon has left #ruby [#ruby]
sucks has joined #ruby
qiukun has quit [Quit: qiukun]
bronson has joined #ruby
amincd has joined #ruby
<amincd> >> "hello\r\nworld".tr("\r", "")
<ruboto> amincd # => "hello\nworld" (https://eval.in/483022)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hahuang65 has joined #ruby
krzkrzkrz has joined #ruby
berserk_ren has joined #ruby
<amincd> doesn't str#tr replace every instance of each character in the first argument with the corresponding character in the second? If so, why isn't the backslash before 'n' eliminated?
bronson has quit [Ping timeout: 256 seconds]
elton has joined #ruby
maneco has left #ruby ["WeeChat 1.3"]
<amincd> are the
<amincd> are the '\r' and '\n' considered a single character each? or something like that
ramfjord has joined #ruby
radgeRayden_ has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
maloik has joined #ruby
elton has quit [Ping timeout: 272 seconds]
tjbiddle has quit [Ping timeout: 272 seconds]
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
devbug has joined #ruby
maloik has quit [Ping timeout: 272 seconds]
qiukun has joined #ruby
mclong has quit [Quit: Leaving]
tjbiddle has joined #ruby
psy_ has quit [Quit: Leaving]
devoldmx has quit [Remote host closed the connection]
sankaber has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<amincd> the explanation for str#tr found here isn't very clear to me: http://ruby-doc.org/core-2.2.3/String.html#method-i-tr
zotherstupidguy has joined #ruby
zotherstupidguy has quit [Changing host]
zotherstupidguy has joined #ruby
<amincd> What do the </code> and <code> signify?
sankaber has quit [Client Quit]
colegatron has quit [Ping timeout: 256 seconds]
darkf has joined #ruby
pwnd_nsfw has quit [Ping timeout: 240 seconds]
qiukun has quit [Quit: qiukun]
PlasmaStar has quit [Ping timeout: 264 seconds]
kobain has quit [Quit: KVIrc 4.1.3 Equilibrium http://www.kvirc.net/]
grill has joined #ruby
arup_r has joined #ruby
maloik has joined #ruby
Rickmasta has joined #ruby
elton has joined #ruby
RegulationD has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
maloik has quit [Ping timeout: 272 seconds]
chipotle has joined #ruby
DeXterbed has quit [Ping timeout: 256 seconds]
PlasmaStar has joined #ruby
bronson has joined #ruby
ur5us has quit [Remote host closed the connection]
pwnd_nsfw has joined #ruby
RegulationD has quit [Ping timeout: 250 seconds]
greister has quit [Quit: WeeChat 1.3]
dfinninger has quit [Remote host closed the connection]
christia_ has joined #ruby
colegatron has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
dfinninger has joined #ruby
christia_ is now known as chandega
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
techsethi_ has joined #ruby
astrobun_ has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
DeXterbed has joined #ruby
S01780 has joined #ruby
qiukun has joined #ruby
<S01780> Can someone help me understand the error here? https://www.irccloud.com/pastebin/AMUJ58Pz/
<ruboto> S01780, we in #ruby do not like irccloud.com, I reposted your paste to gist for you: https://gist.github.com/bce866be36503d5d9795
<ruboto> irccloud.com has no syntax highlighting, distracting formatting and loads slowly for most.
AlexRussia has quit [Ping timeout: 240 seconds]
<S01780> Thanks. Sorry.
qiukun has quit [Remote host closed the connection]
<S01780> I'm running Ubuntu 14.04, PostgreSQL 9.3, RoR and I've not been able to get this bundle installed for hours. :(
qiukun has joined #ruby
techsethi_ has quit [Ping timeout: 240 seconds]
maloik has joined #ruby
mary5030 has joined #ruby
yfeldblum has quit [Ping timeout: 250 seconds]
techsethi_ has joined #ruby
CrazyEddy has quit [Ping timeout: 240 seconds]
DeXterbed has quit [Ping timeout: 272 seconds]
agent_white has joined #ruby
maloik has quit [Ping timeout: 240 seconds]
<S01780> Anyone besides the bot able to help? Haha.
techsethi_ has quit [Quit: techsethi_]
techsethi has joined #ruby
bronson has quit [Remote host closed the connection]
<pontiki> S01780: what have you done about line 7 and 8?
favadi has joined #ruby
<S01780> Nothing, pontiki, I'm not sure what it's missing / wants me to do?
bronson has joined #ruby
<pontiki> "You need to install postgresql-server-dev-X.Y" you need to install postgresql-server-dev-9.3
lyoshajapan has quit [Remote host closed the connection]
<S01780> Oh, yeah, I did that.
<S01780> Still same error.
maikowblue has quit [Quit: .]
saneax_AFK is now known as saneax
akem has joined #ruby
tjad has joined #ruby
<pontiki> i'm just googling around
elton has quit [Remote host closed the connection]
berserk_ren has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 240 seconds]
qiukun has quit [Remote host closed the connection]
mary5030 has quit [Remote host closed the connection]
qiukun has joined #ruby
<S01780> Righto, let me run that
techsethi has quit [Ping timeout: 256 seconds]
amincd has quit [Quit: Page closed]
techsethi has joined #ruby
<S01780> Well pontiki, it got me one step farther. :( https://gist.github.com/anonymous/f5c74d6f926eb11fc296
bMalum has joined #ruby
<pontiki> maybe you should do the googling around
<pontiki> or look at line 26
maloik has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
<pontiki> it's trying to install into a system level directory, not a user-accessible directory
Coldblackice has joined #ruby
ramfjord has joined #ruby
bMalum has quit [Ping timeout: 272 seconds]
lyoshajapan has joined #ruby
mooe has joined #ruby
troys has joined #ruby
bMalum has joined #ruby
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
<S01780> Right, I am googling, with little luck, lol
mooe has quit [Client Quit]
yfeldblum has joined #ruby
<pontiki> do you see the error on line 26, S01780 ?
maloik has quit [Ping timeout: 240 seconds]
<S01780> Yeah?
maloik has joined #ruby
<S01780> Sorry, I'm really new at this.
<pontiki> new at unix?
<S01780> Yes, and then I ended up trying to do this Ruby deployment and that's even worse.
<S01780> Access denied, how do I fix the permission?
<pontiki> deployment is a task that requires a great deal of understanding of unix/linux
arooni has quit [Ping timeout: 250 seconds]
<S01780> Amen, pontiki. I'm about to start university classes for IT but this I'm just trying to get done.
<pontiki> you need to go study unix system admin a bit more, first, i think
<pontiki> this isn't a "just a couple minor problems" thing
maloik has quit [Ping timeout: 250 seconds]
qiukun_ has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun_ is now known as qiukun
Coldblackice has quit [Read error: Connection reset by peer]
christiandsg has quit [Quit: Leaving...]
chandega has quit [Quit: Leaving...]
<S01780> Well.
minimalism has quit [Quit: leaving]
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
<S01780> I get the basic concepts, and the code is written on github.
<S01780> Just need to bumble around a bit in Google and with nice people like you, lol.
<pontiki> it's not the code
<pontiki> is the system you're provisioning to run your code
nertzy has joined #ruby
<pontiki> if you don't yet understand about file system permissions, that's telling me you have a great deal to learn yet.
<pontiki> i'm not trying to be harsh, although it does sound like it, sorry
DeXterbed has joined #ruby
jgt4 has joined #ruby
<pontiki> it's just, this isn't something i can help with over irc
qiukun has quit [Quit: qiukun]
juddey has quit [Ping timeout: 272 seconds]
<pontiki> it's like, when i learned this stuff, i read huge volumes of books, manuals, poored over man pages, ...
qiukun has joined #ruby
<pontiki> worked with other people a lot for help, *in person*
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
techsethi has quit [Ping timeout: 250 seconds]
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
otherj has joined #ruby
jgt4 has quit [Ping timeout: 240 seconds]
meatchicken has joined #ruby
<meatchicken> That's weird
<meatchicken> ruby code order matters
<meatchicken> I can't use a method in a single-file until it is defined?
<meatchicken> doesn't ruby read the entire file before executing?
tenderlove has quit [Ping timeout: 256 seconds]
darkxploit has joined #ruby
elton has joined #ruby
<S01780> pontiki: You're not, and you're absolutely right.
CloCkWeRX has left #ruby [#ruby]
<S01780> And I appreciate it.
aryaching has joined #ruby
Aasha has quit [Ping timeout: 240 seconds]
<lemur> meatchicken: that's kinda what it means to be an interpreted language mate.
tjad has quit [Ping timeout: 256 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
favadi has joined #ruby
<pontiki> hey, lemur :)
aryaching has quit [Read error: Connection reset by peer]
<lemur> alo
<lemur> probably shipping off to work on more hackathon stuff
Oog has joined #ruby
timonv has joined #ruby
lurch_ has joined #ruby
rawrwx has joined #ruby
aryaching has joined #ruby
elton has quit [Remote host closed the connection]
sucks has quit [Ping timeout: 240 seconds]
davedev24 has quit [Ping timeout: 240 seconds]
davedev24 has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
last_staff has joined #ruby
SOLDIERz has joined #ruby
sucks has joined #ruby
lemur is now known as baweaver
rawrwx has quit [Ping timeout: 272 seconds]
ramfjord has quit [Ping timeout: 272 seconds]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
lyoshajapan has joined #ruby
passerine has joined #ruby
tagrudev has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
solars has joined #ruby
troys has quit [Quit: Bye]
nbdy has joined #ruby
Oog has quit []
krzkrzkrz has quit [Read error: Connection reset by peer]
krz has joined #ruby
ur5us has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
rawrwx has joined #ruby
ibouvousaime has joined #ruby
tenderlove has joined #ruby
lemur has joined #ruby
Feyn has joined #ruby
kmckelvi1 has joined #ruby
sandstrom has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
aganov has joined #ruby
rawrwx has quit [Ping timeout: 240 seconds]
tenderlove has quit [Ping timeout: 256 seconds]
sandstrom has quit [Client Quit]
ibouvousaime has quit [Ping timeout: 256 seconds]
baweaver_ has joined #ruby
tjad has joined #ruby
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
elton has joined #ruby
agit0 has joined #ruby
lemur has quit [Ping timeout: 240 seconds]
elton has quit [Remote host closed the connection]
Contigi has quit [Read error: Connection reset by peer]
timonv has quit [Ping timeout: 250 seconds]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
iateadonut has quit [Ping timeout: 240 seconds]
arup_r has quit [Remote host closed the connection]
qiukun has quit [Client Quit]
elton has joined #ruby
agent_white has quit [Quit: backlater]
toretore has joined #ruby
arup_r has joined #ruby
yardenbar has joined #ruby
qiukun has joined #ruby
aryaching has quit [Ping timeout: 256 seconds]
aryaching has joined #ruby
chipotle has quit [Quit: cheerio]
nertzy has quit [Quit: This computer has gone to sleep]
xet7 has joined #ruby
kmckelvi1 has quit [Ping timeout: 250 seconds]
dfinninger has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
howdoi has joined #ruby
agent_white has joined #ruby
aryaching has quit [Client Quit]
RegulationD has joined #ruby
NeverDie has quit [Quit: http://radiux.io/]
tjbiddle has quit [Quit: tjbiddle]
elton has quit [Remote host closed the connection]
lyoshajapan has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
RegulationD has quit [Ping timeout: 256 seconds]
dlitvak has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
agent_white has quit [Quit: OREOTEIM]
trautwein has joined #ruby
qiukun has quit [Remote host closed the connection]
dlitvak has quit [Ping timeout: 240 seconds]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
qiukun has joined #ruby
tjbiddle has joined #ruby
devbug has quit [Ping timeout: 264 seconds]
elton has joined #ruby
emilkarl has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
otherj has quit [Quit: .]
lyoshajapan has joined #ruby
scepticulous has joined #ruby
Coldblackice has joined #ruby
darkxploit has quit [Quit: Leaving]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
brunto has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
cscheib has joined #ruby
qiukun has quit [Remote host closed the connection]
andikr has joined #ruby
qiukun has joined #ruby
tjbiddle has quit [Ping timeout: 250 seconds]
<cscheib> is there an easy way to convert all elements of an array (or an array's subarrays) from string to integer? I'm pretty sure I could use map... but my mian difficultly is that the array could be simple or nested (but, only one layer deep). Should I just test for elements to be an array object, and use anif statement?
djdb has joined #ruby
<cscheib> (it's an exercise from exercism.io)
<cscheib> paste includes code (series.rb), test (series_test.rb), test output (command_output.txt), and README from the exercise
<ap4y> cscheib: check Array#flatten
ibouvousaime has joined #ruby
lyoshajapan has quit [Remote host closed the connection]
tjbiddle has joined #ruby
codecop has joined #ruby
<cscheib> the result still has to be multiple layers, but that loosened something in my brain... I can do the conversion earlier in the method pipe, before I output an enumerator
tjad has quit [Read error: Connection reset by peer]
<cscheib> now I only fail 2 tests, and those are just error checking
SCHAAP137 has joined #ruby
krz has quit [Read error: Connection reset by peer]
Arnvald has quit [Remote host closed the connection]
krz has joined #ruby
<ap4y> I'm not sure how much levels you have to handle but for the test from the gist something like .map { |a| a.map(&:to_i) } should work
<cscheib> ap4y: I added .map{&:to_i} after @series.chars, that worked
maloik has joined #ruby
<apeiros> cscheib: recursive mapping
<apeiros> mapper = ->(v) { v.is_a?(Array) ? v.map(&mapper) : Integer(v) }; ary.map(&mapper)
<apeiros> cscheib: ^
headius has joined #ruby
kao has joined #ruby
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
<ap4y> that's cool, wonder if tco works with this
brunto has quit [Ping timeout: 240 seconds]
baweaver_ has quit [Read error: Connection reset by peer]
user083 has quit [Ping timeout: 240 seconds]
rtl has joined #ruby
joevandyk has joined #ruby
<cscheib> apeiros: thanks. That's similar to what I was thinking of doing, but more elegantly coded. Wasn't sure if there was an existing method hiding in Enumerables or something that already existed
<cscheib> luckily, this scenario didn't require recursion, because i forgot I had a "flat" array earlier on in the pipe
jgt4 has joined #ruby
arup_r has quit [Remote host closed the connection]
qiukun_ has joined #ruby
aufi has joined #ruby
imajes has joined #ruby
redondos has joined #ruby
arup_r has joined #ruby
qiukun has quit [Read error: Connection reset by peer]
qiukun_ is now known as qiukun
frem has quit [Quit: Connection closed for inactivity]
zeroDivisible has quit [Quit: WeeChat 1.3]
brunto has joined #ruby
jas02 has joined #ruby
kmckelvi1 has joined #ruby
jgt4 has quit [Ping timeout: 240 seconds]
callumacrae has joined #ruby
qiukun has quit [Remote host closed the connection]
<cscheib> also... when I'm working in irb... is there a way to restart the session or reload all of the requires?
qiukun has joined #ruby
<cscheib> rather than quit, restart irb, retype require_relative 'blah'
wjimenez5271_ has quit [Ping timeout: 246 seconds]
<ap4y> not really a restart but something like exec($0) will work
agit0 has joined #ruby
iateadonut has joined #ruby
<cscheib> that seemed to help, but clears up-arrow history... any way that doesn't clear history
<cscheib> (still an improvement, but I'd like to reduce typing/errors re-typing)
lkba_ has joined #ruby
Coldblackice has quit [Read error: Connection reset by peer]
wjimenez5271 has joined #ruby
arup_r has quit [Remote host closed the connection]
arup_r has joined #ruby
CrazyEddy has joined #ruby
lkba has quit [Ping timeout: 250 seconds]
iateadonut has quit [Ping timeout: 240 seconds]
sucks has quit [Read error: Connection reset by peer]
arup_r has quit [Remote host closed the connection]
<ap4y> I don't there is a way to reset loaded scrypt. you can try to solve issue with history by using pry. it preserves command history inbetween sessions
<ap4y> don't think*
Coldblackice has joined #ruby
<ap4y> and script* :/
<cscheib> I just heard about pry the other day, haven't messed with it yet
speakingcode has quit [Ping timeout: 240 seconds]
FLeiXiuS has quit [Remote host closed the connection]
<ap4y> from the higher level it works similar to any other repl but you can get nice features from it like show-doc and show-source
tenderlove has joined #ruby
devbug has joined #ruby
tenderlove has quit [Remote host closed the connection]
speakingcode has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
baweaver has quit [Remote host closed the connection]
jbrhbr has joined #ruby
blaxter has joined #ruby
tjbiddle has quit [Ping timeout: 240 seconds]
TomyWork has joined #ruby
arup_r has joined #ruby
sandstrom has joined #ruby
tjbiddle has joined #ruby
arup_r has quit [Remote host closed the connection]
lyoshajapan has joined #ruby
<cscheib> certainly looks useful
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
skade has joined #ruby
arup_r has joined #ruby
<apeiros> cscheib: well, you can $LOADED_FEATURES.grep(/\.rb$/).each do |f| load f end
<apeiros> $LOADED_FEATURES == $" if you want to type less. though, IMO rather add a command to irbrc/pryrc and write it properly
tjbiddle has quit [Ping timeout: 250 seconds]
lyoshajapan has quit [Ping timeout: 256 seconds]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
qiukun has quit [Remote host closed the connection]
tjbiddle has joined #ruby
qiukun has joined #ruby
Tempesta has joined #ruby
CrazyEddy has quit [Ping timeout: 256 seconds]
wmdrossard has joined #ruby
arup_r has quit []
tjbiddle has quit [Ping timeout: 240 seconds]
Hounddog has joined #ruby
zast has quit [Remote host closed the connection]
tjbiddle has joined #ruby
jgt4 has joined #ruby
Ishido has joined #ruby
ibouvousaime has quit [Ping timeout: 256 seconds]
astrobun_ has quit [Remote host closed the connection]
nateberkopec has quit [Read error: Connection reset by peer]
nateberkope has joined #ruby
vdamewood has joined #ruby
djbkd__ has joined #ruby
astrobun_ has joined #ruby
diegoviola has joined #ruby
cornerma1 has joined #ruby
tesuji has joined #ruby
ramadoka has quit [Quit: Page closed]
senayar has joined #ruby
senayar has quit [Changing host]
senayar has joined #ruby
Bloomer has quit []
krzkrz has joined #ruby
cornerman has quit [Ping timeout: 250 seconds]
cornerma1 is now known as cornerman
davedev24 has quit []
krz has quit [Ping timeout: 272 seconds]
Bodhi has joined #ruby
Xentil has joined #ruby
yfeldblum has quit [Remote host closed the connection]
djbkd has quit [Remote host closed the connection]
yfeldblum has joined #ruby
<adaedra> Hello
Arnvald has joined #ruby
joonty has joined #ruby
lyoshajapan has joined #ruby
Arnvald has quit [Remote host closed the connection]
chipotle has joined #ruby
<shevy> hello undeadra
ramfjord has joined #ruby
kam270 has quit [Ping timeout: 256 seconds]
drptbl has joined #ruby
<Bodhi> is this a good place to find people to practice with?
<flughafen> hey shevy are you broken down today shevy
iszak has quit [Quit: Lost terminal]
cwong_on_irc has quit [Quit: Leaving.]
symm- has joined #ruby
HANJIN has joined #ruby
Bodhi has quit []
thejamespinto has quit [Remote host closed the connection]
tomphp has joined #ruby
DavidDudson has joined #ruby
grill has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bruce_lee has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
htmldrum has quit [Ping timeout: 256 seconds]
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
c0m0 has joined #ruby
tenderlove has joined #ruby
davedev24 has joined #ruby
Macaveli has joined #ruby
Arnvald has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
<HANJIN> i had an error from example code about thread, please check what is the problem - https://gist.github.com/OLouis/9d188e0dd05ea2ff11eb
HANJIN has left #ruby [#ruby]
<Macaveli> Is there a default ruby method that removes Word Bullets form a string "• Zefzefz • Zefzefze Zef zefz" ?
darkxploit has joined #ruby
HANJIN has joined #ruby
nbdy has quit [Ping timeout: 272 seconds]
bronson has quit [Remote host closed the connection]
RegulationD has joined #ruby
Lap64 has joined #ruby
jud has quit [Quit: Leaving]
qiukun has quit [Remote host closed the connection]
renderfu_ has quit [Read error: Connection reset by peer]
iszak has joined #ruby
iszak has quit [Changing host]
iszak has joined #ruby
qiukun has joined #ruby
dmolina has joined #ruby
<apeiros> Macaveli: gsub
renderful has joined #ruby
<Macaveli> yes but it has to be for all non UTF-8 chars
<apeiros> though, nowadays String#delete might do too
<Macaveli> so I've made teh following
<Macaveli> but no worky
<Macaveli> value = value.encode(Encoding.find('ISO-8859-1'), encoding_options)
<Macaveli> value = value.encode('UTF-8')
futilegames has quit [Quit: futilegames]
<apeiros> calling that method "strip_tabs" is almost ridiculous :-|
ap4y has quit [Quit: WeeChat 1.3]
<Macaveli> well it still doesn't work
RegulationD has quit [Ping timeout: 256 seconds]
<Macaveli> I need to remove tabs / the bullets and stuff like that
<Macaveli> but keep " é ' ( è ! ç à
<apeiros> >> "• Zefzefz • Zefzefze Zef zefz".delete("•")
<ruboto> apeiros # => " Zefzefz Zefzefze Zef zefz" (https://eval.in/483169)
<apeiros> delete works fine regarding your first question
<apeiros> as for your method: I have the slight feeling that you're doing this thing quite wrong…
<apeiros> >> "• Zefzefz • Zefzefze Zef zefz".gsub("•", '') # works too
<ruboto> apeiros # => " Zefzefz Zefzefze Zef zefz" (https://eval.in/483170)
HANJIN has left #ruby [#ruby]
astrobun_ has quit [Remote host closed the connection]
hirmos has joined #ruby
chthon has joined #ruby
<Macaveli> apeiros
futilegames has joined #ruby
<Macaveli> that's too specific
<Macaveli> we need more global
<Macaveli> there are dozens of such characters
colli5ion has joined #ruby
<apeiros> Macaveli: then ask your question accordingly.
<apeiros> you asked for "bullets".
futilegames has quit [Client Quit]
<Macaveli> sorry apeiros
<Macaveli> for the confussion
lyoshajapan has quit [Remote host closed the connection]
<apeiros> Macaveli: note that I don't consider "this is too specific" as a sufficient followup.
djbkd__ has quit [Remote host closed the connection]
<Macaveli> alright i will
moeabdol has quit [Ping timeout: 240 seconds]
<Macaveli> also created an SO topic on this
<Macaveli> i need to go now but feel free to still help :)
Macaveli is now known as Mac|AFK
hirmos has quit [Ping timeout: 272 seconds]
shredding has joined #ruby
<apeiros> Mac|AFK: the way you deal with the encoding is worrying.
<apeiros> if you have proper/clean utf-8 strings, you can probably use \p classes
<apeiros> though, your whitelist is weird too. keep "§"?
<apeiros> I think you'll have to elaborate on why you have this problem and why you do this weird encoding dance.
qiukun has quit [Remote host closed the connection]
<apeiros> and there's a potential that you'll have to provide an actual white- or blacklist, not just hand-wavy "characters like this"
qiukun has joined #ruby
elton has quit [Remote host closed the connection]
rodfersou has joined #ruby
qiukun has quit [Remote host closed the connection]
passerine has left #ruby ["Leaving"]
qiukun has joined #ruby
tenderlove has joined #ruby
hirmos has joined #ruby
<Mac|AFK> apeiros
<Mac|AFK> because the backend
<Mac|AFK> can't handle these kind of symbols
<Mac|AFK> the back end is sap
<Mac|AFK> so we need to filtere these
shredding_ has joined #ruby
<apeiros> so your front-end system can handle them but your back-end can't. why do you allow them in the front-end then?
shredding has quit [Ping timeout: 250 seconds]
<apeiros> as for how to replace/remove them: you can remove all of them using String#delete/String#gsub. But you'll not get around knowing which they are.
Arnvald has quit [Remote host closed the connection]
tenderlove has quit [Ping timeout: 256 seconds]
conta has joined #ruby
<apeiros> and note that you're lucky rails' squish! does not follow ruby convention. when you use ! methods, you do *not* reassign the result. most ruby methods return nil when nothing changed.
<apeiros> >> "hello".gsub!("X", "")
<ruboto> apeiros # => nil (https://eval.in/483196)
ibouvousaime has joined #ruby
bMalum has quit [Quit: bMalum]
Arnvald has joined #ruby
bMalum has joined #ruby
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
triangles has joined #ruby
hirmos has quit [Remote host closed the connection]
knowtheory has quit [Ping timeout: 240 seconds]
akahn has quit [Ping timeout: 240 seconds]
devbug has quit [Read error: Connection reset by peer]
ec has quit [Ping timeout: 240 seconds]
jhill has quit [Ping timeout: 240 seconds]
boxrick1 has quit [Ping timeout: 240 seconds]
akahn has joined #ruby
knowtheory has joined #ruby
devbug has joined #ruby
boxrick1 has joined #ruby
jhill has joined #ruby
ec has joined #ruby
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
solars has quit [Ping timeout: 256 seconds]
devbug has quit [Ping timeout: 264 seconds]
shredding_ has quit [Ping timeout: 240 seconds]
hirmos has joined #ruby
qiukun has quit [Remote host closed the connection]
solars has joined #ruby
TheHodge has joined #ruby
qiukun has joined #ruby
qiukun has quit [Remote host closed the connection]
muttnchop has joined #ruby
Pumukel has joined #ruby
qiukun has joined #ruby
platzhirsch has joined #ruby
DavidDudson has quit [Quit: Goodbye all, and thankyou.]
hirmos has quit [Ping timeout: 250 seconds]
jbrhbr has quit [Quit: Leaving.]
anisha has joined #ruby
kmckelvi1 has quit [Ping timeout: 256 seconds]
muttnchop has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
Pumukel has quit [Remote host closed the connection]
dukedave has quit [Ping timeout: 240 seconds]
<shevy> flughafen hah only a bit tired but not broken
dukedave has joined #ruby
S01780 has quit []
lkba_ has quit [Read error: Connection reset by peer]
lkba has joined #ruby
jschmid has quit [Remote host closed the connection]
hirmos has joined #ruby
Bloomer has joined #ruby
diegoviola has quit [Quit: WeeChat 1.3]
Peg-leg has joined #ruby
tvw has joined #ruby
lkba has quit [Ping timeout: 256 seconds]
baweaver has joined #ruby
kmckelvi1 has joined #ruby
puria has quit [Ping timeout: 272 seconds]
bronson has joined #ruby
jschmid has joined #ruby
Tempesta has quit [Read error: Connection reset by peer]
kao has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Tempesta has joined #ruby
kao has joined #ruby
radgeRayden_ has quit [Ping timeout: 256 seconds]
baweaver has quit [Ping timeout: 240 seconds]
zenspider has joined #ruby
<flughafen> cool1
iateadonut has joined #ruby
bronson has quit [Ping timeout: 256 seconds]
huyderman has joined #ruby
sandstro_ has joined #ruby
krzkrz has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
puria has joined #ruby
skade has joined #ruby
sandstrom has quit [Ping timeout: 272 seconds]
circ-user-mgcmJ has joined #ruby
InvGhosttt has quit [Ping timeout: 250 seconds]
zarubin has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
casadei has joined #ruby
kmckelvi1 has quit [Ping timeout: 272 seconds]
hirmos has quit [Remote host closed the connection]
elton has joined #ruby
weckl has joined #ruby
zarubin has quit [Ping timeout: 240 seconds]
ibouvousaime has quit [Ping timeout: 256 seconds]
ibouvousaime has joined #ruby
kao has quit [Quit: Textual IRC Client: www.textualapp.com]
elton has quit [Ping timeout: 240 seconds]
duncannz has quit [Remote host closed the connection]
sandstro_ has quit [Quit: My computer has gone to sleep.]
nfk|laptop has joined #ruby
marr has joined #ruby
sleetdrop has joined #ruby
hirmos has joined #ruby
ramfjord has quit [Ping timeout: 250 seconds]
azgil has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
wireshark has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
workmad3 has joined #ruby
Arnvald has quit [Remote host closed the connection]
skade has joined #ruby
<platzhirsch> Did you know... you can remove the whitespace in the ternary operator and a method name ending on ?
<platzhirsch> user.available? ? 'Yes' : 'No' === user.available?? 'Yes' : 'No'
<shevy> yeah the ruby parser is scary
<shevy> imagine if we would have got ?.foo??
bruce_lee has quit [Ping timeout: 272 seconds]
<shevy> >> %w?yo?.empty?
<ruboto> shevy # => false (https://eval.in/483282)
wireshark has quit [Quit: Leaving]
brunto has quit [Ping timeout: 240 seconds]
<adaedra> >> ????::?? # platzhirsch
<ruboto> adaedra # => /tmp/execpad-f6c54341fb39/source-f6c54341fb39:2: warning: string literal in condition ...check link for more (https://eval.in/483285)
<adaedra> mh.
<adaedra> ah, it's only a warning.
<shevy> what the heck is ????::??
<platzhirsch> why is ?? => '?'
<shevy> >> ??
<ruboto> shevy # => "?" (https://eval.in/483287)
<shevy> well common convention for leading ?
<shevy> >> ?a
<ruboto> shevy # => "a" (https://eval.in/483288)
<adaedra> character litteral
<adaedra> (yields a string, tho.)
<platzhirsch> oh
brunto has joined #ruby
<platzhirsch> oh dear
<adaedra> >> % % % % % #
<ruboto> adaedra # => "%" (https://eval.in/483292)
<platzhirsch> I like that
<adaedra> Where is your god now?
loren has joined #ruby
CloCkWeRX has joined #ruby
Bloomer has quit [Remote host closed the connection]
<platzhirsch> *cry*
chipotle has quit [Quit: cheerio]
emilkarl has quit [Quit: emilkarl]
<adaedra> >> % % % % % % % % # we can go deeper
<ruboto> adaedra # => "%" (https://eval.in/483295)
colegatron has quit [Ping timeout: 256 seconds]
qiukun has quit [Remote host closed the connection]
qiukun has joined #ruby
qiukun has quit [Client Quit]
spiman has joined #ruby
Bellthoven has joined #ruby
Mon_Ouie has joined #ruby
casadei has quit [Remote host closed the connection]
saneax is now known as saneax_AFK
c355E3B has joined #ruby
saneax_AFK is now known as saneax
daivyk has joined #ruby
Spami has joined #ruby
RegulationD has joined #ruby
dangerousdave has joined #ruby
brunto has quit [Ping timeout: 240 seconds]
<apeiros> adaedra: keep digging!
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
casadei has joined #ruby
casadei has quit [Remote host closed the connection]
colegatron has joined #ruby
<adaedra> >> % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % % # ok.
<ruboto> adaedra # => "%" (https://eval.in/483302)
sleetdrop has quit [Quit: Computer has gone to sleep.]
RegulationD has quit [Ping timeout: 256 seconds]
<apeiros> adaedra, professional code digger
<adaedra> I'm looking for oil.
Bellthoven has quit []
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
snw has joined #ruby
favadi has joined #ruby
last_staff has quit [Quit: last_staff]
kmckelvi1 has joined #ruby
marius is now known as nkts
mostlybadfly has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
zarubin has joined #ruby
djdb has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
snw has quit [Ping timeout: 256 seconds]
elton has joined #ruby
zarubin has quit [Ping timeout: 250 seconds]
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
emilkarl has joined #ruby
casadei has joined #ruby
craigp has joined #ruby
elton has quit [Ping timeout: 272 seconds]
nfk|laptop has quit [Ping timeout: 250 seconds]
yfeldblum has quit [Ping timeout: 240 seconds]
gambl0re has joined #ruby
<shevy> adaedra thirsty?
sandstrom has joined #ruby
<adaedra> no.
prestorium has joined #ruby
anaeem1 has joined #ruby
nfk|laptop has joined #ruby
charliesome has joined #ruby
devoldmx has joined #ruby
anaeem1 has quit [Client Quit]
AlexRussia has joined #ruby
jgt4 has quit [Ping timeout: 240 seconds]
speakingcode has quit [Ping timeout: 256 seconds]
emilkarl has quit [Quit: emilkarl]
speakingcode has joined #ruby
devoldmx has quit [Ping timeout: 250 seconds]
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
neanderslob has quit [Read error: Connection reset by peer]
brunto has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
<atmosx> hello
krzkrz has joined #ruby
emilkarl has joined #ruby
tulak has joined #ruby
spiman has quit []
andikr has quit [Ping timeout: 250 seconds]
anaeem1 has joined #ruby
<shevy> hey dr. atmosx
anaeem1 has quit [Remote host closed the connection]
<atmosx> shevy: hehehe how r you Shevy?
<atmosx> shevy: I was in Vienna yesterday.
zotherstupidguy has quit [Ping timeout: 272 seconds]
favadi has joined #ruby
<shevy> am ok, next week is last exam week, then I can make some grand goal for next year - and have a full year not do it!
tk__ has joined #ruby
yfeldblum has joined #ruby
<atmosx> haha
jgt4 has joined #ruby
favadi has quit [Client Quit]
<atmosx> I have no more exams - done. June I will present my thesis. My opponent seems to be better than I thought, he will have some questions about how FFT allow MAFFT (a tool for seq. alignment) to be faster than other tools.
baweaver has joined #ruby
<atmosx> so in June I'll go in Brno - Vienna just for vacations \o/
azgil has quit [Quit: Leaving]
<shevy> I don't think I have ever heard of FFT or MAFFT for alignment ... can you use ruby to show the implementation?
bronson has joined #ruby
zotherstupidguy has joined #ruby
casadei has quit [Remote host closed the connection]
<atmosx> ruby is just the interface, you just pass the sequences + options, to MAFFT and fetch the results. It's a fast multiple alignment tool, made in Japan.
<atmosx> uses Fast Fourier Transormations to scan multiple matrices at once
skade has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
Coldblackice has quit [Ping timeout: 250 seconds]
bronson has quit [Ping timeout: 256 seconds]
joonty has quit [Quit: joonty]
chipotle has joined #ruby
<shevy> I should have paid more attention to math :(
<shevy> we had to employ some fourier transformation too for electron microscopy datasets of viruses, to get to the 3D models
chipotle has quit [Client Quit]
InvGhosttt has joined #ruby
favadi has joined #ruby
dlitvak has joined #ruby
adac has joined #ruby
<adac> Is there a gem that can measure the CPU and memory usage of a piece of code?
Jackneill has joined #ruby
<shevy> hmm I remember there was one ... not so long ago... on some blog post but I forgot the name
yfeldblum has quit [Ping timeout: 240 seconds]
grill has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
pdoherty has quit [Ping timeout: 256 seconds]
emilkarl has quit [Quit: emilkarl]
Jamo_ has quit [Ping timeout: 260 seconds]
ledestin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Pro| has quit [Ping timeout: 246 seconds]
lubarch has joined #ruby
Mon_Ouie has quit [Ping timeout: 256 seconds]
<adac> shevy, If you remember it, let me know :)
saneax is now known as saneax_AFK
<shevy> trying to...
colli5ion has quit [Ping timeout: 255 seconds]
xfbs has joined #ruby
<Papierkorb> adac: You can't measure the load of a function. You can however measure the CPU load /over time/, thus you can take a probe before and after, and then get the load from that. Much like you'd measure time it took to run
<adac> Papierkorb, Ok I see, thanks!
huddy has quit [Quit: Connection closed for inactivity]
peteyg_ has joined #ruby
sdothum has joined #ruby
Olipro has quit [Ping timeout: 240 seconds]
yonatankoren has quit [Ping timeout: 250 seconds]
InvGhost has joined #ruby
casadei has joined #ruby
jds has quit [Quit: Connection closed for inactivity]
sgambino has joined #ruby
KnownSyntax_ has joined #ruby
KnownSyntax_ has joined #ruby
Walex has joined #ruby
tercenya has quit [Read error: Connection reset by peer]
KnownSyntax has quit [Read error: Connection reset by peer]
tercenya has joined #ruby
joonty has joined #ruby
akkad has joined #ruby
yonatankoren has joined #ruby
<Walex> I am using the "gem" module to install Ruby gems, or just the 'command' module with 'gem install' and something strange is happening: the dependencies get downloaded and put in the Ruby gem cache, but don't get unpacked. If I run supposedly the same command in an interactive shell they get unpacked. What should I check or do?
InvGhosttt has quit [Ping timeout: 250 seconds]
<Walex> that is Ansible modules.
Olipro has joined #ruby
snw has joined #ruby
<jhass> Walex: compare the output of `gem env` between both environments
snw has quit [Client Quit]
kam270 has joined #ruby
grill has quit [Quit: Textual IRC Client: www.textualapp.com]
Xentil has quit [Ping timeout: 256 seconds]
<Walex> jhass: I'll do thanks
Vitor_ has joined #ruby
tenderlove has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
Spami has joined #ruby
Lap64 has quit [Quit: Leaving]
Spami has quit [Client Quit]
tenderlove has quit [Ping timeout: 256 seconds]
synthroid has joined #ruby
kobain has joined #ruby
FooMunki has joined #ruby
zenspider has quit [Quit: bye]
Pro| has joined #ruby
QualityAddict has quit [Read error: Connection reset by peer]
d0nn1e has quit [Ping timeout: 250 seconds]
<Walex> jhass: the difference is the location of the '.specs'. and this affect runtime too. If I do 'sudo $somegem' the gem does not work complaing that "/usr/lib/ruby/2.1.0/rubygems/dependency.rb:298:in `to_specs': Could not find 'signet' (~> 0.4.5) among 12 total gem(s) (Gem::LoadError)" but is run the same as 'sudo -i $somegem" it works.
<Walex> the jhass the specs path that works is http://paste.ubuntu.com/13893573/
<Walex> jhass: the one that does not work has instead the '$HOME/.spec' in it for the sudo-ing user.
grill has joined #ruby
<jhass> do you have --user-install in a gemrc anywhere?
<Walex> jhass: I don't know, but I tried also running with '--no-user-install'.
<Walex> jhass: checking...
d0nn1e has joined #ruby
<jhass> gem env would list it under "configuration"
A124 has joined #ruby
kappy has quit [Ping timeout: 260 seconds]
<jhass> but if --no-user-install doesn't help ...
<jhass> idk, just wrap it into /bin/sh -l ?
kappy has joined #ruby
<jhass> or go for a non-root install, ideally use a Gemfile and bundle --deployment
<jhass> for your application
Jamo has joined #ruby
<Walex> jhass: ahhh this is a third party not-quite-finished application
<Walex> the 'gem env' that does not work is http://paste.ubuntu.com/13893659/
kp666 has quit [Remote host closed the connection]
<jhass> Walex: what kind of application?
<Walex> the gem cache is indeed under '/var/lib/gems/2.1.0/cache' it's the specs that are under the user directory
<Walex> jhass: Arvados, a somewhat complicated storage-plus-clustering thing
<jhass> mh
* Walex checking the presence of '.gemrc'
<jhass> nah, gem env would list it
favadi has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<Walex> jhass: in the paste above I don't get why the specs files go under '/root/.gem/specs' and that's indeed listed in the 'gem env'.
<shevy> is this a debian machine?
<jhass> yeah, I'm not sure either
sdothum has joined #ruby
<Walex> shevy: yes, Debian-ish, Ubuntu ULTS14 more precisely
<shevy> hmm
charliesome has quit [Ping timeout: 250 seconds]
<Walex> shevy: but with a twist that I forgot: with the "Brightbox" backport of 2.1 and with the native 1.9 removed.
<jhass> mh, those packages are usually pretty sane
<jhass> tried the /bin/sh -l trick yet?
<jhass> or /bin/sh -lc 'command' rather
B1n4r10 has joined #ruby
favadi has joined #ruby
RegulationD has joined #ruby
<Walex> jhass: but that's the wrong thing to do...
<Walex> jhass: my goal is to install the gems as 'root' under /var/lib/gems/...' and then have then usable by any user on the system. If the gem system is configured to looks for specs in the current user's home directory and instead they are in '/root/.gem/specs' then things are not going to work in general
CloCkWeRX has quit [Ping timeout: 240 seconds]
favadi has quit [Client Quit]
konr has joined #ruby
<jhass> yeah idk why it does that for you really, sorry
<jhass> maybe try updating to the latest rubygems version
RegulationD has quit [Ping timeout: 256 seconds]
<Walex> jhass: OK, I can start looking at that. But you have given me already the important news that's not supposed to happen, so I now know that I need to fix *something*.
sumark has quit [Ping timeout: 245 seconds]
<jhass> well, I'm only 85% sure that it's not supposed to happen, I might be wrong :P
loren has quit [Quit: Leaving]
<shevy> yeah I also think that this is weird
sumark has joined #ruby
<shevy> we just have to ask hanmac! he runs ubuntu too
Fredrich010 has joined #ruby
JDiPierro has joined #ruby
Spami has joined #ruby
chipotle has joined #ruby
lubarch has quit [Quit: leaving]
QualityAddict has joined #ruby
fulgore_ has joined #ruby
l0yd has joined #ruby
ldnunes has joined #ruby
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
dotix has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
okkez has joined #ruby
IrishGringo has joined #ruby
aryaching has joined #ruby
okkez has left #ruby [#ruby]
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
tagrudev has joined #ruby
Feyn has quit [Quit: Leaving]
elton has joined #ruby
dotix has quit [Client Quit]
cbednarski has quit [Ping timeout: 250 seconds]
n1ftyn8_ has quit [Ping timeout: 260 seconds]
nullwarp has quit [Ping timeout: 260 seconds]
tonini has quit [Ping timeout: 260 seconds]
jxf has quit [Ping timeout: 250 seconds]
bjeanes has quit [Ping timeout: 260 seconds]
lancetw has quit [Ping timeout: 260 seconds]
cbednarski has joined #ruby
tonini has joined #ruby
n1ftyn8_ has joined #ruby
nullwarp has joined #ruby
chipotle has quit [Quit: cheerio]
bjeanes has joined #ruby
skade has joined #ruby
jxf has joined #ruby
elton has quit [Ping timeout: 272 seconds]
lancetw has joined #ruby
CloCkWeRX has joined #ruby
colli5ion has joined #ruby
InvGhost has quit [Ping timeout: 240 seconds]
HashNuke has quit [Ping timeout: 260 seconds]
null__ has quit [Ping timeout: 250 seconds]
Laaw has quit [Ping timeout: 260 seconds]
cwong_on_irc has joined #ruby
HashNuke has joined #ruby
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
Laaw has joined #ruby
dstarh has joined #ruby
freerobby has joined #ruby
hohenfall has joined #ruby
kmckelvi1 has quit [Read error: Connection reset by peer]
loren has joined #ruby
devoldmx has joined #ruby
platzhirsch has left #ruby [#ruby]
sankaber has joined #ruby
gnarf has joined #ruby
gregf_ has joined #ruby
shortdudey123 has joined #ruby
kmckelvi1 has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
JDiPierro has joined #ruby
akem has quit [Remote host closed the connection]
ochkoffein has quit [Read error: Connection reset by peer]
puria has quit [Ping timeout: 240 seconds]
TomPeed has joined #ruby
dlitvak_ has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
ramortegui has joined #ruby
loren has quit [Quit: Leaving]
kappy has quit [Quit: Lost terminal]
jgt4 has quit [Read error: Connection reset by peer]
jgt4 has joined #ruby
xet7 has quit [Quit: Leaving]
Rickmasta has joined #ruby
DurstBurger has joined #ruby
mclong has joined #ruby
conta has quit [Quit: Leaving]
sankaber has quit [Remote host closed the connection]
sankaber has joined #ruby
jgpawletko has joined #ruby
ruby-lang680 has joined #ruby
lapide_viridi has joined #ruby
<ruby-lang680> hello
<ruby-lang680> Can anyone help me with ruby program for school ?
<adaedra> ?anyone
<ruboto> Just ask your question, if anyone has or can, they will respond.
<ruby-lang680> up vote 0 down vote favorite I need to create simple book information list (database within code) which contain author, genre, name, release date and page number. And later search by author(sort by date, search by genre(sort by author). What is simplest way to do this ?
<adaedra> Is that copied from reddit?
<jhass> ruby-lang680: show what you tried so far
Bloomer has joined #ruby
puria has joined #ruby
f4cl3y has joined #ruby
<adaedra> did you try it?
<ruby-lang680> i tried, but i can print books
<ruby-lang680> it just gives 0x*******
<ruby-lang680> cant*
<adaedra> That's Object#inspect ouput, but you get books
<Papierkorb> well, what else do you expect the defualt #to_s to return?
<adaedra> >> class Book; end; Book.new
<ruboto> adaedra # => #<Book:0x4187a078> (https://eval.in/483422)
dlitvak_ has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
anisha has quit [Quit: Leaving]
decoponio has joined #ruby
mattyohe has joined #ruby
User458764 has joined #ruby
sepp2k has joined #ruby
trautwein has quit [Read error: Connection reset by peer]
SOLDIERz has quit [Read error: Connection reset by peer]
cwong_on_irc has quit [Quit: Leaving.]
trautwein has joined #ruby
dhollinger has joined #ruby
huddy has joined #ruby
dfinninger has joined #ruby
_stu_ has joined #ruby
Anderson69s_Deb has quit [Quit: Quitte]
lubarch has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
Suntzu has joined #ruby
aef has joined #ruby
zarubin has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
krzkrz has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
dlitvak has joined #ruby
krzkrz has joined #ruby
jcromartie has joined #ruby
azgil has joined #ruby
grill has quit [Quit: Textual IRC Client: www.textualapp.com]
malconis has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
Bloomer has quit [Remote host closed the connection]
rodfersou is now known as rodfersou|lunch
jgt4 has quit [Ping timeout: 256 seconds]
elton has joined #ruby
tjbiddle has joined #ruby
pandaant has joined #ruby
sucks has joined #ruby
marr has quit [Ping timeout: 256 seconds]
tk__ has quit [Quit: ばいばい]
Xentil has joined #ruby
CloCkWeRX has quit [Quit: Leaving.]
lubarch has quit [Quit: leaving]
fredbob has joined #ruby
lubarch has joined #ruby
elton has quit [Ping timeout: 256 seconds]
lubarch has quit [Client Quit]
lubarch has joined #ruby
stannard has joined #ruby
rawrwx has joined #ruby
baroquebobcat has quit [Remote host closed the connection]
tagrudev has quit [Remote host closed the connection]
dlitvak has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
sucks has quit [Remote host closed the connection]
favadi has joined #ruby
xfbs has quit []
fredbob has quit [Remote host closed the connection]
kmckelvin has joined #ruby
kmckelvi1 has quit [Read error: Connection reset by peer]
<Walex> ruby-lang680: you are printing references to value instead of values. Also use '.to_yaml' to make your stuff neatly printed
uri_ has joined #ruby
babblebre has joined #ruby
RegulationD has joined #ruby
saddad has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
tjbiddle has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
IrishGringo has quit [Ping timeout: 256 seconds]
freerobby has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
freerobby has quit [Client Quit]
skade has joined #ruby
circ-user-mgcmJ has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
imperator has joined #ruby
<imperator> yorickpeterse, don't suppose you have an oga for yaml laying around, do you?
puria has quit [Ping timeout: 272 seconds]
wmdrossard has quit [Ping timeout: 250 seconds]
myztic has joined #ruby
dopie has quit [Ping timeout: 272 seconds]
tesuji has quit [Ping timeout: 240 seconds]
<yorickpeterse> nop
<adaedra> what's wrong with Ruby's YAML implementation, imperator?
<yorickpeterse> No intentions either
Aasha has joined #ruby
sucks has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
lubarch has quit [Quit: leaving]
shanemcd has quit []
dlitvak has quit [Read error: Connection reset by peer]
rawrwx has left #ruby ["WeeChat 1.3"]
dlitvak_ has joined #ruby
lubarch has joined #ruby
<imperator> adaedra, apparently object creation and GC is somewhat of an issue
devbug has joined #ruby
huyderman has quit [Ping timeout: 240 seconds]
whippythellama has joined #ruby
bigmac has quit [Quit: Leaving]
blub` is now known as blub
joonty has joined #ruby
ibouvousaime_ has joined #ruby
taylan has joined #ruby
ibouvousaime has quit [Ping timeout: 272 seconds]
<taylan> any Emacs users? why is ruby-indent-tabs-mode ignored?
<shevy> matz is an emacs users and adaedra
<adaedra> er
<adaedra> I believe you're mistaken, shevy.
lubarch has quit [Client Quit]
lubarch has joined #ruby
devbug has quit [Ping timeout: 264 seconds]
x0f has quit [Ping timeout: 246 seconds]
xfbs has joined #ruby
<taylan> I use the stock ruby mode and set indent-tabs-mode and ruby-indent-tabs-mode both to t in a ruby buffer, but TAB and RET still do two-space indentation. they're bound to the commands 'indent-for-tab-command' and 'newline' respectively.
<blub> why do you want tabs in your ruby..
<taylan> editing a file that already has them
krzkrz has quit [Ping timeout: 250 seconds]
thejamespinto has joined #ruby
Guest72694 has joined #ruby
frem has joined #ruby
mary5030 has joined #ruby
cjbottaro has joined #ruby
<blub> when you get to 4 indentation levels does it insert a tab
<taylan> aha, when ruby-indent-level doesn't match tab-width, it inserts spaces
shanemcd has joined #ruby
bigmac has joined #ruby
<taylan> *sigh* emacs things
x0f has joined #ruby
<shevy> adaedra you loved emacs when we spoke about emacs versus vim!
wmdrossard has joined #ruby
Guest72694 has quit [Client Quit]
xfbs has quit [Client Quit]
<blub> emacs is good...
<adaedra> er, no. And go in -offtopic if you want to discuss it further.
<taylan> all software sucks. next topic! :P
xfbs has joined #ruby
<taylan> wow, I *also* needed to enable indent-tabs-mode. this is freaky.
xfbs_ has joined #ruby
<shevy> taylan there must be someone who is using emacs here...
ibouvousaime_ has quit [Ping timeout: 250 seconds]
<taylan> hm, it seems setting indent-tabs-mode to t and setting tab-width to something matching ruby-indent-level is sufficient, so two local variables. this is acceptable, thanks
krzkrz has joined #ruby
Jardayn has joined #ruby
p0wn3d has joined #ruby
ibouvousaime_ has joined #ruby
puria has joined #ruby
xfbs has quit [Ping timeout: 246 seconds]
xfbs_ has quit [Ping timeout: 246 seconds]
ruby-lang680 has quit [Ping timeout: 252 seconds]
jgt4 has joined #ruby
bluOxigen has joined #ruby
B1n4r10 has quit [Ping timeout: 272 seconds]
dlitvak_ has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
bmurt has joined #ruby
bmurt has quit [Remote host closed the connection]
QualityAddict has quit [Ping timeout: 256 seconds]
hobodave has joined #ruby
QualityAddict has joined #ruby
QualityAddict is now known as Guest85239
favadi has quit [Quit: Textual IRC Client: www.textualapp.com]
pu22l3r has joined #ruby
bronson has joined #ruby
rippa has joined #ruby
govg_ has joined #ruby
cjbottaro has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
NeverDie has joined #ruby
e7d has joined #ruby
DurstBurger has quit [Ping timeout: 256 seconds]
bronson has quit [Ping timeout: 256 seconds]
skade has quit [Quit: Computer has gone to sleep.]
symbol has joined #ruby
symbol has quit [Client Quit]
Spami has quit [Quit: This computer has gone to sleep]
hobodave has quit [Quit: Computer has gone to sleep.]
gguggi has quit [Ping timeout: 272 seconds]
<azgil> what about atom
<azgil> best of the best
bubbys has joined #ruby
<taylan> azgil: can I IRC in it?
<azgil> maybe
<havenwood> yup
<adaedra> what about you editor war in -offtopic
<blub> haha
InvGhost has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
<apeiros> azgil: the editor which only recently learned to open documents >2MB? :)
dlitvak has joined #ruby
<jhass> ?offtopic apeiros
<apeiros> d'oh. sorry adaedra
<ruboto> apeiros, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
kp666 has joined #ruby
colli5ion has quit []
<apeiros> yeah, yeah. right. sorry.
govg_ has quit [Ping timeout: 272 seconds]
marr has joined #ruby
moeabdol has joined #ruby
marr has quit [Excess Flood]
bubbys has quit [Ping timeout: 250 seconds]
bubbys has joined #ruby
marr has joined #ruby
Bloomer has joined #ruby
govg_ has joined #ruby
Tessier-Ashpool has joined #ruby
sucks has quit [Read error: Connection reset by peer]
B1n4r10 has joined #ruby
sucks has joined #ruby
dorei has joined #ruby
vondruch has quit [Quit: Ex-Chat]
fredbob has joined #ruby
slawrence00 has joined #ruby
akem has joined #ruby
lubarch has quit [Quit: leaving]
lubarch has joined #ruby
skade has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
lubarch has quit [Client Quit]
dopie has joined #ruby
tenderlove has joined #ruby
fredbob has quit []
yardenbar has quit [Ping timeout: 272 seconds]
sandstrom has quit [Quit: My computer has gone to sleep.]
aganov has quit [Remote host closed the connection]
govg_ has quit [Ping timeout: 256 seconds]
devoldmx has joined #ruby
govg_ has joined #ruby
brunto has quit [Ping timeout: 272 seconds]
lubarch has joined #ruby
araujo_ has joined #ruby
kalopsian has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
willywos has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
sneakerhax has quit [Ping timeout: 256 seconds]
araujo has quit [Ping timeout: 256 seconds]
rdavila has joined #ruby
araujo_ has quit [Ping timeout: 256 seconds]
IrishGringo has joined #ruby
ruby-lang507 has joined #ruby
lxsameer has joined #ruby
lxsameer has quit [Changing host]
lxsameer has joined #ruby
build22 has joined #ruby
zquad has left #ruby [#ruby]
akem has quit [Ping timeout: 250 seconds]
<ruby-lang507> Hi everyone. I'm just here kind of looking to get familiar with ruby in general.
<apeiros> ruby-lang507: welcome to #ruby then :)
<adaedra> welcome then
<adaedra> ninja'd again
<ruby-lang507> Thanks!
brunto has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
howdoico1 has joined #ruby
<ruby-lang507> I'm mostly just familiar with html and I can kind of paste php and sql code to get things done with websites but I want to understand programming and eventually do it for work
scepticulous has quit [Ping timeout: 256 seconds]
<adaedra> I see
rodfersou|lunch is now known as rodfersou
<adaedra> We have some resources to get started, if you want
<ruby-lang507> Does ruby make sense for that? I guess it's kind of a broad topic but I'm not sure where to start
<adaedra> ?links
havenn has joined #ruby
havenn has quit [Changing host]
havenn has joined #ruby
kadoppe has quit [Ping timeout: 272 seconds]
kitallis has quit [Ping timeout: 272 seconds]
<ruby-lang507> Thanks I'll have a look
<jhass> sure, ruby is just fine for that
gnarf has quit [Ping timeout: 272 seconds]
havenwood has quit [Read error: Connection reset by peer]
havenn is now known as havenwood
adam_ has quit [Ping timeout: 272 seconds]
<ruby-lang507> So what type of work would make use of ruby? I hear the term software developer thrown around
adam_ has joined #ruby
aufi has quit [Quit: Konversation terminated!]
<thejamespinto> hey guys. I need help finding the right word to search the socket docs here... I'm trying to invoke a socket.gets but the other party doesn't use \n as an EOL, it uses ] instead, can I configure that in Ruby?
kitallis has joined #ruby
kadoppe has joined #ruby
futilegames has joined #ruby
sandstrom has joined #ruby
gnarf has joined #ruby
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
devbug has joined #ruby
azgil has left #ruby ["Leaving"]
User458764 has joined #ruby
arthurix has quit [Read error: Connection reset by peer]
jgt4 has quit [Ping timeout: 240 seconds]
DurstBurger has joined #ruby
kfpratt has quit [Ping timeout: 240 seconds]
<jhass> thejamespinto: have a look at the parameter gets takes
<canton7> thejamespinto, if you keep digging into the parents of Socket, you end up finding the module which defines gets. That has a parameter which takes the separator to look for (or it also has a default value, which refers to a global which you can set)
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kalopsian has quit [Quit: leaving]
kfpratt has joined #ruby
kfpratt has quit [Remote host closed the connection]
<thejamespinto> canton7 jhass: thank you, is there a documentation where I don't have to keep digging up in the inheritance line?
darkxploit has quit [Ping timeout: 272 seconds]
synthroid has quit [Remote host closed the connection]
<jhass> thejamespinto: rubydoc.info has a summary
psy has joined #ruby
<canton7> thejamespinto, I followed the 'Parent' section of the ruby-doc.org pages
psy has quit [Max SendQ exceeded]
<jhass> thejamespinto: ri Socket#gets should also take you to the right thing
psy has joined #ruby
kalopsian has joined #ruby
<adaedra> &ri Socket#gets
<adaedra> ... great.
* havenwood pokes `derpy
<thejamespinto> it doesn't mention method gets on the side
kalopsian has quit [Client Quit]
momomomomo has joined #ruby
<adaedra> I really need to fix this bug.
baweaver has joined #ruby
<jhass> thejamespinto: mh
kalopsian has joined #ruby
kalopsian has quit [Client Quit]
kalopsian has joined #ruby
kalopsian has quit [Client Quit]
<jhass> thejamespinto: well I use http://devdocs.io, poke in the method name and pick the first plausible candidate
craigp has quit [Remote host closed the connection]
<thejamespinto> ri Socket#gets > Nothing known about Socket
<thejamespinto> ri TcpSocket#gets > Nothing known about TcpSocket
<thejamespinto> :(
<`derpy> havenwood: that was my eye.
kalopsian has joined #ruby
kalopsian has quit [Client Quit]
<apeiros> thejamespinto: means you haven't installed the docs
<apeiros> also it's TCPSocket, not TcpSocket. case matters in programming.
<apeiros> (well, unless you use nim, I guess)
devbug has quit [Ping timeout: 264 seconds]
<adaedra> (or php)
futilegames has quit [Quit: futilegames]
<apeiros> seriously?
<adaedra> yep.
<apeiros> D:
<adaedra> explode, EXPLODE and ExPLodE is the same.
<thejamespinto> apeiros: yup
<apeiros> memory suppression works :D
pu22l3r_ has joined #ruby
moei has quit [Quit: Leaving...]
<thejamespinto> apeiros: true
<canton7> wasn't there the turkish php bug? php internally up- or downcases lots of things (I forget which), and of course turkish has different rules for upcasing 'i' and downcasing 'I'...
baweaver has quit [Remote host closed the connection]
<adaedra> apeiros: indeed. That's what Lerdorf do each time he reads something about language design.
baweaver has joined #ruby
ruby-lang507 has quit [Ping timeout: 252 seconds]
jbrhbr has joined #ruby
<apeiros> adaedra: suppress his memory? :)
lubarch has quit [Changing host]
lubarch has joined #ruby
<adaedra> yes
SCHAAP137 has quit [Remote host closed the connection]
mclong has quit [Ping timeout: 240 seconds]
<adaedra> Or should I say "TrUe"
<apeiros> yES
maloik has quit [Ping timeout: 240 seconds]
moei has joined #ruby
solars has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
radgeRayden has joined #ruby
kalopsian has quit [Client Quit]
<Diabolik> is it bad practice to declare instance variables within a private method
hobodave has joined #ruby
pu22l3r has quit [Ping timeout: 240 seconds]
kalopsian has joined #ruby
dlitvak has joined #ruby
araujo_ has joined #ruby
<apeiros> Diabolik: it is excellent practice to "declare" all ivars in initialize
cajone has joined #ruby
<apeiros> and initialize is private. thus…
<thejamespinto> ok this question is really string-stupid, the sockets are sending me sequences of unreadable bytes, what is the best way to translate them into a string I can actually see? ... and modify my code to identify them
<apeiros> thejamespinto: s/unreadable/unprintable/
<apeiros> thejamespinto: .inspect
<jhass> or puts -> p
* apeiros too slow
<apeiros> (p uses .inspect)
<adaedra> p is ~ `.tap { |x| puts x.inspect }`
<thejamespinto> "\x80username\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x0012345\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00]"
kalopsia1 has joined #ruby
<thejamespinto> thank you guys! :D :D :D :D
<jhass> yeah so you have a bunch of 0 bytes there
<apeiros> ?guys thejamespinto - for your consideration
<ruboto> thejamespinto, Though inclusion was probably intended, not everyone relates to being "one of the guys". Maybe consider using "folks", "all", "y'all", or "everyone" instead?
<thejamespinto> thanks yall
<apeiros> :D
<apeiros> so little to make me happy
araujo has quit [Ping timeout: 256 seconds]
<apeiros> +necessary
brunto has quit [Ping timeout: 256 seconds]
<adaedra> mh.
<adaedra> I run a subservice that creates an HTTP server and then connect to it.
dlitvak has quit [Ping timeout: 250 seconds]
<adaedra> How can I efficiently connect to it once it's ready?
<jhass> "subservice"?
<apeiros> your problem is to know the moment when it is ready?
<adaedra> yeah
sneakerhax has joined #ruby
<apeiros> by subservice, do you mean child process?
<adaedra> yes
howdoico1 has quit [Ping timeout: 250 seconds]
<apeiros> share a pipe
<jhass> or create the listener in the parent and inherit it
<apeiros> or send a signal
<jhass> basically systemd socket activation
<adaedra> don't have control on the subproccess
Arnvald has joined #ruby
<apeiros> aha
zarubin has joined #ruby
<adaedra> Can't modify it. It just spawns a web server for me to connect to (or quit if can't)
elton has joined #ruby
<apeiros> well, don't know and gotta get some of the free food now :D
lubarch has quit [Quit: leaving]
<jhass> systemd-socket-proxyd ? :D
darkxploit has joined #ruby
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
<adaedra> And don't have access to systemd either
elton has quit [Remote host closed the connection]
<adaedra> I can just try to connect until {it connects || subprocess quits}, but it seems inefficient
badku has joined #ruby
nfk|laptop has quit [Quit: yawn]
lubarch has quit [Client Quit]
krzkrz has quit [Ping timeout: 256 seconds]
uri_ has quit [Quit: Textual IRC Client: www.textualapp.com]
[Butch] has joined #ruby
cwong_on_irc has joined #ruby
<jhass> if you have no control over it, it's your best bet
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
uri_ has joined #ruby
calderonroberto has joined #ruby
mclong has joined #ruby
synthroid has joined #ruby
<adaedra> great, thanks
araujo_ has quit [Ping timeout: 256 seconds]
s00pcan has quit [Ping timeout: 256 seconds]
sucks has quit [Read error: Connection reset by peer]
DeXterbed has joined #ruby
zarubin has quit [Ping timeout: 256 seconds]
s00pcan has joined #ruby
<apeiros> I wonder whether there's something similar to select for this kind of thing
tulak has quit [Ping timeout: 256 seconds]
kmckelvi1 has joined #ruby
<apeiros> but I guess you'd have to go pretty lowlevel with the socket class for that
kmckelvin has quit [Read error: Connection reset by peer]
badku has quit [Ping timeout: 252 seconds]
jas02 has quit [Quit: jas02]
supermarin has joined #ruby
<thejamespinto> translating legacy C# byte socket communication to an actual programming language can be tough
pu22l3r_ has quit [Remote host closed the connection]
pu22l3r has joined #ruby
DeXterbed has quit [Client Quit]
Bloomer has quit [Remote host closed the connection]
dmr8 has joined #ruby
supermarin has quit [Remote host closed the connection]
Arnvald has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
Arnvald has joined #ruby
elton has joined #ruby
wmdrossard has quit [Ping timeout: 240 seconds]
skade has quit [Quit: Computer has gone to sleep.]
KensoDev has quit [Remote host closed the connection]
psy has quit [Disconnected by services]
moeabdol has quit [Ping timeout: 272 seconds]
platzhirsch has joined #ruby
psy_ has joined #ruby
<platzhirsch> How would you undo a monkey patch programatically?
TomPeed has quit [Read error: Connection reset by peer]
<apeiros> platzhirsch: File.delete(__FILE__)
<apeiros> you can't.
<apeiros> unless special provisions were made to preserve the original state.
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
imperator has left #ruby ["Leaving"]
tenderlove has joined #ruby
<platzhirsch> apeiros: exaclty... maybe with alias
<platzhirsch> mhm
_stu_ has quit [Quit: _stu_]
krzkrz has joined #ruby
sh4d0wD has joined #ruby
Arnvald has quit [Ping timeout: 272 seconds]
elton has quit [Ping timeout: 240 seconds]
baroquebobcat has joined #ruby
<apeiros> platzhirsch: depends on the kind of monkey-patch
s00pcan has quit [Ping timeout: 240 seconds]
<platzhirsch> apeiros: method override
<apeiros> but if you feel the need to reverse a monkey-patch, you probably should design it in a way you don't need that patch
<havenwood> platzhirsch: You might want to look at refinements: http://ruby-doc.org/core/doc/syntax/refinements_rdoc.html
<apeiros> f.ex. by using refinements
<apeiros> damit!
_stu_ has joined #ruby
* apeiros scowls at havenwood
<havenwood> ;)
<apeiros> btw. havenwood - is rvm using your binary ruby on osx?
<havenwood> apeiros: yup
<apeiros> because rbconfig reports /Users/haven in a couple of places…
<havenwood> apeiros: yeah, there's no flag to disable those historical build flags
<platzhirsch> yeah I am working with Ruby and RSpec 1 where I cannot stub properly, so I brutually stubbed it with a monkey patch
<platzhirsch> it's horrible, cannot look into the mirror
platzhirsch has left #ruby [#ruby]
platzhirsch has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
s00pcan has joined #ruby
<apeiros> havenwood: hm
<apeiros> some of those caused warnings for me, e.g. "LDFLAGS"=>"-L. -L/Users/haven/.sm/pkg/active/lib …"
kurtf has joined #ruby
<havenwood> apeiros: I think it's been requested but it's not been added. Yeah, it's not hurting anything but everyone thinks I broke their computer.
<apeiros> heh
uri_ has quit [Quit: --]
fibbel has quit [Quit: fibbel]
<havenwood> apeiros: I've been meaning to move the build to Travis, but alas, no time, no time!
<apeiros> time?
TomPeed has joined #ruby
<apeiros> wazzat?
kurtf has quit [Client Quit]
<apeiros> edible?
agit0 has joined #ruby
kalopsian has quit [Quit: Lost terminal]
_uri_ has joined #ruby
kmckelvi1 has quit [Ping timeout: 272 seconds]
amclain has joined #ruby
* adaedra eats apeiros
skade has joined #ruby
_uri_ has quit [Client Quit]
Mac|AFK has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
huyderman has joined #ruby
rakm has joined #ruby
joonty has quit [Quit: joonty]
adac has quit [Ping timeout: 256 seconds]
_uri_ has joined #ruby
_uri_ has quit [Client Quit]
kalopsian has joined #ruby
_uri_ has joined #ruby
dlitvak has joined #ruby
djbkd has joined #ruby
skade has quit [Client Quit]
kalopsian has quit [Client Quit]
kalopsian has joined #ruby
hobodave has quit [Quit: Computer has gone to sleep.]
cdg has joined #ruby
kalopsian has quit [Client Quit]
sepp2k has quit [Quit: Leaving.]
djbkd has quit [Ping timeout: 250 seconds]
dionysus69 has joined #ruby
atumzin has joined #ruby
jbrhbr has quit [Quit: Leaving.]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
troyready has joined #ruby
last_staff has joined #ruby
colegatron has quit [Ping timeout: 250 seconds]
sankaber has quit [Quit: Textual IRC Client: www.textualapp.com]
dionysus69 has quit [Client Quit]
agit0 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
senayar has quit []
kalopsian has joined #ruby
The_Phoenix has joined #ruby
kalopsian has quit [Client Quit]
x0f has quit [Ping timeout: 272 seconds]
kalopsian has joined #ruby
x0f has joined #ruby
SCHAAP137 has joined #ruby
kalopsian has quit [Client Quit]
j2p2test has quit [Quit: Page closed]
kalopsian has joined #ruby
tomphp has joined #ruby
nettoweb has joined #ruby
agit0 has joined #ruby
ramfjord has joined #ruby
<c-c> Am I right in thinking that Ruby::Yaml.load ignores the $LOAD_PATH
<jhass> what#s Ruby::Yaml even
<c-c> eh, I mean YAML::load_file
<jhass> why would that respect $LOAD_PATH
tenderlove has joined #ruby
hxegon has joined #ruby
<jhass> $LOAD_PATH is for require, nothing else
tenderlove has quit [Remote host closed the connection]
<jhass> (well Kernel#load, but details)
calderonroberto has quit [Ping timeout: 240 seconds]
kalopsian has quit [Client Quit]
howdoico1 has joined #ruby
DiCablo has joined #ruby
<c-c> yep, seems so
dlitvak has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
chipotle has joined #ruby
kalopsian has joined #ruby
dfinninger has quit [Remote host closed the connection]
lurch_ has quit [Quit: lurch_]
kalopsian has quit [Client Quit]
colegatron has joined #ruby
hxegon has quit [Ping timeout: 240 seconds]
calderonroberto has joined #ruby
hobodave has joined #ruby
demonlove has joined #ruby
RobertBirnie has joined #ruby
dmolina has quit [Quit: Leaving.]
howdoico1 has quit [Ping timeout: 272 seconds]
IrishGringo has quit [Ping timeout: 256 seconds]
Anderson69s_Deb has joined #ruby
demonlove is now known as kkngiht
arup_r has joined #ruby
Anderson69s_Deb has quit [Remote host closed the connection]
freerobby has joined #ruby
mchu has joined #ruby
kalopsian has joined #ruby
chipotle has quit [Quit: cheerio]
nertzy has joined #ruby
chipotle has joined #ruby
B1n4r10 has quit [Ping timeout: 240 seconds]
kfogel has joined #ruby
<kfogel> mchu: I'm in here too, to watch any conversation
zarubin has joined #ruby
Anderson69s_Deb has joined #ruby
zast has joined #ruby
casadei has quit [Remote host closed the connection]
* jhass feels stalked
casadei has joined #ruby
<eam> watching intensifies
kalopsian has quit [Quit: leaving]
kalopsian has joined #ruby
bronson has joined #ruby
kalopsian has quit [Client Quit]
aryaching has quit []
kalopsian has joined #ruby
<kfogel> eam: :-)
kalopsian has quit [Client Quit]
zarubin has quit [Ping timeout: 272 seconds]
kalopsian has joined #ruby
kalopsian has quit [Client Quit]
kalopsian has joined #ruby
symm- has quit [Ping timeout: 240 seconds]
krzkrz has quit [Read error: Connection reset by peer]
jbrhbr has joined #ruby
TomyWork has quit [Ping timeout: 246 seconds]
<Sou|cutter> everyone quiet, it's the fuzz :x
<slash_nick> http://www.bbc.com/news/uk-35058761 (programming/crypto challenge for yall folks)
mg^^ has joined #ruby
crunk_bear has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<slash_nick> as if i'm not losing enough sleep solving the "advent of code" challenges that drop daily at 2300
<c-c> Do you think it is wise to rely on OpenStructs as properties of OpenStructs being referenced correctly?
drptbl has joined #ruby
<c-c> >> require 'ostruct'; foo = OpenStruct.new; car = OpenStruct.new(:foo => foo); foo.nu = "Woot!"; car
<ruboto> c-c # => #<OpenStruct foo=#<OpenStruct nu="Woot!">> (https://eval.in/483482)
Aasha has quit [Ping timeout: 240 seconds]
jpfuentes2 has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
saddad has quit [Ping timeout: 256 seconds]
* Sou|cutter shrugs at c-c
weckl has quit [Remote host closed the connection]
<Sou|cutter> I prefer classes to ostructs generally, but I don't see the big deal
<pipework> I use ostructs when there's absolutely no behaviour and I'm just passing around 'data bags'
<c-c> I just wanna ditch the classes and work with objects.
<pipework> When the data itself belongs together, that is.
<c-c> And yeah, this is for conf-objects, definitions
<c-c> Some of those will end up being iterated into classes, eventually, though
<pipework> c-c: got an example of what you're hoping to see?
<pipework> I love to write code where I start with the fun part and write the code I want to see and then fill in the rest.
Wsewolod has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
<c-c> Not yet, but I'm just wondering if this is subject to change.
kmckelvi1 has joined #ruby
dstarh has quit [Quit: Textual IRC Client: www.textualapp.com]
<pipework> wrt what exactly?
lubarch has quit [Quit: leaving]
<c-c> OpenStruct properties being references, not clones
<pipework> c-c: It probably won't change.
<pipework> If you need an object which is a dup of a set of objects, you could do that, but you'll probably want a deep_dup then.
<c-c> yup
<c-c> I've been writing a lot of ecmascipt
<c-c> ruby feels like a new language again :D
<pipework> c-c: Are you using 6?
<c-c> sadly, no I wasnt
chipotle_ has joined #ruby
yardenbar has joined #ruby
supermarin has joined #ruby
chipotle has quit [Read error: Connection reset by peer]
d0nn1e has quit [Excess Flood]
d0nn1e has joined #ruby
devoldmx has joined #ruby
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
TheHodge has quit [Quit: Connection closed for inactivity]
<pipework> c-c: I'm stoked because I get to hack on/up/around the new RPGMaker version's new javascript-based API's and game engine stuff. It runs on ES6 with shims and probably some babel use for browser compat.
shanemcd has quit [Remote host closed the connection]
<pipework> It ships with NW.js and other stuff though, so I'm pretty sure I can get in there and add a bunch of stuff, like events and doing super cool shit in the service worker and web workers.
FooMunki has quit [Quit: FooMunki]
troulouliou_div2 has quit [Quit: Leaving]
Marsupermammal has joined #ruby
<c-c> pipework: nice
hobodave has quit [Quit: Computer has gone to sleep.]
drptbl has quit [Quit: My MAC has gone to sleep. zZz..]
<c-c> pipework: hows RPGMaker?
RegulationD has quit [Remote host closed the connection]
<pipework> c-c: I've never made anything worthwhile in it, but I've had a lot of fun with playing with scripting.
FooMunki has joined #ruby
<pipework> What's sweet is that instead of a crippled ruby 1.9, I have a fully featured JS environment.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<pipework> XMLHttpRequest, Worker, ServiceWorker, etc.
chipotle_ is now known as chipotle
devoldmx has quit [Ping timeout: 240 seconds]
ramfjord has joined #ruby
<c-c> why would you have crippled ruby?
dlitvak has joined #ruby
KensoDev has joined #ruby
<pipework> c-c: The ruby they embedded was a fork with some patches that limited the ruby and removed stuff.
<c-c> ok, so RPGMaker is scripted with ruby?
User458764 has joined #ruby
<pipework> c-c: The older versions are, the newest is ES6.
minimalism has joined #ruby
shanemcd has joined #ruby
dfinninger has joined #ruby
dfockler has joined #ruby
shanemcd has quit [Remote host closed the connection]
<c-c> well, I'm miles from even having a proper start
<c-c> I'm wondering how I should scope things in an engine that is basically a loop
nertzy has quit [Quit: This computer has gone to sleep]
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ihatenickers has joined #ruby
<c-c> I'veo decided to scope most of my 'engine' under one single global variable. Like this: _conf = OpenStruct.new; # load values into _conf; _stuff = OpenStruct.new; # again, set/load; ... $core = OpenStruct.new(:conf => _conf, :stuff => _stuff, :etc => etc)
<ihatenickers> anyone know js?
djbkd has joined #ruby
<c-c> What are the negatives of using this type of scoping
<c-c> ihatenickers: the know js at #javascript where you should ask
Peg-leg has quit [Quit: Leaving.]
dlitvak has quit [Read error: Connection reset by peer]
jessemcgilallen has joined #ruby
lubarch has quit [Quit: Reconnecting]
Marsupermammal has quit [Quit: Textual IRC Client: www.textualapp.com]
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
lubarch has quit [Client Quit]
lubarch has joined #ruby
dlitvak has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Bloomer has joined #ruby
Ishido has quit [Remote host closed the connection]
<c-c> Hm, perhaps somewhere is a nice article on "This is how you must scope your app in Ruby 2.0"
<pipework> c-c: When you say 'scope your app', what do you mean?
tomphp has joined #ruby
<pipework> Do you mean that you want to limit the entrypoints to your application to a single thing and have all the other code essentially inaccessible?
Ishido has joined #ruby
kknight has joined #ruby
tenderlove has joined #ruby
banister has joined #ruby
tenderlove has quit [Remote host closed the connection]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
pu22l3r has quit []
yardenbar has quit [Ping timeout: 240 seconds]
tenderlove has joined #ruby
<c-c> pipework: I mean, where are the different variables visible, basically
podman has joined #ruby
jessemcgilallen has quit [Quit: jessemcgilallen]
tomphp has quit [Client Quit]
<c-c> modules, variables
symm- has joined #ruby
<c-c> lol I'm beginning to remember
<pipework> c-c: I sometimes play along these lines. I haven't hit a perfect feeling approach, but I do tinker.
<c-c> I should use module scope
Rtransat has joined #ruby
neonalpine has joined #ruby
RegulationD has joined #ruby
<c-c> or perhaps this "app boostrap/core" is a special case
taylan has left #ruby ["Using Circe, the loveliest of all IRC clients"]
<c-c> Anyway, so far I have one global variable, half a dozen root-scope ones. I suppose the rest will be "under" the global variable OpenStruct, or module/class scopes
<Rtransat> Hi, I'm new with ruby and I'm trying to create a gem, I use bundler and after my gem generation I use in my projet which use that gem a Gemfile with gem "my_gem", :path => "H:\\ruby\\my_gem\\my_gem" but I have an error require cannot load such file -- my_gem
ihatenickers has quit [K-Lined]
KensoDev has quit []
<pipework> c-c: When you say global, do you mean like $RUBY_GLOBAL_VARIABLES, or just a variable in the top-level 'main' scope?
<Rtransat> bundle install work, it can find my path but with the require 'my_gem' it throw the exception
tenderlove has quit [Ping timeout: 256 seconds]
<c-c> Rtransat: so, first I would see "File.join"
<Rtransat> c-c ?
<c-c> pipework: there are only one kinds of global variables in ruby
kknight has quit [Quit: Leaving]
kkngiht has quit [Quit: Leaving]
<pipework> c-c: Yeah, I was just checking whether you actually meant globals.
<pipework> Why are you using globals?
<c-c> Rtransat: obviously your path doesn't resolve correctly with things like double slashes. Fix that first.
howdoi has quit [Quit: Connection closed for inactivity]
<c-c> pipework: did you not read what I wrote?
<c-c> First, I am not using globals...
<pipework> I'd rather use a constant than a namespace, on principle, but what are you doing that means you need a global rather than something just always accessbile?
kknight has joined #ruby
<pipework> [10:26:19 AM] <c-c>Anyway, so far I have one global variable, half a dozen root-scope ones. I suppose the rest will be "under" the global variable OpenStruct, or module/class scopes
kknight has quit [Max SendQ exceeded]
<Rtransat> c-c still not working with "/" after another bundle install
<c-c> Rtransat: I think you have many problems
<c-c> Rtransat: prepare code pastie or gist
<Rtransat> I think to
<Rtransat> ok ;)
<c-c> Rtransat: then locate one problem you can ask one question about
<pipework> s/namespace/global/
<c-c> pipework: it says "one".
kknight has joined #ruby
<pipework> c-c: Yeah, why are you using them?
dlitvak has quit [Read error: Connection reset by peer]
<pipework> Why not just assign to a constant in the top-level namespace?
<c-c> pipework: I'm not.
<pipework> c-c: So you are using a global, but you aren't?
<pipework> ruby truly is magical.
dlitvak has joined #ruby
steffkes has quit [Ping timeout: 250 seconds]
<c-c> pipework: hmmmm, what are 'constants'? Are constants variable?
shanemcd has joined #ruby
hobodave has joined #ruby
arup_r has quit []
<pipework> c-c: Ruby allows you to assign a constant to a new object all you want, but it raises warnings.
<c-c> pipework: I am using one global. Not 'globals'.
<pipework> c-c: The plurality doesn't matter. Why are you using any variables at all whose type is global?
bean has joined #ruby
<pipework> You can, however, modify objects in place that are assigned to constants without raising warnings.
baweaver has joined #ruby
baweaver has quit [Read error: Connection reset by peer]
<c-c> pipework: ok, riddle me this. You have root/main scope variable: foo = 1; Next you declare a method: def foo_adder; foo += 1; end. What happens?
baweaver has joined #ruby
<pipework> c-c: Nothing other than a method gets defined.
<pipework> Do you call it
<pipework> c-c: Feel free to share some code rather than trying to explain it if you happen to have any.
momomomomo has quit [Quit: momomomomo]
lubarch has quit [Quit: leaving]
<c-c> >> foo = 1; def foo_adder; foo += 1; end; foo_adder
<ruboto> c-c # => undefined method `+' for nil:NilClass (NoMethodError) ...check link for more (https://eval.in/483514)
<c-c> pipework: so, how do you solve the nil error?
supermarin has quit [Remote host closed the connection]
Cantaberry has quit []
rdark has quit [Ping timeout: 272 seconds]
shanemcd has quit [Remote host closed the connection]
Ox0dea has joined #ruby
<pipework> c-c: I'm just a bit confused on how we got from where we were to here.
achamian has joined #ruby
<c-c> pipework: well, you asked why I was using a global variable
<Ox0dea> c-c: Are you sure you need `$core` to be accessible from *anywhere* in your application?
<c-c> sure
<pipework> c-c: Ah so you're just doing like, all your work, in the top level namespace?
last_staff has quit [Quit: last_staff]
<pipework> Ox0dea: I'm on the same track trying to figure it out.
<pipework> It's all you though, I've got to break more tests.
<Ox0dea> c-c: module YourApp; CORE = {foo: 1, bar: 2}; end
<c-c> just tell me the anwer to that code
<c-c> yeah, thats a nice solution
<Ox0dea> c-c: The answer is that you use something other than a local variable.
rakm has joined #ruby
cpup has quit [Ping timeout: 246 seconds]
<pipework> c-c: You won't be able to use a local there.
<Ox0dea> But replacing a local with a global is the nuclear option.
<pipework> It's not available in the scope of the method defined on the eigenclass of main.
achamian has quit [Client Quit]
<c-c> orly
<bean> yeah, I'd take a look at understanding variable scoping c-c
supermarin has joined #ruby
<c-c> so, theres two choices, global variable or module/class sscoping
<pipework> Ox0dea: It's marginally superior to burning down the office and building a new one closer to home though.
<pipework> c-c: There's many more than that.
<Rtransat> c-c: did you see my gist ?
dc__ has joined #ruby
puria has quit [Ping timeout: 240 seconds]
<pipework> local, instance, constant, global (forget class variables, you'll probably never come up with a reason to use them legitimately in a nice way.)
dc__ has quit [Client Quit]
bean has quit [Changing host]
bean has joined #ruby
<c-c> lol no, you cannot use a local/instance var there
<Ox0dea> c-c: You could use an instance variable.
<Ox0dea> You shouldn't, but you could.
shanemcd has joined #ruby
puria has joined #ruby
<apeiros> pipework: re cvars: if you list them that way, add gvars there too ;-)
<Ox0dea> c-c: I wonder, have you come to Ruby from Clojure?
<Ox0dea> pipework: You missed the "virtual" globals like $~ and its descendants.
cscheib has left #ruby [#ruby]
<c-c> Ox0dea: npåe
<Ox0dea> For the better, really. :P
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kknight> hey ruby has relesed gsoc-2016 idea?
<Ox0dea> c-c: ?
neonalpine has quit [Remote host closed the connection]
<c-c> Ox0dea: no, but I do like schemes and lisps
davedev2_ has joined #ruby
<Ox0dea> c-c: Aye, I suppose I should've asked more generally.
User458764 has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
WizJin has quit [Excess Flood]
<Ox0dea> "Data all the things!" isn't a bad idea, but it's not the most idiomatic approach in Ruby.
zarubin has joined #ruby
shanemcd has quit [Remote host closed the connection]
<c-c> Rtransat: quickly looking, I cannot spot the problem
<c-c> Ox0dea: what do you mean?
<Rtransat> we are 2 :)
stannard has quit [Remote host closed the connection]
Synthead has joined #ruby
<c-c> Rtransat: perhaps the line 48 needs to happen at a different time
stannard has joined #ruby
<pipework> Ox0dea: Oh, right. :(
dlitvak has quit [Read error: Connection reset by peer]
treehug88 has joined #ruby
<Rtransat> if I do a bundle show my_gem my path is correct
<c-c> I've never built a gem, though
dlitvak has joined #ruby
<Rtransat> or maybe I need to call a bundle build
<Rtransat> but for developpment testing is heavy :/
<Rtransat> if I need to built the gem each time there are diff
supermarin has quit []
<c-c> well, if you change it, the you do :)
lapide_viridi has quit [Quit: Leaving]
<Ox0dea> c-c: Well, you want to use a Hash as your app's "God object"; that's an idea that's caught on in the functional world, but it doesn't quite transfer to Ruby.
pandaant has quit [Remote host closed the connection]
<c-c> OpenStruct
zarubin has quit [Ping timeout: 240 seconds]
<Ox0dea> OpenStruct is Hash with unnecessary baggage. :P
<c-c> Tell that to C++
colleenmcguckin has joined #ruby
<Ox0dea> ?
WizJin has joined #ruby
lubarch has joined #ruby
lubarch has joined #ruby
lubarch has quit [Client Quit]
DexterLB has quit [Ping timeout: 260 seconds]
ruid has joined #ruby
ruid has quit [Changing host]
ruid has joined #ruby
banister has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mchu has quit [Quit: mchu]
<c-c> Also, openstruct has nicer setter/getter syntax
c0m0 has quit [Ping timeout: 250 seconds]
calderonroberto has quit [Remote host closed the connection]
<bean> you can just use attr_accessor
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
DexterLB has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
lubarch has quit [Client Quit]
tenderlove has joined #ruby
<c-c> no, no classes
blaxter has quit [Quit: foo]
lemur has joined #ruby
<Ox0dea> c-c: Wrong channel.
<bean> If you insist on using it like that thats on you c-c
DiCablo has quit [Quit: Textual IRC Client: www.textualapp.com]
kmckelvi1 has quit [Ping timeout: 250 seconds]
<Ox0dea> c-c: Why Ruby?
<bean> in the real world we use classes
jessemcgilallen has joined #ruby
nalkxulkuk has joined #ruby
<baweaver> enough with that "in the real world" nonsense
<baweaver> it's posturing and it's rude
devbug has joined #ruby
<c-c> Sure, I've only used ruby since 2006
<bean> It's not wrong, though.
<c-c> its condescending
fulgore_ has quit [Ping timeout: 256 seconds]
<baweaver> I don't care
akem has joined #ruby
kmckelvi1 has joined #ruby
supermarin has joined #ruby
<baweaver> If it's wrong, you say why, you don't pull this "in the real world" junk
<baweaver> That's how people learn
berserk_ren has joined #ruby
<baweaver> Not condescending eye-roll speeches about "how dare you use this"
DexterLB has quit [Read error: Connection reset by peer]
craigp has joined #ruby
<c-c> Ox0dea: how is this a wrong channel? Strange, someone should have told me earlier, I've only been here since 2009
tenderlove has quit [Ping timeout: 256 seconds]
shanemcd has joined #ruby
<baweaver> c-c: better ways to phrase that
<nalkxulkuk> hello
<Ox0dea> c-c: Ruby is probably the wrong language for you if you're staunchly against using classes.
<nalkxulkuk> classes are kinda stupid
nettoweb has joined #ruby
<c-c> Ox0dea: well, thats just like, probably your opinion, man
shanemcd has quit [Remote host closed the connection]
<jhass> !ban nalkxulkuk !T 1w bye troll
<eam> Ox0dea: I don't agree with that, I think classes are often a dumb way of going about approaching a program structure
nalkxulkuk was kicked from #ruby by ChanServ [Banned: bye troll]
<eam> it's fine to write non-class oriented code in ruby
<apeiros> damit
<apeiros> I knew something was with that nick
lemur has quit [Ping timeout: 256 seconds]
dmcp has joined #ruby
<Ox0dea> >> $Ruby.is_a?(Object) { |oriented| language } # c-c eam
<ruboto> Ox0dea # => true (https://eval.in/483517)
KOOLKLUXKLAN has joined #ruby
KOOLKLUXKLAN was kicked from #ruby by ChanServ [Banned: bye troll]
<c-c> Ox0dea: spare your time. I know all about it.
<baweaver> Be nice
fulgore_ has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
<baweaver> c-c: uncalled for
<Ox0dea> baweaver: You're derailing with kindness.
mchu has joined #ruby
DexterLB has joined #ruby
dlitvak has joined #ruby
kknight has quit [Quit: Leaving]
gizmore has joined #ruby
<eam> kindness is fine, it's also fine to share opinions on style
crunk_bear has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c> Yes, I am evil and like literal styles and mixins and objects, instead of classes and inheritance
<baweaver> as long as they're backed up by more than "that's wrong"
<baweaver> anyways, brb
baweaver has quit [Remote host closed the connection]
<eam> OO style has nothing to do with whether things in ruby are objects or not
<eam> and Ox0dea I know you know better than to claim otherwise :)
momomomomo has joined #ruby
crunk_bear has joined #ruby
<Ox0dea> Wait, how are OO and classes not inextricably linked?
tulak has joined #ruby
<apeiros> Ox0dea: there's more OO than class based OO ;-)
tomphp has joined #ruby
<apeiros> prototypical, f.ex.
<eam> Ox0dea: if it were impossible to use non-OO semantics in ruby then this conversation couldn't occur in the first place (where someone says "I don't like to do it that way")
tulak has quit [Remote host closed the connection]
<Ox0dea> Is there a command to check which channel I'm in?
james1 has left #ruby ["WeeChat 0.4.2"]
<shevy> Ox0dea yeah /j #0 or something!
<apeiros> Ox0dea: quit and join the one you want
Ox0dea has left #ruby ["WeeChat 1.4-dev"]
Ox0dea has joined #ruby
<shevy> apeiros hahaha
<Ox0dea> apeiros: Did it work?
<bean> lol
<apeiros> no, you're still in the wrong channel, Ox0dea
<shevy> I think there is some status command
momomomomo has quit [Client Quit]
<apeiros> must be some kind of irc-warpfield/-wormhole.
momomomomo has joined #ruby
<apeiros> you should readjust your flux-compensator
jtperreault has joined #ruby
tomphp has quit [Client Quit]
zast has left #ruby [#ruby]
mchu has quit [Ping timeout: 256 seconds]
<blub> rubys missing some important pieces to write good code without classes..its a pretty opinionated language design.....
neonalpine has joined #ruby
<jhass> you say that as if it's a bad thing
neonalpine has quit [Remote host closed the connection]
<c-c> well, at least I don't have to write the Classes
<shevy> you can use top-level defined methods of course
<shevy> but it leads to a lot of spaghetti design
<shevy> and $vars
<apeiros> blub: depends on what you write
<apeiros> a shell script of a couple dozen lines doesn't necessarily need a single class definition
<blub> its whatever just it seems to me ruby lets you pick whatever you want, as long as that's either clean oo code or dumb procedural
<apeiros> and might even be more readable for it
<blub> ya i mean for structuring large programs
<bean> Imo if you're writing anything of any substantial length / complexity you're better off using classes.
<apeiros> personally I prefer classes, even with small scripts.
chthon has quit [Ping timeout: 255 seconds]
<Ox0dea> Compartmentalization is a Good Thing.
<Ox0dea> Like, science-wise.
<apeiros> and yeah, IMO anything sufficiently large will quickly be messy without classes.
<bean> Unless you like polluting the global namespace.
<blub> sometimes oo isnt the tidiest way to compartmentalise
hxegon has joined #ruby
<c-c> >> $evil_polutions_var
<ruboto> c-c # => nil (https://eval.in/483519)
<Ox0dea> Are we about to bikeshed on what color we should paint the black box?
<jhass> blub: and I'd say for those cases Ruby simply is the wrong language then. Nothing wrong about that
<jhass> Ox0dea: #010101, we can save so much ink!
<Ox0dea> It's brilliant!
aryaching has joined #ruby
<blub> ya sure, i was just responding to people saying you don't have to use classes, because for a clean, larger program in ruby, you kind of do
<Ox0dea> More people should use Whitespace; it's the most environmentally friendly language.
tomphp has joined #ruby
baweaver has joined #ruby
B1n4r10 has joined #ruby
<jhass> Ox0dea: given you use a black backgrounded editor of course
tomphp has quit [Client Quit]
<Ox0dea> Also AMOLED.
chipotle has quit [Read error: Connection reset by peer]
<c-c> are you using classes as synonym for modules?
<Ox0dea> Also nobody prints computer programs anymore. :<
<jhass> Ox0dea: actually do you know how much chemicals are needed to get truly white paper?!
ruid has quit [Ping timeout: 272 seconds]
momomomomo has quit [Quit: momomomomo]
<hxegon> Ox0dea: I print my programs on a typewriter in a starbucks
<Ox0dea> jhass: Are there quite so many?
<Ox0dea> hxegon: Then you are under something vaguely resembling a moral compunction to learn Whitespace. :P
<hxegon> double tab master race
<shevy> ohhh starbucks brogramming
chipotle has joined #ruby
puria has quit [Ping timeout: 272 seconds]
<Ox0dea> I suppose you didn't intend to convey that heap access is the best part of programming in Whitespace?
<c-c> I suppose you thought you were in -offtopic?
speakingcode has quit [Ping timeout: 240 seconds]
<Ox0dea> Calm down.
<hxegon> Ox0dea: what the f*ck... This person needs to stop programming over an indian burial ground
<Ox0dea> hxegon: Which person is that? (I speak Whitespace fluently.)
* c-c 's feelings are also off-topic
<hxegon> Ox0dea:
puria has joined #ruby
skade has joined #ruby
<Ox0dea> >> Array.is_a? Module # c-c
<ruboto> Ox0dea # => true (https://eval.in/483527)
<Ox0dea> Classes are essentially just instantiable modules in Ruby.
tomphp has joined #ruby
<c-c> No
<c-c> try again
<c-c> Classes are a subclass of ......?
<Ox0dea> Are you saying that classes aren't modules?
<shevy> it feels weird if you want to make up a distinction between modules and classes in ruby really
tomphp has quit [Client Quit]
<apeiros> c-c: classes are subclasses of what you specify it to be (default Object). Class is subclass of Module.
<Ox0dea> The only distinction of genuine consequence is instantiability.
* apeiros wondering about the point
<c-c> apeiros wins
<Ox0dea> c-c: Did you know that Ruby classes were modules?
tomphp has joined #ruby
<shevy> we can define #new for modules too!
Rtransat has quit [Ping timeout: 252 seconds]
<apeiros> shevy: we can't allocate them, tho, and hence not instantiate.
<Ox0dea> And define it to return what?
<c-c> No, I always thought modules were superclasses of classes
<shevy> perhaps one can use Fiddle to access to that allocate thing
<Ox0dea> Why on earth are you talking in the plural for this?
<apeiros> a module is not a superclass. but it ends up in the ancestry via include/extend
<apeiros> (not sure how prepend works)
<Ox0dea> Same idea.
<Ox0dea> Just sticks it at the front of the ancestor chain.
<eam> one can claim that any object in a language is a class, of course
<apeiros> mhm, that was my assumption
<apeiros> eam: how so?
<eam> apeiros: what's a class?
<apeiros> eam: where?
<Ox0dea> >> m = Module.new; Class.new.prepend(m).ancestors[0] == m
<ruboto> Ox0dea # => true (https://eval.in/483528)
<eam> I'm asking for your definition so I can show you
<shevy> :)
<shevy> a class is a blueprint for an object!
<apeiros> eam: and I ask you for which definition. there's "generic" and there's "in language X"
<eam> any is fine
<c-c> apeiros: I don't believe you - irb told me different!
<c-c> >> Class.superclass
<ruboto> c-c # => Module (https://eval.in/483529)
<apeiros> c-c: Module isn't a module
<Ox0dea> Still on irb after nine years?
* bean points out that Pry is pretty cool.
<shevy> shows you how good irb is
tomphp has quit [Client Quit]
<eam> you can have object oriented design in a language without classes, and non-object oriented design in a language with (almost) nothing but classes
<c-c> Irb-envy much?
<Ox0dea> No, Pry is amazing.
calderonroberto has joined #ruby
<apeiros> eam: ok, my generic definition would be about "a class is a template for its instances, defines the methods and attributes of its instances"
Xentil has quit [Ping timeout: 256 seconds]
<apeiros> informal, mind you
<eam> ok so a C integer is a class?
<eam> it's a template for its instances, defining its data and behavior
<apeiros> eam: what are the instances of a C integer?
<shevy> hmm... do you instantiate a C integer?
<eam> 0x123
<Ox0dea> Is that instantiation?
crunk_bear has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros> eam: but 0x123 is a C integer. does that mean it's its own instance?
<eam> it is when sitting in memory
<Ox0dea> Why?
<eam> by definition
<Ox0dea> A wild existence proof appeared!
<c-c> eam class based OO is just one way to realize the 4 base concepts of OO
<Ox0dea> It's not very effective...
<eam> the same reason a ruby object is an instance of a class when sitting in memory
dangerousbeans has joined #ruby
<c-c> eam: a C integer probably leaves 2 out of 4 unimplemented
<eam> you may use any proof as one for the other
codelurker has joined #ruby
govg_ has quit [Ping timeout: 250 seconds]
<shevy> c-c 4 base concepts?
<eam> this is where we have an uncomfortable chat about polymorphism in ruby
<apeiros> eam: given that the C integer does not define methods, lacks a class definition, I'd say no, it's not a class by my own definition.
<Ox0dea> eam: Seen Ova? :P
_uri_ has quit [Quit: --]
<eam> it does have methods, and it has a clear definition
<c-c> shevy: Abstraction, Encapsulation, Inheritance, Polymorphism
<eam> in fact, the methods are implemented in hardware ...
uri_ has joined #ruby
<apeiros> and different "instances" of 0x123 in memory are more like copies than instances of a template.
<apeiros> eam: there's a difference between a function and a method
<apeiros> what you describe are functions. and the hardware functions actually care little that they deal with integers.
<eam> I like where c-c was going, but only because it undermines the idea that ruby is OO ;)
<Ox0dea> Where was c-c going?
<eam> apeiros: methods are functions attached to an object
[Butch] has quit [Quit: I'm out . . .]
pdoherty has joined #ruby
<apeiros> eam: meh, it only works if you allow arbitrarily twisting accepted terms.
<eam> yes, that's my point
<c-c> eam: ok, tell me how, too?
<apeiros> eam: you can make a chair a table with that
<apeiros> eam: and that's utterly pointless.
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
<eam> apeiros: it's either pointless or it's the crux of this issue
juddey has joined #ruby
shadoi has joined #ruby
psy_ has quit [Read error: Connection timed out]
prestorium has quit [Quit: Leaving]
<apeiros> eam: communication isn't hard science. trying to force it to be one is silly.
darkf has quit [Quit: Leaving]
<c-c> semantics
<Ox0dea> Facetious.
<eam> apeiros: I agree, but that statement bolsters my point I think
<apeiros> eam: if we'd go on that route, I could simply just say "everything you say is wrong"
RegulationD has quit [Remote host closed the connection]
ramfjord has quit [Ping timeout: 256 seconds]
<eam> after all, I'm the one saying these semantics around OO are being oversold
<apeiros> eam: I'd disagree
<apeiros> eam: I'd agree that the borders are blurred
<Ox0dea> Let's all turn to Ecclesiastes 1.
<Ox0dea> That Solomon fella was onto somethin'.
<apeiros> eam: I'd agree that you can apply the way you think about one thing to another which is not considered to be using the same systematics
dlitvak has quit [Read error: Connection reset by peer]
<apeiros> eam: but I'd also strongly disagree that using the terminology of the other systematics is a sane idea.
dlitvak has joined #ruby
Bloomer has quit [Remote host closed the connection]
<apeiros> eam: and also, where you're going at is related to what I referred to as "class in general" vs. "class in C"
<dfockler> All my functions in Clojure are just methods on an anonymous singleton class
<apeiros> s/C/language X/
<eam> apeiros: sure
platzhirsch has quit [Remote host closed the connection]
<eam> dfockler: a C object file is a compiled class
<eam> it contains data and methods
<eam> my point is that the structure of the code matters a lot more than the makeup of the individual elements
replay has joined #ruby
pdoherty_ has joined #ruby
<apeiros> that casually ignores social effects
exm has joined #ruby
pdoherty has quit [Ping timeout: 250 seconds]
<c-c> And thats why I use a global variable.
<eam> apeiros: actually I think it puts them forward as most important
<apeiros> we structure code around an idea because it conveys ideas too
dangerousbeans has quit [Quit: dangerousbeans]
agit0 has quit [Quit: zzzZZZ….]
tomphp has joined #ruby
<Ox0dea> >> singleton_class.name # dfockler
<ruboto> Ox0dea # => nil (https://eval.in/483532)
<Ox0dea> That is, aren't all singleton classes anonymous?
kirun has joined #ruby
ap4y has joined #ruby
<Ox0dea> >> C = singleton_class; singleton_class.name # Slightly spooky.
<ruboto> Ox0dea # => "C" (https://eval.in/483533)
snguyen has joined #ruby
<eam> Ox0dea: ARGF
<Ox0dea> Y'got me.
<eam> ;-)
yqt has joined #ruby
<dfockler> Understanding the mental model of Ruby is a lot different than C, that's why we have Ruby
zarubin has joined #ruby
<Ox0dea> C has objects, and it can of course be made to do object-orientation, but I don't think it's useful to say that it has classes out of the box.
codelurker has quit [Quit: Leaving]
SCHAAP137 has quit [Ping timeout: 272 seconds]
tomphp has quit [Excess Flood]
<c-c> Weird that the YAML parser chokes on yaml directive
exm has left #ruby [#ruby]
codeurge has joined #ruby
akem has quit [Remote host closed the connection]
lubarch has quit [Ping timeout: 256 seconds]
tomphp has joined #ruby
tenderlove has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
jgt4 has joined #ruby
zarubin has quit [Ping timeout: 272 seconds]
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<eam> Ox0dea: out of the box is something else entirely. I'm talking about how people can do non-OO in ruby, or OO-in C
davejlong has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
<eam> it's a paradigm
ur5us has joined #ruby
<Ox0dea> eam: Where do you put custom methods on `int` in C?
<eam> in the symbol table
akem has joined #ruby
<c-c> >> require "yaml"; YAML::parse("--- %YAML:1.0")
<ruboto> c-c # => (<unknown>): found character that cannot start any token while scanning for the next token at line 1 ...check link for more (https://eval.in/483534)
<Ox0dea> But surely you appreciate the difference between `int` and some `struct number` with fields containing function pointers?
kspencer is now known as ZeeNoodley
<blub> blah foo(int x);
<c-c> The Yaml spec says thats a normal directive (after '%').
<eam> not really, but that's probably because I have a lot of experience with Perl's OO structure
<eam> in which every symbol table namespace (aka package) is a class
kalopsian has quit [Quit: leaving]
<eam> the method does not necessarily have to be stored with the class in any way
<c-c> >> require "yaml"; YAML::parse("---/n %YAML:1.0")
Xiti has quit [Quit: Xiti]
<ruboto> c-c # => #<Psych::Nodes::Document:0x422a3ce8 @children=[#<Psych::Nodes::Scalar:0x422a3c98 @value="---/n %YAML ...check link for more (https://eval.in/483535)
<eam> merely linked logically
<c-c> so, thats how its solved
_stu_ has quit [Quit: _stu_]
<Ox0dea> eam: But we already have "function" for that concept; why strive for needless confusion?
<eam> it's a function if used with that paradigm
<eam> it's a method if used as a method
futilegames has joined #ruby
baweaver has quit [Remote host closed the connection]
<eam> that is, in perl, I might say Foo::Bar::baz($thing, $input) or $thing->baz($input) and I'd call the former a function and the latter a method -- what matters is how we decide to use 'em
[dmp] has quit [Quit: WeeChat 1.3]
dmolina has joined #ruby
dmolina has quit [Client Quit]
<eam> (those expressions are equivalent)
futilegames has left #ruby [#ruby]
User458764 has joined #ruby
tvw has quit [Remote host closed the connection]
<Ox0dea> Perl changes people, man. :P
<c-c> Perl, not even once.
craigp has quit []
citrusfizz has joined #ruby
craysiii has joined #ruby
devoldmx has joined #ruby
Eiam has joined #ruby
ethe has joined #ruby
<citrusfizz> trying to understand ruby cuz i have to learn some code another guy left behind at work. sorry for the dumb questions.
<citrusfizz> i see this line in the code
colleenmcguckin has quit []
<citrusfizz> Dir::mkdir("logs") unless File.directory?("logs")
<citrusfizz> what does the double colon mean between Dir::mkdir
<apeiros> same as .
<apeiros> invoke the method
sandstrom has quit [Quit: My computer has gone to sleep.]
<citrusfizz> why not write it, dir.mkdir
<apeiros> mind you, it's rather uncommon nowadays to use :: to invoke a method
<citrusfizz> what thes advantage
<c-c> Dir and File are methods
<apeiros> c-c: no
<c-c> I mean
<c-c> Dir and File are modules
<c-c> and ::nnnnn and .nnnn are calls to methods inside
<jhass> citrusfizz: there's non these days, it's just legacy
<pipework> apeiros: I don't know, I've used top-level namespace method references before like that ::my_lulz_method
rodfersou has quit [Quit: leaving]
<apeiros> c-c: Dir and File are classes.
<eam> I'd have just written Dir.mkdir "logs" rescue true
<Ox0dea> apeiros: Classes are modules. :P
dmr8 has quit [Quit: Leaving]
<apeiros> pipework: so you write uncommon code then :-p
<pipework> modules are modules.
<c-c> apeiros is right, I'm being sloppy here
* apeiros smacks Ox0dea around a bit with a large module
<pipework> apeiros: Egh, sometimes I just stick a method on the top level for debugging.
<Ox0dea> Classy.
troulouliou_dev has joined #ruby
<apeiros> pipework: why use :: to invoke it?
<pipework> Other times, it's the only entrypoint to my application. :D
yfeldblum has joined #ruby
devoldmx has quit [Ping timeout: 256 seconds]
<pipework> apeiros: How else will I reference the top level namespace when I'm in other namespaces?
<apeiros> I mean I won't even go as far as criticize the use of toplevel methods, but :: to invoke methods is IMO rather ugly.
RegulationD has joined #ruby
<Ox0dea> pipework: It'd work without the :: as long as the names didn't conflict.
<Ox0dea> Top-level methods go on Object.
jessemcgilallen has quit [Quit: jessemcgilallen]
renderfu_ has joined #ruby
troulouliou_dev has quit [Max SendQ exceeded]
<Ox0dea> >> method(def foo; end).owner
<ruboto> Ox0dea # => Object (https://eval.in/483537)
dlitvak has joined #ruby
<shevy> I see a lot of :: in old ruby code :(
<pipework> Ox0dea: Oh, whale, yeah.
jetpackjoe has joined #ruby
troulouliou_dev has joined #ruby
<apeiros> ^
<Ox0dea> pipework: So stop using :: so it can be repurposed for Ruby 3! :P
<shevy> why are you people calling to whales
<pipework> Ox0dea: :DDD
<citrusfizz> kinda odd that he chose to write :: in the same line as File.Directory
<citrusfizz> what not use one or the other, why both?
<Ox0dea> citrusfizz: They did it to make you mad.
<citrusfizz> ha
<apeiros> citrusfizz: we don't know.
B1n4r10 has quit [Ping timeout: 240 seconds]
<apeiros> you'll have to ask the author
<eam> probably because they were copying and pasting from two different examples
<Ox0dea> s/author/perpetrator/
<apeiros> pipework: re toplevel methods: if you have to use them, do it right and define them as `module Kernel; module_function foo; …; end`
<apeiros> pipework: that's how all your other pseudo-functions work, like puts, require et al
ramfjord has joined #ruby
ldnunes has quit [Quit: Leaving]
<apeiros> (better yet, though: don't)
<citrusfizz> eam: that sounds like the most probably answer
renderful has quit [Ping timeout: 264 seconds]
troulouliou_dev has quit [Client Quit]
huyderman has quit [Remote host closed the connection]
shanemcd has joined #ruby
dlitvak has quit [Read error: Connection reset by peer]
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
colleenmcguckin has joined #ruby
rdavila has joined #ruby
<pipework> apeiros: No, I'm a terrible person, I don't want it available on every object necessarily, but when you define a method on the top level, it does go on the Object class, doesn't it?
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
dlitvak has joined #ruby
stannard has quit [Remote host closed the connection]
<Papierkorb> pipework: it doesn't
shanemcd has quit [Ping timeout: 256 seconds]
<Papierkorb> >> self == Object
<ruboto> Papierkorb # => false (https://eval.in/483540)
<Papierkorb> >> self.is_a? Object
<ruboto> Papierkorb # => true (https://eval.in/483541)
tenderlove has quit [Ping timeout: 256 seconds]
<Ox0dea> Papierkorb: It does.
jetpackjoe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
User458764 has quit [Ping timeout: 250 seconds]
[Butch] has joined #ruby
<Papierkorb> >> def foo; "foo!"; end; Object.new.foo
<ruboto> Papierkorb # => private method `foo' called for #<Object:0x41e40e58> (NoMethodError) ...check link for more (https://eval.in/483542)
E_W has joined #ruby
<Ox0dea> The implicit receiver != the default definee.
bluOxigen has quit [Ping timeout: 240 seconds]
<apeiros> >> def foo; "foo!"; end; Object.new.send(:foo) # pipework
<ruboto> apeiros # => "foo!" (https://eval.in/483543)
<apeiros> whoops, Papierkorb ^
<Papierkorb> mh.
<apeiros> so yes, it goes into Object
<apeiros> at least ruby is sensible enough to make it private
<apeiros> which you have to remember yourself when adding to Kernel
<Ox0dea> >> method(def foo; end).owner # I'll just put this here once more.
<ruboto> Ox0dea # => Object (https://eval.in/483544)
<apeiros> main is a bit special
govg has joined #ruby
User458764 has joined #ruby
sandstrom has joined #ruby
<Authenticator> Why do threads get deleted from a ThreadGroup when they die? I was hoping to use it as a way to map the values out later.
<citrusfizz> does Bundler.require(:default) just load all gems in the Gemfile for the application?
kappy has joined #ruby
aryaching has quit []
bluOxigen has joined #ruby
stannard has joined #ruby
ta_ has joined #ruby
Ox0dea has quit [Ping timeout: 240 seconds]
stannard has quit [Remote host closed the connection]
SCHAAP137 has joined #ruby
calderonroberto has quit [Ping timeout: 256 seconds]
stannard has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
Ox0dea has joined #ruby
Coldblackice has joined #ruby
ESpiney has joined #ruby
ta has quit [Ping timeout: 250 seconds]
dlitvak has quit [Read error: Connection reset by peer]
dlitvak has joined #ruby
calderonroberto has joined #ruby
replay has quit [Ping timeout: 256 seconds]
dlitvak has quit [Remote host closed the connection]
duderonomy has joined #ruby
cpup has joined #ruby
dlitvak has joined #ruby
pushpak has joined #ruby
pushpak has quit [Client Quit]
_stu_ has joined #ruby
neanderslob has joined #ruby
adac has joined #ruby
snguyen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kobain has quit [Ping timeout: 240 seconds]
<c-c> link me to a github repo that had well organized project in your opinion!
DrCode has joined #ruby
Xiti has joined #ruby
dmcp has quit [Quit: Disconnecting...]
davedev24 has joined #ruby
<c-c> thank you
<c-c> any ruby ones?
davedev2_ has quit [Ping timeout: 240 seconds]
kobain has joined #ruby
freerobby has quit [Quit: Leaving.]
pietr0 has quit [Quit: pietr0]
dfockler has quit [Ping timeout: 272 seconds]
dlitvak has quit [Read error: Connection reset by peer]
dlitvak_ has joined #ruby
mustmodify has joined #ruby
pandaant has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
B1n4r10 has joined #ruby
tenderlove has joined #ruby
d5sx43 has joined #ruby
<mustmodify> Somewhere in my brain, something tragic happening. I have a collection of 300 objects stored as a constant. If I add another attribute to those objects, and that attribute is ... say... 20 characters on average, does that mean I'll add 300*20=6000k or about 5MB more memory? That's can be right.
<mustmodify> Oh
<mustmodify> K != byte
<mustmodify> duh
baweaver has joined #ruby
<mustmodify> ok 6000 bytes. I can live with that.
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
agit0 has joined #ruby
lubarch has quit [Client Quit]
kadoppe has quit [Ping timeout: 256 seconds]
tulak has joined #ruby
tenderlove has quit [Ping timeout: 256 seconds]
bluOxigen has quit []
kadoppe has joined #ruby
synthroid has quit []
baweaver has quit [Ping timeout: 240 seconds]
The_Phoenix has quit [Quit: Leaving.]
SCHAAP137 has quit [Remote host closed the connection]
Hounddog has quit [Read error: Connection reset by peer]
Pumukel has joined #ruby
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mikhailvs has joined #ruby
<dorei> is there some standalone gem for validations?
<mikhailvs> Hey guys, is there a way to make a required ruby file not actually include anything if the platform is jruby?
willywos has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea> >> require 'objspace'; (11..13).map { |n| ObjectSpace.memsize_of('x' * n) } # mustmodify
<ruboto> Ox0dea # => [20, 33, 34] (https://eval.in/483564)
<Ox0dea> Something to bear in mind if you're worried about memory.
<adaedra> mikhailvs: require is an instruction like any other; you can place it in a if block.
<c-c> mikhailvs: you mean something like: require 'file' unless platform == 'jruby'
<mikhailvs> yeah
<mustmodify> dorei: ActiveModel has one. :)
<Ox0dea> But perhaps mikhailvs has no control over this particular file being required?
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
<mikhailvs> well i have a directory with files that have sinatra routes
<mikhailvs> that get auto loaded
<mikhailvs> but i basically wanna be able to say in one of those route files "if the platform is jruby pretend you're blank"
<mikhailvs> without having a huge if block around everything
<Ox0dea> Sounds like you get to have some architecture.
<mustmodify> you could throw a "I do not like JRuby" exception at the top of the file... :)
<Ox0dea> `draw_foo_routes unless bar`
<c-c> whats "auto loading", thats probably where you want the condition
lubarch has quit [Client Quit]
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea> Why'd you put it in quotes?
<mikhailvs> my thought initially was doing a "raise blah if platform == jruby" at the top of such files, then in the loading section catching that particular one and not loading it... just wondering if there's another way like "exit" but that doesnt kill the whole script
<mikhailvs> mustmodify thats what i was thinking
dlitvak_ has quit [Read error: Connection reset by peer]
baweaver has joined #ruby
lubarch has joined #ruby
lubarch has quit [Changing host]
lubarch has joined #ruby
E_W has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]
bahar has quit [Ping timeout: 272 seconds]
<c-c> why start evaling them in the first place...
ramfjord_ has joined #ruby
<Ox0dea> mikhailvs: How about wrapping everything in a Proc and invoking #call thereupon only as appropriate?
<mikhailvs> that doesn't feel quite as clean...
<mikhailvs> i guess i'll go with the exception throwing idea
<Ox0dea> mikhailvs: I mean, you're letting petty indentation quibbles decide the structure of your code, no?
<mustmodify> mikolalysenko: that was kind of a joke.
decoponio has quit [Quit: Leaving...]
<c-c> you are not solving the problem, you are just applying a cure
ramfjord has quit [Ping timeout: 240 seconds]
<mustmodify> and anyway, you would beed a "big block around everything" to catch said exception, so it's not really doing you any favors.
<c-c> bad pattern
cassioscabral has joined #ruby
<mustmodify> s/beed/need/
<mikhailvs> i guess here is my exact situation
<Ox0dea> mikhailvs: This *is* about indentation, right?
<mustmodify> plus, iirc, exception handling is much slower than ... most other stuff.
<mikhailvs> but it'll only do the exception handling once on the app load
<mikhailvs> most of my app is okay being ruby
<mustmodify> mikhailvs: bad plan. do not go that route.
dlitvak has joined #ruby
<mustmodify> it was a joke.
<mikhailvs> hmm
thiagofm has joined #ruby
treehug88 has joined #ruby
<mustmodify> Now
bahar has joined #ruby
<mustmodify> hold on let me look at something
djbkd has quit [Remote host closed the connection]
<Ox0dea> mikhailvs: Why not monkey-patch Kernel#require? :P
<mustmodify> lol
<mikhailvs> Most of my routes in my app are fine with being plain ruby, the only ones that need jruby are handling pdf processing (using pdfbox). I'm using haproxy to go between the two instances (one being mri, the other jruby) i want to be able to launch the app the same way on different platforms (mri/jruby) just, in such a way that the mri one doesnt load the jruby specific stuff
<mikhailvs> mustmodify: why is the exception thing a bad idea?
<Ox0dea> It's wasteful and you don't actually gain anything.
Cohedrin has joined #ruby
<mikhailvs> what is it wasting?
<Ox0dea> Exceptions are expensive.
akem has quit [Remote host closed the connection]
<mikhailvs> yeah, but the app will load <100 files and the exception handling will only happen once
<c-c> interesting, someone killed the local DNS
<Ox0dea> mikhailvs: I thought it was just one file of routes that you didn't want drawn?
<mikhailvs> nono
<Ox0dea> Oh.
<mikhailvs> i have a file structure like components/*.route.rb
<mikhailvs> loaded with a loop in a main app.rb
<mikhailvs> like 3 of the files i dont want to load unless it's running on jruby
<Ox0dea> Is your naming sufficiently granular that you could do the conditional at the filename level?
<mikhailvs> how do you mean?
<Ox0dea> Do you know which three files you don't want to load on MRI?
<mikhailvs> yeah
Idakyne has joined #ruby
<citrusfizz> why does rand(0) return a value between 0-1 like 0.23423452
bahar has quit [Ping timeout: 256 seconds]
<Ox0dea> mikhailvs: Sounds like patching Kernel#require is the right way to go.
<pipework> Ox0dea: It makes me sad when rails developers use exceptions for control flow within their controllers for responses. :(
<pipework> So spendy
<Ox0dea> Easy, though. :<
<Ox0dea> mikhailvs: I was only kidding, mind.
<mikhailvs> pipework it wouldn't be for control flow
<Ox0dea> citrusfizz: Because that's useful.
<Ox0dea> `rand(0)` == `rand`
<Ox0dea> This behavior is documented quite plainly, and I don't see why you'd want it any other way.
<mikhailvs> i might be being insecure but i truly don't see an issue with using exceptions for this
<mikhailvs> it wouldn't affect the routing at all
<Ox0dea> mikhailvs: Which exception will you catch?
<citrusfizz> i'm sure its useful, it just wasn't making logic sense to me
<mikhailvs> let me write up a single thing that explains it
<citrusfizz> *logical
<mustmodify> mikhailvs: pasting it would take too long, but using exceptions take 10x as long in my quick test. But more importantly, exceptions are designed to stop the flow of your application when something goes unexpectedly, horribly wrong.
<mikhailvs> im talking in fragments and it's confusing
<mustmodify> Second, I think you might consider a microservice, which it seems would solve this problem.
dcope has left #ruby [#ruby]
bahar has joined #ruby
SCHAAP137 has joined #ruby
bMalum has quit [Quit: bMalum]
yfeldblum has quit [Ping timeout: 240 seconds]
pietr0 has joined #ruby
nkts has quit [Ping timeout: 260 seconds]
<ruboto> mikhailvs, we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/9d8b54ee76bdfaebb11b
<ruboto> pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
<mikhailvs> sorta like this
treehug88 has quit [Quit: Textual IRC Client: www.textualapp.com]
davedev2_ has joined #ruby
graffix222 has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
<c-c> jeebus
<c-c> can you not just
talntid has joined #ruby
<c-c> >> filelist = Dir["**/*.routes.rb"]; arr.map { |fn| require fn unless blacklist.contains[fn]; }
<ruboto> c-c # => undefined local variable or method `arr' for main:Object (NameError) ...check link for more (https://eval.in/483568)
davedev24 has quit [Ping timeout: 264 seconds]
colleenmcguckin has quit [Read error: Connection reset by peer]
<mikhailvs> c-c: i could yes. what would the advantage be though?
cpup has quit [Ping timeout: 272 seconds]
InvGhost has quit [Ping timeout: 240 seconds]
colleenmcguckin has joined #ruby
<mustmodify> mikolalysenko: when you say this is a "routes" file... what does that mean?
<c-c> not requireing the files you don't want? obviously you need to add the correct files to the blacklist depending on platform
howdoico1 has joined #ruby
uri___ has joined #ruby
InvGhost has joined #ruby
<mustmodify> you save a trip to the hard drive and don't have to rescue an exception. That's what you get.
uri_ has quit [Ping timeout: 256 seconds]
JDiPierro has quit [Remote host closed the connection]
<mustmodify> you could change your file naming scheme to include something like blah_jruby.rb and skip files with _jruby in the filename. Not great but better than rescuing.
InvGhostt has joined #ruby
dlitvak has quit [Remote host closed the connection]
<mustmodify> convention over... rescuing I always say!
<mikhailvs> im starting to feel like i'm just pestering you guys with this trivial thing... but still... why is it a big deal, if that code only runs once when the app is loading
<mustmodify> well, here's the thing.
<c-c> seems kind of weird to make an exception when you know all these things
<mustmodify> You *could* use the butt of a screwdriver to drive (most) nails.
<mustmodify> And if someone wants to do that, fine.
<mustmodify> I mean, I think that's a bad plan.
<mustmodify> but it will probably work.
<mustmodify> Or you could use a hatchet.
<mustmodify> again, strange, but it *will work.*
<mustmodify> But I suggest a hammer.
<mustmodify> and that's why.
cpup has joined #ruby
berserk_ren has quit [Ping timeout: 240 seconds]
zarubin has joined #ruby
<mustmodify> Exceptions serve a specific purpose. They handle catastrophic failures that should bring the code into a whole different code-path.
<c-c> craysiii: that faker project looks nice, except for one thing, dozens of require statements in faker.rb
<mustmodify> I mean, I could test to see if there is a user in my app, and if not, raise an exception, then catch that exception, and use that to take someone to the login page.
<Ox0dea> c-c: Because granularity is a bad thing?
<mikhailvs> mustmodify i agree exceptions arent the best approach, hence why i asked in the first place
<mustmodify> mikhailvs: I was responding to your question... "why is it a big deal"
<mustmodify> that's why.
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
<c-c> Ox0dea: granularity?
<mikhailvs> i understand
<Ox0dea> c-c: I am not your dictionary.
InvGhost has quit [Ping timeout: 264 seconds]
<c-c> Ox0dea: talking about faker or mikhailvs's prob?
<Ox0dea> Faker.
<Ox0dea> It's done that way so that you can pick and mix.
mikhailvs has left #ruby [#ruby]
saneax_AFK is now known as saneax
<pipework> Mmm ffaker
<c-c> thats not obvious from first glance
<Ox0dea> Yes, it is.
<Ox0dea> Especially for somebody who's "done Ruby" since 2006.
<pipework> Ox0dea: Was it obvious pre-first glance?
dstarh has joined #ruby
<Ox0dea> Yes, I didn't even go look.
InvGhostt has quit [Ping timeout: 250 seconds]
<c-c> Ox0dea: I have no idea what the hell you are talking about, so I'll mark this under "needs a snicker"
tomphp has joined #ruby
<pipework> Ox0dea: I thought precogs preferred prolog.
<Ox0dea> c-c: Okay, bud. I'm only trying to help.
mikhailvs has joined #ruby
uri_ has joined #ruby
adac has quit [Ping timeout: 250 seconds]
<Ox0dea> pipework: Who're you callin' a precog?!
B1n4r10 has quit [Ping timeout: 256 seconds]
<c-c> I would have just Dir["**/*.rb"].each{ |n| require n }
casadei has quit [Remote host closed the connection]
<c-c> well, maybe theres stuff down there that is not needed
<Ox0dea> mikhailvs has stuff that's conditionally needed.
Wsewolod has quit [Read error: Connection reset by peer]
citrusfizz has quit [Read error: Connection reset by peer]
Wsewolod has joined #ruby
<c-c> Ox0dea: so, when did you start with ruby?
<Ox0dea> c-c: Tomorrow.
citrusfizz has joined #ruby
mwlang has quit [Quit: mwlang]
uri___ has quit [Ping timeout: 272 seconds]
<blub> yikes
<adaedra> who needs a snicker now?
davedev2_ has quit [Read error: Connection reset by peer]
<c-c> I wonder if (&:require) would have worked
<Ox0dea> each(&method(:require))
davedev24 has joined #ruby
<mikhailvs> yeah that's what i'm doing
<c-c> hm, that doesn't save chars, Ox0dea
mary5030 has quit [Ping timeout: 250 seconds]
<Ox0dea> You'll just have to deal with that.
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mary5030 has joined #ruby
<mikhailvs> it would save chars if u used map instead
<Ox0dea> >> module Foo; def self.twice x; x * 2 end end; [1,2,3].map &Foo.method(:twice) # c-c
<ruboto> Ox0dea # => [2, 4, 6] (https://eval.in/483575)
<Ox0dea> For your bag of tricks.
Shapeshifter has quit [Quit: leaving]
xelkarin has joined #ruby
mikhailvs has quit [Quit: Leaving.]
<Ox0dea> It works because Method#to_proc does The Right Thing.
nkts_ has joined #ruby
<pipework> Ox0dea: I guess you'd know if you were one.
<Ox0dea> If I were a bag of tricks?
<Ox0dea> Oh, I see what you did there.
<Ox0dea> pelican.jpg
freerobby has joined #ruby
<adaedra> Ox0dea is a large bag of tricks, with bonus fun.
[Butch] has quit [Quit: I'm out . . .]
<Ox0dea> <3
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
duncannz has joined #ruby
dfinninger has quit [Remote host closed the connection]
colleenmcguckin has quit [Read error: Connection reset by peer]
<xelkarin> How would you define a class method in a Ruby C extension? I've tried rb_define_module_function, but that doesn't seem to work.
colleenmcguckin has joined #ruby
<icey> what's the best way to deploy ruby onto a production server that doesn't require me to build from source on install?
<icey> preferably, one that would work on centos + ubuntu
mustmodify has left #ruby [#ruby]
<Ox0dea> xelkarin: rb_define_singleton_method().
<Ox0dea> That's all a class method actually is, y'know.
<adaedra> Icey: find a source with the right ruby version? For CentOS, there may be on SCL.
lubarch has quit [Ping timeout: 240 seconds]
skade has joined #ruby
<c-c> you mean you used compiled ruby? how would you not build from source?
tenderlove has quit [Ping timeout: 256 seconds]
<c-c> Icey ^
<xelkarin> 0x0dea: cool thanks. I also noticed I had a typo in my method name.
howdoico1 has quit [Read error: Connection reset by peer]
<icey> c-c I *could* use something like RVM to install ruby onto a box but I'd rather have a single version of ruby installed and not leave RVM lying around
<icey> that said, it may be smoother to globally install RVM, install ruby, and remove RVM
<adaedra> Icey: SCL has Ruby 1.9, 2.0 and 2.2 for CentOS 6 and 7.
DurstBurger has quit [Ping timeout: 240 seconds]
<icey> but I can't use SCL for Ubuntu
<icey> I can use the Brightbox PPAs for Ubuntu
<adaedra> Right
sdothum has quit [Read error: Connection reset by peer]
<icey> hence, cross platform
InvGhostt has joined #ruby
<icey> here's hoping somebody's figured this out since I last had to deal with all of it :-P
sdothum has joined #ruby
tulak has quit []
DurstBur1er has joined #ruby
jessemcgilallen has joined #ruby
<adaedra> That's imo the best solution, as it is managed by your system. Just have to install the repositories and install the packages. Not exactly cross-platform, but works.
<c-c> Icey: ok, I see now what you are after
mclong has quit [Ping timeout: 264 seconds]
<c-c> Icey: things like docker?
Jackneill has quit [Ping timeout: 256 seconds]
<adaedra> Icey: also, if you don't want to install full rvm, look at ruby-install.
<c-c> Icey: use an image for the OS/base
<icey> rub-install still builds from source though (as far as I can tell)
uri___ has joined #ruby
hoylemd has joined #ruby
uri_ has quit [Ping timeout: 272 seconds]
<icey> c-c I'm writing code that *could* be installed into a container but may as well be on the base machine
<adaedra> that was in response to "Icey that said, it may be smoother to globally install RVM, install ruby, and remove RVM"
JDiPierro has joined #ruby
<hoylemd> Hey, what do I need to `require` to get the `assert` function?
<hxegon> hoylemd: minitest? I'm not 100% on that though
<c-c> Icey: I might use a network install of debian, have a simple script that installs needed stuff from debian repo, then grabs the app code from git via ssh
howdoico1 has joined #ruby
yeticry has quit [Read error: Connection reset by peer]
<c-c> debian uses binaries but then you are stuck with their releases
azgil has joined #ruby
<Ox0dea> hoylemd: Whatcha need it for?
DurstBur1er has quit [Ping timeout: 256 seconds]
yeticry has joined #ruby
<hoylemd> hmm. Im writing some capybara tests. I tried adding `require 'minitest'` to my capybara.rb file, but it didn't work
<azgil> list of todayflooders http://pastie.org/10624009
<hoylemd> says `undefined method 'assert'`
<Ox0dea> azgil: The #ruby leaderboard!
steffkes has joined #ruby
steffkes has quit [Changing host]
steffkes has joined #ruby
<adaedra> what's that
<Ox0dea> Today's speakers sorted by number of messages.
<c-c> Icey: its still a bit vague as to what you have and what you want to have
<adaedra> Yeah, this I see
<Ox0dea> Can't say when "today" started for azgil, though.
<jbrhbr> i guess i've only been a stalker today
<adaedra> boo
<azgil> log doesnt contain my name
jordanm has joined #ruby
atomical has quit [Ping timeout: 272 seconds]
slact has joined #ruby
<azgil> oops, my fault
<slact> hi rubists
druonysus has joined #ruby
druonysus has quit [Changing host]
druonysus has joined #ruby
<c-c> hi slact
<blub> hi slact
<Ox0dea> hi slact
<slact> i want to open >10K sockets to benchmark some things. I'm doing it via Celluloid::IO. It crashes at about 11K open sockets, and i don't know why
jessemcgilallen has quit [Quit: jessemcgilallen]
colleenmcguckin has quit [Read error: Connection reset by peer]
<adaedra> Your system running out of ports, maybe.
aspire has joined #ruby
<Ox0dea> You're hitting a limit imposed by the OS, likely as not.
govg has quit [Ping timeout: 272 seconds]
tenderlove has joined #ruby
DurstBur2er has joined #ruby
jessemcgilallen has joined #ruby
<slact> i'm not getting aports error, i resolved that already
tenderlove has quit [Remote host closed the connection]
colleenmcguckin has joined #ruby
<slact> and ulimit -n (file descriptors) is set to 100K
<jbrhbr> there's a max # for open files in the OS too
<adaedra> well then what's the error?
tenderlove has joined #ruby
<slact> The celluloid Actor just terminates
<slact> one sec
<adaedra> finished.
<jbrhbr> hehe
<shevy> two secs
<adaedra> two sechs
skade has quit [Quit: Computer has gone to sleep.]
mclong has joined #ruby
dfinninger has joined #ruby
skade has joined #ruby
rdavila has joined #ruby
<Ox0dea> I can count to ten in ten languages.
slact has quit [Read error: Connection reset by peer]
<adaedra> not bad.
slact has joined #ruby
<slact> oh man guys. i hit the swap pretty hard that time.
<adaedra> I can touch my nose with my thumb.
<c-c> so thats why
<c-c> slact: out of memory
<slact> no, that's not why. that was just another thing that happened
<Ox0dea> adaedra: ^
<slact> let me retry it
tenderlove has quit [Ping timeout: 256 seconds]
<adaedra> Ox0dea: wait a minute please. I wanted to try it, and now my eye hurts like hell.
azgil has left #ruby ["Leaving"]
<Ox0dea> The thumb is a comparatively sharp utensil.
devoldmx has joined #ruby
inanepenguin has joined #ruby
<slact> hmm.. it worked that time. I'm guessing this isn't ruby's fault.
zeroDivisible has joined #ruby
cpup has quit [Ping timeout: 272 seconds]
<slact> the same thing was happening with jruby and rubinius
<Ox0dea> Cause for celebration, that.
<Ox0dea> shevy: It wasn't Ruby's fault!
gizmore has quit [Quit: KVIrc 4.3.1 Aria http://www.kvirc.net/]
<slact> indeed. 10K connections is no laughing matter.
<slact> and in ruby, of all things
<slact> the fat lady -- she can run after all
<c-c> stop slandering Ox0dea
<Ox0dea> Harsh.
<Ox0dea> slact: ^
whippythellama has quit [Quit: WeeChat 1.3]
<slact> i don't think so
<Ox0dea> No, Ruby's a fucking dog. :/
<slact> she can sing, but i didn't know she could run, too
<c-c> isnt it kernel that opens those sockets
devoldmx has quit [Ping timeout: 240 seconds]
xelkarin has quit [Quit: WeeChat 1.1.1]
peteyg_ has quit [Ping timeout: 256 seconds]
djbkd_ has quit [Ping timeout: 256 seconds]
<Ox0dea> slact: Being IO-bound makes the choice of language matter considerably less.
Cohedrin has quit [Ping timeout: 256 seconds]
duderonomy has quit [Ping timeout: 256 seconds]
shadoi has quit [Ping timeout: 272 seconds]
<slact> it's for https://github.com/slact/nchan/blob/master/dev/pubsub.rb#L282 , in case anyone's curious
<slact> well, yes, but there was alsothe issue of crazy GC churn I had to overcome first
<slact> protip: reuse the same string as the buffer with buffer.clear
<c-c> local dns down again, so I can't read that
kingofwolvez has joined #ruby
shadoi has joined #ruby
ByronJohnson has joined #ruby
<Ox0dea> slact: Or #replace, even.
<slact> yes
peteyg has joined #ruby
azgil has joined #ruby
NightMonkey has joined #ruby
djbkd_ has joined #ruby
replay has joined #ruby
InvGhostt has quit [Ping timeout: 240 seconds]
michaeldeol has joined #ruby
kingofwolvez has quit [Client Quit]
__main__ has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marahin has left #ruby ["Leaving"]
znz_jp has joined #ruby
akem has joined #ruby
dstarh has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
inanepenguin has quit [Quit: inanepenguin]
BSaboia has joined #ruby
yfeldblum has joined #ruby
tenderlove has joined #ruby
tenderlove has quit [Remote host closed the connection]
tenderlove has joined #ruby
stannard has quit [Remote host closed the connection]
blackgoat has joined #ruby
<slact> things sure get tumbleweedy around here
<slact> i know! lua > ruby!
<TomPeed> !ban slact
<slact> flame on!
<Ox0dea> slact: Explain yourself.
<slact> lua >> ruby becasue lua < ruby
<Ox0dea> Our definitions of "explain" must surely differ. :P
TomPeed has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<slact> also, the lua community has fewer hipsters
<slact> (now i've really done it)
<Ox0dea> Shittin' in all the corn flakes today, huh?
blackgoat has quit [Client Quit]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<slact> I prefer the term "chocolate-like nuggets"
stannard has joined #ruby
<hxegon> slact: actually been looking at lua lately, care to sum your exp with it for my lazy ass?
tenderlove has quit [Ping timeout: 256 seconds]
mg^^ is now known as mg^
<hxegon> (so it stays on topic) compared with ruby at least?
<c-c> lua is like ruby-implementation of javascript 1.0
<slact> hxegon: sure. it's a tiny language, it doesn't come with batteries, it's got crazy-consistent syntax, it's nearly impossible to do cool one-liners
<c-c> B)
michaeldeol has quit [Quit: Textual IRC Client: www.textualapp.com]
<hxegon> slact: very concise. thanks!
sdothum has joined #ruby
<slact> it's blazing fast, its strings are all immutable, all objects are tables with metaprogramming tables
<c-c> slact: what do you use nchan for?
<slact> it's a new thing i've been brewing for a few months
blackgoat has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
baweaver has quit [Remote host closed the connection]
<slact> for all my server-push needs
blackgoat has quit [Client Quit]
Rutix has quit []
<c-c> ok, like a dating chat app?
<slact> yeah, or webRTC websocket server
The_Phoenix has joined #ruby
<slact> or collab document editing, whatever
<slact> i didn't want to jump ship to async apps
Pumukel has quit [Ping timeout: 264 seconds]
<slact> (i like my Racks, if you will)
jgpawletko has quit [Quit: jgpawletko]
<c-c> async apps == front+mongo?
djellemah has quit [Ping timeout: 240 seconds]
<slact> so I made this thing as a shim between ye olde-fashioned web applications and users demanding realtime updates
<slact> or node stuff
JDiPierro has quit [Remote host closed the connection]
akem has quit [Remote host closed the connection]
<slact> you'll probably hear more about it in a few weeks -- i hope so, anyway. I'm writing benchmarking code for it so i can make some pretty graphs
baweaver has joined #ruby
<slact> 3 months of hardcore c with a dash of softcore ruby testing
toretore has quit [Ping timeout: 240 seconds]
<slact> well, the c wasn't that hardcore, i'm probably jut a c prude
The_Phoenix has quit [Quit: Leaving.]
mozzarella has quit [Ping timeout: 245 seconds]
<c-c> its more tedious than hardcore?
<c-c> yeah well
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<slact> when I think "hardcore C", i think Carmack writing the Doom renderer
<azgil> nice channel's flooders analyzer http://pastie.org/10624082
<c-c> on an entirely differend end of the spectrum, I just managed to write 166 lines of yaml objects without a single error on the first parse
* c-c has reached his peak
<slact> dat whitespace
aibot has quit [Remote host closed the connection]
aibot has joined #ruby
slact has quit [Quit: ChatZilla 0.9.92 [Firefox 43.0a1/20150911030204]]
Wsewolod has quit [Read error: Connection reset by peer]
pdoherty_ has quit [Ping timeout: 272 seconds]
blackgoat has joined #ruby
Wsewolod has joined #ruby
seitensei has joined #ruby
seitensei has quit [Changing host]
seitensei has joined #ruby
davejlong has quit []
* c-c dat feeling when your yml parses ostructs that parse into class definitions and the classes are successfully created
<c-c> give or take a "into"
<c-c> now, if I could only program my foot into a gun...
ta has joined #ruby
ta_ has quit [Read error: Connection reset by peer]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
spider-mario has quit [Remote host closed the connection]
juanpablo_ has joined #ruby
juanpablo_ has quit [Remote host closed the connection]
delsol has joined #ruby
duderonomy has joined #ruby
<hxegon> c-c: with a bit of commitment and a 3d printer, anything is possible
<delsol> OK, so I've got the new version of ruby compiled and installed.... and of course it doesn't have all of the gems the old version had installed, and thus my program won't run.
<c-c> sorry, busy with this shoot
pietr0 has quit [Quit: pietr0]
<delsol> is there an easy way to grab all the old gems for the new version of ruby?
<hxegon> delsol: did you make a gemfile?
<delsol> hxegon: Didn't know I was supposed to.
<delsol> so... no.
<hxegon> delsol: they are super useful, and that would be the way to do it. Do you know what gems you were using?
howdoico1 has quit [Ping timeout: 240 seconds]
<delsol> I've got another machine that is still running the old version
<delsol> so if there is an easy way to have it build the gemfile, and then I can import it on the machine with the new ruby.
akem has joined #ruby
<hxegon> delsol: try gem list on the old machine and see what is installed
<delsol> gem2 list gives me a nice list about a page long
<azgil> statistics for last 5 days http://pastie.org/10624116
<delsol> gem2 list on new install lists about 10....
<hxegon> gem list > Gemfile
cscheib has joined #ruby
<hxegon> if you use vim a macro would take care of that no problem, just remove anything that isn't a part of your app first
<delsol> K, so I've got the gemfile now
<hxegon> delsol: also, this is all the gems your app uses and *their* dependancies. usually you just want to use the top level gems your app utilizes.
hobodave has quit [Quit: Computer has gone to sleep.]
<hxegon> so if it isn't explicitly required in your app, take it off the list.
dfockler has joined #ruby
hobodave has joined #ruby
mozzarella has joined #ruby
dhollinger has quit [Quit: WeeChat 1.3]
<cscheib> I can't figure out why the verses function in this code isn't returning anything but an empty string? It should have a bunch of text appended to it: https://gist.github.com/cscheib/3744b5d4ffc6e53157a1
skade has quit [Quit: Computer has gone to sleep.]
<cscheib> (code, test cases, and test output posted)
Idakyne has quit [Ping timeout: 240 seconds]
skade has joined #ruby
tenderlove has joined #ruby
htmldrum has joined #ruby
tenderlove has quit [Remote host closed the connection]
<delsol> hxegon: so then to get those gems on the other machine, take gemfile and ?
icbm has joined #ruby
tenderlove has joined #ruby
cassioscabral has quit [Quit: cassioscabral]
<hxegon> you have to format the gemnames like this
<hxegon> gem 'sinatra'
<hxegon> one per line.
<c-c> cscheib: how about add: p "verse n: " + bottles to line 10
<hxegon> delsol: once that is finished, put the gemfile on the new environment and, provided you have bundler installed, run 'bundle install'
<delsol> drop version numbers?
<cscheib> c-c: the verse function seems to work fine if called inside the verses function manually
azgil has quit [Quit: Leaving]
<cscheib> s/function/method/
<hxegon> delsol: yeah. You can specify version numbers, but it is smart enough to figure it all out most of the time.
<c-c> cscheib: did you also look into whats inside @beersong ?
<hxegon> delsol: are you using a ruby version manager?
<delsol> I don't think so.
<cscheib> c-c: yep, everything's working but the "verses" method (line 13)
<c-c> whats the error, then?
jessemcgilallen has quit [Quit: jessemcgilallen]
<cscheib> look at test_output.txt
pandaant has quit [Remote host closed the connection]
<c-c> ah, hidden conviniently
jessemcgilallen has joined #ruby
<cscheib> it's part of the gist, I can't help how they order it :P
jessemcgilallen has quit [Client Quit]
<c-c> yup, had a terminal right in front of the rest of the page
tenderlove has quit [Ping timeout: 256 seconds]
<jhass> >> (8..6).to_a # cscheib
<ruboto> jhass # => [] (https://eval.in/483603)
cassioscabral has joined #ruby
moeabdol has joined #ruby
s00pcan has quit [Ping timeout: 240 seconds]
<ytti> interesting
<cscheib> jhass: you mean put .to_a before the .each_with_object ?
<ytti> (8..6).begin .end work, but .min, .max does not
<jhass> cscheib: no, I mean mediate on what I just demonstrated
SCHAAP137 has quit [Ping timeout: 240 seconds]
elton has joined #ruby
s00pcan has joined #ruby
platzhirsch has joined #ruby
baweaver has quit [Remote host closed the connection]
ZeeNoodley is now known as kspencer
inanepenguin has joined #ruby
JDiPierro has joined #ruby
<platzhirsch> Do you think the .now domain will be very expensive? D:
<cscheib> jhass: so it doesn't like start being higher than end
<jhass> cscheib: if "doesn't like" is your description of "is defined to return an empty range in that case", yes
inanepenguin has quit [Client Quit]
diegoviola has joined #ruby
stannard has quit [Remote host closed the connection]
<jhass> ?offtopic platzhirsch
<ruboto> platzhirsch, this seems to be off-topic. Please move your discussion to #ruby-offtopic, to keep this channel free for Ruby related problems. Thanks!
<platzhirsch> :'(
tenderlove has joined #ruby
myztic has quit [Ping timeout: 250 seconds]
<c-c> >> (8...6).to_a
<ruboto> c-c # => [] (https://eval.in/483604)
<cscheib> ok, progress
<cscheib> swap the numbers, use .to_a.reverse
_stu_ has quit [Quit: _stu_]
elton has quit [Ping timeout: 256 seconds]
yfeldblum has quit [Read error: Connection reset by peer]
yfeldblum has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
p0wn3d has quit [Ping timeout: 272 seconds]
<cscheib> and got it complete
<cscheib> thanks for pointing me in the right direction, jhass
mary5030_ has joined #ruby
JDiPierro has quit [Ping timeout: 256 seconds]
<cscheib> there's probably a less convoluted way to do this, but oh well, heh
<jhass> platzhirsch: still not seeing you in #ruby-offtopic :(
gregf has quit [Read error: Connection reset by peer]
ramfjord_ has quit [Ping timeout: 240 seconds]
moeabdol has quit [Ping timeout: 256 seconds]
<c-c> I guess when writing test one should consider that the sequence is descending
vF3hNGxc47h8 has joined #ruby
<platzhirsch> Cheers jhass :)
<c-c> and then the same for the methods
gregf has joined #ruby
lkba has joined #ruby
claw has quit [Ping timeout: 250 seconds]
<shevy> platzhirsch how about ruby.now! but only with the !
JDiPierro has joined #ruby
<platzhirsch> so destructive
skade has quit [Quit: Computer has gone to sleep.]
mary5030 has quit [Ping timeout: 256 seconds]
<shevy> lol
claw has joined #ruby
<shevy> that would actually make for a good slogan
uri___ has quit [Ping timeout: 272 seconds]
<Ox0dea> You shoot yourself in the foot however you damn well please.
ibouvousaime_ has quit [Ping timeout: 250 seconds]
null__ has quit [Ping timeout: 256 seconds]
ta has quit [Read error: Connection reset by peer]
<adaedra> Personally, I use the old fashioned method of the random encounter between foot and furniture.
SCHAAP137 has joined #ruby
akem has quit [Quit: Bye]
DurstBur2er has quit [Ping timeout: 256 seconds]
ta has joined #ruby
null__ has joined #ruby
null__ has quit [Changing host]
null__ has joined #ruby
<adaedra> Hurts, but doesn't waste a bullet.
<Ox0dea> >> :furniture > :foot
<ruboto> Ox0dea # => true (https://eval.in/483605)
hahuang65 has joined #ruby
symm- has quit [Ping timeout: 272 seconds]
mary5030_ has quit [Remote host closed the connection]
s00pcan has quit [Ping timeout: 240 seconds]
<Ox0dea> DecayingBooleans could help with that.
mary5030 has joined #ruby
<adaedra> >> TrueClass = FalseClass; [true, false]
<ruboto> adaedra # => /tmp/execpad-d4137cb6bf18/source-d4137cb6bf18:2: warning: already initialized constant TrueClass ...check link for more (https://eval.in/483606)
<adaedra> awww.
hobodave has quit [Quit: Computer has gone to sleep.]
jessemcgilallen has joined #ruby
imperator has joined #ruby
s00pcan has joined #ruby
JDiPierro has quit [Remote host closed the connection]
JDiPierro has joined #ruby
ledestin has joined #ruby
Suntzu has quit [Ping timeout: 272 seconds]
Rickmasta has joined #ruby
baweaver has joined #ruby
ramfjord has joined #ruby
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
colegatron has quit [Ping timeout: 256 seconds]
<Ox0dea> >> require 'fiddle'; Fiddle::Pointer.new(true.__id__)[0, 4] = "\0" * 4
<ruboto> Ox0dea # => /tmp/execpad-20ce83938887/source-20ce83938887:2: [BUG] Segmentation fault at 0x000002 ...check link for more (https://eval.in/483608)
_stu_ has joined #ruby
<Ox0dea> Stupid immutable booleans.
hahuang61 has joined #ruby
mary5030 has quit [Remote host closed the connection]
pwnd_nsfw has quit [Ping timeout: 250 seconds]
baweaver has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 264 seconds]
delsol has quit [Ping timeout: 252 seconds]
cscheib has left #ruby [#ruby]
<Ox0dea> I think this is just about as much fiddling as we can do with booleans without segfaulting: https://eval.in/483609
tenderlove has quit [Remote host closed the connection]
lxsameer has quit [Quit: Leaving]
rgrmatt has joined #ruby
zotherstupidguy has quit [Ping timeout: 250 seconds]
<adaedra> huh, you cannot use super without arguments in a define_method block, funny.
<Ox0dea> It makes sense, though.
codecop has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
<adaedra> because block arguments are specials?
inanepenguin has joined #ruby
<Ox0dea> The interpreter doesn't have enough context for `super` to do The Right Thing.
xet7 has joined #ruby
<adaedra> I see.
tenderlove has joined #ruby
<imperator> can String#[] return more than 1 capture?
<Ox0dea> Nope. :<
<Ox0dea> My feature request died quickly and silently.
<imperator> BAH
<Ox0dea> inorite
* imperator riots in the streets
duncannz has quit [Ping timeout: 250 seconds]
* adaedra calls the internet police
l0yd has quit [Ping timeout: 250 seconds]
rgrmatt has quit [Remote host closed the connection]
<Ox0dea> Let your voice be heard!
<adaedra> Binary issue.
<Ox0dea> >> 0x11100
<ruboto> Ox0dea # => 69888 (https://eval.in/483610)
<Ox0dea> That's kinda neat too.
pwnd_nsfw has joined #ruby
colegatron has joined #ruby
<adaedra> The middleware pattern is neat.
tenderlove has quit [Ping timeout: 256 seconds]
FastJack has joined #ruby
davedev24 has quit [Ping timeout: 240 seconds]
Bellthoven has joined #ruby
kmckelvi1 has quit [Ping timeout: 250 seconds]
wmdrossard has joined #ruby
al2o3-cr has quit [Ping timeout: 264 seconds]
JDiPierro has quit [Remote host closed the connection]
JDiPierro has joined #ruby
<c-c> ri has no docs, again
<c-c> What was the command to update ri docs?
dlitvak has joined #ruby
<c-c> ah, its a gem now
<c-c> gem rdoc --all --ri --no-rdoc
rakm has joined #ruby
webus has joined #ruby
zarubin has quit [Remote host closed the connection]
centrx has joined #ruby
Xentil has joined #ruby
rdavila has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
alexherbo2 has quit [Quit: WeeChat 1.3]
Bellthoven has quit []
webus has quit [Quit: Ухожу я от вас (xchat 2.4.5 или старше)]
alexherbo2 has joined #ruby
al2o3-cr has joined #ruby
yfeldblum has quit [Remote host closed the connection]
snockerton has joined #ruby
baweaver has joined #ruby
tcrypt has joined #ruby
inanepenguin has quit [Quit: inanepenguin]
lurch_ has joined #ruby
dlitvak_ has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
inanepenguin has joined #ruby
yfeldblum has joined #ruby
sneakerhax has quit [Ping timeout: 272 seconds]
SCHAAP137 has quit [Quit: Leaving]
FastJack has quit [Remote host closed the connection]
FastJack has joined #ruby
stannard has joined #ruby
codeurge has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Azure|dc has quit [Ping timeout: 272 seconds]
davedev24 has joined #ruby
dlitvak has quit [Ping timeout: 250 seconds]
Azure has joined #ruby
Ropeney has joined #ruby
moeabdol has joined #ruby
BSaboia has quit [Ping timeout: 256 seconds]
lurch_ has quit [Quit: lurch_]
devoldmx has joined #ruby
Xentil has quit [Ping timeout: 256 seconds]
jgt has joined #ruby
elton has joined #ruby