<bricker>
ZephiroMX: you're matching a string to a string which won't work
mercwithamouth has joined #ruby
<bricker>
ZephiroMX: you should remove the double-quotes from the first half
<ZephiroMX>
Perfect
<ZephiroMX>
thanks Havenwood and Bricker
jacksonn has quit [Quit: IRCGate CGI:IRC User (EOF)]
timonv has joined #ruby
fuhgeddaboudit has quit [Ping timeout: 252 seconds]
joaoh82 has quit [Ping timeout: 265 seconds]
Virtualize has joined #ruby
klaut has quit [Remote host closed the connection]
dagnachew has joined #ruby
Megtastique has joined #ruby
blarghmatey has quit [Read error: Operation timed out]
specious has joined #ruby
figgleberry has quit [Ping timeout: 252 seconds]
baroquebobcat has quit [Quit: baroquebobcat]
dru has quit [Ping timeout: 272 seconds]
danshultz has joined #ruby
rm_ has quit [Remote host closed the connection]
sid_ has joined #ruby
rm_ has joined #ruby
danshultz has quit [Remote host closed the connection]
ZephiroMX has quit [Read error: Connection reset by peer]
ZephiroMX has joined #ruby
nanoyak has quit [Quit: Computer has gone to sleep.]
subbyyy has joined #ruby
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
ZephiroMX has quit [Client Quit]
rm_ has quit [Ping timeout: 246 seconds]
cj3kim has joined #ruby
timonv has quit [Remote host closed the connection]
nanoyak has joined #ruby
Yarou has quit [Quit: This computer has gone to sleep]
bentonrr has joined #ruby
cj3kim has quit [Remote host closed the connection]
mneorr has quit [Ping timeout: 272 seconds]
goleldar has quit [Remote host closed the connection]
Virtualize has quit [Quit: Leaving...]
Guest68596 is now known as banghouse
Guest54348 has quit [Remote host closed the connection]
<QKO_>
Happy new year everyone!
Mars has joined #ruby
butblack has joined #ruby
Mars is now known as Guest53199
szerated_ has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
croaky has quit [Ping timeout: 265 seconds]
vlad_starkov has joined #ruby
goleldar has joined #ruby
szerated_ has quit [Ping timeout: 245 seconds]
claymore has quit [Quit: Leaving]
Vivekananda has joined #ruby
<havenwood>
QKO_: Happy New Years!
goleldar has quit [Read error: Connection reset by peer]
goleldar has joined #ruby
nateberkopec has quit [Quit: Leaving...]
cameronbarton has quit [Quit: cameronbarton]
<ace_striker>
happy new year all ...
cameronbarton has joined #ruby
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
tt1187 has quit [Ping timeout: 245 seconds]
kitak has quit [Remote host closed the connection]
CaptainJet has quit []
szerated_ has joined #ruby
LiquidInsect has quit [Read error: Connection reset by peer]
kitak has joined #ruby
<dann_>
alright. i have a folder named "dungeon". it has subfolders in it, and a "run.bat"- the run.bat executes ruby lib/dungeon.rb (lib being a subfolder of dungeon).
<dann_>
if i were to load a file from dungeon.rb, what would be the base folder for it?
<dann_>
would it be /dungeon/ or /dungeon/lib/?
szerated_ has quit [Ping timeout: 245 seconds]
jellow_ is now known as jellow
jellow has quit [Changing host]
jellow has joined #ruby
<dann_>
helloooo
<Jamo>
try :)
rm_ has joined #ruby
spider-mario has quit [Remote host closed the connection]
lukec has quit [Quit: lukec]
<Jamo>
in worst case you might need to prefix your path %dp0 or whatever it was to get paths relative to .bat files location
cameronbarton has quit [Read error: Connection reset by peer]
predator217 has quit [Ping timeout: 246 seconds]
Kricir has quit [Remote host closed the connection]
subbyyy has quit [Ping timeout: 252 seconds]
<Jamo>
yep, %dp0
tedstriker has joined #ruby
predator117 has joined #ruby
mneorr has joined #ruby
robustus has quit [Ping timeout: 252 seconds]
phipes has quit [Remote host closed the connection]
szerated_ has joined #ruby
robustus has joined #ruby
lewix has quit [Remote host closed the connection]
renklaf has quit [Remote host closed the connection]
maletor has quit [Quit: Computer has gone to sleep.]
monkegjinni has quit [Remote host closed the connection]
heidi has quit [Quit: Leaving.]
smathieu has joined #ruby
joaoh82 has quit [Ping timeout: 240 seconds]
kirun has quit [Quit: Client exiting]
dagnachew has quit [Quit: Leaving]
tropicalmug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
nanoyak has quit [Quit: Computer has gone to sleep.]
lessless has quit [Read error: Connection reset by peer]
smathieu has quit [Ping timeout: 245 seconds]
szerated__ has quit [Ping timeout: 245 seconds]
rm_ has quit [Remote host closed the connection]
aspires has quit []
rm_ has joined #ruby
dann_ has quit [Ping timeout: 272 seconds]
dagnachew has joined #ruby
dagnachew has quit [Max SendQ exceeded]
dagnachew has joined #ruby
havenwood has quit [Remote host closed the connection]
havenwood has joined #ruby
eka has joined #ruby
monkegjinni has joined #ruby
havenwood has quit [Ping timeout: 272 seconds]
goleldar has quit []
lewix has joined #ruby
okinomo has joined #ruby
freerobby has quit [Quit: Leaving.]
bricker has quit [Quit: leaving]
tylersmith has quit [Remote host closed the connection]
goleldar has joined #ruby
cbetta_afk is now known as cbetta
dagnachew has quit [Quit: Leaving]
mneorr has quit [Remote host closed the connection]
Asher has joined #ruby
mneorr has joined #ruby
danshultz has joined #ruby
bentonrr has quit [Remote host closed the connection]
Kiba has joined #ruby
<Kiba>
hmm
<Kiba>
hi
<Kiba>
trying to eval a string into a hash
<Kiba>
a = "{\"name\":\"people\"}"
<Kiba>
eval(a)
<Kiba>
expecting end-of-input{"name":"people"}
<Kiba>
<Kiba>
seems like it works differently in 2.0.0
<Kiba>
than in 1.9.3
<Kiba>
wait. I did it wrong
falood has joined #ruby
<Kiba>
a = "{\name\"=>\"people\"}"
<Kiba>
hmm
<Kiba>
obviously, I am doing it wrong, completely wrong
mneorr has quit [Ping timeout: 252 seconds]
magoo has quit [Quit: WeeChat 0.4.2]
danshultz has quit [Ping timeout: 272 seconds]
afhammad has joined #ruby
mzdravkov has left #ruby [#ruby]
diego has joined #ruby
diego is now known as Guest86865
goleldar has quit []
Guest53199 has quit [Remote host closed the connection]
<Kiba>
nvm guys, I figured out that I messed up the file I am reading
afhammad has left #ruby [#ruby]
Guest86865 is now known as diegoviola
kitak has quit [Remote host closed the connection]
havenwood has joined #ruby
Monie has joined #ruby
frustrum has joined #ruby
<emocakes>
go out kiba
<emocakes>
party
<emocakes>
its the new year
frustrum has quit [Client Quit]
jmo has joined #ruby
byprdct has quit [Ping timeout: 248 seconds]
Iszak has joined #ruby
eka has quit [Quit: Computer has gone to sleep.]
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
jmo has quit [Ping timeout: 272 seconds]
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
Asher has quit [Quit: Leaving.]
vlad_starkov has quit [Remote host closed the connection]
Asher has joined #ruby
sheap has joined #ruby
Yarou has quit [Quit: This computer has gone to sleep]
vlad_starkov has joined #ruby
freerobby has joined #ruby
sheap has left #ruby [#ruby]
vlad_starkov has quit [Read error: Connection reset by peer]
vlad_sta_ has joined #ruby
freerobby has quit [Client Quit]
tedstriker has quit [Quit: Anti-Fraping status set.]
flubba has quit [Read error: Connection reset by peer]
phipes has joined #ruby
flubba has joined #ruby
vlad_sta_ has quit [Read error: Connection reset by peer]
figgleberry has joined #ruby
joaoh82 has joined #ruby
tkuchiki has joined #ruby
lukec has joined #ruby
joaoh82 has quit [Read error: Connection reset by peer]
joaoh82 has joined #ruby
phipes has quit [Remote host closed the connection]
smathieu has joined #ruby
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
mneorr has joined #ruby
ejnahc has quit [Remote host closed the connection]
bitri has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
havenwood has quit [Ping timeout: 252 seconds]
rm__ has joined #ruby
ejnahc has joined #ruby
joaoh82 has quit [Ping timeout: 252 seconds]
smathieu has quit [Ping timeout: 248 seconds]
mary5030 has quit [Remote host closed the connection]
Yarou has joined #ruby
ludar has quit [Ping timeout: 240 seconds]
rm_ has quit [Remote host closed the connection]
timonv has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
LexicalScope has joined #ruby
monkegjinni has quit [Remote host closed the connection]
mengu has joined #ruby
timonv has quit [Ping timeout: 252 seconds]
larissa has quit [Quit: Leaving]
freerobby has joined #ruby
gja has joined #ruby
crapple has quit [Ping timeout: 265 seconds]
marr has quit [Ping timeout: 241 seconds]
mengu has quit [Ping timeout: 272 seconds]
crapple has joined #ruby
figgleberry has quit [Ping timeout: 245 seconds]
vlad_starkov has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
Mars has joined #ruby
vlad_starkov has joined #ruby
Mars is now known as Guest23232
drumusician has joined #ruby
tropicalmug has joined #ruby
vlad_starkov has quit [Read error: Connection reset by peer]
cj3kim has joined #ruby
vlad_starkov has joined #ruby
cj3kim has quit [Ping timeout: 245 seconds]
frem has joined #ruby
drumusician has quit [Ping timeout: 240 seconds]
RoryHughes has quit []
<frem>
I have a suspicion that somewhere in this huge project, an exception is being rescued which should not be rescued. is there a way to do such a terrible act as turning off all the rescues?
blarghmatey_ has joined #ruby
endash_ has quit [Quit: endash_]
gja has quit [Quit: This computer has gone to sleep]
Trynemjoel has quit [Ping timeout: 245 seconds]
diegoviola has quit [Quit: WeeChat 0.4.2]
mneorr has quit [Remote host closed the connection]
mneorr has joined #ruby
Trynemjoel has joined #ruby
mmitchel_ has quit []
Hanmac1 has joined #ruby
cbetta is now known as cbetta_afk
butblack has quit [Quit: butblack]
mneorr_ has joined #ruby
Hanmac has quit [Ping timeout: 272 seconds]
mneorr has quit [Read error: Connection reset by peer]
afhammad has joined #ruby
robbyoconnor has quit [Excess Flood]
robbyoconnor has joined #ruby
geggam_ has quit [Remote host closed the connection]
Jetchisel has left #ruby ["Unfortunately time is always against us -- *Morpheus*"]
<pontiki>
probably easer to grep for them
Hanmac has joined #ruby
<emocakes>
ily pontiki
bean has joined #ruby
Guest23232 has quit [Remote host closed the connection]
Hanmac1 has quit [Ping timeout: 272 seconds]
boreliash has quit [Read error: Connection reset by peer]
boreliash has joined #ruby
centipedefarmer has joined #ruby
lnemo has joined #ruby
Tearan has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
kitak has joined #ruby
mneorr_ has quit [Remote host closed the connection]
lewix has quit [Remote host closed the connection]
mneorr has joined #ruby
gja has quit [Client Quit]
ace_striker has quit [Quit: Page closed]
falood has quit [Remote host closed the connection]
kitak has quit [Ping timeout: 245 seconds]
mneorr_ has joined #ruby
falood has joined #ruby
mneorr has quit [Read error: Connection reset by peer]
vlad_starkov has quit [Read error: Connection reset by peer]
jkary has joined #ruby
gja has joined #ruby
havenwood has joined #ruby
gja has quit [Client Quit]
tropicalmug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
mjburgess has quit [Ping timeout: 246 seconds]
joaoh82 has joined #ruby
nfk has quit [Quit: yawn]
smathieu has joined #ruby
gja has joined #ruby
gja has quit [Changing host]
gja has joined #ruby
falood has quit [Remote host closed the connection]
Mars has joined #ruby
Mars is now known as Guest14306
smathieu has quit [Ping timeout: 272 seconds]
joaoh82 has quit [Ping timeout: 272 seconds]
banghouse has quit [Remote host closed the connection]
shedd has quit [Remote host closed the connection]
bean has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<boreliash>
Hi! When I do: 10.step 1, -2 do |i| puts "#{i}, " end. Why does it returns me 10. Doesn't it supposed to return "nil" with a "puts"?
near77 has joined #ruby
<near77>
hi
<near77>
happy new year
<boreliash>
near77, happy new year buddy!
<near77>
im having a weird issue
<near77>
im running a script /opt/token/ask.sh from commandline and it works well, but when calling it from system() or backlashes or %x[] it says command not found
Tearan has quit []
browndawg has joined #ruby
<near77>
it works on a different ubuntu box, but not in this one
Yarou has quit [Quit: This computer has gone to sleep]
butblack has joined #ruby
<near77>
its an ubuntu 12.04.3 LTS, Precise Pangolin..
aryaching has quit [Ping timeout: 246 seconds]
Wolland has quit [Remote host closed the connection]
<pontiki>
i was scanning the Learn Ruby the Hard Way, i thought it was a pretty good intro
joaoh82 has joined #ruby
okinomo has quit [Ping timeout: 248 seconds]
smathieu has joined #ruby
postmodern has quit [Quit: Leaving]
<ddd>
i just picked up twgr 2d ed
<ddd>
the meap
rickruby has quit [Remote host closed the connection]
afhammad has joined #ruby
smathieu has quit [Ping timeout: 252 seconds]
joaoh82 has quit [Ping timeout: 272 seconds]
<pontiki>
what's available in the meap?
<ddd>
covers ruby 2
gja has quit [Quit: This computer has gone to sleep]
<pontiki>
i know this would never fly, but sometime i'd like to teach programming by starting with testing
<bnagy>
pontiki: yeah I recommend it for people starting from absolute 0 ( no other programming lang )
<bnagy>
but a lot of the style is Wrong
<bnagy>
but mainly in later exercises, so w/e
<pontiki>
it is basically writing BASIC in ruby syntax
<pontiki>
which seems somewhat reasonable to me. that's where i started.
<pontiki>
SO IT MUST BE RIGHT DAMMIT
<ddd>
righ tnow its got chapters 1-8 covering bootstrapping ruby, objects, methods, and local vars, organizing objs with classes, modules, default obj (self), scope, and visibility, control-flow, built-in classes and modules, built-in essentials like constructors, Strings, symbols, and other scalar objects
<ddd>
pontiki: there's like another 4 chapters iirc coming
<pontiki>
yeah, ddd, i just peaked at the site
<ddd>
ah
<ddd>
sorry took me a bit to mine the TOC :)
<pontiki>
nw :)
<bnagy>
I still don't know what to recommend for experienced programmers who just want a fast start
<ddd>
bnagy: the pickaxe probably
<bnagy>
ruby from other languages page is not really enough
<pontiki>
pickaxe 2.0, seriously
<ddd>
or POODR
<bnagy>
quickref doesn't cover general block philosophy etc that well
tharindu has quit [Quit: Leaving...]
<bnagy>
pickaxe is way too much
<pontiki>
too much... ??
<ddd>
pontiki: i've that one too. but i find david's style a little easier to stick with
<pontiki>
i don't mean, *read* the pickaxe -- it's a reference
<bnagy>
I am invisioning like maximum 2 feet of text plus a link to the docs
<pontiki>
oh, then just ruby-doc
samsonasu has joined #ruby
<ddd>
bnagy: you killed off the only one i'd recommend. zen's qr
<bnagy>
this is how we do blocks, here's the object philosophy
DrShoggoth has joined #ruby
<ddd>
the only ones that get me that no book has explained well enough to get through my thick skull so it sticks are lambdas and proc
<ddd>
i get procs are a sort of anonymous block but i lose it on how to use them right
<bnagy>
you use them for callbacks or polymorphic methods
<pontiki>
old, but still good
<ddd>
yeah i';ve read through that occasionally. usually still in the books, and occasionally grouse sites
rickruby has joined #ruby
<ddd>
i do like practicing ruby
<pontiki>
yup
<pontiki>
love ruby tapas
<pontiki>
i'm a total fangirl for avdi
<ddd>
yeah thats another
<ddd>
yeah me too
<bnagy>
procs are total gold for callbacks because of the closure thing
<ddd>
he's alittle over my head sometimes, but if i slow down quite a bit and really pick apart what he's saying i can get it
<pontiki>
i can listen to him for hours
<ddd>
bnagy: i'm really iffy on them
<ddd>
pontiki: yeah he's got an easy style
<pontiki>
closures?
<bnagy>
yeah, procs are closures, ie they 'remember' all the local vars that were defined when they were created
<pontiki>
yup
<bnagy>
which is handy if you have say a client connection that's live at the time
rm_ has joined #ruby
<bnagy>
which you want to send a response to
<bnagy>
no need to save it in some huge stupid lookup
<ddd>
more i work with ruby the mnore i realize i've only just begun to scratch the surface hehe
<pontiki>
learning blocks, procs, and such things really made ruby sing
<pontiki>
i was suddenly back in love, and with the things i loved about writing lisp
okinomo has joined #ruby
<ddd>
i get blocks though i even waffle those occasionally, but procs .. meh
<bnagy>
don't sweat it. If you avoid a few styles of proramming you could write ruby for years and never have a legit use-case that wasn't forced
croaky has quit [Ping timeout: 272 seconds]
<ddd>
is there an agile book for rails like agile web development with rails 4? but specifically w/o the framework
<ddd>
s/for rails/for ruby/
<pontiki>
eh?
rm_ has quit [Ping timeout: 272 seconds]
<pontiki>
oh
<pontiki>
no
<ddd>
pontiki: awdwr4 uses agile techniques using the rails 4 framework.
<pontiki>
yeah, except, it doesn't
<ddd>
was wondering if there was one for straight ruby (w/o rails)
<pontiki>
what specific agile methods are you looking for?
<pontiki>
pair programming? scrum? sprints?
<ddd>
i've been at this for about 2 years with an 8 month break in that time from *all* coding. i'v enot really developed a workflow or stuck with a set of guidelines. i'm self taught and i don't work for a company (except myself).
<pontiki>
right. nothing wrong with that
<ddd>
there's tons of books about all different ways of working etc, and different styles of coding
<pontiki>
most agile techniques are aimed at teams
<ddd>
but i've not settled into anything. so trying to figure out a good way to set up a workflow for myself.
<pontiki>
there was a guy at the SEI that was promoting a Personal Software Process
echevemaster has quit [Remote host closed the connection]
<ddd>
i'm getting into writing a huge assed rails 4 app, and i've a large personal project i want to get back into working on. but i've no real.. flow? .. to how i work
<ddd>
it feels really stilted
<pontiki>
his approach was extreme IBM... but the concept is something i've appreciated
<ddd>
but i don't know how to flatten it to be more productive
<pontiki>
taking up the things that agile teaches: work in small spurts on small things
<ddd>
isn't the IBM approach really just a suped up functional programming?
hexus0 has quit [Ping timeout: 240 seconds]
<pontiki>
have an overall architecture, but don't be tied to it
<pontiki>
no, lol
aspires has quit []
<pontiki>
IBM is waterfall
<ddd>
now see i don't even know what that is
zeade has joined #ruby
<pontiki>
do *all* your specifications. then do *all* your archicture. then *all* your design. then you get to start your high level coding.
aspires has joined #ruby
<ddd>
i mean i might, but w/o formalized training or schooling, idk if i do, and i've not heard many people talk about waterfall as a technique
<pontiki>
then you get to do some low level coding. then you write tests.
<pontiki>
etc etc
zeade has left #ruby [#ruby]
<ddd>
oh, yeah see everyone's been drilling into me to write tests first
<pontiki>
that's because it's quite deprecated now
<ddd>
even if the tests are bogus (not to specs as in they say what to do but they're not actual rspec of minitest know what i mean?)
hexus0 has joined #ruby
<pontiki>
i guess, for a personal process, i've never thought of writing it down
okinomo has quit [Ping timeout: 245 seconds]
<pontiki>
there's three questions i try to ask and get answers for
<ddd>
who what why?
<pontiki>
sorta
<pontiki>
1. what do you want?
<pontiki>
2. why do you want it?
<pontiki>
3. how will you know when you have it?
<ddd>
haha 1 is SO open ended :)
<pontiki>
well, it can be
timonv has joined #ruby
<pontiki>
but it's asked in a specific context
<ddd>
i mean how 'simple' do you get?
sepp2k1 has quit [Read error: Connection reset by peer]
<ddd>
do you write a super general overview? do you think of what you want and then break it into physical steps?
<ddd>
etc
<pontiki>
for a complete spec, there's like 6 more questions, which i'll avoid for now
<pontiki>
no
<pontiki>
it's just a conversation
L8D has quit [Ping timeout: 245 seconds]
<ddd>
i mean i'd fit into a teram because i'd just adopt whatever they're doing. i just don't know how to properly define one for myself
<pontiki>
there's tonnes of different ways to ask the questions
<ddd>
s/teram/team/
<pontiki>
that's totally fair
<pontiki>
and not a bad way to go
<pontiki>
at all
<pontiki>
it's not like we leap from the womb knowing how to do this stuff
<ddd>
hehe true
<ddd>
i just expect to be more ahead in the game than i am because i've been around for almost 3 years (well a little under it)
<pontiki>
i mean.. i began seriously working in sw dev in uni
<pontiki>
and i was under scrutiny
<pontiki>
told how to do things
<ddd>
i feel just as stilted and disjointed as i did when i started
<pontiki>
and same after graduating and working for a BIGCO
lethjakman has quit [Ping timeout: 252 seconds]
<pontiki>
5 years of uni; 5 more years working under people
<ddd>
i work for myself. i got a d.b.a etc. and what i generally do is a tmux session with editor and pry or rails console in an opposite pane, couple other windows with logs and tests running. but as to the writing code or even the tests, there's no... pattern? to it
<pontiki>
then i get into managemetn
<pontiki>
big mistake that
<ddd>
hell i still write craploads of stuff on paper or napkins lol
<pontiki>
5-6 more years as a lead
timonv has quit [Ping timeout: 252 seconds]
<pontiki>
then 10 years as a process/change consultant
<pontiki>
that's great!
<ddd>
yeah see i got into programming really late. not until i turned 40
<pontiki>
hold onto that!
<ddd>
i'm 43 (recently)
<pontiki>
i've seen so much crap done on graphics programs and powerpoints
<ddd>
so it feels like playing catchup
<pontiki>
and photoshop layouts
<ddd>
the younger guys just seem to flow right into it all
<pontiki>
yeah, i get it
<pontiki>
some ppl are faster at getting stuff
<pontiki>
but you know, there's lots of people who *don't*. a lot more than do
<ddd>
lol, i was using visio for awhile to define stuff, my java class required it. but the program got in my way more than it helped
<pontiki>
that^
<pontiki>
i do my designs on paper
Wolland has joined #ruby
<pontiki>
i can whip up a quick mock up on paper and show someone on my camera faster than anyone would in any graphics tool
<ddd>
hehe i see people talking in here and i'll ask a questionand feel totally dumb for asking it because they explain it so simply and i look at it going oh shit, why didn't i see that?
<pontiki>
there's a threshhold of knowledge and experience to get over
<ddd>
yeah i like doing the mocks
<pontiki>
how many languages have you worked with?
<ddd>
C, C++, C#, and java though only C intensely
<pontiki>
nod, good
<ddd>
and that was WAY back
<ddd>
(the C)
<pontiki>
my C is from the 80s :)
<ddd>
te java was about 6 months ago. just transiently
afhammad has quit [Ping timeout: 252 seconds]
<pontiki>
Duran Duran C
<ddd>
yeah thats about mine. 88 or so
<ddd>
i was about 18 or 19
<pontiki>
i'm not saying you'll have an epiphany
<pontiki>
but it seems to happen with most people who spend a lot of time working on an area of practice
<ddd>
i'm a hell of an administrator. thats where computers took *me*, but now i want to program. i like it, its fun when i get into a zone, just hard to get 'there'
<ddd>
yeah admining was my area
<pontiki>
sorry, what sort of admining?
<ddd>
HA clusters, couple beuwolfs. mostly ldirectord and piranha stuff. lots of NT server, lotus notes and stuff
Wolland has quit [Ping timeout: 240 seconds]
<ddd>
then got really heavy into linux systems
<pontiki>
great, sys/net admining
<ddd>
yeah
<pontiki>
i mean, you could have been a hospital administrator for all i know...
<ddd>
ah i get what you meant now
<pontiki>
nw
<pontiki>
i know for certain i'm an outlier in a lot of ways. i do this for fun as well as a living.
thumpba has joined #ruby
<pontiki>
and look for ways i can write a program
tharindu has joined #ruby
<pontiki>
and write programs that write programs if need be :>
<ddd>
yeah, no. i was a systems administrator. biggest was handling a 4800 node db cluster backing a 100 node web farm for a company called QiXo back in the day
<pontiki>
but i'm not really a stellar programmer
shedd has joined #ruby
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
jmo has joined #ruby
<ddd>
i'm trying to get into it for a living. i gave up computers except for personal for a long time and went into the Army. went overseas, got hurt. physical labor jobs are out as a result of injuries, so i'm really trying to reinvent myself
<pontiki>
i understand a lot of stuff theoretically, and a bit of stuff in the practical
<pontiki>
but i'm still looking up stuff alla time
<dseitz>
ddd: Sounds a bit like my story; a lot of companys wouldn't give me a chance without a degree
<dseitz>
Interviews felt like coaching sessions lol
<ddd>
i'm far from an idiot, and i like computing. i've always nibbled at programming. now this late in the game i'm trying to actually become one
<pontiki>
dseitz: which is totally bogus
<ddd>
dseitz: yeah
<dseitz>
I agree; but it is a reality with some organizations
<pontiki>
i don't really know anyone coming out with a BS CS that actually knows how to do commercial development
<pontiki>
ddd, i'm 56
<dseitz>
CS wasn't recommended, they just required a degree
<dseitz>
a really specific check box
<pontiki>
i'm back in the ruby/rails game in a big way since last year (2012 i mean)
<ddd>
i watch a lot of the conf vids, watch MS's programming vids, etc. i see they have processes in place, and what i can glean from the vidds i try to inject into my own life, but its all hodge podge. nothing really flows
<ddd>
drives me nuts
<pontiki>
like anything, it does take a while
<pontiki>
let me give an analogy?
<ddd>
and then taking the 8 month break from doing *any* codding at all really hurt because i forgot so much of what i was *just* learning. didn't have time to stick to the walls so to speak
thumpba has quit [Ping timeout: 240 seconds]
<pontiki>
i've always been the artistic one
<ddd>
so feels like i'm back at square 2
<pontiki>
i could manage drawing, a little painting, markers, and stuff
jmo has quit [Ping timeout: 240 seconds]
<pontiki>
but i started taking watercolor painting classes a few years ago with my parents
shedd has quit [Ping timeout: 252 seconds]
<pontiki>
omg did i not know anything
<ddd>
hehe
<dseitz>
lol
tharindu has quit [Ping timeout: 272 seconds]
<pontiki>
and did i not know *how* to do anything
rm_ has joined #ruby
<pontiki>
i'm *still* struggling
<pontiki>
there are things i *cannot* do (water, glass, buildings)
skulker has joined #ruby
<pontiki>
i'm okay with flowers and trees
<pontiki>
landscapey and still life things
<ddd>
yeah thats how i feel with ruby. i mean i have a good handle on the language in general, very few of the libraries that come with it, but i could struggle through, it just really feels lacking in the *how* department. know what i mean?
<pontiki>
4 years
<pontiki>
i still don't know how to *make* a painting, you know?
<ddd>
i can do birds! does that count? ;)
<pontiki>
yes!
<ddd>
yeah
<pontiki>
i can't!
<pontiki>
my birds are laughably bad
<bnagy>
depends at what distance you're painting them
<pontiki>
animals, figures, not good
<ddd>
remember that guy from PBS with the wacky hair? bob something? did all the pil painting?
<pontiki>
YES
<ddd>
i watched him a LOT. tried my hand like crazy at every painting he ever showed that i watched
<ddd>
man.. you SO did NOT want to see my work hehe
<pontiki>
crikey, now all i can think of is Bob Villa, but he was the home improvement guy
<ddd>
yeah
<dseitz>
ddd: I call Dash my brain; I don't work to well without it lol
<ddd>
can't for the life of me remember his name, but i do remember the hair! :)
<ddd>
dseitz: hahaha
<pontiki>
but the point i'm making is that is *does* take time to aquire the ... *mindset*
<ddd>
pontiki: see this is why i've never applied for a real programmer job, even entry level where they expect you not to know shit
klaut has joined #ruby
<pontiki>
oh man, wrong way
skulker has quit [Ping timeout: 246 seconds]
<pontiki>
if you have a job, you *will* get this stuff
<dseitz>
Is there any organizations offering training?
<pontiki>
taking a class is huge motivation to learn paining
<ddd>
dseitz: there are some, but that takes cash a military disability just will not allow
<pontiki>
having a *job* is *dire* motivation
<dseitz>
That's how I got my foot in the door; I did some paid internship
<ddd>
pontiki: yeah but at the same time you put the job in jeopardy, and the team you're working with
<pontiki>
why i think *i* came out of uni being able to do dev work is that my uni slave labour job was contract programming
<pontiki>
magic happens
<ddd>
i don't want to screw up a team and their time table for stuff because *I* don't have confidence in whatever ability i have
<pontiki>
because you find things you can do
<pontiki>
and you find ways of working with the team that helps them
<pontiki>
testing
<pontiki>
doc writing
<pontiki>
all that shit
<pontiki>
is IMPORTANT
<pontiki>
and you do learn
<ddd>
actually test writing has made my DAMNED good money
<ddd>
backporting is what i've done
mneorr has joined #ruby
<dseitz>
Testing is a good way in
<ddd>
dropping tests into an existing app that didn't have any. i've done quite a bit of that
<bnagy>
mm tests and docs
<pontiki>
yeah
<bnagy>
shit _I_ would just about pay someone to do that :)
<dseitz>
Although you'll be shocked how few firms use agile lol
<ddd>
telecommuting work. paid the bills a few months on that
<pontiki>
i'm doing that on this gig, but it's because i need tests for what i'm developing
rm_ has quit [Ping timeout: 260 seconds]
<pontiki>
more places say the use agile than use agile
<pontiki>
but the business world, and the tech world i'm most familiar, is full of cargo culting
<dseitz>
Indeed. The first place I worked for, the app was designed, specs were provided, you made the app and nothing more
<dseitz>
and you moved on
<ddd>
right now, i'm working on a rails 4 app. I can do everything i need in the console. I can write all the ruby scripts i need to be able to do the app. AR associations etc. but this framework, the framework is killing me
<dseitz>
no tdd/bdd
<pontiki>
there are a lot of shops like that
<pontiki>
i think i'm blowing a lot of people's minds at this place
<dseitz>
if there was no major issue reports from the client, our side of the shop dropped support after 2 weeks
<dseitz>
2 weeks... lol
<pontiki>
and i'm like, wut?
<pontiki>
wow lol
<ddd>
i can write the model tests, i can write tests to call scripts that do what i need no problem. i just can not get the fucking rails way into my head so i flop when i try to write the controllers right ect.
<pontiki>
well, it's a business model
<ddd>
that make sense? and how fucked is *that*?!
<pontiki>
sure, ddd
<pontiki>
it's not fucked
browndawg has quit [Read error: No route to host]
<pontiki>
routing is not that straight-forward a concept
browndawg has joined #ruby
<dseitz>
rails tutorial was a blessing for me
<ddd>
pontiki: github.com/dtf-gems/dtf
<ddd>
that was my first attempt at writing a framework for rvm to test rvm installs, be able to replay the tests later on, etc
phansch has joined #ruby
<ddd>
its not the greatest code, but you can see i have a 'decent' knowledge of ruby at least.
charliesome has joined #ruby
<ddd>
and i've gotten better on the backend.,
<ddd>
but this fucking rails shit.. holy cow
<pontiki>
i just read the README. i am *impressed*
<ddd>
eh anyone can write a readme, the code is the meat :)
mneorr has quit [Ping timeout: 272 seconds]
<pontiki>
no, seriously, that is NOT true
<pontiki>
i mean, yes, the code counts
browndawg has quit [Read error: Connection reset by peer]
Tearan has joined #ruby
<pontiki>
but most devs cannot write a README that makes any sense
<ddd>
and yeah i know people in her ecould and would tear apart what i wrote and do it probably a 100 times better. but for only having had 4 or 5 months of ruby knowledge when i wrote it..
<ddd>
i thought it was pretty good :)
<pontiki>
but that's okay!
<dseitz>
Well that's fine
<dseitz>
I always look at my past work and I'm like "wtf?? really guy??"
browndawg has joined #ruby
<ddd>
hehe
<pontiki>
the day i stop learning, or needing to learn, is like 10 days after my corpse has rotted away
<ddd>
dtf is the large personal project i said i wanted to get back into
joaoh82 has joined #ruby
<ddd>
the whole suite
<dseitz>
I retain C++ pretty well, I think it's because there is no concept of code reuse (I consider it a myth in C++ world, beyond a few good examples)
smathieu has joined #ruby
<ddd>
yeah god please kill me the day i stop learning. because life is over when that happens
<ddd>
i may be thick skulled at times and a bit dim witted occasionally, but if i ever just stop learning, shoot me
browndawg has quit [Read error: No route to host]
<pontiki>
no code reuse in C++?
Solnse has quit [Remote host closed the connection]
<pontiki>
how's that work?
<ddd>
c++ is all about code reuse
<pontiki>
everyone writes the same date classes over and over again?
<ddd>
object conceptualization and code reuse
<dseitz>
The idea of writing generic code in C++ is a fascinating myth. The reality is, no one does it.
browndawg has joined #ruby
<pontiki>
huh
<ddd>
are you talking Generic or 'generic'?
Tearan has quit [Read error: Connection reset by peer]
<pontiki>
it's been ages since i worked in C++
mansi_ has joined #ruby
<pontiki>
i think the myth of code reuse, though, can be found lots of places
<ddd>
i think he's talking about the Generic (<I>)
<dseitz>
lol
<dseitz>
Yeah, that's very true.
<pontiki>
you get into a rails shop that is run by scared managers needing to meet unreasonable demands of the founders/cclients, you'll see the same thing
afhammad has joined #ruby
lethjakman has joined #ruby
<ddd>
from a reuse perspective, i'd *rather* write ode I can reuse over and over in other projedts
<pontiki>
this current project i'm on, one guy did it at first, and it was a "get it done in a month" thing
<ddd>
err projects. if i can cut down on how much i have to do over and over ad nausium, i'd be immensely happy
<pontiki>
so no tests, no architecture
joaoh82 has quit [Ping timeout: 252 seconds]
<pontiki>
i'm currently looking at three different areas using datatables, where there is tons of duplciated functionality
smathieu has quit [Ping timeout: 248 seconds]
<pontiki>
and structures put in that are never used
<pontiki>
bridge to nowhere stuff
<pontiki>
but it's what i would have done, too, given the time pressures
<pontiki>
but this shit is *fun*
<pontiki>
it sounds like complaining, but it's not. it's thrilling
mansi_ has quit [Ping timeout: 272 seconds]
<ddd>
yeah, side note, don't take what i'm saying as me complaining. its frustrating, but its fun as hell at the same time
<dseitz>
I read an article the other day that made me laugh.. something like "DRY is bad for your wallet. Copy & Pasting and updating the same code at 150 different locations is job security."
<ddd>
hah, i've seen a ton of articles like that
<dseitz>
It was like "Why PHP will always be better than everything else"
afhammad has quit [Ping timeout: 272 seconds]
ewnd9 has quit [Remote host closed the connection]
lnemo has quit [Ping timeout: 246 seconds]
<dseitz>
Which I hold no direct opinion of. I never learned the language. I got into using Perl for CGI
byprdct has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
dgx has joined #ruby
byprdct has joined #ruby
Tearan has joined #ruby
mengu has joined #ruby
tropicalmug has joined #ruby
tkuchiki has quit [Remote host closed the connection]
tropicalmug has quit [Client Quit]
tkuchiki has joined #ruby
Hanmac1 has joined #ruby
Inoperable has quit [Quit: Rectified]
mengu has quit [Ping timeout: 260 seconds]
butblack has quit [Ping timeout: 248 seconds]
butblack has joined #ruby
tkuchiki has quit [Ping timeout: 240 seconds]
Hanmac has quit [Ping timeout: 272 seconds]
kevinfagan has quit [Ping timeout: 245 seconds]
falten has quit [Ping timeout: 252 seconds]
amclain has quit [Quit: Leaving]
KevinSjoberg has quit [Ping timeout: 272 seconds]
browndawg has quit [Read error: No route to host]
timmow has quit [Ping timeout: 260 seconds]
abstractj has quit [Ping timeout: 248 seconds]
browndawg has joined #ruby
falten has joined #ruby
kevinfagan has joined #ruby
KevinSjoberg has joined #ruby
timmow has joined #ruby
<ddd>
hehe brain dumped to poor pontiki and i think i scared her off lol
abstractj has joined #ruby
Hanmac has joined #ruby
<pontiki>
sometimes i need to go to the bathroom :P
<ddd>
hahaha
Monie has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
browndawg has quit [Read error: Connection reset by peer]
Hanmac1 has quit [Ping timeout: 246 seconds]
<ddd>
my turn :)
browndawg has joined #ruby
kewubenduben has joined #ruby
<pontiki>
i'm a trendsetter
rickruby has quit [Remote host closed the connection]
<ddd>
hehehe
browndawg has quit [Client Quit]
browndawg has joined #ruby
browndawg has quit [Client Quit]
browndawg1 has joined #ruby
<pipecloud>
dseitz: lul
browndawg1 has quit [Client Quit]
browndawg has joined #ruby
browndawg has quit [Read error: No route to host]
browndawg has joined #ruby
gja has joined #ruby
rickruby has joined #ruby
shedd has joined #ruby
tharindu has joined #ruby
dogweather has quit [Remote host closed the connection]
dogweather has joined #ruby
dogweather has quit [Read error: Connection reset by peer]
dogweath_ has joined #ruby
shedd has quit [Ping timeout: 246 seconds]
dgx has quit [Quit: Leaving]
tharindu has quit [Ping timeout: 240 seconds]
gasbakid has joined #ruby
rm_ has joined #ruby
frxx has joined #ruby
banghouse has joined #ruby
banghouse is now known as Guest24547
mneorr has joined #ruby
rm_ has quit [Ping timeout: 252 seconds]
frx has quit [Ping timeout: 245 seconds]
Tearan has quit []
hl has quit [Ping timeout: 260 seconds]
Guest24547 has quit [Ping timeout: 240 seconds]
hl has joined #ruby
okinomo has joined #ruby
mneorr has quit [Ping timeout: 246 seconds]
joaoh82 has joined #ruby
afhammad has joined #ruby
smathieu has joined #ruby
browndawg has quit [Read error: Connection reset by peer]
mansi_ has joined #ruby
joaoh82 has quit [Ping timeout: 246 seconds]
aspires has quit []
smathieu has quit [Ping timeout: 252 seconds]
mansi_ has quit [Ping timeout: 265 seconds]
lewix has quit [Remote host closed the connection]
ewnd9 has joined #ruby
aspires has joined #ruby
shedd has joined #ruby
<dogweath_>
Anyone using 2.1.0?
<pontiki>
not yet
dogweath_ has quit []
Monie has joined #ruby
dogweather has joined #ruby
<Hanmac>
2.1.0 is so 2013 ... i am using 2.2trunk ;P
<pontiki>
you maverick, you
shedd has quit [Ping timeout: 252 seconds]
Monie has quit [Client Quit]
timonv has joined #ruby
charliesome has joined #ruby
<pipecloud>
dominikh: I build off HEAD daily. I use 2.0 at work, and we're evaluating 2.1 for the time being.
<dominikh>
interesting!
<pipecloud>
We'd like to miss out on the fun of finding bugs in a new release for once.
<dominikh>
yet the wrong nick :P
mbytes has joined #ruby
<pipecloud>
dominikh: You're right! Sorry.
browndawg has joined #ruby
<pipecloud>
dogweather: ^
rubyracer has quit [Quit: Konversation terminated!]
<IceDragon>
well looks like half of my brain was left in 2013..
MrZYX|off is now known as MrZYX
<shevy>
MrZYX happy new year!!!
<IceDragon>
^
<IceDragon>
What he said but in binary
<MrZYX>
shevy: IceDragon thanks, you too :)
<shevy>
IceDragon do you know that dragon in The Hobbit? the one that is greedy for the gold of the dwarves and invades their home to snatch it all? that's how I think you are, as evil as him :)
LexicalScope has joined #ruby
russt has quit [Quit: russt]
<IceDragon>
nah, I steal your gold and the melt it in front of you while trampling all your furniture, after which I freeze your home and shatter it using the tip of my tail
<IceDragon>
. x .
olivier_bK has quit [Ping timeout: 246 seconds]
mojjojo has quit [Quit: mojjojo]
<shevy>
you know your role very well
<IceDragon>
But for 2014, I plan to change all that
<IceDragon>
I'll burn whole villages and pillage everything!
soobus has quit [Ping timeout: 272 seconds]
<IceDragon>
probably snatch up a few princesses while I'm at it
mojjojo has joined #ruby
ViPi2 has joined #ruby
ViPi2 has quit [Max SendQ exceeded]
aryaching_ has quit []
Hien_ has quit [Remote host closed the connection]
logic_prog has joined #ruby
<logic_prog>
is there a way to "gem install macgap" without SUDO ? (this is on OSX)
<Rylee>
logic_prog, gem install --user macgap
<Rylee>
will install it to only your user account, not system-wide
<logic_prog>
Rylee: very nice, thanks! I was trying gem install --local, whihc did not work
shedd has joined #ruby
gja has joined #ruby
alexherbo2 has joined #ruby
soobus has joined #ruby
centipedefarmer has quit [Remote host closed the connection]
Guest90602 has quit [Remote host closed the connection]
alexherbo2 has quit [Client Quit]
mechanicles has joined #ruby
alexherbo2 has joined #ruby
afhammad has quit []
ambushsabre has joined #ruby
cbetta is now known as cbetta_afk
shedd has quit [Ping timeout: 272 seconds]
aryaching has joined #ruby
thumpba has joined #ruby
DrOwl has quit [Ping timeout: 272 seconds]
Astralum has joined #ruby
mehlah has joined #ruby
thumpba has quit [Read error: Operation timed out]
cbetta_afk is now known as cbetta
sepp2k has joined #ruby
p8952 has quit [Read error: Connection reset by peer]
LexicalScope has quit [Ping timeout: 246 seconds]
mrnugget has joined #ruby
Advocation has joined #ruby
maj has quit [Quit: Computer has gone to sleep.]
logic_prog has left #ruby [#ruby]
momomomomo has joined #ruby
tylersmith has joined #ruby
lyanchih has quit [Quit: lyanchih]
mojjojo has quit [Quit: mojjojo]
michael_lee has joined #ruby
workmad3 has joined #ruby
mojjojo has joined #ruby
mikemac has quit [Remote host closed the connection]
jeffreyrichardso has joined #ruby
mikemac has joined #ruby
mary5030 has joined #ruby
fantazo has joined #ruby
tharindu is now known as tharindu|away
butblack has joined #ruby
tharindu|away is now known as tharindu
michael_lee has quit [Read error: Connection reset by peer]
mansi_ has quit [Remote host closed the connection]
lethjakman has joined #ruby
gja has quit [Quit: This computer has gone to sleep]
madb055 has joined #ruby
mengu has quit [Remote host closed the connection]
vlad_starkov has quit [Remote host closed the connection]
ViPi2 has quit [Quit: Computer has gone to sleep.]
shedd has joined #ruby
Txandy has joined #ruby
<artgoeshere>
Is it April 1st already?
madb055 has joined #ruby
IceDragon has joined #ruby
krz has quit [Quit: WeeChat 0.4.2]
mojjojo has quit [Quit: mojjojo]
joaoh82 has quit [Ping timeout: 248 seconds]
mojjojo has joined #ruby
shedd has quit [Ping timeout: 248 seconds]
mrnugget has quit [Quit: mrnugget]
<shevy>
lol
vertreko has quit [Quit: WeeChat 0.4.1]
rm_ has quit [Remote host closed the connection]
rm_ has joined #ruby
butblack has quit [Quit: butblack]
IceDragon has quit [Read error: No route to host]
SkramX has joined #ruby
smathieu has joined #ruby
LexicalScope has joined #ruby
LexicalScope has joined #ruby
LexicalScope has quit [Changing host]
<SkramX>
hey all. I have an array of hashes like [{:1 => {}, :2 => {}, :10 => nil ] ..whats the best way extract just the hash's key whose value is non-null?
smathieu has quit [Remote host closed the connection]
smathieu has joined #ruby
<SkramX>
actually no, it is a hash of hashes: {:1 => a, :2 => b, :10 => nil}
<Mon_Ouie>
What you're showing isn't a hash of hashes, it's just a regular hash
<waxjar>
what's in a and b ?
<SkramX>
another hash
<SkramX>
and you're right, sorry Mon_Ouie
Advocation has joined #ruby
<Mon_Ouie>
Ah
<Mon_Ouie>
Well, you can use #select to find elements that satisfy a certain condition
<SkramX>
i think i can just collect/select non-null values and then sort by key
gja has quit [Quit: This computer has gone to sleep]
<IceDragon>
it didn't?
<IceDragon>
O:
<IceDragon>
I didn't realize > rarely uses class variables
<shevy>
I dont use them either
<shevy>
but they dont seem to work in mruby right now :P
jamesaxl has joined #ruby
timonv has quit [Remote host closed the connection]
tomasso has quit [Quit: Leaving.]
tomasso has joined #ruby
tomasso has quit [Read error: Connection reset by peer]
Tearan_ has joined #ruby
tomasso has joined #ruby
<IceDragon>
shevy, submit an issue for me pls
<IceDragon>
;_; I'm too lazy to sign up
kalamazoo has joined #ruby
sharms has quit [Ping timeout: 240 seconds]
<Hanmac>
"the barn is not leaking anymore, but now its bigger on the inside" "Psst! dont tell, or otherwise everyone want one like that" ;P
rm_ has quit [Ping timeout: 245 seconds]
<shevy>
IceDragon ok
<shevy>
but you must detail it here
mojjojo has quit [Quit: mojjojo]
tomasso has quit [Quit: Leaving.]
tomasso has joined #ruby
<shevy>
"HALP! My body is so cold."
<shevy>
- "That's because you are an ICE dragon."
sharms has joined #ruby
<IceDragon>
Its just a small mistake they made in the include/ruby/win32.h line 752..753 tm should be tms
<IceDragon>
dunno how you would reword that to make it look professional
decoponio has quit [Quit: Leaving...]
ambushsabre has joined #ruby
mojjojo has joined #ruby
saarinen has quit [Quit: saarinen]
Brolen has quit [Quit: Brolen]
IceDragon has quit [Read error: No route to host]
fernripcurl has joined #ruby
gja has joined #ruby
dann_ has joined #ruby
benzrf has joined #ruby
<benzrf>
hello rubyists
<benzrf>
hows rubyin
russt has quit [Ping timeout: 245 seconds]
blackmes1 has joined #ruby
skaflem has quit [Quit: Leaving]
<dann_>
silent
<shevy>
damn
<shevy>
benzrf is back :<
<benzrf>
i know
<shevy>
I had high hopes for 2014 to be different ...
<benzrf>
i really suck dont i
<DouweM>
lol shevy
<benzrf>
u will learn haskell & u will like it
<dann_>
ew
<DouweM>
haskell is the shit
<shevy>
I still have not understood what a monad is
<DouweM>
shevy: yeah, I never really got that either
<benzrf>
shevy: it is a method for chaining functions of type (a -> m b)
<shevy>
DouweM sometimes I get the feeling as if everyone explains it differently
<DouweM>
I know what it is technically, I have just never been able to wrap my head around how to use them entirely
<benzrf>
shevy: if you have a function of type (a -> b) and one of type (b -> c), you can just take the output of the first and put it into the second
<benzrf>
shevy: if you have (a -> m b) and (b -> m c), you have a problem
IceDragon has joined #ruby
<dann_>
./ping #haskell
<shevy>
isn't that what haskell does all the type anyway
<shevy>
I mean
<shevy>
all the time anyway
<IceDragon>
O___o someone remind me next time not ot compile ruby using -j8
<shevy>
and all those lambdas
<shevy>
IceDragon! You were gone!
<IceDragon>
My system went to the grave
<IceDragon>
again
<shevy>
why
<IceDragon>
3rd time to day
<IceDragon>
ruby
<shevy>
:(
<shevy>
time for you to go back to the roots
<shevy>
back to perl
<IceDragon>
compiling using -j16, -j8 and -j4 respectively
predator117 has quit [Ping timeout: 240 seconds]
<shevy>
benzrf, did you ever use perl?
<benzrf>
yeah
russt has joined #ruby
<benzrf>
lambdas are considered bad practice most of the time in haskell anyway
<benzrf>
use point-free form or declare your functions
<IceDragon>
okay to be on the safe side: -j1
<IceDragon>
:O nothing can go wrong now
predator117 has joined #ruby
kalamazoo has quit [Remote host closed the connection]
kalamazoo has joined #ruby
<shevy>
you play russian roulette
<dann_>
do any of you know a tool for making simple placeholder images
<dann_>
w/ transparency, of course
ewnd9 has quit [Ping timeout: 272 seconds]
<benzrf>
shevy: lets say you have a bunch of functions ok
<benzrf>
shevy: and each function takes a number and returns either a number or a string saying that there was an error and what the error was, alright?
<benzrf>
like so:
mojjojo has quit [Quit: mojjojo]
<IceDragon>
dann_ nope, but couldn't you just grab a few placeholds from online?
croaky has joined #ruby
<benzrf>
{|a, b| b == 0 ? "DIV BY ZERO" : a / b}
kewubenduben has quit []
<benzrf>
shevy: ya follow
alexherbo2 has quit [Quit: WeeChat 0.4.2]
<dann_>
IceDragon: because it's easier to make them myself, plus it's hard to find good placeholders of the right sizes online
<shevy>
if $stdin.gets.chomp[0,1] == 'y' || 'j' # i.e. first character to be either y or j
<shevy>
benzrf dont really follow, sorry
<shevy>
benzrf my brain is not very awake
<shevy>
it even struggles with things like the above
<Hanmac>
if $stdin.gets.chomp[0,1] =~ /[yj]/
<shevy>
without a regex it is possible too?
<momomomomo>
shevy: Why?
<momomomomo>
shevy: store a variable then do your checks if you want
<Hanmac>
if %w{y j}.include?($stdin.gets.chomp[0,1])
<shevy>
momomomomo yes thank you for answering my question
gja has quit [Quit: This computer has gone to sleep]
<momomomomo>
or that
<momomomomo>
Hanmac: better solution
<dann_>
quick, what's a good name for a class that stores and manages menu items?
<shevy>
MenuHandler
<Hanmac>
shevy: are you sure about [0,1] ? why not [0] ?
<momomomomo>
or just Menu
benzrf has quit [Ping timeout: 260 seconds]
<shevy>
Hanmac I love specifying the positions
shime has joined #ruby
joaoh82 has joined #ruby
<Hanmac>
shevy: what about that? ;D if $stdin.gets.chomp[/\A[yj]/]
<shevy>
nah
<shevy>
I need the cost of the brain parsing processing to be very low
<shevy>
the regex variant is the best here
benzrf has joined #ruby
<benzrf>
yo shevy
<benzrf>
listen up pls
<Hanmac>
hm that regex works also without chomp
mojjojo has quit [Quit: mojjojo]
<benzrf>
shevy: u will never be enlightened sry2say
<shevy>
:(
fernripcurl has left #ruby [#ruby]
<benzrf>
shevy: pls observe the following block
FifthWork has joined #ruby
<benzrf>
{|a, b| b == 0 ? "ERROR THIS IS DIV BY 0" : a / b}
<benzrf>
shevy: simple right
<shevy>
dunno
<shevy>
I don't use ? myself
<benzrf>
ok, replace it with an if statement
<benzrf>
:P
<shevy>
ok
<Hanmac>
shevy prefers ¿
joaoh82 has quit [Read error: Operation timed out]
<benzrf>
shevy: lets say we have a bunch of blocks like this
<dann_>
? conditionals are gr8
mechanicles has quit [Quit: Computer has gone to sleep.]
<benzrf>
shevy: they all take a number or two and return either a string or another number
<benzrf>
ok?
<shevy>
hmmm
<shevy>
why do they take two numbers or return a string
<momomomomo>
dann_: Ternary operators can be OK, but can increase the level of mind-fuck when reading someone elses project
SHyx0rmZ has joined #ruby
<benzrf>
shevy: actually lets say they all take 1 number
<shevy>
ok
<benzrf>
let me edit that block
tt1187 has quit [Ping timeout: 272 seconds]
<benzrf>
{|n| if n == 0 then "DIV BY 0" else 10 / n}
<benzrf>
alright?
<shevy>
yeah
<shevy>
two actions. if, else
<shevy>
simple
<shevy>
good
<shevy>
IceDragon I am even speaking like this in reallife
<benzrf>
the type of this in haskell would be something like 'Float -> Either String Float'
<shevy>
ok so
<shevy>
that is basically an if else there
<dann_>
momomomomo: of course, no more than 2 lines of logical code should be present in a ?
cbetta is now known as cbetta_afk
<shevy>
it is either a String, or a Float
<benzrf>
shevy: now lets say we have a bunch of blocks or methods that take a number and give back a string or a number
<dann_>
atleast that's how i do it
<benzrf>
shevy: yes?
<shevy>
yeah
<benzrf>
lets say we want to pipe them into each other
<benzrf>
except, maybe one of them will return a string, when the next one expects a number
<benzrf>
this is problem
<benzrf>
yes?
<shevy>
yeah
<shevy>
but only because ruby is too dumb to figure it out automatically
<benzrf>
monads are the solution to this problem
<benzrf>
the idea is that
<benzrf>
you make a method called 'bind'
smathieu has quit [Remote host closed the connection]
<benzrf>
bind takes a value that is either a string or a number, and a block that takes a number
<benzrf>
observe:
Hanmac1 has joined #ruby
<benzrf>
class String
<benzrf>
def bind
<benzrf>
self
<benzrf>
end
smathieu has joined #ruby
<benzrf>
end
<benzrf>
class Fixnum
<benzrf>
def bind
<benzrf>
yield self
<benzrf>
end
<benzrf>
end
<benzrf>
now you can do this:
<benzrf>
3.bind {|n| if n > 0 then n - 1 else "ALREADY TOO LOW"}
<benzrf>
and you will get back 2
<benzrf>
but if you do this:
<benzrf>
"ALREADY TOO LOW".bind {|n| if n > 0 then n - 1 else "ALREADY TOO LOW"}
<benzrf>
you will just get back "ALREADY TOO LOW"
<benzrf>
ok?
lowski has quit [Ping timeout: 252 seconds]
Hanmac has quit [Ping timeout: 245 seconds]
specious has quit [Ping timeout: 245 seconds]
skulker has quit [Remote host closed the connection]
mojjojo has joined #ruby
skulker has joined #ruby
aspires has joined #ruby
specious has joined #ruby
<benzrf>
shevy: do u follow
kalamazoo has quit [Remote host closed the connection]
<dann_>
shevy's dead
smathieu has quit [Ping timeout: 272 seconds]
<benzrf>
dang
CaptainJet has joined #ruby
<momomomomo>
benzrf: For what it's worth, nice explanation
psyl0n has quit [Remote host closed the connection]
<momomomomo>
minus the 'benzrf: shevy: u will never be enlightened sry2say'
skulker has quit [Ping timeout: 245 seconds]
<benzrf>
kek
<benzrf>
thanks though
<benzrf>
you know somebody made do-notation for ruby?
Yarou has quit [Quit: This computer has gone to sleep]
skulker has joined #ruby
<momomomomo>
gotta run!
momomomomo has quit [Quit: momomomomo]
smathieu has joined #ruby
skulker has quit [Remote host closed the connection]
FifthWork has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
claymore has quit [Read error: No buffer space available]
claymore has joined #ruby
nerium has joined #ruby
<nerium>
Does anyone know how to read from a stream using event machine ?
<nerium>
or plain ruby
Hanmac1 has quit [Ping timeout: 245 seconds]
<benzrf>
whats event machine
<waxjar>
benzrf: would the null object be a monad?
vertreko has joined #ruby
<benzrf>
hmm?
Hanmac has joined #ruby
<benzrf>
waxjar: to be precise, a monad is a data type along with a definition of bind and return
<benzrf>
where return takes any value and wraps it in a monadic value
dp has joined #ruby
<benzrf>
or rather, a value of type a -> m a
smathieu has quit [Remote host closed the connection]
<dp>
it seems that the YAML gem defaults times without a timezone to UTC. Is there a way to change this?
<benzrf>
monads tend to make more sense in static type systems with ADTs, like hindley-milner
fella6s has joined #ruby
smathieu has joined #ruby
dru has joined #ruby
onewheelskyward_ has joined #ruby
<benzrf>
waxjar: do you know any haskell?
<waxjar>
i've played around with it a little
<benzrf>
ok
<benzrf>
do you know about type constructors/
<waxjar>
wouldn't say i know any, tho :p
<benzrf>
alright...
<benzrf>
do you know java?
jeffreyrichardso has quit [Remote host closed the connection]
<waxjar>
are they the things where you declare your own types?
Guest85414______ has joined #ruby
<benzrf>
ish
terlar_ has joined #ruby
<benzrf>
a type constructor is basically a parameterized type
jmo has joined #ruby
<benzrf>
it's like a function that takes types and returns a type
<benzrf>
for example,
<dann_>
*dims lights*
<benzrf>
data Either a b = Left a | Right b
butblack has joined #ruby
<benzrf>
so a value of type 'Either String Int' could be 'Left "foo"' or 'Right 34'
<waxjar>
ah, yes
bluehavana____ has joined #ruby
jericon_ has joined #ruby
<nerium>
benzrf: google for it
<nerium>
anyone
graft_ has joined #ruby
<nerium>
?
graft_ has quit [Changing host]
graft_ has joined #ruby
gazoombo_ has joined #ruby
<benzrf>
waxjar: anyway
shaman42_ has joined #ruby
moshee has joined #ruby
<benzrf>
waxjar: do you know java :p
im0b__ has joined #ruby
moses_ has joined #ruby
psyl0n has joined #ruby
<waxjar>
nope, just ruby really. not really proficient in any other languages
thedonva1ghn has joined #ruby
smathieu has quit [Ping timeout: 245 seconds]
<benzrf>
alright
[lewellyn] has joined #ruby
<benzrf>
well, haskell has a thing called a 'typeclass'
Landshark753 has quit [Ping timeout: 240 seconds]
huttan_ has joined #ruby
aep_ has joined #ruby
rcs_ has joined #ruby
<benzrf>
a typeclass is basically a list of functions or values whose type contains one blank spot
ckrailo_ has joined #ruby
error404_ has joined #ruby
<benzrf>
then any type can 'instantiate' the typeclass by declaring versions of those functions where the blank spot is replaced with that type
nonconve1gent has joined #ruby
<benzrf>
for example, (+) in haskell is part of the Num typeclass
<benzrf>
Int, Float, and others implement Num
<benzrf>
*instantiate
davorb_ has joined #ruby
derf-- has joined #ruby
jmo has quit [Ping timeout: 260 seconds]
<benzrf>
one good example is Monoid
chuk__ has joined #ruby
<benzrf>
the Monoid typeclass requires you to implement 'mappend', which has the type 'm -> m -> m' where m is the instantiating type
spacemud has quit [Ping timeout: 240 seconds]
<benzrf>
and also 'mempty', which is just 'm'
<dp>
anyone?
andredie` has joined #ruby
<benzrf>
when instantiating monoid, mappend should be commutative and mempty should be identity
Brando753-o_O_o has joined #ruby
Armand has joined #ruby
tris- has joined #ruby
jrd00 has joined #ruby
<benzrf>
when you call mappend, it will act as one of many functions depending on the type you call it with
jsaak_ has joined #ruby
<benzrf>
so I can say:
<benzrf>
mappend [1, 2, 3] [4, 5, 6]
Landshark753 has joined #ruby
<benzrf>
and I will get [1, 2, 3, 4, 5, 6]
Armand is now known as Guest47391
<benzrf>
because list instantiates monoid with (++) as mappend
<benzrf>
oh shit, I meant associative, not commutative
mjburgess has quit [Remote host closed the connection]
<benzrf>
waxjar: did you follow that >_>
<waxjar>
no, haha
<dann_>
how do I add alias methods without rewriting the method
Txandy is now known as Txandy|away
zigidias_ has joined #ruby
mjburgess has joined #ruby
<benzrf>
alright, its not so important
<benzrf>
>_>
<dann_>
like how to_s is the same as to_string
<benzrf>
dann_: use alias
dev1x has quit [*.net *.split]
jibi has quit [*.net *.split]
Brando753 has quit [*.net *.split]
bahar has quit [*.net *.split]
aep has quit [*.net *.split]
mosheee has quit [*.net *.split]
soukihei_ has quit [*.net *.split]
onewheelskyward has quit [*.net *.split]
Guest43128 has quit [*.net *.split]
rcs has quit [*.net *.split]
nonconvergent has quit [*.net *.split]
thedonvaughn has quit [*.net *.split]
andredieb has quit [*.net *.split]
Alina-malina has quit [*.net *.split]
error404 has quit [*.net *.split]
ws2k3 has quit [*.net *.split]
jrd0 has quit [*.net *.split]
mnemon has quit [*.net *.split]
tris has quit [*.net *.split]
jericon has quit [*.net *.split]
Guest85414_____ has quit [*.net *.split]
denysonique has quit [*.net *.split]
Jelco has quit [*.net *.split]
fella5s has quit [*.net *.split]
davorb has quit [*.net *.split]
terlar has quit [*.net *.split]
moses has quit [*.net *.split]
im0b_ has quit [*.net *.split]
bluehavana___ has quit [*.net *.split]
chuk_ has quit [*.net *.split]
gazoombo has quit [*.net *.split]
jsaak has quit [*.net *.split]
brisbin has quit [*.net *.split]
endash has quit [*.net *.split]
zigidias has quit [*.net *.split]
huttan has quit [*.net *.split]
shaman42 has quit [*.net *.split]
lewellyn has quit [*.net *.split]
derf- has quit [*.net *.split]
ckrailo has quit [*.net *.split]
Apocalypse has quit [*.net *.split]
moppersmurf has quit [*.net *.split]
Brando753-o_O_o is now known as Brando753
Guest47391 is now known as Apocalypse
rcs_ is now known as rcs
<waxjar>
alias_method :to_string, :to_s
tris- is now known as tris
<waxjar>
oh yay, netsplit
Apocalypse has quit [Changing host]
Apocalypse has joined #ruby
<dann_>
waxjar: where to_string is the alias of to_s?
chuk__ is now known as chuk_
<waxjar>
yes
bluehavana____ is now known as bluehavana___
Jelco has joined #ruby
Gestahlt_ has joined #ruby
ckrailo_ is now known as ckrailo
jamesaanderson has joined #ruby
<dann_>
can I call alias in a class instance?
<benzrf>
waxjar: anyway, a monad is just a data type + an implementation of bind + an implementation of return
davorb_ is now known as davorb
Yarou has joined #ruby
Yarou has quit [Changing host]
Yarou has joined #ruby
motto has joined #ruby
<benzrf>
bind must be of the type 'm a -> (a -> m b) -> m b'
<benzrf>
and return must be 'a -> m a'
gazoombo_ is now known as gazoombo
im0b__ is now known as im0b_
Alina-malina has joined #ruby
brisbin has joined #ruby
mjburgess` has joined #ruby
bahar has joined #ruby
mjburgess has quit [Disconnected by services]
jibi has joined #ruby
<benzrf>
waxjar: for example, take the type Maybe:
<benzrf>
data Maybe a = Just a | Nothing
mjburgess` is now known as mjburgess
RKornmeyer has joined #ruby
<benzrf>
Maybe Int can be Nothing, or Just 3, or Just 5
Tearan_ has quit [Ping timeout: 240 seconds]
dev1x has joined #ruby
<benzrf>
Maybe String can be Nothing, or Just "foo", or Just "bar"
<benzrf>
waxjar: ok?
spacemud has joined #ruby
denysonique_ has joined #ruby
kiba` has joined #ruby
<waxjar>
what is the m in those type declarations?
<benzrf>
whatever type is instantiating monad
<benzrf>
in this case, Maybe
<benzrf>
so for maybe, bind will be this type:
<benzrf>
Maybe a -> (a -> Maybe b) -> Maybe b
moppersmurf has joined #ruby
<benzrf>
and return will be
<benzrf>
a -> Maybe a
ws2k3 has joined #ruby
diegok has joined #ruby
wmoxam_ has joined #ruby
Sp4rKy has quit [Ping timeout: 246 seconds]
<benzrf>
anyway, the implementation for bind is super simple
Landshark753 has quit [Ping timeout: 240 seconds]
Skelz0r_ has joined #ruby
<benzrf>
bind (Just v) f = f v
<benzrf>
bind Nothing f = Nothing
Hamled|Erp has joined #ruby
<benzrf>
so is return:
<benzrf>
return v = Just v
riking_ has joined #ruby
butblack_ has joined #ruby
moses has joined #ruby
aapzak_ has joined #ruby
matrixise has joined #ruby
phus1on_ has joined #ruby
Jb__ has joined #ruby
magbeat_ has joined #ruby
CptJeanLucPicard has joined #ruby
CptJeanLucPicard has quit [Changing host]
CptJeanLucPicard has joined #ruby
gigetoo_ has joined #ruby
OdNairy_ has joined #ruby
<waxjar>
so f *must* take a v?
brugidou_ has joined #ruby
Sourceless_ has joined #ruby
Authenti1ator has joined #ruby
mnemon has joined #ruby
oz` has joined #ruby
ejnahc_ has joined #ruby
CalimeroTeknik_ has joined #ruby
QKO has joined #ruby
Megtasti_ has joined #ruby
kiki_lam1 has joined #ruby
<benzrf>
bind :: Maybe a -> (a -> Maybe b) -> Maybe brugidou_
<shevy>
dann_ I had to grab something to eat, all of this brain work is making me hungry
<benzrf>
*b
lewellyn has joined #ruby
LostMonk_ has joined #ruby
xiphias has quit [Ping timeout: 240 seconds]
<benzrf>
waxjar: so it takes a Maybe a, and a function from a to Maybe b, and gives you a Maybe b
<waxjar>
ok, i think i understand it so far
<benzrf>
:)
<shevy>
I still don't quite get it... what benzrf described can all be done inside of a method anyway or?
<benzrf>
shevy: yeah
<dann_>
wb shevy
<benzrf>
the key is that now we can chain a bunch of blocks with bind
RoryHugh_ has joined #ruby
<benzrf>
without the block needing to do the checking
<shevy>
dann_ I did not find enough :( I may have to pillage a nearby flat
xiphias has joined #ruby
<benzrf>
the result of each bind can be bound again
<benzrf>
waxjar: in haskell, bind is spelled (>>=)
<benzrf>
so you can do this:
Dreamer3__ has joined #ruby
<pontiki>
you got your haskell in my ruby!
<benzrf>
Just 3 >>= \n -> if n == 0 then Nothing else Just 10 / n
<benzrf>
the \n -> is a lambda
mary5030 has joined #ruby
<benzrf>
like a block in ruby
freerobby has joined #ruby
apeiros_ has joined #ruby
<benzrf>
so if you have a bunch of functions called f, g, and h
epsylon` has joined #ruby
<benzrf>
and they are all of type (a -> Maybe b)
<benzrf>
you can chain them using >>=
<benzrf>
Just 3 >>= f >>= g >>= h
mary5030 has quit [Remote host closed the connection]
Hanmac1 has joined #ruby
<benzrf>
and just like that, youve made a pipeline
mbytes has joined #ruby
preller_ has joined #ruby
kate_r_ has joined #ruby
Landshark753 has joined #ruby
<waxjar>
i see.
[lewellyn] has quit [*.net *.split]
moses_ has quit [*.net *.split]
butblack has quit [*.net *.split]
Vivekananda has quit [*.net *.split]
Megtastique has quit [*.net *.split]
OdNairy has quit [*.net *.split]
apeiros has quit [*.net *.split]
RoryHughes has quit [*.net *.split]
m8 has quit [*.net *.split]
Kiba has quit [*.net *.split]
kate_r has quit [*.net *.split]
ejnahc has quit [*.net *.split]
phus1on has quit [*.net *.split]
LostMonk- has quit [*.net *.split]
gigetoo has quit [*.net *.split]
ArchBeOS-work has quit [*.net *.split]
Dreamer3 has quit [*.net *.split]
Gestahlt has quit [*.net *.split]
wmoxam has quit [*.net *.split]
preller has quit [*.net *.split]
QKO_ has quit [*.net *.split]
Authenticator has quit [*.net *.split]
Sourceless has quit [*.net *.split]
Hamled has quit [*.net *.split]
matrixis1 has quit [*.net *.split]
oz has quit [*.net *.split]
magbeat has quit [*.net *.split]
kiki_lamb has quit [*.net *.split]
ericwood has quit [*.net *.split]
CalimeroTeknik has quit [*.net *.split]
Skelz0r has quit [*.net *.split]
diego_k has quit [*.net *.split]
Riking has quit [*.net *.split]
brugidou has quit [*.net *.split]
aapzak has quit [*.net *.split]
Jb___ has quit [*.net *.split]
epsylon has quit [*.net *.split]
thelamest has quit [*.net *.split]
RubyPanther has quit [*.net *.split]
oz` is now known as oz
butblack_ is now known as butblack
<benzrf>
and thats monads.
<Hanmac1>
Waitress? there is haskell in my ruby soup ...
<benzrf>
hah
<benzrf>
>> "ping"
Hanmac has quit [Ping timeout: 240 seconds]
<waxjar>
i think i still don't quite understand the why, tho :p
<benzrf>
yeah, thats the tricky part
<benzrf>
:D
wildroman2 has quit [Remote host closed the connection]
<benzrf>
it's like objects
<benzrf>
you can understand how classes work without understanding how objects are useful
<benzrf>
and the main way to understand it is to write a lot of code with objects and read some code with objects
ericwood has joined #ruby
<benzrf>
like objects, monads have a couple of different uses whose only bit in common is that they use the bind operator
niklasb has quit [Ping timeout: 240 seconds]
<dann_>
If I have a square named a and another square named b, the coordinates of their upper left corners (in x,y on a rectangular plane of 640x360), and their widths, how can I make a method that checks whether or not they overlap
<benzrf>
waxjar: the way i tend to think of it is...
kiki_lam1 is now known as kiki_lamb
niklasb has joined #ruby
<benzrf>
waxjar: a type that implements monad represents some kind of wrapper, or computation, or container, or otherwise surrounding value
<canton7>
dann_, bit of basic geometry. try drawing overlapping boxes, taking note of where the corners of one lie in relation to the corners of the others
Asher has quit [Quit: Leaving.]
sec^nd has quit [Remote host closed the connection]
<dp>
it seems that the YAML gem defaults times without a timezone to UTC. Is there a way to change this?
wildroman2 has joined #ruby
<benzrf>
waxjar: and monads allow you to have a pipeline of functions where each function modifies the surrounding structure
<benzrf>
or uses it as an environment
Beoran_ has quit [Read error: Connection reset by peer]
<dann_>
canton7: could you explain?
Landshark753 has quit [Ping timeout: 240 seconds]
Mon_Ouie has quit [Ping timeout: 240 seconds]
sec^nd has joined #ruby
thelamest has joined #ruby
<benzrf>
waxjar: in the maybe monad, you're wrapping a straight value with the context of being existant or not
Vivekananda has joined #ruby
Beoran_ has joined #ruby
<benzrf>
waxjar: you can then write a function pipeline where each function has the ability to terminate the pipeline
<benzrf>
waxjar: that is, modify the context of the computatoin
<benzrf>
*computation
<benzrf>
another kind of monad is the Writer monad
<canton7>
dann_, so two boxes overlap if a corner of one lies between both corners of the other, on both axes. try drawing them
Mon_Ouie has joined #ruby
Mon_Ouie has quit [Changing host]
Mon_Ouie has joined #ruby
Landshark753 has joined #ruby
<benzrf>
waxjar: where the monadic value is a pair of whatever 'a' is, and a string or other logging value
<benzrf>
(v, log) >>= f = let (newV, newLog) = f v in (newV, log ++ newLog)
<benzrf>
waxjar: that is, it replaces the value with the function's resulting value, and appends the function's log to the existing log
Txandy|away is now known as Txandy
<benzrf>
waxjar: so if you have f, g, and h as (a -> (b, String)), you can chain them like:
<benzrf>
(1, "") >>= f >>= g >>= h
<benzrf>
waxjar: and the output will be the pipeline result and the logs joined together
<dann_>
canton7: this is much simpler than what I had in mind. thank you
<benzrf>
waxjar: again, you have a regular function pipeline, but each function has the ability to modify or add to the structure that exists during the pipeline
<benzrf>
waxjar: this is why monads arent as useful in imperative languages; a lot of what they let you do can be solved by mutation of an implicit parameter like an ivar
mojjojo has quit [Quit: mojjojo]
jamesaanderson has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<benzrf>
waxjar: the other major usefulness of monads is for letting the function control the flow of the pipeline, like in Maybe, and that can often be done with things like exceptions
SkramX has quit [Quit: Page closed]
pedrocr has joined #ruby
carraroj has quit [Quit: Konversation terminated!]
<benzrf>
waxjar: finally, monads can save on boilerplate code for wrapping things into and out of types, but in a dynamically typed language like ruby that's not even an issue
<benzrf>
*by moving the boilerplate into the binding operator
<pedrocr>
has anyone ever seen test/unit return "Finished tests in 0.000614s, 1628.5451 tests/s, 1628.5451 assertions/s."
centipedefarmer has joined #ruby
<benzrf>
waxjar: so ruby really has very little use for monads
kate_r_ has quit [Quit: My MacBook Air has gone to sleep. ZZZzzz…]
<pedrocr>
I have a single test and a single "assert(true)"
jmimi has joined #ruby
<pedrocr>
very odd
<waxjar>
benzrf: i thought i got it but now im not so sure :P
baroquebobcat has joined #ruby
flame_ has joined #ruby
<dp>
pontiki: sadly, I'm doing YAML.load() on a series of data; so it's not just a single line
<benzrf>
oh boy
<benzrf>
sorry @_@
Landshark753 has quit [Ping timeout: 240 seconds]
<benzrf>
im bad at keeping myself from going into infodump mode
<dp>
actually; it looks like it's part of the YAML spec
<dp>
to convert it to UTC
<waxjar>
haha. thx though
<waxjar>
i am now one step closer to being enlightened :D
<benzrf>
actually the 'wrapping into and out of types' bit is more of a Functor thing
<benzrf>
waxjar: woot!
jamesaxl has joined #ruby
<benzrf>
just for the record, instances of Functor implement 'fmap', where:
<pontiki>
dp: what does that have to do with it?
<benzrf>
fmap :: (a -> b) -> f a -> f b
<dp>
which is annoying, because it seems there's no way to specify a TZ without using a time offset; terrible for Daylight Saving Time
<benzrf>
waxjar: that is to say, it takes a function that takes a regular value and applies it to a wrapped value
joaoh82 has joined #ruby
<benzrf>
waxjar: so for lists, fmap is just map
<benzrf>
waxjar: for Maybe, it looks like:
<benzrf>
fmap f (Just v) = Just (f v)
mbytes has quit [Ping timeout: 272 seconds]
<benzrf>
fmap f Nothing = Nothing
Landshark753 has joined #ruby
<waxjar>
now that makes sense :P
<benzrf>
waxjar: yes, functors are closer to what youre used to
<benzrf>
waxjar: by definition, every instance of monad is also an instance of Functor
<benzrf>
because fmap can be implemented in terms of >>= if you want to
<benzrf>
Functor is a superclass of Monad
<benzrf>
or it would be
<benzrf>
if the designers hadnt messed up
mojjojo has joined #ruby
FifthWork has joined #ruby
<benzrf>
mojjojo: are you missing an o
endash has joined #ruby
vlad_starkov has quit [Remote host closed the connection]
wallerdev has joined #ruby
<mojjojo>
benzrf: why do you think so
vlad_starkov has joined #ruby
freerobby has quit [Quit: Leaving.]
<benzrf>
mojo jojo?
joaoh82 has quit [Ping timeout: 252 seconds]
smathieu has joined #ruby
<benzrf>
waxjar: i think of fmap as taking off the wrapper, applying the function, then putting the wrapper back on
<benzrf>
waxjar: whereas bind takes off the wrapper, applies the function, then merges the wrapper with the new one
freerobby has joined #ruby
<benzrf>
because applying the function gives a new value AND a new wrapper
lewellyn has quit [Ping timeout: 240 seconds]
<waxjar>
ah, i see.
lewellyn has joined #ruby
shaman42_ has quit [Ping timeout: 240 seconds]
shaman42 has joined #ruby
<benzrf>
except it's waaay more complicated than that
<benzrf>
but that's sort of the general idea
byprdct has joined #ruby
<riking_>
hey benzrf
<benzrf>
it's a useful way to think about it until you get a better mental model
madb055 has quit [Read error: Connection reset by peer]
centipedefarmer has joined #ruby
jmimi has quit [Ping timeout: 272 seconds]
<shevy>
can you still code in python too?
<benzrf>
kinda
<shevy>
hehe
<shevy>
it's a new year man
<shevy>
you are good to forget :)
<benzrf>
b-but my lucrative python contracts!
workmad3 has joined #ruby
figgleberry has joined #ruby
<apeiros_>
benzrf: didn't you say you were underage?
apeiros_ is now known as apeiros
<benzrf>
yea
croaky has joined #ruby
<apeiros>
I thought you couldn't have contracts when underage :)
<emocakes>
why not apeiros?
<benzrf>
i was joking, of course
<emocakes>
its not like, if when given a contract online, people find out how old you are
<benzrf>
i think i mightve written a program for 2$ once, idr
<emocakes>
are you indian?
<benzrf>
although!
<benzrf>
i did make like 10$ over a few months from adf.ly on my minecraft mod!
<emocakes>
/pakistani/ bengali / same thing
<benzrf>
that was fun
<benzrf>
no im murican
<emocakes>
oh, sorry to hear that benzrf
<apeiros>
emocakes: mind to tell me how you sign an online contract?
<emocakes>
take a screenshot and use mspaint apeiros
<emocakes>
then send the screenshot back
<emocakes>
signed
<emocakes>
or, if you are advanced, sign it with your pgp key
<apeiros>
yeah, I can see how you do your business :-p
<emocakes>
;)
CpuID has joined #ruby
jamesaanderson has joined #ruby
<shevy>
this is how business is done in nigeria!
jamesaanderson has quit [Max SendQ exceeded]
<shevy>
of course the swiss can not be tricked as easy as that :<
jamesaanderson has joined #ruby
kc8qvp_ has joined #ruby
skulker has joined #ruby
<kc8qvp_>
Who thought having gem run sudo behind my back would be a good idea, and how do I tell it to never do that?
kitak has joined #ruby
joriso has joined #ruby
doodlehaus has joined #ruby
ambushsabre has quit [Quit: rip]
robert_ has joined #ruby
johnyboy6000 has joined #ruby
<apeiros>
mv sudo sduo
butblack has quit [Quit: butblack]
skulker has quit [Remote host closed the connection]
<apeiros>
there you go :) no software will use sudo behind your back anymore
<shevy>
kill sudo
<shevy>
only noobs need it anyway
estebistec has joined #ruby
ambushsabre has joined #ruby
kirun has quit [Quit: Client exiting]
zz_CripperZ is now known as CripperZ
laphlaw has joined #ruby
AlSquire has quit [Quit: This computer has gone to sleep]
<kc8qvp_>
apeiros: vaguely helpful, and what I figured I will have to do because gem is retarded
<kc8qvp_>
shevy: n00b.
<shevy>
kc8qvp_ I dont use sudo. go learn you some programming then you won't have to remain incompetent forever
CripperZ is now known as N00D
<kc8qvp_>
haha, "ok".
smathieu has joined #ruby
s_kilk has joined #ruby
olivier_bK has quit [Ping timeout: 246 seconds]
dr_bob has left #ruby [#ruby]
smathieu has quit [Read error: Connection reset by peer]
smathieu has joined #ruby
kitak has quit [Remote host closed the connection]
doodlehaus has quit [Remote host closed the connection]
doodlehaus has joined #ruby
smathieu_ has joined #ruby
Killa has joined #ruby
fantazo has quit [Ping timeout: 272 seconds]
wildroman2 has quit [Remote host closed the connection]
smathieu has quit [Ping timeout: 245 seconds]
<kc8qvp_>
ok, I don't know why I'm bothering with this, but out of curiosity
<kc8qvp_>
shevy: what exactly is your issue with sudo?
doodlehaus has quit [Remote host closed the connection]
<shevy>
kc8qvp_ I have no issue with it
s_kilk has quit [Quit: Leaving]
_honning_ has joined #ruby
threesome has quit [Read error: Operation timed out]
<kc8qvp_>
ok, so how do you get from "sudo user" -> "n00b" ?
smathieu_ has quit [Ping timeout: 245 seconds]
<shevy>
because only noobs need it
<kc8qvp_>
explain.
<shevy>
why would you need sudo kc8qvp_ ?
OdNairy has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<kc8qvp_>
people don't need sudo, it's a convenience.
<kc8qvp_>
I've been a systems administrator for a long time, and I can tell you that when used the way they typically are, sudo and su are equivalent, and much more convenient than requiring explicit root logins. and when you need more flexibility, sudo has it available whereas the other two methods do not.
ambushsabre has quit [Quit: rip]
Jetchisel has joined #ruby
<apeiros>
sudo can improve security
<apeiros>
you can limit the powers of sudo and in such a way enable a user to do specific tasks
shime has joined #ruby
<kc8qvp_>
apeiros: exactly. but you do have to be really careful when using it that way.
alexherbo2 has quit [Quit: WeeChat 0.4.3-dev]
<kc8qvp_>
it's easy for a n00b to give away root w/ sudo w/o intended to.
<apeiros>
kc8qvp_: I too think sudo isn't a n00b tool
cj3kim has joined #ruby
<emocakes>
i just do sudo -s
fightback has joined #ruby
<apeiros>
I do think too much software wants to be installed with sudo
cbetta_afk is now known as cbetta
OdNairy has joined #ruby
<emocakes>
blame system file permissions then apeiros
<dann_>
guys
<apeiros>
and I think the way permissions currently work is utterly broken and a horrible mess. but that's another story :)
<kc8qvp_>
I'm offended that I ran `gem install --user-install` as my user, and ended up with gems installed in /var/lib also.
<kc8qvp_>
that's just... wtf.
jmimi1 has quit [Ping timeout: 240 seconds]
<kc8qvp_>
apeiros: nah; unix permissions are grand.
<kc8qvp_>
apeiros: you have ACLs when you really ned to do something unix perms can't, but you'll notice they're rarely used
<kc8qvp_>
Those who fail to understand Unix are doomed to re-invent it, poorly. --Henry Spencer
<dann_>
i have a method defined as jump(thing, high = 2, fast = 3).
<apeiros>
kc8qvp_: "please install this with sudo" - hurray, lets give essentially untrusted software access to everything.
<havenwood>
you should write any software you use yourself, and be sure to do a polygraph on yourself from time to time to make sure you're not being malicious
<kc8qvp_>
read all the code, and hope you don't have an inception-style compiler hack
<apeiros>
Killa: you read the source code of every installer?
flame_ has joined #ruby
<kc8qvp_>
havenwood: exactly
<apeiros>
Killa: excuse me if I don't believe you and call that bollocks
<dann_>
ohh yeah hash args are a good idea
<dann_>
thanks
mklappstuhl has joined #ruby
<apeiros>
Killa: and even if you did, it's still bollocks. utterly unusable modus operandi.
figgleberry has quit [Ping timeout: 252 seconds]
kep has quit [Quit: WeeChat 0.4.2]
workmad3 has quit [Ping timeout: 240 seconds]
lagweezle has joined #ruby
lagweezle has quit [Client Quit]
Astralum has quit [Ping timeout: 240 seconds]
<alexherbo2>
Hey guys, how can i make my script supports regexp multiple line?