- purity is a syntactical property of programs, more precisely defined as referential transparency: replacing an expression for its bound value doesn't change meaning (precise definition)
- side effects are things that break referential transparency (precise definition)
- There's no direct connection between the concepts of IO, State and so on, and side effects. Traditionally, these things are side effectful (break referential transparency), but you can have abstractions that are pure (don't break ref.trans.)
- Due to the above, the term purely functional programming is not an oxymoron, it makes perfect sense.
- In haskell style pure FP, type constructors and algebras are used to represent "things that would otherwise traditionally be side effects (break ref.trans.)". We call these F[_]s effects or computational contexts for brevity. You can see for yourself how this cannot be a precise definition (especially because they could also have kind higher than * -> *, even though most famous a
Discover gists
DECLARE @local_target_path varchar(50) = 'c:\must\be\local\path' | |
, @adodb_file_stream int | |
, @create_instance_error int | |
, @error int | |
, @i bigint | |
, @data varbinary(max) | |
, @error_count int | |
, @error_description varchar(255) | |
, @error_source varchar(255) | |
, @file_path varchar(max) |
In Pull[F, O, R]
, R
is the return type. Pull
represents a computation that emits some values on the Stream (of type O) and returns a new thing (R). In order to convert a Pull to a Stream, R must be Unit. This is because an FS2 Stream does not have the ability to terminate with a return value.
See here for the conversation
Stream[F, O]
is monadic over O which are the output values emittedPull[F, O, R]
is monadic over R which is used for stateful transformations
<?php | |
$css_form = ' | |
#adianti_right_panel.right-panel{ | |
z-index : 2500 !important; | |
} | |
}'; | |
parent::register_css('css_form', $css_form); |
So the hacker news post said my comment was too long. Warning, long, opinionated post:
Scala dev for 10+ years here. Spark is weird. Databricks has a style guide that deliberately chooses not to use scala features that the rest of the community uses, and doesn't follow the same best practices around library and scala major version usage that the rest of the community uses [1]. It's no surprise that the project has trouble interoperating with libraries outside of the spark ecosystem, and is therefore a maintenance problem.
Spark's style and compatibility problems
Scala isn't a maintenance nightmare, but it does attract a lot of newcomers who dive in, don't stick within one of its many ecosystems, get confused, and generally leave a mess, and that is a direct result of the fact that scala is a multi-paradigm, relatively expressive language to the one(s) it is competing with and pulling developers from, and that those developers, for the large part, don't really want to change and think that Scala is just a
# (I recommend understanding the basics of this first: http://sequel.jeremyevans.net/rdoc/files/doc/object_model_rdoc.html) | |
# Extending the underlying dataset (http://sequel.jeremyevans.net/rdoc/files/README_rdoc.html#label-Extending+the+underlying+dataset) | |
# The recommended way to implement table-wide logic by defining methods on the dataset using dataset_module: | |
class Post < Sequel::Model | |
dataset_module do | |
def posts_with_few_comments | |
where{num_comments < 30} |
<?php | |
## 1 EXEMPLO ################################ | |
$css_form = ' | |
div > div.panel > .panel-body{ | |
height : 45vh !important; | |
} | |
}'; |
<?php | |
## EXEMPLO - CONSUMINDO A API NO POSTMAN | |
# https://dominio/nome_projeto/rest.php?class=ClienteRest&method=buscacpf&cpf=19178751004 | |
# Headers | |
# Authorization : Basic a1cd57beca01cfbf496928ceff61281558c6726b456d71f7523c55830139 | |
## EXEMPLO - CONSUMINDO A API EM PHP | |
$url = 'https://dominio/nome_projeto/rest.php'; |