こんにちは、knewjadeです。 今回、HATETIRSで289 linesまで到達することができました。動画はこちら(2022-11-26時点のWorld Recordでした。現在では更新されています。 → David&Felipeの記事)
ここでは、その結果を得るためのアプローチを説明していきたいと思います。
「そもそもHATETRISとは?」という方は、こちらをご参照ください。
こんにちは、knewjadeです。 今回、HATETIRSで289 linesまで到達することができました。動画はこちら(2022-11-26時点のWorld Recordでした。現在では更新されています。 → David&Felipeの記事)
ここでは、その結果を得るためのアプローチを説明していきたいと思います。
「そもそもHATETRISとは?」という方は、こちらをご参照ください。
{-# LANGUAGE TypeSynonymInstances #-} | |
data Dual d = D Float d deriving Show | |
type Float' = Float | |
diff :: (Dual Float' -> Dual Float') -> Float -> Float' | |
diff f x = y' | |
where D y y' = f (D x 1) | |
class VectorSpace v where | |
zero :: v |
The SalesForce CodeGen models are a family of large language models trained on a large amount of natural language data and then fine-tuned on specialized datasets of code. Models of size 350M, 2B, 6B, and 16B parameters are provided in three flavors:
I did a bunch of work months ago on the polynomial and rational function namespaces; now they can both participate in all of the generic functions, including derivatives and all arithmetic.
I realized today that I could use an ACTUAL polynomial instance in that wacky "find-path" example from pages 22-23 of SICM. Everything is way faster and makes more sense, since find-path returns an actual polynomial.
This function generates a polynomial by passing the (identity) polynomial into the Lagrange interpolation code:
Swift’s type system supports a number of different ways of taking a function or type and abstracting it. Usually, this is done by adding a generic parameter and an associated set of constraints. Similarly, a function that takes a particular type of argument can be abstracted to any number of those arguments by making it variadic with triple-dot (...) syntax. Today, both of these features are permitted separately: you can define a generic function that takes a variable number of arguments, such as
func debugPrint<T>(_ items: T...)
where T: CustomDebugStringConvertible
{
for (item: T) in items {
stdout.write(item.debugDescription)
#https://twitter.com/officialmcafee/status/1397568860082122752 | |
#https://twitter.com/ahakcil/status/1397888724936105987 | |
import random | |
import copy | |
RST = '\033[0m' | |
def rand_data(size): | |
d = [] |
The idea behind program analysis is simple, right? You just want to know stuff about your program before it runs, usually because you don't want unexpected problems to arise (those are better in movies.) Then why looking at Wikipedia gives you headaches? Just so many approaches, tools, languages 🤯
In this article I would like to give a glimpse of an overarching approach to program analysis, based on ideas from abstract interpretation. My goal is not to pinpoint a specific technique, but rather show how they have common core concepts, the differences being due mostly to algorithmic challenges. In other words, static analysis have a shared goal, but it's a challenge to make them precise and performant.
Code is meant to be executed by a computer. Take the following very simple function:
fun cantulupe(x) = {
// Code for lecture [7. Parsing Combinators] | |
// https://www.youtube.com/watch?v=3Cfq4i6754s&list=PLOech0kWpH8-njQpmSNGSiQBPUvl8v3IM&index=7 | |
import java.util.ArrayDeque; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Deque; | |
import java.util.HashMap; | |
import java.util.Scanner; | |
import java.util.function.Supplier; |
If you, like me, resent every dollar spent on commercial PDF tools,
you might want to know how to change the text content of a PDF without
having to pay for Adobe Acrobat or another PDF tool. I didn't see an
obvious open-source tool that lets you dig into PDF internals, but I
did discover a few useful facts about how PDFs are structured that
I think may prove useful to others (or myself) in the future. They
are recorded here. They are surely not universally applicable --
the PDF standard is truly Byzantine -- but they worked for my case.