Activity Graph

Page 1 of 16 | Next »


[06:27:27] tobiasvl: *.net *.split
[06:37:54] tobiasvl: has joined #ruby


[03:22:01] tobiasvl: *.net *.split
[03:38:05] tobiasvl: has joined #ruby


[07:42:13] tobiasvl: *.net *.split
[07:53:28] tobiasvl: has joined #ruby
[20:15:21] tobiasvl: *.net *.split


[10:00:58] tobiasvl: Quit: Fedora 30


[16:49:41] tobiasvl: *.net *.split


[13:40:56] tobiasvl: Ping timeout: 276 seconds


[03:29:50] tobiasvl: Ping timeout: 245 seconds


[00:07:04] tobiasvl: *.net *.split
[00:15:34] tobiasvl: has joined #ruby


[05:31:09] tobiasvl: Ping timeout: 276 seconds


[05:16:28] tobiasvl: *.net *.split
[05:35:17] tobiasvl: has joined #ruby


[07:40:10] tobiasvl: Radar: hm. hard to say, not sure how it parses "generic" URIs, but I think the RFC actually requires a scheme
[07:40:41] tobiasvl: so is an invalid scheme
[07:41:13] tobiasvl: not sure why it allows localhost to not have a scheme though
[07:41:36] tobiasvl: oh, hm, there's something called "URI references" that don't need schemes
[07:42:30] tobiasvl: I don't know the RFC well enough unfortunately, but if you know the scheme, it's probably best to include it if possible


[09:15:53] tobiasvl: Ping timeout: 255 seconds


[20:54:01] tobiasvl: fartymcfly: it won't break anything as far as I'm aware. can't imagine it does. but: why?


[18:35:51] tobiasvl: Ping timeout: 240 seconds


[21:29:41] tobiasvl: Ping timeout: 276 seconds


[18:33:26] tobiasvl: Jiaoyin: what do you mean by "doesn't work"
[18:34:30] tobiasvl: Jiaoyin: you should show your code, and explain what "doesn't work", ie. give a good description of the error and what you expect to happen
[18:34:45] tobiasvl: how is Piglet's speak method defined?
[18:36:11] tobiasvl: sorry, too much to read through up there
[18:37:06] tobiasvl: OK, so your speak method does not return anything. when you do `puts + "Hello"` you're saying "print out the return value of and concatenate 'Hello' to it" but there is no reurn value.
[18:38:57] tobiasvl: that's a side effect
[18:39:08] tobiasvl: you probably get an empty line as well
[18:39:52] tobiasvl: when you do `puts` you're saying "call, and print out the return value afterwards". there is no return value. however, when calling, that method itself prints out something
[18:41:03] tobiasvl: returns nil (as you can probably see in irb), because puts itself returns nil. nil basically means "no return value". if you `puts nil`, you just print an empty line (and return nil again).
[18:41:24] tobiasvl: Jiaoyin: if you want to change the speak method to return the string, you must return it using the return keyword
[18:41:28] tobiasvl: are you very new to programming?
[18:42:04] tobiasvl: do you know any other languages? ruby does it similarly to other languages, except that it also returns the value of the last expression if there's no explicit return statement
[18:44:48] tobiasvl: ok, well, python is similar in that print() (the equivalent to puts) returns None (the equivalent to nil)


[02:47:18] tobiasvl: *.net *.split
[02:48:05] tobiasvl: has joined #ruby


[08:23:43] tobiasvl: >> a = 1; h = {a => 2}; h[a]
[08:28:04] tobiasvl: kapil___: what have you tried?
[08:28:43] tobiasvl: it should work exactly as you expect it to, but if you don't know how to expect it to work, maybe just try a little and see? and ask if something doesn't work the way you thought it would
[08:29:03] tobiasvl: like your previous question it's just a matter of syntax
[08:31:20] tobiasvl: ok, yeah, that requires a new bit of syntax
[08:31:22] tobiasvl: @all_modification[@file_name][word2] = s2
[08:31:28] tobiasvl: for example
[08:32:27] tobiasvl: you need to create it first
[08:32:45] tobiasvl: either the way you did above, with an initial value, or just by initializing it as an empty hash: {}
[08:32:49] tobiasvl: then you can add to it
[08:37:32] tobiasvl: kapil___: you could also read the documentation
[08:41:37] tobiasvl: kapil___: please paste long methods like that to like it says in the topic
[08:42:15] tobiasvl: that method uses more advanced ruby functionality. do you know any other programming languages?
[08:50:48] tobiasvl: kapil___: yes, it's OK. it can be written more succintly, or you can use other concise tricks to do the same thing, but it's fine
[12:02:34] tobiasvl: kapil___: what do you want to do in a general sense? compare two strings, ignoring leading whitespace on each line?
[12:04:22] tobiasvl: you can remove all leading whitespace on each line like so: a.gsub(/^\s+/,'')
[12:24:53] tobiasvl: and where are you running it from?
[12:25:06] tobiasvl: what's the cwd in relation to the path you're trying to open?
[12:27:02] tobiasvl: and file.txt is located in /home/ubuntu/workspace/sce_rails/app/sce_umbrella/logs/ ?
[12:27:15] tobiasvl: well then that's why it fails
[12:27:35] tobiasvl: then it should work
[12:28:06] tobiasvl: yes, sorry. the directory not existing is the problem
[12:28:07] tobiasvl: won't create a directory


[22:10:41] tobiasvl: or #learnprogramming even


[11:11:00] tobiasvl: Quit: Fedora 27 -> 28


[17:23:54] tobiasvl: za1b1tsu: what do you mean by "suitable for bash scripting"?
[17:24:15] tobiasvl: bash is its own language
[17:24:58] tobiasvl: bash scripts are written in bash
[17:25:06] tobiasvl: what am I not understanding here
[17:25:27] tobiasvl: ok, so just "scripts"?
[17:25:30] tobiasvl: then yes, sure



[13:20:34] tobiasvl: txdv: what?
[13:23:30] tobiasvl: txdv: what exactly do you want answered here? or what do you want to discuss exactly?
[23:16:46] tobiasvl: *.net *.split


[13:37:15] tobiasvl: dionysus69: it does match (:something || … ) though
[13:39:17] tobiasvl: dionysus69:
[13:42:50] tobiasvl: >> if "something" == (:something || "something" || Model.find_by(code: "something")) then puts "yes" end
[13:43:11] tobiasvl: dionysus69: it works the same, you're just confused as to what it's evaluating
[13:43:35] tobiasvl: ok, I could've used === there too
[13:45:58] tobiasvl: >> puts "evaluated correctly" if 1 === (3 || 2 || 1)
[13:46:14] tobiasvl: you were checking this:
[13:46:26] tobiasvl: puts "evaluated correctly" if ((1 === 3) || 2 || 1)
[13:46:33] tobiasvl: >> puts "evaluated correctly" if ((1 === 3) || 2 || 1)
[13:46:39] tobiasvl: that's not the same.
[13:47:54] tobiasvl: parentheses are used to force an evaluation order, without them standard precedence rules apply
[13:52:33] tobiasvl: dionysus69: yes, in a way, the case condition is "wrapped" in parentheses before comparison. in the way that it's evaluated as an expression, and not actually a text macro that's substituted before evaluation. I guess you can put it that way
[13:53:44] tobiasvl: >> x = 1 || 2; if x === 2 then puts "well" end
[13:54:48] tobiasvl: I love it here in #ruby-offtopic


[12:25:46] tobiasvl: *.net *.split
[12:27:12] tobiasvl: has joined #ruby
[15:01:17] tobiasvl: *.net *.split
[15:03:24] tobiasvl: has joined #ruby


[03:31:12] tobiasvl: Ping timeout: 255 seconds


[07:04:59] tobiasvl: is this basically Steve Yegg's theory, just expanded from the American two-party system to a full political spectrum? :P
[07:11:22] tobiasvl: yeah, I was mostly thinking of this thing
[07:16:44] tobiasvl: I will clap and post the article in a resonse to BOOST your article (I think that's how Medium works)
[07:26:30] tobiasvl: oops, medium seems to have a hiccup. it posted my reply three times, but it still doesn't show up on the article, just on my profile
[07:26:33] tobiasvl: deleted two of them


[11:27:52] tobiasvl: writing an OS in rust? :o


[13:48:52] tobiasvl: Ping timeout: 256 seconds
[13:50:35] tobiasvl: has joined #ruby
[21:27:56] tobiasvl: Janky: deja vu - did you ask the same thing about python in another channel earlier?
[21:37:35] tobiasvl: Janky: I'm a little confused at what you're doing. for each line, you put that line into an array, write that array to the csv, and then clear the array?
[21:37:49] tobiasvl: seems a little redundant
[21:38:19] tobiasvl: so the array you're writing to the csv is supposed to just contain one line?
[21:39:35] tobiasvl: ok, then I guess line 13 should be moved to above what's line 11 now?
[21:39:55] tobiasvl: so that for each line in a txt file, you append that to the array, and then when all the lines are in the array, THEN you write the array to the csv
[21:41:04] tobiasvl: ok. try to understand why I'm suggesting this though.
[21:41:32] tobiasvl: haha. glad to hear it


[09:05:59] tobiasvl: they're not the same thing
[09:46:49] tobiasvl: never add @@


[11:02:35] tobiasvl: arup_r: sorry, what's your specific question? do you know how you want to sort it?
[11:03:35] tobiasvl: /ignore arup_r


[07:26:22] tobiasvl: *.net *.split


[17:00:12] tobiasvl: Ping timeout: 245 seconds


[13:03:42] tobiasvl: Quit: reboot
[14:18:14] tobiasvl: Bergen, wow


[00:20:33] tobiasvl: Ping timeout: 256 seconds


[10:35:42] tobiasvl: a red gemstone


[11:11:48] tobiasvl: yeah, it would be [foo, bar, baz].reduce(&:or)


[13:34:42] tobiasvl: beyer: the readme file has installation instructions
[13:35:02] tobiasvl: did you "bundle install"?
[13:35:29] tobiasvl: ok, I don't know anything about windows, but did you install the bundle?
[13:35:49] tobiasvl: ok so you did not install it
[13:37:43] tobiasvl: ok, well, I don't know anything about windows unfortunately, so maybe someone else can answer
[13:37:57] tobiasvl: but your question is essentially "how do I install bundler on windows" then
[13:39:21] tobiasvl: on linux you would do "gem install bundler"
[13:39:25] tobiasvl: and then "bundle install"
[13:40:18] tobiasvl: the "gem" command comes with ruby
[13:40:23] tobiasvl: maybe this helps
[13:55:51] tobiasvl: beyer: do you have the "gem" command?
[13:58:08] tobiasvl: ok, then do what I said earlier
[13:58:13] tobiasvl: "gem install bundler"
[13:58:23] tobiasvl: then you can follow the installation instructions in the readme
[14:00:08] tobiasvl: ok, never seen that before, but googling "gem install eaddrnotavail" has some results
[14:00:17] tobiasvl: possibly dns configuration
[14:00:53] tobiasvl: the great firewall of china
[14:06:48] tobiasvl: beyer: and is youtube-multiple-dl installed, like the readme says it must be?
[14:07:08] tobiasvl: please just read the installation instructions in the readme now that I helped you get to the point it starts from


[12:06:28] tobiasvl: ziso: an alternative to using classes as namespaces? well, what about using namespaces as namespaces


[14:19:43] tobiasvl: FrostCandy: did you try it?


[12:40:13] tobiasvl: Quit: Power off


[09:25:04] tobiasvl: def foo(n); (10_000 * (1 + ((n - 1) / 10_000))); end
[09:50:55] tobiasvl: apeiros:
[09:59:25] tobiasvl: yes why not nginx
[10:00:12] tobiasvl: noocx: let's turn it around, why did you automatically suggest apache? :P


[11:20:59] tobiasvl: Ping timeout: 255 seconds
[13:50:03] tobiasvl: python lambdas are pretty useless
[13:50:06] tobiasvl: only one statement
[13:50:50] tobiasvl: hehe, yep. but stealing things ruthlessly is fine :)
[13:56:16] tobiasvl: dminuoso: like, physically? norway
[13:57:24] tobiasvl: there's a german actor with the same name as me... pretty sure my last name is originally german
[13:57:38] tobiasvl: by way of denmark
[13:58:03] tobiasvl: no, I live in Norway
[13:58:40] tobiasvl: how so? do I give off continental vibes?
[14:00:10] tobiasvl: hehe. I don't know either
[14:00:31] tobiasvl: more laid back than us cold, introvert scandinavians perhaps
[14:01:46] tobiasvl: yes, that's the stereotype. unfriendly people who don't make eye contact with strangers (but get friendly when we drink, which is often)
[14:03:57] tobiasvl: yeah, not too different


[11:46:52] tobiasvl: Ping timeout: 240 seconds


[12:40:12] tobiasvl: that's nice, I was going to suggest a.to_set == b.to_set (but that requires a require)
[12:40:20] tobiasvl: but yes, non-unique elements are a problem


[11:13:53] tobiasvl: parentheses are the classic example on non-regular language
[11:13:56] tobiasvl: pumping lemma etc
[11:14:05] tobiasvl: ok that was 12 hours ago


[12:00:45] tobiasvl: za1b1tsu: this sounds like rails? try #RubyOnRails


[11:24:23] tobiasvl: Quit: Kernel update
[11:38:17] tobiasvl: has joined #ruby-offtopic
[11:38:17] tobiasvl: has joined #ruby


[18:46:46] tobiasvl: 't even understand that it was rails
[18:47:14] tobiasvl: maybe I should learn enough about rails one day to recognize it when people ask about it here so I can direct them to #RubyOnRails


[10:58:21] tobiasvl: Ping timeout: 265 seconds


[12:58:42] tobiasvl: guillec: well, if you're on a 32-bit system it'll be 4 (4 bytes * 8 bits = 32), if you're on 64-bit it'll be 8 (8 bytes * 8 bits = 64)
[12:59:13] tobiasvl: sdfgsdfg23: neither python nor ruby have semicolons?
[13:03:19] tobiasvl: yeah, the *max* size can be larger
[13:04:25] tobiasvl: sdfgsdfg23: well, the colons in python are needed because of the indentation is syntax thing
[13:11:23] tobiasvl: sdfgsdfg23: why are you bringing python into this? you'll have to ask that at #python


[08:59:32] tobiasvl: Read error: Connection reset by peer


[08:36:45] tobiasvl: KrzaQ: that's not so bad, but there is a way to avoid brute forcing that puzzle, which I suppose most people uses


[10:33:16] tobiasvl: strk: you initialize it
[10:36:01] tobiasvl: hmm. what about writing every scope on a single line?
[22:48:51] tobiasvl: Ping timeout: 240 seconds


[19:26:53] tobiasvl: ule: what do you want to happen if there are several keys named "message_id" in the nested structure?
[19:28:23] tobiasvl: ule: well, in your structure, perhaps, but if ruby had a magic method for it, it would have to consider duplicate keys
[19:28:32] tobiasvl: baweaver: what does it do about duplicate keys
[19:29:17] tobiasvl: ule: I understand that there are no duplicate keys in your specific structure.
[19:29:25] tobiasvl: baweaver: cool
[19:32:27] tobiasvl: class Hash; alias_method :magic, :dig; end


[14:46:35] tobiasvl: megan1993: what framework is this?
[14:46:46] tobiasvl: I have no idea what it is, so can't help, sorry
[14:46:57] tobiasvl: if it's rails, maybe #RubyOnRails can help
[23:56:51] tobiasvl: Ping timeout: 258 seconds


[11:14:18] tobiasvl: slice! for example
[11:44:31] tobiasvl: elisaado: I ignored those years ago
[13:09:06] tobiasvl: sure you can
[13:09:34] tobiasvl: elisaado:
[13:09:56] tobiasvl: filter it on specific channels if you want it on globally
[13:13:08] tobiasvl: has joined #ruby
[13:13:08] tobiasvl: has left #ruby: ()
[13:13:17] tobiasvl: I just did a /cycle


[12:27:23] tobiasvl: should be possible to do ?" " just like :"symbol with space"
[14:48:10] tobiasvl: *.net *.split
[14:54:12] tobiasvl: has joined #ruby-offtopic
[14:54:16] tobiasvl: has joined #ruby


[08:53:26] tobiasvl: apeiros: what. source?
[09:56:15] tobiasvl: I've never had a relationship with apple :P
[13:01:45] tobiasvl: leitao: looks fine to me, should be considered a "small fix" which doesn't need to be discussed on redmine


[06:18:33] tobiasvl: kapil___: do what?
[06:18:47] tobiasvl: oh sorry, didn't see that "I want" part
[08:54:19] tobiasvl:
[10:13:02] tobiasvl: TomyLobo: what about this
[10:13:03] tobiasvl: >> ('A'..'ZZZZ').lazy.class; first(27).last
[10:13:10] tobiasvl: >> ('A'..'ZZZZ').lazy.first(27).last
[10:13:24] tobiasvl: sorry, pasted an itermediate thing I had in irb first
[10:16:51] tobiasvl: well, no, it's not STILL lazy, but the first enumerator was lazy so it only yielded the first 27
[10:17:12] tobiasvl: but those first 27 aren't lazy, they have been yielded
[11:09:07] tobiasvl: TomyLobo: yes
[11:56:32] tobiasvl: well that's why lazy exists
[21:26:17] tobiasvl: mikecmpbll: that's not really possible, but maybe you're looking for "break"? that'll break out of the "each" loop


[02:28:26] tobiasvl: has joined #ruby-offtopic
[02:28:38] tobiasvl: has joined #ruby


[10:08:02] tobiasvl: Ping timeout: 276 seconds


[19:29:59] tobiasvl:
[19:30:05] tobiasvl: found steve's blog posts on it
[19:30:10] tobiasvl: yeah, absolutely, me too
[20:09:02] tobiasvl: Brondius: I'm not familiar with Atom, what would a Ruby package for Atom do?
[20:10:14] tobiasvl: Brondius: OK, so plugins that make Atom into an IDE of sorts for different languages?
[20:11:10] tobiasvl: Brondius: ?
[20:11:31] tobiasvl: I just googled "atom ruby"
[20:20:04] tobiasvl: lol