Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
From IRC (bridge bot)
@FromIRC
<PMunch> The Nim playground now properly converts ANSI colour codes: https://play.nim-lang.org/#ix=1RDk (yay!)
<PMunch> But more importantly this solves the issue where parts of Nim output was seen as HTML and rendered incorrectly
<PMunch> Now the output should be rendered just like it is in the terminal, but with full colour/bold/italics support
<clyybber> awesome!
Game devs especially
zetashift
@zetashift
@mratsim would be careful with HCR advertising, it's there but largely untested, no?
Mamy Ratsimbazafy
@mratsim
@zacharycarter decided to be our guinea pig :p
zetashift
@zetashift
for the greater good!
also unrelated but julia can be compiled iirc
Mamy Ratsimbazafy
@mratsim
you cannot build dlls/static binary with Julia
it’s something they are still working on
Aditya Siram
@deech
Araq, PMunch: I have a fairly high coverage binding to FLTK (https://fltk.org) in Haskell (https://github.com/deech/fltkhs), I know the default looks ugly but it's quite customizable (https://github.com/deech/fltkhs-themes-demo) and very easy to install across platforms and produce self-contained static binaries. It's a lot of work to make a nice wrapper but I have a lot of the tedious C-binding bits ready to go (https://github.com/deech/fltkhs/tree/master/c-src). I've wanted to port it to Nim for quite a bit now. There is a Nim port out there (https://github.com/Skrylar/nfltk) but it's not as far along.
zetashift
@zetashift
https://github.com/JuliaLang/PackageCompiler.jl I recall it being early development yea, but you can try it out :P
Zachary Carter
@zacharycarter
I will be a guinea pig for HCR all day long
but we need someone to fix it first :P
bevo009
@bevo009
Is there a timer option when compiling?
I can't see an option in nim --fullhelp
From IRC (bridge bot)
@FromIRC
<PMunch> @bevo009, what kind of timer where you thinking of?
bevo009
@bevo009
Just times the program running time, like Code Runner does automatically
From IRC (bridge bot)
@FromIRC
<PMunch> Well on Linux you can just call it with time
bevo009
@bevo009
I'm looking for one I can integrate with F6 Nim command
From IRC (bridge bot)
@FromIRC
<PMunch> In an editor?
<PMunch> Well that depends on your editor..
bevo009
@bevo009
vs code
I found this for timing a specific code block while I was looking:
import times, strutils, os

template benchmark(benchmarkName: string, code: untyped) =
  block:
    let t0 = epochTime()
    code
    let elapsed = epochTime() - t0
    let elapsedStr = elapsed.formatFloat(format = ffDecimal, precision = 3)
    echo "CPU Time [", benchmarkName, "] ", elapsedStr, "s"

benchmark "My benchmark":
  sleep 2000
From IRC (bridge bot)
@FromIRC
<PMunch> Again, if you're on Linux you could create an alias for Nim to run time nim instead
<PMunch> That way you would always get timing information
bevo009
@bevo009
Oh ok you just place time before your main nim command
From IRC (bridge bot)
@FromIRC
<PMunch> Yes, time is a program that runs the command after it and returns the time it took to run it
<PMunch> Can be appended to pretty much anything
bevo009
@bevo009
cheers, thats great
From IRC (bridge bot)
@FromIRC
<PMunch> What would be cool though was if Nim could have a timed mode where it would output timings for the different parts of the compilation
<PMunch> Like how long did parsing take, what about macro expansion, C compilation, etc.
bevo009
@bevo009
yes it would
After trying inserting time into code runners custom command, it's automatic timing is prstty correct
From IRC (bridge bot)
@FromIRC
<livcd> when i compile with cpp and run on windows server 2012 i get this https://privatebin.net/?e3733c229028e67a#3iGd9Sz4N5fsoc1bw5rtoETVyVKWbUgnZXzFjDrfme5u
From IRC (bridge bot)
@FromIRC
<livcd> ooops i know
From IRC (bridge bot)
@FromIRC
<salewski> I would need some support for our new Chinese community, heterogeneous container see https://forum.nim-lang.org/t/5095
Mamy Ratsimbazafy
@mratsim
@bevo009, use the criterion package or “import profile"
From IRC (bridge bot)
@FromIRC
<clyybber> Araq: For some reason nkInt8Lit, nkIntLit or nkNilLit sometimes doesn't have a type.
<clyybber> So for isExpression its not enough to check not isEmptyType
bevo009
@bevo009
@mratsim cheers! I'll check it out
From IRC (bridge bot)
@FromIRC
<Araq> clyybber: meh ok
<clyybber> Do you know why that happens?
<clyybber> I mean for nkNilLit it makes sense, but for the other ones?
<clyybber> Are they not fully resolved yet?
<Araq> I remember it happens for some complex macro cases
From IRC (bridge bot)
@FromIRC
<Araq> and I remember teaching the backend about it was less work then changing the frontend