jarred has quit [Quit: Connection closed for inactivity]
_sfiguser has quit [Quit: Leaving]
sleepee has quit [Ping timeout: 264 seconds]
nitric_ has quit [Ping timeout: 244 seconds]
xentity1x has quit [Ping timeout: 240 seconds]
barajasfab has joined #ruby
nankyokusei has quit [Ping timeout: 240 seconds]
ruby[bot] has quit [Remote host closed the connection]
ruby[bot] has joined #ruby
moei has quit [Quit: Leaving...]
jax has joined #ruby
jax has left #ruby ["Leaving"]
millerti has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jhack has joined #ruby
tdy has joined #ruby
piercedwater has joined #ruby
<piercedwater>
i have an external javascript file that i can see being modified when i update it through the .js file. but my rails app is not executing the js code (simple alert). Can someone please help me
jenrzzz has quit [Ping timeout: 264 seconds]
jenrzzz has joined #ruby
<piercedwater>
oh no no one knows this guy
ResidentBiscuit has joined #ruby
<piercedwater>
how dare he come in here asking for hep
<piercedwater>
help
<piercedwater>
;)
codelogix has quit [Ping timeout: 276 seconds]
<adam12>
piercedwater: Normally you're best to get answers for Rails in #RubyOnRails
<piercedwater>
ok ty
<adam12>
so ask it in there and I'll help you
<adam12>
;)
<piercedwater>
well it was fun guys
<piercedwater>
gotta go
<piercedwater>
;)
piercedwater has left #ruby ["bvl"]
Mrgoose has quit [Ping timeout: 240 seconds]
jphase has quit [Remote host closed the connection]
jaguarmagenta has joined #ruby
jphase has joined #ruby
codelogix has joined #ruby
harai has joined #ruby
dukedave has quit [Ping timeout: 244 seconds]
unforgiven512 has quit [Ping timeout: 244 seconds]
Majost has quit [Ping timeout: 244 seconds]
mgorbach has quit [Ping timeout: 244 seconds]
pizzaops has quit [Ping timeout: 244 seconds]
moshee has quit [Ping timeout: 244 seconds]
Majost has joined #ruby
dukedave has joined #ruby
pizzaops has joined #ruby
crankhar1er has quit [Ping timeout: 244 seconds]
constantinexvi has quit [Ping timeout: 244 seconds]
Mission-Critical has quit [Ping timeout: 244 seconds]
jphase has quit [Ping timeout: 272 seconds]
jaguarmagenta has quit [Ping timeout: 276 seconds]
jonadab has quit [Ping timeout: 244 seconds]
havenwood has quit [Ping timeout: 244 seconds]
moshee has joined #ruby
moshee has joined #ruby
moshee has quit [Changing host]
\13k has quit [Ping timeout: 244 seconds]
gnarf has quit [Ping timeout: 244 seconds]
mgorbach has joined #ruby
codelogix has quit [Ping timeout: 240 seconds]
techietrash has quit [Ping timeout: 244 seconds]
havenwood has joined #ruby
\13k has joined #ruby
blackmesa has quit [Ping timeout: 264 seconds]
techietrash has joined #ruby
constantinexvi has joined #ruby
jenrzzz has quit [Ping timeout: 240 seconds]
jonadab has joined #ruby
crankharder has joined #ruby
_djbkd has quit [Quit: My people need me...]
redpants has quit [Ping timeout: 264 seconds]
JeanCarloMachado has quit [Remote host closed the connection]
ramfjord has joined #ruby
JeanCarloMachado has joined #ruby
ramfjord_ has quit [Read error: Connection reset by peer]
JeanCarloMachado has quit [Client Quit]
JeanCarloMachado has joined #ruby
cgfbee has quit [Excess Flood]
JeanCarloMachado has quit [Read error: Connection reset by peer]
emlee has joined #ruby
gnarf has joined #ruby
JeanCarloMachado has joined #ruby
cgfbee has joined #ruby
tmtwd has joined #ruby
unforgiven512 has joined #ruby
nofxx has quit [Ping timeout: 244 seconds]
codelogix has joined #ruby
frankiee_ has quit [Ping timeout: 276 seconds]
sonyayahab has quit [Quit: Leaving]
agent_white has quit [Quit: backinbit]
JeanCarloMachado has quit [Ping timeout: 276 seconds]
MissionCritical has joined #ruby
sleepee has joined #ruby
prawnzy has quit [Remote host closed the connection]
prawnzy has joined #ruby
sleepee has quit [Read error: Connection reset by peer]
ARCADIVS has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
horst has quit [Quit: horst]
Pupeno has joined #ruby
Guest59596 is now known as IceDragon
flughafen_ has quit [Ping timeout: 250 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Pupeno has quit [Ping timeout: 276 seconds]
enterprisey has joined #ruby
SeepingN has quit [Quit: The system is going down for reboot NOW!]
barajasfab has quit [Ping timeout: 272 seconds]
Rickmasta has joined #ruby
askhat has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
A_Drone has quit [Remote host closed the connection]
Rodya__ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
arescorpio has quit [Quit: Leaving.]
harfangk has quit [Ping timeout: 240 seconds]
JoshS has joined #ruby
harfangk has joined #ruby
Rodya_ has quit [Ping timeout: 272 seconds]
roflmyeggo has joined #ruby
harai has quit [Ping timeout: 272 seconds]
horst has joined #ruby
sdwrage has quit [Quit: Leaving]
nankyokusei has joined #ruby
codelogix has joined #ruby
sneakerhax has joined #ruby
safetypin has quit [Quit: ZZZzzz…]
jenrzzz has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 264 seconds]
codelogix has quit [Ping timeout: 272 seconds]
roflmyeggo has quit [Ping timeout: 276 seconds]
nanoz has quit [Read error: Connection reset by peer]
tonini has joined #ruby
Sucks has joined #ruby
ichkv has joined #ruby
Sucks has quit [Quit: Leaving]
crdpink__ has quit [Quit: Konversation terminated!]
Sucks has joined #ruby
SuperLag_ has joined #ruby
eizua has joined #ruby
SuperLag has quit [Ping timeout: 244 seconds]
hutch34_ has joined #ruby
SuperLag has joined #ruby
SuperLag_ has quit [Ping timeout: 276 seconds]
gizless has joined #ruby
blackmesa has joined #ruby
gizmore has quit [Ping timeout: 265 seconds]
hutch34_ has quit [Ping timeout: 272 seconds]
jaequery has joined #ruby
cdg_ has quit [Read error: Connection reset by peer]
cdg has joined #ruby
roamingdog has joined #ruby
blackmesa has quit [Ping timeout: 272 seconds]
crdpink__ has joined #ruby
CloCkWeRX has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
roamingdog has quit [Ping timeout: 272 seconds]
prawnzy has joined #ruby
yeticry has quit [Ping timeout: 244 seconds]
craigp has joined #ruby
yeticry has joined #ruby
djbkd has quit [Remote host closed the connection]
Rickmasta has quit [Ping timeout: 240 seconds]
ishe_ua has joined #ruby
dminuoso has joined #ruby
A_Drone has joined #ruby
jcao219 has joined #ruby
bocaneri has joined #ruby
CloCkWeRX has joined #ruby
A_Drone has quit [Ping timeout: 264 seconds]
blackwind_123 has quit [Ping timeout: 255 seconds]
horst has quit [Quit: horst]
cdg has quit [Ping timeout: 272 seconds]
codelogix has joined #ruby
dminuoso has quit [Remote host closed the connection]
Rickmasta has joined #ruby
djbkd has joined #ruby
codelogix has quit [Ping timeout: 240 seconds]
djbkd has quit [Client Quit]
Dimik has joined #ruby
dminuoso has joined #ruby
ur5us has quit [Remote host closed the connection]
ur5us has joined #ruby
ruby_ has quit [Remote host closed the connection]
<dminuoso>
Mmm, so I have a situation where I parse some user input with a simple syntax. The user specifies multiple items separated by comma with optional whitespace, and each item can modifiers and things like "1a", "1-10", "m5-10". Right now Im simply parsing this with regular expressions, but it's kind of messy already using backreferences with nested case switches.
fullofcaffeine has quit [Ping timeout: 244 seconds]
firstdayonthejob has joined #ruby
moeabdol has joined #ruby
A_Drone has joined #ruby
CloCkWeRX has joined #ruby
andikr has joined #ruby
alexherbo2 has joined #ruby
crdpink__ has quit [Quit: Konversation terminated!]
moeabdol has quit [Ping timeout: 276 seconds]
Pumukel has joined #ruby
crdpink__ has joined #ruby
A_Drone has quit [Remote host closed the connection]
hutch34_ has joined #ruby
blaxter has joined #ruby
a7d7p has joined #ruby
<a7d7p>
Ruby is my first software language, and I want to learn regex. Do I install regex? I’m reading “Mastering Reg Expressions” but it doesn’t cover Ruby, just Java, PHP, etc. Do I install regex with rvm or something?
tmtwd has quit [Ping timeout: 264 seconds]
<a7d7p>
OSX
<dminuoso>
a7d7p: No. Regex come with the standard library.
<dminuoso>
a7d7p: Err, not even standard library, they are a builtin core feature
<a7d7p>
dminuoso: arg. thx.
wingwalker has joined #ruby
hutch34_ has quit [Ping timeout: 264 seconds]
<dminuoso>
a7d7p: Though I would be careful reading books on mastering regular expressions before learning a language properly.
<dminuoso>
a7d7p: While regular expressions have their use, it's far more important to learn design patterns, language idioms and libraries.
blackmesa has joined #ruby
<a7d7p>
dminuoso: noted. thank you. back to Programming Ruby I guess. regex looks really fun tho :-)
<baweaver>
though regex and human readable being in the same sentence causes me great physical distress.
<dminuoso>
baweaver: Im just looking into options to visualize a required input format to a user.
<baweaver>
dminuoso: there's a challenge for you. Make a regex analyzer in Ruby
A_Drone has quit [Remote host closed the connection]
<dtscode>
hey guys... I'm writing a C extension for ruby using the API exposed through ruby.h. However I've run into a snag. If I want to return multiple values from my c extension, to a given ruby object, what function would I use?
blaxter has quit [Remote host closed the connection]
x0f has joined #ruby
<baweaver>
(not ignoring you, I just don't know scratch on the C apis)
TomyWork has joined #ruby
symm- has quit [Ping timeout: 272 seconds]
<dminuoso>
dtscode: I would probably have the extension return another Ruby object.
biberu has joined #ruby
blaxter has joined #ruby
<dtscode>
oh so like create an object that is an array, push those values on it, and return that object?
A_Drone has joined #ruby
<dminuoso>
dtscode: For example.
<dtscode>
?
<dminuoso>
dtscode: It was an answer to your question.
horst has quit [Quit: horst]
<dtscode>
ah ok
<dtscode>
thanks bud
<dtscode>
ill try that
A_Drone has quit [Remote host closed the connection]
AlphaAtom has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
moeabdol has joined #ruby
<dminuoso>
dtscode: So basically your function would return a VALUE.
<flughafen_>
where is shevy, i'm in need of BER flughafen jokes
<dtscode>
dminuoso: right
<dminuoso>
dtscode: And that VALUE could be pointing at a T_ARRAY, or any custom poro object perhaps.
a7d7p has quit [Quit: a7d7p]
wingwalker has quit [Remote host closed the connection]
jokke has quit [Remote host closed the connection]
jokke has joined #ruby
elenatanasoiu has quit [Quit: WeeChat 1.5]
elenatanasoiu has joined #ruby
getxsick has joined #ruby
moeabdol has joined #ruby
frankiee_ has joined #ruby
<adac>
How do I pass parameters to an HTTParty request? Do I really use "query" for that like it is stated here? http://stackoverflow.com/a/24691914
<getxsick>
hi, i'm trying to use ri to read some docs, unfortunately seems like I'm missing something. E.g. `ri Array` shows very limited (and not interesting) output. `Array#push` says there is nothing to show
hutch34_ has joined #ruby
NTrash has quit [Quit: Konversation terminated!]
<dminuoso>
getxsick: That's strange. How did you install Ruby?
NTrash has joined #ruby
a7d7p has quit [Quit: a7d7p]
compro has quit [Ping timeout: 240 seconds]
jcao219 has quit [Ping timeout: 244 seconds]
hutch34_ has quit [Ping timeout: 244 seconds]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Snowy has joined #ruby
dminuoso has quit [Ping timeout: 272 seconds]
mim1k|work has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jusss has quit [Quit: ERC Version 5.3 (IRC client for Emacs)]
roamingdog has quit [Remote host closed the connection]
mim1k|wo1k has quit [Ping timeout: 244 seconds]
toni has quit [Ping timeout: 272 seconds]
dminuoso has joined #ruby
<getxsick>
dminuoso: ok, found a solution. i had to install rdoc-data first
jcao219 has joined #ruby
A_Drone has quit [Remote host closed the connection]
A_Drone has joined #ruby
tomphp has joined #ruby
<dminuoso>
getxsick: great
M-shine has quit [K-Lined]
pragmaticus has joined #ruby
teclator has quit [Remote host closed the connection]
postmodern has quit [Quit: Leaving]
A_Drone has quit [Ping timeout: 264 seconds]
jaguarmagenta has quit [Remote host closed the connection]
mac_ has joined #ruby
watersoul has joined #ruby
astrobunny has quit [Remote host closed the connection]
moeabdol has quit [Ping timeout: 276 seconds]
anisha has quit [Ping timeout: 244 seconds]
toni has joined #ruby
synruby has quit [Quit: Leaving]
antgel has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
senayar has joined #ruby
Dimik has quit [Ping timeout: 272 seconds]
flughafen_ has quit [Quit: WeeChat 1.3]
pawnbox has quit [Remote host closed the connection]
pawnbox has joined #ruby
nofxx has quit [Ping timeout: 244 seconds]
craigp has quit [Ping timeout: 272 seconds]
symm- has quit [Quit: Leaving...]
teclator has joined #ruby
<fbt>
Heh. There is an mkfifo gem, but you could also just fork into mkfifo... choices, choices!
fivmo has joined #ruby
fivmo has quit [Client Quit]
<dminuoso>
fbt: Or you know, you could simply use Ruby::mkfifo
fivmo has joined #ruby
<dminuoso>
Err File::mkfifo
pwnd_nsfw has joined #ruby
<fbt>
Oh. I was looking at an older doc
<dminuoso>
fbt: That's why you should ideally use ri.
<dminuoso>
fbt: It always gives you documentation on what you have installed.
craigp has joined #ruby
horst has quit [Quit: horst]
ur5us has joined #ruby
LoneHerm_ has joined #ruby
Robtop__ has quit [Ping timeout: 272 seconds]
codelogix has joined #ruby
M-shine has joined #ruby
nocco has joined #ruby
workmad3 has joined #ruby
<fbt>
Playing with forks and pipes :3
moeabdol has joined #ruby
koooge has quit [Quit: Leaving...]
codelogix has quit [Ping timeout: 264 seconds]
compro has joined #ruby
horst has joined #ruby
<EdwardIII>
hey, i upgraded to ruby-2.3.1 and started seeing some errors about needing to do a pristine install of a bunch of modules of different versions, so i decided to just clear out the gems and start again. however now i'm seeing "Your bundle is locked to json (1.8.3), but that version could not be found in any of the sources listed in your Gemfile... Run `bundle install` to install missing gems." here's the er
<EdwardIII>
dminuoso: yes i did - i'm doing this ruby upgrade following the os x upgrade
<zenspider>
going to bed. good luck.
<EdwardIII>
zenspider: thanks for the pointers!
<dminuoso>
EdwardIII: Google for that error message, there's a couple of issues on github.
Burgestrand has joined #ruby
<EdwardIII>
dminuoso: ah i thought it was just because i'd screwed everything, not a general issue, checking it out now
roamingdog has quit [Ping timeout: 264 seconds]
<EdwardIII>
heh seems like people are saying do gem pristine then bundle all
* EdwardIII
tries again
A_Drone has quit [Ping timeout: 264 seconds]
Timba-as has joined #ruby
A_Drone has joined #ruby
A_Drone has quit [Remote host closed the connection]
<dminuoso>
EdwardIII: Are you using rvm or rbenv?
<EdwardIII>
dminuoso: ruby-install & chruby
tvw has quit [Read error: Connection reset by peer]
<dminuoso>
EdwardIII: any gemset thing perhaps?
<EdwardIII>
dminuoso: hrm i'm not sure what that is, so i guess no?
<EdwardIII>
well whaddya know
<EdwardIII>
re-did ruby-install, gem install pristine, bundle install and now somehow everything seems to be working heh
toni has quit [Ping timeout: 240 seconds]
<dminuoso>
EdwardIII: You probably mixed up the order before.
<EdwardIII>
thanks dminuoso
<dminuoso>
EdwardIII: The underlying issue seems to be a mismatch between the Ruby version the extension was built against and the installed ruby version.
<EdwardIII>
yeah i guess that might be something to do with the osx upgrade
<dminuoso>
EdwardIII: I dont think so.
LoneHerm_ has quit [Ping timeout: 244 seconds]
<EdwardIII>
no? doesn't make sense that os x would update an underlying lib that something was linked against before?
<dminuoso>
EdwardIII: You said you are using chruby / ruby-install which OSX knows nothing about.
banisterfiend has joined #ruby
<EdwardIII>
i guess when it's building gems they are linked against system libs though
jcao219 has quit [Ping timeout: 264 seconds]
<EdwardIII>
but then i did ruby-install so everything should have been linked to what's on the system right now
<dminuoso>
EdwardIII: ruby-install only builds/installs ruby, it does not manage gems/extensions
jayeola has quit [Ping timeout: 264 seconds]
banisterfiend has quit [Client Quit]
banisterfiend has joined #ruby
anisha has joined #ruby
gnufied has joined #ruby
gnufied has quit [Max SendQ exceeded]
<EdwardIII>
but i deleted all the gems and did 'bundle install' in a project i'm working on to get them all back
<EdwardIII>
maybe somehow that happened against the old ruby or something
gnufied has joined #ruby
jcao219 has joined #ruby
last_staff has joined #ruby
gnufied has quit [Max SendQ exceeded]
gnufied has joined #ruby
nankyokusei has joined #ruby
toni_ has joined #ruby
Timba-as has quit [Quit: Be back later ...]
last_staff has quit [Client Quit]
gnufied has quit [Max SendQ exceeded]
gnufied has joined #ruby
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
erlingur_ has quit [Ping timeout: 244 seconds]
gnufied has quit [Max SendQ exceeded]
nankyokusei has quit [Ping timeout: 276 seconds]
gnufied has joined #ruby
gnufied has quit [Max SendQ exceeded]
gnufied has joined #ruby
erlingur_ has joined #ruby
codelogix has quit [Ping timeout: 264 seconds]
compro has joined #ruby
skweek has joined #ruby
tlaxkit has quit [Read error: Connection reset by peer]
tlaxkit has joined #ruby
compro has quit [Ping timeout: 264 seconds]
bruce_lee has joined #ruby
hutch34_ has joined #ruby
nocco has quit [Remote host closed the connection]
ruby814 has joined #ruby
nocco has joined #ruby
hutch34_ has quit [Ping timeout: 240 seconds]
c355e3b has joined #ruby
nocco has quit [Ping timeout: 272 seconds]
ruby814 has quit [Ping timeout: 240 seconds]
nocco has joined #ruby
erlingur_ has quit [Ping timeout: 240 seconds]
<fbt>
It really does suck to not understand what you are doing
<fbt>
So, in theory, if I were to open a socket and listen on it with a mainloop, then spawn multiple workers and write to the socket, is it possible to implement a queue there?
<fbt>
I'm kinda lost in the very basic stuff and can't quite form a google query for this that makes sense
<fbt>
Wait. I don't need a queue in my case
prawnzy has joined #ruby
jcao219 has quit [Ping timeout: 272 seconds]
nocco has quit [Remote host closed the connection]
nocco has joined #ruby
vdamewood has joined #ruby
hanmac has quit [Ping timeout: 255 seconds]
prawnzy has quit [Ping timeout: 276 seconds]
jaguarmagenta has joined #ruby
nocco has quit [Ping timeout: 240 seconds]
jimmysaville is now known as jimmysaville-AFK
rubyonra_ has joined #ruby
LoneHerm_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
craigp has quit [Ping timeout: 240 seconds]
toni_ has quit [Ping timeout: 276 seconds]
jayeola has quit [Ping timeout: 240 seconds]
LoneHerm_ has quit [Ping timeout: 264 seconds]
toni_ has joined #ruby
hanmac has joined #ruby
compro has joined #ruby
JeanCarloMachado has joined #ruby
jayeola has joined #ruby
codelogix has joined #ruby
jayeola has quit [Client Quit]
sdothum has joined #ruby
elenatanasoiu has quit [Ping timeout: 240 seconds]
codelogix has quit [Ping timeout: 272 seconds]
mark_66 has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
marsjaninzmarsa has quit [Ping timeout: 248 seconds]
mark_66 has joined #ruby
NuckingFuts has quit [Ping timeout: 240 seconds]
nuck has joined #ruby
nuck is now known as Guest94926
marsjaninzmarsa has joined #ruby
nettoweb has joined #ruby
skweek has quit [Ping timeout: 244 seconds]
sepp2k has joined #ruby
erlingur_ has joined #ruby
ldnunes has joined #ruby
toni_ has quit [Ping timeout: 240 seconds]
nadir has joined #ruby
millerti has quit [Ping timeout: 264 seconds]
moeabdol has quit [Ping timeout: 264 seconds]
mim1k|wo1k has joined #ruby
mim1k|work has quit [Ping timeout: 264 seconds]
glcx has joined #ruby
glcx has joined #ruby
glcx has quit [Changing host]
toni_ has joined #ruby
blackmesa has quit [Ping timeout: 276 seconds]
elenatanasoiu has joined #ruby
compro has quit [Ping timeout: 240 seconds]
moeabdol has joined #ruby
JeanCarloMachado has quit [Ping timeout: 276 seconds]
JeanCarloMachado has joined #ruby
NTrash has joined #ruby
antgel has quit [Ping timeout: 240 seconds]
antgel has joined #ruby
roamingdog has joined #ruby
brujoand has quit [Ping timeout: 250 seconds]
<dminuoso>
Bah, is there a more elegant way to do this? opts = Hash[opts.map { |k,v| [k, v == '' ? nil : v] }]
johnmilton has joined #ruby
johnmilton has quit [Read error: Connection reset by peer]
antgel has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
Bish has joined #ruby
saneax-_-|AFK is now known as saneax
<Bish>
can somebody advise me a gem that can parse multipart/form-data ? in http?
<apeiros>
dminuoso: only marginally nicer: opts = opts.map { |k,v| [k, v == '' ? nil : v] }.to_h
<Papierkorb>
Bish: If not CGI ^, Rack can do that
<Bish>
i am using rack, but rack gives me a StringIO with just the body in text
<Bish>
i might be to stupid too see it though
<Bish>
to be more specific i am using roda on rack
<dminuoso>
apeiros: Oh.
<Papierkorb>
Bish: Hah!
<dminuoso>
apeiros: Let me just apply this, while I refactor 20 different lines of code... :>
<Bish>
Hah! Papierkorb :( what now?
<Papierkorb>
Bish: r[:the_param] or use r.POST[:the_param] if you only want to use POST parameters
<dminuoso>
apeiros: That did the trick, it's readable now.
<Bish>
you know roda!?
<Papierkorb>
Bish: That should give you a String or something like a File to read from
<Bish>
so fukin great.
<Papierkorb>
Bish: Yes, I've been using it for all of my personal projects almost the entire year. Can't recommend it enough. Pair it with Sequel. Glorious.
<Papierkorb>
Bish: There's also #roda btw
pawnbox has quit [Remote host closed the connection]
<Bish>
Papierkorb: im in there already, i am also using sequel
<Bish>
best thing i've ever seen in life
<Bish>
everything jeremy evan touches is gold
johnmilton has quit [Ping timeout: 240 seconds]
NTrash_ has joined #ruby
NTrash has quit [Ping timeout: 255 seconds]
<[spoiler]>
Oh, Roda is <3
<Bish>
Papierkorb: when i asked jeremy the same question he just told me that rack does the handling
<Papierkorb>
He just looks at ruby and uses language features to model something rubyists are thinking about, not like other HTTP frameworks where the API is modeled around HTTP. So much better.
<Bish>
i never checked r.POST though.. ofcourse that was stupid
johnmilton has joined #ruby
tomphp_ has joined #ruby
tomphp has quit [Ping timeout: 244 seconds]
<apeiros>
dminuoso: note that in rails there's a method to just map values
<dminuoso>
apeiros: Rails also has this Concern thing and tons of other things I keep my fingers away from. :p
<apeiros>
ah, right: opts.transform_values! do |value| v == '' ? nil : v end
<apeiros>
dminuoso: sure. I'm still not sure about my opinion on concerns. stomach says "extend + include for inepts". but I might be mistaken.
nocco has joined #ruby
erlingur_ has quit [Ping timeout: 244 seconds]
<Papierkorb>
apeiros: That's the issue with Rails for me. While having a rigid framework with specific rules how to do stuff is useful many times, it sometimes overcomplicates things a lot. Service objects, really? Just have ... plain old ruby classes, and call them .. plain old ruby classes?
<dminuoso>
apeiros: Concerns are for those django folks switching to rails who dont know how Ruby works
tomphp has joined #ruby
<dminuoso>
Papierkorb: service objects are a pattern.
<dminuoso>
not a "type of class"
JeanCarloMachado has quit [Ping timeout: 276 seconds]
<dminuoso>
Papierkorb: even models such as AR models are plain ruby classes, rails folks like to forget that
<Bish>
Papierkorb: im on your side!
tomphp_ has quit [Ping timeout: 272 seconds]
<Papierkorb>
dminuoso: Correct. But there's nothing special about them. For models you could make the case that they're magic in that they get a bunch of attributes injected and so on.
JeanCarloMachado has joined #ruby
bruce_lee has quit [Ping timeout: 276 seconds]
<Bish>
rack even creates tmpfiles which contain the data?
bruce_lee has joined #ruby
bruce_lee has joined #ruby
bruce_lee has quit [Changing host]
<Bish>
well i don't know if i like that one too much
<Papierkorb>
Bish: Yes, it does :(
<dminuoso>
Papierkorb: But that's the case for any class. It has some public interface.
chouhoulis has joined #ruby
<dminuoso>
Papierkorb: You can construct it, and your object has some well-defined interface. There's nothing magical about Rails.
<fbt>
What is the best way to check if a process actually is our child from ruby?
malcolmva has joined #ruby
<dminuoso>
The real "magic" lies in the implementation, but that is completely hidden to the user.
<Bish>
Papierkorb: is the the reason i get StringIO as body, because it's just an openfile descriptor?
<Bish>
doesn't that make it slow?
<fbt>
I mean I can check if a process with a pid that I recorded is running, but it doesn't mean it's the same process.
giorgos1 has joined #ruby
<dminuoso>
Papierkorb: Rails is basically patterns and conventions. For example by convention we place classes representing data with business logic into app/models and call them "models" - naming and placing the class happens by convention, and the pattern to use such a class is by MVC pattern.
<Papierkorb>
dminuoso: Yes, but other times, it can come back and bite you. So giving them a "special name" is kinda reasonable, much like bang! methods.
<apeiros>
dminuoso: any sufficiently analyzed magic is indistinguishable from science ;-)
<dminuoso>
apeiros: *advanaced.
<fbt>
Oh. I can check if its ppid is the same as my pid
<apeiros>
dminuoso: no, that's the other way round
<dminuoso>
oh.
<Papierkorb>
Bish: iirc, you get StringIO's for small data (could be wrong though). And it does slow down things. Not important if you're only handling small data, but if you're handling big files .. it's an issue :)
<apeiros>
(any sufficiently advanced science is indistinguishable from magic)
<dminuoso>
*technology
<dminuoso>
:P
<apeiros>
well, I think it's even s/science/technology/ there
<apeiros>
right :)
<fbt>
But ruby doesn't have a getppid .-.
hahuang61 has quit [Ping timeout: 272 seconds]
<dminuoso>
apeiros: Rails does very well to keep the magic hidden though, which makes it bearable.
<dminuoso>
apeiros: RSpec on the other hand... :D
nankyokusei has joined #ruby
<apeiros>
in current times, I do prefer the inversion of that quote, though. given how many people say to all kinds of things "oh, that's magic!"
<Papierkorb>
Bish: Roda/Rack stores the whole POST body as a single file somewhere, and then each file extacted from that extra. So, each upload takes basically double space on your HDD
d10n-work has joined #ruby
<dminuoso>
apeiros: I just use the word "automagic"
<apeiros>
dminuoso: yeah, one of the main reasons I don't like and use rspec.
<Bish>
Papierkorb: that sucks.
<dminuoso>
apeiros: Well I use it in my projects, in the end its fine. But I wouldn't know the first thing on how to customize things.
<fbt>
Oh. PGID.
JeanCarloMachado has quit [Ping timeout: 244 seconds]
<Bish>
isn't that configurable?
<dminuoso>
apeiros: And in comparison: A couple months ago I stumbled upon rack - and within 30 minutes I had Rack figured out, a middle written and inserted - and it worked.
<Papierkorb>
Bish: Didn't get around yet to write something more of my liking, but I agree. I wrote a online storage service for me with it. I know the pain :)
<dminuoso>
*middleware
<Bish>
Papierkorb: i'd love to save the stuff in DB
<dminuoso>
apeiros: With RSpec I would probably spent days just trying to understand how it works in principle.
<Bish>
but it seems like rack also "garbage collects" the files from /tmp/
<Bish>
which is.. great i guess
<Papierkorb>
Bish: How big is the data?
<apeiros>
rails' magic annoys me a lot too sometimes. the biggest offender is its autoloading.
<Bish>
well, the files will be about ~1-100mb
<Bish>
not much
<dminuoso>
apeiros: Actually autoloading is great once you figure it out :P
<apeiros>
it tends to randomly break. and also suppresses useful analytics at times (similar to your issue with Range recently)
<Bish>
and they will be processed and be deleted afterwards
<apeiros>
dminuoso: not the way rails does it
<Papierkorb>
Bish: That's way too large for databases (Well, maybe not for GridFS w/ MongoDB, but never used it)
<dminuoso>
apeiros: That sounds strange. I have not had a single problem related to autoloading.
<apeiros>
Kernel#autoload - ok. but rails autoloading kills discovery, hides exceptions during load, breaks and fails in random ways.
<dminuoso>
apeiros: Some wrt to spring yes.
<Bish>
Papierkorb: :( what can i do?
<Papierkorb>
Bish: Store the data somewhere and INSERT the path in your DB. Maybe you can use the `shrine` gem?
JeanCarloMachado has joined #ruby
<apeiros>
dminuoso: Foo.constants - works with Kernel#autoload, doesn't with rails' autoloading.
<dminuoso>
apeiros: Well conceptually it's still a neat idea. I wouldn't want to register every class in Rails by hand honestly.
codelogix has joined #ruby
<dminuoso>
apeiros: I know.
<apeiros>
you can implement fully automatic loading with Kernel#autoload easily
<apeiros>
(I know, I have)
<dminuoso>
apeiros: but if you think about what rails intends to do, it could not possibly workk either.
<dminuoso>
Huh?
nankyokusei has quit [Ping timeout: 244 seconds]
<apeiros>
I did not implement reloading. but I'm pretty sure I could do that too.
<dminuoso>
apeiros: So you would have to eager load all available classes following your some convention.
<apeiros>
no
<apeiros>
Kernel#autoload is lazy
<apeiros>
but the constant is visible even when it isn't yet loaded.
<dminuoso>
apeiros: Sure, but it requires marking that the constant exists in the first place.
<Bish>
>sing the Sequel ORM also makes a lot of sense, because Sequel is objectively a better ORM
<dminuoso>
apeiros: Rails by design wants to use convention, not configuration. If you add a class, you dont need to require it somewhere else (or mark it available as autoloadable)
<Bish>
shots fired
<apeiros>
i.e. the autoload/lazy loading is truly transparent. not like in rails where the abstraction leaks.
<Bish>
i like him
<Papierkorb>
Bish: Upside is, you can just File.rename() the uploaded file from /tmp/ to wherever you want to store it. This way, Rack isn't even doing much of an overhead :)
<dminuoso>
apeiros: The problems I've actually had were related to reload! :P
<dminuoso>
But all of those were understandable.
<Bish>
Papierkorb: sounds good, i didn't quite get what shrine does with the files, but i will look into it
<Bish>
because of that description alone
<apeiros>
"Rails by design wants to use convention, not configuration. If you add a class, you dont need to require it somewhere else" - how does a fully automatic loading with Kernel#autoload change that?
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dminuoso>
apeiros: Let's say you have a known module Foo. How do you know what constants it has?
<Papierkorb>
Bish: it's like `carrierwave` if you know that. It does file uploads for you and is based on Roda. Can also do stuff like picture transformations (resizing, ...)
<apeiros>
dminuoso: Foo.constants
<dminuoso>
apeiros: Sure. And how does that work?
<dminuoso>
apeiros: How can it know about the module in foo/bar.rb you just created?
<Papierkorb>
Bish: And integrates great into Sequel too! Used it once, but was happy with it.
<dminuoso>
apeiros: Which means you need to explicitly register the module, which I mentioned.
craigp has joined #ruby
brendan- has joined #ruby
codelogix has quit [Ping timeout: 276 seconds]
<apeiros>
and if you mean "during development, when I create new files with a running app" - then there's FS notifiers
<dminuoso>
apeiros: So FS notifiers are more elegant?
<Bish>
Papierkorb: so shrine automagicially saves path to files in the db with sequel?
<dminuoso>
I mean Im a big fan of inotify, don't get me wrong...
<dminuoso>
But really?
<apeiros>
dminuoso: compared to having a broken abstraction? definitively.
<dminuoso>
apeiros: define broken abstraction
<apeiros>
the alternative is to accept that adding files requires an explicit action.
grh has quit [Remote host closed the connection]
<apeiros>
Foo.constants # => []
<apeiros>
Foo::Bar # => Foo::Bar
<Papierkorb>
Bish: Yes you can tell it where you want the data to be stored, then you add a plugin into your sequel model and 'add it'. Then, you can just use the model instance to obtain the file later again
<apeiros>
that's a broken abstraction.
IsoLinCHiP has quit [Ping timeout: 250 seconds]
<apeiros>
Foo says it doesn't have constants, but it does once I ask for an explicit one
<Bish>
Papierkorb: well it will be weird if i scale that out, right?
<dminuoso>
apeiros: If you insist, you can eager load classes.
<Bish>
multiple databases and such
<apeiros>
dminuoso: that breaks the purpose of lazy loading
<dminuoso>
apeiros: You can't have it both ways. Rails autoloading is not broken - it works this way by design.
<apeiros>
dminuoso: its *design* is broken. (in addition to the implementation)
<Papierkorb>
Bish: It can use amazon S3, maybe something else too, you can also use stuff like GlusterFS to have a distributed read-write filesystem to store files in.
<apeiros>
the *design* of "a constant exists once you ask for it" is a deeply broken design.
<Bish>
Papierkorb: why is say 10mb too much for databases.. do they fragment to much? what's the problem
<Bish>
talking about sql-ones, by the way
summation has quit [Read error: Connection reset by peer]
<Papierkorb>
Bish: iirc Shrines FS driver doesn't really try "span out" files/directories to lessen the burden on the underlying FS, so if you get that far, you probably want to write some code for that
<apeiros>
and yes, you can have it both ways. as said, I do have part of the "both ways", and it'd be easy enough to have the rest too (I see no point in that, though)
<dminuoso>
apeiros: The design is rather "You do not have to register classes to rails to become available"
<Papierkorb>
Bish: SQL databases are not built to store large chunks of binary data
IsoLinCHiP has joined #ruby
<apeiros>
dminuoso: you don't pay attention. I don't either.
<Bish>
yeah i get that, but still what is the problem to hold the reference to a big string?
<Papierkorb>
Looks like a reasonable answer on first sight
<dminuoso>
apeiros: And I strongly disagree that hooking into the filesystem is pretty.
redpants has joined #ruby
<dminuoso>
apeiros: You just moved the implementation out of the application into the filesystem. Just thinking about it gives me a headache.
tyang has joined #ruby
<Bish>
Papierkorb: shrine it is, thanks a lot!
<apeiros>
dminuoso: you can have it without hooking into the filesystem too. I wouldn't do either anyway. IMO if a file doesn't exist when you start the app, then it isn't there. reload the app.
<dminuoso>
apeiros: If you had said "similar to the rest of the world works, if you add files, you need to make them known to the application/toolchain" then fine.
<Papierkorb>
Bish: Another thing is that with a real FS you can instruct your frontend HTTP server to serve the files, so you take that load off from your ruby app, which also greatly increases performance for everyone. It needs some configuration to do that, but IMO, well worth the effort if you're sending out large chunks of data
<apeiros>
dminuoso: honestly, depending on the order of referencing constants gives me a bigger headache
<Papierkorb>
Bish: cheers
<apeiros>
or rather: having to pay attention to how you define your classes
<apeiros>
module Foo; class Bar; … is verboten in rails.
<apeiros>
unless you want to break its autoloading.
<apeiros>
just one example
<apeiros>
(well, actually the second, given Foo.constants)
ishe_ua has quit [Remote host closed the connection]
bauruine has quit [Remote host closed the connection]
lxsameer has quit [Quit: WeeChat 1.5]
bauruine has joined #ruby
blackmesa has joined #ruby
<Bish>
Papierkorb: i am not going "host" the files
<Bish>
just processing them
<Bish>
but a another part of the project does that, so i might end up doing that anyways
hutch34_ has joined #ruby
<Bish>
but i am sure everything from a fellow roda/sequel enthusiast is good
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<Bish>
apeiros: is verboten in rails :p nice brain lag
<Bish>
Papierkorb: does shrine somehow support chunked uploads
erlingur_ has joined #ruby
hahuang61 has joined #ruby
Burgestrand has joined #ruby
<Papierkorb>
Bish: you mean that the user can complete a upload later if the network died? Not sure
<Bish>
Papierkorb: no, i will upload my files in chunks ( so i can process already transmitted data, if possible )
<Bish>
so roda / rack doesn't get the huge swell of multiple mbs
<Papierkorb>
What kind of data is that?
<Bish>
csv,excel sheets
hutch34_ has quit [Ping timeout: 240 seconds]
sczizzo has joined #ruby
<Bish>
rack seems to support it, displays chunks and their metadata
etehtsea has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
<Papierkorb>
Bish: I'd consider (as in, maybe it's a bad idea?) streaming the data then completely. The user does a POST of the pure file without any multipart junk so I can feed it directly into a streaming capable "processor". Maybe that would work for you?
<Papierkorb>
So no multiple upload hack, instead basically pipe the incoming data right into the processor. Not even sure if Rack can do that.
antgel has joined #ruby
Burgestrand has quit [Client Quit]
<Bish>
but in some cases they might be binary files which can only be processed when completely transmitted
Burgestrand has joined #ruby
<Bish>
xls for example or whats its called
<Bish>
ugly microsoft zip files
erlingur has joined #ruby
JRajamaa has quit [Ping timeout: 272 seconds]
erlingur_ has quit [Ping timeout: 264 seconds]
blackmesa has joined #ruby
tk__ has joined #ruby
LoneHermit has joined #ruby
erlingur has quit [Ping timeout: 276 seconds]
toni_ has quit [Ping timeout: 240 seconds]
prawnzy has joined #ruby
ramortegui has joined #ruby
the_drow_ has quit [Quit: This computer has gone to sleep]
LoneHermit has quit [Ping timeout: 276 seconds]
<MrBleu>
Can you print out the variables/functions from a class ?
<MrBleu>
i tried "puts myclass" without success
csk has joined #ruby
chouhoulis has quit [Remote host closed the connection]
antgel has quit [Ping timeout: 240 seconds]
<apeiros>
MyClass.instance_methods
<apeiros>
and "variables from a class" does probably not exist in the form you wish.
<apeiros>
instance variables do not belong to the class, but to the instances. the class therefore doesn't know about them.
Guest4034 is now known as marahin
marahin has quit [Changing host]
marahin has joined #ruby
prawnzy has quit [Ping timeout: 276 seconds]
<MrBleu>
yeah, sorry, from the instance :)
<apeiros>
MyClass.new(…).instance_variables # is probably what you want
<apeiros>
for more, see Module and Object docs. all introspective methods are there.
<apeiros>
in pry you can use `ls obj`
<MrBleu>
apeiros: thanks ! i am trying these two.
jaguarmagenta has joined #ruby
aurelien has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
cdg has joined #ruby
ryez has joined #ruby
mattwashere has joined #ruby
teclator has quit [Ping timeout: 240 seconds]
toni_ has joined #ruby
jaguarmagenta has quit [Ping timeout: 264 seconds]
pawnbox has joined #ruby
ARCADIVS has quit [Quit: ARCADIVS]
asal2107 has joined #ruby
ta_ has quit [Remote host closed the connection]
GinoManWrx has joined #ruby
compro has joined #ruby
toni_ has quit [Ping timeout: 240 seconds]
andikr has quit [Remote host closed the connection]
<apeiros>
Bish: that was an intentional "verboten" :)
nickjj_ is now known as nickjj
andikr has joined #ruby
brendan- has joined #ruby
<Bish>
why?
sdwrage has joined #ruby
Snickers has quit [Ping timeout: 264 seconds]
<apeiros>
because you have a couple of german words, like kindergarten, blitzkrieg etc.
malconis has joined #ruby
andikr has quit [Remote host closed the connection]
<apeiros>
it was supposed to be funny, entertaining.
<Bish>
oh yeah the important ones
<dminuoso>
apeiros: Funny enough, a class actually maintains an index of all instance variables in use. :p
<dminuoso>
apeiros: So a class actually knows stuff about its instances.
<apeiros>
dminuoso: you mean behind the scenes?
<dminuoso>
apeiros: Yeah.
<apeiros>
makes sense
symm- has joined #ruby
<apeiros>
did something similar in my toy language
<apeiros>
you can avoid using a hash lookup for ivars that way
<dminuoso>
apeiros: I had to figure this out in order to implement proper casts in Ruby.
<dminuoso>
(Ruby kept seg faulting in an interesting place until I noticed this)
<apeiros>
i.e. only lookup by name was/is a hash lookup in my language. all literal use in code is an address directly in the AST
<fbt>
...File.mkfifo returns Fixnum
<fbt>
wat
<apeiros>
e.g. stuff like obj.instance_variable_get(:@some_name) would go via hashtable. `def foo; @some_name; end` would compile to an AST with with an address.
<ryez>
in `[1, 2].map(&:to_s)`, the symbol :to_s is converted to a proc by the '&' operator, right?
<apeiros>
fbt: probably a filedescriptor?
<apeiros>
ryez: right
<fbt>
apeiros, it's always 0, it seems
codelogix has joined #ruby
<fbt>
Yea, it's always 0
nobitanobi has joined #ruby
<apeiros>
fbt: hm, the docs are spaaaarse
<apeiros>
*missing
malconis has quit [Remote host closed the connection]
<fbt>
Yeah :)
<apeiros>
fbt: have fun reading the source code? :D
<apeiros>
fbt: and please be nice - provide a doc-patch once you figured it ;-)
<fbt>
Eh, I don't quite care enough right now.
malconis has joined #ruby
<apeiros>
aw :(
<fbt>
I'm coding!
<fbt>
:D
gchristensen has joined #ruby
<fbt>
Re-writing that bar to use forks
<ryez>
apeiros: thanks, given &:to_s is for method Fixnum#to_s, what can be used for puts?
jphase has joined #ruby
<apeiros>
ryez: since the method is called on the fixnum, you can't use puts. it's not 5.puts after all, but puts(5)
<gchristensen>
Hi, I have an array of objects. I want to iterate over each object, calling a function that yields. I want each subsequent function call to happen inside the yielding of the parent. ie: [ Foo1, Foo2, Foo3 ] ... Foo1.mycall do Foo2.mycall do Foo3.mycall do ... end end end how might I do this?
<apeiros>
there is Object#display, but… eeew :D
<ryez>
that is, IO#puts, or Kernel#puts
<apeiros>
gchristensen: do you ever have an array which is not an array of objects? :)
fmcgeough has joined #ruby
codelogix has quit [Ping timeout: 264 seconds]
<apeiros>
gchristensen: inject might be useful for that.
<gchristensen>
apeiros: mmm.... I wonder, are blocks objects?
<apeiros>
gchristensen: no. but tell me how you create an array of blocks :D
<gchristensen>
haha fair enough. ok, I'll check out inject
<apeiros>
but re inject - it really depends on what you want to achieve.
<gchristensen>
(I used to be really good at ruby and knew these things ... then I stopped using it for long enough to atrophy :( )
<apeiros>
I guess "an empty array" would qualify. but that'd be cheating!
<ryez>
I found `[1, 2].each &IO.method(:puts)` works, but is that the usual solution?
<apeiros>
ryez: the usual solution is to stop fuzzing around with & syntax and just use a proper block.
<apeiros>
[1,2].each do |x| puts x end # ab-so-lutely nothing wrong with that
JeanCarloMachado has quit [Ping timeout: 264 seconds]
<fbt>
I have a scoping/ideological question: If I have, say, a hash produced by parsing a config. And that has contains stuff my workers need, do I just make the hash an instance object so that objects spawned from main could read it or do I pass it to each object?
<fbt>
Or maybe even a global variable for the config?
ChiefAlexander has joined #ruby
<apeiros>
pass
JakFrist[WVU] has joined #ruby
<apeiros>
I sometimes use a pattern like `class Foo::Bar; def initialize(config=Foo.default_config); …`
craigp has quit [Ping timeout: 264 seconds]
<ryez>
apeiros: yes for sure, but this question just came to my mind and I want to know the answer, thanks anyway
JeanCarloMachado has joined #ruby
<apeiros>
but I definitively allow passing the config.
cpfeilschifter[m has joined #ruby
M-manveru has joined #ruby
M-mistake has joined #ruby
fladson[m] has joined #ruby
bascht has joined #ruby
<apeiros>
ryez: btw., it'd be $stdout.method(:puts), not IO.method(:puts)
<fbt>
Hmm.
SteenJobs has joined #ruby
<apeiros>
IO.puts is Kernel#puts
<fbt>
If I pass the config as an argument to a method, the method then can modify the hash, right?
<fbt>
Why am I asking this. I can check.
nando293921 has joined #ruby
<fbt>
Ah. It can, but not accidentally.
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has quit [Remote host closed the connection]
oedgok has joined #ruby
the_drow has quit [Client Quit]
roamingdog has joined #ruby
JeanCarloMachado has quit [Ping timeout: 244 seconds]
velocity64 has joined #ruby
compro has quit [Ping timeout: 240 seconds]
velocity64 has quit [Remote host closed the connection]
elenatanasoiu has quit [Read error: Connection reset by peer]
JeanCarloMachado has joined #ruby
elenatanasoiu has joined #ruby
hk238 has joined #ruby
pandaant has joined #ruby
frankiee_ has quit [Quit: Lost terminal]
<apeiros>
fbt: you can always make it an immutable object
patarr has joined #ruby
danmcguire has joined #ruby
<fbt>
Oh. Right.
NTrash_ has quit [Ping timeout: 244 seconds]
<danmcguire>
is there something like return that just goes up to the block callers scope instead of the method callers scope? e.g. I have a method that has a mapping method inside of it...I'd like to return a val inside the method without using if/else
<danmcguire>
without returning that value all the way to the method callers scope
<dminuoso>
danmcguire: use "next"
<danmcguire>
dminuoso: thanks :)
antgel has joined #ruby
<fbt>
I have another question I can't easily find an answer to. I have a config with a list of 'modules' (files with classes) to load. And I want to somehow register sai... wait, I have filenames. nvm.
<fbt>
Wait, no, that doesn't answer the question.
<dminuoso>
danmcguire: Note if you want to completely break out, then use "break"
<danmcguire>
nice, thanks
craigp has joined #ruby
<elomatreb>
There's also throw...catch, which I still really want to use in actual code sometime
<dminuoso>
elomatreb: If Ruby had serious label/goto support that would be much better..
<dminuoso>
:(
<dminuoso>
But Id feel dirty if I compiled in JOKE support on production ruby servers..
<fbt>
Basically I have files with classes that I want to first load then call from main, but the kicker is I need to create only specific objects depending on the config.
Ananthu has joined #ruby
<fbt>
A friend of mine suggests eval'ing the files
<fbt>
Instead of load.
<dminuoso>
fbt: cancel your friendship and find knowledgeable people?
<fbt>
:D
<dminuoso>
Just a thought..
claudiuinberlin has joined #ruby
pandaant has quit [Ping timeout: 272 seconds]
<fbt>
I just can't think of a way to load classes from files and then create objects of said classes without knowing beforehand what classes they may be.
moeabdol has quit [Ping timeout: 240 seconds]
<fbt>
What comes to mind is registering the classes somehow, but I can't return anything from load, can I?
pandaant has joined #ruby
<apeiros>
fbt: have a proper filename <-> classname mapping
fullofca_ has joined #ruby
<apeiros>
that'd be sane and common anyway
<fbt>
Hmmm.
<apeiros>
foo/bar_baz.rb -> Foo::BarBaz
nettoweb has quit [Ping timeout: 264 seconds]
<apeiros>
alternatively have a registry. in foo/bar_baz.rb: Registry.register(Foo::BarBaz)
<fbt>
Oh.
<fbt>
Shit. OOP.
bsrd has quit [Quit: WeeChat 1.5]
<fbt>
I keep forgetting.
<apeiros>
remember, only partially using oop is poop
SteenJobs has joined #ruby
fullofc__ has joined #ruby
<elomatreb>
You can also use metaprogramming, e.g. included/inherited hooks
mark_66 has quit [Remote host closed the connection]
toni_ has joined #ruby
<flying>
hi guys I need to write a function where to to need to get in input an array
<apeiros>
that too, if those classes are forced to include/extend/subclass a module/class
mijk has joined #ruby
<flying>
def myfunction(a) { ... }
<flying>
could a be an array?
<apeiros>
flying: what?
<apeiros>
can't parse "where to to need to"
claudiuinberlin has quit [Ping timeout: 264 seconds]
fullofcaffeine has quit [Ping timeout: 264 seconds]
mark_66 has joined #ruby
ryez has quit [Ping timeout: 240 seconds]
notpratch is now known as pratch
<mijk>
hi, I"m trying to set a variable to a string and ARGV but I'm getting "[argument]" and it fails the script
<apeiros>
and yes, in `def mymethod(a)`, the argument `a` can be anything. that includes the possibility of it being an array
Burgestrand has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<flying>
I need to write a function in ruby function(array) { for each element "index" of the array do the sum of all the elements till the index}
<apeiros>
?code mijk
<ruby[bot]>
mijk: We can't help you without your code, please post it to https://gist.github.com
<apeiros>
mijk: don't forget to include the error. because "fails the script" is useless.
<Siraris>
Hi all, I’m having a hell of a time trying to get a param through strong params from an AJAX request. My data coming in is in the shape: {"position"=>{"position_data"=>{"187"=>{"row_order"=>"0"}, "188"=>{"row_order"=>"1"}, "189"=>{"row_order"=>"2"}, "190"=>{"row_order"=>"3"}, "191"=>{"row_order"=>"4"}, "192"=>{"row_order"=>”5”}}}}. I’ve required :position and permitted :position_data. I’ve tried a number of different methods
<Siraris>
whitelist position_data to no avail. I continue to get forbiddenattributeerror exceptions
<apeiros>
?rails Siraris
<ruby[bot]>
Siraris: Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
<Siraris>
Ah thanks
<Siraris>
I tried #rails and ##rails to no avail
<apeiros>
for some weird reason, #rails no longer forwards to #rubyonrails
a1fa has joined #ruby
ta_ has joined #ruby
teclator has joined #ruby
<a1fa>
ooo - nokogiri docs are not easy to find
<fbt>
Rawr. To render an erb, I have to pass a binding to the damn object
<fbt>
A binding with pieces of a hash that I also don't know beforehand! This is fun.
<a1fa>
i have a simple xml document, with a list of changing nodes
<a1fa>
how do you test the node name with nokogiri? would you do xpath again?
dminuoso has joined #ruby
<a1fa>
doc.npath("HEAD").each do |head| .. if head.npath("TAIL")? or is there a more simple method
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Hobbyboy has quit [Ping timeout: 272 seconds]
ninja007 has quit [Quit: ninja007]
AlexRussia has quit [Ping timeout: 276 seconds]
ninja007 has joined #ruby
tdy has quit [Ping timeout: 272 seconds]
pawnbox has quit [Remote host closed the connection]
Hobbyboy has joined #ruby
submitnine has quit [Remote host closed the connection]
<fbt>
So. I have two hashes local for main with values determined at runtime: config and panel_data. I want to render an erb template using values from these hashes.
andikr has joined #ruby
<fbt>
I don't *know* what do I need to pass there aside from “something from these hashes”.
<fbt>
Is this the point where you just use instance variables in main?
<flying>
apeiros thanks :)
<apeiros>
flying: I assume that means you solved the problem? congrats :)
mwlang has joined #ruby
jhack has quit [Ping timeout: 276 seconds]
tmtwd has joined #ruby
dminuoso has quit [Remote host closed the connection]
AlexRussia has joined #ruby
prawnzy has quit [Ping timeout: 264 seconds]
toni_ has joined #ruby
nocco has quit []
jaguarmagenta has joined #ruby
redpants has quit [Quit: leaving]
<flying>
nono I m still working on that but your help is useful :)
NTrash has joined #ruby
hashrocket has joined #ruby
Rodya_ has quit [Remote host closed the connection]
<flying>
I have still 2 questions: - how can I count all the elements in an array? - how can I create a new array from another array?
<flying>
array.count() should count all the elemtns :)
BytesAndCoffee has joined #ruby
banisterfiend has joined #ruby
JRajamaa has joined #ruby
ninja007 has quit [Quit: ninja007]
ta_ has quit [Remote host closed the connection]
<BytesAndCoffee>
anyone know how to get YouCompleteMe (Vim plugin) to play nice with Ruby?
<ruby[bot]>
a1fa: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
<a1fa>
how do you extract children with nokogiri?
<a1fa>
err. in this case i am trying to see if test is a weekly test or monthly
<flying>
I have an array like array [1,2,3,4,5,60,56,56,......] if I say array[4] I need to sum all the elements before and after that index
Siraris has joined #ruby
Siraris has quit [Client Quit]
<flying>
array1 = sum elements before index
<flying>
array2 = sum eleemtns after index
jhack has joined #ruby
polishdub has joined #ruby
<apeiros>
a1fa: as the bot said - I won't even open that.
<a1fa>
i am using pry to try to figure out this nokogiri thing, and its corn fusing
<dyjakan>
flying: try overriding [] method of array
* apeiros
smacks dyjakan with a stick
banisterfiend has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<apeiros>
bad advice. ignore that flying :)
chouhoul_ has joined #ruby
<apeiros>
but read the docs of Array#[]. you can use it to relatively easily get an array with all elements up to index 4, and an array with all elements after index 4
<havenwood>
"Refinements are designed to reduce the impact of monkey patching on other users of the monkey-patched class."
<havenwood>
Freedom patching!
<elomatreb>
But if you're still new to the language I'd say to ignore things like refinements, since they require quite a bit of understanding of how the classes in Ruby work
SteenJobs has quit [Quit: SteenJobs]
SteenJobs has joined #ruby
biberu\ has joined #ruby
jimmysaville has quit [Remote host closed the connection]
charliesome has joined #ruby
nando293921 has joined #ruby
jimmysaville has joined #ruby
biberu has quit [Ping timeout: 272 seconds]
jimmysaville has quit [Ping timeout: 276 seconds]
<dyjakan>
you could also make YourOwnArray that inherits from Array and then override its [] method; wouldn't that be a clean solution to the problem?
Devalo has quit [Remote host closed the connection]
minimalism has quit [Quit: minimalism]
<elomatreb>
dyjakan: A class that has your custom access methods and stores an array internally would probably better
tdy has joined #ruby
mattwashere has joined #ruby
<BytesAndCoffee>
anyone?
<BytesAndCoffee>
anyone know how to get YouCompleteMe (Vim plugin) to play nice with Ruby?
<a1fa>
BytesAndCoffee: anyone is out
dgncn has quit [Ping timeout: 244 seconds]
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
blackmesa has joined #ruby
phredus_ has joined #ruby
phredus_ has quit [Remote host closed the connection]
arashb has joined #ruby
brendan- has joined #ruby
MrBleu has quit [Quit: Page closed]
synthroid has joined #ruby
amclain has joined #ruby
jsrn_ has quit [Quit: Leaving]
<TomyWork>
is it possible to take a heap dump of an unmodified ruby process?
<TomyWork>
i want to see which objects take up most of the memory
b3atr has joined #ruby
[Butch] has joined #ruby
<b3atr>
how to test if a method takes a specific argument in minitest?
<TomyWork>
i have a rather small sinatra application that takes up 276 MB resident size for no apparent reason
coolboy has quit [Remote host closed the connection]
ninja007 has joined #ruby
AndrewIsHere has joined #ruby
<BytesAndCoffee>
oh. no decorator syntax? :(
karthick has left #ruby [#ruby]
pawnbox has joined #ruby
brendan- has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<CharlieLo>
I have a page that contains tabs of other models like movies, actors, locations etc. I am having difficulty updating the actors from within the movies_controller. Any help is much appreciated.
<hanmac>
i think flying wants the print methods like p or puts or print or any of their derivates
arnonhongklay has joined #ruby
Vingador has joined #ruby
<LyndsySimon>
apeiros: Yeah, throw/catch is certainly not what I'm looking for. My first impression of that structure is that it seems to be a slightly more complex version of GOTO.
<flying>
ok thanks for the help I can continue from myself :)
<flying>
yes
prawnzy has joined #ruby
<hanmac>
Ruby has GOTO too, but only as a joke ;P
<apeiros>
LyndsySimon: it's precisely what raise/rescue is, except you can use it to unwind the stack with any value, not just exceptions
<apeiros>
LyndsySimon: and no, it's a more limited (but hence less spaghetti) version of goto
AlphaAtom has joined #ruby
pwnd_nsfw has joined #ruby
ninja007 has left #ruby [#ruby]
<LyndsySimon>
catch also works on exceptions?
wrkrcoop has joined #ruby
<LyndsySimon>
Here's a minimal example of what I was thinking about when I asked the question. Would this be considered "fluent Ruby"? http://pastebin.com/2uWtJkZ1
<ruby[bot]>
LyndsySimon: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
arashb has quit [Remote host closed the connection]
<wrkrcoop>
is it possible to dyanmically create a class variable? like user = ‘steve’ @@user would be @@steve
jaequery has joined #ruby
pwnd_nsfw` has quit [Ping timeout: 272 seconds]
<apeiros>
LyndsySimon: that seems like a reasonable use for exceptions and doesn't seem to be flow control. if you'd use flow control, you'd get a race condition.
<apeiros>
LyndsySimon: i.e. flow control would be `if api_available? then get_from_api else get_from_db end`
flying has quit []
<LyndsySimon>
apeiros: OK, cool. I do consider it flow control, because it's expected that the exception be raised often.
<bougyman>
you don't need the begin in that get_the_thing method
<apeiros>
but that's prone to races. API might be available when you do api_available?, and gone when you do the actual request.
<hanmac>
wrkrcoop: it is possible, but that is very bad code
<LyndsySimon>
apeiros: As opposed to Javascript for instance, where it's inadvisable to use exceptions in this way because there is significant overhead in creating them.
prawnzy has quit [Ping timeout: 240 seconds]
<wrkrcoop>
hanmac: the other solution is to create 4 methods that all do the same thing but finish by creating a class variable witha particular name
<wrkrcoop>
i guess i could use a case statement …
<wrkrcoop>
hanmac: how do i interpolate on a class variable?
<hanmac>
wrkrcoop: either that or use a hash as class variable
<LyndsySimon>
wrkrcoop: I would consider defining method_missing for the class, if I understand properly
<LyndsySimon>
Note that I have ~10 hours of Ruby experience thus far though :)
<apeiros>
LyndsySimon: if "less heavy" also means "less correct", then you shouldn't opt for it.
<apeiros>
and I'm pretty sure testing for api presence is heavier than creating an exception, even in JS ;-)
jaguarmagenta has joined #ruby
Couch has quit [Ping timeout: 276 seconds]
<apeiros>
(and even if it wasn't - the "less correct" would still stand)
<hanmac>
method_missing is one of my 13 most liked methods, next to included and method_defined ;P
<apeiros>
hanmac: and there I thought it'd be one from fiddle :D
lxsameer has joined #ruby
Dysp has joined #ruby
<hanmac>
apeiros: which one? i didnt use fiddle that often
<apeiros>
no idea. one which allows you to tinker with ruby's internals.
<apeiros>
hm, or maybe one from RubyVM?
<Dysp>
Mjello. I am trying to produce some documentation with YARD. Works like a charm. One issue I would like to get your ideas on is how to host it; do you know of any service that will host such documentation? It must be privately accessable.
erlingur has quit [Ping timeout: 244 seconds]
elenatanasoiu has quit [Ping timeout: 240 seconds]
<apeiros>
define "privately accessible"
<hanmac>
LyndsySimon: hm i would prefer the exception route, or combine them with first doing if api_available? before even trying to get the api if able
<hanmac>
apeiros: do you mean: RubyVM::InstructionSequence.compile(str).disasm ? ;P
duderonomy has joined #ruby
JakFrist[WVU] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
mikecmpbll has joined #ruby
jaguarmagenta has quit [Ping timeout: 276 seconds]
pawnbox has quit [Remote host closed the connection]
erlingur has joined #ruby
peteykun has quit [Quit: Leaving]
<Dysp>
apeiros: I mean only accessable by people I choose to make it accessable for. Just like a private repository :)
<LyndsySimon>
hanmac: That example was just barely-working pseudocode at the moment :) In the real world where I've been tasked with something similar I'm actually using Spyke models to access the API.
<apeiros>
Dysp: then any paid hosting provider
<apeiros>
it's plain html after all.
xentity1x has quit [Ping timeout: 244 seconds]
beauby has quit [Read error: Connection reset by peer]
<Dysp>
apeiros: Yeah, sure, of course.
pawnbox has joined #ruby
<LyndsySimon>
I'm going to need a way to attempt to access the model via Spyke, but handle the error properly and notify the user of the failure, using little or no additional code during model access.
beauby has joined #ruby
<Dysp>
But I was wondering if you knew of anyone providing that service. But of course a private host is the proper solution
<Dysp>
Thank you.
nikivi has joined #ruby
<LyndsySimon>
I've got about seven years of Python experience and just moved to a Ruby shop, so I'm in this weird position where I know how to architect the solution, but don't yet know enough about the Ruby's architecture and idioms to do it elegantly. I'm rapidly coming up to speed though.
<apeiros>
Dysp: private for free is rare (for obvious reasons?)
<Dysp>
Yes. Obviously.
ponga has quit [Quit: Connection closed for inactivity]
wrkrcoop has left #ruby [#ruby]
<apeiros>
LyndsySimon: this channel should be able to help you easily with such things, assuming you provide a good gist
ishahnaz has quit []
* LyndsySimon
nods
<LyndsySimon>
apeiros: I think so, and it lets me not constantly interrupt people in my office who are working :)
<LyndsySimon>
In exchange I'll hang around and answer as many of the newbie questions as I can.
Madplatypus has joined #ruby
<apeiros>
sure. helping is top-down. much appreciated ;-)
<apeiros>
that's because things like Interrupt, NoMemoryError etc. should not be rescued by default :)
<hanmac>
also even more never rescue from Exception
SteenJobs has joined #ruby
<LyndsySimon>
Cool, I'll add that to my reading list.
compro has joined #ruby
<LyndsySimon>
hanmac: Yep. Don't want to be catcing SystemExit when someone is trying to shut down the process.
csk has quit [Read error: Connection reset by peer]
<hanmac>
yeah, someone wants to close it, but the program says "no" ;P
<apeiros>
frankiee_: Struct#to_h is correct. seems to me like your problem was elsewhere.
rcvalle has joined #ruby
csk has joined #ruby
mooe has joined #ruby
replay has joined #ruby
antgel has quit [Ping timeout: 272 seconds]
mrmortondk has joined #ruby
<frankiee_>
apeiros: awesome.. thanks for bringing me a step closer
moeabdol has joined #ruby
asal2107 has joined #ruby
ramfjord has joined #ruby
<apeiros>
frankiee_: sorry to not give you more. slightly distracted. but you put in a lot of effort to describe your problem. if it's still not solved later, I'll give it another shot.
fivmo has joined #ruby
Hobbyboy has joined #ruby
<frankiee_>
apeiros: thanks man i really appreciate hearing that. i try to describe it as much as possible because it also helps me lol
asal2107 has quit [Ping timeout: 272 seconds]
gingray has joined #ruby
yeticry has quit [Ping timeout: 264 seconds]
tyang has joined #ruby
Ananthu has quit [Quit: Connection closed for inactivity]
JoshS has quit [Quit: Leaving]
JeanCarloMachado has quit [Ping timeout: 240 seconds]
Rodya_ has joined #ruby
the_drow has quit [Quit: This computer has gone to sleep]
adac has joined #ruby
rodfersou|lunch is now known as rodfersou
symm- has quit [Ping timeout: 276 seconds]
Ropeney has joined #ruby
pawnbox has quit [Remote host closed the connection]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bob434 has joined #ruby
optiz0r has joined #ruby
SeepingN has joined #ruby
nankyokusei has joined #ruby
Guest54 has joined #ruby
bocaneri has quit [Read error: Connection reset by peer]
Silthias1 has joined #ruby
Silthias has quit [Ping timeout: 264 seconds]
<BytesAndCoffee>
where's a good place to learn ruby? i don't mean project euler or something like that, im already competent in python, i want to learn idiomatic ruby
<BytesAndCoffee>
using ruby like its meant to be used
preyalone has quit [Quit: Connection closed for inactivity]
fullofcaffeine has quit [Ping timeout: 276 seconds]
bob434 has quit [Quit: This computer has gone to sleep]
Xeago has joined #ruby
jackjackdripper has quit [Ping timeout: 240 seconds]
Devalo has joined #ruby
h1d has joined #ruby
pawnbox has joined #ruby
paradx has joined #ruby
roamingdog has joined #ruby
arnonhongklay has joined #ruby
Timba-as has joined #ruby
bob434 has joined #ruby
Tele has left #ruby ["Chau"]
pwnd_nsfw has quit [Ping timeout: 272 seconds]
fullofcaffeine has joined #ruby
bob434 has quit [Remote host closed the connection]
johnmilton has quit [Remote host closed the connection]
mim1k|work has joined #ruby
synthroid has joined #ruby
pwnd_nsfw has joined #ruby
jaequery has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bob434 has joined #ruby
bob434 has quit [Client Quit]
justinf has joined #ruby
petrichorx has quit [Quit: Connection closed for inactivity]
arnonhongklay has quit [Ping timeout: 244 seconds]
mim1k|wo1k has quit [Ping timeout: 240 seconds]
roamingdog has quit [Ping timeout: 264 seconds]
stamina has quit [Ping timeout: 276 seconds]
nettoweb has joined #ruby
charliesome has joined #ruby
<justinf>
when using Open3#popen3, what's the most efficient way for me to just pass through the data from the stdout and stderr file descriptors given to me by popen to the ruby process's stdout and stderr?
Devalo has quit [Remote host closed the connection]
Devalo has joined #ruby
prawnzy has joined #ruby
Ananthu has joined #ruby
<justinf>
ideally the user experience I'm looking for is that there shouldn't be an appreciable difference between running my ruby script and the underlying script that is being popened
dennisz has joined #ruby
dennisz has quit [Client Quit]
Wolland has quit [Remote host closed the connection]
toni_ has joined #ruby
fughetta_ has joined #ruby
sczizzo has quit []
prawnzy has quit [Ping timeout: 244 seconds]
bsrd has joined #ruby
<ciawal>
justinf: if you're just passing everything through, why do you need open3?
jaguarmagenta has joined #ruby
fughetta has quit [Ping timeout: 272 seconds]
toni_ has quit [Client Quit]
blackwind_123 has joined #ruby
<justinf>
ciawal: well, I'm running several subsequent commands, I want to make branching decisions based on retvals, etc.
<ciawal>
so why do you need open3?
ixti has joined #ruby
<justinf>
maybe I don't - what else could I be using?
<miqlas-H>
Guys is there any online IRC log for #ruby?
<miqlas-H>
echelog doesn't have anything if i see it correctly.
fivmo has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
Guest54 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
JakFrist[WVU] has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Zamyatin has joined #ruby
biberu\ has quit [Read error: Connection reset by peer]
JakFrist[WVU] has joined #ruby
marxarelli|afk is now known as marxarelli
marxarelli is now known as marxarelli|afk
miqlas-H has quit [Quit: Vision[0.9.7-H-20140108]: i've been blurred!]
roamingdog has joined #ruby
dnewkerk has joined #ruby
d5sx43 has joined #ruby
hakunin has joined #ruby
elastix has quit [Quit: elastix]
mattwashere has quit [Remote host closed the connection]
roamingdog has quit [Remote host closed the connection]
mattwashere has joined #ruby
roamingd_ has joined #ruby
dnewkerk has quit [Client Quit]
hahuang62 has quit [Ping timeout: 244 seconds]
mattwashere has quit [Ping timeout: 272 seconds]
babblebre has joined #ruby
john3 is now known as squidbits
xentity1x has quit [Ping timeout: 240 seconds]
millerti has joined #ruby
aidalgol has joined #ruby
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
JRajamaa has quit [Quit: Konversation terminated!]
andll has quit [Ping timeout: 240 seconds]
roamingd_ has quit [Remote host closed the connection]
gfvcastro has joined #ruby
roamingdog has joined #ruby
bobdobbs has quit [Ping timeout: 252 seconds]
NTrash has quit [Quit: Konversation terminated!]
roamingdog has quit [Ping timeout: 240 seconds]
beauby has quit [Read error: Connection reset by peer]
blackmes1 has joined #ruby
blackmesa has quit [Ping timeout: 244 seconds]
d5sx43 has quit []
jcao219 has joined #ruby
roamingdog has joined #ruby
beauby has joined #ruby
roamingdog has quit [Remote host closed the connection]
hanmac has quit [Ping timeout: 272 seconds]
hanmac has joined #ruby
dionysus69 has quit [Ping timeout: 276 seconds]
roamingd_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 272 seconds]
[Butch] has quit [Quit: I'm out . . .]
jphase_ has joined #ruby
Ananthu has quit [Quit: Connection closed for inactivity]
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
marxarelli has joined #ruby
jphase has quit [Ping timeout: 245 seconds]
roamingd_ has quit [Remote host closed the connection]
jphase_ has quit [Ping timeout: 244 seconds]
hakunin has quit [Remote host closed the connection]
prawnzy has quit [Remote host closed the connection]
prawnzy has joined #ruby
marxarelli is now known as marxarelli|afk
Azure|dc is now known as Azure
roamingdog has joined #ruby
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: goes moo moo]
chouhoul_ has quit [Remote host closed the connection]
roamingd_ has joined #ruby
marxarelli has joined #ruby
roamingdog has quit [Read error: Connection reset by peer]
tvsutton has quit [Changing host]
tvsutton has joined #ruby
Zamyatin has quit [Quit: Knocking out. Peace y'all...]
huthuthuthuthuth has joined #ruby
<huthuthuthuthuth>
is there a book that has ruby projects with code solutions that will challenge and improve a beginner's skill?
elenatanasoiu has joined #ruby
nando293921 has quit [Ping timeout: 244 seconds]
<havenwood>
huthuthuthuthuth: it's not a book but exercism.io sounds like that and you also get feedback on improvements from the community
Burgestrand has joined #ruby
<huthuthuthuthuth>
thanks :)
beauby has quit [Read error: Connection reset by peer]
Burgestrand has quit [Client Quit]
<havenwood>
huthuthuthuthuth: Learn to Program by Chris Pine is a gentle introduction to Ruby or The Well-Grounded Rubyist (2nd edition for modern Ruby) goes into more detail.
nankyokusei has joined #ruby
beauby has joined #ruby
hanmac has quit [Ping timeout: 272 seconds]
nando293921 has joined #ruby
hammond has joined #ruby
hanmac has joined #ruby
<huthuthuthuthuth>
what should i read after well grounded rubyist?
JeanCarloMachado has joined #ruby
<havenwood>
huthuthuthuthuth: Ruby code on the Githubs
roamingd_ has quit [Remote host closed the connection]
cyphase has quit [Ping timeout: 265 seconds]
<huthuthuthuthuth>
what is a good project on github that i should look for?
<huthuthuthuthuth>
i'm a complete beginner by the way
<hammond>
what are you trying to develop huthuthuthuthuth ?
moeabdol has quit [Ping timeout: 240 seconds]
nankyokusei has quit [Ping timeout: 272 seconds]
<huthuthuthuthuth>
ideally i would be able to create new frameworks and methodologies, but i don't want to get ahead of myself
<havenwood>
huthuthuthuthuth: I think you'll come across some ideas after going through those books and the exercism.io exercises.
<hammond>
what kinds of frameworks?
<huthuthuthuthuth>
basically i would love to be able to develop things like twitter, facebook, zillow, airbnb and the like
polishdub has quit [Quit: Leaving]
<huthuthuthuthuth>
hammond: anything really, i have no idea... i'm learning on my own
<havenwood>
huthuthuthuthuth: Learning Ruby is a good start!
roamingdog has joined #ruby
<hammond>
ruby is great for learning programming terms.
<hammond>
I would say rubyonrails huthuthuthuthuth .
<hammond>
SQL/Databases is useful too.
<elomatreb>
I'd advise againt goingt into Rails when you're new to the language, it's quite complex if you want to understand it
<hammond>
it is.
<havenwood>
huthuthuthuthuth: There's a lot of Ruby to learn - I'd vote focus on that for now!
cyphase has joined #ruby
ChiefAlexander has quit [Remote host closed the connection]
<hammond>
learning how to create webapps is good though.
<huthuthuthuthuth>
how hard is it to create a chess game?
<huthuthuthuthuth>
no ai
<huthuthuthuthuth>
just two players
<havenwood>
huthuthuthuthuth: A command line chess game? ;-) It's a fun exercise!
RegulationD has quit [Remote host closed the connection]
cyphase has quit [Max SendQ exceeded]
<huthuthuthuthuth>
yeah i would like to make that
<huthuthuthuthuth>
it seems impossible for me at the moment lol
cyphase has joined #ruby
<hammond>
400 lines of code away.
<elomatreb>
huthuthuthuthuth: Keep in mind that code you write to learn does not have to be any more beautiful, elegant, or efficient than you personally deem necessary
<huthuthuthuthuth>
as long as it works and i understand what it does i'm happy
<hammond>
huthuthuthuthuth: yeah well you would first design modules and classes from top to buttom, design the architecture, make it work conceptually and then implement it.
<huthuthuthuthuth>
i don't want my code to be like actual code
nofxx has joined #ruby
RikkiMongoose has quit [Quit: Leaving]
<frankiee_>
hammond b-400
cyphase has quit [Max SendQ exceeded]
rashid has joined #ruby
[k- has quit [Quit: -a- IRC for Android 2.1.32]
cyphase has joined #ruby
cyphase has quit [Max SendQ exceeded]
cyphase has joined #ruby
<hammond>
huthuthuthuthuth: ruby has a window builder too you can play with. it creates guis.
jackjackdripper1 has quit [Quit: Leaving.]
Macrobiotic has quit [Quit: Connection closed for inactivity]
sepp2k has quit [Quit: Leaving.]
tcrypt_ has joined #ruby
chouhoulis has joined #ruby
tcrypt has quit [Ping timeout: 272 seconds]
yfeldblum has quit [Remote host closed the connection]
yfeldblum has joined #ruby
hanmac has quit [Ping timeout: 272 seconds]
conta has joined #ruby
tcrypt_ has quit [Ping timeout: 272 seconds]
Derperperd has joined #ruby
Azure has quit [Excess Flood]
beauby has quit [Read error: Connection reset by peer]
hanmac has joined #ruby
Azure has joined #ruby
marxarelli is now known as marxarelli|afk
marxarelli|afk has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
conta has quit [Ping timeout: 272 seconds]
ResidentBiscuit has joined #ruby
tcrypt has joined #ruby
fughetta_ has quit [Quit: WeeChat 1.0.1]
AndrewIsHere has quit [Remote host closed the connection]
elenatanasoiu has quit [Ping timeout: 276 seconds]
AndrewIsHere has joined #ruby
<_sfiguser>
hello everyone i need help for creating my gui app in ruby
beauby has joined #ruby
<_sfiguser>
i need to have a background image and two buttons on these background image
<_sfiguser>
how can i do that ?
<havenwood>
_sfiguser: What GUI library are you using?
AndrewIs_ has joined #ruby
AndrewI__ has joined #ruby
hakunin has joined #ruby
hana has joined #ruby
AndrewIsHere has quit [Ping timeout: 272 seconds]
hana has quit [Client Quit]
AndrewIs_ has quit [Ping timeout: 272 seconds]
AndrewI__ has quit []
<_sfiguser>
havenwood, shoesrb
<_sfiguser>
havenwood, any suggestion ?
NTrash has joined #ruby
<_sfiguser>
havenwood, is shoesrb ok ?
Madplatypus has quit [Quit: Connection closed for inactivity]
<havenwood>
_sfiguser: Sure. Are you using Shoes 3 or Shoes 4?