CLICK ME
yes, even hidden code blocks!
print("hello world!")
A problem that I've seen beginners run into in Haskell or PureScript a couple of times now is how to generate a List of random numbers. It's a common requirement for little games (which make for great first projects) to generate these, and it definitely seems to be a stumbling block.
Randomness is considered a side effect in purely functional languages, which means that to generate them you usually need access to Eff/IO, which in turn means we need to deal with Monads. And while generating a single random number is usually pretty easy with do-notation, the typical intuition beginners have built when going from single values to a collection is to use map
, but that fails.
How do you send information between clients and servers? What format should that information be in? What happens when the server changes the format, but the client has not been updated yet? What happens when the server changes the format, but the database cannot be updated?
These are difficult questions. It is not just about picking a format, but rather picking a format that can evolve as your application evolves.
By now there are many approaches to communicating between client and server. These approaches tend to be known within specific companies and language communities, but the techniques do not cross borders. I will outline JSON, ProtoBuf, and GraphQL here so we can learn from them all.
I have been doing a lot of work on making Elm assets really tiny. As part of some exploratory research I did ages ago, I read this document on font loading. It is a super helpful resource, but I was confused by all the different terms: FOIT, FOUT, FOFT, etc. It reminded me of the old "how do you center things?" blog posts from before flexbox. So my instinct was that probably lots of folks are confused about how to do it well, and maybe there is a better way!
So brainstormed some some ideas to:
{ stdenv, lib, bash, callPackage, writeText, makeWrapper, writeScript, dotnet-sdk, | |
patchelf, libunwind, coreclr, libuuid, curl, zlib, icu }: | |
let | |
config = "Staging"; | |
project = "RazorCx.Api"; | |
target = "linux-x64"; | |
rpath = stdenv.lib.makeLibraryPath [ libunwind coreclr libuuid stdenv.cc.cc curl zlib icu ]; |
module Alarm exposing (main) | |
import Browser | |
import Html exposing (Html, button, div, h2, text) | |
import Html.Events exposing (onClick) | |
{-| This is an attempt at building up a dependency between pieces of state | |
that can be separate and then allowing us to compose them naturally. |
So there were a few threads going around recently about a challenge to write the longest sequence of keywords in Javascript:
There are, however, a few problems: