« Back to channel list

#ruby - 08 March 2018

« Back 1 day Forward 1 day »
[00:00:11] dmitriy_: has joined #ruby
[00:03:42] SeepingN: Welcome to Freenode. Learn to code, chat with acquaintances, and become a hate monger, all in one convenient service.
[00:04:31] AxelAlex: has left #ruby: ()
[00:05:14] dmitriy_: has joined #ruby
[00:07:34] jenrzzz: has joined #ruby
[00:07:34] jenrzzz: has joined #ruby
[00:08:40] hahuang61: has joined #ruby
[00:08:47] cdg: has joined #ruby
[00:10:10] dmitriy_: has joined #ruby
[00:11:22] Psybur: has joined #ruby
[00:12:23] pastorinni: has joined #ruby
[00:13:03] cschneid: has joined #ruby
[00:13:22] scrptktty__: Hello party cats.
[00:14:07] scrptktty__: Any good talks from past conferences that I should watch?
[00:14:25] scrptktty__: I am looking to have my mind blown
[00:15:12] dmitriy_: has joined #ruby
[00:20:10] dmitriy_: has joined #ruby
[00:24:26] jenrzzz: has joined #ruby
[00:25:15] dmitriy_: has joined #ruby
[00:28:21] X-Jester: if you are using mutual SSL as a connect mechanism between a ruby listener and ruby client, what's the best way to extract the subject and check it against an auth table? just regexp cert.subject.to_s ?
[00:28:45] X-Jester: i just want to grab probably the CN from the x509 principal and rbac based on it
[00:30:16] dmitriy_: has joined #ruby
[00:30:52] cschneid: has joined #ruby
[00:32:12] mjolnird: has joined #ruby
[00:32:54] alfiemax: has joined #ruby
[00:34:59] mcr: has joined #ruby
[00:35:13] dmitriy_: has joined #ruby
[00:35:37] mcr1: has joined #ruby
[00:40:11] dmitriy_: has joined #ruby
[00:45:11] dmitriy_: has joined #ruby
[00:45:43] jenrzzz: has joined #ruby
[00:46:25] cschneid: has joined #ruby
[00:50:12] dmitriy_: has joined #ruby
[00:55:01] n0m4d1c: has joined #ruby
[00:55:11] dmitriy_: has joined #ruby
[00:55:53] lroca: has joined #ruby
[01:00:13] dmitriy_: has joined #ruby
[01:05:12] dmitriy_: has joined #ruby
[01:06:17] vondruch_: has joined #ruby
[01:07:51] cschneid: has joined #ruby
[01:10:03] hahuang61: has joined #ruby
[01:10:12] dmitriy_: has joined #ruby
[01:15:15] dmitriy_: has joined #ruby
[01:18:17] karapetyan: has joined #ruby
[01:18:28] cagomez: has joined #ruby
[01:20:12] dmitriy_: has joined #ruby
[01:22:44] mcr1: has joined #ruby
[01:24:06] karapetyan: has joined #ruby
[01:24:26] naprimer: has joined #ruby
[01:25:11] dmitriy_: has joined #ruby
[01:26:40] bmurt: has joined #ruby
[01:30:13] dmitriy_: has joined #ruby
[01:33:36] jordanm: has joined #ruby
[01:35:06] cpruitt: has joined #ruby
[01:35:15] dmitriy_: has joined #ruby
[01:36:14] cagomez: has joined #ruby
[01:37:21] karapetyan: has joined #ruby
[01:38:53] gnufied: has joined #ruby
[01:40:12] dmitriy_: has joined #ruby
[01:45:11] dmitriy_: has joined #ruby
[01:45:49] cagomez: has joined #ruby
[01:50:12] dmitriy_: has joined #ruby
[01:55:14] dmitriy_: has joined #ruby
[01:57:19] Emmanuel_Chanel: has joined #ruby
[02:00:14] dmitriy_: has joined #ruby
[02:05:14] dmitriy_: has joined #ruby
[02:05:45] cpruitt: has joined #ruby
[02:10:15] dmitriy_: has joined #ruby
[02:11:27] Jameser: has joined #ruby
[02:12:27] hahuang61: has joined #ruby
[02:14:04] cschneid: has joined #ruby
[02:15:22] dmitriy_: has joined #ruby
[02:19:23] cschneid: has joined #ruby
[02:20:23] cpruitt: has joined #ruby
[02:20:24] dmitriy_: has joined #ruby
[02:24:21] cdg: has joined #ruby
[02:25:26] dmitriy_: has joined #ruby
[02:26:15] netherwolfe_: has joined #ruby
[02:28:36] cschneid: has joined #ruby
[02:29:16] dinfuehr: has joined #ruby
[02:30:26] dmitriy_: has joined #ruby
[02:44:50] iMadper: has joined #ruby
[02:47:13] cdg: has joined #ruby
[02:47:50] stairmast0r: has joined #ruby
[02:50:38] milardovich: has joined #ruby
[02:52:34] gizmore: has joined #ruby
[02:53:33] cpruitt: has joined #ruby
[02:54:42] minimalism: has joined #ruby
[03:00:10] cadillac_: has joined #ruby
[03:00:28] ramfjord: has joined #ruby
[03:02:49] bmurt: has joined #ruby
[03:04:03] bonhoeffer: has joined #ruby
[03:04:24] cagomez: has joined #ruby
[03:04:27] bonhoeffer: why is this printing the whole line when a match occurs: ruby -ne "print $1 if /001 (\d{2}\/\d{2}\/2017)\s\d{2}\/\d{2}\/2017/" data.txt
[03:13:23] hahuang61: has joined #ruby
[03:19:20] bruce_lee: has joined #ruby
[03:27:04] cdg: has joined #ruby
[03:27:30] meinside: has joined #ruby
[03:28:19] jeffreylevesque: has joined #ruby
[03:30:18] bonhoeffer: has joined #ruby
[03:30:53] bonhoeffer: i'm still struggling with how to get a match with ruby -ne "print $1 if /hello (world)/"
[03:30:59] bonhoeffer: the whole line prints
[03:31:59] bonhoeffer: should i use =~
[03:33:51] rhizome: has joined #ruby
[03:38:20] govg: has joined #ruby
[03:44:04] ryzokuken13: has joined #ruby
[03:45:27] darkhanb: has joined #ruby
[03:47:36] cschneid: has joined #ruby
[03:47:56] dmitriy_: has joined #ruby
[03:48:26] cpruitt: has joined #ruby
[03:57:02] Ryzokuken: has joined #ruby
[04:01:01] Gnut: has joined #ruby
[04:01:17] cagomez: has joined #ruby
[04:04:51] cpruitt: has joined #ruby
[04:06:20] hahuang61: has joined #ruby
[04:09:58] kies: has joined #ruby
[04:19:45] fclausen: has joined #ruby
[04:23:47] schneider: has joined #ruby
[04:25:33] trautwein: has joined #ruby
[04:26:17] karapetyan: has joined #ruby
[04:26:50] milardovich: has joined #ruby
[04:29:29] anisha: has joined #ruby
[04:31:26] s2013: has joined #ruby
[04:32:43] Sonja: has joined #ruby
[04:41:09] kapil___: has joined #ruby
[04:50:15] Cohedrin: has joined #ruby
[04:54:23] cpruitt: has joined #ruby
[05:12:29] hahuang61: has joined #ruby
[05:18:07] milardovich: has joined #ruby
[05:20:07] cpruitt: has joined #ruby
[05:29:33] awebdev: has joined #ruby
[05:32:26] orbyt_: has joined #ruby
[05:34:32] dviola: has joined #ruby
[05:35:47] ramfjord: has joined #ruby
[05:41:04] suukim: has joined #ruby
[05:41:55] cpruitt: has joined #ruby
[05:42:34] cdg: has joined #ruby
[05:43:06] sidx64: has joined #ruby
[05:49:30] dmitriy_: has joined #ruby
[05:54:45] ramfjord: has joined #ruby
[06:00:38] iMadper: has joined #ruby
[06:03:46] cschneid: has joined #ruby
[06:04:51] havenwood: bon, ah they left.
[06:04:56] havenwood: ruby -ne "print Regexp.last_match[1] if /hello (world)/"
[06:07:00] hahuang61: has joined #ruby
[06:07:42] nowhere_man: has joined #ruby
[06:11:46] newpy: has joined #ruby
[06:12:11] newpy: if I'm making a web UI (with a little javascript), what advantages might ruby have over python?
[06:15:50] havenwood: newpy: Either should be perfectly fine. This is #ruby so folk here tend to prefer Ruby.
[06:16:08] havenwood: (I prefer Ruby!) :-)
[06:16:21] newpy: +1 for humility
[06:16:53] cjohnson: newpy: The better tool is the one you are more familiar with
[06:17:11] cjohnson: That said ruby does tend to have a more developed ecosystem around web stuff
[06:17:50] cjohnson: Better tooling, platform options, wider selection of libs and such that are commonly used for web stuff
[06:19:29] newpy: havenwood, cjohnson, are there good interactive tutorials?
[06:20:07] havenwood: newpy: http://tryruby.org/ starts with the very basics.
[06:20:08] newpy: or I guess just solid textbooks would do
[06:20:24] havenwood: newpy: Here's a list of books: https://goo.gl/wpGhoQ
[06:20:45] havenwood: newpy: And links to other resources: https://ruby-community.com/pages/links
[06:21:04] havenwood: newpy: https://www.ruby-lang.org/en/documentation/
[06:22:24] aufi: has joined #ruby
[06:24:48] LocaMocha: has joined #ruby
[06:26:55] vondruch: has joined #ruby
[06:27:48] LocaMocha: has joined #ruby
[06:28:33] LocaMocha: has joined #ruby
[06:31:33] LocaMocha: has joined #ruby
[06:34:53] nicesignal: has joined #ruby
[06:50:16] dmitriy_: has joined #ruby
[06:51:51] cschneid: has joined #ruby
[06:53:31] govg: has joined #ruby
[06:54:47] mtkd: has joined #ruby
[06:58:05] sidx64: has joined #ruby
[06:59:05] anisha: has joined #ruby
[07:04:04] caoraivoso: has joined #ruby
[07:04:19] caoraivoso: rubycoder38 with my fancy new nick here
[07:04:54] caoraivoso: ACTION waves
[07:08:01] hahuang61: has joined #ruby
[07:10:33] havenwood: heh: https://github.com/ruby/bigdecimal/issues?q=is%3Aissue+author%3ATectract
[07:11:27] sidx64_: has joined #ruby
[07:11:27] havenwood: Maintaining open source can be tough sometimes! :-O
[07:12:58] havenwood: https://bugs.ruby-lang.org/issues/14588
[07:13:26] havenwood: ACTION backs away slowly
[07:13:27] havenwood: ACTION runs
[07:14:01] lpmusic_: has joined #ruby
[07:15:12] _whitelogger: has joined #ruby
[07:16:31] sidx64: has joined #ruby
[07:18:16] newpy: has left #ruby: ("Closing Window")
[07:20:06] kloeri_: has joined #ruby
[07:28:32] conta: has joined #ruby
[07:28:38] orbyt_: has joined #ruby
[07:29:08] cpruitt: has joined #ruby
[07:37:59] schneider: has joined #ruby
[07:39:32] llua: he is loony
[07:39:55] jamesaxl: has joined #ruby
[07:45:38] andikr: has joined #ruby
[07:49:38] minimalism: has joined #ruby
[07:54:27] ramfjord: has joined #ruby
[07:55:12] dminuoso: havenwood: It seems you're wanting Ruby to be weakly typed. Ruby is strongly typed and is likely to stay that way.
[07:55:13] dminuoso: havenwood: Say what?
[07:56:21] tAn: has joined #ruby
[07:56:27] dminuoso: havenwood: I would argue that duck typing is about the weakest typing you could possibly have.
[07:56:49] dminuoso: And there's plenty places where things are silently coerced into other types
[07:56:52] rippa: has joined #ruby
[07:56:57] dminuoso: Which is why things like to_hash, to_ary and others are in place
[07:58:31] dminuoso: ACTION waits for the inevitable counter argument
[08:00:18] dminuoso: But it is a hilarious bug report.
[08:02:12] karapetyan: has joined #ruby
[08:04:41] sidx64: has joined #ruby
[08:04:43] caoraivoso: why duck typing and not dog typing?
[08:05:11] dminuoso: caoraivoso: If it barks like a dog and bites like a dog, it is a doh?
[08:07:03] cpruitt: has joined #ruby
[08:08:03] caoraivoso: I'm a dog and sometimes I bark, but ruby makes me a happy dog
[08:08:42] dminuoso: havenwood: Though ultimately in a singly typed language, the notion of "weak/strong" is useless.
[08:08:50] dminuoso: So I guess it is a moot point.
[08:09:17] swemoney: has joined #ruby
[08:09:20] burgestrand: has joined #ruby
[08:09:43] hahuang61: has joined #ruby
[08:10:32] s2013: has joined #ruby
[08:15:59] aufi: has joined #ruby
[08:16:04] mtkd: has joined #ruby
[08:22:26] TomyWork: has joined #ruby
[08:25:47] milardovich: has joined #ruby
[08:33:20] aufi: has joined #ruby
[08:36:29] claudiuinberlin: has joined #ruby
[08:40:55] clemens3: has joined #ruby
[08:41:44] vondruch_: has joined #ruby
[08:42:19] Sylario: has joined #ruby
[08:42:34] jenrzzz: has joined #ruby
[08:42:34] jenrzzz: has joined #ruby
[08:47:42] aufi: has joined #ruby
[08:47:53] vondruch: has joined #ruby
[08:51:54] aufi_: has joined #ruby
[08:52:38] apeiros_: has joined #ruby
[08:56:28] marr: has joined #ruby
[08:56:35] mikecmpbll: has joined #ruby
[08:59:55] maufart__: has joined #ruby
[09:00:08] vondruch: has joined #ruby
[09:02:26] alex``: has joined #ruby
[09:03:36] vondruch: has joined #ruby
[09:06:29] tomphp: has joined #ruby
[09:10:25] Zaab1t: has joined #ruby
[09:11:39] LocaMocha: has joined #ruby
[09:13:03] hahuang61: has joined #ruby
[09:13:57] tomphp: has joined #ruby
[09:17:20] devil_tux: has joined #ruby
[09:17:53] cpruitt: has joined #ruby
[09:21:21] sidx64: has joined #ruby
[09:23:05] schneider: has joined #ruby
[09:29:27] cpruitt: has joined #ruby
[09:30:19] jenrzzz: has joined #ruby
[09:30:19] jenrzzz: has joined #ruby
[09:30:25] aufi_: has joined #ruby
[09:32:38] amatas: has joined #ruby
[09:33:54] cschneid: has joined #ruby
[09:40:48] vondruch: has joined #ruby
[09:44:42] cpruitt: has joined #ruby
[09:47:36] RougeR: has joined #ruby
[09:49:01] fribmendes: has joined #ruby
[09:51:17] gregf_: has joined #ruby
[09:54:14] ramfjord: has joined #ruby
[09:58:07] ltt: has joined #ruby
[09:58:08] Beams: has joined #ruby
[09:59:11] karapetyan: has joined #ruby
[10:00:19] InfinityFye: has joined #ruby
[10:01:33] InfinityFye: has left #ruby: ()
[10:01:49] ams__: has joined #ruby
[10:02:01] cadillac_: has joined #ruby
[10:09:17] ncopa2: has joined #ruby
[10:10:44] suukim: has joined #ruby
[10:11:03] ncopa2: hi, im looking into stack size issue in ruby on musl libc. will ruby spawn threads internally (eg recursive funcs)?
[10:11:20] ncopa2: will ruby spawn any threads without Thread.new?
[10:11:28] dminuoso: ncopa2: Yes.
[10:11:29] jenrzzz: has joined #ruby
[10:11:29] jenrzzz: has joined #ruby
[10:11:43] kinduff[m]: has joined #ruby
[10:12:00] kinduff[m]: good morning
[10:12:24] ncopa2: ruby 2.5.0 introduces a stack overflow check
[10:12:31] hahuang61: has joined #ruby
[10:12:47] ncopa2: with ruby 2.4 there could be up to ~1000 call deep
[10:13:01] ncopa2: with ruby 2.5 its only ~130
[10:13:07] ncopa2: and it causes problems
[10:13:59] ncopa2: musl libc only has 128k thread stack
[10:14:10] ncopa2: but main thread still has 8Mb
[10:17:35] dminuoso: ncopa2: in 2.4 there were some non trivial changes to the way stackoverflows are detected.
[10:17:46] workmad3: has joined #ruby
[10:18:17] ncopa2: i figured
[10:18:32] ncopa2: i think the current stack size calculation is broken
[10:18:37] dminuoso: ncopa2: There isn't much documentation about it, I just know the patches exist (without any bug report - in English)
[10:18:56] dminuoso: ncopa2: Are you using recursion?
[10:19:04] ncopa2: this is the bug i'm working on: https://bugs.ruby-lang.org/issues/14387
[10:19:19] dminuoso: ncopa2: Let me dig up the relevant commit
[10:19:37] dminuoso: ncopa2: 9c927f8c8b
[10:19:43] ncopa2: testcase: http://tpaste.us/DeYO
[10:19:57] ncopa2: yes i foudn that commit
[10:20:34] dminuoso: That commit was necessary to prevent VM corruption in some weird cases.
[10:20:47] ncopa2: i think that is perfectly fine
[10:20:59] ncopa2: thread_pthread.c has a get_stack() which i think is broken
[10:21:11] aufi_: has joined #ruby
[10:21:26] dminuoso: ncopa2: Can you elaborate how?
[10:22:42] ncopa2: main thread, the process (eg no pthread_create() called) has 8MB stack size
[10:22:46] dminuoso: ncopa2: Can you try unapplying the commit I referenced, and see if it changes the possible stack depth?
[10:23:19] ncopa2: default pthread stack size is 128k (80k on older musl)
[10:23:39] ncopa2: pthread_attr_getstacksize() returns the *stack* size, which is 128k
[10:23:57] ncopa2: and ruby thinks that is all it has
[10:24:25] ncopa2: i'll test rever the commit
[10:25:43] cschneid: has joined #ruby
[10:26:07] dminuoso: ncopa2: Also what system are you on?
[10:26:18] ncopa2: alpine linux, x86_64
[10:26:25] bigblind: has joined #ruby
[10:26:31] DaniG2k: has joined #ruby
[10:26:31] ncopa2: using musl libc instead of glibc
[10:30:11] cschneid: has joined #ruby
[10:30:32] dminuoso: ncopa2: This is impossible with this ifdefitis going on. I'd have to rebuild with musl myself.
[10:30:44] dminuoso: Cant do this without lldb/gdb.
[10:30:51] cpruitt: has joined #ruby
[10:31:00] dminuoso: This is Ruby code at its worst.
[10:31:16] rabajaj: has joined #ruby
[10:31:32] dminuoso: ncopa2: You wouldn't happen to have a docker container you could just send me, would you?
[10:35:26] ncopa2: almost. this one here builds ruby for you in alpine: https://github.com/koshigoe/ruby-2.5.0-stack-level-too-deep/blob/master/trunk/Dockerfile
[10:35:33] ncopa2: he has a different test
[10:35:45] ncopa2: but its the same problem
[10:36:39] dminuoso: ncopa2: Is that also against musl?
[10:36:51] ncopa2: FROM alpine ....
[10:37:01] dminuoso: Ah. Yeah nvm
[10:37:18] ncopa2: what i wonder is if pthread_attr_getstacksize() is supposed to return the *current* running thread, or the stack size you will get when you do pthread_create
[10:37:59] ncopa2: if its the former, then musl should be fixed (but then you also have a problem to know when thread stack size is too small)
[10:38:10] ncopa2: if its the latter, then ruby get_Stack is broke
[10:38:55] mikecmpbll: has joined #ruby
[10:38:59] ltt: has joined #ruby
[10:39:18] jenrzzz: has joined #ruby
[10:40:59] dminuoso: ncopa2: Im gonna go grab some lunch. It will take a real while, because Im doing compiling GHC in the background, so there's not much CPU time available on my machine. ;-)
[10:41:39] ncopa2: reverting the 9c927f8c8b makes the test case pass
[10:41:41] _phaul: has joined #ruby
[10:42:22] ncopa2: i think checking the stack size is good, but we need calculate the stack size of the current running thread correctly
[10:42:32] dminuoso: ncopa2: Yeah. Sadly you cant just revert the commit, because that will allow the GC while you're at the stack end to completely trash the RubyVM.
[10:42:46] ncopa2: i dont think reverting it is the proper solution
[10:43:27] ncopa2: we may also need have a minimal required thread stack size, and pthread_attr_setstacksize() if default thread stack is too small
[10:43:32] ncopa2: but that is different issue
[10:45:25] cpruitt: has joined #ruby
[10:45:41] ncopa2: some comments i did to show which #ifdef musl ends up with + printf debugging im currently doing: http://tpaste.us/B6xW
[10:47:08] sidx64: has joined #ruby
[10:48:05] agent_white: has joined #ruby
[10:48:40] Fusselgesicht: has joined #ruby
[10:51:40] adlerdias: has joined #ruby
[10:56:41] kapil___: has joined #ruby
[10:59:26] sidx64: has joined #ruby
[11:02:16] jottr: has joined #ruby
[11:06:21] cpruitt: has joined #ruby
[11:06:51] Jameser: has joined #ruby
[11:07:08] hahuang61: has joined #ruby
[11:10:11] ncopa2: correction. musl pthread stack size is still only 80k
[11:13:01] Jameser: has joined #ruby
[11:14:50] jenrzzz: has joined #ruby
[11:18:08] ledestin: has joined #ruby
[11:23:21] ltt: has joined #ruby
[11:29:27] Psybur: has joined #ruby
[11:29:27] Psybur: has joined #ruby
[11:33:24] karapetyan: has joined #ruby
[11:34:09] voker57: has joined #ruby
[11:34:09] voker57: has joined #ruby
[11:39:52] cpruitt: has joined #ruby
[11:40:04] shinnya: has joined #ruby
[11:45:04] nme13: has joined #ruby
[11:45:19] nme13: need help with date comparison
[11:45:40] nme13: seems Ruby has its own reality for this...
[11:46:18] matti: Might be :)
[11:46:36] zautomata1: has joined #ruby
[11:47:28] ltt: has joined #ruby
[11:48:42] ldnunes: has joined #ruby
[11:51:10] apeiros_: nme13: do you intend to actually ask a question?
[11:51:55] alex``: has joined #ruby
[11:51:58] jenrzzz: has joined #ruby
[11:51:58] jenrzzz: has joined #ruby
[11:52:13] Cavallari: has joined #ruby
[11:53:13] Papierkorb: has joined #ruby
[11:53:22] Papierkorb: has left #ruby: ("Konversation terminated!")
[11:54:03] dminuoso: apeiros: Btw.. apparently turning off the monitor in a macbook is controlled by a magnet..
[11:54:36] nadir: has joined #ruby
[11:54:41] dminuoso: apeiros: If you have one macbook on your lap (with the lid closed), and keep another one ontop, the display will just shut off
[11:55:04] dminuoso: (Which happens rather frequently when Im sitting in the train with a coworker, and he hands me his macbook, while I close the lid of mine and place his ontop)
[11:57:25] apeiros: somewhere in the back of my head I actually knew that :D
[11:58:01] apeiros: and I guess nme13 didn't actually need any help :-/
[11:58:39] cpruitt: has joined #ruby
[12:02:27] tsht: has joined #ruby
[12:02:57] dminuoso: apeiros: If you were to use a minimalistic parser combinator library to parse things, down to even things you would otherwise regex with, how relevant would performance be?
[12:03:31] dminuoso: Im not convinced I can make this work with Ruby's execution model.
[12:04:01] bonhoeffer: has joined #ruby
[12:08:05] apparition: has joined #ruby
[12:08:41] hahuang61: has joined #ruby
[12:09:11] ferr1: has joined #ruby
[12:09:35] bonhoeffer: ruby -nle "print $1 if /abc(\d+)/" textfile.txt <-- gives the whole line, any tips?
[12:10:41] dminuoso: ncopa2: Btw, Ill take a look after work, if you still happen to be around.
[12:11:04] apeiros: dminuoso: that would depend a lot on what I'd intend to use the parser for
[12:11:30] apeiros: but so far in most of my use cases where I had to write my own parser, I specifically did it because performance of existing solutions was bad
[12:11:34] dminuoso: apeiros: I guess its a catch 22.
[12:12:00] bonhoeffer: there is also something like: ruby -pe 'next unless $_ =~ /regexp/' < file.txt
[12:12:05] Terens: has joined #ruby
[12:12:10] cpruitt: has joined #ruby
[12:12:13] ncopa2: dminuoso: great, thanks. I think the problem is that pthread_getattr_np(pthread_self()) does not give the "correct" stack size on musl
[12:12:21] ncopa2: it give you the number the kernel guarantee you
[12:12:22] dminuoso: apeiros: I guess what I really need, is to fake monadic combination without actually doing it.
[12:12:29] dminuoso: Because I cant afford blowing up the callstack.
[12:14:06] tvw: has joined #ruby
[12:15:40] bonhoeffer: i'm thinking it isn't possible to print a match in one line -- takes perl or GNU egrep
[12:17:11] sidx64: has joined #ruby
[12:17:21] Jameser: has joined #ruby
[12:18:56] apeiros: bonhoeffer: hm? `ruby -ne 'print $_[regex]' inputfile` works fine for me
[12:19:16] dcluna: has joined #ruby
[12:20:29] thinkpad: has joined #ruby
[12:21:02] bonhoeffer: ruby -ne "print $_[/001/]" text.txt zsh: bad math expression: operand expected at `/001/'
[12:21:11] dminuoso: apeiros: https://gist.github.com/dminuoso/a6acd89852a95f094dfa47e9772676af
[12:21:14] dminuoso: apeiros: Do you find it visually pleasing?
[12:21:18] mtkd: has joined #ruby
[12:21:25] bonhoeffer: ruby -ne "print $_[001]" All.txt -> -e:1:in `<main>': uninitialized constant A (NameError)
[12:21:36] bonhoeffer: missing something
[12:21:42] apeiros: bonhoeffer: you're having difficulties with your shell I think…
[12:21:47] apeiros: you probably should use single quotes
[12:22:13] apeiros: -ne ', instead of -ne "
[12:22:17] dminuoso: apeiros: (To elaborate, >> sequences two parsers, but ignores the output of the first, while >-> lets you tap into the previous parsers result, and then run a new parser)
[12:22:37] apeiros: dminuoso: that looks haskellish? :D
[12:22:46] dminuoso: apeiros: Its 100% ruby!
[12:22:56] apeiros: I figure from the .rb in the filename
[12:23:13] apeiros: do you use the superators gem or did you roll your own proxying code?
[12:23:16] bonhoeffer: apeiros: got it -- but is there a way to extract a match $1 from that
[12:23:22] dminuoso: apeiros: what proxying code are you talking about?
[12:23:25] dminuoso: apeiros: There's no magic here.
[12:23:30] dminuoso: apeiros: It's pure and honest ruby.
[12:23:31] apeiros: bonhoeffer: $_[regex, 1]
[12:23:48] apeiros: dminuoso: >->
[12:23:54] apeiros: that's a method chain, no?
[12:23:55] dminuoso: apeiros: That's just > followed by a lambda ;)
[12:24:41] Jameser: has joined #ruby
[12:24:59] apeiros: dminuoso: can't really judge how pleasing I find the whole. it looks nice.
[12:25:25] apeiros: but my experience with parsers is, that small parsers always look nice. the moment you reveal the full grammar they become a horrible abyss which doesn't stop staring back at you.
[12:25:51] bonhoeffer: wow apeiros -- is there a link on this? i haven't seen this feature before -- thanks a lot for the nudge
[12:26:03] dminuoso: apeiros: That's the beauty about parser combinators. They retain their looks. The only limitations is that you cant parse all grammars with it.
[12:26:17] bonhoeffer: it is working, but all on one line -- puts gives me lots of blank spaces
[12:26:31] apeiros: I did wonder why you used print.
[12:26:36] apeiros: I assumed it was intentional.
[12:26:44] jenrzzz: has joined #ruby
[12:27:15] apeiros: but adding a newline when you have a match surely isn't that difficult, no?
[12:27:26] dminuoso: apeiros: The thing is, it's just a technique of combinatorically constructing recursive descent parsers.
[12:27:42] karapetyan: has joined #ruby
[12:27:42] bonhoeffer: apeiros: fair point -- + "\n"
[12:27:54] dminuoso: apeiros: And because of that, it's easy to construct complex parsers without things ever looking more complicated than what you have just seen.
[12:28:59] bonhoeffer: no, i'm missing something -- there seems to be a conditional hidden in there, if I had + "\n" i get problems with the nil case
[12:29:10] dminuoso: kind of wish I could somehow rig <* and *> in
[12:29:29] apeiros: bonhoeffer: ruby -ne 'print($_ =~ regex ? "#$1\n" : nil)'
[12:29:58] apeiros: there are probably more compact ways
[12:30:10] apeiros: but it's not like I want to waste time golfing this
[12:31:30] bonhoeffer: yeah -- works well, thanks
[12:33:35] bonhoeffer: apeiros: just for my understanding what do you call the operation $_[regex, 1] so I can look up the docs on that
[12:33:55] bonhoeffer: it looks like implicit =~ on a string
[12:34:10] apeiros: &ri String#[] bonhoeffer
[12:34:10] `derpy: bonhoeffer: http://ruby-doc.org/core-2.4.1/String.html#method-i-5B-5D
[12:34:19] apeiros: remember, [] is just a method in ruby
[12:34:26] apeiros: as are []=, +, - etc.
[12:34:49] apeiros: so all you have to do is determine which class the receiver has and voilà, there you look it up (don't forget ancestry)
[12:35:14] bonhoeffer: str[regexp, capture] → new_str or nil -- great -- thanks
[12:40:42] AJA4350: has joined #ruby
[12:42:26] karapetyan: has joined #ruby
[12:43:11] konsolebox: has joined #ruby
[12:44:07] DaniG2k: has joined #ruby
[12:45:29] cpruitt: has joined #ruby
[12:48:07] morfin: has joined #ruby
[12:48:59] morfin: i need some help here: i can't install mysql2 on FreeBSD because bundle install saying -liconv is not found but i have it installed from ports
[12:55:49] morfin: i guess better ask on #freebsd
[12:56:00] cpruitt: has joined #ruby
[12:58:10] Terens: maybe needs some headers etc
[13:04:08] Beams: has joined #ruby
[13:04:42] Cavallari1: has joined #ruby
[13:06:52] Mia: has joined #ruby
[13:06:53] Mia: has joined #ruby
[13:08:33] Beams: has joined #ruby
[13:09:17] nowhereman_: has joined #ruby
[13:12:37] hahuang61: has joined #ruby
[13:16:33] TvL: has joined #ruby
[13:16:43] cpruitt: has joined #ruby
[13:18:53] ltt: has joined #ruby
[13:21:51] thinkpad: has joined #ruby
[13:27:03] papajo: has joined #ruby
[13:30:12] bmurt: has joined #ruby
[13:31:40] jenrzzz: has joined #ruby
[13:32:24] guille-moe: has joined #ruby
[13:33:02] DaniG2k: has joined #ruby
[13:34:29] chouhoulis: has joined #ruby
[13:34:34] cpruitt: has joined #ruby
[13:35:56] chouhoul_: has joined #ruby
[13:38:45] Terens: is there a way to proff
[13:41:04] ltt: has joined #ruby
[13:42:52] cpruitt: has joined #ruby
[13:44:06] guille-moe: has joined #ruby
[13:44:20] apeiros: terens: what is proff?
[13:48:10] DaniG2k: has joined #ruby
[13:53:50] konsolebox: has joined #ruby
[13:55:57] jcalla: has joined #ruby
[13:57:40] sidx64: has joined #ruby
[13:59:59] ineb: How to get to Proff Gatekjøkken in Bergen. By Bus or Train.
[14:00:09] cpruitt: has joined #ruby
[14:00:20] jeffreylevesque: has joined #ruby
[14:02:23] Puffball: has joined #ruby
[14:05:58] chouhoulis: has joined #ruby
[14:06:47] hahuang61: has joined #ruby
[14:07:38] Beams: has joined #ruby
[14:08:26] netherwolfe: has joined #ruby
[14:09:19] bigblind: has joined #ruby
[14:09:33] Ethan: ineb: google.com
[14:11:54] aufi_: has joined #ruby
[14:15:09] ineb: that is correct. that is correct
[14:16:04] aupadhye: has joined #ruby
[14:16:08] sidx64: has joined #ruby
[14:18:14] tobiasvl: Bergen, wow
[14:18:48] govg: has joined #ruby
[14:20:47] cpruitt: has joined #ruby
[14:22:58] BTRE: has joined #ruby
[14:25:18] jottr: has joined #ruby
[14:26:09] alex``: has joined #ruby
[14:27:03] nowhere_man: has joined #ruby
[14:35:26] cpruitt: has joined #ruby
[14:35:46] krawchyk: has joined #ruby
[14:37:25] jordanm: has joined #ruby
[14:37:40] JoshS: has joined #ruby
[14:38:21] DLSteve_: has joined #ruby
[14:39:52] jenrzzz: has joined #ruby
[14:39:52] jenrzzz: has joined #ruby
[14:45:23] ltt: has joined #ruby
[14:47:21] alex``: has joined #ruby
[14:48:06] memo1: has joined #ruby
[14:50:47] Beams: has joined #ruby
[14:55:07] ramfjord: has joined #ruby
[14:55:32] pastorinni: has joined #ruby
[14:56:02] milardov_: has joined #ruby
[14:57:29] apeiros__: has joined #ruby
[14:59:22] gnufied: has joined #ruby
[15:00:43] gnufied: has joined #ruby
[15:01:50] memo1: has joined #ruby
[15:01:55] darix: has joined #ruby
[15:06:01] hahuang61: has joined #ruby
[15:06:59] John_Ivan: has joined #ruby
[15:08:29] Rapture: has joined #ruby
[15:09:03] TvL: has joined #ruby
[15:17:11] za1b1tsu: has joined #ruby
[15:19:01] bmurt: has joined #ruby
[15:20:17] sonne: has joined #ruby
[15:22:19] karapetyan: has joined #ruby
[15:23:20] synthroid: has joined #ruby
[15:23:50] rrutkowski: has joined #ruby
[15:24:51] rrutkowski: has joined #ruby
[15:26:19] rrutkowski: has joined #ruby
[15:29:37] rrutkowski: has joined #ruby
[15:29:40] apeiros: has joined #ruby
[15:31:02] konsolebox: has joined #ruby
[15:32:46] karapetyan: has joined #ruby
[15:33:43] cthulchu: has joined #ruby
[15:35:56] ddsad: has joined #ruby
[15:36:51] apeiros: has joined #ruby
[15:38:57] Gnut: has joined #ruby
[15:39:08] lroca: has joined #ruby
[15:39:48] lpmusic: has joined #ruby
[15:44:02] mtkd: has joined #ruby
[15:46:29] jamesaxl: has joined #ruby
[15:47:54] rrutkowski: has joined #ruby
[15:49:03] mustmodify_: has joined #ruby
[15:49:50] Drazha: has joined #ruby
[15:49:57] brent__: has joined #ruby
[15:51:36] jenrzzz: has joined #ruby
[15:51:36] jenrzzz: has joined #ruby
[15:55:09] Drazha: Hi guys, I have a Ruby related question
[15:55:14] Drazha: the code can be seen here: https://pastebin.com/QfrRtYgH
[15:55:16] ruby[bot]: Drazha: we in #ruby do not like pastebin.com, I reposted your paste to gist for you: https://gist.github.com/3326476303ebe3f37011ba5caa57cb8d
[15:55:16] ruby[bot]: Drazha: pastebin.com loads slowly for most, has ads which are distracting and has terrible formatting.
[15:55:59] Drazha: in the first example, I get a list of 175 rows, each row as it should be...
[15:56:06] rrutkowski: has joined #ruby
[15:56:23] Drazha: in second example, I get 175 rows populated with the data from the last data row
[15:56:30] Drazha: anyone has any suggestions?
[15:56:45] dminuoso: &ri select_all
[15:56:45] `derpy: No results
[15:56:49] jamesaxl: has joined #ruby
[15:57:07] dminuoso: Drazha: select_all is not part of standard ruby API. What gem are you using, and can you elaborate what that last statement means exactly?
[15:58:15] rrutkowski: has joined #ruby
[15:58:56] Drazha: @dminuoso its part of the Ruby DBI Gem
[15:59:33] ltt: has joined #ruby
[15:59:49] rrutkowski: has joined #ruby
[15:59:51] \void: has joined #ruby
[16:01:24] cschneid: has joined #ruby
[16:01:37] Drazha: @dminuoso: so basically conn=connDB(1), and that is ccoming from require 'dbi', def connDB(db), and then I have a connection definition under value 1, etc... doesnt really matter
[16:01:58] roshanavand: has joined #ruby
[16:02:15] Drazha: dminuoso: what I am more concerned about, why is the array not assigned to the variable so I can iterate through it with .each? This is Ruby 1.9.1 btw...
[16:02:24] John_Ivan: has joined #ruby
[16:02:24] John_Ivan: has joined #ruby
[16:02:34] ogres: has joined #ruby
[16:02:54] rrutkowski: has joined #ruby
[16:03:18] apeiros: uh, 1.9.1 is not a release for production
[16:03:39] apeiros: also it's been EOL for years now. you should absolutely upgrade your ruby
[16:04:29] gnufied: has joined #ruby
[16:04:40] rrutkowski: has joined #ruby
[16:06:20] Mike11: has joined #ruby
[16:09:27] Drazha: apeiros: yes, I am aware of that, painfully, however I am hoping someone can help out
[16:09:51] hahuang61: has joined #ruby
[16:13:51] apeiros: Drazha: I don't have ruby dbi and I'm preparing to go jogging, so sorry, not me :-|
[16:14:26] ltt: has joined #ruby
[16:15:38] Aloy: has joined #ruby
[16:16:45] synthroid: has joined #ruby
[16:20:13] bheesham: has joined #ruby
[16:22:28] Puffball: has joined #ruby
[16:22:35] RougeR: has joined #ruby
[16:22:35] RougeR: has joined #ruby
[16:25:31] cschneid: has joined #ruby
[16:27:02] thesubr00t: has joined #ruby
[16:30:04] Ryzokuken: has joined #ruby
[16:30:39] Ryzokuken: has joined #ruby
[16:30:45] jenrzzz: has joined #ruby
[16:30:45] jenrzzz: has joined #ruby
[16:33:24] jrafanie: has joined #ruby
[16:34:52] troys: has joined #ruby
[16:36:16] nit3rid3: has joined #ruby
[16:43:41] eckhardt: has joined #ruby
[16:44:14] \void: has joined #ruby
[16:49:49] GodOfSea: has joined #ruby
[16:50:28] GodOfSea: anyone knows any good documentation application, linux or windows doesnt matter
[16:51:41] llua: confluence
[16:54:39] cagomez: has joined #ruby
[16:55:36] \void: has joined #ruby
[16:56:42] [Butch]: has joined #ruby
[16:59:43] drewmcmillan: has joined #ruby
[17:00:48] tcopeland: has joined #ruby
[17:01:13] ltt: has joined #ruby
[17:03:10] orbyt_: has joined #ruby
[17:05:56] \void: has joined #ruby
[17:10:16] jenrzzz: has joined #ruby
[17:10:16] jenrzzz: has joined #ruby
[17:11:38] oleo: has joined #ruby
[17:14:03] adlerdias__: has joined #ruby
[17:14:07] hahuang61: has joined #ruby
[17:14:31] GodOfSea: has joined #ruby
[17:15:12] shoogz: has joined #ruby
[17:16:26] cadillac_: has joined #ruby
[17:16:42] GodOfSea: llua confluence is free ?
[17:17:21] alfiemax: has joined #ruby
[17:19:02] cagomez: has joined #ruby
[17:20:36] bheesham: GodOfSea: it's free for 7 days:https://www.atlassian.com/software/confluence/pricing
[17:20:51] GodOfSea: bheesham I am poor
[17:20:55] Lytol: has joined #ruby
[17:21:20] dminuoso: GodOfSea: What will you be using it for? An open source project?
[17:22:37] dminuoso: GodOfSea: And what exactly do you want to document?
[17:22:45] GodOfSea: Just for my own notes, for future references , I have been working as a freelancing sysadmin for the past 2 months , now i feel like I should use start documenting everything
[17:23:19] dminuoso: GodOfSea: Well confluence is really cheap if you have less than 10 users. It's something like 10 bucks a year.
[17:23:52] jamesaxl: has joined #ruby
[17:23:59] dminuoso: Wait. 10 bucks one time for self hosting.
[17:24:15] GodOfSea: another alternative ?
[17:24:25] ldepandis: has joined #ruby
[17:24:36] GodOfSea: There is always open source
[17:24:53] nfsnobody: has joined #ruby
[17:27:20] adlerdias: has joined #ruby
[17:27:50] karapetyan: has joined #ruby
[17:27:57] adlerdias_: has joined #ruby
[17:31:08] eckhardt: has joined #ruby
[17:34:54] mtkd: has joined #ruby
[17:35:02] scrptktty__: has joined #ruby
[17:35:15] psychicist__: has joined #ruby
[17:35:30] darkhanb: has joined #ruby
[17:42:27] SeepingN: has joined #ruby
[17:47:51] jenrzzz: has joined #ruby
[17:47:51] jenrzzz: has joined #ruby
[17:50:22] conta: has joined #ruby
[17:51:09] sanscoeur: has joined #ruby
[17:53:17] workmad3_: has joined #ruby
[17:57:18] mcr1: has joined #ruby
[17:57:40] apeiros: has joined #ruby
[18:00:30] clemens3: has joined #ruby
[18:01:02] apeiros: has joined #ruby
[18:01:26] kossae: has joined #ruby
[18:03:59] mooser: has joined #ruby
[18:05:31] jenrzzz: has joined #ruby
[18:05:31] jenrzzz: has joined #ruby
[18:08:15] nowhereman: has joined #ruby
[18:11:26] ferr1: has left #ruby: ("WeeChat 2.0.1")
[18:12:08] hahuang61: has joined #ruby
[18:16:18] tcopeland: has joined #ruby
[18:17:08] ChanServ: +o havenwood
[18:17:44] rgr: has joined #ruby
[18:19:23] mustmodify_: has left #ruby: ()
[18:20:47] ChanServ: -o havenwood
[18:21:24] Cavallari1: has joined #ruby
[18:22:47] havenwood: Ruby is back in the TIOBE top ten: https://www.tiobe.com/tiobe-index/
[18:22:56] havenwood: (I still think TIOBE is worthless.) ;-P
[18:23:34] havenwood: https://redmonk.com/sogrady/2018/03/07/language-rankings-1-18/
[18:23:47] Ethan: why in the world is Java #1?
[18:24:13] jenrzzz: has joined #ruby
[18:24:13] jenrzzz: has joined #ruby
[18:24:25] havenwood: Ethan: Java is #2 on RedMonk as well.
[18:25:20] havenwood: I suppose because it's widely used by servers and embedded devices, then there's Android on top.
[18:26:12] havenwood: A lot of folk use Java, for better or worse. ¯\_(ツ)_/¯
[18:26:41] riotjones: I don't like java
[18:26:53] riotjones: it's too overbloated
[18:26:58] riotjones: like the whole jvm
[18:27:12] tAn: has joined #ruby
[18:27:17] havenwood: JRuby and TruffleRuby on the other hand. <3
[18:28:32] Cavallari1: has joined #ruby
[18:28:47] lele`: has joined #ruby
[18:30:02] morfin: can i somehow pass -L/usr/local/lib to gem?
[18:30:18] planigan: has joined #ruby
[18:31:55] Sirecote: has joined #ruby
[18:32:18] pastorinni: has joined #ruby
[18:39:17] dmitriy_: has joined #ruby
[18:40:33] havenwood: morfin: What's the -L flag? Do you mean -I or where does that one come from?
[18:41:07] morfin: -L is linker flag specifying where i can find libraries
[18:41:20] Cavallari1: has joined #ruby
[18:42:45] mooser: has joined #ruby
[18:43:01] ramfjord: has joined #ruby
[18:43:57] nicesignal: has joined #ruby
[18:44:07] nadir: has joined #ruby
[18:44:17] dmitriy_: has joined #ruby
[18:47:27] mtkd: has joined #ruby
[18:49:05] c0dec: has joined #ruby
[18:51:31] dmitriy_: has joined #ruby
[18:53:46] sidx64: has joined #ruby
[18:56:36] dmitriy_: has joined #ruby
[18:58:01] sidx64_: has joined #ruby
[18:58:34] cadillac_: has joined #ruby
[18:59:01] n008f4g_: has joined #ruby
[18:59:59] morfin: no idea how make this work
[19:00:12] c0dec: has joined #ruby
[19:00:20] morfin: -- --with-ldflags=-L/usr/local/lib probably worked but hm
[19:00:36] morfin: this looks like an ugly hack
[19:01:37] dmitriy_: has joined #ruby
[19:05:35] hahuang61: has joined #ruby
[19:06:36] dmitriy_: has joined #ruby
[19:07:19] alex``: has joined #ruby
[19:07:35] havenwood: morfin: ah, LDFLAG, right right
[19:09:23] havenwood: morfin: how about?: LDFLAGS="-L/usr/local/lib" gem ...
[19:11:33] dmitriy_: has joined #ruby
[19:13:59] morfin: this may work too )
[19:14:37] nowhere_man: has joined #ruby
[19:14:40] cagomez: has joined #ruby
[19:16:10] raynold: has joined #ruby
[19:16:32] dmitriy_: has joined #ruby
[19:16:37] cadillac_: has joined #ruby
[19:17:04] aguestuser: has joined #ruby
[19:18:21] kies: has joined #ruby
[19:21:32] dmitriy_: has joined #ruby
[19:22:14] _phaul: has joined #ruby
[19:25:11] jenrzzz: has joined #ruby
[19:25:11] jenrzzz: has joined #ruby
[19:26:05] bmurt: has joined #ruby
[19:26:32] dmitriy_: has joined #ruby
[19:31:14] sameerynho: has joined #ruby
[19:31:37] dmitriy_: has joined #ruby
[19:31:45] ldnunes: has joined #ruby
[19:33:04] c0dec: has joined #ruby
[19:35:41] jenrzzz: has joined #ruby
[19:36:15] \void: Ruby-ers!
[19:36:36] dmitriy_: has joined #ruby
[19:37:15] \void: I'm junping into ruby, but google has issues telling me which is the tab character in use for ruby =?
[19:37:25] \void: s/junping/jumping/
[19:38:43] nowhereman_: has joined #ruby
[19:40:25] _phaul: \void: I think you need to tell us more, what you want to do, and at which part you are stuck. Because I don't understand your question
[19:40:41] Ethan: \void: \t
[19:41:18] phaul: ah, so it's about how to escape tab. :)
[19:41:34] Ethan: that's my best guess anyways
[19:41:35] dmitriy_: has joined #ruby
[19:43:19] pastorinni: has joined #ruby
[19:43:21] \void: Ethan: phaul Nah, sorry, it's about indenting your files
[19:43:46] \void: Do you use 2 spaces, 4 spaces as tabs? Some other thing?
[19:45:27] Ethan: welcome to ruby
[19:46:37] dmitriy_: has joined #ruby
[19:49:07] hahuang61: has joined #ruby
[19:51:33] dmitriy_: has joined #ruby
[19:52:56] SuperLag: has joined #ruby
[19:56:34] karapetyan: has joined #ruby
[19:56:38] dmitriy_: has joined #ruby
[19:56:39] bmurt: has joined #ruby
[19:57:09] nowhere_man: has joined #ruby
[19:58:54] alfiemax: has joined #ruby
[20:00:13] kliq: has joined #ruby
[20:00:50] Arney: has joined #ruby
[20:00:55] Arney: isn't jruby supposed to be faster than MRI?
[20:01:29] dminuoso: Arney: Some things are faster, others are not.
[20:01:38] Arney: no matter what i do.. i end up having code that is faster in MRI
[20:02:06] dminuoso: Arney: If you are curious about why, head straight to #jruby - they are better equipped to tell you details.
[20:02:18] Arney: well i don't know, i don't care if i can use it
[20:02:21] Arney: and it doesn't seem like i can
[20:02:38] jamesaxl: has joined #ruby
[20:03:15] dminuoso: Arney: Do you have some sample code?
[20:03:55] Arney: well, it's basicially my isPrime code from #haskell, that you know
[20:04:06] Arney: !(2..(n**(1.fdiv(2))).ceil).lazy.map { |x| n%x }.any?(&:zero?)
[20:04:08] Arney: this basicially
[20:04:12] Arney: mapped from 0..20000
[20:06:35] dminuoso: Arney: Any explanation I could give is based on assumptions. Head to jruby, they should be able to shed some light into this.
[20:08:17] Arney: yeah as i said.. i expected jruby to be faster in 99% of the cases
[20:08:26] Arney: this is really not what i expected qq
[20:10:33] Arney: why can't we have fast rubies :(
[20:10:47] dminuoso: Arney: There is truffleruby
[20:11:24] mcr1: has joined #ruby
[20:11:47] Arney: llvm cooooool
[20:11:49] Arney: coooooooooooooool
[20:11:52] Arney: i wish it was real
[20:12:12] Arney: uhh they have chunky_png benchmarks
[20:12:25] dminuoso: Arney: Trust me, the llvm is the boring part.
[20:12:34] Arney: whats cool about it?
[20:12:42] racheel: has joined #ruby
[20:12:49] dminuoso: Arney: truffleruby is based on a next gen polyglot JIT, with absolutely amazing optimizations
[20:12:54] racheel: is it common to install gems with sudo?
[20:12:59] dminuoso: It can even do cross language inlining and shenanigans.
[20:13:07] Arney: is it like rbx, having a vm in C ?
[20:13:19] Arney: racheel: i do it, maybe not :o
[20:13:25] dminuoso: racheel: No.
[20:14:30] racheel: hmm, when I'm not using sudo I get an error: "You don't have write permissions for the /var/lib/gems/2.3.0 directory."
[20:14:47] racheel: I just installed ruby with "sudo apt install ruby" on a fresh distro install
[20:15:29] dminuoso: Arney: The core is GraalVM which is a high performance VM that targets many languages simultaneously.
[20:15:39] Ethan: racheel: user --user-install
[20:15:41] Arney: is it OS? i already read about that
[20:16:26] dminuoso: Arney: It's a JIT compiler + polyglot runtime for JVM.
[20:16:46] Arney: bleh why does it always have to be jvm
[20:16:59] Arney: so.. when it's compiled it's jar-ish ?
[20:17:03] dminuoso: Arney: Do you have any factual reasons to be "against JVM" for a second?
[20:17:14] Arney: dminuoso: it's owned by oracle?
[20:17:22] dminuoso: Arney: It's an Oracle research project, yes.
[20:17:38] Arney: i mean there is icedtea, but have no clue how they compare to each other
[20:17:39] mrCyborg: has joined #ruby
[20:18:04] Arney: it was designed to run java code? and maybe not optimized for things like ruby?
[20:18:09] dminuoso: Arney: Its not a JDK. It's just a JIT compiler + runtime. It's basically a platform to develop langauges on.
[20:18:12] racheel: Ethan: thanks
[20:18:31] aufi: has joined #ruby
[20:18:43] Arney: dminuoso: uhm.. so the ruby code does not run on jvm? but the compiler does? :o confused now
[20:19:14] mrCyborg: Hey everyone! I just wrote my first ruby program! Would anyone mind doing a quick code review on it? _all_ feedback is welcome! https://gist.github.com/anonymous/1bc5bf908b41d2c47072b5114391a330
[20:19:53] dminuoso: mrCyborg: Dont monkeypatch core classes like String.
[20:19:56] Arney: that's someone who came from C :D
[20:21:36] tsht: has joined #ruby
[20:22:12] dminuoso: Arney: http://chrisseaton.com/rubytruffle/jokerconf17/
[20:22:33] dminuoso: Arney: The performance is downright incredible.
[20:22:34] Ethan: racheel: also consider using rvm or rbenv
[20:22:44] Arney: dminuoso: uhh that's promising
[20:23:44] dmitriy_: has joined #ruby
[20:25:00] cagomez: has joined #ruby
[20:25:28] mrCyborg: dminuoso, interesting, when looking at posts like https://stackoverflow.com/questions/1489183/colorized-ruby-output monkey patching seemed pretty acceptable in ruby, but I guess stackoverflow doesn't have the highest code standers ;-)
[20:26:23] Arney: do it when it's absolutly neccessary, but don't add something like " i have this cool list of colors"
[20:26:32] Arney: a normal module defined by you would be essentially the same
[20:26:49] Arney: that's opinion / experience
[20:27:17] Arney: i would also not inherit from base classes, always leads to trouble
[20:28:20] jenrzzz: has joined #ruby
[20:28:32] mrCyborg: Why? While I see the issue with monkey patching base classes, I don't really see how inheriting from one could cause trouble
[20:28:43] dmitriy_: has joined #ruby
[20:28:48] mrCyborg: Do base classes change much between ruby updates?
[20:28:53] Arney: there might be none, but i don't see the advantage either
[20:28:59] Arney: what do colors have to do with strings?
[20:29:15] Arney: why wouldn't you patch them to IO
[20:29:26] Arney: mrCyborg: imagine you write a library/gem, which does this
[20:29:38] Arney: another developer things the same.. but gives the same attribute different colors
[20:29:44] Arney: s/things/thinks
[20:29:44] dviola: has joined #ruby
[20:29:59] tsht: has left #ruby: ("Leaving")
[20:30:11] mrCyborg: Well, these are just the standard terminal colors. Defined by the user theme.
[20:30:16] mrCyborg: But I get your point
[20:30:40] Arney: yeah even if you're "right", whatever that means
[20:30:47] Arney: the class u wanted to patch is "IO"
[20:31:09] Arney: which would be closer to terminal
[20:31:15] mtkd: has joined #ruby
[20:31:22] mrCyborg: Anyway, ignoring the monkey patching of String, is there anything else about my code that I could improve?
[20:32:14] Arney: im guessing you come from java?
[20:32:26] dminuoso: mrCyborg: Its too small to talk much about, but it's very non-idiomatic.
[20:32:45] Arney: have no real critism of your code, other than it doesn't look very ruby-ish, whatever dminuoso says :D
[20:32:46] mrCyborg: Not really, i'm still in High School and i'm trying to get away from JavaScript
[20:33:08] mrCyborg: > doesn't look very ruby-ish
[20:33:19] mrCyborg: That's exactly the feedback I want
[20:33:38] dminuoso: mrCyborg: But nothing that strikes me as horribly wrong. Its some typical beginner code.
[20:33:40] mrCyborg: How would I make it more ruby-ish? I know the isn't an easy answer but can you point me into the right direction
[20:33:45] dmitriy_: has joined #ruby
[20:33:56] Arney: for example i NEVER read ruby code like "for e in y"
[20:34:03] Arney: people always tend to use
[20:34:30] Arney: [1,2,3].each { |x| puts x }
[20:34:42] dminuoso: The difference is minor, and semantically its the same.
[20:35:05] Arney: the rescue blocks which you like to put everyhwere, i feel like a ruby developer would abstract them away
[20:35:20] Arney: using them once on top and not in combination with the begin...rescue..end style
[20:35:38] Arney: more like def method param; ...; rescue lol; end;
[20:35:39] mrCyborg: > Array.each
[20:35:39] mrCyborg: Ah noted, kind of the same as in JavaScript in that regard.
[20:36:00] mrCyborg: Mind to elaborate?
[20:36:11] Arney: no that's correct, while it was later added to j
[20:36:20] Arney: i remember it not being there like this
[20:36:25] nowhere_man: has joined #ruby
[20:36:35] mrCyborg: I'm talking about es6
[20:36:40] dminuoso: mrCyborg: It's clean, it's fine - don't bikeshed.
[20:37:05] Arney: but i've seen worse of my colleagues which should be used to ruby til now, so it's fine
[20:37:16] dminuoso: mrCyborg: The main thing is just, is the type of task you are doing doesn't play well with Ruby's object oriented nature and Smalltalk heritage.
[20:37:36] dminuoso: So it looks non-idiomatic. Bunch of methods and nothing else.
[20:38:08] dminuoso: mrCyborg: I like that you are using Struct. :-)
[20:38:34] jcalla: has joined #ruby
[20:38:39] mrCyborg: Thanks, I did some searching to see what was the recommended way
[20:38:44] dmitriy_: has joined #ruby
[20:38:49] lroca: has joined #ruby
[20:40:03] dminuoso: mrCyborg: There's some things I personally started to do differently. Like I would probably use `case` in this spot http://chrisseaton.com/rubytruffle/jokerconf17/
[20:40:08] dminuoso: Err. https://gist.github.com/anonymous/1bc5bf908b41d2c47072b5114391a330#file-confirm-rb-L46
[20:40:18] dminuoso: Weird clipboard.
[20:40:55] Arney: when i got enlightened in ruby.. i started to imagining
[20:41:10] Arney: ruby objects like boxes.. that send messages to each other (which is basicially the smalltalk idea)
[20:41:16] Arney: boxes = attributes + methods
[20:41:20] Arney: that's really ALL there is
[20:41:32] Arney: and blocks makes it easy to configure them
[20:41:39] mrCyborg: Yup, I really like how everything is a class in ruby.
[20:41:43] chrisseaton: Arney: there’s also a native version of TruffleRuby that doesn’t need jars or a JVM
[20:42:06] dminuoso: o/ chrisseaton
[20:42:06] mrCyborg: It just feels so elegant
[20:42:40] mrCyborg: Anyway, thanks dminuoso and Arney for your feedback! I really appreciate it!
[20:42:51] discopatrick: has joined #ruby
[20:43:40] dmitriy_: has joined #ruby
[20:44:07] dminuoso: chrisseaton: By the way, how do fit into Graal? Is there some infrastructure to do cross language type checking?
[20:44:18] dminuoso: Meant to ask how types fit into Graal.
[20:45:56] mrCyborg: Got any good ruby tutorials/live coding sessions? YouTube gives me videos like "Learn Ruby in 10 minutes" which doesn't seem like the best source of knowledge.
[20:46:09] dminuoso: mrCyborg: We have a curated list of books..
[20:46:11] ruby[bot]: You can find a list of recommended books at http://ruby-community.com/pages/links
[20:46:19] dminuoso: mrCyborg: Bleh. Ignore that, its outdated. Check the topic
[20:46:57] mrCyborg: Ah, thank you!
[20:47:09] mrCyborg: I should have looked in the topic myself before asking...
[20:48:43] dmitriy_: has joined #ruby
[20:49:47] mrCyborg: Yeah, I know I sound cheap but got anything... "free"? I'm not ready to sped €20 on a book.
[20:51:47] troulouliou_div2: has joined #ruby
[20:52:09] caoraivoso: Arney: I also get the feeling of that boxes idea sending messages when writing ruby code, although I still have some trouble understanding procs/blocks
[20:52:47] dminuoso: caoraivoso: Do you know what a function is?
[20:53:00] dminuoso: caoraivoso: Can you, with your own words, describe that?
[20:53:05] eckhardt: has joined #ruby
[20:53:43] dmitriy_: has joined #ruby
[20:54:19] ramfjord: has joined #ruby
[20:57:01] caoraivoso: a function is just some piece of code that can take input in the form of arguments and also return output
[20:57:09] zenspider: dminuoso: I think that whole site is up on github if you want to send in a PR to update the books
[20:57:25] dminuoso: caoraivoso: Also. What can you do with a function?
[20:57:35] dminuoso: caoraivoso: Yup.
[20:57:40] dminuoso: caoraivoso: That's all blocks and procs are too.
[20:57:46] dminuoso: caoraivoso: Nothing more, nothing less.
[20:57:53] dminuoso: caoraivoso: Blocks and procs *are* functions.
[20:58:05] caoraivoso: I thought they were something more complicated/fancy
[20:58:24] zenspider: is this one of those "I don't like the word 'object'" things? or am I missing something?
[20:58:31] jottr: has joined #ruby
[20:58:43] dmitriy_: has joined #ruby
[20:59:10] dminuoso: caoraivoso: Let me show you:
[20:59:23] dminuoso: >> func = -> e { e * 2 }
[20:59:24] ruby[bot]: dminuoso: # => #<Proc:0x406edae4@/tmp/execpad-e9ae2de4fd29/source-e9ae2de4fd29:2 (lambda)> (https://eval.in/968895)
[20:59:32] dminuoso: This looks like a function that takes an argument, e, and multiplies it by 2 right?
[20:59:50] dminuoso: >> func = -> e { e * 2 }; func.call(10)
[20:59:51] ruby[bot]: dminuoso: # => 20 (https://eval.in/968896)
[21:00:18] dminuoso: Or if you prefer this style:
[21:00:23] dminuoso: >> func = -> e { e * 2 }; func[10]
[21:00:25] ruby[bot]: dminuoso: # => 20 (https://eval.in/968897)
[21:01:28] caoraivoso: dminuoso: I see
[21:01:40] dminuoso: And that's called a lambda, which is a cousin of Proc. Blocks are the same thing.
[21:01:46] dminuoso: Except "call" is called "yield"
[21:01:50] dminuoso: Because why not.
[21:02:06] caoraivoso: why does it use that syntax? e.g. func = -> e rather than just func(e) ?
[21:02:20] darix: has joined #ruby
[21:02:37] dminuoso: caoraivoso: Because Matz said so.
[21:03:43] dmitriy_: has joined #ruby
[21:05:05] fclausen: has joined #ruby
[21:05:50] dminuoso: caoraivoso: Blocks are the same thing, the subtle difference is just that syntactically you have to put them outside the parens for a method call (but it still is just passing a function as a parameter)
[21:07:03] caoraivoso: I'd like to see more examples of how blocks and procs compare
[21:07:19] dminuoso: caoraivoso: a proc is a block with an object shell.
[21:07:32] dminuoso: caoraivoso: you can turn one into the other.
[21:08:43] pilne: has joined #ruby
[21:08:43] dmitriy_: has joined #ruby
[21:09:27] caoraivoso: thanks for your help, I'll give it a try
[21:12:20] fribmendes: has joined #ruby
[21:12:27] dviola: has joined #ruby
[21:13:31] hahuang61: has joined #ruby
[21:13:42] dmitriy_: has joined #ruby
[21:14:36] \void: has joined #ruby
[21:17:20] vikaton: has joined #ruby
[21:18:20] John_Ivan: has joined #ruby
[21:18:46] dmitriy_: has joined #ruby
[21:23:40] dmitriy_: has joined #ruby
[21:28:42] dmitriy_: has joined #ruby
[21:29:27] miah: so i encountered code like this `_(foo).must_equal 'bar'` in some tests and i'm curious because I haven't seen this before. can anybody help clarify what `_()` is doing? https://github.com/chef/inspec/blob/master/test/unit/resources/shadow_test.rb#L10
[21:29:45] mooser: has joined #ruby
[21:29:59] zenspider: miah: I might be able to help ;)
[21:30:04] miah: please =)
[21:30:26] zenspider: here's a hint: `_` is also aliased to `expect` (and `value`)
[21:30:41] alfiemax: has joined #ruby
[21:30:41] zenspider: so, rewritten: expect(foo).must_equal 'bar'
[21:31:06] zenspider: expect(some_value) => value monad => `must_equal expected` => result
[21:31:25] miah: ok interesting
[21:31:42] zenspider: this change will allow me to remove all the must/wont methods that are up on Object right now
[21:32:09] zenspider: personally, at that point, I don't see *any* extra value in the spec-style. Just use assertions
[21:32:30] zenspider: maybe use describe/it instead of classes/methods, tho there's real drawbacks there too
[21:33:07] zenspider: (while describe acts like a class, it corrupts normal method inheritance)
[21:33:08] miah: ya i usually write unit style but most of the tests in this code are spec style
[21:33:28] sidx64: has joined #ruby
[21:33:31] zenspider: Mike Moore likes a hybrid between the two. I think he calls it assert-spec style
[21:33:44] dmitriy_: has joined #ruby
[21:33:52] zenspider: does that explanation make sense tho?
[21:34:22] zenspider: the next release of minitest is gonna add deprecation warnings to the global methods and the next release after that will remove the methods
[21:34:32] miah: yes that makes sense thank you!
[21:36:24] zenspider: cool. glad to help
[21:36:34] zenspider: ok... gotta go get "in the zone" for this interview... later
[21:37:16] miah: good luck =)
[21:37:46] sidx64_: has joined #ruby
[21:38:35] c0dec: has joined #ruby
[21:38:44] dmitriy_: has joined #ruby
[21:40:33] bmurt: has joined #ruby
[21:43:40] dmitriy_: has joined #ruby
[21:48:43] dmitriy_: has joined #ruby
[21:50:57] badeball: has joined #ruby
[21:53:11] nowhereman_: has joined #ruby
[21:53:43] dmitriy_: has joined #ruby
[21:54:04] zenspider: miah: how much setup crap do I need to to run those tests?
[21:55:16] cagomez_: has joined #ruby
[21:57:28] AJA4350: has joined #ruby
[21:58:42] dmitriy_: has joined #ruby
[21:59:36] pastorinni: has joined #ruby
[22:02:10] jenrzzz_: has joined #ruby
[22:03:44] dmitriy_: has joined #ruby
[22:04:15] anjen: has joined #ruby
[22:08:44] dmitriy_: has joined #ruby
[22:12:57] hahuang61: has joined #ruby
[22:13:44] dmitriy_: has joined #ruby
[22:15:10] Coldbla5: has joined #ruby
[22:15:56] Coldbla5: has joined #ruby
[22:18:41] dmitriy_: has joined #ruby
[22:21:23] Coldbla5: has joined #ruby
[22:22:48] eckhardt: has joined #ruby
[22:24:00] xco: has joined #ruby
[22:24:12] xco: i have a string like this "#{t('text.timestamp')} (daily)"
[22:24:43] xco: in place of “daily” i want to interpolate something using #{} but keep the opening/closing brackets, how do i achieve this?
[22:26:25] phaul: >> "... (#{1+1})"
[22:26:49] dmitriy_: has joined #ruby
[22:27:12] cadillac_: has joined #ruby
[22:27:29] Dimik: has joined #ruby
[22:28:04] phaul: >> p "[...] (#{1+1})"
[22:28:29] phaul: why is @ruby[bot] ignoring me ? :'(
[22:29:40] Arney: dminuoso: how did those trufflebois get rid of GIL?
[22:29:42] Arney: or didn't they?
[22:29:48] phaul: but anyways, xco kust put the #{stuff} inside the () parens
[22:30:10] tvw: has joined #ruby
[22:30:36] Arney: phaul: you need to be authenticated with freenode services
[22:30:42] Arney: for the bot to listen to you
[22:31:07] Arney: >> p "[...] (#{1+1})"
[22:31:08] ruby[bot]: Arney: # => "[...] (2)" ...check link for more (https://eval.in/968921)
[22:31:25] phaul: Arney: thanks I thought I was I try again
[22:31:37] phaul: has joined #ruby
[22:31:47] dmitriy_: has joined #ruby
[22:31:50] ruby[bot]: phaul: # => 2 (https://eval.in/968922)
[22:31:56] Arney: >> method(:puts).call("#{$/}")
[22:32:05] ruby[bot]: Arney: # => ...check link for more (https://eval.in/968923)
[22:32:35] mtkd: has joined #ruby
[22:32:45] p0s1x: has joined #ruby
[22:33:41] ruby[bot]: Arney: # => 7194 ...check link for more (https://eval.in/968924)
[22:34:45] jenrzzz: has joined #ruby
[22:34:45] jenrzzz: has joined #ruby
[22:35:00] Azure: has joined #ruby
[22:35:16] havenwood: Arney: You can't get rid of a GIL if you never had one!
[22:36:51] dmitriy_: has joined #ruby
[22:37:23] Arney: only thing i hate matz for
[22:38:01] gnufied: has joined #ruby
[22:38:07] xco: phaul: thanks
[22:38:25] havenwood: Arney: CRuby is the only broadly-used implementations with a GVL. JRuby, Rubinius and TruffleRuby don't have one.
[22:38:39] havenwood: Arney: It won't be global in CRuby once there are guilds.
[22:38:40] phaul: xco: you are welcome
[22:41:51] dmitriy_: has joined #ruby
[22:42:37] miah: can i join the dark brotherhood guild in CRuby?
[22:43:06] DTZUZO: has joined #ruby
[22:46:10] tomphp: has joined #ruby
[22:46:49] dmitriy_: has joined #ruby
[22:50:44] ledestin: has joined #ruby
[22:52:37] nowhere_man: has joined #ruby
[22:56:08] suhdood: has joined #ruby
[22:56:27] drewmcmillan: has joined #ruby
[23:01:12] cthulchu: has joined #ruby
[23:04:08] dmitriy_: has joined #ruby
[23:07:27] jenrzzz: has joined #ruby
[23:09:06] dmitriy_: has joined #ruby
[23:10:14] hahuang61: has joined #ruby
[23:14:08] dmitriy_: has joined #ruby
[23:17:04] cher: has joined #ruby
[23:17:10] SynSynack: has joined #ruby
[23:17:31] cher: ruby[bot],
[23:19:05] darix: has joined #ruby
[23:19:07] dmitriy_: has joined #ruby
[23:20:24] alfiemax: has joined #ruby
[23:22:55] Arney: havenwood: if truffle doesn't have one, how do they lock with c extensions
[23:22:57] Arney: or don't they
[23:23:29] chrisseaton: Arney: we actually do have a lock on C extensions at the moment I'm afraid
[23:23:47] Arney: chrisseaton: we as in, you're one of the persons involved in truffleruby?
[23:23:50] chrisseaton: I think (but not sure) that Rubinius doesn't have a lock on C extensions, so they must have made it work, but for us it just doesn't seem to work well on many C extensions
[23:24:04] Arney: yeah rubinius doesn't have one
[23:24:07] dmitriy_: has joined #ruby
[23:24:08] Arney: but it also sucks, pretty much
[23:24:34] zenspider: there's no pretty much about it. :P
[23:24:55] Arney: i was really hyped about rubinius but it's really underwhelming
[23:25:21] Arney: it does use the cpu really well, you can turn off your central heating
[23:25:39] Arney: but it's 100x times slower than MRI in usual work
[23:26:26] Arney: i am confusued on how to use graalvm
[23:26:29] Arney: but i will get there
[23:27:55] chrisseaton: Arney: there's quite a lot of docs these days for Ruby users https://github.com/oracle/truffleruby/tree/master/doc/user
[23:28:07] Arney: yeah and they're all like " get graal"
[23:28:23] Arney: and then i am here http://www.oracle.com/technetwork/oracle-labs/program-languages/downloads/index.html
[23:28:34] Arney: logging into oracle. i guess?
[23:28:59] chrisseaton: Yeah... I'm afraid you need to 'sign up' to OTN to download it at the moment, because it's based on OracleJDK. There will be a standalone binary Ruby release soon that doesn't need a JVM and will be wget-able
[23:29:10] Arney: i will wait for that
[23:29:28] Arney: context is i trued jruby today and was also underwhelmed
[23:29:42] Arney: i always figured jvm speed with jruby would be like ALWAYS quicker
[23:29:53] Arney: but i didn't manage to write code that runs faster in jruby
[23:30:05] Arney: maybe if i used threads.. but that's not enough for me
[23:31:05] Arney: maybe that graalvm thing will make me happy, im hyped!
[23:31:08] chrisseaton: If your code isn't faster in JRuby then ask them for help - they will be keen to fix it
[23:31:22] chrisseaton: I'm not saying GraalVM will be faster for you first time either
[23:31:38] Arney: well.. but that's not how it is supposed to be i think, if i wanted to change my style of code to be quicker than ruby
[23:31:45] Arney: i wouldn't write ruby? or am i weird there?
[23:32:08] chrisseaton: No I mean ask JRuby for help and they'll fix bugs in JRuby for you to make it fast for your code
[23:32:15] Arney: oh i see, hm
[23:32:39] chrisseaton: It is possible to write code that will defeat almost any JIT though - such as repeatedly redefining methods - and sometimes people do seem to end up writing code that does that
[23:32:41] zenspider: Arney: yup yup. that's what happens when I project gets poisoned by toxic personalities
[23:33:00] pilne: truffle ruby is one of the main draws for me to ruby, besdies the fact it fits my brain better :D
[23:33:02] Arney: zenspider: i don't follow
[23:33:39] phaul: has joined #ruby
[23:34:00] zenspider: Arney: that's probably for the best. As far as I'm concerned, rubinius is dead and irrelevant at this point.
[23:34:18] Arney: no i mean the toxic personalities thingie, what do you mean by that?
[23:34:33] pilne: it's a fun platform for looking into "ruby in ruby" at this point sadly
[23:34:49] Arney: ohyeah that shit would be so cool if it worked
[23:34:57] zenspider: I mean just that. not sure what you're not getting.
[23:35:14] Arney: for example that project is not a verb :>
[23:35:17] zenspider: pilne: ruby in ruby... with lots of C++ and LLVM... ya know... NOT ruby in ruby. :P
[23:35:18] pilne: "Halunke" is an interesting little language written in Ruby for looking into using ruby as a base for another language (:
[23:35:30] zenspider: pilne: oh? URL?
[23:35:32] Arney: zenspider: well, no.. the vm is written in cpp
[23:35:41] pilne: http://halunke.jetzt/
[23:35:41] Arney: there whole ruby there is is written in ruby in rbx
[23:35:48] Arney: that part is really awesome about rb
[23:36:02] chrisseaton: pilne: if you like Ruby-in-Ruby then TruffleRuby is definitely for you - it's over half Ruby code
[23:36:02] Arney: if it really was quick/stable it would be the "best" implementation
[23:36:06] zenspider: um... I wrote good portion of that
[23:36:27] Arney: zenspider: of what.. rbx? and what about that is not ruby?
[23:36:33] zenspider: now I won't touch it with a 10 foot pole.
[23:36:36] pilne: i just like the fact that truffleruby has some ridiculous cross-platform performance potential really
[23:36:44] chrisseaton: zenspider: you should poke around in our core and see how much you recognise now https://github.com/oracle/truffleruby/tree/master/src/main/ruby/core
[23:36:51] zenspider: Arney: you do understand that C++ isn't ruby. so, "Ruby in ruby" is a lie
[23:37:10] Psybur: has joined #ruby
[23:37:10] Psybur: has joined #ruby
[23:37:13] zenspider: chrisseaton: heh. probably very little of it by now. it's been a long time.
[23:37:14] Arney: zenspider: are you talking about these "include c++method here" things, i think that's fair
[23:37:17] pilne: and there's projects like helix, opal, crystal, that capture the ruby way to some extent to just make programming fun (:
[23:37:33] Arney: pilne: define ruby way please
[23:37:42] zenspider: Arney: I don't think I'm getting across to you... which is fine
[23:38:03] Arney: zenspider: i just don't understand where rubinius iss not "close to 100% ruby"
[23:38:16] cagomez: has joined #ruby
[23:38:27] baweaver: oh hey, all the fun is happening
[23:38:34] Arney: apart from hardcore optimization like Hash/Array i never came across much c++ implementations
[23:38:42] hahuang61: has joined #ruby
[23:38:46] chrisseaton: Arney: if you mean just being literally, if you look at the code base, it's a lot of C++
[23:38:58] Arney: yeah, the VM, but what else
[23:38:59] pilne: this line has always summed it up for me: So in Ruby we see simplicity embodied from the programmer’s view (if not from the view of those maintaining the interpreter). Yet we also see the capacity for compromise." from: https://www.infoq.com/articles/what-is-the-ruby-way
[23:39:09] zenspider: If it really were "ruby in ruby", it'd be 100% ruby.
[23:39:13] baweaver: chrisseaton: Were you around the bay area? I know there's an Oracle office in Dublin/Pleasanton area
[23:39:13] chrisseaton: Arney: well the VM is a pretty big bit of it...
[23:39:15] maum: has joined #ruby
[23:39:28] zenspider: kinda important... that VM being 0% ruby and all.
[23:39:29] baweaver: zenspider: to be fair you have to bootstrap somewhere
[23:39:29] chrisseaton: baweaver: I interned in Redwood Shores in 2013, been working from home in Cheshire since
[23:39:39] zenspider: baweaver: you can bootstrap IN ruby
[23:39:51] baweaver: Ah, well shoot me and havenwood a message if you find yourself over this way.
[23:39:53] chrisseaton: baweaver: it would be possible to write a Ruby to native compiler (you could write it in Ruby) and write your whole VM in Ruby
[23:39:58] zenspider: we've been doing this bootstrap thing since the 60s
[23:39:59] chrisseaton: We have a whole JVM implemented in Java
[23:40:06] baweaver: Mmm, good point
[23:40:15] baweaver: Compilers aren't my area
[23:40:19] Arney: pilne: i am too stupid to understand that :D but i will read your link
[23:41:25] chrisseaton: Very experienced people like Cliff Click (one of the main Hotspot people) have said they don't think they'll ever write another VM in C++ again - we're past that as an industry
[23:41:39] zenspider: glad for that
[23:42:39] Arney: like.. jvm gets accepted as the standard?
[23:43:27] chrisseaton: I think he meant people writing VMs in higher level languages
[23:43:42] Arney: and those get interpreted by?
[23:43:52] chrisseaton: Well they'd be compiled to native
[23:44:10] Arney: ah, so technology got evolved to the point that we don't need vms anymore?
[23:44:14] Arney: yeah that's a thing i'd like
[23:44:15] chrisseaton: For instance PyPy is a Python interpreter written in Python and compiled to native code (simplifying for the sake of argument)
[23:44:16] pilne: ("the ruby way" is also a book about ruby programming)
[23:44:48] zenspider: Did self ever finish doing a pure self bootstrap?
[23:45:28] zenspider: smalltalk (squeak at least), pascal & family, pypy, there's a lot of examples of this
[23:45:43] zenspider: derp: lisp/scheme
[23:46:03] zenspider: racket is migrating to chez scheme for their backend... that's close
[23:46:07] dmitriy_: has joined #ruby
[23:48:11] Psybur_: has joined #ruby
[23:50:46] chrisseaton: I think a problem is it's a lot of work to build a proper native compiler in your own language, for your own language, and at the end of it at best, it'll be functional because it's not going to do anything amazing, it'll just compile what you want
[23:51:09] dmitriy_: has joined #ruby
[23:52:33] Vapez: has joined #ruby
[23:54:04] Arney: EITHER WAY:t thanks for the chat gn
[23:54:21] cagomez: has joined #ruby
[23:56:11] dmitriy_: has joined #ruby
[23:56:44] c0ncealed: has joined #ruby
[23:59:03] zenspider: chrisseaton: I'm still periodically poking at viewpoint's COLA concept.
[23:59:49] mroutis: has joined #ruby