djbkd has quit [Remote host closed the connection]
<Ox0dea>
So, you can include "Rakefile" in a gem's extension list to have your default Rake task executed post-install; this is pretty awesome, but RubyGems is mucking about with the output streams, so printing is annoying. :< https://eval.in/463874 only prints "--0--", indicating that I apparently have to repurpose stdin for output, and I don't wanna do that. Please advise.
<Melpaws>
i need some guidance on converting a string to an array (i know how to convert strings to array). But my problem is i need to convert the string based on a regex pattern . So, the string would be broken up as the first part as [0], and the #after # to be [1] . String example : Doctor Strange #1 . Suggestions?
shmilan has quit [Ping timeout: 246 seconds]
niftylettuce has joined #ruby
DexterLB has quit [Ping timeout: 260 seconds]
c_nick has joined #ruby
mndoci has quit [Remote host closed the connection]
atomical has joined #ruby
mndoci has joined #ruby
TheNet has joined #ruby
<havenwood>
Melpaws: I don't understand the example.
Jardayn has quit [Quit: Leaving]
A124 has quit [Read error: Connection reset by peer]
<c_nick>
I have a MySQL::Results object which essentailly is an array of hashes. [{:name => "Nicolas", :continent => "EU"},{:name => "Nathan", :continent => "US"}] and I want to create an array of all unique names from this how should i go about it .. i can loop and store hash[:name] in another array and use but I am not sure if this is the right way to do it
<havenwood>
c_nick: You've said what you have. What do you want? What would the desired result look like?
<c_nick>
map says that I will apply some algorithm on every element of the array / list .. while group by says i will group all the elements in the array based on a condition
<c_nick>
map would be faster than group by per say ..
mistermocha has joined #ruby
mistermocha has quit [Remote host closed the connection]
finisherr has joined #ruby
<c_nick>
Ox0dea: yes, a transformation
<c_nick>
your right
<Ox0dea>
c_nick: #group_by is also a transformation, but it's overly complex here.
duckpupp1 has joined #ruby
djbkd has quit [Remote host closed the connection]
A124 has joined #ruby
ebbflowgo has quit [Quit: ebbflowgo]
to_json has joined #ruby
to_json has quit [Changing host]
to_json has joined #ruby
hxegon_ has joined #ruby
blackmesa has joined #ruby
<c_nick>
yeah ok cool thanks all
<c_nick>
i'll use map/collect
hxegon has quit [Ping timeout: 240 seconds]
<Ox0dea>
Just #map.
<Ox0dea>
Nobody uses #collect.
<c_nick>
hmm ok :)
kp666_ has quit [Quit: Leaving]
Guest53 has joined #ruby
c_nick has quit [Quit: "be back later"]
duckpupp1 has quit [Ping timeout: 240 seconds]
<adam12>
Ox0dea: :( I wish I was consistent but I use collect a lot more.
<Ox0dea>
adam12: I don't understand.
<Ox0dea>
Do you also use #collect_concat instead of #flat_map?
<adam12>
No, but I use flat_map very rarely sooo
blackmesa has quit [Ping timeout: 252 seconds]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tkuchiki has quit [Remote host closed the connection]
<Ox0dea>
Object.const_missing is definitely the method that gets invoked at the top level, and it clearly has no supermethod, and yet `super` works just fine.
<EasyCo>
Hey team, how do you guys typically test main/run type method? For instance, imagine a class method called .run. In that method we initialize a few other classes then we return a result in the form of a string.
dorei has quit []
sanjayu has quit [Ping timeout: 244 seconds]
abucha has joined #ruby
<EasyCo>
Would you actually test what's happening inside that method or would you just black-box it and test the result of calling that method?
mndoci has joined #ruby
devoldmx has joined #ruby
<Ox0dea>
EasyCo: Make pure everything that can be, and test those things.
krzkrz has quit [Read error: Connection reset by peer]
<Ox0dea>
EasyCo: "Pure" here means "not reliant on state".
krzkrz has joined #ruby
abucha_ has quit [Ping timeout: 260 seconds]
braincrash has quit [Quit: bye bye]
<EasyCo>
Right, that's still all pretty vague to me, haha.
RegulationD has joined #ruby
devoldmx has quit [Ping timeout: 246 seconds]
slackbotgz has joined #ruby
cacam9621 has joined #ruby
d34th4ck3r has quit [Quit: zzz]
mndoci has quit [Ping timeout: 260 seconds]
gusTester has joined #ruby
braincras has joined #ruby
kstuart has joined #ruby
gix- has quit [Ping timeout: 265 seconds]
baweaver has joined #ruby
devoldmx has joined #ruby
kstuart has quit [Ping timeout: 260 seconds]
gix has joined #ruby
ni431 has joined #ruby
tmtwd has quit [Quit: Leaving]
krzkrz has quit [Ping timeout: 255 seconds]
subscope has joined #ruby
<Melpaws>
im converting a line in a file to an array but i get the \r\n in it. Example line : 1602 Witch Hunter Angela #4 . Example code : content = line.split '#'. . Example result : ["1602 Witch Hunter Angela ", "4\r\n"] . What am I doing wrong?
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zoskia>
Not particularly. It's just simpler to say that where the patch for a bug is backported to releases several years old, I'm pretty sure the syntax can be said to be erroneous.
<zoskia>
Badman703: UNIX. :)
<Ox0dea>
Yes, it was obviously a bug, but that it survived so long is indicative of the fact that nobody encountered it.
<zoskia>
I think apeiros is going to give me an earshot for a change-of-nick against #ruby-pro again. Not sure I'm ready to deal with it. :(
<Ox0dea>
*earful
diegoaguilar has joined #ruby
x-light has quit [Ping timeout: 260 seconds]
Nick_ZWG has quit [Read error: Connection reset by peer]
<zoskia>
Word.
Nick_ZWG has joined #ruby
<zoskia>
Badman703: There is no UNIX, only the trademark where things are UNIX compliant against the Single UNIX Specification.
<Badman703>
ok
dhjondoh has joined #ruby
<zoskia>
Like Mac OS!
abucha_ has quit [Remote host closed the connection]
<zoskia>
I have trouble deciding on a Dell XPS or the (upcoming, unreleased, undocumented) Macbook Pro.
bruno- has joined #ruby
bruno- is now known as Guest30822
abucha has joined #ruby
mistermocha has quit [Remote host closed the connection]
<Ox0dea>
"UNIX" is like some sort of reverse-shibboleth, like "VIM" and "Brainfuck"; miscasing them reveals you to be an outsider.
cwong_on_irc has quit [Read error: Connection reset by peer]
Nick_ZWG has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
tubuliferous has joined #ruby
<Badman703>
it works!
axsuul has joined #ruby
RegulationD has joined #ruby
<Ox0dea>
Yay, computers!
Nick_ZWG has joined #ruby
x-light has joined #ruby
roshanavand has joined #ruby
Guest30822 has quit [Ping timeout: 272 seconds]
abucha has quit [Quit: Leaving...]
abucha_ has joined #ruby
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
RegulationD has quit [Ping timeout: 255 seconds]
araujo has joined #ruby
araujo has joined #ruby
araujo has quit [Max SendQ exceeded]
aufi has joined #ruby
fantazo has joined #ruby
roshanavand has quit [Ping timeout: 272 seconds]
karapetyan has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
eminencehc has joined #ruby
timonv has joined #ruby
baweaver has joined #ruby
djbkd has quit [Remote host closed the connection]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duckpupp1 has joined #ruby
rrichardsr3 has joined #ruby
solocshaw has quit [Remote host closed the connection]
solocshaw has joined #ruby
karapetyan has quit [Ping timeout: 264 seconds]
krzkrzkrz has joined #ruby
eminencehc has quit [Ping timeout: 240 seconds]
northfurr has quit [Quit: northfurr]
blackmesa has joined #ruby
ZYPP is now known as hool
shinnya has quit [Ping timeout: 240 seconds]
startupality has joined #ruby
hool is now known as ZYPP
abucha has joined #ruby
baweaver has quit [Ping timeout: 265 seconds]
duckpupp1 has quit [Ping timeout: 250 seconds]
djbkd has joined #ruby
abucha_ has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 265 seconds]
startupality has quit [Quit: startupality]
Fredrich010 has quit [Read error: Connection reset by peer]
Fredrich010 has joined #ruby
tagrudev has joined #ruby
zenguy_pc has joined #ruby
hxegon_ has quit [Ping timeout: 272 seconds]
krzkrzkrz has quit [Ping timeout: 264 seconds]
krzkrzkrz has joined #ruby
last_staff has joined #ruby
<zoskia>
You enjoy your own company a little too much.
hxegon has joined #ruby
fedexo has joined #ruby
klaas has joined #ruby
ruurd has joined #ruby
abucha_ has joined #ruby
User458764 has joined #ruby
saddad has quit [Ping timeout: 265 seconds]
Badman703 has quit [Quit: Leaving]
Pupp3tm4st3r has joined #ruby
Pupp3tm4st3r has quit [Remote host closed the connection]
Pupp3tm4st3r has joined #ruby
krzkrzkrz has quit [Ping timeout: 264 seconds]
krzkrzkrz has joined #ruby
Guest16071 is now known as awk
abucha has quit [Ping timeout: 244 seconds]
roshanavand has joined #ruby
Xzanron has joined #ruby
axsuul_ has joined #ruby
axsuul has quit [Read error: Connection reset by peer]
solocshaw has quit [Ping timeout: 240 seconds]
etcetcetc has joined #ruby
auzty has joined #ruby
lsmola has joined #ruby
dikaio has joined #ruby
fantazo has quit [Quit: Verlassend]
yfeldblum has joined #ruby
djbkd has quit [Remote host closed the connection]
x-light has quit [Ping timeout: 244 seconds]
dionysus69 has quit [Ping timeout: 260 seconds]
mndoci has joined #ruby
CloCkWeRX1 has left #ruby [#ruby]
Dreamer3 has joined #ruby
axsuul_ has quit [Ping timeout: 244 seconds]
x-light has joined #ruby
arup_r has quit [Ping timeout: 260 seconds]
mndoci has quit [Ping timeout: 244 seconds]
astrobu__ has joined #ruby
rrichardsr3 has quit [Quit: He who dares .... wins.]
astrobunny has quit [Ping timeout: 250 seconds]
kies^ has joined #ruby
bMalum has joined #ruby
rabbitho1e has quit [Ping timeout: 272 seconds]
trosborn has quit [Quit: trosborn]
jas02 has joined #ruby
cdg has quit [Ping timeout: 240 seconds]
bigkevmcd has joined #ruby
ponga has joined #ruby
sanjayu has joined #ruby
donske has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ruurd has quit [Read error: Connection reset by peer]
ahmetkapikiran has joined #ruby
abucha_ has quit [Remote host closed the connection]
abucha has joined #ruby
RobertBirnie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlexRussia has quit [Ping timeout: 272 seconds]
passcod has quit [Remote host closed the connection]
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
arup_r has joined #ruby
arup_r is now known as Guest90449
passcod has joined #ruby
codecop has joined #ruby
ruurd has joined #ruby
firstdayonthejob has joined #ruby
Guest90449 is now known as arup_r
bMalum has quit [Quit: bMalum]
bMalum has joined #ruby
baweaver has joined #ruby
Nick_ZWG has quit [Read error: Connection reset by peer]
bMalum has quit [Client Quit]
moei has joined #ruby
Nick_ZWG has joined #ruby
duckpupp1 has joined #ruby
blackmesa has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
duckpupp1 has quit [Ping timeout: 264 seconds]
ta has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
karapetyan has joined #ruby
vigintas has joined #ruby
kalusn has joined #ruby
abucha_ has joined #ruby
abucha has quit [Ping timeout: 240 seconds]
bluOxigen has left #ruby [#ruby]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<catsquotl>
this error comes after i removed all module related code
<Ox0dea>
catsquotl: Marshal is part of Ruby core.
<catsquotl>
does ruby hold on to modules it loaded before?
<Ox0dea>
Am I muted?
<catsquotl>
so it seems.. I just can't find how or why.
joonty has joined #ruby
<Ox0dea>
catsquotl: Marshal is already a thing.
<catsquotl>
ah...
<catsquotl>
i see..
DEA7TH has joined #ruby
<catsquotl>
so renaming it should fix it?
<Ox0dea>
catsquotl: It worked before because you had your Marshal in its own namespace.
polysics has quit [Remote host closed the connection]
SamGerber has joined #ruby
<Ox0dea>
YourModule::Marshal != ::Marshal
<catsquotl>
duh... feeling stupid now..
<catsquotl>
thanks so much
<Ox0dea>
Happy to help.
<catsquotl>
it had me baffled for days now
chthon has joined #ruby
user083 has quit [Ping timeout: 250 seconds]
devoldmx has quit [Ping timeout: 250 seconds]
arne has joined #ruby
<arne>
hi, when having a hash containing a string containing a binary string, i cannot serialize it using json, any tips?
<arne>
hm, json simply does not support binary data, bullocks.
stan has joined #ruby
<Ox0dea>
catsquotl: What's your nick about, if you don't mind my prying? Axolotl? Quetzalcoatl?
<catsquotl>
Quetzalcoatl
mndoci has joined #ruby
<Ox0dea>
Is it ironic that "bullock" refers to a bull with no bollocks?
<catsquotl>
didn't know how to spell it many years ago
<Ox0dea>
That's adorable.
<catsquotl>
but it's been my nick ever since
<Ox0dea>
arne: Well, your timing couldn't've been worse; we were just (inadvertently) discussing the Marshal module.
<danneu>
arne: you could base64 it
<arne>
Ox0dea, ;) hi again
<arne>
yeah i know that i could encode it, but im lazy and i built a generalized interface to my database, i have no clue to tell the client "this is binary data in base64"
<catsquotl>
well my Marshal(l) is a pathfinder character..
Xeago has joined #ruby
cacam9621 has quit [Ping timeout: 255 seconds]
<arne>
i was just assuming json would handle binary data
roshanavand has quit [Remote host closed the connection]
<Ox0dea>
It's kinda dumb that it doesn't.
x-light has quit [Remote host closed the connection]
<arne>
json was so cool when discovered it, but over time, there are soooo many flaw
<arne>
danneu, i want to build an import mechanism, where a token acts as authorization, i got that one as random bytes in the database, how would you do it?
Bloomer has joined #ruby
<sheperson>
yes, books
vigintas has quit [Read error: Connection reset by peer]
<Ox0dea>
arne: Restrict the bytes to seven bits?
<arne>
Ox0dea, your ideas are always great! how can anyone hire you!?
<Ox0dea>
You fully halve the keyspace, so maybe you shouldn't do that.
TheHodge has joined #ruby
<danneu>
i'd just keep it encoded in some text format
<Ox0dea>
arne: I try to keep my suggestions balanced between great and mind-numbingly terrible.
<arne>
but that would mean bad performance?
<danneu>
no
<arne>
why not?
<danneu>
if you have millions and millions of rows, it will take up more space
mooru has joined #ruby
<arne>
no actually even long strings would be fine :/ i just like the idea to have performance
tkuchiki has quit [Remote host closed the connection]
<arne>
danneu, so you would just save a random string, like a password?
<arne>
well, like an unhashed password.
sebstrax has joined #ruby
leafybas_ has quit [Ping timeout: 264 seconds]
tkuchiki has joined #ruby
<Ox0dea>
arne: Why do you want an auth token to be binary...?
dhjondoh has quit [Quit: dhjondoh]
<danneu>
yeah, for the same reason i would keep a UUID in text UUID format
<arne>
i don't want it to be binary, i would encode it and decode it
vigintas has joined #ruby
<arne>
just binary in database
<danneu>
binary in db is just a space optimization
cacam9621 has joined #ruby
<danneu>
roundtripping through encodings client side is far worse
al2o3-cr has quit [Ping timeout: 255 seconds]
<arne>
okay, i gonna store it as string
Xzanron_ has joined #ruby
<danneu>
what db are you using?
<arne>
mysql
<Ox0dea>
arne: A 40-character SHA1 is still 20 bytes encoded; the "savings" are scarcely worth it.
<arne>
i would like to use mongodb, but my data is highyl relational
rdark has joined #ruby
galeido has joined #ruby
Feyn has joined #ruby
<danneu>
i use the UUID column in postgres all the time for random numbers like tokens
<arne>
yeah i wanted to stick to things i know, because i get paid a lot, lol.
<arne>
otherwise i would've experimented.
ahmetkapikiran has quit [Quit: ahmetkapikiran]
Xzanron has quit [Ping timeout: 246 seconds]
duckpupp1 has joined #ruby
terlar has joined #ruby
baweaver has joined #ruby
<danneu>
it's for the best
<danneu>
nobody ever used mongo and, 6 months later, went "man this was a great decision"
avril14th has joined #ruby
Balllkenende has joined #ruby
<arne>
yeah i figured
<danneu>
"sure glad i used mongo instead of postgres, nectar of the gods"
<arne>
but for small things i did, it was a charm
<arne>
if mongo was always as great, or usable for relational stuff
<arne>
that would be cool *_*
al2o3-cr has joined #ruby
cacam9621 has quit [Ping timeout: 252 seconds]
avril14th has quit [Remote host closed the connection]
avril14th has joined #ruby
<arne>
i remember having a slow query on mongodb, and i was like "hm, this should be a key" *adds key in runtime*, works. that was impressive, but i always imagined it wouldn't be that easy in big projects
duckpupp1 has quit [Ping timeout: 255 seconds]
djbkd has joined #ruby
baweaver has quit [Ping timeout: 265 seconds]
<danneu>
is that much different than `create index users (user_id)` in sql?
Fredrich010 has quit [Remote host closed the connection]
tkuchiki has quit [Remote host closed the connection]
<arne>
well, if i remember correctly the last time i did that, it ended up in a pile of slow queries. but again, that could've been because of the size
<danneu>
as in the query planner got confused?
<arne>
well, im not a database experts.. the querries were slow and piled up, i don't know more
tkuchiki has joined #ruby
astrobu__ has quit [Remote host closed the connection]
<arne>
also import and export of mongodb always been faster, even for high amount of data.
sheperson has quit [Quit: sheperson]
colegatron has joined #ruby
user083 has joined #ruby
djbkd has quit [Ping timeout: 265 seconds]
<danneu>
yeah, mongo is definitely more beginner friendly
<shevy>
catsquotl do you have anything to do with cats?
<yorickpeterse>
errr wait, that was supposed to be a class method yeah
<apeiros>
yorickpeterse: it triggers correctly
<apeiros>
i.e. it's the right place
tomphp has quit [Max SendQ exceeded]
cwong_on_irc has quit [Read error: Connection reset by peer]
cwong_on_irc has joined #ruby
<apeiros>
Ox0dea: I mean that your super call causes the normal const lookup to resume and against expectations doesn't raise a nomethod error and instead triggers the normal const missing ex
<Ox0dea>
#const_missing and #method_missing do not exhibit the same behavior at all.
d34th4ck3r has joined #ruby
<Ox0dea>
Object's #method_missing can be refined.
BSaboia has quit [Ping timeout: 265 seconds]
<Ox0dea>
But that trace demonstrates that top-level #const_missing is absolutely the one on Object's singleton class.
<apeiros>
Ox0dea: I'm not sure what your evalin should show. yes, constant resolution happens in class space, method resolution in instance space. obvious, no?
<Ox0dea>
But then where is Object finding a supermethod for #const_missing?
musou has quit [Quit: Connection closed for inactivity]
<apeiros>
same as method_missing - it resumes what would happen if you hadn't defined it at all.
krzkrzkrz has quit [Ping timeout: 246 seconds]
<apeiros>
and wrt method_missing - same behavior if you work with main instead of Object
<Ox0dea>
apeiros: I guess it's the "does what it would've done" aspect of your explanation that's not clicking for me; are we not actually redefining methods when we redefine them?
Guest36046 has quit [Ping timeout: 272 seconds]
minimalism has quit [Quit: leaving]
TheMoonMaster has quit [Ping timeout: 265 seconds]
shinenelson has quit [Ping timeout: 240 seconds]
cbetta has quit [Ping timeout: 240 seconds]
bjmllr has quit [Ping timeout: 240 seconds]
bjmllr has joined #ruby
cbetta has joined #ruby
colstrom has quit [Ping timeout: 240 seconds]
RegulationD has quit [Ping timeout: 260 seconds]
shinenelson has joined #ruby
zenguy_pc has quit [Ping timeout: 240 seconds]
colstrom has joined #ruby
<apeiros>
Ox0dea: try removing the method
<Ox0dea>
apeiros: It removes just fine.
<apeiros>
also fun: Object.method(:const_missing).owner # => Module
<yorickpeterse>
ljarvis: that was a joke reference to the 1 method call per method call
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
But there's a hint of truth to it
snebel has quit [Quit: Leaving]
<norc>
yorickpeterse: Just as a taste where one of the core functions of the ruby implementation "slightly" exceeds that common 10 lines idiom.
<yorickpeterse>
norc: nothing beats parse.y
<ljarvis>
you gotta be doing some deep ass level of nesting to care in most scenarios
<ljarvis>
deep ass is regretable part of that sentence
<apeiros>
norc: I think C isn't considered wrt 5lines/method
<ljarvis>
in b4 that big ass method in Ruby that I forgot the location of
<ljarvis>
benchmark?
<ljarvis>
it was like 500 lines or something
<ljarvis>
optionparser has some of those
<norc>
apeiros: Commonly C functions should be small too. The thing most of the time is either readability (so you dont have to scroll over a function to get an impression what it does), or general code style.
ahmetkapikiran has joined #ruby
<norc>
The issue is just: Small functions dont lead to better code. But good code often consists of small functions.
<ljarvis>
fat c functions dont offend me, i've seen too many pointer mistakes to care
mist is now known as groupcat
groupcat is now known as group
ruurd has quit [Read error: Connection reset by peer]
group is now known as Guest23234
ghostbox has quit [Read error: Connection reset by peer]
build22 has quit []
<norc>
So when rubocop complains about large methods, it can (!) be an indicator of bad code design. Simply shortening the functions does not necessarily address that.
Pupeno has joined #ruby
Pupeno has joined #ruby
<yorickpeterse>
finally somebody who doesn't just go "SHORTER IS BETTER BECAUSE RUBOCOP SAYS SO"
<ljarvis>
but my boss says so
ruurd has joined #ruby
<apeiros>
norc: precisely
<ljarvis>
haha just kidding i dont have a boss
Xeago has joined #ruby
<yorickpeterse>
ljarvis: you do
VladGh has quit [Remote host closed the connection]
<yorickpeterse>
The European railroad schedules :>
<bougyman>
I generally see a handful of # rubocop:disable Metrics/LineLength and three or fewer Metrics/MethodLength is a normal project.
<ljarvis>
yorickpeterse: right in the feels :(
kp666 has quit [Remote host closed the connection]
<bougyman>
also I set my LineLength to 110
jgt2 has joined #ruby
<ljarvis>
:o
<ljarvis>
hethen!
<ljarvis>
heathen?
abucha has quit [Remote host closed the connection]
<bougyman>
hey, 220 fits find in a side-by-side diff on my screen.
<bougyman>
get a better monitor.
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
mine is 120
<ljarvis>
so yeah
<bougyman>
:)
abucha has joined #ruby
<ddv>
we can't be all geniuses like me
nettoweb has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<ytti>
resolutions keep getting better
<ytti>
and my eye sight keeps getting worse
_blizzy_ has quit [Ping timeout: 246 seconds]
<yorickpeterse>
The whole resolution argument is bollocks but let's not go there
<ljarvis>
NO
<ljarvis>
lets go there
jgt1 has quit [Ping timeout: 240 seconds]
<ljarvis>
get a 5k imac and be done with it
Guest53 has joined #ruby
skade has joined #ruby
TheNet has joined #ruby
magic__ has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Guest53 has quit [Client Quit]
duckpupp1 has joined #ruby
gusTester has joined #ruby
araujo_ has joined #ruby
InternetFriend has joined #ruby
<dtordable>
ñresolution are getting strange
SamGerber has joined #ruby
araujo_ has quit [Max SendQ exceeded]
subscope has joined #ruby
<yorickpeterse>
yay I get to check off one more method of my TODO
<yorickpeterse>
90 more to go
araujo_ has joined #ruby
luriv_ has quit [Ping timeout: 246 seconds]
ruurd has quit [Read error: Connection reset by peer]
kimegede has joined #ruby
<dtordable>
screens are getting comfortable nowadays
Guest53 has joined #ruby
big|bad|wolf has joined #ruby
araujo has quit [Ping timeout: 255 seconds]
<norc>
I still prefer a pillow at night though.
treehug88 has joined #ruby
<norc>
But I'm oldschool when it comes to things like that so...
sankaber has joined #ruby
ElFerna has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<yorickpeterse>
Yeah I'm not going to replicate that
<yorickpeterse>
fukit it's just #inspect
jdawgaz has joined #ruby
umgrosscol has joined #ruby
Xeago has quit [Remote host closed the connection]
etcetcetc has quit [Ping timeout: 246 seconds]
nateberkopec has quit [Quit: Leaving...]
spew has joined #ruby
abucha has quit [Ping timeout: 265 seconds]
blaxter has quit [Quit: foo]
maikowblue has joined #ruby
skcin7 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
well it's not just about resolution but also about how much information your brain can process. since I have a bad brain, I happily accepted 80 chars per lines :)
sankaber has quit [Remote host closed the connection]
ruurd has joined #ruby
sankaber has joined #ruby
pdoherty_ has quit [Ping timeout: 240 seconds]
<yorickpeterse>
no but everybody has HiDPI these days
<yorickpeterse>
so it's totally OK to dump 200 characters on a line
<yorickpeterse>
just like you do when writing in a book
nertzy has joined #ruby
<yorickpeterse>
everybody has big books these days
<yorickpeterse>
I personally prefer 4 meter wide books, it's really pleasant to write everything on a single line
<norc>
shevy: Just do some Java coding in between your gems. After a week, you will even ignore the width of your monitor if you follow some peoples conventions..
skweek has joined #ruby
ruurd has quit [Client Quit]
cdg has joined #ruby
<shevy>
I can't do java... it's way too verbose
babblebre has joined #ruby
Guest65735 has quit [Ping timeout: 240 seconds]
klingeldraht has joined #ruby
to_json has joined #ruby
to_json has joined #ruby
ruurd has joined #ruby
Xeago has joined #ruby
rbennacer has joined #ruby
gusTester has left #ruby [#ruby]
ruurd has quit [Read error: Connection reset by peer]
<ddv>
You need to tilt your monitor to work with Java
mattwildig has joined #ruby
<ddv>
Because of its verboseness
cfloare has quit [Ping timeout: 252 seconds]
cgfbee has quit [Ping timeout: 272 seconds]
ibouvousaime has quit [Ping timeout: 265 seconds]
hanmac has quit [Ping timeout: 246 seconds]
ibouvousaime has joined #ruby
ruurd has joined #ruby
jamesaxl has joined #ruby
rbennacer has quit [Remote host closed the connection]
roshanavand has joined #ruby
ruurd has quit [Client Quit]
kies^ has quit [Ping timeout: 260 seconds]
<User458764>
Hi, I want to do basic cryptography my goal is have an url with a cryptographic code that I can decrypt with key and give me the correct address mail I am looking for. It is a mailing list unsubscribe system
<User458764>
How do I do that?
jamesaxl has quit [Client Quit]
TheHodge has quit [Quit: Connection closed for inactivity]
kfpratt has joined #ruby
zenguy_pc has quit [Ping timeout: 240 seconds]
tlaxkit has joined #ruby
jamesaxl has joined #ruby
ElFerna has quit [Max SendQ exceeded]
dionysus69 has quit [Ping timeout: 265 seconds]
<ddv>
User458764: this won't end well
saddad has joined #ruby
saddad has quit [Client Quit]
<User458764>
ddv ok so what is the solution? I have an url like unsubscribe.mydomain.com/<code> and would like to retrieve the mail?
roshanavand has quit [Ping timeout: 240 seconds]
brendan- has quit [Excess Flood]
tinyhippo is now known as happyhippo
jamesaxl|2 has joined #ruby
ruurd has joined #ruby
agentmeerkat has quit [Ping timeout: 255 seconds]
jamesaxl has quit [Read error: Connection reset by peer]
subscope has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
agentmeerkat has joined #ruby
peteykun has quit [Ping timeout: 246 seconds]
whippythellama has joined #ruby
idefine has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
Xeago has quit [Remote host closed the connection]
bigmac has joined #ruby
freerobby has joined #ruby
<bigmac>
i have 2 arrays, how do i find the difference between the 2...
<bigmac>
a.size=262144
<bigmac>
b.size=262145
idefine_ has joined #ruby
<bigmac>
there i tried a-b but it shows nothing
idefine has quit [Read error: Connection reset by peer]
<bigmac>
oh, it worked lol
hanmac has joined #ruby
malconis has joined #ruby
bMalum has quit [Read error: No route to host]
abucha has joined #ruby
<ddv>
bigmac would be nice
<ddv>
still stuck at work tho
<bigmac>
wish it was served all day
Cyberheb has joined #ruby
<ddv>
lol
Cyberheb has left #ruby [#ruby]
nfk|laptop has quit [Read error: Connection reset by peer]
<bigmac>
is there a way i can make irb, silent
bMalum has joined #ruby
idefine_ has quit [Read error: Connection reset by peer]
<bigmac>
a.each{|x| }
<bigmac>
this block will output the contents of a,
RegulationD has joined #ruby
<bigmac>
a.each{|x| }; sleep 1
<bigmac>
this will now be silent
nfk|laptop has joined #ruby
idefine has joined #ruby
TheNet has quit [Remote host closed the connection]
cgfbee has joined #ruby
kp666 has joined #ruby
cfloare has joined #ruby
zenguy_pc has joined #ruby
abucha_ has quit [Ping timeout: 240 seconds]
timmow has joined #ruby
<yorickpeterse>
"TypeError: size differ. expected as sizeof(int)=4 but 3"
<yorickpeterse>
lol what an error
<norc>
bigmac: You can either set IRB.conf[:PROMPT][:DEFAULT][:RETURN] = ""
rikkipit_ has quit [Quit: Leaving...]
<norc>
bigmac: Or if you just want it once, append something like "and nil" to your statement.
<bigmac>
ok
yardenbar has joined #ruby
<bigmac>
ty
ruurd has joined #ruby
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
skweek has quit [Ping timeout: 246 seconds]
tomaz_b has joined #ruby
roshanavand has joined #ruby
timmow has quit [Client Quit]
RegulationD has quit [Ping timeout: 260 seconds]
TomPeed has joined #ruby
bdnelson has joined #ruby
<tomaz_b>
hi guys... i need some newbie help. how could i know which gem would allow me to require this as -> require 'xsd/mapping'
timmow has joined #ruby
<tomaz_b>
i need some functionality from it... but i am not really sure which one is it
krzkrzkrz has joined #ruby
timmow has quit [Remote host closed the connection]
<apeiros>
tomaz_b: if the author is sane, either xsd, or xsd-mapping
timmow has joined #ruby
idefine_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
lubarch has quit [Quit: leaving]
blackmesa has joined #ruby
nertzy has quit [Quit: This computer has gone to sleep]
Xeago has joined #ruby
ruurd has quit [Read error: Connection reset by peer]
_blizzy_ has joined #ruby
karapetyan has quit [Remote host closed the connection]
karapetyan has joined #ruby
<tomaz_b>
apeiros: thanks
tk__ has quit [Quit: ばいばい]
<apeiros>
(if it's neither, that consequently means the author is not sane and should be hit with the bug-stick)
Kero has quit [Ping timeout: 264 seconds]
freerobby has quit [Quit: Leaving.]
dharmdip_ has joined #ruby
psy_ has joined #ruby
freerobby has joined #ruby
<tomaz_b>
i am affraid it is this last option
psy_ has quit [Max SendQ exceeded]
<tomaz_b>
:/
Kero has joined #ruby
psy_ has joined #ruby
ruurd has joined #ruby
<apeiros>
tomaz_b: I'd use google then. site:rdoc.info Xsd::Mapping
dharmdip_ has quit [Client Quit]
karapetyan has quit [Ping timeout: 255 seconds]
decoponio has joined #ruby
musou has joined #ruby
<ljarvis>
bug stick
<apeiros>
tomaz_b: or does that require succeed in any of your projects?
<ljarvis>
doesn't sound very useful if it's just a stick
shum has joined #ruby
norc has quit [Ping timeout: 246 seconds]
<apeiros>
ljarvis: it's painful enough if you stab the person in the eye with it
<ljarvis>
ah yes that'll do it
lavros has joined #ruby
sdothum has quit [Read error: Connection reset by peer]
<tomaz_b>
which works quite ok... but the problem is... if i start creating objects from those XSD classes... i somehow can't find a way to write them to a actual xml file... in a way that i would get TAG names correct
<shevy>
ddv> bigmac would be nice
<shevy>
ddv you are always so hungry!!!
aadam21 has joined #ruby
idefine has quit [Read error: Connection reset by peer]
<ddv>
perhaps
Thaumiel|Work has joined #ruby
<shevy>
don't worry, if the bigmac won't suit you, we also got some noodle and mozzarella here
<shevy>
it's a cuisine channel after all
rgb-one has joined #ruby
idefine has joined #ruby
tulak has quit [Ping timeout: 240 seconds]
abucha has quit [Quit: Leaving...]
The_Phoenix has quit [Read error: Connection reset by peer]
tagrudev has quit [Remote host closed the connection]
cacam9621 has quit [Read error: Connection reset by peer]
<ddv>
lol
ruby-lang109 has joined #ruby
<ddv>
pizzaops
aganov has quit [Remote host closed the connection]
ruurd has joined #ruby
diegoaguilar_ has quit [Ping timeout: 260 seconds]
thezanke has joined #ruby
kalusn has quit [Remote host closed the connection]
ruurd has quit [Client Quit]
<thezanke>
Has anyone used HTTParty for consuming an api? Is there a better option?
synthroid has quit [Remote host closed the connection]
sinkensabe has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
shredding has quit [Ping timeout: 265 seconds]
dnomyar has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
teclator has joined #ruby
ramfjord has quit [Ping timeout: 240 seconds]
_stu_ has quit [Quit: _stu_]
arne has quit [Quit: Leaving]
miskatonic has quit [Quit: miskatonic]
leafyba__ has quit [Read error: Connection reset by peer]
leafybas_ has joined #ruby
Xeago has quit [Remote host closed the connection]
dnomyar has quit [Read error: Connection reset by peer]
zapata_ has quit [Quit: WeeChat 1.3]
jeffreylevesque has joined #ruby
blackmesa has quit [Read error: Connection reset by peer]
mordocai has joined #ruby
Zarthus has quit [Quit: I can't go to hell. I'm all out of vacation days.]
Zarthus has joined #ruby
rgb-one has quit [Ping timeout: 246 seconds]
TheNet has joined #ruby
hbx has joined #ruby
ramfjord has joined #ruby
gusTester has joined #ruby
sung has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
infamos has joined #ruby
<sung>
hola. i've a variable that has a long string in it with lots of funky characters. i want to encode/escape them so that i can use it in a printed SQL statement for a mysql database (not located on the machine where the script is running). the different libraries i've found for mysql that have an escape function seemingly require connectivity to a mysql database to perform the escape. any ideas on how i can do this without also installing mysql on my dev machine?
Xeago has joined #ruby
gusTester has left #ruby [#ruby]
blackmesa has joined #ruby
dmitch has joined #ruby
RegulationD has joined #ruby
rodfersou has joined #ruby
build22 has joined #ruby
<yorickpeterse>
>> p "\x9A\x02\x00\x00\x7F\x00\x00\x01\x7F\x00\x00\x01".unpack('Ic*')
<ruboto>
yorickpeterse # => [666, 127, 0, 0, 1, 127, 0, 0, 1] ...check link for more (https://eval.in/464425)
<yorickpeterse>
hm
_stu_ has joined #ruby
The_Phoenix has joined #ruby
<yorickpeterse>
fukit, I'll assume this works everywhere
<yorickpeterse>
yay unpacking structures
jxs_ has quit [Remote host closed the connection]
gusTester has joined #ruby
gusTester has quit [Client Quit]
baweaver has joined #ruby
I has joined #ruby
I is now known as Guest92672
gusTester has joined #ruby
baweaver has quit [Remote host closed the connection]
gard_ has quit [Ping timeout: 265 seconds]
Rodya_ has joined #ruby
Pupeno has quit [Remote host closed the connection]
slawrence00 has joined #ruby
Melpaws has joined #ruby
mary5030 has joined #ruby
SCHAAP137 has quit [Remote host closed the connection]
ruurd has quit [Quit: ZZZzzz…]
ESpiney has joined #ruby
mary5030 has quit [Remote host closed the connection]
radgeRayden_ has quit [Ping timeout: 255 seconds]
davedev2_ has joined #ruby
nibbo has quit [Ping timeout: 255 seconds]
ruurd has joined #ruby
mary5030 has joined #ruby
Peg-leg has quit [Quit: Leaving.]
davedev2_ is now known as davedev24_
davedev24_ has quit [Client Quit]
davedev2_ has joined #ruby
<jhass>
sung: run the script on something with connectivity to the mysql server?
marr has quit [Ping timeout: 260 seconds]
<jhass>
sung: the proper solution to this doesn't use escaping at all, it sends the query with a placeholder and the data separately to the db
Pupp3tm4_ has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 264 seconds]
Rodya_ has quit [Ping timeout: 244 seconds]
<sung>
jhass: agreed, but that's assuming i have access to od anything else besisdes say "hey, take newupdates.sql and run this" (which i don't)
xet7 has quit [Read error: Connection reset by peer]
<sung>
jhass: so i was hoping to generate all the necessary sql somewhere else
ramfjord has quit [Ping timeout: 246 seconds]
<jhass>
can't you do hey, take newupdates.json and run ruby import.rb newupdates.json ?
davedev24 has quit [Ping timeout: 240 seconds]
<jhass>
but I mean you want to test this stuff, so you'll need a local mysql server anyway
<jhass>
it's not like this is any harder than package_manager install mysql/mariadb
arup_r has joined #ruby
radgeRayden has joined #ruby
umgrosscol has quit [Ping timeout: 252 seconds]
nibbo has joined #ruby
centrx has joined #ruby
Meow-J has quit [Quit: Connection closed for inactivity]
TomyWork has quit [Ping timeout: 260 seconds]
fedexo has joined #ruby
pandaant has quit [Remote host closed the connection]
victortyau has joined #ruby
kies^ has joined #ruby
malconis_ has joined #ruby
malconis_ has quit [Remote host closed the connection]
<tsunamie>
looks like my version should work it's the latest version of gem
<tsunamie>
or is that refering to ruby version
synthroid has joined #ruby
<havenwood>
tsunamie: The latest version of RubyGems is actually now 2.5.0 with a recent release.
Bloomer has joined #ruby
<tsunamie>
I see
<tsunamie>
if I install that will I need to talso update ruby?
leafybas_ has joined #ruby
<havenwood>
tsunamie: I ran into someone else with a similar issue and made a little Ruby script to add a trust certificate. Unfortunately I forgot I'm grabbing it from an https location so it doesn't quite work: https://gist.github.com/havenwood/9cd08a0b66b75d726ef6
timonv has joined #ruby
shinenelson has quit [Quit: Connection closed for inactivity]
<havenwood>
tsunamie: But that might give you some insight into how you can solve it manually. Or yeah, Lavena's gist!
victortyau has quit [Ping timeout: 260 seconds]
bMalum has quit [Ping timeout: 260 seconds]
bMalum_ has joined #ruby
<havenwood>
tsunamie: If you change that URL ^ to a non-https one I think it actually would work.
ELCALOR has quit [Ping timeout: 264 seconds]
nibbo has quit [Ping timeout: 260 seconds]
<havenwood>
tsunamie: I wouldn't be surprised if there was a ca-certificates package for cygwin, but yeah I'm unfamiliar.
<tsunamie>
thanks
<havenwood>
np
lubarch has joined #ruby
baroquebobcat has quit [Quit: baroquebobcat]
lubarch has quit [Client Quit]
lubarch has joined #ruby
leafyba__ has quit [Ping timeout: 272 seconds]
ELCALOR has joined #ruby
Xeago has quit [Remote host closed the connection]
leafybas_ has quit [Remote host closed the connection]
TheNet has quit [Remote host closed the connection]
<havenwood>
tsunamie: https!
The_Phoenix has quit [Ping timeout: 244 seconds]
mattwildig has quit [Remote host closed the connection]
<tsunamie>
havenwood, why?
fgo has joined #ruby
<tsunamie>
I purpously removed it
<havenwood>
tsunamie: Don't do that!
<tsunamie>
havenwood, why?
<tsunamie>
its not working
mattwildig has joined #ruby
bb010g has quit [Ping timeout: 264 seconds]
apeiros has quit [Ping timeout: 264 seconds]
apeiros has joined #ruby
rgb-one has left #ruby [#ruby]
bb010g has joined #ruby
The_Phoenix has joined #ruby
arthurix_ has quit [Ping timeout: 272 seconds]
willardg has joined #ruby
<havenwood>
tsunamie: The same reason one doesn't disable SSL across the board. I don't like to start taking those gambles. We have little enough security as is that I don't want to disable the little shreds we do have.
k3asd` has joined #ruby
The_Phoenix has quit [Client Quit]
mistermocha has joined #ruby
<tsunamie>
havenwood, just me downloading gems right
mistermocha has quit [Remote host closed the connection]
retornam has quit [Ping timeout: 264 seconds]
mistermocha has joined #ruby
Xeago has joined #ruby
<havenwood>
tsunamie: I cringe when folk disable SSL but *maybe* in practice you wont get MITMed. :P
fgo has quit [Ping timeout: 252 seconds]
<tsunamie>
:)
senayar has quit [Read error: Connection reset by peer]
momomomomo has joined #ruby
<havenwood>
Speaking of RubyGems security, who wants to finish the TUF implementation?!
<tsunamie>
one everything else like git and so on I still have it
<tsunamie>
so I am cool there
Nick_ZWG has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
retornam has joined #ruby
roshanavand has quit [Remote host closed the connection]
sinkensabe has quit [Remote host closed the connection]
mattwildig has quit [Remote host closed the connection]
diegoaguilar has quit [Ping timeout: 272 seconds]
araujo_ has quit [Quit: Leaving]
tulak has joined #ruby
danieli has joined #ruby
zarathostra has joined #ruby
eminencehc has joined #ruby
<zarathostra>
Hey, I was wondering how does Ruby parser deals with custom operators since it doesn't now it's precendence, do you guys have any ideas ?
mattwildig has joined #ruby
relix has joined #ruby
mrevd has left #ruby [#ruby]
baweaver has joined #ruby
Pupeno has joined #ruby
gard_ has joined #ruby
araujo has joined #ruby
leafyba__ has joined #ruby
baweaver has quit [Ping timeout: 240 seconds]
diegoaguilar has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
willardg has joined #ruby
gigetoo has quit [Remote host closed the connection]
JanPeter has quit [Remote host closed the connection]
leafybas_ has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
karapetyan has joined #ruby
<shevy>
there are no "custom" operators
RobertBirnie has joined #ruby
leafyba__ has quit [Ping timeout: 240 seconds]
Xeago has quit [Remote host closed the connection]
elcontrastador has quit [Ping timeout: 250 seconds]
gusTester has joined #ruby
Xeago has joined #ruby
baweaver has joined #ruby
mikecmpbll has quit [Ping timeout: 246 seconds]
aadam21 has quit [Remote host closed the connection]
arup_r has quit [Ping timeout: 240 seconds]
RobertBirnie has quit [Read error: Connection reset by peer]
RobertBirnie has joined #ruby
<zarathostra>
shevy: Ok I've never done Ruby but I heard that you could define for example "def +(rhs) ... end" so you could write "obj + rhs" as a shortcut for "obj.+(rhs)"
aadam21 has joined #ruby
arup_r has joined #ruby
<zarathostra>
couldn't you define a new operator with a different (not builtin) symbol ?
vigintas has quit [Read error: Connection reset by peer]
kalusn has quit [Remote host closed the connection]
vigintas1 has joined #ruby
arup_r is now known as Guest84510
timonv has quit [Ping timeout: 272 seconds]
tomphp has quit [Ping timeout: 240 seconds]
qba73 has quit []
ahegyi has joined #ruby
baweaver has quit [Remote host closed the connection]
bMalum_ has quit [Quit: bMalum_]
eminencehc has quit [Remote host closed the connection]
vigintas1 is now known as vigintas
senayar has quit []
eminencehc has joined #ruby
towski_ has joined #ruby
pdoherty has joined #ruby
aadam21 has quit [Ping timeout: 260 seconds]
Nick_ZWG has joined #ruby
diegoaguilar has quit [Remote host closed the connection]
baweaver has joined #ruby
mistermocha has quit [Remote host closed the connection]
rabbithole has quit [Ping timeout: 272 seconds]
rbennacer has quit [Remote host closed the connection]
gard_ has quit [Ping timeout: 255 seconds]
__butch__ has joined #ruby
__butch__ has quit [Remote host closed the connection]
_stu_ has quit [Quit: _stu_]
zarathostra has quit [Quit: Page closed]
mistermocha has joined #ruby
ibouvousaime has quit [Ping timeout: 240 seconds]
lubarch has quit [Quit: leaving]
agentmeerkat has quit [Ping timeout: 252 seconds]
rbennacer has joined #ruby
stan has quit [Ping timeout: 250 seconds]
RegulationD has quit [Remote host closed the connection]
rbennacer has quit [Remote host closed the connection]
umgrosscol has quit [Ping timeout: 265 seconds]
Spami has quit [Quit: This computer has gone to sleep]
Nick_ZWG has quit [Ping timeout: 260 seconds]
finisherr has joined #ruby
<shevy>
and another webchatster gone, didn't even have the patience to idle to power
foomanchu has joined #ruby
<shevy>
when someone includes a method, into a class from a module, is there a way to find out where it was defined? e. g
<shevy>
class Foo; def test; end; end
<shevy>
versus: module Foo; def test; end; end; class Bar; include Foo; end
blackmesa has quit [Ping timeout: 272 seconds]
<shevy>
I need to override some methods dynamically, depending on whether they were defined in the class itself, or whether they were pulled-in from another module
mooru has joined #ruby
<Ox0dea>
shevy: #method+added + Method#owner?
<Ox0dea>
*#method_added
Xeago has quit [Remote host closed the connection]
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Musashi007 has joined #ruby
<Ox0dea>
Well, no, #included in this case, but the Method class surely has all the methods you'll need.
willardg has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
cwong_on_irc has joined #ruby
dc has joined #ruby
cwong_on_irc has quit [Max SendQ exceeded]
infamos has quit [Ping timeout: 264 seconds]
cwong_on_irc has joined #ruby
gusTester has left #ruby [#ruby]
purplexed- has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
<shevy>
hmm
subscope has joined #ruby
<shevy>
you did this on purpose right... using 5 times the word 'method' there
shum has quit [Read error: Connection reset by peer]
sdothum has joined #ruby
marr has joined #ruby
zoskia has quit [Quit: Changing server]
nertzy has joined #ruby
umgrosscol has joined #ruby
avahey has quit [Quit: Connection closed for inactivity]
rabbithole has joined #ruby
Melpaws has quit [Ping timeout: 246 seconds]
cornerma1 has joined #ruby
idefine has quit [Read error: Connection reset by peer]
fgo has joined #ruby
Guest53 has joined #ruby
<tomaz_b>
guys what would you use for handling XMLs especially workflow... XSD -> XML (signed) today... with ruby > 2.1.x
dotix has joined #ruby
dotix has joined #ruby
idefine has joined #ruby
Contigi777 has quit [Ping timeout: 246 seconds]
<tomaz_b>
i spent few hours on soap4r but it looks like... it is buggy... since it calls/uses xsd from rubys std library... which was last used in ruby 1.8.x
<tomaz_b>
??
infamos has joined #ruby
Guest53 has quit [Client Quit]
<tomaz_b>
or let say... xsd2ruby which you get with this gem does.
<tomaz_b>
i might be wrong... since i am really new to ruby..
musou has quit [Quit: Connection closed for inactivity]
<tomaz_b>
anyone?
cornerman has quit [Ping timeout: 244 seconds]
cornerma1 is now known as cornerman
FDostoyevsky has joined #ruby
Guest53 has joined #ruby
Melpaws has joined #ruby
The_Phoenix has joined #ruby
agentmeerkat has joined #ruby
bonemind has quit [Quit: WeeChat 1.0]
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
joonty has quit [Quit: joonty]
fgo has quit [Ping timeout: 255 seconds]
axl_ has quit [Quit: axl_]
Musashi007 has quit [Quit: Musashi007]
ZeeNoodley has quit [Changing host]
ZeeNoodley has joined #ruby
ghr has quit [Ping timeout: 240 seconds]
bb010g has joined #ruby
mikecmpbll has joined #ruby
JDiPierro has joined #ruby
lavros_ has quit [Quit: leaving]
aspiers has joined #ruby
<Ox0dea>
shevy: I didn't "pick" five; that's just how many mentions it takes to get to the cent^W fixpoint.
peteykun has quit [Ping timeout: 252 seconds]
sdothum has quit [Read error: Connection reset by peer]
Rodya_ has joined #ruby
DEA7TH has quit [Quit: DEA7TH]
<shevy>
method(:method).methods.method(:method)
sdothum has joined #ruby
<shevy>
I can't help it...
<shevy>
tomaz_b I radically abandoned XML, you are a brave person to still use it
<shevy>
people tend to use nokogiri when they want to traverse around xpath-thingies
<tomaz_b>
shevy: shit if would be up to me... i would be faaaar away :D but i have to fix something for some government tax bla, bla
robbyoconnor has quit [Ping timeout: 246 seconds]
<shevy>
damn governments
djbkd has joined #ruby
mrtomme has quit [Ping timeout: 260 seconds]
<Ox0dea>
shevy: That was yesterday.
idefine has quit [Read error: Connection reset by peer]
tulak has quit [Remote host closed the connection]
mrtomme has joined #ruby
cdg has joined #ruby
willardg has joined #ruby
cdg has quit [Read error: Connection reset by peer]
cdg has joined #ruby
Contigi has joined #ruby
UtkarshRay has joined #ruby
skweek has quit [Ping timeout: 246 seconds]
idefine has joined #ruby
jpfuentes2 has joined #ruby
cdg has quit [Remote host closed the connection]
casadei_ has quit [Read error: Connection reset by peer]
casadei has joined #ruby
Bloomer has quit []
fedexo has quit [Ping timeout: 246 seconds]
cdg has joined #ruby
The_Phoenix has quit [Quit: Leaving.]
robbyoconnor has joined #ruby
User458764 has joined #ruby
Rodya_ has quit [Read error: Connection reset by peer]
ruurd has joined #ruby
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
soulisson has joined #ruby
tubuliferous has joined #ruby
kalusn has joined #ruby
luriv_ has quit [Quit: Leaving]
bdnelson has quit [Quit: Computer has gone to sleep.]
lemur has joined #ruby
<soulisson>
Hello, sorry to bother you, I'm new to Ruby, I would like to know if in "loop do ... end" the "do ... end" part is considered a block in the Ruby sense?
Rodya_ has joined #ruby
idefine has quit [Read error: Connection reset by peer]
TheNet has joined #ruby
ekinmur has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine has joined #ruby
jas02 has joined #ruby
<Ox0dea>
soulisson: Yep.
darthdeus has joined #ruby
rakm has joined #ruby
ekinmur has joined #ruby
kfpratt has quit [Remote host closed the connection]
kfpratt has joined #ruby
<gregf_>
a = 1; loop do a+=1; sleep 1; break if a == 10 end == 'a = 1; loop { a+=1; sleep 1; break if a == 10 }'
kfpratt has quit [Remote host closed the connection]
<soulisson>
Ox0dea, ok, I thought a block must be associated to a yield
kfpratt has joined #ruby
rbennacer has joined #ruby
<Ox0dea>
soulisson: The #loop method is yielding to your block.
Guest1049 has quit [Quit: '']
troulouliou_div2 has quit [Remote host closed the connection]
<soulisson>
Ox0dea, ok, loop is a method?
nertzy has quit [Quit: This computer has gone to sleep]
idefine has quit [Read error: Connection reset by peer]
<soulisson>
thanks
lemur has quit [Ping timeout: 265 seconds]
<Ox0dea>
soulisson: def loop; yield while true; end
<Ox0dea>
And there's how you could implement it yourself. :P
cwong_on_irc has quit [Quit: Leaving.]
jobewan has joined #ruby
A124 has joined #ruby
<soulisson>
Ox0dea, and is this also the case with the while statement?
<Ox0dea>
soulisson: No, that's special.
PaulCape_ has quit [Quit: .]
jas02 has quit [Ping timeout: 264 seconds]
<soulisson>
Ox0dea, so ywhile true do ... end, do ... end is not really a block in the ruby sense?
<Ox0dea>
soulisson: Yes, it is.
<Ox0dea>
Oh, wait.
Pupeno has quit [Remote host closed the connection]
PaulCapestany has joined #ruby
<Ox0dea>
soulisson: You're right, it's not, and that's why you shouldn't use `do` in a `while` header; it's superfluous and potentially confusing.
tlaxkit has quit [Quit: ¡Hasta luego!]
Rodya_ has quit [Ping timeout: 260 seconds]
<Ox0dea>
But the `do...end` passed to #loop *is* a block.
<soulisson>
Ox0dea, thanks, sorry about this questions I'm still very new to Ruby
<shevy>
'while true' is worse than 'loop {}' !
shinnya has joined #ruby
<Ox0dea>
Well, yeah, but the former leads to the "cleanest" definition of the latter.
agentmeerkat has quit [Ping timeout: 260 seconds]
<craysiii>
what about cycle
maletor has joined #ruby
rzsd has quit [Ping timeout: 246 seconds]
dc has quit [Remote host closed the connection]
<Ox0dea>
Whale, there are any number of ways to get hold of "forever" in Ruby, but #loop is procedural and shouldn't bother to hide it.
<shevy>
you and your whales
arthurix_ has joined #ruby
<Ox0dea>
logs $ grep -ci 'Ox.*whale' *ruby.*
<Ox0dea>
7
<Ox0dea>
Could be worse.
aadam21 has joined #ruby
arthurix has quit [Ping timeout: 240 seconds]
pandaant has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
kfpratt has quit [Remote host closed the connection]
momomomomo has quit [Quit: momomomomo]
kfpratt has joined #ruby
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
lukaszes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
TheHodge has joined #ruby
aspiers has quit [Ping timeout: 272 seconds]
<mozzarella>
guys
Spami has joined #ruby
aadam21 has quit [Ping timeout: 246 seconds]
Fredrich010 has quit [Remote host closed the connection]
northfurr has joined #ruby
EllisTAA has joined #ruby
xet7 has joined #ruby
dikaio has joined #ruby
Wsewolod has joined #ruby
jackjackdripper1 has quit [Ping timeout: 240 seconds]
ruby-lang421 has joined #ruby
jackjackdripper has joined #ruby
Guest53 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
kies^ has quit [Ping timeout: 260 seconds]
lsmola has quit [Ping timeout: 260 seconds]
RegulationD has joined #ruby
ruby-lang421 has quit [Client Quit]
<mozzarella>
my gems are installed in $HOME/.gem/ruby/gems, but every time I install a new OS, it seems that the currently installed gems are ignored and get downloaded again when I run "bundle install", why is this?
roshanavand has quit [Remote host closed the connection]
Rollabunna has quit [Remote host closed the connection]
kalusn has quit [Remote host closed the connection]
Musashi007 has joined #ruby
yfeldblum has joined #ruby
Guest53 has joined #ruby
closer has quit [Ping timeout: 272 seconds]
dikaio has quit [Ping timeout: 265 seconds]
maletor has quit [Ping timeout: 264 seconds]
maletor has joined #ruby
bdnelson has joined #ruby
RegulationD has quit [Ping timeout: 264 seconds]
roshanavand has joined #ruby
User458764 has joined #ruby
willywos has joined #ruby
willywos has quit [Client Quit]
closer has joined #ruby
RegulationD has joined #ruby
skweek has joined #ruby
jackjackdripper has quit [Quit: Leaving.]
jackjackdripper has joined #ruby
SleepySensei has joined #ruby
roshanavand has quit [Remote host closed the connection]
Rodya_ has joined #ruby
TheNet has quit [Remote host closed the connection]
Pupeno has joined #ruby
zenguy_pc has quit [Ping timeout: 255 seconds]
roshanavand has joined #ruby
roshanavand has quit [Remote host closed the connection]
postmodern has joined #ruby
roshanavand has joined #ruby
Pupeno has quit [Remote host closed the connection]
tubuliferous has quit [Ping timeout: 260 seconds]
fgo has joined #ruby
DEA7TH has joined #ruby
leafybas_ has joined #ruby
skweek has quit [Ping timeout: 240 seconds]
radgeRayden has quit [Ping timeout: 246 seconds]
roshanavand has quit [Remote host closed the connection]
kalusn has joined #ruby
mattwashere has joined #ruby
th0m__ has joined #ruby
fgo has quit [Ping timeout: 240 seconds]
ruurd has quit [Quit: ZZZzzz…]
Rodya_ has quit [Read error: Connection reset by peer]
FDostoyevsky has quit [Quit: WeeChat 1.3]
Spami has quit [Quit: This computer has gone to sleep]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Spami has joined #ruby
Spami has quit [Remote host closed the connection]
tubuliferous has joined #ruby
Spami has joined #ruby
SleepySensei has quit [Ping timeout: 240 seconds]
zenguy_pc has joined #ruby
jamesaxl|2 has quit [Read error: Connection timed out]
blackmesa has joined #ruby
asianMike has joined #ruby
dikaio has joined #ruby
Guest76630 has quit [Ping timeout: 255 seconds]
tjohnson has joined #ruby
karapetyan has quit [Remote host closed the connection]
Guest84510 is now known as arup_r
karapetyan has joined #ruby
danieli has quit [Ping timeout: 250 seconds]
idefine_ has quit [Read error: Connection reset by peer]
idefine has joined #ruby
dikaio has quit [Client Quit]
pdoherty has quit [Ping timeout: 246 seconds]
blackmesa has quit [Ping timeout: 260 seconds]
Rodya_ has joined #ruby
danieli has joined #ruby
idefine has quit [Read error: Connection reset by peer]
blackmesa has joined #ruby
idefine has joined #ruby
danieli has quit [Read error: Connection reset by peer]
leat has quit [Remote host closed the connection]
karapetyan has quit [Ping timeout: 272 seconds]
leat has joined #ruby
idefine has quit [Read error: Connection reset by peer]
yqt has joined #ruby
p0wn3d__ has joined #ruby
idefine has joined #ruby
ruurd has joined #ruby
dc_ has joined #ruby
karapetyan has joined #ruby
TheNet has joined #ruby
JinglesCafe has joined #ruby
<JinglesCafe>
I love ruby, its better than fortan
Spami has quit [Quit: This computer has gone to sleep]
jas02 has joined #ruby
idefine has quit [Read error: Connection reset by peer]
Rodya_ has quit [Remote host closed the connection]
idefine has joined #ruby
_blizzy_ has quit [Quit: Leaving]
TheNet has quit [Remote host closed the connection]
TheNet has joined #ruby
Melpaws1 has joined #ruby
fantazo has joined #ruby
Melpaws has quit [Ping timeout: 240 seconds]
JinglesCafe has quit [Client Quit]
idefine has quit [Read error: Connection reset by peer]
dionysus69 has joined #ruby
dionysus69 has quit [Remote host closed the connection]
idefine has joined #ruby
dionysus69 has joined #ruby
dionysus69 has quit [Client Quit]
jdawgaz has joined #ruby
skweek has joined #ruby
Pupeno has joined #ruby
lemur has joined #ruby
mattwashere has quit [Remote host closed the connection]
sdothum has quit [Read error: Connection reset by peer]
<eam>
you can use fuser / lsof to see what processes have a descriptor on the file open
roshanavand has quit [Ping timeout: 240 seconds]
yardenbar has joined #ruby
leafybas_ has joined #ruby
aadam21 has quit [Ping timeout: 244 seconds]
<shevy>
fuser! fuuuuuser!
<shevy>
fuuuuuuuuuuuuser!!!
<pipework>
shevy: luser
baweaver has quit [Remote host closed the connection]
<shevy>
pipe|work
synthroid has joined #ruby
rabbithole has quit [Ping timeout: 272 seconds]
deg_ has joined #ruby
<pipework>
|work?
pipework is now known as |work
dikaio has joined #ruby
<|work>
I am |work!
eminencehc has joined #ruby
hahuang65 has quit [Ping timeout: 250 seconds]
Arkon has joined #ruby
Okioo has quit [Quit: Page closed]
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
|work is now known as spaceghost|work
sdothum has joined #ruby
synthroi_ has joined #ruby
Melpaws1 has quit [Ping timeout: 240 seconds]
idefine_ has joined #ruby
spider-mario has joined #ruby
Melpaws has joined #ruby
idefine has quit [Read error: Connection reset by peer]
<shevy>
hmm
dc_ has quit [Remote host closed the connection]
vigintas has quit [Ping timeout: 260 seconds]
djbkd has quit [Remote host closed the connection]
pedahzur has joined #ruby
synthroid has quit [Ping timeout: 244 seconds]
kaleido has joined #ruby
hahuang65 has joined #ruby
kaleido has left #ruby [#ruby]
<benjwadams>
Thanks so much! The `fuser -k` did the trick
jas02 has quit [Ping timeout: 240 seconds]
<spaceghost|work>
Ox0dea: Mine has to do with wrapping json-schema into a lot of cool tooling so that you can build a system by writing the documentation for it, which will write the tests for the endpoints, and do a lot more than just testing.
nertzy has joined #ruby
mattwildig has quit [Remote host closed the connection]
<pedahzur>
Sorry to ask this here. I've asked in #berkshelf, and am getting no response. I'm hitting ":gzip is not registered on Faraday::Response" when trying to run 'berks update' and cannot figure out a solution. Unlike https://github.com/berkshelf/berkshelf/issues/1466, I am *NOT* running it from 'chef exec'. I've tried fiddling with Faraday versions and berks-api-client versions, but have not gotten anywhere!
<spaceghost|work>
Executable specification through the use of something like swagger's spec or something helpful for describing the API.
stamina has quit [Ping timeout: 265 seconds]
ss_much has joined #ruby
<Ox0dea>
spaceghost|work: Using NLP to parse the documentation, then, or?
ahegyi_ has joined #ruby
zapata has joined #ruby
mistermocha has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
gard_ has quit [Ping timeout: 260 seconds]
<spaceghost|work>
Ox0dea: No, write the docs in json schema!
<spaceghost|work>
It's nestable!
tomphp has quit [Client Quit]
<spaceghost|work>
It has mixins!
[Butch] has quit [Quit: I'm out . . .]
<Ox0dea>
Ah, gotcha.
_stu_ has quit [Quit: _stu_]
[Butch] has joined #ruby
odigity has joined #ruby
<Ox0dea>
spaceghost|work: How faithfully do you intend to represent Ruby's object model?
djbkd has joined #ruby
<odigity>
If I have an object with an instance var containing a hash, can I delegate the #each method to it?
fgo has joined #ruby
<spaceghost|work>
Ox0dea: it has nothing to do with ruby object models though. It's just for describing json schemas.
jackjackdripper has quit [Quit: Leaving.]
<spaceghost|work>
It's all written in JSON.
<Ox0dea>
spaceghost|work: A JSON schema describing a JSON schema...?
<spaceghost|work>
Ox0dea: A nested object, sure. An object type described in JSON Schema that can have other objects inside it.
conta has joined #ruby
ahegyi has quit [Ping timeout: 264 seconds]
ruurd has joined #ruby
<Ox0dea>
spaceghost|work: What kind of objects?
<spaceghost|work>
Ox0dea: JSON objects.
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<spaceghost|work>
They're just JSON objects with a schema file to validate against.
<Ox0dea>
To validate what against?
<Ox0dea>
Ruby objects, right?
<spaceghost|work>
Ox0dea: JSON payloads!
<Ox0dea>
Oh, I see.
rabbithole has joined #ruby
<spaceghost|work>
Anything could create them, it's not language-bound.
mloy_ has joined #ruby
<spaceghost|work>
It's like super slow and not remotely comparable protocol-buffers in an HTTP resource oriented fashion.
<spaceghost|work>
Or you could throw 'em down a socket as json payloads wrapped in an envelope
last_staff has joined #ruby
PaulCape_ has joined #ruby
weckl has quit [Remote host closed the connection]
build22_ has joined #ruby
yfeldblum has quit [Ping timeout: 246 seconds]
dotix has quit [Ping timeout: 272 seconds]
fgo has quit [Ping timeout: 260 seconds]
PaulCapestany has quit [Ping timeout: 240 seconds]
infamos has joined #ruby
Coldblackice has joined #ruby
dotix has joined #ruby
dotix has quit [Changing host]
dotix has joined #ruby
kies^ has joined #ruby
blackmesa has quit [Ping timeout: 246 seconds]
Musashi007 has quit [Quit: Musashi007]
shinnya has quit [Ping timeout: 260 seconds]
tvw has quit []
rakm has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
agentmeerkat has joined #ruby
dmitch has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
idefine_ has quit [Read error: Connection reset by peer]
ledestin has joined #ruby
idefine has joined #ruby
lucianosousa has quit [Ping timeout: 272 seconds]
nertzy has quit [Quit: This computer has gone to sleep]
lucianosousa has joined #ruby
mloy_ has quit [Quit: Leaving]
idefine has quit [Read error: Connection reset by peer]
mloy_ has joined #ruby
idefine has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
TheNet has quit [Remote host closed the connection]
hahuang65 has quit [Ping timeout: 255 seconds]
mloy_ has quit [Client Quit]
robbyoconnor has quit [Quit: Konversation terminated!]
<jmonreal>
If I have a json array with strings like this {test => ["key1=value1", "key2=value2"] }, how can I get the keys and values ?
<jmonreal>
without knowing them of course
VeryBewitching has joined #ruby
<Ox0dea>
jmonreal: How did you end up in this position?
<JoshL>
Ox0dea: a question we all ask ourselves every day
maletor has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ghostbox has joined #ruby
Galas has joined #ruby
<jmonreal>
Ox0dea: its a json I am getting from someplace
<Ox0dea>
jmonreal: But "key=value" isn't really JSON.
mattwildig has joined #ruby
<Ox0dea>
Are you sure there's no way to convince your data source to not be a dick?
<jmonreal>
Ox0dea: its a string that has that configuration
<jmonreal>
its an array of strings
<Ox0dea>
Yes, I see.
<VeryBewitching>
"Dear Datasource, I've been meaning to mention this for some time now, but never had the heart to tell you... you're a dick."
<odigity>
drbrain, multiple assignment/return values describes what you're doing with the whole expression. I guess there's not a term just for the comma-separated rvalue / lvalue list. Ok.
PaulCapestany has joined #ruby
<drbrain>
odigity: yeah, I haven't seen any consistent label for it
<odigity>
Ox0dea, that hurts muh brain
<Ox0dea>
odigity: LHS seems most appropriate?
<drbrain>
odigity: if you add * to the mix it gets even more fun
<blubjr>
you're destructuring a return value, but there's still only one
<blubjr>
multiple return values is different
<eam>
perl would call it list context
<Ox0dea>
blubjr: Sure, I know Ruby doesn't have real multiple return values, but it does have "real" destructuring.
<odigity>
blubjr, that's what weirds my out. it's one value, but it's multiple values, but it's not an array :)
<Ox0dea>
odigity: It is an Array, though.
<drbrain>
odigity: ruby creates an Array for you
ivanskie has joined #ruby
<drbrain>
I use `return a, b` to signal the user "I'm returning multiple values"
<odigity>
Ruby creates an array if you do a = 1, 2 but not a,_ = 1, 2 right? like, only if there are no commas on the left side?
<drbrain>
and `return [a, b]` to signal "I'm returning an Array" (but usually without the return)
<blubjr>
ya Ox0dea
moeabdol has quit [Ping timeout: 250 seconds]
PaulCape_ has quit [Ping timeout: 260 seconds]
<drbrain>
you could add an optimization to the compiler that eliminates array creation across the call, but I doubt it would change performance much
<odigity>
What I was ultimately trying to figure out is if returning 'a,b' to someone only expecting a would screw things up, or if the b would silently be ignored. so that I could, for example, implement a [] method that returns a piece of metadata about the value in addition to the value, but still have normal ruby libs and idioms work
<odigity>
I should have said "implement *an* [] method"
<Ox0dea>
odigity: Was it you who asked about this before? :P
<odigity>
nope, first time
<drbrain>
it would screw things up if they only expected one value
stamina has joined #ruby
<odigity>
because they'd get an array
<drbrain>
they'd need to change `result = your_method` to `result, = your_method`
<odigity>
unless they have a west-side comma
<drbrain>
correct
mooru has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
lucianosousa has quit [Quit: lucianosousa]
<riceandbeans>
that's annoying, because once you post to gist you can never take it down
aadam21 has joined #ruby
<JoshL>
riceandbeans: Yes those two method invocations are the same
mooru has joined #ruby
hakunin has joined #ruby
<riceandbeans>
JoshL: would you argue that the latter is more readable for a shorter line?
<riceandbeans>
JoshL: the latter would pass my linter
mooru has quit [Client Quit]
syath has quit [Quit: WeeChat 1.2]
felltir has quit [Remote host closed the connection]
<JoshL>
riceandbeans: Sure, I often call methods like that. I think rubocop's only lint re: that syntax is that method arguments on subsequent lines are aligned