Hacker Newsnew | past | comments | ask | show | jobs | submit | lukegru's commentslogin

I'm no longer a software engineer but whenever I write or edit anything it's always in vim, nothing can beat it and it will be in my finger muscles forever. RIP Bram, you will be missed. Money is tight now, but I'll donate $50 just the same to his charity. If you're reading this and haven't yet, match me!


Does this use the Fiber Scheduler API to figure out which fibers are blocking? If so, why does this need libev - I'm guessing it's to do with performance?


No, Polyphony has a design that diverges from the model proposed by the FibeScheduler API. Note that the FiberScheduler API included with Ruby is only an interface, not an implementation. Polyphony uses io_uring on recent Linux kernels, or libev otherwise to perform I/O operations and implement timeouts.


does it use anything specific on darwin and/or freebsd or does it fall back to libev?


On non-Linux systems it just uses libev to for I/O readiness and for timers, and uses normal syscalls for the actual I/O.


alright! any plans to use kqueue directly?


No. libev provides a nice abstraction over different operating systems, and has good performance. I don't think coding a whole new backend against kqueue is worth the effort.


Fiber::Scheduler is only an interface. You still need an IO multiplexer underneath it.


This is not what I don’t understand with the Ruby Team, why did they not ship Fiber Scheduler with an implementation and just an interface?

Dis they expect everyone to implement the scheduler om their own?

I am aware of the existing fiber scheduler implementations you can get on Ruby Gems but there should be official implementation.


Location: Montreal, Canada

Remote: Preferred

Willing to relocate: Not at the moment

Technologies: Ruby, PHP, JavaScript, Linux, MySQL, C, C++

Resume: Please contact me by email

Email: luke.gru@gmail.com

6 years working with Ruby on Rails, 4 as senior developer. I contribute to the ruby language in my spare time (the VM and libraries). I haven't worked in software in 5 years but looking to get back into it part-time or full time :)


I like how you shutdown the threads (with throw), it was a nice touch. This whole project shows the power of IO.copy_stream imo.


This is not a good analysis imo. You don't necessarily gain any new awareness by paying attention to something or someone, you gain information. Whether or not you were aware of that information beforehand, or if it is new information has little to do with paying attention except for the fact that you might become bored or uninterested if it's not new information.

And, like another poster pointed out, this information is not gained with money, the "paying" is a metaphor and the currency is your attention itself. You give your attention away for the value of receiving the information.

On top of that there isn't just 1 metaphor in English (and I suspect other languages as well) for even the word "attention". You can fix your attention to something, or direct your attention, we speak of attention spans, etc.


I don't understand this statement: "You don't necessarily gain any new awareness by paying attention to something or someone, you gain information."

How does anyone gain awareness of anything, then? Surely not by ignoring it?

I'd urge you to sit in the forest for a day (or the prairie or the desert -- anyhow, in nature, away from buildings and cars and phones) and pay attention. What do you gain from doing so?

You will find you simply notice different and new things if you spend the time (again, pay/spend... interesting). Perhaps you'll be able to codify this into "information". I'd be interested to see your notes.


The metaphor used by the language differ. That’s the point.


Yes, there are quite a few Ruby implementations but MIR is not one nor is it trying to be. It's a standalone library useful for use in a tier 1 JIT for any dynamic language, along with other uses outside of JITs having to do with native code generation. The author does have plans to integrate it into CRuby to work alongside MJIT.


I've followed along with the craftinginterpreters book lately, and it's been a blast. My version of clox [1] has multi-threading with a GVL, managed GC heaps, and various bytecode optimization passes. I've looked into the Ruby source code and even understand much of it now :) Future plans are to add a generational copying GC and remove the GVL ;)

[1] https://github.com/luke-gru/clox


> My version of clox [1] has multi-threading with a GVL, managed GC heaps, and various bytecode optimization passes.

Oh, wow, you've really rocketed past the book. That's awesome!


Off topic, but almost done with Learn C the Hard Way. Great book! I was a little confused at first by pointer syntax, though. After reading K&R's C book it cleared things up for me, and then I found LCTHW great for learning more modern C practices. Thanks!


I've been working on a language [1] that compiles (transpiles?) into Vimscript. Makes most things easier, I find.

[1] https://github.com/luke-gru/riml


That looks really cool!


Although you might not want to debate whether Vimscript is better or worse than elisp, I don't mind. Most things are better than Vimscript.

I've even written a language [1] that compiles to Vimscript because it sucks so bad.

[1] https://github.com/luke-gru/riml


> Although you might not want to debate whether Vimscript is better or worse than elisp, I don't mind. Most things are better than Vimscript. I've even written a language [1] that compiles to Vimscript because it sucks so bad.

Vimscript is similar to JS. Both have lot of pitfalls, and don't have traditional OOP. The reason JS exists is to script the browser, and vimscript exists to script vim. Coffeescript attempts to add syntactic(and sometimes semantic) sugar to JS. Riml seems to be in similar vain. Despite that, there are people who would still work on dicts rather than using the Ruby style classes your script seems to introduce. == has the same rules as == in JS - don't, unless you are really sure.

I like the default scope thing your language does, but I feel a developer should at least know vimscript variable scopes. Your classes are nice syntactic sugar, but I am used to Lua and JS plain old object based oop, and I am Ok with using OOP that way.

Vimscript has its warts(like JS) but does its job. Some people swear by Coffee and disavow JS; some people prefer JS. I don't have a fanatical position - I use both Coffee and JS. Your extensions look good - I will play with it some.

Generally, when I take a position defending Vimscript is when the person talking about "how vimscript is devil's spawn" has 0 ideas about Vimscript and is regurgitating what he read somewhere. I don't deny the warts(== vs ==# vs ==?), but I do deny the fact that somehow Vimscript makes the job difficult. In fact, if you know Vim, you don't have to learn tons of api functions(though you still need to learn some). You directly use the vim commands(is there a better word for it?). I prefer it vastly over learning a new set of artificial api calls("normal! `<v`>y" over some crappily named copy_marks....). Oh, you don't know Vimscript and you find it difficult to read? Tell me more about how every language in existence should read easy to you(not directed towards you; general comment)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: