laurent.orseau
2019-11-19 10:00:24

There’s also the #news channel already


laurent.orseau
2019-11-19 10:02:33

And the #pkg one too


niklas
2019-11-19 12:58:54

@niklas has joined the channel


dmitryhertz
2019-11-19 13:42:01

@pavpanchekha threads are very useful for network tasks. Places are too fat for that.


spdegabrielle
2019-11-19 14:05:29

If anyone is interested, I just published a scheme request for implementation with transducers. They are trivial to port to racket.

They are quite different than the ones Jack made (eager vs lazy), but also a lot more like the clojure ones. They possibly have less overhead due to the protocol of rebellion’s transducers (which has other benefits, i’m sure).

Here ya go: https://srfi.schemers.org/srfi-171/ https://www.reddit.com/r/Racket/comments/dybh3q/racket_news_issue_20_racket_75_is_almost_here/f81bmu1/?utm_source=share&utm_medium=ios_app&utm_name=iossmf


steveh2009
2019-11-19 15:47:00

@notjack Maybe keyword arguments or maybe it’s better though to get the architectural gist from C#/Java code and then switch the mindset to data and functions on them when “porting”. [I’m really tired of OOP]


badkins
2019-11-19 15:55:26

Big thanks to @jaz for gregor - fantastic package that has saved me a ton of time!


jaz
2019-11-19 15:56:16

thanks @badkins!


steveh2009
2019-11-19 15:56:51

On the subject of places, what is the base memory footprint for each one created in a program?


anything
2019-11-19 15:57:23

@anything has joined the channel


m.gregg
2019-11-19 16:12:20

@m.gregg has joined the channel


samth
2019-11-19 16:29:30

The memory footprint is similar to that of the regular racket VM by itself — think of places as cloning the VM


steveh2009
2019-11-19 16:40:18

On Win 10, my command console consumes 7.3mb. Goes to 72mb running racket exe. Initial DrRacket consumes 520mb. So I guess a place, assuming it’s not pulling in masses of data, would typically grow to 100–250mb.


samth
2019-11-19 16:41:37

Here are the numbers I got for various tests (I was looking into this in conversation with @pavpanchekha recently): [samth@huor:~/sw/plt/extra-pkgs/racket-lang-org (master) plt] r /home/samth/sw/plt/extra-pkgs/herbie/tmp.rkt 'startup 19867984 'base #t 55376128 'racket #t 91006376 'typed/racket #t 136819072 #t 'plot 229841508 '(#<place> #<place> #<place> #<place>)


samth
2019-11-19 16:42:30

so at startup were using about 20MB, loading a new place with racket/base in it 55 MB, loading another place with racket 91 MB, and so on


steveh2009
2019-11-19 16:45:08

Are OS threads completely off the table for the foreseeable future?


samth
2019-11-19 16:58:49

What do you mean by “OS threads” — places use OS threads.


samth
2019-11-19 16:59:12

changing thread to use a new OS thread is very unlikely


steveh2009
2019-11-19 17:58:15

A thread which can run on any CPU core within the same VM is what I mean.


samth
2019-11-19 18:27:20

Here’s the current situation: there are 3 relevant constructs for concurrency & paralleism in Racket: future, place, and thread. thread is green threads — lightweight, concurrent, but not parallel. future is fairly lightweight, but limited because if it would do something involving interaction with the runtime such as IO or many other things, it has to block and wait for the spawning thread to do the work. This works for computation-heavy workloads but is currently limited and not widely used. place is heavyweight but flexible — it’s shared-nothing concurrency with message-passing, a la Erlang, but because of the architecture of Racket (for example, module instances can point to mutable data) lots of things have to be duplicated per-place leading to high memory use and so you can’t have a very large number of them. Places and futures both use multiple CPU cores; threads do not. The most likely paths forward for improving things here are (1) making places less heavyweight and (2) making futures work in parallel efficiently with more runtime-sensitive operations. Changing thread to use multiple OS threads is very unlikely. (There’s also an unsafe os-thread library that only works on the Chez backend.)


steveh2009
2019-11-19 21:55:57

Sam, is an OS thread library unsafe in the presence of immutable data structures and STM?


spdegabrielle
2019-11-19 21:58:01

FWIW as of right now these channels claim the following numbers 24 reddit/r/racket 9 racket discord


spdegabrielle
2019-11-19 22:00:27

Obviously this is apples and oranges, and is probably dwarfed by racket-users


samdphillips
2019-11-19 22:00:49

Current active users?


willbanders
2019-11-19 22:13:50

I’m not entirely sure what those numbers mean. Is that supposed to be 93 for slack?


spdegabrielle
2019-11-19 22:37:36

I think the slack number is wrong



laurent.orseau
2019-11-20 06:53:00

I see Member List 926