<c-c>
Jeff_D: its probably bit early so thats why you didn't get much answers but I'll have a look now
<Jeff_D>
c-c: Thanks a lot; yeah, I generally lose track of timezones for a while after DST changes :P
<c-c>
Jeff_D: does it work?
Chagel has joined #ruby
<Jeff_D>
what I have there works. What I _want_ is to wrap a subclass up so I can keep the original pristine. I also want to figure out how to define a (namespaced) Rake task that uses that subclass, so that all I need in the actual Rakefile is the default-task definition. See where I’m trying to go?
chopin has quit [Remote host closed the connection]
chopin has joined #ruby
Kovensky has left #ruby [#ruby]
raul782 has quit [Remote host closed the connection]
chopin has quit [Ping timeout: 248 seconds]
raul782 has joined #ruby
hutch34 has joined #ruby
<Jeff_D>
c-c: Thanks anyway; updated the Gist after your “too many words” comment (to add even more words :P) that hopefully explains the goal better. I’ll keep using what works. It’s worked for a couple of years now; I’ve just never been very happy with it.
gizmore has quit [Ping timeout: 256 seconds]
gizmore has joined #ruby
Jeff_D has quit [Quit: JMP $]
<dminuoso>
c-c: Why wouldn't Process be cross-platform, unless you expect Ruby works on DOS..
<blackbombay>
windows doesnt implement fork, for one.
<c-c>
dminuoso: well because I saw 'childprocess' and 'god' on github, and it makes me wonder
<dminuoso>
c-c: CreateProcessW is used on win32
pawnbox has joined #ruby
aidalgol has joined #ruby
<c-c>
I'm making a base for a game. - A process for UI, a process for engine, and a process (or a server) for game state.
<dminuoso>
Uh.
<dminuoso>
And then use IPC to keep the engine and UI synced?
raul782 has quit [Remote host closed the connection]
<c-c>
Not quite sure, perhaps just send commands to engine and request state from the state server.
mostlybadfly has quit [Quit: Connection closed for inactivity]
<c-c>
Much confusion atm. Maybe just send commands via socket. But, then, windows people won't be able to play with this.
<dminuoso>
Because Windows doesn't have sockets?
<c-c>
dminuoso: I haven't fully redone my homework on how it is at the moment, to be honest.
spicerack has joined #ruby
<dminuoso>
c-c: Here's what we did to keep our VR engine, flight state controllers and UI separate and highly portable. We sprinkled CORBA ontop of it until it worked.
yardenbar has quit [Ping timeout: 256 seconds]
<dminuoso>
But then again CORBA was required for plenty things anyway.
Alina-malina has quit [Changing host]
Alina-malina has joined #ruby
<c-c>
CORBA sounds enterpricey
<dminuoso>
It's not really
terlar has joined #ruby
<dminuoso>
It's just something similar DCOM
<dminuoso>
to
<dminuoso>
Or D-Bus
<c-c>
I have plenty of homework and tests to do, but I think possibly --> named pipes between UI and Engine, sockets between State Server <--> UI/Engine
<dminuoso>
Using threads may be much much much simpler.
troulouliou_div2 has joined #ruby
<c-c>
but, doesn't ruby concurrency rely on processes
jgnagy has quit [Remote host closed the connection]
<c-c>
+?
<dminuoso>
c-c: So? It's not like Ruby is going to be useful in a performance contest anyway.
<blackbombay>
ruby threads are concurrent though.
<dminuoso>
blackbombay: No. But parallel.
jgnagy has joined #ruby
<blackbombay>
they're not parallel, no.
<blackbombay>
they're concurrent.
<blackbombay>
varies from implementation but on cruby at least they're concurrent.
<dminuoso>
blackbombay: You are mixing things up. Ruby threads can be concurrent in an ideal scenario - but the GVL usually fucks you.
<dminuoso>
No they are not.
<blackbombay>
um, they are. :)
<dminuoso>
blackbombay: Concurrency simply means that two tasks are being executed at the same time.
<blackbombay>
wut
<dminuoso>
Which with the GVL is often not possible.
<blackbombay>
you've confused parallelism with concurrency.
<blackbombay>
i suggest you check out rob pikes video.
<c-c>
as an added twist, UI and (possibly engine) maybe rewritten in rust or something if this thing works
<dminuoso>
blackbombay: Then you have a different understanding of the words than the rest of the world.
<dminuoso>
And I do not take a youtube video as an argument, sorry.
<blackbombay>
i'll go with rob pikes definition, which says you have got the meaning backwards.
tjbiddle has joined #ruby
<dminuoso>
blackbombay: Then Ill have the meaning backwards but have no confusion when talking with anyone.
<c-c>
concurrency: a pen is sharpened by two people -- parallelism: two people sharpen pens
benlieb has quit [Quit: benlieb]
xall has joined #ruby
<dminuoso>
blackbombay: It's like nitpicking that RJ45 is not RJ45 but 8P2C.
<blackbombay>
then those people are wrong too. it's a common error, but concurrency != parallelism.
benlieb has joined #ruby
<dminuoso>
blackbombay: Sure, you may be correct - but nobody in this world will know what 8P2C is.
benlieb has quit [Client Quit]
<blackbombay>
at google it matters, at least.
benlieb has joined #ruby
benlieb has quit [Client Quit]
jgnagy has quit [Ping timeout: 258 seconds]
benlieb has joined #ruby
benlieb has quit [Client Quit]
<dminuoso>
blackbombay: At any rate, its confusingly meant in both directions by different folks.
<dminuoso>
I recognize that
<blackbombay>
in any case, to say ruby threads are not concurrent is incorrect. they're not run in parallel(usually), and it is implementation dependent as well. jruby has parallel threads, and so does rubinius.
aganov has joined #ruby
benlieb has joined #ruby
Dimik has quit [Ping timeout: 260 seconds]
benlieb has quit [Client Quit]
<blackbombay>
sure, 'concurrent' as a term has been misused a lot, which is probably why rob pike decided to do that presentation in the first place.
benlieb has joined #ruby
benlieb has quit [Client Quit]
ace05 has joined #ruby
Fichtenstein has joined #ruby
conta has joined #ruby
s2013 has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<dminuoso>
blackbombay: Okay fine I yield. You may be correct and I have mave been carrying the wrong notion these years.
SeepingN has quit [Read error: Connection reset by peer]
<blackbombay>
that video is very good. like almost every video rob pike has done.
<c-c>
Any comments on using named pipes for local interprocess communication?
minimalism has quit [Quit: minimalism]
<c-c>
- In a UI<->Engine -scenario
nofxxx has joined #ruby
ace05 has quit [Ping timeout: 260 seconds]
agent_white has quit [Read error: Connection reset by peer]
minimalism has joined #ruby
hutch34 has joined #ruby
<matthewd>
c-c: I'm not sure what sort of comment you're looking for... you've chosen a rather odd-sounding architecture, but "why?" isn't really a comment.
shmuli has joined #ruby
<matthewd>
c-c: "That seems more complicated / harder than the less complicated / easier options"?
nofxx has quit [Ping timeout: 246 seconds]
wugy has joined #ruby
wugy has quit [Excess Flood]
wugy has joined #ruby
wugy has quit [Excess Flood]
shmuli has quit [Client Quit]
wugy has joined #ruby
wugy has quit [Excess Flood]
wugy has joined #ruby
wugy has quit [Excess Flood]
<c-c>
matthewd: looking for a definitive answer on whether to do it
<c-c>
*use it, or them
Guest69 has quit [Quit: My iMac has gone to sleep. ZZZzzz…]
railswebdev has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c>
matthewd: care to expand on "odd-sounding architecture"?
<matthewd>
c-c: There may be reasons you've dismissed those, but without walking us through that journey, it's hard to comment on the reasonableness of where you've ended up
agent_white has joined #ruby
<matthewd>
1. Why not threads? 2. Why not unnamed pipes? Do you expect to launch these processes independently?!
hutch34 has quit [Ping timeout: 250 seconds]
<c-c>
1. Because my understanding is ruby relies on process based concurrency.
nofxxx has quit [Ping timeout: 252 seconds]
firstdayonthejob has joined #ruby
<c-c>
2. Unnamed pipes are a possibility. But Windows only supports named pipes, a downside. Currently the approach is: - launch separate UI and Game engine processes, which communicate with Game State -server (or perhaps process when its ran locally).
<matthewd>
I'm pretty sure the only thing agreed upon throughout the above argument was that that's not true
Gadgetoid has quit [Ping timeout: 244 seconds]
SeepingN has joined #ruby
<c-c>
matthewd: sorry thats vague to me
<c-c>
matthewd: since there are at least 3 statements above! :D
<c-c>
Note that I've learned most of this during 1.8 and 1.9
spicerack has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c>
so, perhaps now threads are the thing to use on MRI
<matthewd>
Concurrency is hard, in conversations too :P
teclator_ has quit [Ping timeout: 260 seconds]
teclator has joined #ruby
frozengeek___ has joined #ruby
xall has quit [Ping timeout: 252 seconds]
tjbiddle has quit [Quit: tjbiddle]
<c-c>
I think my problem is not hard at all, just bunch of choices when trying to include non-linux platforms
SeepingN has quit [Quit: The system is going down for reboot NOW!]
A5101 has quit [Ping timeout: 246 seconds]
frozengeek___ has quit [Client Quit]
Macaveli has joined #ruby
SeepingN has joined #ruby
terlar has quit [Ping timeout: 268 seconds]
Gadgetoid has joined #ruby
spicerack has joined #ruby
<matthewd>
Ruby threads do not execute in parallel -- only one can actually be doing a thing on the CPU at a given moment
lxsameer has joined #ruby
<matthewd>
So, if you have multiple CPU-heavy things to do at the same time, then multiple processes help
<matthewd>
"UI", by definition, does not seem CPU-heavy; therefore it seems to be suitable for threads; therefore my answer to your question is "named pipes seem over-complicated for something that seems solvable with threads."
firstdayonthejob has quit [Ping timeout: 240 seconds]
<c-c>
But, a bogged-down Engine running in the same process as the UI will cause the UI to seem slow... (?)
Gadgetoid has quit [Ping timeout: 250 seconds]
charliesome has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Macaveli has quit [Ping timeout: 244 seconds]
<c-c>
Not sure if my idea of Game State Server <--request UI-state <-- UI -->message commands-->Engine is clear
last_staff has joined #ruby
nchambers is now known as God
<c-c>
(Engine-->send changes-->State Server omitted above)
vondruch_ is now known as vondruch
charliesome has joined #ruby
charliesome has quit [Client Quit]
tmtwd has quit [Ping timeout: 248 seconds]
God is now known as nchambers
yeticry has quit [Ping timeout: 244 seconds]
dionysus69 has joined #ruby
yeticry has joined #ruby
rsampaio_ has quit [Ping timeout: 258 seconds]
dionysus69 has quit [Client Quit]
dionysus69 has joined #ruby
<matthewd>
Assuming "(?)" indicates a question I'm allowed to answer: no, that's why you're using threads.
doublemalt_ has joined #ruby
conta has quit [Quit: conta]
<c-c>
matthewd: ah, good move avoiding the actual question!
<matthewd>
It was a statement with a question mark appended... and I thought I did just answer it
<c-c>
matthewd: there was no word "thread" in the preceding sentence
mvxlr has joined #ruby
Chagel has quit [Ping timeout: 260 seconds]
<c-c>
I think this all could be 2-3 very simple statements.
<matthewd>
I'm clearly lost. Can you rephrase as an actual question?
Gadgetoid has joined #ruby
SeepingN has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<c-c>
"Wouldn't a bogged down Engine running in the same process as the UI cause the UI to be bogged down as well?"
<matthewd>
"I think you should use threads" / "But a single process will lag the UI" / "No, that's what threads are for" / "I didn't mention threads"
mark_66 has joined #ruby
<matthewd>
No, not if they're in separate threads.
<c-c>
Let me cut to the chase. Are MRI's threads are implemented so that they can utilize multiple cores?
<c-c>
in Ruby 2
<matthewd>
No.
hutch34 has joined #ruby
<c-c>
Ergo, it is not a good idea to use threads for concurrency in a UI<->Engine scenario, matthewd
<matthewd>
I'm claiming that's not relevant to your needs
<matthewd>
I disagree that that follows, but you're free to implement what you like.
<c-c>
matthewd: uhuh?
<c-c>
matthewd: then can you explain how you'd solve the problem described in the "bogged down Engine" -question?
frozengeek___ has quit [Quit: frozengeek___]
<matthewd>
... by using threads?
<matthewd>
We're talking in circles
Chagel has joined #ruby
SeepingN has joined #ruby
conta has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
nowhere_man has quit [Ping timeout: 250 seconds]
<c-c>
matthewd: no, you are confused
Snickers has joined #ruby
<c-c>
matthewd: Are MRI's threads are implemented so that they can
<c-c>
utilize multiple cores?
<c-c>
(asked this before, you answered "no")
SeepingN has quit [Client Quit]
aufi has joined #ruby
<c-c>
If your answer is correct, no amount of threading will help the UI bogged down by the Engine
<matthewd>
The answer is still no, and it still doesn't mean one thread will lag when another has work to do.
<dminuoso>
c-c: If you use Ruby you are already bogged down.
<c-c>
matthewd: well suppose both threads would like 90% of processor cores power
<matthewd>
(though it does mean the busy thread will take slightly longer, because it's getting interrupted to handle the UI work)
<dminuoso>
c-c: That is a sad reality that you have to accept if you want to do anything graphics related in Ruby.
<dminuoso>
Ruby is not fast. Period.
<c-c>
matthewd dminuoso it is about the user experience, not actual speed
<matthewd>
> "UI", by definition, does not seem CPU-heavy
<dminuoso>
c-c: Ruby just is the wrong language for the job.
<dminuoso>
c-c: Ruby sucks for user interfaces. Ruby sucks for good parallelism (as discussed earlier).
<matthewd>
If you have multiple CPU-heavy tasks to do, then do it in processes. But that's nothing to do with a lagging UI.
<dminuoso>
Ruby is great for tooling and perhaps web development. Not games.
<c-c>
matthewd: so, now you are making the statements that I started with in the first place :)
xall has joined #ruby
<c-c>
dminuoso: also, this is character based
<dminuoso>
c-c: If you try to write a game in Ruby and solve any design issues of the Ruby virtual machines with IPC you are going into a world of troubule.
<dminuoso>
Honestly.
<matthewd>
I've been saying the same set of things the whole time
<dminuoso>
c-c: If you want to do it in Ruby as a proof of concept with any regard of performance then go ahead, Ill give some advice.
<c-c>
matthewd: you made a statement that "its not true" when I said "ruby relies on process based concurrency"
<c-c>
matthewd: now you agree
<c-c>
matthewd: you can only fool yourself 8)
<dminuoso>
c-c: *parallelism
<matthewd>
Now we're back to the concurrency vs parallelism argument
<c-c>
nope
<dminuoso>
c-c: So as I have been proven wrong, concurrency means overlapping execution times and parallelism means parallel execution.
<dminuoso>
c-c: Ruby has concurrency out of the box.
<dminuoso>
But poor parallelism due to the global vm lock.
<zacts>
I'm just joining in, but when should one utilize threads, and when should one utilize fibers?
<c-c>
dminuoso: why would I want to solve 'design issues of ruby vm's?
<zacts>
(in a nutshell)
<c-c>
dminuoso: are you gyus just making shit up
r3vDev has joined #ruby
<dminuoso>
c-c: You talk about "A hogging B"
<dminuoso>
c-c: Why would A hog B?
<dminuoso>
c-c: Either because Ruby has shit poor parallelism, or because you are making things up.
<c-c>
dminuoso: I know it does, I can see it on my process monitor, 100% core use, nowhere to go.
<dminuoso>
If its the first, then using IPC to solve the issue is using IPC to work around Ruby design issues.
<dminuoso>
c-c: Processes are not going to make things better.
<dminuoso>
On the opposite, they make things worse.
astrobunny has quit [Remote host closed the connection]
<c-c>
dminuoso: you made a strawman, sorry but thats not my problem
<c-c>
my problem is still: how to implement multiplatform concurrency on multiple cores
<c-c>
simple as that
astrobunny has joined #ruby
<dminuoso>
c-c: Use threads.
<dminuoso>
Do you want parallelism? Dont use Ruby.
<c-c>
dminuoso: but it was just argued threads do not utilize multiple cores
SesMan has joined #ruby
<dminuoso>
c-c: Yeah. You are looking for parallelism, not concurrency.
<matthewd>
If you need to use multiple cores, you need processes. But you don't need multiple cores "In a UI<->Engine -scenario"
<c-c>
nope
TomyWork has joined #ruby
xall has quit [Quit: WeeChat 1.5]
<c-c>
I am looking for concurrency on a local machine
<c-c>
:)
astrobun_ has joined #ruby
<c-c>
and yes, I agree, seems that processes are the way to go for utilizing multicore cPU
xall has joined #ruby
<dminuoso>
c-c: You obviously missed the argument that blackbombay made.
<dminuoso>
c-c: Either way. The reason Ruby has piss poor parallelism is a design issue. And you want to work around that design issue using processes and IPC.
<c-c>
I'm not into your "parallelism vs concurrency" argument that was not related to my question nor this channel directly.
serard has joined #ruby
<serard>
hello
<c-c>
Its just a simple game. I'm not making the most efficient supergame ever
<c-c>
Calm down with the architecture astronautism! 8)
ace05 has joined #ruby
<serard>
I have a variable, I want to use it like a :myvar; is this possible ?
<matthewd>
c-c: This discussion doesn't seem to be getting anywhere. You've chosen a solution, so I don't think there's more we can offer.
<dminuoso>
zacts: Generally fibers allow for writing better code, as you can get around using locking primitives and improve scheduling behavior.
mikecmpbll has quit [Quit: inabit. zz.]
<c-c>
matthewd: well, you offered me a lot of words, but went down the wrong path!
<zacts>
ok
<matthewd>
serard: Expand on what you mean?
<dminuoso>
serard: Yes, but you don't want to do this.
<c-c>
matthewd: maybe stick to a more pragmatic approach next time!
<zacts>
dminuoso: aren't there gems that abstract out threading primitives?
<matthewd>
c-c: My feedback remains "given the problem described, the simplest approach that meets the requirements is to use threads; IPC is complicated"
marktwo has quit [Ping timeout: 256 seconds]
<zacts>
dminuoso: "as you can get around using locking primitives" <-- can't you do this with gems that abstract out those primitives?
<zacts>
sorry if this makes no sense. I'm still learning.
<dminuoso>
zacts: No, thread safety needs to be considered. It cant be hidden away without overly excessive locking strategies.
<zacts>
ah ok
tomphp has joined #ruby
<serard>
Rust ?
<c-c>
matthewd: but, threads don't use multicore, so no, thats not the simplest solution
<dminuoso>
c-c: THreads can and do use multicore.
<dminuoso>
c-c: You are missing the point.
<c-c>
dminuoso: well I asked, and matthewd said no
<c-c>
I think you are projecting your thinks at me
millerti has quit [Read error: Connection reset by peer]
<matthewd>
c-c: You don't need multiple cores to keep a UI responsive, which is the stated requirement
<dminuoso>
c-c: Anything that does not involve the GVL can use parallelism without issues.
ace05 has quit [Ping timeout: 250 seconds]
marktwo has joined #ruby
<matthewd>
c-c: If "uses multicore because it sounds cool" is an additional requirement, then that changes things
<dminuoso>
c-c: Now since you dont have a fucking clue what the GVL is, I recommend you read a book on Ruby.
Azure has quit [Read error: Connection reset by peer]
<c-c>
See, tons of projecting
<dminuoso>
You're right, I'm somehow caring.
* dminuoso
starts to grow up
<zacts>
would you need to change Ruby code that is already concurrent, if you want it to then become parallel as well?
<c-c>
You run around, talk too much. Show me, or ignore me :)
<zacts>
or is this just an interpreter detail?
<matthewd>
c-c: But I think this conversation has reached its conclusion, and it's time to take a pragmatic approach to our time management
nobitanobi has joined #ruby
<dminuoso>
zacts: Generally it depends. The majority of Rubys core is protected by a global VM lock.
<c-c>
matthewd dminuoso thank you for your input, I have read your ideas now at least twice.
<zacts>
s/just an interpreter detail/would the interpreter handle parallelism of concurrent code automatically/
Azure has joined #ruby
<zacts>
ok
<dminuoso>
zacts: Blocking IO for example can be done in parallel without an issue (which is the main parallelism you can find in Ruby libraries)
<matthewd>
zacts: As long as it's "properly" concurrent, it's an interpreter detail. Often, people do things that are safe in MRI without realising it's not actually safe on a theoretical fully parallel interpreter.
<zacts>
ah ok
* c-c
doesn't have a "fucking clue"
<dminuoso>
zacts: Note that the GVL does not make Ruby thread-safe either, making it really disgusting because it really gives wrong impressions.
<c-c>
How nice that we have 3leet h4x0rs here - so good that they need to swear to make their point.
teclator has quit [Ping timeout: 250 seconds]
<zacts>
I'm going to read this Pragmatic Press book on concurrency, if you think it's good
<zacts>
^ what do you think of this book for a newbie to concurrency / threads / fibers
<matthewd>
e.g., something as seemingly innocuous as reading a hash from two threads is safe in MRI because of the GVL, but is not necessarily so on other interpreters
<dminuoso>
zacts: Probably a bad read if you're new to threads.
<zacts>
dminuoso: do you have any other suggestions?
<zacts>
:-)
<dminuoso>
zacts: It seems like a great introduction into those topics in Ruby if you're already familiar.
<dminuoso>
Mmmm
<zacts>
I'm unfamiliar with threads. I know of them, but don't know much about them
<c-c>
I wonder if, as dminuoso says "don't have a f*cking clue", might be due to people putting their own words in my mouth... Hmm, or just because someone thinks other people don't know what they know. I think this is not suitable for this community, dminuoso.
<zacts>
perhaps a computer science book like Concepts, Techniques, and Models of Computer Programming by van Roy?
<zacts>
I would prefer something more lightweight and Ruby oriented though, if possible
yqt has joined #ruby
<zacts>
but I could go for the above genre as well (I will eventually anyway)
Joufflu has quit [Read error: Connection reset by peer]
tvw has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<serard>
dminuoso, you told me I can, but I don't want to do this; ok, please tell me how I can do it :)
ledestin has joined #ruby
<dminuoso>
zacts: Any other languages you are familiar with?
<zacts>
dminuoso: I also generally try to avoid random google searched Ruby tutorials
<dminuoso>
zacts: I might have a book or two if you have a Java or C++ background.
<zacts>
dminuoso: not really. Perl5.
fullstack has quit [Quit: ZNC 1.6.3 - http://znc.in]
ropeney has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
<zacts>
dminuoso: perhaps Java
<zacts>
I have a Java book, and I wouldn't mind picking it up a bit
Olipro has quit [Ping timeout: 246 seconds]
<zacts>
I've only done minimal minimal beginners Java
terlar has joined #ruby
<matthewd>
serard: So if I'm reading this right, you want to basically write ruby in your yaml file
<c-c>
zacts: just ask two kids to write and edit a story with one pencil. All the cases are found there!
<serard>
matthewd, nop, I'm writting a Vagrantfile, which loads a yaml to drive configuration by code
<dminuoso>
zacts: Did some digging, your idea of "Concepts, Techniques, and Models of Computer Programming" doesn't sound so bad and seems to cover concurrent programming on all described programming techniques.
<serard>
I convert the yaml to an OpenStruct, then I'd like to use that OpenStruct to loop over the triggers definitions, but in Vagrantfile's trigger's plugin, it's declared like before :up
<serard>
and I don't want to write loop for each kind of momentum
<serard>
(but I will to add checks for non-existing ones)
<zacts>
dminuoso: ah ok
<zacts>
I'll go ahead and do Concepts / Techniques
Humdai has joined #ruby
<serard>
matthewd, by momentum, I mean "config.triggers.before :halt do ... end"
<zacts>
I've wanted to do this for a while, and now this gives me a reason to do it in a practical sense
<dminuoso>
zacts: I have not read it though, but based on what I see it does seem to be a decent book.
<matthewd>
serard: I think I need a better illustration of how these two pieces inter-relate
hutch34 has joined #ruby
<zacts>
ah ok
<matthewd>
serard: You want to evaluate the first in a way that is equivalent to something approximately shaped like the second, right?
<zacts>
I think I'll give it a go, if I get stuck I'll ask here or on the appropriate irc channels
Olipro has joined #ruby
<dminuoso>
zacts: Absolutely. It's a really complex and at times disgusting topic. It's fascinating.
<zacts>
I may read the pragmatic Ruby threads book at the same time to try applying it to Ruby directly
<dminuoso>
zacts: Probably not a bad idea.
<matthewd>
serard: Can you show what the second would look like if you did write it by hand to match the first? They currently seem to be doing different things.
<dminuoso>
zacts: Multithreading gives you random bugs you can't debug and fix - but break your application.
<dminuoso>
They are wonderful.
claudiuinberlin has joined #ruby
<zacts>
lol
andikr has joined #ruby
<dminuoso>
zacts: In my previous project we had a so-called race condition and it took us about 6 months of exhaustive search, debugging, regression testing and more debugging to find the bug - it was just a single missing lock.
<zacts>
dminuoso: now doesn't elixir have a more elegant approach to this?
<serard>
matthewd, Now I want to drive this code by yaml, easing the add of new commands to run at any momentum, for run or run_remote (run and run_remote are provided by vagrant-triggers plugin)
<zacts>
oh wow, 6 months!
<dminuoso>
zacts: The issue was just that whenever we attached a debugger, the bug disappeared. Whenever we started adding logging, the bug disappeared.
<serard>
I have a vagrant plugin that uses :something (like something.before :halt), how can I use a variable to populate that :something (like my_var="halt", then :my_var) ?
Fernando-Basso has joined #ruby
<manveru>
problem with ruby 3 is that it's still about 3 years away :|
frozengeek___ has joined #ruby
<zacts>
oh that's a while from now
<zacts>
could 2.* backport it in?
<manveru>
serard: my_var = :halt
<zacts>
or even as a gem?
<manveru>
serard: something.before my_var
<domgetter>
zacts it would have to be the sort of thing that the virtual machine supports
lenwood has joined #ruby
<matthewd>
my_var = "halt".to_sym
<serard>
matthewd, thanks, manveru thank !
Macaveli_ has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<zacts>
ah ok
d0nn1e has quit [Ping timeout: 248 seconds]
<domgetter>
zacts technically you can have parallelism now in Ruby if you write a C extension. You'd just be operating outside of Ruby while the C code is running
<manveru>
or you could use jruby or rubinius
<zacts>
cool! I'll check out all this stuff. I'm thinking for professional code I would probably lean towards elixir for highly concurrent new code.
jmignault has quit [Ping timeout: 250 seconds]
<zacts>
manveru: ah ok, yeah I might use jruby or something for existing Ruby code then.
<zacts>
those were more ponderings / questions than statements
d0nn1e has joined #ruby
<zacts>
so feel free to change my mind
<manveru>
well, i love elixir :)
<manveru>
but it's definitely very different from ruby
<zacts>
domgetter: yeah, sounds sketchy for most applications
<domgetter>
If we're loving other languages, I love Clojure
<manveru>
i should try crystal this year
<zacts>
yeah lispy languages are cool
tdy1 has joined #ruby
<zacts>
I just love ruby syntax though
<c-c>
I've been wooing Rust lately...
Macaveli has joined #ruby
<domgetter>
Though Elixir and Crystal are probably more familiar in syntax to Ruby
<c-c>
its so sexycal
<c-c>
Ruby 4 will be written in Rust (I think)
<domgetter>
c-c Yeah well Clojure is super sexpy
Madplatypus has joined #ruby
<domgetter>
Is there a Rustbinius project?
<c-c>
domgetter: I like lisps, too
tdy has quit [Ping timeout: 268 seconds]
<zacts>
there is also LFE
<zacts>
Lisp Flavored Erlang
<bougyman>
c-c: no shit?
alexherbo2 has quit [Quit: WeeChat 1.6]
<c-c>
bougyman: Ruby 4? Just what I see in the crystal ball
binaryplease has joined #ruby
<zacts>
it's all about circles. concurrency is like a hippy dippy circle
<manveru>
i think you can rip C from matz's cold dead hands ;)
<domgetter>
If there were method literals, would Ruby be homoiconic?
<zacts>
if we can understand the wisdom of circles, we will solve all concurrency issues
<zacts>
sorry, just being silly
<zacts>
anyway, I'll bbl
<zacts>
thanks for the tips
<zacts>
:-)
r3vDev has quit [Ping timeout: 260 seconds]
dasher00 has quit [Ping timeout: 246 seconds]
flying has joined #ruby
<domgetter>
Anyone know of any work done to add object literals to Ruby?
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
<c-c>
manveru: Rust is like C with ruby syntax. Would be fun to hear what Matz thinks about rust.
Burgestrand has joined #ruby
Chair has joined #ruby
joonty has joined #ruby
Chair has quit [Remote host closed the connection]
Macaveli has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
manjaro-kde5- has joined #ruby
Macaveli has quit [Read error: Connection reset by peer]
blackbom1 has joined #ruby
aupadhye has quit [Ping timeout: 250 seconds]
Macaveli has joined #ruby
ishe_ua has joined #ruby
blackbombay has quit [Ping timeout: 268 seconds]
elaptics has joined #ruby
lenwood has quit [Ping timeout: 260 seconds]
jgnagy has joined #ruby
<agent_white>
Would be fun to see what he says about Elixir. ErlangVM is pretty neat.
Macaveli has quit [Read error: Connection reset by peer]
Macaveli has joined #ruby
hutch34 has joined #ruby
nadir has quit [Quit: Connection closed for inactivity]
aidalgol has quit [Remote host closed the connection]
tjbiddle has joined #ruby
KnownSyntax has quit [Ping timeout: 250 seconds]
jgnagy has quit [Ping timeout: 260 seconds]
Azure|dc has joined #ruby
Azure has quit [Ping timeout: 248 seconds]
hutch34 has quit [Ping timeout: 250 seconds]
xall has quit [Ping timeout: 252 seconds]
astrobun_ has quit [Remote host closed the connection]
astrobun_ has joined #ruby
minimalism has quit [Ping timeout: 245 seconds]
ace05 has joined #ruby
aupadhye has joined #ruby
pandaant has joined #ruby
camilasan has quit [Remote host closed the connection]
<matthewd>
From the caller's perspective, it will invoke the first function (with the supplied argument), then when it returns or raises, it'll invoke the second function (with its supplied argument) before continuing
<dminuoso>
sogard: It's probably the best resource on C extensions.
<matthewd>
state = nil; begin; body(data); rescue Exception => ex; state = ex; nil; end
<matthewd>
So yeah, as you're embedding rather than extending, that may well be what you want
<dminuoso>
sogard: Please check my link - it covers these things.
<dminuoso>
sogard: (Most of mruby has ruby equivalents - this included)
johnmccabe has joined #ruby
<matthewd>
Call protect, then return state ? Err(state) : Ok(result)
<gr33n7007h3>
dminuoso: +1 on that link
gregf_ has joined #ruby
jmignault has joined #ruby
toretore has joined #ruby
xall has joined #ruby
gr33n7007h3 has quit [Quit: WeeChat 1.6]
aupadhye has quit [Ping timeout: 258 seconds]
hutch34 has joined #ruby
zacts has quit [Ping timeout: 256 seconds]
jmignault has quit [Ping timeout: 258 seconds]
manjaro-kde5- has joined #ruby
kent\n has quit [Quit: No Ping reply in 180 seconds.]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
kent\n has joined #ruby
hutch34 has quit [Ping timeout: 258 seconds]
Macaveli has joined #ruby
Macaveli has quit [Client Quit]
savage has joined #ruby
c0mrad3 has joined #ruby
Macaveli has joined #ruby
gr33n7007h has joined #ruby
gr33n7007h is now known as al2o3-cr
Cohedrin has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
nowhere_man has joined #ruby
Macaveli has quit [Client Quit]
<al2o3-cr>
għ
<al2o3-cr>
l;'#
<c-c>
al2o3-cr: focus on vim-window
<al2o3-cr>
i spilt a bit of water on brand new keyboard :(
Macaveli has joined #ruby
<domgetter>
:(
TvL2386 has joined #ruby
Silex^^ has joined #ruby
jgt has joined #ruby
blackbombay has joined #ruby
<domgetter>
You should be able to safely unplug it and possibly take it apart and put it by a fan to dry off with no damage
<al2o3-cr>
it was only a drop or so but i panicked
blackbom1 has quit [Ping timeout: 248 seconds]
Silex^^ is now known as Silex
<al2o3-cr>
for the price of this laptop i don't want damage anything
<domgetter>
Then I was sad for no reason
joast has quit [Ping timeout: 250 seconds]
Snowy has joined #ruby
<serard>
With regex, how can I match and capture many times same pattern ?
jgt has quit [Ping timeout: 244 seconds]
Snowy has quit [Remote host closed the connection]
<serard>
for example, dumb : "ssh-config-upsert rm ##machine## ##vars.host_ssh_file## ##vars.host_ssh_file##"
Snowy has joined #ruby
<serard>
I want to capture-match all ##vars\..*##
tvw has quit []
<al2o3-cr>
serard: String#scan
jgt has joined #ruby
<domgetter>
also, the .* in ##vars\..*## will grab the ## along with everything else until the end of the line/string
banisterfiend has quit [Ping timeout: 260 seconds]
Beams has quit [Quit: .]
workmad3 has joined #ruby
<domgetter>
so you probably want something more like ##vars\.[^#]*## which means "grab two hashtags, then vars dot, then zero or more things that arent hashtags, then 2 more hashtags"
<al2o3-cr>
serard: str.scan /##.+?##/
<domgetter>
I don't think serard wants to capture ##machine## but I could be wrong
<al2o3-cr>
ah, right
<al2o3-cr>
serard: str.scan /##vars.+?##/
jsrn_ has joined #ruby
KnownSyntax has quit [Ping timeout: 260 seconds]
konsolebox has joined #ruby
<serard>
not ##machine##, only ##vars\..*## yes
<serard>
thanks ! :)
<al2o3-cr>
serard: str.scan /##(?=v).+?##/
<serard>
it's what after vars. that is of interest
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter>
Is your real code different from your example?
zacts has joined #ruby
<serard>
my bad, was putting the regex within ''
<c-c>
Suppose I have a process #1 with module M with class A. I fork a process #2, and require a module M with class B. I assume the process #2 now has module M with classes A and B? And if I spawn process #3 and require module M with class C, #3 will only have classes A & C?
ace05 has quit [Ping timeout: 246 seconds]
<c-c>
I looked with pry on #1 and it only has A. I can't figure out how to redirect io from the #1 running terminal to a pry in #2/#3 so I can't peek.
Illianthe has quit [Ping timeout: 258 seconds]
<domgetter>
Are you spawning #3 from #1 only?
<toretore>
c-c: yes
<c-c>
domgetter: both spawned (forked) from #1
<domgetter>
c-c You can always have code print to a log file
<c-c>
heh, kind of futile question as I've read that forking copies memory and thats it but had to ask
xall has quit [Ping timeout: 244 seconds]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<c-c>
or maybe there are secret ruby snafu's...
tjbiddle has quit [Quit: tjbiddle]
ldnunes has joined #ruby
atmosx has joined #ruby
xall has joined #ruby
tjbiddle has joined #ruby
teclator has quit [Ping timeout: 244 seconds]
teclator has joined #ruby
CloCkWeRX has quit [Ping timeout: 250 seconds]
ledestin has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<serard>
was calling public_send on the wrong thing..
sparch has joined #ruby
sparch has joined #ruby
sparch has quit [Changing host]
hightower2 has joined #ruby
fnord_ has quit [Ping timeout: 260 seconds]
gr33n7007h has quit [Client Quit]
dmtd has quit [Quit: Connection closed for inactivity]
jonjoe has joined #ruby
<jonjoe>
hey guys whats the best way to view all outbound email traffic from my computer? Is this even doable from a script? Not really after a how-to more a point in the right direction as I have never really interfaced with my computer this directly
<jonjoe>
Im not refering to a mail server more outbound port activity
<dminuoso>
jonjoe: No it is not.
lel has quit [Ping timeout: 240 seconds]
<dminuoso>
jonjoe: The closest interface you have is ruby-pcap
<dminuoso>
jonjoe: But you get more than just email traffic.
<dminuoso>
You get everything.
<domgetter>
jonjoe what OS?
gr33n7007h has joined #ruby
ferr has joined #ruby
jcao219 has joined #ruby
<dminuoso>
jonjoe: (Or pcaprub rather)
gr33n7007h has quit [Client Quit]
<jonjoe>
Thats totally cool. Its an experiment for an email security company to help with their assistance software. Typically windows but could be OSX.
<c-c>
jonjoe: possibly you could proxy all traffic from email port via a proxy
<jonjoe>
Thought I would add context as i just realised my question looked shady as hell haha it is completely legit however.
<jonjoe>
Thanks ill check those avenues out! appriciated <3
gr33n7007h has joined #ruby
mvxlr has joined #ruby
gr33n7007h has quit [Client Quit]
douglascorrea has joined #ruby
gregf_ has quit [Quit: Page closed]
Ultra_DuckZ has joined #ruby
gr33n7007h has joined #ruby
nowhere_man has quit [Remote host closed the connection]
nowhere_man has joined #ruby
r3vDev has joined #ruby
<dminuoso>
^- and this is why I dont buy "email security appliances"
<Ultra_DuckZ>
hi, anybody knows if the Rasem gem has a way to tell the width a given string will have in svg? or is there an equivalent gem that can do that? the reason is that I want to put labels under a chart, but the amount of labels depends on how many labels can fit
kobain has joined #ruby
<dminuoso>
Ultra_DuckZ: What do you mean by "width" ?
augcesar has joined #ruby
<Ultra_DuckZ>
dminuoso: pixel width, I need to do something like label_quantity = (svg_width / (average_string_width + padding))
<Ultra_DuckZ>
dminuoso: what I want to achieve is something like the 12:00 labels in the top chart here http://bitcoinity.org/markets
zarubin has joined #ruby
<Ultra_DuckZ>
dminuoso: they don't look like they belong to a particular bar in the chart to me, they look a bit "fuzzy"
GodFather has joined #ruby
gr33n7007h has quit [Quit: WeeChat 1.6]
<bougyman>
anyone alive?
<bougyman>
per_user_writes.rb:30:in `===': invalid byte sequence in US-ASCII (ArgumentError)
douglasc_ has joined #ruby
<bougyman>
getting that in a case; when /\bTHING\b/
<bougyman>
er case string; when /\bTHING\b/
<bougyman>
is there something I can do somewhere to let it know that the string is UTF?
<bougyman>
(ruby 2.1)
douglascorrea has quit [Ping timeout: 258 seconds]
<dminuoso>
bougyman: Ideally the interface that generates the string should be encoding aware. File.read for example accepts encoding - as a last resort you can use force_encoding to reinterpret a strings codepoints with a different encoding.
<dminuoso>
bougyman: But if at all possible you should fix this at the root.
sdelic has quit [Ping timeout: 245 seconds]
mikecmpbll has quit [Quit: inabit. zz.]
teclator_ is now known as teclator
<jonjoe>
@dminuoso lol, dont worry its only an experiment on my dev lappy for now. If anything comes of it ill be making damn sure its ethical and respectful. Thanks for pointing me in the right direction thats helped a ton. Have a great one!
spicerack has joined #ruby
mikecmpbll has joined #ruby
<domgetter>
Ultra_DuckZ I don't think there's a way to know ahead-of-time how wide the rendered text will be in pixels
<domgetter>
You'll have to code something in Javascript to deal with it in the client
vali has joined #ruby
<domgetter>
Ultra_DuckZ is this eventually going to be rendered in a Browser?
spicerack has quit [Client Quit]
spicerack has joined #ruby
<bougyman>
dminuoso: it's an unclean string.
<bougyman>
call it user input
spicerack has quit [Client Quit]
<bougyman>
reading a logfile
<bougyman>
and i'm using File::Tail::Logfile
<bougyman>
I don't know if it accepts that option
<dminuoso>
bougyman: Go find out then.
<vali>
hi guys
<bougyman>
doing
jgt has joined #ruby
<dminuoso>
If it takes me less than 15s to find the answer Im gonna slap you.
sampeter has joined #ruby
<bougyman>
damn
<bougyman>
the logfile is ASCII encoded.
sampeter has left #ruby ["Leaving"]
<vali>
can anyone help me with some info on how to split a some json keys in distinct messages/key=value ones?
<linduxed>
it's just that the selection of different models is what made me ask the question "is there a simple/standard/quick way to do it"
<ljarvis>
vali: ok, well you can get that really easily now with the code I suggested
<ljarvis>
you just have to make some tweaks
<vali>
looking into it now
<domgetter>
Ultra_DuckZ svg renderers are not guaranteed to render the same as one another. For example, in Firefox, you can't query an svg text element's textLength property
<dminuoso>
linduxed: Today I learned a big mistake I've been doing for a long time. Concurrency is not the same thing as parallelism. MRI Ruby has concurrency but poor parallelism.
<dminuoso>
If you think about those words for a while it actually makes sense. :P
truenito has joined #ruby
<toretore>
the words themselves don't give much insight until you're been taught what they mean specifically in this context
<domgetter>
Ultra_DuckZ and the bounding boxes can be different for the same code between Chrome and Firefox. So you won't be able to *precisely and exactly* know how big some text will be before it is rendered in a client
nankyokusei has joined #ruby
banisterfiend has joined #ruby
<domgetter>
dminuoso concurrency is when two people share a pencil. parallelism is when there are two pencils
Silthias has quit [Ping timeout: 248 seconds]
<domgetter>
Ultra_DuckZ in other words, the thing you want to do is only doable with client-side code (i.e. Javascript)
Puffball has quit [Remote host closed the connection]
emilkarl has joined #ruby
ace05 has joined #ruby
Illianthe has joined #ruby
<libastral>
someone ever tried to execute "gem server" ? It is completely broken in browser. Browser can't find any css/js file. The rubygems package from my linux distro at least renders correct html in "gem server", but installed from "rbenv" gives a real mess, a stderr in a html markup, unclosed quotes, this really screws up everything
_sfiguser has joined #ruby
c0mrad3 has quit [Quit: Connection closed for inactivity]
XV8 has joined #ruby
Puffball has joined #ruby
charliesome has joined #ruby
<serard>
Using Hash#deep_merge only merge existing keys from source; how to add new ones ?
nankyokusei has quit [Ping timeout: 240 seconds]
c355e3b has joined #ruby
<atmosx>
libastral works for me (rvm)
<atmosx>
chrome only complains about not finding a favicon which is a minor issue anyway
eggshke has joined #ruby
<libastral>
atmosx: have you tried going to some gem docs in browser?
ace05 has quit [Ping timeout: 265 seconds]
<linduxed>
dminuoso: yes, the two are definitely different!
swills has quit [Read error: Connection reset by peer]
<domgetter>
also, use gist, not pastebin
<domgetter>
its super easy
swills has joined #ruby
ace05 has joined #ruby
xall has quit [Ping timeout: 250 seconds]
<domgetter>
is that the result of putting it on line 11?
Jinxed- has joined #ruby
<Jinxed->
how would I put multiple statements into a ? setup e.g. b<y ? r="N";y-=1
<anonymus>
sorry/ they fail
<anonymus>
with both lines
<Jinxed->
I want both r="N" and y-=1 to be on the true side
<domgetter>
Jinxed- use the `and` keyword
<anonymus>
undefined local variable or method `username'
<domgetter>
2 < 3 ? r = 5 and n = 7 : x = 2
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter>
anonymus I think you spelled `username` wrong in your initialize method definition
<Jinxed->
domgetter, wouldn't using and convert it to a boolean expression?
<domgetter>
Jinxed- no, `and` is for control flow, not logic
<domgetter>
also, I forgot to say to put parens around it
<domgetter>
2 < 3 ? (r = 5 and n = 7) : x = 2
ace05 has quit [Ping timeout: 240 seconds]
johnmilton has joined #ruby
<kke>
i have "Foo::Base" and "Foo::Cat < Foo::Base". now i'd like to create "Foo::LolCat < Foo::Cat" but that does not trigger self.inherited in Foo::Base. i'm fine with adding something to Foo::Cat to delegate the self.inherited to Foo::Base. ideas?
<Jinxed->
hmm domgetter any ways to shorten that? I'm learning ruby to improve my golf game
<domgetter>
Jinxed- ahh well we can get rid of some whitespace, and you might get fewer characters with parallel definition
<kke>
actually, can i do class Foo::LolCat < Foo::Cat; Foo::Base.inherited(Foo::LolCat); ... end
joonty has joined #ruby
<domgetter>
Jinxed- for example 2<3 ? (n,r=3,4) : t=5
<kke>
yes i can
<domgetter>
Jinxed- feel free to remove whitespace until it breaks. looks like that particular example doesnt need any
<Cymew>
Now for some realy basic question. If I have class definitions in a file, how do I instantiate those classes in another file? I only get "uninitialized constant", and 'require' that first file does not seem to work.
<Jinxed->
well I finished my ruby golf of this problem... but it is getting its ass kicked by my python implementation
hightower3 has quit [Ping timeout: 260 seconds]
<chris2>
what's the problem?
<Jinxed->
it's a codingame problem... using it to experiment with other languages a bit... there are much better ruby solutions... I just don't know the language that well
<Jinxed->
I'm doing the Power of Thor
josealobato has joined #ruby
Burgestrand has joined #ruby
nikivi has joined #ruby
<Jinxed->
the top solutions are shorter than my line to input the variables
<domgetter>
Jinxed- gets.split(" ") returns an array of several elements, and the collect turns them into nubmers, and then each of the elements is set to each of the variable names
yuki_is_bored has joined #ruby
yardenbar has quit [Ping timeout: 244 seconds]
<domgetter>
so like a,b,c,d = [1,2,3,4] would result in a being 1, b being 2, c being 3, and d being 4
dionysus69 has quit [Ping timeout: 252 seconds]
<chris2>
ok
<Jinxed->
domgetter, that is what I'm using now or are you saying there is a shorter way to do it
bmurt has joined #ruby
<Cymew>
Do the class name and the file have to have the same name? I thought as long as the 'require stated the correct name it would work...
joonty has quit [Quit: This computer has gone to sleep]
<Cymew>
Doesn't seem to matter,
<chris2>
unrelated, but convention
Definity has joined #ruby
<Cymew>
Hmm
chouhoulis has joined #ruby
rfoust has joined #ruby
al2o3-cr has joined #ruby
<Ultra_DuckZ>
domgetter: it's working for me so far, it doesn't need to be pixel-perfect either
frozengeek___ has joined #ruby
<Cymew>
My google fu suck. Apparently there's a 'require_relative' that works. Is there a canonical place it searches for classes?
frozengeek__ has joined #ruby
nikivi has quit [Quit: irc]
<Ultra_DuckZ>
domgetter: I'm generating a chart that I will put in some report, I could even convert it to png from inkscape or gimp to make sure it's always displayed the same afterwards
<Ultra_DuckZ>
domgetter: besides there is no javascript or "client code" when you open a .svg, so I don't see any way to really be pixel-perfect, even if it was a requirement
<domgetter>
Ultra_DuckZ I was referring to if you used the <svg> html element and rendered the svg in the browser
pawnbox_ has quit [Ping timeout: 265 seconds]
yardenbar has joined #ruby
<Jinxed->
got a shorter version: a,b,x,y=gets.split.map(&:to_i)
syngress has quit [Ping timeout: 245 seconds]
Asher has quit [Quit: Leaving.]
<domgetter>
Jinxed- You can do 1 character better with a,b,x,y=gets.split.map &:to_i
Asher has joined #ruby
frozengeek___ has quit [Ping timeout: 260 seconds]
dionysus69 has joined #ruby
cdg has joined #ruby
ramortegui has joined #ruby
hutch34 has quit [Quit: WeeChat 1.5]
pawnbox has joined #ruby
cdg has quit [Read error: Connection reset by peer]
_sfiguser has quit [Ping timeout: 245 seconds]
cdg has joined #ruby
frozengeek___ has joined #ruby
<Jinxed->
whats the diff between puts and p
<domgetter>
puts returns nil, p returns the printed object
<chris2>
p uses .inspect
etehtsea has quit [Ping timeout: 245 seconds]
<domgetter>
correction, p returns the printed string
GodFather has quit [Ping timeout: 260 seconds]
frozengeek__ has quit [Ping timeout: 246 seconds]
<domgetter>
second correction, p returns something weird, since it returned a number for p 3
<chris2>
ofc irb prints the .inspect of the object too
frozengeek__ has joined #ruby
ben_____ has joined #ruby
aegis3121 has joined #ruby
<Jinxed->
c,d=a<=>x,b<=>y
<domgetter>
Jinxed- are you wondering what that does or just showing off? :P
anonymus has left #ruby ["Once you know what it is you want to be true, instinct is a very useful device for enabling you to know that it is"]
<Jinxed->
domgetter, wondering what it does
syngress has joined #ruby
<Jinxed->
I know <=> is 1,0,-1
<domgetter>
the <=> is called the comparison operator
<Jinxed->
comparing
<chris2>
it's called the spaceship operator!
ace05 has joined #ruby
frozengeek___ has quit [Ping timeout: 248 seconds]
<domgetter>
a<=>x is 1,0, or -1, and so is b<=>y, so the expression can be thought of as c,d = 1, 0
<domgetter>
c,d = 1,0 sets c to 1 and d to 0
<al2o3-cr>
-1 <, 0 ==, 1 >
<domgetter>
so c,d=a<=>x,b<=>y is equivalent to c = a <=> x; d = b <=> y
nankyokusei has quit [Ping timeout: 258 seconds]
<Jinxed->
ah makes sense
frozengeek__ has quit [Ping timeout: 252 seconds]
frozengeek__ has joined #ruby
gingray has joined #ruby
ace05 has quit [Ping timeout: 244 seconds]
serard has quit [Ping timeout: 268 seconds]
_sfiguser has joined #ruby
claudiuinberlin has joined #ruby
omphe has joined #ruby
<Jinxed->
thanks domgetter this is very helpful
yardenbar has quit [Ping timeout: 258 seconds]
<Macaveli>
How to do substring -1 again in ruby to get the last char
<domgetter>
Macaveli str[-1]
abshake has joined #ruby
<Macaveli>
sthank
<abshake>
hi
nettoweb has joined #ruby
<domgetter>
ewelcom
igniting has quit [Ping timeout: 265 seconds]
<domgetter>
Jinxed- (for the record, that transformation is not always equivalent. a,b = b,a will swap in-place, but is not the same as a = b; b = a)
nettoweb has quit [Read error: Connection reset by peer]
abshake has quit [Client Quit]
nettoweb has joined #ruby
salut has joined #ruby
frozengeek__ has quit [Read error: Connection reset by peer]
joonty has joined #ruby
<Jinxed->
makes sense
<salut>
Hello !
joonty has quit [Client Quit]
<Jinxed->
chris2, did you try the Power of Thor problem
etehtsea has joined #ruby
<chris2>
no
<chris2>
do they want the shortest way or just any way?
Snowy has quit [Remote host closed the connection]
jhack has quit [Ping timeout: 250 seconds]
<salut>
someone know how to set a callback in a module ? I’d like to make a callback wich is be triggered after each class instance variable assignment
Snowy has joined #ruby
DLSteve has joined #ruby
howdoi has quit [Quit: Connection closed for inactivity]
<Jinxed->
chris2, the site has lots of different categories. The puzzle I'm working on is code golf (you can use any language you want). Shortst character count that passes the test cases wins
chouhoulis has quit [Remote host closed the connection]
<chris2>
i mean the solution
<chris2>
the output
chouhoulis has joined #ruby
<vali>
ljarvis, are you still around ?
<Jinxed->
oh for Power of Thor specifically? You will need the shortest path I believe or else thor runs out of energy
<chris2>
ok
<chris2>
so its bresenham?
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Jinxed->
golf is kind of an ugly game as some people abuse the validators a bit... like I was able to remove a few characters because the test cases don't need them
<domgetter>
vali zip will pair up the attributes with the values, and map will go over the paired up attr/vals and turn each one into the full hash you want
<domgetter>
or rather, it will return a new array of the hashes
manjaro-kde5 has joined #ruby
frozengeek___ has joined #ruby
manjaro-kde5 has quit [Client Quit]
blackbombay has joined #ruby
rippa has joined #ruby
omphe has quit [Remote host closed the connection]
<vali>
the output structure doesn't look like I'm expecting it.
shinnya has joined #ruby
r3vDev has joined #ruby
<domgetter>
My code doesn't modify the original json. You're printing out the original
<domgetter>
you'll want to store the result of the map into a variable, and then ap that
<vali>
ok
<domgetter>
so like output = json[:attributes][:type].zip(json[:value]).map do |attr, val|
<domgetter>
and then ap output
<domgetter>
Also, I updated my code to clean it up a little bit
millerti has joined #ruby
<domgetter>
and if you're using vim, `:set paste` will paste what you copied without adding new indentation
terens has quit [Remote host closed the connection]
terens has joined #ruby
Snowy has quit [Read error: Connection reset by peer]
arup_r has joined #ruby
Snowy has joined #ruby
<arup_r>
While using CSV::foreach, can I also get the current line number without using any extra local varible as a counter. I am reading like `CSV.foreach(Rails.root.join("test.csv") { |r| p r.class }`. But r is an Array. So not sure how to get the current line number.
<abc2>
Hey, if I have e.g. hash.find{ |k,v| v== something}, but I don't need 'k', is there a way to do this without initializing 'k' unnecessarily in each pass?
<domgetter>
abc2: hash.find {|_, v| v == something }
<rapha>
domgetter: yes, what matthewd just did is my code :)
<rapha>
why does it work here?!
UserJosh has quit [Ping timeout: 240 seconds]
<domgetter>
rapha your terminal might be touchy on multi-byte character support if you're trying it in irb
d10n-work has joined #ruby
raul782 has quit []
ferr has quit [Quit: WeeChat 1.5]
<rapha>
matthewd: all of the code and data is inside of one ruby file (for my debugging purposes anyways) so even if it was encoded wrong, it would be /consistently/ encoded wrong
frozengeek___ has quit [Ping timeout: 258 seconds]
<alexandernst>
Is there a way I can compose a class from from a variable. For example, let's say I want to catch an exception that is inside Foo::Bar::MyException, but "Bar" is in a variable. Would that be something like Foo::@my_var::MyException?
<rapha>
domgetter: not irb; i'm running "ruby script.rb"
<domgetter>
also, that is running in ruby 2.3 what version of Ruby are you running?
<matthewd>
rapha: Try copy & pasting the above line into irb?
jhack has joined #ruby
<abc2>
domgetter, right, I thought of that, but in the end after testing it appears that using _ or any other var is exactly the same; it just relieves the person of having to think about the name of the unneeded var
<rapha>
matthewd: it works as it should in both pry and irb. let me gist you the whole script, i must have a problem somewhere else.
<domgetter>
abc2: Hash#find will return the key-value pair
ace05 has quit [Ping timeout: 250 seconds]
<domgetter>
abc2: if you only care about the value, you could do h.values.find {|v| v == something}, but this would unneccesarily generate an intermediate array
careta has joined #ruby
chouhoulis has quit [Remote host closed the connection]
<abc2>
domgetter, right
<matthewd>
rapha: Isn't line 13 just wrong?
<domgetter>
rapha what version of Ruby is it?
<rapha>
ohnoooooooooooooooooes!!!! "'" instead of "/"
* rapha
bangs head against wall
<rapha>
matthewd: 100000000000000 thanks!!!
<matthewd>
.. and no ], and an extra [, and the pair are the wrong way around
jhack has quit [Ping timeout: 260 seconds]
xall has quit [Ping timeout: 258 seconds]
<rapha>
matthewd: that can be because of the left-to-right/right-to-left stuff not being displayed correctly. in vim it looks good,
aganov has quit [Quit: Leaving]
<rapha>
(thank god vim doesn't implement support for RTL scripts)
<domgetter>
rapha mine did when I copy-pasted your stuff. might be my terminal though
<matthewd>
Oh, I see. Ugh :/
JeanCarloMachado has joined #ruby
<rapha>
:]
<rapha>
domgetter: perhaps there is support and i haven't enabled it. but that makes it easier to work with such data:wq
marr has joined #ruby
pawnbox has quit [Remote host closed the connection]
<rapha>
oops, irc!=vim
jcao219 has quit [Ping timeout: 256 seconds]
hardest has quit [Ping timeout: 245 seconds]
Burgestrand has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<domgetter>
rapha :help :x and :help ZZ
jhack has joined #ruby
<adaedra>
Still waiting for tpope/vim-irc plugin.
andikr has quit [Remote host closed the connection]
<rapha>
domgetter: oh cool, thank you!
* rapha
loves learning new vim tricks
<rapha>
ZZ is even one stroke less than :x
<c-c>
Hm, how do I read with open, without waiting on read (ie. skip if nothing to read)?
<c-c>
(named pipe)
jhack has quit [Ping timeout: 240 seconds]
Asher has quit [Quit: Leaving.]
Asher has joined #ruby
frmendes has joined #ruby
frozengeek____ has quit [Ping timeout: 260 seconds]
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
weaksauce has quit [Ping timeout: 258 seconds]
jbeeze has joined #ruby
frozengeek____ has joined #ruby
careta has quit [Ping timeout: 244 seconds]
jonjoe has quit [Remote host closed the connection]
<adaedra>
&ri IO#read_nonblock
jonjoe has joined #ruby
* adaedra
kicks the bot
jonjoe has quit [Remote host closed the connection]
<c-c>
domgetter: hm, no, that doesn't seem to have any effect.. if you first make a named pipe in irb: system("/tmp/foonamedpipe"), then open it p = open("/tmp/foonamedpipe", "r+"); p.sync = true; p.read #just sits there; p.each { |l| puts l } #also just sits there ...
jonjoe has joined #ruby
jaguarmagenta has joined #ruby
<adaedra>
sync is for write buffering.
<domgetter>
ah nvm then
<c-c>
- what I need is that "read" or whatever to continue immediately even if there is nothing to read
jonjoe has quit [Remote host closed the connection]
<adaedra>
read_nonblock
<c-c>
indeed
jonjoe has joined #ruby
chopin has joined #ruby
babblebre has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
igniting has joined #ruby
allcentury has quit [Ping timeout: 240 seconds]
jonjoe has quit [Remote host closed the connection]
<c-c>
lol looks like I omitted "mkfifo" from that system call above ^
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
solocshaw has quit [Ping timeout: 258 seconds]
jonjoe has quit [Remote host closed the connection]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
jaguarmagenta has quit [Ping timeout: 250 seconds]
jonjoe has joined #ruby
jonjoe has quit [Remote host closed the connection]
<adaedra>
!fixconn jonjoe
<adaedra>
!fixcon jonjoe
DynamicFail has joined #ruby
endorphine_ has joined #ruby
aegis3121 has quit [Ping timeout: 268 seconds]
domgetter has quit [Ping timeout: 265 seconds]
dionysus69 has quit [Remote host closed the connection]
dionysus69 has joined #ruby
xrlk has quit [Ping timeout: 248 seconds]
aegis3121 has joined #ruby
vuoto has joined #ruby
<c-c>
adaedra: so, I wonder if read_nonblock is used by having a try-rescue block?
Jinxed- has quit [Ping timeout: 260 seconds]
jhack has joined #ruby
vuoto has quit [Remote host closed the connection]
<c-c>
I get EAGAINWaitReadable errors
josealobato has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
frozengeek____ has quit [Ping timeout: 268 seconds]
vuoto has joined #ruby
TvL2386 has quit [Quit: Ex-Chat]
<adaedra>
Well, that corresponds to read(2) behavior
<adaedra>
Why are you doing non-blocking read? There maybe another solution.
xrlk has joined #ruby
Jardayn has quit [Ping timeout: 265 seconds]
conta has quit [Ping timeout: 246 seconds]
frozengeek____ has joined #ruby
<c-c>
adaedra: I have two processesses. The UI process sometimes sends commands to the engine process. The engine process has main loop that does stuff, and reads the pipe from UI to see if commands for state change sent.
Guest69 has joined #ruby
railswebdev has joined #ruby
<adaedra>
That does not sounds incompatible with blocking reading I/O
chopin has quit [Read error: Connection reset by peer]
<c-c>
I may be wrong but in the main loop, doing pipe_from_ui.read causes it to wait until theres something to read
jhack has quit [Client Quit]
terens has quit [Ping timeout: 250 seconds]
chopin has joined #ruby
<adaedra>
Well yes – do you want to do something in case no data is available from the emitter process?
<c-c>
or, maybe something else is wrong here
<c-c>
I want the main loop to continue
<c-c>
its a game engine -type main loop
Definity has joined #ruby
synthroid has quit [Remote host closed the connection]
Snickers has joined #ruby
GinoManWrx has joined #ruby
xall has joined #ruby
wugy has quit [Read error: Connection reset by peer]
jhack has joined #ruby
<adaedra>
You could try something with IO.select
<adaedra>
If read_nonblock raising is a concern
<c-c>
I don't get the ri: why would I "emulate blocking" read if I want a non-blocking read
<adaedra>
the example is not the best
<adaedra>
Just do a simple select with a timeout 0
GinoMan2440Wrx has quit [Ping timeout: 268 seconds]
jhack has quit [Quit: jhack]
jgnagy has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Rodya_ has quit [Remote host closed the connection]
nankyokusei has joined #ruby
pawnbox has joined #ruby
allcentury has joined #ruby
dan_ has joined #ruby
dan_ is now known as Guest73097
<Guest73097>
quick question gentlement, a = [1,2,3,4]... how would i manipulate a to return just [1,2,4]
`tim` has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<Guest73097>
what do you think guys
<c-c>
Guest73097: try $ ri Array
binaryplease has quit [Ping timeout: 260 seconds]
<Guest73097>
what? sorry i dont understand
jhack has joined #ruby
arup_r has quit []
<c-c>
Guest73097: ri is command line documentation for ruby, run from termina
<matthewd>
Guest73097: I think you'll need to provide a slightly better explanation of what you want to do
<Guest73097>
oh wow cool
ace05 has joined #ruby
<c-c>
Guest73097: try opening the terminal and type 'ri' and hit <tab> couple of times
nankyokusei has quit [Ping timeout: 245 seconds]
<Guest73097>
matthewd, i have an array which will always have four elements, i want to return the first, second, and fourth element always
GinoManWrx has quit [Read error: Connection reset by peer]
GinoManWrx has joined #ruby
<Guest73097>
i know various ways to do this, like a.delete(3); a;
<Guest73097>
or [a[0], a[1], a[3]
jhn has joined #ruby
`tim` has joined #ruby
<Guest73097>
but neither is very elegant
nettoweb has joined #ruby
<Guest73097>
okay guess ill just search online its a pretty hard question i figured you guys would know but maybe not
<matthewd>
I think `a.delete_at(2); a` is as elegant as you're going to get
Guest73097 has quit [Quit: Leaving]
benlieb has joined #ruby
Lord_of_Life has quit [Excess Flood]
ace05 has quit [Ping timeout: 258 seconds]
aufi has quit [Ping timeout: 258 seconds]
frozengeek____ has quit [Ping timeout: 268 seconds]
ircuser0815 has joined #ruby
terens has joined #ruby
Lord_of_Life has joined #ruby
brent__ has joined #ruby
<c-c>
looks like I forgot to flush
<c-c>
seems its is a must for this application before the message hits the named pipe
<c-c>
or, perhaps pry or something is blocking somehow
<c-c>
now sysread, read, gets work
emilkarl has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<adaedra>
Now this is where sync could help you.
nikivi has joined #ruby
<c-c>
8)
<c-c>
well, I can't figure out why the execution of 3 processes stops completely on one .write or .puts to a named pipe (string lenght under 20 chars). I better go rest
Littlemyu_ has quit [Read error: Connection reset by peer]
flyingX has joined #ruby
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
last_staff has quit [Quit: last_staff]
terens has quit [Ping timeout: 260 seconds]
synthroid has joined #ruby
minimalism has joined #ruby
flying has quit [Ping timeout: 244 seconds]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bturker_ has joined #ruby
amclain has joined #ruby
allcentury has quit [Quit: WeeChat 1.2]
serard has joined #ruby
JoshS has joined #ruby
harai has joined #ruby
jshjsh has quit [Ping timeout: 260 seconds]
serard has quit [Ping timeout: 268 seconds]
ishe_ua has quit [Remote host closed the connection]
r3vDev has quit [Ping timeout: 244 seconds]
eljimmy has joined #ruby
harai has quit [Ping timeout: 245 seconds]
marr has quit [Ping timeout: 252 seconds]
nikivi has quit [Quit: irc]
jsrn_ has quit [Read error: Connection reset by peer]
jmignault has quit [Remote host closed the connection]
* dminuoso
pokes jhass
<dminuoso>
Haven't seen you in a while
<jhass>
yeah
johnmilton has joined #ruby
mBailey_j has quit [Ping timeout: 256 seconds]
jcao219 has quit [Ping timeout: 246 seconds]
terlar has quit [Ping timeout: 246 seconds]
<iamse7en>
jhass: thank you. do I arr.map {|game| Hash[id, values] } ?
<jhass>
no, more like .each_with_object({}) {|values, games| games[id] = values }, but only if you can't change how it's initially constructed in the first place
<iamse7en>
ok great, yes i do. thank you
<baweaver>
to_h is a thing
Fernando-Basso has quit [Quit: WeeChat 1.5]
<jhass>
too bad it requires all that intermediate arrays
<iamse7en>
right
<baweaver>
Does it now? Huh.
<baweaver>
that's unfortunate.
<jhass>
it always did?
Joufflu has quit [Quit: Leaving]
<jhass>
it's the inverse of Hash#to_a
unknowns2k2 has joined #ruby
VeryBewitching has joined #ruby
Joufflu has joined #ruby
<Joufflu>
sup
<baweaver>
(Does it now being an oddly phrased question, instead of an inference that it did not at one time do that.)
chrisja has joined #ruby
terlar has joined #ruby
handicraftsman has joined #ruby
terlar has quit [Client Quit]
Rodya_ has quit [Remote host closed the connection]
terlar has joined #ruby
cdg_ has joined #ruby
bocaneri has quit [Remote host closed the connection]
workmad3 has quit [Ping timeout: 256 seconds]
frozengeek____ has quit [Quit: frozengeek____]
cdg has quit [Ping timeout: 245 seconds]
Fernando-Basso has joined #ruby
Definity has quit [Ping timeout: 265 seconds]
<Joufflu>
does ruby have something similar to the console in browsers for javascript ?
muelleme has joined #ruby
<baweaver>
irb
whathappens has quit [Read error: Connection reset by peer]
TPug has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
hutch34 has quit [Ping timeout: 246 seconds]
whathappens has joined #ruby
<havenwood>
?irb
<ruby[bot]>
irb is "interactive ruby", it is part of ruby. You can run ruby code and see results immediately. it's useful for testing code. Also see ?pry, a gem which is a popular alternative to irb.
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<havenwood>
?pry
<ruby[bot]>
Pry, the better IRB, provides easy object inspection `ls`, `history`, viewing docs `?`, viewing source `$`, syntax highlighting and other features (see `help` for more). Put `binding.pry` in your source code for easy debugging. Install Pry (https://pryrepl.org/): gem install pry pry-doc
shinnya has quit [Ping timeout: 260 seconds]
GodFather has joined #ruby
sparch has joined #ruby
terlar has quit [Quit: WeeChat 1.6]
terlar has joined #ruby
ace05 has joined #ruby
johnmilton has quit [Remote host closed the connection]
theRoUS is now known as theRoUS|afk
UserJosh has joined #ruby
ace05 has quit [Ping timeout: 245 seconds]
Dimik has joined #ruby
ramfjord has joined #ruby
jshjsh has quit [Ping timeout: 260 seconds]
terlar has quit [Quit: WeeChat 1.6]
bturker_ has quit [Ping timeout: 256 seconds]
xall has quit [Ping timeout: 260 seconds]
somiaj has joined #ruby
UserJosh has quit [Quit: Leaving]
hutch34 has joined #ruby
askhader has quit [Ping timeout: 250 seconds]
<somiaj>
Hello, I'm looking to build a lexer for rouge, https://github.com/jneen/rouge. I have one written in pygments (python) and have looked at the lexers and see they are similar in design, so my question is more on how to actually include it in my system installed version of rogue, yet as a local file.
<somiaj>
In python I was able to use its setuptools to install my local lexer and integrate it with pygments in such a way when I made local changes, my system installed version saw it. I'm trying to see how to achive something similar in ruby
<jhass>
somiaj: your best bet really is to sidestep your system version and just run ruby -I/path/to/rogue/lib /path/to/rogue/bin/rogue
antoniobeyah has quit [Changing host]
antoniobeyah has joined #ruby
<tobiasvl>
hmm, golang is a modern C, eh
<dminuoso>
tobiasvl: Yes. Just like Ruby is a modern Smalltalk.
<jhass>
somiaj: or actually the bin/rougify in the repo is "smart" and you can just call it
<somiaj>
jhass: so that will just copy the file over to my system location? Does it do anything else? I notice the lexer also contains a .spec file? How would I remove it from my system in a clean way?
<jhass>
no, it would just run your local, non-system copy of rogue
claudiuinberlin has quit [Remote host closed the connection]
claudiuinberlin has joined #ruby
<jhass>
so clone the repo, make your changes, run the bin from the repo
brianpWins has joined #ruby
terlar has joined #ruby
<somiaj>
jhass: the version I have here is on debian 2.0.2. Yea I thought about having a local install, though I was trying to avoid that approach.
<handicraftsman>
Is there any fast non-java implementations of ruby?
<dminuoso>
handicraftsman: Rubinius is faster at some select few things.
<dminuoso>
handicraftsman: But no.
<somiaj>
jhass: thanks. I'll invesigate some more.
<handicraftsman>
@dminuoso, heh. (don't like jvm, because it takes more RAM and some time to start)
gusrub has joined #ruby
<jhass>
if you run rogue programatically there's probably some way to register your own lexer prior
<dminuoso>
handicraftsman: Actually well there is. Topaz is pretty fast.
ace05 has joined #ruby
<dminuoso>
But I have no clue what state Topaz is in right now.
<handicraftsman>
@dmarr, searching for it
<dminuoso>
handicraftsman: The holy grail of performance is jruby with truffle/graal though.
<jhass>
or maybe it's even enough to just make sure it's loaded
<jhass>
so ruby -r/path/to/your/lexer /usr/bin/roguify I guess
<dminuoso>
handicraftsman: If you can bear the heavy warmup of GraalVM. ;-)
claudiuinberlin has quit [Remote host closed the connection]
rrichard_ has joined #ruby
<handicraftsman>
@dminuoso, OMG - browser does not render it's next frame
<handicraftsman>
LEL
terlar has quit [Quit: WeeChat 1.6]
<dminuoso>
handicraftsman: It takes a few seconds to load.
claudiuinberlin has joined #ruby
truenito has quit [Remote host closed the connection]
<handicraftsman>
For me - 30 seconds
xall has joined #ruby
<dminuoso>
Maybe you should reload the page. ;)
Rodya_ has joined #ruby
JeanCarloMachado has quit [Ping timeout: 248 seconds]
svankmajer has joined #ruby
claudiuinberlin has quit [Remote host closed the connection]
<chrisseaton>
dminuoso: I don't think Rubinius is faster at anything unfortunately - since they deleted their JIT eight months ago with a plan to rewrite it in a week. With the JIT they were faster at some things.
<chrisseaton>
dminuoso: I think Topaz is pretty firmly abandoned now, also unfortunately
jaguarmagenta has quit [Ping timeout: 260 seconds]
<dminuoso>
chrisseaton: That's a real shame to hear both.
hutch34 has joined #ruby
chouhoul_ has joined #ruby
TomyWork has quit [Ping timeout: 256 seconds]
tpendragon has quit [Ping timeout: 240 seconds]
blackjid has quit [Ping timeout: 240 seconds]
chouhoulis has quit [Ping timeout: 244 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
daveyboi[m] has joined #ruby
NeverTired has joined #ruby
zeroDi has joined #ruby
fullofcaffeine has quit [Remote host closed the connection]
fullofcaffeine has joined #ruby
xall has quit [Ping timeout: 248 seconds]
<handicraftsman>
Trying to understand how to install graal
skweek has quit [Ping timeout: 256 seconds]
sparch has quit [Quit: bejomimliga]
ldnunes has quit [Quit: Leaving]
griffindy has joined #ruby
<mistym>
chrisseaton: Is there a good blog post or something on what's happened/happening with the Rubinius JIT?
machinewar has joined #ruby
fullofcaffeine has quit [Ping timeout: 268 seconds]
ace05 has quit [Remote host closed the connection]
ace05 has joined #ruby
<chrisseaton>
mistym: they have a Gitter room - I think that's the best place to ask
machinewar has left #ruby [#ruby]
vuoto has quit [Quit: Lost terminal]
hutch34 has joined #ruby
vuoto has joined #ruby
ocbtec has quit [Quit: leaving]
<chrisseaton>
mistym: I know they're planning a new one, but not sure if there's any code yet
<chrisseaton>
writing a JIT for Ruby isn't a trivial piece of work
Fetch has quit [Remote host closed the connection]
cdg_ has quit [Remote host closed the connection]
cdg has joined #ruby
<centrx>
sounds like a challenge
codfection has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 240 seconds]
cdg has quit [Remote host closed the connection]
symm- has joined #ruby
GBrawl has joined #ruby
vuoto has quit [Remote host closed the connection]
vuoto has joined #ruby
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
manjaro-kde5- has joined #ruby
saslam has quit [Ping timeout: 248 seconds]
jhack has quit [Quit: jhack]
<tau>
is it good practice to use () when calling class methods?
<tau>
like x = class.method()
<tau>
?
zeroDi has quit [Quit: WeeChat 1.6]
<jhass>
nope
SCHAAP137 has quit [Quit: Leaving]
<dminuoso>
tau: Depends on who you ask. I've been pondering about going back to braces.
<tau>
i see.
<jhass>
eh, well either do it for any kind of method call or not
<dminuoso>
^- that.
<tau>
i guess so.
maloik has quit [Remote host closed the connection]
<tau>
ruby is cool.
maloik has joined #ruby
<tau>
i have been enjoying it.
yardenbar has quit [Ping timeout: 260 seconds]
GBrawl has quit [Quit: (null)]
jhack has joined #ruby
claudiuinberlin has joined #ruby
hutch34 has joined #ruby
terlar has joined #ruby
<centrx>
True
xall has joined #ruby
hutch34 has quit [Ping timeout: 250 seconds]
railssmith has quit [Ping timeout: 245 seconds]
xall has quit [Ping timeout: 260 seconds]
Lucky_ABA has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
fullofcaffeine has joined #ruby
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
Macaveli has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
silky__ has joined #ruby
nettoweb has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
tyang_ has joined #ruby
mvxlr has joined #ruby
nowhere_man has quit [Ping timeout: 256 seconds]
xall has joined #ruby
lenwood has joined #ruby
malcolmva has quit [Ping timeout: 240 seconds]
douglascorrea has quit [Remote host closed the connection]
vuoto has quit [Remote host closed the connection]
svankmajer has quit [Ping timeout: 260 seconds]
jackjackdripper has quit [Client Quit]
last_staff has joined #ruby
millerti has joined #ruby
terlar has quit [Ping timeout: 256 seconds]
cdg has joined #ruby
jackjackdripper has joined #ruby
_sfiguser has joined #ruby
claudiuinberlin has quit []
cdg has quit [Remote host closed the connection]
cdg_ has joined #ruby
JoshS has joined #ruby
mtkd has quit [Ping timeout: 245 seconds]
mtkd has joined #ruby
nfk has joined #ruby
Lucky_ABA has joined #ruby
dionysus69 has joined #ruby
blackwind_123 has joined #ruby
tomphp has joined #ruby
savage has quit [Quit: Connection closed for inactivity]
VeryBewitching has quit [Quit: Konversation terminated!]
doublemalt__ has joined #ruby
benlieb has quit [Quit: benlieb]
jshjsh has joined #ruby
handicraftsman has quit [Quit: Leaving]
XV8 has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
gizmore|2 has joined #ruby
gizmore has quit [Ping timeout: 258 seconds]
nowhere_man has joined #ruby
JoshS has quit [Ping timeout: 268 seconds]
doublemalt_ has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
mniip has quit [Read error: Connection reset by peer]
muelleme has quit [Ping timeout: 256 seconds]
hutch34 has quit [Ping timeout: 245 seconds]
mniip_ has joined #ruby
mniip_ is now known as mniip
SteenJobs has joined #ruby
jack85 has joined #ruby
Fichtenstein has quit [Ping timeout: 248 seconds]
Ishido has quit [Quit: Roads? Where We're Going We Don't Need Roads.]
mvxlr has joined #ruby
jhack has quit [Ping timeout: 256 seconds]
Definity has joined #ruby
jaguarmagenta has joined #ruby
rfoust has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jhack has joined #ruby
hutch34 has joined #ruby
jaguarmagenta has quit [Ping timeout: 268 seconds]
jhack has quit [Ping timeout: 248 seconds]
chouhoul_ has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 248 seconds]
mvxlr has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
jackjackdripper has quit [Quit: Leaving.]
polishdub has quit [Quit: leaving]
lenwood has quit [Ping timeout: 260 seconds]
last_staff has quit [Quit: last_staff]
millerti has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
tvw has joined #ruby
karapetyan has joined #ruby
yardenbar has quit [Quit: Leaving]
c355e3b has quit [Quit: Connection closed for inactivity]
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<ule>
maybe you could use a linux command line tool
<ule>
that's what dragonfly does.. it calls 'convert' in the end
tomphp has joined #ruby
jhack has joined #ruby
Rodya_ has quit [Remote host closed the connection]
Rodya_ has joined #ruby
jgnagy has quit []
Ru has joined #ruby
ramortegui has quit [Quit: Ex-Chat]
JeanCarloMachado has joined #ruby
augcesar has quit [Quit: Connection closed for inactivity]
<Ru>
☺
Rodya_ has quit [Ping timeout: 260 seconds]
hutch34 has joined #ruby
Definity has quit [Ping timeout: 258 seconds]
vuoto has joined #ruby
Definity has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
firstdayonthejob has joined #ruby
symm- has quit [Ping timeout: 250 seconds]
tomphp has joined #ruby
tyang has joined #ruby
dionysus69 has quit [Ping timeout: 252 seconds]
hutch34 has quit [Ping timeout: 268 seconds]
jhack has quit [Quit: jhack]
harai has quit [Ping timeout: 256 seconds]
saslam has joined #ruby
millerti has joined #ruby
rfoust has joined #ruby
<Ru>
.
<al2o3-cr>
..
tyang_ has joined #ruby
symm- has joined #ruby
marxarelli has joined #ruby
marxarelli has quit [Client Quit]
jhack has joined #ruby
marxarelli has joined #ruby
tyang has quit [Ping timeout: 260 seconds]
enterprisey has joined #ruby
Ru has quit [Ping timeout: 260 seconds]
eclm has quit [Quit: WeeChat 1.4]
harai has joined #ruby
nfk has quit [Remote host closed the connection]
nfk has joined #ruby
antoniobeyah has quit [Quit: antoniobeyah]
eclm has joined #ruby
palms has quit [Ping timeout: 265 seconds]
sepp2k has quit [Quit: Leaving.]
hutch34 has joined #ruby
Ru has joined #ruby
jcao219 has joined #ruby
griffindy has quit [Quit: My Mac has gone to sleep. ZZZzzz…]
[Butch] has quit [Quit: I'm out . . .]
alamar is now known as julian
jack85 has quit [Quit: Page closed]
Ru has quit [Remote host closed the connection]
hutch34 has quit [Ping timeout: 256 seconds]
nonnatus has joined #ruby
railssmith has joined #ruby
vuoto has quit [Remote host closed the connection]
ropeney has joined #ruby
tomphp has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
govg has quit [Ping timeout: 248 seconds]
mati_urunda has quit [Ping timeout: 260 seconds]
JeanCarloMachado has quit [Ping timeout: 256 seconds]
firstdayonthejob has quit [Quit: WeeChat 1.6]
unknowns2k2 has joined #ruby
tomphp has joined #ruby
firstdayonthejob has joined #ruby
enterprisey has quit [Remote host closed the connection]
Fernando-Basso has quit [Quit: WeeChat 1.6]
Ultra_DuckZ has quit [Quit: Konversation terminated!]
cdg has joined #ruby
<gener1c>
i have a class that has a lot of methods an i want to check if a parameter is set to true before all the methods and according to it envoke them
<ruby[bot]>
gener1c: we in #ruby do not like pastebin.com, it loads slowly for most, has ads which are distracting and has terrible formatting. Please use https://gist.github.com
vuoto has quit [Remote host closed the connection]
<gener1c>
ruby bot , if trying to contribute to your core wouldnt have forced me to uninstall it i would have gladly used gist!~
Jamo has quit [Ping timeout: 260 seconds]
saslam has quit [Ping timeout: 244 seconds]
nikivi has quit [Quit: irc]
CloCkWeRX has joined #ruby
mustmodify has joined #ruby
kobain has joined #ruby
kobain has quit [Excess Flood]
<mustmodify>
Why does this end in double-equal-signs?
<mustmodify>
Digest::MD5.base64digest '234235'
kobain has joined #ruby
kobain has quit [Excess Flood]
Guest80268 has joined #ruby
Guest80268 has quit [Excess Flood]
Guest80268 has joined #ruby
careta has joined #ruby
<Radar>
Why not?
nonnatus has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
bmurt has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
<rapha>
hi all
rrichard_ has quit [Quit: He who dares .... wins.]
<rapha>
i just wanted to say that i have no question to ask but that i'm very happy that ruby exists and that it's such an awesome language and that you exist giving it such an awesome community
karapetyan has quit [Remote host closed the connection]
DLSteve has quit [Quit: All rise, the honorable DLSteve has left the channel.]