A summary of the Elm architectures/compilation/installation/usage matrix state of affairs.
The question of code-splitting in Elm comes up fairly routinely.
The apparent low-hanging-fruit of code-splitting with Elm's pure/immutable philosophy has led me to explore this a few times with my compiler work on Lamdera.
Here are some of the challenges I've found:
It's a little trickier than it looks because Elm's DCE is actually not DCE (dead code elimination) at all, it's LCI (live code inclusion).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module RandomOrg exposing (..) | |
import Http | |
import Json.Decode as D | |
import Prng.Uuid as Uuid | |
import Process | |
import Random.Pcg.Extended as Random | |
import Task exposing (Task) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
somecommand: #App# Description of some command | |
somebashcommand | |
someothercommand: #Development# Description of some other command | |
someotherbashcommand | |
help: | |
@./scripts/makefile-help.sh ./Makefile | |
.DEFAULT_GOAL := help |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ ping slack.com | |
PING slack.com (52.222.233.130): 56 data bytes | |
Request timeout for icmp_seq 0 | |
Request timeout for icmp_seq 1 | |
Request timeout for icmp_seq 2 | |
^C | |
--- slack.com ping statistics --- | |
4 packets transmitted, 0 packets received, 100.0% packet loss | |
# mario ~ 10:07:23 |
The original specification for the 'Toy Robot' challenge.
- The application is a simulation of a toy robot moving on a square tabletop, of dimensions 5 units x 5 units.
- There are no other obstructions on the table surface.
- The robot is free to roam around the surface of the table, but must be prevented from falling to destruction. Any movement that would result in the robot falling from the table must be prevented, however further valid movement commands must still be allowed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ pulp init | |
* Generating project skeleton in /Users/mario/Dropbox/dev/test/sentiment | |
bower purescript-console#^0.1.0 cached git://github.com/purescript/purescript-console.git#0.1.1 | |
bower purescript-console#^0.1.0 validate 0.1.1 against git://github.com/purescript/purescript-console.git#^0.1.0 | |
bower purescript-eff#^0.1.0 cached git://github.com/purescript/purescript-eff.git#0.1.2 | |
bower purescript-eff#^0.1.0 validate 0.1.2 against git://github.com/purescript/purescript-eff.git#^0.1.0 | |
bower purescript-prelude#^0.1.0 cached git://github.com/purescript/purescript-prelude.git#0.1.3 | |
bower purescript-prelude#^0.1.0 validate 0.1.3 against git://github.com/purescript/purescript-prelude.git#^0.1.0 | |
bower purescript-console#^0.1.0 install purescript-console#0.1.1 | |
bower purescript-eff#^0.1.0 install purescript-eff#0.1.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Box = Box { _value :: Integer } | |
data World = World { _box :: Maybe Box } | |
makeLenses ''Box | |
makeLenses ''World | |
steps :: StateT World IO () | |
steps = do | |
box.value %= succ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Install with: | |
# curl http://git.io/vEN3k > .git/hooks/pre-commit | |
# Fail if any command is non-zero | |
set -e | |
# Redirect output to stderr. | |
exec 1>&2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ּ_בּ | |
בּ_בּ | |
טּ_טּ | |
כּ‗כּ | |
לּ_לּ | |
מּ_מּ | |
סּ_סּ | |
תּ_תּ | |
٩(×̯×)۶ | |
٩(̾●̮̮̃̾•̃̾)۶ |
NewerOlder