Skip to content

Instantly share code, notes, and snippets.

@chexxor
chexxor / experience-report-installing-oracle-jdeveloper.txt
Last active August 28, 2020 21:41
Experience Report - Installing Oracle JDeveloper
Thought you might enjoy reading about the experiences one has on the journey of installing
Oracle JDeveloper, which is on a whole 'nother level of application installation.
----
After reading 4 different documentation sites on Oracle's website and trying three
different ways to download the JDeveloper installer, I found what seems like the right path.
The docs for the first JDeveloper installer I found said "Note: if you want to use this
installer to solve Alex's problems, it will not work. Go to this other doc-site and
install the JDeveloperQuickInstallerForAlex". Those docs had me download an
Oracle-custom downloader for this one Oracle thing.
@chexxor
chexxor / purescript-lazy-load-modules-idea.md
Last active May 3, 2022 14:39
PureScript Lazy-load Modules Idea

Lazy/Dynamic Loadable Modules in PureScript

Motivation

https://discourse.purescript.org/t/lazy-loading-routes-in-tea-style-app/141/2

Ideas

  • Here, we aren't first-class modules, because we are still using the normal module definition and import system. We believe that first-class modules refer to a special feature in OCaml.
  • Can not refer to type classes across a lazy-load boundary. Type-class instances and classes are not first-class values.
@chexxor
chexxor / meetup.hs
Created April 18, 2019 14:16
Haskell Exercism at Haskell Meetup
module Meetup (Weekday(..), Schedule(..), meetupDay) where
import Data.Time.Calendar --(Day, dayOfWeek, fromGregorian, gregorianMonthLength)
--import qualified Data.Time.Calendar as Cal
import Data.List
data Weekday = Monday
| Tuesday
| Wednesday
@chexxor
chexxor / Feature_Architecture.md
Last active July 11, 2018 23:55
WIP: Thoughts on concerns and design of a software system's features (subsystem).

Following is how I would like to define feature development. I hope that by exploring the nature of feature development and its concerns, we can better choose productive constraints to impose on it and better design features such that they can be easily evolved and minimize disruptions to other features.

Feature Architecture

The following are attributes I would like features to have:

A feature in a data management system should be a simple workflow which provides value to a client. A feature's interface should never break active clients, if it has them. A feature can be deployed alongside other features in the same executable, but should be able to be trivially moved out and into a separate executable.

module Main where
import Prelude
import Control.Monad.Eff.Console (log, logShow)
import TryPureScript (render, withConsole)
import Control.Lazy (fix)
-- From https://github.com/awkure/purescript-birds/blob/v1.0.4/src/Aviary/Birds.purs#L38-L38
fixB :: forall a. (a -> a) -> a
@chexxor
chexxor / TEA_Wrong_For_Web.md
Last active March 21, 2024 19:55
The Elm Architecture is the wrong abstraction for the web

The Elm Architecture is the wrong abstraction for the web

In this article, I'd like to explain why I think The Elm Architecture is fine for small components, but quite harmful for websites based on pages.

Definition and Pros/Cons

First, let's clarify what I mean by "The Elm Architecture".

The Elm Architecture's webpage describes it pretty well.

@chexxor
chexxor / Main.purs
Created April 25, 2018 21:34
HomoHKTRow.purs
module Main where
import Prelude
import Control.Monad.Eff.Console (log)
import TryPureScript (render, withConsole)
import Type.Row
class HomoHKTRow (rs :: RowList) (f :: Type -> Type)
@chexxor
chexxor / WithPipeline.purs
Created April 20, 2018 18:19
WithPipeline
newtype WithPipeline a = WithPipeline (NEL.NonEmptyList (a -> a)) a
-- or --
newtype WithPipeline a = WithPipeline (a -> a)) a
instance profunctorWithPipeline :: Profunctor (WithPipeline a) where
dimap :: forall a b c d. (a -> b) -> (c -> d) -> p b c -> p a d
dimap a2b c2d (WithPipeline f a) = WithPipeline (a2b >>> f >>> c2d) a
instance contraWithPipeline :: Contravariant (WithPipeline a) where
cmap :: forall a b. (b -> a) -> f a -> f b
@chexxor
chexxor / Main.purs
Last active September 14, 2017 22:33
SQL query row types
module Main where
import Prelude
import Control.Monad.Eff (Eff)
import Control.Monad.Eff.Console (logShow, CONSOLE)
import Data.Foldable (class Foldable, foldl, intercalate)
import Data.Maybe (Maybe(..), maybe)
import Data.Monoid (class Monoid, mempty)
import Data.StrMap (StrMap, lookup)
@chexxor
chexxor / Dockerfile
Created February 1, 2017 17:07
cloudsql-proxy Dockerfile
FROM ubuntu
RUN apt-get update && apt-get -y install wget \
&& wget https://dl.google.com/cloudsql/cloud_sql_proxy.linux.amd64 \
&& mv cloud_sql_proxy.linux.amd64 cloud_sql_proxy \
&& chmod +x cloud_sql_proxy \
&& mkdir /cloudsql;
# Expects cred-file.json to be in working directory.
# This isn't good, but I haven't had time to improve yet.