Lisplog

Blogging in Lisp

Search

Feed Aggregator Page 677

Rendered on Tue, 30 Nov 2021 03:32:13 GMT  newer latest older 

Lazy evaluated map

via Elm - Latest posts by @wolfadex Wolfgang Schuster on Tue, 30 Nov 2021 01:21:48 GMT

I thought for certain that’d be in elm-review-simplify 2.0.7 but I don’t see it listed. At the very least I think I’ve seen @jfmengels mention it in passing.

Serving a simple static html file from inside elm-spa

via Elm - Latest posts by @DullBananas on Tue, 30 Nov 2021 00:14:58 GMT

You might need additional logic in the update function, so that when you click a link to “innerspa.html”, it runs Browser.Navigation.load instead of Browser.Navigation.pushUrl because it usually runs pushUrl when the URL is in the same domain. I don’t know if elm-spa allows that.

Maybe it also works if you change the href to include the full URL including the domain name

Serving a simple static html file from inside elm-spa

via Elm - Latest posts by @madsh Mads Hjorth on Mon, 29 Nov 2021 21:50:28 GMT

Hi,

This is my first endeavour into elm-lang and I am having a blast. Strongly typed languages make so much better tooling…

elm-spa.dev has been a really good for my first app.

However, I am trying to ‘co-host’ a simple html file next to the index.html entry point. I do this because i think I need more control of the css and scripts loaded on the page. You might even call it a spa-in-a-spa…

The inner-spa redirects fine back to the elm world via a simpe windows.location.

But going the other way using Html.a [ Attribute.href “innerspa.html” ][…] does not do what I expect. My browser shows a ‘page not found’ that I recognize as a elm-spa default. But if I simply reload the browser using F5, I get straight into innerspa.html…

Why is this happing? and is there a better way…?

I would rather not have to host innerspa.html at a different (sub-)domain, but that would be absolutely possible.

A process for core library fixes and improvements

via Elm - Latest posts by @Ocean_Blue Ocean Blue on Mon, 29 Nov 2021 21:17:54 GMT

I’m sorry if I made you feel bad. I used the word “imprudently” to express thought that “just small changes could cause big problems”.
But, Elm’s philosophy is “A delightful language for reliable web applications.”. If Fix fits this philosophy, I think it is reflected quickly and if Fix doesn’t fits Elm’s philosophy it won’t be reflected. That is the reason why I love this language.

Lazy evaluated map

via Elm - Latest posts by @Lucas_Payr Lucas Payr on Mon, 29 Nov 2021 19:39:42 GMT

My question is simple:

Why does Elm not rewrite List.map f >> List.map g into List.map (f >> g)?

Because the thing is, this optimization can be seen in Java streams, (which is neither a lazy nor a pure functional language) yet it does not happen in Elm. Why is that?

A process for core library fixes and improvements

via Elm - Latest posts by @aklaing on Mon, 29 Nov 2021 17:15:31 GMT

I believe in staying very close to elm in semantics and implementation, so I like the actual idea of a release branch. Unfortunately I think the elm core team will still require a change of name and logo. In my humble opinion, when the name and logo changes, it is a fork. You can’t call it a release branch anymore.

So my two cents is that we should fork now, but make very minimal changes on the fork (with exactly the same minimalist / conservative attitude that one would adopt in a release branch, which Rupert has described). Somehow I think the elm core team will not like the idea of a release branch with the same name and logo as elm, but I would be happy to be corrected if I’m wrong.

I think most of us are agreed that we don’t want huge changes. Just the ability to make essential minimal changes in a timely fashion.

A process for core library fixes and improvements

via Elm - Latest posts by @Warry Maxime on Mon, 29 Nov 2021 16:52:54 GMT

Of course nobody wants broken libraries, unfortunately it’s the case right now in some places.

Given the efforts that went into fixing them by really smart people from the community, along with documentation, benchmarks and testing, I find it harsh that you use the word “imprudently”.

Just my 2¢.

Introducing Elm Editor - a web-based IDE for Elm programs

via Elm - Latest posts by @Viir Michael Rätzel on Mon, 29 Nov 2021 15:53:47 GMT

Thanks for sharing your experience.

I looked briefly into the template problem to try to understand how those work. I see there is an interface to ‘Search Sandboxes’. Is every sandbox also a template? After all, their documentation defines them as ‘project starting points’.

In any case, if the remaining cons are enough for you to look further, let me know. So far, I did not run into big challenges expanding Elm Editor. Maybe supporting mob programming also turns out to be easy enough, who knows :man_shrugging:

A process for core library fixes and improvements

via Elm - Latest posts by @Ocean_Blue Ocean Blue on Mon, 29 Nov 2021 14:29:38 GMT

Just tiny opinion from Korea!
It seems like the writer of this post doesn’t content with the current Elm process. But I have different idea. In my opinion, current way is a great way to maintain Elm. I don’t want Wikipedia like system(Many people edit, so amount is huge, but quality isn’t reliable), I want Britannica like system(Fewer people edit, so amount is smaller, but quality is reliable). Of course, this way isn’t perfect match for “open source” but I hardly believe there is such a truly open source model.
And, I think Elm is the greatest language for reliable frontend coding even if there isn’t further updates for 2 years from now. Elm is already good. So, imprudently changing library implementation/adding features/adding syntax sugar will harm elm-way-clean-coding.

Yahoo Protobuf processing reference

via Elm - Latest posts by @Hari_Roshan Hari Roshan on Mon, 29 Nov 2021 14:14:15 GMT

Continuing the discussion from Status Update - 3 Nov 2021:

@Tails I translated the JS Protobuf library to parse the yahoo quotes. It has parts such as parsing Int, string, float and uint which may come handy if you want to perform parsing for other proto file. Code to Yahoo Stream file

How events works inside the virtual dom

via Elm - Latest posts by @system system on Mon, 29 Nov 2021 09:57:06 GMT

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Working with folders

via Elm - Latest posts by @curiousme Mr. Curious on Mon, 29 Nov 2021 05:40:14 GMT

It’s more robust to recursively read your directory structure with the directoryReader and construct your paths from directory names then bother with reading and parsing the path off the file object.

To read the directory structure you have to scan with directoryReader and distinguish between folders and files (.isDirectory/.isFile). Elm implementation just wraps the file object and actually checks if the blob is a file before wrapping it by calling isFile on it, so you can really only push it files after you cast them with .getAsFile().

Working with folders

via Elm - Latest posts by @jaruji on Sun, 28 Nov 2021 22:59:02 GMT

I appreciate the detailed response. I’m wondering if it’s possible to obtain information about the folder structure (the entire hierarchy of the directory) with an Elm only approach, without resorting to ports. I know that the relative path is stored in webkitRelativePath attribute inside each file, but I’m not really sure about how to extract that (elm/file supports extracting size, name, etc., but not the path variable). Is there an easy way to solve this that I’m missing? Again, thank you all for your help thus far :slight_smile:

A process for core library fixes and improvements

via Elm - Latest posts by @rupert Rupert Smith on Sun, 28 Nov 2021 18:27:16 GMT

Besides tooling, another reason not to fork more aggresively is the compiler and language itself. There is still work going there by Evan, and the further away a fork gets from the original, the harder it becomes to pick up what he builds in the next version of Elm. That is why I advocate a Release Branch approach, at least until such time as everything that can be fixed in a release branch has been fixed. It would give us the opportunity to at least fix some stuff and get things moving. Its not possible to say exactly how much of that stuff might be able to carry forward into a newer version of Elm, but it seems likely at least some patches would carry over cleanly.

I don’t see a hurry to fork, there is plenty time. I did Java for 20 years, and now its becoming possible to make a living doing Elm, maybe I’ll be here for 20 years too. So I am enjoying this thread and listening to peoples points of view and spending some time thinking about possible directions and what is best for all.

Elm Radio 43: Teaching Elm with Richard Feldman

via Elm - Latest posts by @system system on Sun, 28 Nov 2021 17:24:04 GMT

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.

Analysis of Elm core issues and patches

via Elm - Latest posts by @rupert Rupert Smith on Sun, 28 Nov 2021 10:33:24 GMT

Lets add it to the sheet, looks fixable. :+1:

Analysis of Elm core issues and patches

via Elm - Latest posts by @malaire Markus Laire on Sun, 28 Nov 2021 04:35:26 GMT

You could ask if that is bug or feature, but what about 4d parsing as Int but 4e not? It’s quite hard to argue that not allowing e is a feature.

A process for core library fixes and improvements

via Elm - Latest posts by @MarkHamburg Mark Hamburg on Sat, 27 Nov 2021 22:42:52 GMT

I’ve been a consumer of both Lua and SQLite. They both appear to follow these principles:

  1. The core is under strict control of the author or author(s). Maybe they’ll look at pull requests, but it is largely the work of a single individual or a small set of individuals.

  2. The core is “small”. For Lua, it’s just the language and the core libraries defined as part of the language standard. For SQLite, it’s the SQL implementation.

  3. Bugs in releases are fixed very quickly in double-dot-releases. They generally stabilize out these bugs quickly but there have been occasional patches to older releases. Versions before a certain point are not patched, but anything expected to be potentially in use does get patched.

It seems like Elm matches up on 1. It is over expansive in the efforts about control on 2 though there is a pretty clear boundary that could be drawn about what is inside the scope of control/responsibility and what is not. On 3, this is clearly not the behavior since many bug fixes if they ever come also tend to come with significant language revisions. I feel that 1 is a healthy choice because it provides a clarity that committee driven processes often lack. It is, however, enabled for the community by 3 which is further enabled by 2.

Android app skeleton

via Elm - Latest posts by @master marc on Sat, 27 Nov 2021 19:07:50 GMT

(post deleted by author)

Elm playground: how to act at the beginning or end of an animation loop?

via Elm - Latest posts by @benjamin-thomas Benjamin Thomas on Sat, 27 Nov 2021 17:40:30 GMT

Hello Hans,

Great solution, many thanks!!

 newer latest older