Inko (lang)

27 Members
General purpose chat room about the Inko programming language.2 Servers

Load older messages

15 Aug 2020
@yorickpeterse:matrix.orgyorickpetersehttps://gitlab.com/inko-lang/inko/-/blob/master/vm/src/scheduler/process_worker.rs is the meat of the work-stealing logic 21:50:20
@yorickpeterse:matrix.orgyorickpeterseThreads used for running processes have two operating modes: normal, and exclusive. In normal mode they can run any process. In exclusive mode they only run the process that pinned itself to the thread21:50:56
@yorickpeterse:matrix.orgyorickpeterseHappy to share more if you need anything :)21:53:05
16 Aug 2020
In reply to @yorickpeterse:matrix.org
Inko uses a similar approach. Currently we only reduce for method calls, but this probably will change at some point
hmm, i can think of that being a potential issue in long for loops, which was partially why I wanted to look at Inko's implementation. But i'm still very interested in taking a look; though it will take some time to parse all that code :)
@hernytan:matrix.orghernytanthanks for the help! I will look at that code then15:26:56
@hernytan:matrix.orghernytanErlang's trick is to disallow loops, so that reductions are easier to count using only method calls. But i don't think this is a good approach15:28:45
@yorickpeterse:matrix.orgyorickpeterse hernytan: Loops are implemented using methods, and method calls in loops would also be pretty frequent. With that said, when we start inlining code we'll probably need to add more bits and pieces 21:34:15
@yorickpeterse:matrix.orgyorickpetersee.g. we can just add a "reduce" instruction, then have the compiler emit that when it optimised methods away21:34:41
18 Aug 2020
@cheer:tchncs.decheer changed their profile picture.00:37:30
1 Sep 2020
@hellonomad:matrix.orgkiti_nomadAlmost all open source projects have no Chinese in their monthly donations😂16:09:32
@yorickpeterse:matrix.orgyorickpeterse kiti_nomad: most open source projects sadly don't have any donations to begin with :) 21:39:33
@yorickpeterse:matrix.orgyorickpeterseUnrelated to that, Inko's self-hosting type-checker/compiler can now type-check (generic) method calls. It's been taking a while, but I'm quite happy with how it's turning out so far21:40:20
@yorickpeterse:matrix.orgyorickpetersedefinitely a lot of cleaning up to do, and coming up with better names for things here and there21:40:31
@yorickpeterse:matrix.orgyorickpeterse Overall I am quite satisfied with the code thus far; definitely much better than the mess that is the Ruby compiler 21:41:00
@yorickpeterse:matrix.orgyorickpeterseWhich means one of two things: 1) I did a decent job 2) I messed up/overlooked something big :D21:41:17
6 Sep 2020
@hellonomad:matrix.orgkiti_nomadI guess it’s not the reason, because you did not provide a payment method that is convenient for Chinese people to donate15:51:30
@yorickpeterse:matrix.orgyorickpeterse kiti_nomad: I'm not aware of the requirements/etc, but there's an Open Collective and GitHub Sponsors; both access conventional credit cards 19:07:30
@yorickpeterse:matrix.orgyorickpeterseerrr s/acces/allow use of19:08:09
9 Sep 2020
@yorickpeterse:matrix.orgyorickpeterseI believe I finally managed to handle all AST nodes in the type-checker20:20:48
@yorickpeterse:matrix.orgyorickpeterseThe error handling AST nodes were a bit of a challenge, but I'm quite happy with the setup20:21:02
@yorickpeterse:matrix.orgyorickpeterse It's a bit stricter than the Ruby compiler though. For example, you can do this when using the Ruby compiler: try foo.bar.baz. If foo or foo.bar throws, the Ruby compiler will allow this 20:21:53
@yorickpeterse:matrix.orgyorickpeterse In the self-hosting compiler you'd have to write try { try { foo }.bar }.baz. This looks ugly, but fortunately it's very rare (e.g. no code in Inko's standard library does this that I remember) 20:22:35
@yorickpeterse:matrix.orgyorickpeterse Similarly, this is not valid either: try foo(bar) where bar would raise 20:23:08
@yorickpeterse:matrix.orgyorickpeterse In the self-hosting compiler, you must try try foo(try bar) instead 20:24:53
@yorickpeterse:matrix.orgyorickpeterseThis additional strictness makes it easier for the compiler to verify that all throwing code is handled properly, something the Ruby compiler is not very good at20:25:20
@yorickpeterse:matrix.orgyorickpeterseHa spoke too soon: I forgot about raw VM instructions that need to be type-checked properly 21:15:52
15 Sep 2020
@kirkkaf:matrix.orgkirkkaf joined the room.10:14:40
16 Sep 2020

Got all VM instructions supported. Two things left to do I believe (for the type-checker):

  1. Closure argument type inference
  2. Finding/fixing any bugs by running the type-checker on the standard library
@yorickpeterse:matrix.orgyorickpeterseInferring closure arguments will be a challenge. In the Ruby compiler this is implemented super hacky, but I don't want to repeat that20:06:09

There are no newer messages yet.

Back to Room List