latemus

Activity Graph

Page 1 of 5 | Next »

2017-10-29

[01:07:08] latemus: isnt smalltalk where ruby gets the |e| notaition from
[01:22:02] latemus: jquery is rather ruby-like
[01:22:11] latemus: i've noticed
[07:17:25] latemus: does ruby have a method to recurse through a nested hash and find deepest objects
[08:35:05] latemus: RickHull: Nice. Thank you
[08:37:51] latemus: arup check out https://www.regular-expressions.info/quickstart.html and https://www.regular-expressions.info/ruby.html
[10:51:33] latemus: is it correct to say that func1().func2() and func2(func1()) is the same, in the sense that they are passing messages the same?
[10:52:51] latemus: does . connect up the standard input and output of the two methods in a duplex way
[10:54:07] latemus: i guess, im wondering, how does the first method in a chain pass messages to the second method in the chain
[10:54:25] latemus: does the second recieve what is returned by the first
[10:56:35] latemus: alright. not quite ready to ask this question i suppose. thanks anyway
[10:57:40] latemus: im trying to understand how chaining is different from just passing in args
[10:58:09] latemus: stil grappling with oo messages i think
[10:58:53] latemus: right, i get that.
[11:00:26] latemus: yes the method returns an object which hase the methods and attributes of it's class
[11:00:56] latemus: matthewd: i'm clear on that, it doesnt really cover what im triying to ask
[11:01:18] latemus: dminuoso: okay
[11:02:19] latemus: matthewd: okay, so the 'medium of transport', if you will, by which chaned objects communicate, is the return value
[11:03:11] latemus: that is the same as pipelining commands in unix
[11:04:02] latemus: you mean theres no buffer?
[11:04:19] latemus: i think i see
[11:05:31] latemus: okay i get it now
[11:07:34] latemus: matthewd: that cleared it up. thanks matthewd Dimik elomatreb
[11:07:50] latemus: s/Dimik/dminuoso
[11:18:19] latemus: are udp sockets simplex on unix, since it is one way
[11:18:36] latemus: or arent sockets always dup
[14:01:58] latemus: input = [/#{bs[a-z]{1}}/]
[14:03:24] latemus: this assignment fails with an error. complaining about the braces in the quantifier. what is the proper way? i thought i could use /#{}/ to place a regexp in an array
[14:04:22] latemus: i want to do it right there in the array declaration, without assigning var = /pattern/
[14:08:10] latemus: apeiros: okay. i guess the error was because im doing this with it? --> method_name arg1, arg2, [/regexp/]
[14:08:23] latemus: passing it in to a method
[14:09:19] latemus: sorry-- i meant the error before i tried interpolation. one sec lemme check in irb brb
[14:09:35] latemus: apeiros: you're so right, woops
[14:10:11] latemus: i think it was there because i previously had parens to group, and forgot to remove the quantifier
[14:10:21] latemus: ima go with that story ;/
[14:19:28] latemus: yay, it was just a paren in the wrong position. thanks your your help apeiros

2017-10-28

[00:01:03] latemus: how can i reference the caller from within a method
[06:01:51] latemus: do i understand correctly that a local variable within a class method is limited in scope to that same method?
[07:58:13] latemus: elomatreb: thanks
[11:12:17] latemus: is there a method like .strip but it lets you pass in a string to remove? like 'sed -e "s/str//g"'
[11:14:14] latemus: .gsub and .slice looks like .gsub is what i need, thx

2017-10-27

[00:06:41] latemus: i am writing a rack application. so i'm coding everthing in a class. i'd like to create methods within the class, and use them within the class. is this possible?
[00:07:46] latemus: i can't seem to figure out the convention for calling methods within the class itself so they run when the class is instatniated. what should i look up.
[12:37:48] latemus: i'm getting this "body"=>"#<StringIO:0x00000001cf43f0>" and i dont know what the hell a StringIO class object is
[12:39:18] latemus: oh, i call .gets and .string on it
[22:23:56] latemus: the following code never runs the second is_a method, why? --->>> val = ( (value.is_a? Hash) || (val.is_a? Array) )
[22:28:59] latemus: mozzarella: i should have mentioned that value = []
[22:30:46] latemus: val is being assigned the boolean result
[22:32:23] latemus: oh man, thanks
[22:35:09] latemus: baweaver: how so
[22:36:58] latemus: i was using them to group for boolean flow control. but yes, using them the way you did is cleaner
[22:37:39] latemus: i have corrected my code :)
[22:38:28] latemus: interesting, that's the first time i've seen a problem with not explitictly using parens to pass a value in to a method
[22:38:46] latemus: baweaver: that's even better
[22:39:30] latemus: i skipped that class in my mind and went straight up to object, wwhoops
[22:41:14] latemus: what is it
[22:42:19] latemus: you're a tricky one baweaver
[22:53:56] latemus: ACTION can't wait to get into pipes

2017-10-26

[02:44:48] latemus: Ping timeout: 240 seconds
[02:46:03] latemus: has joined #ruby
[11:27:18] latemus: has joined #ruby
[11:27:50] latemus: what is the StringIO bytes used by .from_bson(string_io)
[11:28:22] latemus: the bson tutorial is very terse and they do not explain what it is
[11:28:35] latemus: anyone happen to know?

2017-10-25

[00:30:16] latemus: inspect just gives the object id, not it's content
[00:30:33] latemus: if i convert to an array i see more. is there way to dump the object?
[01:18:03] latemus: havenwood: thank you
[05:38:50] latemus: is run() like a subshell?

2017-10-24

[12:33:32] latemus: i followed the example for readline history blank-line exclusion as shown in the docs here ==> ruby-doc.org/stdlib-1.9.3/libdoc/readline/rdoc/Readline.html but the code from the example breaks history altogether, here's my code ==> http://termbin.com/3xxt
[12:34:13] latemus: (i can't see why history is broken)
[12:38:04] latemus: why does 'Date.today << 1;' work, ri Date.today says nothing about push
[12:38:39] latemus: nor about arrays
[23:53:19] latemus: how can i do something like .inspect to an an object of the class 'Object'

2017-10-23

[03:44:24] latemus: has joined #ruby
[07:41:22] latemus: entries.each { |k, v| output = k if v.include? "someword" }
[07:41:31] latemus: that assigment fails. why is it illegal?
[07:42:59] latemus: oh, scoped to the block only
[07:43:12] latemus: thanks guys
[07:44:24] latemus: baweaver: :D
[07:45:12] latemus: i have to look up .rassoc and &
[07:46:09] latemus: in my case just setting the variable beforehand will work. but i will take this opportunity to learn about what you both shared
[08:00:57] latemus: i have a method, show_help, and i want to be able to access that method by a second name, show_?. is there a way to link them? 'show_? = :show_help' failed
[08:02:15] latemus: nm google was helpful, sorry for the noise.
[08:04:08] latemus: projects progress so rapidly when using ruby

2017-10-21

[05:18:19] latemus: is it possible to have a ruby script read and evaluate key combinations?
[05:18:38] latemus: can i gets.chomp alt+h
[05:19:20] latemus: (for example)
[05:21:31] latemus: i want this repl to handle keybindings
[05:24:15] latemus: okay, thanks i'll start there
[05:25:45] latemus: tk with ruby?
[19:17:57] latemus: Quit: leaving

2017-10-20

[05:33:22] latemus: has joined #ruby
[05:34:54] latemus: dag. my script gets killed for using to much ram. is it the ruby way to read n lines from a file, parse, and write them to temp file so i can read in n more lines without dying of ram
[05:35:48] latemus: ruby obediently uses up all the memory. i think i've encountered a design error on my part. is rubyish to use a temp file?
[05:42:07] latemus: biox: yes, exactly. parsing log files, putting them into hashes, correlating their parts
[05:43:02] latemus: biox: thank you so much, i'm sure it will. things grow exponentially because of a nested loop
[05:43:59] latemus: i'm dumping the output of the lastb command into a file and manipulating it
[05:45:56] latemus: biox: i've done this in bash so many times but it always feels so clunky. i suppose i should just refactor my bash into better functions i can reuse, but the code when written in ruby is so easy to read
[05:46:30] latemus: biox: haha exactly
[05:48:15] latemus: biox: see, that is my next move, at present it just inhaled the entire log into memory, im now going to read just one line at a time, pares, and write to an output file
[05:48:57] latemus: i just wanted to ask if temp files are accebtible form acconding to the 'ruby way', because they remind me of using posix sh
[05:49:06] latemus: s/accond/accord/
[05:52:51] latemus: i do want to sort it. but i can just load the discard file back into memory and then sort, because it wasnt the file itself exhausting memory but the manipulation part while in memory. definitely looking up 'lazy enumerator'
[06:07:25] latemus: right on. just looked it up and that may solve my problem, thanks a million :)
[10:29:53] latemus: can i see an example of how to invoke a gem's ri docs? i dont know any methods it makes available
[22:47:41] latemus: Ping timeout: 240 seconds
[23:45:32] latemus: has joined #ruby

2017-10-17

[05:22:07] latemus: has joined #ruby
[05:22:51] latemus: how do i bringan external module such as mysql into the scope of my program. require 'mysql' is not doing it
[05:29:08] latemus: matthewd: i'm writing a script to learn how to connect to a mysql database, and im getting an error 'cannot load such file -- mysql (LoadError)'
[05:29:40] latemus: is it a third-party packagage, like ruby-mysql or something
[05:29:55] latemus: yeah matthewd i am.
[05:30:29] latemus: okay, thanks. i think my question is, once i install the gem will require just work
[05:31:13] latemus: matthewd: that's good to know, i'll definitely use mysql2 instead, i've been wondering if what i was using was the ruby equivalent of the mysql php extensions (obsoleted by mysqli)
[05:32:20] latemus: matthewd: i could stand to learn abount bundle, i dont understand it
[05:32:35] latemus: but i used it with rails a while back
[05:32:48] latemus: i guess i assumed it was a railsism
[05:33:12] latemus: like activerecord
[05:34:10] latemus: i love ruby but it bothers me to install things outside my OS's package manager
[05:34:37] latemus: Okay bundler will be useful
[05:36:03] latemus: Thx matthewd
[05:37:04] latemus: Yes that feels much better
[05:38:49] latemus: Seems more portable also
[05:41:18] latemus: Do gems include any documentation on their use?
[05:41:42] latemus: I noticed that typing help in irb is extremely useful. Somehow i had not learned about that
[05:42:14] latemus: And didn't ruby forge shutdown or was that something else?

2017-10-15

[13:21:14] latemus: has joined #ruby
[14:52:44] latemus: has joined #ruby
[16:21:45] latemus: has joined #ruby

2017-07-20

[04:51:04] latemus: has joined #ruby
[05:54:18] latemus: Quit: leaving
[05:54:34] latemus: has joined #ruby
[05:55:41] latemus: has left #ruby: ()
[06:09:13] latemus: has joined #ruby
[06:27:15] latemus: Quit: leaving
[06:38:26] latemus: has joined #ruby

2017-07-17

[23:28:02] latemus: Quit: leaving

2017-07-16

[00:06:28] latemus: has joined #ruby
[06:28:50] latemus: Ping timeout: 240 seconds
[06:37:22] latemus: has joined #ruby

2017-07-15

[23:58:49] latemus: Ping timeout: 268 seconds

2017-07-14

[07:31:45] latemus: Ping timeout: 248 seconds
[07:33:26] latemus: has joined #ruby
[08:13:53] latemus: Ping timeout: 248 seconds
[08:15:39] latemus: has joined #ruby
[08:47:12] latemus: Ping timeout: 260 seconds
[08:48:42] latemus: has joined #ruby
[21:47:08] latemus: Ping timeout: 260 seconds
[21:49:17] latemus: has joined #ruby

2017-07-13

[20:26:37] latemus: has joined #ruby

2017-07-12

[04:32:49] latemus: has joined #ruby
[05:20:11] latemus: Quit: leaving

2017-07-09

[12:08:38] latemus: Quit: leaving

2017-07-07

[18:21:12] latemus: Ping timeout: 260 seconds
[19:54:03] latemus: has joined #ruby

2017-07-05

[08:36:49] latemus: Ping timeout: 248 seconds
[08:38:39] latemus: has joined #ruby
[08:45:21] latemus: Ping timeout: 248 seconds
[08:46:31] latemus: has joined #ruby
[09:02:58] latemus: Ping timeout: 276 seconds
[09:04:39] latemus: has joined #ruby
[18:19:10] latemus: Ping timeout: 246 seconds
[18:21:17] latemus: has joined #ruby

2017-07-04

[05:50:57] latemus: Ping timeout: 248 seconds
[05:53:08] latemus: has joined #ruby

2017-07-03

[05:04:15] latemus: has joined #ruby

2017-07-02

[09:14:19] latemus: has joined #ruby
[09:19:55] latemus: Ping timeout: 268 seconds

2017-07-01

[01:01:07] latemus: Ping timeout: 246 seconds
[05:40:51] latemus: has joined #ruby
[05:47:12] latemus: Quit: leaving

2017-06-28

[07:35:23] latemus: Ping timeout: 240 seconds
[07:50:09] latemus: has joined #ruby

2017-06-27

[04:07:42] latemus: has joined #ruby

2017-06-25

[07:03:56] latemus: has joined #ruby
[11:34:43] latemus: Quit: leaving

2017-06-24

[00:23:58] latemus: has joined #ruby
[00:45:53] latemus: Quit: leaving
[05:27:48] latemus: has joined #ruby
[06:53:35] latemus: is a module a ruby library
[06:54:07] latemus: err, is a module the ruby equivalent of a library
[09:03:35] latemus: PorcoRex: ah. thank you
[21:02:47] latemus: Ping timeout: 246 seconds

2017-06-23

[03:37:43] latemus: has joined #ruby
[06:37:26] latemus: Quit: leaving

2017-06-22

[22:52:35] latemus: Ping timeout: 240 seconds

2017-06-21

[00:47:11] latemus: Ping timeout: 246 seconds
[03:23:41] latemus: has joined #ruby
[05:07:26] latemus: Quit: leaving
[06:07:57] latemus: has joined #ruby

2017-06-20

[00:17:10] latemus: *.net *.split
[00:22:59] latemus: has joined #ruby

2017-06-18

[05:47:13] latemus: has joined #ruby

2017-06-17

[06:11:36] latemus: Quit: leaving
[06:26:23] latemus: has joined #ruby
[19:25:07] latemus: Quit: leaving

2017-06-16

[00:46:14] latemus: has joined #ruby
[02:23:31] latemus: Quit: life is bullshit
[04:59:19] latemus: has joined #ruby
[07:02:57] latemus: Ping timeout: 240 seconds
[07:08:41] latemus: has joined #ruby
[18:02:35] latemus: Ping timeout: 240 seconds
[19:52:26] latemus: has joined #ruby
[21:09:38] latemus: Quit: leaving
[21:17:11] latemus: has joined #ruby

2017-06-15

[02:14:26] latemus: has joined #ruby
[05:17:45] latemus: Ping timeout: 268 seconds
[06:42:04] latemus: has joined #ruby
[22:31:12] latemus: Ping timeout: 260 seconds

2017-06-14

[00:45:05] latemus: Quit: leaving

2017-06-13

[06:21:27] latemus: has joined #ruby
[11:54:41] latemus: Quit: leaving
[19:35:22] latemus: has joined #ruby

2017-06-12

[23:16:11] latemus: has joined #ruby
[23:18:08] latemus: Client Quit

2017-06-11

[00:31:00] latemus: has joined #ruby
[04:18:30] latemus: Ping timeout: 240 seconds
[06:46:33] latemus: has joined #ruby
[10:08:51] latemus: Quit: leaving

2017-06-10

[07:12:35] latemus: Ping timeout: 246 seconds
[07:29:54] latemus: has joined #ruby
[19:21:33] latemus: Quit: leaving

2017-06-08

[15:11:06] latemus: has joined #ruby

2017-06-07

[03:03:58] latemus: Ping timeout: 240 seconds

2017-06-05

[00:01:54] latemus: Remote host closed the connection
[00:07:28] latemus: has joined #ruby
[06:50:07] latemus: *.net *.split
[06:50:43] latemus: has joined #ruby