<< 03-02-2017 >>

00:03:18zachcarterdom96: I got sprite batching working last night on my little engine thing - https://github.com/zacharycarter/derelict
00:06:43*Matthias247 quit (Read error: Connection reset by peer)
00:23:30FromGitter<timeyyy> :subset http://akehrer.github.io/posts/connecting-nim-to-python/
00:26:32FromGitter<timeyyy> :subset http://goran.krampe.se/2014/10/16/nim-wrapping-c/
00:26:54FromGitter<timeyyy> https://github.com/jboy/nim-pymod/blob/master/README.md#usage
00:34:33*anis` joined #nim
00:36:03anis`hi
00:38:59zachcarterhi
00:40:52*pregressive joined #nim
00:42:23PMunchThanks for all the help over the past few days. I've finally managed to write my own macro that actually does something useful :)
00:42:53PMunchIt basically creates a DSL for creating WxWidgets UIs
00:44:30anis`Does it works? I'm just testing ERC in emacs in first time
00:44:54PMunchDoes what work?
00:45:27PMunchanis`?
00:45:51anis`Okay. good. It works. I can send message. You can read it :-)
00:46:34PMunchI'm off to bed now, thanks again (and if you are interested in the macro don't worry, I'll post it soon)
00:46:47*PMunch quit (Quit: leaving)
00:50:39*bitwize joined #nim
00:58:43*anis` quit (Quit: ERC Version 5.2 (IRC client for Emacs))
01:00:08*xet7 joined #nim
01:28:40*kulelu88 quit (Quit: Leaving)
01:33:20*couven92 quit (Quit: Client disconnecting)
02:02:22*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
02:12:05*vlad1777d quit (Remote host closed the connection)
02:13:09*MyMind quit (Ping timeout: 240 seconds)
02:14:21*chemist69 quit (Ping timeout: 252 seconds)
02:19:36*arnetheduck joined #nim
02:29:19*chemist69 joined #nim
02:55:19*yglukhov joined #nim
03:00:06*yglukhov quit (Ping timeout: 260 seconds)
03:00:12*zachcarter is now known as carterza
03:02:58*synshroud quit (Quit: ZNC 1.6.4 - http://znc.in)
03:10:03*synshroud joined #nim
03:16:53*arnetheduck quit (Ping timeout: 255 seconds)
03:26:42*trusion joined #nim
03:58:47*MyMind joined #nim
04:16:00*chemist69 quit (Ping timeout: 276 seconds)
04:20:08*chemist69 joined #nim
04:29:57*benoliver999 quit (Ping timeout: 256 seconds)
04:35:38*benoliver999 joined #nim
04:39:09*def-pri-pub quit (Quit: leaving)
04:49:15*LeNsTR quit (Changing host)
04:49:15*LeNsTR joined #nim
05:26:45*brson quit (Quit: leaving)
05:56:27ftsfwhat is genericReset used for?
05:59:16carterzano idea…
05:59:43ftsfin other news, i've got my nim code running on a nintendo 3DS =)
06:00:05carterzaawesome!
06:00:22carterzacurrently I’m struggling with packing four float values into one
06:00:37carterzawell not really
06:00:41carterzathat’s easy
06:00:57ftsfexcept it crashes when compiling with gc="stack" but works with gc="none"
06:00:58carterzaI’m struggling with the opengl attribute code I imagine, getting the float to turn into a vec4 properly
06:01:15ftsfcarterza, hmm so it's just wanting an array of 4 floats?
06:01:37carterzawell what I”m trying to do is pack all four floats into one float
06:01:44carterzaso I can just send color data per vertex
06:01:47carterzato my shader
06:02:00ftsf=\
06:02:20ftsfso you want to compress your colour data into a single float value?
06:02:25carterzaexactly
06:02:59ftsfsounds like you're making it hard for yourself?
06:03:20carterzahow so?
06:04:25ftsfjust set the attribute size to 4?
06:05:03carterzaoh I did that
06:05:36ftsfglVertexAttribPointer(attrId, 4, GL_FLOAT, GL_FALSE, 0, cast[pointer](0)) i think?
06:06:45carterzahttps://gist.github.com/zacharycarter/038c4f30c83b07daa75fcd329eef7011#file-mesh-nim-L3-L9
06:07:48carterzasetting the stride to 0 for the last attribute got me different results
06:07:51carterzastill not correct though
06:08:15ftsf#color ... vertices.add(-4.2536...
06:08:57ftsfthat's your compressed color float? just add 4 entries
06:09:34ftsf3 (coord), 2 (uv), 4 (color), should have 9 entries per vertex
06:09:42carterzaah yeah but I want to do
06:09:45carterza3 coord 2 uv 1 color
06:09:48carterzaall channels in that 1 float
06:10:11carterzaI can get the 9 working fine
06:10:18ftsfso set size to 1 for color then
06:10:27carterzaokay
06:10:53ftsfso your shader decompresses the colours from the float?
06:11:22carterzait doesn’t
06:11:31ftsfi don
06:11:39ftsfi don't understand what you're trying to do then...
06:11:41carterzamaybe that’s the step I’m missing
06:11:57carterzaessentially I was trying to encode a vec4 as a float
06:12:02carterzain software
06:12:04ftsfwhy?
06:13:25carterzaI was looking at libgdx’s spritebatch when writing mine and that’s how they were passing their color data to the vertex shader
06:13:41carterzaI thought it was an interesting approach instead of having to add four more floats for every vertex, just add one
06:15:35ftsfdoes a spritebatch even need vertex color?
06:15:48carterzanot necessarily but it’d be nice to be able to pass it in
06:15:58carterzasay like you want to start tinting your sprites
06:16:21carterzaI could just handle it as a uniform
06:16:42ftsfthen it'd apply to all sprites
06:16:59carterzait would
06:16:59ftsfi think go with the simple option and use 4 floats
06:17:05carterzaI agree
06:17:10ftsfcan always optimise later if need be
06:17:16carterzatrue dat
06:17:24carterzathank you for the help though
06:18:50ftsfnp, hope it helps
06:30:24FromGitter<Varriount> carterza: NimGDX?
06:30:30carterza:D
06:30:32FromGitter<Varriount> :D
06:30:32carterzamaybe one day
06:30:52carterzaVarriount I’ll share some code with you soon I made some optimizations based on your suggestions last night / today
06:31:04FromGitter<Varriount> I'd seriously donate money for development of such a library
06:32:06FromGitter<Varriount> Games, especially the kind that libgdx's framework supports, seem right up Nim's alley.
06:35:31FromGitter<Varriount> From what I can tell, a large portion of work in LibGDX is writing a OpenGL 2 layer
06:36:51*nsf joined #nim
06:37:38ftsf\o/ doesn't crash when i reduce the StandaloneHeapSize when using gc=stack
06:47:35*unlaudable joined #nim
06:48:15carterzahttps://github.com/zacharycarter/derelict/blob/master/src/derelictpkg/spritebatch.nim
06:48:25carterzaVarriount ^
06:49:58carterzatime for alpha blending I guess
06:51:33carterzathen i actually need to fix the matrix stuff and start writing a scene graph
06:53:33carterzahttp://imgur.com/a/K3CNj
06:53:34carterzathat was easy :D
06:56:56*yglukhov joined #nim
06:58:06*pregressive quit (Remote host closed the connection)
06:58:42*pregressive joined #nim
07:01:42*yglukhov quit (Ping timeout: 258 seconds)
07:03:06*pregressive quit (Ping timeout: 240 seconds)
07:03:13*bjz joined #nim
07:07:23FromGitter<Varriount> carteza: Just an tip, line 77 does a sequence copy.
07:07:44FromGitter<Varriount> (I think it's 77, I'm on a phone)
07:10:14carterzaah yeah but vertices is always going to be an empty sequence
07:10:32FromGitter<Varriount> Huh, why?
07:10:45carterzait gets initialized but I never add anything to it
07:10:55carterzaI just make a copy of it
07:10:57carterzaadd to the copy
07:11:33carterzaI guess I could just instead add to it and clear it every time I add vertices to it
07:13:36carterzayeah that works too
07:14:43FromGitter<Varriount> Carterza: You can use the setLen procedure to set the length of a sequence to zero, thus reusing the allocated memory
07:17:08carterzathanks Varriount I’ll make that change, I didn’t even think about that
07:20:19FromGitter<Varriount> Actually, I don't know if a sequence ever shrinks it's internal array...
07:20:44FromGitter<Varriount> I mean, other than when the sequence is completely deallocated
07:28:39FromGitter<Varriount> carterza: Sorry if I seem harsh, it's quite good code. Far better than anything I've written which interfaces with opengl
07:29:20carterzanot at all
07:29:41carterzaand thank you
07:37:28*Vladar joined #nim
08:00:48*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:03:38*Matthias247 joined #nim
08:06:08*rokups joined #nim
08:14:11*Kingsquee quit (Read error: Connection reset by peer)
08:14:34*Kingsquee joined #nim
08:36:00*Parashurama joined #nim
08:38:48Parashuramacarterza: Hey are you still looking at a way to pass your color data to opengl as 4 bytes? instead of 4 floats
08:46:17*stisa quit (Ping timeout: 255 seconds)
08:49:45*Andris_zbx joined #nim
08:53:23*yglukhov joined #nim
08:54:57*stisa joined #nim
08:55:20FromGitter<andreaferretti> @federico3 Turns out, github *can* display instructions to people opening an issue https://help.github.com/articles/creating-an-issue-template-for-your-repository/
09:01:56Araqandreaferretti: it's testing time
09:02:06Araqdevel has a new set of name mangling rules
09:02:10*sz0 joined #nim
09:03:26ParashuramaAraq: I got stuck with the volatile issue yesterday. The problem is I see no way to figure out at variable init if a variable is used later in try block.
09:04:55Araqlook what the compiler does for assignments
09:05:17Araqthat check needs to consider every access to the local variable instead or something
09:05:54ParashuramaThat's what i was thinking, but it was already late , so i went to bed :)
09:08:11*chemist69 quit (Ping timeout: 264 seconds)
09:08:49ParashuramaAraq: well, the new set of name mangling rules appear to work. personal project of 133129 lines compile just fine and works as expected.
09:09:28Parashuramaseems also slightly faster (~5%)
09:09:34Parashuramafaster to compile
09:12:19*chemist69 joined #nim
09:13:37Araqfor me it's slower, as usual :-(
09:14:35ParashuramaWell my CPU isn't all that fast anyway, IvyBridge i5 mobile
09:15:27ParashuramaIt could also be the many small files written in nimcache. I usually use a ramdrive for that.
09:15:39Parashurama*that reason.
09:20:26FromGitter<andreaferretti> @Araq can I test devel or should I look into some branch?
09:20:55Araqdevel
09:22:14FromGitter<andreaferretti> just tested - everything's fine :-)
09:22:19FromGitter<andreaferretti> I now have a script
09:22:27FromGitter<andreaferretti> much easier
09:23:29FromGitter<andreaferretti> eventually it would be nice to have a community build bot for libraries
09:23:48FromGitter<andreaferretti> so that it becomes easier to test that new releases of the compiler do not break anything
09:24:07flyxwhat's the status of http://ci.nim-lang.org/ ?
09:24:32FromGitter<andreaferretti> like this https://github.com/scala/community-builds
09:25:57*yglukhov quit (Remote host closed the connection)
09:33:58ftsfhmm got my nim app running pretty nicely on a 3DS. but it crashes when I do `echo someVar` echo "stringliteral" works fine
09:34:21Araqftsf: use setupForeignThreadGc()
09:35:11ftsfshould mention i'm using gc="stack", and no threads as far as i'm aware
09:35:43ftsfsetupForeignThreadGc is undeclared
09:37:34Araqoh yeah
09:37:42Araqguys, why is travis red?
09:37:50Araqeverything in the logs is perfectly fine
09:39:58*carterza quit (Quit: carterza)
09:46:21*ibk joined #nim
09:47:29FromGitter<konqoro> hey guys, any examples of modules communicating with a foreign process though osproc, that have a clean architecture?
09:51:02ftsfmmm i can use printf instead
09:51:58*yglukhov joined #nim
09:58:56ftsfcan I set the function to use for allocating/freeing memory?
10:06:15*Trustable joined #nim
10:06:46*yglukhov quit (Remote host closed the connection)
10:06:55Araqftsf: you need to patchFile osalloc.nim
10:07:03Araqin your config
10:07:22Araqthere is also some switch for malloc() -d:useMalloc iirc
10:07:36ftsfthanks, wasn't aware of that feature
10:12:15*couven92 joined #nim
10:14:38FromGitter<andreaferretti> @flyx I am not sure of the status of that
10:14:46FromGitter<andreaferretti> but last time I saw it
10:14:54FromGitter<andreaferretti> it was just doing `nimble install` on libraries
10:15:30FromGitter<andreaferretti> the problem is that for most libraries, there is nothing to install, so that command amounts to just checking that one is able to copy a directory
10:15:59FromGitter<andreaferretti> in fact, all failures that I saw on my libraries were network issue while cloning with git because the server was overloaded
10:16:21FromGitter<andreaferretti> I think a completely different approach should be used
10:16:56FromGitter<andreaferretti> first, libraries should be added manually, so that when something goes wrong, a mantainer can be contacted
10:17:20FromGitter<andreaferretti> second, when adding a library, one should be able to register what command to use to test it
10:17:27FromGitter<andreaferretti> even if it is just `nimble test`
10:18:33FromGitter<andreaferretti> having a manual process of registration is also useful to filter out old libraries that are not mantained and do not work anymore
10:19:53*yglukhov joined #nim
10:21:02Araqyep. listen to andreaferretti.
10:32:02*bjz joined #nim
10:48:39*cheatfate joined #nim
10:49:24cheatfatedemi-, as i see your nim's PR was accepted to `micro`, so i can wait for binary builds today at midnight?
10:49:49cheatfatedemi-, because currently `micro` build is failing now, for some reason
10:51:03Araqwat is micro?
10:51:46*yglukhov quit (Remote host closed the connection)
11:00:30stisaAraq: https://github.com/zyedidia/micro I think
11:01:32cheatfateAraq, first console editor with nim's color syntax support
11:02:45cheatfateand because of my religion, i can't install go to compile it, but i can use binary builds :)
11:03:14*PMunch joined #nim
11:03:25Araqoh ok
11:05:04FromGitter<vegansk> @cheatfate, I thought it was vim or emacs :-)
11:05:28Araqnot sure why keyboard commands are easier to transmit over the wire than mouse clicks but I learned to not ask any questions.
11:06:39Araq"my server has no UI" yeah I know and there is no reason for it. it's just a dependency like any other. Does your server lack Python too? if not, why not?
11:07:10cheatfatevegansk: yeah you are right, but vim is for unix monsters, and emacs has too many dependencies
11:07:48cheatfateAraq, when you are running 6 VMs at once for testing installing everywhere Gnome/KDE/(any other useless shit) is too expensive
11:08:08cheatfateso its better to have nice small console editor with color syntax support
11:08:22FromGitter<vegansk> @Araq, because, if I can use console editor, UI is unneeded dependency, instead of python :-)
11:08:37PMunchAraq, my server has no UI makes sense. Unless your talking about a web-interface (which could be explained as well, security and all that). My server doesn't have a screen, why would it need a UI?
11:08:59PMunchPlus, Vim is awesome :)
11:09:20Araqhmm let's see. so that you can operate it more easily?
11:11:08PMunchWhy it doesn't have a screen? I'm hardly ever around it where it physically stands, so I just use it over ssh.
11:11:30Araqbut sure, if you think the invention of the mouse or different windows/tabs was pointless there is indeed no need to change anything.
11:11:49Araqthe fact that you think it needs a screen for that is quite telling though :-)
11:12:37PMunchNot pointless, they're great for my desktop. But for server stuff it's just as easy to do everything over ssh.
11:13:08Araqrun "top", quit it again, ... run "nano", quit it again ...
11:13:19cheatfateAraq, i still like black/green screens :)
11:13:21Araqsure, "just as easy"
11:13:32PMunchOr use a multiplexor and have both open at the same time
11:14:35cheatfateAraq, this dispute is looks like dispute why VSCode is better then SublimeText
11:15:26Araqit's really 80*20 "chars" vs X*Y "pixels". it's pathetic to argue 80*20 chars is "better" or "just as convenient"
11:15:27cheatfatewhy waste electricity to run graphics UI for using mouse if you can do it with keyboard
11:15:31PMunchPlus, keeping everything on the command line means the threshold for the device that does the interfacing is really low. I've often ssh'ed in from my phone to do stuff, that would be a pain if I were to use something like a remote desktop.
11:16:08cheatfateAraq, modern terminals far far away from 80*20 (and you are wrong because it always was 80x25)
11:16:17PMunchYeah..
11:16:53PMunchNow it's basically x/charWidth×y/charHeight
11:17:08PMunchIt would even save you space as you don't need all the borders and UI elements
11:21:11*yglukhov joined #nim
11:23:07*yglukhov quit (Remote host closed the connection)
11:24:40cheatfatealso mouse is pretty useless tool, because `double click to select word`, `right click to open popup menu`, `left click to select copy`, `move around using scroller`, `right click to open popup menu`, `left click to paste`...
11:25:09cheatfateand with keyboard you can do same things much faster...
11:26:11cheatfate`ctrl + something to select word`, `ctrl + something to copy`, `page ups/downs and left/right to position`, `ctrl + something to paste`.
11:27:02Araqdepends on the task. and it's a self fulfilling prophecy.
11:27:08*planhths joined #nim
11:27:38Araqfor example, you likely edit an image on your local machine and then push it to the server rather than edit it on the server.
11:28:04Araqwith ssh+nano you edit the text file directly on the server though.
11:28:07Araqbecause you can.
11:28:11cheatfateAraq, we are not talking about images here, because for programmer most used tool - text editor
11:28:42Araqyes and ordinary users are not server admins. and now we know why ;-)
11:29:19*yglukhov joined #nim
11:29:49*sz0 quit (Quit: Connection closed for inactivity)
11:31:59PMunchWell obviously you still use your desktop to create content. And you do server tasks on the server.
11:32:12cheatfatesome people installing ISPManager to manage linux box, some people could not install FreeBSD :)
11:32:33PMunchI would edit a config directly on my server. But I would have a repo with the code for my server and write it on my own machine.
11:33:32Araqhttps://github.com/nim-lang/Nim/issues/5293 fix this on a machine you only have ssh access to.
11:33:47Araqand record it.
11:33:57Araqit's an exercise in masochism.
11:34:07PMunchAs I mentioned the text-only interface is very easily accessible for low-end devices. I could sit on top of a mountain and fix something wrong with my server on my phone over a 2G connection.
11:35:08Araqyes I know. you simply stick to the subset of things that work and declare victory and "I don't need it"
11:35:40PMunchBut you wouldn't do that. You would pull the repo from git, fix it locally, then push it back up to the server.
11:36:01Araqand why is "locally" so much more convenient, hu?
11:36:34Araqnow let me get back to work.
11:36:47PMunchBecause I've got developer tools set up locally
11:37:45PMunchIt's a clear distinction. Server management -> on the server, content creation -> workstation.
11:40:24*byte512 joined #nim
11:44:23*vlad1777d joined #nim
11:50:52PMunchSad to see #5001 closed :(
12:01:12*Kingsquee quit (Read error: Connection reset by peer)
12:01:17*Kingsqueee joined #nim
12:02:51*yglukhov quit (Remote host closed the connection)
12:03:02*Snircle joined #nim
12:04:54*Kingsqueee quit (Read error: Connection reset by peer)
12:07:20*bjz_ joined #nim
12:08:23*bjz quit (Ping timeout: 256 seconds)
12:11:22*couven92 quit (Quit: Client disconnecting)
12:13:28*couven92 joined #nim
12:14:47*Gilga joined #nim
12:16:05*yglukhov joined #nim
12:20:08*yglukhov quit (Ping timeout: 240 seconds)
12:26:40*yglukhov joined #nim
12:32:26*yglukhov quit (Remote host closed the connection)
12:32:45*yglukhov joined #nim
12:34:33*vlad1777d quit (Ping timeout: 276 seconds)
12:50:21*ibk quit (Quit: Connection closed for inactivity)
12:58:30*zachcarter joined #nim
12:58:31zachcarterParashurama sorry I missed you last night
13:03:32federico3andreaferretti good spot!
13:04:01*vlad1777d joined #nim
13:12:18*krux02 joined #nim
13:13:14zachcarternot sure exactly what is going wrong here… http://imgur.com/a/vuxMB
13:15:13*bjz_ quit (Ping timeout: 248 seconds)
13:16:54*bjz joined #nim
13:19:38*planhths quit (Ping timeout: 240 seconds)
13:25:27zachcarterother PNGs look fine - http://imgur.com/a/PfQPd
13:25:50zachcarterI’m wondering if it’s not a case of someone just saving a JPG with a PNG extension - i”m guessing that’s what’s going on, I’m just grabbing these randomly off the net to test with
13:25:58FromGitter<andreaferretti> did anyone try to write cuda code in nim?
13:26:29FromGitter<andreaferretti> I guess it should be doable by compiling to C++ / gc:none / os:standalone
13:26:39FromGitter<andreaferretti> but I am not sure it will work
13:27:18FromGitter<andreaferretti> I am trying to write some neural networks
13:27:30FromGitter<andreaferretti> most of what I need is covered in linalg via CUBLAS
13:27:37FromGitter<andreaferretti> but I need just a few custom functions
13:28:13krux02andreaferretti: I did write some neural networks in Nim with GLSL https://github.com/krux02/opengl-sandbox/blob/master/examples/neuralnetwork.nim
13:30:00FromGitter<andreaferretti> thank you, I will try to take inspiration!
13:30:53krux02don't expect too much, it doesn't have learning it is just a random neural network that is used to generate some fancy visual effects
13:31:34krux02and the vectorization of the evaluation doesn't make it more readable
13:31:36krux02but performant
13:31:41FromGitter<andreaferretti> I already have neural networks working on the CPU
13:31:50FromGitter<andreaferretti> I just need to port this on the GPU
13:32:08FromGitter<andreaferretti> most operations are easy: I already have GPU support in linalg
13:32:22FromGitter<andreaferretti> but I still miss a few things
13:32:56krux02I have a lot of macros in my code, whenever you put debugResult in the `shadingDsl` block, it will print the ast
13:33:07krux02so you can see all the opengl commands it compiles to
13:33:26FromGitter<andreaferretti> great, thank you!
13:33:41cheatfatezachcarter, it looks like your image loader can't correctly save information about number of bits per pixel
13:34:03zachcartercheatfate: yeah I’m thinking that these are JPGs / GIFs saved with PNG extensions
13:34:17zachcarterI need to find a way to verify that the files are indeed PNG files before allowing them to be loaded
13:34:57cheatfateyou can check for format by reading 4 bytes of image file header
13:35:06cheatfatefirst 4 bytes
13:35:10cheatfateis usually enough
13:35:16zachcarterokay thanks I’ll do that
13:39:07AraqPMunch: run top, right click on the offending process, left click on the popup for shutdown. Ooops, doesn't work, so instead memorize the PID and type 'kill -whatever <PID>' and pray you didn't make a typo.
13:39:21Araqsurely that never comes up for server administration...
13:39:41*nsf quit (Quit: WeeChat 1.7)
13:40:23PMunchOr use htop and just select it and press F9..
13:40:38ftsfPMunch, hope it doesn't move just as you press the button =)
13:40:54ftsfkillall foo
13:41:14PMunchftsf, yeah, that is annoying. But you do get to see it when selecting the signal to send it
13:43:39krux02Araq: can you give me support to fix the issue with the ref to var conversion?
13:44:48Araqyup
13:45:23krux02cool
13:48:30*bungoman joined #nim
13:48:55*zachcarter quit (Quit: zachcarter)
13:49:35Parashuramazachcarter: I'm here.
13:49:56Parashuramadid you solve your image format problem
13:50:23*bungoman_ quit (Ping timeout: 256 seconds)
13:51:27demi-cheatfate my changes to add linting and syntax support for nim to micro got merged, though there isn't a new nightly yet
13:51:51ParashuramaIf you have a good hex editor: the first 8 bytes of a valid PNG file are:
13:51:59cheatfatedemi-, but currently it has status of `build failing`
13:52:11cheatfatedemi-, and i'm waiting midnight for new nighly build with your changes
13:52:34demi-I don't think the nightly gets updated daily?
13:53:22cheatfatelol, why they called `nightly` then?
13:53:23Parashuramazachcarter: [89, 50, 4e, 47, d, a, 1a, a] (in hex)
13:55:20demi-dunno, maybe it updates when commits are made?
13:55:37demi-the nightly build was last updated 7 days ago based on the github page
13:55:51demi-though i can build it for you if you want to give it a go
14:05:37*planhths joined #nim
14:08:38*rainrawr quit (Ping timeout: 240 seconds)
14:13:27*yglukhov quit (Remote host closed the connection)
14:14:15*bitwize quit (Read error: Connection reset by peer)
14:16:16FromGitter<andreaferretti> stupid question
14:16:32FromGitter<andreaferretti> how do I add multiple paths for `cincludes`?
14:16:32*rainrawr joined #nim
14:16:42FromGitter<andreaferretti> in nimble each call like
14:16:50FromGitter<andreaferretti> `switch("cincludes", "/usr/local/cuda/targets/x86_64-linux/include")`
14:16:56FromGitter<andreaferretti> oevrwrites the previous one
14:16:56Araquse cinlcudes multiple times?
14:17:12FromGitter<andreaferretti> I tried :-)
14:17:22FromGitter<andreaferretti> in a nimble task
14:17:31FromGitter<andreaferretti> it seems the second one shadows the first one
14:17:41Araqdoes it work from command line?
14:21:29FromGitter<andreaferretti> yes, it does
14:21:34FromGitter<andreaferretti> seems a bug in nimble
14:21:44FromGitter<andreaferretti> just tried from the command line and it works
14:22:23FromGitter<andreaferretti> or possibly a bug in nimscript `task`
14:30:22Araqyeah -.-
14:36:06*zachcarter joined #nim
14:46:19FromGitter<andreaferretti> one last thing
14:46:38FromGitter<andreaferretti> now that I am able to produce a small custom CUDA library
14:46:51FromGitter<andreaferretti> is there a way to install that when installing a nimble package?
14:47:09FromGitter<andreaferretti> I would need to be able to run a custom command on nimble install
14:47:30FromGitter<andreaferretti> after having detected whether CUDA is present
14:48:12FromGitter<andreaferretti> and to make sure that libraries depending on linalg (and using CUDA) have ./nimble/linalg/linalg.so on their path
14:49:23stisaI think tasks work with install too, so try something like ``before install:``
14:49:51*bjz quit (Quit: Textual IRC Client: www.textualapp.com)
14:50:16FromGitter<andreaferretti> thank you I'll try
14:51:02FromGitter<andreaferretti> is there some example of a nimble library with a c dependency or something shipped this way?
14:51:05*planhths quit (Ping timeout: 255 seconds)
14:52:45subsetparkI'm getting `out of memory` errors in my Nim code called by FFI. How can I investigate this issue?
14:53:47Araqsubsetpark: compile with -d:useSysAssert -d:useGcAssert
14:54:01demi-andreaferretti, i think the wrapper for libssh2 would be an example of this
14:55:10FromGitter<andreaferretti> you mean this one? https://github.com/rgv151/libssh2.nim
14:55:24FromGitter<andreaferretti> doesn't seem so
14:55:27subsetparkhm, Araq, that produces no additional messages - does that mean the GC isn't actually running?
14:55:58Araqno it means no assertion is triggered
14:56:08FromGitter<andreaferretti> They say "In order to use this wrapper, libssh2 must installed on your system:"
14:56:16FromGitter<andreaferretti> I want to install the library as a dependency
14:56:21demi-ah i see
14:56:29subsetparkAraq: fair enough, but what can I conclude from this fact?
14:56:44Araqdo you use 'realloc'?
14:56:55Araqare you on OSX?
14:57:00subsetparkI am on OS X
14:57:11Araqdo you use 'devel' branch of nim?
14:57:17subsetparkCurrently I'm not doing any manual memory management at all
14:57:32Araq0.16.0 on OSX has a serious bug, use devel
14:57:36subsetparkNope, I'm on 0.16.0 -d:release -d:useLinenoise
14:57:45subsetparkah, interesting
14:58:02demi-so if we have it installed from homebrew we should reinstall using --head?
14:58:35subsetparkdemi-: yep
14:58:55subsetparkwell, it's csources:master, but Nim:devel
14:59:14demi-yeah, ok cool
15:00:16subsetparkAraq: nim --version should report 0.16.1, yeah?
15:00:40Araqyes
15:00:49subsetparkAraq: unfortunately I get the same out of memory error, with no debugging info :(
15:01:03demi-this shouldn't break ABI compatibility with older nim code, right?
15:01:04*trusion quit (Quit: Leaving)
15:01:40Araqthere is no ABI we could break, I think
15:01:55*bjz joined #nim
15:02:37demi-thanks, that is pretty neat
15:09:25subsetparkAnybody have any other ways to get more information about an out of memory crash?
15:09:47subsetparkAnybody have any other ways to get more information about an out of memory crash?
15:10:17Araqwell maybe your program uses too much memory?
15:10:38Araqmaybe the core datastructures of the allocator are corrupted?
15:11:05ftsftried valgrind?
15:11:23*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
15:12:00demi-subsetpark: there is the clang address sanatizer too
15:12:01Araqhttps://github.com/nim-lang/Nim/wiki/Hunting-crashes:-The-ultimate-guide
15:13:31*Trustable quit (Remote host closed the connection)
15:13:57*yglukhov joined #nim
15:14:59*devted joined #nim
15:18:30*yglukhov quit (Ping timeout: 258 seconds)
15:19:09*arnetheduck joined #nim
15:22:00subsetparkAlright, I'll dive in
15:22:27subsetparkI'm pretty confident it doesn't use too much memory; it's just handling a few dozen very small objects
15:22:56subsetparkAnd before it fails `getFreeMem` returns 417792
15:23:49*stisa quit (Ping timeout: 240 seconds)
15:26:28Araqyou could also tell us more. do you use threads, async? how is the "FFI" used? are you aware of setupForeignThreadGc?
15:26:36*stisa joined #nim
15:28:01subsetparkno threads, no async - the FFI is a call from Python over ctypes... I am aware of some of the issues with GC, though it's in the same thread and my understanding from reading the docs is that I don't need to call the Nim GC directly from Python before calling my proc over the FFI
15:28:55Araqso you produce a dylib?
15:29:17Araqyou need to call NimMain() or something
15:31:33subsetparkOk, that was what I wasn't sure about
15:32:30subsetparkI think I misread this the first time: The JavaScript target doesn't have any further interfacing considerations since it also has garbage collection, but the C targets require you to initialize Nim's internals, which is done calling a NimMain function.
15:33:13*unlaudable quit (Ping timeout: 245 seconds)
15:33:39Araqwell I dunno, for DLLs NimMain is not required because we generate a __constructor__() thing
15:34:36Araqshow us your code please
15:36:04cheatfateAraq, for windows NimMain is also not required because we can make GC initialization inside of DllMain
15:37:48subsetparkAraq - It's a little hard to produce a minimal example... I'll get back to you
15:40:00*PMunch quit (Quit: leaving)
15:40:40*yglukhov joined #nim
15:40:44Araqsubsetpark: just show me the code
15:41:21AraqI won't read it anyway, no worries
15:42:00*zachcarter is now known as carterza
15:47:22*unlaudable joined #nim
15:49:43FromGitter<andreaferretti> I have submitted a bug report for the nimble problem with repeated switches
15:49:44FromGitter<andreaferretti> https://github.com/nim-lang/nimble/issues/329
15:49:58FromGitter<andreaferretti> it seems specific of nimble (nims works correctly)
15:54:20*nsf joined #nim
15:54:24*unlaudable quit (Ping timeout: 252 seconds)
15:58:00*unlaudable joined #nim
16:05:32*yglukhov quit (Remote host closed the connection)
16:07:08*unlaudable quit (Ping timeout: 240 seconds)
16:07:53*yglukhov joined #nim
16:10:21*stisa quit (Ping timeout: 252 seconds)
16:10:35*stisa joined #nim
16:15:20ftsfhmm lib/nim/system/ansi_c.nim(52, 12) Error: SIGABRT not ported to your platform when running `nim e config.nims` (even when it's an empty file)
16:17:34*Jipok[m] joined #nim
16:18:49*unlaudable joined #nim
16:23:33Araqyou cannot run a config.nims this way
16:24:48*unlaudable quit (Max SendQ exceeded)
16:24:56ftsfi understand it should be run when I compile as usual, the same happens then as running it directly.
16:25:15*unlaudable joined #nim
16:25:37Araqftsf: what is your platform?
16:25:51ftsfrunning on linux, but compiling for standalone
16:26:47ftsftrying to use the config.nims to patch osalloc.nim as you suggested.
16:30:11*yglukhov quit (Remote host closed the connection)
16:35:14Araqftsf: ah submit a fix then :-)
16:37:35ftsfi'm not sure what the issue is... not sure if something is broken, since i'm not sure how config.nims is supposed to be used. i have a nim.cfg which sets the os to standalone. but I suspect config.nims shouldn't be using that.
16:37:48ftsfdoes that sound right?
16:41:11*unlaudable quit (Ping timeout: 264 seconds)
16:42:02*yglukhov joined #nim
16:58:25*Andris_zbx quit (Remote host closed the connection)
17:01:38*Arrrr joined #nim
17:02:20*yglukhov quit (Remote host closed the connection)
17:02:52ftsfhacking the system lib to override the global osalloc works though \o/ yay memory allocation!
17:08:33*planhths joined #nim
17:16:45*pregressive joined #nim
17:25:43*djellemah quit (Ping timeout: 256 seconds)
17:56:11*mal`` quit (*.net *.split)
17:56:21*federico3 quit (*.net *.split)
17:56:21*fold4 quit (*.net *.split)
17:56:21*jivank quit (*.net *.split)
17:56:21*acidx quit (*.net *.split)
17:56:21*GaveUp quit (*.net *.split)
17:56:29*GaveUp joined #nim
17:56:32*SirCmpwn quit (*.net *.split)
17:56:32*niv quit (*.net *.split)
17:56:37*acidx joined #nim
17:56:43*jivank joined #nim
17:56:51*mal`` joined #nim
17:57:01*federico3 joined #nim
17:57:09*niv joined #nim
17:57:34*brson joined #nim
17:57:42*SirCmpwn joined #nim
17:57:49*brson quit (Client Quit)
17:58:18*fold4 joined #nim
17:59:05*Ven joined #nim
18:02:48*yglukhov joined #nim
18:02:57*brson joined #nim
18:07:26*yglukhov quit (Ping timeout: 255 seconds)
18:13:12*vlad1777d quit (Remote host closed the connection)
18:15:44*vlad1777d joined #nim
18:22:20*yglukhov joined #nim
18:25:29*smt quit (Read error: Connection reset by peer)
18:36:06*Arrrr quit (Ping timeout: 252 seconds)
18:49:25rokupswhat magic ritual should i perform so nimble works with ssl?
18:49:58rokupssuch basic stuff failing is what drives people away... using nim requires actual dedication :|
18:51:06demi-https://github.com/nim-lang/nimble#troubleshooting are these directions not working?
18:51:21rokupsor maybe im just an idiot and i had VERY old version in ~/.nimble =x
18:53:11dom96Yes, but Nim also has the best support. :)
18:53:18dom96How did you install Nimble?
18:53:41dom96Actually, I should ask: what errors are you getting?
18:53:43rokupsit works already :p
18:54:20dom96Not that much dedication required then? :P
18:54:33dom96I guess you've had other problems before.
18:54:44rokupsstopping being stupid is quite an effort. compiler should handle that for me!
18:55:21dom96Suggestions on how to lower the barrier to entry are always welcome :)
18:56:08rokupsseems like binary is no longer installed into ~/.nimble. thats good ;)
18:57:57dom96why's that?
18:58:23rokupswell thats where old version lived and it was broken. and i decided world is falling apart
18:58:45rokupsnow that it lives with compiler we can safely assume it will be fresh
18:59:04rokupsdom96: since you asked about suggestions.. isnt packages on github via pull requests kind of tedious? manually approving everything etc
18:59:57dom96sure is
19:00:13dom96But I personally don't have the time to create a hackage/cargo.io/npm clone
19:00:42dom96It's definitely on the roadmap though
19:00:42demi-cocoapods does/did that too
19:00:51dom96and others have already started working on it
19:01:05rokupscertainly. i wonder how archlinux does it with aur. maybe we could get ideas from there?
19:01:31rokupsevery package has it's own repo there it seems
19:02:25dom96they also have a website for submitting packages to
19:02:25demi-homebrew also follows this pattern of github based indexing -- if you had integration tests with the packages you could easily automate it with CI
19:03:09dom96Nimble's packages.json support will remain though, it's useful for people who want to create their own package lists.
19:03:32rokupsor maybe you could use simple bot that accepts PRs after some checks are done ^_^
19:04:24rokupsanyways time to rest. bye
19:05:22*nsf quit (Quit: WeeChat 1.7)
19:06:46dom96Araq: Regarding travis failures: https://github.com/travis-ci/travis-ci/issues/7264
19:08:27*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:25:39Araqah hmm
19:43:25*couven92 quit (Quit: Client disconnecting)
19:45:33*Arrrr joined #nim
19:45:33*Arrrr quit (Changing host)
19:45:33*Arrrr joined #nim
19:53:31*Jesin quit (Quit: Leaving)
19:59:56*libman joined #nim
20:06:11*byte512 quit (Ping timeout: 240 seconds)
20:06:56*yglukhov quit (Remote host closed the connection)
20:10:01*yglukhov joined #nim
20:13:32*yglukhov quit (Remote host closed the connection)
20:13:46*yglukhov joined #nim
20:17:20*adeohluwa joined #nim
20:18:42*Jesin joined #nim
20:23:34*yglukhov quit (Remote host closed the connection)
20:27:28euantorI have a feeling I'm being stupid, but how do you get a pointer to a position within a cstring?
20:27:50euantorTried this: https://glot.io/snippets/emspkfcg3f
20:27:50krux02a pointer to what?
20:27:55Parashuramacstringvar[pos].addr
20:28:11Parashuramaof [pos].unsafeAddr if let variable
20:28:15Parashurama*or
20:28:25*bjz joined #nim
20:28:39euantorParashurama: Hm, I guess I need `unsafeAddr` if the cstring is passed to the proc too
20:28:54Parashuramayep
20:29:15euantorCheers, I thought I was being stupid
20:29:19Parashuramabut be careful with unsafeAddr, its *really* unsafe
20:29:32krux02since cstring is nothing more than a pointer, you could cast it to an int add the offset and cast it to a pointer
20:29:38euantorSo best bet would be to copy the string to a local variable and then get the address
20:29:41krux02it works but feels dirty
20:30:00ParashuramaIt you try to modify a constant, you likely get an undefnied behaviour.
20:30:00*adeohluwa quit (Quit: Lost terminal)
20:30:06krux02euantor: depends on the context you cant say that generally
20:30:22ParashuramaIt's fine for a variable
20:30:22euantorThe context is writing to a serial port, using `posix`.`write`
20:30:39euantorThe cstring is data passed in to the function to write to the port
20:30:48krux02and you want the string to be written to the serial port?
20:31:07Parashuramashould be fine as long as string source is not modified.
20:31:14Parashuramainside proc
20:31:25krux02can you paste the api you need to use?
20:31:35euantorYeah, I want to write the string to the serial port
20:31:50krux02yes that is what unsafeAddr is for
20:32:16euantorhttps://www.irccloud.com/pastebin/KghtoLCM/
20:32:37euantorI'll go with unsafeAddr, and hope for the best for now
20:33:52euantorI'll be making the code available as a Nimble package later anyway, so if it's terrible practice somebody else can submit a patch at a later date :)
20:34:11krux02don't hope, know
20:34:37krux02unsafeAddr and addr do basically the same thing
20:35:24krux02unsafeAddr just circumvents some compiler checks, because a c API does not give any promisis to modify an argument or not
20:35:54*vlad1777d quit (Remote host closed the connection)
20:35:56krux02you just look up in the API if it can modify the argument, and when it never does it, unsafeAddr is fine
20:36:03krux02it is just that you have to do that step manually
20:36:07euantorAh, ok. Thanks very much
20:36:21euantorMakes sense
20:37:10*yglukhov joined #nim
20:41:51*Ven joined #nim
20:43:56*rupil joined #nim
20:44:55*Arrrr quit (Read error: Connection reset by peer)
20:45:38*Jesin quit (Quit: Leaving)
20:48:18*couven92 joined #nim
20:48:55ParashuramaDoes anybody knows a way to check if a module is installed?
20:50:02ParashuramaI suppose I could hack something with staticRead, but thats kinda hackish
20:50:11*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:58:00dom96maybe try something like: when compiles(import module):
20:59:09*xet7 quit (Ping timeout: 240 seconds)
20:59:20Parashuramadoesn't work, it only accept expressions.
21:01:11ParashuramaI don't really need it for now, but it could be interesting in some case, for optional depandancies.
21:03:09dom96hrm, what sort of optional dependencies would you use it for?
21:03:56ParashuramaI'm working on a tarfile module with optional bz2, gz lzma depandancies
21:04:10Parashuramathe gzipfiles module is already done
21:04:19dom96awesome
21:05:20ParashuramaI was thinking maybe some symbol defined in the nimble module for each installed module for checking at compile time if a module is installed
21:05:42Parashuramabut that's just a thought
21:05:45dom96I don't think you should over complicate this.
21:06:10dom96Just have the user install of those dependencies.
21:06:36ParashuramaI also could just use compile -d:FLAG for available compressions
21:07:38ParashuramaBut the longest part tarfile module is far from done, the specification huge and quite complicated!!
21:07:45stisa Are all modules in different nimble packages? you could check if they are in the output of `nimble list -i`
21:08:33ParashuramaThat's was also a possibility with static exec
21:09:43Parashuramaa good idea for a check_dependency module :)
21:09:46dom96You don't need to do that.
21:10:07dom96Nim will only require whatever the user is actually using out of your library.
21:10:07ParashuramaNo of course, it's just a possibility.
21:10:51Parashuramain release mode yes, it still need to be installed.
21:10:53*Jesin joined #nim
21:11:03dom96Performing such hacks may result in some frustrating behaviour in the future for your libraries users.
21:11:52ParashuramaDon't worry it was just a theorethical example of black magic. :)
21:12:08*rokups quit (Quit: Connection closed for inactivity)
21:12:15Parashuramakinda like hacking the import system of python
21:12:46Parashurama for custom resolving path of module to intercept stdlib module
21:12:59Parashuramano patchFile in python
21:13:31*bjz joined #nim
21:13:46*handlex joined #nim
21:14:40*carterza quit (Quit: carterza)
21:17:44Parashuramadom96: btw I replied in the PR for zip module.
21:22:32*handlex quit (Quit: handlex)
21:26:35dom96Parashurama: Replied
21:26:49dom96I really love these types of things. I wish I had the time to write something for them: http://dev.generals.io/
21:27:21*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:28:47Parashuramadom96: I will check the zlib code for deflateEnd make sure it is deallocated in all cases
21:29:46*handlex joined #nim
21:31:41dom96okay
21:31:43dom96good night
21:35:47*handlex quit (Ping timeout: 255 seconds)
21:36:35*yglukhov quit (Remote host closed the connection)
21:39:01*couven92 quit (Quit: Client disconnecting)
21:40:18*couven92 joined #nim
21:44:25*vlad1777d joined #nim
21:45:06*vlad1777d quit (Remote host closed the connection)
21:47:17*yglukhov joined #nim
21:48:27*libman quit (Remote host closed the connection)
21:51:34*yglukhov quit (Ping timeout: 245 seconds)
21:52:44*Vladar quit (Quit: Leaving)
22:01:25*bjz_ joined #nim
22:02:15*bjz quit (Ping timeout: 260 seconds)
22:02:22cheatfateParashurama, `tar` is very simple format
22:02:27cheatfatewhy documentations is huge?
22:03:12Parashuramathe format is easy, but it handles symlinks and others advanced linux attributes ACLs and things like that.
22:03:35*rupil quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
22:04:04Parashuramaalthough I don't intend to write full GNU replacement
22:05:55Parashurama*obviously
22:05:57cheatfateParashurama, it will be nice to have `deflate.nim` even with decompression only
22:06:18cheatfatei dont think tarfile module is good usage of you :)
22:06:28cheatfateof your power :)
22:06:37Parashuramaby deflate you mean untar, right?
22:07:26ParashuramaIt's just a project on the side. It's not like I work on this full time.
22:08:06cheatfatedeflate is compression method https://en.wikipedia.org/wiki/DEFLATE used everywhere
22:08:18cheatfateit used in web for `gz` and `deflate` encodings
22:08:26cheatfateit can be used to unpack tar.gz files :)
22:08:34cheatfateit used to compress ssh stream
22:08:49Parashuramayeah sorry, i always confuse the two deflate/inflate
22:09:27ParashuramaThere is already an uncompress/inflate compress/deflate proc in zip/zlib nimble module
22:10:15Parashuramawith a gzipfile PR in the works, after I polish it a bit.
22:10:16cheatfateParashurama, this is just `lazy` wrappers...
22:10:36Parashuramalook at the bottom.
22:10:39cheatfateand i dont like wrapper
22:11:04cheatfateand what at the bootm?
22:11:13cheatfatehttps://github.com/nim-lang/zip/blob/master/zip/zlib.nim#L6
22:11:16cheatfatethis is wrapper
22:11:33Parashuramaunless you meant reimplementaing zlib in pure nim, which is daunting.
22:11:49ParashuramaI meant at the bottom of the file zlib.nim
22:12:11*nsf joined #nim
22:12:11*Gilga quit (Ping timeout: 240 seconds)
22:12:14cheatfatedeflate decompressor is not so big as you think
22:12:35cheatfateits not a compressor with dynamic huffman trees
22:12:54ParashuramaWell I also meant reasonably optimized, as well as gzip functionality.
22:13:13cheatfateoptimized? :)
22:13:19cheatfatenope its not optimized
22:13:30ParashuramaWell zlib is pretty fast.
22:13:46Parashuramafor using DEFLATE algorithm
22:14:32ParashuramaI don't quite get the same throughput with miniz
22:14:43Parashuramain C anyway.
22:15:06cheatfateok forget it
22:15:48*zachcarter joined #nim
22:15:50cheatfateit looks like you dont like challenges :)
22:16:05*zachcarter is now known as carterza
22:16:06*planhths quit (Quit: Konversation terminated!)
22:17:15cheatfatetravis still can't repair service
22:17:38ParashuramaI don't mind challenges, it just isn't a priority right now.
22:18:34ParashuramaThe only argument I would accept is that zlib is quite heavy compared to miniz/ pure nim implementation
22:19:36cheatfateinteresting and what is most prioritized targets for you now?
22:21:47ParashuramaActually programming is just a hobby, but I'm working on a small RPG game when I can find the time.
22:22:55ParashuramaWhich is mostly an excuse to use Nim.
22:25:28Parashuramaby small I mean its already something like 30000 LOC of nim :P
22:26:29carterzaI got distance field fonts going :D http://imgur.com/a/xTJRV
22:27:10Parashuramacongrats, that can be tricky sometimes.
22:27:49carterzathanks
22:27:49Parashuramaalthough it can be expensive compared to rendering glyph from textures.
22:28:07carterzaah I’m still using bitmap fonts
22:28:54carterzaI guess the filtering makes it expensive?
22:29:00carterzaand the mipmapping?
22:29:12Parashuramaoh, I know, but the additional shader instructions/switches can be expensive.
22:29:34carterzaahh okay gotcha
22:29:49carterzaI’m making a roguelike engine so I think it’s necessary for my use case
22:29:58carterzaor a roguelike game
22:30:12ParashuramaIn the technique I was talking about, you always render at real texture size, so mipmapping.
22:30:38Parashuramaaltough it require uploading each freetype glyph at each used size.
22:30:46carterzaright
22:31:24ParashuramaHow do you handle your text layout?
22:32:22ParashuramaPango Harfbuzz might be somewhat overkill
22:32:37carterzaI don’t really at the moment
22:34:15ParashuramaI already made some kind of library for handling un/formattedTexttext and text input but its not published yet.
22:34:20*bjz joined #nim
22:34:47carterzaahh nice
22:35:37ParashuramaI would say it's still in alpha phase since API may change quite alot.
22:35:47*bjz_ quit (Ping timeout: 264 seconds)
22:36:26Parashuramabut it support formatted text with color underline, margin, italic bold, line spacing.
22:36:48carterzanice
22:37:12ParashuramaIt's not the most beautiful rendering, but speed was the goal.
22:37:42Parashuramaand it support unicode. yeah. although only left to right for now.
22:38:01carterzaawesome
22:38:11carterzaI need to pick a font to use for the maps in my game
22:38:41carterzapreferably something square
22:39:17ParashuramaWell you need monospace font. on linux DejaVu Mono is pretty nice and Free!
22:39:38Parashuramayou might need to check the licence.
22:40:03carterzayeah I don’t think it’s square though :/
22:40:07carterzaSource code pro will probably work
22:40:30Parashuramaisn't it proprietary?
22:40:44carterzanot sure good question
22:42:09carterzaah found one Parashurama - Inconsolata
22:43:21ParashuramaOh yeah, I tested that one some month ago in my editor.
22:43:33Parashuramahere is a sample: https://postimg.org/image/jj01dda3x/
22:43:58carterzanice!
22:44:30ParashuramaThe gui is a custom library I wrote mosly designed for game use
22:44:42carterzait looks really good
22:44:47carterzaI need a gui library badly :/
22:44:58carterzathinking of spending a few days and wrapping nuklear
22:45:20ParashuramaIt's themeable so you can skin it completly.
22:45:38*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:45:47ParashuramaIt's inspired by the kytten library for the pyglet framework for python
22:46:04carterzasounds sweet
22:46:53ParashuramaThe game icons are not made by me but by Blizzard (from some old WoW version)
22:47:38carterzaright
22:47:49ParashuramaIt was a pretty nice Library but has been abandoned for 4 years.
22:48:28Parashuramaand anyway python, is not really suitable for a complex game, no matter what some people says.
22:48:44Parashuramatoo many bugs at runtime
22:49:17carterzaare you using opengl?
22:49:34ParashuramaYep, opengl3 to be precise.
22:49:41carterzanice
22:49:49carterzais your gui retained or immediate?
22:50:10Parashuramaon sdl2, but the gui is designed to framework agnostic.
22:50:20carterzayeah that’s my setup as well
22:50:23ParashuramaI don't understand your question
22:50:37carterzaso retained mode GUIs essentially maintain some state
22:50:42*brson quit (Read error: Connection reset by peer)
22:50:42carterzaacross updates
22:51:01carterzawhereas an immediate mode gui, you’d draw and handle all your UI updates per frame
22:51:16carterzaso immediate mode guis tend to result in a lot more draw calls
22:51:19ParashuramaOh, you mean something like hasdirtyRect
22:51:46carterzalet me find a better example
22:51:50Parashuramano I draw every primitive every frames, but since I use VBO, I really doen't take that much
22:52:01carterzahttps://github.com/ocornut/imgui
22:52:05carterzahere’s an immediate mode GUI
22:52:16*brson joined #nim
22:56:21ParashuramaI think I get it. the widgets are recreated at each frame and data sent to GPU. I don't do that.
22:57:33carterzaexactly
22:57:44carterzagotcha
22:58:33ParashuramaWidgets are created in some initialization code and rendered in a render loop with the rest of the world.
22:58:44Parashurama*well above really
22:59:26carterzagotcha
22:59:34carterzaI’m wondering if - https://github.com/memononen/nanovg - might be useful in my project
22:59:40Parashuramasample widget code: https://gist.github.com/Parashurama/fc8b5fa8c49700dcaf5feb3a66a9f75d
23:00:52ParashuramanewDialog is registered in a guimanager(a graphic batch) and then its done.
23:01:13*def-pri-pub joined #nim
23:01:40carterzanice, looks easy to use
23:02:43*devted quit (Quit: Sleeping.)
23:02:59Parashuramananovg looks nice, although perfmance might be an issue on a demanding game. those primitive with smooth lines takes a huge number of vertices.
23:03:20Parashuramaunless they know something I don't :)
23:03:32carterzaI’d probably just be redering lots of squares
23:03:35carterzawith text in them
23:03:38carterzadifferent colors
23:03:57Parashuramawell, that's perfectly alright.
23:04:36carterzait looks like someone already wrapped it, trying to get their wrapper to compile now
23:05:01ParashuramaIt's really the smooth and/or wavy lines, blur, etc that kill performance.
23:05:25carterzayeah
23:06:20ParashuramaBut I didn't kown that library thanks. It looks really good. Bookmarked!
23:07:33carterzanp!
23:09:04ParashuramaAlright, it's getting late, bye.
23:10:04carterzahave a good night
23:10:11*Parashurama left #nim (#nim)
23:17:56*chemist69 quit (Ping timeout: 255 seconds)
23:18:23*stisa quit (Ping timeout: 255 seconds)
23:18:48*stisa joined #nim
23:19:01*stisa2 joined #nim
23:20:25*chemist69 joined #nim
23:23:11*stisa quit (Ping timeout: 255 seconds)
23:31:39carterzahmm I’m having trouble with the clibdir compiler argument - doesn’t seem to be working for me, unless I”m overriding it somehow
23:39:50*stisa2 quit (Ping timeout: 255 seconds)
23:43:27*stisa joined #nim
23:43:41*stisa quit (Client Quit)
23:55:56*krux02 quit (Remote host closed the connection)