<acovrig>
al2o3-cr: interesting, is there a way to raw print a string (I’m wondering if there is a character that isn’t printing and therefore didn’t get copied into the IRC)?
<al2o3-cr>
acovrig: do "yuorsting".bytes a paste it here
<acovrig>
al2o3-cr: I’m getting the string from .split(“\n”).each do |tag| tag.strip! tag.inspect
sharpmachine has quit [Remote host closed the connection]
baweaver has quit [Remote host closed the connection]
roolo has quit [Remote host closed the connection]
<al2o3-cr>
acovrig: ah i see you problem you got other whitespace in you string
<acovrig>
it’s an array? no implicit conversion of Array into String, interesting
scottschecter has joined #ruby
<acovrig>
al2o3-cr: shouldn’t I see that it is an array with .inspect?
s2013 has joined #ruby
<al2o3-cr>
no
<acovrig>
al2o3-cr: is there something like PHP’s var_dump?
michaeldeol has quit [Ping timeout: 250 seconds]
<weaksauce>
acovrig what's var_dump do
rbennacer has quit [Remote host closed the connection]
<al2o3-cr>
acovrig: this is the string you pasted to irc
<choke>
I added the pry gem to my projects -- but I hate testing stuff in the browser and what not so by putting "binding.pry" somewhere in my code i can inspect the outputs within the terminal which i like
<jfarmer>
acovrig Do you have control over the markup you're parsing?
fedexo has quit [Ping timeout: 265 seconds]
mahtennek has joined #ruby
gusrub has quit [Quit: Leaving]
cndiv has quit []
Musashi007 has quit [Quit: Musashi007]
yaw has joined #ruby
bgmarx_ has quit [Remote host closed the connection]
pontiki has joined #ruby
<pontiki>
hi
senayar has joined #ruby
senayar has quit [Remote host closed the connection]
bgmarx_ has joined #ruby
GitGud has quit [Ping timeout: 265 seconds]
blaines has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
n008f4g_ has quit [Ping timeout: 245 seconds]
dgutierrez1287 has joined #ruby
yaw has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
bgmarx_ has quit [Remote host closed the connection]
datanoise has joined #ruby
Lucky__ has joined #ruby
segfalt has joined #ruby
rbennacer has quit [Remote host closed the connection]
mahtennek has quit []
GitGud has joined #ruby
eggoez has quit [Ping timeout: 252 seconds]
mcclurmc has joined #ruby
arturhoo has quit [Quit: arturhoo]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has joined #ruby
coderhs has quit [Ping timeout: 276 seconds]
rgb-one has joined #ruby
<rgb-one>
Hey
ndrei has joined #ruby
rafaelsales has joined #ruby
fgo has joined #ruby
podman has quit [Quit: Connection closed for inactivity]
eggoez has joined #ruby
<rgb-one>
Majority of you guys have made use of bundler right?
<pontiki>
probably
<pontiki>
is this a poll?
<rgb-one>
something like it
<Nilium>
I tried it once then decided not to.
<rgb-one>
How did you learn to use it?
RegulationD has joined #ruby
<pontiki>
reading the documentatino
<Nilium>
By looking at the site and going "wow this documentation sucks" and then looking at someone else's project.
ndrei has quit [Ping timeout: 256 seconds]
<pontiki>
reading many Gemfiles
rafaelsales has quit [Ping timeout: 265 seconds]
<pontiki>
using it
slawrence00 has joined #ruby
<weaksauce>
Nilium what are you using? bunlder seems to be the de facto standard really
<Nilium>
Nothing.
Creede has joined #ruby
<Nilium>
I use Ruby for shell scripting.
<Nilium>
Or in place of it, rather.
<rgb-one>
What issues do you have with the bundler documentation Nilium?
<weaksauce>
do you use gems?
GitGud has quit [Ping timeout: 252 seconds]
<Nilium>
rgb-one: General lack of organization and explanation for everything.
fgo has quit [Ping timeout: 255 seconds]
dopie has joined #ruby
<Nilium>
weaksauce: Yes, but I don't need to care about distributing them to other people.
<Nilium>
s/them/my scripts/
<rgb-one>
Nilium: When did you last use bundler?
<Nilium>
About three weeks ago.
<weaksauce>
I'd be unhappy when I had to reinstall ruby and installing all the gems by hand
drewo has quit [Quit: WeeChat 1.2]
<Nilium>
Why do it by hand?
GitGud has joined #ruby
<weaksauce>
and the eventual version conflicts.
segfalt has quit [Quit: segfalt]
Spami has quit [Quit: This computer has gone to sleep]
<Nilium>
Version conflicts are a sign that you need to update anyway.
dopie has quit [Client Quit]
<rgb-one>
On the first page there is a getting started guide and links to other relevant documentation, Were these not clear enough and in what way?
<pontiki>
must be taking a poll
<weaksauce>
well if you have a script that works with library x at version 1.0 and the gem maintainer made breaking changes with it in version 2.0. that's a problem
<Nilium>
If you want to do a poll, set up a Google Doc or something for it.
<rgb-one>
Good idea :)
<Nilium>
That said, I don't use Ruby for anything other than small tool scripts. By the time something's hideously outdated, it probably doesn't matter.
RegulationD has quit [Ping timeout: 272 seconds]
<rgb-one>
in the meantime this ruby channel is my audience
Cust0sLim3n has quit [Max SendQ exceeded]
quimrstorres has joined #ruby
<Nilium>
Chances are that if I'm going to make a long-term thing, it's going to be a gem.
<Nilium>
I just can't find a use for bundler.
Cust0sLim3n has joined #ruby
<rgb-one>
Nilium: What is bundler in your own words?
<Nilium>
Well, it's not a replacement for google docs.
<rgb-one>
Nilium: haha
<rgb-one>
indeed
GitGud has quit [Ping timeout: 246 seconds]
<Nilium>
Seeing as it's a poll, now I just want to know what the goal is.
<rgb-one>
To improve the documentation
wallerdev_ has joined #ruby
<Nilium>
By the way, someone ban nambiz
<Nilium>
It's a spambot
<al2o3-cr>
oh, yeah was gonna mention that before good call
michaeldeol has joined #ruby
<al2o3-cr>
spamming me with goldfish
quimrstorres has quit [Remote host closed the connection]
wallerdev has quit [Ping timeout: 256 seconds]
wallerdev_ is now known as wallerdev
malconis has joined #ruby
<rgb-one>
I guess I will work on a poll and post it on reddit or something
<rgb-one>
Thanks for the idea
codingstream has joined #ruby
michaeldeol has quit [Client Quit]
<codingstream>
Is there a way to do @@foo ||= value when @@foo has not already been defined in the class?
Asher has quit [Quit: Leaving.]
wallerdev has quit [Quit: wallerdev]
<heftig>
codingstream: explain some more?
sarmiena_ has quit [Quit: sarmiena_]
Asher has joined #ruby
<codingstream>
heftig: instead of having to do: class Example; @@foo = 'value'; end, I'd like to not have to define @@foo first
gambl0re has joined #ruby
<nofxxx>
In rake if I got rule 'a' => 'b' { |t| I can get 'a' with t.name, how to get 'b' ?
Igorshp has joined #ruby
<heftig>
codingstream: and what value should it have?
oo_ has joined #ruby
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
unshadow has quit [Ping timeout: 245 seconds]
<jfarmer>
codingstream First, you almost never want to use class variables, so the fact that you're using them likely means there's something more basic off about your approach to whatever problem you're trying to solve.
<sphex>
hey. what would be the recommended way to localize ruby programs?
<jfarmer>
codingstream But in general, the solution is to use a method and not reference the (class/instance) variable directly
<jfarmer>
def foo; @foo ||= 'default_value'; end
<jfarmer>
def foo=(val); @foo = val; end
<nofxxx>
sphex, i18n gem is nice
Mia has quit [Read error: Connection reset by peer]
<jfarmer>
Then you can just call foo freely without having to think about whether the @foo variable is initialized
unshadow has joined #ruby
Igorshp has quit [Ping timeout: 276 seconds]
<sphex>
nofxxx: alright. thanks
oo_ has quit [Remote host closed the connection]
<nofxxx>
answer to my question t.source
<codingstream>
jfarmer: I have a bunch of classes and I'm taking advantage of Module#name for mapping to some HTTP paths, but need to override it in a few instances
yoongkang has joined #ruby
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mattarse has joined #ruby
<codingstream>
jfarmer: I'd like to do this at the class level, not instance level
<jfarmer>
codingstream Nevertheless, you almost certainly don't want a class variable.
saadq has joined #ruby
<jfarmer>
You can have instance variables at the class level, too, which is usually what you want.
hahuang65 has quit [Ping timeout: 276 seconds]
<jfarmer>
But this is all abstract; I can't recommend a course of action without having more context.
<codingstream>
jfarmer: ah, I see. I think that will solve this perfectly then
<codingstream>
jfarmer: thanks!
<jfarmer>
np
GlenK_ has joined #ruby
GlenK_ is now known as Decker
al2o3-cr has quit [Read error: Connection reset by peer]
al2o3-cr has joined #ruby
Kneecaps has joined #ruby
yaw has joined #ruby
coderhs has joined #ruby
pygospa has quit [Remote host closed the connection]
blue_deref has joined #ruby
havenwood has joined #ruby
Kneecaps has left #ruby [#ruby]
serivichi has joined #ruby
aryaching has quit [Ping timeout: 264 seconds]
choke has joined #ruby
mcclurmc has quit [Remote host closed the connection]
serivich has quit [Ping timeout: 272 seconds]
dopie has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
icarus has quit [Remote host closed the connection]
pygospa has joined #ruby
cb__ has quit [Remote host closed the connection]
cb_ has joined #ruby
yfeldblum has quit [Ping timeout: 265 seconds]
_djbkd has quit [Quit: My people need me...]
jrunning_ is now known as jrunning
ItSANgo__ has quit [Ping timeout: 256 seconds]
dgutierrez1287 has quit [Remote host closed the connection]
jrunning has left #ruby [#ruby]
dede has quit [Quit: Connection closed for inactivity]
al2o3-cr has quit [Quit: the quieter you become, the more you are able to hear]
<sphex>
it says these are locale-independent
<Senjai>
DateTime.now represents system time
<Senjai>
DateTime.current represents UTC-0
<sphex>
Senjai: I mean "locale", not local. as in translated in the current locale's language.
<jfarmer>
Ah, ok
Al3ks has quit [Ping timeout: 272 seconds]
<jfarmer>
Like...
<jfarmer>
I'm not sure what you mean.
<sphex>
regular libc's strftime() is localized, but ruby disables that (prolly to not have to deal with encoding-related portability issues (perl has these)), but.. I'd like it back :p
al2o3-cr has joined #ruby
<Senjai>
sphex: Strftime shouldnt be language dependent, is it?
idafyaid has joined #ruby
<Senjai>
sphex: You can use I18n.l
Kneecaps has quit [Quit: Leaving...]
<Senjai>
and use that to format times
<jfarmer>
I'm having a hard time imagining what a "localized" time would be.
<Senjai>
across certain languages
<acovrig>
jfarmer: I went AFK; yes that looks nice, no I don’t have controll of the input I’m parsing; background: this was PHP and I’m new to ruby and figured I’d try switching it to ruby, so I’m probably horribly inefficient.
<jfarmer>
Like, if your locale were set to Japanese it'd print out 2015年6月19日?
<jfarmer>
For today's date?
comm64x has joined #ruby
<sphex>
jfarmer: vendredi, le 19 juin
<sphex>
yeah
<comm64x>
is there a rails specific channel
<jfarmer>
comm64x #rubyonrails
<havenwood>
?rails comm64x
<ruboto>
comm64x, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<jfarmer>
haha
<comm64x>
ruboto: ty
comm64x has left #ruby [#ruby]
datanoise has quit [Ping timeout: 256 seconds]
<sphex>
jfarmer: mostly I want localized day and month names. I'm used to just get them from strftime(). I'm gonna look into i18n then I guess. I was hoping it wouldn't be necessary. :/
<jfarmer>
> This method is similar to strftime() function defined in ISO C and POSIX. Several directives (%a, %A, %b, %B, %c, %p, %r, %x, %X, %E*, %O* and %Z) are locale dependent in the function. However this method is locale independent.
<sphex>
so far I was planning to use one of the gettext modules rather than i18n/r18n. I much prefer to have english strings in the program, then xgettext them out and translate them in .po files. I hope that's possible with ruby. :/
<lupine>
rails uses some magic yaml file
<lupine>
dunno if there are .po imports/exports/loads
<sphex>
yeah I fscking hate that
<jfarmer>
The wording there is awkward (seems like it wasn't written by a native English speaker), but they mean that while the ISO C strftime() function has locale-dependent formatting options, Ruby's DateTime#strftime is locale-independent
<jfarmer>
sphex Those files have to l live _somewhere_
<lupine>
standards are, well, standard
<jfarmer>
I'd argue that them living in your project is better than them living in some system-wide magical location
nambiz was banned on #ruby by ChanServ [nambiz!*@*]
nambiz was kicked from #ruby by ChanServ [Banned: private message spam isn't allowed]
<lupine>
but that's never fussed ruby much
<sphex>
jfarmer: sure. I just want them to be .po files with strings extracted from the source. rather than an "indirect identifier" system that i18n/r18n seem to require. unless I missed something...?
<jfarmer>
sphex Oh, that's faier.
<jfarmer>
fair*
ramfjord_ has quit [Ping timeout: 255 seconds]
<jfarmer>
But that's not how strftime works, is it?
micmus has quit [Ping timeout: 276 seconds]
<jfarmer>
.po files are a gettext thing
<sphex>
jfarmer: no no, separate issue
<jfarmer>
right
Musashi007 has quit [Quit: Musashi007]
dopie has joined #ruby
<sphex>
just saying that so far it looks like I won't be using those i18n/r18n libraries, so I was wondering if there was another, simpler way to localize my dates
<jfarmer>
I don't feel like that's more or less complex, honestly.
tvw has quit [Read error: Connection reset by peer]
sdothum has quit [Ping timeout: 244 seconds]
scottschecter has quit [Quit: Leaving]
<sphex>
yeah.. I'll keep reading up on them.
<pontiki>
i'm not sure if gettext won't handle interpolated strings correctly
<sphex>
I'm just starting to learn ruby and everything's confusing
<sphex>
thanks for the help!
<sphex>
pontiki: yeah... I was worrying about that. :/
<sphex>
pontiki: I'd be localizing printf-like strings only I guess
axisys has quit [Remote host closed the connection]
<pontiki>
if you do everything with sprintf-style formatting, it may work
<pontiki>
hah
<jfarmer>
I think you can do something like, e.g., i18n.localize(some_date, format: "%d %B %Y")
simplyianm has joined #ruby
shinnya has joined #ruby
<jfarmer>
The fact that it is done this was has less to do with Ruby and more to do with the fact that we're in OOP-land.
mcclurmc has joined #ruby
<sphex>
jfarmer: oh great. lemme try.
arcanez has left #ruby [#ruby]
<sphex>
jfarmer: yeah, disabling the localization of strftime() seems like a good idea; the system will return it with the locale's encoding, and ruby would have to turn it back into unicode, and portability would probably be hell
<sphex>
jfarmer: "in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale)"
<sphex>
oh. looks like I prolly have to do *something* to initialize it.
cahya has joined #ruby
cahya has left #ruby [#ruby]
jgpawletko has joined #ruby
davedev24_ has quit [Ping timeout: 256 seconds]
davedev24_ has joined #ruby
krowv has quit [Ping timeout: 256 seconds]
mcclurmc has quit [Ping timeout: 265 seconds]
<jfarmer>
sphex Yes, there are lots of considerations.
simplyianm has quit [Remote host closed the connection]
hcnewsom has joined #ruby
micmus has joined #ruby
Makorak has quit [Remote host closed the connection]
chipotle has quit [Quit: cheerio]
duderonomy has joined #ruby
Ropeney has joined #ruby
datanoise has joined #ruby
sargas has joined #ruby
RickHull has joined #ruby
<RickHull>
can I set rake's --trace option in my Rakefile?
sargas has quit [Changing host]
sargas has joined #ruby
<RickHull>
i'm tempted to alias rake to 'rake --trace' but i probably don't want that everywhere
al2o3-cr has quit [Quit: the quieter you become, the more you are able to hear]
datanoise has quit [Ping timeout: 256 seconds]
shafox has joined #ruby
pontiki has quit [Quit: ZZZZZZZZ<clunk>NNNNNNNNN]
al2o3-cr has joined #ruby
scx_ has joined #ruby
coderhs has quit [Ping timeout: 264 seconds]
charliesome has quit [Quit: zzz]
acovrig has quit [Quit: acovrig]
hcnewsom has quit [Ping timeout: 246 seconds]
rbowlby has quit [Remote host closed the connection]
scx has quit [Ping timeout: 255 seconds]
braincrash has quit [Quit: bye bye]
shafox has quit []
Igorshp has joined #ruby
oo_ has joined #ruby
AustinLMayes has joined #ruby
msnyon has joined #ruby
j4cknewt has quit [Remote host closed the connection]
ItSANg___ has joined #ruby
RickHull has quit [Ping timeout: 272 seconds]
Igorshp has quit [Ping timeout: 265 seconds]
<hfp>
Hi all, I'm a bit confused at the difference between a mock and a stub. It seems that one should use a mock when they want to check that a specific message was passed with specific arguments and still use the underlying class from production code. Whereas a stub is a dummy implementation that will always return the same value. Is that correct?
<i8igmac>
uninitialized constant OpenURI::Error
<i8igmac>
require 'open-uri'
msnyon has quit [Ping timeout: 276 seconds]
oo_ has quit [Remote host closed the connection]
<i8igmac>
im not sure why im getting this error
braincrash has joined #ruby
ItSANgo__ has quit [Ping timeout: 252 seconds]
j4cknewt has joined #ruby
<i8igmac>
rescue OpenURI::Error => e
ItSANg___ has quit [Ping timeout: 264 seconds]
<i8igmac>
must be depreciated or something
<i8igmac>
lol
harly has joined #ruby
<scx_>
What is the best way to lock and unlock the file in Ruby?
scx_ is now known as scx
ixti has quit [Ping timeout: 265 seconds]
havenwood has quit [Ping timeout: 265 seconds]
<scx>
(and check if file is locked)
ixti has joined #ruby
<sphex>
scx: maybe File.flock?
msnyon has joined #ruby
simplyianm has quit [Remote host closed the connection]
codingstream has quit [Quit: WeeChat 1.0.1]
michaeldeol has joined #ruby
ItSANgo_ has joined #ruby
michael_mbp has quit [Excess Flood]
simplyianm has joined #ruby
michael_mbp has joined #ruby
frem has quit [Quit: Connection closed for inactivity]
QKO_ has quit [Remote host closed the connection]
<sphex>
is a Struct object going to use less memory than a corresponding class with a bunch of instance variables?
chinmay_dd has joined #ruby
ItSANgo_ has quit [Ping timeout: 272 seconds]
tkuchiki has joined #ruby
ItSANgo has joined #ruby
blazes816 has joined #ruby
hazelux_ has joined #ruby
ItSANgo has quit [Max SendQ exceeded]
Makorak has joined #ruby
Agoldfish has quit [Quit: G'Bye]
<al2o3-cr>
>> class Foo; def initialize(a, b); @a = a; @b = b; end; end; Struct.new("Bar", :a, :b); f = Foo.new(1,2); b = Struct::Bar.new(1,2); [ ObjectSpace.memsize_of(f), ObjectSpace.memsize_of(b) ]
<ruboto>
al2o3-cr # => undefined method `memsize_of' for ObjectSpace:Module (NoMethodError) ...check link for more (https://eval.in/384633)
jfarmer has joined #ruby
<al2o3-cr>
>> requre 'objspace'; class Foo; def initialize(a, b); @a = a; @b = b; end; end; Struct.new("Bar", :a, :b); f = Foo.new(1,2); b = Struct::Bar.new(1,2); [ ObjectSpace.memsize_of(f), ObjectSpace.memsize_of(b) ]
<ruboto>
al2o3-cr # => undefined method `requre' for main:Object (NoMethodError) ...check link for more (https://eval.in/384634)
lewis1711 has joined #ruby
<al2o3-cr>
>> require 'objspace'; class Foo; def initialize(a, b); @a = a; @b = b; end; end; Struct.new("Bar", :a, :b); f = Foo.new(1,2); b = Struct::Bar.new(1,2); [ ObjectSpace.memsize_of(f), ObjectSpace.memsize_of(b) ]
<lewis1711>
is there a simple ruby testing framework? one that doesn't involve sub-classing or separate files
tcrypt has quit [Ping timeout: 272 seconds]
oo_ has joined #ruby
Zamerick has joined #ruby
ItSANgo has quit [Max SendQ exceeded]
blazes816 has quit [Ping timeout: 265 seconds]
ItSANgo has joined #ruby
<phat4life>
lewis1711: what are you trying to test?
symm- has joined #ruby
<lewis1711>
phat4life, nothing at the moment. I am just wanting to have system that's like "write a bit of code, write a test just after it, carry on".
<lewis1711>
I like having it in the same file
<phat4life>
yeah you can do that easy
<phat4life>
but i recommned useing seperate files
<phat4life>
one sec, let me push something to github, its the simplest testing setup i have
jtdoncas has quit [Ping timeout: 264 seconds]
sargas has quit [Quit: Leaving]
nikhgupta has joined #ruby
mcclurmc has joined #ruby
gix has quit [Ping timeout: 246 seconds]
<lewis1711>
phat4life, thanks. I'm a simple person, I will only unit test if it's completely thoughtless, I don't like ceremony
wookiehangover has quit [Ping timeout: 256 seconds]
tkuchiki has quit [Remote host closed the connection]
roger_rabbit has joined #ruby
AndroidLoverInSF has quit [Quit: Leaving]
gix has joined #ruby
mcclurmc has quit [Ping timeout: 244 seconds]
wookiehangover has joined #ruby
fabrice31 has joined #ruby
theery has joined #ruby
ascarter has quit [Ping timeout: 264 seconds]
<sphex>
lewis1711: I would like to subscribe to your newsletter
jlast has quit [Remote host closed the connection]
<phat4life>
but i don't recomend you but it in the same file
<phat4life>
*put
<sphex>
nope. this should be your tagline, and whatever solution you find to any problem.. would be of interrest to people. :p
<phat4life>
ah, forgot something
<phat4life>
ok you can look at it
<phat4life>
but you really should use either rspec or mini test
<phat4life>
and having a gemfile to manager any gems you might want to use is a good idea
wookiehangover has quit [Ping timeout: 256 seconds]
<lewis1711>
phat4life, I had a look, thanks
Musashi007 has joined #ruby
<lewis1711>
sphex, pretty much the only language I ever used unit tests in was racket, because rackunit was so simple. I search for something similar in other languages, but it's hard to find. I don't really want to write anything longer than a couple of hundred lines in ruby without unit tests, because it's so super dynamic
fgo has joined #ruby
dgutierrez1287 has joined #ruby
<phat4life>
lewis1711: you can try mini test instead of rspec
<phat4life>
rspec is a bit of a higher learning curve than minitest
<sphex>
lewis1711: right.. I'm starting with ruby and I'm gonna need to write some tests too soon enough. :/
<sphex>
ooohhh minitest sounds great then
<phat4life>
rspec is worth learning tho
wookiehangover has joined #ruby
RegulationD has joined #ruby
ruby-lang413 has joined #ruby
<sphex>
phat4life: alright. I'm gonna bookmark your example, I'm sure it'll help me too soon enough. so thanks!
<ruby-lang413>
i'm trying to write a ruby extension in c with gcc, and i'm getting a #include <ruby.h> no such file or directory. i expected that but i'm not sure what steps to take next?
casadei has joined #ruby
<phat4life>
ruby-lang413: what os
<ruby-lang413>
phat4life linux mint 17
<phat4life>
ruby-lang413: do you have ruby-dev installed?
fgo has quit [Ping timeout: 272 seconds]
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<ruby-lang413>
phat4life, no; i just checked with apt and the ruby version is 1.9.1 :\
<ruby-lang413>
phat4life, that's the output of the apt-get install ruby-dev
<phat4life>
gotcha
<ruby-lang413>
i suppose for my purposes it's not too important; let's say i get the 1.9.1 version
sevenseacat has quit [Quit: Me dun like you no more.]
<ruby-lang413>
would i use -l to tell gcc to look for the path after that?
<cubicool>
Hey guys, I've recently (last week) started using Ruby for some projects. I love the language so far, and I had a quick question I can't find an answer on. I come from a heavy Python background, and I'd like to be able to quickly (syntactically) create a Class with some attr_* attributes (instead of always using Hash).
<cubicool>
I want to do this to avoid the constant operator[]() access to values.
<cubicool>
Is there any shorthand for this? (For example, Python has 'namedtuple')
<phat4life>
ruby-lang413: im not sure tbh i don't much much about gcc. all i can say is maybe find where that heard file exists on your machine
<sphex>
cubicool: maybe Struct?
<starfox_sf>
yup, Struct is what you're looking for
* cubicool
googles.
<sphex>
cubicool: or use ri(1)
<sphex>
it seems to work almost exactly like namedtuple
<sphex>
except it's mutable
<phat4life>
cubicool: or an OpenStruct if you need to add attributes after instantiate it
<harly>
ruby-lang413: you could try using chruby and ruby-install. much easier to manage ruby installs, it'll do everything for you and set it up as local installs for the user.
<phat4life>
harly: why chruby instead of rvm?
<phat4life>
or are they two different things?
<harly>
they serve the same purpose. personally I like chruby. w/e.
<cubicool>
Thanks guys!
<harly>
the same maintaner makes both. so i use chruby along with ruby-install.
<postmodern>
phat4life, fewer bells & whistles, much simpler
<harly>
speak of the devil. :)
<phat4life>
postmodern: what is?
<postmodern>
phat4life, chruby
<phat4life>
ah
<phat4life>
rvm doesn't play nice with fish
<postmodern>
phat4life, RVM does everything and handles every edge-case, as a result it's pretty complex and bulky
<phat4life>
interesting
<harly>
personally i've had zero problems using chruby. it "just works"
<postmodern>
phat4life, you have to use a wrapper for fish, since fish doesn't support POSIX
<harly>
well. except some debian jessie pre-release test issues. but they got fixed pretty quickly :)
msnyon has quit [Ping timeout: 272 seconds]
lewis1711 has quit [Ping timeout: 244 seconds]
<phat4life>
don't judge me for using fish
baweaver has joined #ruby
mattarse has joined #ruby
ruby-lang413 has quit [Ping timeout: 246 seconds]
braincra- has joined #ruby
baweaver has quit [Ping timeout: 244 seconds]
Forgetful_Lion has quit [Remote host closed the connection]
<cubicool>
Actually guys, I don't think Struct is right.
rbowlby has quit [Remote host closed the connection]
metallicrwr has joined #ruby
LMity has quit [Ping timeout: 272 seconds]
metallicrwr is now known as yayfoxes
michaeldeol has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fabrice31 has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
beneggett has joined #ruby
chinmay_dd has joined #ruby
Musashi007 has quit [Quit: Musashi007]
psy has joined #ruby
tejasmanohar has joined #ruby
<lewis1711>
this is at least the third time in my life I have spent minutes figuring out why I couldn't construct my class because I wrote "initialise" instead of "initialize".
fabrice31 has quit [Ping timeout: 252 seconds]
yayfoxes has quit [Ping timeout: 246 seconds]
swgillespie has joined #ruby
LMity has joined #ruby
houhoulis has joined #ruby
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
_djbkd has quit [Quit: My people need me...]
rgb-one has quit [Remote host closed the connection]
lxsameer has joined #ruby
RegulationD has joined #ruby
<[k->
Your class still constructs without initialize ^^
j4cknewt has quit [Remote host closed the connection]
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
serivich has quit [Ping timeout: 265 seconds]
riceandbeans has joined #ruby
<riceandbeans>
word
serivich has joined #ruby
<riceandbeans>
what's the current one?
<riceandbeans>
optparse
<riceandbeans>
argparse
<riceandbeans>
optionsparser
<shevy>
painparse
<riceandbeans>
I'm serious man
fgo has joined #ruby
nikhgupt has quit [Ping timeout: 252 seconds]
GitGud has quit [Ping timeout: 244 seconds]
kahuna_ has quit [Quit: Lost terminal]
j4cknewt has joined #ruby
AustinLMayes has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fgo has quit [Ping timeout: 272 seconds]
santana has joined #ruby
hazelux_ has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<santana>
what is the most mature curses library?, what do you think of canis?
tercenya has joined #ruby
uptownhr has quit [Quit: uptownhr]
LMity has quit [Ping timeout: 250 seconds]
araujo_ has joined #ruby
araujo has quit [Ping timeout: 250 seconds]
charliesome has joined #ruby
santana has quit []
serivichi has joined #ruby
Musashi007 has joined #ruby
serivich has quit [Ping timeout: 255 seconds]
<shevy>
curses makes people sad
<al2o3-cr>
and angry
<[k->
But there are hardly any GUI for Ruby :(
bkxd has joined #ruby
<lewis1711_>
I've heard good things about termbox
<riceandbeans>
curses doesn't make me sad
<shevy>
the problem with GUIs in Ruby is that there aren't that many people sufficiently interested in it
<lewis1711_>
I'd describe my emotion as more "bemused"
<riceandbeans>
shevy: what do you mean?
<shevy>
why use a traditional GUI when you can have html/css/javascript
<lewis1711_>
responsiveness
<shevy>
riceandbeans for instance: ask how many people here use ruby-gnome / ruby-gtk :)
<shevy>
how many people here use ruby + *curses
<riceandbeans>
I've done ruby gkt and qt
<riceandbeans>
gtk rather
swgillespie has joined #ruby
<riceandbeans>
and wxwidgets
<riceandbeans>
but that took effort
<riceandbeans>
and swing with jruby
<shevy>
what is the biggest program you wrote there?
<[k->
Ewww swing :p
<lewis1711_>
[k-, they're all bad. Swing looks uglier than QT I guess, but much nicer to code for
<riceandbeans>
I wrote a really crappy IDE in GTK/QT
<riceandbeans>
no
<riceandbeans>
swing was the worst
<riceandbeans>
java is garbage
_blizzy_ has quit [Ping timeout: 256 seconds]
<riceandbeans>
I like qt the most of them
<[k->
The truth has been spoken!
<riceandbeans>
feels the most natural
User458764 has joined #ruby
<lewis1711_>
I like java. I'm hacking in jruby
<lewis1711_>
I'm a "professional C++ programmer" (that feels weird to type). I rather dislike it. but I've never been stuck in enterprise java hell, just used it for personal stuff, so that may be why I look at it fondly. that and I use java 8 which is nice
Tempesta has joined #ruby
Ropeney has joined #ruby
swgillespie has quit [Client Quit]
coffee__cup has joined #ruby
<riceandbeans>
java leaks as a language feature
<lewis1711_>
I have no idea what that means
<lewis1711_>
leaks memory?
<riceandbeans>
yes
<riceandbeans>
clearly you understood
sleungcy has quit [Quit: Connection closed for inactivity]
<[k->
Java should have garbage collected itself long ago, as they say :p
<riceandbeans>
amen
<lewis1711_>
riceandbeans, there was a gap of a minute between those two messages :P anyway if java is so bad why is jruby so much faster? checkmate atheists
<riceandbeans>
it's not faster
<riceandbeans>
it takes like 60 seconds to do initial load
<riceandbeans>
my script finishes before your JVM loads
psy has quit [Ping timeout: 265 seconds]
beneggett has joined #ruby
<lewis1711_>
I don't actually own the JVM
<lewis1711_>
I'm just a user of it
<riceandbeans>
I would rather do Mono than JVM
<riceandbeans>
java is the biggest failure of a government project
EllisTAA has joined #ruby
<shevy>
goverment?
<lewis1711_>
I can't tell if you're an old school bearded unix programmer, or still a student
<shevy>
I thought Oracle owns java's soul
pragmatism has joined #ruby
santana has joined #ruby
<lewis1711_>
Oracle is just a front for the illuminati that runs the UN
<shevy>
lewis1711_ ask for a pic with beard!
<shevy>
workmad3 has one, a mighty beard
_draco_ has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
<lewis1711_>
I just hope they're conditioned
<shevy>
riceandbeans do you have a mighty beard as well?
<riceandbeans>
sun microsystems made java
<riceandbeans>
it received contstant heavy funding and support from darpa
<shevy>
sun is history
<riceandbeans>
it would've never made it to oracle's buyout if not for the us govt
<riceandbeans>
alas, i wish I had a glorius neckbeard
<lewis1711_>
*puff puff pass* they use of a distributed vm to execute code was designed so they coudn't track down the chemtrail manufacturing plants
<riceandbeans>
my girlfriend won't allowit
psy has joined #ruby
<EllisTAA>
anyone know a way where i can run the methods in test concurrently?
jmhmccr has quit [Quit: Connection closed for inactivity]
TinkerTyper has quit [Ping timeout: 252 seconds]
EllisTAA has quit [Quit: EllisTAA]
Rollabunna has joined #ruby
Iskarlar has joined #ruby
Jackneill_ has quit [Quit: Leaving]
krz has joined #ruby
mandarinkin has joined #ruby
auzty has joined #ruby
TinkerTyper has joined #ruby
Ilyas has joined #ruby
ndrei has joined #ruby
fabrice31 has joined #ruby
ta has quit [Remote host closed the connection]
rafaelsales has quit [Remote host closed the connection]
psy has joined #ruby
psy has quit [Max SendQ exceeded]
psy has joined #ruby
krz has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 256 seconds]
Cust0sLim3n has quit [Read error: Connection timed out]
_ht has joined #ruby
C1V0 has joined #ruby
wookiehangover has joined #ruby
rafaelsales has joined #ruby
Cust0sLim3n has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
krz has joined #ruby
ledestin has joined #ruby
mister_solo has joined #ruby
auzty has quit [Quit: Leaving]
postmodern has quit [Quit: Leaving]
towski_ has quit [Remote host closed the connection]
wookiehangover has quit [Ping timeout: 264 seconds]
swgillespie has joined #ruby
rafaelsales has quit [Ping timeout: 264 seconds]
wookiehangover has joined #ruby
RegulationD has joined #ruby
olistik has joined #ruby
shivam_v has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 256 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ndrei has quit [Ping timeout: 244 seconds]
<matti>
Is #ruby-lang now with +i?
<matti>
Ah.
<matti>
I see topic.
<matti>
;)
cb_ has quit [Read error: Connection reset by peer]
cb_ has joined #ruby
cb_ has joined #ruby
rubie has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
haxrbyte_ has quit [Read error: Connection reset by peer]
dseitz has quit [Quit: gnight]
Igorshp has joined #ruby
shinnya has joined #ruby
t_ has quit [Ping timeout: 276 seconds]
<zenspider>
threads? what threads?
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
rubie has quit [Ping timeout: 265 seconds]
<[k->
#ruby-lang should be forwarding here
Igorshp has quit [Ping timeout: 256 seconds]
j4cknewt has joined #ruby
senayar has joined #ruby
ndrei has joined #ruby
yfeldblum has quit [Remote host closed the connection]
wmoxam has quit [Ping timeout: 250 seconds]
pleiosaur has quit [Remote host closed the connection]
peterhu has quit [Remote host closed the connection]
peterhu has joined #ruby
pch has quit [Quit: Leaving]
senayar has quit [Ping timeout: 276 seconds]
chussenot has joined #ruby
swgillespie has joined #ruby
roolo has joined #ruby
t_ has joined #ruby
ndrei has quit [Ping timeout: 264 seconds]
yfeldblum has joined #ruby
ndrei has joined #ruby
langlands has joined #ruby
wmoxam has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sevenseacat has joined #ruby
User458764 has joined #ruby
psy has quit [Ping timeout: 264 seconds]
<shevy>
[k- I thought it was invite only nowadays?
<[k->
Eh?
<shevy>
that's the message I get
<shevy>
* Cannot join #ruby-lang (Channel is invite only).
<[k->
Why is it invite only now :o
<bnagy>
it doesn't exist
<shevy>
it was decided to move to #ruby based on a suggestion from jhass
<bnagy>
if you join it it's a redirect
serivichi has quit [Ping timeout: 265 seconds]
<bnagy>
if you're already here then I guess you get the +i message
<shevy>
oh
shevy has left #ruby ["I'll be back ... maybe"]
shevy has joined #ruby
<shevy>
you are right bnagy
<shevy>
I just tried to join #ruby-lang and ended up on #ruby
sysx1000 has joined #ruby
<sysx1000>
Hello! gem install sunspot_solr -v '2.2.0' | SSL_read: decryption failed or bad record mac | OpenSSL 0.9.8zd 8 Jan 2015, platform: darwin64-x86_64-llvm | gem 2.4.8 | ruby 2.2.1
serivich has joined #ruby
<sysx1000>
2.2.1p85
<sysx1000>
Can't get it working
<sysx1000>
Could someone help, what to do?
<shevy>
looks as if you have some problem with openssl
<sysx1000>
it looks
<shevy>
the error message you showed here does not seem very useful at all
<shevy>
can you find the sunspot_solr gem
<shevy>
download it somewhere, extract it via gem unpack *.gem
<shevy>
then enter that directory and manually run the installation
<bnagy>
that is a really old openssl
<bnagy>
you might want to do something about that
yardenbar has quit [Quit: Leaving]
<shevy>
here is a more recent one ftp://ftp.openssl.org/source/openssl-1.0.2c.tar.gz
<sysx1000>
it is not so easy to play with various openssls on yosemite, etc.
<bnagy>
it's not?
<bnagy>
like.. install a less insecure one via ports / brew - done
<bnagy>
if you don't have either of those things you're going to have a bad time developing with MRI anyway
Forgetful_Lion has joined #ruby
<sysx1000>
wondering, why it was working recently...
<sysx1000>
i had no problems with system openssl
j4cknewt has quit [Remote host closed the connection]
<bnagy>
tbh questions like "why doesn't X obscure gem with with Y outdated openssl etc" is too many levels of unknown for me to worry about
<bnagy>
*work with
<sysx1000>
OK, np. manual install of gem is not a solution. trashing system openssl with homebrew one is not a solution. I will try to get less hacky stuff. thanks
<shevy>
manual installation of a gem is not a solution?
<sysx1000>
no
<shevy>
you never provided the exact error to us
<bnagy>
have fun!
<sysx1000>
thx
veduardo has quit [Ping timeout: 256 seconds]
sysx1000 has left #ruby [#ruby]
<sevenseacat>
its not that old an openssl, its the same as my machine has
phutchins has quit [Ping timeout: 256 seconds]
<sevenseacat>
which would have been what came with this version of osx
brian_000 has joined #ruby
<bnagy>
hm.. I guess you're right, they're still running that branch. zd is still insecure though :)
<brian_000>
Howdy, I'm a super-noob. I know a little JS but that's it. I'm trying to build a simple webpage that integrates Stripe Checkout, and I *THINK* that needs Heroku. But I have no idea where to begin.
MatthewsFace has joined #ruby
langland_ has joined #ruby
mister_solo has quit [Ping timeout: 252 seconds]
yardenbar has joined #ruby
langlands has quit [Ping timeout: 264 seconds]
rafaelsales has joined #ruby
Jackneill has joined #ruby
fgo has joined #ruby
ahmetkapikiran has joined #ruby
swgillespie has joined #ruby
rafaelsales has quit [Ping timeout: 252 seconds]
ahmetkapikiran has quit [Client Quit]
brian_000 has quit [Quit: Leaving]
lkba_ has quit [Ping timeout: 256 seconds]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
fgo has quit [Ping timeout: 250 seconds]
techsethi has joined #ruby
MatthewsFace has quit [Remote host closed the connection]
Musashi007 has quit [Quit: Musashi007]
MatthewsFace has joined #ruby
techsethi has left #ruby [#ruby]
cb_ has quit []
mcclurmc has joined #ruby
nofxx has quit [Ping timeout: 250 seconds]
nofxxx has quit [Ping timeout: 264 seconds]
MatthewsFace has quit [Ping timeout: 256 seconds]
Bed-lam has joined #ruby
quazimodo has joined #ruby
DEA7TH_ has joined #ruby
rubie has joined #ruby
ndrei has quit [Ping timeout: 250 seconds]
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mcclurmc has quit [Ping timeout: 276 seconds]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
yottanami has joined #ruby
edwinvdg_ has joined #ruby
<yottanami>
Is any better way to write a loop like `0.upto t-1`
<sevenseacat>
t.times ?
rubie has quit [Ping timeout: 265 seconds]
mattarse has quit [Ping timeout: 244 seconds]
veleno has joined #ruby
<Bed-lam>
Thim lin your fre wit chim probay industrie Play ea now with isie.
<Bed-lam>
We'll of les.
<Bed-lam>
We does. It's fly bably in't dow with Mentoo does, Vionic lisis biol. MandelayStating coo! Withe theaver. Increstriesh goes bably ing jettentos th asis of Diving full ove wit molin to your withe cook dit Korthe tos Xbox, frehe his, Lizard Stay. Mandelay molea maker withe baby, Lizard we'll of legs. As th MandelayStay execs. Vandust. Mento dresh goesh andelayindelay bes. Mandelay. Mentool. Fifa,
<Bed-lam>
Nes. Sonies.
<Bed-lam>
the egs, besh goes, st Kork! Woreasy isis frea! Desh goeshmatter, Vands ove th Koreasy maker.
<Bed-lam>
Neshnets frea nown you! Dee of Diving come.
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<air_>
ist one you have done
enebo has joined #ruby
<jhass>
air_: I don't understand where you're stuck, you explained what it does perfectly
beneggett has quit [Ping timeout: 252 seconds]
_tpavel has quit [Quit: Leaving]
langland_ has joined #ruby
RegulationD has joined #ruby
rbennacer has quit [Remote host closed the connection]
<air_>
attach_function :puts, [ :string ], :int means it will print the argument which is in the form of string and return it to int type
sinkensabe has quit [Remote host closed the connection]
rbennacer has joined #ruby
OrbitalKitten has joined #ruby
<jhass>
attach_function just makes the C function with that signature available to call it from Ruby, it doesn't say anything about the C functions behavior
GitGud has joined #ruby
<sevenseacat>
[k-: man, how do these professional speakers get anything done
jenrzzz has joined #ruby
roshanavand has joined #ruby
<havenwood>
sevenseacat: do they?
roshanavand has quit [Max SendQ exceeded]
<[k->
They do!
langlands has quit [Ping timeout: 252 seconds]
<sevenseacat>
i dont know, i see a bunch of the same names at like every conference
roshanavand has joined #ruby
<havenwood>
sevenseacat: I see a lot of folk give the same talk at every conference.
dotix has quit [Quit: Leaving]
<sevenseacat>
that seems... pointless
<centrx>
They're clones
l0oky has joined #ruby
<wasamasa>
they need the world to know
<havenwood>
I guess once you've prepared a nice talk might as well give it over and over
<sevenseacat>
i mean a lot of us watch conf videos, i think i'd feel a bit ripped off if i attended a conf and saw a talk i'd already seen
<havenwood>
sevenseacat: I've done exactly that.
<havenwood>
sevenseacat: Gone to a talk live, oops, I've seen this talk. :(
<sevenseacat>
dang
<l0oky>
What's up rubyists
<havenwood>
l0oky: hallooo
xxx has quit [Quit: xxx]
<sevenseacat>
so much money that could have been saved by sitting at home watching youtube instead
RegulationD has quit [Ping timeout: 244 seconds]
<centrx>
I thought the purpose of conferences was to connect with people
<centrx>
Since you can always watch the videos, or read the book
xxx has joined #ruby
enebo has quit [Ping timeout: 265 seconds]
<sevenseacat>
i guess thats another case of 'they are what you make them'
<[k->
The conference is live ;-;
<[k->
All this chatter means no one is watching it
<air_>
do you organise these talks in india?
<sevenseacat>
and speaking of seeing talks before
<sevenseacat>
i have indeed seen amy wibowo's sweaters as a service talk before
wpp has joined #ruby
nateberkopec has quit [Quit: Leaving...]
<[k->
There's a wonderful schedule to see what's going to happen
<sevenseacat>
[k-: we can read, thanks :)
nateberkopec has joined #ruby
<[k->
I doubt it hahahahha
<[k->
No one reads anymore!
<sevenseacat>
[k-: kindly refrain from acting stupid, please.
<dorei>
google trends makes a distrinction between "search terms" and higher level concepts as programming languages, etc
* bnagy
walks in
* bnagy
reads scrollback
* bnagy
walks out
icebourg has quit [Client Quit]
<dreinull75>
havenwood unbelievable. I knew there was something :)
<dreinull75>
couldn't remember what it was though.
Al3ks has quit [Remote host closed the connection]
<dorei>
what's really interesting with google trends is that if one selects a smaller duration like 90days, then the graph oscilates between week days and week ends :)
sinkensabe has joined #ruby
_ixti_ has joined #ruby
starfox_sf has joined #ruby
Pupeno has quit [Remote host closed the connection]
<leitz>
shevy, how do I reference the block value?
<shevy>
so calling .strip there is totally useless
Rapier- has joined #ruby
<shevy>
don't put a preceding '.' character for instance
yoongkang has quit [Remote host closed the connection]
<shevy>
the ruby parser will correctly interprete this code to invoke the .item() method on that object
mcpierce has joined #ruby
<leitz>
so use "characteritem"
zenguy_pc has joined #ruby
<jhass>
leitz: puts character.public_send item
baweave__ has quit [Read error: Connection reset by peer]
<leitz>
There is no "item()" variable or method, each of those is a value. So "character..career" is "Marine"
znz_jp has quit [Quit: kill -QUIT $$]
fgo has quit [Ping timeout: 264 seconds]
<leitz>
jhass, no pubilc_send method.
<jhass>
leitz: get a supported ruby version
User458764 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
erts has joined #ruby
<jhass>
if you don't have public_send that means you're on 1.8, which beyond dead
<shevy>
leitz you can use .send()
<jhass>
but you should update your ruby instead
al2o3-cr has joined #ruby
<shevy>
leitz "characteritem" will be a different thing again, just because "item" is part of that name does not mean that it has anything to do with any other "item"
<ljarvis>
s
<ljarvis>
oops
<ljarvis>
wrong screen
<shevy>
hey
<shevy>
what was the right screen
<ljarvis>
the one that is not irc
<shevy>
oh
<ljarvis>
s = git status
rafaelsales has joined #ruby
znz_jp has joined #ruby
<shevy>
oh wow... first time that I have this error
<shevy>
rubygems/specification.rb:2112:in `raise_if_conflicts': Unable to activate program_information-1.0.27, because colours-0.0.32 conflicts with colours (>= 0.10) (Gem::ConflictError)
<jhass>
time to use bundler :P
f209 has joined #ruby
yoongkang has joined #ruby
yfeldblum has quit [Ping timeout: 256 seconds]
<f209>
Hi guys, have a question about Ruby.. Is the Trie data structure part of available collections by default?
<f209>
or is it something I'd have to write?
<jhass>
not aware it's in core
peter_paule has joined #ruby
<shevy>
jhass hmm but bundler can not bypass a restriction like that or?
<ponga>
If i wanted to write a gui in ruby crossplatform but don't want to use shoes, is qtruby a good option to go for?
<jhass>
shevy: it might be able to resolve to a version that both support, or at least more clearly point out why the conflict is happening
<shevy>
I just rebuilt my ruby and there is no more libpng dependency \o/
<f209>
thanks
x44x45x41x4E has quit [Ping timeout: 256 seconds]
<f209>
I'm applying for this job and they literally gave me this academic problem: based on Find Longest Word Made of Other Words
rafaelsales has quit [Ping timeout: 244 seconds]
<f209>
they said I can write it in C, C++, Java, Python or Ruby
AustinLMayes has joined #ruby
<f209>
none of which I use regularly
<shevy>
ponga you could use ruby-gnome :)
<jhass>
f209: can you use external libraries? I'm sure there's a gem for it :P
<f209>
so I'm debating which language it would likely be easiest for me to write it in
<ponga>
shevy: does it run on windows too?
<shevy>
ponga yeah
<f209>
it doesn't say you can so I'm assuming no
<shevy>
ponga ideally, if you can, try to make the underlying code base as generic as possible, and then once that is done, add the GUI to it
<shevy>
then you can add any GUI to it when you want to, without it being tightly coupled to the GUI
AustinLMayes has quit [Max SendQ exceeded]
<ponga>
thank you , shevy is there a reason you recommend gnome over qt that i might want to hear
<shevy>
dunno. it has a wiki actually which helps
<shevy>
qtruby looked fancier when I tried it
olistik has joined #ruby
<f209>
such a pain in the ass that they want me to write a trie data structure
<shevy>
if you know of a wiki for qtruby lemme know
zenguy_pc has quit [Read error: No route to host]
yoongkang has quit [Remote host closed the connection]
<bnagy>
f209: tries are trivial :/
<f209>
writing the whole data structure?
<jhass>
yeah, looks simple
<bnagy>
which is probably the point of the exercise I guess
langland_ has joined #ruby
<bnagy>
like a hash can be used as a ghetto trie with no extra code
Exuma has joined #ruby
<jhass>
"ghetto trie", we should see how long a WP page on that would survive :D
langlan__ has joined #ruby
woodruffw has quit [Quit: And then he took off.]
woodruffw has joined #ruby
starfox_sf has joined #ruby
<bnagy>
is that one of the embargoed US words?
langlands has quit [Ping timeout: 245 seconds]
aryaching has quit [Ping timeout: 276 seconds]
<f209>
since tries are trivial...mind if i ask you a question or two
shazaum_ has joined #ruby
<f209>
assuming we're talking about a-z
<f209>
no numbers
<f209>
is a trie essentially a tree...where the max nodes level 1 are the letters in the alphabet..
<f209>
and subsequently each node on level 2...has x children
al2o3-cr has quit [Ping timeout: 250 seconds]
<f209>
where x is equal to the number of letters in position 2 of the word?
<ponga>
shevy: i can't find a good wiki for qtruby, i will stick to gnome ruby then
ruv has joined #ruby
Exuma has quit [Client Quit]
<bnagy>
without bothering to wikipedia, my understanding is that it's a compressed DAG where the end nodes are the end of a word
JoshL has quit []
langland_ has quit [Ping timeout: 264 seconds]
<bnagy>
so you keep following available paths and then suddenly you find you're at an end node so c->a->t[terminal] means cat is a word
theery has joined #ruby
<f209>
yea that's what i thought.
<bnagy>
I've used them in ruby before, but the stack is small so recursive searches can be tricksy
s2013 has joined #ruby
<bnagy>
probablt changed now, I don't knw
Torrieri has quit [Quit: Be back later ...]
<bnagy>
I think if you start with a hash, though, it's pretty natural
starfox_sf has quit [Ping timeout: 264 seconds]
<bnagy>
you can add more or less formal looking navigation methods, but it's the depth recursion you have to watch out for
theery has quit [Remote host closed the connection]
Guest1 has joined #ruby
rbennacer has joined #ruby
Pupeno has joined #ruby
Pupeno has quit [Changing host]
Pupeno has joined #ruby
Guest1 has quit [Quit: if you want an nice chat with new users and new network so visit us on /server irc.ind.in:6667 -j #lobby and have fun, enjoy your chat. Thanks.]
houhoulis has quit [Remote host closed the connection]
kraljev11 has joined #ruby
workmad3 has joined #ruby
zenguy_pc has joined #ruby
oo_ has quit [Remote host closed the connection]
sinkensabe has quit [Ping timeout: 252 seconds]
zenguy_pc has quit [Read error: No route to host]
nisstyre has joined #ruby
langlan__ has quit [Ping timeout: 264 seconds]
qwertme has joined #ruby
bMalum has joined #ruby
renderfu_ has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
rippa has joined #ruby
uber has joined #ruby
x44x45x41x4E has joined #ruby
workmad3 has quit [Ping timeout: 255 seconds]
renderfu_ has quit [Ping timeout: 264 seconds]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has joined #ruby
Zamerick_ has joined #ruby
kraljev11 has quit [Remote host closed the connection]
Papierkorb has quit [Remote host closed the connection]
kraljev11 has joined #ruby
Papierkorb has joined #ruby
RegulationD has joined #ruby
Zamerick has quit [Ping timeout: 265 seconds]
fantazo has joined #ruby
drewo has joined #ruby
amclain has joined #ruby
datanoise has quit [Ping timeout: 252 seconds]
shazaum_ has quit [Quit: This computer has gone to sleep]
bMalum has quit [Quit: bMalum]
RegulationD has quit [Ping timeout: 264 seconds]
zenguy_pc has joined #ruby
fantazo has quit [Ping timeout: 265 seconds]
mannyt has joined #ruby
Al3ks has quit [Remote host closed the connection]
rubie has joined #ruby
yayfoxes has quit [Ping timeout: 256 seconds]
senayar has joined #ruby
freerobby has joined #ruby
qwertme has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mdih has quit [Ping timeout: 264 seconds]
blue_deref has quit [Quit: bbn]
fgo has joined #ruby
otherj has joined #ruby
x44x45x41x4E has quit [Ping timeout: 255 seconds]
rubie has quit [Ping timeout: 265 seconds]
c355E3B has quit [Quit: Connection closed for inactivity]
<chridal>
{ "GCM":"{\"data\":{\"message\":\"Test\"}}" } <- I need to achieve this json structure in Ruby. Any thoughts any one?
<chridal>
Can't seem to be able to get it to work...
blackmesa has joined #ruby
senayar has quit [Ping timeout: 244 seconds]
duderonomy has joined #ruby
[H]unt3r has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
fantazo has joined #ruby
Guest74236 has quit [Remote host closed the connection]
Pupeno has joined #ruby
Guest98267 has joined #ruby
jtdoncas has joined #ruby
otherj has quit [Quit: .]
starfox_sf has joined #ruby
newish has joined #ruby
blue_deref has joined #ruby
<newish>
www.VALBOT.COM provides domain valuations. Reporting globally on Site Traffic, Pagerank, Malware, WHOIS data, SEO & even Social Media presence.
<havenwood>
!mute newish
newish has left #ruby [#ruby]
aryaching has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
datanoise has joined #ruby
<havenwood>
chridal: Have you tried parsing that String with Ruby's JSON module?
lordkryss has quit [Quit: Connection closed for inactivity]
<havenwood>
chridal: That's what I was trying to point out. :)
* jhass
has a deja-vu
<IceDragon>
chridal: ^
<IceDragon>
Ignore the first set of quotes and I think you have what you want
<IceDragon>
Hi jhass, havenwood, what's the latest and greatest?
<jhass>
#ruby-offtopic is a thing now
Soda has quit [Remote host closed the connection]
<IceDragon>
Should I terrified?
wildroman2 has quit [Remote host closed the connection]
<IceDragon>
*be
<jhass>
that we're not sure of yet
IrishGringo has joined #ruby
<IceDragon>
Then I belive I should be terrified
<chridal>
It seems that the issue was not that the code from before wasn't working, but that I actually had to kill rake running resque for the files to reload...
<chridal>
hence deja-vu
drewo has quit [Quit: WeeChat 1.2]
sinkensabe has quit [Ping timeout: 255 seconds]
fabrice31 has joined #ruby
<IceDragon>
zombies
<Spaceghostc2c>
zombros
fabrice31 has quit [Ping timeout: 252 seconds]
iamninja has joined #ruby
sarkyniin has quit [Ping timeout: 264 seconds]
<shevy>
zombreros
EllisTAA has joined #ruby
* IceDragon
noms shevy
Soda has joined #ruby
zenguy_pc has quit [Read error: No route to host]
<EllisTAA>
does anyone know why even though i put my code into threads they dont run faster than if they weren’t in threads?
<Spaceghostc2c>
EllisTAA: I think those things are all VM.
<Spaceghostc2c>
Ruby has a GVL.
flughafen_ has joined #ruby
<IceDragon>
EllisTAA: You're joining the threads with the main one, it boils down to the same.
symm- has joined #ruby
<EllisTAA>
icedragon: what do you mean the main one?
<jhass>
EllisTAA: what does join do?
<IceDragon>
Thread#join merges the target thread into the current one and waits for its execution (not the proper defintion, but its what it does)
<IceDragon>
@EllisTAA: ^
<EllisTAA>
hmmm ok
bgmarx has joined #ruby
aryaching has joined #ruby
nahtnam has joined #ruby
EllisTAA has quit [Quit: EllisTAA]
<IceDragon>
EllisTAA: I commented on your gist, and then I realized you left... FML
stamina has joined #ruby
sarkyniin has joined #ruby
<sphex>
hey. I'm trying to figure out the right way to do something... I need to code something that works as a small state machine. I was trying to set up a transition table as a class variable, but I'm not sure what to use as function pointers. I see there are a lot of options. lambda/Proc should work just fine, but I dunno if that's the best way.
sargas has joined #ruby
sargas has quit [Max SendQ exceeded]
flughafen_ has quit [Ping timeout: 252 seconds]
sargas has joined #ruby
sargas has quit [Max SendQ exceeded]
sargas has joined #ruby
rafaelsales has joined #ruby
bgmarx has quit [Remote host closed the connection]
MatthewsFace has joined #ruby
<IceDragon>
sphex: Depends on your needs, I use objects as my function pointers (they all respond to something like #process or standard #call), lambda/procs work fine for small parts of your code, but if it needs alot of state and helper methods, its best to wrap it into something Callable (an Object that responds to #call and #to_proc)
<sphex>
IceDragon: ok. yeah I don't need a lot of states at all. but I'm confused about instance/class/bound/unbound methods, so I dunno if I could have been using methods in my table somehow.
leitz has quit [Quit: Nappy time]
zenguy_pc has joined #ruby
rafaelsales has quit [Ping timeout: 265 seconds]
rbennacer has quit [Remote host closed the connection]
zacts has joined #ruby
<sphex>
IceDragon: the thing is I'd like my state functions to be able to access the class' instance variables
dionysus69 has joined #ruby
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<IceDragon>
sphex: Can you gist an example?
RegulationD has joined #ruby
<shevy>
IceDragon I want a RubyOS
codecop has quit [Remote host closed the connection]
senayar has quit [Ping timeout: 252 seconds]
<phat4life>
shevy: lol
<IceDragon>
shevy: Pfft, then make it ;D
<shevy>
IceDragon don't think this could realistically happen by one person alone
<IceDragon>
I wish I could exterminate python, but its just everywhere ;-;
<phat4life>
shevy: not true
<shevy>
phat4life yeah because so many big projects today are made by one person :)
<phat4life>
shevy: look at templeos
<shevy>
awesome graphics
<Spaceghostc2c>
IceDragon: Just desecrate the Steve Irwin's grave and use necromancy to set him loose on a python-killing tirade.
<Spaceghostc2c>
If anyone could do it, it would be Steve Irwin.
<sphex>
IceDragon: well.. not even yet. :/ I guess I should at least try to get it working with lambdas first and see if they can be made to capture the instance.
helpa has quit [Remote host closed the connection]
diegok has quit [Read error: Connection reset by peer]
ss_much has quit [Ping timeout: 246 seconds]
ryotarai has quit [Ping timeout: 246 seconds]
Spleeze has quit [Ping timeout: 246 seconds]
ryotarai_ has joined #ruby
Some-body_ has joined #ruby
ryotarai_ is now known as ryotarai
Guest34108 has quit [Ping timeout: 246 seconds]
DarthGandalf has quit [Ping timeout: 246 seconds]
sindork has quit [Ping timeout: 246 seconds]
DLSteve has joined #ruby
peter_paule has quit [Ping timeout: 246 seconds]
akkad has quit [Ping timeout: 246 seconds]
gattuso has quit [Ping timeout: 246 seconds]
Some-body_ is now known as DarthGandalf
gf3 has quit [Ping timeout: 246 seconds]
peter_paule has joined #ruby
ss_much has joined #ruby
helpa-bot has quit [Remote host closed the connection]
sargas has quit [Quit: Leaving]
GnuYawk has quit [Ping timeout: 246 seconds]
connor_goodwolf has quit [Ping timeout: 246 seconds]
helpa has joined #ruby
jidar_ is now known as jidar
Guest60848 is now known as bourbon
soulcake has quit [*.net *.split]
atom3 has quit [*.net *.split]
rj-code has quit [*.net *.split]
Caius has quit [*.net *.split]
j416 has quit [Ping timeout: 246 seconds]
shortdudey123 has quit [Ping timeout: 246 seconds]
C0deMaver1ck has joined #ruby
<toretore>
acovrig: what sql library are you using? you might be better off with something like sequel
sindork has joined #ruby
connor_goodwolf has joined #ruby
j416_ has joined #ruby
<toretore>
that can do the escaping and query generation for you
gf3 has joined #ruby
j416_ is now known as j416
Spleeze has joined #ruby
<acovrig>
toretore: mysql2, but it’s just what I found first, would sequel be better (MySQL backend)
<weaksauce>
acovrig just do multi line strings. no need for the += like that. and I second the suggestion from toretore that you probably shouldn't be doing it manually.
Asher has quit [Ping timeout: 252 seconds]
shortdudey123 has joined #ruby
<toretore>
acovrig: i haven't used it myself, but it sounds like it would be a better choice
ltd has quit [Ping timeout: 246 seconds]
fabrice31 has joined #ruby
michael_mbp has quit [Excess Flood]
datanoise has joined #ruby
mcclurmc has joined #ruby
<acovrig>
weaksauce: yea, that’s why I asked, I thougth there was a better way of doing it, but didn’t know what.
hplar has quit [Ping timeout: 246 seconds]
akkad has joined #ruby
rcs has quit [Ping timeout: 246 seconds]
gattuso has joined #ruby
Asher has joined #ruby
Cybergeek has joined #ruby
atom3 has joined #ruby
Caius has joined #ruby
soulcake has joined #ruby
rj-code has joined #ruby
sirecote has joined #ruby
michael_mbp has joined #ruby
fredsir has joined #ruby
aryaching has quit []
rcs has joined #ruby
bjornar has joined #ruby
mcclurmc has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 276 seconds]
blackmes1 has quit [Ping timeout: 252 seconds]
chishiki has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Mon_Ouie has joined #ruby
decoponio has quit [Read error: Connection reset by peer]
al2o3-cr is now known as gr33n7007h
decoponio has joined #ruby
blackmes1 has joined #ruby
musl has joined #ruby
Musashi007 has quit [Quit: Musashi007]
jfarmer has joined #ruby
flughafen has joined #ruby
peter_paule has quit [Ping timeout: 264 seconds]
mozzarella has joined #ruby
jenrzzz has joined #ruby
j4cknewt has quit [Remote host closed the connection]
IrishGringo_ has quit [Ping timeout: 265 seconds]
mjmac has joined #ruby
stamina has quit [Remote host closed the connection]
MissionCritical has joined #ruby
brb3_ has joined #ruby
djbender has joined #ruby
erts has quit [Ping timeout: 250 seconds]
nickjj has joined #ruby
datanoise has quit [Ping timeout: 276 seconds]
fedexo_ has quit [Ping timeout: 265 seconds]
greencode has joined #ruby
Guest14837 has quit [Changing host]
Guest14837 has joined #ruby
aridere has quit [Ping timeout: 272 seconds]
Guest14837 is now known as Affix
GnuYawk has joined #ruby
RegulationD has joined #ruby
brb3_ has quit []
brb3_ has joined #ruby
NeverDie has joined #ruby
brb3_ has quit [Client Quit]
jack_rabbit has joined #ruby
mikecmpbll has quit [Quit: ciao.]
RegulationD has quit [Ping timeout: 246 seconds]
j4cknewt has joined #ruby
brb3_ has joined #ruby
davedev2_ has joined #ruby
theery has joined #ruby
bosma has quit [Quit: Leaving]
brb3_ has quit [Client Quit]
sinkensabe has quit [Remote host closed the connection]
davedev24_ has quit [Ping timeout: 246 seconds]
sandstrom has joined #ruby
kahuna_ has joined #ruby
charliesome has joined #ruby
kahuna_ has quit [Client Quit]
t_ has joined #ruby
kahuna_ has joined #ruby
sinkensabe has joined #ruby
greencode has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 256 seconds]
m8 has quit [Ping timeout: 246 seconds]
nikky3 has left #ruby ["WeeChat 1.1.1"]
Xeago has joined #ruby
DEA7TH_ has quit [Ping timeout: 245 seconds]
aridere has joined #ruby
jeregrine has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sinkensabe has quit [Remote host closed the connection]
DLSteve has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Limix has joined #ruby
segfalt has quit [Quit: segfalt]
pizzaops has joined #ruby
ledestin has joined #ruby
GPrime has joined #ruby
Xeago has quit [Ping timeout: 252 seconds]
tagrudev has joined #ruby
chris2 has quit [Ping timeout: 256 seconds]
mjc_ has joined #ruby
PierreRambaud has joined #ruby
brb3_ has joined #ruby
brb3_ has quit [Client Quit]
[H]unt3r has joined #ruby
Casty has joined #ruby
ScottehM has joined #ruby
sandstrom has quit [Quit: My computer has gone to sleep.]
tagrudev has quit [Remote host closed the connection]
blenny_ is now known as blenny
otisZart has joined #ruby
JoshL has joined #ruby
bigmac_ has joined #ruby
joast has joined #ruby
pcfreak30 has joined #ruby
Casty has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mcclurmc has joined #ruby
symm- has quit [Ping timeout: 276 seconds]
mcclurmc has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
musgravejw has joined #ruby
Alayde_ has quit [Ping timeout: 264 seconds]
axilla has quit [Ping timeout: 250 seconds]
rbennacer has joined #ruby
dominic has joined #ruby
sinkensabe has joined #ruby
spider-mario has quit [Remote host closed the connection]
postmodern has joined #ruby
kenichi_ is now known as kenichi
gr33n7007h is now known as al2o3-cr
workmad3 has quit [Ping timeout: 252 seconds]
shevy has joined #ruby
rbennacer has quit [Ping timeout: 264 seconds]
sross_work|2 has joined #ruby
awer_ has quit [Ping timeout: 252 seconds]
sross07 has quit [Read error: Connection reset by peer]
HotCoder has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
xelkarin has joined #ruby
adamski2600 has joined #ruby
lurk620 has joined #ruby
axilla has joined #ruby
ndrei_ has quit [Ping timeout: 276 seconds]
GitGud has quit [Ping timeout: 252 seconds]
<lurk620>
i have a question about ruby syntax
<acovrig>
how would I make this in sequel? SELECT RefURI FROM table_name WHERE (URI is null OR URI='' OR caption IS NULL) AND (tags IS NULL OR tags != 'del');