xenops has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xenops has joined #ruby
be_______ has quit [Ping timeout: 252 seconds]
xenops has quit [Client Quit]
xenops has joined #ruby
xenops has quit [Client Quit]
xenops has joined #ruby
xenops has quit [Client Quit]
hotpancakes has joined #ruby
Pumukel has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
xenops has joined #ruby
xenops has quit [Client Quit]
xenops has joined #ruby
preyalone has quit [Quit: Connection closed for inactivity]
xenops has quit [Client Quit]
bonhoeffer has quit [Ping timeout: 252 seconds]
chefuser has joined #ruby
hutch34_ has joined #ruby
skweek has joined #ruby
<chefuser>
i hate to ask a noob question. I am trying to use https://github.com/NoRedInk/rspec-retry. however their example is only with it. how would I use this with something like 'its(:content)'
bonhoeffer has joined #ruby
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
patr0clus has joined #ruby
esObe has joined #ruby
KnownSyntax has quit [Ping timeout: 258 seconds]
hotpancakes has quit [Remote host closed the connection]
hotpancakes has joined #ruby
<chefuser>
i hate to ask a noob question. I am trying to use https://github.com/NoRedInk/rspec-retry. however their example is only with it. how would I use this with something like 'its(:content)'
GodFather has quit [Ping timeout: 252 seconds]
esObe has quit [Ping timeout: 240 seconds]
bkxd has quit [Ping timeout: 240 seconds]
KnownSyntax has joined #ruby
bkxd has joined #ruby
hotpancakes has quit [Ping timeout: 258 seconds]
chefuser has quit [Quit: Page closed]
bonhoeffer has quit [Ping timeout: 255 seconds]
Rodya_ has quit [Remote host closed the connection]
statelesscode has quit [Ping timeout: 240 seconds]
ghornet__ has quit [Ping timeout: 240 seconds]
<al2o3-cr>
is there a reason for Socket#nread doesn't work in a block?
houhoulis has joined #ruby
mwlang has joined #ruby
<mwlang>
what are folks using for natural language processing in Ruby these days? the stanford-core-nlp and treat gems seem like they saw better days and are proving difficult for me to get fully configured.
djbkd has quit [Remote host closed the connection]
naprimer_2 has joined #ruby
nofxxx has joined #ruby
esObe has joined #ruby
nofxxxx has quit [Ping timeout: 260 seconds]
naprimer_2 has quit [Ping timeout: 260 seconds]
tohuw has joined #ruby
naprimer_2 has joined #ruby
AcidRain has joined #ruby
<tohuw>
I've a .rb script I'm working on which has a require statement that references a gem. I want to work on a local copy of this script and its dependent gemfiles which live in a subfolder. The folder structure in my PWD is like this: foo.rb foodeps/bar.rb foodeps/yum.rb How do I change the statement "require foodeps/bar" correctly?
<dminuoso>
tohuw: Use bundler.
<AcidRain>
hey, im trying to find the single word "message" that occures on a new line between the strings "symbols" and "end" which will also occur on their own line.
<AcidRain>
docs says this should work /symbols(message)end/m
<dminuoso>
AcidRain: No. That would leave nothing in between.
<dminuoso>
AcidRain: Oh well, I suppose it could work.
<tynamite>
But what if I want to run a simple standalone ruby file as a web page? Or if I want to run multiple ramaze apps on the same port?
<dminuoso>
What does either of these things even mean?
<tynamite>
I'll try to explain.
<tynamite>
I've made a website with the Ramaze framework and to run it on my Windows computer, it wants me to go to command prompt, enter "ramaze start" then the ramaze app runs on port 3000.
<apeiros>
tynamite: ramaze afaik uses rack in the backend by now. there's multiple webservers which can run it
<tynamite>
I am not happy with this setup.
<apeiros>
tynamite: and the port is almost certainly configurable
<apeiros>
try `ramaze -h`, it'll probably show the options you can pass in
<tynamite>
I've entered "ramaze -h" and there's 6 commands I can choose from.
<tynamite>
I'm looking for a way for a ruby server that I can just go to the file manager to add ruby files and folders in, and run those subfolders in the web browser.
<dminuoso>
What does "running those subfolders in the web browser" mean.. exactly?
<dminuoso>
How do you run a subfolder in a web browser?
<apeiros>
tynamite: look at the above link
<apeiros>
dminuoso: I think they're thinking about it like e.g. with .php
<tynamite>
i'll try to explain
<tynamite>
Like how php works.
<dminuoso>
Oh boy.
<apeiros>
so yeah, above link
<tynamite>
When I install wampserver or xampp to my windows computer, I place everything inside www/ or htdocs/ whatever I want, go to the appropriate url and it just runs.
<apeiros>
we've evolved away from that, but nothing prevents you from doing it that way. hence somebody came up with a way.
<dminuoso>
Devolution is still a thing it seems.
<apeiros>
sure
<dminuoso>
tynamite: Just use sinatra.
<dminuoso>
Like everybody else.
<apeiros>
pre-evolution things tend to have the air of being "simpler"
<dminuoso>
apeiros: That's the thing. Sinatra is not really that complicated.
<adaedra>
you can't form a generation of php developpers telling it the way it's done is the right way® and hope there are no side effects.
jamesaxl has quit [Read error: Connection reset by peer]
<dminuoso>
adaedra: But you can put those PHP developers into a rocket for an educational (one way) trip to the moon.
<tynamite>
I might have to look into sinatra instead of ramaze.
<dminuoso>
tynamite: If you're already comfortable with ramaze you might as well stick to it. They are not too terribly different.
jamesaxl has joined #ruby
<adaedra>
dminuoso: did you not hear? Moon is so last century. It's all about mars now.
<dminuoso>
adaedra: That's why I want them to stay on the Moon.
<tynamite>
I'll look into rack server pages and see if it solves my problem.
Sauvin is now known as Bock
<tynamite>
Why did ruby have to evolve away from that apeiros, that's what stopped ruby from being more popular ;)
<adaedra>
tynamite: trolling aside, the PHP way of having a .php file for each subpage is not a very good way, especially because of shared code and things that should stay between calls
<apeiros>
tynamite: uh, that claim is rather flawed
<adaedra>
Ruby became popular thanks to Rails, so that's kinda the opposite
<apeiros>
tynamite: we evolved away from that way because it has a tons of issues
<apeiros>
tynamite: and if you've done any reasonably big project with php, you'd know that
<tynamite>
But there's certain websites that have to work in that fashion.
<apeiros>
it's why there are things like apc and other caching solutions in the php world
<dminuoso>
tynamite: Anything you want can be trivially done with sinatra/ramaze.
<apeiros>
tynamite: no, there is no website which *has* to work in that fashion
mooser has joined #ruby
<dminuoso>
tynamite: The concept of multiple sites is solved by routing logic, not by files.
<apeiros>
but yes, there are websites where it's nicer if you can start out that way
<tynamite>
maybe i'm confused here
<apeiros>
and again, nothing stops you from doing it that way.
<dminuoso>
tynamite: A ramaze or sinatra do what you want out of the box. They can run some code and render a response to a request.
<apeiros>
most of my projects in rails start out with a single "Pages" controller which just evaluates a view from its directory. but that's for "sketching", or "mocking".
<adaedra>
Well you're used to working some way, so it's not that easy to move to another way, it's normal
esObe has quit [Ping timeout: 268 seconds]
<tynamite>
Can I run multiple ruby apps on the same port and have different apps in different subfolders, all running, if I use phusion passenger?
esObe has joined #ruby
esObe has quit [Read error: Connection reset by peer]
<adaedra>
yes
<tynamite>
good, it's a shame passenger isn't compatible with windows
bkxd has quit [Ping timeout: 255 seconds]
<ljarvis>
get a vm
<tynamite>
I tried to install vagrant but it doesn't work on my windows laptop
<adaedra>
or use the linux subsystem
<ljarvis>
nginx has a windows version
esObe has joined #ruby
djbkd_ has quit [Remote host closed the connection]
<ljarvis>
it was more polite than "get away from windows"
StoneCypher has quit [Ping timeout: 252 seconds]
acalycine has quit [Quit: bye]
astrobunny has quit [Remote host closed the connection]
astrobunny has joined #ruby
mikecmpbll has quit [Quit: inabit. zz.]
<tynamite>
This makes me feel like buying a mac so I can run passenger on the mac
<ljarvis>
no dont do that
<ljarvis>
what do you need passenger for?
<adaedra>
You don't *need* passenger
manjaro-kde5 has quit [Remote host closed the connection]
<tynamite>
I might be making a client's site in ruby, so they'll need passenger hosting to run the site instead of a regular php web host, and I would like passenger on my computer for safekeeping so I can duplicate the site on my laptop
ledestin has quit [Read error: Connection reset by peer]
lenwood has joined #ruby
ledestin has joined #ruby
astrobunny has quit [Ping timeout: 255 seconds]
Cohedrin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mim1k has joined #ruby
AcidRain has left #ruby ["Leaving"]
<tynamite>
thank you for the advice!
mim1k has quit [Ping timeout: 240 seconds]
lenwood has quit [Ping timeout: 245 seconds]
domgetter has quit [Ping timeout: 258 seconds]
<dminuoso>
tynamite: Use docker.
lenwood has joined #ruby
<ljarvis>
"they'll need passenger hosting" but why? :/
<tynamite>
I'm downloading it now.
<ljarvis>
:|
* dminuoso
pokes ljarvis with a Ruby 1.9.3 stick
<dminuoso>
Take that.
<tynamite>
I pay $85 a year to mellowhost for hosting and I asked them to install phusion passenger so I can run ruby there and they refused so now I need to look for a good passenger web host.
<dminuoso>
See, I just avoid passenger.
<tynamite>
dreamhost sounds good, they believe in freedom of speech, they refused to stop hosting muhammed cartoons
hutch34_ has joined #ruby
<tynamite>
dreamhost uses passenger
<cerulean>
nginx + puma + 2.4 !!!!!!!
<dminuoso>
For once I agree with cerulean.
<cerulean>
linode !!!
<cerulean>
:D
<dminuoso>
And that's where agreement stops again.
<tynamite>
I'm looking into puma right now
<cerulean>
what host dminuoso
<cerulean>
i like my linode.
<dminuoso>
cerulean: I work at an internet service provider.
<cerulean>
oh i see haha
<cerulean>
i switched from passenger to the stack i just said and never looked back
<cerulean>
full websockets support, full concurrency
kassav__ has quit [Remote host closed the connection]
kassav__ has joined #ruby
<dminuoso>
tynamite: puma is just simpler in that you need no weird nginx or apache plugins.
<dminuoso>
And it can be seamlessly integrated into nginx/apache too.
<cerulean>
yes, but use nginx
<cerulean>
lol
hutch34_ has quit [Ping timeout: 252 seconds]
hutch34_ has joined #ruby
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
esObe has quit [Remote host closed the connection]
kassav_ has joined #ruby
esObe has joined #ruby
kassav__ has quit [Read error: Connection reset by peer]
cfec0b8d has quit [Remote host closed the connection]
<tynamite>
I'm running my ramaze app with puma, and it's running on tcp:// instead of http://
hanmac has quit [Ping timeout: 255 seconds]
t-recx has joined #ruby
mooser has quit [Ping timeout: 258 seconds]
jane_booty_doe has joined #ruby
hanmac has joined #ruby
nebiros has quit [Quit: 🤷♂️]
<ytti>
apologies for venting, i don't get why python is popular, feels such a dirty language, littered with built-in functions, no way for developer to make educated guess if it's method you want or function
nebiros has joined #ruby
<ytti>
list comprehensions are really poor for readability
Fysicus has joined #ruby
<ytti>
no way to clearly specify what is internal and what is external api of a c class
<ytti>
i wonder what i'd coplain about ruby, if i had first develope in python then ruby
<ytti>
right now it seems to me unfathomable how someone could prefer python or ruby, considering how much cleaner and consistent ruby is
<ytti>
but surely that is just my own expectations
<Fysicus>
I still think C++ is more consistent. ;-)
<ytti>
i have nothing against C++
<ytti>
but i do have destain for C/C++
<ytti>
people who use that notation
<ytti>
like what
<ytti>
they're entirely different things, knowing one does not imply you know one
<ytti>
and those are probably the people who never program in C++, even when they compile in C++
<Fysicus>
True.
<ytti>
(I have large distain for C though, i don't think anything should be written in it)
<Fysicus>
And why is that?
<ytti>
i suspect it is major reason why computer security is largely a joke
<ytti>
i don't think humans, on average, are capable of writing working code in C
tynamite has quit [Quit: Page closed]
<Fysicus>
No, that's more a consequence of lazy programmers and compromises.
Azure has joined #ruby
<ytti>
i don't think either view can be proven, and i'm very hesitent to change my mind
<ytti>
i don't like blaming people, because we should expect people to perform poorly
<Fysicus>
I'm not asking you to change your mind :-)
<Fysicus>
I'm also not blaming people.
<ytti>
if your method of fixing problem is telling people to do better, you're probably not going to get that problem fixed
<ytti>
i suspect if programmer of same skill and motivation writes same program in rust
<Fysicus>
It's just a simple fact most software problems are caused by people cutting corners
<ytti>
the outcome is higher quality program
<ytti>
i'm not arguying it's physically impossible to write good C
<ytti>
i'm aruying, people on average won't do it, no matter how much we educate, ask and beg them to
<ytti>
so we either change people or we change the tools
<Fysicus>
Software development has always been more of an art than a skill.
<Fysicus>
Some people have the knack, others don't.
<Fysicus>
And of course, a lot of people have different ideas on what clean code looks like.
<ytti>
i think only relevant question is, can choice of language produce better quality code, when all other things remain same
<ytti>
if answer is yes, then we should use the tool which helps us produce higher quality code
auzty has quit [Quit: Leaving]
ixti has joined #ruby
<toretore>
it's incredibly difficult to write correct programs, and very easy to write incorrect ones; a concept that eliminates whole classes of incorrectness without too much of an investment should be welcomed
<toretore>
needing 10 years of experience just to be able to write a program that doesn't have security flaws and other critical bugs is a laughable idea
<ytti>
when it comes to C, we all the time find catastrophic bugs in well understood code
<ytti>
reviewed by best people again and again
<ytti>
like the linux udp.c just last week
<toretore>
right
<ytti>
blaming people for this is cop out
<toretore>
c should probably die (i don't actually know it, but i know *of* it)
<ytti>
humans will always be humans, and we should expect humans to behave like humans and work around that problem
<ytti>
instead of telling them to stop being humans
<ytti>
i couldn't agree more
binaryplease has joined #ruby
<Fysicus>
As a big C & C++ fan, I hope it won't die
<toretore>
i think most sane people are starting to realize this by now
<ytti>
i don't include C++ in this bucket at all
<ytti>
I think C++ is fine, if person knowns C++ and writes idiomatic C++
<ytti>
(i don't, but i know some do)
<Fysicus>
I would even say it'll probably outlive ruby and most of the other modern languages
<foxxx0>
imho the main problem of C is, that is so extremely flexible and there is unified build and test framework, that would help to better test the code and automatically find buffer overflows and off-by-one errors
<toretore>
of course it will, but it doesn't mean it's a good thing
<foxxx0>
it can be done, but it's far from easy
<toretore>
why bother when there are better alternatives?
<Fysicus>
I think it is... What you think as a major problem is one of its strengths
<foxxx0>
if the tooling around C was easier, like tooling around ruby, it would be easier to write good code
<ytti>
data would be good
<ytti>
i wish rust experts would look have CVE's
<ytti>
and write article about them
<ytti>
with conclusion if or not it would have happened in rust code
<ytti>
so that we would have data we can offer managers and decision makers
<ytti>
'x percentage of our security problems would be gone, if we change from C to rust'
<ytti>
now i just assume rust produces inherently less buggy code, but i might be wrong
<toretore>
i don't even think you can make the argument that c is easier or faster to write, like you can with ruby vs various other langs
Fysicus has quit [Quit: The Truth Is Just An Excuse For A Lack Of Imagination]
<ytti>
rust is definitely harder to write than c
<ytti>
rust is probaby like c++ level complexity
<ytti>
i.e. quite high
<ytti>
you don't have to understand anything to write seemingly working C
<ytti>
you can just start writing
<ytti>
but it's pretty hard to brute force your way through idiomatic rust or C++
<toretore>
harder to *learn* definitely, but i'm not sure that means harder to write
<ytti>
you will end up fighting compiler for long time
<ytti>
without educating yourself on the language
<ytti>
but i hope/assume once you've invested that time, the code will be inheretnly better quality
<ytti>
because some classes of errors are guaranteed by compiler not to happen
<toretore>
tbf rust seems to be a really complex language
Fysicus has joined #ruby
Drakx has joined #ruby
rgtk has quit [Ping timeout: 255 seconds]
jameser has quit [Ping timeout: 260 seconds]
<toretore>
i think a good analogy is writing concurrent programs with mutable vs immutable state: the language with mutable state is likely to be much more forgiving and less strict, but now you have to understand and always have in mind all the complexities of mutating state concurrently, which is incredibly hard. with the immutable state, all of that just goes away. it may require you to think a little differently, but that's not an inherent
<toretore>
drawback
<toretore>
*all = most
Drakx has left #ruby [#ruby]
<ytti>
i love writing idiomatic OO programs
<ytti>
but i hae no intuitive idea of my state
<ytti>
so if i run into some memory leaks, very hard to fix
<ytti>
i'm kind of hand-waving the problem and just opting not to write long lived processes in OO
Akuma has joined #ruby
StoneCypher has joined #ruby
rgtk has joined #ruby
StoneCypher has quit [Ping timeout: 252 seconds]
tynamite has joined #ruby
<tynamite>
hello I'm typing in “ruby script/server” on the command line and a webrick server isn't starting
mooser has joined #ruby
<toretore>
give more info
mooser has quit [Ping timeout: 240 seconds]
Akuma has quit [Quit: So long sukkas!]
draxxxeus has joined #ruby
<draxxxeus>
Hi, I have a ruby project and i used to use ruby-pkg-tools on Ubuntu 12.04 to build debian out of it. Now in Ubuntu 14.04, the package ruby-pkg-tools is unavailable. What is the correct way to build a debian from a Ruby project now?
<ruby[bot]>
tynamite: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
pickle_ has joined #ruby
<tynamite>
What is the command for starting webrick?
<tynamite>
is there one?
draxxxeus has quit [Ping timeout: 260 seconds]
<toretore>
tynamite: before you go there, understand that you have to provide more information in order to get any useful response: your code, exactly what happens when you "type ruby script/server"
charliesome has joined #ruby
pickle_ has quit [Read error: Connection reset by peer]
<adaedra>
tynamite: I suggest you forget everything you know about web servers and whatnot and just look at a sinatra tutorial with a fresh mind.
<adaedra>
it may make things easier than trying to adapt things you search for based on what you know
<toretore>
i'm guessing it's someone who downloaded some monster rails app and is trying to run it
pickle_ has joined #ruby
<adaedra>
they were asking how to write ruby apps in the old php way
<toretore>
i must have missed that
jgt1 has quit [Ping timeout: 240 seconds]
<adaedra>
that was more than 2h ago
centrx has joined #ruby
centrx has joined #ruby
centrx has quit [Changing host]
nertzy has quit [Ping timeout: 252 seconds]
Akuma has quit [Quit: So long sukkas!]
jameser has joined #ruby
millerti has joined #ruby
al2o3-cr has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
esObe has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
Pumukel has quit [Remote host closed the connection]
Pumukel has joined #ruby
tynamite has quit [Quit: Page closed]
Pumukel has quit [Remote host closed the connection]
nicesignal has quit [Quit: WeeChat 1.4]
Guest60204 is now known as jdelstrother
jdawgaz has joined #ruby
dasher^0_o has joined #ruby
jdawgaz has quit [Client Quit]
synthroid has joined #ruby
esObe has quit [Ping timeout: 268 seconds]
vuoto has quit [Quit: Lost terminal]
milardovich has joined #ruby
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ineb has quit [Quit: leaving]
ldnunes has joined #ruby
al2o3-cr has quit [Quit: WeeChat 1.7]
pickle_ has quit [Remote host closed the connection]
pickle_ has joined #ruby
bkxd has quit [Ping timeout: 252 seconds]
bkxd has joined #ruby
GinoManWrx has quit [Quit: Leaving]
biberu has joined #ruby
biberu has quit [Client Quit]
biberu has joined #ruby
al2o3-cr has joined #ruby
pickle_ has quit [Read error: Connection reset by peer]
joelwallis has joined #ruby
epochwolf has quit [Read error: Connection reset by peer]
arquebus has joined #ruby
epochwolf has joined #ruby
pupsicle has joined #ruby
gnufied has joined #ruby
DoubleMalt has joined #ruby
joelwallis has quit []
latemus has joined #ruby
arquebus has quit [Quit: konversation disconnects]
<latemus>
i did codecademy's ruby program, and i have done some scripting in ruby since. i want to buy one book which will provide me the opportunity to gain advanced ruby skills. which ruby book should i get
bkxd has quit [Ping timeout: 240 seconds]
lenwood has quit [Quit: Konversation terminated!]
gnufied has quit [Client Quit]
jane_booty_doe has quit [Quit: Leaving]
xenops has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
shynoob has joined #ruby
bkxd has joined #ruby
<shynoob>
hey guys, I want to start learning the ways of Ruby, thereby preparing myself to play with Rails Framework for web development stuff.. I am complete newbie... please suggest where do I start?:)
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
howdoi has quit [Quit: Connection closed for inactivity]
SCHAPiE has joined #ruby
esObe has joined #ruby
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
esObe has quit [Ping timeout: 255 seconds]
Xiti has joined #ruby
Derperperd has joined #ruby
bdonnahue has quit [Ping timeout: 260 seconds]
Qchmqs is now known as Qchmqs_
Qchmqs_ is now known as Qchmqs__
Qchmqs__ is now known as Qchmqs
bkxd has quit [Ping timeout: 260 seconds]
Fasort has joined #ruby
acalycine has joined #ruby
saslam has joined #ruby
jdawgaz has joined #ruby
jrafanie has joined #ruby
ben__ has joined #ruby
FastJack has quit [Quit: leaving]
jrafanie has quit [Client Quit]
jrafanie has joined #ruby
saslam has quit [Read error: Connection reset by peer]
_bet0n has joined #ruby
saslam has joined #ruby
StoneCypher has joined #ruby
jameser has joined #ruby
FastJack has joined #ruby
anotherpi has joined #ruby
<anotherpi>
hello
<adaedra>
hi
<anotherpi>
do you know the seeing_is_believing gem?
<anotherpi>
it's very nice (don't know if it's useful in real life…)
StoneCypher has quit [Ping timeout: 240 seconds]
<anotherpi>
i am searching for an equivalent for JS
<adaedra>
looks like what Xcode has for Swift playgrounds
govg has quit [Ping timeout: 255 seconds]
sepp2k1 has joined #ruby
mooser has joined #ruby
<anotherpi>
yep, but centered on Ruby, not on a text editor or IDE
<adaedra>
sure
sepp2k has quit [Ping timeout: 240 seconds]
Qommand0r has quit [Quit: WeeChat 1.7]
bkxd has joined #ruby
cpruitt has joined #ruby
Qommand0r has joined #ruby
cpruitt has quit [Client Quit]
<pavelz>
erm do ppl know ruby eventmachine here? everywhere it talks about multithreaded multicore support which is sketchy with ruby at best,but nothing said about using eventmachine and em-* gems to create a single listening socket and share it among forked processes. apache style.
<pavelz>
old apache
yeticry_ has quit [Ping timeout: 260 seconds]
mooser has quit [Ping timeout: 260 seconds]
<pavelz>
oh nm. reactor
yeticry has joined #ruby
cpruitt has joined #ruby
shynoob has quit [Quit: Leaving]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
dlitvak has joined #ruby
bkxd has quit [Ping timeout: 245 seconds]
patarr has joined #ruby
jgt1 has joined #ruby
Xiti has quit [Quit: Xiti]
rgtk has quit [Ping timeout: 260 seconds]
saslam has quit [Read error: Connection reset by peer]
saslam has joined #ruby
jgt1 has quit [Ping timeout: 260 seconds]
DLSteve has joined #ruby
DLSteve has quit [Client Quit]
shinnya has joined #ruby
millerti has joined #ruby
nicesignal has joined #ruby
esObe has joined #ruby
jamesaxl has quit [Quit: WeeChat 1.7]
jdawgaz has joined #ruby
houhoulis has joined #ruby
saslam has quit [Read error: Connection reset by peer]
chouhoulis has joined #ruby
saslam has joined #ruby
ski7777 has quit [Remote host closed the connection]
solocshaw has joined #ruby
saslam has quit [Read error: Connection reset by peer]
saslam has joined #ruby
govg has joined #ruby
DLSteve has joined #ruby
houhoulis has quit [Ping timeout: 240 seconds]
coatezy has quit [Ping timeout: 255 seconds]
jamesaxl has joined #ruby
ElDoggo has joined #ruby
saslam has quit [Read error: Connection reset by peer]
saslam has joined #ruby
DLSteve has quit [Read error: Connection reset by peer]
coatezy has joined #ruby
joneshf-laptop has joined #ruby
Fasort has quit [Quit: Leaving]
milardovich has quit [Remote host closed the connection]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DLSteve has joined #ruby
sirecote has quit [Quit: "Hang Up"]
tjvc_ has left #ruby ["Leaving"]
cdg has joined #ruby
solocshaw has quit [Ping timeout: 240 seconds]
ResidentBiscuit has joined #ruby
ski7777 has joined #ruby
milardovich has joined #ruby
acalycine has quit [Quit: bye]
milardovich has quit [Ping timeout: 258 seconds]
CloCkWeRX has quit [Quit: Leaving.]
domgetter has joined #ruby
naprimer_2 has joined #ruby
tjvc has joined #ruby
mooser has joined #ruby
mim1k has joined #ruby
tjvc has left #ruby ["Quit: Leaving"]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hinbody-mobile has joined #ruby
hinbody-mobile has quit [Client Quit]
charliesome has joined #ruby
hinbody_mobile has joined #ruby
hinbody_mobile has quit [Client Quit]
al2o3-cr has quit [Ping timeout: 258 seconds]
hinbody_ has joined #ruby
anisha has quit [Quit: Leaving]
narval has joined #ruby
hinbody has quit [Disconnected by services]
hinbody_ has quit [Client Quit]
Xiti has joined #ruby
hinbody has joined #ruby
Fasort has joined #ruby
saslam has quit [Read error: Connection reset by peer]
hotpancakes has joined #ruby
mooser has quit [Remote host closed the connection]
saslam has joined #ruby
__Yiota has joined #ruby
al2o3-cr has joined #ruby
saslam has quit [Read error: Connection reset by peer]
saslam has joined #ruby
<oded>
How can I convert a BigDecimal to string without leading zeroes (I don't want to round it though)
<adaedra>
you can't really have an assert() which differentiate between a == b or other boolean returns
<adaedra>
without hacking deep in the language, can you
marxarelli has joined #ruby
<ljarvis>
yeah it would require monkeypatching
<mzo>
why can't my test framework get the location of my assertion in the source code, load and parse the code, and then match the AST against various patterns
<ljarvis>
D:
<adaedra>
wow
marxarelli has quit [Client Quit]
<ljarvis>
I would argue something else is broken if you have to do that
<mzo>
why?
<baweaver>
you want your specs to take 20x longer?
<adaedra>
make it read your mind while you're at it
<ljarvis>
especially in a slow language like.. well you know
<mzo>
if it comes down to it, i'd rather just accept the generic message and use plain `assert` everywhere
<ljarvis>
i've done that in places
<mzo>
having the user choose from all of the assert_* variants feels incredibly wrong
<ljarvis>
i mean, if it fails you gotta open up the code any way
<ljarvis>
ya lazy hot dog
<mzo>
right
andmount has joined #ruby
andmount has quit [Client Quit]
bsartek has quit [Quit: This computer has gone to sleep]
<ljarvis>
then again most projects at work (all i think, actually) use rspec
<ljarvis>
so *shrug*
<adaedra>
so you have to choose between all `to *` instead of all `assert_*` :D
<ljarvis>
:D
jgt1 has joined #ruby
synthroid has quit [Ping timeout: 255 seconds]
<ljarvis>
yeah but it just infers question? methods, e.g. expect(foo).to include("bar")
jrafanie has joined #ruby
spicerack has joined #ruby
<baweaver>
There's always a price to be paid when magic is involved
<adaedra>
The simple methods (assert_*) approach is nice to me, as it doesn't pollute the namespace too much (all methods have the same prefix) and are not done by heavilly monkey-patching everything
<ljarvis>
tbh i use elixir a lot and really love that just using assert works perfectly, so i do feel spoiled a bit
<baweaver>
Haskell :D
jameser has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has joined #ruby
mooser has quit [Remote host closed the connection]
<adaedra>
Go do your fancy languages in their respective channels
chouhoulis has quit [Remote host closed the connection]
<ljarvis>
i is mod
<ljarvis>
*raises shield*
<baweaver>
Mod fight :D
<stupidsenpai>
Is there a way for ruby to know which photo is which?
fran_ has joined #ruby
<ljarvis>
stupidsenpai: pardon?
<baweaver>
stupidsenpai: que?
<adaedra>
“between love and bondage” lovely
<stupidsenpai>
Like I'm trying to create a smart image finder
<fran_>
hi guys, what is the path i should use in my templates to link a css file?
<stupidsenpai>
You type in a search result and it gives you accurate results
<hxegon>
stupidsenpai: what criteria are you trying to classify the images by?
<ljarvis>
oh.. that's.. not a simple challenge to solve, stupidsenpai
<ljarvis>
fran_: rails?
<fran_>
yes
<ljarvis>
?rails fran_
<ruby[bot]>
fran_: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<hxegon>
search terms?
<baweaver>
Just use tagging
<hxegon>
stupidsenpai: ^
<ljarvis>
^
<baweaver>
anything more in-depth is going to require a doctorate in CS and a lab
<stupidsenpai>
Well, I'm searching for naked otters in google images and it's including hairy and hairless otters when I just want hairless otters to show up
<stupidsenpai>
I don't want to use tagging
rgtk has quit [Ping timeout: 255 seconds]
fran_ is now known as frankarine
<ljarvis>
better get a lab then
<ljarvis>
and a lab coat so you fit in
<ljarvis>
naked otters
* baweaver
wants a lab coat now
<ljarvis>
welp
<baweaver>
I think we're otterly offtopic now.
<hxegon>
uuuuuhg
<ljarvis>
stupidsenpai: you want something in ruby that can read an image and differentiate between haired and hairless otters?
<stupidsenpai>
Yes
<stupidsenpai>
But also different words
<ljarvis>
ok someone reboot the internet
<ljarvis>
it's broken
<_bet0n>
:D
<hxegon>
stupidsenpai: It's a really difficult topic, but you should google 'computer vision' and 'image classification' if you want to look into it
<stupidsenpai>
Like certain words match with other words
nitric has joined #ruby
<ljarvis>
stupidsenpai: this is a really tough thing to solve I'm afraid, do you have ~2 years to work on this?
saslam has quit [Read error: Connection reset by peer]
<stupidsenpai>
Will people like it if I create something like that
saslam has joined #ruby
<hxegon>
If by "create" you mean "improve the state of research on" and by "like" you mean "give you lots of high paying job offers" then yes
<ljarvis>
yep, my otter pics are all mixed together and it drives me mad
<stupidsenpai>
No I mean find it useful
<stupidsenpai>
And use it
<ljarvis>
absolutely
<hxegon>
yes, absolutely. Google photos does something similar
<ljarvis>
remind me in 5 or so years, by that time my image library will be out of control
<baweaver>
....did epochwolf get to you too ljarvis?
<ljarvis>
what's a epochwolf
ncthom91 has joined #ruby
<baweaver>
best you don't know
kassav_ has quit [Ping timeout: 240 seconds]
<stupidsenpai>
I'm going to try to implement a simple one and I hope that people will improve on it
<ljarvis>
great
<hxegon>
as someone with a history of cringey handles, it sounds like a cringey handle.
<stupidsenpai>
This sounds like something a a phd student would do
<hxegon>
ding!
petruff has joined #ruby
<stupidsenpai>
But I think it'll be fun to do without credit
Ishido has joined #ruby
<ljarvis>
hmm
<ljarvis>
you think?
<stupidsenpai>
I don't know
<stupidsenpai>
I think but I'm not so sure
<stupidsenpai>
If I knows the answers to such questions I would be already using it
<hxegon>
I'd definitely take credit if I were to sink any significant amount of time into it
hotpanca_ has joined #ruby
<hxegon>
I'd encourage you to try it out and see if you enjoy the problem. Good to challenge yourself, and that kind of thing looks great on a resume
jaywhawk has joined #ruby
saslam has quit [Read error: Connection reset by peer]
saslam has joined #ruby
negatifze has joined #ruby
Qchmqs has quit [Ping timeout: 260 seconds]
lmc has quit [Remote host closed the connection]
<stupidsenpai>
I don't know if I'd ever want to work for a company
hotpancakes has quit [Ping timeout: 258 seconds]
<stupidsenpai>
I enjoy having my own
lmc has joined #ruby
<negatifze>
So... I'm having the damnedest time trying to find my problem here, could someone please help? The error says I am missing keyword end, but I don't see where. https://pastebin.com/0fLbfVx0
<negatifze>
Doing a project, doubt the grader is familiar with ruby, so I'll leave that for clarity
<baweaver>
Also the case can be gotten rid of
<adaedra>
l.14, since you are inside `if a.include? ':'`, you will have something in line_array[1]
<baweaver>
if you take most of those collections and demote them into a hash....
<baweaver>
actually, you have a sample input file?
<adaedra>
also, be careful that if you have more than one : in a line, everything starting at the second : will be thrown out
<negatifze>
:) Sorry guys, not concerned at the moment with the most concise code or perfect input validation. Can assume for the time being that all inputs will be correct
<baweaver>
but we want to live vicariously through your assignments D:
<negatifze>
:D
<baweaver>
If you do want an idea of the concise version though, let us know.
<baweaver>
I have a bad habit of doing that
<negatifze>
baweaver: Yeah, I used Ruby quite a bit at an internship awhile back, and everyone was obsessed with "The Ruby Way", Sandi Metz, etc.
<negatifze>
Haven't touched the language for awhile, but this project is a good fit for it
<baweaver>
....you're not from Missouri are you?
<negatifze>
baweaver : Nope
<baweaver>
Ah.
<baweaver>
I knew a few companies with Ruby internships there, one was super religious about it.
<negatifze>
I think "the ruby way" and Sandi Metz are common elements with ruby shops
<negatifze>
Personally I think it doesn't really matter, but... whatever
<adaedra>
never heard of that.
<baweaver>
The Ruby Way is a bit of a tome honestly
<baweaver>
Eloquent Ruby is a bit more concise.
Guest96 has quit [Remote host closed the connection]
<baweaver>
Metz has some good points across the board, but noted in one of her talks that the 5-line method rule was more of a harsh set for a particularly bad company
<baweaver>
See also the book list in the channel topic.
<negatifze>
Oh, from what I've read she has some great ideas
ramfjord has joined #ruby
<negatifze>
I think some people can be a little to anal about conforming to her practices
Guest96 has joined #ruby
<baweaver>
just wait until you discover style guides.
agent_white has joined #ruby
<baweaver>
tip: code reviewers who have nothing to add but style comments are typically seen as very junior
mooser has joined #ruby
<obzidian>
i think sometimes people lose focus on what style guides and best practices recommendations are meant for
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<obzidian>
Metz did mention that the rules laid out are kind of a guideline to avoid straying off the beaten path
<obzidian>
however when you're experienced enough, you tend to develop that instinct for knowing when and when not to stray
<negatifze>
in general I think the best practices are great, and should be adhered to... But at this place, my impression was that the code base was absurdly over-complicated, with layers and layers of abstractions to dig through. And you're about THIS? :)
<baweaver>
just make the linter break the build, and that fixes most everything.
<agent_white>
Mornin' folks
<baweaver>
alo
<baweaver>
'Any fool can make something complicated. It takes a genius to make it simple.'
centrx has quit [Remote host closed the connection]
<obzidian>
negatifze: in general best practices became best because they fit 90% of the requirements for a project
<obzidian>
:P
mooser has quit [Ping timeout: 260 seconds]
<obzidian>
baweaver: is that in refernce to making things unnecessarily abstracted?
<baweaver>
yep
<obzidian>
lol glad i'm not alone
<baweaver>
premature abstraction is the root of all evil
<negatifze>
Amen!
<obzidian>
i've always found abstraction for the sake of abstraction to be a main cause for code becoming messy and easy to break in the first place
<baweaver>
or: Too DRY makes things BRITTLE: Badly refactored into tiny things lacking expressiveness
<obzidian>
too much abstraction = not so friendly to change (most of the times)
<negatifze>
baweaver:That's great :) Never heard of BRITTLE
davidmichaelkarr has joined #ruby
<negatifze>
I'll use that
<baweaver>
I made it a few years back
<baweaver>
because acronyms and fun
<baweaver>
somewhere forever ago on Twitter under keystonelemur
Xiti has joined #ruby
duderonomy has quit [Ping timeout: 240 seconds]
<baweaver>
because baweaver there is some sorority girl who's very confused about tech recruiters wanting her number
pilne has joined #ruby
Bock has quit [Read error: Connection reset by peer]
synthroid has joined #ruby
petruff has quit [Quit: WeeChat 1.7]
petruff has joined #ruby
strontor has quit [Quit: Leaving]
synthroi_ has quit [Ping timeout: 240 seconds]
saslam has quit [Read error: Connection reset by peer]
patarr_ has joined #ruby
shinnya has joined #ruby
frankarine has quit [Quit: Page closed]
saslam has joined #ruby
ensyde has quit [Ping timeout: 255 seconds]
rakm has joined #ruby
patarr has quit [Ping timeout: 252 seconds]
<hxegon>
that's one strategy to avoid them :)
saslam has quit [Read error: Connection reset by peer]
saslam has joined #ruby
stupidsenpai has joined #ruby
__Yiota has joined #ruby
<cerulean>
i fucking hate cybercoders
<cerulean>
btw
<cerulean>
<3
chouhoulis has joined #ruby
Fasort has joined #ruby
<baweaver>
cerulean: offtopic?
saslam has quit [Read error: Connection reset by peer]
patarr_ has quit [Ping timeout: 240 seconds]
saslam has joined #ruby
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
chouhoulis has quit [Remote host closed the connection]
ferr has joined #ruby
hutch34_ has joined #ruby
chouhoulis has joined #ruby
lyy has quit [Quit: Page closed]
milardovich has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has joined #ruby
KnownSyntax has quit [Changing host]
__Yiota has joined #ruby
milardovich has quit [Ping timeout: 260 seconds]
jusa has quit [Ping timeout: 240 seconds]
exchgr has quit [Ping timeout: 240 seconds]
dasher^0_o has joined #ruby
cr3 has joined #ruby
<cr3>
if I have "module Foo" contain "extend Bar" and then I set "Foo::VAR = 1" and it seems that the methods defined in Bar can't see VAR, is there a way for Bar to see VAR somehow?
mim1k has joined #ruby
jgt2 has joined #ruby
ahrs has quit [Remote host closed the connection]
jgt1 has quit [Ping timeout: 255 seconds]
ahrs has joined #ruby
doublemalt_ has quit [Quit: Leaving]
machinewar has joined #ruby
KnownSyntax has quit [Quit: No Ping reply in 180 seconds.]
KnownSyntax has joined #ruby
<cerulean>
Radar: you should fork ceruversion and change the name and the divident to 1000 and call it ryanversion and make it free for open source users (it already is but stipulate this so they will use it)
<cerulean>
that way rails will have a reasonable version number, like 35.6
marcdel has joined #ruby
hinbody has quit [Quit: leaving]
<baweaver>
cerulean: completely off topic.
<baweaver>
having a hard time not seeing you as a troll
jdawgaz has joined #ruby
jakkn has left #ruby [#ruby]
govg has quit [Ping timeout: 260 seconds]
govg has joined #ruby
ForeignBiscuit has quit [Read error: Connection reset by peer]
patr0clus has joined #ruby
milardovich has joined #ruby
mim1k has quit [Ping timeout: 240 seconds]
mooser has joined #ruby
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
yqt has joined #ruby
jrafanie has joined #ruby
Xiti has joined #ruby
jud^ has joined #ruby
jud has quit [Ping timeout: 260 seconds]
j2k has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
ryan_notabot has quit [Ping timeout: 268 seconds]
ryan_notabot has joined #ruby
Lucky_ABA has joined #ruby
ryan_notabot has quit [Remote host closed the connection]
haylon has joined #ruby
ryan_notabot has joined #ruby
Verity has joined #ruby
<Verity>
still loving ruby
milardovich has quit [Remote host closed the connection]
jnj has joined #ruby
<jnj>
Hey y'all, does anyone have any tips for printing out the root to leaf paths of a non-binary tree? The structure of my nodes is basically a variable for data and an array that represents the children of that node.
milardovich has joined #ruby
chouhoul_ has joined #ruby
<Verity>
data structrues hw in ruby? awesome
<Verity>
so you represent your tree in an array?
ResidentBiscuit has joined #ruby
<jnj>
Nah not data structures hw in ruby, just doing some programming questions ( I would love if my data structures class was in ruby )
<Verity>
mine was c++ :)
<Verity>
so is this really a tree you have?
<jnj>
My tree is represented via Nodes. Nodes have node.data, and node.children, where node.children is just an array of nodes. So to add a child to a parent node I do node.children << Node.new
<Verity>
but traversing this tree is proving problematic?
<jnj>
My code works perfectly in building up my tree, I'm just messing up on printing out that tree.
chouhoulis has quit [Ping timeout: 240 seconds]
<jnj>
Traversing it isn't actually that hard, I'm just missing out on reprinting parents
enterprisey has joined #ruby
<jnj>
Here's an example structure (root -> a -> b -> c), (root -> d -> e -> f) (d -> g -> h)
<jnj>
And I'd want it to print out: a b c, d e f, d g h, but it'll do a b c, d e f, g h (so missing printing d a second time)
enterprisey has quit [Client Quit]
jgt2 has quit [Ping timeout: 268 seconds]
jgt2 has joined #ruby
<al2o3-cr>
jnj: i'd try and help but i've had to many zubr :(
<jnj>
alzo3-cr: zubr?
<al2o3-cr>
jnj: might be worth gisting your code
machinewar has quit []
<jnj>
al203-cr: Is using something else besides gist alright? I don't like gist that much
ddffg has quit [Quit: Leaving]
t-recx has joined #ruby
synthroid has quit []
<al2o3-cr>
jnj: i suppose so yeah
<al2o3-cr>
try not to use pastebin.com though
<jnj>
al203-cr: Word, Ill probably post in a little bit I want to spend more time on this problem. What's wrong with pastebin?
<al2o3-cr>
ads
<jnj>
al203-cr: Also, is passing blocks beneficial for recursion?
<jnj>
I don't know a lot about blocks but I saw someones print for a tree online using blocks
<al2o3-cr>
jnj: tab complete my nick
<al2o3-cr>
also, blocks is a whole different thing
<al2o3-cr>
jnj: you learning ruby?
<jnj>
al2o3-cr, thanks I dind't know I can do tab complete for nicknames
<al2o3-cr>
jnj: that quite alright
<jnj>
al2o3-cr, I know a bunch of ruby, I've been working on a rails app thats going into prod, I just don't know much about yield and using & with passing blocks
<al2o3-cr>
jnj: you need to learn ruby first (to the best of your ability)
<al2o3-cr>
before jumping on rails
<al2o3-cr>
it's a fundemental building block
solocshaw has joined #ruby
<Verity>
hes already written a rails app that is gooing into prod.
<Verity>
no need to learn ruby now =P
<baweaver>
See the topic for a book list, but Eloquent Ruby is a good read
<Verity>
(I'm jk)
<baweaver>
Verity: ...
<jnj>
al2o3-cr, I'd say I know ruby fairly well, I've read large portions of eloquent ruby and well-grounded rubyist, and have coded data structures and algs using ruby. I've read about blocks a ton of times, I;m just not sure how they work
<Verity>
my point is, very often we see this in reverse
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
<jnj>
baweaver: eloquent ruby is goat
cloaked1 has quit [Quit: leaving]
<jnj>
Verity: I learned ruby first before jumping into rails. I initially wanted to learn ruby just for rails, but then I just fell in love with ruby because its a dope progamming langauge
<baweaver>
As far as Ruby blocks, search around Google for a bit for detailed tutorials. There are a few good ones out there. I think RubyMonk had a few.
<jnj>
oki
<baweaver>
see if I can find a good one or two
<baweaver>
if not I'll just write one.
bsartek has quit [Quit: Quitte]
<al2o3-cr>
just amazes me how one can deploy a rails app for production and not fully understanding the magic which is blocks
<al2o3-cr>
jnj: not slagging you off or anything :)
<jnj>
al2o3-cr, haha no I got you. I know that blocks are super important within the structure of rails
<jnj>
al2o3-cr, and i believe singleton methods too, i think?
<baweaver>
jnj: what other languages have you done?
__Yiota has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<baweaver>
/ worked with
mooser has quit [Remote host closed the connection]
mooser has joined #ruby
<al2o3-cr>
jnj: singleton methods are just instance methods upon the class definition
<baweaver>
because if Javascript is in there then: [1,2,3].map { |v| v * 2 } ~ [1,2,3].map(function (v) { return v * 2; }) ~ [1,2,3].map(v => v * 2)
Guest96_ has quit [Remote host closed the connection]
hutch34_ has quit [Ping timeout: 260 seconds]
<jnj>
baweaver: I've done java, php, I'm real bad with javascript haha. I only use it when I need to move divs around
Rodya_ has quit [Remote host closed the connection]
<al2o3-cr>
baweaver: you forgot the semicolon :P
Guest96 has joined #ruby
<baweaver>
There's one in there, the other two are taken care of with ASI
<al2o3-cr>
no you didn't (my eyes)
Guest96 has quit [Remote host closed the connection]
jamesaxl has quit [Quit: WeeChat 1.7]
cdg has joined #ruby
Guest96 has joined #ruby
Rodya_ has joined #ruby
hutch34_ has joined #ruby
<jnj>
But anyway basically I'm trying to print out a tree like structure using the logic here: http://www.geeksforgeeks.org/given-a-binary-tree-print-out-all-of-its-root-to-leaf-paths-one-per-line/. So far it's working well, except instead of printing out (and with each one on a new line) [a, b, c][d, e, f][d, e, g] it just keeps on adding the the array, so the output becomes [a, b, c][a, b, c, d, e, f][a, b, c, d, e, f, g, h]
<jnj>
But I think my understanding of the problem is wrong
<Verity>
is it really a tree?
<baweaver>
where was your code on that?
<jnj>
I can post my code
chouhoul_ has quit [Remote host closed the connection]
<baweaver>
yeah, throw it in a gist or something
<baweaver>
probably you're mutating the array in an odd way.
chouhoulis has joined #ruby
Rodya_ has quit [Ping timeout: 255 seconds]
Rodya_ has joined #ruby
<jnj>
Is pastebin alright or nah? I dislike gist
<baweaver>
the bot will nag you
bsartek has joined #ruby
<jnj>
whoops, I just realized i gotta meet with someone so I can't really work on this now :(
<jnj>
I'll probably show up later tho
jgt2 has quit [Quit: WeeChat 1.4]
<jnj>
thanks for all of your help y'all
jnj has quit [Quit: Leaving]
jgt has joined #ruby
__Yiota has joined #ruby
millerti has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
KnownSyntax has quit [Ping timeout: 240 seconds]
zcrawfor has joined #ruby
agent_white has quit [Read error: Connection reset by peer]
<al2o3-cr>
why does `ObjectSpace::InternalObjectWrapper.new/allocate` seg fault?
jrafanie has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
rgtk has joined #ruby
DLSteve has joined #ruby
<al2o3-cr>
on ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]
* baweaver
does not have the requisite C knowledge to know
ldnunes has quit [Quit: Leaving]
enterprisey has joined #ruby
enterprisey has quit [Read error: Connection reset by peer]
jamesaxl has joined #ruby
negatifze has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jdawgaz has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
anotherpi has quit [Remote host closed the connection]
agent_white has joined #ruby
<al2o3-cr>
Pointer[Pointer[dlwrap ObjectSpace.reachable_objects_from(Array)[7]].ref[0,4].unpack1('l')].to_value # this shouldn't happen
marcdel has quit [Ping timeout: 240 seconds]
zcrawfor has quit [Quit: ChatZilla 0.9.93 [Firefox 52.0.2/20170323105023]]
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
<al2o3-cr>
why that segfaults is beyond me
KnownSyntax has joined #ruby
pppktz has quit [Read error: Connection reset by peer]
jdawgaz has joined #ruby
marxarelli|afk is now known as marxarelli
saslam_ has quit [Quit: Leaving]
cdg has quit [Remote host closed the connection]
jamesaxl has quit [Quit: WeeChat 1.7]
cdg has joined #ruby
jusa has joined #ruby
Fasort has quit [Quit: Leaving]
ozcanesen has joined #ruby
Verity has quit [Remote host closed the connection]
ColeHub has joined #ruby
<al2o3-cr>
>> require 'fiddle'; require 'objspace'; include Fiddle; Pointer[Pointer[dlwrap ObjectSpace.reachable_objects_from(Array)[7]].ref[0,4].unpack('l')[0]].to_value
<cerulean>
a very bad versioning program i wrote in crystal
<cerulean>
it is very bad and sinful. but not evil. to add more insult to injury, it's a far ass 2mb program that's like probably not much more than 25 lines of code
<cerulean>
fat ass*
<cerulean>
ceruversion: YOU WHALE !!!!
<cerulean>
ask crystal designers to make llvm compilation slim as fuck
<cerulean>
<3 crystal
<al2o3-cr>
O 0_o
<al2o3-cr>
i was gonna diddle in crystal but never persued
<_bet0n>
Hello folks! :) I have a question. How can I properly replace a regexp match with variable value?
<_bet0n>
I tried the regexp on Rubular and it worked flawlessly
<_bet0n>
For example there is a string containing a substring like 6000K for which I should use /\d{4}K as a regular expression if I understand it correctly.
<cerulean>
#{} ?
<_bet0n>
Is it that simple?
<cerulean>
hold on
ozcanesen has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<cerulean>
i said wrong
<cerulean>
"foo".gsub(/(o+)/, '\1\1\1')
<cerulean>
gsub will do it
<cerulean>
oh
<cerulean>
i see your question now
<cerulean>
ruby version might be wrong. try setting ruby version on rubular
cdg_ has joined #ruby
<_bet0n>
I am using the highest version available there. 2.1.5
antgel has quit [Ping timeout: 255 seconds]
jcao219 has joined #ruby
<cerulean>
ruby 2.4 is the latest ruby. so their expressions might be too old and not work anymore
lxsameer has quit [Quit: WeeChat 1.5]
<Radar>
_bet0n: What is your input and expected output?
<al2o3-cr>
_bet0n: use parens
<cerulean>
best idea is to use 2.4 regex manual ... and irb. and listen to radar ;)
* cerulean
exits stage left
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]
cdg has quit [Ping timeout: 240 seconds]
<_bet0n>
Radar: so input is for example "LED Bulb E17 4W A60 6000K" and expected output is "LED Buld E17 4W A60 Cold White"
cdg_ has quit [Ping timeout: 240 seconds]
<Radar>
_bet0n: Right. Thanks. Give me a moment.
<_bet0n>
Radar: String "Cold White" is stored in a light_color variable
<_bet0n>
Thank you. Let me have a look. I have to find a solution :D
<al2o3-cr>
use sub if you don't want to globally substitute
ryan_notabot has joined #ruby
jgnagy_ has joined #ruby
<al2o3-cr>
meaning every occurence in the string
jgnagy has quit [Ping timeout: 260 seconds]
Fasort has joined #ruby
mooser has joined #ruby
sumobob has joined #ruby
milardovich has quit []
<_bet0n>
Ok. Thank you for help guys. As usual it was all my fault. I just forgot to use proper escaping in regular expression and I used gsub! instead of gsub :D Now it works flawlessly :)
<_bet0n>
title.gsub(/\d{4}K/, light_color).to_s does the trick :)
<_bet0n>
Anyway. Thank you all I appreciate your kindness :)
esObe has quit [Remote host closed the connection]
<al2o3-cr>
_bet0n: why .to_s?
esObe has joined #ruby
<_bet0n>
It might be because it is a nokogiri node I am working with
<_bet0n>
So Ruby asks for method
<al2o3-cr>
_bet0n: gsub only works on strings and returns a string
minimalism has quit [Quit: minimalism]
<_bet0n>
I don't know then. Now it works without the method specified
<al2o3-cr>
well unless you use the block form, but ...
<_bet0n>
I am not using the block form.
mooser has quit [Remote host closed the connection]
elifoster has quit [Remote host closed the connection]
elifoster has joined #ruby
<_bet0n>
Just try to understand me. I am still in process of learning Ruby :) Sometimes I get lost :)
jcao219 has quit [Ping timeout: 260 seconds]
plujon has joined #ruby
<al2o3-cr>
_bet0n: yeah, no worries :)
<jrm>
Newbie questions: Is https://ruby.github.io/openssl/ part of ruby itself or is it a separate gem that needs to be installed? If it is part of ruby, why does the ostatu2 gem list it as a runtime dependency?
outreachdan has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
esObe has quit [Ping timeout: 255 seconds]
username1 has joined #ruby
coatezy has joined #ruby
patr0clus has quit [Quit: WeeChat 1.4]
r3m has quit [Read error: Connection reset by peer]
r3m has joined #ruby
<havenwood>
jrm: OpenSSL is part of the stdlib but has been gemified so it can be updated separately from Ruby releases.