<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]
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]
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
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]
<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?
<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.
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
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?
<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
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]
<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.
<ruboto>
adaedra # => /tmp/execpad-f6c54341fb39/source-f6c54341fb39:2: warning: string literal in condition ...check link for more (https://eval.in/483285)
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
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.
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 ?
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]
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
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
<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]
<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>
?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
<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]
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.
<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
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
<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
<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?
<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
<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.
<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?
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>
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]
<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.
<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
<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
<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
<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>
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
<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]
<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!
<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…]
<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]