baweaver changed the topic of #ruby to: Rules & more: https://ruby-community.com | Ruby 2.5.1, 2.4.4, 2.3.7, 2.6.0-preview1: https://www.ruby-lang.org | Paste 4+ lines of text to https://gist.github.com | Rails questions? Ask in #RubyOnRails | Books: https://goo.gl/wpGhoQ | Logs: https://irclog.whitequark.org/ruby
bmurt has joined #ruby
AJA4350 has quit [Quit: AJA4350]
houhoulis has joined #ruby
arashb has joined #ruby
K3rber0s has quit [Ping timeout: 260 seconds]
donofrio has joined #ruby
agent_white has joined #ruby
orbyt_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
karapetyan has joined #ruby
TomyLobo has quit [Ping timeout: 256 seconds]
karapetyan has quit [Ping timeout: 256 seconds]
jready has quit []
kmurphy4_ has quit [Quit: kmurphy4_]
cyberg has quit [Ping timeout: 248 seconds]
marr has quit [Ping timeout: 260 seconds]
denkweise has joined #ruby
cschneid_ has joined #ruby
cschneid_ has quit [Remote host closed the connection]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
govg has quit [Ping timeout: 250 seconds]
denkweise has quit [Quit: Leaving]
n0m4d1c has joined #ruby
govg has joined #ruby
banisterfiend has joined #ruby
dc2 has joined #ruby
cschneid_ has quit [Ping timeout: 248 seconds]
vladdypwnz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cschneid_ has joined #ruby
govg has quit [Ping timeout: 256 seconds]
alfiemax has joined #ruby
arashb has quit [Ping timeout: 260 seconds]
alfiemax has quit [Ping timeout: 265 seconds]
jottr has joined #ruby
namidark has quit [Ping timeout: 256 seconds]
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
chocoelho has quit [Quit: Konversation terminated!]
cschneid_ has quit [Remote host closed the connection]
chocoelho has joined #ruby
cschneid_ has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
arashb has joined #ruby
cschneid_ has quit [Remote host closed the connection]
arashb has quit [Ping timeout: 256 seconds]
kmurphy4_ has joined #ruby
cschneid_ has joined #ruby
cschneid_ has quit [Read error: Connection reset by peer]
cschneid_ has joined #ruby
sameerynho has quit [Ping timeout: 256 seconds]
arashb has joined #ruby
arashb has quit [Ping timeout: 240 seconds]
arashb has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has joined #ruby
dinfuehr has quit [Ping timeout: 260 seconds]
dinfuehr has joined #ruby
arashb has quit [Ping timeout: 255 seconds]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 264 seconds]
Omnilord has quit [Ping timeout: 264 seconds]
Yxhuvud has quit [Quit: No Ping reply in 180 seconds.]
arashb has joined #ruby
vladdypwnz has joined #ruby
ayonkhan has quit [Quit: Textual IRC Client: www.textualapp.com]
Yxhuvud has joined #ruby
chocoelho has quit [Quit: Konversation terminated!]
arashb has quit [Ping timeout: 256 seconds]
vladdypwnz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnollette has quit [Read error: Connection reset by peer]
redlegion has quit [Read error: Connection reset by peer]
duderonomy has joined #ruby
jnollette has joined #ruby
redlegion has joined #ruby
Dimik has quit [Ping timeout: 256 seconds]
howdoi has joined #ruby
dc2 has quit [Ping timeout: 240 seconds]
ebl18_ has joined #ruby
<ebl18_> Sorry to bother, I'm a full stack developer of broad experience, I need to earn some pocket money in part-time ASAP. I can do Python Django, Java EE, Node.js, React, Angular, Web scraping etc. Contact me if you need, Email: pippobox@gmail.com, Telegram: @lit2014 ((https://t.me/lit2014) Small projects prefered.
vladdypwnz has joined #ruby
<baweaver> Probably won't have much luck with getting jobs for those in a Ruby channel
<havenwood> ebl18_: How about Ruby?
jnollette has quit [Remote host closed the connection]
<ebl18_> I have only do a tiny project of modify redmine source code which is in ruby.
cschneid_ has quit [Remote host closed the connection]
cschneid_ has joined #ruby
<ebl18_> If you don't mind I'll try, as I'm very familiar with JavaEE,Node.js, etc., It will be much quicker for me than novices.
jnollette has joined #ruby
arescorpio has joined #ruby
cschnei__ has joined #ruby
cschneid_ has quit [Ping timeout: 276 seconds]
dc2 has joined #ruby
BTRE has quit [Read error: Connection reset by peer]
cschnei__ has quit [Ping timeout: 276 seconds]
BTRE has joined #ruby
cschneid_ has joined #ruby
agent_white has quit [Ping timeout: 260 seconds]
cschneid_ has quit [Ping timeout: 248 seconds]
darkhanb has quit [Ping timeout: 268 seconds]
pilne has quit [Quit: Leaving]
cadillac_ has quit [Quit: I quit]
cadillac_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jnollette has quit [Remote host closed the connection]
dc2 has quit [Ping timeout: 240 seconds]
jnollette has joined #ruby
kmurphy4_ has quit [Quit: kmurphy4_]
gheegh has joined #ruby
houhoulis has quit [Remote host closed the connection]
jottr has joined #ruby
w0b has joined #ruby
jottr has quit [Ping timeout: 256 seconds]
tuskkk___ has joined #ruby
ciscam has quit [Ping timeout: 265 seconds]
alfiemax has joined #ruby
ciscam has joined #ruby
ebl18_ has quit [Quit: Page closed]
kapil___ has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dviola has quit [Quit: WeeChat 2.1]
quobo has quit [Quit: Connection closed for inactivity]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
w0b has quit [Quit: AndroidIrc Disconnecting]
karapetyan has joined #ruby
ciscam has quit [Ping timeout: 248 seconds]
karapetyan has quit [Ping timeout: 240 seconds]
ciscam has joined #ruby
jrheaton has joined #ruby
memo1 has joined #ruby
reber has joined #ruby
lytol has quit [Remote host closed the connection]
govg has joined #ruby
orbyt_ has joined #ruby
n0m4d1c has quit []
govg has quit [Ping timeout: 276 seconds]
govg has joined #ruby
jrheaton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jrheaton has joined #ruby
j0bk has quit [Ping timeout: 256 seconds]
arescorpio has quit [Quit: Leaving.]
j0bk has joined #ruby
RougeR has quit [Ping timeout: 240 seconds]
schleppel has joined #ruby
raynold has quit [Quit: Connection closed for inactivity]
jrheaton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xuyuheng has joined #ruby
conta has joined #ruby
caleBOT has quit [Remote host closed the connection]
caleBOT_ has quit [Remote host closed the connection]
caleBOT has joined #ruby
caleBOT_ has joined #ruby
cadillac_ has quit [Ping timeout: 240 seconds]
cadillac_ has joined #ruby
oleo has quit [Quit: Leaving]
alfiemax has quit [Remote host closed the connection]
jottr has joined #ruby
conta has quit [Ping timeout: 250 seconds]
\void has quit [Quit: So long, and thanks for all the fish.]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jottr has quit [Ping timeout: 248 seconds]
alfiemax has joined #ruby
caleBOT has quit [Remote host closed the connection]
caleBOT_ has quit [Remote host closed the connection]
caleBOT_ has joined #ruby
caleBOT has joined #ruby
anisha has joined #ruby
caleBOT_ has quit [Ping timeout: 265 seconds]
caleBOT has quit [Ping timeout: 265 seconds]
gizmore|2 has quit [Quit: KVIrc 4.9.3 Aria http://www.kvirc.net/]
xuyuheng has quit [Ping timeout: 276 seconds]
jameser has joined #ruby
cadillac_ has quit [Ping timeout: 264 seconds]
ramfjord has joined #ruby
jameser has quit [Ping timeout: 255 seconds]
cadillac_ has joined #ruby
xuyuheng has joined #ruby
xuyuheng has quit [Client Quit]
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
tvw has joined #ruby
memo1 has quit [Ping timeout: 260 seconds]
ur5us has quit [Ping timeout: 240 seconds]
alfiemax has quit [Remote host closed the connection]
alfiemax has joined #ruby
jameser has joined #ruby
jameser has quit [Remote host closed the connection]
blackmesa has joined #ruby
blackmesa has quit [Client Quit]
blackmesa has joined #ruby
phoo1234567 has quit [Quit: Gotta go]
apeiros_ has quit [Remote host closed the connection]
conta has joined #ruby
rkazak has joined #ruby
anisha has quit [Quit: This computer has gone to sleep]
yeticry has joined #ruby
blackmesa has quit [Ping timeout: 260 seconds]
eblwork18 has joined #ruby
al2o3-cr has quit [Ping timeout: 240 seconds]
apeiros_ has joined #ruby
caleBOT has joined #ruby
caleBOT_ has joined #ruby
caleBOT__ has joined #ruby
caleBO___ has joined #ruby
caleBOT__ has quit [Remote host closed the connection]
caleBO___ has quit [Remote host closed the connection]
reber is now known as reCat
caleBOT__ has joined #ruby
caleBO___ has joined #ruby
caleBOT_ has quit [Ping timeout: 256 seconds]
caleBOT has quit [Ping timeout: 256 seconds]
duderonomy has quit [Ping timeout: 248 seconds]
armyriad has joined #ruby
amar has joined #ruby
linduxed has quit [Ping timeout: 260 seconds]
yeticry has quit [Ping timeout: 260 seconds]
vondruch has quit [Ping timeout: 255 seconds]
suukim has joined #ruby
jameser has joined #ruby
yeticry has joined #ruby
jameser has quit [Client Quit]
mohsen_1 has joined #ruby
eblwork18 has quit [Remote host closed the connection]
eblwork18 has joined #ruby
jameser has joined #ruby
rabajaj has joined #ruby
roshanavand has joined #ruby
jottr has joined #ruby
avelldiroll has quit [Quit: WeeChat 1.6]
jottr has quit [Ping timeout: 268 seconds]
Puffball has quit [Remote host closed the connection]
avelldiroll has joined #ruby
Burgestrand has joined #ruby
yohji has joined #ruby
DTZUZO_ has quit [Ping timeout: 248 seconds]
ikbenhet has joined #ruby
n13z has quit [Quit: leaving]
ellcs has joined #ruby
dionysus69 has joined #ruby
za1b1tsu has joined #ruby
leslie has joined #ruby
ellcs has quit [Ping timeout: 255 seconds]
n13z has joined #ruby
vondruch has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
DoubleMalt has joined #ruby
DoubleMalt has quit [Remote host closed the connection]
amar has quit [Remote host closed the connection]
karapetyan has joined #ruby
aupadhye has joined #ruby
mikecmpbll has joined #ruby
leslie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jameser has joined #ruby
tomphp has joined #ruby
Yzguy has joined #ruby
Yzguy has quit [Client Quit]
marr has joined #ruby
mikecmpbll has quit [Read error: Connection reset by peer]
mikecmpbll has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
alfiemax has quit [Remote host closed the connection]
mniip has quit [Quit: This page is intentionally left blank.]
mniip has joined #ruby
jameser has joined #ruby
vondruch has quit [Quit: vondruch]
linduxed has joined #ruby
guille-moe has joined #ruby
amar has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
n13z has quit [Ping timeout: 276 seconds]
amar has quit [Ping timeout: 256 seconds]
ellcs has joined #ruby
mniip has quit [Changing host]
mniip has joined #ruby
amar has joined #ruby
amar has quit [Remote host closed the connection]
sinduck has quit [Read error: Connection reset by peer]
amar has joined #ruby
jameser has joined #ruby
sysvalve has joined #ruby
alfiemax has joined #ruby
kapil___ has quit [Quit: Connection closed for inactivity]
n13z has joined #ruby
alfiemax has quit [Ping timeout: 276 seconds]
venmx has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
apeiros_ is now known as apeiros
ur5us has joined #ruby
plexigras has joined #ruby
ur5us has quit [Ping timeout: 255 seconds]
roshanavand has quit [Ping timeout: 276 seconds]
ineb has quit [Remote host closed the connection]
eblwork18 has quit [Remote host closed the connection]
eblwork18 has joined #ruby
ur5us has joined #ruby
roshanavand has joined #ruby
ur5us has quit [Read error: Connection reset by peer]
Beams has joined #ruby
marr has quit [Ping timeout: 240 seconds]
ur5us has joined #ruby
dionysus69 has quit [Quit: dionysus69]
jamesaxl has quit [Read error: Connection reset by peer]
CBebop has quit [Ping timeout: 248 seconds]
jamesaxl has joined #ruby
dionysus69 has joined #ruby
byte512 has quit [Ping timeout: 248 seconds]
kke has quit [Ping timeout: 248 seconds]
dhollinger has quit [Ping timeout: 248 seconds]
kke has joined #ruby
roshanavand has quit [Ping timeout: 256 seconds]
TomyWork has joined #ruby
byte512 has joined #ruby
ur5us has quit [Remote host closed the connection]
CBebop has joined #ruby
ur5us has joined #ruby
yup has joined #ruby
alfiemax has joined #ruby
ur5us has quit [Ping timeout: 256 seconds]
<yup> Is there any way to analyze my ruby to avoid *ever* getting a NoMethodError? I shipped code to users that has a nasty NoMethodError due to a silly misread. (I ran Logger.warning instead of Logger.warn). It seems like there should be a way to tell "this method doesn't exist anywhere" and pop up a warning. Rubocop doesn't (can't?) do this. I'm using Emacs for reference but any editor integration or command--line
<yup> tool suggestion would be appreciated.
jottr has joined #ruby
<apeiros> yup: rubys dynamic nature makes that rather difficult
<dminuoso> yup: Crystal.
<apeiros> afaik there are a couple of tools which try. one's name was iirc "laser".
cabotto has joined #ruby
<dminuoso> yup: What you are asking for is called a "typing system". Ruby doesn't have one.
<apeiros> oh, latest commit 2011. I guess that's dead.
yup has quit [Ping timeout: 264 seconds]
<dminuoso> Or if you like Ruby can be considered unityped, where any object has type `any`, and `any` responds to all messages with some `any` object.
eblwork18 has quit [Remote host closed the connection]
eblwork18 has joined #ruby
<apeiros> is raising considered responding?
<dminuoso> apeiros: Yes.
<dminuoso> apeiros: Typetheory wise it's fine.
yup has joined #ruby
anisha has joined #ruby
aufi has joined #ruby
jottr has quit [Ping timeout: 240 seconds]
aufi has quit [Ping timeout: 240 seconds]
vondruch has joined #ruby
dhollinger has joined #ruby
venmx has quit [Ping timeout: 248 seconds]
vondruch has quit [Quit: vondruch]
venmx has joined #ruby
ur5us has joined #ruby
sidx64 has joined #ruby
somebody has joined #ruby
apeiros has quit []
yup has quit [Ping timeout: 256 seconds]
sagax has quit [Quit: Konversation terminated!]
yup has joined #ruby
conta has quit [Ping timeout: 276 seconds]
govg has quit [Ping timeout: 265 seconds]
amar has quit [Ping timeout: 265 seconds]
govg has joined #ruby
amar has joined #ruby
wangzhong has joined #ruby
minimalism has quit [Quit: minimalism]
conta has joined #ruby
<zenspider> there's the typing library and other stuff coming out of UMD... They used to have a compiler or at least a static analyzer but I think they've given up on that approach... it might still be around toh
<zenspider> tho.
<zenspider> that said, it shouldn't be TOO hard to do some basic static analysis and compare it against an emacs TAGS file for example. It'll still have false positives (methads that exist SOMEWHERE but not on that object) and false negatives (methods that aren't in the tags file (like #to_a) but are definitely implemented (via ruby)
<zenspider> ultimately, it's a better use of your time to write good tests.
conta has quit [Ping timeout: 256 seconds]
<dminuoso> zenspider: A typing system is that. It's a test framework.
<dminuoso> Here's the definition from the most authorative book on applied type theory in programming langauges (TaPL): A type system is a tractable syntactic method for proving the absence of certain program behaviors by classifying phrases according to the kinds of values they compute.
<dminuoso> It's utterly silly to backdoor a tags based typing system into a language.
<dminuoso> Writing a test to do what a typing system should do is an annoying waste of my time.
conta has joined #ruby
joro_ has joined #ruby
jamesaxl has quit [Ping timeout: 240 seconds]
Diabolik_ is now known as Diabolik
vondruch has joined #ruby
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ciscam has quit [Ping timeout: 264 seconds]
ciscam has joined #ruby
alfiemax has quit [Remote host closed the connection]
vondruch has quit [Ping timeout: 240 seconds]
alfiemax has joined #ruby
amatas has joined #ruby
Beams has quit [Quit: .]
Beams has joined #ruby
amatas has quit [Client Quit]
schneider has joined #ruby
venmx has quit [Ping timeout: 248 seconds]
venmx has joined #ruby
ramfjord has quit [Ping timeout: 255 seconds]
rabajaj has quit [Quit: Leaving]
rabajaj has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
aufi has joined #ruby
alfiemax has quit [Remote host closed the connection]
ur5us has quit [Remote host closed the connection]
sidx64 has joined #ruby
ur5us has joined #ruby
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
ikbenhet has joined #ruby
ur5us has quit [Ping timeout: 276 seconds]
cabotto has quit [Ping timeout: 248 seconds]
alex`` has joined #ruby
anisha has quit [Read error: Connection reset by peer]
apeiros_ has joined #ruby
anisha has joined #ruby
gregf_ has quit [Ping timeout: 260 seconds]
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ikbenhet has joined #ruby
AJA4350 has joined #ruby
cabotto has joined #ruby
ikbenhet has quit [Client Quit]
andikr has joined #ruby
jottr has joined #ruby
ikbenhet has joined #ruby
roamingdog has quit [Remote host closed the connection]
Cavallari has joined #ruby
apeiros_ is now known as apeiros
roamingdog has joined #ruby
gregf_ has joined #ruby
jottr has quit [Ping timeout: 260 seconds]
gavit has joined #ruby
gavit has left #ruby [#ruby]
andikr has quit [Remote host closed the connection]
RougeR has joined #ruby
ramfjord has joined #ruby
cschneid_ has joined #ruby
ldnunes has joined #ruby
TinkerT has quit [Read error: Connection reset by peer]
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
TinkerT has joined #ruby
ikbenhet has joined #ruby
cschneid_ has quit [Ping timeout: 256 seconds]
ramfjord has quit [Ping timeout: 255 seconds]
adlerdias has joined #ruby
roamingdog has quit [Remote host closed the connection]
<yup> dminuoso: So what would you suggest? Rely on autocompletes and never type a method out by hand?
cabotto has quit [Remote host closed the connection]
cabotto has joined #ruby
cabotto has quit [Ping timeout: 255 seconds]
saTchymoto has joined #ruby
anisha has quit [Read error: Connection reset by peer]
wangzhong has quit [Remote host closed the connection]
<dminuoso> yup: Dont pick Ruby?
<dminuoso> yup: When you decide on Ruby you willingly give up types (with the entire baggage of guarantees you are hoping for) and speed.
<clemens3> yup: 100% coverage tests would have found this bug
<dminuoso> clemens3: Which is utterly silly.
<dminuoso> clemens3: You can't generate 100% test coverage because you'd have to trace the flow of your program.
<dminuoso> And that's a typing system.
<clemens3> ah, mr dminuoso
<dminuoso> Instead you end up with massive tons of useless tests that try to mimic the flow of the program. You end up writing more on tests than you should
<dminuoso> clemens3: And more to the point: The bugs happen because of the things you dont see/know about.
<dminuoso> You cant generate tests for cases you dont see/know about.
<clemens3> dminuoso: I didnt say use 100%
Xeago has joined #ruby
<clemens3> only that there are more directions to think in
<lupine> given metaprogramming, you just can't eliminate NoMethodError entirely in ruby
<clemens3> coverage tests btw might find other bugs too
<dminuoso> lupine: That has nothing to do with metaprogramming.
<lupine> "use something else" is a reasonable response, but "use crystal" is not :p
<lupine> sure it does
<clemens3> bugs that no type checking would ever find
anisha has joined #ruby
<lupine> without metaprogramming, 100% coverage would give you that property
<lupine> with it, it does not
<dminuoso> lupine: It has just to do with the kind of brittle mutable things you can do in Ruby
schneider has quit [Quit: WeeChat 2.0.1]
cabotto has joined #ruby
<clemens3> lupine: 100% coverage does not find all bugs, of course.. nothgint dos
<dminuoso> clemens3: Also what does 100% coverage mean?
<clemens3> lupine: but did the log.warning happen in a meta programmed area?
<yup> It makes sense that a tool couldn't guess if you had done metaprogramming, but even standard lib classes cannot be analyzed?
<dminuoso> clemens3: It's not about whether you test every line of code, but you have to test it under all conditions.
<dminuoso> `a = getLine; f.send(a)`
<dminuoso> you cant test this
<clemens3> yup, did your bug happen in a meta programmed code area?
<yup> clemens3: Nope
gheegh has joined #ruby
<dminuoso> yup: The kind of "provable properties" you are looking for are called "type systems"
<dminuoso> Ruby has none period.
<clemens3> yup: thanks, so in this case coverage would have found it..
<dminuoso> clemens3: That's nonsense. You might have input dependent behavior.
jamesaxl has joined #ruby
<dminuoso> Good luck trying to cover every possible behavior
<yup> Given ruby is mandatory in this project, I guess tests is the only answer. Thanks dminuoso for showing me the real reason why somebody would want a type system. Seems very useful now.
<clemens3> dminuoso: if the line "log.warning" gets executed, it would have bombed, exactly what happened at the customers site
houhoulis has joined #ruby
<dminuoso> yup: One of the main reasons people avoid type systems is because they are used to non-inferring bolted-on non-expressive naive type systems like Java has. Once you become with expressive type systems and/or type theory the picture radically changes. :)
cabotto has quit [Ping timeout: 260 seconds]
guardian has joined #ruby
<dminuoso> *Once you become familiar
<lupine> right, we could easily have found *this particular bug* in retrospect
<lupine> funny how you mostly find the bugs you haven't prepared against
<dminuoso> yup: With HM style type inference for example you can get away without writing any type signatures at all - but you get the full robust sanity checks.
<yup> dminuoso: HM style?
<dminuoso> yup: Hindley Milner type inference
<lupine> a large test suite with occasional bugs related to things you'd normally catch at compile-time is just part of the price of using ruby
guardian has quit [Remote host closed the connection]
guardian has joined #ruby
<yup> dminuoso: what would be some example languages with HM type interference?
guille-moe has quit [Ping timeout: 240 seconds]
<yup> lupine: would you say that most tests would be easily replaced by a type system?
guardian has quit [Remote host closed the connection]
guardian has joined #ruby
<dminuoso> yup: Any in the ML-family. The most prominent example would be Haskell probably.
<dminuoso> You can get away without any type annotations mostly.
<dminuoso> yup: In reality you will usually still annotate top level functions/interfaces because type annotations document usage much better than any code example will.
<dminuoso> yup: I'd say you can encode a lot of things and invariants in type systems.
<dminuoso> yup: The main benefit is that any property you can encode in a sound type system is a _provable_ property.
<dminuoso> That doesn't mean types invalidate tests, but types are much stronger than tests.
<clemens3> yup: no silver bullets, only hard work..
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso> yup: https://gist.github.com/dminuoso/e84d13e4fada65f742a01afc5335e4db this is a type level description of a REST API I have. The request handler is statically and verifiably _forced_ to know the exact names and types of possible parameters - and Im even forced to acknowledge the possibility that a parameter might not be passed even.
guille-moe has joined #ruby
conta has quit [Read error: Connection reset by peer]
conta has joined #ruby
<yup> dminuoso: That is quite nice.
DTZUZO_ has joined #ruby
sidx64 has joined #ruby
Mondongo has joined #ruby
eblwork18 has quit [Remote host closed the connection]
eblwork18 has joined #ruby
<yup> Thank you lupine, clemens3 for your suggestions
cabotto has joined #ruby
Danielss89 has joined #ruby
<lupine> yup: compile-time checks in general make tests overlapping their functionality unnecessary
<lupine> various typing systems do some of that, other compile-time checks that aren't to do with types can also do that
<lupine> you're still left with a bundle of important tests to write, so I wouldn't say "most tests", no
<yup> lupine: ok. I've still got tests to write then. I'm searching around now for some kind of typing bolt-on bandaid for ruby.
<dminuoso> yup: The most mature project currently is https://github.com/plum-umd/rdl
<dminuoso> yup: Just know it's really bolted on and not sound.
<lupine> for ruby, I'd just stick to the tests and accept a higher defect rate that you'd get with something with more rigorous type
cabotto has quit []
<yup> dminuoso: understood. Thanks for the pointer.
<yup> lupine: do you prefer Haskell as well?
<lupine> no, I spend most of my time in ruby
<lupine> I write tests and sometimes avoidable errors like the original one slip through. I'm ok with that
<lupine> every change I make also tends to take multiple computer-hours to be validated. I'm less ok with that, but it's not made me switch to haskell yet :D
<yup> do you have a recommended resource for getting up to speed with tests? I have to use Minitest, not RSpec
<apeiros> for reasonably small teams / projects you can even just go with a good error reporting system
<apeiros> (of course, also depends on how critical bugs would be)
GodFather has joined #ruby
<yup> apeiros: Well, it's not purely a web project so although its nice to get errors, its not easy to push the fixes out.
tvw has quit [Remote host closed the connection]
<apeiros> it doesn't need to be a web project to have reasonably simple deployment.
<apeiros> self-updating script isn't too difficult either
<lupine> minitest is fine. for any existing project, the best advice is to follow the existing test framework & guidelines
<lupine> other than that, just do whatever uncle bob says, appropriately retooled to ruby
<yup> apeiros: How would I start to make the script self-updating? That would be really useful.
<yup> lupine: Ok, thanks. Running down uncle bob now.
eblwork18 has quit [Remote host closed the connection]
<lupine> do you have a particular environment you're deploying to? life is so easy if it's just "debian machines"
eblwork18 has joined #ruby
adlerdias_ has joined #ruby
<yup> lupine: No, it's running on a kind of ruby interpreter shipped with an application both on windows and mac
<apeiros> yup: depends a bit on how your users install your software
<yup> lupine: but the dev environment is a debian machine
<apeiros> if you can, I'd probably rely on rubygems as much as possible
<lupine> yeah, bit tougher for those cases
<yup> apeiros: At present they have to click through some menus to install / reinstall from a zipped up ruby folder
<yup> it is definitely a strange system
<apeiros> the ruby interpreter is vendored?
<lupine> http://www.poodr.com/ will help you write code that tests more easily, the books I've read on ruby testing specifically are all hot on rspec and cucumber and whatnot
adlerdias has quit [Ping timeout: 248 seconds]
adlerdias_ is now known as adlerdias
<apeiros> you could e.g. at startup check against a repository and update source files from there and restart if code changed
sidx64 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eblwork18 has quit [Quit: Leaving]
jcalla has joined #ruby
bmurt has joined #ruby
adlerdias has quit [Quit: adlerdias]
venmx has quit [Ping timeout: 248 seconds]
Asher has quit [Ping timeout: 248 seconds]
jcalla has quit [Ping timeout: 256 seconds]
mtkd has joined #ruby
cyberg has joined #ruby
chocoelho has joined #ruby
jcalla has joined #ruby
somebody has quit [Quit: Page closed]
jottr has joined #ruby
kapil___ has joined #ruby
Nussi has joined #ruby
Nussi has quit [Client Quit]
venmx has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
mikecmpb_ has joined #ruby
chocoelho has quit [Ping timeout: 276 seconds]
howdoi has quit [Quit: Connection closed for inactivity]
mikecmpbll has quit [Ping timeout: 256 seconds]
houhoulis has quit []
ramfjord has joined #ruby
chocoelho has joined #ruby
roshanavand has joined #ruby
ramfjord has quit [Ping timeout: 276 seconds]
goepsilongo has quit [Ping timeout: 246 seconds]
daxroc has quit [Remote host closed the connection]
duderonomy has joined #ruby
daxroc has joined #ruby
jamiejackson has joined #ruby
karapetyan has quit [Remote host closed the connection]
dc2 has joined #ruby
cadillac_ has quit [Ping timeout: 264 seconds]
yup has quit [Ping timeout: 276 seconds]
saTchymoto has quit []
yup has joined #ruby
NL3limin4t0r has joined #ruby
cadillac_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Beams has quit [Quit: .]
dc2 has quit [Ping timeout: 265 seconds]
Rapture has joined #ruby
Beams has joined #ruby
amatas has joined #ruby
roshanavand has quit [Ping timeout: 260 seconds]
oleo has joined #ruby
roshanavand has joined #ruby
Asher has joined #ruby
tomphp has joined #ruby
GodFather has quit [Ping timeout: 260 seconds]
baweaver is now known as baweaver_away
baweaver_away is now known as baweaver
roshanavand has quit [Ping timeout: 264 seconds]
Asher has quit [Ping timeout: 264 seconds]
amatas has quit [Remote host closed the connection]
amatas has joined #ruby
dionysus69 has quit [Ping timeout: 260 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
GodFather has joined #ruby
<jamiejackson> hi folks. i'm using OpenUri's open(). i don't really care about the result. how would i just background it and forget about it?
<apeiros> Thread.new do open(blargh) end
apeiros__ has joined #ruby
roshanavand has joined #ruby
apeiros has quit [Read error: Connection reset by peer]
riskish has joined #ruby
apeiros__ has quit [Ping timeout: 260 seconds]
roshanavand has quit [Ping timeout: 264 seconds]
cschneid_ has joined #ruby
venmx has quit [Ping timeout: 260 seconds]
chihhsin has quit [Ping timeout: 264 seconds]
chihhsin has joined #ruby
cschneid_ has quit [Ping timeout: 248 seconds]
venmx has joined #ruby
jrheaton has joined #ruby
oleo has quit [Remote host closed the connection]
karapetyan has joined #ruby
Mondongo has quit [Quit: Textual IRC Client: www.textualapp.com]
karapetyan has quit [Ping timeout: 240 seconds]
yup has quit [Ping timeout: 256 seconds]
roshanavand has joined #ruby
yup has joined #ruby
orbyt_ has joined #ruby
roshanavand has quit [Ping timeout: 240 seconds]
jottr has joined #ruby
cschneid_ has joined #ruby
oleo has joined #ruby
roshanavand has joined #ruby
tomphp has joined #ruby
jcalla has quit [Ping timeout: 248 seconds]
jcalla has joined #ruby
gizmore has joined #ruby
ramfjord has joined #ruby
Zaab1t has joined #ruby
mtkd has quit []
apeiros has joined #ruby
jcalla has quit [Ping timeout: 256 seconds]
Cavallari has quit [Quit: Cavallari]
oleo has quit [Quit: Leaving]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
ramfjord has quit [Ping timeout: 248 seconds]
jottr has quit [Ping timeout: 240 seconds]
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
oleo has joined #ruby
jcalla has joined #ruby
mostlybadfly has joined #ruby
venmx has quit [Ping timeout: 240 seconds]
ellcs has quit [Remote host closed the connection]
anisha has quit [Quit: This computer has gone to sleep]
venmx has joined #ruby
Lyubo1 has quit [Ping timeout: 276 seconds]
Lyubo1 has joined #ruby
Dbugger has joined #ruby
duderonomy has joined #ruby
gheegh has joined #ruby
vondruch has joined #ruby
cthulchu has joined #ruby
ramfjord has joined #ruby
jcarl43 has joined #ruby
jottr has joined #ruby
jrabe has quit [Remote host closed the connection]
chocoelho has quit [Ping timeout: 240 seconds]
ramfjord has quit [Ping timeout: 265 seconds]
Burgestrand has quit [Quit: Closing time!]
cthulchu has quit [Ping timeout: 268 seconds]
karapetyan has joined #ruby
guille-moe has quit [Ping timeout: 256 seconds]
herbmillerjr has quit [Quit: Konversation terminated!]
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 264 seconds]
za1b1tsu has quit [Ping timeout: 255 seconds]
wget has joined #ruby
banisterfiend has joined #ruby
karapetyan has quit [Ping timeout: 255 seconds]
cagomez has joined #ruby
ikbenhet has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jamiejackson has quit [Ping timeout: 240 seconds]
marr has joined #ruby
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<wget> Hello everyone. Being a package maintainer and not very familiar with ruby itself, I wanted to know why the package name is suffixed by its version (here thin-1.7.2) and how a package can conflict with itself? The conflict described here is not very meaningful.
<wget> /usr/lib/ruby/2.5.0/rubygems/specification.rb:2325:in `raise_if_conflicts': Unable to activate skinny-0.2.4, because eventmachine-1.2.7 conflicts with eventmachine (~> 1.0.0), thin-1.7.2 conflicts with thin (< 1.7, >= 1.5) (Gem::ConflictError)
Dbugger has quit [Quit: Leaving]
Dbugger has joined #ruby
orbyt_ has joined #ruby
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
orbyt_ has quit [Client Quit]
<Yxhuvud> wget: you can get such a problem if a gem is required twice, with different version requirements. Note that only one version of any gem can be used at any one time.
mohsen_1 has quit [Quit: Connection closed for inactivity]
samosaphile has quit [Ping timeout: 260 seconds]
<wget> Yxhuvud: hum ok. actually the dependencies are defined two times here (in mailcatcher): one in the add_dependency of the gemspec file and another time in the main rb file itself. This seemed weird, but I'm gonna remove the ones hardcoded in the rb file, just to see...
<tuskkk___> need some help with rails, https://bpaste.net/show/f0a24d59c3c0, trying to link to a controller action
<tuskkk___> ```undefined method `add_to_rotation' for #<#<Class:0x007f9ce8576f20>:0x007f9ce42e9ba8> Did you mean? add_method_to_attributes!```
[Butch] has joined #ruby
banisterfiend has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Lyubo1 has quit [Ping timeout: 240 seconds]
karapetyan has joined #ruby
mzo has joined #ruby
jrabe has joined #ruby
Lyubo1 has joined #ruby
jrheaton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dionysus69 has joined #ruby
<cagomez> I have a PDF file that I can output by using `cat my_pdf.pdf`. I need this output in my Ruby file since I will be sending the PDF over the network. Can I hardcode the string into a Ruby class?
<mzo> monkaS
<mzo> why don't you write ruby code to open and read the file
<cagomez> mzo: I wanted to avoid storing the PDF on disk
NL3limin4t0r has quit [Quit: WeeChat 1.9.1]
<cagomez> mzo: basically, I wanted to avoid having to call `File.open('my_pdf.pdf', 'rb') { |f| f.read }` and store the output of that block as a String instead, but I'm not sure if that's possible
<mzo> im not sure the ruby parser will like having the binary pdf contents in the source
<mzo> but you could base64 encode it for example
<apeiros> ?rails tuskkk___
<ruby[bot]> tuskkk___: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<cagomez> mzo: perfect! how would I do this?
banisterfiend has joined #ruby
<mzo> cast my_pdf.pdf | base64
conta has joined #ruby
<mzo> copy that into a string literal
<mzo> and then you just need some ruby function to decode it
<apeiros> cagomez: File.read(path) would be shorter anyway ;-p
<tuskkk___> apeiros: already asked there like an hour ago, its pretty quiet
<mzo> not sure if ruby standard library has base64 decoding
<mzo> maybe need a gem
<mzo> or roll your own :d
<apeiros> tuskkk___: the question in #rubyonrails seems to not contain everything?
<cagomez> mzo: I `cat my_pdf.pdf | base64`?
<apeiros> mzo: it has
<apeiros> require 'base64'
yohji has quit [Remote host closed the connection]
<apeiros> btw., anybody seen adaedra?
<tuskkk___> apeiros: it does
<mzo> cagomez: yes and it should output a huge string
robertothais has quit [Ping timeout: 240 seconds]
BTRE has quit [Read error: Connection reset by peer]
rkazak has quit [Quit: Sleep.....ing....]
BTRE has joined #ruby
gizmore has quit [Ping timeout: 268 seconds]
qnaal has joined #ruby
Siarkowy has joined #ruby
riskish has quit [Quit: Textual IRC Client: www.textualapp.com]
qnaal has quit [Ping timeout: 240 seconds]
ferr has quit [Quit: WeeChat 2.1]
nitric has joined #ruby
vondruch has quit [Quit: vondruch]
orbyt_ has joined #ruby
mikecmpb_ has quit [Quit: inabit. zz.]
cthulchu has joined #ruby
<kapil___> how to get last added key of a hash?
uptime has left #ruby [#ruby]
aupadhye has quit [Ping timeout: 260 seconds]
<apeiros> hash.last.first
<apeiros> oh, misses a to_a
<havenwood> or: hash.keys.last
nitric_ has joined #ruby
nitric has quit [Ping timeout: 248 seconds]
<apeiros> oh, that's actually much better
<apeiros> but I wonder now why there's #first but not #last
<apeiros> it's a DLL after all
<havenwood> i was wondering the same
<kapil___> havenwood: thanks
<havenwood> a doubly, circularly linked list should have first/last connection
<havenwood> ¯\_(ツ)_/¯
adlerdias has joined #ruby
aufi has quit [Quit: Leaving]
<kapil___> i was wondering the same
<cagomez> is whitespace significant in a base64 encoded PDF?
chocoelho has joined #ruby
mzo has quit [Ping timeout: 256 seconds]
ryzokuken has joined #ruby
chocoelho has quit [Client Quit]
chocoelho has joined #ruby
TomyWork has quit [Ping timeout: 240 seconds]
<havenwood> I'd imagine it's just so seldom requested nobody has implemented it, but unsure.
<apeiros> probably
<havenwood> cagomez: Amongst the Base64 encoded characters?
<havenwood> cagomez: Try it. Base64.decode64 is permissive and Base64.strict_decode64 isn't.
robertothais has joined #ruby
<cagomez> yes, havenwood. from the conversation above, I ran: `cat my_pdf.pdf | base64 | pbcopy` and pasted the string into a Ruby class as a HEREDOC. However, `MyClass.new.to_s` shows surrounding whitespace around the base64 string
banisterfiend has quit [Remote host closed the connection]
reCat is now known as reBar
reBar is now known as reber
Asher has joined #ruby
sanscoeur has joined #ruby
vladdypwnz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
biberu has joined #ruby
<cagomez> Found a cool solution. `def to_s; <<~EOF.squish base64... EOF; end;` . tilde in heredoc removes tabs, and `squish` removes newlines
millerti has joined #ruby
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
gizmore has joined #ruby
chocoelho has quit [Remote host closed the connection]
chocoelho has joined #ruby
amar has quit [Remote host closed the connection]
tdy has quit [Ping timeout: 268 seconds]
mtkd has quit [Ping timeout: 256 seconds]
n0m4d1c has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mtkd has joined #ruby
yup has quit [Ping timeout: 276 seconds]
roshanavand has quit [Ping timeout: 240 seconds]
guille-moe has joined #ruby
arashb has joined #ruby
yup has joined #ruby
mtkd has quit [Client Quit]
jnollette has quit [Read error: Connection reset by peer]
mtkd has joined #ruby
n0m4d1c_ has joined #ruby
_aeris_ has quit [Remote host closed the connection]
_aeris_ has joined #ruby
jnollette has joined #ruby
gheegh has joined #ruby
n0m4d1c has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
roshanavand has joined #ruby
gheegh has quit [Client Quit]
yup has quit [Ping timeout: 256 seconds]
Beams has quit [Quit: .]
venmx has quit [Ping timeout: 276 seconds]
TomyLobo has joined #ruby
arashb has quit [Ping timeout: 240 seconds]
gheegh has joined #ruby
gizmore has quit [Read error: Connection reset by peer]
za1b1tsu has joined #ruby
n0m4d1c_ has quit [Ping timeout: 256 seconds]
n0m4d1c has joined #ruby
dc2 has joined #ruby
Puffball has joined #ruby
n0m4d1c_ has joined #ruby
\void has joined #ruby
n0m4d1c has quit [Ping timeout: 256 seconds]
pdcawley has joined #ruby
conta has quit [Ping timeout: 264 seconds]
pdcawley has quit [Client Quit]
amar has joined #ruby
ramfjord has quit [Ping timeout: 256 seconds]
amar has quit [Remote host closed the connection]
amar has joined #ruby
mtkd has quit []
za1b1tsu has quit [Ping timeout: 260 seconds]
guille-moe has quit [Ping timeout: 256 seconds]
pdcawley has joined #ruby
nitric has joined #ruby
amar has quit [Ping timeout: 248 seconds]
mtkd has joined #ruby
arashb has joined #ruby
nitric_ has quit [Ping timeout: 265 seconds]
graft has quit [Ping timeout: 268 seconds]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
arashb has quit [Ping timeout: 240 seconds]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
vladdypwnz has joined #ruby
vladdypwnz has quit [Client Quit]
SeepingN has joined #ruby
Deesl has joined #ruby
gheegh has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has joined #ruby
weird_error has joined #ruby
mr_wooh has joined #ruby
tomphp has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
jrheaton has joined #ruby
mroutis has quit [Ping timeout: 260 seconds]
vladdypwnz has joined #ruby
Deesl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mroutis has joined #ruby
roshanavand has quit [Remote host closed the connection]
sphenxes has joined #ruby
arashb has joined #ruby
sameerynho has joined #ruby
gheegh has joined #ruby
lele has quit [Ping timeout: 250 seconds]
tomphp has quit [Ping timeout: 240 seconds]
cpruitt has joined #ruby
rkazak has joined #ruby
arashb has quit [Ping timeout: 265 seconds]
ramfjord has joined #ruby
cthulchu_ has joined #ruby
robertothais has quit [Ping timeout: 255 seconds]
lele has joined #ruby
cthulchu has quit [Ping timeout: 256 seconds]
sauvin has quit [Read error: Connection reset by peer]
ldepandis has joined #ruby
amar has joined #ruby
dviola has joined #ruby
dc2 has quit [Ping timeout: 268 seconds]
kegan_ has joined #ruby
postmodern has joined #ruby
execat has joined #ruby
execat has quit [Changing host]
execat has joined #ruby
<kegan_> is there a way to get a post request before it's sent via mechanize
<kegan_> dump it into text
thinkpad has quit [Ping timeout: 256 seconds]
lytol has joined #ruby
tomphp has joined #ruby
mroutis has quit [Ping timeout: 248 seconds]
Mike11 has joined #ruby
<desperek> kegan_, what do you mean, eh?
thinkpad has joined #ruby
<kegan_> desperek I'm making a post request via a form submit on a page, it's giving me 400 bad request and I want to look at the request itself to see what might be missing
rkazak has quit [Quit: Sleep.....ing....]
<desperek> kegan_, dont use production mode?
<kegan_> I don't know what that is, sir
<kegan_> maybe it's in the log, lemme check
<desperek> kegan_, basically when you run an app you can run in different modes kinda
<kegan_> production vs dev?
<desperek> kegan_, yup
<desperek> just run this in the dev
<desperek> ofc locally
suukim has quit [Quit: Konversation terminated!]
<desperek> and you should be presented with nice error page
<desperek> otherwise just dump things in the controller ruby way
<kegan_> I'm not using rails ? I'm confused, sorry
<desperek> oh wait im so sorry :D
<kegan_> phew
<desperek> i thought it was ror chan
<kegan_> hahaha
<desperek> uh then dunno really, mechanize you say?
<desperek> kegan_, cant you dump this in console?
<desperek> aka log
<desperek> or use pry
<kegan_> what is pry? logs aren't detailed enough
<kegan_> ohhh, I'm gonna try that
<kegan_> thanks
<desperek> np
arashb has joined #ruby
Deesl has joined #ruby
Deesl has quit [Client Quit]
sysvalve has quit [Quit: Leaving]
hinbody has joined #ruby
hinbody has left #ruby [#ruby]
tomphp_ has joined #ruby
tomphp has quit [Ping timeout: 256 seconds]
lomex has joined #ruby
arashb has quit [Ping timeout: 248 seconds]
samort7 has joined #ruby
jamiejackson has joined #ruby
lomex has quit [Quit: Textual IRC Client: www.textualapp.com]
vikaton has joined #ruby
dc2 has joined #ruby
lomex has joined #ruby
Neon has joined #ruby
Neon is now known as Guest38451
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jamiejackson> apeiros, thanks for the thread tip. do you know why i can't see the third output (in the thread)? https://gist.github.com/jamiejackson/fe23400df2c369828ede4e66516b8fd7s
<Guest38451> Hi, i'm french noob programmer, anyone is here to PM in french ? xD
arashb has joined #ruby
lomex has left #ruby ["Textual IRC Client: www.textualapp.com"]
tomphp_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
vladdypwnz has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoul_ has joined #ruby
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dc2 has quit [Ping timeout: 240 seconds]
dionysus69 has quit [Ping timeout: 256 seconds]
Guest38451 has quit [Quit: Page closed]
leslie has joined #ruby
arashb has quit [Ping timeout: 265 seconds]
tomphp has joined #ruby
dionysus69 has joined #ruby
za1b1tsu has joined #ruby
tomphp has quit [Read error: Connection reset by peer]
<jamiejackson> anybody know why i don't get output from the third write? https://gist.github.com/jamiejackson/fe23400df2c369828ede4e66516b8fd7
robertothais has joined #ruby
tomphp has joined #ruby
<havenwood> jamiejackson: I can see the final with your example. Enable Thread exception warnings and see if it was silently failing?
<havenwood> jamiejackson: Thread.abort_on_exception = true
<havenwood> jamiejackson: Or: Thread.warn_on_exception = true
tomphp has quit [Client Quit]
conta has joined #ruby
caleBO___ has left #ruby [#ruby]
<jamiejackson> that can go anywhere before my thread block?
<havenwood> yup
tomphp has joined #ruby
mtkd has quit []
mtkd has joined #ruby
mondz has joined #ruby
venmx has joined #ruby
arashb has joined #ruby
gnufied has quit [Ping timeout: 240 seconds]
tdy has joined #ruby
namidark has joined #ruby
bmurt has joined #ruby
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
arashb has quit [Ping timeout: 248 seconds]
duderonomy has joined #ruby
n0m4d1c_ has quit [Remote host closed the connection]
alfiemax has joined #ruby
jrheaton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has quit [Read error: Connection reset by peer]
tomphp has joined #ruby
mr_wooh has quit [Quit: Leaving]
venmx has quit [Remote host closed the connection]
ta_ has quit [Remote host closed the connection]
kapil___ has quit [Quit: Connection closed for inactivity]
amatas has quit [Quit: amatas]
shaman42 has quit [Ping timeout: 260 seconds]
duderonomy has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arashb has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
arashb has quit [Ping timeout: 240 seconds]
<jamiejackson> havenwood, i'm doing something wrong in the context of my module. it's there that i can't seem to get the result of the the third output: https://gist.github.com/jamiejackson/227c4a436b6ca32e2c70c440add775c9
ldepandis has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<jamiejackson> do you spot the problem?
<jamiejackson> ruby 2.0, fwiw
minimalism has joined #ruby
shaman42 has joined #ruby
jenrzzz has quit [Ping timeout: 248 seconds]
ta_ has joined #ruby
marr has quit [Ping timeout: 256 seconds]
dionysus69 has quit [Ping timeout: 276 seconds]
orbyt_ has joined #ruby
jrheaton has joined #ruby
anjen has joined #ruby
marr has joined #ruby
conta has quit [Ping timeout: 240 seconds]
\void has quit [Ping timeout: 265 seconds]
za1b1tsu has quit [Ping timeout: 265 seconds]
pilne has joined #ruby
alfiemax has quit [Remote host closed the connection]
jenrzzz has joined #ruby
jenrzzz has joined #ruby
jenrzzz has quit [Changing host]
peacetre1ty has joined #ruby
<peacetre1ty> hi
peacetre1ty is now known as peacetreaty
jrheaton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
karapetyan has quit [Remote host closed the connection]
sphenxes has quit [Quit: Leaving]
Beams has joined #ruby
quobo has joined #ruby
<peacetreaty> i wrote a gem that has a dependency('mail') in Gemfile. it loads mail using require. as long as i directly use my gem everything is fine. But now i started a new project. another gem having my previous gem as a dependency in Gemfile. as soon as i require 'mypreviousgem', i'll get the following error: "cannot load such file -- mail". it thought that bundler automatically takes care of all the dependencies
<peacetreaty> and their paths. does anyone know whats wrong with my gem, or how to fix this?
adlerdias has quit [Ping timeout: 265 seconds]
karapetyan has joined #ruby
chouhoul_ has quit [Remote host closed the connection]
chouhoulis has joined #ruby
claudiuinberlin has joined #ruby
Puffball has quit [Remote host closed the connection]
Puffball has joined #ruby
eckhardt_ has joined #ruby
plexigras has quit [Ping timeout: 260 seconds]
Puffball has quit [Remote host closed the connection]
Sembei has quit [Ping timeout: 240 seconds]
schleppel has quit [Quit: Konversation terminated!]
Puffball has joined #ruby
jottr has joined #ruby
arashb has joined #ruby
karapetyan has quit [Remote host closed the connection]
jottr has quit [Ping timeout: 256 seconds]
<desperek> ay kegan_ does it work now?
karapetyan has joined #ruby
arashb has quit [Ping timeout: 264 seconds]
<kegan_> desperek nope
<desperek> oof
<kegan_> I didn't get to use pry but I'm trying to extract the form data from the mechanize request
jrheaton has joined #ruby
<kegan_> considering just making the request manually with unirest... I'm stubborn and want to go the way I was going even though redirecting (heh) may be my best bet
jottr has joined #ruby
<desperek> kegan_, whatcha trying to do?
sidx64 has joined #ruby
<desperek> or, kegan_ are you sure the thing you are trying to reach is there?
<desperek> use some client and test it manually
<desperek> or something
<kegan_> yeah
<kegan_> I've parsed enough data to ensure I'm actually acting on objects that are there
<kegan_> and yes, I'm doing it manually
<desperek> kegan_, so, doing it manually works. then are you sure you are passing the values to mechanize correctly?
dviola has quit [Quit: WeeChat 2.1]
<desperek> or rather, are the values correct?
<desperek> maybe try setting them manually for a moment?
karapetyan has quit [Remote host closed the connection]
Guest29616 has quit [Ping timeout: 248 seconds]
karapetyan has joined #ruby
mroutis has joined #ruby
anjen has quit [Quit: anjen]
karapetyan has quit [Remote host closed the connection]
sidx64_ has joined #ruby
gheegh has quit [Ping timeout: 240 seconds]
sidx64 has quit [Ping timeout: 268 seconds]
mroutis has quit [Ping timeout: 268 seconds]
karapetyan has joined #ruby
karapetyan has quit [Remote host closed the connection]
Mike11 has quit [Quit: Leaving.]
ccrow has joined #ruby
robertothais has quit [Ping timeout: 240 seconds]
arashb has joined #ruby
jottr has quit [Ping timeout: 268 seconds]
joro_ has quit [Remote host closed the connection]
biberu has quit []
arashb has quit [Ping timeout: 256 seconds]
<jamiejackson> i'm doing something wrong in the context of my module. it's there that i can't seem to get the result of the the third output: https://gist.github.com/jamiejackson/227c4a436b6ca32e2c70c440add775c9 what am i doing wrong?
ur5us has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
pilne has quit [Quit: Leaving]
ldnunes has quit [Quit: Leaving]
arashb has joined #ruby
kmurphy4_ has joined #ruby
pilne has joined #ruby
mtkd has quit [Ping timeout: 255 seconds]
arashb has quit [Ping timeout: 276 seconds]
mtkd has joined #ruby
sidx64_ has quit [Read error: Connection reset by peer]
vikaton has quit [Quit: Connection closed for inactivity]
GodFather has quit [Ping timeout: 264 seconds]
Dbugger has quit [Quit: Leaving]
ramfjord has quit [Ping timeout: 240 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
robertothais has joined #ruby
<apeiros> jamiejackson: you have to wait for all threads to finish
<apeiros> ruby only cares about the main thread to finish. other threads still running are killed.
kmurphy4_ has quit [Quit: kmurphy4_]
ramfjord has joined #ruby
arashb has joined #ruby
amar has quit [Ping timeout: 248 seconds]
<jamiejackson> oh, hmm. i wanted to be able to background a statement and move on without waiting for it to complete. afaik i can do that with some other languages. is that not possible with ruby?
Burgestrand has joined #ruby
GodFather has joined #ruby
orbyt_ has joined #ruby
Burgestrand has quit [Client Quit]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tomphp has joined #ruby
<jamiejackson> ^ apeiros
<apeiros> in other languages too, if you kill the programm before it's done, it won't be done. that should be somewhat self evident.
<apeiros> all you have to do is ensure at the end of your main code, that all threads have finished.
orbyt_ has quit [Ping timeout: 255 seconds]
arashb has quit [Ping timeout: 260 seconds]
<apeiros> (Thread.list - [Thread.current]).each(&:join)
<jamiejackson> this thing's already at the end of the code. fyi what i'd like to be able to do is background a command to sleep for n seconds then request a url. something like `nohup bash -c 'sleep 10; curl http://myurl.com' &`. not sure if that's possible or not. i don't care about the results of the url request, i just want it to have tried.
chouhoul_ has joined #ruby
Beams has quit [Quit: .]
<jamiejackson> so basically, this would happen, say 10s _after_ the main script has run. maybe it's a crazy idea, but it's worth knowing it's crazy.
kmurphy4_ has joined #ruby
amite_ has joined #ruby
<apeiros> if your script does not run, there's nothing to execute your code. no matter the language. if you want to daemonize your code, that's a different story. but I'm now off. cya.
jenrzzz has quit [Ping timeout: 256 seconds]
<amite_> hi all quick question: I have a File.read('...').each_line.grep() do |line| ...end where in I do a lookup and set some variable. How do I test if the grep of a string failed and hence take an action at the end of file.read statement?
chouhoulis has quit [Ping timeout: 260 seconds]
Rapture has quit [Quit: Textual IRC Client: www.textualapp.com]
jenrzzz has joined #ruby
chouhoul_ has quit [Ping timeout: 248 seconds]
[Butch] has quit [Quit: Textual IRC Client: www.textualapp.com]
moei has quit [Quit: Leaving...]
roshanavand has joined #ruby
cschneid_ has quit [Remote host closed the connection]
mtkd has quit []
kmurphy4_ has quit [Quit: kmurphy4_]
jenrzzz_ has joined #ruby
n0m4d1c has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
claudiuinberlin has quit [Quit: Textual IRC Client: www.textualapp.com]
mroutis has joined #ruby
<amite_> never mind got it to work!!
arashb has joined #ruby
Cthulu201 has quit [Ping timeout: 248 seconds]
robertothais has quit [Ping timeout: 240 seconds]
clemens3 has quit [Ping timeout: 256 seconds]
arashb has quit [Ping timeout: 268 seconds]
robertothais has joined #ruby
mikecmpbll has joined #ruby
<kegan_> is there any way to pass parameters to mechanize when using the form class's submit method
<kegan_> there is missing data in the POST request and I'd like to supply it without manually calling post
<kegan_> post_form
cthulchu_ has quit [Ping timeout: 256 seconds]
weathermaker has joined #ruby
gigetoo has quit [Ping timeout: 256 seconds]
dc2 has joined #ruby
weathermaker has quit [Client Quit]
dc2 is now known as dcunit3d
gigetoo has joined #ruby
<hays> is there a schedule for 2.6 and 2.5.2?
<hays> or do they just come when them come
tag has joined #ruby
caleBOT has joined #ruby
caleBOT_ has joined #ruby
caleBOT__ has quit [Ping timeout: 250 seconds]
venmx has joined #ruby
<hays> just curious how often i should be checking for version bumps
quobo has quit [Quit: Connection closed for inactivity]
weathermaker has joined #ruby
reber has quit [Remote host closed the connection]
leslie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
weathermaker has quit [Quit: Leaving]
execat has quit [Ping timeout: 260 seconds]
GodFather has quit [Ping timeout: 255 seconds]
venmx has quit [Ping timeout: 240 seconds]
Zaab1t has quit [Quit: Zaab1t]
lytol has quit [Remote host closed the connection]
arashb has joined #ruby
millerti has quit [Ping timeout: 264 seconds]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cagomez> I have an array of IDs and unpersisted objects. is there an easy way to assign the ID's to the unpersisted objects in memory (I don't need to access the DB at this point)?
tomphp has joined #ruby
\void has joined #ruby
<lupine> you can just do instance.id = whatever
duderonomy has joined #ruby
<lupine> whether that's a good idea or not depends on various things
eckhardt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has joined #ruby
tomphp has quit [Client Quit]
Eiam_ has joined #ruby
<lupine> and I guess it does depend on activerecord (if that's what you're on top of) being able to introspect the database to learn there is an `id` column
sanscoeur has quit [Ping timeout: 248 seconds]
duderonomy has quit [Client Quit]
arashb has quit [Ping timeout: 240 seconds]
Eiam has quit [Ping timeout: 276 seconds]
duderonomy has joined #ruby
duderonomy has quit [Client Quit]
chouhoul_ has joined #ruby
n0m4d1c has quit [Read error: Connection reset by peer]
n0m4d1c_ has joined #ruby
<cagomez> it's to avoid an (N) N+1's :\
chouhoulis has quit [Ping timeout: 268 seconds]
alex`` has quit [Quit: WeeChat 2.1]
ccrow has quit [Quit: Ex-Chat]
orbyt_ has joined #ruby
samort7 has quit []
eckhardt_ has joined #ruby
caleBOT_ has quit [Remote host closed the connection]
caleBOT has quit [Remote host closed the connection]
caleBOT has joined #ruby
caleBOT_ has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
jrheaton has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
eckhardt_ has quit [Client Quit]
caleBOT_ has quit [Ping timeout: 260 seconds]
caleBOT has quit [Ping timeout: 260 seconds]
gigetoo has quit [Ping timeout: 240 seconds]
gigetoo has joined #ruby
ccrow has joined #ruby
AJA4350 has quit [Quit: AJA4350]
c0ncealed1 has quit [Remote host closed the connection]
amar has joined #ruby
c0ncealed1 has joined #ruby
chocoelho has quit [Ping timeout: 248 seconds]
orbyt_ has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
cadillac_ has quit [Ping timeout: 248 seconds]
caleBOT has joined #ruby
caleBOT_ has joined #ruby
vladdypwnz has joined #ruby
cadillac_ has joined #ruby
jcarl43 has quit [Quit: WeeChat 2.1]
marr has quit [Ping timeout: 255 seconds]