« Back to channel list

#ruby - 15 June 2014

« Back 1 day Forward 1 day »
[00:00:11] shevy: grabe use ruby-gnome
[00:01:45] grabe: is shoes usable?
[00:02:20] grabe: I need a simple GUI for now, a couple of buttons, text edits, a table
[00:03:14] grabe: example code on their page looks awesome
[00:09:05] shevy: shoes requires java
[00:52:16] shiggityjoe: One quick self-promotional spammy announcement, if I may???
[00:52:56] shiggityjoe: Just pushed new version of RubyRetriever (1.2.2)! It???s my first rubygem but it???s making headway, this release includes some bug fixes and code improvements. Finally getting close to having zero Rubocop offenses! Check out the code on github - contributions & forks are welcome! http://github.com/joenorton/rubyretriever
[00:53:43] shiggityjoe: That is all. :)
[00:55:10] shiggityjoe: I should???ve said what the hell it is my gem does??? It???s a command-line crawler and scraper.
[00:56:45] benzrf: shiggityjoe: README.md;
[00:56:49] benzrf: s/page's/pages/
[00:58:17] shiggityjoe: benzrf: thanks, fixed.
[00:59:27] benzrf: here let me just fork and proofread this for u
[01:00:07] shiggityjoe: I swear I???m an english speaker, just not the most detail oriented :(
[01:11:21] benzrf: shiggityjoe: https://github.com/joenorton/rubyretriever/pull/13
[01:12:33] shiggityjoe: benzrf: Thanks man, merged!
[01:23:09] shevy: shiggityjoe don't worry man
[01:23:37] shiggityjoe: dont worry be happy?
[01:23:45] shevy: nono I mean
[01:23:52] shevy: because benzrf corrected you
[01:23:55] shevy: a few hours ago:
[01:23:56] shevy: <benzrf> more like YOURE foolish (oh snap)
[01:25:25] ponga: what ide do you use for ruby shevy
[01:26:03] shevy: ponga just an editor, bluefish 1.0.7 still
[01:26:29] shevy: reason is that it's the most comfortable editor so far I have found for modifying and reading text files
[01:26:44] shevy: sublime looks fancier
[01:26:48] shevy: geany is more feature rich
[01:26:52] benzrf: sublie is bulb shit
[01:26:54] shevy: but they all don't "feel" the same :(
[01:26:57] benzrf: vim \m/ \m/
[01:27:27] foobarbaz_: why use vim instead of an ide like ruby mine?
[01:31:24] pontiki: i have been poking at light table, which feels very sublime-like as well
[01:31:24] shiggityjoe: i use sublime, just starte using the rubocop plugin and it???s awesome
[01:31:29] shiggityjoe: highlights offenses and whatnot
[01:31:37] pontiki: but i still use emacs as i'm so imprinted on it
[01:32:05] pontiki: i like using rubymine and webstorm sometimes
[01:45:03] csmrfx: foobarbaz_: if you need to ask, prepare for another 2 years of IDE foolery
[01:46:44] ponga: csmrfx can you elaborate what IDE foolery is to me, a noob please sir
[01:48:10] ponga: shevy can you tell me what ide foolery is
[01:48:45] csmrfx: well its a whole lot of things depending on the situation, but things like not loading instantly, not using less that 1% of cpu, not being totally stable, not having totally customizable keyshorts and interface...
[01:50:39] pontiki: gods, please stop begging
[01:50:42] foobarbaz_: csmrfx: But it comes with a lot of benefits
[01:50:44] pontiki: people have opinions
[01:50:54] foobarbaz_: Such as smart code completion, code analysis + inspections
[01:50:58] foobarbaz_: refactoring tools
[01:51:02] pontiki: IDEs can be helpful, they can get in your way
[01:51:13] foobarbaz_: Being able to easily run your applications from an IDE, and debug within an IDE is nice
[01:51:33] foobarbaz_: Without having to put in silly things like binding.pry/puts, or whatever you're using to debug
[01:51:44] pontiki: when you have a huge codebase that you suddenly have to learn all of, including all the friggin gems that you've never heard of, and it's full of crap, RubyMine is a pretty nice tool to go code spelunking in
[01:55:44] foobarbaz_: code navigation <3
[01:55:51] foobarbaz_: Love going from definitions to their actual files
[01:56:49] pontiki: also p.funny to your cow-orkers when your wtfpm goes over 1
[01:57:15] foobarbaz_: wtf per minute?
[02:22:08] foobarbaz_: pontiki: why would an IDE icnrease your wtfs per minute?
[02:23:11] Nilium: foobarbaz_: Increased exposure and ease of navigation means you spot the WTFs quicker
[02:25:11] foobarbaz_: I thought you were suggesting using an IDE makes you write inferior code or something perhaps, was rather confused! :)
[02:33:36] pontiki: foobarbaz_: because it gets me through the code faster to discover them :)
[02:33:58] pontiki: nono -- *inherited* codebase
[02:38:07] shevy: inherited wtfs?
[02:38:40] csmrfx: if you dont know how to use grep, you gonna slow
[02:39:27] csmrfx: if "fastness" is your argument, you have little to no reason not to use vim
[02:48:50] RubyPanther: vim requires mode switching, emacs is faster
[04:31:56] pipework: The keyboard combinations of emacs hurt my hands.
[04:37:54] pontiki: i've heard that from many people
[04:40:45] pvb: try vim
[04:41:34] pontiki: i think pipework has probably long since sorted their editing needs
[04:42:24] pontiki: still, emacs: C-x M-c M-butterfly...
[04:52:06] pvb: I have long been using a MS Word. Almost completely meets my needs. Can select the color of the word. Very useful.
[04:52:47] pvb: Hands also ok.
[04:55:53] pontiki: not so useful for editing plain text
[04:55:59] pontiki: but it's possible
[05:00:23] pvb: You think it's a bad joke? I really did. I was just starting to learn programming. And I decided that a Word is better Notepad.
[05:00:53] pvb: It's ok. No one believes me. :)
[05:02:53] pontiki: i believe you...
[05:04:30] LadyRainicorn: ACTION wants to make a gem that lets .doc files be executed as Ruby.
[05:04:58] pontiki: it would need to be a wrapper/filter
[05:05:34] pontiki: but should be doable with Win32OLE stuff, i think? i don't know for sure, but seems plausable
[05:06:04] pontiki: i'm assuming if you save as text it's all okay
[05:06:26] pontiki: it's been decades since i've used Word
[05:06:54] pontiki: YOU CAN'T TAKE MY LaTeX FROM ME!
[05:07:42] pontiki: altho about 98% of documentation i write now is in markdown
[05:10:15] pvb: markdaun works properly with formulas?
[05:10:28] pontiki: but there are addons that will
[05:11:50] pvb: It's okay, I don??t need formulas anyway.
[05:12:05] pontiki: http://johnmacfarlane.net/pandoc/README.html#math
[05:16:47] pvb: wow, pandoc support docx!
[05:17:44] pvb: oh, but only write
[05:47:04] isomorphismes: this proxy puzzle in the koan is pretty mind bending
[05:47:14] isomorphismes: i feel confused but also like i may learn a lot from it
[05:48:59] isomorphismes: I'm betting the answer is in the previous puzzle, the about_message_passing.
[05:56:29] csmrfx: RubyPanther: emacs is faster than vim, if you are an octopus
[05:56:43] csmrfx: ACTION throws fuel into fire
[05:56:49] pontiki: or are polydactyl
[05:57:09] csmrfx: vimmers only pentadactyl
[05:57:34] pontiki: octopi are monodactyl
[06:00:07] RubyPanther: csmrfx: I've been using emacs for 15 years and I've only learned 5 or 10 chords, none of them use two hands
[06:01:07] Hanmac: csmrfx: in "the 13 1/2 lifes of captain bluebear" there is a professor with 7 brains ;P (one big one inside his head, four on the outside, one is there where the milz should be and no one knows where the last one is) ... i think even he might have problems with emacs ;P
[06:01:09] csmrfx: sooo, IDEs are for one arm bandits?
[06:02:56] pontiki: keep droppin them nickels in
[06:12:00] pipework: RubyPanther: I learned guitar right up to chords because I really disliked it.
[06:18:24] csmrfx: pro tip: you dont learn guitar chords
[06:19:26] csmrfx: you learn the method of building chords - same doesn't probably work with emacs and one must memorize every command, like with any program
[06:23:09] isomorphismes: LadyRainicorn: couldnt you use catdoc | ruby
[06:23:15] isomorphismes: LadyRainicorn: couldnt you use catdoc | ruby ?
[06:23:25] pontiki: say it again
[06:23:44] LadyRainicorn: couldn't I use catdoc | ruby?
[06:23:53] LadyRainicorn: Possibly. How reliable is catdoc?
[06:24:12] pontiki: how would that work for requiring doc files?
[06:24:17] isomorphismes: LadyRainicorn: well, imperfect. So let's say catdoc | sed -s sedfile.tested | ruby
[06:24:55] isomorphismes: I don't actually have any .doc or .docx files to test it on atm
[06:25:34] isomorphismes: oh wait yes i do - well the one i just tested it on looks fine. but I'm pretty sure I've seen something imperfect before.
[06:25:47] isomorphismes: Still -- if you wrote the .doc yourself - which is what I assume you meant--
[06:27:04] Nilium: .. Why in god's name is anyone trying to require a .doc file?
[06:27:54] pontiki: h8rs gonna h9
[06:28:06] Nilium: ACTION h9s
[06:28:26] pontiki: ACTION pets Nilium "it's okay"
[08:57:57] Cope: how can I create a method that will instantiate a class? I'm trying to make a class generator that uses define_method to dynamically generate methods; but I want to be able to call a method with a name of class, and the method and args I want to use in define_method
[08:58:36] RubyPanther: Cope: Class.new
[08:58:40] Hanmac1: Cope show us your wanted input and what you want as output
[09:02:13] Cope: sure - sec
[09:07:47] apeiros: that's a long second :D
[09:08:33] Cope: https://gist.github.com/anonymous/9d3c8dfe4274d26d63d1
[09:08:51] Cope: kettle was boiling!
[09:10:10] apeiros: yell at it!
[09:12:39] apeiros: I don't see how `@@thingy = Struct.new(:key_one, :key_two)` in an instance method is a good idea ever.
[09:12:47] apeiros: you create a new *identical* struct on every call
[09:12:50] Cope: so basically I have a need for a whole bunch of methods which will instantiate a class, generate and return a struct. And I have a bunch of them, and writing them manually each time is feeling very un-dry.
[09:12:51] apeiros: create it once, reuse it
[09:13:36] apeiros: anyway, lets give you parts of it: Object.const_set('MyThing', klass) # <-- name
[09:13:53] apeiros: Class.new do define_method(method_name) do ??? end; end # <-- class
[09:14:22] apeiros: oh, `@@ethingy.new(key_one = 'stuff', key_two = 'more_stuff')` makes no sense either. you assign to local variables??? why?
[09:14:46] apeiros: did you mean `@@ethingy.new('stuff', 'more_stuff')`? and where do 'stuff' and 'more stuff' come from?
[09:15:08] apeiros: also where does @@ethingy come from? (the struct is @@thingy, not @@ethingy???)
[09:15:25] Cope: oh that's just a typo
[09:15:40] Cope: the key_one = stuff populates the struct...
[09:15:59] Cope: at least - it works... maybe for reasons I don't understand
[09:16:15] Cope: so if I'm getting this all arse about face, i'd be delighted to fix it
[09:16:37] apeiros: Cope: it "works" because assignments return the value you assign
[09:16:47] apeiros: but the assignment part itself is utterly pointless
[09:16:59] Cope: oh - so side-effect
[09:17:05] apeiros: so just leave it away
[09:18:07] apeiros: >> puts(vaaaariable = "hello world!")
[09:18:07] eval-in: apeiros => hello world! ... (https://eval.in/163042)
[09:19:01] apeiros: aha, I see where stuff and morestuff come from???
[09:19:26] Cope: apeiros: i thought i needed to give the name of the keys/members of the struct when populating it
[09:19:37] apeiros: I find it a bit odd to create not just a new struct class, but also a new instance from it, all the time identical. seems to me like you'd only need to create it once and return it on every call (maybe dup it)
[09:20:07] apeiros: Cope: well, no, you don't :) and if, then it wouldn't work that way ;-)
[09:20:42] Cope: https://gist.github.com/anonymous/fae2335b2f74f61e5ee7 <-- this is the intended behaviour... but if it's a pile of poo, I'd be very happy to refactor it... if i unedrstand what I'm getting wrong
[09:21:41] joshua___: ey, any recommendations using Ruby with MsSQL? I know its a horrible thing to do but $dayjob :(
[09:21:42] Cope: and the meta step is i have quite a few of these now, so i'd like to be able to generate them dynamically, but perhaps first we should fix the underlying implementation :)
[09:22:12] RubyPanther: joshua___: ODBC
[09:22:42] jhass: Cope: you're trying to generalize it/simplify your problem. If you want to know if the solution you think you need is the right one for your problem, tell us your actual problem.
[09:23:05] Cope: jhass: I thought I had... sorry:
[09:23:13] Cope: so basically I have a need for a whole bunch of methods which will instantiate a class, generate and return a struct. And I have a bunch of them, and writing them manually each time is feeling very un-dry.
[09:23:14] joshua___: RubyPanther: I'm looking at ODBC and ruby DBI gem at the moment but unsure what my ODBC connection string is..am not a windows guy..
[09:23:45] Cope: jhass: ie i want to be able to call a method and get a struct back, prepopulated with data
[09:23:46] RubyPanther: joshua___: ruby-odbc + tiny_tds + activerecord-sqlserver-adapter is my setup
[09:23:51] jhass: Cope: without the words stuff, thing, bunch, foo, bar
[09:24:00] Cope: oh right sorry
[09:24:05] jhass: actual problem, not implementation you think you need
[09:24:12] Cope: yeah... fair point
[09:24:13] RubyPanther: joshua___: using DBI the string should be the same as whatever it is for Perl DBI
[09:24:58] RubyPanther: but AR hides the db-specific nastiness
[09:25:06] Cope: so: I want to be able to simulate getting data from an API which returns deeply nested structs; i need to be able to mock that data in offline situations
[09:25:14] joshua___: Hmm, I don't even know what ODBC is..
[09:26:10] Cope: jhass: so i have a bunch of these classes and helper methods which return the structs i would get if i had network access
[09:26:17] joshua___: RubyPanther: do you have an example script where you are connecting to a MSSQL db that I could have a look at?
[09:27:27] jhass: Cope: do you need the class names to match?
[09:28:03] Cope: jhass: no, the class is just an implementation - i couldn't return structs without embedding them in a class
[09:28:12] jhass: I'd investigate building nested OpenStructs from a nested hash then
[09:28:58] jhass: API = build_nested_ostruct_from a: {b: 'c'}, d: {'e'}
[09:29:10] jhass: API.a.b #=> 'c'
[09:31:29] Cope: ACTION thinks about how that would work
[09:33:34] jhass: simple: http://cloud.aeshna.de/u/mrzyx/screenshots/screenshot_20140615_113327.png
[09:35:12] Cope: ACTION has a play
[09:36:57] RubyPanther: joshua___: https://gist.github.com/rubypanther/670081512f45b4a285f6
[09:38:36] Cope: jhass: hmm... very pleasing :)
[09:38:58] RubyPanther: joshua___: it only needs activerecord but I pasted a Gemfile version that pulls in all of rails.
[09:39:06] apeiros: jhass: do ostructs still leak memory like a sieve?
[09:39:16] jhass: I didn't check
[09:39:33] apeiros: ACTION hopes that 3 major releases later this is no longer an issue???
[09:39:35] joshua___: RubyPanther: a nice dude, thanks alot. Am just looking @ http://anthonylewis.com/2011/03/08/exploring-odbc-with-ruby-dbi/
[09:40:25] Cope: jhass: i think this doesn't work with struct, but does with ostruct; but the bits i care about operate the same anyway, so ostructs are fine
[09:40:49] Cope: ie the api returns structs not ostructs, but all i ever do is get values off them, so it doesn't matter
[09:41:16] jhass: yeah the power of ruby, stuff only needs to behave the same in the areas you use
[09:41:44] Cope: jhass: thanks a whole ton - this is a way way way cleaner and easier approach
[09:43:29] RubyPanther: joshua___: The way I'm doing it with tinytds you don't need ODBC on the server, you can just connect normally. But more importantly it provides a modern ORM layer.
[09:44:01] joshua___: ok that sounds nicer. I have no idea WTF ODBC shit it.
[09:44:51] joshua___: RubyPanther: can you make remote connections using that or has to be run from the ms sql box?
[09:50:15] RubyPanther: joshua___: Both, with that setup I can use the same script, no modification, from a remote linux box over the vpn. I left out the /etc/freetds.conf file, but that maps the windows network name you use in odbc.ini to the IP address of the server
[09:51:09] RubyPanther: joshua___: Then when I'm on the windows server box, tinytds uses the normal windows ODBC and looks for the same DSN
[09:51:36] joshua___: ah, what would the /etc/freetds.con look like? kk, trying to connect to MSQSQL server from osx over VPN
[09:51:38] RubyPanther: so the odbc config is different, but to the script that is all transparent
[09:52:42] RubyPanther: joshua___: http://www.freetds.org/userguide/freetdsconf.htm#FREETDSCONFFORMAT
[09:53:21] RubyPanther: in my gist it would be [WINDOWSNETWORKNAMEOFSERVER] ...
[09:56:10] joshua___: great thanks RubyPanther
[10:16:48] apeiros: haha, siri: "what can I do for you?" - "stop getting on my nerves!" - "OK" *starts musik*
[10:17:20] certainty: siri is suspiciously close to "sir"
[10:17:31] csmrfx: I cant stand the idea
[10:18:05] apeiros: I like the idea. but I haven't used siri once yet. mostly trust issues :)
[10:18:13] csmrfx: wasnt the talking paperclip enyf for you
[10:20:30] certainty: you can trust siri. At least as much as you can trust apple in general
[10:21:12] apeiros: certainty: more like, I rely on it, let it enter my appointments, and it gets one wrong
[10:21:45] certainty: ah ok, got that wrong then. Still my point is relevant :)
[10:21:55] certainty: basically you tell apple your appointments then
[10:22:06] apeiros: you do without siri too
[10:22:17] certainty: not that i'm aware of
[10:22:19] apeiros: also moot point if you use google calendar
[10:22:24] apeiros: icloud/sync
[10:22:30] certainty: don't use any of these
[10:23:02] certainty: just org-mode it is and sometimes even pen and paper :)
[10:23:30] apeiros: good. I hate those idiots who go all raving about "you tell company X all your secrets!" and go on to tell company Y all their secrets.
[10:23:33] RubyPanther: I trust Clippy more than whatever these newfangled Jeeves are called
[10:23:41] certainty: i can't tell what hardware implants my box has so i might be telling someone, as the org file lies around in plain text but ok
[10:24:05] RubyPanther: Clippy is Special, but his simplicity keeps him out of trouble
[10:24:37] apeiros: certainty: well, I'm more talking about willingly/knowingly (albeit probably unaware)
[10:25:34] certainty: apeiros: yeah, that's what i don't do. I trust none of these mega corps, actually i don't even trust minor companies. I don't see a good reason for me to give someone else that data
[10:26:45] apeiros: good for you. I don't trust them either, but I'm too lazy to get an alternative running :-/
[10:26:47] certainty: RubyPanther: is clippy a service or a tool?
[10:27:03] RubyPanther: a tool, mostly
[10:27:13] RubyPanther: I think it could access a "knowledge database"
[10:27:57] certainty: ah Clippy is that paperclip in MS Office?
[10:30:04] certainty: apeiros: too bad :( i'm not in the mood to evangelize, but that's really too bad
[10:30:55] apeiros: certainty: If I remember, and I change my laziness, I might get back at you :)
[10:31:13] apeiros: you have your own mail server? how about sms/whatsapp? ical servers?
[10:34:20] certainty: apeiros: i use the mailserver at our company. I don't use whatsapp or anything like that. I do use text-secure to send sms. Redphone to do my calls on the android, which i don't move away from my home. I don't carry a phone or anything
[10:34:35] certainty: luckily i don't need it, that might be totally different for others
[10:34:39] apeiros: text-secure?
[10:34:50] certainty: a secure messaging service to send sms
[10:34:59] apeiros: relies on the other side also having it?
[10:34:59] certainty: in uses otr messaging
[10:35:32] apeiros: my main issue with security is that it almost always is the protagonist of practicality
[10:35:36] apeiros: *antagonist
[10:35:49] certainty: that's not only your issue
[10:36:06] apeiros: it wouldn't always have to be :-/
[10:36:35] apeiros: I mean a lot of security could be done very transparently and with little effort for the user
[10:36:35] certainty: yepp, though text-secure really is a good step in that direction. It is so called one-click cryptography
[10:36:41] certainty: it is really easy to get running
[10:37:47] certainty: apeiros: i totally agree. But to me it accures that not implementing security measures is the problem but the lack of awareness that there is something to protect
[10:38:27] apeiros: most people you talk about it go like "but I have nothing to hide anyway!"
[10:38:29] certainty: if that can be achieved then we can attack it from both sides, 1) making security easier to apply 2) taking slight inconvenience to increase security
[10:38:41] apeiros: (??????????????????? ?????????
[10:38:44] certainty: yeah which is total nonsense
[10:39:19] apeiros: and even if they have nothing to hide yet (say because they're not ashamed of their vids where they dance drunken on the table), it may well be used against them any time later
[10:39:40] Hanmac1: the most funny part is how politicans react when they hear that they are observed too ... ;P
[10:39:58] apeiros: "oh so you want to become mayor? what will you do for me for not *accidentally* passing those embarrassing vids to the press?"
[10:40:04] certainty: as we can currently experience in germany
[10:40:12] apeiros: Hanmac1: yes
[10:40:35] apeiros: I wished groups like anonymous would dig out all the dirt on those politicians who overtly are pro surveillance
[10:41:03] apeiros: I'd love to see how much they'd like that
[10:41:07] certainty: doesn't need to be $anonymous, we have the power to do so
[10:41:15] certainty: we've just forgotten (or were never aware)
[10:41:30] apeiros: also the argument "but the state is *the good guy*!" is bullpoo. even if we assume that *today* they indeed are - who's to say what happens with the information tomorrow?
[10:41:51] certainty: yes that's a crucial point
[10:42:04] Hanmac: apeiros: i saw something funny like that in a cartoon show ... someone did make a trojan/virus that automaticlly hacks all pcs and provide all hidden info to all others ... they called it "electronical haircut" (to make everyone equal)
[10:42:18] apeiros: and I'd rather vehemently argue that most states aren't "the good guy" even today.
[10:42:36] apeiros: (also the whole "states/companies ain't people" thing)
[10:42:53] certainty: yeah that reasoning is totally flawed
[10:43:47] apeiros: I mean, even if *most* people in the state apparatus are good guys - how many rotten apples does it need for the whole well intended endeavor to become utterly dangerous?
[10:44:07] certainty: i'm very concerned about the revelations regarding hardware that is used to surveille. There is very little we can do here
[10:44:25] apeiros: open source hardware
[10:44:28] apeiros: is my hope at least
[10:44:33] katlogic: apeiros: game theory 101. however this goes for a society as a whole, state is just cluster.
[10:44:48] apeiros: we're nowhere near a usable state there yet, but hope dies last
[10:44:58] certainty: apeiros: yeah we need free hardware, but hardware is significantly harder to understand
[10:45:15] apeiros: certainty: I don't think the "understand" part is the issue
[10:45:23] apeiros: it's far more expensive to build
[10:45:31] apeiros: with software, it's easy. everybody can do it.
[10:45:36] apeiros: all you need is a computer
[10:45:40] apeiros: hardware? yeah, have fun
[10:45:47] certainty: yeah that's true
[10:45:51] apeiros: but 3d printers and the like can and will change this
[10:46:57] apeiros: (as said, we're nowhere near usable yet - but I can imagine where it could be headed and that gives hope)
[10:48:08] apeiros: one question would be - if you can't manufacture the chips themselves - can you build reliable/useful hardware where you treat all chips as adversarial?
[10:48:22] certainty: problematic
[10:49:00] certainty: the attack surface is rather huge
[10:49:12] certainty: that's what concerns me
[10:49:33] certainty: not only direct/indirect surveillence, but also breaking what we currently use to "counter" surveillance
[10:51:30] apeiros: enough depressing ideas and thoughts for today
[10:51:45] apeiros: ACTION goes back to clone starbase orion (itself being master of orion clone)
[10:54:21] certainty: have fun :)
[10:56:59] apeiros: of course!
[10:57:06] apeiros: now implementing research
[10:57:24] apeiros: after that, all that is left for a single player no enemy game is putting all the pieces together
[10:58:26] apeiros: after that, army, then AI, and then polish and improve
[11:00:52] apeiros: if I should indeed reach polish phase, I'll reach out for others to help :)
[11:05:46] Hanmac: apeiros: i found this comic (ps might be scary but also funny) https://i.chzbgr.com/maxW500/8216819456/h3357B044/
[11:07:54] certainty: Hanmac: lol
[11:09:11] Hanmac: certainty: did you hear about the last EU voting? "DIE PARTEI" got one seat in the EU ;D
[11:10:15] certainty: Hanmac: no i haven't yet :|
[11:10:50] Hanmac: now they want to rotate this seat with different members (and each member is getting money because he was a politican) they said they want to milk the EU like a south state like greece ;P
[11:12:51] Hanmac: certainty: did you know fefe ? https://blog.fefe.de/
[11:13:09] certainty: yeah i "know" him
[11:15:06] Hanmac: also funny some recent news: the pope does not want to drive in this pulletproof mobil anymore because he says he cant greet the other people and he says he hasnt much to lose ;P ( imo thats the best pope i could remember )
[11:19:25] certainty: Hanmac: i'm curious what will happen during the "Durchwink-Wochen", i didn't yet look at bundestag.de but i meant to. I expect some laws to be passed
[11:20:31] Hanmac: certainty: thats why i hate soccer and worldCup ... they use it to make evil things in the covernments
[11:21:06] certainty: that's one reason to hate it, also this particular worldcup. I have some friends in brasil which reported totally crazy things
[11:22:21] Hanmac: certainty: did you hear the germans got her own trainings hotel in a forest that has "Naturschutzgebiet"? (i know you are german too thats why i can say the german word before gooling the english one)
[11:24:56] certainty: Hanmac: no didn't read that yet. :/
[11:27:33] cloudgeek: Ubuntu 12.04 LTS, ruby 2.1.2 , system excute_command is not working for excute a ruby file, method code is below, http://paste.ubuntu.com/7647508/
[11:31:01] certainty: cloudgeek: ruby not in path?
[11:32:04] cloudgeek: certainty: did I need give ,
[11:32:04] cloudgeek: system 'env/ruby /home/sanjusir/vikas.rb/
[11:33:17] cloudgeek: certainty: I using this in Rails , during creation of request, same time I want to run a script too..
[11:34:40] cloudgeek: certainty: yes, ruby is not in path , that is not part of my path folder to script
[11:36:42] cloudgeek: exec('/home/sanjusir/vikas.rb')
[11:43:39] apeiros: aaaahaha, I found a case where I *need* a ; in js
[11:59:07] derHerzerzog: problem with TCPServer class...normally, according to docs, it can be initialized with a port only
[11:59:16] derHerzerzog: (which worked in my case just a couple of days ago)
[11:59:51] derHerzerzog: not suddenly, TCPServer.new 3000 raises an exception (cannot convert nil to string), as if a host were required
[12:02:24] derHerzerzog: now suddenly*
[12:03:09] Hanmac1: derHerzerzog: ruby version and show us a gist of yourcode?
[12:03:53] Noob101: What does <<EOS; <letters>: EOS mean?
[12:04:23] DouweM: that's heredoc string notation
[12:04:30] DouweM: http://blog.jayfields.com/2006/12/ruby-multiline-strings-here-doc-or.html
[12:04:33] derHerzerzog: https://gist.github.com/alexJunger/b354a504fe8b2632f089
[12:05:06] Noob101: DouweM: Can you please explain it anyone could understand, like what does that mean?
[12:05:19] Noob101: DouweM: What's so special about that?
[12:05:23] DouweM: Noob101: check that blogpost, it describes it. it's a way to make multiline strings
[12:06:50] derHerzerzog: sry for plaintext highlighting Hanmac1, gist won't save with Ruby selected...
[12:08:15] Hanmac1: hmmm works for me (ruby 2.2.0dev) ... but dont have 2.1 there for testing
[12:09:02] derHerzerzog: friend of mine has 2.1.1 and it works for him too
[12:09:05] Noob101: DouweM: My question wasn't answered. I see that there are different ways of making strings using EOS but what is the purpose of it, why was it created?
[12:09:13] Noob101: DouweM: That was the question I asked.
[12:09:16] DouweM: Noob101: multiline strings
[12:09:23] derHerzerzog: strange thing is, that it did work for me as well just a couple of days ago...nothing changed about the code
[12:09:29] certainty: derHerzerzog: works here with 2.1.0p0
[12:09:45] apeiros: aaaah, 3 screens are so much better than 2 (even 1 is better than 2 :-S)
[12:09:51] Noob101: DouweM: Right but you can use %( ) right? So if you could do that then why would ruby have that?
[12:10:11] Noob101: DouweM: Right but you can use %( ) right? So if you could do that then why would ruby have that?
[12:10:43] certainty: derHerzerzog: what do you mean by "does not work"?
[12:10:53] certainty: nvm, it raises an exception
[12:11:17] DouweM: Noob101: not needing to escape quotes or the string delimiter I guess? A lot of languages have heredoc syntax, I guess whether to include it in Ruby was mostly by default
[12:11:31] certainty: derHerzerzog: server already
[12:11:32] DouweM: Noob101: not a conscious decision. but as I say, it's useful because you don't need to escape.
[12:11:47] certainty: derHerzerzog: the server is already running. That's a misleading message
[12:12:30] certainty: or any other server binding to that port
[12:12:36] derHerzerzog: don't know what you mean, certainty - that message doesn't come from my code
[12:13:10] certainty: derHerzerzog: you have another server running on that port. You can reproduce the error if you try to start your server twice on different consoles
[12:13:35] derHerzerzog: i know that you can't bind to the same port twice, but that's ot my problem
[12:13:50] certainty: derHerzerzog: i think it is
[12:13:50] Noob101: DouweM: What is heredoc?
[12:14:13] DouweM: Noob101: that's the name for that EOS notation (EOS can be anything, btw). see https://en.wikipedia.org/wiki/Here_document
[12:14:51] derHerzerzog: Trying to start server ... server.rb:7:in `initialize': no implicit conversion of nil into String (TypeError)
[12:15:06] certainty: derHerzerzog: I agree that the message "server.rb:7:in `initialize': no implicit conversion of nil into String (TypeError)" is misleading but it happens when you have another server binding on that port
[12:15:11] certainty: that's what i'm trying to say
[12:15:15] derHerzerzog: oh now i get it
[12:16:28] derHerzerzog: so you were right indeed...
[12:16:47] derHerzerzog: ;) it seems like RubyMine didn't close some processes
[12:17:22] derHerzerzog: not too used to using rubymine for anything other than rails, and you hardly ever do such stuff in rails ^^
[12:17:42] Noob101: DouweM: I'll read about it in a book or something, thanks though for the help.
[12:18:21] certainty: derHerzerzog: yeah, i frequently have to debug such things, so it accured rather quickly to me. So I tried it out
[12:18:37] certainty: it's still a bad message though
[12:20:44] derHerzerzog: it certainly is..i would have tried different signatures of that initialize for the rest of the day :)
[12:21:30] derHerzerzog: is rubymine's debugger worth it at all?
[12:23:14] certainty: derHerzerzog: given that there are debuggers that work on the console just fine, i doubt it. I haven't used rubymine though.
[12:26:19] nwkr: derHerzerzog: it works
[12:26:55] derHerzerzog: yea nwkr i found the problem already, port was in use and the exception message was somewhat cryptic..thx though
[12:27:10] Noob101: In irb, can I clear the screen. If so, how?
[12:28:48] csmrfx: exit<enter> clear<enter> irb<enter>
[12:29:09] apeiros: Noob101: depends on your terminal emulation
[12:29:15] apeiros: cmd-K for me
[12:29:47] apeiros: (and no need to leave irb or pry for that either)
[12:30:18] Noob101: apeiros: what the hell does that mean, "terminal emulation" I hear emulation a lot when it comes to games but I don't know what it means.
[12:30:33] apeiros: Noob101: that thing in which you run irb is a terminal emulation
[12:30:56] apeiros: Terminal.app for mac, run.exe in windows and no idea what process in *nix
[12:31:57] csmrfx: ??s it correct to say: the window that hosts the shell
[12:32:04] csmrfx: who knows
[12:32:19] apeiros: well, the window belongs to a process, an application
[12:32:31] Noob101: apeiros: Wow interesting, I use windows so now what?
[12:32:47] apeiros: Noob101: I'm not a windows user. no idea how to clear the screen in run.exe
[12:33:07] apeiros: I'm pretty sure google has answers, though. also checking its menus might already get you there.
[12:33:11] Noob101: apeiros: So is run.exe like a program or something?
[12:33:19] apeiros: errr, yes?
[12:33:29] apeiros: every .exe on win is a program
[12:33:38] DouweM: Noob101: chances are it's the program you're running irb from
[12:33:55] apeiros: and run.exe is slightly special in that it is used to run other programs within it
[12:33:58] DouweM: like, the terminal emulator. black background, white text, command prompt and stuff?
[12:34:06] mordof1: cls is clear screen, if that's what you're wondering
[12:34:08] DouweM: that's run.exe
[12:34:33] apeiros: mordof1: cls is a command, though, and requires you to exit the current program (or well, `cls` might work too from irb)
[12:34:43] Noob101: apeiros: correct^
[12:34:45] DouweM: apeiros: I doubt that'll work
[12:34:53] DouweM: apeiros: but what do I know, don't use windows either
[12:34:54] Noob101: I don't think it does.
[12:34:55] mordof1: apeiros: if you're in irb - then it's not a command prompt command you're looking for either
[12:35:07] apeiros: puts `clear` # <-- works in pry on mac
[12:35:17] DouweM: apeiros: nice, I had no idea
[12:35:32] apeiros: the clear command simply emits the escape sequence
[12:35:47] apeiros: I'd assume the same applies for cls on win
[12:35:48] DouweM: apeiros: ah, right...
[12:35:49] mordof1: haha, that's so windows for you
[12:35:51] Noob101: How do I clear my screen in irb for windows. :(
[12:36:05] DouweM: Noob101: tried puts `cls` ?
[12:36:09] Noob101: ok thanks.
[12:36:18] apeiros: i.e., I could also: print "\e[H\e[2J"; $stdout.flush
[12:36:29] DouweM: apeiros: right
[12:36:30] Noob101: Hm, this is odd.
[12:36:40] Noob101: It has the male sign
[12:36:48] Noob101: What does that mean? .3.
[12:36:49] mordof1: Noob101: i know right, lol.. so bizarre
[12:37:03] Noob101: mordof1: ikr lol???
[12:37:15] apeiros: ??? <-- this?
[12:37:15] DouweM: Noob101: your name is extremely apt, by the way :P
[12:37:20] mordof1: apeiros: that's female
[12:37:23] Noob101: Is a male watching me .3.?
[12:37:23] mordof1: apeiros: the other one
[12:37:29] apeiros: mordof1: dude, no :)
[12:37:31] DouweM: mordof1: that's definitely male
[12:37:35] apeiros: ??? <-- this is female
[12:37:36] Noob101: Oh loool, I mean male.
[12:37:44] Noob101: I mean female
[12:37:45] mordof1: apeiros: then we're wrong and it's showing the female sign
[12:37:48] Noob101: Yeah that sign.
[12:37:55] Noob101: apeiros: Why do I see that sign.
[12:37:57] apeiros: and where is it showing that?
[12:38:04] mordof1: after a puts `cls`
[12:38:18] apeiros: rofl, what? pics or it didn't happen!
[12:38:20] DouweM: mordof1: what the.
[12:38:25] Noob101: under the i in irb after I typed the command puts `cls`
[12:38:41] DouweM: Noob101: screenshot!
[12:38:50] apeiros: but my answer to "why does this happen?!?" is simply: lolwindows, <nelson>haaha</nelson>
[12:38:52] mordof1: http://cl.ly/image/1w0R1w0U0547,
[12:38:56] mordof1: http://cl.ly/image/1w0R1w0U0547
[12:39:00] mordof1: screenshot
[12:39:05] apeiros: limechat was clever enough
[12:39:20] DouweM: it would be so windows if the female sign were the clear sequence
[12:39:28] Noob101: DouweM: Is there a website that can have me do quick screenshot without screenshotting, saving it in paint, etc?
[12:39:39] apeiros: with system, you'd use single or double quotes btw., not backticks
[12:39:41] mordof1: Noob101: what windows version?
[12:39:50] certainty: you made my day Noob101
[12:39:50] DouweM: if `cls` returns \f, why does puts \f become the female sign :/
[12:39:55] DouweM: that makes no sense at all
[12:39:56] mordof1: apeiros: ahhh that works, lol
[12:40:00] mordof1: system 'cls' ftw
[12:40:09] apeiros: rendinkulous
[12:40:14] apeiros: windows ftl :-p
[12:40:17] DouweM: Noob101: a website can't make a screenshot. only your system can
[12:40:22] mordof1: right, because `cls` would evaluate and pass the result to system
[12:40:25] mordof1: apeiros: good catch
[12:40:32] mordof1: Noob101: system 'cls' is your solution
[12:40:45] apeiros: and yeah, 3 screens rock. definitively better than 1, and much better than 2
[12:41:02] certainty: or just emit enough "\n" until all the text above vanishes
[12:41:03] certainty: ACTION hides
[12:41:09] apeiros: now I only need to decide whether I want a 4k screen for the center screen :D
[12:41:18] DouweM: apeiros: I;m jealous
[12:41:21] mordof1: apeiros: i rarely find a good use for a third
[12:41:24] mordof1: so i've stuck with 2
[12:41:33] apeiros: DouweM: why? they're dirt cheap nowadays
[12:41:39] Noob101: mordof1: 8.1
[12:41:45] apeiros: mordof1: with 2 I was unhappy.
[12:41:51] apeiros: I need a center where I don't bend my neck
[12:42:05] mordof1: Noob101: snipping tool. comes with windows
[12:42:10] DouweM: apeiros: yeah I know. I'm currently on a 27" Cinema Display and my 15" MBP on a stand. I should definitely get an extra display
[12:42:22] mordof1: apeiros: ah.. i usually just face one directly, and have the other as a secondary
[12:42:30] apeiros: DouweM: well, that's the sad bit about this setup - retina display is closed :(
[12:42:47] DouweM: apeiros: heh
[12:42:53] apeiros: mordof1: ok, I guess that'd have worked better. I hate the lack of symmetry, though :D
[12:42:55] DouweM: what size are the screens and how are they arranged?
[12:43:12] certainty: http://www.fxrebategurus.com/img/8Monitor__trading_station.jpg <- my setup
[12:43:14] apeiros: DouweM: 1920x1200 center, 1920x1080 left and right
[12:43:15] certainty: just kidding
[12:43:23] mordof1: apeiros: to each their own, really. i'm a web dev person - so it's less common for me to use the second monitor
[12:43:36] DouweM: certainty: beautiful
[12:43:40] apeiros: center is my old screen. now I can't play games anymore because it doesn't have 2 ins
[12:43:57] DouweM: apeiros: what's your workflow as in what do you use each screen for?
[12:44:04] certainty: don't know how to open multiple buffers in VIM so i just bought multiple monitors to open 8 files at once in 8 differen VIMs
[12:44:19] nwkr: i have four screens
[12:44:19] apeiros: center is work, right is work-related (or video), left is chat & diversion
[12:44:33] mordof1: that's why i don't have 3
[12:44:35] nwkr: three on bottom, and one center up
[12:44:35] DouweM: nwkr: not bad
[12:44:37] certainty: apeiros: you are aware of virtual workspaces? :p
[12:44:39] mordof1: i got TOO distracted by having it visible
[12:44:43] apeiros: certainty: doesn't work for me
[12:44:51] nwkr: four in the row didnt work at all
[12:44:57] certainty: that said, i really only use two screens. (at work) could probably use a third
[12:44:57] apeiros: mordof1: with less, I just have diversion in front and don't work at all ;-)
[12:45:12] mordof1: apeiros: that's all a matter of self discipline :p lol
[12:45:23] mordof1: but i suppose that's one way of dealing with it
[12:45:24] nwkr: i had to turn around every time, so i mounted it on top
[12:45:26] apeiros: mordof1: see, I don't *have* self discipline ;-D
[12:45:29] apeiros: at home, that is
[12:45:42] mordof1: ACTION is getting better at that
[12:45:52] apeiros: see, I don't even want to get better at that
[12:45:57] apeiros: home is where I just want to be happy
[12:46:00] mordof1: apeiros: i stopped watching all tv, anime, and gaming somewhat recently.. and my capability to focus and be productive has gone through the roof
[12:46:06] apeiros: and if being a nomad brain makes me happy, so be it
[12:46:26] apeiros: yeah, I stopped watching tv too. antenna cable is plugged out
[12:46:29] DouweM: honestly I have no idea what I'd use 2 large displays for, let alone 4
[12:46:35] apeiros: but I watch SC2 matches occasionally :)
[12:46:49] mordof1: apeiros: ah - that's fine. gotta watch something every now and then when you just need to check out
[12:47:01] mordof1: apeiros: i just kept doing all-day marathons and killing my spare time xD
[12:47:03] apeiros: the hold back for a 4k center btw. is that my current laptop would only manage 30Hz on it :(
[12:47:19] mordof1: apeiros: ooh - ouch
[12:47:23] mordof1: that'd be yucky
[12:47:44] apeiros: mordof1: yeah. with tv, I came home, turned tv on, time passed, "wtf, it's midnight again?", bed. sleep. wake up. go to work. repeat.
[12:47:53] mordof1: ACTION nods
[12:47:53] apeiros: and that sucked. just wasted time. I didn't even enjoy watching tv.
[12:47:58] apeiros: most shows are just plain shit.
[12:47:59] mordof1: yeah exactly
[12:48:19] mordof1: ACTION wanders off momentarily
[12:48:27] apeiros: now I buy dvds (sadly no streaming in CH) and watch them whenever I want and only what I really want
[12:50:13] apeiros: ACTION also needs to make up his mind on how to let the carpenter build his new desk :)
[12:50:28] apeiros: definitively needs more space than my current one :-/
[12:50:49] certainty: apeiros: it's good that you buy them and don't stream them. :) You don't want *them* to know which movies you watch when.
[12:51:10] apeiros: certainty: haha :D
[12:51:19] apeiros: the dvd player has ethernet!
[12:51:24] apeiros: (not really???)
[12:51:34] apeiros: the tv otoh does :-|
[12:51:47] certainty: also +1 for not watching too much tv. TV as a medium for advertising has always been a tool. The entire program exists just because they want to generate audience that they can show their ads. It's all about behvaior control. That's the business model
[12:51:56] apeiros: anyway??? must. implement. research. now. :)
[12:52:22] apeiros: tech-tree is already done
[12:52:58] certainty: apeiros: what about the AI? It's multiplayer so i expect some form of multi-agent system?
[12:53:12] DouweM: certainty: do networks like hbo where you need a seperate subscription run ads? I'm not from the US so I have no idea
[12:53:23] apeiros: certainty: AI will come later. I first want single-player without enemy to work.
[12:53:28] mordof1: apeiros: oooh what's being made?
[12:53:37] apeiros: certainty: after that, yes, sure. each enemy player is his own agent.
[12:53:49] certainty: DouweM: i'm neither, plus i don't use those, so i can't tell. But i would be surprised if they didn't
[12:53:50] apeiros: I'll probably only implement a minimal (stupid) AI
[12:54:00] apeiros: mordof1: starbase orion clone (which is a master of orion clone itself)
[12:54:10] certainty: apeiros: cool let me know once you're there. I'm interested in that part
[12:54:20] DouweM: certainty: yeah, probablu
[12:54:26] apeiros: certainty: sure. once I got a minimally working game I'll search for contributors
[12:54:45] apeiros: but given my lack of self discipline, I'm not sure I'll get there. which is why I'm not looking for contributors now :D
[12:55:30] certainty: hehe i know what you mean
[12:55:43] apeiros: but so far, things come along neatly.
[12:57:04] certainty: also with wrt to streaming, one should think about whether he/she wants to own something as opposed to just use something
[12:57:28] certainty: anyway gotta go out now. The wheather is awesome
[13:08:53] apeiros: aahaha, nice. open the JS console when on developer.mozilla.org
[13:12:51] mordof1: apeiros: yep, it's awesome
[13:29:50] shevy: LadyRainicorn are you m-ing again!
[13:30:29] apeiros: Lady-mmmmm-Rainicorn
[13:31:40] jhass: shhh, you'll wake benzrf|offline
[13:32:09] apeiros: monad, lalala, moooohonad, lalllalaaa, monad, oh monady, monada, tralllala
[13:32:24] apeiros: ACTION grins & runs
[13:35:02] shevy: leave your gonads alone!
[13:53:17] diegoviola: i'm using savon to interact with some web service (SOAP) which is giving me XML back, how do i parse the XML?
[13:53:25] diegoviola: savon uses nokogiri i believe
[13:54:10] jhass: Nokogiri::XML(xml)
[13:54:40] diegoviola: http://dpaste.com/0X2SSMQ
[13:54:45] diegoviola: that's what i'm getting from the server
[13:55:14] jhass: looks more like some csv or something
[13:55:45] apeiros: psv (pipe separated values) :D
[13:55:58] jhass: apeiros: having your funny day? :P
[13:56:07] apeiros: every day is a funny day!
[13:56:23] diegoviola: how do i parse that crap
[13:56:36] apeiros: with CSV and a custom col_sep
[13:57:00] apeiros: alternatively: split
[13:58:26] apeiros: (only if it isn't proper csv with a custom separator)
[13:58:39] apeiros: though, custom separator somewhat indicates "we don't give a shit on proper csv"
[14:24:49] shevy: hey mordof_home
[14:24:56] shevy: you have quieted down immensely
[14:25:15] shevy: diegoviola CSV is everywhere!
[14:25:27] diegoviola: http://dpaste.com/1QJWZGM
[14:25:28] diegoviola: is that CSV?
[14:25:45] shevy: I think so, with the delimiter char '|'
[14:25:55] shevy: originally the default one should have been ',' but I guess people love |
[14:26:09] diegoviola: i wonder why they choose | instead of just m
[14:26:30] shevy: in bioinformatics, atomic coordinates are also stored in such files, although I think they use the \t character as separator for the position of every atom in a biomolecule
[14:26:35] jhass: because, you know, who would use | in normal texts
[14:26:49] jhass: it's a total cryptic special character no one ever uses!
[14:26:50] shevy: I do for beautiful ascii tables!
[14:26:52] jhass: it's perfect!
[14:27:06] shevy: | Cost | Product |
[14:27:09] shevy: ------------------------
[14:27:30] shevy: why is it that | seems to be even longer than two --
[14:27:33] mordof_home: shevy: yep, i got very busy, heh
[14:28:07] diegoviola: shevy: how would you parse this?
[14:28:13] diegoviola: or anyone else
[14:28:17] diegoviola: i'm confused
[14:28:22] shevy: diegoviola really only via default ways, such as already exist in ruby
[14:28:30] diegoviola: but which way
[14:28:35] shevy: CSV.foreach or CSV.read
[14:28:39] diegoviola: there are lots of ways i think
[14:28:44] shevy: CSV.read then perhaps
[14:28:55] jhass: shevy: en.wikipedia.org/wiki/Box-drawing_character
[14:29:00] shevy: I don't like to have to iterate when .foreach is used, I like to separate activities into smaller ones
[14:29:20] shevy: oh good old DOS days
[14:33:43] shevy: if you feel like wanting to learn more (hehehe), this article seems ok: http://www.sitepoint.com/guide-ruby-csv-library-part/
[14:33:57] shevy: it's better than the official documentation :P
[14:38:50] shevy: I feel like dancing \o/
[14:56:46] shevy: when I do "gem uninstall foobar", and that project had a file, in bin/foobar
[14:56:58] shevy: will the uninstall remove /usr/bin/foobar too? (if it was a global installation)
[14:57:11] shevy: I tested it, uninstalled the gem, and /usr/bin/foobar is still existing :(
[15:38:37] apeiros: man, I spend more time monkey patching sense into javascript than actually working on my "real" code
[15:39:47] apeiros: ACTION even has a function monkeyPatch :D
[15:40:25] apeiros: (takes an object with functions and a target objects, adds all the functions to the target object with enumerable: false)
[15:40:44] banister: apeiros i thought u were a coffeescript girl
[15:41:03] apeiros: this girl doesn't yet enjoy coffee
[16:58:08] foobarbaz_: /join #ruboto
[18:31:21] hello_nate: http://puu.sh/9uTia/6b5ad9a4e3.png
[18:31:31] hello_nate: in a curl like that, what does the -u -d represent?
[18:31:50] hello_nate: can't find any documentation if someone would be nice enough to point me to it
[18:33:20] apeiros: hello_nate: this is #ruby, not #bash or #curl. `man curl` will tell you more.
[18:40:56] Hanmac: shevy: https://31.media.tumblr.com/c694f27d674dbb4fefb992e2966e1c50/tumblr_ml4hypwhxM1s5rsdao1_500.jpg
[18:43:25] apeiros: Hanmac: that's a problem which will solve itself! :)
[18:50:25] Hanmac: shevy & apeiros: https://i.chzbgr.com/maxW500/8219176960/h7321AD7A/
[18:52:33] apeiros: also next time label such stuff as NSFW
[18:54:51] Hanmac: at the source it was label'd as "Assplosion!" ;P
[19:01:12] AlexRussia: shevy: i need in your help!
[19:01:15] AlexRussia: and other too
[19:02:47] AlexRussia: https://github.com/ruby/ruby/blob/1aa54bebaf274bc08e72f9ad3854c7ad592c344a/lib/rubygems/installer.rb#L600
[19:02:52] AlexRussia: what mean this string?
[19:03:14] AlexRussia: every string
[19:03:26] havenwood: AlexRussia: http://www.ruby-doc.org/core-2.1.2/String.html#method-i-gsub
[19:03:33] AlexRussia: File::SEPARATOR, File::ALT_SEPARATOR
[19:03:35] AlexRussia: what mean is?
[19:03:41] akerl: Those are variables
[19:03:44] jhass: >> File::SEPARATOR
[19:03:44] eval-in: jhass => "/" (https://eval.in/163164)
[19:03:47] jhass: constants rather
[19:03:52] havenwood: AlexRussia: Constants that are preset by default.
[19:04:08] havenwood: >> [File::SEPARATOR, File::ALT_SEPARATOR]
[19:04:10] eval-in: havenwood => ["/", nil] (https://eval.in/163165)
[19:04:17] AlexRussia: ah, i understand
[19:04:51] AlexRussia: >> File::ALT_SEPARATOR
[19:04:51] eval-in: AlexRussia => nil (https://eval.in/163166)
[19:05:10] AlexRussia: jhass: File::ALT_SEPARATOR is for windows?
[19:05:20] jhass: I don't use windows
[19:05:43] apeiros: on windows, ALT_SEPARATOR is afaik set to "\\"
[19:06:05] apeiros: things like File.join still use SEPARATOR, though
[19:08:20] AlexRussia: jhass: how to translate path /home/alx/somestuff to ~/somestuff?
[19:08:51] jhass: .sub(ENV['HOME'], '~') ?
[19:10:49] apeiros: my take: .sub(/\A#{Regexp.escape(ENV['HOME'])\//, '~')
[19:10:59] apeiros: oh, actually -\/
[19:12:34] AlexRussia: apeiros: where -\/ ?
[19:12:52] apeiros: in the regex
[19:13:00] apeiros: .sub(/\A#{Regexp.escape(ENV['HOME'])/, '~') # with \/ removed
[19:13:11] apeiros: -\/ <-- "minus \/"
[19:13:22] apeiros: or "without \/"
[19:13:37] AlexRussia: apeiros: anyway dont work
[19:13:53] apeiros: I really want a bot which punches peoples face for saying "doesn't work"
[19:14:38] jhass: apeiros: send a PR to helpa?
[19:16:58] apeiros: just asked radar this over in #ror:
[19:17:09] apeiros: ?? Radar: ping. can we please add a listener to helpa, checking for /(?:doesn't|does not|don't|dont) work|not working/, responding with: '(???`????)=???)`????) <nick> - "does not work is not a usable problem description"'
[19:17:32] AlexRussia: someone know, what branch ruby lastest on github?
[19:17:50] jhass: trunk I guess?
[19:19:58] mr_foobar: Hi, can someone help me get aruba to work? When I use a step like 'Then the output should contain...' it always says 'expected "" to include "Desired output"'... why isn't it reading from STDOUT correctly?
[19:20:05] mr_foobar: the output definitely exists
[19:21:19] AlexRussia: 'or' and 'and' is eqi '||' and '&&'?
[19:21:38] akerl: They have different precedence
[19:22:11] AlexRussia: apeiros: you mean word version and symbolic version?
[19:22:43] apeiros: yes, akerl means word vs. symbols
[19:22:52] akerl: Um... no I don't?
[19:23:02] apeiros: also they have different relative precedence
[19:23:08] akerl: I mean that when evaluating, ruby gives different precedence in order of operations
[19:23:33] apeiros: `or` and `||` have a different precedence
[19:23:54] apeiros: also, `||` and `&&` have different precedence, but `or` and `and` have the same precedence
[19:24:07] apeiros: AlexRussia: if you know, then you know they're not equivalent
[19:24:19] AlexRussia: apeiros: i about '`or` and `||` have a different precedence'
[19:24:26] akerl: So what is your question?
[19:27:24] AlexRussia: akerl: i tell before
[19:27:39] akerl: We answered the question you asked, and you said "I know"
[19:28:35] AlexRussia: akerl: no, i said it to `or` and `||` have a different precedence
[19:28:46] akerl: So what is your question?
[19:28:57] AlexRussia: akerl: i give reply.
[19:29:59] apeiros: ACTION admires akerl's endurance
[19:30:07] AlexRussia: okay,i have question: what code style using in Ruby source code?
[19:30:20] akerl: https://github.com/bbatsov/ruby-style-guide
[19:30:27] apeiros: ACTION ponders answering by posting his rubocop config
[19:33:02] AlexRussia: and https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L609
[19:33:31] AlexRussia: ruby support ternary operator?
[19:34:00] jhass: yes it does, but that isn't ternary
[19:34:00] AlexRussia: (true or false)?(if true):(if false)
[19:34:15] AlexRussia: jhass: what you mean?
[19:34:26] akerl: The line you linked is not a ternary operation
[19:35:28] AlexRussia: akerl: i modify argument #include? to ternary
[19:35:45] AlexRussia: akerl: i need in it for fix small bug ;)
[19:35:52] akerl: How long does this have to keep going before we declare the turing test complete?
[19:36:13] AlexRussia: akerl: a big time?
[19:42:37] AlexRussia: .include? can be called with array?
[19:42:59] akerl: AlexRussia: have you considered the docs? or the koans?
[19:43:10] AlexRussia: akerl: i use ri ;)
[19:43:41] apeiros: AlexRussia: then use it. it's documented.
[19:45:08] AlexRussia: hm, that bad
[19:46:11] certainty: also you can just try it in the REPL
[19:50:11] AlexRussia: certainty: REPL?
[19:52:37] AlexRussia: seen string 609 https://gist.github.com/62d2b54e3d9f1870efbd
[19:52:53] DouweM: read/eval/print/loop. irb is a Ruby repl
[19:53:09] akerl: AlexRussia: 609 is a number, not a string
[19:53:18] AlexRussia: akerl: is a number of string
[19:53:21] DouweM: I think he means to refer to that line
[19:53:27] AlexRussia: DouweM: yes :D
[19:53:31] akerl: AlexRussia: You're gonna want to read the docs
[19:53:41] AlexRussia: DouweM: just in russian more using string to defend that :(
[19:53:56] akerl: Because we aren't here to spoonfeed you?
[19:53:59] DouweM: AlexRussia: wth are you trying to do with line 609?
[19:54:35] AlexRussia: DouweM: i've just tell you check my changes....you can get diff or something....
[19:54:52] AlexRussia: DouweM: with this fille(origin) https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L609
[19:55:09] akerl: Why are you trying to change that?
[19:55:23] DouweM: AlexRussia: right, I see your chance. what are you trying to accomplish?
[19:55:23] AlexRussia: akerl: that just annoying me.
[19:55:27] apeiros: AlexRussia: did you try to run it?
[19:55:37] apeiros: because I'm quite certain that `split!` will simply raise.
[19:55:38] DouweM: AlexRussia: you're gonna need to be more specific
[19:55:50] DouweM: yeah as apeiros said, string doesn't have #split!
[19:55:54] AlexRussia: akerl: gem didn't seen bin dir in path is that written with '~/'
[19:56:03] akerl: AlexRussia: So fix your config
[19:56:28] akerl: You haven't changed any code functionality
[19:56:34] akerl: At least not in any way that matters
[19:56:39] seitensei: Is YARV still in Ruby after 1.9?
[19:56:53] AlexRussia: akerl: but that bug software
[19:56:58] akerl: ? What bug?
[19:57:02] AlexRussia: akerl: i dont want change my PATH
[19:57:31] AlexRussia: DouweM: em....
[19:57:41] DouweM: AlexRussia: What bug? And how is your change supposed to fix it?
[19:57:45] akerl: Then just suffer through the warning? running custom rubygems to avoid a warning because you don't want to properly configure the software seems like a bad idea
[19:58:28] akerl: It's not a bug, it's performing a sanity check and finding your system's sanity to be lacking
[19:58:40] dllama: Hey guys. I'm really stuck with using savon as a soap client and am really hoping someone can point me in the right direction. for reasons that I've yet to understand, not all the params i'm executing actually get passed to the endpoint, only teh last value of my nested fields. https://gist.github.com/mvoloz/a427a048b58c6366e949
[19:59:04] AlexRussia: akerl: so lol
[19:59:25] AlexRussia: akerl: anyway i can send PR and maintainers can close that :D
[19:59:36] DouweM: AlexRussia: +1 on akerl, but I'm still curious why you made theh change you made
[19:59:51] akerl: The change you made is effectively a noop
[20:00:06] DouweM: and a raising one because there's no such thing as String#split!
[20:00:08] DouweM: AlexRussia: typo
[20:00:15] apeiros: akerl: I wouldn't call an exception a no-op :)
[20:00:29] DouweM: heh, as far as ops go that's a pretty yes one :P
[20:01:40] AlexRussia: DouweM: https://gist.github.com/6d8aa62ea1d0040d4769
[20:01:59] akerl: AlexRussia: Yes, that's what rubygems does without your "patch"
[20:02:01] DouweM: so, get it in your path
[20:02:39] akerl: So fix your path, or just ignore the warning? your change won't fix the problem, because it'll just crash gem
[20:02:40] jhass: dllama: yes, the later hash key simply overwrites the former
[20:02:44] AlexRussia: DouweM: stop, what you mean about split?
[20:02:53] jhass: >> {a: 'foo', a: 'bar'}
[20:02:57] eval-in: jhass => {:a=>"bar"} (https://eval.in/163170)
[20:02:57] DouweM: AlexRussia: there is no split! method on String. I have no idea what you're trying to do
[20:03:00] kith: is there an alternative to rubymotion?
[20:03:09] DouweM: kith: alternative as in? what's your goal?
[20:03:09] AlexRussia: DouweM: that using in original code, i just use that https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L609
[20:03:16] dllama: jhass, what can i do to circumvent that?
[20:03:17] kith: native apps for osx in ruby
[20:03:21] AlexRussia: DouweM: i change #spit!
[20:03:22] DouweM: AlexRussia: original uses split, you use split!
[20:03:29] akerl: AlexRussia: what
[20:03:31] AlexRussia: DouweM: I KNOW
[20:03:36] akerl: So why are you using it?
[20:03:44] AlexRussia: akerl: because original use it
[20:03:49] akerl: No it does not
[20:03:50] DouweM: kith: all right. no there's no alternative, and why would you want one?
[20:03:57] akerl: It uses .split
[20:03:57] AlexRussia: akerl: it does
[20:04:00] akerl: You use .split!
[20:04:04] DouweM: AlexRussia: jesus man, learn to read. split is not the same thing split!
[20:04:08] AlexRussia: akerl: already no
[20:04:12] kith: DouweM: because i'm hesitant to pay up for rubymotion
[20:04:13] akerl: AlexRussia: I am looking at the code
[20:04:20] AlexRussia: akerl: you look to old code
[20:04:24] DouweM: kith: heh, no there's no alternative. just pay :P
[20:04:43] DouweM: AlexRussia: ...
[20:04:57] DouweM: kith: why not learn Swift? It's Ruby-ish and a lot more comfortable to write than ObjC
[20:05:05] mr_foobar: anyone here using the aruba gem?
[20:05:07] DouweM: kith: and doesn't require a license like RM
[20:05:09] AlexRussia: https://gist.github.com/f5c47b168d3ba33b5e60
[20:05:13] kith: its rubyish? must've missed it then...
[20:05:16] kith: i thought it was more C-ish
[20:05:17] foobarbaz_: Anyone used Ruboto?
[20:05:23] foobarbaz_: For Ruby android dev
[20:05:24] DouweM: kith: as in comfort of use, Ruby-ish
[20:05:34] apeiros: on one hand, I appreciate the idea of fixing a bug in OSS and making a PR - on the other hand, I've got a feeling this will not end well
[20:05:36] akerl: AlexRussia: You are trying to "solve" something that is not a problem
[20:05:36] kith: is it even released yet?
[20:05:40] DouweM: kith: definitely higher level than C
[20:05:49] DouweM: kith: released as in you can write in it now
[20:05:57] DouweM: kith: but it's not ready for production
[20:06:01] apeiros: (and then there's of course the question whether it actually is a bug???)
[20:06:12] DouweM: kith: but it's a really nice language
[20:06:20] akerl: apeiros: I've not yet seen any indication that it is, but I may have looked away for a bit of the wall
[20:06:46] kith: DouweM: to be honest i consider myself somewhat of a ruby novice and didnt want to start yet another language since i havent fully mastered ruby :/
[20:06:58] apeiros: akerl: I didn't really bother trying to figure
[20:07:05] apeiros: akerl: so you're very probably right :)
[20:07:19] DouweM: kith: the hardest part of a new language is the standard library, which you'll need to learn anyway, whether you use RubyMotion, Objective-C or Swift
[20:07:47] kith: if you put it that way... :D
[20:07:50] jhass: dllama: not sure, you have to dig into how savon converts the argument to xml
[20:07:55] DouweM: kith: just go with swift, using a first party language is much easier to get support with etc
[20:08:02] DouweM: kith: help online, all that jazz
[20:08:14] kith: will think about it
[20:08:38] DouweM: AlexRussia: line 609 is now a no-op. or rather, it's an op but you're throwing away the result
[20:08:58] AlexRussia: DouweM: what you mean?
[20:09:04] DouweM: AlexRussia: my mistake, didn't see the assignment
[20:09:14] akerl: You've just moved the same split 2 lines up
[20:09:24] akerl: So it's a no-op compared to the old version
[20:09:40] DouweM: akerl: the difference is that he's assigning to path, so the check on 612 now uses the array as well
[20:09:51] DouweM: akerl: which is a definite difference, and what fixes the bug
[20:10:08] akerl: DouweM: No, because the check on 612 used to be on 609 and include the split right inside it
[20:10:17] DouweM: I'm surprised to agree with AlexRussia that there was indeed a bug that this does indeed fix
[20:10:25] DouweM: akerl: I mean the second include check, with the subbed user bin dir
[20:10:28] akerl: https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L609
[20:10:32] DouweM: akerl: that used to use the string, now uses the array
[20:10:47] DouweM: akerl: still not sure how that fixes anything, but it's a definite change
[20:11:05] AlexRussia: but maybe someone now tell me how to check it now?
[20:11:14] DouweM: I was reading yet an older diff
[20:11:15] AlexRussia: i mean, how to run tests or something
[20:11:17] DouweM: I have no idea what's up anymore
[20:11:18] akerl: DouweM: Heh
[20:11:30] DouweM: akerl: disregard anything I said :P
[20:11:43] akerl: AlexRussia: by closing your editor and going back to whatever you were doing before
[20:11:45] akerl: like installing gems
[20:12:23] DouweM: akerl: no no, check the changed code, I think there's indeed a bug there and that AlexRussia has fixed it
[20:12:30] DouweM: He was just very bad at conveying to us what was up
[20:12:34] AlexRussia: :wq && cit commit && git push origin trunk ....
[20:12:35] akerl: ACTION doubts
[20:12:48] DouweM: https://gist.github.com/AlexTalker/f5c47b168d3ba33b5e60#file-installer-rb-L609 vs https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L609
[20:12:58] DouweM: akerl: the sub on line 612 is new
[20:13:15] akerl: DouweM: No, it's old
[20:13:27] DouweM: akerl: replacing the written out home path by ~, so it'll check the right thing in the user's path
[20:13:58] akerl: DouweM: He's not replacing anything, he's just ensuring the check never runs at all on windows
[20:14:11] AlexRussia: DouweM: 612 is fix, i check system to 'not windows', because i never listen about using '~/' in windows, and check include PATH to something like ~/.gem/2.1.0/bin
[20:14:18] DouweM: is that so? is the code on ruby/ruby old then?
[20:14:29] DouweM: why doesn't the ruby/rubt code have the sub?
[20:14:36] DouweM: akerl: apparently I'm still looking at old code
[20:14:42] akerl: DouweM: line 612 skips the rest of the check unless you're on a non-windows system
[20:14:57] DouweM: akerl: I don't see the sub on https://github.com/ruby/ruby/blob/trunk/lib/rubygems/installer.rb#L609
[20:15:07] DouweM: did AlexRussia add the sub? because the sub makes sense
[20:15:34] akerl: Not really
[20:15:43] AlexRussia: DouweM: but you dont know how to check my code....not visually, if you understand ;)
[20:15:45] DouweM: I'm getting more confused by the minute
[20:15:46] AlexRussia: DouweM: meah
[20:16:06] akerl: The include? thing.sub check checks "Does the path include the userbindir assuming we replace my homedir with the "~" char
[20:16:32] DouweM: which makes sense right? because HOME and ~ are equiv, we should check both
[20:16:38] akerl: Except that doesn't
[20:16:42] DouweM: disregarding the windows check for the moment
[20:16:58] DouweM: the sub isn't in the actual rubygems right? it's not in the linked installer.rb
[20:17:18] DouweM: what do you mean "Excep that doesn't"? I feel like I'm missing something
[20:17:21] AlexRussia: DouweM: i afraid, sub is part of Ruby library
[20:17:39] AlexRussia: DouweM: because String is part, right?
[20:17:53] AlexRussia: DouweM: i mean standard library
[20:17:55] DouweM: AlexRussia: I know. I know what it does. Did you add that sub in that place or was it already there? Because I don't see it in the code on GitHub
[20:18:23] AlexRussia: DouweM: that add me
[20:18:34] AlexRussia: DouweM: i can sent you diff
[20:18:36] akerl: I think what he means to do is "unless path.include? user_bin_dir or path.include? File.expand_path(user_bin_dir)"
[20:18:42] akerl: on 609 straight
[20:18:42] AlexRussia: DouweM: my git already
[20:18:49] AlexRussia: DouweM: if you tell me how to....
[20:19:47] AlexRussia: DouweM: https://gist.github.com/3a16f4bfb6709b394ec3
[20:20:05] DouweM: akerl: we want to expand what's in PATH, really, not user_bin_dir
[20:20:19] akerl: DouweM: Works either way :P
[20:20:31] DouweM: akerl: if user_bin_dir is /home/whatevs, PATH could contain either /home/whatevs/yolo/bin and ~/yolo/bin
[20:20:47] DouweM: akerl: without the replace ~/yolo/bin wouldn't match and we'd get the warning
[20:20:54] AlexRussia: DouweM: sure
[20:21:01] akerl: I'd say that putting relative magics in path is a weird choice
[20:21:09] akerl: But if that's the goal, his way is bass ackwards
[20:21:16] DouweM: akerl: allowed though right? apparently AlexRussia has that
[20:21:24] akerl: and the windows check is bad
[20:21:29] DouweM: akerl: how would you go about it?
[20:21:32] DouweM: akerl: agree on the windows check
[20:21:37] DouweM: but you acknowledge the bug?
[20:21:57] AlexRussia: DouweM: here the complete patch https://gist.github.com/7d5a2ed73f659a60f39f
[20:22:08] akerl: I guess? I don't think it's really a bug he's hitting given that he doesn't seem to have it in his path at all
[20:22:14] AlexRussia: DouweM: 'git diff -p'
[20:22:16] akerl: DouweM: Were I writing it, I'd probably map
[20:22:18] RubyPanther: Yeah, if you do somehting like PATH=$PATH:~/foo then bash expands that before it gets added, the ~ isn't going to be in $PATH
[20:22:33] DouweM: RubyPanther: is that so? I had no idea
[20:22:36] RubyPanther: stuffing it in there is perverse
[20:22:46] AlexRussia: RubyPanther: Hello
[20:22:54] akerl: I doubt rubygems is the only thing that behaves poorly in this scenario
[20:22:55] DouweM: RubyPanther: I'm not saying it's a good idea, but I can see what AlexRussia is trying to fix
[20:23:09] RubyPanther: it is wrong, but in a way that creates land mines by looking too much like normal ground
[20:23:50] RubyPanther: a wide open WTF in the ground, you just step around it
[20:24:04] AlexRussia: RubyPanther: i just try make gem really intelligence software....
[20:24:23] RubyPanther: AlexRussia: clever is not better than conventional
[20:24:24] DouweM: AlexRussia: fix your PATH and you should be all right
[20:24:24] akerl: No, you're trying to avoid seeing a warning for having a poorly set path
[20:24:31] AlexRussia: RubyPanther: that (btw me) should work in any correct environment
[20:24:49] RubyPanther: Only add intelligence to your code where it is strictly beneficial for clear and known reasons and does not create land mines
[20:24:54] Mon_Ouie: To make gem intelligent, just make it pretend to be a 13 yo :p
[20:24:55] akerl: AlexRussia: If your env was correct and rubygems wasn't working, we would be having a different discussion
[20:25:04] AlexRussia: DouweM: that yes, but i more love seen ~/ vs full path, that more portable
[20:25:07] DouweM: Mon_Ouie: haha
[20:25:15] akerl: DouweM: As a very rough oneliner sketch: unless path.split(File::PATH_SEPARATOR).find { |dir| [dir, File.expand_path(dir)].include? user_bin_dir }
[20:25:23] akerl: AlexRussia: No it's not
[20:25:32] DouweM: akerl: yeah I would've gone with that approach as well
[20:25:34] akerl: Set your PATH with $HOME or ~ that expands at time-of-setting
[20:25:43] AlexRussia: akerl: ~/ more portable vs /home/user/
[20:25:49] akerl: Read the above?
[20:25:53] DouweM: AlexRussia: you're not sharing your PATH anyway, who cares
[20:26:12] RubyPanther: ~ is portable because you know where you expand it, and expand it in the right place.
[20:26:14] akerl: You use ~/ or $HOME when you set it, let it expand at runtime rather than sitting as a relative magic in the env variable
[20:26:28] RubyPanther: not knowing where it is expanded so stuffing it in everywhere, that doesn't do anything for portability
[20:26:33] AlexRussia: DouweM: dammit, i mean, any user can setup environmant like he love and gem don't need tell 'you idiot, my authors dont like that'
[20:26:51] akerl: AlexRussia: It's not even an error
[20:27:02] DouweM: if adding to PATH automatically expands, how did you end up with ~ in there?
[20:27:20] akerl: DouweM: '~/.bin:/bin:/sbin' won't expand
[20:27:21] RubyPanther: The user who fiddles $PATH will generally expect you to just use the PATH normally and not to try to play clever tricks. You're not helping that person by being clever.
[20:27:28] DouweM: akerl: ah
[20:27:33] AlexRussia: may be you just say me how to test changes and i leave? A?
[20:27:41] akerl: AlexRussia: Ok, you're welcome to just leave
[20:27:45] DouweM: akerl: hehe
[20:28:00] RubyPanther: Other software isn't clever, and use and abuse of $PATH assumes the software will just be properly stupid and not worry about what you stick in there, just check those directories
[20:28:05] akerl: If you'd like to test the changes, install your custom gem and try it out
[20:28:28] AlexRussia: haahhahahahahhahahhahahahahahahahhahaahahhahahahahahahahaahahahhaahahhahahahahahahaahhahahahahahahaahhahahahahahahahahaahahahahahahahhahaahhahahahaha
[20:28:30] Mon_Ouie: Plus having a literal "~" in my path doesn't work in my shell here (it won't expand it later, that is)
[20:28:35] RubyPanther: The idea that some cleverness would somehow _help_ the people who fiddle their paths, that is just nuts.
[20:28:40] AlexRussia: Mon_Ouie: what shell you use?
[20:28:43] AlexRussia: Mon_Ouie: i zsh
[20:28:49] AlexRussia: Mon_Ouie: hm
[20:28:58] AlexRussia: Mon_Ouie: for me work nice
[20:29:04] AlexRussia: Mon_Ouie: did you restart your zsh?
[20:29:26] apeiros: zsh is the sound a tire makes when losing pressure
[20:29:34] apeiros: s/pressure/air/
[20:29:38] Mon_Ouie: I just did export PATH="~/some_dir"
[20:29:56] AlexRussia: Mon_Ouie: yeah
[20:32:54] AlexRussia: how silent....
[20:35:17] RubyPanther: export FOO=~ ; export BAR='~'; ruby -e 'puts ENV["FOO"]' ; ruby -e 'puts ENV["BAR"]' ; ls -d $FOO $BAR # this should explain it all
[20:37:24] RubyPanther: ls: cannot access ~: No such file or directory
[20:42:17] AlexRussia: RubyPanther: lol
[20:42:53] AlexRussia: may be that because shell understand ~ while it not in ''
[20:46:04] Mon_Ouie: If you don't put it in quote there is no '~' in the variable, it's already been expanded to the user's home directory
[20:48:11] RubyPanther: exactly, ~ is not a general meta-character, it is only a metacharacter to the shell, and the shell expands it when it is set, and all that is set is a regular dumb string
[20:50:22] RubyPanther: trying to add extra logic that expands crap in those strings is a security hole. Not a theoretical, a known one, because where things do and don't expand is part of the security strategies being used. You could accidentally expose the user of your gem to attack from by their users
[20:51:54] RubyPanther: The dark heart of the BOFH is forged battling these demons
[21:03:30] lezzit: does anyone here work at twitter?
[21:03:59] blackthor: why, did u lose your account info? :P
[21:04:25] lezzit: i want one bot removed
[21:04:31] akerl: So report it to twitter?
[21:04:38] lezzit: i have been mailing for a week
[21:04:40] lezzit: no response
[21:06:11] lezzit: i think millions would be providing customer service for twitter in future and facebook
[21:06:18] lezzit: so much bad stuff
[21:06:30] lezzit: only human filters can solve it i guess
[21:07:09] RubyPanther: human filters will ban more stuff, if that results in "solving" a particular problem depends on a lot of assumptions, and the problem
[21:07:40] lezzit: RubyPanther: mostly it is about religion
[21:07:58] akerl: A religionbot?
[21:08:02] akerl: this seems pretty benign
[21:08:05] lezzit: it is better if no freedom of speech againt anti-religion stuff
[21:08:09] lezzit: because it solves nothing
[21:08:24] RubyPanther: now we know why they ignore your mails
[21:08:24] lezzit: relgion is here to stay till dinosaurs come back
[21:08:41] akerl: lezzit: What's the bot?
[21:08:53] lezzit: RubyPanther: god is probability to me
[21:09:00] RubyPanther: lezzit: Nobody cares
[21:09:03] lezzit: that's all to it
[21:09:10] lezzit: i am not a believer or stuff
[21:09:32] lezzit: it is just that present environemtn is not ready for such posts
[21:09:42] apeiros: lezzit: block the bot, enjoy life again
[21:09:44] akerl: lezzit: So now we know why twitter is ignoring you
[21:10:14] lezzit: akerl: i hope you would understand someday.
[21:10:32] apeiros: lezzit: also, wrong channel for this
[21:10:43] lezzit: yeah sorry
[21:10:53] lezzit: can i ask one more before leaving
[21:10:59] apeiros: if it's ruby related, sure
[21:11:00] lezzit: are bots allowed on twitter?
[21:11:04] lezzit: sorry again
[21:11:18] Edelwin: (and girls)
[21:11:29] RubyPanther: My direct ancestor killed Charles II of England in order to free the individual to talk to their deity directly, to receive inspiration directly. Incidentally, they also created the modern English parliamentary system at the same time. I'm not a deist, but I'd fight for their rights to come up with their own answers, and to bloviate about them.
[21:11:31] lezzit: oh, i'm sowie, Edelwin :)
[21:12:10] RubyPanther: How is a bot any different than a Buddhist prayer wheel spinning in the wind?
[21:12:14] apeiros: RubyPanther: I guess everybody has a right to believe in whatever fairy tale he/she wishes to
[21:12:41] akerl: RubyPanther: Aren't we all bots on the inside?
[21:12:57] apeiros: akerl: actually more like a bazillion bots
[21:13:29] RubyPanther: is a bot a system, or a phenomenon that arises from a system?
[21:13:47] apeiros: uh-oh, we pressed philosopher-RubyPanther-button
[21:14:33] RubyPanther: luckily I have to fix a bicycle, so you're saved
[21:14:51] OffTheRails: the bigger question is, why does the bicycle need fixing?
[21:16:16] RubyPanther: OffTheRails: The bicycle doesn't need any fixing. I need it to be fixed, so that my wife will be happy about it.
[21:17:04] OffTheRails: ahh, a sacrifice for the Gods
[21:17:23] RubyPanther: lol yeah, worship for my Deity :P~
[21:26:50] foobarbaz_: Is there any common apps people make in ruby/rails that i could do?
[21:26:54] foobarbaz_: Bit stuck for ideas on how to learn ruby
[21:30:35] jhass: I think the hello world one is todo?
[21:35:15] foobarbaz_: Blog's slightly more involved than todo list, will give that a go :)
[21:35:27] foobarbaz_: Hm; CoffeeScript makes a lot more sense having looked at ruby...
[21:36:00] foobarbaz_: Is that coincidence? Or is coffeescript based on ruby in someway
[21:36:09] shevy: perhaps some of the authors might have used ruby
[21:36:18] DouweM: influenced by I'm pretty sure
[21:36:18] shevy: but I think they just wanted to make javascript visually more appealing
[21:36:24] DouweM: also that
[21:36:31] shevy: perhaps DouweM is a co-author!
[21:37:02] DouweM: well there's really just two guys on the internet, you and everyone else, so in fact I'm co-author of everything
[21:37:13] foobarbaz_: eraw, is that you?
[21:37:38] DouweM: of course, I am everyone, including eraw
[21:40:12] shevy: are you also female
[21:41:00] apeiros: foobarbaz_: the authors were rubyists
[21:41:05] apeiros: and the first implementation was in ruby
[21:41:12] apeiros: I think it's by now bootstrapped
[21:41:35] foobarbaz_: I just wondered because when i first looked at it, i couldn't make sense of it
[21:42:00] foobarbaz_: But now a lot of it makes sense, having seen ruby sugar and such
[21:43:15] shevy: now you know how desperate ruby people are foobarbaz_
[21:43:20] shevy: they see how beautiful ruby can be
[21:43:24] shevy: then they have to write javascript all day long
[21:44:27] shevy: or even worse
[21:44:35] shevy: foobarbaz_, now you did it
[21:44:38] shevy: you depressed me :(
[21:45:59] foobarbaz_: Everyone should just write in Scala anyway
[21:46:03] foobarbaz_: Problem solved! :)
[21:46:38] shevy: but that requires java
[21:51:33] foobarbaz_: shevy: does it?
[21:51:39] foobarbaz_: A JVM maybe?
[21:51:46] foobarbaz_: Scala != Java
[21:51:47] shevy: is there a JVM without java?
[21:51:56] foobarbaz_: You ask an interesting question.
[21:52:06] shevy: you are funny
[21:52:09] shevy: almost as funny as certainty
[21:52:36] shevy: we already argue so why marry
[21:52:52] shevy: that reminds me ...
[21:53:01] foobarbaz_: a JVM takes bytecode and runs it, it's Java agnostic
[21:53:10] shevy: can one of you confirm that "gem uninstall" will not remove bin/* entries of the respective gem, if installed globally (ruby prefix to /usr dir)
[21:53:54] shevy: foobarbaz_ that is cool but can you tell me which JVM I can use that does not require me to have java? It's not even a fake question, java always gives me problems on my messed up everything-from-source linux install system :(
[21:54:08] shevy: but at least I have AppDirs!
[21:54:19] shevy: /Programs/Lame/3.99.5/
[21:54:23] shevy: aaaaaaah the beauty
[21:54:34] Mon_Ouie: It's JVM agnostic except for the fact that its primitives and the way it represents objects have been designed with Java in mind
[21:54:41] Mon_Ouie: Java agnostic*
[22:06:49] foobarbaz_: str[/(\w*)/, 1]
[22:06:52] foobarbaz_: What sugar is this?
[22:07:16] jhass: def [](regex, group)
[22:08:19] Mon_Ouie: str.[](arguments)
[22:08:50] foobarbaz_: interesting!
[22:08:55] akerl: slices are just methods with cute syntax
[22:09:17] Mon_Ouie: Same for most other "operators"
[22:09:24] Mon_Ouie: 3 + 5 is just 3.+(5)
[22:09:38] matti: Mon_Ouie: ;]
[22:12:11] apeiros: foobarbaz_: since plenty mess this up: `foo[a, b, c] = d` is sugar for `foo.[]=(a, b, c, d)`
[22:12:28] apeiros: i.e., the assigned value is just the last argument. and the method name is []=
[22:13:14] foobarbaz_: What does that do sorry
[22:13:21] foobarbaz_: Not familiar enough with ruby yet
[22:13:33] Mon_Ouie: >> x = "foo"; x[2] = "r"; x
[22:13:33] eval-in: Mon_Ouie => "for" (https://eval.in/163192)
[22:13:42] apeiros: or with hashes:
[22:13:53] apeiros: >> hash = {}; hash["key"] = "value"; hash
[22:13:53] eval-in: apeiros => {"key"=>"value"} (https://eval.in/163193)
[22:13:57] apeiros: or with arrays:
[22:14:17] apeiros: >> array = [1,2,3]; array[1,2] = [:a, :b, :c]; array
[22:14:17] eval-in: apeiros => [1, :a, :b, :c] (https://eval.in/163194)
[22:14:53] apeiros: foobarbaz_: in other words - "what does that do" depends entirely on what you call it on. it's a method. what a method does depends on the receiver of the method call.
[22:18:14] foobarbaz_: ruby is interesting
[22:19:08] matti: foobarbaz_: Check out Go too ;]
[22:19:43] foobarbaz_: I have too many things to learn :'/
[22:41:36] shevy: foobarbaz_ you don't have to learn everything
[22:46:29] Radar: apeiros: Use !e.
[22:49:42] apeiros: Radar: nooo! automatic response!
[22:49:49] apeiros: we have the technology, we can do this!
[22:49:52] Radar: apeiros: It would get annoying and people can spam "doesn't work"
[22:49:58] Radar: apeiros: see also: patches welcome
[22:50:11] apeiros: we can make him better than he was before, stronger, faster!
[22:50:27] apeiros: Radar: bah, people can always spam. that's when you ban them.
[22:50:41] Radar: apeiros: And what happens when we have no ops, like this channel has 95% of the time?
[22:50:52] apeiros: (I've had idiots argue "but it was the bot", yeah, bullshit. bot does what you tell him to)
[22:51:01] helpa: Radar, you should ban the person highlighted, signed toretore.
[22:51:01] toretore: !ban apeiros
[22:51:05] apeiros: Radar: that problem is unrelated to having a bot or not
[22:51:16] Radar: apeiros: I would rather not have another spam vector in my bot.
[22:51:17] apeiros: if somebody spams, whether through a bot or himself, and you have no op, then you have no op
[22:51:24] Radar: the !g command is already a vector
[22:51:40] Radar: apeiros: It's disruptive to the channel and I don't want that happening in #rubyonrails
[22:51:56] Radar: I am not Batman. I am not constantly vigilant, protecting the citizens of #rubyonrails.
[22:51:57] apeiros: channel specific feature then? :p
[22:52:18] Radar: I am only here during work hours and very rarely outside of them these days due to marriage and life
[22:52:57] benzrf: helpa: yo what gives
[22:53:31] toretore: actually, i get zero dick related spam anymore
[23:00:07] apeiros: yay! research in my starbase orion clone works :D
[23:00:15] apeiros: probably time to go to bed too??? 0100 here :-S
[23:22:27] shevy: toretore wanna take over my spam? :>
[23:22:40] shevy: apeiros what can be researched?
[23:25:16] AlexRussia: https://travis-ci.org/rubygems/rubygems/jobs/27639117
[23:26:21] akerl: Remember when you asked if 'or' and 'and' were equivalent to '&&' and '||'?
[23:26:29] akerl: and we said they had different precedence?
[23:26:33] akerl: this is where that matters
[23:40:19] AlexRussia: akerl: but here only one '&&' ;)
[23:40:34] akerl: precedence still matters
[23:44:21] mozzarella: >> cool = true; not not not not not not not cool
[23:44:21] eval-in: mozzarella => false (https://eval.in/163195)
[23:44:48] AlexRussia: ooneye: hehe
[23:46:33] mozzarella: it keeps shifting
[23:46:40] mozzarella: what's happening
[23:48:55] AlexRussia: akerl: you mean, statement count like (!Gem.win? && path.include?) bin_dir ?????????????
[23:49:07] diegoviola: this code is giving me a hard time, i can't even figure out what's going on ehre: https://gist.github.com/278d3e65f7ec242265c8
[23:49:13] oneyeMo: mozzarella: Somebody's insisting we shift our nicknames in a private channel
[23:49:18] oneyeMo: I can't say no.
[23:49:28] oneyeMo: It's a private channel.
[23:49:44] akerl: AlexRussia: I mean that precedence matters
[23:49:56] AlexRussia: akerl: agrh you like zombie
[23:50:18] akerl: You said earlier that you understood precedence
[23:52:27] AlexRussia: akerl: http://ruby-doc.org/core-2.1.2/doc/syntax/precedence_rdoc.html ?
[23:59:17] foobarbaz_: What's the difference between [1,2,3].inspect
[23:59:30] foobarbaz_: and `puts [1,2,3]` and `p [1,2,3]`
[23:59:40] AlexRussia: foobarbaz_: a big
[23:59:42] foobarbaz_: This code seems to mix them interchangably
[23:59:54] AlexRussia: foobarbaz_: the last two make diffrent job