<< 22-09-2017 >>

00:06:06*mahsav joined #nim
00:08:29*nohusuro left #nim (#nim)
00:18:37FromGitter<zacharycarter> @genotrance : ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c456ddcfeed2eb6538e138]
00:19:30FromGitter<genotrance> that's WIndows specific so that I could read giant files without running out of memory
00:20:19FromGitter<zacharycarter> hrm
00:20:34FromGitter<zacharycarter> probably not going to work on my macbook pro then :P
00:20:59FromGitter<genotrance> there's some bug with Nim file reading: https://github.com/nim-lang/Nim/issues/6031
00:21:43FromGitter<genotrance> i'm replacing that code with standard Nim since I am going to use nimSHA2 to do the file hashing, I no longer need to read the whole file in memory (I hope nimSHA2 isn't storing it all in memory and digests it right away)
00:36:36*pilne joined #nim
00:41:29*mahmudov joined #nim
00:45:48*mahmudov quit (Ping timeout: 240 seconds)
00:48:38*zachk quit (Quit: night night...zzzzzZZZZzzzz)
01:02:24*dhalinar joined #nim
01:21:34*Jesin quit (Quit: Leaving)
01:31:19*yglukhov joined #nim
01:36:18*yglukhov quit (Ping timeout: 240 seconds)
01:53:59*chemist69 quit (Ping timeout: 255 seconds)
02:07:48*chemist69 joined #nim
02:08:24*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:12:08*endragor quit (Remote host closed the connection)
02:15:29*ipjk quit (Read error: Connection reset by peer)
02:23:24*Etheco- joined #nim
02:23:24*Etheco quit (Read error: Connection reset by peer)
02:40:49*endragor joined #nim
02:41:20*endragor quit (Remote host closed the connection)
02:43:08*endragor joined #nim
03:02:05*Serenit0r joined #nim
03:05:37*Serenitor quit (Ping timeout: 248 seconds)
03:14:21*gokr quit (Ping timeout: 252 seconds)
03:22:27*pilne quit (Quit: Quitting!)
03:34:56*yglukhov joined #nim
03:39:47*yglukhov quit (Ping timeout: 260 seconds)
03:48:23*Serenitor joined #nim
03:49:17*Serenit0r quit (Ping timeout: 240 seconds)
05:16:01*jsgrant quit (Ping timeout: 240 seconds)
05:24:59*vendethiel- joined #nim
05:25:22*Ven`` quit (Ping timeout: 260 seconds)
05:34:57*mahsav quit (Ping timeout: 248 seconds)
05:35:16*mahsav joined #nim
05:36:58*yglukhov joined #nim
05:41:12*yglukhov quit (Ping timeout: 252 seconds)
05:43:03*jsgrant joined #nim
05:47:09*jsgrant quit (Client Quit)
05:47:32*jsgrant joined #nim
05:50:31*Vladar joined #nim
06:20:22*gokr joined #nim
06:21:19*fastrom1 quit (Quit: Leaving.)
06:24:39*mwbrown quit (Ping timeout: 252 seconds)
06:24:55*mwbrown joined #nim
06:27:55*rauss quit (Quit: WeeChat 1.9)
06:35:40FromGitter<mratsim> I think nimsuggest dying often with VScode is eating my disk space
06:37:03*nsf joined #nim
06:39:20*solitudesf joined #nim
06:42:31FromGitter<ephja> @mratsim nimsuggest tends to leak memory atm. you could run a script that periodically kills nimsuggest processes. why is it wasting disk space? is it because the page file is getting bigger?
06:47:35FromGitter<mratsim> maybe the swap
07:07:08*MyMind quit (Ping timeout: 240 seconds)
07:07:23*Pisuke joined #nim
07:19:00*PMunch joined #nim
07:19:03*claudiuinberlin joined #nim
07:20:18*yglukhov joined #nim
07:20:23*yglukhov quit (Remote host closed the connection)
07:20:38*yglukhov joined #nim
07:37:38*jsgrant quit (Quit: jsgrant)
07:44:33*jsgrant joined #nim
07:44:51gokrHacking some Nim on Raspbian, anyone else using Nim on Rpi?
07:45:19gokrSeems to work perfectly fine, as I hoped of course, it's just Linux after all.
07:46:00gokrdom96: Perhaps choosenim should be extended to support it, I suspect it would just work out of the box.
07:47:09*jsgrant quit (Client Quit)
07:47:33*jsgrant joined #nim
07:52:37Tangergokr: Ooh, what are ya putting on the Rpi?
07:53:44gokrI am making a little server that will talk MQTT and REST (Jester) - and make calls out to other tools
07:54:17TangerCoolsies. How's Jester workin' for ya? I haven't gotten around to checking it out yet
07:54:53gokrJester is nice, I haven't done much with it yet - but I consider it to be the "standard" tool for such a job in Nim.
07:55:14gokrDominik has kinda proved that it's maintained by now ;)
07:56:00gokrFor MQTT I am using the wrapper of Paho C lib, unfortunately it doesn't do websockets AFAICT. It's also not listed in nimble, which it should be.
07:56:17*Ven`` joined #nim
07:56:19gokrThere is also a lower level "Nim only" MQTT implementation, but I suspect it may be less hardened ;)
07:56:41*vendethiel- quit (Ping timeout: 240 seconds)
07:57:33gokrThis job could just as easily be done in nodejs of course, but... well, Nim fits the bill.
08:02:54*Etheco_ joined #nim
08:03:34*vlad1777d joined #nim
08:05:01*Xe quit (Ping timeout: 240 seconds)
08:05:01*federico3 quit (Ping timeout: 240 seconds)
08:05:19*federico3 joined #nim
08:05:35*obadz quit (Ping timeout: 240 seconds)
08:05:38TangerHaha, you could use node.js... But it not as fun XD
08:06:01*Etheco- quit (Ping timeout: 240 seconds)
08:06:54PMunchWhat are you using it for? a MQTT/REST bridge?
08:12:39*Xe joined #nim
08:19:12*obadz joined #nim
08:19:50gokrNo, the server is meant to offer the "same" API over either MQTT or REST.
08:20:30*Trustable joined #nim
08:20:36gokrThe work it performs is to compile and flash connected arduinos.
08:24:34*vendethiel- joined #nim
08:25:06*Ven`` quit (Ping timeout: 252 seconds)
08:25:18*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:31:12*solitudesf quit (Ping timeout: 246 seconds)
08:37:29*claudiuinberlin joined #nim
08:37:38*jsgrant quit (Quit: jsgrant)
08:41:36*salewski joined #nim
08:43:13salewskiIs there already a way to get the current module name?
08:44:10*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:44:28*jsgrant joined #nim
08:44:52salewskiHave to write connect(app, "activate", example7.activate) is really no big fun for all the examples.
08:45:33salewskiconnect(app, "activate", THISMODULE.activate) would be OK for me.
08:47:26salewskiAnd is there really a good change that the module name prefix will be unneeded when I rewrite the macro with AST API?
08:48:04salewskis/change/chance/
08:48:44Araqno sure but your string hacks are a time bomb, rewrite it already
08:50:05salewskiYes, but I am not sure how long rewriting will take for me. The macro is not that easy, so maybe it will take a week or longer for me.
08:51:15salewskiSo can we regard parseStmt() some sort of deprecated?
08:52:09*jsgrant quit (Quit: jsgrant)
08:52:31*jsgrant joined #nim
08:59:20Araqno, for string interpolation parseExpr/parseStmt are the right tools
09:00:11salewskiOK.
09:01:10*thomasross quit (Remote host closed the connection)
09:01:32*salewski quit (Quit: WeeChat 1.9)
09:01:33*claudiuinberlin joined #nim
09:01:34*thomasross joined #nim
09:04:39*claudiuinberlin quit (Client Quit)
09:05:10*yglukhov_ joined #nim
09:07:47*yglukhov quit (Ping timeout: 240 seconds)
09:09:37*kobi7 joined #nim
09:12:28*solitudesf joined #nim
09:21:30*Vladar quit (Remote host closed the connection)
09:22:56*skrylar joined #nim
09:25:28*Vladar joined #nim
09:26:21skrylary'know, the weird thing i noticed with fltk is how light it was
09:26:37skrylari made the same program with FLTK once and ported it over to wx. The wx version used 3x the memory and did nothing more.
09:26:47skrylarAlthough it did look native, whereas fltk doesn't :\
09:27:17skrylarWonder what extra things wx is doing
09:33:53*claudiuinberlin joined #nim
09:40:48kobi7hi guys, is there a debug for the vscode plugin? if yes, how to enable/use it?
09:40:54FromGitter<zacharycarter> no
09:40:59FromGitter<zacharycarter> use lldb / gdb
09:41:14FromGitter<zacharycarter> why does nimsuggest leak memory and how do we fix it so it does not?
09:41:18FromGitter<zacharycarter> because it's super annoying
09:41:24kobi7i never tried gdb :(
09:41:47gokrIIRC QtCreator worked nice for debugging, but any gdb based frontend should work.
09:41:47FromGitter<zacharycarter> kobi7: what os are you on?
09:41:56FromGitter<zacharycarter> QtCreator can work
09:42:03gokrIt did work nicely earlier.
09:42:17kobi7stepping in code lines, setting break points and looking at variables value is enough for a debug experience (for me)
09:42:26gokrAnd wasn't that hard to configure to get going - not sure if I blogged about it, or someone else did perhaps.
09:42:28kobi7I'm on linux
09:42:28FromGitter<zacharycarter> you can do all of that with gdb or lldb
09:42:33FromGitter<zacharycarter> okay so gdb then
09:42:40FromGitter<zacharycarter> try compiling your program like this
09:42:48gokrI ran it on Linux - the only thing you will have issues with is... deeper inspection of Nim stuff.
09:43:00gokrbreakpoints and all works nicely.
09:43:15FromGitter<zacharycarter> nim c --debuginfo --lineDir:on foo.nim
09:43:17gokrBut gdb isn't aware of seq, string etc, so... variable inspection is a bit "so so".
09:43:28kobi7gokr, is there something like a gui frontend?
09:43:43gokrkobi7: QtCreator is exactly that - it's a full blown C++ IDE.
09:43:59gokrKDE-whateveritscallde worked too IIRC.
09:44:20kobi7so you run the cpp binary in it?
09:44:38gokrOne can implement some gdp plugin in Python I think to get proper var inspection too - but I don't think anyone has done it yet.
09:44:44gokrYou debug it, yeah.
09:44:48gokrIt works great.
09:44:55gokrBut was a while since I did it.
09:45:14kobi7and you got correct nim-code lines?
09:45:23kobi7line numbers
09:45:27gokrLook at this: https://forum.nim-lang.org/t/1229
09:46:09gokrAh, its in QtCreator proper now - right: https://codereview.qt-project.org/#/c/123629
09:46:59kobi7yay!
09:47:09gokrNim support was added officially in 4.1.0: http://blog.qt.io/blog/2016/08/25/qt-creator-4-1-0-released/
09:47:22gokrBut... filcuc is not around here I see. It's his work.
09:47:51gokrNow that you bring it up... I will try it next week :)
09:48:07FromGitter<zacharycarter> my recommendation is use gdb and learn how to debug with the commandl ine
09:48:19FromGitter<zacharycarter> you may not always have qt creator at your disposal but you'll most likely have gdb | lldb
09:48:28FromGitter<zacharycarter> then use something like QtCreator if you must have a visual debugger
09:48:32gokrSure, agreed.
09:48:37FromGitter<zacharycarter> I get along fine without one, and QtCreator / the QtFramework is a huge install
09:48:38FromGitter<zacharycarter> fyi
09:48:39gokrBut... it's so painful :)
09:48:40skrylarzacharycarter: is it stuff getting stored in caches?
09:49:05FromGitter<zacharycarter> skrylar maybe - I haven't dug through the nimsuggest source I guess i'll do that now
09:49:31skrylarnods
09:49:42skrylari would suspect caches before leaks. not that gcs make leaks impossible but
09:50:08skrylarone complaint i always have with gc apps is they don't act like other programs might exist, so they just kinda all use memory and hope the OS magically solves it
09:50:24FromGitter<zacharycarter> right
09:50:41*solitudesf quit (Ping timeout: 240 seconds)
09:50:48FromGitter<zacharycarter> well hopefully araq finishes that crazy algorithm implementation he was going to implement and allows the gc to be turned off
09:50:55FromGitter<zacharycarter> I can't remember wtf it was called
09:51:00skrylararc?
09:51:09Araqmemory regions?
09:51:41FromGitter<zacharycarter> no
09:51:46skrylari don't have issues with the gc tho. i turn it off at the start and just have the incremental run between frames
09:52:04FromGitter<zacharycarter> I'll try to find the document again
09:52:19FromGitter<zacharycarter> Araq you said it was just an experimental thing you were looking into
09:52:32skrylarhe also said he wanted r-trees for something :p
09:52:36FromGitter<zacharycarter> and you linked to a paper by someone about something - I know that's super helpful /
09:53:00*mal`` quit (Quit: Leaving)
09:53:05FromGitter<zacharycarter> basically what are the plans for going GCless with Nim? or are there any?
09:53:33skrylari always thought turning the gc off was more about microcode than a general goal
09:53:46*gokr quit (Remote host closed the connection)
09:54:17FromGitter<zacharycarter> I don't know what the polls showed - I think I remember Araq saying it sounded like most people were fine with the current GC options - I for one would like the ability to forego GC all together
09:54:34FromGitter<zacharycarter> and I think the other options mentioned in the poll were like ARC, and then maybe some other options too
09:54:57skrylari don't believe gcs are inherently evil
09:55:04skrylarthey just need OS support >:|
09:55:14Araqwell...
09:55:22FromGitter<zacharycarter> :popcorn:
09:56:08skrylari saw some whitepaper come across that was suggesting an ocaml GC was faster than boost pointers. and read some old lisp things that were talking about being more aggressive with code gen when they didn't have to maintain the whole deref logic
09:56:37skrylarand most complaints about a GC are that they are acting randomly instead of on predictable cue
09:57:20skrylarlike arc is continuously having to stop and do atomic writes
09:57:40*mal`` joined #nim
09:58:00skrylarbut i'm not a GC god so, dunno.
09:58:06AraqI still want memory regions but to make them safe the overhead is comparable to a good GC
09:58:17FromGitter<zacharycarter> wow
09:58:46Araqand they are never a "program and forget" solution
09:58:53FromGitter<zacharycarter> didn't realize it was that much work
09:58:55FromGitter<zacharycarter> right
09:59:12Araqif we go for unsafe regions things are smooth though :-)
09:59:44FromGitter<zacharycarter> so unsafe memory regions are already available and usable right?
09:59:54Araqkind of.
10:00:02Araqbootstrapping works
10:00:09Araqtakes 2GB
10:00:46FromGitter<zacharycarter> dayum
10:02:20FromGitter<zacharycarter> You know what's super annoying? I'm trying to compile zengine for emscripten and remove all references to OS packages / shit that emscripten can't handle. But I just get errors like - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c4dfac7b7d98d30d24e1a8]
10:03:31FromGitter<zacharycarter> can't tell where the bad import is
10:03:45skrylarspeaking of zengine
10:04:16skrylari am currently on a mind trip trying to understand sparse virtual textures and these weird adaptively sampled distance fields
10:04:28skrylarthey seem like they would go together in some horrifying-yet-awesome way
10:05:04FromGitter<zacharycarter> had never heard of sparse virtual textures before
10:05:09*madmalik joined #nim
10:05:10FromGitter<zacharycarter> may have to give this a go
10:05:13skrylarits carmacks megatexture
10:05:21skrylarhttp://www.silverspaceship.com/src/svt/
10:05:42FromGitter<zacharycarter> yeah was just reading that page
10:05:57skrylarthere's also Mischief which allegedly uses these weird distance field octrees
10:06:03skrylartheir gimmick is you can zoom infinitely and sketch
10:06:21skrylari guess they're recording strokes as vector lines and then putting those in some weird old data format
10:07:23skrylari remember back in like 2000 having dreams of nurbs/bezier models because that was when people were doing these model updates for deus ex. and it was like you know if anyone invested R&D in those you could just set your game to potato mode or something
10:07:35skrylari think they're kinda going that way with substance now
10:07:38*jsgrant quit (Quit: jsgrant)
10:07:57FromGitter<zacharycarter> yeah I think you're right
10:08:02skrylarprocedural textures are taking off, a little
10:08:34skrylarSaurbraten actually stored their maps like this now that i recall
10:08:49FromGitter<zacharycarter> yup!
10:08:53skrylarit was an octree with cube deformation edges and could subdivide. that seem very similar to what ADFs are
10:09:20skrylaranyway sorry. wall of texted again
10:11:18skrylarhttps://graphics.stanford.edu/courses/cs468-03-fall/Papers/frisken00adaptively.pdf
10:12:30*jsgrant joined #nim
10:14:01skrylarmegatexture didn't really work that well though, as fascinating as it is
10:14:28*kobi7 quit (Ping timeout: 240 seconds)
10:14:45*kobi7 joined #nim
10:15:10*dddddd joined #nim
10:17:38FromGitter<Yardanico> I see araq is doing some things with strings and codegen :P
10:24:34skrylarzacharycarter: now here's a pipedream for you. if there was a way for the UVs to survive conversion to ADFs, and i donno if there is or not, you could *theoretically* just cram any random scene in one
10:24:42skrylarwould still be a static scene, but hey.
10:24:59FromGitter<zacharycarter> would be cool
10:25:11skrylarwell in the paper they talk about you can simplify geometry by just not recursing
10:25:47skrylarit might still result in some weird geometry tho, as LOD algos always do
10:25:57kobi7hmm, I stumbled upon: https://marketplace.visualstudio.com/items?itemName=ms-vscode.cpptools
10:28:08FromGitter<Yardanico> yeah you can use that
10:28:25FromGitter<Yardanico> also I highly recommend this - https://github.com/cooldome/Nim-gdb
10:29:18FromGitter<zacharycarter> ugh still not sure how to diagnose these emscripten compilation errors
10:31:02FromGitter<Yardanico> take a look at this
10:31:03FromGitter<Yardanico> https://github.com/Jipok/Nim-SDL2-and-Emscripten/blob/master/nim.cfg
10:31:16FromGitter<Yardanico> you should use "emcc" compiler btw
10:32:09FromGitter<zacharycarter> I am
10:32:50FromGitter<Yardanico> well try adding "-Iemscripten" to passC and passL
10:33:06FromGitter<zacharycarter> I don't think that's my issue
10:33:14FromGitter<zacharycarter> something in my code is importing modules emscripten doesn't support I imagine
10:33:21FromGitter<Yardanico> no
10:33:24FromGitter<Yardanico> stdbool is fine
10:33:26FromGitter<Yardanico> it should work
10:33:39kobi7Is there something like a makefile for nim? IOW, some preferred nim way to build?
10:33:54FromGitter<zacharycarter> oh weird okay
10:34:23FromGitter<Yardanico> kobi7: yourproject.nim.cfg or yourproject.nims
10:34:29FromGitter<zacharycarter> GOOD CALL @Yardanico
10:34:33FromGitter<Yardanico> ?
10:34:35FromGitter<zacharycarter> it wasn't picking up my nim.cfg
10:34:39FromGitter<zacharycarter> thank you!
10:35:18euantorkobi7: Usually just use Nimble and do `nimble build`
10:35:40FromGitter<Yardanico> yeah, nimble should be sufficient
10:35:55euantoror `nimble install` for a release build
10:36:01FromGitter<Yardanico> but sometimes you need to define some things
10:36:02FromGitter<Yardanico> like -d:ssl
10:36:06FromGitter<Yardanico> does nimble file allow that?
10:36:43euantoryou can put that in a `nim.cfg`, not sure about a `.nimble`
10:37:06FromGitter<Yardanico> but yeah, kobi7, .nimble file + nim.cfg is higher-level than makefile :)
10:37:08FromGitter<Yardanico> so easier to use
10:37:13kobi7Thanks, Yardanico
10:37:36kobi7how can I choose the output binary filename?
10:37:48euantoruse the `-o` option
10:38:00euantoror set the `bin` key in the `.nimble` file
10:38:14kobi7thanks, it doesn't show up in `nim --help`
10:41:38FromGitter<zacharycarter> I'm getting there...
10:41:51FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/e6Dg/Screen-Shot-2017-09-22-at-6.41.33-AM.png)
10:42:14FromGitter<zacharycarter> it's creating a window!
10:47:05kobi7ok, so I hoped I could set breakpoints in the nim file, and the cpp extension for vscode would stop at the right point.
10:47:32kobi7it currently just runs gdb, but it's likely i don't know yet how to configure it
10:52:00FromGitter<Yardanico> Yes you can do that
10:52:13FromGitter<Yardanico> You can set breakpoints
10:57:36*rusua joined #nim
10:59:59*fastrom joined #nim
11:03:41skrylari think i understand the concept of these things now.
11:03:52skrylarwhat i still don't yet understand is how you turn distance fields in to geometry o.O
11:10:01*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
11:11:53*claudiuinberlin joined #nim
11:12:30skrylarzacharycarter: i don't think they actually DO. the paper talks about a raytracer. hrm
11:19:16*fastrom quit (Ping timeout: 255 seconds)
11:19:17*vlad1777d quit (Ping timeout: 240 seconds)
11:19:25skrylarYea, they don't. So you have to use marching cube/tetra to get geometry back out. And those make some gnarly geometry.
11:19:29skrylarbah
11:22:01*Trustable quit (Remote host closed the connection)
11:24:08*fastrom joined #nim
11:32:07*vlad1777d joined #nim
11:34:32FromGitter<mratsim> @Yardanico You can do switch("define","ssl") in a nimble file but only for tasks, it doesn't work on "import yourproject" or I didn't find it.
11:43:50*Yardanico joined #nim
11:48:02*vendethiel- quit (Ping timeout: 260 seconds)
11:52:28*ShalokShalom_ joined #nim
11:53:24*endragor quit (Remote host closed the connection)
11:55:45*ShalokShalom quit (Ping timeout: 252 seconds)
11:57:24*dhalinar quit (Ping timeout: 252 seconds)
11:58:38*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:02:40*claudiuinberlin joined #nim
12:03:32*Snircle joined #nim
12:07:52*vlad1777d quit (Ping timeout: 260 seconds)
12:11:23*fastrom quit (Ping timeout: 255 seconds)
12:11:50*endragor joined #nim
12:16:17*endragor quit (Ping timeout: 240 seconds)
12:17:30*kobi7 quit (Quit: Leaving)
12:18:07*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:19:12*claudiuinberlin joined #nim
12:21:36*claudiuinberlin quit (Client Quit)
12:23:53skrylarhm
12:24:03skrylarpondering a fltk wrapper for nim
12:24:21*Yardanico quit (Ping timeout: 240 seconds)
12:24:21skrylarits better than libui at least, lol
12:24:57skrylarlibui could have been pretty good actually, it just lacked some really basic stuff
12:25:14*Yardanico joined #nim
12:26:03FromGitter<zacharycarter> skrylar: maybe consider contributing to NiGUI ?
12:28:14skrylari just googled that
12:28:37skrylari could, although that puts me back in the same pit i was trying to avoid regarding wrapping gtk3's bajillion headers
12:28:58Yardanicowell this is not entirely a wrapper
12:29:05Yardanicoit wraps only low-level stuff of winapi and gtk3
12:29:17Yardanicoand does other stuff by itself
12:29:20Yardanicoe.g. layouts
12:29:29skrylari keep meaning to do miglayout in nim
12:29:35skrylari almost did it in Go once
12:30:00skrylarhttp://www.migcalendar.com/miglayout/cheatsheet.html
12:30:53skrylarbetween mig and hirise you don't need any other layout stuff
12:31:06FromGitter<zacharycarter> I think the plan is to eventually ditch gtk3
12:31:08FromGitter<zacharycarter> for NiGUI
12:31:09Yardanicoomg this website has so small font size :P
12:31:11FromGitter<zacharycarter> and go native
12:31:18Yardanicowhat do you mean by "native" ? :)
12:31:27skrylargtk is native to half of linux
12:31:36Yardanicoand "winapi" is native to all windows
12:31:49FromGitter<zacharycarter> like for osx I don't think he wants to use gtk
12:32:01skrylarthey drink cocoa over there.
12:32:07FromGitter<zacharycarter> aye
12:32:13skrylari miss being a mac nerd.
12:33:02skrylarunfortunately the imac on my desk now is only good for office work. it won't run Substance or any shader 3 stuff.
12:33:27Yardanicoinstall windows on it ? :P
12:33:32FromGitter<zacharycarter> heh
12:33:37Yardanicoor it has an old GPU?
12:33:40skrylarold gpu
12:33:48skrylarthe box is 9 years old
12:33:50Yardanicooh
12:34:45skrylarhirise is neat but i still don't grok the math.
12:35:01skrylarthey're basically modeling constraints in a matrix and doing some thing on it to solve a linear system
12:35:27*Yardanico quit (Remote host closed the connection)
12:35:45skrylarbut i used somethintg like it in freepascal/lazarus, it's quite nice. you just like, have your text labels auto-size (DPI scaling, etc) and then the whole UI is specified relative to everything
12:35:54skrylar"this is 3px to the right of that label"
12:36:25*gmpreussner quit (Quit: kthxbye)
12:36:58skrylarAnything that isn't one of those two, basically, is Wrong(tm). Not because I hate fun, but absolute positioning doesn't DPI/retina scale
12:37:16skrylarand those weird box sizers require a lot of BS
12:39:17*gmpreussner joined #nim
12:40:13FromGitter<zacharycarter> interesting - it looks like I can use the OpenGL bindings with emscripten
12:40:17FromGitter<zacharycarter> I'm just limited to a 2.0 context
12:42:31skrylarreally? i thought webgl was 3
12:42:35skrylaralthough egl is 2 so i guess so
12:42:40skrylarwebgl is basically egl
12:42:44FromGitter<zacharycarter> yeah
12:42:59skrylarI continue to say whoever is propagating this should be trout slapped viciously.
12:43:09*claudiuinberlin joined #nim
12:43:16skrylar"i will not perform math intensive operations in a scripting language and shove it on to the gpu slowly"
12:43:16FromGitter<zacharycarter> basically if I don't do - glSetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, VERISON_NUMBER)
12:43:28FromGitter<zacharycarter> it creates a 2.0 context automatically
12:43:40skrylarit creates whatever context the OS decides you get iirc
12:43:47skrylarwhich on a mac is going to be 3.0
12:44:24FromGitter<zacharycarter> it def doesn't work with a 3.0 context
12:45:37skrylarand once again krita has decided to be an unstable piece of crap
12:45:40skrylaroh well ._.
12:46:01*claudiuinberlin quit (Client Quit)
12:51:35FromGitter<krux02> isn't that the kde paint clone?
12:51:56FromGitter<krux02> how about grafx2?
12:58:08skrylarit used to be a gimp clone, now its a decently respected paint program
12:58:18skrylarexcept somehow i always get a broken version on linux
12:58:30skrylarit worked fine but now it segfaults when you try to save files :v
12:59:03FromGitter<krux02> hmm
12:59:11FromGitter<krux02> I mixed up krita and pinta
12:59:16Vladarwhat version? Krita works fine for me for a while
12:59:17FromGitter<krux02> pinta is a paint clone
12:59:47skrylarVladar, all of them. i tried a git version, there's some crash in libkritastore
12:59:56skrylari'll see if a reboot fixes it later, done with art for now
13:00:07FromGitter<krux02> I personally think gimp is unnecessarily complicated with too much loading time, I have no opinion about krita, but mypaint is nice and simple
13:00:23FromGitter<krux02> and I like grafx2, but I am no artist
13:00:43FromGitter<krux02> so don't put too much weight in my opinion :P
13:01:05Vladaras for _painting_ Krita is the leader if we are talking linux-wise,
13:01:18skrylarmypaint is what i used because it has always worked
13:01:39skrylari had a friend who was trying to get in to krita and it kept dying at random moments
13:01:59Vladarmypaint is not bad, but dat krita's brush engine…
13:02:10FromGitter<krux02> is there a way to translate an identifier into a string within a template?
13:02:11skrylarkrita is using mypaints engine lol
13:02:13Araqthat is a nice one: https://github.com/nim-lang/Nim/issues/6416
13:02:22Araqkrux02: astToStr
13:02:31FromGitter<krux02> thanks
13:02:35Vladarskrylar, do you have a source for this?
13:02:44*ShalokShalom_ is now known as ShalokShalom
13:02:51Araqmaybe we should get rid of exceptions :P
13:03:35skrylarVladar, https://github.com/KDE/krita/search?utf8=✓&q=mypaint&type= well, they used to.
13:03:51skrylarI remember in earlier versions you could select 'mypaint brush' as a brush engine when editin them
13:05:00FromGitter<krux02> I don't really use exceptions, so I would not miss them
13:05:05FromGitter<zacharycarter> +1
13:05:20skrylardo you want every call to be if geterr hell
13:05:31FromGitter<krux02> nope
13:05:54FromGitter<krux02> I think a result type for functions that might fails does handle it pretty well
13:06:07FromGitter<krux02> Result[string]
13:06:23skrylargonna bog the cpu down in cmp's doing that :\
13:06:29FromGitter<krux02> result would either be a string, or the exception as a value
13:06:52FromGitter<krux02> if you try to get the value when it actually is an exception, then it would print the stack trace and exit
13:07:05*mwbrown quit (Ping timeout: 240 seconds)
13:07:31FromGitter<krux02> or create a dump for the debugger
13:07:46FromGitter<krux02> or whatever is best for workflow
13:08:11*adeohluwa joined #nim
13:08:14adeohluwaIm back again
13:08:23skrylarwb
13:08:30FromGitter<krux02> skrylar: I don't think so
13:08:35adeohluwaI need something like beautiful parser for nim language
13:08:35FromGitter<krux02> it's just a boolean chelk
13:08:38FromGitter<krux02> check
13:08:44adeohluwa:)
13:09:04FromGitter<krux02> adeohluwa: what do you mean?
13:09:08FromGitter<krux02> parse stuff?
13:09:24adeohluwayes
13:09:27adeohluwaparse html
13:09:43adeohluwafor a , h4 & the likes using. CSS selector
13:09:46adeohluwaor xpath
13:09:50*mwbrown joined #nim
13:12:26adeohluwa:(
13:12:31adeohluwa
13:13:08*claudiuinberlin joined #nim
13:13:24*claudiuinberlin quit (Client Quit)
13:13:47*jjido joined #nim
13:13:49adeohluwahelllllllpppp
13:14:01FromGitter<krux02> I found htmltidy
13:14:05FromGitter<krux02> but it is a C library
13:14:10adeohluwa:(
13:14:13FromGitter<krux02> C can easily be wrapped
13:14:25adeohluwaI'm not skilled in programming-fu
13:14:32adeohluwaC-fu
13:14:38adeohluwanim has HTML parser
13:14:45adeohluwabut its scanty on examples
13:15:10adeohluwaI find myself quickly going to see Rosetta code for fast examples
13:15:26FromGitter<krux02> well there is always a time to become skilled at programming-fu
13:15:42FromGitter<krux02> I don't use rosetta code at all
13:16:45adeohluwaare there some incantations I need to chant on the terminal?
13:18:31*dhalinar joined #nim
13:22:39FromGitter<Yardanico> Ah
13:22:49FromGitter<Yardanico> If you want to use css selectors
13:22:56FromGitter<Yardanico> There's a Nim library for that
13:23:18FromGitter<Yardanico> https://github.com/GULPF/nimquery/
13:30:47*claudiuinberlin joined #nim
13:31:46FromGitter<Yardanico> you could easily find it in nimble
13:32:39FromGitter<Yardanico> or not :P
13:32:47FromGitter<Yardanico> ah yes
13:32:54FromGitter<Yardanico> "nimble install nimquery"
13:34:07FromGitter<Yardanico> and yes, nim examples at rosetta are very outdated
13:34:18FromGitter<Yardanico> many of them still have typeless arguments :)
13:37:46FromGitter<mratsim> untyped template outputting a body do not have access to global var?
13:38:11*vlad1777d joined #nim
13:39:15FromGitter<Yardanico> they do
13:39:29FromGitter<Yardanico> with "bind" or a dirty template :)
13:39:37FromGitter<Yardanico> I may be wrong though
13:40:11FromGitter<mratsim> I’ll try with mixin
13:40:12*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
13:40:24FromGitter<Yardanico> ah
13:40:27FromGitter<Yardanico> you don't even need "bind"
13:40:37FromGitter<Yardanico> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c512d5bac826f054e9d9c3]
13:40:39FromGitter<Yardanico> it works
13:40:53FromGitter<Yardanico> or it's not like this in your code?
13:41:10FromGitter<mratsim> actually it’s because I forgot an include on my server :/
13:41:56*rauss joined #nim
13:42:03FromGitter<mratsim> (I have a headless machine with a Cuda GPU, so I code on my machine and pass update through, but sometimes I forgot things)
13:42:38FromGitter<Yardanico> you can use cuda on your mac, no?
13:44:16FromGitter<Yardanico> http://www.nvidia.com/object/mac-driver-archive.html
13:44:22FromGitter<Yardanico> http://www.nvidia.com/object/macosx-cuda-8.0.90-driver.html
13:46:37*endragor joined #nim
13:46:42*solitudesf joined #nim
13:47:26*endragor_ joined #nim
13:51:17*endragor quit (Ping timeout: 255 seconds)
13:57:35*PMunch quit (Quit: Leaving)
14:02:07*endragor_ quit (Remote host closed the connection)
14:02:42*endragor joined #nim
14:05:21*werwer joined #nim
14:05:34*werwer quit (Client Quit)
14:06:39*vlad1777d quit (Ping timeout: 252 seconds)
14:07:34*endragor quit (Ping timeout: 264 seconds)
14:07:34FromGitter<mratsim> The last mac with a nvidia GPU is from 2013 ;)
14:08:12FromGitter<Yardanico> aand ? :)
14:08:13FromGitter<mratsim> And buying a enclosure for external GPU is something like €500
14:09:10FromGitter<Yardanico> well now you see the good side of PCs and windows laptops :)
14:12:00skrylarwindows laptops don't have egpu tho
14:13:22adeohluwaYardanico: yeah you are right but its pretty easy to mentally edit them & get going...
14:15:42FromGitter<Yardanico> skrylar: I mean "all laptops which are used with windows" by "windows laptops"
14:15:48FromGitter<Yardanico> not surface laptops
14:17:00FromGitter<Yardanico> ah, you're about egpu
14:17:15FromGitter<Yardanico> well no, some laptops have egpu support
14:19:07*vlad1777d joined #nim
14:23:34*skrylar quit (Remote host closed the connection)
14:27:44*solitudesf quit (Ping timeout: 255 seconds)
14:35:01FromGitter<mratsim> Linux > Windows for computation on GPU and Deep Learning anyway :P
14:38:41Araqif you say so.
14:38:53AraqI wouldn't touch GPUs on Linux.
14:39:19FromGitter<Yardanico> @mratsim my main point was: there's better hardware in cheaper laptops/pcs :)
14:39:52FromGitter<Yardanico> than in Mac Books/iMacs
14:41:03FromGitter<mratsim> Oh for games linux is … hum no comment… but for scientific/numerical computing there is much less overhead than on Windows, the difference can be days for month-long computation.
14:41:03federico3anyway most GPU computation is not done on laptop or desktops
14:45:33*vlad1777d quit (Remote host closed the connection)
14:46:21*nsf quit (Quit: WeeChat 1.9)
14:55:42*vlad1777d joined #nim
15:00:22*gangstacat quit (Quit: Ĝis!)
15:02:35FromGitter<Yardanico> ehmn
15:02:36FromGitter<Yardanico> https://github.com/nim-lang/Nim/issues/6417#issuecomment-331461294
15:02:49FromGitter<Yardanico> it seems that asynchttpserver is not very crash-prone :)
15:03:34dom96Yeah, and judging by how long it took for this issue to be reported this really does not matter
15:03:42dom96(You should be running it behind nginx anyway)
15:04:06FromGitter<Yardanico> well maybe put a warning in docs?
15:04:50FromGitter<Yardanico> "Don't use this module in production without apache/nginx, because it can't handle malformed HTTP requests"
15:04:52*enthus1ast- joined #nim
15:04:53dom96There already is a warning in the docs...
15:04:59enthus1ast-hey ho
15:05:12yglukhov_Yardanico: i don't think that closing client socket in the handler is a common use-case. for me its not clear whats the intention of it
15:05:30FromGitter<Yardanico> well it's not only about closing client socket
15:05:36federico3what was the library to write Nim on a GPU? nimcuda?
15:05:40FromGitter<Yardanico> https://github.com/nim-lang/Nim/issues/6416#issuecomment-331458996
15:05:43enthus1ast-yglukhov_: most of the lines crashes it withoth the line
15:06:08enthus1ast-have a bad hand cant code :*(
15:06:38*vivus joined #nim
15:07:14yglukhov_enthus1ast, Yardanico: oh ok then its pretty critical imo...
15:08:38enthus1ast-the closing was a simulation of another piece of code that does that and keept crashes.
15:08:42yglukhov_dunno if nginx will protect against content-length 13078194637136627572
15:11:11*xet7 quit (Quit: Leaving)
15:11:56*relax joined #nim
15:17:27dom96yglukhov_: ooh, I see you've written an article on Reel Valley. Nice.
15:17:34dom96HN material? :)
15:18:22*vlad1777d quit (Ping timeout: 264 seconds)
15:19:10yglukhov_dom96: dunno... if you read it and think its worth hn...
15:19:15FromGitter<Yardanico> link please ? :)
15:19:27FromGitter<Yardanico> ah
15:19:27FromGitter<Yardanico> https://yglukhov.github.io/Making-ReelValley-Overview/
15:20:18dom96Your "Nim" link points to Crystal's website D:
15:20:31dom96But yeah, I think it's worth a try to submit it :)
15:21:59yglukhov_dom96: thanks, fixed.
15:23:22yglukhov_well... never submitted anything to hn. can anyone do it for me please? =)
15:24:40*xet7 joined #nim
15:25:05dom96sure, i'll do it
15:25:11*vlad1777d joined #nim
15:26:06dom96need a good title
15:26:23dom96Not that your title isn't good, but I think it needs to mention Nim :)
15:26:35dom96"The making of Reel Valley, a game built using Nim"?
15:27:10FromGitter<Yardanico> well it's in the article :)
15:28:27dom96Yardanico: what is?
15:28:53FromGitter<Yardanico> ". The game is done in almost 100% pure Nim"
15:29:27dom96Yes, but people have no idea what Reel Valley is on HN
15:29:31dom96Some of them will know what Nim is
15:29:35*vlad1777d quit (Ping timeout: 240 seconds)
15:29:49dom96yglukhov_: what are your thoughts about this title?
15:30:23yglukhov_can't you just set the proper title for hn post?
15:30:47dom96Like I said, I think it should mention Nim
15:31:15yglukhov_i mean the hn link shoul definitely mention nim, just not the title on my page
15:31:25yglukhov_is that waht you mean?
15:31:39dom96yeah, you don't need to change the title of your blog post
15:31:51yglukhov_ok cool
15:31:54dom96I'm just asking if you're happy with that title for the submission
15:33:49dom96So are you?
15:35:24dom96yglukhov_: ^
15:35:42yglukhov_dom96: sure, its fine
15:35:53dom96ok submitted
15:35:59yglukhov_thanks man
15:36:01dom96You can see it here: https://news.ycombinator.com/newest
15:36:16dom96I'll tweet about it too :)
15:36:41FromGitter<Yardanico> upvoted
15:37:06FromGitter<Yardanico> is hackernews something like reddit, but more IT related ? :)
15:37:22dom96More startup related
15:37:43dom96It's literally run by Y Combinator (a startup accelerator)
15:38:00yglukhov_bbl
15:40:06FromGitter<Yardanico> free karma for dom :P
15:40:41dom96muahaha
15:41:23FromGitter<Yardanico> btw, who is https://www.reddit.com/user/_Sharp_ ? :)
15:41:30FromGitter<Yardanico> he posts a lot of things in nim subreddit
15:42:07*yglukhov_ quit (Remote host closed the connection)
15:42:56*vlad1777d joined #nim
15:43:48*vivus quit (Ping timeout: 246 seconds)
15:44:03*gangstacat joined #nim
15:44:57dom965 points already, I feel like it should be on the front page already
15:45:45*yglukhov_ joined #nim
15:46:18FromGitter<Yardanico> it's not yet :)
15:47:28*BigEpsilon quit (Ping timeout: 240 seconds)
15:48:24dom96I submitted to r/programming too
15:48:53*jjido quit (Read error: Connection reset by peer)
15:49:04FromGitter<Yardanico> link?
15:49:48dom96https://www.reddit.com/r/programming/new/
15:50:25*yglukhov_ quit (Ping timeout: 248 seconds)
15:51:03*endragor joined #nim
15:51:55*endragor_ joined #nim
15:52:10*jjido joined #nim
15:55:05*gangstacat quit (Quit: Ĝis!)
15:55:17*endragor quit (Ping timeout: 240 seconds)
15:57:07*relax quit (Ping timeout: 260 seconds)
15:57:54FromGitter<ephja> "almost 100% Nim" ain't good enough!
16:00:37*gangstacat joined #nim
16:01:38*solitudesf joined #nim
16:03:33*vivus joined #nim
16:04:44FromGitter<mratsim> > *<federico3>** what was the library to write Nim on a GPU? nimcuda? ⏎ ⏎ nimcuda is on nimble and gives you binding to every routines nvidia created (matrix multiplication, fast fourier transform, memory allocation, etc …) ⏎ cudanim is just on Github and seems to be research on metaprogramming custom GPU kernels with pure Nim code and AST manipulation. ⏎ ... [https:/
16:04:44FromGitter... /gitter.im/nim-lang/Nim?at=59c5349bc101bc4e3af8e86d]
16:06:09FromGitter<Yardanico> you can disable optimizations with pragmas, no?
16:08:16FromGitter<mratsim> when I said optimisation it was replacing a + b by a pointer to host memory or things like that. cudanim found a clever way to avoid that but to be honest i couldn’t understand all of what was going on in their code
16:10:56*TjYoco joined #nim
16:20:34dom96well that's disappointing. It didn't make it to the front page.
16:21:19subsetparkdom96: did you submit to lobsters?
16:21:25subsetparkhn is a wasteland
16:21:25dom96nope
16:21:33subsetparki can do it if you like
16:21:36dom96go for it
16:23:10subsetparkhttps://lobste.rs/s/qy40hj/making_reelvalley_web_game_written_nim
16:25:11dom96lobste.rs always felt way too quiet for my taste
16:26:27*Jesin joined #nim
16:27:53*dhalinar quit (Remote host closed the connection)
16:28:48subsetparkDefinitely less active. But I find the level of discourse so much higher. Not only are people generally better commenters, but specifically it's lacking that hivemind trend-chasing that HN is SO guilty of
16:29:13subsetparkThere's much less FUD and blindly repeating received ideas
16:32:40*astronavt joined #nim
16:49:01*zachk joined #nim
16:52:47*jjido quit (Ping timeout: 248 seconds)
16:52:55FromGitter<Jipok> Hi. I recently found this project. It can serve as good gui for small utilities ⏎ https://github.com/DeXP/nuklear_cross
16:59:34FromGitter<Yardanico> yeah, I saw post on habrahabr
16:59:54FromGitter<Yardanico> but btw, imgui does the same thing as nuklear+
17:00:15FromGitter<Yardanico> well there are predefined backends for imgui
17:01:48FromGitter<Yardanico> @Jipok make a nim wrapper for it :)
17:03:12FromGitter<Yardanico> there's already a nuklear wrapper
17:03:40FromGitter<zacharycarter> ehhhh not a fan of nuklear_cross
17:03:50FromGitter<zacharycarter> and yes nuklear bindings exist already
17:03:58*dhalinar joined #nim
17:04:10FromGitter<Yardanico> @zacharycarter why not?
17:04:37FromGitter<zacharycarter> because it's just various backends for nuklear which are easy enough to write yourself
17:04:47FromGitter<zacharycarter> and besides which one backend doesn't necessarily suit every use case for nuklear
17:05:04FromGitter<zacharycarter> the point of nuklear is it is supposed to be api-agnostic
17:05:33FromGitter<Yardanico> well but if you want to write a simple gui utility, you don't want to waste your time writing a nuklear backend :)
17:06:20*BitPuffin|osx joined #nim
17:06:24FromGitter<zacharycarter> you also don't necessarily want as your only backend optoins
17:06:26FromGitter<zacharycarter> options*
17:06:30FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/hTIS/Screen-Shot-2017-09-22-at-6.41.33-AM.png)
17:06:33FromGitter<zacharycarter> damnit wrong screenshot
17:06:58FromGitter<zacharycarter> if you're using a library like allegro or bgfx or something else this project won't help at all
17:07:06*jjido joined #nim
17:07:18FromGitter<Yardanico> well nuklear_cross is supposed to help you if you want to write some GUI utility in C :)
17:07:56FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/pdvU/Screen-Shot-2017-09-22-at-1.06.14-PM.png)
17:08:13FromGitter<zacharycarter> it's fine as long as you're using one of ^
17:08:42FromGitter<Yardanico> yeah
17:08:59FromGitter<Yardanico> and they cover all major platforms
17:09:21FromGitter<Yardanico> SDL, GLFW - multiplatform, xlib - Linux, gdiplus - windows
17:13:54FromGitter<zacharycarter> yeah you're right - I still wouldn't write bindings to them though the backends are trivial enough that you could and should just implement them in Nim
17:14:34*solitudesf quit (Remote host closed the connection)
17:14:55*vegai joined #nim
17:15:33dom96https://github.com/dom96/choosenim/blob/master/analytics.md
17:15:40dom96So what do you guys think?
17:16:48FromGitter<zacharycarter> awesome idea
17:16:50FromGitter<zacharycarter> <3 it
17:17:08FromGitter<Yardanico> nice
17:17:40FromGitter<Yardanico> dom96: is there any progress on nim community survey analysis ? :)
17:18:26TjYocoI usually opt-out of these things but I don't see a reason not to have this feature
17:18:45dom96Yardanico: No, I'm mostly putting it off
17:18:49dom96It's a boring job :)
17:19:53dom96glad you guys like this though :)
17:21:40FromGitter<Yardanico> well if I use google all the time, what could be worse ? :)
17:21:49FromGitter<Yardanico> things like this only send anonymous data
17:25:07*zahary_ quit (Quit: Connection closed for inactivity)
17:25:29*dhalinar quit (Ping timeout: 255 seconds)
17:27:55*jjido quit (Remote host closed the connection)
17:28:22*dhalinar joined #nim
17:28:40*dhalinar quit (Remote host closed the connection)
17:30:27FromGitter<Yardanico> dom96: maybe release raw data as open-source? or it contains some private info?
17:30:36FromGitter<Yardanico> I'm about survey
17:31:21shodan45nim needs some endorsements, like on https://myrlang.org/release-notes/
17:32:04FromGitter<Yardanico> endorsements?
17:33:43FromGitter<Yardanico> website looks like something from 2000's :)
17:34:10shodan45Yes. Isn't it awesome? ;)
17:34:30FromGitter<Yardanico> well they're not for my personal preference :)
17:35:44shodan45also.... this "Gitter" thing breaks tab completing their nicks >_>
17:35:56FromGitter<Yardanico> I like this: "Libregex handles regexes. It implements a simple but powerful regex syntax, and has working Unicode support."
17:36:03FromGitter<Yardanico> working unicode support :)
17:37:01shodan45ugh. just now finding out what gitter is. *why*.
17:37:21FromGitter<Yardanico> Gitter is a chat with rooms, mostly for github projects
17:37:36FromGitter<Yardanico> "Gitter is an open source instant messaging and chat room system for developers and users of GitHub repositories."
17:37:42FromGitter<Yardanico> you can log-in via twitter or github
17:38:08shodan45I see that. And I'm still lost at to why it's better than IRC.
17:38:40FromGitter<Yardanico> you can embed images!
17:38:48FromGitter<Yardanico> and it's easier-to-use really
17:38:55FromGitter<Yardanico> it has specific github support
17:39:05shodan45IRC is hard?
17:39:23FromGitter<Yardanico> I don't mean "hard"
17:39:45FromGitter<Yardanico> example about github support : https://github.com/nim-lang/Nim/issues/6412
17:39:55FromGitter<Yardanico> this will be displayed as "nim-lang/Nim#6412" on gitter
17:39:57*rauss quit (Quit: WeeChat 1.9)
17:40:02*mahmudov joined #nim
17:40:12shodan45I use quassel, which is relatively complicated to setup. And I managed.
17:40:45FromGitter<Yardanico> also you can use gitter in the browser. yeah, I know about different web clouds, but with gitter you don't need to connect again after leaving the website
17:41:10FromGitter<Yardanico> also gitter has full markdown support :)
17:41:17shodan45that sounds a bit like what quassel does
17:41:23shodan45not the markdown part
17:41:28FromGitter<Yardanico> also "Integrations for Trello, Jenkins, Travis CI, Heroku, Sentry, BitBucket, HuBoard, Logentries, Pagerduty & Sprintly are available."
17:42:16shodan45I wouldn't mind it if it didn't screw with how IRC already works
17:42:23shodan45but it does.
17:42:26FromGitter<Yardanico> how ? :)
17:42:32shodan45o_O
17:42:56FromGitter<Yardanico> I use IRC from linux, and gitter from windows
17:43:01FromGitter<Yardanico> And I don't see any issues from both sides
17:43:29shodan45you aren't logged in to freenode as your own user
17:43:38FromGitter<Yardanico> I'm from windows right now
17:43:40shodan45"FromGitter"
17:43:47FromGitter<Yardanico> yes
17:44:09FromGitter<Yardanico> since this bridge is made by gitter, not by freenode
17:44:20shodan45anyway, I gtg.
17:44:23FromGitter<Yardanico> so they can't use your logins
17:44:34*shodan45 twitches
17:44:58shodan45(I'll still appear online, since I use quassel.)
17:45:08FromGitter<Yardanico> well I don't see that you're online anyway :P
17:47:50*TjYoco quit (Quit: Leaving)
17:51:58FromGitter<Tyler-Yocolano> Had to try Gitter since you were talking about it. A lot prettier than IRC lol
17:52:40FromGitter<Yardanico> and you don't need to host your own server to save logs!
17:53:20FromGitter<mratsim> There is no good IRC client for Mac so … Gitter it is
17:53:29*yglukhov joined #nim
17:54:29FromGitter<Yardanico> textual is a pretty good one?
17:54:34FromGitter<Yardanico> dom96 uses it :)
17:54:55dom96It costs money
17:54:57FromGitter<Yardanico> https://www.codeux.com/textual/ ⏎ ⏎ you can buy it or compile it for free :)
17:55:09dom96and I don't use it anymore
17:55:11FromGitter<mratsim> By the way @dom96, you could put the result of the Nim survey as open dataset on Kaggle: https://www.kaggle.com/datasets. I have lots of friends there that can give you excellent visualization
17:55:27FromGitter<Yardanico> dom96: what do you use now?
17:55:34dom96mratsim: I'd rather not.
17:55:41dom96Yardanico: XChat Azure
17:57:18*nsf joined #nim
17:57:32FromGitter<zacharycarter> hrm weird my calls to glClearColor for emscripten aren't working :/
17:57:52*yglukhov quit (Ping timeout: 260 seconds)
17:58:28FromGitter<Yardanico> @zacharycarter maybe you use something like "glVertex2d" too ?
17:58:42FromGitter<mratsim> Myrlang is fun: https://myrlang.org/lang-checklist.html
17:59:05FromGitter<Yardanico> we need to write something like this for nim :D
17:59:39adeohluwaback like my spinal cord!
17:59:55FromGitter<Yardanico> lol, "[x] The compiler crashes if you look at it funny"
18:00:16*BitPuffin|osx quit (Remote host closed the connection)
18:00:20adeohluwathe parsecsv module looks like it parses CSV
18:00:28FromGitter<Yardanico> yes
18:00:31adeohluwaI'm looking for something to write to CSV
18:01:07FromGitter<Yardanico> well you can just write it "by hand" :D
18:01:48FromGitter<zacharycarter> there is something that writes csv
18:01:53FromGitter<zacharycarter> I use it at work
18:01:56adeohluwahmm... since its just comma separated
18:02:01dom96I just stumbled on this: https://www.reddit.com/r/programming/comments/3vscie/i_am_a_developer_behind_ritchie_a_language_that/
18:02:09dom96Wondering how the hell it got 1.4k upvotes on Reddit
18:02:13adeohluwathought as much
18:02:15*yglukhov joined #nim
18:02:29FromGitter<Yardanico> yet another language, yay!
18:02:49dom96it looks dead anyway
18:02:52FromGitter<mratsim> @Yardanico I compiled Textual actually, and I tried to connect to #Nim but somehow I got into a room with 5 people only :/
18:02:52adeohluwaZachary: what's the name of the module?
18:02:53FromGitter<Yardanico> dom96: company support :P
18:02:54dom96but it's goals are basically aligned with Nim's
18:03:02FromGitter<Yardanico> @mratsim maybe #nim, not #Nim ?
18:03:09FromGitter<mratsim> oooohhh
18:03:18dom96lol, I don't think IRC is case sensitive
18:03:19FromGitter<zacharycarter> adeohluwa: Nim data
18:03:25dom96That would be craz
18:03:26dom96y
18:03:33*yglukhov quit (Remote host closed the connection)
18:03:43FromGitter<Yardanico> @zacharycarter a little bit of overhead :)
18:03:45*yglukhov joined #nim
18:03:50FromGitter<zacharycarter> just a little
18:03:52FromGitter<Yardanico> https://github.com/bluenote10/NimData
18:04:07FromGitter<zacharycarter> I think that's what I"m using anyway let me check
18:04:25FromGitter<zacharycarter> oh
18:04:27FromGitter<zacharycarter> no I'm using this
18:04:35FromGitter<zacharycarter> https://github.com/unicredit/csvtools
18:04:36FromGitter<zacharycarter> sorry
18:04:40adeohluwazacharycarter: awesome man, thanks!
18:04:48FromGitter<mratsim> NimData is impressive. I was wondering back in February if I should start a DataFrame or a multidimensional array library … then 1 week after came NimData
18:04:50FromGitter<zacharycarter> I'm using Nim adta too
18:04:56FromGitter<Yardanico> @zacharycarter oh, fine then!
18:04:57FromGitter<zacharycarter> Nim data too*
18:05:06FromGitter<zacharycarter> I'm using all the modules!
18:05:14FromGitter<Yardanico> we need to update awesome-nim
18:05:21FromGitter<Yardanico> https://github.com/VPashkov/awesome-nim
18:05:54*endragor_ quit (Remote host closed the connection)
18:06:37FromGitter<mratsim> There is no science/data/numerical computing section
18:06:49FromGitter<Yardanico> yeah
18:06:51FromGitter<Yardanico> so we need to add it
18:06:59FromGitter<Yardanico> hmm, I don't see any "real" examples here https://github.com/riolet/rix/tree/master/examples
18:07:01FromGitter<Yardanico> they're too small
18:07:26FromGitter<zacharycarter> there's no gaming section either :rollseyes:
18:08:16FromGitter<mratsim> lol
18:08:50FromGitter<mratsim> one of the other interesting language with a meta programming focus and easy C-C++ FFI I saw was terralang: http://terralang.org/
18:10:02FromGitter<Yardanico> yeah, it's highly integrated with lua
18:10:38FromGitter<Yardanico> so it doesn't have it's own VM
18:10:41FromGitter<Yardanico> it just uses Lua :)
18:10:52FromGitter<Yardanico> actually not bad
18:12:38*jsgrant quit (Quit: jsgrant)
18:19:36*jsgrant joined #nim
18:19:59*vegai left #nim (#nim)
18:25:06FromGitter<edubart> noted you mentioning terralua, I've considered using terralang before, I do code in lua a lot even today for a game that uses an open game engine that I created (the engine is in one of my github public repos)
18:26:20FromGitter<edubart> lua is not a bad lang, its simple, compact, you can almost embed everywhere, do easy C bindings
18:26:53Araqit's also error prone as fuck, every typo is a bug
18:26:56FromGitter<edubart> and terralang make its more powerful, although I doesn't seems active
18:27:09*jsgrant quit (Quit: jsgrant)
18:27:12Araqbut when you do live coding maybe it doesn't matter
18:27:30*jsgrant joined #nim
18:28:44FromGitter<edubart> this depends on the person, nim is every error prone for me, but mostly because I am not familiar
18:30:44Araqso ... your Nim typos produce bugs?
18:30:56Araqnever heard that before from anybody.
18:32:23FromGitter<Yardanico> well yeah, it's mostly the issue with interpreted languages
18:32:30FromGitter<Yardanico> they don't usually bother checking source code a lot
18:32:43FromGitter<Yardanico> maybe just check the syntax, and run the code
18:34:06FromGitter<Yardanico> so with Nim, if you have come type errors: try to compile, fail, fix, try again
18:34:25FromGitter<Yardanico> in python: run it and wait for needed code to execute, fail, fix, try again
18:34:36FromGitter<Yardanico> well it's actually true for most modern compiled languages
18:37:08adeohluwa@ araq is so blunt it always sound like he's joking :D
18:38:39adeohluwa@edubart I'll disagree & I'm also not super familiar with nim but I'm able to run just by glancing @ docs & Rosetta code example quick check
18:39:04adeohluwanaming conventions actually make sense
18:39:13*nsf quit (Quit: WeeChat 1.9)
18:39:14adeohluwaHTML parser is called HTML parser
18:40:06adeohluwacan u imagine y its not called the same in other languages beats me
18:41:22adeohluwau can say maybe error messages hasn't gotten to master QA level yet
18:49:13federico3Error: use the {.experimental.} pragma to enable 'parallel' <-- what?
18:51:08Araqedubart: btw the newSeqOfCap optimization is in the works, as I said, requires no API changes
18:52:38*jsgrant quit (Quit: jsgrant)
18:53:25*jsgrant joined #nim
18:55:01FromGitter<edubart> @Araq would be a plus if you fix it and also add newSeqUninitialized(len) and maybe a getCap(seq) function too
18:55:57Araqyou haven't convinced me of the merits
18:56:01FromGitter<edubart> and newSeqOfCap is not completely broken, I did see my RAM memory growing when using it
18:56:10*Sembei joined #nim
18:56:43*jsgrant quit (Remote host closed the connection)
18:56:45Araqyour FFI use cases were all covered by setLen()
18:57:37*Pisuke quit (Ping timeout: 248 seconds)
18:57:39FromGitter<mratsim> newSeqUninitialized would be nice when we want to memcopy lots of data from GPU, images and other binary format
18:59:42*jsgrant joined #nim
19:00:27FromGitter<zacharycarter> anyone have any ideas why my call to glClearColor wouldn't work w/ emscripten?
19:00:45FromGitter<zacharycarter> is it because I didn't call loadextensions? which I can't call anyway w/ emscripten
19:01:39FromGitter<mratsim> When I say a lot, the goal is to saturate all your GPU memory so, 8GB~12GB every 10 seconds or so
19:01:51*Serenitor quit (Ping timeout: 248 seconds)
19:06:10FromGitter<zacharycarter> nm figured it out
19:08:20shodan45lol, "You have reinvented Brainfuck but non-ironically"
19:08:42shodan45(from https://myrlang.org/lang-checklist.html )
19:09:00adeohluwaseems like I need to write a bot
19:11:51adeohluwaa quick google search shows nimbot
19:12:04FromGitter<Yardanico> IRC bot?
19:12:58adeohluwasocial media bot
19:13:04FromGitter<Yardanico> oh
19:13:21FromGitter<Yardanico> then you would use asyncdispatch + httpclient + json :)
19:13:30FromGitter<Yardanico> so it will talk with users through social network? or what?
19:14:39*yglukhov quit (Remote host closed the connection)
19:16:15dom96Anyone want to spearhead this? https://docs.travis-ci.com/user/languages/community-supported-languages/
19:17:59FromGitter<Yardanico> for someone who wants to do this - examples for other languages: https://github.com/travis-ci/travis-build/tree/master/lib/travis/build/script
19:19:59FromGitter<Yardanico> oh, they have crystal support
19:20:06FromGitter<Yardanico> in community :)
19:20:50dom96yep
19:20:58dom96Nim should be there too
19:21:21FromGitter<Yardanico> sadly we don't have nightly builds :(
19:22:01FromGitter<Yardanico> ah
19:22:06FromGitter<Yardanico> it seems we can compile nim too
19:22:43adeohluwaYardanico: yes... you are bn really useful
19:25:02FromGitter<Yardanico> hmm I don't really think we can compile nim every time
19:25:13FromGitter<Yardanico> probably it would only support stable builds (from ubuntu launchpad)
19:26:52FromGitter<Yardanico> dom96: we can use choosenim btw
19:26:58FromGitter<Yardanico> rust version uses rustup: https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/script/rust.rb
19:27:29*yglukhov joined #nim
19:27:44federico3Yardanico https://github.com/nim-lang/Nim/wiki/BuildServices
19:27:47dom96Yardanico: Yes, I am aware. You'd think I would already know that, seeing as I've written choosenim...
19:28:03FromGitter<Yardanico> federico3: these scripts are different
19:28:04federico3however CircleCI support docker images...
19:28:09dom96You can cache the builds, like I do for choosenim.
19:28:20adeohluwadom96: did I mention choosenim throws error on my Ubuntu 17:04
19:28:27dom96https://github.com/dom96/choosenim/blob/master/.travis.yml
19:28:29dom96adeohluwa: no?
19:28:33FromGitter<Yardanico> can you do caching with travis language script?
19:29:33dom96No idea
19:30:01dom96You can use docker though https://docs.travis-ci.com/user/docker/
19:30:18FromGitter<Bennyelg> Hey, I wanted to create some proc which can return something depends on the string passed into the proc
19:30:26dom96adeohluwa: Please report it.
19:30:29FromGitter<Yardanico> dom96: you can't here
19:30:40FromGitter<Yardanico> @Bennyelg you can only do that if string is known at compile-time
19:30:54FromGitter<Yardanico> (if you mean different types)
19:30:54FromGitter<Bennyelg> it is,
19:31:08FromGitter<Bennyelg> I need use the "when"
19:31:08FromGitter<Bennyelg> ?
19:31:10FromGitter<Yardanico> then change "string" to "static[string]" in procedure arguments
19:31:13FromGitter<Yardanico> and use when
19:31:21FromGitter<Bennyelg> i thought to use case
19:31:22FromGitter<Bennyelg> :|
19:31:38FromGitter<Yardanico> and declare return type like this: "int | string"
19:31:40dom96You probably want an object variant
19:31:45adeohluwadom96: unhandled exception: can not open /home/user/.nimble/bin/nim [IO Error]
19:32:09FromGitter<Bennyelg> example
19:32:18FromGitter<Yardanico> @Bennyelg what exactly you want to do?
19:32:39dom96adeohluwa: Gonna need more info.
19:34:08FromGitter<Bennyelg> @Yardanico ⏎ Im creating something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c565b0c101bc4e3af9e1c4]
19:34:35FromGitter<Bennyelg> then I want to call this client("s3")
19:34:52FromGitter<Yardanico> why not just use static enum instead of string ? :)
19:34:55FromGitter<Yardanico> it would be more convenient
19:35:12FromGitter<Bennyelg> I came from python which has not concept of enum :D
19:35:27FromGitter<Bennyelg> I need to get use into that concept
19:35:36dom96I don't think you should do this
19:35:40dom96Why are you doing this?
19:35:54FromGitter<Bennyelg> what do you mean why?
19:36:17dom96I mean, why don't you just call initS3Request() or initEC2Request() depending on what you need?
19:36:31*voiceftp quit (Quit: Leaving)
19:37:36FromGitter<Bennyelg> this is going to be extended but for now this is what it is, I want to initiate instance depends on the user request
19:38:56adeohluwadom96: can you give me specifics that you want
19:39:02adeohluwathats all the error I get
19:39:09adeohluwait doesn't install
19:39:24adeohluwaUbuntu 17:04, 64 bit
19:39:25dom96adeohluwa: what are you running?
19:39:36dom96Are you installing for the first time?
19:39:42dom96Are you attempting to execute 'nim'?
19:40:02dom96Best thing to do is to just copy your terminal's output
19:40:12dom96and create a gist and send me the link
19:40:27adeohluwafirst time install , curl https://nim-lang.org/choosenim/init.sh -sSf | sh
19:40:44adeohluwaalright will do that
19:42:52*Vladar quit (Quit: Leaving)
19:48:42*vlad1777d quit (Ping timeout: 260 seconds)
19:50:39dom96wow https://www.reddit.com/r/programming/comments/71ruk1/making_reel_valley_a_game_built_using_nim/dnd9ftu/?context=3
19:51:25FromGitter<Yardanico> cc @yglukhov :D
19:51:36dom96That's just rude.
19:51:54federico3trolls will be trolls
19:52:04FromGitter<Yardanico> well he already got -3
19:52:14FromGitter<Yardanico> -5
19:52:16adeohluwadom96: https://gist.github.com/Adeohluwa/6c86d6d761a2e490937ce19a0446ce85
19:52:20federico3also reddit is reddit
19:52:38FromGitter<Yardanico> adeohluwa: ah, you already have nim & nimble
19:52:51*vivus quit (Quit: Leaving)
19:52:56FromGitter<Yardanico> maybe it's because you're running it as root?
19:53:23adeohluwaI tried without root too
19:54:04dom96that's really weird
19:55:02dom96Can you do `curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh` and then edit this line: https://github.com/dom96/choosenim/blob/master/scripts/choosenim-unix-init.sh#L50
19:55:07dom96just add "--debug"
19:55:29dom96then run with 'sh init.sh'
19:56:30*astronavt quit (Remote host closed the connection)
19:59:27adeohluwayes , let me do that now
19:59:27*voiceftp joined #nim
20:00:54adeohluwaso I ran & got an init.sh on my box
20:00:59*vlad1777d joined #nim
20:01:10adeohluwarunning the sh init.sh gives same error as earlier
20:01:41dom96no other output?
20:02:13adeohluwawhere should I add the debug option?
20:02:17adeohluwa--debug
20:02:24FromGitter<Yardanico> "/$temp_prefix/$filename" stable --firstInstall --debug < /dev/tty
20:03:24dom96^^
20:04:01adeohluwadom96: no other output
20:05:05dom96so do you have 'nim' in ~/.nimble/bin?
20:07:54FromGitter<Yardanico> yes he does
20:08:02FromGitter<Yardanico> ah, maybe not
20:08:15FromGitter<Yardanico> nim doesn't put its binary in .nimble/bin by default
20:08:46dom96indeed
20:09:13FromGitter<Yardanico> maybe it failed to create "nim" binary?
20:10:12adeohluwadom96: no I dont
20:10:17adeohluwabut I have nimcr there
20:10:41adeohluwaYardanico : it doesn't create a nim binary
20:13:06*rusua quit (Quit: Connection closed for inactivity)
20:13:27FromGitter<Yardanico> I mean it "failed" to create a nim binary
20:15:12adeohluwait fails on my server too
20:15:28adeohluwait downloads nim on the server
20:15:30adeohluwaextracts
20:15:34dom96it should begin by downloading though
20:15:37adeohluwa& fails to build
20:15:45dom96that sounds like a separate problem
20:15:53dom96show me the output of that as well please
20:16:21dom96on your computer though, something you could do to investigate this is run `strace`
20:22:20adeohluwahttps://gist.github.com/Adeohluwa/a49409d249d9f09a4a69b8efd867fb28
20:22:28adeohluwathats for the server
20:22:43adeohluwacopied out the whole error
20:23:41dom96interesting
20:23:46dom96is your server missing linenoise
20:23:47dom96?
20:24:23yglukhovYardanico: thanks, answered. =)
20:24:31FromGitter<mratsim> The guy on reddit should have said horseshit :P
20:28:16FromGitter<mratsim> I’d like to add yglukhov, I read a lot of Python production codebase and proc are littered with “isInstance()” pixie dust (isInstance(String), else if isInstance(Int) ...
20:29:07adeohluwadom96: how do I check for line noise?
20:29:53yglukhovmratsim: true. dom96's answer is somewhat close to your point, imo.
20:30:15dom96adeohluwa: hrm, no, it seems that linenoise is statically compiled in
20:31:20dom96Try running `gcc -c -w -pthread -O3 -fno-strict-aliasing -I/root/.choosenim/toolchains/nim-0.17.2/lib -o nimsuggest/nimcache/linenoise.o /root/.choosenim/toolchains/nim-0.17.2/lib/wrappers/linenoise/linenoise.c`
20:33:01*solitudesf joined #nim
20:34:15adeohluwaerror no such file or directory
20:34:36adeohluwaFatal error: no input files
20:34:52adeohluwacompilation terminated
20:36:35dom96oh, it's because choosenim cleaned it :/
20:38:19*nsf joined #nim
20:40:00dom96adeohluwa: I don't suppose you could give me access to this server so that I could try to figure it out?
20:40:08*vlad1777d quit (Ping timeout: 240 seconds)
20:40:57FromGitter<Yardanico> @yglukhov , wow! https://github.com/yglukhov/android
20:41:12FromGitter<Yardanico> can I make a guess - you made this firstly for your game?
20:41:17FromGitter<Yardanico> and then open-sourced it ? :)
20:41:29*Ven`` joined #nim
20:41:38FromGitter<Yardanico> ah, sorry, you made it earlier
20:42:54adeohluwadom96: I will man!
20:44:16dom96oh, actually I just got an idea about what it might be.
20:44:30dom96The VPS has 512mb of RAM, to compile Nim you might need more
20:45:55FromGitter<Yardanico> well choosenim should display a compiler error maybe?
20:46:01FromGitter<Yardanico> if compiler exit code isn't 0
20:46:49dom96It does.
20:48:12*vlad1777d joined #nim
20:49:29FromGitter<Yardanico> btw I use choosenim on windows :)
20:49:39FromGitter<Yardanico> because I don't use it often
20:51:19*libman joined #nim
20:52:53adeohluwadom96: oh, okay
20:53:02adeohluwawill spin up 1 GB & try it
20:53:08adeohluwawill report here
20:57:05*vlad1777d quit (Ping timeout: 240 seconds)
21:01:42*manjaro-kde5- quit (Quit: Konversation terminated!)
21:02:13FromGitter<mratsim> What’s the proper way to unit test if a proc is properly defined? ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ when not compile doesn’t want my proc definition [https://gitter.im/nim-lang/Nim?at=59c57a55b59d55b823295fa0]
21:02:35FromGitter<Yardanico> when compiles(stuff) ?
21:03:55FromGitter<Yardanico> @mratsim btw, did you try to run Arraymancer on windows?
21:06:00FromGitter<mratsim> I can’t do when compile(proc boo … multiline …), and just declaring the proc will stop the whole test suite (which is ugly but well, if it’s not possible to have the test suite continue, I’ll take it)
21:06:34FromGitter<mratsim> I didn’t try on Windows but there is Appveyor CI so it should work. I do have to configure CI for cuda builds on Windows and Linux
21:07:15FromGitter<Yardanico> well what blas library did you install?
21:08:01FromGitter<Yardanico> @mratsim you can do when compiles inside of a proc?
21:08:11FromGitter<mratsim> OpenBLAS
21:08:34FromGitter<Yardanico> @mratsim yeah, I've placed it in one folder with arraymancer example, but it still says that it can't load blas.dll
21:12:24*vlad1777d joined #nim
21:12:47FromGitter<mratsim> I think you have to rename libopenblas.dll, this is the Appveyor script. I’ll check if nimblas has more info on the windows build ⏎ ⏎ 1) ps: nuget install OpenBLAS -o "${env:APPVEYOR_BUILD_FOLDER}" ⏎ 2) ps: cp OpenBLAS.0.2.14.1/lib/native/bin/x64/libopenblas.dll blas.dll [https://gitter.im/nim-lang/Nim?at=59c57ccf7b7d98d30d27e4a3]
21:13:58FromGitter<mratsim> Otherwise you can modify nimblas nimble file with switches: ⏎ ⏎ switch("clibdir", "/usr/local/opt/openblas/lib") ⏎ switch("cincludes", "/usr/local/opt/openblas/include") [https://gitter.im/nim-lang/Nim?at=59c57d167b7d98d30d27e5ff]
21:17:12*Trustable joined #nim
21:26:04*Serenitor joined #nim
21:42:15*jsn- joined #nim
21:43:34FromGitter<Yardanico> Lol
21:43:37FromGitter<Yardanico> https://github.com/thepowersgang/mrustc
21:48:52SerenitorI've got a table with 37 items in it (len) but the keys iterator only goes over 30 of them... anyone experienced something similar know what's going on here?
21:49:37dom96Share your code :)
21:54:49*madmalik quit (Quit: Connection closed for inactivity)
21:55:49*Jesin quit (Quit: Leaving)
21:57:14Serenitoralright there's probably a lot of stuff in here that's not relevant but if you could have look at wipeAssetTable() please
21:57:16Serenitorhttps://hastebin.com/emarikaley.nim
21:57:40Serenitornum items in asset table before wipe: 37
21:57:40Serenitoritems iterated over: 30
21:57:40Serenitoritems passed to free(): 30
21:57:40Serenitornum items in asset table after wipe: 7
21:58:02dom96Well first thing would be to reproduce this
21:58:05dom96outside of your script
21:58:07dom96try that first
21:58:17dom96Then second thing would be changing the casing of your types
21:58:28dom96The convention is to start with UpperCase letters for types.
21:59:36obadzis there an easy way to turn a string in a array[N, char] ? cstring() gives a type error. Do I need to loop?
22:01:33Serenitori'll see to it to set up a test case. though i'd like to have be type's casing consistent with the default types (int, float, ...). i use uppercase for constants and enums values
22:02:12*jsgrant quit (Quit: jsgrant)
22:02:13FromGitter<zacharycarter> obadz: ⏎ ⏎ ```let s = "Hello World" ⏎ ⏎ echo @s``` [https://gitter.im/nim-lang/Nim?at=59c58865b59d55b823299bea]
22:02:23dom96Serenitor: those are primitive types
22:02:25FromGitter<zacharycarter> not an array but a seq
22:02:35*jsgrant joined #nim
22:02:38dom96Every other type in the stdlib starts with upper case
22:03:38obadz@zacharycarter: type mismatch: got (seq[char]) but expected 'array[0..9, char]
22:04:27FromGitter<zacharycarter> obadz: like I said that wil produce a seq not an array
22:04:32FromGitter<zacharycarter> array size must be known at compile time
22:04:53obadzyes but there could still be a function that copy seq to array and throws if size isn't appropriate
22:05:33FromGitter<Yardanico> Well why do you need an array?
22:05:59FromGitter<zacharycarter> then - ⏎ ⏎ ```let s = "Hello World" ⏎ ⏎ echo repr cast[array[10, char]](s)``` [https://gitter.im/nim-lang/Nim?at=59c58947c101bc4e3afa7b96]
22:06:01obadz@Yardanico: C FFI
22:06:12FromGitter<zacharycarter> just use a seq and pass
22:06:18FromGitter<zacharycarter> addr seq[0]
22:06:21obadzfor k, v in pairs("..."): a[k] = v works..
22:06:28FromGitter<Yardanico> Yes, you don't need an array here
22:06:40FromGitter<Yardanico> You can pass your seq to C
22:06:43obadzah ok
22:07:09*jsgrant quit (Client Quit)
22:07:33*jsgrant joined #nim
22:08:04FromGitter<zacharycarter> webgl is super annoying
22:08:32FromGitter<zacharycarter> all my drawing code looks correct but of course nothing is rendering
22:08:44FromGitter<zacharycarter> at least I can clear the window different colors :P
22:09:00*claudiuinberlin joined #nim
22:12:13obadzI guesshmmm
22:12:16obadzlet s = "blah"; let x = cast[array[10, char]](s); echo "Array: ", $x
22:12:20obadzthis produces garbage
22:12:42obadzor is $ not going to work on an array of chars?
22:13:45FromGitter<zacharycarter> mind posting code representing what you're trying to do with C FFI
22:13:51FromGitter<zacharycarter> might be able to help more
22:14:40obadzfirst time I'm asked for the code mess when I've boiled it down to the 1-line repro :)
22:14:51obadzI'm trying to call ioctl()
22:15:16obadzit takes an ifreq struct that has tons of submembers with unions, arrays, etc.
22:15:30obadzI've used c2nim and fiddles with the result until it compiled
22:16:14obadzbut now I struggle to instantiate values of this type (I'm a nim newb). I've figured out how to deal with unions but not sure how to deal with arrays.
22:16:16FromGitter<zacharycarter> all I really need to see is the proc signature you've produced for binding and how you're trying to call it
22:17:03FromGitter<zacharycarter> maybe you need an unchecked array?
22:17:05FromGitter<zacharycarter> not sure
22:17:19obadzI'm calling Posix.ioctl, but passing stuff in the untyped varargs
22:17:28obadzso I don't think the signature will help
22:18:02obadzhttps://gist.github.com/obadz/f4d8a1ed3974c1330bc964835148ad24 ⇐ this is the ifreq type
22:18:18obadzifrn_name for instance is an array[IFNAMSIZ, char]
22:18:27obadzhow should I instantiate that?
22:22:36FromGitter<zacharycarter> it's weird ifr_ifrn_union is a union
22:22:47FromGitter<zacharycarter> because it's apparently not unioning anything?
22:22:48FromGitter<zacharycarter> but uh
22:23:03obadzit's unioning all the members below?
22:23:08obadzoh
22:23:11obadzsorry yes
22:23:15obadzI named that one badly
22:23:36obadzlet me check why c2nim made it a union
22:25:29obadzhttps://github.com/torvalds/linux/blob/master/include/uapi/linux/if.h#L230-L252 ⇐ I guess c2nim is doing what it's told…
22:26:24obadzanyway the union isn't the issue here. I don't understand why this snippet corrupts memory: let s = "blah"; let x = cast[array[10, char]](s); echo "Array: ", $x
22:26:44FromGitter<zacharycarter> we probably need Araq for this convo, or someone with more Nim knowledge than myself
22:27:11obadzk, thanks for trying.
22:27:46FromGitter<zacharycarter> sure thing, sorry I can't be of more use
22:28:52obadzlol so if I do let x = cast[array[10, char]]("hi".cstring)
22:29:03obadzx[0] == "R" and x[1] == "C"
22:29:09obadzI assume that's for refcount? ;-)
22:30:19*yglukhov_ joined #nim
22:33:12*yglukhov quit (Ping timeout: 260 seconds)
22:34:11Serenitor@dom96 I've been able to reproduce my issue in a little test case. is this more helpful? https://hastebin.com/alajahiyak.nim
22:35:18dom96Serenitor: yes, please report it on github
22:35:28Serenitorwill do
22:35:47*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
22:38:31obadzso casting to a pointer works
22:38:33obadzlet s = "blah"; let x = cast[ptr array[10, char]](s.cstring); echo "Array: ", $x[]
22:38:48*dhalinar joined #nim
22:38:50obadzthis does not produce garbage
22:40:56obadzso I can get my actual array by doing ( cast[ptr array[10, char]](s.cstring) )[] — god knows what the lifetime of this thing is
22:41:02obadzthere must be a better way.
22:41:05*solitudesf quit (Ping timeout: 248 seconds)
22:41:59*vivus joined #nim
22:54:01dom96aww yeah, Linux + OSX binaries built by Travis
23:01:10*nsf quit (Quit: WeeChat 1.9)
23:09:19*zachk quit (Quit: have a good evening....)
23:09:24FromGitter<zacharycarter> dom96: NICE!
23:10:31obadzdom96: seems your book states that putting x on last line of function, or writing return x, or result = x are all equivalent. I'm observing otherwise.
23:10:47dom96oh?
23:11:36FromGitter<zacharycarter> they should be equivalent
23:11:42obadzdom96: https://gist.github.com/obadz/f30ba172e301d6fe638a43b743dbbbe8
23:12:54obadzis it possible that the implicit returns aren't forcing a copy?
23:15:11FromGitter<zacharycarter> def seems like a bug
23:16:01obadzif dom96 seconds that, I'll file a report
23:17:43dom96yeah, I dunno
23:17:45dom96file it anyway
23:20:02obadzhttps://github.com/nim-lang/Nim/issues/6422
23:23:52*relax joined #nim
23:26:37*ipjk joined #nim
23:30:19FromGitter<genotrance> @zacharycarter: I've posted an updated version of autodup that should hopefully compile on Mac now https://www.dropbox.com/s/149gz1k3taoehp8/autodup.zip?dl=0, it still crashes after running for a while with autodup -M <path to music library>
23:34:49FromGitter<zacharycarter> @genotrance seems to build fine
23:35:03FromGitter<zacharycarter> and run fine too
23:35:41FromGitter<zacharycarter> going to leave it running and see what happens
23:36:29FromGitter<genotrance> thanks!
23:36:41FromGitter<zacharycarter> np!
23:37:09FromGitter<genotrance> I tried to use a native Nim SHA256 library but they are super slow
23:37:35FromGitter<genotrance> tried both nimSHA2 and sha3 and they were hogging the CPU and took a long time for small files
23:37:58FromGitter<genotrance> replaced it with native C code and it works great now
23:38:45FromGitter<zacharycarter> :/
23:38:54FromGitter<genotrance> https://sourceforge.net/p/mailfs/svn/50/tree/trunk/mailfs/modules/hash/sha256.c
23:39:15FromGitter<zacharycarter> I wonder why the native nim modules are slow
23:39:45FromGitter<genotrance> i don't know why the Nim versions were so bad - like literally 50 times slower - I am turning on full debugging but even without that they are slow compared to sha256sum which is almost instantaneous
23:40:10FromGitter<zacharycarter> did you try release mode?
23:40:28FromGitter<genotrance> yes
23:40:37FromGitter<zacharycarter> hrm I have no idea then
23:41:35FromGitter<Varriount> Have you tried enabling link time optimizations?
23:42:34FromGitter<genotrance> @Varriount: not sure how to do that and what it does 
23:44:48FromGitter<Varriount> @genotrance `--passC:'-flto'`
23:45:32FromGitter<Varriount> Also, I would be interested in looking at the code that was using NimSHA
23:45:44FromGitter<genotrance> let me put together a test and share
23:46:18FromGitter<genotrance> what's a good way to time execution in Nim?
23:49:56dom96Choosenim 0.3.0 now out :D
23:50:23FromGitter<Varriount> @genotrance https://stackoverflow.com/questions/36577570/how-to-benchmark-few-lines-of-code-in-nim
23:51:29FromGitter<genotrance> @Varriount: thank you
23:53:23*Trustable quit (Remote host closed the connection)
23:54:09FromGitter<Varriount> I'd probably use a standard C benchmarking program