[elm-discuss] Re: how to make a port compnent

2016-12-09 Thread أحمد حبنكة
well the application is going to be like this : the user will create 
tutorials like this : user starts recording audio, while speaking he/she 
enters code in the code editor , when user ends recording the course shall 
be created.  

Now someone will watch the course, when the course is started the audio is 
played and text shall be entered in the code editor by the program 
synchronizing with the audio, the watcher will be able to pause the audio 
and enter his/her own code and run it.  

you can watch this kind of behavior at www.khanacademy.com :) .

I predict a component for the audio shall exist and the main component will 
synchronize between the code editor and the audio.

بتاريخ الأربعاء، 7 ديسمبر، 2016 5:13:56 م UTC+2، كتب أحمد حبنكة:
>
> I'm going to build a project in which I need to build a code editor 
> component, Right now I plan to use microsoft's monaco editor, I want to 
> wrap as an Elm component using port.  
>
> I know from experience that the view has to be managed in JS side , what I 
> don't know is how to make this as a component that other components can 
> build on, how do I write a Component that has Html code alongside JS ?
>
>
>

-- 
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: Why latest versions of elm-compiler not available on Hackage?

2016-12-09 Thread أحمد حبنكة
you can see this issue : 
https://github.com/elm-lang/elm-compiler/issues/1300

while it is a bit old, I think it states Evan's decision so you either have 
to build from source or work with the command-line options.

بتاريخ الجمعة، 9 ديسمبر، 2016 11:51:33 ص UTC+2، كتب Jan Hrček:
>
> Hello,
>
> is there a distribution of latest (0.18) elm-compiler available as haskell 
> library? I checked hackage 
>  but that only has 
> version 0.15. Or do I need to build it from sources?
> I'd like to make use of the elm parsing capabilities of the library to use 
> in my project..
> Or is there some reason why Evan is no longer publishing latest versions 
> of the package on hackage?
>

-- 
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: how to make a port compnent

2016-12-09 Thread أحمد حبنكة
Is there a solution to my problem or are native modules my only solution ?

بتاريخ الأربعاء، 7 ديسمبر، 2016 5:13:56 م UTC+2، كتب أحمد حبنكة:
>
> I'm going to build a project in which I need to build a code editor 
> component, Right now I plan to use microsoft's monaco editor, I want to 
> wrap as an Elm component using port.  
>
> I know from experience that the view has to be managed in JS side , what I 
> don't know is how to make this as a component that other components can 
> build on, how do I write a Component that has Html code alongside JS ?
>
>
>

-- 
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] how to make a port compnent

2016-12-07 Thread أحمد حبنكة
I'm going to build a project in which I need to build a code editor 
component, Right now I plan to use microsoft's monaco editor, I want to 
wrap as an Elm component using port.  

I know from experience that the view has to be managed in JS side , what I 
don't know is how to make this as a component that other components can 
build on, how do I write a Component that has Html code alongside JS ?


-- 
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.


Re: [elm-discuss] Re: Why Range syntax got removed in favor of List.range

2016-11-14 Thread أحمد حبنكة
What do you think about my suggestion in previous reply ? replacing 
List.range with List.(..) operator ?

بتاريخ الاثنين، 14 نوفمبر، 2016 2:43:49 ص UTC+2، كتب Max Goldstein:
>
> Sometimes it's useful to pass arguments to List.range and have it be empty 
> when a > b.
>
> Perhaps there should be *List.rangeWithStep 5 1 -1* to solve your problem.
>

-- 
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: Why Range syntax got removed in favor of List.range

2016-11-14 Thread أحمد حبنكة
hmmm I agree, if we want to make it a function though then we can replace 
the `List.range` function with `..` operator and construct ranges like this 
`1..2` (no need for brackets)

This is how it's done in ruby and it's a function :) , the range syntax 
removal is acceptable in this situation but replacing it with `List.range 1 
5` seems liitle bad for me

As for floating points we could remove support for them altogether as I 
don't think anyone would use it anyway, if intervals are needed then a data 
structure other than lists is going to be better.

بتاريخ الأحد، 13 نوفمبر، 2016 9:04:52 م UTC+2، كتب Robin Heggelund Hansen:
>
> Fixing the docs could of course be done, and you're right, it's not 
> something that's hard to understand. However, the question you should be 
> asking is "is there any reason why range isn't  a function to begin with?"
>
> søndag 13. november 2016 16.58.32 UTC+1 skrev أحمد حبنكة følgende:
>>
>>
>>
>> بتاريخ الأحد، 13 نوفمبر، 2016 1:53:05 ص UTC+2، كتب أحمد حبنكة:
>>>
>>> I was reading the elm-dev list and I knew that elm 0.18 removed the 
>>> range syntax, so code like this : 
>>> [2..3]
>>> won't work anymore.
>>>
>>> I want to know what are the foundations behind this decision ?
>>> hmmm if it is "can't find it in the documentation" then fix the 
>>> documentation, when the documentation is unfixable for this feature I think 
>>> it may be better to remove it, was this the case ?  
>>>
>>
>> The syntax of ranges is not specific to haskell, ruby and some other 
>> languages implement it.  
>>
>> Now for the fact that most new coders ask "what's this" or "how do I make 
>> a range" maybe the problem lies in the docs not in the feature itself.  
>>
>> still if it is confusing for most beginners then I agree it's probably 
>> better to remove it although I find hard to believe that this feature is 
>> hard to understand !! 
>>
>

-- 
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: Why Range syntax got removed in favor of List.range

2016-11-13 Thread أحمد حبنكة


بتاريخ الأحد، 13 نوفمبر، 2016 1:53:05 ص UTC+2، كتب أحمد حبنكة:
>
> I was reading the elm-dev list and I knew that elm 0.18 removed the range 
> syntax, so code like this : 
> [2..3]
> won't work anymore.
>
> I want to know what are the foundations behind this decision ?
> hmmm if it is "can't find it in the documentation" then fix the 
> documentation, when the documentation is unfixable for this feature I think 
> it may be better to remove it, was this the case ?  
>

The syntax of ranges is not specific to haskell, ruby and some other 
languages implement it.  

Now for the fact that most new coders ask "what's this" or "how do I make a 
range" maybe the problem lies in the docs not in the feature itself.  

still if it is confusing for most beginners then I agree it's probably 
better to remove it although I find hard to believe that this feature is 
hard to understand !! 

-- 
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: Parallelism support in Elm

2016-11-13 Thread أحمد حبنكة
well what would someone use web workers for ? why did they make it into the 
standard ?

I think that a multithreaded model is needed for some html5 applications if 
we care about performance and utilizing multiple cores.  

I agree that for many applications especially where the business logic is 
on the backend, you can work with concurrency but as more logic gets added 
to the frontend the need for parallelism becomes more apparent.  

In my opinion it's hard to think for a valid usecase for web 
workers/multithreading in javascript because we got used to the single 
threaded model but if more libraries/frameworks adopted them and more 
abstractions were based on them their benefit will become clear.

بتاريخ الأحد، 13 نوفمبر، 2016 4:06:19 ص UTC+2، كتب Robin Heggelund Hansen:
>
> What would you use it for?
>
> søndag 13. november 2016 00.53.05 UTC+1 skrev أحمد حبنكة følgende:
>>
>> according to this 
>> <http://stackoverflow.com/questions/29181960/is-there-parallelism-in-elm> 
>> question, 
>> Elm doesn't support parallelism yet.  
>>
>>
>> I know that right now the idiomatic way in JS (and in result Elm) is to 
>> do concurrency instead of parallelism but I think in the future web workers 
>> might become as idiomatic as AJAX or Promises.  
>>
>> Given that JS does now support it via web workers, I was wondering what 
>> are the plans for adding Parallelism to Elm ?
>>
>>
>>
>>

-- 
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] Why Range syntax got removed in favor of List.range

2016-11-12 Thread أحمد حبنكة
I was reading the elm-dev list and I knew that elm 0.18 removed the range 
syntax, so code like this : 
[2..3]
won't work anymore.

I want to know what are the foundations behind this decision ?

-- 
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] Parallelism support in Elm

2016-11-12 Thread أحمد حبنكة
according to this 
 
question, 
Elm doesn't support parallelism yet.  


I know that right now the idiomatic way in JS (and in result Elm) is to do 
concurrency instead of parallelism but I think in the future web workers 
might become as idiomatic as AJAX or Promises.  

Given that JS does now support it via web workers, I was wondering what are 
the plans for adding Parallelism to Elm ?



-- 
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.