simplyianm has quit [Read error: Connection reset by peer]
<al2o3-cr>
name a vegetable with all the vowels? # answers in #ruby-offtopic
simplyianm has joined #ruby
<Senjai>
al2o3-cr: I will preemptively quit
serivich has joined #ruby
dgutierrez1287 has quit [Remote host closed the connection]
caseypatrickdris has quit [Ping timeout: 244 seconds]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr>
Senjai: spoil sport :)
DLSteve has quit [Quit: Leaving]
RegulationD has quit [Ping timeout: 264 seconds]
roolo__ has quit [Remote host closed the connection]
<Ox0dea>
Is orange aubergine a vegetable?
caseypat_ has quit [Ping timeout: 276 seconds]
fabrice31 has quit [Ping timeout: 252 seconds]
axsuul has joined #ruby
ixti has quit [Ping timeout: 255 seconds]
<al2o3-cr>
Ox0dea: color i think, hmm...
<Ox0dea>
Fine, Jerusalem artichoke.
ndrei has quit [Ping timeout: 252 seconds]
Lucky__ has quit [Read error: Connection reset by peer]
jhooker has joined #ruby
<al2o3-cr>
ah, well :)
<al2o3-cr>
still no one answered the question :)
msgodf has joined #ruby
datanoise has quit [Ping timeout: 264 seconds]
boomls has joined #ruby
benegget_ has joined #ruby
pengin has joined #ruby
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
zipace has joined #ruby
krisquigley has joined #ruby
musgravejw has quit [Ping timeout: 240 seconds]
jhooker has quit [Ping timeout: 250 seconds]
dfockler has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
dgutierrez1287 has joined #ruby
workmad3 has joined #ruby
A205B064 has quit [Ping timeout: 264 seconds]
bkxd has quit [Ping timeout: 245 seconds]
BanzaiJoe has quit [Ping timeout: 252 seconds]
beneggett has quit [Ping timeout: 264 seconds]
Rollabunna has joined #ruby
davedev2_ has quit [Ping timeout: 245 seconds]
krisquigley has quit [Ping timeout: 264 seconds]
arturmartins has quit [Quit: Leaving...]
dgutierrez1287 has quit [Remote host closed the connection]
benegget_ has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
workmad3 has quit [Ping timeout: 276 seconds]
dgutierrez1287 has joined #ruby
sharpmachine has quit [Remote host closed the connection]
pragmatism has joined #ruby
<Ox0dea>
> implying the Jerusalem artichoke isn't a vegetable
<Ox0dea>
Please keep your anti-Semitism out of #ruby.
ludico8 has quit [Ping timeout: 246 seconds]
allcentury has quit [Ping timeout: 256 seconds]
hydrozen has joined #ruby
beneggett has joined #ruby
Rollabunna has quit [Ping timeout: 255 seconds]
scripore has joined #ruby
keslerm has joined #ruby
Channel6 has joined #ruby
starfox_sf has joined #ruby
MAKOHYPE is now known as bosnia
MatthewsFace has joined #ruby
yaw has joined #ruby
sevenseacat has joined #ruby
mrmargolis has joined #ruby
<Aeyrix>
Ox0dea: We lost. :<
<Aeyrix>
Smith finally worked out how to shoot at the hoop but overall ehh / 10.
towski_ has quit [Ping timeout: 265 seconds]
oo_ has joined #ruby
mrmargolis has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
mleung has quit [Quit: mleung]
mrmargolis has quit [Read error: Connection reset by peer]
mrmargolis has joined #ruby
Marsupermammal has joined #ruby
Marsupermammal has quit [Client Quit]
towski_ has joined #ruby
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
drewo has quit [Ping timeout: 276 seconds]
robustus has quit [Ping timeout: 255 seconds]
cirn0 has quit [Remote host closed the connection]
bgmarx_ has quit [Remote host closed the connection]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hydrozen has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
tchebb has quit [Ping timeout: 265 seconds]
hotpancakes has joined #ruby
jenrzzz_ has joined #ruby
robustus|Off has joined #ruby
robustus|Off is now known as robustus
tchebb has joined #ruby
bronson has joined #ruby
<Ox0dea>
Aeyrix: I would have been entertained had he started 2-for-2 from three only to get ejected a few minutes later.
<shevy>
hmm
<shevy>
what if we could load something based on the class name itself, rather than the file position
<Ox0dea>
shevy: Then we could have imports!
<shevy>
so rather than: require 'foobar/bla.rb', we could do: require Foobar::Bla
<shevy>
where Bla could be anywhere
<Ox0dea>
tenderlove recently did a talk wherein he discussed the many-headed demon of Ruby's file loading mechanics.
<shevy>
hehe
<shevy>
well, it's simple! which also means it is dumb
cirn0_ has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<shevy>
I really hate having to search for a file...
spyderman4g63 has quit [Remote host closed the connection]
<shevy>
right now, in one script, I need the class that handles aliases, which is just a hash lookup; I don't want to search for the name of the .rb file...
<al2o3-cr>
Ox0dea: ?
jpfuentes2 has joined #ruby
<Ox0dea>
al2o3-cr: A bad joke worth forgetting.
swgillespie has joined #ruby
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<al2o3-cr>
Ox0dea: :P
<Ox0dea>
shevy: Ctrl-P? ctags? Such problems are essentially solved for decent editors.
<Ox0dea>
I mean, you've got to have a rough guess at what you're looking for, but your editor really ought to be able to help you after that.
Musashi007 has quit [Quit: Musashi007]
<Ox0dea>
Nevertheless, I agree that more granular importing would be handy.
cirn0_ has quit [Remote host closed the connection]
justintv90 has joined #ruby
Miphix has quit [Quit: Leaving]
<shevy>
I can find what I need yes
<shevy>
:-)
<Ox0dea>
Ah, sorry, it's just your wording made it seem like perhaps the search was giving you more trouble than should be necessary.
<al2o3-cr>
shevy: why would you want to do Foo::Bar?
<shevy>
al2o3-cr because I'd never have to find the name of the .rb file in question
EasyCo has joined #ruby
<al2o3-cr>
shevy: that is ludicrous
<shevy>
:(
keslerm has joined #ruby
<shevy>
Ox0dea well yeah, I am extremely lazy. The only reason I use ruby is so I can be even lazier lateron
apoplexy has joined #ruby
dopie has joined #ruby
<EasyCo>
Hey guys, is there a built-in method that will loop through an array and allow you to pass it a block with a conditional statement? If it's false, it'll stop and return false but if it iterates through all the elements successfully it'll return true.
<havenwood>
shevy: Aye, it would be simpler to have the class/module also be the gem name and require statement rather than having all three be different: http://guides.rubygems.org/name-your-gem/
Soda has quit [Remote host closed the connection]
Ox0dea has quit [Quit: WeeChat 1.3-dev]
GPrime has joined #ruby
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Ox0dea has joined #ruby
<shevy>
I sort of defaulted to use _
<nofxx>
You can use autoload for that, no need to make it horrible like python
<shevy>
not sure if I like rdoc-data -> 'rdoc/data'
<al2o3-cr>
+1 nofxx
<nofxx>
also , classify() sort of thing... activesupport I presume
hotpancakes has quit [Remote host closed the connection]
<Ox0dea>
>> [1, 2, 3].all { |x| x.even? }
<ruboto>
Ox0dea # => undefined method `all' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/382089)
bayed has quit [Quit: Connection closed for inactivity]
Renich_ has quit [Client Quit]
<pontiki>
we need a some? and maybe? too
<drbrain>
some? is any?
simplyianm has quit [Remote host closed the connection]
cirn0 has quit [Remote host closed the connection]
<centrx>
>> never!
<ruboto>
centrx # => undefined method `never!' for main:Object (NoMethodError) ...check link for more (https://eval.in/382094)
bruno-_ has quit [Ping timeout: 276 seconds]
<al2o3-cr>
?cheek
<ruboto>
I don't know anything about cheek
Renich_ has joined #ruby
<Ox0dea>
pontiki: What would you want #maybe? to return?
oo_ has quit [Remote host closed the connection]
<pontiki>
Ox0dea: the only answer possible: "it depends"
Pupeno has quit [Ping timeout: 276 seconds]
oo_ has joined #ruby
kekumu has quit [Quit: kekumu]
<Ox0dea>
I assumed you were going to mention monads.
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
<pontiki>
i'd have to be a lot smarter
boomls has quit [Ping timeout: 276 seconds]
<Ox0dea>
Do you enjoy Mexican cuisine?
<pontiki>
maybe?
<Ox0dea>
<3
arescorpio has joined #ruby
<Ox0dea>
Monads are basically burritos is why I asked, in case the joke was missed.
dopie has quit [Quit: This computer has gone to sleep]
<shevy>
lol
mdz_ has quit [Remote host closed the connection]
cirn0 has joined #ruby
<shevy>
Maybe is easy to remember
<shevy>
the Schroedinger cat will live. Maybe.
<Ox0dea>
Sometimes a cat is Just a cat.
<al2o3-cr>
Ox0dea: might be a pussy no?
<Ox0dea>
A bad pussy?
<al2o3-cr>
any pussy?
pragmatism has joined #ruby
<havenwood>
?offtopic
<ruboto>
I don't know anything about offtopic
<havenwood>
ruboto is always ontopic
Musashi007 has joined #ruby
jjasonclark has joined #ruby
jjasonclark has quit [Client Quit]
<Ox0dea>
How do I reorder at_exit handlers?
sharpmachine has joined #ruby
drewo has joined #ruby
wallerdev has quit [Ping timeout: 272 seconds]
dopie has joined #ruby
<al2o3-cr>
Ox0dea: how'd you mean?
Akagi201 has joined #ruby
<Ox0dea>
You can use END {} and at_exit {} to register blocks of code to execute right before the program terminates, but they're pushed onto a stack and executed in reverse order.
bricker has quit [Ping timeout: 256 seconds]
Musashi007 has quit [Client Quit]
drewo has quit [Client Quit]
hydrozen has joined #ruby
hydrozen has quit [Remote host closed the connection]
_cake has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr>
Ox0dea: why woudn't they be pushed on the stack in reverse?
mdz_ has joined #ruby
pengin has quit [Remote host closed the connection]
<al2o3-cr>
thats how memory works
CloCkWeRX has joined #ruby
<Ox0dea>
I'm not saying it doesn't make sense, but I'd nevertheless like to muck about with the order dynamically if it's possible.
Renich_ has quit [Ping timeout: 276 seconds]
axsuul has quit [Ping timeout: 256 seconds]
Renich has joined #ruby
<al2o3-cr>
Ox0dea: not possible afaik
boomls has joined #ruby
<Ox0dea>
I could redefine at_exit and manage the process manually, but that feels inelegant.
<drbrain>
you can at_exit in an at_exit
djbkd has quit [Quit: My people need me...]
<drbrain>
so you can always push new at_exits to run later
<al2o3-cr>
Ox0dea: why would you want to do that? just messing?
_cake has quit [Quit: leaving :c]
<Ox0dea>
Mostly just messing, but it would actually be a solution to a problem.
sharpmachine has quit [Remote host closed the connection]
axsuul has joined #ruby
<Ox0dea>
drbrain: I wouldn't necessarily be in control of the creation of the exit handlers; that is, I'd be called after they already exist.
<drbrain>
oh, right
<drbrain>
you could define your own exit callback method, then manage the order from your own at_exit
nb_bez___ has joined #ruby
serivich has quit [Quit: Leaving]
jacaho0 has joined #ruby
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Ox0dea>
Yeah, that seems like the concession I'll have to make.
<Aeyrix>
<shevy> what if we could load something based on the class name itself, rather than the file position
<al2o3-cr>
probably the only concession
<Aeyrix>
I've been whining about this for like two years.
hahuang65 has quit [Ping timeout: 276 seconds]
boomls has quit [Remote host closed the connection]
jcoe has joined #ruby
cirn0 has quit [Remote host closed the connection]
jcaho has quit [Ping timeout: 265 seconds]
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
<pontiki>
oh, like Rails autoloader?
simplyianm has joined #ruby
cirn0 has joined #ruby
<Senjai>
^
<al2o3-cr>
similar
<Senjai>
ActiveSupport::AutoLoad > Ruby
centrx has quit [Quit: Shutting down, Please wait...]
centrx has joined #ruby
<Senjai>
al2o3-cr: Are you doing an insane amount of callbacks at_exit?
Agoldfish has quit [Quit: G'Bye]
<Senjai>
OH oh way. Do you start your program and then let it terminate, running your entire program in an at_exit block :O xD
<al2o3-cr>
Senjai: ask your sensai :)
mdz_ has quit [Remote host closed the connection]
<Senjai>
I have a sensai?
<al2o3-cr>
do you?
<Senjai>
I do not
<al2o3-cr>
me neither
<Senjai>
< taking applications
hotpancakes has joined #ruby
amclain has joined #ruby
<Senjai>
I hate the code I'm writing right now
<al2o3-cr>
hotpancakes: welcome back
<al2o3-cr>
Senjai: then make it better :)
<Senjai>
Business requirements are silly
<baweaver>
aha! finally caught you online pontiki
<Senjai>
because of some data science team
shock_one has joined #ruby
* pontiki
wriggles away
<baweaver>
how'd it go?
sung_ has quit [Remote host closed the connection]
<pontiki>
well received. they asked good questions, and even had good answers for the questions i posed at them
Yiota has joined #ruby
<pontiki>
so i'm happy, and ever so grateful
* al2o3-cr
pontiki tries to hide from baweaver
<baweaver>
Any time, I just didn't have a chance to respond at all
<pontiki>
oh, no worries :)
<baweaver>
hackathons and whatnot keep me a bit busy.
<Senjai>
It is not a thing that needs to exist :(. Just because values have to be stored in the database for SQL peoples.
datanoise has quit [Ping timeout: 244 seconds]
<al2o3-cr>
Senjai: why you hate that?
dgutierrez1287 has quit [Remote host closed the connection]
<Senjai>
al2o3-cr: I hate writing code that shouldn't need to be written
<Senjai>
Especially when its SO important.
<Senjai>
Eh, well not that it shouldnt be written
<Senjai>
but it has to be given the current state of the application
<al2o3-cr>
Senjai: just gooin to say
<al2o3-cr>
*going
pragmatism has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jackjackdripper1 has quit [Quit: Leaving.]
shock_one has quit [Ping timeout: 272 seconds]
glcx has quit [Ping timeout: 256 seconds]
<baweaver>
sanity check time!
<baweaver>
I use AWS a lot
<al2o3-cr>
Senjai: so what do you (like/dislike) in that code?
krz has joined #ruby
<baweaver>
and the responses from aws have grouped items that are unsorted
axsuul has quit [Ping timeout: 256 seconds]
<baweaver>
meaning syncing them to rails is ever a pain
<baweaver>
should I try and port that to the aws-sdk to sort collections?
<Senjai>
al2o3-cr: It's rather complex. It does a lot of things. It has to use update_columns on objects outside of its domain because it would cause an infinite loop otherwise
<al2o3-cr>
Senjai: besides that
StephenOTT has joined #ruby
glcx has joined #ruby
<Senjai>
al2o3-cr: It has to know variants belong to a group, because the state has to be calculated relative to the group for database persistance, where it could just be done in memory on the fly instead of having to worry how values are set.
<baweaver>
or should I see about getting rails to have something to compare collections as having the same objects?
kekumu has joined #ruby
eggoez has quit [Ping timeout: 256 seconds]
<Senjai>
Before the requirement of persistance, it was super simple. Of the visible variants just get the first with the highest priority.
<al2o3-cr>
one thing i'm a fan of is individually calling private methods? anyone else?
<Senjai>
al2o3-cr: individually?
<al2o3-cr>
private :this, private :that
<Senjai>
Oh god no
mike___1234 has quit [Ping timeout: 265 seconds]
<al2o3-cr>
just me then?
<Senjai>
I mean thats a valid way of doing things
<Senjai>
I just like to write as less code as possible while still keeping it readable
* baweaver
smells a java programmer
<Senjai>
baweaver: <3
<pontiki>
i will admit i've never seen anyone do it that way, but that doesn't mean much
<Senjai>
And I dont like repeating myself
NeverDie has joined #ruby
<pontiki>
what?
<baweaver>
everything below the first private declaration is private
<al2o3-cr>
no, i just think is so much readable
<Senjai>
I would rather have private do .. end before I would use individual private delcarations
<pontiki>
al2o3-cr: if you are your most likely future reader, then it's perfectly okay
StephenOTT has quit [Remote host closed the connection]
<al2o3-cr>
each and every method defined at the bottom
<baweaver>
If you have enough methods to justify that you have a different problem
bkxd has joined #ruby
<baweaver>
and it's not readability
<pontiki>
i think it creates a higher maintenance cost
StephenOTT has joined #ruby
<havenwood>
private def sekret
<Senjai>
I dont think it would add to maintenance
<pontiki>
you have to name it twice
<baweaver>
Every extra click to me is extra maintenance
<al2o3-cr>
no, i like private :method
<Senjai>
Oh
<Senjai>
that
<Senjai>
that is for sure extra maintenance
<Senjai>
:P
<baweaver>
kinda nonsensical
<Senjai>
And I have to scroll up and down to see what is and isnt marked private
<al2o3-cr>
no, not at all
<Senjai>
you'd also have private and non private methods mixed up
<Senjai>
instead of chunked together
<pontiki>
and you have to remember to mark it explicitly private, until you want it protected or public, and *then* you have to remember to mark it so
chipotle has quit [Quit: cheerio]
<havenwood>
>> private def whee; end; send :whee
<baweaver>
Again, if you have to scroll, you're doing something else wrong
<krowv>
Hi channel. I'm new to both ruby and gtk3. Any help pointing me in the right direction would help. I'm trying to write a simple application. From the main window when a button is clicked I'd like another window opened with more buttons. Here is the code I have so far: https://gist.github.com/anonymous/58bd927178eb59699da8
<Ox0dea>
al2o3-cr: I can't conceive of a reason to call a visibility modifier with more than one argument, but someone someday will, and I'd like for them to get the return value they expected.
<Ox0dea>
MINASWAN and all that. :)
Yiota has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<centrx>
Ox0dea, docs say it returns 'self'?
Yiota has joined #ruby
<Ox0dea>
centrx: At present, it returns the receiver, which may be an implicit self or an expicit module.
<shevy>
jtdoncas pretty peculiar code :)
gluten_hell_ has quit [Ping timeout: 256 seconds]
bootstrappm has quit [Remote host closed the connection]
<jtdoncas>
shevy: is it bad?
<Ox0dea>
jtdoncas: A more concrete example would likely improve your chances of receiving actionable advice.
<shevy>
no real idea, it looks very unusual
platzhirsch has quit [Ping timeout: 246 seconds]
<jtdoncas>
Ox0dea: I just to know if there was another than doing @@name = self
<jtdoncas>
which seems hack-ey
<shevy>
I am sure you have a reason why you need to use a @@foo variable
<jtdoncas>
shevy: So I don't have to hardcode the module name in the instance method
casadei has joined #ruby
datanoise has joined #ruby
zenguy_pc has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
<al2o3-cr>
Ox0dea: you is going to deep :)
<Ox0dea>
Hm?
coderhs has quit [Ping timeout: 252 seconds]
<al2o3-cr>
Ox0dea: deep?
centrx has quit [Quit: Shutting down, Please wait...]
<Ox0dea>
Method definition returns the method name as a symbol, which is nice for passing along to some decorator.
<shevy>
jtdoncas can't you find out the name of the module anyway?
<shevy>
via self.class.name and querying .ancestors
<Ox0dea>
al2o3-cr: It seems to make sense enough that we should be able to do that with explicitly private methods as well.
<Ox0dea>
decorate private def foo ... end
<shevy>
ack
Spami has quit [Quit: This computer has gone to sleep]
<shevy>
java!
fedexo has joined #ruby
<Ox0dea>
But what to return if somebody calls private(:foo, :bar)?
MatthewsFace has quit [Remote host closed the connection]
<shevy>
you can use .send anyway right?
<al2o3-cr>
shevy: thats not the point though
<shevy>
so what is the point
<Ox0dea>
Clarity of intent.
<Ox0dea>
Write code for humans.
<shevy>
I have that already
<Ox0dea>
jtdoncas: You've not demonstrated why Client should respond to #my_objects.
bosma is now known as BATTLEFRONTHYPE
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jtdoncas>
Ox0dea: I need to create the methods using item.name which I get from objects
MrWharfsnort has left #ruby [#ruby]
Scroff has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<shevy>
how many downloads on rubygems come from bots?
zenguy_pc has quit [Read error: Connection reset by peer]
<jtdoncas>
shevy: what were you saying about using self.class instead of @@foo?
<shevy>
nono, not instead of @@fo
<Ox0dea>
shevy: Every downloader of RubyGems is a bot except you.
<shevy>
I meant when you wrote that you have to hardcode the module name
<shevy>
I think the biggest problem I have is that I don't really understand what you are doing in your code
drewo has joined #ruby
<shevy>
:)
beneggett has joined #ruby
<jtdoncas>
shevy: I have a DSL module that defines DSL functions and then I want to use that DSL in the implementor and then pass in the objects created to the client
<krowv>
I'm getting a warning now when I click information Gtk-WARNING **:Attempting to add a widget with type GtkGrid to a GtkWindow, but as a GtkBin subclass a GtkWindow can only contain one widget at a time; it already contains a widget of type GtkGrid
<Ox0dea>
jtdoncas: Way too much "what", not enough "why".
<krowv>
Am I on the right path ya think?
BATTLEFRONTHYPE is now known as bosma
<shevy>
krowv yeah, that is why I subclass from Gtk::HBox or Gtk::VBox instead normally
<jtdoncas>
Ox0dea: Well I'm not sure what you want me to tell you. The end goal is to make an API wrapper for a service
skysploit has quit []
<shevy>
package everything into one widget, then bind that widget into a Window parent
<jtdoncas>
Ox0dea: the DSL is to make the client methods that map to endpoints
<Ox0dea>
jtdoncas: Do you know all of the endpoints ahead of time?
<jtdoncas>
Ox0dea: yes
<Ox0dea>
Then why not just `endpoints.each { |ep| define_method(ep) { ... } }`?
x1337807x has joined #ruby
Scroff has quit [Ping timeout: 276 seconds]
<jtdoncas>
Ox0dea: So I can support different methods, required parameters, namespaces
dylanhart has quit [Remote host closed the connection]
<Ox0dea>
Why do you need distinct definitions of these methods in each class that extends from your DSL module?
schy has quit [Quit: WeeChat 1.2]
zenguy_pc has joined #ruby
zenguy_pc has quit [Read error: No route to host]
rbennacer has quit [Remote host closed the connection]
JoshL has quit []
zenguy_pc has joined #ruby
<krowv>
shevy, trying to parse what that means... Basically is it saying I can only have one one GtkGrid per class?
<jtdoncas>
Ox0dea: I don't, I just need them to be created in my DSLImplementation -- so I guess I should created the methods in my DSL instead of client, eh?
StephenOTT has quit [Quit: StephenOTT]
<Ox0dea>
jtdoncas: Well, in what way is `Client.extend APIMethods` not sufficient?
<ajaiswal>
i'm looking for something "passed totalcount/passedtest"
<Ox0dea>
ajaiswal: Holy shit.
zenguy_pc has quit [Read error: No route to host]
<shevy>
krowv you have Gtk::Window. This wants to have only one sub-widget. The solution is, package everything into one widget, then add that to Gtk::Window.new.add(your_widget)
<shevy>
that is why I said I subclass from Gtk::HBox normally, or Gtk::Frame
<jtdoncas>
Ox0dea: it is. I just need to create the methods (I guess instead of accumulating an array I just make the methods directly! )
<ajaiswal>
Ox0dea: lol
<Ox0dea>
jtdoncas: Well, dynamic method definition is fine as long as it's called for.
<Ox0dea>
ajaiswal: For starters, why are you using "0" and "1"?
aaeron has quit [Quit: Leaving.]
<Ox0dea>
If you're wanting to do arithmetic, those should be integers.
GPrime has joined #ruby
<shevy>
krowv GtkRunner I wrote so I don't have to deal with Gtk::Window on my own anymore (don't mind the name... I should rename it to Gtk::Runner ... but it is years since I last dealt with ruby-gnome much at all really)
<shevy>
krowv so in your case, just subclass from something else like Gtk::Frame for now; and then add this into a Gtk::Window widget, and the above error message will go away
<ajaiswal>
hmm $successtest is an interger... hmm
<jtdoncas>
Ox0dea: thanks for your help, my code is a lot clearer now! I don't know why I was making that array :D
gr33n7007h has joined #ruby
djbkd has quit [Quit: My people need me...]
frem has quit [Quit: Connection closed for inactivity]
chinmay_dd has joined #ruby
zenguy_pc has joined #ruby
al2o3-cr has quit [Disconnected by services]
gr33n7007h is now known as al2o3-cr
sharpmachine has joined #ruby
saaki has joined #ruby
<jtdoncas>
Ox0dea: actually no I needed it in the client to pass it a Curb connection... fuck
j4cknewt has quit [Ping timeout: 265 seconds]
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<al2o3-cr>
ajaiswal: whats the problem?
<Ox0dea>
jtdoncas: Well, shit...
fujimura has joined #ruby
<ajaiswal>
al2o3-cr: hmm the output is coming like this totalcount/01.. instead of that i'm looking for totalcount/successtest
<krowv>
shevy, ok. thanks for the tips. I'll see what I can come up with. Glad I've made it this far on my second day with ruby gtk3.
<shevy>
\o/
happyface has joined #ruby
tkuchiki_ has joined #ruby
<Ox0dea>
ajaiswal: In Ruby, "2" + "3" is "23", not 5.
tkuchiki has quit [Read error: Connection reset by peer]
drewo has quit [Ping timeout: 276 seconds]
<ajaiswal>
Ox0dea: ok... i have removed the "0" to just 0
<krowv>
day one was mostly getting a working environment.
<Ox0dea>
jtdoncas: Do you know about hook methods?
baweaver has joined #ruby
banister has joined #ruby
<al2o3-cr>
ajaiswal: totaltest = Dir.glob("/var/log/beaker/spec/reports/#{role}/#{osx}/latest/*.xml").count # is always gonna be a fixed number
msgodf has quit [Ping timeout: 250 seconds]
<Ox0dea>
al2o3-cr: What if there are an infinite number of matching files; is Infinity a Fixnum?
<bnagy>
wat
<al2o3-cr>
successtest = "0" -> 0
<ajaiswal>
Ox0dea: hmm.. i'm not sure about the infinity, but in my case its 38
<ajaiswal>
al2o3-cr: yes i have changed that
<Ox0dea>
ajaiswal: Did you change the "1"?
<ajaiswal>
Ox0dea: yes that too
<ajaiswal>
i have updated the gist
<jtdoncas>
Ox0dea: yes
<jtdoncas>
Ox0dea: line method_added, included, method_missing, etc... ?
<jtdoncas>
like*
<pontiki>
don't worry, a filesystem will always be finite
axsuul has quit [Ping timeout: 250 seconds]
<pipework>
pontiki: But your mom might not be! (I'm so sorry)
<Ox0dea>
pipework: No man is an island... except your mom.
zenguy_pc has quit [Read error: No route to host]
<al2o3-cr>
ajaiswal: totaltest is always going to be 38
<pipework>
Ox0dea: ho ho ho!
<bnagy>
I am extremely unimpressed with using $? and also using the exit status of grep
<ajaiswal>
al2o3-cr: yes.. so if the grep i success, it should increment the successtest
<Ox0dea>
pipework: I thought I was so clever too, but somebody said it on some random forum eight years ago.
<ght>
Question: I have an array of values I'm iterating through by myarray.each do |element|, and I'd like to split the elements via element.split("-") (as all values are a string with a dash in the middle), take that two-part array and dynamically add it to an associative array, where split element[0] is the key and split element[1] is the value.
<pontiki>
pulling up a directory of files, though, will likely take longer than the heat-death of the universe
<pontiki>
so it won't matter in the end
<bnagy>
ght: Hash or to_h should help
braincrash has quit [Quit: bye bye]
<ght>
Does anyone have any documentation on dynamically creating a hash like that?
<bnagy>
>> Hash([1,2])
<ruboto>
bnagy # => can't convert Array into Hash (TypeError) ...check link for more (https://eval.in/382197)
<ajaiswal>
bnagy: can you point with better solution ?
<bnagy>
I suck
_seanc_ has joined #ruby
<ght>
lol
<bnagy>
>> Hash(*[1,2])
balazs has joined #ruby
<ruboto>
bnagy # => wrong number of arguments (2 for 1) (ArgumentError) ...check link for more (https://eval.in/382198)
<tds5016>
lol. I've been using browserify :-) but I support the use of web pack as well :-)
<al2o3-cr>
RickHull: rooster/flying goose?
<RickHull>
al2o3-cr: yeah, still not sure what you're getting at
<al2o3-cr>
nvm
<phat4life>
we have a rails backend, webpack react.js front end, the rest is a ruby mess
cirn0 has quit [Remote host closed the connection]
<RickHull>
al2o3-cr: my rooster comment was poking fun at the absurdity of having a bad association with chickens and morning time
dopieee has joined #ruby
<RickHull>
geese and ducks, fair game i suppose
<al2o3-cr>
RickHull: i know, don't worry
skysploit has joined #ruby
skysploit has joined #ruby
rbowlby has joined #ruby
dgutierrez1287 has quit [Ping timeout: 252 seconds]
<RickHull>
what is al2o3-cr anyway? chromium aluminum oxide?
scripore has joined #ruby
<al2o3-cr>
RickHull: shhh...
<RickHull>
from my cycling experience, al is popular, as is CrMo
<RickHull>
al2o3-cr: you know about the dangers of DHMO?
<RickHull>
be careful, it's a scary world out there
<Ox0dea>
I know people who literally drink the stuff!
<RickHull>
crazies!!
<al2o3-cr>
RickHull: nothing bothers me, nor should it bother others
<RickHull>
that stuff will kill you, literally
<tds5016>
phat4life: nice. I'm in the process of getting us over to backbone.
Lucky__ has joined #ruby
<RickHull>
Ox0dea: i bet they don't inhale it or inject it, do they?
[k- has joined #ruby
<tds5016>
for the front-end. everything 1/3 of the site is ROR server-side rendered. lol. Once I get the models working with backbone I think I'm going to be trying to get over to react for the views and just using backbone models.
datanoise has quit [Ping timeout: 245 seconds]
<al2o3-cr>
ruby == al2o3-cr
<RickHull>
oh shit, right
* RickHull
presents noggin for impact with cluestick
tds5016 has left #ruby [#ruby]
j4cknewt has joined #ruby
rbowlby has quit [Remote host closed the connection]
oo_ has joined #ruby
<al2o3-cr>
o/ oo_ :)
krz has quit [Quit: WeeChat 1.0.1]
gambl0r3 is now known as higuys
higuys has quit []
<RickHull>
/o\ # could've been worse
oo_ has quit [Remote host closed the connection]
gambl0re has quit [Quit: Bye]
gambl0re has joined #ruby
j4cknewt has quit [Ping timeout: 252 seconds]
chinmay_dd has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 265 seconds]
<Ox0dea>
Pop quiz! Which uses more memory, the whole Gem module or the main thread?
spider-mario has quit [Ping timeout: 256 seconds]
<shevy>
Gem
oo_ has joined #ruby
<al2o3-cr>
thread
<shevy>
the more gems the slower ruby will be
scripore has quit [Quit: This computer has gone to sleep]
<RickHull>
what is the main thread doing?
<al2o3-cr>
RickHull: everyting
spider-mario has joined #ruby
<RickHull>
then clearly it is the answer
<RickHull>
everything > anything
vdamewood has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<shevy>
lol
<al2o3-cr>
anything < everything
freerobby has quit [Read error: Connection reset by peer]
<Ox0dea>
>> require 'objspace'; (os=ObjectSpace).each_object.sort_by { |o| os.memsize_of o }.last(2)
<ruboto>
Ox0dea # => [<RubyVM::InstructionSequence:<class:Specification>@/execpad/interpreters/ruby-2.2.0/lib/ruby/2.2.0/ ...check link for more (https://eval.in/382225)
freerobby1 has joined #ruby
<Ox0dea>
ruboto: Spoiler alert, mate!
tkuchiki has quit [Remote host closed the connection]
<Ox0dea>
Interesting. The second-last is Gem on my machine, but it's Gem::Specification on Charlie's server.
<Ox0dea>
What does that mean?
<Ox0dea>
>> require 'objspace'; (os=ObjectSpace).each_object.sort_by { |o| os.memsize_of o }.last(2).map { |o| os.memsize_of o }
<silverdust>
I've thought of them as the same and .eql? has failed me sometimes
<silverdust>
ok thanks
quazimodo has quit [Ping timeout: 276 seconds]
tcarter1719 has quit [Quit: tcarter1719]
pyo_ has joined #ruby
charliesome has joined #ruby
dionysus69 has joined #ruby
fabrice31_ has joined #ruby
fabrice31_ has quit [Remote host closed the connection]
fabrice31 has quit [Ping timeout: 240 seconds]
skade has joined #ruby
fabrice31 has joined #ruby
<Ox0dea>
ljarvis: Would you mind elaborating on your opposition?
ta has quit [Remote host closed the connection]
emilkarl has quit [Quit: emilkarl]
crazyhorse18 has joined #ruby
ta has joined #ruby
revath has quit [Ping timeout: 246 seconds]
<crazyhorse18>
for working with passenger would people recommend rbenv or rvm?
<ljarvis>
Ox0dea: I think it'll lead to ugly code
<Ox0dea>
ljarvis: We're all consenting adults.
<ljarvis>
I'm glad you have faith
<yorickpeterse>
Ox0dea: I never had the need for decorators like that
<yorickpeterse>
I do think it will lead to weird looking code
<Ox0dea>
It's certainly something of an edge case, but that it's not supported feels inconsistent.
lkba_ has joined #ruby
musgravejw has joined #ruby
nux443 has joined #ruby
emilkarl has joined #ruby
<Ox0dea>
That it returns the module under modification is effectively useless, since that'll either be self or the object on which you explicitly called the modifier.
ndrei has quit [Ping timeout: 252 seconds]
workmad3 has joined #ruby
chinmay_dd has joined #ruby
<ljarvis>
but should it return an array or a single symbol
skade has quit [Quit: Computer has gone to sleep.]
<Ox0dea>
I've asked that question several times now, to no avail.
<ljarvis>
the obvious would be an array, but that might be confusing
<ljarvis>
probably more useful than self though i agree
<Ox0dea>
No, I think it makes sense to only special case the one-argument call.
<ljarvis>
maybe this is why it doesn't do that :)
ndrei has joined #ruby
lkba has quit [Ping timeout: 264 seconds]
<Ox0dea>
Ruby is replete with special cases, if that's the point you meant to make.
<Ox0dea>
If you otherwise intended to imply that accounting for the change would be tricky, my patch is essentially one additional line.
<ljarvis>
my point was that the solution isn't obvious
<Ox0dea>
Return *argv if argc is 1, else the module.
musgravejw has quit [Ping timeout: 255 seconds]
<ljarvis>
have you suggested it to redmine?
<Ox0dea>
I had hoped to acquire some feedback here before doing so.
senayar has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
<ljarvis>
I guess my feedback would be that I don't care about "foo(private(....))" but that the behaviour is probably more sensible than returning the module. Then again, it's not a method call..
futilegames has joined #ruby
<Ox0dea>
It is a method call.
<ljarvis>
right that was poorly worded. I thought it was a keyword too though
<yorickpeterse>
honestly I feel "private" is supposed to return a Method
<yorickpeterse>
not a Symbol
<Ox0dea>
yorickpeterse: But then shouldn't method definition return a Method?
ndrei has quit [Ping timeout: 256 seconds]
<yorickpeterse>
e.g. in Rubinius we return a CompiledCode IIRC, allowing for more complex stuff like this
slucx has joined #ruby
<yorickpeterse>
Ox0dea: probably
<Ox0dea>
This has all been said before with regard to method definition.
ndrei has joined #ruby
haxrbyte has quit [Read error: Connection reset by peer]
<Ox0dea>
That *method* visibility modifiers don't return "methods" is anomalous and counter-intuitive.
jenrzzz has joined #ruby
<yorickpeterse>
correct
timonv has quit [Ping timeout: 245 seconds]
<yorickpeterse>
both "def" and "private/public/protected" should in my opinion return the method object they operate on
<yorickpeterse>
also "def" really should've been a method
<yorickpeterse>
same goes for private/public/protected
<Ox0dea>
Now you're in the sky.
<yorickpeterse>
"class" can easily be made a method too
Rollabunna has joined #ruby
hakunin has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
* yorickpeterse
may or may not have had too much of the Smalltalk koolaid
<Ox0dea>
Methods are defined too frequently and their return values utilized too rarely to justify the cost of returning anything but a primitive.
<yorickpeterse>
also hey I got an invite to the Ruby rogues podcast
<yorickpeterse>
Ox0dea: there's exactly 0 overhead in returning a usable object
<yorickpeterse>
because the object is already allocated anyway
bkxd has joined #ruby
<Ox0dea>
Yes, I suppose that's the case.
northfurr has quit [Quit: northfurr]
<Ox0dea>
yorickpeterse: Do you know who'll be your co-panelists?
<canton7>
I came across nim shortly before I came across crystal - that's probably just me having my ear to slower news channels, but it may be more typical for a layman
_blizzy_ has quit [Ping timeout: 256 seconds]
<valkyrka>
and this is the output when ran w/ trace
Scrofff has quit [Read error: Connection reset by peer]
riotjones has quit [Quit: Leaving...]
acarpe has joined #ruby
bruno- has quit [Ping timeout: 256 seconds]
_blizzy_ has quit [Ping timeout: 255 seconds]
mechanicles has joined #ruby
revath has joined #ruby
<jhass>
shortCircuit__: what's current_tenant? why do you have to define the empty hashes and only fill the values for one?
<Ox0dea>
shortCircuit__: You have several extraneous "end"s that constitute syntax errors.
<jhass>
huh?
<Darkwater>
Ox0dea: where?
<Ox0dea>
Sorry, I'm tired.
<Ox0dea>
Gonna head off to bed now.
<Darkwater>
lol
<jhass>
shortCircuit__: I think you got a design problem there, you have data which you embed in your code and you'll have to touch the code when the data changes
slucx has quit [Remote host closed the connection]
<Ox0dea>
Seeing "end" right before "elsif" is rare enough that it tripped me up.
<jhass>
shortCircuit__: start by pulling these values int a DB, JSON or YAML file, that should clean the code up automatically
<jhass>
*into
<jhass>
Ox0dea: weirichs rule ftw ;D
<Ox0dea>
Ha! I'm so glad he has a rule.
Scroff has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
Scroff has quit [Ping timeout: 264 seconds]
yoongkang has quit [Remote host closed the connection]
yoongkang has joined #ruby
acarpe has quit [Quit: acarpe]
bruno- has joined #ruby
tkuchiki has quit [Remote host closed the connection]
futilegames has quit [Quit: futilegames]
hardlin3r has joined #ruby
Scroff has joined #ruby
rubie has quit [Remote host closed the connection]
acarpe has joined #ruby
wildroman2 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
Lector has quit [Remote host closed the connection]
wildroman2 has joined #ruby
fabrice31_ has quit [Ping timeout: 244 seconds]
hakunin has quit [Remote host closed the connection]
Papierkorb has joined #ruby
tkuchiki has joined #ruby
ahmetkapikiran has joined #ruby
DLSteve has joined #ruby
Igorshp has quit [Remote host closed the connection]
bob_f has left #ruby [#ruby]
revath has quit [Ping timeout: 246 seconds]
A205B064 has quit [Ping timeout: 256 seconds]
<strixd>
Is it possible to alias a instance method to a class method
sigurding has quit [Quit: sigurding]
revath has joined #ruby
<ljarvis>
strixd: just call the class method inside your instance method
<ljarvis>
you could add a helper method for doing it, but no there is nothing built in
<strixd>
what is you wanted both Foo.new.bar and Foo.bar to be the same thing
<ljarvis>
they can't be the same thing
<ljarvis>
but one method could call another
<Darkwater>
which mean they can do the same thing
<ljarvis>
the way i just described
<Darkwater>
(probably)
<strixd>
can i call the instance method from the class?
starfox_sf has joined #ruby
<ljarvis>
that doesn't really make sense
<Darkwater>
if you have an instance, sure
<ljarvis>
but if you instantiate a new instance, yes
<Darkwater>
maybe we can help you better if you describe what you want
<strixd>
nice ty I get it
<strixd>
thanks
Soda has joined #ruby
blackmesa has joined #ruby
Zai00 has quit [Quit: Zai00]
roshanavand has joined #ruby
roshanavand has quit [Max SendQ exceeded]
roshanavand has joined #ruby
axsuul has quit [Ping timeout: 240 seconds]
Musashi007 has quit [Quit: Musashi007]
starfox_sf has quit [Ping timeout: 256 seconds]
fabrice31 has quit [Remote host closed the connection]
hardlin3r has quit [Quit: Leaving]
auzty has quit [Quit: Leaving]
mechanicles has quit [Remote host closed the connection]
roshanavand has quit [Ping timeout: 265 seconds]
LiquidInsect has joined #ruby
Igorshp has joined #ruby
ndrei has quit [Ping timeout: 246 seconds]
hectortrope has joined #ruby
roshanavand has joined #ruby
ahmetkapikiran has quit [Quit: ahmetkapikiran]
pontiki has joined #ruby
revath has left #ruby [#ruby]
Akagi201 has quit [Remote host closed the connection]
skade has quit [Quit: Computer has gone to sleep.]
<yorickpeterse>
aww yiss, 2nd Aeron arriving this Thursday
<yorickpeterse>
that only took over a month to ship
arup_r has quit [Remote host closed the connection]
joonty has quit [Quit: joonty]
<ddfreyne>
yorickpeterse: Are you so fat that you need two Aeron chairs?
<yorickpeterse>
oooooooooooh
<yorickpeterse>
But no, I ordered one for my office
stamina has joined #ruby
<adaedra>
fat joke
crazyhorse18 has quit [Ping timeout: 265 seconds]
_blizzy_ has joined #ruby
patrickanth0ny has quit [Ping timeout: 265 seconds]
<sdegutis>
Basically I want to get all this text and turn it into LaTex
<sdegutis>
Programmatically.
givello has joined #ruby
<sdegutis>
It's.... terrifying.
bMalum has joined #ruby
<sdegutis>
I talked to the guy who runs this website. He said /there are no source files/.
tsvenson has joined #ruby
<sdegutis>
He just edits a bunch of .htm files, and has for 20 years.
<sdegutis>
For an entire encyclopedia worth of text.
* sdegutis
facepalmed hard
<adaedra>
html to latex?
<volty>
you'll better study nokogiri (and parsing xml in general)
<adaedra>
maybe pandoc does it
banister has joined #ruby
<givello>
Hey there, I'm kind of a beginner with ruby and here's a quick question: I've got a class A that I want to be able to initialize from either a String or another object of type A. How can I overload initialize ?
<sdegutis>
adaedra: no I want to customize the LaTeX that comes out
<sdegutis>
volty: I trust nokigiri just fine, it's this source code I'm not sure I trust to have balanced HTML
<volty>
givello: def initialize ... case arg.class; when String ...; when A .... end --- something like that
<sdegutis>
If only because I want to see how awful pandoc does it so I know what problems to avoid myself
hoov has quit [Quit: Leaving]
<jhass>
volty: givello no need for the .class; just case arg; when String; ... when A; ... end
Abhijit has joined #ruby
<givello>
volty: good idea
<volty>
jhass is right
<givello>
Thank you both :)
<jhass>
givello: though you may want to copy with dup instead and define initialize_copy
<givello>
So no method overloading in ruby then
<volty>
me was wrong, if you go with case arg.class you need to_s ( that's wrongheading)
yoongkang has quit [Remote host closed the connection]
acke has quit [Remote host closed the connection]
<givello>
jhass: I'll look into that
ahmetkapikiran has joined #ruby
Cust0sLim3n has quit [Ping timeout: 245 seconds]
<Abhijit>
hello
qwertme has joined #ruby
acke has joined #ruby
charliesome has quit [Quit: zzz]
<jhass>
hi
allcentury has quit [Ping timeout: 265 seconds]
barkerd427 is now known as zz_barkerd427
Cust0sLim3n has joined #ruby
skade has quit [Ping timeout: 252 seconds]
<volty>
Some with sxperience in mixing c++ & ruby? 1. the interpreter (on rb_eval_string....) does not autoload gems, so have to require rubygems. And I am curious how it goes / should go 2. on require 'nokogiri', I have undefined Encoding: UTF-7 exception
but3k4 has joined #ruby
<jhass>
maybe just shell out... :P
<volty>
jhass: no way, I need it from inside. I have (I want) to mix c++ qt and qtbindings calls (do on the gui from the both sides)
<yorickpeterse>
volty: you can use rb_require() to load any Gems you might need
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aapole has joined #ruby
quimrstorres has joined #ruby
nickjj has quit [Ping timeout: 240 seconds]
nickjj has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<volty>
yorickpeterse: most requries are inside ruby source. Moving them out over-complicates. But it's ok since require 'rubygems' works (for now). I was just curious. As for the nokogiri, there are other problems too — no way to use it with qtbindings, must be something with name collision
<yorickpeterse>
volty: what the heck are you trying to do?
negev has joined #ruby
cosmicexplorer has joined #ruby
nateberkopec has joined #ruby
<negev>
hi, using erubis to run ruby as a cgi, how do you include another .erb file as a kind of partial view? when i do: puts Erubis::FastEruby.new(File.read('menu.erb')).result(binding()) it nukes any html that was in the original index.erb before the call
<Aeyrix>
volty: ...
<Aeyrix>
uhhhhhh
<volty>
mixing calls from qtbindgins and c++ qt — or, in general, moving (some parts) towards c++. Done starting the qt from the ruby side, but now I have to go the other way (and hook qtbindings to alreay initialized appliction from c++).
arup_r has quit [Remote host closed the connection]
hedgecore has quit [Quit: leaving]
<yorickpeterse>
That makes no sense
arup_r has joined #ruby
<yorickpeterse>
As in, the way that was written
RazorX has quit [Ping timeout: 245 seconds]
k3asd` has quit [Ping timeout: 252 seconds]
arup_r has quit [Remote host closed the connection]
knikolov has left #ruby ["WeeChat 1.3-dev"]
sdegutis has left #ruby [#ruby]
aapole has quit [Ping timeout: 244 seconds]
starfox_sf has joined #ruby
k3asd` has joined #ruby
arup_r has joined #ruby
<yorickpeterse>
For one, MRI has no decent embed API so that's already going to be a nightmare
<yorickpeterse>
Second, replacing Ruby "require" calls with rb_require() isn't going to yield you any real performance benefits
<volty>
myEdit.new(); myEdit.show() — ruby side; myEdit is implemented in c++; accessed (findWidget by name) and used from the ruby side // now think of vise versa
<yorickpeterse>
It's far easier to keep the Ruby code as Ruby and just run it
sdothum has joined #ruby
hedgecore has joined #ruby
<yorickpeterse>
It's also far easier to expose C/C++ to Ruby and not the other way around
<volty>
easier? not at all, not stable enough
<yorickpeterse>
e.g. the GC will make your life miserable
<volty>
as for the what is easier to expose I (as stated) already know that (because I have done it)
<yorickpeterse>
"not stable enough"?
haxrbyte has quit [Ping timeout: 265 seconds]
<yorickpeterse>
what does that even mean?
<volty>
qtbindings isn't stable enough
bronson has joined #ruby
<volty>
simple
<yorickpeterse>
...ehm, how does calling the same Ruby code from C++ make any difference?
<yorickpeterse>
Are you writing your own Qt bindings?
Abhijit has quit [Quit: Bye.]
<volty>
and there are some speed problems (e.g. syntax highlighter). Anyway I want to try this. It's done if I succeed to hook to the Qt::Application from the ruby side.
[k- has quit [Remote host closed the connection]
<volty>
no.
starfox_sf has quit [Ping timeout: 276 seconds]
RazorX has joined #ruby
<yorickpeterse>
You're literally making absolutely zero sense
<volty>
I'd prefer reimplenting ruby using (base) qt libraries
<yorickpeterse>
lol
<yorickpeterse>
I hope you have a few years for that
<volty>
lol, little honey. Go your own way and leave me going my own.
jcaho has quit [Read error: Connection reset by peer]
<yorickpeterse>
In that case I suggest not asking questions in here
jcaho has joined #ruby
<volty>
You are small coin. You argue without knowing about what.
<yorickpeterse>
I'm pretty familiar with the C API
<Darkwater>
lol
<yorickpeterse>
Having written my fair share of code for it, working on implementing it in Rubinius, etc
<volty>
live with your familiarity
<Darkwater>
what is advice from someone experienced
acarpe has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
<yorickpeterse>
Darkwater: yeah, clearly they know better
bronson has quit [Ping timeout: 245 seconds]
mister_solo has quit [Ping timeout: 245 seconds]
<yorickpeterse>
volty: start by formulating a proper question because so far they've been too cryptic
<yorickpeterse>
Maybe then somebody can answer you properly
<yorickpeterse>
Because right now it sounds like you're trying to implement Ruby using C++/Qt, which is _a lot_ of work
<yorickpeterse>
As in, years of work
<jhass>
volty: yorickpeterse don't get ad hominem, I don't want to have remove either of you
fujimura has joined #ruby
<volty>
the problem is too complex if you don't know the inners of qtbindings. Its you that starting questioning
<volty>
I would have remained at my exposing of the initial question
<yorickpeterse>
I'm well aware of what qtbindings does
<jhass>
also I'd suggest you drop the metadiscussion, neither of you will gain anything from it
<yorickpeterse>
I've looked into it in the past pretty extensively, hence I said it's a pain to do
<volty>
but you don't know how qt works, how qtbindings programmatically allow you to locate your widgets
<yorickpeterse>
Either way, calling back to Ruby from C++ is hard because the API doesn't expose anything remotely C++ like
Akagi201 has joined #ruby
<ddv>
litle honey :-)
<yorickpeterse>
volty: I suggest to stop making these assumptions
<volty>
It was you that begin questioning.
ldnunes has joined #ruby
<volty>
begun
<yorickpeterse>
Yes, because your questions made no sense
<yorickpeterse>
So I was asking what you're trying to achieve
<yorickpeterse>
But you answer with only more cryptic answers
<yorickpeterse>
also meeting, bbl
<volty>
I answered. And you could limit yourself to simple advice, without posing as carapace.
jmignault has joined #ruby
<volty>
the prob.. is too complex to answer in a clearer way. honey
<jhass>
volty: seriously, last warning
skade has joined #ruby
<volty>
jhass: as you please, since you didn't warned yorickpeterse's breaking eggs
<jhass>
I did warn both of you
senayar has joined #ruby
fujimura has quit [Ping timeout: 256 seconds]
Igorshp has quit [Remote host closed the connection]
negev has left #ruby [#ruby]
pwnz0r has joined #ruby
banister has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
serivich has joined #ruby
<jesterfraud>
someone remind me why I voluntarily joined this profession? :)
jds has quit [Quit: Connection closed for inactivity]
<ddv>
money
<ddv>
m0ney
allcentury has joined #ruby
<jesterfraud>
ddv, hasn't worked that well thus far
<jhass>
being praised like an artist?
dorei has joined #ruby
<jesterfraud>
though, funnily enough, playing with that gem right now
* jhass
coughs
<ddv>
most will steal your code
<jesterfraud>
Yeah. Praise. That's what my clients/bosses do. :)
pwnz0r has quit [Ping timeout: 252 seconds]
yoongkang has joined #ruby
diegoviola has joined #ruby
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
acovrig has joined #ruby
<ccooke>
Hmm. Is there a working mmap gem for any recent Ruby?
<ccooke>
the only one I can find hasn't been updated in years
<ddv>
then no
<ccooke>
Damn. Wonder how hard it would be to port to 2.2
startupality has quit [Quit: startupality]
<jesterfraud>
one way to find out!
wjlroe has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<Darkwater>
jesterfraud: I don't think you voluntarily joined this profession
<Bunnycat>
does anyone have experience with having both pry-debugger and pry-byebug?
<Darkwater>
the profession consumed you
<Darkwater>
not me, sorry
<jhass>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
<jesterfraud>
Darkwater, I think that's about right
<volty>
Small, not useful, but sufficient to start with. And if it breaks somewhere, I will stop with it. I need only one thread. I need this only to move some pieces from ruby to c++, and start the app from c++. I hope that now I was quite clear. Thank you. :)
aryaching has joined #ruby
<Bunnycat>
I have a Ruby2.0.0p0 environment, which cannot be changed at the moment due to legacy support of some of our scripts. We use pry to debug our ruby scripts. The problem is, if the pry-debugger and pry-byebug gems are installed, even if you specifically require only one of them in the code, binding.pry crashes
<Darkwater>
volty: I don't understand what you're saying
<jesterfraud>
Bunnycat, not specifically, but I have used gdb a tiny bit before (and used that knowledge to use bye-bug successfully a time or two)
<jesterfraud>
Bunnycat, are both in the Gemfile?
<volty>
Darkwater: have you done gui?
yfeldblum has quit [Ping timeout: 265 seconds]
<volty>
inruby?
<jesterfraud>
if so, do you have require: false on both of them?
<Darkwater>
hm, not yet
Igorshp has quit [Remote host closed the connection]
bennyhallett has left #ruby [#ruby]
<volty>
ok. you'll get it when you start :)
<Bunnycat>
we don't use gemfiles to manage our projects. Is there a master gemfile where the gems are preloaded before running any scripts?
<jhass>
Bunnycat: why are both installed anyway? you should have debugger installed for 1.9 only and byebug for 2.0+ only
<Bunnycat>
jesterfraud: yes
hoov has joined #ruby
<jesterfraud>
Bunnycat, no, if you don't have a gemfile, then it wouldn't be that...
symbol has joined #ruby
<jhass>
well, maybe you should look into using Bundler
apt-get_ has joined #ruby
<jesterfraud>
^
<jhass>
it's there to prevent issues like this
bMalum has quit [Quit: bMalum]
<Bunnycat>
I'd happilly switch to byebug completely, problem is - we have scripts which have been frozen and use pry-debugger. pry-debugger is deprecated for anything post Ruby 2 and pry-byebug should take over
k3asd` has quit [Ping timeout: 256 seconds]
<Bunnycat>
so we have stuff like
<Bunnycat>
require 'pry'
<Bunnycat>
require 'pry-debugger'
<jhass>
if you have to use pry-debugger you can't use Ruby 2.0
<jhass>
simple as that
<Bunnycat>
require 'pry-rescue'
CloCkWeRX has quit [Ping timeout: 246 seconds]
<Bunnycat>
pry-debugger still works for ruby 2.0
sgambino has joined #ruby
<jhass>
but let me say that this policy is insanely stupid
<Bunnycat>
it won't work for anything later
zz_barkerd427 is now known as barkerd427
<diegoviola>
this company I am working for is awful, the boss ask their team members to "clean" shit at the office, what the hell is that? lol
rkazak has joined #ruby
<jhass>
diegoviola: #ruby-offtopic ;)
<Bunnycat>
For now we had to uninstall pry-byebug and fallback to pry-debugger
joonty has quit [Quit: joonty]
<Bunnycat>
:c
<jesterfraud>
Bunnycat, are you using rvm/rbenv/chruby?
sarkyniin has quit [Ping timeout: 264 seconds]
<jesterfraud>
that might be the best way to handle 'frozen' scripts that expect requirements of a certain version
<dorei>
diegoviola: i used to work for a company that had a nazi cleaning lady, she terrorized everyone to keep their desks clean :D
quimrstorres has joined #ruby
<diegoviola>
dorei: I don't think they were referring about the desk
<Bunnycat>
we use module to manage ruby versions
Igorshp has joined #ruby
<jhass>
what's "module"?
<Bunnycat>
we load ruby as a module
<jhass>
?!
<Bunnycat>
so we can do "module unload [ruby-version]"
<yorickpeterse>
now I need to decide if I actually want this in the first place
<yorickpeterse>
because I cbf testing/maintaining/etc this
sarkyniin has quit [Client Quit]
evanjs has joined #ruby
sarkyniin has joined #ruby
hinbody has quit [Read error: Connection reset by peer]
havenwood has joined #ruby
RegulationD has joined #ruby
AlphaAtom has joined #ruby
Kricir has quit [Remote host closed the connection]
quimrsto_ has joined #ruby
sandelius has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
hinbody has joined #ruby
AlphaAtom has joined #ruby
<jnormandeau>
Hello everyone, I have been getting intermittent timeouts from rubygems.org when installing gems. According to the uptime section of the site everything seems to be working fine. Has anyone else been having issues?
Cust0sLim3n has quit [Ping timeout: 256 seconds]
skyrocker has joined #ruby
skyrocker has left #ruby [#ruby]
<adaedra>
Check your RJ45 cable
<adaedra>
:)
quimrst__ has joined #ruby
<quazimodo>
class Address < FFI::Struct
<jnormandeau>
All the networking on my end has been thoroughly checked
<quazimodo>
that's incredibly interesting
quimrstorres has quit [Ping timeout: 264 seconds]
<jnormandeau>
I get : Errno::ETIMEDOUT: Connection timed out - connect(2) (http://rubygems.org/latest_specs.4.8.gz) but if I open it in my browser there is no problem
rubie has joined #ruby
arup_r has quit [Remote host closed the connection]
dorei has quit [Remote host closed the connection]
<adaedra>
why are you in FFI quazimodo
<adaedra>
You do C interfacing?
sinkensabe has quit [Remote host closed the connection]
alphaatom|pc has joined #ruby
RegulationD has quit [Ping timeout: 244 seconds]
dorei has joined #ruby
quimrsto_ has quit [Ping timeout: 265 seconds]
caseypatrickdris has joined #ruby
AlphaAtom has quit [Client Quit]
symbol has quit [Quit: WeeChat 1.1]
<jhass>
jnormandeau: run mtr rubygems.org for a while, check where it breaks
rbennacer has quit [Remote host closed the connection]
emilkarl has joined #ruby
rbennacer has joined #ruby
Scroff has quit [Ping timeout: 276 seconds]
emilkarl has quit [Client Quit]
paulcsmith has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scroff has joined #ruby
<quazimodo>
adaedra: curiosity :)
chinmay_dd has quit []
tvw has joined #ruby
<adaedra>
quazimodo: I was talking about Struct in stdlib, not FFI. FFI::Struct is aimed at C interfacing.
<quazimodo>
adaedra: i know :)
<jhass>
FFI::Struct will be more expensive than a normal class
rubie has quit [Remote host closed the connection]
davedev24_ has joined #ruby
patrickanth0ny has joined #ruby
j4cknewt has joined #ruby
hoov has joined #ruby
<quazimodo>
jhass: it's cool, all I'm doing atm is learning
freerobby has quit [Quit: Leaving.]
druznek has joined #ruby
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cust0sLim3n has joined #ruby
<quazimodo>
well
<quazimodo>
for super awesome ness if i was to make an FFI::Struct with strings i think I need to malloc a space for a char array and return a pointer ... or someting
bMalum has joined #ruby
joaomdmoura has joined #ruby
<yorickpeterse>
quazimodo: sounds a bit like you're overcomplicating things
shortCircuit__ has quit [Quit: Leaving.]
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
jpfuentes2 has joined #ruby
<jhass>
quazimodo: so you're not doing anything business critical?
musgravejw has joined #ruby
musgravejw has quit [Max SendQ exceeded]
<quazimodo>
nah not at all
musgravejw has joined #ruby
<quazimodo>
i'm playing :)
<quazimodo>
i wouldn't do any of this in client code
ruby-lang768 has joined #ruby
<jhass>
check crystal which lets you explore low level memory access and structuring with a familiar ruby like syntax
emilkarl has joined #ruby
dopie has joined #ruby
<quazimodo>
i'd either whack my data into an in memory db or just use classes :)
acovrig_ has joined #ruby
acovrig has quit [Ping timeout: 240 seconds]
acovrig_ is now known as acovrig
patrickanth0ny is now known as badhatter
<jnormandeau>
jhass: I have been running mtr for a few minutes and getting a ~80% loss from ae-2-52.edge2.Seattle1.Level3.net and the last entry is ??? with 100% loss
<yorickpeterse>
I'm a bit surprised it has a nil though
ZYPP has joined #ruby
<yorickpeterse>
but at least the compiler detects it I believe
<quazimodo>
lol
rbennacer has quit [Remote host closed the connection]
quimrst__ has quit [Remote host closed the connection]
JakFrist has joined #ruby
skade has quit [Client Quit]
GPrime has joined #ruby
<jhass>
yorickpeterse: yeah, not a special property of nil though
<quazimodo>
I think the guys at haskell got it rigth
<jhass>
it just won't let you call stuff that "looks like it could be a String or nil"
<yorickpeterse>
jhass: well yeah
<jhass>
when just one of them has the method that is
ray_ has joined #ruby
<yorickpeterse>
but that begs the question: why not use an Option/Maybe/whatever
<jhass>
it still may happen
<yorickpeterse>
maybe I've been doing too much Rust though
Kricir has quit []
acovrig has quit [Ping timeout: 276 seconds]
<jhass>
it started by resembling Ruby as much as possible and then looking into where it needs to derive in order to work/make sense as a compiled language
dfockler has quit [Ping timeout: 264 seconds]
acovrig has joined #ruby
<acovrig>
I’m installing ruby and am getting ‘~/.rvm/scripts/cli: line 855: 18651 Killed "$rvm_scripts_path/set" "$rvm_action" "${rvm_ruby_args[@]}”’ when running ‘curl -L get.rvm.io | bash -s stable --rails’ any ideas?
<jhass>
wild guess: you ran out of memory
ray_ has quit [Client Quit]
<adaedra>
yeah, look into system logs, processes are not killed for fun
<volty>
with ruby's nil we have everything, with haskell's skill we are overcomplicating
joaomdmoura has joined #ruby
jmignault has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
pyo_ has quit []
fabrice31_ has quit [Remote host closed the connection]
jmignault has joined #ruby
AlphaAtom has quit [Client Quit]
_seanc_ has quit [Client Quit]
<centrx>
crazy beatniks
yqt has joined #ruby
livathinos has quit []
kekumu has joined #ruby
Jimtemp has joined #ruby
JimBurns83 has quit [Ping timeout: 240 seconds]
kahuna_ has joined #ruby
emilkarl has quit [Quit: emilkarl]
segfalt has quit [Quit: segfalt]
Scroff has quit [Remote host closed the connection]
<volty>
One day I went to (try to) parse html with one of haskell's libraries (very beginner's parsing, of course). There I found the proof that this elegant language was good just for impressive fibonacci generators (and other infinite structures, of course). They defined so many operators - pretending to impress or to make you believe the parsing is easier using operators instead of simple meaningful verbs
yalue has joined #ruby
segfalt has joined #ruby
<quazimodo>
so
<quazimodo>
sql is really interesting
<quazimodo>
the whole 'set theory' stuff involved
Cust0sLim3n has joined #ruby
kobain has joined #ruby
Scroff has joined #ruby
rbennacer has joined #ruby
<quazimodo>
anyone heard of a gem that brings the language of relational data stores to more abstract objects, not necessarily table rows
<quazimodo>
?
<wasamasa>
arel
hotpancakes has joined #ruby
<wasamasa>
guess what's using it
allcentury has joined #ruby
<quazimodo>
yeah but that's about database stuff
<quazimodo>
it builds sql that gets sent to a db
<quazimodo>
what if we have no db at all
<quazimodo>
just a collection of collections of objets
<quazimodo>
and we wanted to do things like 'where' clauses to reduce the number of records down
<quazimodo>
looks like the stuff involved in actually doing the maths is only very small
<quazimodo>
the rest is about resource management, access and query parsing/building
<wasamasa>
quazimodo: the reason why it's recommended to use a RDBMS is because these things have a boatload of features and are the best studied systems to store your data in and to optimize
<jhass>
if it's commented out that's quite expected
mdz_ has quit [Remote host closed the connection]
wallace1 has joined #ruby
<wasamasa>
heck, sometimes it's as simple as just adding indexes and using EXPLAIN judiciously to find out why
k3asd` has joined #ruby
<roolo>
jhass: I am not that far yet. Right now i want to make the call, then i'll solve what to do with it
wallace1 is now known as jonathanwallace
<wasamasa>
or making the queries your ORM generates more specific
quimrstorres has quit [Remote host closed the connection]
<roolo>
What i've forgot to say, it is wip
quimrstorres has joined #ruby
<quazimodo>
wasamasa: i've been bitten by prematurely moving to document stores
<pipework>
wip it good
<roolo>
So some things should be erased and some are missing
<quazimodo>
structured relational data should go into postgres :P
<jhass>
roolo: so, the again, what exactly is your issue?
bashusr has joined #ruby
<workmad3>
quazimodo: unstructured data should probably also go in postgres too ;) JSON and JSONB column types FTW!
<volty>
I think that we are condemned to think in terms of tables. When we need higher abstractions we not only use tables, but also have to resort to tables if some problem (out of complexity) arises out. Similar to xml — human readable, in case we get lost, but you can project an entire plane using it.
* quazimodo
wishes the publishing world had a law, first edit = remove 30% of words. Second edit removes another 10-20%. Publish
balazs has quit [Ping timeout: 244 seconds]
<volty>
(use tables beneath, I mean)
<roolo>
jhass: When it come to `api_method_name = prepare_api_method what_was_called` the prepare_api_method get nil for what_was_called
<quazimodo>
workmad3: lol yeah can you believe how bad they smash mongo
<quazimodo>
stupid mongo
<yorickpeterse>
I wish papers were written in plain English
<yorickpeterse>
it certainly would've made things a lot easier
<roolo>
(recently what_was_called was ruby_method_name, but i thought i am messing with some reserved words)
<quazimodo>
mongo is proof that a stupid thing + massive, excessive, drowning deafening nerd hype + *stupid* js developers = relatively successful brain virus
<yorickpeterse>
also I really dislike the 2 column layout they usually use
Scroff has quit [Read error: Connection reset by peer]
<quazimodo>
roolo: i use
<volty>
agree — too much «missed poetry writers» out there :)
<quazimodo>
mid
<quazimodo>
def method_missing(mid, *args)
Narzew has quit [Ping timeout: 265 seconds]
<jhass>
roolo: I kinda doubt that's actually happening in the code that's on github
aapole has joined #ruby
<quazimodo>
because openstruct uses mid or some reason
revath has joined #ruby
<quazimodo>
message_id? i dno
senayar has quit [Remote host closed the connection]
<ZOMGITSABEAR>
from a complete nob with no programming experience, how soon should i expect to grasp ruby enough to the point to where i'm writing my own programs?
<volty>
it all depends on your talent :)
<yorickpeterse>
ZOMGITSABEAR: depends on the time you invest in it
kinduff has joined #ruby
<centrx>
ZOMGITSABEAR, Hello World is a program, so you can start quickly
erts has joined #ruby
<ZOMGITSABEAR>
i hardly consider Hello World a program :p
Scrofff has joined #ruby
<volty>
ZOMGITSABEAR: state an example. A program of yours to do what?
<ZOMGITSABEAR>
idk.. irc bot
<yorickpeterse>
few weeks
<volty>
that's too easy :)
dzejrou has joined #ruby
<ZOMGITSABEAR>
ah, cool
<roolo>
jhass: Aaaaa, so ruby was right and i am asshole. I am really using rrong variable name in that method :)
<yorickpeterse>
depending on the IRC bot library you'd use
<ZOMGITSABEAR>
library?
<ZOMGITSABEAR>
do tell
michael_mbp has quit [Excess Flood]
erts_ has joined #ruby
<volty>
without library
<quazimodo>
ZOMGITSABEAR: from a beautiful magestic man, not long
<quazimodo>
jhass and chris pine had a romantic relationship
skade has joined #ruby
<ZOMGITSABEAR>
so where do i go to find clients
<quazimodo>
craigslist :D
<ZOMGITSABEAR>
if it'll speed up my learning, might as well go for it
erts_ has quit [Ping timeout: 256 seconds]
momomomomo has joined #ruby
<yorickpeterse>
ZOMGITSABEAR: honestly just take it slow
<yorickpeterse>
clients will introduce stress, deadlines, etc
<quazimodo>
ZOMGITSABEAR: do some initial discovery etc
<centrx>
clients? You've gone from "never programmed before" to founding a consultancy in 10 minutes?
<quazimodo>
get a basic feel
<yorickpeterse>
plus you have to maintain whatever you make (likely)
<quazimodo>
then decide :D
ringarin has quit [Ping timeout: 265 seconds]
<volty>
my receipt: 1) start with exchanging messages (two apps) using a file 2) switch to drb 3) switch to tcp 4) then other, higher, protocols
doertedev has quit [Ping timeout: 244 seconds]
la__ has quit [Ping timeout: 272 seconds]
starfox_sf has quit [Ping timeout: 264 seconds]
<volty>
as for the speed I agree with yorickpeterse — our neurals need time to organize (WELL) the new information & paradigms
skysploit has quit [Remote host closed the connection]
<quazimodo>
I actually did maintain for a year
<ZOMGITSABEAR>
centrx, i'm just doing what quazimodo said would speed up my learning
<quazimodo>
then i fucked the guy off
JimBurns83 has joined #ruby
maxshelley has joined #ruby
<centrx>
ZOMGITSABEAR, he sounds like a lunatic!
langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bwicklund>
At least learn the syntax first then you can start reading other peoples code
revath has quit [Ping timeout: 244 seconds]
<volty>
or, ZOMGITSABEAR, you can invest a few month asking around what could speed you up :)
<ZOMGITSABEAR>
haha
<quazimodo>
the thing i wrote for him takes a 3 hour process to about 1.5 hours each day with about 17 workers + himself. Thats like 24 hours a day of productivity
Rollabun_ has quit [Remote host closed the connection]
k3asd`_ has joined #ruby
<quazimodo>
ZOMGITSABEAR: always remember, you sell a service not a product
<volty>
time to absorb — there are ppl that need more time, there are others that need less. monkeys grow faster but stop sooner
<ZOMGITSABEAR>
quazimodo: that feels a bit like common sense
skade has quit [Ping timeout: 255 seconds]
edwinvdgraaf has quit [Ping timeout: 276 seconds]
tvw has quit []
<Mon_Ouie>
leekme: 'rescue' without a class name is rescue StandardError, it only rescues exceptions that are instances of subclasses of StandardError
sharpmachine has joined #ruby
paulcsmith has joined #ruby
<GPrime>
jhass Oh i guess that's true
k3asd` has quit [Ping timeout: 264 seconds]
<quazimodo>
ZOMGITSABEAR: we have an eternal tug of war with clients over that very concept
Soda has quit [Remote host closed the connection]
<Darkwater>
well adaedra
<Darkwater>
I finally got ruby-ed to work
<GPrime>
jhass what site would you recommend?
granthatcher has joined #ruby
momomomomo has quit [Ping timeout: 246 seconds]
granthatcher has quit [Max SendQ exceeded]
<adaedra>
Darkwater: nice
<Darkwater>
the main issue was sed being buffered -.-"
paulcsmith_ has joined #ruby
<Darkwater>
so output wasn't sent immediately
<leekme>
Mon_Ouie: Thank's ;) Is there a way to rescue any kinds of exceptions ?
<Darkwater>
but yeah, it's all set now
kekumu has quit [Quit: kekumu]
<jhass>
GPrime: Pine's seems generally recommended and I haven't heard many complaints about it
granthatcher has joined #ruby
momomomomo has joined #ruby
Marsupermammal has joined #ruby
granthatcher has quit [Max SendQ exceeded]
paulcsmith has quit [Read error: Connection reset by peer]
mdw has joined #ruby
kekumu has joined #ruby
<Mon_Ouie>
leekme: Explicitly 'rescue Exception'
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
adaedra is now known as undeadaedra
<volty>
There are a number of stories about Euclid which may or may not be founded on truth. When King Ptolemy I of Egypt asked him for a short course in Geometry, he is reported to have replied that "there is no royal road to Geometry." Another story concerns a student who asked what was the use of learning Geometry. Euclid did not reply but instructed his servant to give the student a few coins since he must profit from all that
<volty>
he learns.
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
<leekme>
Mon_Ouie: Thanks for your help, I will try this
<Mon_Ouie>
(notice that in real code you should be as specific as you can be about what exceptions you rescue, and not catch all of them like that)
<Darkwater>
undeadaedra: it might not be a very smart idea to use apt-get over irc :v
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
snockerton has joined #ruby
<undeadaedra>
Darkwater: I don't see what you mean. What could go wrong? :v
dhjondoh has quit [Remote host closed the connection]
<Darkwater>
dunno
<Darkwater>
maybe the files will be asciified?
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
granthatcher has joined #ruby
granthatcher has quit [Max SendQ exceeded]
BanzaiJoe has joined #ruby
<Darkwater>
undeadaedra: you should join me
<Darkwater>
it woorks
<undeadaedra>
where are you again?
<Darkwater>
actually if anyone feels like rubying over irc
granthatcher has joined #ruby
<Darkwater>
#ruby-ed
<undeadaedra>
#ruby-ed
<undeadaedra>
>_>
<undeadaedra>
you saw nothing
<Darkwater>
heh
Soda has joined #ruby
granthatcher has quit [Client Quit]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Scrofff has quit [Remote host closed the connection]
<ZOMGITSABEAR>
If you do not know how to use PowerShell on Windows, Terminal on OS X, or bash on Linux then you need to go learn that first. You should do the exercises in Appendix A first before continuing with these exercises.
sharpmachine has quit [Remote host closed the connection]
<ZOMGITSABEAR>
should i stop learning ruby and go learn powershell?
Scroff has joined #ruby
<ljarvis>
everyone should learn powershell
<ljarvis>
how do you even programwithout knowing it
<ZOMGITSABEAR>
ok
<GPrime>
my opinion is you can learn it as you go
darkf has quit [Quit: Leaving]
<ljarvis>
ZOMGITSABEAR: im kidding dont do that
<ZOMGITSABEAR>
oh
<ZOMGITSABEAR>
so i should just keep going?
<ljarvis>
ZOMGITSABEAR: are you on windows?
<ZOMGITSABEAR>
8.1, yes
<quazimodo>
ZOMGITSABEAR: no
<ZOMGITSABEAR>
?
<undeadaedra>
Learn to use your shell for basic things
<undeadaedra>
change directories, run programs
<ljarvis>
i'd keep going, if you get stuck then you can check out powershell docs but you should have a basic idea of how it works
<ZOMGITSABEAR>
i can use cmd well enough
<quazimodo>
ZOMGITSABEAR: your environment (windows, mac, linux{yay!}) is part of your toolset
<ZOMGITSABEAR>
i know how to change directories and run programs
<quazimodo>
you develop that as you go too
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<nofxx>
wtf is powershell?
<ljarvis>
then you're good to go
<ZOMGITSABEAR>
ah ok
<ljarvis>
nofxx: windows
fedexo has joined #ruby
<ljarvis>
ZOMGITSABEAR: also, you should totally sack off windows
<ljarvis>
just sayin
allomov has quit [Remote host closed the connection]
<nofxx>
ljarvis, ahh... as in windows 95? I remember, I have some (bad) memories.
datanoise has quit [Ping timeout: 240 seconds]
<ljarvis>
nofxx: no, powershell is built on .net I think. So Windows XP and later
n008f4g_ has quit [Quit: leaving]
<quazimodo>
it's some piece of crap
The_Phoenix has joined #ruby
<ljarvis>
nofxx: you're probably just thinking of cmd.exe
<quazimodo>
ZOMGITSABEAR: you'll have the best time programming in a linux
<nofxx>
ljarvis, joking about windows... hehe sadly that's not true... still need it to play asseto corsa =P
<quazimodo>
macs come pretty close too
intinig has quit [Remote host closed the connection]
<quazimodo>
but not all the way
_seanc_ has joined #ruby
<ljarvis>
nofxx: aye it's good for playing :)
<quazimodo>
although they do look nice
<quazimodo>
hrm
k3asd`_ has quit [Ping timeout: 255 seconds]
<quazimodo>
making half a million regular classes is faster than BasicObject
_seanc__ has joined #ruby
<ZOMGITSABEAR>
when i'm opening a .txt file from powershell, what is the proper method?
nikhgupta has quit [Remote host closed the connection]
<ZOMGITSABEAR>
if i'm in the directory, don't i just type the name of the file?
skysploit has joined #ruby
nonparfumee has joined #ruby
nikhgupta has joined #ruby
bwicklund has quit [Ping timeout: 245 seconds]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<ljarvis>
ZOMGITSABEAR: no that's for running executables, you'd need to run a command to open the file ie in a specific program
quimrsto_ has joined #ruby
sandstro_ has joined #ruby
<ljarvis>
I think you can use the start command
<ZOMGITSABEAR>
wait, i figured it out
<ljarvis>
i.e start textedit c:\path\etc
nikhgupta has quit [Remote host closed the connection]
JakFrist has joined #ruby
_seanc_ has quit [Ping timeout: 256 seconds]
_seanc__ is now known as _seanc_
<ZOMGITSABEAR>
"if you trust the program, instead type .\<fileneame>
<ZOMGITSABEAR>
"
<ljarvis>
ah
<ljarvis>
go figure
<ZOMGITSABEAR>
right?
justintv90 has quit [Ping timeout: 245 seconds]
startupality has quit [Read error: Connection reset by peer]
<ZOMGITSABEAR>
so what are array functions?
quimrstorres has quit [Ping timeout: 264 seconds]
yoongkang has joined #ruby
<ljarvis>
ZOMGITSABEAR: could you elaborate?
druznek has quit [Quit: Leaving]
rubie has quit [Remote host closed the connection]
<ZOMGITSABEAR>
Thanks to search engines such as Google you can easily find anything I tell you to find. If I say, "search online for the ruby array functions" then you simply do this:Go to http://google.com/Type: ruby array functionsRead the websites listed to find the best answer.
ahmetkapikiran has joined #ruby
<ZOMGITSABEAR>
in the book that was suggested i read here
<ljarvis>
what book is this?
<ZOMGITSABEAR>
learn ruby the hard way
<ljarvis>
it says "array functions"?
<ZOMGITSABEAR>
yep
startupality has joined #ruby
spider-mario has joined #ruby
<ljarvis>
bleh
<BanzaiJoe>
where's my hand? where's my face?
<BanzaiJoe>
let's put the two together!
<ZOMGITSABEAR>
why bleh?
rubie has joined #ruby
sandstrom has quit [Ping timeout: 252 seconds]
<BanzaiJoe>
in Ruby Arrays are objects
armyriad has quit [Quit: Leaving]
<apeiros>
there are no functions in ruby
<ljarvis>
ZOMGITSABEAR: everything in Ruby is an Object, so there are no functions
<ZOMGITSABEAR>
hmm
ahmetkapikiran has quit [Client Quit]
InternetFriend has joined #ruby
Hounddog has quit [Remote host closed the connection]
<Abhijit>
if everything is object then who is class?
corehook has quit [Remote host closed the connection]
<volty>
a special object
<jhass>
Abhijit: an instance of Class
sharpmachine has joined #ruby
<jhass>
and yes, Class too is an instance of Class
<ljarvis>
they're methods, and they all have receivers unless they're unbound
<quazimodo>
to rephrase, a milion instances of regular classes is 4 times faster than a million instances of Struct
<BanzaiJoe>
quazimodo but where's the sugar in that ;)
<ljarvis>
you know what Struct does right?
<ljarvis>
it's for convenience, not speed
<yorickpeterse>
for real speed you should use OpenStruct
<undeadaedra>
If you need speed at any price, go do C
<workmad3>
quazimodo: could be worse... you could be using OpenStruct :D
rubie has quit [Ping timeout: 265 seconds]
<ljarvis>
:D
momomomomo has quit [Quit: momomomomo]
<ljarvis>
OpenAwful
<workmad3>
OpenStruct - for people who think method caches are for wusses
nikhgupta has joined #ruby
<ljarvis>
give me a cold method cache any day
_seanc_ has quit [Quit: _seanc_]
pontiki has joined #ruby
<phat4life>
what do you mean by method cache?
<yorickpeterse>
IIRC it wrecked more than your method cache
<quazimodo>
hrm
<yorickpeterse>
but I can't remember what it was
strixd has quit [Quit: 500]
<yorickpeterse>
phat4life: Ruby will remember where a method originated form when called
<volty>
what should I use if I want something like «ordered hash» behavior ?
<quazimodo>
using def initialize(args = {}) is like 2.5 x slower than def initialize(arg1, arg2, etc...)
<yorickpeterse>
That way the next time it doesn't have to go through the pain of finding that out
<ljarvis>
hashes aren't ordered
<yorickpeterse>
volty: Ruby 1.9 has ordered hash keys
<phat4life>
yorickpeterse: ah, so low level mri stuff?
<yorickpeterse>
phat4life: yes
paulcsmith_ has quit [Quit: Be back later ...]
<phat4life>
word
<ljarvis>
yorickpeterse: stahp
mleung has joined #ruby
<ljarvis>
loaded gun
<volty>
thx, good to know
<ljarvis>
^
<ljarvis>
see what you did
<volty>
never mind, nothing critical
<phat4life>
ljarvis: wait, so whats the deal with OpenStruct and method cache?
<yorickpeterse>
?
<yorickpeterse>
ljarvis: honestly I don't really see the problem with depending on hash keys being ordered
AlphaAtom has joined #ruby
k3asd` has joined #ruby
dopie has quit [Quit: This computer has gone to sleep]
<yorickpeterse>
phat4life: OpenStruct clears a method cache upon every instance created
<phat4life>
ah
<yorickpeterse>
errr as in, I think it clears the entire method cache
<yorickpeterse>
of everything
AlphaAtom has quit [Max SendQ exceeded]
<yorickpeterse>
but I haven't really kept up with it
AlphaAtom has joined #ruby
rubie has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
<quazimodo>
I like openstruct or some things
anisha has quit [Quit: Leaving]
<quazimodo>
pretty nice for a flexible coniguration data type
JakFrist has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
antgel has quit [Ping timeout: 256 seconds]
justintv90 has joined #ruby
AlphaAtom has joined #ruby
<apeiros>
yorickpeterse: I think newer rubies improved somewhat in that regard
dopie has joined #ruby
<apeiros>
but I think OS still leaks memory
Vile` has quit [Read error: Connection reset by peer]
pengin has joined #ruby
michaeldeol has joined #ruby
<apeiros>
i.e. there was a "benchmark" somewhere where OS vs. Hash was like 80MB in difference in a real world application over a short period of time.
tomphp_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
leekme has quit []
<quazimodo>
OS leaks memory?
<quazimodo>
why??
<volty>
I like the hash syntax. I need it for fast assigning to various vars to be iterated over (for gui dialogs) . I need a tree-like structure that can preserve that order of inserting. That's all, for now.
dfockler has joined #ruby
<volty>
s/that/the/
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<bootstrappm>
as we're talking about OSes / manufacturers, I want to start something like system76! :D
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
<havenwood>
If I can convince any other OS X user to install pkgin and Ruby with that gist ^ I'd love to get feedback.
ziprar has quit [Quit: Leaving]
<havenwood>
It plays nice alongside Brew if that's your thing.
<bootstrappm>
but with elementary os instead of ubuntu
<BanzaiJoe>
bootstrappm you do realize what a difficult moving(!) target to hit that is, right?
zipace has joined #ruby
<bootstrappm>
no I don't :(
gianlucadv has quit [Remote host closed the connection]
<bootstrappm>
how difficult? how moving?
Scroff has quit [Remote host closed the connection]
<BanzaiJoe>
have you seen the Yoga 3 implemenations?
konieczkow has quit [Ping timeout: 272 seconds]
Xiti has joined #ruby
<bootstrappm>
I had a yoga 2 then sold it ... let me look up the yoga 3 real quick
gianlucadv has joined #ruby
bMalum_ has joined #ruby
fabrice31 has joined #ruby
Scroff has joined #ruby
bMalum has quit [Ping timeout: 256 seconds]
bMalum_ is now known as bMalum
codecop has joined #ruby
GPrime has joined #ruby
<volty>
k/join #qt
<bootstrappm>
looks pretty much same just beefier. I guess system76 was a bad example, I want to build desktops. I'm in Guatemala, those still sell a lot in LatAm
AlphaAtom has joined #ruby
cndiv has joined #ruby
<BanzaiJoe>
I don't know much about elementary os, yoga 3 with ubuntu and system76 are linux laptops, you're talking about changing hardware and change operating systems. laptop hardware is actually very dynamic
<BanzaiJoe>
ahhhh
lkba has quit [Ping timeout: 255 seconds]
gianlucadv has quit [Remote host closed the connection]
<bootstrappm>
there was a sale on the Fractal Design r4 yesterday (awesome case for $60) that I missed :'(
bgmarx has quit [Remote host closed the connection]
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
<bootstrappm>
that looks cool
<dfockler>
it's like a mac mini
<bootstrappm>
didn't even know about NUC - thanks!
slackbotgz has quit [Remote host closed the connection]
slackbotgz has joined #ruby
bgmarx has joined #ruby
<BanzaiJoe>
anytime
<dorei>
nuc is the future
<dorei>
check ubuntu orange box :D
kk33 has quit [Ping timeout: 255 seconds]
caseypatrickdris has quit [Remote host closed the connection]
<BanzaiJoe>
I do wonder about Chromebooks, kids will have more and more access to them before Win or Mac. If ever there was a need to get computer literacy and exposure to programming it will likely be through Chromebooks. I don't know what that will look like but that's my bet.
mleung has joined #ruby
Scroff has quit [Remote host closed the connection]
<Deck`>
https://dpaste.de/xTNP is it possible to get variables created in class evaluation ?
simplyianm has quit [Read error: Connection reset by peer]
langland_ has joined #ruby
<dfockler>
BanzaiJoe: Is OLPC still a thing? That was a cool idea
<bootstrappm>
Deck`: mmm I've only seen what you're trying to do with a done with instance variables
The_Phoenix has quit [Quit: Leaving.]
simplyianm has joined #ruby
<bootstrappm>
which are set in a method, not in the class eval. If you create @a in the class eval its a class instance variable I believe which is not the same thing
<bootstrappm>
Deck`: if you want want the variable to be available before assigning anything to it look up attr_accessor. Then use it as instance.a, for example; that'll return nil if you haven't set @a to anything
snockerton has quit [Ping timeout: 264 seconds]
<BanzaiJoe>
dfockler short answer no, but I do think it achieved some of it's goals of cost reduction in areas that allow for others to follow up.
<Deck`>
jhass, I have a function which creates Context class and return it. I want to make it possible to have nested context.
jxpx777 has joined #ruby
<Deck`>
sorry, Context object
<havenwood>
Deck`: Can you Gist the code?
bMalum has quit [Quit: bMalum]
rbowlby has joined #ruby
atomical_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
n1x has quit [Ping timeout: 240 seconds]
platzhirsch has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
elev has joined #ruby
<elev>
I downloaded gosu, but I dont know if it worked, how can I check it?
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
Deck`: class Context; def thing(&block); @context = Context.new; ...; end; def run; @context.run if @context; ...; end; end;
mleung has quit [Quit: mleung]
mdz_ has joined #ruby
coderhs has quit [Ping timeout: 255 seconds]
<jhass>
maybe name it @child_context or even make it an array if multiple are a possibility
platzhirsch has quit [Ping timeout: 272 seconds]
nobitanobi has joined #ruby
djbkd has joined #ruby
<jhass>
but basically recreate your DSL in the Context class, perhaps extracting the common parts into a module you can include into both the toplevel and Context
sarkyniin has quit [Ping timeout: 246 seconds]
wallerdev has joined #ruby
<Deck`>
jhass, actually I try to implement something like context or describe methods in rspec.
<jhass>
yup, I recognized
sandstro_ has quit [Quit: My computer has gone to sleep.]
platzhirsch has joined #ruby
justintv90 has quit [Remote host closed the connection]
Lucky__ has joined #ruby
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
DrShoggoth has joined #ruby
jenrzzz has joined #ruby
Abhijit has quit [Quit: Bye.]
platzhirsch1 has joined #ruby
nonparfumee has joined #ruby
sanguisdex has quit [Remote host closed the connection]
platzhirsch has quit [Ping timeout: 265 seconds]
ottlikg has joined #ruby
master44 has quit [Quit: Lost terminal]
GnuYawk has quit [Quit: WeeChat 1.0]
sanguisdex has joined #ruby
kobain has joined #ruby
Parker0 has quit [Ping timeout: 255 seconds]
Igorshp has quit [Remote host closed the connection]
sanguisdex has quit [Client Quit]
musgravejw has quit [Read error: Connection reset by peer]
krisquigley has joined #ruby
Azure has quit [Read error: Connection reset by peer]
someword has quit [Read error: Connection reset by peer]
Zai00 has quit [Quit: Zai00]
musgravejw has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
Spami has joined #ruby
maxshelley has joined #ruby
Azure has joined #ruby
Jackneill has quit [Ping timeout: 244 seconds]
Marsupermammal has quit [Read error: Connection reset by peer]
someword has joined #ruby
tomphp has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Read error: Connection reset by peer]
nixmaniack has joined #ruby
sanguisdex has joined #ruby
mrmargol_ has joined #ruby
krisquigley has quit [Ping timeout: 250 seconds]
flughafen_ has quit [Ping timeout: 256 seconds]
cb__ has joined #ruby
fantazo has joined #ruby
quimrstorres has joined #ruby
jenrzzz has quit [Ping timeout: 265 seconds]
<Deck`>
jhass, actually it supports lazy evaluation. I mean that contexts are created in any level but they should be evaluated when the root context is run only
djbkd has joined #ruby
<jhass>
Deck`: my solution should do that
<jhass>
just check @context after running
n1x has quit [Ping timeout: 250 seconds]
kirun has joined #ruby
alem0lars___ has joined #ruby
alem0lars__ has quit [Ping timeout: 246 seconds]
snockerton1 has quit [Quit: Leaving.]
<jhass>
it'll harm full example randomization but I can't think of any lazy evaluation approach that doesn't
tcarter1719 has joined #ruby
mrmargolis has quit [Ping timeout: 276 seconds]
volty has quit [Ping timeout: 245 seconds]
elev has joined #ruby
tcarter1719 has quit [Max SendQ exceeded]
nixmaniack has quit [Ping timeout: 246 seconds]
mikecmpbll has joined #ruby
Notte has joined #ruby
baweaver has joined #ruby
msgodf has quit [Ping timeout: 265 seconds]
snockerton has joined #ruby
RegulationD has quit [Remote host closed the connection]
TheHodge has quit [Quit: Connection closed for inactivity]
rbennacer has quit [Remote host closed the connection]
RegulationD has joined #ruby
bgmarx has quit [Remote host closed the connection]
Rollabunna has joined #ruby
sandstrom has joined #ruby
bootstrappm has quit [Ping timeout: 255 seconds]
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
aaeron has joined #ruby
quimrsto_ has joined #ruby
maxshelley has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sdwrage has quit [Quit: This computer has gone to sleep]
gaboesquivel has joined #ruby
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<BanzaiJoe>
careful, there's an automatic rate check
startupality has quit [Quit: startupality]
ElChoppo has joined #ruby
<master44>
in the gisthub is the code correct? still works?
Rollabunna has quit [Ping timeout: 265 seconds]
corehook has joined #ruby
kekumu has quit [Remote host closed the connection]
cosmicexplorer has quit [Remote host closed the connection]
beneggett has quit [Quit: ...zzz ¯\_(ツ)_/¯ zzz...]
infoget has quit [Quit: Leaving.]
pingveno has joined #ruby
<pingveno>
I'm not sure if this is the right channel for this, but... Is there a way to convert a Ruby File to a Java InputStream in JRuby? My search skills are failing me.
<Deck`>
jhass, I managed to do what I want, thank you very much
<jhass>
Deck`: cool, did you went with basically my approach or did you find something else?
araujo has quit [Quit: Leaving]
sdwrage has quit [Ping timeout: 264 seconds]
Scroff has joined #ruby
s2013 has quit [Read error: Connection reset by peer]
marr has quit [Ping timeout: 246 seconds]
konieczkow has quit [Ping timeout: 265 seconds]
<Deck`>
jhass, your approach, but instead of having @child_context I set @child_contexts = [] and calling run on each instances to make it possible to have several child contexts
<jhass>
k, cool, just curious ;)
platzhirsch1 has left #ruby [#ruby]
bgmarx has joined #ruby
stamina has quit [Ping timeout: 245 seconds]
sarkyniin has joined #ruby
blackmesa has joined #ruby
<master44>
jhass the rdoc doesnt show good about files
lkba_ has quit [Ping timeout: 272 seconds]
<master44>
jk found it now :P
araujo has joined #ruby
araujo has quit [Changing host]
araujo has joined #ruby
pandaant has joined #ruby
svoop has joined #ruby
J4R0D has quit []
InternetFriend has joined #ruby
<master44>
nope, jhass doesnt say anything about how the program can read a file
zz_Outlastsheep is now known as Outlastsheep
<jhass>
quote
<jhass>
Examples:
<jhass>
Reading from “testfile”:
atomical has joined #ruby
mesamoo has quit [Ping timeout: 240 seconds]
workmad3 has quit [Ping timeout: 256 seconds]
mesamoo has joined #ruby
<master44>
where?
pengin has quit []
edwinvdgraaf has quit [Remote host closed the connection]
<jhass>
in my link
sinkensabe has joined #ruby
flughafen_ has joined #ruby
yardenbar has joined #ruby
edwinvdgraaf has joined #ruby
tercenya has joined #ruby
<master44>
ahh
dumdedum has quit [Ping timeout: 272 seconds]
tlarevo has joined #ruby
<master44>
so thats just print all the things that is in the file
momomomomo has joined #ruby
jpfuentes2 has joined #ruby
DaniG2k has joined #ruby
bMalum has joined #ruby
<master44>
jhass how can I print all of the file? not just one line?
<jhass>
what makes you say you don't?
<master44>
the gets
<master44>
but without gets nothing happend
<jhass>
your example doesn't use gets
baweaver has quit [Remote host closed the connection]
<jhass>
the one in the docs does
sinkensabe has quit [Ping timeout: 244 seconds]
<master44>
you mean my example?
<master44>
I am using your example from rdoc
nixmaniack has quit [Ping timeout: 255 seconds]
segfalt has quit [Quit: segfalt]
aaeron has quit [Quit: Leaving.]
bgmarx_ has joined #ruby
bootstrappm has joined #ruby
rdark has quit [Quit: leaving]
torpig has quit [Ping timeout: 265 seconds]
aaeron has joined #ruby
<master44>
I understand what you mean now I try :P
quimrsto_ has quit [Ping timeout: 272 seconds]
tedstriker has quit [Quit: Anti-Fraping status set.]
djbkd has quit [Remote host closed the connection]
<master44>
still doesnt work
segfalt has joined #ruby
k3asd` has quit [Ping timeout: 256 seconds]
bgmarx has quit [Ping timeout: 245 seconds]
Cust0sLim3n has quit [Ping timeout: 246 seconds]
pontiki has quit [Quit: ZZZZZZZZ<clunk>NNNNNNNNN]
mattbillock has joined #ruby
quimrstorres has joined #ruby
<master44>
I found the game.. thanks
<master44>
code*
swills has joined #ruby
master44 has left #ruby [#ruby]
nobitanobi has quit [Remote host closed the connection]
postmodern has joined #ruby
mattbillock has quit [Remote host closed the connection]
<master44>
the #$ happens every time you click but what if I just want it to add to spesific things
<jhass>
master44: btw why don't you leave your client running?
<master44>
what you mean jhass?
<jhass>
you very often close and reopen your client
<master44>
how can I do that?
ndrei has quit [Ping timeout: 256 seconds]
<master44>
I use terminal on macbook
<jhass>
you just leave it running
<master44>
how?
<master44>
xd
<jhass>
by not closing it
<master44>
it just happens I dont do anything
<master44>
when I go to facebook 5 minutes
<master44>
and come back
<master44>
it automaticly reconnects
<jhass>
bullshit, it happens if you're satisfied with an answer
<master44>
I dont leave never
ndrei has joined #ruby
<master44>
no
<master44>
sometimes yes but not always
<jhass>
yes
jaycee has joined #ruby
<master44>
like 3 min ago
<master44>
I was going to toilet and when I came back it reconnect
<jhass>
I've been watching it, it's not like that
<master44>
well ok
<master44>
I will just leave it open and see
<Ox0dea>
You should've stayed in the toilet.
<master44>
LOL
<master44>
dude pls
<Ox0dea>
no u
<master44>
0x0dea?
<master44>
what if I want it to add only when you press spesific things?
AlphaAtom has joined #ruby
AlphaAtom has quit [Max SendQ exceeded]
balazs has quit [Read error: Connection timed out]
deric_skibotn has joined #ruby
AlphaAtom has joined #ruby
flughafe1 has joined #ruby
bMalum has quit [Quit: bMalum]
rbowlby has quit [Ping timeout: 265 seconds]
_seanc_ has joined #ruby
balazs has joined #ruby
chris613 has joined #ruby
rubie has joined #ruby
<Ox0dea>
master44: Incrementing a counter is way beyond my current level of Ruby knowledge, I'm afraid.
benegget_ has joined #ruby
<master44>
dude why are you that way man
<master44>
why you hate me?
<Ox0dea>
I hate what you are, not who you are.
<chris613>
Can someone explain to me why a = var || raise "var must be set" gives me a syntax error, whereas a = var || raise("var must be set") does not?
<master44>
I am a 13 year old boy with autism who want to try to learn ruby
<master44>
so pls
<master44>
stfu
baweaver has joined #ruby
<master44>
I got a type of autism so I am not that good social but pls dont be mean to me
beneggett has quit [Read error: No route to host]
segfalt has joined #ruby
flughafen_ has quit [Ping timeout: 264 seconds]
cirn0 has quit [Read error: Connection reset by peer]
cirn0 has joined #ruby
InternetFriend has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
decoponio has quit [Quit: Leaving...]
<master44>
and btw I did it without you gets.chomp += 1
<master44>
I dont even want to get help from you, jhass how can I ignore a user?
<jhass>
lol
<jhass>
chris613: because the || binds stronger than the method argument (yes, raise is a method call)
<master44>
he is so mean all time
kadoppe has quit [Ping timeout: 252 seconds]
allomov has joined #ruby
corehook has joined #ruby
ramfjord has joined #ruby
wildroman2 has joined #ruby
<chris613>
jhass: Thanks!
<jhass>
chris613: a = var or raise "var must be set" would be valid too, but I'd encourage you to just do it on two lines
quimrstorres has joined #ruby
baweaver has quit [Remote host closed the connection]
iceden has quit [Remote host closed the connection]
<Ox0dea>
>> nil || p 1
<ruboto>
Ox0dea # => /tmp/execpad-9a0ffbf4218a/source-9a0ffbf4218a:2: syntax error, unexpected tINTEGER, expecting keywor ...check link for more (https://eval.in/382685)
<Ox0dea>
chris613: ^ Just to clarify.
baweaver has joined #ruby
<rb4637>
Is this code synchronous in Ruby? open('myfile.out', 'a') { |f| f.puts "Hello, world." }
<rb4637>
in other words, does the append file complete before moving to the line below open?
<Ox0dea>
Yes.
<rb4637>
are you sure?
bash33 has joined #ruby
<jhass>
yes
<rb4637>
ok thanks
<phat4life>
>> "1.#{'1'*1000000000000000}".to_f
<ruboto>
phat4life # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/382686)
kadoppe has joined #ruby
wallerdev has quit [Quit: wallerdev]
chris613 has left #ruby [#ruby]
<phat4life>
>> "1.#{'1'*10000000000000}".to_f
<ruboto>
phat4life # => bignum too big to convert into `long' (RangeError) ...check link for more (https://eval.in/382687)
<master44>
jhass do you own this channel?
<phat4life>
that bit of ruby, my computer doesnt like it
ogpastaling has quit [Write error: Connection reset by peer]
fabrice31 has joined #ruby
_ht has quit [Quit: Konversation terminated!]
El3ktra has quit [Read error: Connection reset by peer]
MatthewsFace has quit [Read error: Connection reset by peer]
pontiki has quit [Quit: ZZZZZZZZ<clunk>NNNNNNNNN]
MatthewsFace has joined #ruby
lavros has quit [Ping timeout: 252 seconds]
rbowlby has joined #ruby
lavros has joined #ruby
jenrzzz has joined #ruby
revath has joined #ruby
kinduff has quit [Quit: leaving]
revath has left #ruby [#ruby]
sinkensabe has joined #ruby
JoshL_ has joined #ruby
JoshL has quit [Read error: Connection reset by peer]
fabrice31 has quit [Ping timeout: 252 seconds]
jenrzzz_ has quit [Ping timeout: 272 seconds]
pipework is now known as Spaceghostc2c
fedexo has quit [Ping timeout: 265 seconds]
x1337807x has joined #ruby
<rb4637>
File.open('file.txt', 'wb') do |f|
<rb4637>
f.write('foo')
<rb4637>
f.write('bar')
<rb4637>
end
<rb4637>
Does the second .write append "bar" to the file?
<rb4637>
or overwrite the whole file?
cb_ has joined #ruby
cb_ has joined #ruby
<undeadaedra>
try it and cat the file ;)
baweaver has quit [Remote host closed the connection]
svoop has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
djbkd has quit [Remote host closed the connection]
jenrzzz has quit [Ping timeout: 265 seconds]
rbowlby_ has joined #ruby
jenrzzz has joined #ruby
pontiki has joined #ruby
Akagi201_ has joined #ruby
wallerdev has joined #ruby
djbkd has joined #ruby
benegget_ has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
djbkd has joined #ruby
toretore has joined #ruby
rbowlby has quit [Ping timeout: 264 seconds]
Akagi201 has quit [Ping timeout: 255 seconds]
jgpawletko has joined #ruby
ottlikg has quit [Ping timeout: 265 seconds]
momomomomo has quit [Ping timeout: 252 seconds]
baweaver has joined #ruby
momomomomo has joined #ruby
<arup_r>
ok bye
jenrzzz has quit [Ping timeout: 256 seconds]
sharpmachine has quit [Remote host closed the connection]
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
sinkensabe has quit [Remote host closed the connection]
__butch__ has joined #ruby
<yorickpeterse>
rb4637: you'll end up with "foobar"
<rb4637>
yeah, thanks
<rb4637>
:)
Ox0dea has quit [Ping timeout: 265 seconds]
lavros has quit [Ping timeout: 256 seconds]
workmad3 has joined #ruby
lavros has joined #ruby
baweaver has quit [Remote host closed the connection]
solars has joined #ruby
DLSteve has joined #ruby
rb4637 has quit [Quit: rb4637]
_seanc_ has quit [Quit: _seanc_]
allomov has quit [Remote host closed the connection]
<yorickpeterse>
oh boy, seems this week I finally get to write code that converts XPath to Ruby
<yorickpeterse>
:<
unshadow has quit [Ping timeout: 265 seconds]
balazs has quit [Read error: Connection reset by peer]
workmad3 has quit [Ping timeout: 265 seconds]
balazs has joined #ruby
<Rager>
why do that?
aeze has quit [Quit: aeze]
mrmargol_ has quit [Remote host closed the connection]
k3asd` has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<yorickpeterse>
Right, so the background is: Oga (https://github.com/YorickPeterse/oga) has support for XPath queries but it's rather slow (due to a bunch of reasons)
quimrstorres has quit [Remote host closed the connection]
<yorickpeterse>
The idea I had is to throw away everything it currently uses for evaluating XPath queries and instead generate Ruby code based on an XPath query
jenrzzz has joined #ruby
<yorickpeterse>
Said Ruby code would do what it takes to get the right stuff out of a document
gianlucadv has quit [Ping timeout: 264 seconds]
<yorickpeterse>
But without having to write a fully fledged interpreter
wallerdev has quit [Quit: wallerdev]
<yorickpeterse>
One of the benefits is that you can generate very specific snippets of code, cache these and have them JIT compiled (in case of JRuby/Rubinius)
<sdegutis>
yorickpeterse: also im working with *really badly* formatted html with all sorts of badnesses in it
shock_one has quit [Ping timeout: 264 seconds]
<sdegutis>
yorickpeterse: so im gonna put my foot in nokogiris bucket because its tried/true even if badly implemented
yfeldblum has joined #ruby
<yorickpeterse>
Oga supports fucked up HTML just fine
blackmesa has joined #ruby
<sdegutis>
yorickpeterse: well *maybe* i might use yours
mdw has quit [Ping timeout: 250 seconds]
musgravejw has joined #ruby
<sdegutis>
yorickpeterse: but if i do, and if it works, know this: i will thank the crap out of you
centrx has joined #ruby
<yorickpeterse>
Not suggesting you'd move now of course, that might be too costly, just saying that in general document modifications are a bit of a PITA in Nokogiri
<yorickpeterse>
e.g. to create an element you do Nokogiri::XML::Element.new('name here', document)
<yorickpeterse>
in oga it's just Oga::XML::Element.new(:name => 'name here')
<yorickpeterse>
sdegutis: ah ok, I thought this might've been an entire app
griffindy has joined #ruby
<sdegutis>
im seriously head scratching at this guy who wrote these html files. he wrote them 20 years ago, and he's been editing them FOR 20 YEARS with no source files, just the htm files
<sdegutis>
shared headers, everything!
<yorickpeterse>
replace Nokogiri::HTML() with Oga.parse_html(), replace //* in the XPath with descendant-or-self::* (//* sucks for performance, like really badly)
<sdegutis>
yorickpeterse: hahaha noted
<yorickpeterse>
Oga doesn't have a "replace" method, so you need to use the "before" method in the above gist
<sdegutis>
brb gem installing oga
<yorickpeterse>
then you should be set
<sdegutis>
yorickpeterse: add #replace plz
<sdegutis>
or ill monkey patch it (a threat, not a promise)
segfalt has joined #ruby
<yorickpeterse>
heh
<yorickpeterse>
I'll add it as a ticket since it is sorta useful
<ruboto>
pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
Luyt_ has quit [Ping timeout: 256 seconds]
kriskropd has joined #ruby
lkba has joined #ruby
fabrice31 has quit [Ping timeout: 240 seconds]
<nitenq>
output : test 42 1434493071
<yorickpeterse>
nitenq: that's probably a method defined in Sensu::Plugin::Metric::CLI::Graphite or somewhere else
blackmesa has quit [Quit: WeeChat 1.2]
<yorickpeterse>
There's no actual "ok" keyword
sharpmachine has quit [Remote host closed the connection]
dgutierrez1287 has quit [Remote host closed the connection]
solars has quit [Ping timeout: 246 seconds]
<nitenq>
all right thanks
whippythellama has quit [Quit: WeeChat 1.2]
evanjs has joined #ruby
cb_ has quit [Remote host closed the connection]
hefest has quit [Ping timeout: 276 seconds]
sharpmachine has joined #ruby
cb_ has joined #ruby
qwertme has joined #ruby
rubie has joined #ruby
CpuID has joined #ruby
CpuID has quit [Client Quit]
yfeldblum has quit [Remote host closed the connection]
djbkd has quit [Read error: Connection reset by peer]
CpuID has joined #ruby
djbkd has joined #ruby
rbennacer has quit [Remote host closed the connection]
zenguy_pc has quit [Read error: Connection reset by peer]
evanjs has quit [Remote host closed the connection]
DEA7TH has quit [Ping timeout: 250 seconds]
zenguy_pc has joined #ruby
dzejrou has quit [Ping timeout: 265 seconds]
Musashi007 has quit [Quit: Musashi007]
hefest has joined #ruby
sharpmachine has quit [Remote host closed the connection]
rubie has quit [Ping timeout: 265 seconds]
sharpmachine has joined #ruby
rubie has joined #ruby
simplyianm has quit [Read error: Connection reset by peer]
kirun has quit [Quit: Client exiting]
yfeldblum has joined #ruby
shinnya has quit [Ping timeout: 245 seconds]
simplyianm has joined #ruby
malconis has joined #ruby
DrShoggoth has quit [Quit: Leaving]
pragmatism has joined #ruby
<EasyCo>
Say you're using a gem, and you initialise the gem's class with arguments. How would you expect those arguments to be validated? On instantiation and throw and exception? On instantiation and return nil but have an #errors method (a-la Rails)? Manually run a #valid? method on instance after and get a list of #errors.
evanjs has joined #ruby
gluten_hell_ has quit [Quit: Computer has gone to sleep.]
simplyianm has quit [Remote host closed the connection]
simplyianm has joined #ruby
malconis has quit [Ping timeout: 255 seconds]
realDAB has joined #ruby
enebo has quit [Quit: enebo]
<havenwood>
EasyCo: I'd expect duck typing and that it'd blow up wherever it stops quacking.
<havenwood>
NoMethodError: undefined method `quack' for nil:NilClass
bruno- has joined #ruby
apt-get_ has quit [Quit: Quit]
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
mikecmpbll has quit [Quit: i've nodded off.]
otherj has quit [Quit: .]
mikecmpbll has joined #ruby
_seanc__ has joined #ruby
<centrx>
That means it's not a duck
pragmati_ has joined #ruby
northfurr has quit [Quit: northfurr]
<meatchicken>
Anyone familiar with lat/lng math here?
Zai00 has quit [Quit: Zai00]
northfurr has joined #ruby
<meatchicken>
I have a point(lat/lng) and a distance. I need to figure out if another point is within the "circle"
<EasyCo>
havenwood: Unfortunately in this instance duck typing wouldn't work because the gem takes information and outputs a parsed plain text file. So the user could really give it whatever value they want as long as it's a string within a certain max length. I'm just undecided of the best way to deal with that validation.
pragmati_ has quit [Client Quit]
pragmatism has quit [Ping timeout: 256 seconds]
Ox0dea has joined #ruby
someword has left #ruby [#ruby]
evanjs has quit [Remote host closed the connection]
<Rager>
meatchicken: define: "the \"circle\""
<jhass>
meatchicken: figure out in which projection your coordinates are, digging up the right formula with projection within radius / within range as search term should be easy
_seanc_ has quit [Ping timeout: 265 seconds]
_seanc__ is now known as _seanc_
roolo_ has quit [Remote host closed the connection]
<meatchicken>
jhass, slow down there please -> projection?
<ruboto>
Ox0dea # => /tmp/execpad-4041a7a48552/source-4041a7a48552:2: [BUG] Segmentation fault at 0x000001 ...check link for more (https://eval.in/382726)
<Ox0dea>
That's not a bug, though.
<havenwood>
Helping chickens with ruby, check.
<eam>
oh haha, the eval bot has a FFI gem loaded?
<Ox0dea>
Fiddle is part of the standard library.
<eam>
is ffi deprecated?
<Ox0dea>
I'd imagine so.
hahuang65 has quit [Quit: WeeChat 1.2]
<eam>
wow fiddle has been around for a while
workmad3 has quit [Ping timeout: 256 seconds]
dmolina has quit [Quit: Leaving.]
<eam>
it doesn't do jruby though, does it
<Ox0dea>
No, of course not.
<eam>
why "of course?"
<eam>
ffi does
paulcsmith_ has joined #ruby
<eam>
looks like ffi is still current, just core vs supplementary?
hahuang65 has joined #ruby
<dfockler>
Do any of the other ruby implementations have better performance in general than MRI?
<eam>
jruby does for some workloads, and doesn't for others
alex88 has quit [Ping timeout: 250 seconds]
<dfockler>
I know jruby has real threads
<eam>
mri has real threads too
<dfockler>
it just has the GIL
<eam>
yes, which synchronizes across the real threads :)
paulcsmith_ has quit [Client Quit]
<eam>
as distinct from say green threads
theery has quit []
j4cknewt has quit [Remote host closed the connection]
<dfockler>
so if you want parallelism you shouldn't use MRI?
x1337807x has joined #ruby
<baweaver>
If you want parallelism you shouldn't use Ruby
<eam>
depends what kind of parallelism, i/o or interpreter/cpu
mdz_ has quit [Remote host closed the connection]
<eam>
baweaver: or just don't use threads (fork is fine)
<baweaver>
fine fine, but honestly this is Erlang/Elixir's crowning feature
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler>
Elixir is starting to get popular
<baweaver>
what I'm getting at is use the right tool for it, and those are far better for it.
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
davedev2_ has quit [Read error: Connection reset by peer]
ascarter has quit [Read error: Connection reset by peer]
jcaho has quit [Read error: Connection reset by peer]
Silent__ has joined #ruby
davedev24_ has joined #ruby
cb__ has quit [Ping timeout: 265 seconds]
Mon_Ouie has quit [Ping timeout: 264 seconds]
<nitenq>
ok thanks
jcaho has joined #ruby
towski__ has joined #ruby
wookiehangover has quit [Ping timeout: 252 seconds]
mister_solo has quit [Quit: So long, and thanks for all the fish!]
mattbillock has quit [Read error: Connection reset by peer]
snockerton has quit [Quit: Leaving.]
mikecmpbll has quit [Quit: i've nodded off.]
startupality has joined #ruby
crdpink has quit [Read error: Connection reset by peer]
crdpink has joined #ruby
GPrime has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
towski_ has quit [Ping timeout: 276 seconds]
finisherr has quit [Quit: finisherr]
mdz_ has joined #ruby
<zenspider>
havenwood: I can't skim audio and I _really_ can't listen to rogues... tons of rambling bullshit
Pisuke has quit [Ping timeout: 240 seconds]
<zenspider>
nitenq: depends on what you want to do... you might want to look at popen
<nitenq>
it’s ok it works perfectly with `` :)
eggoez has quit [Ping timeout: 252 seconds]
Spami has joined #ruby
Cache_Money has quit [Quit: Cache_Money]
cirn0_ has quit [Remote host closed the connection]
diegoviola has joined #ruby
A205B064 has joined #ruby
helpa has quit [Remote host closed the connection]
helpa has joined #ruby
kfpratt has quit [Remote host closed the connection]
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Ox0dea>
>> [].lazy.map.with_index
<ruboto>
Ox0dea # => tried to call lazy map without a block (ArgumentError) ...check link for more (https://eval.in/382739)
Rollabunna has joined #ruby
<Ox0dea>
Having to reverse the calls to #map and #with_index feels leaky.
veinofstars has joined #ruby
kfpratt has joined #ruby
evanjs has quit [Remote host closed the connection]
kfpratt has quit [Remote host closed the connection]
<Ox0dea>
All the standard Enumerable methods are special-cased on lazy ones to fail when not provided with a block, and I can't quite see why that should be.
gluten_hell_ has joined #ruby
<zenspider>
why?
sharpmachine has quit [Remote host closed the connection]
<Ox0dea>
Good question.
<chrisseaton>
zenspider: even speaking as a competitor to Topaz (I do the Truffle implementation) I think they did actually solve most of the hard parts of Ruby by the time they stopped - they weren't complete but they tackled most things that might be problematic
<zenspider>
oh hey! how goes chrisseaton ?
<chrisseaton>
good thanks - writing up my PhD on Truffle right now
<zenspider>
I'm... sorry?
<chrisseaton>
yeah it's not fun
cirn0 has joined #ruby
<chrisseaton>
well actually it is, it's just hard
Rollabunna has quit [Ping timeout: 252 seconds]
<zenspider>
I've enjoyed following your work (tho, admittedly, it isn't much... my nerd fetishes are currently falling on the PLT camp, and then viewpoints research institute)
<zenspider>
*nod*
shock_one has joined #ruby
ItSANgo has quit [Read error: Connection reset by peer]
<chrisseaton>
search seaton on that and I think the link works from there
<chrisseaton>
it's open access, as long as you have the right referral header I think!
ItSANgo has quit [Max SendQ exceeded]
<havenwood>
chrisseaton: Yup, that worked. :)
<zenspider>
ah. I forgot that you're working w/ Ducasse on this
<zenspider>
nice
workmad3 has joined #ruby
ItSANgo has joined #ruby
shock_one has quit [Ping timeout: 276 seconds]
segfalt has joined #ruby
<zenspider>
chrisseaton: was there a similar paper ~6 mo back?
<zenspider>
I don't remember the timeframe, tbh
<Rager>
question on what the common practice is
<Rager>
wait... wrong channel
<chrisseaton>
zenspider: there was a blog post that was similar before we got the paper
<chrisseaton>
papers are about six months behind what we're doing
ItSANgo has quit [Max SendQ exceeded]
djbkd has quit [Remote host closed the connection]
GnuYawk has joined #ruby
GnuYawk has joined #ruby
<zenspider>
that's probably it
ItSANgo has joined #ruby
<zenspider>
I'll queue this up for a read. interesting that there's only one ungar ref...
veinofstars is now known as veinofJebDays
<zenspider>
hrm... looks like I want to read "A Domain-Specific Language for Building Self-Optimizing AST Interpreters."
djbkd has joined #ruby
fujimura has joined #ruby
JEG2 has quit [Quit: Connection closed for inactivity]
RegulationD has joined #ruby
<zenspider>
yay. found it outside of the acm paywall
rcvalle has quit [Quit: rcvalle]
ndrei has joined #ruby
workmad3 has quit [Ping timeout: 272 seconds]
<zenspider>
chrisseaton: oh. that's also about truffle?
InternetFriend has joined #ruby
volty has quit [Quit: Konversation terminated!]
<chrisseaton>
yeah that's how we represent Ruby objects
<chrisseaton>
oh sorry - misread - that's the DSL that we use to build JRuby+Truffle
drewo has joined #ruby
jgpawletko has joined #ruby
InternetFriend has quit [Client Quit]
<nitenq>
I want to catch the aggrb value from this file. All is in a string “cmd” so I tried to do something like this http://pastebin.com/XjgMtV9h and it works for value[1] = “60317” but value[2] is not = “60222”