<atom_>
is this possible? or does it even make sense?
pawnbox has quit [Remote host closed the connection]
chipotle has joined #ruby
pawnbox has joined #ruby
yoongkang has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
nerium has joined #ruby
yoongkang has joined #ruby
Madplatypus has quit [Quit: Connection closed for inactivity]
Madplatypus has joined #ruby
silpa has left #ruby [#ruby]
<al2o3-cr>
atom_: do_some_logic(p1, p2) is method right?
A_Drone has quit [Remote host closed the connection]
<jhass>
atom_: I don't understand the question, what you've shown is a valid ruby expression
yoongkang has quit [Remote host closed the connection]
Mimorial has joined #ruby
<jhass>
personally I only ever use ternary when I care about the return value, a = b ? c : d
TomyWork has joined #ruby
LoneHerm_ has quit [Remote host closed the connection]
<al2o3-cr>
atom_: i'd just use the regular old if/else
pawnbox has quit [Remote host closed the connection]
<xpitr>
interesting, do_some_logic(1,2) will work in ternary but do_some_logic (1,2) is syntax error. outside of ternary operator both work :)
<TomyWork>
i have 2 rescue blocks. one for a specific exception, one for all exceptions. can i pass control from the specific block to the common block?
rrawlins has joined #ruby
lulzmachine_ has joined #ruby
Sucks has quit [Remote host closed the connection]
<jhass>
no
nobitanobi has quit []
jxs_ has quit [Remote host closed the connection]
jenrzzz has joined #ruby
giz|work has joined #ruby
nerium has quit [Quit: nerium]
yoongkang has joined #ruby
jxs_ has joined #ruby
<al2o3-cr>
btw, regarding concatenation yesterday, interpolation is fastest, String#% is slowest. just thought i'd share.
<rrawlins>
jhass: I get a warning about the Gemspec lacking a description but adding one makes no difference, and the drive has plenty of space left on it.
<jhass>
gem -v ?
moeabdol has quit [Ping timeout: 260 seconds]
<rrawlins>
2.2.5
<jhass>
that's quite old
<jhass>
try a rvm rubygems update or whatever it was
nerium has quit [Quit: nerium]
mpampis__ has joined #ruby
blackmesa has joined #ruby
xall_ has quit [Ping timeout: 252 seconds]
koooge has quit [Quit: Leaving...]
madhatter has joined #ruby
mpampis_sougias has quit [Ping timeout: 244 seconds]
pawnbox has joined #ruby
mpampis__ has quit [Ping timeout: 276 seconds]
<atom_>
jhass: mmm when there are spaces and such on the result of the ternay condition ruby behaves weirdly
<atom_>
that's why I was asking if you can return something other than a simple String/Boolean/etc
<rrawlins>
jhass: sweet, that appears to have worked, bumped gem to 2.6 and it's now building as I'd expect, strange bug but thanks for the help. Life saver.
blackmesa has quit [Ping timeout: 250 seconds]
<jhass>
?code atom_
<ruby[bot]>
atom_: We can't help you without your code, please post it to https://gist.github.com
<jhass>
real code that "behaves weirdly"
thomas_25 has joined #ruby
ishahnaz has joined #ruby
nerium has joined #ruby
postmodern has quit [Quit: Leaving]
Mimorial is now known as Gasher
nankyokusei has joined #ruby
<zotherstupidguy>
is there a gem for sanitizing strings inputs (non-rails)
<koma>
dmesg
<koma>
ups wrong window
nerium has quit [Client Quit]
<jhass>
sanitizing is highly context specific
chipotle_ has joined #ruby
<zotherstupidguy>
filenames
<zotherstupidguy>
under linux
nerium has joined #ruby
<jhass>
to do what with them then?
chipotle has quit [Ping timeout: 252 seconds]
minimalism has quit [Quit: minimalism]
<zotherstupidguy>
the case is that i have list of songs that i am serving via ices2 that can't find them on local filesystem as they are not sanitized,
jackjackdripper has joined #ruby
<jhass>
I'm not sure sanitized means what you think it does here, try to use a different term/explanation
<zotherstupidguy>
ices2 takes a playlist.txt which i will sanitize, and i will go through all the .ogg files to santize them as well
<zotherstupidguy>
jhass such as?
nankyokusei has quit [Ping timeout: 250 seconds]
<jhass>
what do you change to make them "sanitized"?
<jhass>
what's that's not "sanitized" about them?
<jhass>
if it's in your filesystem under that name, it's a valid filename
<zotherstupidguy>
spaces, brackets are problems that i found out
<zotherstupidguy>
adding escape characters is possible, but instead of regex, i am looking for the gem that wouldn't miss anything, get me a clean solution
chipotle_ has quit [Read error: Connection reset by peer]
chipotle has joined #ruby
<xpitr>
gsub(/\W+/, "_")
<xpitr>
but seriously, only \0 and / should give you problems as those are only disallowed chars
<zotherstupidguy>
songs names are weird,
<xpitr>
they can be mixed mandarin and suahili, it should still work
<al2o3-cr>
zotherstupidguy: can you not just use Regexp.escape
<jhass>
no
<al2o3-cr>
ah, ok
<jhass>
well, how is the playlist generated? This feels like either a bug in the generator not respecting the playlist format or ices2 not correctly interpreting the playlist format
<zotherstupidguy>
playlists are not generated, just customly created;
<jhass>
so just write them correctly in the first place?
moeabdol has joined #ruby
<jhass>
what's the playlist format?
<zotherstupidguy>
path to song per line
<zotherstupidguy>
just .txt
nerium has quit [Quit: nerium]
nerium has joined #ruby
cd-rum has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Coldblackice has quit [Ping timeout: 244 seconds]
Xeago has quit [Ping timeout: 244 seconds]
duncannz has quit [Remote host closed the connection]
yoongkang has quit [Remote host closed the connection]
<jhass>
zotherstupidguy: anyway, if you're sure about what needs to be done, for whatever reason (I really can't see anything in the code that would require it), a simple gsub is your best bet
astrobun_ has quit [Remote host closed the connection]
xall_ has quit [Ping timeout: 244 seconds]
hwcomcn has joined #ruby
nerium has joined #ruby
araujo has joined #ruby
k3rn31 has quit [Max SendQ exceeded]
araujo has quit [Changing host]
araujo has joined #ruby
elaptics is now known as elaptics`away
araujo has quit [Max SendQ exceeded]
dunpeal has joined #ruby
k3rn31 has joined #ruby
blackmesa has joined #ruby
araujo has joined #ruby
hwcomcn has quit [Max SendQ exceeded]
Hyuk has joined #ruby
araujo has quit [Max SendQ exceeded]
araujo has joined #ruby
yoongkang has joined #ruby
ec0 has quit [Ping timeout: 258 seconds]
hwcomcn has joined #ruby
mpampis_sougias has joined #ruby
dunpeal has quit [Ping timeout: 258 seconds]
rrawlins has quit [Remote host closed the connection]
Hounddog has quit [Remote host closed the connection]
minimalism has joined #ruby
Silthias has joined #ruby
moeabdol has quit [Ping timeout: 250 seconds]
LoneHermit has quit [Ping timeout: 244 seconds]
chouhoulis has quit [Ping timeout: 252 seconds]
jenrzzz has joined #ruby
al2o3-cr has joined #ruby
astrobun_ has quit [Remote host closed the connection]
bkxd has quit [Ping timeout: 244 seconds]
glcx has quit [Quit: This computer has gone to sleep]
[narcan] has joined #ruby
thomas_25 has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 252 seconds]
giz|work has joined #ruby
nerium has quit [Quit: nerium]
thomas_25 has joined #ruby
yoongkang has quit [Remote host closed the connection]
nerium has joined #ruby
<shevy>
class ImageFile {
<shevy>
has $.width;
<shevy>
perl6!!!
<shevy>
so much has cheeze
jxs_ has joined #ruby
Rickmasta has joined #ruby
TheWhip has joined #ruby
yoongkang has joined #ruby
nerium has quit [Quit: nerium]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nertzy has quit [Ping timeout: 240 seconds]
nerium has joined #ruby
nerium has quit [Client Quit]
xall_ has joined #ruby
Devalo has quit [Read error: Connection reset by peer]
nerium has joined #ruby
Devalo has joined #ruby
thomas_25 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
CloCkWeRX has quit [Ping timeout: 264 seconds]
KaliLinuxGR has joined #ruby
mdw has joined #ruby
xall_ has quit [Ping timeout: 276 seconds]
sdothum has joined #ruby
rodfersou has joined #ruby
kavanagh has joined #ruby
jaguarmagenta has joined #ruby
minotep has quit [Ping timeout: 240 seconds]
thomas_25 has joined #ruby
nerium has quit [Quit: nerium]
johnmilton has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
<siegy>
lol
blackgoat has joined #ruby
blackgoat has quit [Client Quit]
moeabdol has joined #ruby
xall_ has joined #ruby
blackgoat has joined #ruby
CloCkWeRX has joined #ruby
nerium has joined #ruby
Torrone has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
<Torrone>
Hello, I'm switching back to ruby/rails after a couple years for a project that I've downloaded, I've been doing some changes to my environment since, now, I'm trying to install all the required gems for the project and bundle install consistently fails, on multiple gems and it's just a nightmare, how do I get around this problem without going crazy after all the versions? I'm using ruby 2.2.2 if this is ot please link the proper channe
<Torrone>
l thanks
nerium has quit [Client Quit]
mcqr has quit [Quit: WeeChat 1.4]
nerium has joined #ruby
GodFather has joined #ruby
<dminuoso>
Torrone: ?rails
<dminuoso>
?rails
<ruby[bot]>
Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<Torrone>
dminuoso, thanks
macsteps has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
LoneHermit has joined #ruby
thomas_25 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
macsteps has quit [Ping timeout: 260 seconds]
thomas_25 has joined #ruby
xall_ has joined #ruby
elaptics`away is now known as elaptics
LoneHermit has quit [Ping timeout: 250 seconds]
jenrzzz has joined #ruby
nerium has quit [Quit: nerium]
gigetoo has quit [Ping timeout: 276 seconds]
nerium has joined #ruby
bkxd has quit [Ping timeout: 260 seconds]
meinside has joined #ruby
armin has quit [Quit: relate to the matter as i drop the bomb]
xall_ has quit [Ping timeout: 250 seconds]
mcqr has joined #ruby
jishankai has quit [Ping timeout: 250 seconds]
ur5us has joined #ruby
siegy has quit [Ping timeout: 265 seconds]
jenrzzz has quit [Ping timeout: 258 seconds]
Mon_Ouie has quit [Quit: WeeChat 1.5]
AndrewIsHere has joined #ruby
armin has joined #ruby
nerium has quit [Quit: nerium]
<noregret>
im' pretty new to ruby, I have s = "ABCD" how can i change it to s2 = "\u4142\u4344" ? assuming "s" is generated randomly
<dminuoso>
Are you asking how to use a text editor?
<dminuoso>
Oh nevermind.
<dminuoso>
noregret: Dynamic access to local variables kind of sucks.
nerium has joined #ruby
<dminuoso>
noregret: Use a hash.
yoongkang has quit [Remote host closed the connection]
<dminuoso>
noregret: Or use the encoding mechanisms that Ruby has. What problem are you trying to solve?
yqt has joined #ruby
<noregret>
dminuoso: problem is, I have a character string (payload) that i'm looking to convert as shown in the variable s2 above
<dminuoso>
I got my head beaten with decimal numbers so much, I stopped using them.
dunpeal has joined #ruby
<noregret>
lol
<noregret>
al2o3-cr: i'm trying to bypass utf16 restrictions on a certain app by sending that kind of string, so i can have control over the payload sent...
seap has joined #ruby
<noregret>
ok, unpack H* looks not bad
<noregret>
now how can i iterate and strp 4 characters at one
<noregret>
once*
<noregret>
step*
CloCkWeRX has quit [Remote host closed the connection]
CloCkWeRX has joined #ruby
seap has quit [Client Quit]
Torrone has quit [Quit: This computer has gone to sleep]
pawnbox has quit [Remote host closed the connection]
ksinkar has joined #ruby
nerium has quit [Quit: nerium]
nerium has joined #ruby
dunpeal has joined #ruby
<ksinkar>
Is there any way to detect a yield block has been provided to a ruby method? Similar to the way count works, with a block passed to it, without a block passed to it.
skade has quit [Quit: Computer has gone to sleep.]
Rasi has joined #ruby
Torrone has joined #ruby
<al2o3-cr>
best to use each_char there
BaroMeter has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
xaxisx has joined #ruby
mostlybadfly has quit [Quit: Connection closed for inactivity]
<noregret>
al2o3-cr: how can the ouput be represented in bytes, instead of the unicode characters? that way, errors might be detected right away
<noregret>
byte string i mean
douglascorrea has quit [Remote host closed the connection]
nerium has quit [Quit: nerium]
nerium has joined #ruby
AndrewIsHere has joined #ruby
marr has quit [Ping timeout: 276 seconds]
kavanagh has quit [Read error: Connection reset by peer]
tvw has quit []
kavanagh has joined #ruby
AndrewIsHere has quit [Ping timeout: 250 seconds]
EdwardIII has quit [Ping timeout: 258 seconds]
xaxisx_ has joined #ruby
EdwardIII has joined #ruby
<p1k>
Hello
xaxisx has quit [Read error: Connection reset by peer]
xaxisx_ is now known as xaxisx
<p1k>
does anyone know if there are some standardized guidelines on what to call additional properties that are set on an Error ? (when you inherit it and add an initialize)
<p1k>
or is it everyone does as they please ?
xaxisx has quit [Read error: Connection reset by peer]
nerium has quit [Quit: nerium]
Caerus|Away is now known as Caerus
xall_ has joined #ruby
<shevy>
properties set on an error?
<toretore>
p1k: you mean Exception?
xaxisx has joined #ruby
<p1k>
toretore: I tend to inherit StandardError, but sure
<toretore>
if you make your own exception class you're free to take whatever arguments you want
nankyokusei has joined #ruby
nerium has joined #ruby
<p1k>
toretore: Yes, I'm just asking if there is a convention, of calling it :erro_state, or :properties or some other key?
<ruby[bot]>
al2o3-cr: # => "\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE4\xA5\x89\xE ...check link for more (https://eval.in/611572)
<al2o3-cr>
^ noregret
Torrone has quit [Ping timeout: 244 seconds]
<al2o3-cr>
thats your byte string
jrafanie has quit [Client Quit]
TheWhip has quit [Remote host closed the connection]
jrafanie has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
TheWhip has joined #ruby
shinnya has joined #ruby
flying has joined #ruby
nerium has quit [Quit: nerium]
xall_ has joined #ruby
nerium has joined #ruby
hwcomcn has quit [Read error: Connection reset by peer]
rrawlins has joined #ruby
blackmesa has joined #ruby
xall_ has quit [Ping timeout: 250 seconds]
mattwashere has joined #ruby
LoneHermit has joined #ruby
axl_ has joined #ruby
TheWhip has quit [Remote host closed the connection]
ChiefAlexander has joined #ruby
Torrone has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
djdarkbeat has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
alfiemax has joined #ruby
LoneHermit has quit [Ping timeout: 258 seconds]
Ropeney has quit [Quit: Leaving]
GodFather has joined #ruby
l4v2 has joined #ruby
Siegfried has joined #ruby
Wildfyr has quit [Ping timeout: 250 seconds]
drahosj has joined #ruby
aryaching has joined #ruby
davedev24 has joined #ruby
<Siegfried>
Hi all, thinking of learning ruby but worried that ruby allowing you to modify the language at will leads to lots of unreadable code when looking at others work. Does that happen often?
dgynn has joined #ruby
<aegis3121>
In Rails? Yes. In gems? Uncommonly. In pet projects/experiments? Probably a lot. Usually people are just adding convenience methods to a class rather than changing behavior of existing methods.
SilverKey has joined #ruby
roamingdog has quit [Remote host closed the connection]
SilverKey has quit [Client Quit]
<aegis3121>
For example, I want to be able to quickly take the average of an array, so can I could define Array#average that would handle that rather than passing an Array to an average method.
xall_ has joined #ruby
roamingdog has joined #ruby
<Siegfried>
Makes sense
agent_white has joined #ruby
platzhirsch has joined #ruby
<agent_white>
Mornin folks
Siegfried has left #ruby [#ruby]
kavanagh has quit [Read error: Connection reset by peer]
kavanagh has joined #ruby
Chair has joined #ruby
xall_ has quit [Ping timeout: 264 seconds]
madsa has joined #ruby
Chair is now known as Couch
madsa has quit [Client Quit]
madsa has joined #ruby
mattwashere has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 244 seconds]
Rum has joined #ruby
ksinkar has quit [Ping timeout: 240 seconds]
mattwashere has joined #ruby
SilverKey has joined #ruby
xall_ has joined #ruby
dminuoso has quit [Ping timeout: 265 seconds]
Macaveli has joined #ruby
xall_ has quit [Ping timeout: 240 seconds]
KCmetro has joined #ruby
rrawlins has quit [Remote host closed the connection]
<dunpeal>
I have an Array of objects. How can I get the first object in the array for which object.foo is not nil?
<dunpeal>
(or nil if object.foo == nil for all objects in the Array)
<ljarvis>
.find(&:foo)
<aegis3121>
?ri Array#find
<ruby[bot]>
aegis3121: I don't see no Array#find, whom should I tell about ri?
<dunpeal>
thaks.
<ljarvis>
?ri Enumerable#find
<ruby[bot]>
ljarvis: I don't see no Enumerable#find, whom should I tell about ri?
<dunpeal>
thanks*
<ljarvis>
c'mon
<aegis3121>
glad it's not just me.
Torrone has quit [Read error: Connection reset by peer]
airdisa has joined #ruby
jaguarmagenta has joined #ruby
mpampis_sougias has quit [Remote host closed the connection]
AgentVenom has joined #ruby
RegulationD has joined #ruby
syndikate has joined #ruby
xall_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 244 seconds]
Sou|cutter has joined #ruby
rippa has joined #ruby
jaruga___ has quit [Quit: jaruga___]
<jhass>
ljarvis: &ri still
<jhass>
cause adaedra didn't port it to ruboto yet :P
blackmesa has joined #ruby
rrawlins has joined #ruby
douglascorrea has quit [Remote host closed the connection]
SilverKey has quit [Quit: Halted.]
RegulationD has quit [Ping timeout: 244 seconds]
<ljarvis>
ah
xall_ has quit [Ping timeout: 258 seconds]
cdg has quit [Remote host closed the connection]
douglascorrea has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
diegoviola has joined #ruby
joonty has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
swills has joined #ruby
SilverKey has joined #ruby
zacts has quit [Quit: WeeChat 1.4]
solars has quit [Ping timeout: 240 seconds]
rodfersou is now known as rodfersou|lunch
CloCkWeRX has joined #ruby
CloCkWeRX has left #ruby [#ruby]
xall_ has joined #ruby
seap has joined #ruby
AgentVen_ has joined #ruby
k3rn31 has joined #ruby
JeanCarloMachado has quit [Ping timeout: 252 seconds]
<Papierkorb>
pipou_: `@connexion` is a Mysql2::Client instance, which doesn't include the module `Sgbd`.
<pipou_>
so how can i call for my methode check_table_exists ?
<pipou_>
Papierkorb: thanks for your help men ;)
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
xall_ has quit [Ping timeout: 265 seconds]
<toretore>
;)
senayar has quit []
aegis3121 has quit [Ping timeout: 276 seconds]
LoneHermit has quit [Ping timeout: 260 seconds]
douglascorrea has quit [Remote host closed the connection]
chouhoulis has joined #ruby
FooMunki has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 240 seconds]
SCHAAP137 has joined #ruby
FooMunki has joined #ruby
renderful has quit []
glcx__ has quit [Ping timeout: 264 seconds]
Torrone has joined #ruby
chouhoulis has quit [Remote host closed the connection]
mpampis_sougias is now known as kolotrupa
dionysus69 has joined #ruby
phrozen77_ has joined #ruby
Zackio has quit [Ping timeout: 240 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
phrozen77 has quit [Ping timeout: 250 seconds]
phrozen77_ has quit [Client Quit]
banisterfiend has quit [Ping timeout: 264 seconds]
roamingdog has quit [Read error: Connection reset by peer]
SilverKey has joined #ruby
Puffball has quit [Ping timeout: 276 seconds]
roamingdog has joined #ruby
Zackio has joined #ruby
TomyLobo has joined #ruby
yardenbar has quit [Ping timeout: 260 seconds]
hutch34 has quit [Ping timeout: 244 seconds]
adl has quit [Remote host closed the connection]
joonty has quit [Quit: This computer has gone to sleep]
antgel has quit [Ping timeout: 250 seconds]
conta has joined #ruby
douglascorrea has joined #ruby
skade has joined #ruby
cdg has joined #ruby
JeanCarloMachado has joined #ruby
rodfersou|lunch is now known as rodfersou
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
cdg has quit [Remote host closed the connection]
cdg has joined #ruby
madsa has quit [Ping timeout: 258 seconds]
cdg has quit [Read error: Connection reset by peer]
preyalone has joined #ruby
cdg has joined #ruby
Devalo has joined #ruby
macsteps has joined #ruby
dunpeal has quit [Ping timeout: 250 seconds]
Devalo has quit [Ping timeout: 250 seconds]
__void has quit [Ping timeout: 276 seconds]
Tempesta_ has joined #ruby
Macaveli has joined #ruby
anisha has joined #ruby
madsa has joined #ruby
vuoto has joined #ruby
EdwardIII has quit [Ping timeout: 260 seconds]
<dminuoso>
So I have a binary file following some format, and I would like to interact with that file with Ruby. Is there some gem around that let's me quickly map a pattern into some structure, much like I could declare structs in C and type pun through byte arrays?
Tempesta has quit [Ping timeout: 244 seconds]
pusewicz has joined #ruby
<dminuoso>
(I really want to avoid manually reading the file a few bytes at a time and constantly using "unpack"0
GinoManWorks has quit [Read error: Connection reset by peer]
Torrone has quit [Ping timeout: 252 seconds]
<jhass>
I guess most people just unpack :/
<jhass>
note you can unpack the whole thing at once
EdwardIII has joined #ruby
<dminuoso>
jhass: Sadly I cant, because the size of some structures depent on values from the structures before.
<jhass>
a, b, c = data.unpack("SUL")
<dminuoso>
Or on the other hand, I could simply use the existing ruby-elf.... :-)
freerobby has quit [Quit: Leaving.]
<jhass>
haha, reading ELF? hf
jaguarmagenta has joined #ruby
<dminuoso>
I want to modify ELF in ways that binutils don't allow me to.
GodFather has quit [Ping timeout: 250 seconds]
<jhass>
curious, what ways?
<dminuoso>
It's fairly simple actually. I want to forcibly change the order of sections in the physical file.
harfangk has joined #ruby
<dminuoso>
(Linker scripts only let you change how they are loaded into memory)
Cohedrin has joined #ruby
<jhass>
to optimize something or?
<dminuoso>
Well, it's common among hobbyist os developers to use a combination of multiboot and elf. The former however requires a special multiboot magic sequence to be located within the first 8096 bytes of the file.
joonty has joined #ruby
craigp has quit [Ping timeout: 244 seconds]
<jhass>
I see
blackmesa has quit [Ping timeout: 260 seconds]
jaguarmagenta has quit [Ping timeout: 265 seconds]
<Zarthus>
I'm not sure how I feel about the choice class
hutch34_ has joined #ruby
dvinciguerra_ has joined #ruby
<RubyNewby123>
how come Zarthus?
<Zarthus>
just feels a bit awkward to use, and very unreadable
kolotrupa has joined #ruby
<shevy>
RubyNewby123 just abstract the things; class Player, class Game
hutch34 has quit [Ping timeout: 276 seconds]
<shevy>
if a user needs to input data to either class Player or class Game, he can do so either on class Player; or you let class Game handle the input and then pass it to class Player. class Choice sounds very abstract
douglascorrea has quit [Ping timeout: 240 seconds]
roamingdog has joined #ruby
craigp has joined #ruby
Torrone has joined #ruby
kolotrup_ has joined #ruby
banisterfiend has joined #ruby
<RubyNewby123>
shevy: I've read that 5 times now and don't follow. I'm not smart. Who is the "user"? A dev or a game player?
<RubyNewby123>
sorry
akkad has joined #ruby
<Zarthus>
also, one more thing, but I'd definitely consider learning how symbols work
kolotrupa has quit [Ping timeout: 250 seconds]
ramfjord has quit [Read error: Connection reset by peer]
gregf has quit [Quit: WeeChat 1.4]
chouhoulis has joined #ruby
ramfjord has joined #ruby
<Zarthus>
they're slightly more advanced, but you seem to be at the level where that should be your next move
Torrone has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
aryaching has joined #ruby
<RubyNewby123>
Zarthus: you have my word I will, I must confess to skipping them so far (I only picked up ruby on Friday, coming from c# - and not great at that) but the fact you discerned that so easily means I'm clearly missing a trick
<Zarthus>
I'm not entirely sure if L102-114 will work - break might break out of the case statement
Alina-malina has quit [Ping timeout: 264 seconds]
k3rn31 has quit [Quit: Computer has gone to sleep.]
kolotrup_ has quit [Ping timeout: 240 seconds]
Sucks has joined #ruby
codecop has joined #ruby
marr has quit [Ping timeout: 276 seconds]
jenrzzz has joined #ruby
GodFather has quit [Ping timeout: 250 seconds]
<Zarthus>
if nothing else, I'd do something like available_weapons = [:massive_axe, :enhanced_staff, :wet_trout]; weapon_chosen = gets.chomp.downcase.to_sym; if available_weapons.include? weapon_chosen ... end; puts " none of those weapons exist, sorry. Try: " + available_weapons.join(", ")
<Zarthus>
gets rid of the switch entirely
gregf has joined #ruby
<Zarthus>
also includes good error messages :)
devbug has quit [Quit: ZZZzzz…]
aegis3121 has quit [Ping timeout: 240 seconds]
devbug has joined #ruby
aegis3121 has joined #ruby
rodfersou is now known as rodfersou|afk
devbug has quit [Client Quit]
zenlot has quit [Ping timeout: 244 seconds]
<RubyNewby123>
Thanks man,I've took your snippet and will research symbols as that seems like wizardry. So readable!
devbug has joined #ruby
<shevy>
RubyNewby123 well the user is whoever runs your code at hand
<shevy>
so this can be you or someone else
LoneHermit has joined #ruby
teoric has joined #ruby
<Zarthus>
RubyNewby123: it needs a bit more refining, but it does get rid of the switch case
devbug has quit [Client Quit]
<Zarthus>
at some point you will want your weapons to have their own class if the scale of the project grows
<RubyNewby123>
shevy: what did you mean class choice is very abstract? is that good or bad?
vuoto_ has joined #ruby
teoric has quit [Client Quit]
troulouliou_div2 has quit [Remote host closed the connection]
<RubyNewby123>
Zarthus: this probably isn't going to grow very big and is just my hello world app for ruby but I understand
Alina-malina has joined #ruby
roamingdog has quit [Remote host closed the connection]
<Zarthus>
well if I can't throw the trout to get rid of the trolls at the end of this I will be disappointed!
<RubyNewby123>
noted :D
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
LoneHermit has quit [Ping timeout: 244 seconds]
<shevy>
RubyNewby123 well, I remember you were fetching user input right?
spudowiar has joined #ruby
<RubyNewby123>
sure
<shevy>
you could let class Player do so instead
nertzy has joined #ruby
<shevy>
I mean class Game
<shevy>
:D
devbug has joined #ruby
kolotrupa has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto_ has quit [Remote host closed the connection]
<RubyNewby123>
class game already reads user input no
<RubyNewby123>
?
<RubyNewby123>
"read_choice"
vuoto has joined #ruby
Mimorial has joined #ruby
Mimorial is now known as Gasher
the_drow has quit [Quit: This computer has gone to sleep]
KCmetro has quit [Quit: Leaving...]
rodfersou|afk is now known as rodfersou
devbug has quit [Read error: Connection reset by peer]
vuoto has quit [Remote host closed the connection]
jjtoy has joined #ruby
Devalo has joined #ruby
<jjtoy>
how would someone parse this string to get the timestamp? "Jul 25 17:45:46 deeptest docker/2292_1[7980]: Killed#015"
aryaching has quit [Remote host closed the connection]
nankyokusei has joined #ruby
devbug has quit [Read error: Connection reset by peer]
anisha has quit [Quit: This computer has gone to sleep]
djdarkbeat__ has joined #ruby
djdarkbeat has quit [Read error: Connection reset by peer]
djdarkbeat__ is now known as djdarkbeat
devbug has joined #ruby
kavanagh has quit [Remote host closed the connection]
postmodern has joined #ruby
SilverKey has quit [Client Quit]
bmurt has joined #ruby
kavanagh has joined #ruby
SilverKey has joined #ruby
conta has quit [Ping timeout: 264 seconds]
jaguarmagenta has joined #ruby
xall_ has quit [Read error: Connection reset by peer]
xall_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 244 seconds]
Torrone has quit [Quit: This computer has gone to sleep]
douglascorrea has joined #ruby
<RubyNewby123>
Zarthus: In your suggestion of using symbols (I've been reading up a bit). I get that they're more efficient etc, but in that example, wouldn't they be displayed as "sybol_name" to the user? So I'd lose a friendly display name?
aryaching has joined #ruby
gregf has quit [Quit: WeeChat 1.4]
<Zarthus>
RubyNewby123: yep
<Zarthus>
This is why I suggested a class / hash for when the project grows
<RubyNewby123>
ok I'm with ya
renderful has quit []
<Zarthus>
I'd probably have the software generate a list of weapons they can pick from, prefix them with identifiers and have the user insert a number rather than the name
<drbrain>
RubyNewby123: Zarthus: what's not more efficient is picking symbols for efficiency then converting strings to symbols to look things up in a hash
<RubyNewby123>
I considered that very thing today
<RubyNewby123>
an inventory essentially
Rum has left #ruby [#ruby]
jenrzzz has quit [Quit: Lost terminal]
<Zarthus>
and you could do something like Weapon = Struct.new(:internal_name, :display_name, :damage) if you don't want to make a class
<drbrain>
if you have to convert to extract data from a constant hash then you should switch your keys
gregf has joined #ruby
<Zarthus>
drbrain: it wasn't so much about efficiency as getting rid of the case
rodfersou is now known as rodfersou|afk
johnmilton has quit [Remote host closed the connection]
terminalrecluse has joined #ruby
aryaching has quit [Remote host closed the connection]
<Zarthus>
internal name is rather redundant there, it'd be potato_gun = Weapon.new("Potato Gun", 9001)
Torrone has joined #ruby
alfiemax has quit [Ping timeout: 265 seconds]
bad_ip has quit [Quit: Some people just want to watch the world burn.]
alfiemax has joined #ruby
Kamilion has quit [Read error: Connection reset by peer]
bad_ip has joined #ruby
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
miqlas-H has joined #ruby
kavanagh has quit [Quit: That's all folks!]
yqt has joined #ruby
bkxd has joined #ruby
mahlon has quit [Ping timeout: 258 seconds]
<noregret>
how can I convert an integer to utf-8 ?
freerobby has joined #ruby
bkxd has quit [Ping timeout: 258 seconds]
Eiam has quit [Quit: ╯°□°)╯︵ǝpouǝǝɹɟ]
Eiam has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
ged has quit [Ping timeout: 276 seconds]
xall_ has quit [Read error: Connection reset by peer]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
terminalrecluse is now known as terminal_
Squarism has joined #ruby
chouhoul_ has joined #ruby
* Squarism
is Certified Scrum master - taking questions
<Zarthus>
I always read that as "developer of SCRUM sessions"
johnny56 has joined #ruby
<jhass>
Squarism: what's the atomic weight of a water molecule?
binaryplease1 has joined #ruby
blackmesa has quit [Ping timeout: 250 seconds]
xall_ has joined #ruby
diablerouge has joined #ruby
chouhoulis has quit [Ping timeout: 276 seconds]
<Papierkorb>
Squarism: What makes DHMO bombs so dangerous in contrast to conventional weapons?
d5sx43 has joined #ruby
d5sx43 has quit [Client Quit]
chouhoul_ has quit [Ping timeout: 260 seconds]
weaksauce has joined #ruby
<jhass>
Squarism: what will you do with all the questions you collect?
binaryplease has quit [Ping timeout: 276 seconds]
Torrone has quit [Ping timeout: 250 seconds]
<Papierkorb>
jhass: My guess is, writing them on sticky notes and hang them out for others to answer. Squarism is here to communicate our impediments, not to really answer it!
EdwardIII has quit [Ping timeout: 258 seconds]
djbkd has quit [Remote host closed the connection]
troulouliou_div2 has joined #ruby
djbkd has joined #ruby
EdwardIII has joined #ruby
FernandoBasso has joined #ruby
<Squarism>
all questions can be answered with planning poker - as all software bussiness problems
diablerouge has quit [Ping timeout: 250 seconds]
binaryplease1 is now known as binaryplease
djbkd has quit [Ping timeout: 244 seconds]
Squarism has left #ruby ["Leaving"]
<Papierkorb>
What's the baseline then?
<rann>
quick question: there is gem --user-install, but is there also its inverse: explicitly asking for installation in a global gem location?
<Papierkorb>
rann: --no-user-install
shinnya has joined #ruby
<Papierkorb>
so, yeah, the opposite :P
<rann>
hah
<rann>
nice
<rann>
how does gem determine what no-user-install is?
<Papierkorb>
there's only system-wide and user-local install. if it's not one, it's the other.
<rann>
I saw that GEM_PATH can contain more than two entries tho
<rann>
And I noticed that if you do not set GEM_HOME, behavior differs per platform (some point to system-wide by default, some to ~/.gem/<version>)
<Papierkorb>
yes it does differ >_>
RegulationD has joined #ruby
<rann>
Is it common practice to set GEM_HOME to something relative? I've been testing with that and it works amazingly much like npm that way
<havenwood>
rann: Some systems opt for --user-install and others opt for --no-user-install by default.
<rann>
(I'm very new to ruby btw, so excuse me if i'm stating the obvious)
<Papierkorb>
rann: I'd say "no, it's not"
<Papierkorb>
rann: in fact, I wouldn't recommend it, as then you'd have to have a relative path in your $PATH to access the gem binaries.
last_staff has joined #ruby
<rann>
for development that is really, really nice though.
<havenwood>
rann: The gem Bundler is the most popular way to manage deps for a specific project. RubyGems itself also now supports dependency resolution but it's not as widely used as Bundler yet.
<rann>
how would you do that with bundler? I am using that, but in my case bundler will insist on installing globally, ie, in the system-wide location on my platform
<Papierkorb>
rann: Or, I'm not aware of gems which ship binaries. Maybe some JRuby gems do ship JARs, no idea
<rann>
pg, kgio, raindrops
<havenwood>
noregret: 42.to_s.encode('utf-8')
Guest51233 has quit [Ping timeout: 240 seconds]
<Papierkorb>
rann: `pg` ships with an C extension as source
skweek has quit [Ping timeout: 250 seconds]
<Papierkorb>
everything else would be broken
<rann>
Papierkorb: and bcrypt also.. On windows they do, they ship mingw variants, but I noticed that more often than not, these are tightly coupled to the ruby interpreter version and they might install an so/dll that will not load correctly
ec0 has quit [Ping timeout: 258 seconds]
<Papierkorb>
rann: Ah, Windows issues. Not a windows user.
<rann>
on windows you can use the devkit from RubyInstaller as a compiler (the same that is used to create the ruby interpreter on windows)
<Papierkorb>
Why would you want to use Windows to dev?
<rann>
Anyways: --platform ruby avoids those binary variants I've notices
<rann>
d
augcesar has joined #ruby
devbug has quit [Read error: Connection reset by peer]
<rann>
for example: gem install bcrypt (on windows) -> .gems/2.3.0/gems/bcrypt-mingw-something
Torrone has joined #ruby
<Papierkorb>
Most likely these binary packages are there so people don't have to mess with windows to get anything to compile at all. Still, Windows only issue
<rann>
for example: gem install bcrypt --platform ruby (on windows) -> compile phase -> .gems/2.3.0/gems/bcrypt-version (like non-native-code-packages)
devbug has joined #ruby
ec0 has joined #ruby
<rann>
Yes, they provide the binaries to assist people that want to install a native gem while no compiler setup available. that's the intent for sure
<miqlas-H>
Hi Guys!
<miqlas-H>
Is there new release already?
roshanavand has joined #ruby
<rann>
but it didn't work in 3 out of 4 packages I tried it with, but after getting the devkit setup (very simple btw) I could install all from source with compile stage.
djbkd has joined #ruby
Torrone has quit [Ping timeout: 240 seconds]
blackmesa has joined #ruby
devbug has quit [Read error: Connection reset by peer]
noffle has joined #ruby
polishdub has joined #ruby
devbug has joined #ruby
tvw has quit [Read error: Connection reset by peer]
Azure has quit [Ping timeout: 276 seconds]
shinnya has quit [Ping timeout: 260 seconds]
<havenwood>
miqlas-H: Ruby 2.3.1 is the latest release or there's 2.4.0-preview1 to try out for a taste of what's to come.
devbug_ has joined #ruby
<miqlas-H>
I got the 2.4.0_preview compiled on Haiku. It was easy ride.
pawnbox has quit [Remote host closed the connection]
<miqlas-H>
But it would be really great to have user-install as default.
howdoi has quit [Quit: Connection closed for inactivity]
<miqlas-H>
The standard paths are read-only in Haiku.
pawnbox has joined #ruby
conta has joined #ruby
devbug has quit [Ping timeout: 260 seconds]
devbug has joined #ruby
sepp2k has joined #ruby
Torrone has joined #ruby
devbug_ has quit [Ping timeout: 260 seconds]
devbug has quit [Read error: Connection reset by peer]
<rann>
miglas-H heh, funny you mention that, I was just jakkering about the same thing :-)
<shevy>
2.4.0 is inofficial dev release
jaiks1 has quit [Ping timeout: 260 seconds]
<miqlas-H>
I know
solars has quit [Ping timeout: 250 seconds]
<shevy>
when you write user-install, you mean gem?
<miqlas-H>
i made already a recipe for that in haikuports.
bad_ip has quit [Ping timeout: 250 seconds]
bbathe has joined #ruby
bbathe has left #ruby [#ruby]
inukshuk_ has joined #ruby
temhaa has joined #ruby
sballert has joined #ruby
inukshuk_ has quit [Client Quit]
<temhaa>
Hello,
<miqlas-H>
But Haiku needs the following: stack_protector=no
<miqlas-H>
without it the configure scripts just goes crazy
<miqlas-H>
can somebody put it into the ruby configure?
<miqlas-H>
BTW: i really like the colorized configure output.
<temhaa>
I am trying to install https://github.com/suer/redmine_oauth_provider to my redmine. But when I try I am getting cannot load such file -- oauth/rack/oauth_filter. is the problem related to ruby? If so can you help me
maucar has quit [Quit: Leaving]
<miqlas-H>
I would like to see it in every configure scripts.
<dminuoso>
temhaa: No the problem is related to how the code tries to load a dependency.
chouhou__ has quit [Remote host closed the connection]
<dminuoso>
temhaa: You might get more help in a redmine related forum/channel, since you probably are installing it wrong, or the plugin is broken.
chouhoulis has joined #ruby
roshanavand has quit [Ping timeout: 276 seconds]
<headius>
Papierkorb, rann: any gem can ship binaries for a specific platform by releasing a platform-specific gem
<headius>
most JRuby gems that have jars in them are -java for this reason
<shevy>
miqlas-H you may have to file an issue request at https://bugs.ruby-lang.org/projects/ruby-trunk - there are not many haiku people so if you don't point out how things may work, nobody else may know :D
<Papierkorb>
headius: they can, but I'm not aware of any MRI gems doing that for linux
<temhaa>
dminuoso: Thank you
aryaching has joined #ruby
<headius>
Papierkorb: I remember seeing one but can't remember what it was
nankyokusei has quit []
<headius>
I think it's usually just easier to have some makefile rules for *nix than to release binary builds
<headius>
maybe if you're closed source you'd want to do it
Fernando-Basso has quit [Quit: Leaving]
devbug has joined #ruby
freerobby1 has joined #ruby
<miqlas-H>
shevy: you know, life is too short to revove your USB devices safely.
<miqlas-H>
I never have enough time to do all my PR's
swills has quit [Remote host closed the connection]
BillSussman has joined #ruby
<shevy>
hah I was ruthless in removing USB stuff
Azure has joined #ruby
<shevy>
until I realized that some external USB hdd's may be killed if you just disconnect them :(
xall_ has quit [Ping timeout: 240 seconds]
freerobby has quit [Ping timeout: 250 seconds]
KevinFrench has quit [Ping timeout: 250 seconds]
arnonhongklay has joined #ruby
hutch34_ has quit [Read error: Connection reset by peer]
freerobby has joined #ruby
moeabdol has quit [Ping timeout: 244 seconds]
jenrzzz has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
freerobby1 has quit [Ping timeout: 244 seconds]
ramfjord has quit [Ping timeout: 250 seconds]
aep-shoutlet has quit [Quit: Connection closed for inactivity]
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
jenrzzz has joined #ruby
solars has joined #ruby
xall_ has joined #ruby
banisterfiend has joined #ruby
banisterfiend has quit [Client Quit]
Sucks has quit [Ping timeout: 264 seconds]
<miqlas-H>
shevy: expensive training.
blackgoat has joined #ruby
arnonhon_ has joined #ruby
jeremyhall_ has quit [Ping timeout: 252 seconds]
mcqr has quit [Quit: WeeChat 1.4]
arnonhongklay has quit [Read error: Connection reset by peer]
SilverKey has quit [Quit: Halted.]
madsa has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Devalo has quit [Remote host closed the connection]
jeremyhall has joined #ruby
<miqlas-H>
Any idea or tips, how can i teach abstraction for the workmates?
sballert has quit [Quit: leaving]
ur5us has joined #ruby
hutch34_ has joined #ruby
madsa has joined #ruby
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<iamdevnul>
anybody here familiar with the aasm gem? I have a subclass that inherits from a parent class with a defined state machine, i'd like to to redefined that state machine on the subclass
bad_ip has joined #ruby
replay has quit [Ping timeout: 250 seconds]
finisherr has joined #ruby
devbug has quit [Quit: ZZZzzz…]
devbug has joined #ruby
Alayde has joined #ruby
Uranio has joined #ruby
minotep has quit [Ping timeout: 258 seconds]
marr has joined #ruby
devbug has quit [Read error: Connection reset by peer]
cyphase has quit [Ping timeout: 250 seconds]
whathappens has joined #ruby
noffle has left #ruby ["WeeChat 1.5-rc2"]
devbug has joined #ruby
EdwardIII has quit [Ping timeout: 244 seconds]
devbug has quit [Read error: Connection reset by peer]
__void has joined #ruby
EdwardIII has joined #ruby
cyphase has joined #ruby
fanantoxa has joined #ruby
ur5us has quit [Remote host closed the connection]
dionysus69 has quit [Ping timeout: 244 seconds]
devbug has joined #ruby
statelesscode_ has joined #ruby
statelesscode has quit [Ping timeout: 276 seconds]
statelesscode_ is now known as statelesscode
devbug has quit [Read error: Connection reset by peer]
devbug_ has joined #ruby
djdarkbeat has quit [Read error: Connection reset by peer]
devbug_ has quit [Read error: Connection reset by peer]
djdarkbeat has joined #ruby
jaguarmagenta has joined #ruby
devbug has joined #ruby
<miqlas-H>
I need to go Guys, keep up this good work. Bye!
dunpeal has quit [Ping timeout: 258 seconds]
devbug has quit [Read error: Connection reset by peer]
djdarkbeat has quit [Read error: Connection reset by peer]
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
devbug has joined #ruby
bad_ip has quit [Ping timeout: 244 seconds]
fanantoxa has quit [Ping timeout: 258 seconds]
kolotrup_ has joined #ruby
Torrone has quit [Read error: Connection reset by peer]
rcvalle has joined #ruby
swills has joined #ruby
jaguarmagenta has quit [Ping timeout: 265 seconds]
kolotrupa has quit [Ping timeout: 258 seconds]
lechiffre10 has joined #ruby
<lechiffre10>
hello friends
Pumukel has quit [Quit: ChatZilla 0.9.92 [Firefox 47.0/20160604131506]]
joonty has joined #ruby
<havenwood>
lechiffre10: hi
<lechiffre10>
anyone have experience with prelauncher campaigns on rails?
<lechiffre10>
trying to integrate Thunderclap.it for campaigns
synthroid has quit []
Torrone has joined #ruby
bad_ip has joined #ruby
douglascorrea has quit []
Sucks has joined #ruby
arnonhon_ has quit [Ping timeout: 265 seconds]
bmurt has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codecop has quit [Remote host closed the connection]
Torrone has quit [Ping timeout: 244 seconds]
devbug has quit [Read error: Connection reset by peer]
dunpeal has joined #ruby
jenrzzz has quit [Ping timeout: 276 seconds]
TomyLobo has quit [Ping timeout: 264 seconds]
ur5us has joined #ruby
blackmesa has quit [Ping timeout: 258 seconds]
devbug has joined #ruby
jenrzzz has joined #ruby
bkxd has joined #ruby
Xiti has joined #ruby
cZk has quit [Quit: bye]
devbug has quit [Read error: Connection reset by peer]
hutch34_ has quit [Ping timeout: 252 seconds]
Sucks has quit [Ping timeout: 264 seconds]
devbug has joined #ruby
bkxd has quit [Ping timeout: 240 seconds]
lechiffre10 has quit [Quit: WeeChat 1.5]
zeroDi has joined #ruby
ldnunes has quit [Quit: Leaving]
moeabdol has joined #ruby
JeanCarloMachado has quit [Ping timeout: 244 seconds]
kolotrup_ has quit [Remote host closed the connection]
spudowiar has quit [Quit: Leaving.]
<jhass>
solars: prepend, like include and extend, adds the instance methods of module to another class or module as instance methods, "class methods" are defined in another class than what you prepend/include/extend
<jhass>
solars: you meant to say def error instead of def self.error
Uranio has quit [Quit: Leaving]
spudowiar has joined #ruby
tjohnson has joined #ruby
oscardaichi has joined #ruby
dvinciguerra_ has quit [Ping timeout: 260 seconds]
cd-rum has joined #ruby
Torrone has joined #ruby
crdpink has quit [Quit: q term]
crdpink has joined #ruby
cd-rum has quit [Ping timeout: 240 seconds]
nerium has quit [Quit: nerium]
AgentVenom has joined #ruby
nerium has joined #ruby
bad_ip has quit [Ping timeout: 258 seconds]
GNUYawk has quit [Quit: GNUYawk]
finisherr_ has joined #ruby
Torrone has quit [Quit: This computer has gone to sleep]
solars has quit [Ping timeout: 250 seconds]
last_staff has joined #ruby
finisherr_ has quit [Client Quit]
finisherr has quit [Ping timeout: 240 seconds]
oscardaichi has left #ruby [#ruby]
Torrone has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
matp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
EdwardIII has quit [Ping timeout: 276 seconds]
kavanagh has quit [Quit: That's all folks!]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
skweek has quit [Ping timeout: 260 seconds]
Torrone has quit [Read error: Connection reset by peer]
matp has joined #ruby
djdarkbeat has quit [Ping timeout: 250 seconds]
EdwardIII has joined #ruby
cZk has joined #ruby
yfeldblum has joined #ruby
[Butch] has quit [Quit: I'm out . . .]
bkxd has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
nfk has joined #ruby
Torrone has joined #ruby
EdwardIII has quit [Ping timeout: 244 seconds]
matcouto has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
SilverKey has joined #ruby
maloik has quit [Remote host closed the connection]
maloik has joined #ruby
SilverKey has quit [Client Quit]
joonty has quit [Quit: This computer has gone to sleep]
neanderslob has quit [Ping timeout: 244 seconds]
aegis3121 has quit [Ping timeout: 250 seconds]
devbug has quit [Read error: Connection reset by peer]
matcouto has quit [Ping timeout: 258 seconds]
airdisa has quit []
spudowiar has quit [Quit: Leaving.]
EdwardIII has joined #ruby
neanderslob has joined #ruby
spudowiar has joined #ruby
matcouto has joined #ruby
Asher has quit [Quit: Leaving.]
ramfjord has quit [Ping timeout: 264 seconds]
mattwashere has quit [Remote host closed the connection]
devbug has quit [Read error: Connection reset by peer]
jenrzzz has quit [Ping timeout: 244 seconds]
devbug has joined #ruby
xall_ has quit [Ping timeout: 258 seconds]
xall_ has joined #ruby
aryaching has quit [Remote host closed the connection]
Torrone has quit [Ping timeout: 244 seconds]
GNUYawk has quit [Remote host closed the connection]
GNUYawk has joined #ruby
hutch34_ has joined #ruby
sepp2k has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 252 seconds]
neanderslob has joined #ruby
jenrzzz has joined #ruby
neanderslob has quit [Disconnected by services]
neanderslob_ has joined #ruby
neanderslob_ has quit [Remote host closed the connection]
GNUYawk has quit [Remote host closed the connection]
GNUYawk has joined #ruby
whathappens has quit [Read error: Connection reset by peer]
jaguarmagenta has joined #ruby
whathappens has joined #ruby
skweek has joined #ruby
<noregret>
how can i convert a string s = "\\u4142\\u4344" to the byte string "\u4142\4344" - any ideas?
jenrzzz has quit [Ping timeout: 265 seconds]
ramfjord has joined #ruby
jaguarmagenta has quit [Ping timeout: 258 seconds]
GodFather has joined #ruby
k776 has joined #ruby
twinklerock has left #ruby [#ruby]
Moosashi has joined #ruby
moneylotion has joined #ruby
<k776>
Hello. How does one add new encoding convertors to ruby? I have a case where I received an email with charset ISO-2022-CN. I need to convert it to UTF-8, but I get the following error: "Encoding::ConverterNotFoundError code converter not found ISO-2022-CN to UTF-8". The output of "Encoding.list" contains a "ISO-2022-JP" but no "ISO-2022-CN". Anyone know how to add the chinese encoding so it converts properly?
<k776>
Is it a system package that I need to install perhaps?
GodFather has quit [Remote host closed the connection]
cschneid_ has quit [Remote host closed the connection]
<k776>
dminuoso: ? That;s what I'm already using. I'm not asking how to convert. I'm asking, when converting, ho does one add an encoding that ruby doesn't seem to provide by default
neanderslob has quit [Remote host closed the connection]
Moosashi has quit [Quit: Moosashi]
davedev24 has joined #ruby
last_staff has quit [Quit: last_staff]
qguv has quit [Quit: bye]
cyphase has joined #ruby
Torrone has quit [Ping timeout: 244 seconds]
qguv has joined #ruby
davedev2_ has joined #ruby
RegulationD has joined #ruby
k776 has quit [Quit: Leaving.]
SCHAAP137 has quit [Quit: Leaving]
dunpeal has joined #ruby
davedev24 has quit [Ping timeout: 250 seconds]
jeremyhall has joined #ruby
wpaulson has joined #ruby
M4dH4TT3r has joined #ruby
jenrzzz has quit [Ping timeout: 260 seconds]
M4dH4TT3r is now known as Guest72476
Alayde has quit [Ping timeout: 276 seconds]
RegulationD has quit [Ping timeout: 240 seconds]
Moosashi has joined #ruby
nettoweb has joined #ruby
maloik64 has joined #ruby
ben9099 has joined #ruby
maloik has quit [Remote host closed the connection]
koooge has joined #ruby
jackjackdripper1 has joined #ruby
<ben9099>
can someone tell me why this works: in initialize is params.each { |k, v| public_send("#{k}=", v) } to assign passed in parameters to local? variables. then in another method it looks for a local variable set this way and finds it?!?!?! how is the local variable accessible between methods?
jackjackdripper2 has joined #ruby
neanderslob has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
<baweaver>
are there any attr_* methods in the top?
thoraxe has joined #ruby
<ben9099>
not a one
<baweaver>
because those define (attr_writer defines attr=, attr_reader defines attr, attr_accessor does both)
<ben9099>
i know the code works, but am new to ruby/RoR and don't see why
<baweaver>
Ah, Rails. Model attributes.
Madplatypus has quit [Quit: Connection closed for inactivity]
<baweaver>
they define those methods automatically, but that's a very bad idea.
<ben9099>
But the class doesn't inherit from anything.
<baweaver>
ActiveRecord::Base?
<ben9099>
No, this is some separate class for doing reports. It inherits from nothing.
<ben9099>
and is only instantiated to hold criteria for running the report.
jackjackdripper has quit [Ping timeout: 264 seconds]
<baweaver>
ack, other work came up
<ben9099>
np
_djbkd has joined #ruby
djbkd has quit [Read error: Connection reset by peer]
wpaulson has quit [Remote host closed the connection]
<drbrain>
ben9099: what does self.class.ancestors say?
<drbrain>
ben9099: also, public_send is a method call
<ben9099>
umm.. let me check.
<ben9099>
right, but are variables set with public_send "different" like some sort of weird local but somehow instance scope or something?
terminal_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<drbrain>
there's probably a method (or a method_missing) that sets instance variables
<drbrain>
and a matching method to read them back out
<drbrain>
in ruby local variables and method calls look very much the same
_djbkd has quit [Ping timeout: 258 seconds]
<ben9099>
oh, i'm sorry, i think i see... the base class has no attr_accessor but the class which extends it DOES. so that's why it must work... still, seems sloppy the way they have it.
<ben9099>
thanks
devbug has quit [Read error: Connection reset by peer]
<drbrain>
ben9099: you're welcome
bad_ip has joined #ruby
<drbrain>
ben9099: also, method("whatever").source_location can be of help sometimes (but it is `nil` for methods defined in C)