<FromGitter>
<drosehn> FWIW, I have a chat system written in lambdaMOO, where 'MOO' means 'MUD, object-oriented'. It's been running for about 20 years now.
<FromGitter>
<bigtunacan> Ooooh
<FromGitter>
<bigtunacan> lambdas are awesome
<FromGitter>
<bigtunacan> porting all of my systems to lambdaMOO RIGHT NOW!!!
<FromGitter>
<bigtunacan> :)
<FromGitter>
<bigtunacan> Link please?
<FromGitter>
<drosehn> I could kinda say that I use crystal in production, although it's "personal production". I have several small crystal programs that I depend on, and use on a daily basis.
<FromGitter>
<bigtunacan> I can't even say that yet.
<FromGitter>
<bigtunacan> But I hope to soon.
<FromGitter>
<bigtunacan> I'm working on my first Kemal site right now.
<FromGitter>
<drosehn> (that's the server software, but not the specific chat-system that I have been running)
<FromGitter>
<bigtunacan> So is your chat server for the LambdaMOO game then?
<FromGitter>
<drosehn> it's just a chat server, an alternative to IRC. we have a few games written into our chat server, but no one uses them any more.
<FromGitter>
<bigtunacan> That's cool
<FromGitter>
<bigtunacan> Chat has become a sad state of affairs these days.
<FromGitter>
<bigtunacan> I have at least 7 chat apps installed right now
<FromGitter>
<drosehn> It is, in many ways. But there hasn't been much development on it in the last 10 years. There's only a few people who had learned the lambdaMOO language well enough to get things done in it, and all of us are too busy doing work or with family life.
<FromGitter>
<bigtunacan> I hear you there.
<FromGitter>
<drosehn> However, there are still a few hundred people who use it on a weekly basis just for chatting.
<FromGitter>
<bigtunacan> Between my day job, raising my 3 kids, and trying to help take care of my aging parents there isn't much time left.
<FromGitter>
<bigtunacan> I think I've about reached that point where I've had too much to drink to continue programming.
<FromGitter>
<bigtunacan> I was staring at the screen wondering why my view wasn't rendering correctly.
<FromGitter>
<drosehn> We also made one fatal mistake in the mid-1990's. We were running on a NeXTstation, and NeXTSTEP had a rather obscure bug in it's handling of virtual memory which the lambdaMOO process managed to trigger on a regular basis. I'll skip the details, but the upshot was that at one point we got a *major* improvement by removing all the comments in the MOO-code which implements everything in the chat. And then the
<FromGitter>
... main developer lost track of the snapshot of the database which had all the comments.
<FromGitter>
<bigtunacan> Then I finally realized in my ecr content_for I had typed `some_key` as the key instead of my actual key.
<FromGitter>
<bigtunacan> :smile:
<FromGitter>
<drosehn> heh.
<FromGitter>
<drosehn> so we ended up with about 20,000 lines of code with zero comments in it, and then a few years later the main developer left (as he became too busy with "real life"). We've added some comments back as we figured things out.
<FromGitter>
<bigtunacan> I think these days they call that "self documenting code"
<FromGitter>
<bigtunacan> ;)
<FromGitter>
<drosehn> One mistake I'll often make when I get too tired is to keep changing the source code for something, compiling that, and then executing a different copy of the program (which is not changing).
<FromGitter>
<bigtunacan> I may have done that once or twice myself
<FromGitter>
<drosehn> The youngest daughter of that developer started college just last year, I think.
<FromGitter>
<bigtunacan> My oldest girl starts her last year of junior high next year
<FromGitter>
<fridgerator> Same
sp4rrow has quit [Quit: Textual]
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
saadq has joined #crystal-lang
<FromGitter>
<elorest> My oldest is in first grade next year.
<FromGitter>
<bararchy> So this is from the man pages
<FromGitter>
<bararchy> So it means fork would keep parent and child running on the same thread right ?
<oprypin>
that is impossible
<FromGitter>
<akzhan> fork did a copy of thread and other objects like semaphores etc.
<FromGitter>
<akzhan> Anyway it is a copy (logically), not the same.
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
Qchmqs__ has joined #crystal-lang
<FromGitter>
<bararchy> I think I'm causing confusion and not succeeding in asking my question hahah
<FromGitter>
<bararchy> I'll try again,if i do 4.times do fork ...
<FromGitter>
<bararchy> Do I actually start 4 new threads ?
<FromGitter>
<akzhan> i create 4 new processes with one active thread per process.
<FromGitter>
<akzhan> so yes, 4 new threads too.
<FromGitter>
<akzhan> and no. process is hevyweight and thread is only part of its state.
<FromGitter>
<akzhan> but no other threads will be forked.
<FromGitter>
<bararchy> Cool , thanks @akzhan
Kug3lis has joined #crystal-lang
bjz has joined #crystal-lang
Philpax has joined #crystal-lang
Kug3lis is now known as Kug3lis_off
splitty__ has joined #crystal-lang
TheLemonMan has joined #crystal-lang
splitty___ has quit [Ping timeout: 240 seconds]
_whitelogger has joined #crystal-lang
Kug3lis_off is now known as Kug3lis
RX14 has quit [Excess Flood]
RX14 has joined #crystal-lang
bjz has quit [Remote host closed the connection]
bjz has joined #crystal-lang
_whitelogger has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
bjz has joined #crystal-lang
bjz_ has joined #crystal-lang
bjz has quit [Ping timeout: 240 seconds]
Raimondii has joined #crystal-lang
Raimondi has quit [Ping timeout: 268 seconds]
Raimondii is now known as Raimondi
snsei has quit [Remote host closed the connection]
snsei has joined #crystal-lang
<crystal-gh>
[crystal] Sija opened pull request #4474: Add TypeNode#has_method? (master...fix-4472) https://git.io/vHnKz
bjz has joined #crystal-lang
bjz_ has quit [Ping timeout: 272 seconds]
Kug3lis is now known as Kug3lis_off
TheLemonMan has quit [Quit: "It's now safe to turn off your computer."]
Kug3lis_off is now known as Kug3lis
Qchmqs__ has quit [Ping timeout: 240 seconds]
snsei has quit [Remote host closed the connection]
Kug3lis is now known as Kug3lis_off
bjz has quit [Quit: My MacBook Pro has gone to sleep. ZZZzzz…]
CodeArtisan has joined #crystal-lang
Kug3lis_off is now known as Kug3lis
Kug3lis is now known as Kug3lis_off
Kug3lis_off is now known as Kug3lis
<CodeArtisan>
What's the idiomatic way to read a list of integers from a string? eg: toArrayOfInt("1, 2, 3") -> [1, 2, 3] A split followed by a mapping?
<RX14>
i think the first one is more consistent with other generic types
<RX14>
the latter looks nicer if you're used to ruby
<CodeArtisan>
the second looks like a type definition
Philpax has quit [Ping timeout: 240 seconds]
<RX14>
i guess
<RX14>
thats why i said the first is more consistent
<RX14>
you have to use Array(Foo) as the type syntax
<RX14>
why not get used to it and stick foo on the end
<RX14>
instead of adding an entirely new syntax
<RX14>
but yeah
<RX14>
s/foo/new
<FromGitter>
<akzhan> Oops, ok ) missed )
zipR4ND has joined #crystal-lang
Kug3lis is now known as Kug3lis_off
rocky has joined #crystal-lang
Kug3lis_off is now known as Kug3lis
<zipR4ND>
hey all, is there a way to call a proc with a different receiver like a block yield ?
<FromGitter>
<akzhan> with yield
<zipR4ND>
akzhan yes, but I have a proc stored in a variable ..
<zipR4ND>
I have a proc that takes one argument and I want to wrap it in a proc that takes two and yields the inner proc with one if the args as default-receiver and the other as the proc arg
<RX14>
zipR4ND, no the reciever has to be known to the compiler
<RX14>
which is why it only works with yield
<CodeArtisan>
couldn't find an answer in the doc; What does it do to prefix a procedure in a module with 'self.'?
<zipR4ND>
yeah i see
<zipR4ND>
I think I found a solution ..
<RX14>
CodeArtisan, self.foo is used to define static methods
<RX14>
on classes and modules
<FromGitter>
<bew> zipR4ND what solution did you use?
<CodeArtisan>
@RX14 but a module can not be instanced, right?
<RX14>
yes
<RX14>
static methods are on the class
<RX14>
not the instance
<FromGitter>
<akzhan> usually i made a hash like { what => &self->ever, … } but it is instance specific and syntax may differ.
<CodeArtisan>
the module example in the doc has methods without the self prefix but there are modules in the standard library which have method with the self prefix
Kug3lis is now known as Kug3lis_off
<RX14>
yes they're used for different things
<RX14>
modules can be used as mixins or just namespaces for other classes and methods to live in
<RX14>
self.foo in a module means you can call Module.foo
<RX14>
just def foo in a module is a mixin which you can include
<CodeArtisan>
understood
<rocky>
Hi, I'm messing around with crystal fibers and I'm confused as to why when running this code, the program terminates instantly. I don't think anything is blocking, it's just a channel and two infinite loops sending and receiving data to one another. Code: https://pastebin.com/raw/VLhdkr9w
<rocky>
ignore the sleep at the very end of the code, that is what I had to insert in order to get it to work, but I'm not sure I understand why I need it in this specific case.
<RX14>
rocky, that code should never exit
<RX14>
well
<RX14>
with the sleep
<RX14>
rocky, there is an explicit exit(0) at the end of the top-level code
<RX14>
the program doesn't exit when all the fibers exit
<RX14>
it exits when the main fiber exits
<RX14>
so you need an infinite sleep to make the other fibers run at all
<CodeArtisan>
RX14: i presume it's the same with module variables (@@ vs @)
<RX14>
@@ is a class-level variable
<RX14>
it's static, and again, it works in modules or classes
<RX14>
same as self.
<rocky>
RX14, thank you for explaining that to me.
<FromGitter>
<mgarciaisaia> Just Windows being Windows ;-)
<RX14>
there's another 80 after this
<RX14>
lol
<RX14>
and than I can install visual studio
<RX14>
and *then* I can link things
<RX14>
or at least try to
<FromGitter>
<mgarciaisaia> I've started using the MS official images for testing IE/Edge - they weight ~40G, but you have a legal, kind of up to date Windows VM easily
<FromGitter>
<mgarciaisaia> But it's a VM - not native experience, of course
<FromGitter>
<fridgerator> yeah those are handy
<FromGitter>
<bew> nice "cheat"
<FromGitter>
<mgarciaisaia> It's less ilegal than TPB, and they're ~ready to be used 🤷♂️
<FromGitter>
<mgarciaisaia> Not sure if there are Vagrant boxes for win - maybe that'd work too
<RX14>
I have a W7 liscence key from when I used W7 on my desktop
<RX14>
so I just use that
<FromGitter>
<bew> RX14 maybe it's possible to install only the windows compiler `msvc` without installing visual studio
<FromGitter>
<fridgerator> its nice they made the iso availble to download if you have a key