00:03:18 | zachcarter | dom96: 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:30 | FromGitter | <timeyyy> :subset http://akehrer.github.io/posts/connecting-nim-to-python/ |
00:26:32 | FromGitter | <timeyyy> :subset http://goran.krampe.se/2014/10/16/nim-wrapping-c/ |
00:26:54 | FromGitter | <timeyyy> https://github.com/jboy/nim-pymod/blob/master/README.md#usage |
00:34:33 | * | anis` joined #nim |
00:36:03 | anis` | hi |
00:38:59 | zachcarter | hi |
00:40:52 | * | pregressive joined #nim |
00:42:23 | PMunch | Thanks 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:53 | PMunch | It basically creates a DSL for creating WxWidgets UIs |
00:44:30 | anis` | Does it works? I'm just testing ERC in emacs in first time |
00:44:54 | PMunch | Does what work? |
00:45:27 | PMunch | anis`? |
00:45:51 | anis` | Okay. good. It works. I can send message. You can read it :-) |
00:46:34 | PMunch | I'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:27 | ftsf | what is genericReset used for? |
05:59:16 | carterza | no idea… |
05:59:43 | ftsf | in other news, i've got my nim code running on a nintendo 3DS =) |
06:00:05 | carterza | awesome! |
06:00:22 | carterza | currently I’m struggling with packing four float values into one |
06:00:37 | carterza | well not really |
06:00:41 | carterza | that’s easy |
06:00:57 | ftsf | except it crashes when compiling with gc="stack" but works with gc="none" |
06:00:58 | carterza | I’m struggling with the opengl attribute code I imagine, getting the float to turn into a vec4 properly |
06:01:15 | ftsf | carterza, hmm so it's just wanting an array of 4 floats? |
06:01:37 | carterza | well what I”m trying to do is pack all four floats into one float |
06:01:44 | carterza | so I can just send color data per vertex |
06:01:47 | carterza | to my shader |
06:02:00 | ftsf | =\ |
06:02:20 | ftsf | so you want to compress your colour data into a single float value? |
06:02:25 | carterza | exactly |
06:02:59 | ftsf | sounds like you're making it hard for yourself? |
06:03:20 | carterza | how so? |
06:04:25 | ftsf | just set the attribute size to 4? |
06:05:03 | carterza | oh I did that |
06:05:36 | ftsf | glVertexAttribPointer(attrId, 4, GL_FLOAT, GL_FALSE, 0, cast[pointer](0)) i think? |
06:06:45 | carterza | https://gist.github.com/zacharycarter/038c4f30c83b07daa75fcd329eef7011#file-mesh-nim-L3-L9 |
06:07:48 | carterza | setting the stride to 0 for the last attribute got me different results |
06:07:51 | carterza | still not correct though |
06:08:15 | ftsf | #color ... vertices.add(-4.2536... |
06:08:57 | ftsf | that's your compressed color float? just add 4 entries |
06:09:34 | ftsf | 3 (coord), 2 (uv), 4 (color), should have 9 entries per vertex |
06:09:42 | carterza | ah yeah but I want to do |
06:09:45 | carterza | 3 coord 2 uv 1 color |
06:09:48 | carterza | all channels in that 1 float |
06:10:11 | carterza | I can get the 9 working fine |
06:10:18 | ftsf | so set size to 1 for color then |
06:10:27 | carterza | okay |
06:10:53 | ftsf | so your shader decompresses the colours from the float? |
06:11:22 | carterza | it doesn’t |
06:11:31 | ftsf | i don |
06:11:39 | ftsf | i don't understand what you're trying to do then... |
06:11:41 | carterza | maybe that’s the step I’m missing |
06:11:57 | carterza | essentially I was trying to encode a vec4 as a float |
06:12:02 | carterza | in software |
06:12:04 | ftsf | why? |
06:13:25 | carterza | I 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:41 | carterza | I thought it was an interesting approach instead of having to add four more floats for every vertex, just add one |
06:15:35 | ftsf | does a spritebatch even need vertex color? |
06:15:48 | carterza | not necessarily but it’d be nice to be able to pass it in |
06:15:58 | carterza | say like you want to start tinting your sprites |
06:16:21 | carterza | I could just handle it as a uniform |
06:16:42 | ftsf | then it'd apply to all sprites |
06:16:59 | carterza | it would |
06:16:59 | ftsf | i think go with the simple option and use 4 floats |
06:17:05 | carterza | I agree |
06:17:10 | ftsf | can always optimise later if need be |
06:17:16 | carterza | true dat |
06:17:24 | carterza | thank you for the help though |
06:18:50 | ftsf | np, hope it helps |
06:30:24 | FromGitter | <Varriount> carterza: NimGDX? |
06:30:30 | carterza | :D |
06:30:32 | FromGitter | <Varriount> :D |
06:30:32 | carterza | maybe one day |
06:30:52 | carterza | Varriount I’ll share some code with you soon I made some optimizations based on your suggestions last night / today |
06:31:04 | FromGitter | <Varriount> I'd seriously donate money for development of such a library |
06:32:06 | FromGitter | <Varriount> Games, especially the kind that libgdx's framework supports, seem right up Nim's alley. |
06:35:31 | FromGitter | <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:38 | ftsf | \o/ doesn't crash when i reduce the StandaloneHeapSize when using gc=stack |
06:47:35 | * | unlaudable joined #nim |
06:48:15 | carterza | https://github.com/zacharycarter/derelict/blob/master/src/derelictpkg/spritebatch.nim |
06:48:25 | carterza | Varriount ^ |
06:49:58 | carterza | time for alpha blending I guess |
06:51:33 | carterza | then i actually need to fix the matrix stuff and start writing a scene graph |
06:53:33 | carterza | http://imgur.com/a/K3CNj |
06:53:34 | carterza | that 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:23 | FromGitter | <Varriount> carteza: Just an tip, line 77 does a sequence copy. |
07:07:44 | FromGitter | <Varriount> (I think it's 77, I'm on a phone) |
07:10:14 | carterza | ah yeah but vertices is always going to be an empty sequence |
07:10:32 | FromGitter | <Varriount> Huh, why? |
07:10:45 | carterza | it gets initialized but I never add anything to it |
07:10:55 | carterza | I just make a copy of it |
07:10:57 | carterza | add to the copy |
07:11:33 | carterza | I guess I could just instead add to it and clear it every time I add vertices to it |
07:13:36 | carterza | yeah that works too |
07:14:43 | FromGitter | <Varriount> Carterza: You can use the setLen procedure to set the length of a sequence to zero, thus reusing the allocated memory |
07:17:08 | carterza | thanks Varriount I’ll make that change, I didn’t even think about that |
07:20:19 | FromGitter | <Varriount> Actually, I don't know if a sequence ever shrinks it's internal array... |
07:20:44 | FromGitter | <Varriount> I mean, other than when the sequence is completely deallocated |
07:28:39 | FromGitter | <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:20 | carterza | not at all |
07:29:41 | carterza | and 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:48 | Parashurama | carterza: 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:20 | FromGitter | <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:56 | Araq | andreaferretti: it's testing time |
09:02:06 | Araq | devel has a new set of name mangling rules |
09:02:10 | * | sz0 joined #nim |
09:03:26 | Parashurama | Araq: 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:55 | Araq | look what the compiler does for assignments |
09:05:17 | Araq | that check needs to consider every access to the local variable instead or something |
09:05:54 | Parashurama | That'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:49 | Parashurama | Araq: 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:28 | Parashurama | seems also slightly faster (~5%) |
09:09:34 | Parashurama | faster to compile |
09:12:19 | * | chemist69 joined #nim |
09:13:37 | Araq | for me it's slower, as usual :-( |
09:14:35 | Parashurama | Well my CPU isn't all that fast anyway, IvyBridge i5 mobile |
09:15:27 | Parashurama | It could also be the many small files written in nimcache. I usually use a ramdrive for that. |
09:15:39 | Parashurama | *that reason. |
09:20:26 | FromGitter | <andreaferretti> @Araq can I test devel or should I look into some branch? |
09:20:55 | Araq | devel |
09:22:14 | FromGitter | <andreaferretti> just tested - everything's fine :-) |
09:22:19 | FromGitter | <andreaferretti> I now have a script |
09:22:27 | FromGitter | <andreaferretti> much easier |
09:23:29 | FromGitter | <andreaferretti> eventually it would be nice to have a community build bot for libraries |
09:23:48 | FromGitter | <andreaferretti> so that it becomes easier to test that new releases of the compiler do not break anything |
09:24:07 | flyx | what's the status of http://ci.nim-lang.org/ ? |
09:24:32 | FromGitter | <andreaferretti> like this https://github.com/scala/community-builds |
09:25:57 | * | yglukhov quit (Remote host closed the connection) |
09:33:58 | ftsf | hmm got my nim app running pretty nicely on a 3DS. but it crashes when I do `echo someVar` echo "stringliteral" works fine |
09:34:21 | Araq | ftsf: use setupForeignThreadGc() |
09:35:11 | ftsf | should mention i'm using gc="stack", and no threads as far as i'm aware |
09:35:43 | ftsf | setupForeignThreadGc is undeclared |
09:37:34 | Araq | oh yeah |
09:37:42 | Araq | guys, why is travis red? |
09:37:50 | Araq | everything in the logs is perfectly fine |
09:39:58 | * | carterza quit (Quit: carterza) |
09:46:21 | * | ibk joined #nim |
09:47:29 | FromGitter | <konqoro> hey guys, any examples of modules communicating with a foreign process though osproc, that have a clean architecture? |
09:51:02 | ftsf | mmm i can use printf instead |
09:51:58 | * | yglukhov joined #nim |
09:58:56 | ftsf | can 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:55 | Araq | ftsf: you need to patchFile osalloc.nim |
10:07:03 | Araq | in your config |
10:07:22 | Araq | there is also some switch for malloc() -d:useMalloc iirc |
10:07:36 | ftsf | thanks, wasn't aware of that feature |
10:12:15 | * | couven92 joined #nim |
10:14:38 | FromGitter | <andreaferretti> @flyx I am not sure of the status of that |
10:14:46 | FromGitter | <andreaferretti> but last time I saw it |
10:14:54 | FromGitter | <andreaferretti> it was just doing `nimble install` on libraries |
10:15:30 | FromGitter | <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:59 | FromGitter | <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:21 | FromGitter | <andreaferretti> I think a completely different approach should be used |
10:16:56 | FromGitter | <andreaferretti> first, libraries should be added manually, so that when something goes wrong, a mantainer can be contacted |
10:17:20 | FromGitter | <andreaferretti> second, when adding a library, one should be able to register what command to use to test it |
10:17:27 | FromGitter | <andreaferretti> even if it is just `nimble test` |
10:18:33 | FromGitter | <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:02 | Araq | yep. listen to andreaferretti. |
10:32:02 | * | bjz joined #nim |
10:48:39 | * | cheatfate joined #nim |
10:49:24 | cheatfate | demi-, as i see your nim's PR was accepted to `micro`, so i can wait for binary builds today at midnight? |
10:49:49 | cheatfate | demi-, because currently `micro` build is failing now, for some reason |
10:51:03 | Araq | wat is micro? |
10:51:46 | * | yglukhov quit (Remote host closed the connection) |
11:00:30 | stisa | Araq: https://github.com/zyedidia/micro I think |
11:01:32 | cheatfate | Araq, first console editor with nim's color syntax support |
11:02:45 | cheatfate | and 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:25 | Araq | oh ok |
11:05:04 | FromGitter | <vegansk> @cheatfate, I thought it was vim or emacs :-) |
11:05:28 | Araq | not sure why keyboard commands are easier to transmit over the wire than mouse clicks but I learned to not ask any questions. |
11:06:39 | Araq | "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:10 | cheatfate | vegansk: yeah you are right, but vim is for unix monsters, and emacs has too many dependencies |
11:07:48 | cheatfate | Araq, when you are running 6 VMs at once for testing installing everywhere Gnome/KDE/(any other useless shit) is too expensive |
11:08:08 | cheatfate | so its better to have nice small console editor with color syntax support |
11:08:22 | FromGitter | <vegansk> @Araq, because, if I can use console editor, UI is unneeded dependency, instead of python :-) |
11:08:37 | PMunch | Araq, 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:59 | PMunch | Plus, Vim is awesome :) |
11:09:20 | Araq | hmm let's see. so that you can operate it more easily? |
11:11:08 | PMunch | Why 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:30 | Araq | but 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:49 | Araq | the fact that you think it needs a screen for that is quite telling though :-) |
11:12:37 | PMunch | Not pointless, they're great for my desktop. But for server stuff it's just as easy to do everything over ssh. |
11:13:08 | Araq | run "top", quit it again, ... run "nano", quit it again ... |
11:13:19 | cheatfate | Araq, i still like black/green screens :) |
11:13:21 | Araq | sure, "just as easy" |
11:13:32 | PMunch | Or use a multiplexor and have both open at the same time |
11:14:35 | cheatfate | Araq, this dispute is looks like dispute why VSCode is better then SublimeText |
11:15:26 | Araq | it'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:27 | cheatfate | why waste electricity to run graphics UI for using mouse if you can do it with keyboard |
11:15:31 | PMunch | Plus, 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:08 | cheatfate | Araq, modern terminals far far away from 80*20 (and you are wrong because it always was 80x25) |
11:16:17 | PMunch | Yeah.. |
11:16:53 | PMunch | Now it's basically x/charWidth×y/charHeight |
11:17:08 | PMunch | It 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:40 | cheatfate | also 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:09 | cheatfate | and with keyboard you can do same things much faster... |
11:26:11 | cheatfate | `ctrl + something to select word`, `ctrl + something to copy`, `page ups/downs and left/right to position`, `ctrl + something to paste`. |
11:27:02 | Araq | depends on the task. and it's a self fulfilling prophecy. |
11:27:08 | * | planhths joined #nim |
11:27:38 | Araq | for 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:04 | Araq | with ssh+nano you edit the text file directly on the server though. |
11:28:07 | Araq | because you can. |
11:28:11 | cheatfate | Araq, we are not talking about images here, because for programmer most used tool - text editor |
11:28:42 | Araq | yes 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:59 | PMunch | Well obviously you still use your desktop to create content. And you do server tasks on the server. |
11:32:12 | cheatfate | some people installing ISPManager to manage linux box, some people could not install FreeBSD :) |
11:32:33 | PMunch | I 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:32 | Araq | https://github.com/nim-lang/Nim/issues/5293 fix this on a machine you only have ssh access to. |
11:33:47 | Araq | and record it. |
11:33:57 | Araq | it's an exercise in masochism. |
11:34:07 | PMunch | As 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:08 | Araq | yes I know. you simply stick to the subset of things that work and declare victory and "I don't need it" |
11:35:40 | PMunch | But 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:01 | Araq | and why is "locally" so much more convenient, hu? |
11:36:34 | Araq | now let me get back to work. |
11:36:47 | PMunch | Because I've got developer tools set up locally |
11:37:45 | PMunch | It'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:52 | PMunch | Sad 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:31 | zachcarter | Parashurama sorry I missed you last night |
13:03:32 | federico3 | andreaferretti good spot! |
13:04:01 | * | vlad1777d joined #nim |
13:12:18 | * | krux02 joined #nim |
13:13:14 | zachcarter | not 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:27 | zachcarter | other PNGs look fine - http://imgur.com/a/PfQPd |
13:25:50 | zachcarter | I’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:58 | FromGitter | <andreaferretti> did anyone try to write cuda code in nim? |
13:26:29 | FromGitter | <andreaferretti> I guess it should be doable by compiling to C++ / gc:none / os:standalone |
13:26:39 | FromGitter | <andreaferretti> but I am not sure it will work |
13:27:18 | FromGitter | <andreaferretti> I am trying to write some neural networks |
13:27:30 | FromGitter | <andreaferretti> most of what I need is covered in linalg via CUBLAS |
13:27:37 | FromGitter | <andreaferretti> but I need just a few custom functions |
13:28:13 | krux02 | andreaferretti: I did write some neural networks in Nim with GLSL https://github.com/krux02/opengl-sandbox/blob/master/examples/neuralnetwork.nim |
13:30:00 | FromGitter | <andreaferretti> thank you, I will try to take inspiration! |
13:30:53 | krux02 | don'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:34 | krux02 | and the vectorization of the evaluation doesn't make it more readable |
13:31:36 | krux02 | but performant |
13:31:41 | FromGitter | <andreaferretti> I already have neural networks working on the CPU |
13:31:50 | FromGitter | <andreaferretti> I just need to port this on the GPU |
13:32:08 | FromGitter | <andreaferretti> most operations are easy: I already have GPU support in linalg |
13:32:22 | FromGitter | <andreaferretti> but I still miss a few things |
13:32:56 | krux02 | I have a lot of macros in my code, whenever you put debugResult in the `shadingDsl` block, it will print the ast |
13:33:07 | krux02 | so you can see all the opengl commands it compiles to |
13:33:26 | FromGitter | <andreaferretti> great, thank you! |
13:33:41 | cheatfate | zachcarter, it looks like your image loader can't correctly save information about number of bits per pixel |
13:34:03 | zachcarter | cheatfate: yeah I’m thinking that these are JPGs / GIFs saved with PNG extensions |
13:34:17 | zachcarter | I need to find a way to verify that the files are indeed PNG files before allowing them to be loaded |
13:34:57 | cheatfate | you can check for format by reading 4 bytes of image file header |
13:35:06 | cheatfate | first 4 bytes |
13:35:10 | cheatfate | is usually enough |
13:35:16 | zachcarter | okay thanks I’ll do that |
13:39:07 | Araq | PMunch: 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:21 | Araq | surely that never comes up for server administration... |
13:39:41 | * | nsf quit (Quit: WeeChat 1.7) |
13:40:23 | PMunch | Or use htop and just select it and press F9.. |
13:40:38 | ftsf | PMunch, hope it doesn't move just as you press the button =) |
13:40:54 | ftsf | killall foo |
13:41:14 | PMunch | ftsf, yeah, that is annoying. But you do get to see it when selecting the signal to send it |
13:43:39 | krux02 | Araq: can you give me support to fix the issue with the ref to var conversion? |
13:44:48 | Araq | yup |
13:45:23 | krux02 | cool |
13:48:30 | * | bungoman joined #nim |
13:48:55 | * | zachcarter quit (Quit: zachcarter) |
13:49:35 | Parashurama | zachcarter: I'm here. |
13:49:56 | Parashurama | did you solve your image format problem |
13:50:23 | * | bungoman_ quit (Ping timeout: 256 seconds) |
13:51:27 | demi- | 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:51 | Parashurama | If you have a good hex editor: the first 8 bytes of a valid PNG file are: |
13:51:59 | cheatfate | demi-, but currently it has status of `build failing` |
13:52:11 | cheatfate | demi-, and i'm waiting midnight for new nighly build with your changes |
13:52:34 | demi- | I don't think the nightly gets updated daily? |
13:53:22 | cheatfate | lol, why they called `nightly` then? |
13:53:23 | Parashurama | zachcarter: [89, 50, 4e, 47, d, a, 1a, a] (in hex) |
13:55:20 | demi- | dunno, maybe it updates when commits are made? |
13:55:37 | demi- | the nightly build was last updated 7 days ago based on the github page |
13:55:51 | demi- | 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:16 | FromGitter | <andreaferretti> stupid question |
14:16:32 | FromGitter | <andreaferretti> how do I add multiple paths for `cincludes`? |
14:16:32 | * | rainrawr joined #nim |
14:16:42 | FromGitter | <andreaferretti> in nimble each call like |
14:16:50 | FromGitter | <andreaferretti> `switch("cincludes", "/usr/local/cuda/targets/x86_64-linux/include")` |
14:16:56 | FromGitter | <andreaferretti> oevrwrites the previous one |
14:16:56 | Araq | use cinlcudes multiple times? |
14:17:12 | FromGitter | <andreaferretti> I tried :-) |
14:17:22 | FromGitter | <andreaferretti> in a nimble task |
14:17:31 | FromGitter | <andreaferretti> it seems the second one shadows the first one |
14:17:41 | Araq | does it work from command line? |
14:21:29 | FromGitter | <andreaferretti> yes, it does |
14:21:34 | FromGitter | <andreaferretti> seems a bug in nimble |
14:21:44 | FromGitter | <andreaferretti> just tried from the command line and it works |
14:22:23 | FromGitter | <andreaferretti> or possibly a bug in nimscript `task` |
14:30:22 | Araq | yeah -.- |
14:36:06 | * | zachcarter joined #nim |
14:46:19 | FromGitter | <andreaferretti> one last thing |
14:46:38 | FromGitter | <andreaferretti> now that I am able to produce a small custom CUDA library |
14:46:51 | FromGitter | <andreaferretti> is there a way to install that when installing a nimble package? |
14:47:09 | FromGitter | <andreaferretti> I would need to be able to run a custom command on nimble install |
14:47:30 | FromGitter | <andreaferretti> after having detected whether CUDA is present |
14:48:12 | FromGitter | <andreaferretti> and to make sure that libraries depending on linalg (and using CUDA) have ./nimble/linalg/linalg.so on their path |
14:49:23 | stisa | I 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:16 | FromGitter | <andreaferretti> thank you I'll try |
14:51:02 | FromGitter | <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:45 | subsetpark | I'm getting `out of memory` errors in my Nim code called by FFI. How can I investigate this issue? |
14:53:47 | Araq | subsetpark: compile with -d:useSysAssert -d:useGcAssert |
14:54:01 | demi- | andreaferretti, i think the wrapper for libssh2 would be an example of this |
14:55:10 | FromGitter | <andreaferretti> you mean this one? https://github.com/rgv151/libssh2.nim |
14:55:24 | FromGitter | <andreaferretti> doesn't seem so |
14:55:27 | subsetpark | hm, Araq, that produces no additional messages - does that mean the GC isn't actually running? |
14:55:58 | Araq | no it means no assertion is triggered |
14:56:08 | FromGitter | <andreaferretti> They say "In order to use this wrapper, libssh2 must installed on your system:" |
14:56:16 | FromGitter | <andreaferretti> I want to install the library as a dependency |
14:56:21 | demi- | ah i see |
14:56:29 | subsetpark | Araq: fair enough, but what can I conclude from this fact? |
14:56:44 | Araq | do you use 'realloc'? |
14:56:55 | Araq | are you on OSX? |
14:57:00 | subsetpark | I am on OS X |
14:57:11 | Araq | do you use 'devel' branch of nim? |
14:57:17 | subsetpark | Currently I'm not doing any manual memory management at all |
14:57:32 | Araq | 0.16.0 on OSX has a serious bug, use devel |
14:57:36 | subsetpark | Nope, I'm on 0.16.0 -d:release -d:useLinenoise |
14:57:45 | subsetpark | ah, interesting |
14:58:02 | demi- | so if we have it installed from homebrew we should reinstall using --head? |
14:58:35 | subsetpark | demi-: yep |
14:58:55 | subsetpark | well, it's csources:master, but Nim:devel |
14:59:14 | demi- | yeah, ok cool |
15:00:16 | subsetpark | Araq: nim --version should report 0.16.1, yeah? |
15:00:40 | Araq | yes |
15:00:49 | subsetpark | Araq: unfortunately I get the same out of memory error, with no debugging info :( |
15:01:03 | demi- | this shouldn't break ABI compatibility with older nim code, right? |
15:01:04 | * | trusion quit (Quit: Leaving) |
15:01:40 | Araq | there is no ABI we could break, I think |
15:01:55 | * | bjz joined #nim |
15:02:37 | demi- | thanks, that is pretty neat |
15:09:25 | subsetpark | Anybody have any other ways to get more information about an out of memory crash? |
15:09:47 | subsetpark | Anybody have any other ways to get more information about an out of memory crash? |
15:10:17 | Araq | well maybe your program uses too much memory? |
15:10:38 | Araq | maybe the core datastructures of the allocator are corrupted? |
15:11:05 | ftsf | tried valgrind? |
15:11:23 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
15:12:00 | demi- | subsetpark: there is the clang address sanatizer too |
15:12:01 | Araq | https://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:00 | subsetpark | Alright, I'll dive in |
15:22:27 | subsetpark | I'm pretty confident it doesn't use too much memory; it's just handling a few dozen very small objects |
15:22:56 | subsetpark | And before it fails `getFreeMem` returns 417792 |
15:23:49 | * | stisa quit (Ping timeout: 240 seconds) |
15:26:28 | Araq | you 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:01 | subsetpark | no 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:55 | Araq | so you produce a dylib? |
15:29:17 | Araq | you need to call NimMain() or something |
15:31:33 | subsetpark | Ok, that was what I wasn't sure about |
15:32:30 | subsetpark | I 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:39 | Araq | well I dunno, for DLLs NimMain is not required because we generate a __constructor__() thing |
15:34:36 | Araq | show us your code please |
15:36:04 | cheatfate | Araq, for windows NimMain is also not required because we can make GC initialization inside of DllMain |
15:37:48 | subsetpark | Araq - 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:44 | Araq | subsetpark: just show me the code |
15:41:21 | Araq | I won't read it anyway, no worries |
15:42:00 | * | zachcarter is now known as carterza |
15:47:22 | * | unlaudable joined #nim |
15:49:43 | FromGitter | <andreaferretti> I have submitted a bug report for the nimble problem with repeated switches |
15:49:44 | FromGitter | <andreaferretti> https://github.com/nim-lang/nimble/issues/329 |
15:49:58 | FromGitter | <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:20 | ftsf | hmm 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:33 | Araq | you cannot run a config.nims this way |
16:24:48 | * | unlaudable quit (Max SendQ exceeded) |
16:24:56 | ftsf | i 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:37 | Araq | ftsf: what is your platform? |
16:25:51 | ftsf | running on linux, but compiling for standalone |
16:26:47 | ftsf | trying to use the config.nims to patch osalloc.nim as you suggested. |
16:30:11 | * | yglukhov quit (Remote host closed the connection) |
16:35:14 | Araq | ftsf: ah submit a fix then :-) |
16:37:35 | ftsf | i'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:48 | ftsf | does 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:52 | ftsf | hacking 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:25 | rokups | what magic ritual should i perform so nimble works with ssl? |
18:49:58 | rokups | such basic stuff failing is what drives people away... using nim requires actual dedication :| |
18:51:06 | demi- | https://github.com/nim-lang/nimble#troubleshooting are these directions not working? |
18:51:21 | rokups | or maybe im just an idiot and i had VERY old version in ~/.nimble =x |
18:53:11 | dom96 | Yes, but Nim also has the best support. :) |
18:53:18 | dom96 | How did you install Nimble? |
18:53:41 | dom96 | Actually, I should ask: what errors are you getting? |
18:53:43 | rokups | it works already :p |
18:54:20 | dom96 | Not that much dedication required then? :P |
18:54:33 | dom96 | I guess you've had other problems before. |
18:54:44 | rokups | stopping being stupid is quite an effort. compiler should handle that for me! |
18:55:21 | dom96 | Suggestions on how to lower the barrier to entry are always welcome :) |
18:56:08 | rokups | seems like binary is no longer installed into ~/.nimble. thats good ;) |
18:57:57 | dom96 | why's that? |
18:58:23 | rokups | well thats where old version lived and it was broken. and i decided world is falling apart |
18:58:45 | rokups | now that it lives with compiler we can safely assume it will be fresh |
18:59:04 | rokups | dom96: since you asked about suggestions.. isnt packages on github via pull requests kind of tedious? manually approving everything etc |
18:59:57 | dom96 | sure is |
19:00:13 | dom96 | But I personally don't have the time to create a hackage/cargo.io/npm clone |
19:00:42 | dom96 | It's definitely on the roadmap though |
19:00:42 | demi- | cocoapods does/did that too |
19:00:51 | dom96 | and others have already started working on it |
19:01:05 | rokups | certainly. i wonder how archlinux does it with aur. maybe we could get ideas from there? |
19:01:31 | rokups | every package has it's own repo there it seems |
19:02:25 | dom96 | they also have a website for submitting packages to |
19:02:25 | demi- | 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:09 | dom96 | Nimble's packages.json support will remain though, it's useful for people who want to create their own package lists. |
19:03:32 | rokups | or maybe you could use simple bot that accepts PRs after some checks are done ^_^ |
19:04:24 | rokups | anyways time to rest. bye |
19:05:22 | * | nsf quit (Quit: WeeChat 1.7) |
19:06:46 | dom96 | Araq: 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:39 | Araq | ah 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:28 | euantor | I have a feeling I'm being stupid, but how do you get a pointer to a position within a cstring? |
20:27:50 | euantor | Tried this: https://glot.io/snippets/emspkfcg3f |
20:27:50 | krux02 | a pointer to what? |
20:27:55 | Parashurama | cstringvar[pos].addr |
20:28:11 | Parashurama | of [pos].unsafeAddr if let variable |
20:28:15 | Parashurama | *or |
20:28:25 | * | bjz joined #nim |
20:28:39 | euantor | Parashurama: Hm, I guess I need `unsafeAddr` if the cstring is passed to the proc too |
20:28:54 | Parashurama | yep |
20:29:15 | euantor | Cheers, I thought I was being stupid |
20:29:19 | Parashurama | but be careful with unsafeAddr, its *really* unsafe |
20:29:32 | krux02 | since 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:38 | euantor | So best bet would be to copy the string to a local variable and then get the address |
20:29:41 | krux02 | it works but feels dirty |
20:30:00 | Parashurama | It you try to modify a constant, you likely get an undefnied behaviour. |
20:30:00 | * | adeohluwa quit (Quit: Lost terminal) |
20:30:06 | krux02 | euantor: depends on the context you cant say that generally |
20:30:22 | Parashurama | It's fine for a variable |
20:30:22 | euantor | The context is writing to a serial port, using `posix`.`write` |
20:30:39 | euantor | The cstring is data passed in to the function to write to the port |
20:30:48 | krux02 | and you want the string to be written to the serial port? |
20:31:07 | Parashurama | should be fine as long as string source is not modified. |
20:31:14 | Parashurama | inside proc |
20:31:25 | krux02 | can you paste the api you need to use? |
20:31:35 | euantor | Yeah, I want to write the string to the serial port |
20:31:50 | krux02 | yes that is what unsafeAddr is for |
20:32:16 | euantor | https://www.irccloud.com/pastebin/KghtoLCM/ |
20:32:37 | euantor | I'll go with unsafeAddr, and hope for the best for now |
20:33:52 | euantor | I'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:11 | krux02 | don't hope, know |
20:34:37 | krux02 | unsafeAddr and addr do basically the same thing |
20:35:24 | krux02 | unsafeAddr 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:56 | krux02 | you just look up in the API if it can modify the argument, and when it never does it, unsafeAddr is fine |
20:36:03 | krux02 | it is just that you have to do that step manually |
20:36:07 | euantor | Ah, ok. Thanks very much |
20:36:21 | euantor | Makes 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:55 | Parashurama | Does anybody knows a way to check if a module is installed? |
20:50:02 | Parashurama | I 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:00 | dom96 | maybe try something like: when compiles(import module): |
20:59:09 | * | xet7 quit (Ping timeout: 240 seconds) |
20:59:20 | Parashurama | doesn't work, it only accept expressions. |
21:01:11 | Parashurama | I don't really need it for now, but it could be interesting in some case, for optional depandancies. |
21:03:09 | dom96 | hrm, what sort of optional dependencies would you use it for? |
21:03:56 | Parashurama | I'm working on a tarfile module with optional bz2, gz lzma depandancies |
21:04:10 | Parashurama | the gzipfiles module is already done |
21:04:19 | dom96 | awesome |
21:05:20 | Parashurama | I 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:42 | Parashurama | but that's just a thought |
21:05:45 | dom96 | I don't think you should over complicate this. |
21:06:10 | dom96 | Just have the user install of those dependencies. |
21:06:36 | Parashurama | I also could just use compile -d:FLAG for available compressions |
21:07:38 | Parashurama | But the longest part tarfile module is far from done, the specification huge and quite complicated!! |
21:07:45 | stisa | Are all modules in different nimble packages? you could check if they are in the output of `nimble list -i` |
21:08:33 | Parashurama | That's was also a possibility with static exec |
21:09:43 | Parashurama | a good idea for a check_dependency module :) |
21:09:46 | dom96 | You don't need to do that. |
21:10:07 | dom96 | Nim will only require whatever the user is actually using out of your library. |
21:10:07 | Parashurama | No of course, it's just a possibility. |
21:10:51 | Parashurama | in release mode yes, it still need to be installed. |
21:10:53 | * | Jesin joined #nim |
21:11:03 | dom96 | Performing such hacks may result in some frustrating behaviour in the future for your libraries users. |
21:11:52 | Parashurama | Don't worry it was just a theorethical example of black magic. :) |
21:12:08 | * | rokups quit (Quit: Connection closed for inactivity) |
21:12:15 | Parashurama | kinda like hacking the import system of python |
21:12:46 | Parashurama | for custom resolving path of module to intercept stdlib module |
21:12:59 | Parashurama | no patchFile in python |
21:13:31 | * | bjz joined #nim |
21:13:46 | * | handlex joined #nim |
21:14:40 | * | carterza quit (Quit: carterza) |
21:17:44 | Parashurama | dom96: btw I replied in the PR for zip module. |
21:22:32 | * | handlex quit (Quit: handlex) |
21:26:35 | dom96 | Parashurama: Replied |
21:26:49 | dom96 | I 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:47 | Parashurama | dom96: I will check the zlib code for deflateEnd make sure it is deallocated in all cases |
21:29:46 | * | handlex joined #nim |
21:31:41 | dom96 | okay |
21:31:43 | dom96 | good 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:22 | cheatfate | Parashurama, `tar` is very simple format |
22:02:27 | cheatfate | why documentations is huge? |
22:03:12 | Parashurama | the 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:04 | Parashurama | although I don't intend to write full GNU replacement |
22:05:55 | Parashurama | *obviously |
22:05:57 | cheatfate | Parashurama, it will be nice to have `deflate.nim` even with decompression only |
22:06:18 | cheatfate | i dont think tarfile module is good usage of you :) |
22:06:28 | cheatfate | of your power :) |
22:06:37 | Parashurama | by deflate you mean untar, right? |
22:07:26 | Parashurama | It's just a project on the side. It's not like I work on this full time. |
22:08:06 | cheatfate | deflate is compression method https://en.wikipedia.org/wiki/DEFLATE used everywhere |
22:08:18 | cheatfate | it used in web for `gz` and `deflate` encodings |
22:08:26 | cheatfate | it can be used to unpack tar.gz files :) |
22:08:34 | cheatfate | it used to compress ssh stream |
22:08:49 | Parashurama | yeah sorry, i always confuse the two deflate/inflate |
22:09:27 | Parashurama | There is already an uncompress/inflate compress/deflate proc in zip/zlib nimble module |
22:10:15 | Parashurama | with a gzipfile PR in the works, after I polish it a bit. |
22:10:16 | cheatfate | Parashurama, this is just `lazy` wrappers... |
22:10:36 | Parashurama | look at the bottom. |
22:10:39 | cheatfate | and i dont like wrapper |
22:11:04 | cheatfate | and what at the bootm? |
22:11:13 | cheatfate | https://github.com/nim-lang/zip/blob/master/zip/zlib.nim#L6 |
22:11:16 | cheatfate | this is wrapper |
22:11:33 | Parashurama | unless you meant reimplementaing zlib in pure nim, which is daunting. |
22:11:49 | Parashurama | I 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:14 | cheatfate | deflate decompressor is not so big as you think |
22:12:35 | cheatfate | its not a compressor with dynamic huffman trees |
22:12:54 | Parashurama | Well I also meant reasonably optimized, as well as gzip functionality. |
22:13:13 | cheatfate | optimized? :) |
22:13:19 | cheatfate | nope its not optimized |
22:13:30 | Parashurama | Well zlib is pretty fast. |
22:13:46 | Parashurama | for using DEFLATE algorithm |
22:14:32 | Parashurama | I don't quite get the same throughput with miniz |
22:14:43 | Parashurama | in C anyway. |
22:15:06 | cheatfate | ok forget it |
22:15:48 | * | zachcarter joined #nim |
22:15:50 | cheatfate | it 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:15 | cheatfate | travis still can't repair service |
22:17:38 | Parashurama | I don't mind challenges, it just isn't a priority right now. |
22:18:34 | Parashurama | The only argument I would accept is that zlib is quite heavy compared to miniz/ pure nim implementation |
22:19:36 | cheatfate | interesting and what is most prioritized targets for you now? |
22:21:47 | Parashurama | Actually programming is just a hobby, but I'm working on a small RPG game when I can find the time. |
22:22:55 | Parashurama | Which is mostly an excuse to use Nim. |
22:25:28 | Parashurama | by small I mean its already something like 30000 LOC of nim :P |
22:26:29 | carterza | I got distance field fonts going :D http://imgur.com/a/xTJRV |
22:27:10 | Parashurama | congrats, that can be tricky sometimes. |
22:27:49 | carterza | thanks |
22:27:49 | Parashurama | although it can be expensive compared to rendering glyph from textures. |
22:28:07 | carterza | ah I’m still using bitmap fonts |
22:28:54 | carterza | I guess the filtering makes it expensive? |
22:29:00 | carterza | and the mipmapping? |
22:29:12 | Parashurama | oh, I know, but the additional shader instructions/switches can be expensive. |
22:29:34 | carterza | ahh okay gotcha |
22:29:49 | carterza | I’m making a roguelike engine so I think it’s necessary for my use case |
22:29:58 | carterza | or a roguelike game |
22:30:12 | Parashurama | In the technique I was talking about, you always render at real texture size, so mipmapping. |
22:30:38 | Parashurama | altough it require uploading each freetype glyph at each used size. |
22:30:46 | carterza | right |
22:31:24 | Parashurama | How do you handle your text layout? |
22:32:22 | Parashurama | Pango Harfbuzz might be somewhat overkill |
22:32:37 | carterza | I don’t really at the moment |
22:34:15 | Parashurama | I 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:47 | carterza | ahh nice |
22:35:37 | Parashurama | I 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:26 | Parashurama | but it support formatted text with color underline, margin, italic bold, line spacing. |
22:36:48 | carterza | nice |
22:37:12 | Parashurama | It's not the most beautiful rendering, but speed was the goal. |
22:37:42 | Parashurama | and it support unicode. yeah. although only left to right for now. |
22:38:01 | carterza | awesome |
22:38:11 | carterza | I need to pick a font to use for the maps in my game |
22:38:41 | carterza | preferably something square |
22:39:17 | Parashurama | Well you need monospace font. on linux DejaVu Mono is pretty nice and Free! |
22:39:38 | Parashurama | you might need to check the licence. |
22:40:03 | carterza | yeah I don’t think it’s square though :/ |
22:40:07 | carterza | Source code pro will probably work |
22:40:30 | Parashurama | isn't it proprietary? |
22:40:44 | carterza | not sure good question |
22:42:09 | carterza | ah found one Parashurama - Inconsolata |
22:43:21 | Parashurama | Oh yeah, I tested that one some month ago in my editor. |
22:43:33 | Parashurama | here is a sample: https://postimg.org/image/jj01dda3x/ |
22:43:58 | carterza | nice! |
22:44:30 | Parashurama | The gui is a custom library I wrote mosly designed for game use |
22:44:42 | carterza | it looks really good |
22:44:47 | carterza | I need a gui library badly :/ |
22:44:58 | carterza | thinking of spending a few days and wrapping nuklear |
22:45:20 | Parashurama | It's themeable so you can skin it completly. |
22:45:38 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
22:45:47 | Parashurama | It's inspired by the kytten library for the pyglet framework for python |
22:46:04 | carterza | sounds sweet |
22:46:53 | Parashurama | The game icons are not made by me but by Blizzard (from some old WoW version) |
22:47:38 | carterza | right |
22:47:49 | Parashurama | It was a pretty nice Library but has been abandoned for 4 years. |
22:48:28 | Parashurama | and anyway python, is not really suitable for a complex game, no matter what some people says. |
22:48:44 | Parashurama | too many bugs at runtime |
22:49:17 | carterza | are you using opengl? |
22:49:34 | Parashurama | Yep, opengl3 to be precise. |
22:49:41 | carterza | nice |
22:49:49 | carterza | is your gui retained or immediate? |
22:50:10 | Parashurama | on sdl2, but the gui is designed to framework agnostic. |
22:50:20 | carterza | yeah that’s my setup as well |
22:50:23 | Parashurama | I don't understand your question |
22:50:37 | carterza | so retained mode GUIs essentially maintain some state |
22:50:42 | * | brson quit (Read error: Connection reset by peer) |
22:50:42 | carterza | across updates |
22:51:01 | carterza | whereas an immediate mode gui, you’d draw and handle all your UI updates per frame |
22:51:16 | carterza | so immediate mode guis tend to result in a lot more draw calls |
22:51:19 | Parashurama | Oh, you mean something like hasdirtyRect |
22:51:46 | carterza | let me find a better example |
22:51:50 | Parashurama | no I draw every primitive every frames, but since I use VBO, I really doen't take that much |
22:52:01 | carterza | https://github.com/ocornut/imgui |
22:52:05 | carterza | here’s an immediate mode GUI |
22:52:16 | * | brson joined #nim |
22:56:21 | Parashurama | I think I get it. the widgets are recreated at each frame and data sent to GPU. I don't do that. |
22:57:33 | carterza | exactly |
22:57:44 | carterza | gotcha |
22:58:33 | Parashurama | Widgets are created in some initialization code and rendered in a render loop with the rest of the world. |
22:58:44 | Parashurama | *well above really |
22:59:26 | carterza | gotcha |
22:59:34 | carterza | I’m wondering if - https://github.com/memononen/nanovg - might be useful in my project |
22:59:40 | Parashurama | sample widget code: https://gist.github.com/Parashurama/fc8b5fa8c49700dcaf5feb3a66a9f75d |
23:00:52 | Parashurama | newDialog is registered in a guimanager(a graphic batch) and then its done. |
23:01:13 | * | def-pri-pub joined #nim |
23:01:40 | carterza | nice, looks easy to use |
23:02:43 | * | devted quit (Quit: Sleeping.) |
23:02:59 | Parashurama | nanovg 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:20 | Parashurama | unless they know something I don't :) |
23:03:32 | carterza | I’d probably just be redering lots of squares |
23:03:35 | carterza | with text in them |
23:03:38 | carterza | different colors |
23:03:57 | Parashurama | well, that's perfectly alright. |
23:04:36 | carterza | it looks like someone already wrapped it, trying to get their wrapper to compile now |
23:05:01 | Parashurama | It's really the smooth and/or wavy lines, blur, etc that kill performance. |
23:05:25 | carterza | yeah |
23:06:20 | Parashurama | But I didn't kown that library thanks. It looks really good. Bookmarked! |
23:07:33 | carterza | np! |
23:09:04 | Parashurama | Alright, it's getting late, bye. |
23:10:04 | carterza | have 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:39 | carterza | hmm 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) |