Lisplog

Blogging in Lisp

Search

Feed Aggregator Page 663

Rendered on Sat, 17 Oct 2020 20:33:51 GMT  newer latest older 

Reasons that people were forced to move from Elm to something else?

via Elm - Latest posts by @ChristophP Christoph P on Sat, 17 Oct 2020 19:59:10 GMT

Wow, thanks Chad for this write up. I think your summary is very accurate.
(Clarification: I used to work with Chad, at that company. Matter of fact, I was the one who hired him.)

Chad outlined things so greatly that I don’t even have much to add to the points he mentioned so well, but I can give a bit of my perspective on the matter:

The two years I was there for were marked by huge changes. Organizationally, staff-wise, technology and product-wise, and also strategically. I have never seen more people come and go in such a short period of time as at that company then.

Trying to create some stability for the frontend team in an environment when everything changed daily, we took the opportunity to write lots of Elm code in our newly created microfrontend architecture. To me the most important thing was teaching people Elm, which had varying levels of acceptance.

There were no solid arguments against Elm. They all pretty much boiled down to “I prefer React” in various disguises and that is ok. Not everyone will agree on this. However, there was nothing technical in the Elm projects that would’ve forced anyone to not use Elm. In fact Elm was great for stability, asset size and (if people had learned enough) development speed.

However, like Chad said, acceptance is high and helping others learn would have been hugely important. It sounds strange when you read “I was not allowed to help others” but there were forces in that companies that were very polical and I would there was quite some back-stabbing behavior going on. In hindsight I should’ve been more outspoken against those forces, but at the time I was honestly not 100% clear on the depth of those actions.

Anyway, I agree with Chad that everything stands and falls with having people that are interested in Elm. Unfortunately, the people who are not often have reasons that tends to convice management more (React is stable, backed by Facebook, enterprise, yadadad) :slight_smile:

Custom Scroll Bar Logic

via Elm - Latest posts by @rupert Rupert Smith on Sat, 17 Oct 2020 15:19:49 GMT

I’m thinking the hidden textarea approach used by CodeMirror will really be necessary - that will handle most of the keyboard work.

Anyway, for this spike I’ll just handle a few keys on the div and call it quits. Going to look at implementing an efficient and flexible content buffer next, since I got an idea for that.

Custom Scroll Bar Logic

via Elm - Latest posts by @francescortiz Francesc Ortiz on Sat, 17 Oct 2020 14:50:48 GMT

We have an infinite sc[quote=“rupert, post:9, topic:6403”]
The only other thing I would like to do is to override the arrow key and page up/down events, so that they always scroll by an exact integer number of lines.
[/quote]

If you are writing a text editor I might be worth capturing all keyboard events to have full control of what is going on, specially if it is going to be an advanced text editor. Check elmMPS, for instance; I think that it would be impossible to create it without taking full control of use input.

Reasons that people were forced to move from Elm to something else?

via Elm - Latest posts by @rupert Rupert Smith on Sat, 17 Oct 2020 14:28:57 GMT

Would you say that there were genuine technical problems in Elm that made developing this project difficult? Or would you say that any problems you hit were solvable in Elm quite easily?

Custom Scroll Bar Logic

via Elm - Latest posts by @rupert Rupert Smith on Sat, 17 Oct 2020 13:23:19 GMT

So I’ve done all that and updated the demo, seems to work pretty nicely:

I made use of Html.Lazy and Html.Keyed and I could see that made a small but barely discernable difference in performance.

The only other thing I would like to do is to override the arrow key and page up/down events, so that they always scroll by an exact integer number of lines. When going down, the last visible line of text should appear whole at the bottom, when going up the first visible line should appear whole at the top.

Plan is to use this for a code editor along these lines: Text editor done in pure Elm.

Can we create Mobile apps in elm?

via Elm - Latest posts by @rupert Rupert Smith on Sat, 17 Oct 2020 08:14:53 GMT

That looks interesting. I notice that the markup it uses is not HTML - but I guess you can generate whatever markup you like with elm/virtual-dom? Perhaps even write a package of functions for building native script markup on top of that?

Also, presumably you would use Browser.application etc to write an Elm program. Would all the Browser.* packages work as they do in a browser?

Reasons that people were forced to move from Elm to something else?

via Elm - Latest posts by @Chadtech Chadtech on Sat, 17 Oct 2020 01:33:25 GMT

I posted in that slack thread too. I’ll repost here.

A while back, I joined a company who’s plan was that everything new was going to be Elm, and my team was beginning an important new Elm project for the company. The company had three teams of 6 developers, and each team had 3 frontend devs. Eventually, by time 50% of the front end code was in Elm, the company made the decision that Elm was cancelled, and nothing new would be made in Elm. It was around that time that I quit, which coincided with a lot of other people quitting (for various reasons not related to Elm).

During my time there, I took an Elm project from nothing to completion in about 7 months. And I am very happy to say it is still maintained and in production! Thousands of people are still using it every day. Even though the company gave up on Elm, it seems Elm did not give up on the company :tada: .

Here are some details about the company dropping Elm.

A lot of our Elm developers didnt want to be Elm developers in the first place.

I joined the company to write Elm. A few others were really excited about Elm. But many didnt even know what Elm was when they were told their projects were to be written in Elm. Developers reacted in different ways. One quit, thinking that Elm was a big waste of time in his career. Lots of developers tried it out with at least some hating it, but most being ambivalent. I think “Its nice, but I am faster in React” was a common conclusion among those who were indifferent. The breakdown was roughly 35% Elm-lovers, 50% neutral, 15% Elm-haters.

Lesson Learned

These kinds of technical decisions need to be made “ground-up”. The odds that any random programmer is going to be excited about Elm after learning about it are low (which is the case for any technology) and programmers are more affected by these technical decisions than anyone else- even customers. So programmers are the stakeholder that is the most relevant to these decisions. If you want to become an “Elm company” you first need a lot of developers and teams who are interested in Elm. If you dont have that first step out of the way then you really just cant become an “Elm Company” without making a huge gamble that many people wont share your enthusiasm and thereafter become miserable at their job. Elm is not so amazingly good that you can just count on everyone loving it when they get exposed to it.

I was not allowed to help Elm newcomers

Since we had a lot of people who didnt know Elm very well, and I often felt like “the Elm guy”. I spent a lot of time reviewing PRs and coming over to people’s desks to help them out. At some point, management made a judgement that teams were not closely integrated enough. They felt that there was too much communication between frontend people on different teams, and not enough communication between frontend and backend people on the same team. Therefore, people like me were supposed to stop helping frontend people on different teams as I was.

The consequence of this, I think, was there there were some teams that had no Elm expertise, only mild Elm enthusiasm, and no in-house Elm support; and they were nonetheless supposed to be writing projects in Elm. Not very promising conditions.

Lesson Learned

Within companies, there develop natural communication networks. Some coworkers communicate with each other every day, others never communicate. My company reasoned “we need communication to follow the existing teams, therefore, we will mandate that that exact communication pattern”, but it really doesnt work like that. I think how people self-organize is a little bit more like an immutable law of the universe and less like a thing that can be dictated into being. In practice, people communicate with who they need to communicate with; issues with shyness or confrontation aside. Management is also not omniscient; they dont fully understand the communication patterns inside their company. Therefore, management should be a little bit “laissez-faire” about teams: observe who communicates with who, and then draw team-boundaries around those natural communication clusters.

Elm arguments got really really tiresome

The road of project development is bumpy, and Elm was a younger language back then with more open questions about how this or that problem should be solved. In our company, there were always at least a few people who really didnt like Elm, and whenever we hit a snag, there was always someone to say something like “In React this is just…”, spawning a new discussion about whether Elm was fundamentally good or bad. I love these discussions and arguments recreationally in my own time, but on the job its a real drag. Development stops when fundamental arguments about technology are opened up. It got worse and worse over time. Difficulties with upgrading to the then-upcoming 0.19 release added fuel on that fire. Our CTO “switched sides” and lost his love for Elm, and kind of became an agitator himself in these arguments. I remember feeling like “I wish I could have spent this time solving the problem, rather than defending Elm in an argument. I could have just solved the problem, regardless to if they are ultimately right that its easier in React”.

Lesson Learned

You really should keep your eye on the prize at work: getting projects done. Your company has to pick which technology to use, and you have some choice in what kinds of companies you want to work at, but outside of that, if you just wanted to get projects done, why would you be wondering which technology to pick?

I have adopted a few morals about how to get past tech disagreements. One is “code is worth a thousand words”. If you have a tech disagreement, one or both sides of the disagreement should go off for a day and write up the best demonstration of their opinion so everyone can see it shine. Another is “let people be wrong”; just letting an opinion play out naturally is often the most cost-efficient way of getting better opinions. Putting an opinion into practice creates the best evidence that that opinion is good and the quality of this evidence is often so good that it is worth the risk of having to refactor or re-do the code later. If you trust your coworkers, you should expect them to learn from good quality evidence in a positive direction.

Alexander Artemenko: quickfork

via Planet Lisp by on Fri, 16 Oct 2020 19:32:51 GMT

This is an interesting system which provides information about other systems sources. Also, it is able to show commands, necessary to clone libraries into the local-projects dir.

This system is not in Quicklisp yet, but it can be installed from Ultralisp or by clone into some directory like /quicklisp/local-projects~.

Also, to make it work, you have to clone quicklisp-projects repository somewhere. This repository contains metadata about all projects in the Quicklisp:

POFTHEDAY> (uiop:run-program
            "git clone https://github.com/quicklisp/quicklisp-projects /tmp/projects")
POFTHEDAY> (setf quickfork::*projects-directory* "/tmp/projects/projects")

An interesting thing happens right after you load quickfork system. It installs a few hooks into Quicklisp and ASDF and begins tracking the systems which are installed during the ql:quickload:

POFTHEDAY> (ql:quickload :dexador)
To load "dexador":
  Load 14 ASDF systems:
    alexandria asdf babel bordeaux-threads cffi cffi-grovel
    cl-ppcre cl-utilities flexi-streams local-time
    split-sequence trivial-features trivial-gray-streams
    uiop
  Install 17 Quicklisp releases:
    chipz chunga cl+ssl cl-base64 cl-cookie cl-reexport
    dexador fast-http fast-io proc-parse quri smart-buffer
    static-vectors trivial-garbage trivial-mimes usocket
    xsubseq
; Fetching #<URL "http://beta.quicklisp.org/archive/usocket/2019-12-27/usocket-0.8.3.tgz">
; 83.84KB
...

; Loading "dexador"
...
[package cl+ssl]..................................
[package dexador].

Systems compiled by QL: 
 ("proc-parse"
  #P"/Users/art/poftheday/.qlot/dists/quicklisp/software/proc-parse-20190813-git/")
 ("xsubseq"
  #P"/Users/art/poftheday/.qlot/dists/quicklisp/software/xsubseq-20170830-git/")
  ...
 ("dexador"
  #P"/Users/art/poftheday/.qlot/dists/quicklisp/software/dexador-20200427-git/")
Systems loaded by QL: 
 ("proc-parse"
  #P"/Users/art/poftheday/.qlot/dists/quicklisp/software/proc-parse-20190813-git/")
 ("xsubseq"
  #P"/Users/art/poftheday/.qlot/dists/quicklisp/software/xsubseq-20170830-git/")
 ...
 ("dexador"
  #P"/Users/art/poftheday/.qlot/dists/quicklisp/software/dexador-20200427-git/")
Systems installed by QL: 
 "usocket"
 "trivial-mimes"
 ...
 "chipz"
 "dexador"
Inspect ql:*compiled-systems*, ql:*loaded-systems*, and ql:*installed-systems* for more info.
(:DEXADOR)

Also, there is a function quickfork::make-clone-commands which prints which commands should be executed in command-line to clone given system and all its dependencies.

Sadly, quickfork::make-clone-commands fails on dexador with some strange errors. You will need my fix, to make it work like this:

CL-USER> (quickfork::make-clone-commands :dexador)

git clone  "https://github.com/sharplispers/split-sequence.git"
git clone  "https://github.com/sionescu/static-vectors.git"
git clone  "https://github.com/sionescu/bordeaux-threads.git"
git clone  "https://github.com/fukamachi/dexador.git"
git clone  "https://github.com/fukamachi/fast-http.git"
git clone  "https://gitlab.common-lisp.net/alexandria/alexandria.git"
git clone  "https://github.com/fukamachi/proc-parse.git"
git clone  "https://github.com/cl-babel/babel.git"
git clone  "https://github.com/trivial-features/trivial-features.git"
git clone  "https://github.com/fukamachi/xsubseq.git"
git clone  "https://github.com/fukamachi/smart-buffer.git"
git clone  "https://github.com/trivial-gray-streams/trivial-gray-streams.git"
git clone  "https://github.com/fukamachi/quri.git"
git clone  "https://github.com/rpav/fast-io.git"
git clone  "https://github.com/fukamachi/cl-cookie.git"
git clone  "https://github.com/dlowe-net/local-time.git"
git clone  "https://github.com/Shinmera/trivial-mimes.git"
git clone  "https://github.com/sharplispers/chipz.git"
git clone  "https://github.com/takagi/cl-reexport.git"
git clone  "https://github.com/cl-plus-ssl/cl-plus-ssl.git"
git clone  "https://github.com/lmj/global-vars.git"
git clone  "https://github.com/trivial-garbage/trivial-garbage.git"

Non-git dependencies:
("cl-utilities" :HTTPS
 "https://common-lisp.net/project/cl-utilities/cl-utilities-latest.tar.gz")
NIL
("flexi-streams" :EDIWARE-HTTP "flexi-streams")
("uiop" :HTTPS "https://common-lisp.net/project/asdf/archives/uiop.tar.gz")
("cffi" :HTTPS
 "https://common-lisp.net/project/cffi/releases/cffi_latest.tar.gz")
("chunga" :EDIWARE-HTTP "chunga")
("cl-ppcre" :EDIWARE-HTTP "cl-ppcre")
("cl-base64" :KMR-GIT "cl-base64")
("usocket" :HTTPS
 "https://common-lisp.net/project/usocket/releases/usocket-latest.tar.gz")

Suddenly, I've remembered another similar project: ql-checkout.

Probably, yesterday we'll see how it works!

Can we create Mobile apps in elm?

via Elm - Latest posts by @bogdan-k Bogdan Kiselitsa on Fri, 16 Oct 2020 23:19:05 GMT

If you really want to use Elm, you might be able to combine it with NativeScript to make a mobile app - though I don’t know how easy or advantageous it might be :man_shrugging:

Quicklisp news: October 2020 Quicklisp dist update now available

via Planet Lisp by on Fri, 16 Oct 2020 13:57:00 GMT

 New projects

Updated projects: adopt, agnostic-lizard, algae, april, base-blobs, bdef, beast, binary-io, bobbin, bodge-blobs-support, bodge-chipmunk, bodge-glad, bodge-glfw, bodge-nuklear, bodge-ode, bodge-openal, bodge-sndfile, chancery, chanl, check-bnf, chipmunk-blob, chirp, ci-utils, cl-async-await, cl-base64, cl-buchberger, cl-capstone, cl-cffi-gtk, cl-collider, cl-covid19, cl-csv, cl-digraph, cl-flow, cl-forms, cl-gamepad, cl-grip, cl-ipfs-api2, cl-kaputt, cl-liballegro-nuklear, cl-markless, cl-marshal, cl-messagepack, cl-mixed, cl-muth, cl-naive-store, cl-netpbm, cl-patterns, cl-pcg, cl-portaudio, cl-pslib, cl-readline, cl-rss, cl-sdl2, cl-semver, cl-setlocale, cl-ssh-keys, cl-webkit, class-options, claw, clj, closer-mop, clsql, clsql-local-time, clunit2, com-on, common-lisp-jupyter, croatoan, crypto-shortcuts, dartscltools, data-lens, djula, eclector, femlisp, flexichain, font-discovery, gadgets, gendl, glad-blob, glfw-blob, glkit, golden-utils, gtirb, harmony, hu.dwim.def, hu.dwim.presentation, hu.dwim.quasi-quote, hu.dwim.rdbms, hu.dwim.web-server, hyperluminal-mem, hyperobject, jingoh, kmrcl, lack, literate-lisp, markup, mcclim, messagebox, meta-sexp, mgl-pax, millet, mito-attachment, mmap, mutility, nanovg-blob, nuklear-blob, ode-blob, openal-blob, origin, overlord, paren6, petalisp, pngload, postmodern, puri, py4cl2, reversi, ryeboy, sc-extensions, sel, serapeum, shasht, simple-flow-dispatcher, sly, sndfile-blob, stmx, stumpwm, ten, trivial-do, ucons.

Removed projects: cl-piglow, cl-proj, clutz, roan, scalpl.

To get this update, use (ql:update-dist "quicklisp").

Enjoy!

Custom Scroll Bar Logic

via Elm - Latest posts by @antew Antew on Fri, 16 Oct 2020 15:59:13 GMT

One current package that has the same aim, I think, is https://package.elm-lang.org/packages/FabienHenon/elm-infinite-list-view/latest/

Custom Scroll Bar Logic

via Elm - Latest posts by @hans-helmut Hans-Helmut on Fri, 16 Oct 2020 15:46:30 GMT

Thinking about it, do I even need the big divs before and after the viewport?

The intention of the big divs is to have a proper sized div around, with a proper sized scrollbar. Of course you can also use a calculated height.

Skinney/murmur3 on elm 0.18.0

via Elm - Latest posts by @csuvikv Viktor Csuvik on Fri, 16 Oct 2020 11:18:21 GMT

Yep, cloning the source code at the commit you suggested into the elm-stuff folder indeed works. Thank you guys for your help, much appreciated!

Skinney/murmur3 on elm 0.18.0

via Elm - Latest posts by @pdamoc Peter Damoc on Fri, 16 Oct 2020 10:41:37 GMT

Have you tried downloading the module file into your src folder? From a cursory look at the module it doesn’t seam to depend on any 0.19 specific code and I would not be surprised if it work just fine with 0.18

Alternatively, you could download the source code at this commit and use Evan’s instructions to install it into your 0.18 elm-stuff location.

Custom Scroll Bar Logic

via Elm - Latest posts by @rupert Rupert Smith on Fri, 16 Oct 2020 08:50:24 GMT

Thanks for that tip. I was searching for “custom scrolling” which only turns up hits for how to customize the look of scroll bars with CSS or other techniques - was thinking it is hard to search for what I am after as a result. :+1:

Custom Scroll Bar Logic

via Elm - Latest posts by @Philipp_Krueger Philipp Krüger on Fri, 16 Oct 2020 07:42:46 GMT

You might want to look up the term “virtual scrolling”. It might give you some more resources on how others are doing this.

Multiple dropdown synchronisation

via Elm - Latest posts by @RickBradford Rick Bradford on Fri, 16 Oct 2020 07:24:36 GMT

OK, I think I get that, thanks.

Multiple dropdown synchronisation

via Elm - Latest posts by @lydell Simon Lydell on Fri, 16 Oct 2020 07:22:48 GMT

Sorry, I have no code to share. But when you change the main category you’re free to update your model any way you want that makes sense – like changing the sub category to something. Since your view is just a projection of your model it will automatically show the right thing.

Multiple dropdown synchronisation

via Elm - Latest posts by @RickBradford Rick Bradford on Fri, 16 Oct 2020 06:49:11 GMT

How does that look when you change the ‘main’ category?

Does the sub-category ‘select’ item automatically show the selected item? And how do you tie the view to the selected item?

Is there some code you could share?

Multiple dropdown synchronisation

via Elm - Latest posts by @lydell Simon Lydell on Fri, 16 Oct 2020 06:42:46 GMT

I might be misunderstanding here, but what I’ve done in multiple <select> situations is to use Html.Attributes.selected bool on every <option> so I can control from the model exactly what is selected. This way you always know what is selected (if anything), and you can change it easily without reading the index from the DOM node or anything.

 newer latest older