blubjr

Activity Graph

Page 1 of 2 | Next »

2015-12-02

[01:19:13] blubjr: Remote host closed the connection

2015-12-01

[04:11:32] blubjr: whats your problem
[04:11:43] blubjr: ls -h is for printing file sizes neatly..
[04:15:37] blubjr: if its the tab that does it i would imagine the problem is with whatever completion your bash is configured with
[04:15:47] blubjr: -h is not standard for help on unix
[04:16:50] blubjr: i dont know about how debian's bash comes preconfigured, but that would be where to look
[04:16:58] blubjr: ri wont even be seeing the tab
[04:17:36] blubjr: yes, bash has programmable tab completion
[04:17:57] blubjr: again, ri won't even be seeing the tab. bash is screwing something up
[04:19:43] blubjr: bash has programmable tab completion, ie, it can be set up to complete differently for different commands
[04:20:42] blubjr: the debian maintainers probably did
[07:09:44] blubjr: whats the best way to capitalise the first alpha char in a string
[07:10:22] blubjr: eg '12ab' => '12Ab'
[07:13:45] blubjr: there we go, thank you
[07:14:16] blubjr: thats a very useful function
[07:25:14] blubjr: so im calling a method on an object, using case to pick which method to call. in lisp i would write (funcall (cond (case-1 fn-1) (case-2 fn-2)) obj), is that sort of thing done in ruby, and if so how do you write it, or should i just have when case_1; obj.fn_1; when case_2; obj.fn_2
[19:33:57] blubjr: is there a root printing function that always gets used
[19:35:48] blubjr: i want something like lisp's fresh-line, that prints a newline unless you're already at the start of a line. the only way i can see to do that would be if theres a base printing function, to advise that to watch the last thing printed
[19:36:34] blubjr: and hopefully stdout isnt a special case
[19:38:37] blubjr: i mean i would want it to work regardless of where youre writing to
[19:41:14] blubjr: thank you, ill look into it
[20:50:33] blubjr: Quit: bye
[21:58:07] blubjr: has joined #ruby

2015-11-30

[03:53:32] blubjr: hi ox0dea
[04:15:14] blubjr: its c-x b <ret> to switch back to the last buffer i was looking at and i keep missing the x lately i guess....its very embarrassing
[04:17:06] blubjr: its not so bad
[04:17:51] blubjr: with control on caps lock ?
[04:20:39] blubjr: no im just a babe
[04:22:17] blubjr: i used to, but i decided to stop fighting it a few years ago. its simpler this way
[05:21:10] blubjr: pontiki: (set-face-background 'mode-line "colour")
[17:42:10] blubjr: obviously embedded uses assembler..
[17:55:06] blubjr: bish bursts through a door, all the embedded hackers look up, bish says you could just do this in c, everyone stands up and cheers
[18:19:11] blubjr: Read error: Connection reset by peer
[18:19:49] blubjr: has joined #ruby
[19:07:28] blubjr: oh sorry....its just saying hi
[20:25:41] blubjr: as a kludge you could serialise and unserialise it
[23:34:00] blubjr: is it homework ?

2015-11-29

[03:37:23] blubjr: lynda....
[04:03:40] blubjr: bigmac_: the article looks like its explaining how hashes are implemented rather than how to use them
[04:36:53] blubjr: its good to know how things work, anyway
[05:29:26] blubjr: edj: try saving it as ~/c2f.rb
[11:09:24] blubjr: hi testetest
[22:33:53] blubjr: im padding strings, so ending up with [0, expr].max in a million places, is there a better way to handle that
[22:35:45] blubjr: that isnt flexible enough
[22:36:00] blubjr: i just meant for 'guarding' the expression from going under zero
[22:36:07] blubjr: or do i have to be explicit
[22:43:35] blubjr: im porting a program, and i would prefer to get it working period in ruby before i think about restructuring the whole thing. writing [0, expr].max over and over is cumbersome, thats all, its easy enough to write something to cover that but bounding the ends of an expression is general enough that i thought ruby might have something predefined, thats all i was asking
[22:49:30] blubjr: radar: does ruby have an equivalent shorthand to def bound(x, l, h); x < l ? l : x > h ? h : x; end
[22:50:08] blubjr: i thought you wanted code
[22:50:41] blubjr: ox0dea thank you
[23:02:20] blubjr: the syntax this program uses is {l,h,x} where h is optional, which is really ugly
[23:58:36] blubjr: you probably want a fold

2015-11-27

[04:38:42] blubjr: in ruby, i think you just use private methods jackcom
[04:40:46] blubjr: as the solution of helper functions not polluting your namespace
[04:40:59] blubjr: implementation hiding
[04:41:59] blubjr: radar: am i confused about something
[04:45:04] blubjr: i was asking if i was....you didnt like my first answer and you didn't acknowledge my second
[04:45:21] blubjr: i thought maybe i misunderstood what you were talking about or something
[04:49:38] blubjr: Radar: was there a problem with my answer, i thought it was pretty straight forward
[04:50:36] blubjr: Radar: in languages that have nested functions thats normally where you put them, inside the function they're helping
[11:18:48] blubjr: Ping timeout: 264 seconds

2015-11-26

[02:00:35] blubjr: are you on unix
[02:00:42] blubjr: thats unix
[02:01:05] blubjr: open a terminal and use the file program in it to see
[02:01:36] blubjr: to try typing file foo.gz
[04:01:41] blubjr: whats up big shevy..

2015-11-25

[03:24:43] blubjr: hi zaphon
[07:19:32] blubjr: why do you want to
[07:28:10] blubjr: x.nil? || x.empty?
[07:28:28] blubjr: or is short circuiting, it stops evaluating once it gets its first true value
[07:30:47] blubjr: haha the other day i made the dumbest mistake, i forgot to initialize an array, and then i was seeing that it was nil when i wanted it to be [], but i do a lot of lisp so that didnt register as a problem to me
[09:01:22] blubjr: stop saying 'retarded'
[09:02:42] blubjr: its offensive
[12:02:42] blubjr: >> def f(x, &block); block.call x; end; f(2) {|x| x + 1} # bish
[12:05:58] blubjr: >> def f(x, &block); block.call x; end; def g(&block); f(1, &block); end; g {|x| x + 2}
[12:06:08] blubjr: like that you mean
[12:12:30] blubjr: what exactly did you write
[12:15:41] blubjr: blocks are so ugly

2015-11-24

[00:42:33] blubjr: surface can be an adjective
[00:50:46] blubjr: its etymologically the same i think, the sur is probably from french which i think is from latin super anyway
[03:57:08] blubjr: inject is fold
[03:58:49] blubjr: me neither
[04:41:55] blubjr: >> x = 1; def f; case 2; when 1; x = 2; when 2; x end end; f
[04:42:04] blubjr: can someone explain whats going on there
[04:56:07] blubjr: http://paste.lisp.org/display/160601
[04:56:24] blubjr: so in the b definition, its assuming a is a new local ?
[04:58:47] blubjr: oh i get it
[04:58:53] blubjr: so you cant use a writer from within the class ?
[04:59:47] blubjr: and having the assignment there, unexecuted, is creating a local, causing the later reader call to use the local rather than the reader
[04:59:59] blubjr: thank you
[05:08:05] blubjr: does case introduce a new scope
[05:09:42] blubjr: http://paste.lisp.org/display/160606
[05:10:08] blubjr: good night
[05:11:29] blubjr: coraline is a girls name
[05:20:26] blubjr: ok i get it
[05:20:28] blubjr: thats a little gross
[05:37:01] blubjr: does ruby have anything like lisp's return-from
[05:46:11] blubjr: works for me on osx
[05:52:33] blubjr: mallu: do you understand why your version doesnt work
[05:55:59] blubjr: mallu: thats one way, or you could use a series of ifs. you can use += to append to the end of a string
[05:57:06] blubjr: jerware: how long did you wait before you decided it was hanging
[05:59:48] blubjr: >> s = ''; if 2.even?; s += 'two'; end; s
[06:00:00] blubjr: does that give you an idea
[06:03:23] blubjr: jerware: no idea then, sorry
[06:52:49] blubjr: hi sweetsoulbro
[06:57:06] blubjr: girls exist too
[10:49:52] blubjr: perl 6 looks cool as hell
[12:05:22] blubjr: i thought it was reeeeally stupid
[12:50:22] blubjr: hi dlitvak

2015-11-23

[00:33:41] blubjr: im folding over an array where each element is an array of two elements, where both of those is an array of two elements. is there a way to destructure that into four arguments in the blocks arglist
[00:40:36] blubjr: oh perfect, thank you
[21:59:16] blubjr: hi adaedra

2015-11-22

[01:46:45] blubjr: wow ruby doesnt do tco ?
[01:52:58] blubjr: i just had a recursive function blow up and i was surprised thats all..
[01:55:51] blubjr: thank you
[01:57:58] blubjr: not for this, but its good to be aware of ?
[03:36:10] blubjr: Disconnected by services
[18:50:58] blubjr: is there a way to look at older return values than the last in the repl
[18:58:14] blubjr: whats til
[18:58:56] blubjr: oh thats perfect
[18:58:57] blubjr: thank you
[19:38:33] blubjr: hi very bewitching
[23:26:57] blubjr: youre really close
[23:39:29] blubjr: hi agent white

2015-11-21

[00:20:41] blubjr: i think they're just learning..
[00:38:45] blubjr: lol what a dick

2015-11-20

[04:18:16] blubjr: agent white, my man 1
[18:23:21] blubjr: hi very bewitching
[18:23:27] blubjr: ACTION its me
[20:13:01] blubjr: hi agent white
[20:53:57] blubjr: ascii apl
[23:53:18] blubjr: why did ellistaa want to know
[23:58:18] blubjr: ellistaa: you could use File.file?(file)

2015-11-18

[15:17:59] blubjr: Ping timeout: 240 seconds

2015-11-17

[02:22:55] blubjr: has joined #ruby
[08:09:30] blubjr: oops wrong window
[09:00:27] blubjr: if you know how to program then the language doesn't matter
[09:01:55] blubjr: read the little schemer, then structure and interpretation of computer programs, then make whatever you want to make
[09:19:51] blubjr: hi yorickpeterse
[09:52:53] blubjr: what does ox0dea mean
[13:39:26] blubjr: how do i take array difference comparing with ==
[13:44:19] blubjr: arr1 - arr2 removes elements that are eql, i want to remove elements that are ==
[17:48:58] blubjr: ya i rolled one using it
[17:52:08] blubjr: array_difference
[17:52:25] blubjr: and it just takes a test parameter i dont know why the standard one doesn't
[17:58:58] blubjr: it uses reject..
[17:59:03] blubjr: i missed a 'now' sorry
[17:59:06] blubjr: whats wrong with difference
[18:04:25] blubjr: no, i wrote array's - that takes a test parameter
[18:05:42] blubjr: incorrect
[21:14:34] blubjr: wanting to extend emacs in anything other than elisp is pretty reasonable

2015-11-13

[00:55:27] blubjr: big Ox0dea
[01:17:10] blubjr: what do you mean
[01:19:39] blubjr: Remote host closed the connection

2015-11-12

[00:04:28] blubjr: smalltalk :p
[00:07:52] blubjr: lisp isn't far off
[00:09:16] blubjr: thats why i said not far off, i was excluding it
[00:09:39] blubjr: if could be a method if you were using lisp's object system
[00:09:44] blubjr: it's a historical accident that it isn't
[00:12:01] blubjr: TTilus: well in smalltalk if gets passed closures anyway
[00:12:46] blubjr: i just mean subclassing bool to handle if like smalltalk does
[00:17:22] blubjr: i mean sure i wasn't saying it's not powerful enough to define it, just like you could define it like that if you wanted in lisp, just that neither language comes with it defined like that, it's ugly
[00:17:44] blubjr: in ruby every operation is just sending a message except for some arbitrary things that aren't
[00:17:54] blubjr: everything in java is an object
[00:18:56] blubjr: yorickpeterse: thats what i meant
[00:19:54] blubjr: Ox0dea: i dont see whats wrong with calling ugly things ugly, im just learning ruby lately for a job. i think its better than most languages so far
[00:20:17] blubjr: i think the paul graham essay is stupid but i like lisp too, it's kind of ironic
[01:32:53] blubjr: the part that i think is stupid about that essay is that he thinks lisp is exempt from his criticism for some reason
[01:38:05] blubjr: sorry i guess its double ironic, don't worry about it
[01:39:16] blubjr: thats the joke

2015-11-11

[06:08:39] blubjr: Ping timeout: 240 seconds
[23:58:16] blubjr: is if/else a method in ruby

2015-11-10

[10:18:33] blubjr: oh im an idiot i didnt read far enough down that page
[10:18:37] blubjr: thank you
[11:47:16] blubjr: super without parens implicitly passes arguments up right
[11:52:14] blubjr: blocks are a really ugly wart to me right now still i've only been doing ruby for like a week tho, maybe theyll grow on me
[12:05:31] blubjr: oh, i asked the other day but i dont think anyone answered, does ruby have something like lisp's FRESH-LINE, where it prints a newline unless you're already at the start of the line
[15:02:17] blubjr: is there a tidier alternative to x = foo(); x = default unless bar?(x)
[15:04:44] blubjr: ok thank you
[15:21:32] blubjr: (setf ,place (if (funcall ,pred ,val) ,val ,default)))))
[15:21:32] blubjr: `(let ((,val ,form))
[15:21:32] blubjr: (let ((val (gensym)))
[15:21:32] blubjr: (defmacro or-set (place form pred default)
[15:21:38] blubjr: something like that
[15:21:48] blubjr: in ruby obvs..
[15:22:10] blubjr: common lisp
[15:25:11] blubjr: the closure complicates it
[17:36:55] blubjr: 'p foo' == 'puts foo.inspect'
[17:38:09] blubjr: #to_s on a string is identity..
[18:50:59] blubjr: arup_r: line 2 of helper.rb is initializing search to nil, and line 4 is correctly not overriding that
[18:52:26] blubjr: line 2 of helper.rb is site_name, search = ""
[18:53:25] blubjr: ruby tends to prefer nil to errors
[19:51:35] blubjr: hi not a robot
[21:50:21] blubjr: i thought gem didn't come with ruby until 1.9