Skip to content

Instantly share code, notes, and snippets.

View auxym's full-sized avatar

Francis Thérien auxym

  • Sherbrooke, Qc, Canada
View GitHub Profile
@auxym
auxym / HCNR200.cir
Created February 24, 2023 01:14
Broadcom HCNR200 SPICE model
*----------------------------------------------------------------------------
* CNR200 Linear Optocoupler SPICE Model
* LED Cathode
* | LED Anode
* | | PD1 Cathode
* | | | PD1 Anode
* | | | | PD2 Anode
* | | | | | PD2 Cathode
* | | | | | |
.SUBCKT CNR200 1 2 3 4 5 6
/home/francis/.choosenim/toolchains/nim-1.6.6/lib/nimbase.h:588:64: note: in definition of macro 'nimAddInt'
  588 |     #define nimAddInt(a, b, res) __builtin_sadd_overflow(a, b, res)
      |                                                                ^~~
nimcache/stdlib_system.nim.c:763:57: warning: passing argument 3 of '__builtin_smul_overflow' from incompatible pointer type [-Wincompatible-pointer-types]
  763 |                         if (nimMulInt(elemSize, newCap, &TM__Q5wkpxktOdTGvlSRo9bzt9aw_17)) { raiseOverflow(); goto BeforeRet_;
      |                                                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                                                         |
      |                                                         NI * {aka long int *}
/home/francis/.choosenim/toolchains/nim-1.6.6/lib/nimbase.h:590:64: note: in definition of macro 'nimMulInt'
@auxym
auxym / scractch.nim.md
Created December 8, 2018 14:04
Nim compiler warnings on date parsing
import seqUtils
import times

proc parseMyDates(line: string): DateTime =
    let rtime: DateTime = parse(line, "yyyy-MM-dd")
    return rtime

var dateStrings = @["2018-12-01", "2018-12-02", "2018-12-03"]
var parsed: seq[DateTime] = dateStrings.map(parseMyDates)
Paket version 5.148.0
found: D:\Projets\cumulus\net-tf-calcservice\paket.dependencies
Parsing D:\Projets\cumulus\net-tf-calcservice\paket.dependencies
Resolving packages for group Main:
Resolving packages for group WK-Component:
0 packages in resolution.
1 requirements left
- delphi-tf-latest-convert, (from D:\Projets\cumulus\net-tf-calcservice\paket.dependencies)
Trying to resolve delphi-tf-latest-convert (from D:\Projets\cumulus\net-tf-calcservice\paket.dependencies)