[elm-discuss] Re: Unit Types : A Radical Proposal

2016-07-30 Thread Job van der Zwan
On Thursday, 28 July 2016 20:42:44 UTC+2, John Bugner wrote:
>
> (5) Perhaps compound unit types like "Time^2" would be supported, so a 
> "Time * Time" would yield "Time^2", "Time * Float" would yield "Time", and 
> "Time * Length" would yield just that: "Time * Length". ("Force" would be 
> an alias of "Mass * Length / (Second^2)".)
>

Here's how Julia handles this, although it seems to require hand-coding all 
of of the promotion rules:

http://docs.julialang.org/en/release-0.4/devdocs/promote-op/

(understanding this may require a bit of understanding Julia's type system, 
which lets you define your own types down to the bit-level 
, complete with custom 
conversion and promotion rules 
)

Not sure how that might translate to Elm's type system, but I guess using 
custom infix operators will be part of it (except for not allowing 
redefining the built-in ones). Off-topic, but is this really all 
documentation available on infix operators? Because I don't really think 
that's good enough:

http://elm-lang.org/docs/syntax#infix-operators 

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[elm-discuss] Re: Collecting use cases for File, ArrayBuffer and TypedArrays/DataViews

2016-07-29 Thread Job van der Zwan
On Thursday, 28 July 2016 23:17:51 UTC+2, Daniel Bachler wrote:
>
> *TypedArrays and DataViews*
> Please add your own ideas to this thread. Once we have compiled a list of 
> use cases, we can look at the JS Apis available under the Web Platform for 
> Files, ArrayBuffers, Typed Arrays etc. and think how these could be exposed 
> to Elm. 
>

Hi, I'm not using Elm yet but thinking about it because I'm bitten by 
undefined variables way to often currently and miss my statically typed 
languages. 

I'm developing for a research group to build a data browser for their 
growing RNA database. Basically, we'll be dealing thousands of cells with a 
arrays of thousands of genes each, and for each gene have an integer value 
representing how much RNA activation was measured, plus a bunch of metadata 
per cell. This data itself is immutable of course, but the plan is to 
on-the-fly render the datavisualisations (with as little rendering as 
possible - we'll probably use  for this).

So a compact way of storing and a fast way of accessing these gene values 
is important. TypedArrays would probably help here.

(also, suggestions on how to best use the canvas element in Elm are 
welcome, since elm-graphics appears more-or-less deprecated, but maybe I 
should open a separate topic for that?)

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.