Fork me on GitHub
#clojure-uk
<
2018-04-11
>
Rachel Westmacott07:04:40

I have never heard of today’s random core function of the day:

-------------------------
clojure.core/->VecNode
([edit arr])
  Positional factory function for class clojure.core.VecNode.

Rachel Westmacott07:04:03

seems to exist to support

-------------------------
clojure.core/vector-of
([t] [t & elements])
  Creates a new vector of a single primitive type t, where t is one
  of :int :long :float :double :byte :short :char or :boolean. The
  resulting vector complies with the interface of vectors in general,
  but stores the values unboxed internally.

  Optionally takes one or more elements to populate the vector.

😎 4
yogidevbear07:04:43

Morning simple_smile Back to the grind stone today.

dominicm07:04:21

That is interesting

acron09:04:30

morning all

jasonbell11:04:44

I thought we agreed that abuse was only dished out on a Thursday?

yogidevbear11:04:19

It's groundhog Thursday for anyone named Jade 😉

yogidevbear11:04:42

For all perpetuity

jasonbell11:04:35

and then they all jump in...

😇 4
❤️ 8
otfrom11:04:08

from a distance it looks like you are cosplaying someone w/a BFG in a FPS

mccraigmccraig12:04:00

nah, he's fighting off the evil dead with a chainsaw @otfrom

jasonbell12:04:53

@yogidevbear @otfrom You're both gonna need bigger shovels for the amount of emoji digging you're doing.

danm12:04:14

Where is this avi?

danm12:04:26

Aaah, it was the profile pic. Fair enough. I thought there was another one somewhere

danm12:04:51

Hmm, from the fading on my keyboard my most used keys are a, s, e and l. I wonder why...

danm12:04:02

I mean, a and e yes. But s and l?

yogidevbear12:04:55

What is that @jasonbell? It's got more than strings. It doesn't look like a sitar

jasonbell12:04:46

@yogidevbear It's a Chapman Stick, ten strings.

yogidevbear12:04:18

I've never heard of a Chapman Stick before... TIL

jasonbell12:04:28

Depending on your musical tastes you might have heard it.

otfrom14:04:28

I'm sure @jasonbell will agree it sounds best when it is accompanying my singing.

jasonbell15:04:05

I think Jade's silence said it all.....

4
seancorfield15:04:08

You play a Chapman Stick? Very cool!

3Jane15:04:59

my initial mental image was https://en.wikipedia.org/wiki/ChapStick … I’m glad for the photo XD

parrot 4
jasonbell16:04:08

@seancorfield have done since 1993

🎸 4
💯 4
dominicm21:04:14

that's what Thread is for?

dominicm21:04:20

it's go loops that aren't for that isn't it?

mccraigmccraig21:04:26

oh, it was the right thing to do in the absence of any decent & maintained nio lib for clojure... it's the lack of that lib which i'm feeling, but i really don't have any time to look at it

dominicm21:04:51

I feel like I'm missing something, why is using Thread wrong? 😛

mccraigmccraig21:04:54

it's my async-zealot viewpoint that Threads are for mapping to hardware threads and not for everyday use 🙉

dominicm21:04:02

Does NIO map to hardware threads?

dominicm21:04:19

You should write a clojure-centric blog about being perfectly-threaded, I'd read that

mccraigmccraig21:04:29

i don't really know the java NIO api, but it looks like you can specify the j.u.c.ExecutorService ops get run on

mccraigmccraig21:04:44

which is similar to other non-blocking things i've worked with

mccraigmccraig21:04:08

anyway, we allocate almost no Threads in our system - all our i/o for db, http etc is all async, mostly netty-based via aleph and datastax/java-driver - the only area where we have some blocking stuff is InputStreams and file i/o

dominicm21:04:42

I'm still a bit confused though, you don't allocate a thread, but if it's async, isn't there a thread waiting to do work?

mccraigmccraig21:04:04

yes - there are pools of threads, but they never block... it's blocking that feels dirty

otfrom09:04:03

blocking pipeline uses a separate thread pool from go blocks, but afaik you aren't really using the core.async stuff anyway so I suppose that doesn't help

otfrom09:04:49

I think java (used to be only on solaris, is true on linux now as well I think) does m:n threading so you can have more threads than are available from the OS

mccraigmccraig10:04:11

yeah, i'm using manifold - i can create a Thread with a manifold.deferred/future, which has its own pool - https://github.com/ztellman/manifold/blob/master/docs/execution.md

otfrom09:04:03

blocking pipeline uses a separate thread pool from go blocks, but afaik you aren't really using the core.async stuff anyway so I suppose that doesn't help