apofis has quit [Quit: This computer has gone to sleep]
bertocode has quit [Quit: Nettalk6 - www.ntalk.de]
dopieee has joined #ruby
keen___________4 has joined #ruby
segfalt has joined #ruby
keen___________3 has quit [Ping timeout: 255 seconds]
StephenOTT has quit [Quit: StephenOTT]
MatthewsFace has quit [Remote host closed the connection]
starfox_sf has joined #ruby
vivekananda has quit [Ping timeout: 265 seconds]
commondream has quit [Remote host closed the connection]
rubie has quit [Remote host closed the connection]
BanzaiJoe has quit [Ping timeout: 245 seconds]
charliesome has quit [Quit: zzz]
davedev2_ has quit []
bkxd_ has quit [Quit: Reconnecting]
bkxd has joined #ruby
northfurr has joined #ruby
spyderman4g63 has quit []
kinduff has quit [Ping timeout: 265 seconds]
snophey has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
fgo has joined #ruby
jpfuentes2 has joined #ruby
baweaver|work has quit [Ping timeout: 240 seconds]
tjbiddle has quit [Quit: tjbiddle]
Vile` has quit [Ping timeout: 255 seconds]
Akagi201 has joined #ruby
Akagi201 has quit [Remote host closed the connection]
Akagi201 has joined #ruby
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has quit [Ping timeout: 265 seconds]
Vile` has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
jackjackdripper has quit [Read error: Connection reset by peer]
jackjackdripper has joined #ruby
dopieee has quit [Quit: This computer has gone to sleep]
iamninja has quit [Read error: Connection reset by peer]
di19026 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
jackjackdripper has joined #ruby
bb010g has quit [Quit: Connection closed for inactivity]
<di19026>
Hi guys, I’m… Vaguely newish to ruby, and I’m having a weird encoding problem resulting in the following error:
<di19026>
ERROR: Encoding::CompatibilityError: incompatible character encodings: UTF-8 and ASCII-8BIT
DynamicMetaFlow has joined #ruby
baweaver_ has joined #ruby
djbkd has quit [Quit: My people need me...]
<di19026>
This is coming from a system call- I’m running a knife ec2 server create command, which outputs in color, so I kinda think that’s the problem.
<di19026>
I found a suggestion that setting the encoding via environment variable as such:
<di19026>
ENV['LC_CTYPE']='en_US.UTF-8'
<di19026>
…would help, but it didn’t make a difference.
<di19026>
Any thoughts?
<di19026>
I’m on Amazon linux, ruby 2.0.0p643 (2015-02-25) [x86_64-linux]
AlphaAtom has joined #ruby
zendrix has quit [Ping timeout: 264 seconds]
<di19026>
Oh, I also tried using exec instead of system. I’m about to try backticks.
NeverDie has quit [Quit: I'm off to sleep. ZZZzzz…]
Mongey__ has joined #ruby
Mongey__ has quit [Client Quit]
<jhass>
what's p Encoding.default_external and p Encoding.default_internal?
mrsolo has quit [Quit: Leaving]
charliesome has joined #ruby
mmazing has joined #ruby
<di19026>
irb(main):003:0> p Encoding.default_external
<di19026>
#<Encoding:UTF-8>
<di19026>
=> #<Encoding:UTF-8>
podman has quit [Quit: Connection closed for inactivity]
<di19026>
irb(main):004:0> p Encoding.default_internal
<di19026>
nil
<di19026>
=> nil
<di19026>
Perhaps I need to set Encoding.default_internal to UTF-8?
<jhass>
shouldn't matter, falls back to that on 2.0
hahuang65 has quit [Ping timeout: 245 seconds]
<jhass>
so your call fails in that irb shell too with the same error?
robustus|Off has quit [Ping timeout: 264 seconds]
<di19026>
i haven’t actually tried it in an IRB shell, it takes a few minutes to run. hang on, lemme try it and see what happens
<di19026>
(by the way, backticks didn’t work either)
CustosLimen has quit [Max SendQ exceeded]
robustus has joined #ruby
baweaver_ has quit [Remote host closed the connection]
<di19026>
Okay, running in irb now. Stand by and we’ll see what happens.
tjbiddle has joined #ruby
CustosLimen has joined #ruby
baweaver_ has joined #ruby
kubunto has joined #ruby
karpuragauram has quit [Read error: Connection reset by peer]
<kubunto>
is it possible to manipulate EXIF info in ruby
segfalt has quit [Quit: segfalt]
workmad3 has joined #ruby
<jhass>
kubunto: sure, there should a couple gems for it, just search on rubygems.org
<di19026>
Nope, no dice.
<di19026>
Same problem in IRB
kinduff has joined #ruby
<jhass>
able to share the exact line you run?
veduardo has joined #ruby
Aswebb_ has joined #ruby
fujimura has joined #ruby
<di19026>
I’ll have to pull out a few company bits
<kubunto>
jhass: may i ask you a non ruby question in private?
Vile` has joined #ruby
baweaver_ has quit [Ping timeout: 240 seconds]
<di19026>
Unfortunately it’s not particularly telling if you don’t know chef/knife stuff, but it normally feeds out a ton of status update things in color while it builds.
<jhass>
kubunto: no, too late, anything I can answer you can ask the channel
<jhass>
kubunto: I get 22 gems if I search for exif on rubygems.org
<kubunto>
so did i, most if not all are readers only
<kubunto>
it was also a tourist question about germany
<di19026>
My original command had a pipe to tee instead of a redirect, but I thought maybe if I didn’t send the output anywhere ruby cared about it would help...
<jhass>
di19026: mmh, you're sure the exception is raised by calling that line and not _printed_ (=happening in) that call?
workmad3 has quit [Ping timeout: 244 seconds]
<di19026>
Oh, I also tried forcing TERM to xterm
<di19026>
Meaning would I get the error if I ran it normally in my shell?
oo_ has joined #ruby
<jhass>
yeah
fujimura has quit [Ping timeout: 250 seconds]
<di19026>
I’m… 99.9% sure of that.
<jhass>
well, most likely
<di19026>
It’s been a long day so I’m willing to humor the possibility that I made some dumbass mistake though
OtterCoder has quit [Ping timeout: 256 seconds]
Aswebb_ has quit [Ping timeout: 272 seconds]
<di19026>
I can try it, it’s just that it takes like 3 minutes to see this thing fail or not fail
bkxd has joined #ruby
<di19026>
Let me see if I can find some less onerous knife command to test with...
chouhoulis has quit [Remote host closed the connection]
<jhass>
wrap the call in irb in begin; ...; rescue Exception; puts "here"; end;
vmmf08 has joined #ruby
veduardo has quit [Ping timeout: 265 seconds]
<jhass>
if you see "here" printed your assumption is right, if you still see the backtrace, it's happening inside the command
<towski__>
how do I get the non modulo part of a modulo
<di19026>
okay, trying that in irb
rcvalle has quit [Quit: rcvalle]
<di19026>
Ahh, good idea
NeverDie has joined #ruby
jespada has quit [Ping timeout: 246 seconds]
<jhass>
towski__: the quotient? ;)
<towski__>
thank you :) yes, I was spacing
<di19026>
So, interestingly, I tried running another command that I knew would generate color output with knife and it didn’t cause a problem.
juanpaucar has quit [Remote host closed the connection]
chouhoul_ has joined #ruby
<di19026>
I still got the error (and no “here”) with the begin/rescue wrapper.
chouhoul_ has quit [Remote host closed the connection]
vmmf08 has quit [Client Quit]
<jhass>
then I think my guess is right, if it's working inside your shell, there's some environment set differently
<di19026>
hmm
<jhass>
first think to compare would be locale to puts `locale`
<jhass>
*thing
_seanc_ has joined #ruby
Agoldfish has quit [Quit: G'Bye]
<di19026>
Those look identical
<jhass>
mh, strange
Exponential has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<di19026>
Everything is en_US.UTF-8 except for LC_ALL which is blank
<di19026>
I think you’re on to something though…
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<di19026>
I’m gonna surf through the whole environment, let me see if anything interesting comes up
<jhass>
yeah good luck, gonna be the needle in the haystack I'm afraid
<di19026>
Yeah… Well here’s something. Bash is set to /bin/sh rather that /bin/bash in irb
jerski has quit [Quit: Page closed]
bkxd has quit [Ping timeout: 252 seconds]
<jhass>
uh, I sincerely hope that's not it
<jhass>
would surprise me a lot
<di19026>
…okay yeah that would be pretty dumb
moretti has quit [Quit: Leaving...]
<di19026>
I am pretty tired, I apologize for dumbness :D
<jhass>
well, though, parsing may differ
<jhass>
commandline parsing that is
<jhass>
system(%(/bin/bash -c '...')) would be the way to rule that out
<jhass>
though I'd still be surprised
<di19026>
Yeah, the environments are absolutely identical otherwise. Even my path is there.
Soda has quit [Ping timeout: 264 seconds]
bkxd has joined #ruby
ghr has joined #ruby
<di19026>
Okay, this one’s a longshot, but since it’s an encoding thing, maybe it doesn’t like the ~ in my path.
DynamicMetaFlow has quit [Read error: Connection reset by peer]
ghr has joined #ruby
briandavis has quit [Remote host closed the connection]
vdamewood has quit [Quit: Life beckons.]
pikos has joined #ruby
shazaum_ has joined #ruby
shazaum_ has joined #ruby
dfockler has quit [Ping timeout: 255 seconds]
altrex has joined #ruby
dgutierrez1287 has joined #ruby
pikos has quit [Client Quit]
ghr has quit [Ping timeout: 244 seconds]
bigkevmcd has joined #ruby
altrex has left #ruby [#ruby]
veduardo has quit [Ping timeout: 256 seconds]
Brozo has left #ruby ["Leaving..."]
DynamicMetaFlow has joined #ruby
yqt has quit [Ping timeout: 258 seconds]
hyperjuice has joined #ruby
mrsolo has joined #ruby
mrsolo has quit [Remote host closed the connection]
aaeron has joined #ruby
erichmenge has joined #ruby
axl_ has quit [Quit: axl_]
idafyaid has joined #ruby
jack_rabbit has quit [Ping timeout: 252 seconds]
idafyaid has quit [Changing host]
idafyaid has joined #ruby
shazaum_ has quit [Quit: Leaving]
pikos has joined #ruby
Yzguy has quit [Quit: I'm sleeping, go away.]
rushed has quit [Quit: rushed]
pikos has quit [Client Quit]
Ox0dea has joined #ruby
mark[oz] has quit [Remote host closed the connection]
mike___1234 has quit [Ping timeout: 264 seconds]
mase-chatter has quit [Quit: Leaving]
mdz_ has quit [Remote host closed the connection]
tubuliferous_ has joined #ruby
hyperjuice has quit []
Cache_Money has quit [Quit: Cache_Money]
zrl has joined #ruby
chouhoulis has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
charliesome has quit [Quit: zzz]
lewix has quit [Remote host closed the connection]
tubuliferous_ has quit [Ping timeout: 276 seconds]
snapcase has quit [Quit: leaving]
mary5030 has joined #ruby
Papierkorb has quit [Quit: ArchLinux completes an endless loop faster than any other distro!]
starfox_sf has quit [Quit: leaving]
ur5us_ has joined #ruby
veduardo has joined #ruby
ur5us has quit [Ping timeout: 250 seconds]
olistik has joined #ruby
Aswebb_ has joined #ruby
djbkd has joined #ruby
rubie has quit [Remote host closed the connection]
pdoherty has joined #ruby
olistik has quit [Ping timeout: 258 seconds]
aaeron has quit [Quit: aaeron]
Spami has joined #ruby
charliesome has joined #ruby
Cache_Money has joined #ruby
snapcase has joined #ruby
byonic has joined #ruby
Channel6 has joined #ruby
Aswebb_ has quit [Ping timeout: 246 seconds]
Cache_Money has quit [Client Quit]
darkf has joined #ruby
Brozo has joined #ruby
jenrzzz has quit [Ping timeout: 264 seconds]
aphprentice_ has joined #ruby
atomical has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
codeFiend has quit [Quit: codeFiend]
bantic has joined #ruby
bb010g has joined #ruby
mike___1234 has joined #ruby
i8igmac has quit [Ping timeout: 272 seconds]
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
caseypatrickdris has quit [Remote host closed the connection]
jgpawletko has joined #ruby
chouhoulis has quit [Remote host closed the connection]
chouhoulis has joined #ruby
tomeara has joined #ruby
swgillespie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
sdwrage has quit [Quit: Leaving]
DynamicMetaFlow has quit [Remote host closed the connection]
jfarmer has joined #ruby
DynamicMetaFlow has joined #ruby
nateberkopec has quit [Quit: Leaving...]
aef__ has quit [Remote host closed the connection]
aef has joined #ruby
[H]unt3r has quit [Quit: Leaving]
duderonomy has joined #ruby
veduardo has quit [Ping timeout: 265 seconds]
codeFiend has joined #ruby
havenwood has joined #ruby
blandflakes has joined #ruby
tomeara has quit [Ping timeout: 265 seconds]
CloCkWeRX has quit [Ping timeout: 272 seconds]
blandflakes has quit [Client Quit]
rubie has joined #ruby
n80 has joined #ruby
braincrash has quit [Quit: bye bye]
dgutierrez1287 has quit [Remote host closed the connection]
zoidfarb has joined #ruby
yfeldblum has quit [Remote host closed the connection]
seank_ has quit [Remote host closed the connection]
claptor has quit [Quit: this channel is bakas]
ghr has joined #ruby
<zoidfarb>
Hello, I'd like to use 'rsvg-convert' to convert some SVG files to PNGs. Can somebody point me to some docs for how to do that in ruby? Are there ruby bindings for rsvg, or should I just call out with the shell?
frem has quit [Quit: Connection closed for inactivity]
zenguy_pc has quit [Ping timeout: 272 seconds]
Brozo has quit [Quit: Leaving...]
tkuchiki has joined #ruby
braincrash has joined #ruby
TheNet has joined #ruby
joneshf-laptop has joined #ruby
macmartine has joined #ruby
ghr has quit [Ping timeout: 246 seconds]
claptor has joined #ruby
<yorickpeterse>
anybody here familiar with Ruby(Gems) no longer dumping compiled extensions into the lib/ directory? I have some users reporting a extensions is only copied into ~/.gem/...../extensions and the gem local ./ext/ directory
iamninja has quit [Read error: Connection reset by peer]
iamninja has joined #ruby
Limix has joined #ruby
RegulationD has quit [Ping timeout: 265 seconds]
rkazak has joined #ruby
sandstrom has quit [Ping timeout: 256 seconds]
jenrzzz has joined #ruby
<Elboerea>
Any good article on unit testing?
TheBrayn has quit [Ping timeout: 264 seconds]
tbuehlmann has quit [Ping timeout: 264 seconds]
tbuehlmann has joined #ruby
Musashi007 has quit [Quit: Musashi007]
Yzguy has joined #ruby
mark[oz] has joined #ruby
oo_ has quit [Remote host closed the connection]
jgt has joined #ruby
spider-mario has quit [Ping timeout: 272 seconds]
spider-mario has joined #ruby
gambl0re has joined #ruby
tjbiddle has quit [Quit: tjbiddle]
mark[oz] has quit [Remote host closed the connection]
mark[oz] has joined #ruby
TheBrayn has joined #ruby
freerobby has joined #ruby
chouhoul_ has joined #ruby
jgt has quit [Ping timeout: 258 seconds]
mary5030 has quit [Remote host closed the connection]
byprdct has joined #ruby
n80 has quit [Quit: n80]
byprdct has quit [Max SendQ exceeded]
chouhoulis has quit [Ping timeout: 244 seconds]
bantic has joined #ruby
mrmargolis` has quit [Remote host closed the connection]
krz has quit [Quit: WeeChat 1.0.1]
psy_ has quit [Ping timeout: 256 seconds]
mcpierce has quit [Ping timeout: 250 seconds]
nedp has joined #ruby
SalexW has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
someword has joined #ruby
mrmargolis has quit [Remote host closed the connection]
mwlang has joined #ruby
iamjarvo has joined #ruby
simi has quit [Ping timeout: 265 seconds]
mcpierce has joined #ruby
David_H__ has joined #ruby
<mwlang>
does anyone know offhand what encoding Ruby 1.8.6 and Rails 1.2 used on Windows to write log files that contain Danish messages? Offering a bounty of one free beer delivered via PayPal if you actually do know because this has got to be the most obscure thing for anyone to know off the top of their head! :-)
<mwlang>
yorickpeterse: true…but still there’s a binary representation scheme going on.
<mwlang>
hanmac: to us, anyway. ;-)
<eam>
mwlang: why is that a nope?
someword has quit [Ping timeout: 276 seconds]
<mwlang>
eam: well, maybe not a “nope” but more like, Ruby 2.x doesn’t encode with that: data = File.read(File.join(log_path, 'productio.log'), encoding: "utf-16")
<mwlang>
I may just encode and replace invalids with spaces.
<bnagy>
mwlang: try binread?
<eam>
have you looked at the logfile to verify it has text?
someword has joined #ruby
<bnagy>
don't think binread has the encoding options, you'll have to play with encodings once it's read in
<mwlang>
eam: definitely has text. head and tail confirm its a normal looking log file.
gix has quit [Ping timeout: 256 seconds]
<mwlang>
it’ll actually read portions of the file if I head/tail a few lines…but it’s bombing on some SQL statements that are inserting text written in Danish.
fedexo has joined #ruby
TheNet has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<mwlang>
I’m just going to ignore the Danish…that info is not important to extract from the logs. I’m chasing timestamps and controller actions and parameters: File.read(File.join(log_path, 'production.log')).force_encoding('BINARY').encode('UTF-8', :undef => :replace, :replace => '')
<mwlang>
that latter does the trick nicely.
casadei has quit [Remote host closed the connection]
claptor has quit [Quit: this channel is bakas]
gix has joined #ruby
yfeldblum has joined #ruby
LMity2 has joined #ruby
hahuang65 has joined #ruby
aphprentice_ has quit [Ping timeout: 255 seconds]
LMity has quit [Ping timeout: 265 seconds]
7YUAAGHOB has joined #ruby
car has quit [Ping timeout: 245 seconds]
Hijiri has joined #ruby
justintv90 has joined #ruby
havenwood has quit [Remote host closed the connection]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<m0r0n>
It's trying to use a protected method which is defined as "A protected method can be invoked only by objects of the defining class and its subclasses. Access is kept within the family."
<sevenseacat>
m0r0n: because you made it protected
<m0r0n>
Isn't "box" an object of the defining class?
<sevenseacat>
meaning you can only call it from within the class/subclasses
nonparfumee has joined #ruby
<sevenseacat>
from *within* the onject of the defining class
bantic has joined #ruby
<m0r0n>
sevenseacat, So then can you help me understand what private is then?
<sevenseacat>
other methods inside Box can call printArea. from outside, you can't.
<sevenseacat>
private methods can only be called on self.
<sevenseacat>
cannot be called with an explicit receiver
tubuliferous_ has joined #ruby
<sevenseacat>
eg. if box had a reference to box2, then it couldnt call box2.getWidth
<sevenseacat>
because getWidth is private
<Elboerea>
And you can't call it with self either, since self is a variable.
Musashi007 has joined #ruby
<shevy>
getCat
<yorickpeterse>
drager: ping
<yorickpeterse>
err fuck wrong one
<yorickpeterse>
drbrain: ping
<shevy>
m0r0n in ruby it is a bit weird because you could always use .send to invoke any method
<sevenseacat>
this is why its good practice to only use public_send unless you're sure you need send
mark[oz] has quit [Remote host closed the connection]
<shevy>
`flag' contains several categories of attributes and it makes us confusion (at least, I had confused).
mdz_ has joined #ruby
<shevy>
"I did not know what "NOEX" stands for."
<shevy>
I asked Matz (who made this name) and his answer was "Nothing". "At first, it meant NO EXport (private), but the original meaning was gone."
<shevy>
japanese hackers are funny :)
<m0r0n>
I'm still not following sevenseacat. This has always been an issue for me to understand. So you said if box had a reference to box2, then it couldn't call box2.getWidth. Why can't box call box.getWidth then?
tubuliferous_ has quit [Ping timeout: 246 seconds]
<sevenseacat>
because box is an explicit receiver
<sevenseacat>
i think you're confusing things
<sevenseacat>
box can call getWidth on itself
<sevenseacat>
but it cannot call getWidth on another box
nahtnam has joined #ruby
Exponential has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<sevenseacat>
but if it was a protected method, it could.
<shevy>
"<<>> is like <> but uses three-argument open to open each file in @ARGV."
<shevy>
so they had the spaceship operator
martinjungblut has left #ruby [#ruby]
<shevy>
how do they now call <<>>? BORG cube?
<sevenseacat>
well to be fair spaceship is <=>
macmartine has joined #ruby
<eam>
<> is the diamond operator
Brando753 has quit [Ping timeout: 265 seconds]
<eam>
I never considered that <> might use 2arg open
<shevy>
"CGI.pm HAS BEEN REMOVED FROM THE PERL CORE"
<shevy>
hmmmm
<shevy>
I remember having written perl .cgi scripts in the most ancient days
GPrime has joined #ruby
<shevy>
"The rationale for this is that the HTML generation functions of CGI.pm are an obfuscation at best and a maintenance nightmare at worst. You should be using a template engine for better separation of concerns."
<ljarvis>
I really wish I could fix my sleeping patterns. I slept like ass last night
apofis has joined #ruby
<maloik>
pattern, as in the time you go to bed etc?
Axy has joined #ruby
<ljarvis>
actually pattern is the wrong word, I just don't sleep well
<mozzarella>
do you also get sleep paralysis?
randiman has joined #ruby
randiman has quit [Client Quit]
tubuliferous_ has joined #ruby
<maloik>
do you go to bed at the same time every day?
<ljarvis>
mozzarella: no
<mozzarella>
lucky you
<ljarvis>
maloik: not really, but within an hour or two
<tbuehlmann>
careful, a lot of specialist experts incoming
<ljarvis>
I suffer pretty bad with insomnia
<maloik>
sleeping the same amount each day, going to bed the same time, and using an app that wakes you up when you're in a light sleep cycle works well for me
<maloik>
no screens for like an hour before bed supposedly works as well, but who am I kidding that never happens
<ljarvis>
I just sit awake for hours. Also I'm pretty bad at going to sleep right after doing a load of work
<ljarvis>
right, yep
<maloik>
actually it has been happening, when I go climbing I usually arrive home late enough to go straight to bed
<ljarvis>
que "don't worry, we'll upgrade to 1.9.1"
<ljarvis>
now you have more problems
<Aeyrix>
sevenseacat: That was extended too. :P
CloCkWeRX has quit [Quit: Leaving.]
Zai00 has joined #ruby
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Aswebb_ has joined #ruby
apofis has joined #ruby
<Aeyrix>
sevenseacat: What's for dinner? I need ideas.
bosma has quit [Ping timeout: 265 seconds]
<sevenseacat>
Aeyrix: mmmm sausages i think.
<Aeyrix>
Hmmm.
marr has joined #ruby
unsymbol has joined #ruby
skade has quit [Quit: Computer has gone to sleep.]
spider-mario has quit [Remote host closed the connection]
Hijiri has quit [Ping timeout: 276 seconds]
thomasvm has joined #ruby
datanoise has quit [Ping timeout: 264 seconds]
Hijiri has joined #ruby
ndogz has joined #ruby
Scroff has joined #ruby
dawkirst has joined #ruby
stoffus has joined #ruby
skade has joined #ruby
fujimura has quit [Remote host closed the connection]
ta has joined #ruby
varunwachaspati has quit [Read error: Connection reset by peer]
fgo has joined #ruby
dionysus69 has joined #ruby
simi has joined #ruby
tvw has joined #ruby
jenrzzz has quit [Ping timeout: 272 seconds]
pwnz0r has quit [Remote host closed the connection]
affenhoden has quit [Quit: leaving]
Palmer11 has quit [Quit: Palmer11]
iwishiwerearobot has quit [Quit: Be back later ...]
olistik has joined #ruby
iwishiwerearobot has joined #ruby
dave_craddock has quit [Ping timeout: 250 seconds]
Aswebb_ has quit []
fgo has quit [Ping timeout: 272 seconds]
c0m0 has quit [Ping timeout: 246 seconds]
dionysus69 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0/20150511103303]]
bkxd has joined #ruby
dionysus69 has joined #ruby
jfarmer has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
fujimura has joined #ruby
joonty has joined #ruby
XThief has joined #ruby
Olipro_ is now known as Olipro
iamninja has quit [Read error: Connection reset by peer]
dave_craddock has joined #ruby
_seanc_ has quit [Quit: _seanc_]
iamninja has joined #ruby
IrishGringo has quit [Ping timeout: 265 seconds]
angus has joined #ruby
RegulationD has joined #ruby
<livcd>
hi what's the use for class << self ?
apofis has quit [Quit: This computer has gone to sleep]
<tobiasvl>
livcd: opening up the singleton class
Alina-malina has quit [Read error: Connection reset by peer]
rdark has joined #ruby
apofis has joined #ruby
workmad3 has quit [Ping timeout: 256 seconds]
<apeiros>
livcd: to define class methods and apply things on the class level, e.g. attr_* methods, or alias.
bkxd has quit [Ping timeout: 276 seconds]
c0m0 has joined #ruby
allomov has joined #ruby
MasterPiece has joined #ruby
<livcd>
apeiros: and they are specific to that singleton class ?
<apeiros>
the same as with any class, yes. they're specific to where you use them.
<apeiros>
(singleton_class is still a class - obeys the same rules)
<livcd>
ah ok
olistik has quit [Remote host closed the connection]
<ljarvis>
I often see resources lack promoting the idea that a class is just an instance of Class, I wonder if it's confusing or just not thought of
<livcd>
and is there any difference between def self.foo end ? and class << self def foo end end ?
thomasvm_ has joined #ruby
RegulationD has quit [Ping timeout: 272 seconds]
<apeiros>
livcd: no
<livcd>
uhm metaprogramming in ruby is confusing for me
<apeiros>
that'll pass
thomasvm has quit [Ping timeout: 246 seconds]
<apeiros>
the basic concepts actually have a very small surface
northfurr has quit [Quit: northfurr]
chthon has joined #ruby
<apeiros>
I think I need to make a "quickstart ruby" where I delineate those concepts
mikecmpbll has joined #ruby
<livcd>
please do :-)
<livcd>
i'll pay you 10euros :D
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<apeiros>
time…
ringarring has joined #ruby
Mekkis has quit [Excess Flood]
<apeiros>
I have some more pressing priorities :)
greenbagels_ has quit [Quit: Leaving]
ta has quit [Remote host closed the connection]
Mekkis has joined #ruby
<livcd>
i guess they earn you more
<apeiros>
actually not
<apeiros>
they're volunteer stuff
dseitz_ has joined #ruby
Forgetful_Lion has quit [Remote host closed the connection]
DEA7TH has joined #ruby
dseitz has quit [Ping timeout: 255 seconds]
dseitz__ has joined #ruby
dseitz__ is now known as dseitz
<gregf_>
livcd: have you used Java or even PHP or python before?
<livcd>
gregf_: little python
tkuchiki has quit [Ping timeout: 250 seconds]
<gregf_>
'static' refers to a class_method
ta has joined #ruby
<jhass>
mmh, I'm not sure that parallel will help much in understanding singleton classes in the context of metaprogramming
yfeldblum has quit [Ping timeout: 265 seconds]
<gregf_>
livcd: class Foo(object): def __init__(self, *args, **kwargs): for k,v in kwargs.items(): setattr(self, k, v); @staticmethod def foo(bar): print bar
dseitz_ has quit [Ping timeout: 264 seconds]
kenndel has joined #ruby
<gregf_>
livcd: thats a static method in python :/
<ljarvis>
:/
quimrstorres has joined #ruby
oo_ has quit [Remote host closed the connection]
<livcd>
yes :/
<gregf_>
livcd: class Foo: def initialize(self, params={}): params.each { |k,v| instance_variable_set "@#{k}", v;end def self.foo(bar): print bar; end <== in ruby :/
khebbie has joined #ruby
quimrstorres has quit [Remote host closed the connection]
<ljarvis>
I really dont have any clue as to how the attr setting in this example is remotely relevant
fabrice31_ has joined #ruby
<sevenseacat>
irc is a terrible medium for sharing code like that
fabrice31 has quit [Ping timeout: 255 seconds]
aclapinpepin has quit [Ping timeout: 256 seconds]
fujimura has quit [Remote host closed the connection]
sigurding has quit [Quit: sigurding]
hubcaps has joined #ruby
oo_ has joined #ruby
<gregf_>
ljarvis: it is'nt.. for consistency sake :/. but that static keyword does help to some extent
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<fluter>
What's the term gem in ruby? I see a lot of them, is it like modules,(.so file) in C?
<jhass>
bougyman: you're welcome!
<bougyman>
fluter: packages
<bougyman>
jhass: for what?
<phale>
fluter: There are no "modules" in C
<fluter>
bougyman: Ah, I see,
<phale>
You probably mean static libraries, which aren't the same.
<jhass>
bougyman: migrating anyway? :D
<fluter>
phale: Yes, I mean libraries, sometimes called modules.
<phale>
Okay.
<jhass>
fluter: gems are mostly libraries, sometimes ruby applications distributed that way
<bougyman>
a gem could be a library or an application or a framework or none of the above.
fabrice31 has quit [Remote host closed the connection]
<bougyman>
it's just a way to package ruby code.
<fluter>
Yeah, so it's a tar file containing a set of .ruby files.
<phale>
doesn't have to be a tar file
<fluter>
right?
<tobiasvl>
it's a bit more than that
<fluter>
a zip file
fgo has joined #ruby
<bougyman>
doesn' thave to be ruby files in it
<toretore>
zip
<jhass>
and some metadata
<tobiasvl>
it's more like… a yum package or an ebuild file
<workmad3>
^^ the metadata is important
<phale>
lmfao
<fluter>
hmm, but yum package are binary...
<workmad3>
without that, all you have is a zip file with .rb files and a strange extension
<bougyman>
yum packages are rpms
<fluter>
ruby are interpreting language
<bougyman>
they're just cpios, iirc.
<jhass>
fluter: you mix concept with implementation ;)
<workmad3>
fluter: yum packages can easily package up ruby apps too ;)
<fluter>
mm, okay
<fluter>
this sounds cool
<tobiasvl>
I didn't say gems ARE yum packages (or rpm files), but they are LIKE them :) just a comparison to other package systems
<tobiasvl>
but ok, like ebuilds then
<jhass>
eh, isn't the ebuild more the .gemspec?
<phale>
why can't ruby libraries just be .rb files
<phale>
hosted on a git server
<toretore>
nothing's stopping you
<canton7>
phale, you'd need some metadata file, specifying the version, author, any dependencies, etc
<jhass>
they can, if you like dealing with submodules a lot
haraoka has quit [Ping timeout: 265 seconds]
<phale>
canton7: why? lol
<phale>
I can put the dependencies and version in the readme.
<canton7>
phale, you'd also want to be able to package that up into an archive, so you can copy/save gems without dealing with many files
<tobiasvl>
jhass: sure, you're right. I'll stop comparing gems to other package systems now :P
Iskarlar has quit [Read error: Connection reset by peer]
<canton7>
phale, so when you say to ruby 'please install gem x version y', it can automatically install all dependencies as well
<adaedra>
phale: because not anyone has its code on a git repository
<phale>
alright
Iskarlar has joined #ruby
<workmad3>
jhass: git submodules... most fun EVER!!!!
<phale>
I have to go now, cya
<canton7>
phale, rather than you having to read the README, if it even exists, figure out the correct versions of the dependencies to install, and doing it yourself
phale is now known as phale|afk
phale|afk has left #ruby ["Leaving"]
langland_ has joined #ruby
<jhass>
workmad3: AUR4 will allow me to toy with git subtree, curious how it'll turn out
senayar has quit [Remote host closed the connection]
<adaedra>
:o
Musashi007 has joined #ruby
<workmad3>
oops, that was meant to be on #rubyonrails
<workmad3>
I was looking @ that channel and wondering why chanserv was being so slow :D
<adaedra>
hehe
RegulationD has joined #ruby
Langlands has quit [Ping timeout: 264 seconds]
<workmad3>
then the guy I was going to kick left anyway
pyo_ has quit [Read error: Connection reset by peer]
khebbie has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
AlphaAtom has joined #ruby
iamninja has quit [Read error: Connection reset by peer]
rahult has joined #ruby
<adaedra>
#JustOpThings
iamninja has joined #ruby
chipotle has quit [Quit: cheerio]
RegulationD has quit [Ping timeout: 276 seconds]
ndogz has quit [Read error: Connection reset by peer]
ndogz_ has joined #ruby
nofxx_ has joined #ruby
nofxx_ has joined #ruby
datanoise has joined #ruby
fgo has quit [Ping timeout: 264 seconds]
snophey has joined #ruby
snophey has left #ruby [#ruby]
snophey has joined #ruby
ta has joined #ruby
ndogz has joined #ruby
fabrice31 has joined #ruby
timonv has quit [Ping timeout: 264 seconds]
Rickmasta has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
MasterPiece has joined #ruby
mister_s_ has quit [Quit: So long, and thanks for all the fish!]
chouhoulis has joined #ruby
caseypatrickdris has joined #ruby
ndogz_ has quit [Ping timeout: 256 seconds]
zotherstupidguy has joined #ruby
Ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
datanoise has quit [Ping timeout: 245 seconds]
j_mcnally has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bkxd has joined #ruby
BubonicPestilenc has joined #ruby
<BubonicPestilenc>
hey all
<adaedra>
Hi
ndrei has joined #ruby
chouhoulis has quit [Ping timeout: 252 seconds]
ndogz_ has joined #ruby
quimrstorres has quit [Remote host closed the connection]
rahult has quit [Ping timeout: 246 seconds]
rahult_ has joined #ruby
rhg135 has quit [Ping timeout: 255 seconds]
Musashi007 has quit [Quit: Musashi007]
simpleid has joined #ruby
Guest33354 has quit [Ping timeout: 272 seconds]
kotk has joined #ruby
rodfersou has joined #ruby
BubonicPestilenc has left #ruby [#ruby]
ndogz has quit [Ping timeout: 272 seconds]
<angus>
question: wasn't there a method of Enumerable that filtered out nils?
<ljarvis>
angus: .compact
ndogz has joined #ruby
sn4p3 has quit [Ping timeout: 264 seconds]
n008f4g_ has quit [Ping timeout: 276 seconds]
<angus>
that's it. thanks, ljarvis
ndrei has quit [Ping timeout: 250 seconds]
Hien has quit [Ping timeout: 276 seconds]
khebbie has joined #ruby
quimrstorres has joined #ruby
<apeiros>
angus, ljarvis: compact is on Array, though. not on enumerable.
chinmay_dd has joined #ruby
ndogz_ has quit [Ping timeout: 276 seconds]
<angus>
apeiros: ok, I needed it for an array anyway
<angus>
[a,b,c].compact.join(",")
Brozo has joined #ruby
relix has joined #ruby
terlar has quit [Ping timeout: 265 seconds]
yfeldblum has quit [Ping timeout: 265 seconds]
ndogz_ has joined #ruby
Brozo has quit [Ping timeout: 256 seconds]
sigurding has quit [Quit: sigurding]
[ace] has joined #ruby
Synthead has quit [Ping timeout: 244 seconds]
bkxd has quit [Ping timeout: 256 seconds]
mmazing has joined #ruby
dionysus69 has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0/20150511103303]]
<bnagy>
not so great if the random text isn't random though
<jhass>
well, yeah fake values etc
<cina>
this would workd for this case, but not if the sentence if complex
quimrsto_ has joined #ruby
<jhass>
?xy cina
<ruboto>
cina, you are asking for a specific solution to a problem, instead of asking about your problem. This will lead to bad solutions and usually costs everybody more time and nerves. Also see http://meta.stackexchange.com/a/66378
sarkyniin has joined #ruby
<cina>
thanks
quimrstorres has quit [Ping timeout: 265 seconds]
<cina>
so why is the group overwritten?
<jhass>
because that's how it works
<jhass>
you're still discussing the Y ;)
<toretore>
"thanks for the suggestion, but i'm not going to do anything about it"
yqt has joined #ruby
dgutierrez1287 has joined #ruby
<cina>
sorry guys, I am just asking a new question
ldnunes has joined #ruby
<cina>
thank you for answering the last one
LMity has joined #ruby
<Aeyrix>
cina: The XY problem is parroted a lot around programming communities.
<Aeyrix>
It applies sometimes, not always.
<jhass>
"ab".match(/(a|b)+/)[1] what would you expect this to return?
meph has quit [Quit: Leaving.]
sgambino has quit [Ping timeout: 265 seconds]
<Aeyrix>
This is actually one of thos times, though: Are you trying to return an array of tags preceded by an octothorpe?
Eddieh_ has joined #ruby
<Aeyrix>
jhass: `b`?
<cina>
jhass: "b"
balazs has joined #ruby
chinmay_dd has quit [Remote host closed the connection]
<jhass>
"#tag1 #tag2 ".match(/(#\S+ )+/)[1] you recognize that? ;)
<cina>
jhass: ok, but if you had asked "ab".match(/(a|b)+/)[0] I would have said "a"
<apeiros>
jhass: personally I'd want "ab".match(/(a|b)+/)[1] to return [["a", "b"]]
<apeiros>
err, drop one set of []
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<cina>
apeiros: me too, my last message was wrong, but yours is what I would expect
<apeiros>
and afaik there are languages which will do that - quantified capture -> array of matches
iamninja has quit [Read error: Connection reset by peer]
fgo has joined #ruby
balazs has quit [Ping timeout: 256 seconds]
<apeiros>
but yeah, current implementation is flat captures. so quantified captures always get the last match only *sniff*
<cina>
apeiros: I tried JavaScript and the result was like Ruby's
iamninja has joined #ruby
sdothum has joined #ruby
commondream has quit [Ping timeout: 244 seconds]
nofxx_ has quit [Ping timeout: 244 seconds]
Eddieh_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
St1gma has quit [Ping timeout: 255 seconds]
<jhass>
I think I like it that way, some languages will simply not be able to support it in another way and the more consistency for regex across languages the better
sdothum has quit [Client Quit]
boozehound has quit [Ping timeout: 240 seconds]
<cina>
jhass: consistency... that's a good point too
sdothum has joined #ruby
LMity has quit [Ping timeout: 264 seconds]
<jhass>
cina: the number refer to the capture _groups_, not the captures themselves. you can see capture group 0 as an implicit one around your entire expression, 1 is the first set of (), 2 is the second set of () and so on
simpleid has quit [Quit: Leaving]
<cina>
jhass: yes, I missed that thanks
zipace has joined #ruby
fgo has quit [Ping timeout: 265 seconds]
n80 has joined #ruby
<cina>
btw sorry if I appeared to be an asshole -- I didn't mean that -- again thanks for your helps/suggestions
sameerynho has joined #ruby
swills_ is now known as swills
grzywacz has quit [Quit: :wq]
<apeiros>
cina: I don't think you appeared to be an asshole, and I don't think that's what the others meant
AlphaAtom has quit [Remote host closed the connection]
<jhass>
oh, you didn't all
AlphaAtom has joined #ruby
<jhass>
sorry if it appeared that I meant that
<apeiros>
we're all just focused on giving good help fast, and sometimes we press for the information needed for that
lxsameer has quit [Ping timeout: 264 seconds]
<cina>
thanks, I understand :)
solars has quit [Ping timeout: 240 seconds]
kcantwel has joined #ruby
dave_craddock has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<zotherstupidguy>
ok i dont understand why it works without &
rushed has joined #ruby
fabrice31 has quit [Remote host closed the connection]
fabrice31 has joined #ruby
watchtheblur has joined #ruby
Brozo has joined #ruby
<jhass>
the & makes it to use a shell, so you have ruby -> /bin/sh -> ping, the pid is that of the /bin/sh but that forked the ping into the background so the kill killing /bin/sh makes it reparent to pid 1
haxrbyte has joined #ruby
fgo has quit [Ping timeout: 256 seconds]
quimrsto_ has quit [Remote host closed the connection]
<zotherstupidguy>
Process.kill("HUP", pid)
haxrbyte_ has joined #ruby
<zotherstupidguy>
what is HUP?
<crowell>
signal
<jhass>
a signal
<jhass>
often used as a "please restart yourself" or "please reload your configuration" message to a process
fgo has joined #ruby
elev has joined #ruby
<jhass>
but it's up to the process to handle it to their pleasing
elev is now known as master44
<zotherstupidguy>
so i am sinding a custom singal to a process?
Eddieh_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<jhass>
okay, let's put it different, if the last item to enter is the last item to get out, what's the first one to enter?
abuzze has quit [Read error: Connection reset by peer]
incomprehensibly is now known as glowcoil
<apeiros>
jhass: FINO!
<jhass>
actually the former doesn't even make sense, does it?
abuzze has joined #ruby
* jhass
is confused
huddy has joined #ruby
Rickmasta has joined #ruby
casadei has joined #ruby
<apeiros>
hm? if you're confused about whether FIFO = LILO - you're right. they're equivalent.
<hoey>
Hi, can I ask a kind of cliche question?
<apeiros>
if the last to come in is the last to get out, then that means that the first to come in will be the first to get out
<jhass>
good :D
<jhass>
thanks
<havenwood>
If `FIFO = LILO - you're right` then `FIFO + you're right = LILO`?
* apeiros
havens some wood
<jhass>
?ask hoey
<ruboto>
hoey, Don't ask to ask. Just ask your question, and if anybody can help, they will likely try to do so.
<apeiros>
hoey: just ask
scripore has quit [Quit: This computer has gone to sleep]
<hoey>
I've got used to write some python codes, but I'm not totally satisfied with python's syntax(actually, I hate the 'self'), I envy ruby's syntax.
<jhass>
good!
<hoey>
Are there anyone who's good at both? ruby and python?
<jhass>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
<apeiros>
probably. I'm not, though.
justintv90 has joined #ruby
Jandre has quit [Ping timeout: 272 seconds]
* jhass
wonders if he'll get to the point to only answer with ?foo
<hoey>
I wanna just listen about the experiences and lessons...
fabrice31 has quit [Remote host closed the connection]
RegulationD has joined #ruby
ledestin_ has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
uh, why? what are you afraid of?
charliesome has quit [Quit: zzz]
fabrice31 has joined #ruby
<hoey>
And actually, I'm not a native speaker, Maybe I'm failing to deliver my thoughts...
Spami has joined #ruby
<jhass>
70-80% of the currently active people here aren't ;)
<Darkwater>
your english sounds better than that of the average american
<gregf_>
heh
<Darkwater>
which doesn't say a lot but still
abuzze has quit [Ping timeout: 276 seconds]
elia has quit [Ping timeout: 276 seconds]
bkxd has quit [Ping timeout: 272 seconds]
Morkel has joined #ruby
<hoey>
thx
<jhass>
hoey: I moved from Python to Ruby, both languages are about the same level of abstraction so easy to pick up and fairly easy to even hop between them
mrmargolis has joined #ruby
workmad3 has joined #ruby
Miphix has joined #ruby
delianides has joined #ruby
<apeiros>
from my limited experience with python, I'd agree
<hoey>
I'm just reading the book "seven languages in seven weeks"
<hoey>
It's really fun
<apeiros>
there's some comparably small philosophical differences. but IMO they've got more in common than different
<hoey>
and the first chapter of the book is ruby.
<gregf_>
and whats the other 6?
<hoey>
Io,
sn4p3 has joined #ruby
<jhass>
gregf_: Rake, Rails, RSpec shit I don't get 6 together
bmurt has joined #ruby
<hoey>
which has a prototype paradigm lanugeage
bkxd has joined #ruby
<gregf_>
jhass: er, i thought those are subsets of ruby :/
<hoey>
Prolog, Haskell, Erlang, Io, Scala,...and
<jhass>
gregf_: that's the pun
<gregf_>
ha
<hoey>
let me check..
<havenwood>
gregf: The Rails language is its own lang!
<havenwood>
gregf: Same with Rspec-lang. :P
RegulationD has quit [Ping timeout: 265 seconds]
<gregf_>
indeed
<jhass>
Chef, two more
northfurr has joined #ruby
bihi has joined #ruby
<gregf_>
hoey: ooooo. Io(never heard of) but ruby seems to be the odd one
<hoey>
I've just skimmed the ruby chapter
umgrosscol has joined #ruby
<hoey>
and it seems that the meta programming is the important feature in ruby
mary5030 has joined #ruby
_ht has quit [Read error: Connection reset by peer]
_ht has joined #ruby
<hoey>
the book covers about various paradigms of programming languages
<gregf_>
they prolly feel moving from ruby to functional programming easier
poguez_ has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<gregf_>
jhass: haml, heaven only knows what thats is(surely not a templating engine) - more of a data format i guess
<hoey>
And I've just finished ruby koans
<gregf_>
s/thats/that/
<jhass>
gregf_: hehe
<hoey>
It was really fun
<hoey>
and
rubie has quit [Remote host closed the connection]
<hoey>
I'm curious about
<hoey>
why are there some built-in functions have multiple-names?
<heftig>
ad-hoc design
<hoey>
Just matter of tastes?
<hoey>
or readability?
<jhass>
I guess the idea was to offer readability but at this point it's legacy if we're honest
allomov has quit [Remote host closed the connection]
<shevy>
damn it
<shevy>
it is too hot here
<shevy>
32°C now... I can't even think
porkqpain has quit [Remote host closed the connection]
<dudedudeman>
shevy be dead
<shevy>
I will be soon... I am sure the next days will be even worse
<shevy>
until it will rain finally
<dudedudeman>
we had 27 days of rain out of 31 in the month of may. people smarter than me were saying that this is a once in a 2000 year kind of thing for this area
whippythellama has joined #ruby
<bnagy>
shevy: 26 here
<bnagy>
but it's like 10pm
<shevy>
26 would be ok... although that's actually quite a lot too for 10pm
<bnagy>
yeah daytime is more like 36. Harden up. :)
<shevy>
awww
Scroff has joined #ruby
bootstrappm has joined #ruby
dfockler has joined #ruby
sigurding has joined #ruby
fabrice31_ has joined #ruby
micmus has joined #ruby
CustosLimen has quit [Ping timeout: 265 seconds]
fabrice31 has quit [Ping timeout: 256 seconds]
yqt has joined #ruby
skade has joined #ruby
dfockler has quit [Ping timeout: 264 seconds]
byonic has joined #ruby
bkxd has quit [Ping timeout: 256 seconds]
allomov has joined #ruby
jpfuentes2 has joined #ruby
dzejrou has joined #ruby
avdi has joined #ruby
dfinninger has joined #ruby
joaomdmoura has joined #ruby
livathinos has quit []
nedp has joined #ruby
ramfjord has quit [Ping timeout: 272 seconds]
olistik has joined #ruby
<bootstrappm>
morning all
<Darkwater>
hi
gauke has quit [Quit: gauke]
DynamicMetaFlow has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
sigurding has quit [Quit: sigurding]
CustosLimen has joined #ruby
coderhs has joined #ruby
nhhagen_ has joined #ruby
nhhagen has quit [Read error: Connection reset by peer]
freerobby has quit [Quit: Leaving.]
nonparfumee has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
abuzze has joined #ruby
freerobby has joined #ruby
yxhuvvd is now known as yxhuvud
coderhs has quit [Client Quit]
jenrzzz has joined #ruby
tubuliferous_ has joined #ruby
dzejrou has quit [Read error: Connection reset by peer]
<dudedudeman>
morningggggg
<dudedudeman>
we routinely hit 40 here in texas during hte summers. #notwant
DaniG2k has quit [Quit: leaving]
sandstrom has quit [Quit: My computer has gone to sleep.]
<apeiros>
oddjob001_: newmodels.split('\n') will return an array, and .each on the array will only yield one item each turn
<shevy>
dudedudeman did Texas turn you into a dudedude?
<oddjob001_>
bnagy: thanks for providing support for people learning ruby.
bkxd has joined #ruby
<apeiros>
oddjob001_: note that '\n' is NOT a newline, it's a backslash followed by n. "\n" is a newline
<apeiros>
oddjob001_: i.e., '\n' == "\\n"
<dudedudeman>
shevy: at the very least, texas turned me in to a snot bucket because of my allergies
micmus has quit [Ping timeout: 245 seconds]
<shevy>
hmm
nhhagen_ has quit [Remote host closed the connection]
<shevy>
the dude is not allowed to have any allergies
<dudedudeman>
yeah if you could fix that for me, that'd be great....
<oddjob001_>
apeiros: thanks. \n is actually in the parsing from the above output. when i get to pmodelshash each of those are printed out as hashes. - I just need to get each of those into a single hash. thats where Im stuck
<bnagy>
oddjob001_: simplifying code is one of the best ways to learn
rodfersou has quit [Ping timeout: 244 seconds]
<bnagy>
also one of the best ways to debug
abuzze has quit [Remote host closed the connection]
<oddjob001_>
apeiros: so it is adding each part of the below loop to modelshash = { } yes?
<oddjob001_>
olistik: ooooh fancy.
ttilley has joined #ruby
<apeiros>
oddjob001_: yes. like before. but without resetting it to {} on every iteration.
ttilley has quit [Changing host]
ttilley has joined #ruby
bkxd has quit [Quit: Reconnecting]
<olistik>
from your initial gist, it looks that while you're composing modelshash it gets passed to the Facter.add block. Is it what you're trying to achieve?
anytimeb_ has joined #ruby
<oddjob001_>
olistik: thanks. its nice when people provide example and assistance with bettering your code as you are in the beginning learning stages. much appreciated
bkxd has joined #ruby
ur5us has joined #ruby
TommyTheKid has quit [Ping timeout: 258 seconds]
devdazed has quit [Quit: Computer has gone to sleep.]
<oddjob001_>
olistik: yes. so right now I get {"key" => value} from each line. Facter.add should end up being the combination of all of those inputs ran through the loop
sigden has joined #ruby
devdazed has joined #ruby
jschoolcraft has joined #ruby
anytimebutnow has quit [Ping timeout: 265 seconds]
micmus has joined #ruby
<olistik>
oddjob001_: you're welcome :-) that said, the initial gist is really difficult to understand, at least for me :-) You should try to explain the logical block that you've inserted and what's your goal so that people can follow your thoughts and not just stare at a wall of nested code ;-)
Hounddog has quit [Remote host closed the connection]
<oddjob001_>
so the final value of Facter.add would be qlogicmodels = {"key1" => value , "key2" => value, so on and so forth}
mistermocha has joined #ruby
<shevy>
well
spyderman4g63 has joined #ruby
<shevy>
you use API calls like this there: Facter::Core::Execution
<shevy>
and then you call exec
pikos has joined #ruby
TommyTheKid has joined #ruby
<shevy>
why not Facter.exec instead?
ur5us has quit [Ping timeout: 245 seconds]
pikos has quit [Client Quit]
<oddjob001_>
shevy: wish i was knowledgable enough to tell you. I am just going off what the facter docs recommend
<shevy>
aaaaah
<shevy>
I thought you wrote it
blandflakes has joined #ruby
<shevy>
you just use what someone else wrote there :)
<shevy>
yeah, I don't like that API/DSL layout at all
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<oddjob001_>
this is my second ruby attempt ever lol
Cache_Money has joined #ruby
<shevy>
interesting that this seems to be part of puppet
_seanc_ has quit [Quit: _seanc_]
arup_r has joined #ruby
<atmosx>
hello
<atmosx>
good evening shevy
<shevy>
atmosx! did you finally get your pharmacy degree
<oddjob001_>
shevy: yep. for handling custom facts. the exec just execute the qlogic command line interface then i parse all the data from there. its all working aside from getting the hashes into a a single hash, which apeiros assisted with. But now I need to figure out why facter isnt adding the final output
<atmosx>
shevy: lol, nope. I will get my degree (hopefully) in 06/2016 so ... in about 13 months
<atmosx>
:-P
<atmosx>
no rush
<shevy>
k the one year countdown has started
<atmosx>
hehe
<atmosx>
yeap
<shevy>
oddjob001_ usually in ruby, once you have data in an array or a hash, it's very simple to manipulate
duderonomy has quit [Ping timeout: 246 seconds]
snockerton has joined #ruby
<shevy>
like adding new content on a hash via .merge() or .update() (though perhaps one is an alias to the other hmm)
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
chinmay_dd has joined #ruby
rodferso1 has quit [Quit: leaving]
<oddjob001_>
shevy: what through me for a loop wasnt necessarily adding it all to a hash, it was not understanding how to handle the loop, then taking each of the outputs and combing them all. but apparently I was just 1 line off and 1 loop wrong :( - this shit is so fun. lol
<oddjob001_>
through? threw
mistermocha has quit [Remote host closed the connection]
Brozo has quit [Remote host closed the connection]
BanzaiJoe has joined #ruby
<shevy>
well, very often a loop is not necessary
<shevy>
it depends on your use case
tkuchiki has quit [Ping timeout: 245 seconds]
<shevy>
you have lots of filter-like manipulations available... find/detect/select/reject... these kind of things
rcvalle has joined #ruby
dfinninger has joined #ruby
<shevy>
I see that you already used .each_with_object()
DexterLB has quit [Ping timeout: 240 seconds]
bluOxigen has joined #ruby
<oddjob001_>
my last programming language was BASIC in 84
<oddjob001_>
line 12 now prints out full combined hash
<olistik>
oddjob001_: looks much better :-)
AlphaAtom has joined #ruby
spyderman4g63 has quit [Remote host closed the connection]
<oddjob001_>
thank you all very much. shit be ugly i know. but Im lurning gud
tvw has quit []
krz has quit [Ping timeout: 256 seconds]
AlphaAtom has quit [Max SendQ exceeded]
spyderman4g63 has joined #ruby
lavros has quit [Quit: leaving]
AlphaAtom has joined #ruby
bluOxigen has quit [Ping timeout: 256 seconds]
<olistik>
I suggest you to extract some parts into functions
dopie has quit [Quit: Leaving]
hubcaps has quit [Ping timeout: 246 seconds]
dhjondoh has quit [Quit: dhjondoh]
<olistik>
at least, by naming some portions of the code you help describing them to others (or to your future self)
fujimura_ has joined #ruby
scripore has quit [Quit: This computer has gone to sleep]
fella5s has quit [Read error: Connection reset by peer]
nedp has quit [Remote host closed the connection]
dgutierrez1287 has quit [Ping timeout: 245 seconds]
dhjondoh has joined #ruby
fella5s has joined #ruby
<oddjob001_>
olistik: the problem is I dont quite get definining functions and calling them yet. I mean i get it. but actually applying it is an entire other story. I think in a couple weeks Ill revisit my work and redo it all just to learn. this code at one point was like 30 lines. then i got it to 20, then 15 and so on. I am sure someone here could do it in much less.
sandstrom has joined #ruby
casadei has quit [Remote host closed the connection]
bkxd has joined #ruby
moretti has joined #ruby
lewix has joined #ruby
<lewix>
hey guys
<jhass>
hi
<olistik>
oddjob001_: don't get me wrong here, duplication is not always a bad idea. If it helps to describe the flow of code, then it's good. Of course, you shouldn't abuse it :-)
spyderman4g63 has quit [Ping timeout: 245 seconds]
tubuliferous_ has joined #ruby
AlphaAtom has quit [Client Quit]
<lewix>
"122.12".to_i == 122.12 wont work as expected obviously
<oddjob001_>
olistik: thanks for you help and input.
scottschecter has joined #ruby
<lewix>
whats a neat way to make it work without crazy logic
<havenwood>
lewix: to_f
<olistik>
'122.12'.to_f == 122.12 # => true
fujimura_ has quit [Ping timeout: 250 seconds]
* lewix
feels dumb as ....
<master44>
someone here good with the if statement?
<master44>
havenwood?
<ljarvis>
good with the if statement?
<havenwood>
master44: *if* you say so! :P
<ljarvis>
can you be bad with the if statement?
<lewix>
havenwood: why is that the easiest thing to do never pop up when it's god damn obvious ^^
ndrei has joined #ruby
<olistik>
lewix: aliens.
spyderman4g63 has joined #ruby
segfalt has quit [Quit: segfalt]
<jhass>
"bad if, take it down! Take it down! bad if!" like that?
<master44>
I got the worst wifi ever I cant load in gisthub
<master44>
can I paste in a 5 line code here?
varunwachaspati has quit [Read error: Connection reset by peer]
<shevy>
YES
<master44>
haha ok nm about that question
avril14th has quit [Remote host closed the connection]
<shevy>
we want to know the code now
<master44>
here it is:
<master44>
put = gets.chomp
<master44>
if put == "yes" or "Yes" puts "I am sorry, the app its over. Well done!"
<master44>
elsif put == "no" or "No" puts "Have a good day sir!"
<master44>
end
<shevy>
you can't show an apple to a horse, then eat it yourself
<havenwood>
lewix: Though comparing Floats is suspect. It's not hard to come up with an example where that fails. You may want to do something along the assert_in_delta lines.
<ruboto>
arup_r, Please use your local irb or pry (see ?pry) to experiment, ruboto's eval functionality is for demonstration purposes only.
<arup_r>
sorry
umgrosscol has quit [Remote host closed the connection]
<arup_r>
My IRB takes too much time to open that's why jhass :
<izzol>
hmm, how I can know which type of Exception this is?: inflater.rb:44:in `inflate': invalid code lengths set (Zlib::DataError). I would like to be more specific in begin/rescue.
<jhass>
then you should fix that
mary5030 has quit [Ping timeout: 252 seconds]
<arup_r>
yes.. I'll buy a new machine..
<jhass>
izzol: pretty sure it's a Zlib::DataError
mary5030 has joined #ruby
ramfjord has joined #ruby
jottr has joined #ruby
<izzol>
jhass: oo, I didn't know that I can use it :-)
codecop has joined #ruby
<izzol>
works! thanks :-)
<jhass>
if it can be raised it can be rescued
dfockler has joined #ruby
randiman has quit [Client Quit]
allcentury has quit [Ping timeout: 265 seconds]
sevenseacat has quit [Quit: Me dun like you no more.]
<ruby-lang289>
does anyone here uses assert in ruby ?
podman has joined #ruby
<jhass>
?anyone
<ruboto>
Just ask your question, if anyone has or can, they will respond.
DexterLB has quit [Read error: Connection reset by peer]
<podman>
Hey guys! Any idea why using ActiveRecord::Base.connection_pool.with_connection would take about 5-6 seconds to yield to the block?
zendrix has joined #ruby
<ericwood>
podman: #rubyonrails is your best bet for AR stuff
Missphoenix has joined #ruby
<podman>
ericwood: cool. asked in there as well. Thanks.
<apeiros>
?crosspost podman
<ruboto>
podman, Please do not crosspost without at least telling so and mentioning provided suggestions and their outcome in all channels. Experience shows that people don't do either, and not doing so is considered rude.
m0r0n has joined #ruby
<segfalt>
ruby-lang289: Lots of people use assertions, what’s your question?
hazelux has joined #ruby
lolmaus has quit [Quit: Konversation terminated!]
abuzze has quit [Ping timeout: 256 seconds]
idafyaid has joined #ruby
<ruby-lang289>
I'm trying to work out ruby using ruby koans and fumbling my way through it. I give it another try and come back. Seems to me at this stage, every test is to test for true. Thank you anyways.
senayar has quit []
x0f has joined #ruby
_seanc_ has quit [Quit: _seanc_]
Miphix has quit [Ping timeout: 272 seconds]
centrx has joined #ruby
DexterLB has joined #ruby
hmnhf has joined #ruby
avat has quit [Quit: Page closed]
<havenwood>
ruby-lang289: Assert tests truthiness, so really that it's not `nil` or `false` but could be many things other than `true`.
anisha has quit [Quit: Leaving]
<havenwood>
ruby-lang289: For example: assert 42
<havenwood>
#=> true
briandavis has joined #ruby
ta has joined #ruby
apofis has quit [Quit: This computer has gone to sleep]
ESpiney_ has joined #ruby
drewo has quit [Quit: WeeChat 0.4.2]
Brozo has joined #ruby
Igorshp has joined #ruby
drewo has joined #ruby
<ruby-lang289>
Thank you @havenwood
ndogz has quit [Quit: Leaving...]
XThief has joined #ruby
RegulationD has quit [Remote host closed the connection]
mrmargolis has joined #ruby
drewo has quit [Client Quit]
drewo has joined #ruby
edwinvdgraaf has joined #ruby
ESpiney has quit [Ping timeout: 245 seconds]
master44 has quit [Ping timeout: 265 seconds]
drewo has quit [Client Quit]
Brozo has quit [Client Quit]
drewo has joined #ruby
OtterCoder has quit [Ping timeout: 256 seconds]
OtterCoder has joined #ruby
mrmargol_ has quit [Ping timeout: 252 seconds]
chthon has quit [Ping timeout: 244 seconds]
mikecmpbll has quit [Ping timeout: 272 seconds]
skade has quit [Quit: Computer has gone to sleep.]
granthatcher has quit []
bantic has quit [Quit: bantic]
Torrieri has joined #ruby
malconis_ has joined #ruby
jpfuentes2 has joined #ruby
malconis has quit [Ping timeout: 264 seconds]
hazelux has quit []
lewix has quit [Remote host closed the connection]
ponga has joined #ruby
DexterLB has quit [Read error: Connection reset by peer]
niftylettuce has joined #ruby
haxrbyte has joined #ruby
haxrbyte_ has joined #ruby
OtterCoder has quit [Read error: Connection reset by peer]
spyderman4g63 has quit [Remote host closed the connection]
kies has quit [Ping timeout: 256 seconds]
spyderman4g63 has joined #ruby
ponga has quit [Client Quit]
OtterCoder has joined #ruby
DexterLB has joined #ruby
Rodya_ has joined #ruby
haxrbyte has quit [Ping timeout: 256 seconds]
<TheNet>
is there a website to check for syntax erors?
<TheNet>
errors
<adaedra>
To check ruby syntax errors?
<adaedra>
ruby itself does that (there's a flag to do it without running the program, don't remember which one)
<apeiros>
-c
<TheNet>
things like finding missing ends and highlighting them inline
<adaedra>
thanks, apeiros
spider-mario has joined #ruby
<adaedra>
if you're using vim, you can use syntastic which will do syntax review on save
spyderman4g63 has quit [Ping timeout: 276 seconds]
chussenot has quit [Read error: Connection reset by peer]
TinkerTyper has quit [Ping timeout: 255 seconds]
chussenot has joined #ruby
dumdedum has quit [Quit: foo]
bashusr has quit [Ping timeout: 272 seconds]
darkf has quit [Quit: Leaving]
haxrbyte_ has quit [Read error: Connection reset by peer]
TinkerTyper has joined #ruby
lolmaus has joined #ruby
iliketurtles has joined #ruby
tubulife- has joined #ruby
gwendall has joined #ruby
<miah>
syntastic can also run rubocop =)
bmurt has quit [Ping timeout: 245 seconds]
<jhass>
TheNet: if you have missing ends you're probably not pedantic enough about your indentation ;)
<eam>
syntax faux pas
paulcsmith_ has joined #ruby
<ytti>
one thing i like about golang is that it's so opinionated about style
<TheNet>
jhass turned out I just wrote else instead of end ¯\_(ツ)_/¯
bashusr has joined #ruby
<adaedra>
auto-indent can show you missing ends, too
<ytti>
even if i don't like all those opinions, i think it's great that no one can argue what is right style
<ytti>
and in the end, makes reading code easier
<miah>
agreed
Zai00 has quit [Quit: Zai00]
<eam>
for example using cpp with ruby for macros
fgo has quit [Ping timeout: 272 seconds]
jmignault has joined #ruby
yqt has quit [Ping timeout: 258 seconds]
edwinvdgraaf has quit [Remote host closed the connection]
mistermocha has joined #ruby
<bootstrappm>
adaedra love vim + syntactic
Hijiri has joined #ruby
<bootstrappm>
though sometimes it still gets confused with the > 1.9 hash notation
<miah>
i havent had that issue
mistermocha has quit [Client Quit]
Lucky__ has joined #ruby
<miah>
though that syntax gets a little weird looking when dealing with symbols; `{ foo: :bar }`
Channel6 has joined #ruby
<miah>
i still prefer it over hash rockets
<centrx>
hash rockets has a better name
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
<miah>
but no hash
<miah>
#> maybe?
m0r0n has quit [Ping timeout: 240 seconds]
<bootstrappm>
i still prefer hash rockets
pengin has joined #ruby
<miah>
i like typing less
<eam>
bootstrappm: me too
<bootstrappm>
it was so very uniquely ruby
<jhass>
I like future compatibility to keyword arguments
<miah>
its the same as perl =)
<adaedra>
<bootstrappm> though sometimes it still gets confused with the > 1.9 hash notation
<eam>
bootstrappm: hash rockets? Totally not unique to ruby :)
<adaedra>
check that it uses the right ruby binary
chouhoul_ has joined #ruby
<adaedra>
see ya!
<eam>
I can't think of any syntax ruby invented, actually
<miah>
so much borrowed from perl
Scroff has quit [Remote host closed the connection]
<bootstrappm>
adaedra: cool, I'll check it out thanks!
<eam>
the :symbol syntax might be unique to ruby, actually
<bootstrappm>
haha what language do explicit symbols come from?
<eam>
bootstrappm: well, they came from perl
gwendall has quit []
<eam>
in perl you'd just use a bareword
twinklehood has quit [Ping timeout: 276 seconds]
<eam>
a symbol is a string, after all
sdothum has joined #ruby
<eam>
"foo" and :foo don't necessarily need to be different types
Pumukel has quit [Ping timeout: 265 seconds]
<bootstrappm>
ah yeah, I meant the symbol + hash rocket combo. :symbol => felt very ruby
<eam>
ah in perl it's just symbol => thing
<bootstrappm>
symbol: value feels very much ... like a bunch of other languages hahah
ogpastal_ has joined #ruby
freerobby has joined #ruby
jfarmer has joined #ruby
<eam>
interestingly, because perl's variables are prefixed, thing => "val" is actually "thing" => "val"
sdothum has quit [Client Quit]
<eam>
the ruby :symbol notation behavior with quoting simple words without punctuation is very much like perl's implicit bareword handling
chouhoulis has quit [Ping timeout: 256 seconds]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
<bootstrappm>
I seee
<bootstrappm>
wish I had learned a bit more of Perl when I saw it in college. I was just recently surprised that it has a map function
<eam>
map, grep, it's the original "easy to use arrays and hashes" language
ogpastaling has quit [Ping timeout: 246 seconds]
<eam>
I can't find it at the moment but I read a great article a while back explaining that perl and most of the similar languages (python, ruby) are based around the cheap and easy Hash structure
<eam>
which is distinct from many others
DynamicMetaFlow has quit [Ping timeout: 272 seconds]
<eam>
you can use a Hash in C, but you wouldn't heavily abuse it like you might in perl/python/ruby
sdothum has joined #ruby
Langlands has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<eam>
that and regex are the real powerhouses behind the success of those languages
_djbkd has joined #ruby
towski_ has quit [Remote host closed the connection]
swgillespie has joined #ruby
njs126 has quit [Ping timeout: 264 seconds]
mc_fail has quit [Ping timeout: 264 seconds]
x0f has quit [Ping timeout: 276 seconds]
njs126 has joined #ruby
jottr has joined #ruby
jasonwebster has joined #ruby
jasonwebster has left #ruby [#ruby]
jottr_ has quit [Ping timeout: 276 seconds]
phale has joined #ruby
sdothum has quit [Quit: ZNC - 1.6.0 - http://znc.in]
bantic has joined #ruby
kwd has quit [Quit: Connection closed for inactivity]
<ljarvis>
phale: it's not available in the first place because it makes little sense to include lots of extra methods in a REPL when they don't exist otherwise. This is why irbrc is so great
<zendrix>
it is this ENV -->> ENV['GIT_COMMITTED_AT']
vikaton has quit []
pengin has quit [Remote host closed the connection]
mrsolo_ has joined #ruby
casadei has quit [Remote host closed the connection]
mister_s_ has quit [Ping timeout: 256 seconds]
<phale>
ljarvis: fuck this
<ljarvis>
!ban phale !T 1d enough trolling for today
phale was kicked from #ruby by ChanServ [Banned: enough trolling for today]
tibig has joined #ruby
casadei has joined #ruby
<ljarvis>
just needed the excuse tbh
woodruffw has joined #ruby
Musashi007 has quit [Quit: Musashi007]
zipace has joined #ruby
zipace has joined #ruby
_seanc_ has joined #ruby
sdothum has quit [Client Quit]
<bootstrappm>
ljarvis I suspected as much, good call
Ankhers has quit [Client Quit]
<zendrix>
toretore: ruboto: I added the gist above
tkuchiki has quit [Ping timeout: 265 seconds]
kies has joined #ruby
baweaver has joined #ruby
allomov has joined #ruby
<havenwood>
ljarvis: i do like the idea of making them easily accessible, maybe not in Kernel but an include away
<zendrix>
every where that I print that ENV['GIT_COMMITTED_AT'] it works. But when I run an rspec it gives it a nil.
mrsolo has quit [Ping timeout: 240 seconds]
<ljarvis>
havenwood: yeah I think it'd be nicer than having to hack it
fujimura has quit [Ping timeout: 265 seconds]
Rodya_ has quit [Remote host closed the connection]
Ankhers has joined #ruby
<yxhuvud>
zendrix: that looks more like a docker question.
pengin has joined #ruby
yqt has joined #ruby
tubulife- has quit [Ping timeout: 256 seconds]
<yxhuvud>
try to remove docker from the equation and see if it is different
RegulationD has joined #ruby
jfarmer has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<zendrix>
yeah that is what I am thinking. It is super strange though.
sdothum has joined #ruby
finisherr has joined #ruby
Rodya_ has joined #ruby
zendrix has quit [Remote host closed the connection]
<toretore>
there are like 10 levels there where it could go wrong; divide and conquer
towski_ has joined #ruby
mikecmpbll has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
RegulationD has quit [Ping timeout: 265 seconds]
sdothum has quit [Client Quit]
XThief has quit [Quit: XThief]
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<_blizzy_>
simi, yeah, that's what it's based off of
Igorshp has quit [Read error: Connection reset by peer]
<_blizzy_>
but it's outdated, and I wanted to make my first gem.
<_blizzy_>
c:
lapide_viridi has quit [Ping timeout: 265 seconds]
edwinvdgraaf has joined #ruby
<simi>
_blizzy_, what are you missing there?
<_blizzy_>
simi, nothing really. I just wanted to make a gem
Channel6 has quit [Quit: Leaving]
<simi>
hh
<_blizzy_>
hh?
<simi>
so <_blizzy_> since the only eval_in gem is old as hell
spyderman4g63 has joined #ruby
aaeron has quit [Quit: aaeron]
<simi>
was lie!
<simi>
caught!
<simi>
:)
Brozo has quit [Quit: Leaving...]
<_blizzy_>
well, october 21, 2014, ;c
<_blizzy_>
c:
<_blizzy_>
:)
zotherstupidguy has quit [Ping timeout: 250 seconds]
<miah>
not even a year
wallerdev has joined #ruby
<simi>
pretty stable for "API" gem
LMity has quit [Ping timeout: 246 seconds]
aaeron has joined #ruby
withnale_ has quit [Ping timeout: 276 seconds]
tubulife- has joined #ruby
<_blizzy_>
yeah.
sdwrage has joined #ruby
<_blizzy_>
I just wanted to try my hand at gem making.
<rdark>
arg. rspec. I want to validate that in a returned data structure that is an array of hashes, that one hash contains a key named X, with value Y
platzhirsch has quit [Remote host closed the connection]
zenguy_pc has joined #ruby
<rdark>
what's "rspec way" of doing this?
<BanzaiJoe>
rdark is the returned "data structure" a Struct or truly an array of hashes?
olistik has joined #ruby
<rdark>
real array/hash objects
twinklehood has quit [Ping timeout: 255 seconds]
* BanzaiJoe
steps away slowly
zotherstupidguy has joined #ruby
lolmaus has joined #ruby
baweaver has quit [Remote host closed the connection]
* rdark
says BanzaiJoe come back!
fusillicode has joined #ruby
fusillicode has left #ruby [#ruby]
<BanzaiJoe>
I can't honestly help you, but when you say "rspec way", can you be more specific for whoever can?
baweaver has joined #ruby
<rdark>
I don't think there's a built-in matcher that will do this, or at least one I can find, I think a custom matcher will have to do
hinbody has quit [Quit: leaving]
<rdark>
"rspec way" as in rather than writing a helper method, use standard rspec functionality
<zotherstupidguy>
rspec -> sevenseacat
edwinvdgraaf has quit [Remote host closed the connection]
kirun has joined #ruby
<shevy>
she is not here
<jhass>
rdark: .include include(X => Y) ?
<jhass>
I never tried the new composeable ones
NeverDie has joined #ruby
swills has quit [Quit: leaving]
yalue has joined #ruby
<jhass>
include a_hash_including(X => Y) (same thing, a bit more readable)
kernkw has joined #ruby
Igorshp_ has quit [Read error: Connection reset by peer]
<rdark>
jhass: yeah - I would usually write a helper method to do just that, but trying to leverage the 'pure' rspec - think I'll have a go at a custom matcher
<jhass>
did you try my suggestion?
<zotherstupidguy>
any idea why the rubykaigi 2015 email is not working?
quimrstorres has quit [Remote host closed the connection]
<shevy>
they all went to pythonkaigi instead!
davedev24_ has joined #ruby
<zotherstupidguy>
shevy you live a risky life =)
davedev2_ has quit [Ping timeout: 265 seconds]
<zotherstupidguy>
ohh look, they chagned the website, they added sushi, now we all should go
<dudedudeman>
hmm, favorite hobby might be a better question
<dudedudeman>
you made this?!
shadoi1 has joined #ruby
momomomomo has joined #ruby
<jhass>
no
* dudedudeman
senses a joke here...
shadoi1 has quit [Client Quit]
<jhass>
I enjoy coding a lot, so I don't really do much beyond the usual stuff
plukevdh has joined #ruby
<dudedudeman>
if you enjoy coding, then do you enjoy COBOL?
<apeiros>
jhass: that's got a bit of super meat boy
bluish has joined #ruby
<jhass>
apeiros: a lot older though ;)
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<jhass>
but yeah, same frustration mechanics :D
<dudedudeman>
ha.
lun_ has quit []
<apeiros>
super meat boy gave a new meaning to "lachend in die kreissäge rennen"
jfarmer has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
<dudedudeman>
someone came to our local meetup last night looking for some entry level ruby developers to join their company who is in the middle of re-writing an old program to use ruby and rails. it's currently written in C and COBOL...
<jhass>
wat, people replacing COBOL stuff? you're setting us up here
<dudedudeman>
i balked. i may be looking for entry level jobs, but....
<weaksauce>
dudedudeman what's wrong with that?
ohcibi has joined #ruby
momomomomo has quit [Ping timeout: 264 seconds]
watchtheblur has quit [Ping timeout: 272 seconds]
<dudedudeman>
it wasn't so much COBOL and the work, but more of the environment he was describing to me. I"m a pretty outgoing person, i desire interaction, and I desire pairing and team ideas being bounced back and forth. they're looking for entry level ruby developers who they can leave alone and guide themselves, and it's a 2-3 day a week work-from-home position, too
<weaksauce>
heh. paying well?
ProteusX has joined #ruby
<weaksauce>
what did the cobol + c program do?
rippa has quit [Quit: {#`%${%&`+'${`%&NO CARRIER]
momomomomo has joined #ruby
vikaton has quit []
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jfarmer has joined #ruby
<dudedudeman>
I didn't even ask, though it's a company in the medical field, so I'm wagering they pay fairly well. They also said you wouldn't do just programming, but customer interaction, network and devops things, and other stuff, too. oh, and they also have a beeper that they rotate with for 24/7 customer support if needed
nfk has quit [Quit: yawn]
<dudedudeman>
and weaksauce, he didn't get too much in to exactly what the app was doing, other than it was for the medical filed. he mentioned a pretty strict NDA so I didn't press too much
skade has joined #ruby
<simi>
<jhass> I enjoy coding a lot, so I don't really do much beyond the usual stuff
<jhass>
simi: yeah, btw towards somebody else and I'd kicked you ;)
pietr0 has quit [Ping timeout: 252 seconds]
<weaksauce>
they don't want a programmer they want a unicorn
finisherr has joined #ruby
OtterCoder has joined #ruby
<dudedudeman>
weaksauce: it kind of felt that way. which, i bet there's people out there that would be awesome for that. but, that's not me. last night's meetup actually ended up being highly frustrating for me. not just because i had talked ot someone about a potential job that ended up not being what i think wouldbe a good fit for me, but i went through a mock interview with a couple of the seniors there(who were really cool about it) but utterly failed i
A205B064 has joined #ruby
hectortrope has quit [Quit: WeeChat 0.4.2]
davedev24_ has joined #ruby
shadoi has quit [Ping timeout: 265 seconds]
finisherr has quit [Client Quit]
felltir has joined #ruby
b_hoffman has joined #ruby
finisherr has joined #ruby
shredding has joined #ruby
Scroff has joined #ruby
Pathfinder has quit [Ping timeout: 256 seconds]
mengu has quit [Remote host closed the connection]
jcromartie has joined #ruby
finisherr has quit [Client Quit]
Asher has quit [Quit: Leaving.]
mengu has joined #ruby
symm- has joined #ruby
dopie has joined #ruby
mengu has quit [Remote host closed the connection]
tvw has quit [Remote host closed the connection]
<weaksauce>
that's a bummer but valuable experience
kadoppe has quit [Ping timeout: 256 seconds]
<shevy>
lol
<shevy>
a unicorn
<shevy>
dudedudeman can make one come out his butt!
sandelius has joined #ruby
chouhoulis has joined #ruby
<dudedudeman>
weaksauce: it is. i got some really good insight and some really good feedback. even if some of that feedback was, no we wouldn't hire you in yoru current state
<shevy>
what current state
<shevy>
are you like a zombie
kadoppe has joined #ruby
b_hoffman has left #ruby [#ruby]
momomomomo has quit [Quit: momomomomo]
<dudedudeman>
i could be, you'll never know
spyderman4g63 has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<shevy>
dudedudezombie
chouhoulis has joined #ruby
tvw has joined #ruby
<dudedudeman>
lol
spyderman4g63 has quit [Remote host closed the connection]
<shevy>
yeah
<shevy>
the only friendly zombie there is :)
lapide_viridi has quit [Quit: Leaving]
<dudedudeman>
****dudedudezombie abides
nofxx_ has joined #ruby
<dudedudeman>
ha... butchered thaatttt
finisherr has joined #ruby
rdar has quit [Ping timeout: 250 seconds]
blue_deref has joined #ruby
workmad3 has joined #ruby
HotCoder has joined #ruby
Narzew has joined #ruby
serivichi has joined #ruby
yfeldblum has joined #ruby
tvw has quit [Ping timeout: 276 seconds]
dopie has quit [Ping timeout: 276 seconds]
iamjarvo has joined #ruby
zendrix has quit [Remote host closed the connection]
kurtf has joined #ruby
TheNet has joined #ruby
<bootstrappm>
a meetup with mock interviews? sounds nice of them
<shevy>
and then, require 'openssl' would return true (hence it would work)
<pVilaca>
shevy: weird how it is declared as a gem for this gem that I mentioned
<dudedudeman>
bootstrappm: also, i plan on hooking the couple of guys that help me get going in this with some drinks and things when i finally get there. :)
zendrix has quit [Remote host closed the connection]
<shevy>
pVilaca yeah, I think the author of the gem has made a mistake. You don't normally specify ruby core or stdlib components
<apt-get_>
anyone has a set of online exercises to work with while reading pickaxe book / pragmatic programmer's guide to ruby?
<bootstrappm>
nice (y) dudedudeman. congrats you're a good community member
<pVilaca>
shevy: thanks.. yes, I also noticed that
sferik has joined #ruby
<_blizzy_>
I made a gem. anyone want to try it out?
jwaldrip has joined #ruby
<dudedudeman>
this was real informal, like at the end of the night when it was just 4 of us left
sferik has quit [Read error: Connection reset by peer]
<dudedudeman>
well, there were more... and all of a sudden there are 10 people standing behind me watching me solve fizzbuzz....
<dudedudeman>
lol
chrisja has quit [Quit: leaving]
Palmer11 has joined #ruby
<shevy>
you became the local hero
sferik has joined #ruby
felltir has joined #ruby
<shevy>
did you impress them with your beer drinking skills as well?
<dudedudeman>
or maybe the village idiot
<shevy>
haha
<shevy>
works either way
<shevy>
you are the entertainer!
<dudedudeman>
and bootstrappm, thanks. community is a huge part of my internal belief system. i thrive around other people and watching them thrive as well
<dudedudeman>
i like to encourage when i can. :)
_djbkd has quit [Remote host closed the connection]
serivichi has quit [Ping timeout: 265 seconds]
edwinvdgraaf has joined #ruby
finisherr has quit [Quit: finisherr]
<bootstrappm>
word
jgpawletko has quit [Quit: jgpawletko]
<Sevelia>
apt-get_, Koans.
<jhass>
apt-get_: not related to the book, but the ruby koans are good exercises, exercism.io too
<apt-get_>
thanks
<dudedudeman>
i do love the koans
finisherr has joined #ruby
<jgt>
dudedudeman: Know if that medical company are still looking?
I has joined #ruby
mrsolo has joined #ruby
sferik has quit [Client Quit]
I is now known as Guest28228
mandarinkin has joined #ruby
jniziol has quit [Quit: jniziol]
Guest28228 has left #ruby [#ruby]
jniziol has joined #ruby
finisherr has quit [Client Quit]
<havenwood>
apt-get_: rubymonk.com might be another to look at in addition to rubykoans.com and exercism.io.
<BanzaiJoe>
if you had say... hypothetically.. 5 days of no internet like say on Lake Mead and you wanted to level up your skills in Ruby, any ideas how you would do it
<BanzaiJoe>
?
<_blizzy_>
I think I have a problem
<BanzaiJoe>
oh yea, with your in-laws
<_blizzy_>
I name all my rails projects after birds.
<havenwood>
BanzaiJoe: So intense study? :P
dopie has joined #ruby
Spami has quit [Quit: This computer has gone to sleep]
<bootstrappm>
BanzaiJoe: have a book?
<adaedra>
BanzaiJoe: if computer, just be sure to have everything installed before leaving. If no computer, buy a book.
<BanzaiJoe>
yes, no support, no mentor/reviewer, just naked programming, figuratively
<dorei>
hello
pikos has joined #ruby
arup_r has quit [Quit: ChatZilla 0.9.91.1 [Firefox 38.0.1/2015051400]]
<havenwood>
BanzaiJoe: How advanced with Ruby?
<havenwood>
dorei: hi
<BanzaiJoe>
basic/n00bie
<bootstrappm>
but you will have your computer w/ all the stuff installed?
pikos has quit [Client Quit]
<bootstrappm>
well .... you'd have to know which gems you want to use before you get there ...
tvw has joined #ruby
<dorei>
is there a way to load ruby code inside a module? as if I could do require inside a module and everything loaded under the module namespace instead of the global namespace
njection has joined #ruby
<BanzaiJoe>
yes, computer
<ljarvis>
dorei: you probably want autoload
finisherr has joined #ruby
<dorei>
oh, let me check autoload :)
moretti has quit [Quit: Leaving...]
wallerdev has quit [Quit: wallerdev]
vikaton has joined #ruby
gambl0re has quit [Ping timeout: 250 seconds]
<BanzaiJoe>
I don't think I'll get another 60 hour stretch to just go crazy like this for awhile so I'd like to avoid the reading route
<pVilaca>
shevy: sorry for the delay.. so, what the maintainer of the plugin needs to do, is only removing this line: "s.add_runtime_dependency 'openssl', '1.0.0.beta'"
<pVilaca>
because it doesn't need to be declared?
tcopeland has quit [Quit: Leaving.]
<jhass>
ljarvis: don't think autoload does that? dorei my answer would be no
<dorei>
ljarvis: i dont think autoload is what i'm looking for
bb010g has joined #ruby
<jhass>
no remotely sane way
gambl0re has joined #ruby
<byonic>
BanzaiJoe: Without internet you would want to for sure have a local copy of any documentation you might need, I think most gems come bundled with documentation. I also love devdocs.io for this
<ljarvis>
ah right
<ljarvis>
yeah
<BanzaiJoe>
devdocs.io will check it out, thanks
scripore has quit [Quit: This computer has gone to sleep]
jniziol has left #ruby [#ruby]
bluish has quit [Quit: bluish]
mwlang has joined #ruby
sgambino has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
duderonomy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<mwlang>
>> i = 1029003354; i.to_s.split("").reverse.each_slice(3).map{|m| m.reverse.join}.reverse.join(",")
<byonic>
BanzaiJoe: Not of your skill level, but people seem to love RubyKoans. I wasn't huge on it when I was learning Ruby but it seems like a pretty good way to learn ruby interactively and offline
<byonic>
just make sure you download it instead of doing the online version obviously
edwinvdgraaf has quit [Read error: Connection reset by peer]
<mwlang>
_why’s poignant guide to ruby was also too strange for me.
<BanzaiJoe>
I've been doing exercism.io and it comes with tests so I'll have to figure out how to skip ahead and pull all those down
<BanzaiJoe>
but I won't have y'all :(
<mwlang>
ljarvis: nice.
<BanzaiJoe>
mwlang any particular reason to do this?
tcopeland has joined #ruby
<byonic>
beyond that, I would suggest going in head first and making a gem. It was probably the best thing my first boss / mentor had me do when I was learning
<mwlang>
BanzaiJoe: I can’t read big numbers without commas. That’s how many records I need to extract from production.
rcvalle has quit [Quit: rcvalle]
<BanzaiJoe>
gotcha
Igorshp has quit [Read error: Connection reset by peer]
tubulife- has quit [Ping timeout: 276 seconds]
Igorshp has joined #ruby
umgrosscol has joined #ruby
<dorei>
jhass: i've just found out i can use module_eval :)
<mwlang>
every record also has a 12-digit number as it’s ID that I need to format into XXX-XXX-XXX-XXX format…almost like an IP address, actually…
iliketurtles has quit [Quit: zzzzz…..]
scripore has joined #ruby
<jhass>
dorei: it'll break in subtle ways, just don't
<mwlang>
so I did the above to see if something simpler and perhaps faster popped out (like ljarvis’s)
rickrobs has quit [Ping timeout: 272 seconds]
paulcsmith__ has quit [Quit: Be back later ...]
rickrobs has joined #ruby
byprdct has joined #ruby
gianlucadv has quit [Ping timeout: 264 seconds]
paulcsmith__ has joined #ruby
scripore has quit [Client Quit]
byprdct has quit [Max SendQ exceeded]
decoponio has quit [Quit: Leaving...]
paulcsmith__ has quit [Client Quit]
thiagofm has joined #ruby
dfockler has joined #ruby
baweaver has joined #ruby
byprdct has joined #ruby
bluOxigen has joined #ruby
paulcsmith__ has joined #ruby
zotherstupidguy has quit [Quit: WeeChat 1.2]
twinklehood has joined #ruby
jerius has joined #ruby
shadoi has joined #ruby
_djbkd has joined #ruby
jhooker has quit [Ping timeout: 252 seconds]
iliketurtles has joined #ruby
jhooker has joined #ruby
<nofxx_>
mwlang, woa, a billion records? Can you spare some curiosity specs? DB, what kinda of data?
haxrbyte has joined #ruby
sumark_ has quit [Remote host closed the connection]
<mwlang>
nofxx_: order line items for a bookstore.
<adaedra>
Please don't say SQLite :p
<BanzaiJoe>
SQLite, we love you!
dgutierrez1287 has joined #ruby
<mwlang>
haha…no. Its SQL Server 2005.
<BanzaiJoe>
egads
<BanzaiJoe>
sorry to hear
<mwlang>
yeah, no kiddin’
<BanzaiJoe>
are you using an ORM?
Torrieri has quit [Quit: Be back later ...]
sumark has joined #ruby
<mwlang>
Sequel
<mwlang>
but just it’s dataset, not the model.
<adaedra>
Sequel <3
haxrbyte_ has joined #ruby
pengin has joined #ruby
<BanzaiJoe>
and it's chugging right along with SQL2005?
<BanzaiJoe>
or so simple CRUD, no major ORM mapping?
<mwlang>
yes…I’m going to have to start with a year’s worth of data instead of 12 years.
<nofxx_>
well if it's line items should suffer many queries against, just find order_id and get me items
zendrix has joined #ruby
<nofxx_>
shouldn't*
<mwlang>
not doing anything like that with this…the bookstore is a Rails app.
yardenbar has quit [Ping timeout: 272 seconds]
<mwlang>
what I’m doing is building a recommendation engine using Prediction.IO
<nofxx_>
mwlang, yeah, make it resumable hehe, I mean, continue from where it crashs
<mwlang>
nofxx_: I have no reason to expect it to crash. SQL Server’s come a long ways since it’s early days.
wallerdev has joined #ruby
bricker has joined #ruby
<mwlang>
not a DBMS I would choose today, mind you, but it’s working well for the client and has been for a while now.
Rodya_ has quit [Quit: Leaving...]
haxrbyte has quit [Ping timeout: 256 seconds]
<nofxx_>
mwlang, I mean your importer/reader, never played with mssql, nor will I. Paid all my sins with oracle some longs yrs ago
<mwlang>
nofxx_: I spent years specialzing in Oracle.
baweaver has quit [Remote host closed the connection]
<mwlang>
mostly use mysql and postgres these days.
pietr0 has joined #ruby
_djbkd has quit [Read error: Connection reset by peer]
jackjackdripper has quit [Read error: Connection reset by peer]
<nofxx_>
mwlang, back in 09 I was in a company specialized in removing oracle hehe, we did pg for all
jackjackdripper has joined #ruby
apofis has joined #ruby
_djbkd has joined #ruby
<mwlang>
nofxx_: that’s the logical choice.
kurtf has quit [Read error: Connection reset by peer]
<nofxx_>
nowdays I use mongo or rethink, and pg only in some models.. if I want transactions for instance
<mwlang>
I haven’t quite figured out how to remove MSSQL Server for the client, yet. They also integrate with Navision and a bunch of .Net apps.
<mwlang>
plus a ton of stored procedures and DTS to boot.
<nofxx_>
ugh... logic in the DB, keeping jobs since 1985
<mwlang>
low hanging fruit: replace all Perl scripts with Ruby rewrites, rinse and repeat with .Net, then stored procs, then start thinking about MSSQL extraction.
sunaku has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
yardenbar has joined #ruby
<apt-get_>
"There are no unmuted, pending submissions in this list."
<mwlang>
nofxx_: yah, I had fun “untraining” the client about the benefits of stored procs….he’s sold now because I rewrote a couple stored-proc DTS jobs that took three days to run to running in 10 hours with just Ruby + Sequel.
<apt-get_>
... Isn't exercism kinda dead?
<mwlang>
what the heck is exercism?
<apt-get_>
exercism.io
jackjackdripper1 has joined #ruby
jackjackdripper has quit [Read error: Connection reset by peer]
<BanzaiJoe>
no, it's not dead
<BanzaiJoe>
I'm not sure what kinda means though
<apt-get_>
I can't find any submissions
<apt-get_>
in the nitpick menu
x1337807x has joined #ruby
tcopeland has quit [Quit: Leaving.]
x1337807x has quit [Max SendQ exceeded]
x1337807x has joined #ruby
<jhass>
did you solve stuff yourself?
paulcsmith__ has quit [Quit: Be back later ...]
_Speeder has joined #ruby
<jhass>
you'll only see them for stuff you set as finished
paulcsmith__ has joined #ruby
jackjackdripper1 has quit [Read error: Connection reset by peer]
baweaver has quit [Remote host closed the connection]
fmcgeough has quit [Quit: fmcgeough]
<jhass>
?rails neanderslob
<ruboto>
neanderslob, Please join #RubyOnRails for Rails questions. You need to be identified with NickServ, see /msg NickServ HELP
baroquebobcat has quit [Quit: baroquebobcat]
baroquebobcat has joined #ruby
<neanderslob>
ruboto: oh I beg your pardon, clicked the wrong channel :-P
whippythellama has quit [Quit: whippythellama]
sunaku has left #ruby ["WeeChat 1.1.1"]
tvw has quit [Ping timeout: 240 seconds]
Narzew has quit [Ping timeout: 245 seconds]
sye has joined #ruby
sye has left #ruby ["undefined"]
<bootstrappm>
mwlang: that good of a performance improvement? the stored procedures / functions I write have always performed better than my application code O_o
pdoherty has quit [Ping timeout: 276 seconds]
<bootstrappm>
enlighten me on the evils of stored procedures when you get a minute or two
<mwlang>
bootstrappm: well, if you write them correctly, they can be fast. problem was, they weren’t written efficiently at all.
<mwlang>
what I generally do is coach clients to standardize on language as much as possible and then share code as much as possible in projects.
fujimura has joined #ruby
niftylettuce has quit [Quit: Connection closed for inactivity]
sankaber has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ur5us has joined #ruby
Pupeno has quit [Read error: Connection reset by peer]
KramerC has quit [Ping timeout: 264 seconds]
<mwlang>
in the case here, that means getting rid of Perl, .Net, Java, stored procs and PHP because each system is “re-implementing” a bunch of core business logic.
blackjid has quit [Ping timeout: 265 seconds]
paulcsmith__ has quit [Quit: Be back later ...]
Pupeno has joined #ruby
skarn has quit [Ping timeout: 265 seconds]
df has quit [Ping timeout: 272 seconds]
<noethics>
coaach me
<mwlang>
what we’re doing is actively moving business logic into ActiveRecord models and PORO classes
paulcsmith__ has joined #ruby
dzejrou has quit [Ping timeout: 258 seconds]
<sweeper>
fat models are fat
<noethics>
ORMs are fun. i don't know why people hate on them
vikaton is now known as dom98
<mwlang>
most of all the stuff external to Ruby are just ETL jobs loading external data feeds into the database.
<bootstrappm>
nice, thanks mwlang!
<mwlang>
sweeper: fat models aren’t what I preach
moretti has joined #ruby
<sweeper>
mwlang: that's good :)
<bootstrappm>
yeah, that's what we use are database functions for, data warehousing stuff mostly
sn4p3 has quit [Quit: Leaving]
<noethics>
removing MSSQL in most cases comes down to writing an adapter for cassandra or similar
momomomomo has quit [Quit: momomomomo]
<noethics>
there's just too much that relies on it, so just adapter that shet and move on
fujimura has quit [Ping timeout: 244 seconds]
haxrbyte_ has quit [Ping timeout: 245 seconds]
<noethics>
(pls dont write adapters in ruby)
dagda1 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<sweeper>
you should use mongodb
<sweeper>
it's web scale
gambl0re has quit [Ping timeout: 245 seconds]
e1nh4nd3r has joined #ruby
<jhass>
that reminds me of some IRC log...
watchtheblur has joined #ruby
_djbkd has quit [Remote host closed the connection]
<mwlang>
although, skinny controller, fat models is something I preach, but when the focus is on models, these puppies should have a single collective purpose, generally speaking. For example, an order model shouldn’t track it’s purchase, fulfilment and tracking status like some sort of finite state machine all on the one class…it should collect the items ordered. Aother classes like “Purchase” “Shipment” etc. should track the states t
<mwlang>
order might be in.
jmignault has joined #ruby
ccooke has quit [Ping timeout: 276 seconds]
dom98 is now known as vikaton
<noethics>
seems PRETTY MUCH implemntation SPECIFIC
<noethics>
sweeper, good advice 10/10 will implement
<noethics>
btw mongodb isnteven that bad if you switch out the storage engine
frem has joined #ruby
eggoez has quit [Ping timeout: 272 seconds]
<sweeper>
noethics: toku?
<sweeper>
:D
* sweeper
is using toku
<sweeper>
but, it's still retarded
sn0wb1rd has joined #ruby
<noethics>
i forgot the name of it
<noethics>
something tiger
<mwlang>
meh, I went down the mongodb route once with a major project. It had more technical problems and hurdles to overcome than if I’d just built the thing in RDBMS and took advantage of full-text indexing.
KramerC has joined #ruby
<adaedra>
<sweeper> it's web scale | :D
df has joined #ruby
<noethics>
wiredtiger
<mwlang>
web scale is soooo 2005. We need to be cloud scale today!
shadoi has quit [Quit: Leaving.]
<adaedra>
:<big>D</big>
<noethics>
doesnt the default mongo engine have full database locks :DDDDD
arescorpio has joined #ruby
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
treehug8_ has quit [Remote host closed the connection]
x1337807_ has joined #ruby
nik_-_ has joined #ruby
x1337807_ has quit [Max SendQ exceeded]
eggoez has joined #ruby
Scroff has quit [Remote host closed the connection]
micmus has joined #ruby
<sweeper>
noethics: yes, yes it does
_djbkd has joined #ruby
<sweeper>
awesome, huh?
ldnunes_ has quit [Quit: Leaving]
<bootstrappm>
we use MongoDB! the only thing that has bitten us is no enforced data integrity. We had a bunch of different flags on our data that meant for a while -_-
<sweeper>
especially when it comes down to brass tacks and you actually need a damned join
<noethics>
bootstrappm, the full database locks didnt cause you any problems?
<noethics>
i guess it's fine if you have like sub 10 writes per second lol
<bootstrappm>
that meant the same thing for a while*
Scroff has joined #ruby
<sweeper>
yea not so much at 20k rpm :P
kurtf has joined #ruby
x1337807x has quit [Ping timeout: 255 seconds]
<dfockler>
or with ssd's
<sweeper>
no, no, ssd's don't help, at all
<dfockler>
hahaha
<dfockler>
Use rethink instead
futilegames has joined #ruby
pietr0_ has joined #ruby
twinklehood has quit [Ping timeout: 265 seconds]
<sweeper>
oh, ANOTHER group of people who learned javascript and thought that qualified them to write a database...
ndrei has joined #ruby
<noethics>
ROF
<noethics>
l
dagda1 has joined #ruby
but3k4 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
ddarkpassenger has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
baweaver has joined #ruby
idafyaid has quit [Remote host closed the connection]
<noethics>
use cassandra or hbase and call her a good day
<bootstrappm>
last time it was languages, today its DBs
<dfockler>
use mysql, or postgres
<bootstrappm>
i'll stick to my ruby and postgres and be happy
<sweeper>
postgres man
<sweeper>
so fast
delianides has quit [Remote host closed the connection]
pietr0 has quit [Ping timeout: 265 seconds]
<noethics>
until you need to scale
pietr0_ is now known as pietr0
<dfockler>
it's editors/languages/databases you know things we use
x1337807x has joined #ruby
<bootstrappm>
so fast, so consistent
<noethics>
2fast for me
<adaedra>
use /dev/null, it's so fast
<dfockler>
2fast4u
<sweeper>
noethics: are you still being silly, or did you implement your databases without thinking about good shard keys? :3
<noethics>
i prefer my programs and dbs dont do anything at all
<noethics>
saves the most cpu cycles
Igorshp has quit [Remote host closed the connection]
<noethics>
sweeper, did you intent to talk to me?
skarn has joined #ruby
toretore has quit [Quit: This computer has gone to sleep]
<sweeper>
yea, wrt the "until you need to scale" comment
<noethics>
@postgres+ruby
blackjid has joined #ruby
sandelius has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
ddarkpassenger has joined #ruby
twinklehood has joined #ruby
momomomomo has joined #ruby
<jfarmer>
postgres does not have problems scaling
<jfarmer>
Instragram grew using Postgres (for example)
<noethics>
it does relative to other dbs that were designed from the ground up with replication in mind
ddarkpassenger has quit [Client Quit]
<jfarmer>
ok
<noethics>
postgres is fine, i was mostly just being a douche
terrellt has joined #ruby
finisherr has quit [Quit: finisherr]
<noethics>
but ruby+postgres is a setup that in my mind is for like "indie devs"
<BanzaiJoe>
postgres has made significant progress. just like AMD, it's much better than it was
<jfarmer>
I've scaled postgres no problem to handle millions of daily active users, so not sure what "scale" you're thinking of that is so "hard" for it to handle.
baweaver has quit [Remote host closed the connection]
<jfarmer>
same w/ mysql
<noethics>
scale as in 3mm+writes/sec
pikos has joined #ruby
<noethics>
for the web it's fine
<noethics>
for big data it's meh
iamjarvo has joined #ruby
<sweeper>
ruby is the problem really, at that scale the ram costs start to add up
<jfarmer>
Sure, it's not meant as an OLAP database
finisherr has joined #ruby
<weaksauce>
have any of you read the big data book that manning recently published?
<jfarmer>
but that's one dimension of "scaling" — it has a very nice scaling story as an OLTP database
<weaksauce>
I started it and it seems pretty reasonable but I don't have much experience wrt large datasets like that.
<jfarmer>
whereas your typical cassandra or hbase or whatever doesn't
Scroff has quit [Ping timeout: 258 seconds]
greenbagels has joined #ruby
<jfarmer>
right tools for the job and all
pardusf has quit [Ping timeout: 264 seconds]
kernkw has quit [Quit: Leaving...]
felltir has quit []
parduse has joined #ruby
<noethics>
don't really know what you mean
<noethics>
how would cassandra fail to scale for web
<BanzaiJoe>
that's right, SQLite, the one to rule them all!!!! MUHAHAHAHA lol
mib_mib has joined #ruby
workmad3 has joined #ruby
jerius has quit [Quit: /quit]
<BanzaiJoe>
what jfarmer said about right tool for the job
apofis has quit [Quit: This computer has gone to sleep]
<jfarmer>
noethics This doesn't feel productive.
apofis has joined #ruby
jhooker has quit [Ping timeout: 252 seconds]
momomomomo has joined #ruby
<noethics>
people use postgres because it's homey
<BanzaiJoe>
seriously, how many of us are running web based video games esp. with ruby?
<jfarmer>
Everyone should use cassandra, I guess. Case closed. Web scale.
<noethics>
^
<BanzaiJoe>
cassandra, ???, profit
<jfarmer>
yeah
pikos has quit []
<noethics>
m8 but could ur setup handle this many rites/sec? no? lol nice db u got there
olistik has quit [Remote host closed the connection]
iliketurtles has quit [Quit: zzzzz…..]
apt-get_ has quit [Remote host closed the connection]
<BanzaiJoe>
amIrite?
iliketurtles has joined #ruby
iliketurtles has quit [Client Quit]
mib_mib has left #ruby [#ruby]
Rickmasta has joined #ruby
allcentury has quit [Ping timeout: 256 seconds]
iliketurtles has joined #ruby
mib_mib has joined #ruby
mwlang has quit [Quit: mwlang]
mib_mib has left #ruby [#ruby]
mib_mib has joined #ruby
mib_mib has left #ruby [#ruby]
moretti_ has joined #ruby
iliketurtles has quit [Client Quit]
bricker has quit [Ping timeout: 264 seconds]
moretti has quit [Ping timeout: 264 seconds]
<noethics>
one time i built an amazon affiliate website with 2million products with mysql
<noethics>
did not work
ndrei has quit [Ping timeout: 244 seconds]
gamename has quit [Remote host closed the connection]
twinklehood has quit [Ping timeout: 256 seconds]
kurtec has joined #ruby
<weaksauce>
why?
Vile` has quit [Read error: Connection reset by peer]
dgutierrez1287 has quit [Remote host closed the connection]
zendrix has quit [Remote host closed the connection]
Aww is now known as Doge-Poo
mrsolo has quit [Quit: This computer has gone to sleep]
joaomdmoura has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
k3asd` has quit [Ping timeout: 256 seconds]
hahuang65 has quit [Quit: WeeChat 1.1.1]
zendrix has joined #ruby
Doge-Poo is now known as Aww
matp_ has joined #ruby
finisherr has quit [Quit: finisherr]
blandflakes has joined #ruby
hahuang65 has joined #ruby
[H]unt3r has quit []
mary5030 has quit [Remote host closed the connection]
goodcodeguy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
paulcsmith__ has quit [Quit: Be back later ...]
baweaver has joined #ruby
matp has quit [Ping timeout: 245 seconds]
workmad3 has quit [Ping timeout: 255 seconds]
Pathfinder has quit [Ping timeout: 240 seconds]
twinklehood has quit [Ping timeout: 255 seconds]
<bootstrappm>
sorry frank_o, a bit busy, if you're still having this prob in a few hours try again :)
Soda has quit [Remote host closed the connection]
apofis has quit [Quit: This computer has gone to sleep]
<frank_o>
bootstrappm: Thanks man =)
iamjarvo has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<dfockler>
frank_o: the rest client will sit until the transfer is finished
mrmargolis has quit [Remote host closed the connection]
iamjarvo has joined #ruby
<frank_o>
dfockler: aah.. that changes everything i think
_ht has quit [Quit: Konversation terminated!]
iamjarvo has quit [Client Quit]
Pathfinder has joined #ruby
Alayde has joined #ruby
<frank_o>
dfockler: thank you!
<dfockler>
sure if that doesn't work, come back! :)
futilegames has quit [Quit: futilegames]
_Speeder has quit [Quit: - nbs-irc 2.39 - www.nbs-irc.net -]
scripore has joined #ruby
finisherr has joined #ruby
nik_-_ has quit [Quit: nik_-_]
freerobby has joined #ruby
<frank_o>
oh indeed!
moretti_ has quit [Quit: Leaving...]
mrsolo has joined #ruby
<Alayde>
I'm writing a few modules that are making REST calls to an internal API, is there a recommended way to share credentials between the different modules?
banister has joined #ruby
skade has quit [Ping timeout: 276 seconds]
civim_32 has joined #ruby
<dfockler>
Alayde: You can make a module that has the settings as constants inside of it
<bootstrappm>
keep all sensitive credentials in the environment instead of in the source code
nfk has joined #ruby
<dfockler>
^ this makes sense
ferr has joined #ruby
shredding has quit [Remote host closed the connection]
OtterCoder has quit [Quit: No Ping reply in 180 seconds.]
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
OtterCoder has joined #ruby
mrsolo has quit [Client Quit]
<Alayde>
bootstrappm: So that is pretty cool. I won't lie though, our org isn't the best about security and these credentials are already peppered throughout all of our source code
civim_32 has quit [Client Quit]
<Alayde>
But, I'll look into it. maybe I'll be the first good example lol
shadoi has joined #ruby
<bootstrappm>
haha then go with what dfockler said, you're no longer aiming for security just reuse ... shared module sounds good
dain_ has joined #ruby
jpfuentes2 has joined #ruby
jmif has joined #ruby
m8 has quit [Quit: Sto andando via]
<jmif>
hey all, I'd like to access the data coming from STDIN character by character without any buffering, is this possible in ruby?
jpfuentes2 has quit [Client Quit]
allcentury has joined #ruby
tkuchiki has joined #ruby
lkba has joined #ruby
<jhass>
jmif: yes, for example with io/console's getch
sarlalian has quit [Quit: WeeChat 0.4.2]
Zai00 has quit [Quit: Zai00]
c355E3B has quit [Quit: Connection closed for inactivity]
sarlalian has joined #ruby
jenrzzz_ has joined #ruby
platosha has quit [Ping timeout: 272 seconds]
chipotle has joined #ruby
axl_ has quit [Quit: axl_]
jenrzzz has quit [Ping timeout: 245 seconds]
pengin has quit [Remote host closed the connection]
bricker has joined #ruby
yardenbar has quit [Quit: Leaving]
bricker_ has joined #ruby
baweaver has quit [Remote host closed the connection]
spyderman4g63 has joined #ruby
nfk has quit [Quit: yawn]
_seanc_ has quit [Ping timeout: 256 seconds]
vickleton has quit [Quit: Ex-Chat]
bricker has quit [Ping timeout: 265 seconds]
b_hoffman has joined #ruby
_seanc_ has joined #ruby
affenhoden has joined #ruby
XThief has quit [Quit: XThief]
umgrosscol has quit [Remote host closed the connection]
marr has quit []
ramfjord has quit [Ping timeout: 256 seconds]
spyderman4g63 has quit [Ping timeout: 246 seconds]
last_staff has quit [Remote host closed the connection]
jpfuentes2 has joined #ruby
nisstyre has quit [Changing host]
nisstyre has joined #ruby
bantic has quit [Quit: bantic]
michael_mbp has quit [Excess Flood]
<drbrain>
or sysread(1)
michael_mbp has joined #ruby
ruby-lang713 has joined #ruby
Pathfinder has quit [Ping timeout: 252 seconds]
bluOxigen has quit [Ping timeout: 272 seconds]
devdazed has quit [Ping timeout: 272 seconds]
aphprentice has quit [Remote host closed the connection]
Lucky__ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<Mon_Ouie>
Well, they're not the same though --- sysread is actually about "no buffering", getch lets you read the input as the users is entering it, without waiting for them to hit the return key
jpfuentes2 has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
prereflect has joined #ruby
Spami has joined #ruby
<jmif>
getch seems to have worked just fine
bricker_ is now known as bricker
Pathfinder has joined #ruby
jpfuentes2 has joined #ruby
<jmif>
anyone here have any experience with net/ssh, trying to take the output of getch and pipe into an exiting channel
Fooster_ has quit [Ping timeout: 252 seconds]
<ruby-lang713>
Net IMAP question: how do I filter on the "to" field? this doesn't seem to be working:
codecop has quit [Remote host closed the connection]
pwattstbd has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
workmad3 has quit [Ping timeout: 252 seconds]
<bootstrappm>
haha thanks wallerdev, yes I included " mount_uploader :photo, ImageUploader"
<bootstrappm>
but no dice
<wallerdev>
yeah unfortunately the question is really specific to those technologies haha :(
b_hoffman has quit [Client Quit]
<wallerdev>
you could see what provides that method (probably method_missing) and try to debug it by diving into the source
x1337807x has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
AlphaAtom has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
Cache_Money has quit [Quit: Cache_Money]
Jandre has joined #ruby
sigden has quit [Ping timeout: 252 seconds]
theery has quit []
Jandre is now known as Guest73351
<weaksauce>
favorite way to make a tempfile name?
<Aeyrix>
Tempfile.new usually
<jhass>
tempfile stdlib?
edwinvdgraaf has quit [Remote host closed the connection]
momomomomo has joined #ruby
frank_o has quit [Quit: leaving]
kirun has quit [Quit: Client exiting]
AlphaAtom has joined #ruby
edwinvdgraaf has joined #ruby
<_blizzy_>
>.> I keep putting 'gem "x"' instead of 'require "x"'
AlphaAtom has quit [Max SendQ exceeded]
micmus has quit [Ping timeout: 265 seconds]
SuperTaz_ has quit [Ping timeout: 255 seconds]
<bootstrappm>
_blizzy_ you know what's a good way to get rid of that habit? type require 'X' a thousand times in a text file. Unless you use Vim, of course, then that's cheating
kies has quit [Ping timeout: 250 seconds]
SuperTaz_ has joined #ruby
Rickmasta has joined #ruby
Scroff has joined #ruby
<_blizzy_>
bootstrappm, lol, good idea. thxs.
AlphaAtom has joined #ruby
<dfockler>
just don't require your gem inside your Gemfile ;)
veduardo has joined #ruby
<_blizzy_>
lol, yeah.
edwinvdgraaf has quit [Remote host closed the connection]
<jhass>
baweaver: yes, you'd have to do a, b swap towards the larger on the left
<jfarmer>
baweaver What are you trying to do that you want [1,2,3] == [3,2,1] to evaluate to true?
<_blizzy_>
I should update my gem, so it returns the url also.
<baweaver>
AWS returns security group permissions in random orders
<baweaver>
which is causing an unnecessary database update
<baweaver>
which for 500+ objects that's a pain
Exponential has quit [Client Quit]
<jhass>
sounds like a set then?
<jfarmer>
Connect the dots between that and comparing arrays in an order-agnostic way.
<baweaver>
Set assumes unique elements
<baweaver>
some permissions overlap (for stupid reasons)
<jhass>
overlap != identical?
<_blizzy_>
are we allowed to post gems we have made here? :P
<baweaver>
bad wording
<baweaver>
yes, identical
<Rennex>
is sorting out of the question?
<jhass>
how does AWS differentiate them?
<jfarmer>
I would think the total set of permissions is the union of all smaller permissions.
<baweaver>
As for why, trust me when I say I want to know as well.
<jfarmer>
Regardless, if you only want order-agnostic
<jfarmer>
array1.sort == array2.sort
<jfarmer>
like others suggested
<baweaver>
mentioned above
<adefa>
Can I remove an element from an array, but not in place? Is the only way to do this by subtracting one array from another? Example: a = [1, 2, 3]; a - [1] returns [2, 3]; a is still [1, 2, 3].
<jfarmer>
I know; why is that out of the question?
<baweaver>
I was doing that
<baweaver>
and mentioned so above
<havenwood>
_blizzy_: sure, this is a good place to share a gem you've made
<_blizzy_>
havenwood, oh ok, thxs.
<jfarmer>
Ok. Maybe wrong in assuming there was a question somewhere in your original comment. :)
<jfarmer>
vs. just a musing
<_blizzy_>
>> [1,2,3].delete_if? {|x| x == 3}
<baweaver>
More of an annoyance with some return values from an api
<ruboto>
_blizzy_ # => undefined method `delete_if?' for [1, 2, 3]:Array (NoMethodError) ...check link for more (https://eval.in/375269)
<_blizzy_>
oh, fk.
<_blizzy_>
ruby has so many methods I guess I make some up sometimes.
dfinninger has quit [Remote host closed the connection]
NeverDie has quit [Remote host closed the connection]
<adefa>
_blizzy_: delete_if exists
rubie has joined #ruby
tuelz has joined #ruby
<_blizzy_>
adefa, oh, it's just without the ?
<_blizzy_>
thxs.
* jhass
prefers .reject!
<Rennex>
aka reject()
<jfarmer>
_blizzy_ Methods that end with '?' are a signal that it returns true or false
<_blizzy_>
jfarmer, oh, I didn
enebo has quit [Quit: enebo]
<_blizzy_>
t know that. thxs.
<tuelz>
I've got a list of schools in a text file and I want to throw them into a variable and use them from memory. They will never change. How would you do that? Just use a global, or a constant in a class?
<jfarmer>
That's just a convention, but it's why you "shouldn't" expect a method like delete_if? to exist.
<jfarmer>
jhass He specifically said "but not in place/"
<tuelz>
thought about just memoizing some ivar too, but unsure the 'best' most ruby way to do it
<jhass>
jfarmer: - is not in place, they want in place?
<jfarmer>
I assume by "in place" they meant "destructive"
<jfarmer>
Because you can't really remove things from an array in place
<baweaver>
I just avoid it in general as I have a lot of things running through sidekiq
bb010g has joined #ruby
serivich has joined #ruby
sigden has joined #ruby
fgo has joined #ruby
ogpastaling has joined #ruby
Matachines has joined #ruby
<bootstrappm>
grr, got a little too trigger happy with "q!" in vim. Def erased a buffer I needed
shadoi has joined #ruby
Fooster has joined #ruby
Torrieri has joined #ruby
Torrieri has joined #ruby
<miah>
oops
krz has quit [Quit: WeeChat 1.0.1]
<al2o3-cr>
what you done miah?
<miah>
nothing, was commenting on bootstrappm
<al2o3-cr>
hehe
fgo has quit [Ping timeout: 264 seconds]
Fooster has quit [Ping timeout: 255 seconds]
ramfjord has joined #ruby
bkxd has joined #ruby
<zenspider>
baweaver: Haskell/Scala hobbyist? so very sad. :P
sigden has quit [Ping timeout: 256 seconds]
baweaver has quit [Remote host closed the connection]
* zenspider
goes back to hacking in racket
<zenspider>
hah
<zenspider>
I shamed him off the internet.
shadoi has quit [Quit: Leaving.]
RegulationD has joined #ruby
<bootstrappm>
hahahah that was great
mark[oz] has quit [Remote host closed the connection]
malconis has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kinduff has joined #ruby
badhatter has joined #ruby
<tuelz>
what is racket? Just a racket?
<tuelz>
a language intended to be used to create other languages.... 0.o
joneshf-laptop has quit [Ping timeout: 252 seconds]
<tuelz>
weird design goal
sigden has joined #ruby
<zenspider>
why is that weird?
<zenspider>
what do you think ppl have been trying to do in ruby with rake, rspec, activerecord, etc? all that "internal-DSL" nonsense is (poor) efforts to do just that
<dfockler>
like bison and flex
<xxneolithicxx>
ello errybody
<tuelz>
noone created something to create rake though
Ropeney has joined #ruby
RegulationD has quit [Ping timeout: 258 seconds]
<zenspider>
tuelz: yes they did. they created ruby.
Fooster has joined #ruby
<tuelz>
matz didn't say I'm going to create ruby so you can create rake
<dfockler>
nah rake just divinely existed
<tuelz>
dfockler: false dichotomy
<tuelz>
you can design ruby for a purpose other than a langauge to create rake
baweaver has joined #ruby
<dfockler>
it's not like racket is designed to make a single language
<zenspider>
tuelz: *sigh* I do not see the point of your argument other than to be tedious. if you don't want to answer my question, fine.
<baweaver>
zenspider: hm?
<zenspider>
I'm happy to answer (other) questions about racket
<zenspider>
baweaver: just poking at you
<baweaver>
Ah
<tuelz>
zenspider: I already attempted to answer your question, I'm sorry if my answer isn't sufficient for you
* baweaver
groks logs
Pathfinder has quit [Ping timeout: 258 seconds]
thiagovsk has joined #ruby
Exuma has quit []
mordocai has joined #ruby
<zenspider>
dfockler: racket isn't really like bison/flex... it's more like if ruby had a built in macro system that made it easy to declare another language that translated to ruby
<zenspider>
(and ran)
<zenspider>
(or compiled... I guess, but I really don't use racket for compiled sources)
nhhagen has quit [Remote host closed the connection]
<tuelz>
I see that design goal as the equivalent as saying - houses are hard to build, let me design this tool so someone smarter than me can use this tool to create good house building tools. It seems more natural to use that time thinking about how to build a tool that is good at building houses
* bootstrappm
is frustrated because your frustrated
<bootstrappm>
you're* damnit
<dfockler>
zenspider: like it's designed around writing a lexer and parser?
<tuelz>
I understand the usefulness of such a tool, but it's not ordinary to attempt to solve a problem that isn't immediately recognizable
<dfockler>
or compiler
<zenspider>
it's actually quite nice. the first line of a racket source is usually "#lang racket" but can be "#lang whatever" where whatever can define any syntax and semantics it wants. I actually write a few parsers this way with "#lang ragg" that then translates into racket source for the parser's grammar
phutchins has quit [Ping timeout: 245 seconds]
baweaver has quit [Remote host closed the connection]
nedp has joined #ruby
Adran has quit [Quit: Este é o fim.]
<dfockler>
Is it Ruby's metaprogramming that allows for easier DSL building?
<zenspider>
racket loads the file, see the language, hands it off... usually it is translated into more racket to be run and it all seamlessly integrates with all the other sources, whatever their languages
victorkohl has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dfockler>
racket has that as a first class feature then
diegok has quit [Ping timeout: 272 seconds]
<bootstrappm>
zenspider would it be easier for me to learn how to create a language if i start with racket first? or is it hard to really use racket without knowing how languages are written?
<zenspider>
minitest's spec "dsl" really just creates classes and methods out of describe/it/let blocks, but some "dsl"s are much more extensive than that
OtterCoder has quit [Ping timeout: 265 seconds]
<zenspider>
bootstrappm: mmmm... depends. what sort of language?
<zenspider>
and, have you programmed in anything lispy before?
<bootstrappm>
a toy language
<bootstrappm>
nothing lispy no
<bootstrappm>
all my languages can pronounce their s's
OtterCoder has joined #ruby
<zenspider>
::P
chadrien has joined #ruby
<bootstrappm>
hahah
dgutierrez1287 has joined #ruby
<zenspider>
mmmm... depending on how toy like... ruby could be just fine for it.
Adran has joined #ruby
<dfockler>
I was writing a parser in Ruby, and I quickly realized why polish notation is nicer to parse
<zenspider>
I'd only change one major variable at a time... if this is your first parser/lexer/interpreter, then I'd stick to a language you know for now
tuelz has quit [Ping timeout: 244 seconds]
<bootstrappm>
gotcha, cool
<zenspider>
so write a language with polish notation first.
<zenspider>
or even just an HP calculator (which are really capable... they're basically forth)
<zenspider>
you can look at oedipus_lex for a simple way to define a lexer
<zenspider>
(or just do regexps yourself)
<zenspider>
then, depending on your goals, you could use racc, or write a recursive descent parser by hand
LMity has joined #ruby
mdz_ has quit [Ping timeout: 255 seconds]
<dfockler>
I don't really understand the theory, but it's fun to run into issues and see that people have already discovered them
<bootstrappm>
so many projects, so little time
adefa has quit [Ping timeout: 264 seconds]
<dfockler>
Just figuring out variable substitution and nested functions is pretty interesting
Adran has quit [Client Quit]
mist has quit [Ping timeout: 606 seconds]
Papierkorb has quit [Read error: Connection reset by peer]
<zenspider>
dfockler: start with a basic RPN calculator language. Get arithmetic up and running. add variables. add user functions. then switch it to infix... etc.
<zenspider>
it's a nice thought experiment at the very least.
<zenspider>
I've done a talk on interpreters if you want to follow that
mist has joined #ruby
Papierkorb has joined #ruby
dgutierrez1287 has quit [Ping timeout: 264 seconds]
<dfockler>
yeah that would awesome
poguez_ has quit [Quit: Connection closed for inactivity]
bruno- has quit [Ping timeout: 256 seconds]
<zenspider>
sec
jwaldrip_ has joined #ruby
<dfockler>
I got to the point of an RPN calculator, but hit nested functions