<< 20-09-2017 >>

00:05:15*arnetheduck joined #nim
00:10:07*renarc joined #nim
00:13:34*arnetheduck quit (Ping timeout: 264 seconds)
00:44:54*rauss quit (Read error: Connection reset by peer)
00:46:45*rauss joined #nim
00:50:24*def-pri-pub joined #nim
01:01:34*renarc quit (Ping timeout: 264 seconds)
01:09:05*thomasross quit (Read error: Connection reset by peer)
01:10:33*vlad1777d quit (Remote host closed the connection)
01:11:12FromGitter<zacharycarter> I'm very close with my multiplayer example
01:11:29FromGitter<zacharycarter> but my async loop isn't pumping in the second thread
01:11:46FromGitter<zacharycarter> it seems still hung up on the sdl2 game loop somehow :/
01:19:47*renarc joined #nim
01:22:05FromGitter<zacharycarter> hoping someone can help me figure out what I'm doing wrong : https://gist.github.com/zacharycarter/307182651fc3dd972c849b9d8acf9de8
01:22:07FromGitter<zacharycarter> I'm so close
01:22:39*yglukhov joined #nim
01:27:05*yglukhov quit (Ping timeout: 240 seconds)
01:29:46FromGitter<zacharycarter> bleh sdl2 is still blocking so I'm not getting my events that's why
01:29:58*ipjk_ quit (Quit: Leaving)
01:30:10FromGitter<krux02> have you tried peekEvents?
01:30:24FromGitter<zacharycarter> I don't know how to use it :/ I think it's peepevents
01:30:44FromGitter<krux02> well you should create a buffer of events
01:32:21FromGitter<krux02> then you call SDL_PumpEvents() which does the blocking when you want it
01:33:01FromGitter<krux02> and then with SDL_PeepEvents you can get all events at once
01:33:13FromGitter<zacharycarter> hrm okay
01:33:36FromGitter<krux02> but I don't know where your problem is
01:33:43FromGitter<krux02> how is the blocking causing problems?
01:34:14FromGitter<zacharycarter> my communication method is kind of crazy
01:34:22FromGitter<zacharycarter> I have a background thread that I'm using channels to communicate with
01:34:29FromGitter<zacharycarter> and then from that thread I'm firing off SDL custom events
01:34:34FromGitter<zacharycarter> and handling them in the main thread
01:35:20FromGitter<krux02> ok
01:35:42FromGitter<krux02> not sure if that is a good idea, but sure you can do it
01:36:03FromGitter<zacharycarter> it seems to be working and relatively fast
01:36:12FromGitter<krux02> so instead of sdl2.defaultEvent you should have a seq of Events
01:36:25FromGitter<krux02> EventObj it is called AFAIK
01:36:25FromGitter<zacharycarter> yeah I just tried tht
01:36:46FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1c62ebac826f054db1b1c]
01:36:51FromGitter<zacharycarter> doesn't like it though
01:37:16FromGitter<krux02> oh yea
01:37:23FromGitter<krux02> what api are you using
01:37:30FromGitter<zacharycarter> official sdl2 one
01:37:38FromGitter<krux02> ok
01:37:46FromGitter<zacharycarter> seems like it wants a ptr to an event object
01:37:50FromGitter<zacharycarter> I'll dump it and see what I get
01:40:03FromGitter<krux02> yes it does ⏎ you should pass the pointer to the first element in the seq
01:40:59FromGitter<krux02> numevents is the length of the seq
01:41:37FromGitter<krux02> basically the API sucks, because it should have been openarray, but yea at least it works
01:46:16FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1c868c101bc4e3ae995cb]
01:46:36FromGitter<zacharycarter> something like that?
01:46:46FromGitter<krux02> nope the seq evts needs to have a length
01:46:55FromGitter<krux02> it is used as a preallocated buffer
01:47:06FromGitter<krux02> that is a common C API patters
01:47:26FromGitter<zacharycarter> gotcha
01:47:32FromGitter<krux02> that means that you need ``evts = newSeqsdl2.Event (100)``
01:48:07FromGitter<zacharycarter> thanks
01:48:15FromGitter<zacharycarter> yay working!
01:48:28FromGitter<krux02> cool
01:48:38FromGitter<krux02> I actually never used peepEvents :P
01:49:03FromGitter<zacharycarter> me either heh
01:49:06FromGitter<zacharycarter> obviously
01:49:49FromGitter<krux02> there are a lot of functions in opengl that require a preallocated buffer to be written to
01:50:29FromGitter<krux02> does it run faster now?
01:51:13FromGitter<zacharycarter> no, something else must be up with my code ugh
01:56:48*chemist69 quit (Ping timeout: 240 seconds)
02:10:11*relax joined #nim
02:10:35*chemist69 joined #nim
02:13:25*libman joined #nim
02:16:51def-pri-pubzacharycarter: heya
02:17:25FromGitter<zacharycarter> hey def-pri-pub
02:17:35FromGitter<zacharycarter> I saw your message about the matrix thing
02:17:43FromGitter<zacharycarter> need to do some thinking on it
02:17:44def-pri-pubwas just about to ask you that
02:17:47def-pri-pubYeah
02:18:25def-pri-pubIMO, I'm not sure if providing an OpenGL emulation is good
02:19:33def-pri-pubI know you put a lot of work into adding ZGL, but I have to give a little doubt if it's worth it to have.
02:19:35FromGitter<zacharycarter> when you say OpenGL emulation do you mean the way zengine abstracts away the API currently?
02:19:43def-pri-pubYeah, sort of
02:20:04def-pri-pubZGL is an abstraction over OpenGL, am I correct?
02:20:24def-pri-pub(and ZGL was a port of raylib's OpenGL abstraction)
02:21:04FromGitter<krux02> I know that myself I try to avoid API that put abstraction over abstraction
02:21:08def-pri-pubThough, I don't think telling the programmer to call OpenGL stuff themselves is good
02:21:34FromGitter<krux02> well it depends
02:21:50FromGitter<krux02> opengl has a lot of state, and changing that ist bad
02:22:33FromGitter<krux02> or at least error prone
02:22:55FromGitter<krux02> but interacting with OpenGL in a defined way is something I don't see as bad
02:24:14*nimnoob joined #nim
02:24:33nimnoobHello.
02:25:49FromGitter<zacharycarter> hi nimnoob
02:26:25FromGitter<zacharycarter> def-pri-pub: I've thought about replacing the zengine renderer with something like - https://github.com/JoeyDeVries/Cell
02:26:44*tax joined #nim
02:27:53def-pri-pubIs it pure C?
02:28:14def-pri-pubNot that I had C++, but I'd like to avoid adding in C++ if we can.
02:28:19def-pri-pubhate*
02:28:36FromGitter<zacharycarter> no I mean I'd port it
02:28:36def-pri-pubAlso, what happened to those BGFX bindings?
02:28:52def-pri-pubWas it not worth it?
02:29:24FromGitter<zacharycarter> well bgfx adds another layer of complexity
02:29:36FromGitter<zacharycarter> I abandoned frag because of it
02:29:55FromGitter<zacharycarter> a lot of people couldn't be bothered with getting frag to run
02:29:59FromGitter<zacharycarter> because they had to compile bgfx etc
02:30:13FromGitter<zacharycarter> I liked bgfx personally
02:30:20def-pri-pubYeah, I think I did have issues with BGFX myself on Linux
02:34:31FromGitter<zacharycarter> I wouldn't get so down on zgl yet def-pri-pub I think it's a decent abstraction
02:34:58FromGitter<zacharycarter> but I'll fool around with someting else soon
02:35:04def-pri-pubWell, that push matrix issue does need to be fixed.
02:35:54nimnoobCan anyone help me with this error? http://pasted.co/b4530f70 i don't have anything in /bin it's in /system/bin/sh so how do i change this?
02:36:00FromGitter<zacharycarter> I'll take a look in the morning my brain is so fried from this networking crap I was trying to get working all day
02:36:23*dddddd quit (Remote host closed the connection)
02:37:01def-pri-pub(I also think that a max stack size of 16 is kind of really dinky)
02:37:22Tangernimnoob: Check if system/bin/sh is in your path. It may not be set properly in your environment or nim may not be searching the path by default
02:39:16nimnoobOk thanks.
02:43:05FromGitter<zacharycarter> curse sdl2 and its event loop
02:47:44nimnoobTanger : it doesn't work. This is what it looks like. http://pasted.co/d12ee7af what am i doing wrong?
02:51:11*endragor joined #nim
02:53:44nohusuronimnoob: are you on linux or mac?
02:54:45nimnoobI'm on Android.
02:55:05nohusurousing termux?
02:55:17nimnoobYes using Termux
02:55:30nohusuroshow us the output of: which sh
02:55:51*endragor quit (Ping timeout: 252 seconds)
02:56:09*endragor joined #nim
02:56:47nimnoobIt says /data/data/com.termux/files/usr/bin/sh
02:56:49nohusuroalso the output of echo $PREFIX
02:57:34nimnoobOk hang on a sec.
02:58:40nimnoobecho $PREFIX = /data/data/com.termux/files/usr
02:59:00nohusurook type this: export CONFIG_SHELL=$PREFIX/bin/sh
02:59:03nohusuroand see if you can compile
03:03:09nimnoobnohusuro : i'm getting the same error message.
03:03:15def-pri-pubzacharycater: I found a fix for `pushMatrix` and I PR'd it
03:03:35nohusuronimnoob: also do these
03:03:51nohusuroexport BIN_SH=$PREFIX/bin/sh
03:04:15nohusuroexport TMPDIR=/data/data/com.termux/files/tmp
03:04:19nohusuroexport TMP=$TMPDIR
03:04:25nohusuroexport TEMP=$TMPDIR
03:04:40nohusurothen try again
03:07:15*shashlick joined #nim
03:08:04nohusuroalso are you compiling with -d:android -d:termux
03:08:29nohusuroas seen in the nim.cfg here: https://github.com/nim-lang/Nim/blob/786f9315e381406181843d245b5ac1f8553b6fa2/config/nim.cfg#L93-L103
03:13:15*smt_ quit (Quit: Leaving)
03:13:35*smt joined #nim
03:15:47FromGitter<zacharycarter> meh I give up - I don't think it's sdl2's fault
03:16:24FromGitter<zacharycarter> something is up with my background thread
03:16:33*mahmudov quit (Quit: Leaving)
03:16:46*mahmudov joined #nim
03:16:57FromGitter<zacharycarter> the async reader proc doesn't get invoked until I start moving things around on the main thread
03:22:07*Ven`` joined #nim
03:23:36nimnoobNohusuro : my Nim.cfg looks exactly like that but it gives me the same error code. I tried everything but the error seems to be the same
03:24:37nohusuroso you also tried with the -d flags?
03:24:39*yglukhov joined #nim
03:26:06nohusuromaybe try to manually specify the useShPath
03:26:21nohusuro--define:useShPath:/data/data/com.termux/files/usr/bin/sh
03:27:06nimnoobMaybe i'm doing something wrong http://pasted.co/97f32598
03:28:11shashlickCan someone help with my asyncdispatch attempt? https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286
03:28:55shashlickafter get_fingerprint() runs, function doesn't continue (line 14+)
03:29:50*yglukhov quit (Ping timeout: 240 seconds)
03:30:41*Ven`` quit (Ping timeout: 248 seconds)
03:32:09nimnoobNohusuro : unfortunately replacing that value didn't work.
03:32:32nohusurothen I'm out of ideas, sorry nimnoob
03:32:45nohusuroperhaps nuke termux and try from scratch
03:33:09nohusuronimnoob: your d:android needs a -
03:33:14nohusuroneeds to be -d:android
03:33:38nimnoobNo don't be. Thanks a lot for your tips.
03:33:46nimnoobOh ok
03:34:14nohusurosaid I was out of ideas before I saw your paste :P
03:35:31nimnoob:)
03:36:26nohusuroso your final call should look like this
03:36:36nohusuronim c -r -d:android -d:termux hallo
03:38:06nohusuroshashlick: have you verified the value of data in get_fingerprint?
03:38:14nohusuroperhaps put an echo $data after ln#2
03:39:33FromGitter<zacharycarter> anyone know why I can't do this:
03:39:39FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1e2fb177fb9fe7ee0e1fb]
03:39:41*pilne quit (Quit: Quitting!)
03:40:01FromGitter<zacharycarter> sorry it should read
03:40:14FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1e31e1081499f1f512e16]
03:40:45FromGitter<zacharycarter> and that compiles heh
03:41:04nohusurosoooo, fixed? xD lol
03:41:24FromGitter<zacharycarter> lol it's still not working in my code
03:41:37FromGitter<zacharycarter> but of course in this asinine example it is fine
03:41:43shashlicknohusuro: works fine, I get the output as expected
03:42:18shashlicknohusuro: it prints the Fingerprint line, I also tried printing jdata and it is as expected too
03:42:26FromGitter<zacharycarter> okay this fails
03:42:32FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59c1e3a8bc46472974559889]
03:42:47shashlicknohusuro: line 15 doesn't print though
03:48:25nohusurozacharycarter, try something like this: http://termbin.com/9yjk
03:49:22FromGitter<zacharycarter> thanks nohusuro
03:51:54*nimnoob quit (Ping timeout: 260 seconds)
03:53:14nohusuroshashlick: perhaps the {.async.} flag on get_fingerprint is being ignored because there's no awaiting on that proc?
03:54:38*tax quit (Ping timeout: 246 seconds)
03:56:28nohusuromaybe try wrapping it in a thread and awaiting that
04:00:10*def-pri-pub quit (Quit: Lost terminal)
04:00:12shashlickbut get_fingerprint() itself is being awaited right?
04:00:16shashlickhow many layers do I need?
04:14:39FromGitter<zacharycarter> hrm I need to be able to cast to a pointer
04:14:48FromGitter<zacharycarter> not just call addr
04:36:02*BigEpsilon joined #nim
04:36:45*UxerUospr joined #nim
04:44:43nohusurozacharycarter, addr gets a pointer. https://nim-lang.org/docs/system.html#pointer
04:44:56nohusurobuilt-in pointer type, use the addr operator to get a pointer to a variable
05:05:50*gmpreussner quit (Ping timeout: 240 seconds)
05:12:36*yglukhov joined #nim
05:16:48*yglukhov quit (Ping timeout: 240 seconds)
05:18:46*yglukhov joined #nim
05:18:47*Vladar joined #nim
05:19:19*UxerUospr quit (Quit: Lost terminal)
05:19:57*relax quit (Ping timeout: 252 seconds)
05:20:31*shashlick quit (Ping timeout: 248 seconds)
05:20:59*yglukhov quit (Remote host closed the connection)
05:24:58*gmpreussner joined #nim
05:30:58*Lord_Nightmare quit (Ping timeout: 264 seconds)
05:33:24*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:38:07*BigEpsilon quit (Ping timeout: 248 seconds)
05:48:31*yglukhov joined #nim
05:51:10*libman quit (Quit: Connection closed for inactivity)
05:57:23*Lord_Nightmare joined #nim
06:05:44*BigEpsilon joined #nim
06:08:24*jsgrant quit (Quit: jsgrant)
06:10:16*yglukhov quit (Remote host closed the connection)
06:20:28*nsf joined #nim
06:20:34*PMunch joined #nim
06:22:31*ShalokShalom quit (Read error: Connection reset by peer)
06:27:39*ShalokShalom joined #nim
06:31:27nohusuroWhy can't addHandler accept subtypes of EventArgs? http://termbin.com/rbqy
06:38:17Araqbecause this form of subtyping would be unsound.
06:40:23nohusurounsound how?
06:42:10AraqI can emit an EventArgs and your handleevent crashes?
06:42:25Araqbecause it only deals with ServerConnectedEventArgs
06:42:48FromGitter<mratsim> @Yardanico @Varriount Yeah term rewriting macro are really awesome, especially for math libraries (fusing a*X+Y in a single loop). So powerful that Google wish they had it in Python/C++ and spent a lots of time to build a compiler that does that: technical: https://www.tensorflow.org/versions/r0.12/resources/xla_prerelease, layman: https://developers.googleblog.com/2017/03/xla-tensorflow-compiled.html
06:43:15nohusuroAraq: shouldn't that just be a compile time error?
06:43:31AraqI call this "Araq's rule of subtyping": "if you like subtyping you don't understand subtyping"
06:44:52*Arrrr joined #nim
06:45:37Araqnohusuro: emit's type signature accepts an EventArgs, how could the compiler prevent it?
06:45:55Araqby making your handleevent incompatible and that's what it does :P
06:46:03*PMunch quit (Quit: Leaving)
06:46:51Araqbtw don't use the 'events' module, it predates async and is generally unuseful
06:47:24nohusurois there any note of that in the documentation?
06:47:38nohusuroif it predates async, why not make it deprecated?
06:47:57*gokr joined #nim
06:49:18AraqPRs welcome
06:50:29AraqI'm not a fan of stdlib modules which explain type theory
06:54:46FromGitter<mratsim> Do we need that?: https://wiki.haskell.org/Typeclassopedia
06:58:15nohusuro23
06:58:24nohusurohmm, whoops, wrong window
07:01:02*PMunch_ joined #nim
07:01:35*endragor quit (Remote host closed the connection)
07:01:54*PMunch_ is now known as PMunch
07:04:51*solitudesf joined #nim
07:05:11*solitudesf quit (Remote host closed the connection)
07:05:21*Arrrr quit (Ping timeout: 240 seconds)
07:05:31*solitudesf joined #nim
07:07:09*endragor joined #nim
07:07:10nohusuroAraq: coming back to your argument about the subtyping being unsound, events are unsound as it stands anyway with the current typing: http://termbin.com/dp13
07:15:13nohusuroI think if events were to stick around EventHandlers should be allowed a type specifier like: var x: EventHandler[xEventArgs]
07:15:35nohusurothat way the compiler would know which EventTypes should be allowed and throw compiler errors on mismatched types
07:19:20*claudiuinberlin joined #nim
07:20:56*claudiuinberlin quit (Client Quit)
07:29:14*yglukhov joined #nim
07:31:13*claudiuinberlin joined #nim
07:33:53*claudiuinberlin quit (Client Quit)
07:36:25*claudiuinberlin joined #nim
07:38:59*Sembei joined #nim
07:39:02*Pisuke quit (Ping timeout: 260 seconds)
07:48:37gokrAraq: Just curious, what kind of state are we in when it comes to channels/threads/shared nothing concurrency etc etc?
07:55:02*Yardanico joined #nim
08:06:31Yardanicohmm, I'm playing around with term rewriting templates/procs - is there a way to capture all table-like literals? e.g. I want to convert {"a": "b"} to Table[string, string] with term rewriting , is it possible?
08:12:01Araqnohusuro: so you don't understand what "unsound" means, ok.
08:13:28nohusurohow is the example I showed any more sound than allowing the subtypes?
08:14:17nohusuroif the subtyping was enforced, that error could have been avoided at compile time
08:14:35nohusuroanyway, will stick with async
08:16:43Araqthe point of a type system is to prove your types are sound. since it cannot prove it, you have to manually do the object conversion that can fail at runtime. that's the *point*
08:17:01Araqyou need to write it, you then are aware of it.
08:17:30Araq"it's unsound anyway, because I can write it this way" misses the point.
08:19:17*mahmudov quit (Ping timeout: 260 seconds)
08:20:20Araqgokr: we're getting a better threadpool implementation and then that's it, pretty much.
08:21:44gokrMmm, you mean "that's it" as in - then it's fully usable in a first incarnation?
08:22:37gokrIIRC you have mentioned the channels are "slow" earlier, although I am not sure what the problem was.
08:23:06Araq"that's it" means "good enough for v1"
08:23:28Araqchannels are "slow" in the sense they use locks.
08:23:29gokrAlso, we don't have any lightweight "coroutine"-thingy yet, right? Just catching up, IMHO a good threadpool goes a long way.
08:23:43gokrAha, ok, then not *that* slow then.
08:24:20Araqwe had coroutines but nobody works on them and fixing them requires different memory management
08:25:15gokrAha, ok. I do note Stefan Talpalaru did a lot of different experiments with chan, Go channels etc etc. But... I would like to stick to "official Nim" stuff.
08:26:24gokrBtw, just read Dennis article using channels for logging, damn does he write nice articles.
08:26:37YardanicoAraq, is there a way to match {"1": "1", "2": "2"} in term rewriting template?
08:27:05Demos[m]Huh so on windows a ~4 line change in times.nim and sysio.nim allow for compilation using clang, lld and the native windows headers and crt
08:27:09gokrJust in case someone here has missed his articles, it's a gold mine: https://hookrace.net/blog/nim/
08:27:28YardanicoDemos[m], make a PR ? :)
08:27:40YardanicoI did the same a while ago: added intel compiler to times.nim on windows
08:27:41AraqYardanico: match against the type in the pattern and then analyse it furhter in the macro body
08:28:59Demos[m]Yeah not sure how welcome it’d be since when defined(clang) can mean lots of things
08:29:11*rokups joined #nim
08:29:11YardanicoDemos[m], when defined(clang) and defined(windows) ?
08:30:14Araqgokr: I'm still evaluating/implementing memory regions for Nim. I've grown to dislike GCs ;-)
08:30:15*skrylar quit (Remote host closed the connection)
08:30:30Demos[m]Msys, Mingw headers (perhaps with different symbols in the crt) or windows kit
08:30:33Demos[m]Nope that would still match mingw afaik
08:30:44Demos[m]Also some of the changes may cause breakage elsewhere so I gotta test on lots of tool chains before I make a pr
08:31:20YardanicoAraq, just write the type in the pattern? like "openarray[tuple[key, val: string]]"?
08:31:24Yardanicoor I need to add {lit} somewhere?
08:31:52gokrAraq: Hum... so let's say I don't know much about memory regions - can you give me the 2 sentence brief?
08:32:45AraqYardanico: openarray[(string, string)]
08:34:01Demos[m]Is that a specific syntax with that tuple of typedesc?
08:34:05gokrAraq: Never mind, checking wikipedia :)
08:34:25Demos[m]Or is it just covered by some part of the syntax I’m not realizing
08:35:05Araqgokr: allocation takes a region parameter, illegal mixing of inter region pointers is prevented at runtime, whole regions are freed, single deallocs are rare/unsafe
08:36:14gokrHmmm.
08:36:26YardanicoAraq, https://gist.github.com/Yardanico/9a11410ccee6cc4d987c18a4001c0742, please don't blame me for noob TR code
08:37:17Araqregions can be of a maximal size, a http request could be a region, requests that take too much memory get killed, the server stays alive (well, we'll see about that one)
08:38:25gokrAraq: Am I correct in guessing that this also fits well with shared nothing concurrency? Simply different regions.
08:39:07Araqyes. also regions themselves should have 'move' semantics
08:39:24Araqmove the region to a different thread, let it write to it, take it back
08:39:35gokrAhhh.
08:40:00livcdWhat do you guys use nim for ?
08:40:24gokrI can't help wonder though how such a model would affect Nim programming in general.
08:40:37Tangerlivcd, Writing a bot for Slack atm
08:40:52PMunchlivcd, pretty much anything
08:41:57PMunchGames, scripts, research, even made a database implementation in it :)
08:42:02gokrlivcd: I have my experimental language I am building (sprylang.org). I also use it for smaller stuff, like an experimental snapstore implementation (REST service) etc.
08:42:27PMunchOh yeah, I've also built some web-things with it.
08:42:36gokrAnd I am contemplating to use it for another REST/MQTT service in a EU research project.
08:43:40*MyMind joined #nim
08:43:48gokrAnd I toyed with Nim for Arduino, but... Arduino code is often very short - and you also often want to reuse code from the net - so... I don't consider Nim to be a "good" choice for Arduino.
08:44:06Yardanicomaybe it would be better with memory regions? :) so you can use GC
08:44:14gokrAlso, Arduino style C++ is quite easy anyway ;)
08:45:03*Sembei quit (Ping timeout: 246 seconds)
08:45:21gokrlivcd: In general I would say Nim is usable in almost all domains. However... not the best pick for all domains, of course.
08:56:17PMunchgokr, yeah I've wanted to use Nim for Arduino as well. Since it's FFI is so simple I figured it would be easy to use existing C libraries and such. But as you say the code is often so simple anyways that I've never found the time/motivation to try it out vs. writing a couple lines of C code.
08:58:17gokrExactly. Now I have written a slightly more complex Arduino thingy, it's about 600 lines of code, and I had to modify two existing C++ libraries also - so... Nim in the mix would have just added complexity.
08:59:41gokrAraq: Are you still thinking of dumping methods too?
09:00:04federico3gokr, PMunch: I've been writing some Nim-only programs for some microcontrollers and sensors. Templating and macros make it faster than arduino
09:00:32gokrFaster to write I suppose you mean?
09:00:36PMunchYeah, that's what I've been hoping for. Just never got around to trying it :P
09:01:13*BigEpsilon quit (Quit: Leaving)
09:01:16PMunchfederico3, I would love to have a look at your code to see how you've done it :)
09:01:32federico3gokr: and to execute. Arduino does a lot of bit manipulation at runtime that could be done at compile time in Nim
09:02:13*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
09:02:52*claudiuinberlin joined #nim
09:03:08Araqgokr: yes but more realistic is that I make them "uni" methods and remove the "multi" part from them
09:03:44gokrAh, yeah... multimethods are used quite seldomly I think.
09:04:20PMunchI'm still waiting for the "func" keyword myself. It's such a simple but really neat thing.
09:07:07Yardanicoalso I think newbies would mistake "func" with "function" in other programming languages
09:07:32PMunchSo?
09:07:39Araq"mistake"? that's what functions are, procedures without side effects
09:07:45YardanicoAraq, I know
09:07:52PMunchThey would quickly notice the difference when they can't make side-effects :P
09:08:04Yardanicobut in other programming languages there's no such thing as noSideEffect procedure
09:08:11Yardanico*in a lot of other programming languages
09:08:31gokrA nice error message ought to help there "func's can't have side effects, perhaps you should use a proc?"
09:10:01AraqPMunch: if we introduce 'func' we should do it properly and forbid writes to all non-var-parameters
09:10:30Araqmakes for an excellent escape analysis
09:11:41Araqand gives us "deep" immutability.
09:12:15PMunchHmm, I'm not quite sure I follow
09:12:27*yglukhov quit (Read error: Connection reset by peer)
09:12:56*yglukhov joined #nim
09:13:24Araqfunc f(x: ref Node) = x.field = "value" # forbidden
09:14:06PMunchOh yeah, that should be forbidden
09:14:15PMunchIs it not with the "noSideEffect" pragma?
09:15:01*arnetheduck joined #nim
09:15:06yglukhovAraq: hi, what do you think https://github.com/nim-lang/website/pull/48
09:18:25AraqPMunch: the definition of "side effect" is "accesses global variable (or calls something that has a side effect)"
09:19:46*claudiuinberlin quit (Read error: Connection reset by peer)
09:20:34YardanicoAraq, is there some way to get info why some term-rewriting template doesn't match an expression? concepts for example have {.explain.} thing
09:20:46YardanicoIf I call a template explicitely - it works
09:20:57*dddddd joined #nim
09:24:54*gangstacat quit (Quit: Ĝis!)
09:27:18PMunchOoh, only global...
09:27:45PMunchHmm yeah, I would expect a noSideEffect to also apply to your earlier example
09:28:02*gangstacat joined #nim
09:28:08Yardanicoah, I can't change variable types with term rewriting, makes sence
09:28:17Yardanico*sense
09:32:13Yardanicobut sadly there's no norecurse pragma :) https://forum.nim-lang.org/t/338
09:37:35*couven92 joined #nim
09:45:51AraqYardanico: what are you trying to do?
09:46:11YardanicoAraq, no, sorry, it was my noobish understanding of TR
09:46:24YardanicoI juse wonder if this is implemented ? https://forum.nim-lang.org/t/338
09:46:58Yardanicoabout tables: "However, a term rewriting macro should not change the semantics anyway. "
09:48:05Araqit's not.
09:49:21*yglukhov quit (Remote host closed the connection)
09:54:15*Arrrr joined #nim
09:54:15*Arrrr quit (Changing host)
09:54:15*Arrrr joined #nim
10:00:51PMunchHmm, would it be possible to implement tail-end recursion (by reusing the stack frame) in Nim?
10:04:03Araqгде ты любишь сидеть? на стуле или на кресле или на дибане?
10:04:14Araqна дне.
10:04:54Araq^ no idea if it's correct.
10:05:13*rabbi joined #nim
10:05:52YardanicoAraq, well "на дне" means "at the bottom"
10:05:53PMunchhttps://translate.google.com/#auto/en/где ты любишь сидеть%3F на стуле или на кресле или на дибане%3Fна дне.
10:06:04*rabbi quit (Client Quit)
10:06:14YardanicoAraq, also "диВане", not "диБане" :)
10:06:21PMunchYeah, somehow I doubt that this is what you meant to say. But then again it might be google translate that's messing up :P
10:06:43Yardanicoyeah, "на дне" usually used with sea or ocean
10:06:46*rabbi joined #nim
10:07:00rabbi /q
10:07:10*rabbi quit (Client Quit)
10:07:28Yardanicolol
10:07:37Yardanicohe entered, wrote "/q" and left
10:07:41AraqYardanico: I need to say "on the floor"
10:07:49YardanicoAraq, ah, it's "на полу"
10:07:57ArrrrI hate these nim syntax changes. Now we have to type in turkish?.
10:08:04Yardanicohttps://translate.google.ru/#en/ru/on%20the%20floor
10:08:20AraqArrrr: lol
10:08:37*rabbi joined #nim
10:09:13Araqpretty sure I never heard полу
10:09:26*rabbi quit (Client Quit)
10:09:27Araqthis excercise is too hard
10:09:42*rabbi joined #nim
10:09:49Araqwhat's the nominative?
10:10:08YardanicoAraq, "пол"
10:10:49Yardanicoit can mean either "floor" or "gender"
10:10:52Araqit's a test, if I get it right my teacher knows I had help
10:11:51*yglukhov joined #nim
10:14:05*rabbi_ joined #nim
10:16:14*rabbi_ quit (Client Quit)
10:16:58*rabbi_ joined #nim
10:20:26Araqis дочь neutrum?
10:20:39cremfeminine
10:21:16Araqok thanks
10:22:16crembtw пол-gender and пол-floor have different forms in prepositional case. A few words have different locative and prepositional cases (лес, луг, etc), but it seems that пол is not one of those, although it almost looks like it is.
10:22:50*rabbi quit (Quit: Lost terminal)
10:23:34FromGitter<Grabli66> Araq is teaching russian language? :)
10:23:42cremlearning
10:23:53cremteaching is the opposite. :)
10:24:05FromGitter<Grabli66> Yes. Learning :)
10:25:40cremThere is a pretty active discord server for those who learns russian btw. Especially useful to practice speaking I think.
10:27:14*mahmudov joined #nim
10:27:36Araqevery single word is painful :P
10:27:45FromGitter<Grabli66> Why he is doing that? He wants migrate into Russia?
10:28:37Araqmostly to train my brain
10:30:42*Ven`` joined #nim
10:31:11FromGitter<Grabli66> Then you'll need learn the meaning of "трахнем по писюрику" :)
10:32:52cremFor listening practice, there are radio stations which have full text transcript of their programs.
10:35:00*BitPuffin|osx joined #nim
10:39:50*rabbi_ quit (Quit: leaving)
10:40:38YardanicoGrabli66: even I don't know the meaning of "писюрик", but I know that this translates to something like "let's drink some vodka" :D
10:40:58Yardanicoand russian is my native language
10:43:07*endragor_ joined #nim
10:43:07*endragor quit (Read error: Connection reset by peer)
10:43:22*endragor_ quit (Remote host closed the connection)
10:44:10*endragor joined #nim
10:44:11FromGitter<Grabli66> I think it's the unit of measure of vodka. Which means to drink a little vodka.
10:44:19Yardanicowell it's not commonly used
10:45:24cremI don't understand why people always try to teach others swear/weird russian words. It's not the same when learning other languages.
10:45:53crembut
10:45:54FromGitter<Grabli66> It was joke.
10:46:41Yardanicowell all know about vodka and bears + balalaika :P
10:47:27cremIn Switzerland they always ask foreigners to pronounce Chuchichäschtli. But it's not that hard or not funny at all (to foreign ear), yet it's very common.
10:47:37*yglukhov quit ()
10:48:14cremRussian "защищающийся" is even more weird, but I've never seen anyone being proud for having that word.
10:49:25cremAnd защищающийся (defending) is more common word than Chuchichäschtli (small kitchen cupboard).
10:53:15*rauss quit (Read error: Connection reset by peer)
10:55:10*yglukhov joined #nim
10:55:41*rauss joined #nim
10:58:08*Ven`` quit (Ping timeout: 240 seconds)
11:01:49FromGitter<Varriount> Araq: While you learn Russian, I'm learning German. So far the biggest difficulty is remembering the gender of all the nouns, and how to use various prepositions
11:03:52FromGitter<Grabli66> If there are so many russian speakers, and Araq will learn russian. Тогда может быть по-русски будем общаться? :)
11:06:35cremEntweder Deutsch oder Russisch. Wir soll nur Englisch verbieten.
11:09:19livcdheh my family was forced to learn both russian and german during "occupations". Sadly that affected me in a way that I cant develop any positive feelings towards both of them
11:09:41Araqvarriount: the genders are not that hard, often the suffix determines it
11:10:45Araqdie Uhr, die Schnur, der Flur ... oops
11:10:49cremRemembering which preposisions (+case) to use with which verbs is the hardest for me.
11:11:24cremSchnur is the same in Russian btw. :)
11:11:37cremшнур
11:12:07*yglukhov quit (Remote host closed the connection)
11:13:55livcdmy grandmother is still mixing a lot of german words when she talks to us
11:29:20*ShalokShalom quit (Read error: Connection reset by peer)
11:31:34*yglukhov joined #nim
11:36:20*yglukhov quit (Remote host closed the connection)
11:36:51*ShalokShalom joined #nim
11:39:30*yglukhov joined #nim
11:44:02*yglukhov quit (Ping timeout: 260 seconds)
11:52:26*ShalokShalom_ joined #nim
11:55:06*ShalokShalom quit (Ping timeout: 246 seconds)
12:01:18ArrrrIs there a set limit for enums?
12:03:24*Snircle joined #nim
12:03:27*nattefrost joined #nim
12:03:35*yglukhov joined #nim
12:06:36*yglukhov quit (Remote host closed the connection)
12:06:46FromGitter<Varriount> Arrr: Yes, although it's ridiculously high
12:06:59Yardanicoint32.high ?
12:11:17*krux02 joined #nim
12:15:11*krux02 quit (Remote host closed the connection)
12:15:51*krux02 joined #nim
12:16:22subsetparkJiddisch ist wie Deutsch, nur... <doesn't know how to say 'simpler'>
12:16:47cremeinfacher ?
12:16:58*ShalokShalom_ is now known as ShalokShalom
12:22:28*renarc quit (Ping timeout: 240 seconds)
12:23:55FromGitter<krux02> I don't know, but a set of enums is done with a bit flags in an integer
12:23:59FromGitter<Bennyelg> My wife is russian
12:24:15FromGitter<Bennyelg> I will learn from her if it's necessary /:D
12:24:16FromGitter<krux02> so I would not recommend enums higher than 64 elements when you want to use sets
12:24:41FromGitter<krux02> I had a russian ex girldfriend, I did not learn from her :/
12:24:52FromGitter<Bennyelg> I just know hour to curse :D
12:25:34FromGitter<krux02> well either "I had a girlfriend", or "I have an ex girlfriend" :shrug:
12:25:58FromGitter<Bennyelg> heheh
12:26:45FromGitter<Bennyelg> I am from Israel , and I am expecting a child now, interesting what will came from russian & some middle east roots :D
12:27:13*yglukhov joined #nim
12:29:22*tax joined #nim
12:30:15*manjaro-kde5- joined #nim
12:31:35*yglukhov quit (Ping timeout: 240 seconds)
12:31:44YardanicoWell there are many nationalities in Russia
12:32:12subsetparkBennyelg - where in ISR?
12:32:47*renarc joined #nim
12:43:41*renarc quit (Remote host closed the connection)
12:49:43*rokups quit (Quit: Connection closed for inactivity)
12:52:28FromGitter<Bennyelg> Yavne
12:53:57*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
13:00:02subsetparkOh not far at all from TA- my partner is from there
13:01:39*gangstacat quit (Quit: Ĝis!)
13:11:07*madmalik joined #nim
13:11:45Yardanicodom96, it seems that getSystemVersion in posix.nim ( in osinfo package) can be improved a bit: https://gist.github.com/Yardanico/b55579a53c82f9ae02e4c40cf7fbb063
13:12:18Yardanicoespecially the mac os x part
13:12:25dom96so make a PR
13:17:13Yardanico-13 lines of code!
13:17:17Yardanicohttps://github.com/nim-lang/osinfo/pull/5
13:17:27cremNo PR is bad!
13:20:11FromGitter<mratsim> @Araq On this issue, https://github.com/nim-lang/Nim/issues/6387 there is no need to go Linus Torvalds on me. In any case, there is an inconsistency, either all procs (generic and non-generic) require mixin, or none. Given Nim focus on metaprogramming I think it would be really beneficial to have macro resolve before generic type checking, so replacement could occur before.
13:22:08FromGitter<mratsim> I could workaround by exporting * with `**` but it might have unexpected side effect on tuple deconstruction like `(a, _) = (1, 2)`
13:23:34FromGitter<mratsim> Gitter formating "exporting \_ with `\_*`"
13:23:52FromGitter<krux02> @mratsim how do you think that macros can resolve before generic type checking?
13:24:31FromGitter<krux02> macros can have typed arguments, meaning the type checker needs to run
13:25:03FromGitter<krux02> or am i misunderstanding something
13:25:06FromGitter<mratsim> My macro is untyped in this case, and works if the proc is non-generic
13:25:40FromGitter<mratsim> But as soon as I add [T], I get invalid identifier
13:26:18FromGitter<mratsim> There is a test case with 3 examples in the ticket
13:27:47FromGitter<mratsim> Actually I misspoke it's not type resolution, it's identifier resolution that happens before macro resolution
13:27:59FromGitter<mratsim> But only with generics
13:28:48Yardanico3990 stars!
13:29:05FromGitter<Bennyelg>
13:29:06FromGitter<krux02> well ... I don't get that error you get
13:29:47*couven92 quit (Quit: Client disconnecting)
13:30:11FromGitter<mratsim> Unless I should add mixin the other way, in the macro? I can't test yet
13:30:38FromGitter<krux02> ah now I get the error
13:30:48FromGitter<krux02> I actually have to use two different modules
13:30:51FromGitter<Bennyelg> Ok so I am starting to create AWS library starting to mimic all the botocore functionality.
13:30:52FromGitter<krux02> yea I see
13:30:55FromGitter<Bennyelg> wish me luck :D
13:36:51euantorRegarding osinfo it would be nice to have common APIs for all systems
13:37:00euantorI'm going to try find some time to clean it up a little more
13:45:39*relax joined #nim
13:46:50*shashlick joined #nim
13:50:07*endragor quit (Remote host closed the connection)
13:51:12krux02euantor: It would be nice if everybody would use the same system :P
13:51:21euantorsure would
13:51:39krux02the one system
13:52:06euantorQuestion is: which one?
13:52:41FromGitter<mratsim> I gave up on standards: https://imgs.xkcd.com/comics/standards.png
13:53:48*endragor joined #nim
13:58:23*endragor quit (Ping timeout: 248 seconds)
14:04:37relaxI get this error when I "nimble install yaml" -- any tips on how to debug? Error: unhandled exception: File exists [OSError]
14:05:22PMunchrelax, you appear to have a file that the package is trying to create
14:05:35*PMunch quit (Quit: Leaving)
14:06:29flyxwell that's kind-of obvious, but probably does not help much.
14:06:50relaxstrace-ing the install doesn't show any obvious smoking guns
14:07:45flyxcan you install other packages?
14:07:59relaxyes
14:08:13dom96run with --debug
14:09:13relaxvery last log output is a file copy in the install:
14:09:20relax Copying file /tmp/nimble_32160/githubcom_flyxNimYAML/test/yaml-test-suite/name/block-scalar-indicator-order to /home/john/.nimble/pkgs/yaml-0.10.2/test/yaml-test-suite/name/block-scalar-indicator-order
14:10:09dom96Does that file exist? :)
14:10:47relaxI mean, I guess it must :)
14:11:09dom96Well, the error could be misleading
14:11:10relaxbut if it does, it must have been created by the install
14:11:26flyxrelax: I can imagine where the error comes from. yaml-test-suite is a submodule and contains various soft links that may mess up depending on your operating system
14:11:52relaxhmmm, on Ubuntu?
14:11:54shashlicktrying my async question again - never get to line 15, any ideas? https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286
14:12:02dom96why would you put soft links in a git repo?
14:12:05flyxrelax: I did not know nimble does fetch submodules and will exclude that from the nimble file
14:12:37flyxdom96: the folks I work with on the test suite are Perl coders and like to do such things ;)
14:12:55dom96shashlick: exeProcess isn't async
14:12:58*gangstacat joined #nim
14:12:59dom96*execProcess
14:13:41dom96but that shouldn't be a problem really
14:13:51dom96does line 10 get called?
14:14:13shashlickdom96: yes, it does, and i get the return value as expected
14:14:40shashlickand it does run multiple execs in parallel in effect
14:15:35dom96what do you mean you get the return value as expected?
14:16:21*gokr quit (Ping timeout: 240 seconds)
14:16:23shashlickdom96: if I print jdata which is the json representation of the output from the execProcess, it is as I would expect without async
14:17:08shashlickso if I add a line to echo jdata, it's there in get_fingerprint(), but findmusicdup() doesn't continue
14:17:29dom96that's weird.
14:17:33flyxrelax: as quick fix, delete the directory /tmp/nimble_32160/githubcom_flyxNimYAML/test/yaml-test-suite and copy the rest, that may work.
14:18:00dom96bbl
14:18:07relaxflyx: it seems to clean up after itself
14:18:20relaxso, that whole tree is gone
14:18:31relaxalso, the file that it seems to be erroring on doesn't actually exist
14:19:23flyxit does, but is a symlink.
14:19:33flyxsee https://github.com/yaml/yaml-test-suite/tree/f1c5f445fe675fc3f95f602a79a0fa7e9d933903/name
14:20:17flyxwell, I wanted to migrate from git-submodules to git-subrepo anyway, this seems to be a good time.
14:20:19relaxoh, sorry, meant that the destination doesn't exist
14:20:31relaxwould adding "test" to skipDirs help?
14:20:39flyxprobably.
14:20:54flyxdefinitely.
14:20:55relaxa couple other directories are giving similar warnings
14:22:48flyxactually, everything but the yaml folder may be skipped
14:25:52flyxI'll need to make a new release, will probably be done this evening. stay put.
14:26:26flyxkinda strange this did not surface earlier.
14:26:31relaxokay -- just sent you a really simple PR too: https://github.com/flyx/NimYAML/pull/45
14:26:46relaxthanks for your help!
14:27:33flyxyeah well, this does not suffice. I will also need to bump the version number and add a changelog entry -- just way for the release ;)
14:27:41flyx*wait
14:28:03relaxsure, sounds good
14:41:21dom96you can also merge it and let relax install it via `nimble install yaml@#head` :)
14:42:09*gangstacat_ joined #nim
14:42:21*yglukhov joined #nim
14:42:48*gangstacat quit (Quit: Leaving)
14:42:56*gangstacat_ is now known as gangstacat
14:51:41shashlickhow do you yield in an async proc?
14:52:21subsetparkdom96: trying to clean out my nimble/choosenim and start fresh after all that hacking i was doing a while ago. i've gotten rid of ~/.choosenim and ~/.nimble and ~/.config/nimble - something else is left though
14:52:42subsetparkhttps://www.irccloud.com/pastebin/kPe8Vc85/
14:52:58subsetparkWhat could be left that is pointing to .choosenim?
14:53:45dom96NIM_LIB_PREFIX env var?
14:54:01subsetparknice one!
14:54:29dom96please submit an error for this, nimble should state that it's using this env var.
14:55:01subsetpark
14:58:41subsetparkooh, and I've got another one coming... nimble doesn't recognize git@ URLs :)
15:05:55subsetparkah, its trickier than that i guess ... :/
15:10:22Yardanicoargh, convince your friends to add a star to github nim repo!
15:12:17*jsgrant joined #nim
15:14:23*gokr joined #nim
15:19:25*nsf quit (Quit: WeeChat 1.9)
15:23:49shashlickzero luck with asyncdispatch - wish there were more examples
15:24:30Yardanicoshashlick, "await" or "yield" ?
15:24:36shashlickdom96, nohusuro: I put execProcess() into a separate proc and now the code continues, but it runs in sequence instead of running multiple procs in parallel
15:25:08*gokr quit (Ping timeout: 240 seconds)
15:26:10shashlickupdated gist: https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286
15:26:51shashlickI even tried spawn() on the execProcess and an isReady() loop but it still blocks
15:27:16shashlicki tried sleepAsync() to get the thread to yield within that loop and it just sits in that loop, doesn't suspend
15:28:15Yardanicoshashlick, your code is not async
15:28:22Yardanicoshashlick, execProcess blocks the entire thread
15:31:01Yardanicoshashlick, you can try this - https://github.com/cheatfate/asynctools
15:36:01*ShalokShalom quit (Remote host closed the connection)
15:38:45*ShalokShalom joined #nim
15:41:11*msmorgan joined #nim
15:45:14relaxcontrary to the docs at https://nim-lang.org/docs/osproc.html, I have to call .inputStream.close() on a process otherwise it'll wait forever for EOF on its input
15:45:42relaxam I missing something?
15:50:49*Trustable joined #nim
15:51:15shashlickYardanico: I'll check it out thanks. If I spawn execProcess(), it doesn't block anymore so I can poll the process and yield. Even then it doesn't work
15:56:09shashlickYardanico: asynctools is great - thank you!
15:57:51*vlad1777d joined #nim
15:58:47*tax quit (Ping timeout: 246 seconds)
16:09:11*BigEpsilon joined #nim
16:14:09FromGitter<ephja> ===nim yields too many unrelated things :p===
16:14:24Yardanico?
16:16:56*Xe is now known as uuuuuuuuuuuuuuuu
16:17:00*uuuuuuuuuuuuuuuu is now known as Xe
16:17:28FromGitter<ephja> I always mess up the markdown. #test
16:17:46FromGitter<ephja> I meant the #nim tag, on twitter for example
16:21:08*shashlick quit (Ping timeout: 240 seconds)
16:25:36*yglukhov quit (Remote host closed the connection)
16:28:42*Ven`` joined #nim
16:33:32*vlad1777d quit (Remote host closed the connection)
16:34:47FromGitter<Bennyelg> Hey, today it's an holiday , its the Jewish new year. ⏎ I want to congratulate you with "Sana tova", a good health to you and to your family & friends, ⏎ I wish this year will be better for you all. ⏎ And I hope that Nim will release 1.0.0 version. ⏎ ... [https://gitter.im/nim-lang/Nim?at=59c298a7614889d4751f5db1]
16:35:02*solitudesf quit (Remote host closed the connection)
16:35:05FromGitter<Bennyelg> Shana*
16:35:18Yardanicowow, thanks, you too! :)
16:36:24*TjYoco joined #nim
16:37:43dom96Happy Jewish new year :)
16:38:45FromGitter<krux02> https://i.imgur.com/Up4WVU3.png
16:38:59Yardanicowhat is this?
16:39:02FromGitter<krux02> yay changed a few lines to get roguelike rendering :P
16:39:19FromGitter<krux02> it is from my project opengl-sandbox
16:39:27FromGitter<mratsim> Nim is still easier to search than go 
16:39:33FromGitter<krux02> it is an opengl tile renderer
16:39:40FromGitter<mratsim> Btw who did this? https://www.quora.com/I-developed-a-programming-language-thats-better-than-Go-Swift-Java-C-C++-C-Python-etc-Should-I-monetize-it
16:39:41Yardanicobtw, Bennyelg, we are not so original in russia, so our new year is 31th of december - 1th of january :)
16:40:10Yardanicomratsim: lokl
16:40:12Yardanicolol
16:41:06*nsf joined #nim
16:41:10FromGitter<zacharycarter> @krux02 mind sharing the source?
16:41:32FromGitter<krux02> of course you can see it
16:41:58FromGitter<zacharycarter> @krux02 you sould try integrating it with my rl library
16:45:20FromGitter<krux02> https://github.com/krux02/opengl-sandbox/blob/master/examples/retro_tiling.nim
16:45:59FromGitter<krux02> it was really just a few lines changed for my already existing tile renderer
16:46:18FromGitter<krux02> it has smooth scrolling
16:46:30FromGitter<krux02> a map that is limited by the size of an opengl texture
16:46:31*shashlick joined #nim
16:47:42FromGitter<krux02> well you can do it
16:48:13FromGitter<krux02> but it has the property to use standards that Apple does not implement
16:49:08FromGitter<krux02> ok people I have to catch a train
16:49:09FromGitter<krux02> bye
16:49:40*krux02 quit (Remote host closed the connection)
17:07:45flyxrelax: I pushed a new NimYAML release, should now work with nimble
17:11:01*BigEpsilon quit (Ping timeout: 240 seconds)
17:12:05*gokr joined #nim
17:17:29*BigEpsilon joined #nim
17:23:34*yglukhov joined #nim
17:25:17*mahmudov quit (Ping timeout: 260 seconds)
17:25:34*mahsav2 quit (Ping timeout: 264 seconds)
17:31:02FromGitter<zacharycarter> okay I finally understand how roguelikes do font rendering now
17:31:08FromGitter<zacharycarter> took me way too long to understand that
17:37:32*claudiuinberlin joined #nim
17:40:34*BigEpsilon quit (Ping timeout: 264 seconds)
17:40:35FromGitter<ephja> they blit the glyphs onto a grid? :p
17:45:22*zachk joined #nim
17:46:28FromGitter<zacharycarter> yeah but I couldn't figure out they figured out what glyph to render without some kind of mapping
17:46:36FromGitter<zacharycarter> like a bitmap font file
17:46:39FromGitter<zacharycarter> but they do it without it
17:48:28relaxthanks flyx!
18:00:50*elrood joined #nim
18:02:21*skrylar joined #nim
18:10:50Yardanicosomeone unstarred nim repo :D
18:11:11*vlad1777d joined #nim
18:14:36*Jesin quit (Quit: Leaving)
18:15:40FromGitter<zacharycarter> bastard
18:16:21*vlad1777d quit (Ping timeout: 240 seconds)
18:17:56FromGitter<ephja> we need to find out who that person is
18:18:03*PMunch joined #nim
18:18:09*BitPuffin|osx quit (Ping timeout: 248 seconds)
18:18:24TjYocoshould i sell my stock now?
18:22:16Yardanicowe can definitely write a thing which will compare (with github api) who starred nim repo and who unstarred it
18:22:19Yardanicoif we will log it
18:24:49FromGitter<Grabli66> You want find him and beat? :)
18:25:04Yardanicono-no-no
18:25:07Yardanicojust ask him why
18:25:22FromGitter<ephja> we have thugs on the payroll, right?
18:26:08*yglukhov quit (Remote host closed the connection)
18:27:15ArrrrIf zach is not too busy with concepts ...
18:27:37Yardanico:D
18:27:53FromGitter<ephja> actually, neither Araq nor Zah are particularly threatening IMHO
18:28:48Yardanicobut Araq can protect us from trolls!
18:29:00FromGitter<Grabli66> He betrayed us, cause Nim does not have interfaces :)
18:29:29Yardanicohttps://forum.nim-lang.org/t/31 :)
18:29:42Yardanicoand http://openmymind.net/Interfaces-In-Nim/
18:29:47FromGitter<ephja> it doesn't even have a fizzbuzz generator factory
18:31:00Yardanicoehm, www-ait
18:31:13Yardanicoso "streams" use almost interface-like thing
18:31:14FromGitter<Grabli66> It's him. Look at his face. It must be him :)
18:32:26ArrrrThat blog went full elixir
18:32:44skrylarelixirs neat, kinda.
18:32:52YardanicoArrrr, this blog contains only one article about Nim :P
18:34:07*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:35:42*madmalik quit (Quit: Connection closed for inactivity)
18:36:08*Jesin joined #nim
18:36:39FromGitter<brentp> I thought nim concepts were like interfaces. at least "interfaces" in the golang sense
18:36:52skrylari think concepts only apply at compile time
18:37:11Yardanicoyeah
18:37:16skrylaralthough its probably possible to make a macro that gives you go interfaces
18:38:03FromGitter<brentp> oh. now I see TFA
18:42:11*yglukhov joined #nim
18:44:15*shashlick quit (Ping timeout: 246 seconds)
18:46:02PMunchShhh, don't let Araq see you call them interfaces
18:49:17FromGitter<Varriount> @brentp At some point in the future there will be a way to create run-time interfaces with concepts.
18:49:21Yardanicoyes
18:49:26Yardanico"vtref" and "vtptr"
18:49:54FromGitter<Varriount> Lo, the vtrefs and vtptr types will come, and all will be milk and honey.
18:50:27Yardanicoanyone wants a seq of users who starred nim repo? in marshal (json) format ? :D
18:50:48Yardanicohere you go - https://transfer.sh/hZsOd/data.txt
18:51:16YardanicoI'll share a code now, it's very simple
18:51:26FromGitter<Grabli66> "vtref" and "vtptr". What is this?
18:51:38Yardanicoyou will be able to use concepts at run-time
18:51:49Yardanicoe.g. create a seq[SomeVtrefConcept]
18:51:50FromGitter<Grabli66> Cool.
18:52:07FromGitter<Grabli66> Awesome :)
18:52:09FromGitter<Grabli66> When?
18:52:17YardanicoGod (Araq) knows
18:53:26FromGitter<Varriount> Well, I believe Zahary was the one working on concepts. I don't know if he's done anything recently though.
18:55:22*shashlick joined #nim
18:57:15dom96If zahary agrees with my suggestion then "vtref concept" will become "interface".
18:59:19subsetparkdom96: this is obnoxious, but if you can fast track https://github.com/nim-lang/packages/pull/585 i'd appreciate it
19:00:20dom96Sure, done.
19:00:33subsetpark:P
19:00:47*fastrom joined #nim
19:01:11subsetparkdziękuję
19:03:00dom96Tá fáilte romhat
19:03:25*nsf quit (Quit: WeeChat 1.9)
19:04:26subsetparkuhh
19:04:28subsetparkslainte
19:04:33subsetparkI assume
19:05:24dom96Huh? :)
19:06:25subsetparkjust meeting your erse with some erse of my own
19:09:16dom96oh hah, it's an actual English word.
19:09:28dom96Nice
19:10:51*Snircle joined #nim
19:13:48*vendethiel- joined #nim
19:14:05*jjido joined #nim
19:14:18*Ven`` quit (Ping timeout: 252 seconds)
19:16:13shashlickYardanico: I'm using asynctools so that I can do await execProcess() - processes are executed as expected but again, the function does not resume after the exec completes
19:17:48shashlickupdated gist: https://gist.github.com/genotrance/397479572eed0dbb554d026d9d3d5286
19:18:43shashlickdifference here is that all processes are kicked off in parallel so the async is working that way, that it didn't before with the osproc.execProcess(), but after they complete, the procs don't resume
19:20:52yglukhovdom96: hey, https://github.com/nim-lang/website/pull/48 has got a green light =)
19:21:20dom96Awesome
19:21:28dom96Any news on the logo?
19:21:33yglukhovdom96: the logo is being worked on, will likely be ready tomorrow
19:21:38dom96cool
19:22:34yglukhovdom96: also we have to do smth about nimble patches. the crew had to switch to my fork again =)
19:23:24yglukhovhonestly i havent yet investigated 400, but 403 should be good enough
19:24:00dom96new website should be live soon
19:24:20dom96I might not get a chance to look into that PR today
19:24:30dom96but will try to keep it in mind
19:24:39yglukhovcool, thanks
19:24:49*jjido quit (Ping timeout: 248 seconds)
19:25:25*BitPuffin|osx joined #nim
19:33:22*mahmudov joined #nim
19:36:41*vendethiel- quit (Ping timeout: 240 seconds)
19:36:46Yardanico:D https://gist.github.com/Yardanico/c9520e036f4eab6e07fe0926bddd72e6
19:41:37subsetparkwe've got a new logo??
19:41:58Yardanicosubsetpark, noo
19:42:03Yardanicoit's Reel Valley logo
19:42:19Yardanicoa logo of yglukhov's game to nim-lang website
19:42:26Yardanicofeatured projects stuff
19:46:19*yglukhov quit (Remote host closed the connection)
19:55:41FromGitter<Varriount> Is there a way to play that game without having a facebook account?
19:59:17*mahmudov quit (Ping timeout: 260 seconds)
20:00:19FromGitter<mratsim> buy Nim in Action? :p
20:00:53FromGitter<mratsim> “Nim Humble Bundle"
20:01:20FromGitter<mratsim> Actually that could be a thing !
20:01:24*manjaro-kde5_ joined #nim
20:02:19YardanicoVarriount: wait for android/ios release :P
20:04:35*manjaro-kde5- quit (Ping timeout: 240 seconds)
20:13:47FromGitter<brentp> Inside of a function, I am creating `var meta = new_sequint8 (L)` and then passing to a C function: `hts_idx_set_meta(idx, cint(len(meta)), castptr uint8 (meta), cint(0))` how can I do the equivalent of this so that meta is not GC'ed or how can I pass something that's not GC'ed?
20:14:28FromGitter<brentp> GC_unref ?
20:15:10Araqdoes the C function take ownership of the data?
20:15:22Araqusually it doesn't and so you don't have to do anything to keep the GC happy
20:15:38FromGitter<brentp> in this case, it does
20:15:57Araqthen you need to GC_ref the seq and eventually GC_unref it, yes
20:18:39*TjYoco quit (Ping timeout: 248 seconds)
20:18:50FromGitter<brentp> ok. thanks. as it goes, I found GC_ref immediately after posting
20:19:08*Vladar quit (Quit: Leaving)
20:22:03*manjaro-kde5- joined #nim
20:24:39*PMunch quit (Quit: leaving)
20:26:10*manjaro-kde5_ quit (Ping timeout: 264 seconds)
20:28:02*yglukhov joined #nim
20:28:15FromGitter<edubart> I am trying to do some codes with generics, but every now and then I step on a bug in the compiler, I've created some issues just now
20:28:49*Arrrr quit (Read error: Connection reset by peer)
20:29:49FromGitter<edubart> unluckily I found bug inside a workaround of another bug that I've previously found
20:31:13FromGitter<edubart> now I need a workaround for the bug in workaround for another bug >.>
20:41:39*Yardanico quit (Remote host closed the connection)
20:43:32*TjYoco joined #nim
20:50:57*Trustable quit (Remote host closed the connection)
20:55:53*rabbi joined #nim
20:56:11*arnetheduck quit (Remote host closed the connection)
20:57:01*shashlick quit (Ping timeout: 240 seconds)
20:59:08*relax quit (Ping timeout: 240 seconds)
21:03:03*shashlick joined #nim
21:05:18*rabbi quit (Quit: Lost terminal)
21:06:00*mahmudov joined #nim
21:07:18*manjaro-kde5_ joined #nim
21:09:33*libman joined #nim
21:09:53skrylarhttps://imgur.com/a/DmRRC that could have gone better :\
21:10:21*manjaro-kde5- quit (Ping timeout: 252 seconds)
21:19:01*elrood quit (Quit: Leaving)
21:20:20*nattefrost quit (Remote host closed the connection)
21:21:54libmanUm, am I in the right channel?
21:22:01msmorganFor what?
21:22:23FromGitter<Yardanico> Hi libman
21:22:40libmanWas that image generated in Nim?
21:22:54FromGitter<Yardanico> xD ask skrylar
21:26:19*dddddd quit (Ping timeout: 240 seconds)
21:28:10skrylarwhat, people post their sprite art games in here all the time
21:31:02*TjYoco quit (Quit: Leaving)
21:31:54libmanDid Nim find a new niche in interactive VR musclepr0n?
21:32:50*vlad1777d joined #nim
21:33:36skrylarah you just wanted to be a jerk. whatever
21:36:26libmanMe? Jerk? Never! I fully support your, um, preferences and whatnot.
21:37:36FromGitter<Yardanico> skrylar: but these games are made in Nim :P
21:38:14FromGitter<Yardanico> Anyway good... ehm.. 3D model
21:39:58FromGitter<Yardanico> "Muscleporn", I haven't seen that one yet, hmm
21:40:39FromGitter<Yardanico> Oh shit it's actually a real thing
21:43:45*dddddd joined #nim
21:43:48*gokr quit (Ping timeout: 240 seconds)
21:44:04skrylari wonder if putting that pixel-perfect filter on vector rendering would work for animated sprites
21:44:16skrylarlike what synfig does but with the tweak so the little sprite outlines don't mess up
21:44:29libmanOk, I get it. NIM project is now rebranding itself from "New Improved Modula-3" to "Nondeterministic Interactive Musclepr0n"
21:45:18skrylaralthough that algorithm is dependent on the order pixels are drawn, it might be better to use a multisampling filter
21:45:27skrylarshrug
21:49:18*Jesin quit (Quit: Leaving)
21:55:24*thomasross joined #nim
22:02:08*shashlick quit (Ping timeout: 240 seconds)
22:05:47*adeohluwa joined #nim
22:05:53adeohluwa:)
22:06:08adeohluwa this error I get
22:06:25adeohluwaspawn takes a GC safe call expression
22:07:24adeohluwayglukhov: am using tips u provided
22:07:58adeohluwaimport threadpool, use spawn, compile with --threads:on
22:09:46*jsgrant quit (Quit: jsgrant)
22:12:33*nsf joined #nim
22:14:59*mahsav joined #nim
22:19:40*shashlick joined #nim
22:24:13skrylarhm. don't the docs say the compiler won't chain converters
22:24:37skrylarwas just thinking about importing C++ classes with multiple base types
22:24:50skrylaryou can have a converter enforce the heirarchy but if its like 3 layers deep it might take some doing
22:34:13*yglukhov quit (Remote host closed the connection)
22:38:43shashlickYardanico, dom96, nohusuro: Turns out my async implementation wasn't working since I wasn't calling poll() or runForever() to invoke the dispatcher. Noob error and it's the second paragraph in the asyncdispatch help. It is also present in the asyncnet sample code but wasn't obvious.
22:38:54shashlickthanks for your help though
22:47:35*def-pri-pub joined #nim
22:47:58*shashlick quit (Quit: Leaving)
22:49:49*Jesin joined #nim
22:57:23dom96Do you guys know how to disable the VS Code extension's auto formatting?
22:57:38dom96I've had multiple times when I copy pasted Nim code and it screwed up the formatting :\
22:57:46dom96not cool
23:09:10Araqdom96: press control-Z to undo just the formatting
23:09:19Araqnot that it doesn't suck
23:12:19def-pri-pubzacharycarter: ya here tonight?
23:15:36*nsf quit (Quit: WeeChat 1.9)
23:16:01dom96Araq: :/
23:16:14dom96thanks for the tip though
23:16:56Araqeventually NimEdit's rendering will be good and its bugs fixed and then I'm not gonna use anything else :P
23:18:05adam12Interesting (nimedit). Hadn't seen it before.
23:18:40adam12I'm not sure I could ever switch from vim, just due to muscle memory.
23:19:06AraqVS Code really sucks for code navigation too, I want to open multiple projects at the same time dammit
23:20:13Araqadam12: any editor that doesn't distinguish scroll position and cursor position is unusable
23:21:10adam12:)
23:23:32*Nobabs27 joined #nim
23:29:43*skrylar quit (Remote host closed the connection)
23:33:19*def-pri-pub quit (Ping timeout: 248 seconds)
23:36:10*thomasross quit (Remote host closed the connection)
23:36:39*thomasross joined #nim
23:44:44FromGitter<zacharycarter> hey def-pri-pub: I am now
23:52:28FromGitter<zacharycarter> pro tip folks: always compile your game engine with -d:release :P
23:52:35FromGitter<zacharycarter> I was wondering why my roguelike rendering was so slow
23:52:44FromGitter<zacharycarter> threw -d:release on and it's too smooth now