Re: TechEmpower Web Framework Benchmarks

2018-11-16 Thread Libman
A quick `jq '.[][]["memory usage"]["used"]'` through all stats.txt.json files in [latest](https://tfb-status.techempower.com/results/14a815b6-93c1-4207-96bb-3960c29719e2) [results](https://tfb-status.techempower.com/results/bd2d23c9-3d8c-4b6c-b7a2-cb900ed27e95) dumped to [a

Re: Partial casing is foo_bar

2018-11-16 Thread moerm
I generally like Nims approach a lot - but I think that @Araq is too hard on this. The guiding rule should be "Nim prohibits false and dangerous things". Naming (e.g.) private variables '_[foo](https://forum.nim-lang.org/postActivity.xml#foo) is not dangerous and whether it's false is largely

Re: Need help with game framework

2018-11-16 Thread anoNIMous
I am trying to improve it, but I feel like I am not experienced enough to see where I could make improvements.

Re: Partial casing is foo_bar

2018-11-16 Thread DTxplorer
I had headeaches trying to find why my first opengl triangle looks like that [https://nsm09.casimages.com/img/2018/11/16//18111610551424237015998588.png](https://nsm09.casimages.com/img/2018/11/16//18111610551424237015998588.png) After two days I accidentally discovered that in a certain file

Re: Need help with game framework

2018-11-16 Thread treeform
Then make it better? What you describe is basically how I program. Probably how everyone programs. Eventually I learn how the thing works and can comeback to cleanup my exploration code. At first I copy stuff from Stack Overflow and where ever... then some times try out permutations of things

Re: error: unable to create target: 'No available targets are compatible with this triple.

2018-11-16 Thread stevebrat
This will be going to facilitate with the [https://epsonsupports.net/blog/fix-epson-error-code-0x69](https://epsonsupports.net/blog/fix-epson-error-code-0x69)/ for the crashing with clang in emscription.

Convert TimeInterval To Seconds?

2018-11-16 Thread Phillips126
Hey All, Fairly new to Nim but absolutely loving it. I am writing some software that is working with dates and I need to calculate the number of seconds that has elapsed between dates A and B. I'm currently using `times.between(a,b)` which is resulting in "2 months, 1 day, 22 hours, 24

GC is not cleaning up sequence

2018-11-16 Thread konradmb
I have this code: var a: seq[int64] proc addItems() = for k in 0..2: a.add(k) if k %% 100 == 0: echo k echo "a.high: " & $a.high proc removeItems() = for k in countdown(a.high,10):

Re: Need help with game framework

2018-11-16 Thread anoNIMous
O shit it does lol Sorry, I guess it didn't work on some other version haha. Anyway, the problem isn't it not working (it does), it's just that I feel like I made it wrong, since I don't know alot about this stuff, so i would feel a lot more confident if someone knowledgeable would check it

Re: Need help with game framework

2018-11-16 Thread SolitudeSF
ummm, what exactly doesn't work? since it compiles and launches (after deleting unused strfmt import) with latest devel.

Game framework development help

2018-11-16 Thread anoNIMous
Long story short: I'm a real noob at programming, so as an exercise for learning Nim I decided to make a basic game framework. I managed to have it draw pixel art circles, lines, sprites from a spritesheet, and to play sound. The problem is that, since i know nothing about SDL, I made it really

Need help with game framework

2018-11-16 Thread anoNIMous
Don't know if this is the right place to ask, but here I go I'm a complete noob at programming, so I wanted to make a simple SDL2-based game framework as an exercise. I've managed to make it do what I wanted (Draw sprites, play sounds, draw primitives, pixel art etc.), BUT It's absolute jank.

Re: Macro that generates procs

2018-11-16 Thread Araq
You cannot dynamically generate procs.

Re: Macro that generates procs

2018-11-16 Thread juancarlospaco
I think `&" "` and `fmt" "` wont work inside a macro, use `" " & " "` or `format( )`.

Re: Macro that generates procs

2018-11-16 Thread bingobangobongo
thanks, I got it working without passing params to the macro function, what I cannot seem to figure out is how to do it when trying to dynamically generate the string that will get converted to a macro.

Re: How can I compile for DOS?

2018-11-16 Thread adrianv
But real DOS fun is compiling to 16bit and handling of XMS :) I don't know if Nim supports 16bit word sizes.

Re: Macro that generates procs

2018-11-16 Thread juancarlospaco
[https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/macros/macro_from_string.nim](https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/macros/macro_from_string.nim) More examples on the same folder.