Skip to content

Instantly share code, notes, and snippets.

View alfonsogarciacaro's full-sized avatar

Alfonso Garcia-Caro alfonsogarciacaro

View GitHub Profile
@alfonsogarciacaro
alfonsogarciacaro / deopt.txt
Created March 2, 2017 22:23
node --trace-deopt out/testapp/project > deopt.txt
[deoptimizing (DEOPT eager): begin 0000020D2B33EEE1 <JS Function ILInstr (SharedFunctionInfo 00000215DE3CEF71)> (opt #35) @3, FP to SP delta: 24, caller sp: 0x7d0c90bdc0]
;;; deoptimize at 76866: not a Smi
reading input frame ILInstr => node=41, args=6, height=2; inputs:
0: 0x20d2b33eee1 ; [fp - 16] 0000020D2B33EEE1 <JS Function ILInstr (SharedFunctionInfo 00000215DE3CEF71)>
1: 0x20d2b3c1b99 ; rax 0000020D2B3C1B99 <an ILInstr with map 00000218BAB68E31>
2: 0x2200000000 ; [fp + 48] 34
3: 0x20d2b3c18d1 ; [fp + 40] 0000020D2B3C18D1 <an ILBasicType with map 00000218BAB691F9>
4: 0x20d2b3c19f9 ; [fp + 32] 0000020D2B3C19F9 <an ILConst with map 00000218BAB69359>
5: 0x37dac704311 ; [fp + 24] 0000037DAC704311 <undefined>
6: 0x37dac704311 ; [fp + 16] 0000037DAC704311 <undefined>
@alfonsogarciacaro
alfonsogarciacaro / stacktrace.txt
Created March 23, 2017 17:26
Microsoft/visualfsharp #2682 Stack Trace
This file has been truncated, but you can view the full file.
[Managed to Native Transition]
mscorlib.dll!System.Globalization.CompareInfo.LastIndexOf(string source, string value, int startIndex, int count, System.Globalization.CompareOptions options) Unknown
mscorlib.dll!string.LastIndexOf(string value, int startIndex, int count, System.StringComparison comparisonType) Unknown
mscorlib.dll!System.RuntimeType.SplitName(string fullname, out string name, out string ns) Unknown
mscorlib.dll!System.RuntimeType.GetNestedType(string fullname, System.Reflection.BindingFlags bindingAttr) Unknown
FSharp.Core.dll!Microsoft.FSharp.Reflection.Impl.getUnionCaseTyp(System.Type typ, int tag, System.Reflection.BindingFlags bindingFlags) Unknown
FSharp.Core.dll!Microsoft.FSharp.Reflection.Impl.fieldsPropsOfUnionCase(System.Type typ, int tag, System.Reflection.BindingFlags bindingFlags) Unknown
FSharp.Core.dll!Microsoft.FSharp.Text.StructuredPrintfImpl.ReflectUtils.Value.GetValueInfoOfObject(System.Reflection.BindingFlags bindingFlags, object obj) Unknown
FSharp.Core.d
@alfonsogarciacaro
alfonsogarciacaro / stacktrace2.txt
Created March 25, 2017 14:13
Microsoft/visualfsharp #2682 Stack Trace 2
> Fable.Compiler.dll!Fable.FSharp2Fable.Patterns.|ForOf|_|(Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr _arg1) Line 370 F#
Fable.Compiler.dll!Fable.FSharp2Fable.Compiler.transformExpr(Fable.FSharp2Fable.IFableCompiler com, Fable.FSharp2Fable.Context ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr fsExpr) Line 82 F#
Fable.Compiler.dll!Fable.FSharp2Fable.Compiler.transformExpr(Fable.FSharp2Fable.IFableCompiler com, Fable.FSharp2Fable.Context ctx, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr fsExpr) Line 82 F#
FSharp.Core.dll!Microsoft.FSharp.Primitives.Basics.List.mapToFreshConsTail<Fable.AST.Fable.Expr, Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr>(Microsoft.FSharp.Collections.FSharpList<Fable.AST.Fable.Expr> cons, Microsoft.FSharp.Core.FSharpFunc<Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr, Fable.AST.Fable.Expr> f, Microsoft.FSharp.Collections.FSharpList<Microsoft.FSharp.Compiler.SourceCodeServices.FSharpExpr> x) Unknown
FSharp.Core.dll!Microso
@alfonsogarciacaro
alfonsogarciacaro / ozmo.fs
Created December 8, 2017 08:59
Phillip Trelford's Ozmo Game for Fable REPL
module Program
module Keyboard =
open Fable.Import
let mutable keysPressed = Set.empty
let code x = if keysPressed.Contains(x) then 1 else 0
let arrows () = (code 39 - code 37, code 38 - code 40)
let update (e : Browser.KeyboardEvent, pressed) =
let keyCode = int e.keyCode
@alfonsogarciacaro
alfonsogarciacaro / Deploy.md
Last active March 3, 2023 09:50
Deploying an F# ASP.NET Core app (Giraffe) to Azure

Deploying an F# ASP.NET Core app to Azure

Last week I spent a lot of time trying to deploy an F# ASP.NET Core app (a Giraffe app, specifically) to Azure because the information to complete all the steps was scattered in several places. So I'm writing this hopefully it will save the pain to others :)

Preparation

The following steps are mostly taken from this guide and it's only necessary to do them once:

  1. Create an account in Azure (or use an existing one)
  2. Create a resource group (or use an existing one)
@alfonsogarciacaro
alfonsogarciacaro / README.md
Last active June 19, 2018 14:17
Fable talk proposals

Option 1: Fable got a new major release and you won't believe what happened next

This talk will be about the release of Fable 2: what benefits if brings to Fable projects, the performance improvements and how it can be used to better interact with JS tooling and libraries. I will also talk about the proccess of rewriting the code for this new major version, how it is to work with so many wonderful contributors and the lessons learned that hopefully can be applied to other projects as well.

Option 2: Ten celebs you didn't know that used Fable

I cannot reveal the names right now, but there're many Hollywood celebrities that use Fable when not filming. This talk will be about different ways of using Fable. Celebrities use Fable not only for creating dynamic webs, but also for generating static sites, visualizing data, writing native mobile and desktop apps, creting funny games or amazing presentations.

Option 3: Your neighbour is making millions from home with this Fable tricks

@alfonsogarciacaro
alfonsogarciacaro / index.html
Last active October 3, 2018 06:15
Fable REPL gist test
<!doctype html>
<html>
<head>
<title>Fable + Recharts</title>
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>
<meta name="viewport" content="width=device-width, initial-scale=1">
<script crossorigin src="https://unpkg.com/react@16/umd/react.production.min.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@16/umd/react-dom.production.min.js"></script>
<script crossorigin src="https://unpkg.com/prop-types@15.6/prop-types.min.js"></script>
<script crossorigin src="https://unpkg.com/recharts@1.3.1/umd/Recharts.min.js"></script>
@alfonsogarciacaro
alfonsogarciacaro / fable-repl.css
Last active December 16, 2018 22:47
Created with Fable REPL
.card.is-avatar {
max-width: 350px;
margin: auto;
}
.card.is-avatar .card-image {
display: flex;
justify-content: center;
align-items: center;
padding: 25px 0 0;
}
@alfonsogarciacaro
alfonsogarciacaro / fable-repl.css
Created December 17, 2018 11:02
Created with Fable REPL
#app div {
margin: 0;
padding: 20px;
background-color: lightyellow;
}
@alfonsogarciacaro
alfonsogarciacaro / fable-repl.css
Created December 17, 2018 11:02
Created with Fable REPL
#app div {
margin: 0;
padding: 20px;
background-color: lightyellow;
}