<< 10-08-2017 >>

00:04:30*mahmudov joined #nim
00:34:59raussTiberiumN: did you ever figure signals out?
00:41:39*arnetheduck joined #nim
00:54:52FromGitter<zacharycarter> @krux02 you around by any chance?
00:55:08FromGitter<zacharycarter> I need openglz helpz!
01:04:31skrylarzacharycarter: skeasing updated earlier; has a nim package now, uses somereal type
01:23:32*yglukhov joined #nim
01:27:35*yglukhov quit (Ping timeout: 240 seconds)
01:38:27FromGitter<zacharycarter> good deal
01:38:40FromGitter<zacharycarter> I have a feeling I'll have use for it soon skrylar
01:40:35*skrylar quit (Ping timeout: 240 seconds)
01:41:38*skrylar joined #nim
01:42:24*arnetheduck quit (Ping timeout: 260 seconds)
01:44:44def-pri-pubzacharycarter: I'm pulled from the latest `zengine` and installed it (along with the `assimp` fork). I'm now getting a segfault on running.
01:45:40def-pri-pubhttps://pastebin.com/VAZYge3h
01:46:50FromGitter<zacharycarter> hrm
01:47:11FromGitter<zacharycarter> try running it again def-pri-pub
01:47:58FromGitter<zacharycarter> I don't know why but some residual memory bug is lingering
01:48:24FromGitter<zacharycarter> on the way to shadows
01:48:26FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/SeD8/Screen-Shot-2017-08-09-at-9.46.39-PM.png)
01:49:17def-pri-pubdid you just push a new update?
01:49:31FromGitter<zacharycarter> nope
01:49:48def-pri-pubyeah, I'm still getting the same issue.
01:50:09FromGitter<zacharycarter> hrm... let me try cloning on a linux vm
01:50:12def-pri-pubI'm supposed to run the program from the root of the repo, correct? that was an issue before.
01:50:39FromGitter<zacharycarter> yup currently file paths are relative to that location
01:52:24def-pri-pubI think that is has something to do with `addr lines.colors[0]` at that line
01:52:49FromGitter<zacharycarter> it very well might, but as far as I can tell these examples work on my machine upon a fresh clone
01:53:13FromGitter<zacharycarter> which example is this btw? 00?
01:53:50def-pri-pubpj wait, I think I know what the issue and fix is.
01:53:54def-pri-pubGimmie a sec to test it
01:54:02FromGitter<zacharycarter> sure
01:55:28def-pri-pubgot it
01:55:30def-pri-pubI'll post a patch
01:55:38FromGitter<zacharycarter> :shipit:
01:55:40FromGitter<zacharycarter> thanks
01:56:23FromGitter<zacharycarter> we need more folks working on zengine rather than godot :P
01:58:24def-pri-pubpatch posted
01:58:27def-pri-pub:fixit:
01:58:32FromGitter<zacharycarter> looking now
02:00:00FromGitter<zacharycarter> merged
02:00:42def-pri-pubwatch dem datatypes
02:01:13*chemist69 quit (Ping timeout: 276 seconds)
02:01:25FromGitter<zacharycarter> yeah good catch
02:02:53FromGitter<zacharycarter> just pushed up the start of the shadows example
02:03:59def-pri-pubYou also seem to be pushing binaries as well
02:04:07FromGitter<zacharycarter> ugh
02:04:12FromGitter<zacharycarter> I need to fix gitignore I'll do that now
02:04:28def-pri-pub:]
02:05:57*skrylar quit (Ping timeout: 240 seconds)
02:06:09FromGitter<zacharycarter> fixt
02:07:05def-pri-pubYou also might want to do some repo cleanning and rip the other (accidental) binaries from the repo. the examples/data takes up 58 MB, but in total the repo is a 133MB.
02:07:20def-pri-pubI can't remember how to do that though...
02:07:58FromGitter<zacharycarter> alright I'll figure it out now before I forget
02:08:05Demos[m]git filter-branch
02:08:06def-pri-pubqgit rm -rf --cached`
02:08:10Demos[m]followed by arcane bullshit
02:08:15Demos[m]but it reqrites history
02:08:45def-pri-pubyeah, that sucks, but at least you've got the clunky-huge-do-nothing binaries gone.
02:09:00Demos[m]yeah, just make sure everyone is on the same page
02:09:02Demos[m]before you do
02:09:24def-pri-pubLook at RayLib. It's repo is pushing 0.5 GB, for what is a very tiny libraries
02:09:27Demos[m]afaik after doing that everyone else won't be able to just git pull
02:09:39def-pri-pubyeah, that screws with everyone's git history
02:09:43Demos[m]and I think a git pull -r will put the binaries back in!
02:09:55FromGitter<zacharycarter> bleh
02:09:59Demos[m]best is a maybe git fetch
02:10:08Demos[m]then git branch -f master origin/master
02:10:08Demos[m]maybe
02:10:13Demos[m]idk
02:10:19Demos[m]then git prune ofc
02:10:34def-pri-pubor a `git reset --hard origin/master`
02:10:44Demos[m]will that detach your head?
02:10:48Demos[m]lol
02:10:57def-pri-pubeh, what's wrong with a little decapitation now and then?
02:11:09FromGitter<zacharycarter> https://git-scm.com/book/en/v2/Git-Internals-Maintenance-and-Data-Recovery#Removing-Objects
02:11:16Demos[m]well you actually want to update refs/heads/master
02:11:18FromGitter<zacharycarter> sounds about like what you're describing
02:12:09*cncl quit (Quit: WeeChat 0.4.0)
02:14:05Demos[m]bagh I want sparse repos and seperable blobs(header/content)
02:14:15Demos[m]then we could just commit big files to git and not worry about it
02:14:27Demos[m]and like checkout would be fast on Cow filesystems
02:14:32*chemist69 joined #nim
02:18:32FromGitter<zacharycarter> meh I'm not too worried about the big binary blobs atm, I'll rewrite this history later
02:18:43FromGitter<zacharycarter> too much no care atm
02:18:57FromGitter<zacharycarter> paired with not wanting to screw up the entire repo
02:26:58*endragor joined #nim
02:50:37FromGitter<codenoid> hi, is nim have a web framework
02:50:55FromGitter<codenoid> jester
03:10:38*skrylar joined #nim
03:28:05*dankrad quit (Ping timeout: 240 seconds)
03:28:18*dankrad joined #nim
03:32:37*dddddd quit (Remote host closed the connection)
03:35:06FromGitter<codenoid> ```ayam@laptop:~/Downloads/nim-0.17.0$ nim -v ⏎ bash: /usr/bin/nim: No such file or directory``` [https://gitter.im/nim-lang/Nim?at=598bd46a4bcd78af562caad7]
03:42:55Demos[m]holy shit powershell tends to output strings in UTF-16 w/ \r\n
03:43:01Demos[m]and it's a great way to corrupt things
03:43:04Demos[m]like my git repo
03:43:21FromGitter<codenoid> hi, how to update nim compiler
03:43:36FromGitter<codenoid> i install from `apt-get install nim`
03:43:53Demos[m]apt update && apt full-upgrade
03:44:06Demos[m]assuming ubuntu / debian has updated the compiler
03:48:01Demos[m]otherwise build from sources, I think there's some nimbrew tool or something to help you but I don't use it
03:48:57FromGitter<codenoid> i do ⏎ ⏎ ```sh build.sh ⏎ bin/nim c koch ⏎ ./koch tools``` ⏎ ⏎ and got nothing [https://gitter.im/nim-lang/Nim?at=598bd7a976a757f8088e418c]
03:49:31def-pri-pubThe Nim version in the ubuntu repos are woefully out of date
03:49:42def-pri-pubFollow the instructions on the GitHub README on how to install it from source.
03:49:51FromGitter<codenoid> ok
03:50:36def-pri-pubMy current job has taught me how to do debian packaging, but I'm not 100% confident I could make something nice for Nim
03:50:39Demos[m]s/Nim/everything/
03:50:41Demos[m]:)
03:59:42*pilne quit (Quit: Quitting!)
04:09:57*def-pri-pub quit (Quit: leaving)
04:11:28*gangstacat quit (Quit: Leaving)
04:12:06*mahmudov quit (Remote host closed the connection)
04:13:01skrylari much prefer arch packaging
04:14:06skrylararch maintainers don't deal with boilerplate files, there's just a package spec to give it a version and dep tags, how to run make, and makepkg deals with the rest. i poked in to debian/redhat a little and having to deal with spec files that list everything is bogus
04:14:15skrylaryea you can automate it but why haven't *they* done it?
04:14:30Demos[m]rpm is not that bad
04:14:33Demos[m]deb is annoying
04:14:42Demos[m]rpm does have cool stuff like depending on symbols
04:15:04skrylareeh i poke a rhel-like every so often and it gives anneurisms
04:15:16Demos[m]I don't mind em
04:15:18skrylardnf is tolerable
04:15:36Demos[m]I've only really used Fedora and tumbleweed recently tho
04:15:51skrylarfedoras on dnf now. so yea, its tolerable. but still slow and bandwidth hungry.
04:16:13skrylarpacman is done speedily. so is alpine apk. apt is right behind those two. and then dnf likes to mill about
04:16:41skrylari guess they're all better than portage
04:16:48*skrylar does not miss fbsd ports
04:17:00skrylari love everything else about that system but the packaging
04:17:01Demos[m]fwiw abs is portsish
04:17:21Demos[m]writing makefiles makes me want to gouge my eyes out
04:17:36skrylaryea pacman/mkpkg just have some bash to tell it how to run the build script
04:17:41skrylarwhich is a better way to go
04:17:59Demos[m]yeah
04:18:05Demos[m]although I also hate bash scripting
04:18:06Demos[m]but meh
04:18:14Demos[m]as long as it's just simple commands
04:18:15skrylaryou can manage the four lines it takes :>
04:18:20Demos[m]yeha
04:18:35skrylari would love if the plan9 devs somehow had a frankenbaby with freebsd and used arch or alpine's package manager
04:19:02Demos[m]I want a package manager where I can install stuff locally
04:19:10skrylarthey all do that
04:19:16skrylarunless you meant as in within ~
04:19:21skrylarwhich brew does on osx iirc
04:19:23Demos[m]yeah within ~
04:19:30Demos[m]brew defaults to /usr/local
04:19:36skrylarpoop
04:19:43Demos[m]but has that owned by uid 1000
04:20:00Demos[m]anyway I have a nim based ports system I use for local builds around the office
04:20:07Demos[m]kinda a waste of time to write tho
04:20:25skrylarsome would argue everything i do is a waste of time :<
04:20:57Demos[m]lol yeah
04:21:19Demos[m]spent today unfucking fbx as much as I could
04:21:23Demos[m]that was not a lot of fun
04:21:26skrylarflimbox?
04:21:37Demos[m]autodesk's asset format
04:21:39Demos[m]"open"
04:21:39skrylaryea no
04:21:46skrylarits open in that the library is free
04:21:56Demos[m]the library is "free" as in "free beer"
04:22:03skrylari wouldn't touch it with a pole. DAE exists for a reason and so does assimp ^^
04:22:03Demos[m]but the license is mega not libre
04:22:16Demos[m]dae is also autodesk afaik
04:22:22skrylarsony
04:22:26skrylarcollada is published by sony
04:22:28Demos[m]oh
04:22:31Demos[m]ah right
04:22:38skrylarits xml hell though and autodesk butchers their dae files
04:22:40Demos[m]autodesks dae exporters are broken af'
04:22:43skrylaryes
04:22:52skrylarit exports to fbx and runs a zero-effort converter on that
04:22:55Demos[m]goal is to use gltf
04:23:01skrylardon't recall
04:23:11skrylaroh some new kronos thing
04:23:12Demos[m]trouble is assimp uses a buggy reverse engineered fbx impl
04:23:16Demos[m]yeah
04:23:24Demos[m]but waiting on Qt3D to move to 2.0
04:23:38skrylari seem to recall gltf was useless but maybe its better now
04:23:40Demos[m]and assimp only supports a few fbx versions
04:23:48Demos[m]support is widening
04:23:48skrylari looked at one point and it was a more complicated version of... obj.
04:23:53Demos[m]??
04:23:54Demos[m]not really
04:23:59Demos[m]it has a scenegraph
04:24:06Demos[m]also supports materials natively
04:24:15Demos[m]I mean in the end dae is a more complicated obj :D
04:24:21Demos[m]also 2.0 is indeed much better
04:24:23skrylarwell. this was when it just came out
04:24:28skrylarit had support for nothing but static models
04:24:29Demos[m]another nice bit is that it supports pbr materials oob
04:24:35Demos[m]oh lol
04:24:45skrylartbh all you need is ebml
04:24:46Demos[m]it's got skinning, textures, mats, animations, and the like now
04:24:48Demos[m]??
04:24:55skrylarmatroska's underlying bin format
04:24:58skrylarit's binary xml
04:25:20skrylarevery app has its own weird stuff so these format redos will never win
04:25:23Demos[m]that sounds like something I would have to fuck around with to parse
04:25:27skrylari mean people will use them but someone will just make a new one in six months
04:25:30Demos[m]yeah
04:25:37skrylarwhat works is the ietf stuff
04:25:37Demos[m]actual open formats do help
04:25:47skrylar"hey guys just use X-MyShit until we all figure out what that means"
04:26:11Demos[m]well yeah because when you have to xmit stuff and actually have multiple impls you need the standard
04:26:32skrylarlot of web stuff has those though
04:26:52skrylarx-headers are just "all headers look like this, if it has an X- then just ignore it unless you know what it is"
04:27:09skrylarhave to have somewhere to stuff your apps cool new stuff that nobody knows how to use yet
04:27:26Demos[m]gltf has that too
04:27:32Demos[m]special protocol for defining extensions
04:27:37skrylaram i going to have an anneurism if i look at this spec
04:27:39*skrylar opens
04:27:44Demos[m]it's not that bad
04:29:45skrylaroh. its a json file.
04:30:33skrylarmeh, fair enough.
04:30:40skrylarI'm more of a msgpack person but dunno
04:31:24skrylarI kinda want to play with the newer gl stuff but.. eh.
04:31:35skrylarThe ROI on writing state of the art engines is low
04:32:37skrylarthis spec is a disgraceful 83 pages. although it is just json files, so fair enough
04:32:39Demos[m]they have a binary format as well
04:32:55skrylarI find irony in json's advantage being "it fits on an index card"
04:33:17Demos[m]it's not so bad
04:33:38skrylarits not
04:34:50skrylarwonder if nimble has a sax model for reading json
04:35:24skrylarits probably not that important, since people usually don't ship assets in interchange formats. so the advantage of the sax model for loading art assets is moot
04:35:44Demos[m]also gltf has a custom binary representation
04:35:57Demos[m]designed for fast and easy loading into rasterization based engine
04:36:05skrylarwell most engines convert models in to whatever they use in ram anyway
04:36:23Demos[m]yeah but the less copies/traversals the better
04:36:43skrylari remember that was the main thing people talked about xna
04:36:44Demos[m]imo the real important thing is to design the interchanged format to discorage data munging
04:36:46skrylarthe pipeline tool
04:37:38skrylari realize this is being stupid but i wonder if it would be possible to train one of those deep neural nets to spot bad code
04:38:23skrylarI suppose the answer is "yes, but" with the but being "have fun getting examples of that"
04:54:10skrylarare people actually doing server things with nim these days
04:55:31skrylarwell there's an idae
04:55:55skrylarWas just thinking about having a macro for rpc code replace any return sfrom remote functions with promise objects. that's simple enough
04:56:24skrylarthen pondering a separate macro such that whenever you were to receive a promise object, it instead wrapped the rest of the function as a closure nodejs style
04:56:41skrylarSo in the macro it just looks like a normal set of "give me this crap, and that thing, then do these things"
05:39:18*rauss quit (Quit: WeeChat 1.9)
05:40:45*tdc joined #nim
06:18:40*dankrad quit (Ping timeout: 260 seconds)
06:31:02*Vladar joined #nim
06:31:31*nsf joined #nim
06:52:40*skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…)
06:52:58*skrylar joined #nim
06:56:07*skrylar_ joined #nim
06:58:00*Parashurama joined #nim
06:59:46*skrylar_ quit (Client Quit)
07:04:44*skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…)
07:13:27*empxre joined #nim
07:15:07*empxre quit (Client Quit)
07:15:22*empxre joined #nim
07:19:55*empxre quit (Client Quit)
07:20:18*empxre joined #nim
07:26:53*empxre quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
07:32:26*yglukhov joined #nim
07:37:01*yglukhov quit (Ping timeout: 255 seconds)
07:41:19*yglukhov joined #nim
07:46:22*yglukhov quit (Ping timeout: 276 seconds)
07:46:52*yglukhov joined #nim
07:47:27*couven92 joined #nim
07:54:39*tdc quit (Read error: Connection reset by peer)
07:55:04*tdc joined #nim
07:56:35*nattefrost joined #nim
07:57:22*Parashurama quit (Ping timeout: 260 seconds)
08:10:14*Arrrr joined #nim
08:10:14*Arrrr quit (Changing host)
08:10:14*Arrrr joined #nim
08:19:14ArrrrWill nim support fat binaries?
08:23:46*Andris_zbx joined #nim
08:28:11couven92Arrrr, isn't it the compiler that has to support that?
08:28:37couven92The compiler backend that is?
08:29:17ArrrrC is the usual backend anyway
08:34:52*Parashurama joined #nim
08:42:10*cspar_ quit (Ping timeout: 240 seconds)
08:45:47*Tiberium joined #nim
08:46:48FromGitter<TiberiumN> wow
08:46:57FromGitter<TiberiumN> (https://files.gitter.im/nim-lang/Nim/9lkW/image.png)
08:48:07couven92@TiberiumN, what?
08:48:32FromGitter<TiberiumN> like I went to sleep 11 hours ago
08:48:46FromGitter<TiberiumN> and now there's much more notifications on github :)
08:48:51couven92dom96 has been busy! :D
08:48:56FromGitter<TiberiumN> yeah
08:49:04FromGitter<TiberiumN> wow guys
08:49:07FromGitter<TiberiumN> we have 1024 issues
08:49:17FromGitter<TiberiumN> 1 kilobyte!
08:49:25couven92yaih! :D
08:49:40FromGitter<k0pernicus> 1 kB of issues 
08:50:23FromGitter<TiberiumN> well according to https://githubstats.com/nim-lang/Nim nim is gaining popularity
08:50:30FromGitter<TiberiumN> everything is going up
08:50:49FromGitter<TiberiumN> issues/forks/stars/pulls/commits
08:51:24ArrrrThe stars bar is getting erected
08:51:45FromGitter<TiberiumN> we need 4k stars!
08:55:30couven92ooops... I actually hadn't starred the Nim repo yet! :O
08:55:51FromGitter<TiberiumN> aargh!
08:56:49couven92ooh, I am number 36 in the constrinbutors graph! :D
08:57:32FromGitter<TiberiumN> I'm a number 86 only :D
08:59:45couven92well, GitHub counts by number of commits appearently, and I tend to make a lot of very small commits... I have only ~532 LOC touched, while krux02 (right behind me) has 2468 LOCs touched
08:59:51federico3is there a timeline on those stats?
08:59:56FromGitter<TiberiumN> yes
08:59:58FromGitter<TiberiumN> you can see it
09:02:24*dom96|w joined #nim
09:02:42*mjanssen joined #nim
09:03:14mjanssenis there a way to import a global C library var in Nim. The logical var tclStubsPtr : ptr TclStubs ; {.importc.}
09:03:24mjanssengives a compiler error
09:04:10couven92mjanssen, `var TclStubs {.importc.}: ptr TclStubs` I think...
09:05:36couven92mjanssen, this will BTW even work with #define symbols if you want... However, even though defines are constant, Nim still requires those to be declared with var
09:06:27couven92there currently is an issue or PR somewhere that suggest this to be enabled with `let` iirc
09:07:37*mjanssen_ joined #nim
09:08:18FromGitter<Varriount> @dom96 @Araq I believe there are some threads on the forum that need to be approved
09:08:43Araqvarriount: you are moderator, you can approve people
09:10:05dom96|wAraq: release this weekend?
09:10:19Araqfine with me
09:10:26FromGitter<TiberiumN> yay
09:10:36FromGitter<TiberiumN> csources will contain android c sources as well
09:10:46Araqyou need to eloborate on the "mingw missing files" issue
09:11:12Araqthe mingws we ship is what I use for development on Windows myself
09:11:17FromGitter<TiberiumN> 1) 17.2 version number? or 0.18.0 ?
09:11:23Araq0.17.2
09:12:34dom96|wAraq: did you look at the linked issue?
09:16:08AraqI will look into it, but it's strange 'nim cpp ' is part of the testsuite and I run the tests on my machine with the mingws we ship
09:17:58FromGitter<TiberiumN> hmm, probably I should solve deprecated errors in nimble
09:18:45couven92Araq, hmm... I currently booting Nim with koch on origin/devel and after the first iteration nim seems painfully slow (while processing the nim code, not the compiler call)
09:19:35Araqcouven92: pull the most recent version ? that was fixed
09:19:43couven92ah, okay :)
09:20:08couven92curious, what made it so slow?
09:22:32couven92ah found it: https://github.com/nim-lang/Nim/commit/153441db1da722c0fb5c210a09d9a83a5d1b9656
09:23:08Araqyour nose is getting good
09:23:54couven92sorry... I realized that since you said it had just been fixed, I just needed to bo backwards in the origin/devel commit log
09:26:51FromGitter<TiberiumN> dom96: would it be safe to add client: HttpClient to "Auth" type in nimble? publish.nim
09:26:59FromGitter<TiberiumN> I just want to remove all deprecated warnings
09:27:26FromGitter<TiberiumN> and creating new httpclient every time seems to be a little bit verbose
09:36:54*mjanssen| joined #nim
09:37:20dom96|wThere might be a more appropriate type, but stick it in there for now.
09:37:59FromGitter<TiberiumN> well I don't need to create many http client instances in other places
09:38:02FromGitter<TiberiumN> just in publish.nim
09:38:30FromGitter<TiberiumN> also, what is this? https://github.com/nim-lang/nimble/blob/master/src/nimblepkg/publish.nim#L233
09:38:50*mjanssen_ quit (Ping timeout: 240 seconds)
09:38:50FromGitter<TiberiumN> can we remove when isMainModule, because code inside it is not correct?
09:42:05FromGitter<TiberiumN> at least tests are green
09:45:06dom96|wwhy is it not correct?
09:45:17FromGitter<TiberiumN> because there is no such procedures
09:45:40dom96|whuh, ok, remove it.
09:49:14*mjanssen_ joined #nim
09:50:35FromGitter<TiberiumN> ok, publish works - https://github.com/nim-lang/packages/pull/561
09:51:05*mjanssen| quit (Ping timeout: 240 seconds)
09:51:31euantorSince you're here and I just looked at the issue list, this can be closed now can't it? https://github.com/nim-lang/packages/issues/553
09:54:42FromGitter<TiberiumN> dom96: https://github.com/nim-lang/nimble/pull/387
09:55:02dom96|wI'll look at it later. :)
10:06:24couven92dom96|w, how do I set the nimcache directory in a .nimble?
10:06:51dom96|wall compiler options should go into a .nims or .nim.cfg
10:07:25couven92ah! okay... so in a nim.cfg I write: `nimcache: "someDir"`?
10:08:04couven92difference between mynimble.nims and mynimble.cfg?
10:09:01*GustavoLapasta joined #nim
10:09:59couven92dom96|w, regardless of where I put my .cfg file, it does not work at all!
10:11:00couven92i.e. setting the nimcache has no effect whatsoever
10:15:05Tiberiumwhat is the preferred way to raising compile-time errors in macro?
10:15:22Tiberiumjust "raise" ?
10:15:45dom96|wyou sure that's the parameter? does it work on the command line?
10:19:10couven92dom96|w, running `nim c --nimcache:mynimblenimcache mynimble` works just fine. but when I create mynimble.cfg next to the nim file, and write `nimcache:mynimblenimcache` into it, `nimble build` will just ignore it
10:19:27dom96|w.nim.cfg, not just .cfg
10:19:33couven92ah!
10:20:24couven92and what is the correct/preferred syntax in the .nim.cfg file? `--nimcache: dir`, `nimcache: dir` or `nimcache = dir`?
10:21:32Araq--nimcache: dir
10:21:54euantorTiberium: Using `{.error: "something broke".}` should do it I think
10:22:37couven92Araq, thanks! is there a reason why? because I remember that I use `cc = vcc` in my %APPDATA%\nim.cfg
10:23:45Araqcouven92: that syntax is mostly compatible with NimScript
10:23:55couven92ah okay :)
10:24:03Araqso you can rename the .nim.cfg to .nims and it still works (cough)
10:24:22couven92Araq, and why would I want to do that?
10:26:16Araq.nims is the future
10:26:38couven92oh, okay... :)
10:28:22Tiberiumeuantor, I mean I check name of called API method inside of macro, and if it's wrong I raise an error
10:28:56euantorAh, then probably just raise an exception I'd say
10:29:18Tiberiumok :)
10:30:30*mjanssen_ quit (Ping timeout: 240 seconds)
10:41:36*haha_ joined #nim
10:44:54Araqno, you use macros.error
10:46:59mjanssencouven92: works great, thanks
10:48:08*mahtov quit (Ping timeout: 255 seconds)
10:51:27TiberiumAraq, thanks
10:56:09*mahtov joined #nim
11:13:46*mjanssen_ joined #nim
11:13:47*gokr joined #nim
11:21:22*GustavoLapasta quit (Quit: Leaving)
11:30:00*dom96|w quit (Read error: Connection reset by peer)
11:36:34*Tiberium quit (Remote host closed the connection)
11:52:25*dom96|w joined #nim
11:54:51ParashuramaHey
11:54:52ParashuramaAraq: Can you tell me where in the VM the implicit initialisation of array happen
11:54:54Parashuramain code like this:
11:54:55Parashuramaproc test(): array[4, MyType] = discard
11:54:57Parashuramastatic:
11:54:58Parashurama echo test()
11:55:00ParashuramaI'm trying to hunt down a bug where if MyType is a closure type, the c code is messed-up.
11:55:26AraqgetNullValue iirc
11:58:45*wgf_ joined #nim
11:59:22*BitPuffin|osx joined #nim
12:00:03ParashuramaOkay thanks
12:03:03*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
12:25:13*sakalli quit (Ping timeout: 276 seconds)
12:26:39*krux02 joined #nim
12:28:36*tdc_ joined #nim
12:30:57*tdc quit (Ping timeout: 240 seconds)
12:41:32*Arrrr quit (Read error: Connection reset by peer)
12:44:16*dom96|w joined #nim
12:45:57couven92Araq, is `"Hello World".len` const?
12:46:11Araqyes
12:46:33couven92great! :)
13:04:35*Vladar quit (Ping timeout: 240 seconds)
13:06:42*wgf_ quit (Quit: Leaving)
13:14:56*arnetheduck joined #nim
13:17:54*rauss joined #nim
13:18:07*sakalli joined #nim
13:30:22*haha_ quit (Quit: haha_)
13:36:36FromGitter<TiberiumN> also, are version numbers prefixed with year? because it looks like it :)
13:36:41FromGitter<TiberiumN> like 0.17.0 is 2017
13:36:44FromGitter<TiberiumN> 1) 16.0 is 2016
13:36:56FromGitter<TiberiumN> ah, it's not 2016
13:38:36couven92How do I importc an extern variable in nim? does importc do that on its own already?
13:40:08*sakalli quit (Ping timeout: 260 seconds)
13:42:39dom96|whah, coincidence :)
13:43:08dom96|wor.. we will get v1.0 in 2100 :P
13:43:43FromGitter<TiberiumN> no pls
13:47:41*sz0 joined #nim
13:50:49*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
13:51:45*dom96|w joined #nim
14:01:18couven92how do I forward declare an identifier?
14:02:00FromGitter<TiberiumN> identifier?
14:02:03FromGitter<TiberiumN> var?
14:02:09FromGitter<krux02> no it will be like mame
14:02:23FromGitter<krux02> never ending version 0.xxx
14:02:43FromGitter<TiberiumN> well
14:02:47FromGitter<krux02> couver92 identifier is not very specific
14:02:57FromGitter<TiberiumN> people are *afraid* of 0.x versions
14:02:59FromGitter<krux02> you can forward declare a function
14:03:11FromGitter<krux02> just leave out everyngith starting at =
14:03:28FromGitter<krux02> well developers are afraid of 1.xx versions
14:04:08couven92ah, sorry, okay I need to forward declare a type
14:04:23FromGitter<krux02> well I think that is problematic
14:04:34FromGitter<krux02> but within a type section you don't need to forward declare
14:04:52FromGitter<TiberiumN> I usually declare all consts and types at the top of the module (after imports)
14:05:53couven92okay... I had two types (from FFI) the inner type has a pointer reference to the outer type... it's a bit messy :(
14:06:12couven92but yes, putting it all in the same type section solved the problem, thanks! :)
14:10:14*mahmudov joined #nim
14:12:14Araqpersonally I think 0.xx is vaporware, 1.xx is shit, 2.xx is good, 3.xx is bloated
14:12:49FromGitter<TiberiumN> just keep naming all versions 2.xxx ? :)
14:14:13FromGitter<TiberiumN> hmm, I just noticed lol "Nimble is a beta-grade package manager for the Nim programming language."
14:14:15FromGitter<TiberiumN> why beta grade?
14:15:03dom96|wBecause I'm a pessimist :)
14:19:47FromGitter<TiberiumN> also I don't understand a bit why people are comparing python and nim like they're very similar languages
14:20:02FromGitter<TiberiumN> yeah I know that nim syntax looks like python sometimes
14:20:04FromGitter<TiberiumN> but still
14:26:16mahmudovcant we import like this
14:26:23mahmudovimport aaaa/*
14:26:30FromGitter<TiberiumN> ehm, why?
14:26:36FromGitter<TiberiumN> "import aaaa" does that
14:26:42mahmudovit doesnt
14:26:43FromGitter<TiberiumN> what do you mean by that import?
14:26:54mahmudovimport nimrpc iwrote
14:27:11mahmudovclient.nim(1, 28) Error: cannot open 'nimrpc'
14:27:11FromGitter<TiberiumN> please explain your problem
14:27:20mahmudovimport net, asyncdispatch, nimrpc
14:27:26mahmudovit errors
14:27:32FromGitter<TiberiumN> did you create a .nimble file for your nimrpc?
14:27:34FromGitter<TiberiumN> did you install it?
14:27:40mahmudovofc
14:27:49mahmudovunder .nimble
14:27:49FromGitter<TiberiumN> well it seems you didn't install it
14:28:09mahmudov root/.nimble/pkgs/nimrpc-0.1.0/nimrpc
14:28:13mahmudovthat i have thi
14:28:17mahmudovthis*
14:28:23FromGitter<TiberiumN> are you under root?
14:28:25FromGitter<TiberiumN> wtf
14:28:30FromGitter<TiberiumN> ok doesn't matter
14:28:39FromGitter<TiberiumN> maybe you've installed nimrpc as root user
14:28:48FromGitter<TiberiumN> and trying to compile your program as usual user?
14:28:58mahmudovyes i installed,use system as root
14:29:04mahmudovno no, always root
14:29:48FromGitter<TiberiumN> well you probably have done somthing in a wrong way...
14:30:03FromGitter<TiberiumN> incorrectly configured .nimble file for example
14:30:14mahmudovnimble install nimrpc
14:30:19mahmudovthat i did this way
14:30:23FromGitter<TiberiumN> I mean .nimble file
14:30:33FromGitter<TiberiumN> is your nimrpc on github?
14:30:57mahmudovofc
14:31:20FromGitter<TiberiumN> give a link then?
14:31:35mahmudovhttps://github.com/rogercloud/nim-rpc
14:31:46mahmudovit shows nimble search nimrpc
14:31:54dom96|whow are you compiling your script?
14:31:58FromGitter<TiberiumN> noo
14:32:02FromGitter<TiberiumN> look
14:32:07FromGitter<TiberiumN> example from this github page: "import nimrpc/rpc_server, nimrpc/rpc_type"
14:32:17FromGitter<TiberiumN> author of this package wanted to do imports this way
14:32:27FromGitter<TiberiumN> soo it's not a nim probelem
14:33:07mahmudovok but its examples from under nimrpc
14:33:15mahmudovlok at nim.cfg
14:33:18mahmudovlook*
14:33:39FromGitter<TiberiumN> I still don't understand you
14:33:50FromGitter<TiberiumN> you MUST import things from this package like "import nimrpc/rpc_server, nimrpc/rpc_type" because author wrote it this way
14:34:31mahmudovok it works this way
14:34:39mahmudovso its authors wrong?
14:34:46FromGitter<TiberiumN> no, he just wanted to write it this way
14:34:49mahmudovor it is a normal importing way
14:35:03FromGitter<TiberiumN> well it depends on how much modules are in this package
14:35:12FromGitter<TiberiumN> for example "compiler" module constist of many modules
14:35:27FromGitter<TiberiumN> and you need to import like "import compiler/something" from it
14:35:35FromGitter<TiberiumN> you can change this nimrpc behaviour thought
14:35:42mahmudovhmm,how ?
14:36:29mahmudovex ,i have already changed some imports of nimrpc
14:36:33FromGitter<TiberiumN> move all *.nim files outside of nimrpc folder (to src folder), and create a new file "nimrpc.nim" ⏎ which would import and export all 3 modules
14:36:45mahmudovcuz he use msgpack but i should use msgpack4nim
14:37:19mahmudovok lemme do.
14:43:49*PMunch joined #nim
14:45:24FromGitter<TiberiumN> just interesting: what was the reason of removing typeless parameters and when they were removed?
14:45:38FromGitter<TiberiumN> because when I started using Nim they're already been removed
14:47:14*endragor quit (Remote host closed the connection)
14:47:42*endragor joined #nim
14:48:39*endragor_ joined #nim
14:51:06mahmudovtiberiumN
14:51:07mahmudovimport src/rpc_client, src/rpc_type, src/rpc_server
14:51:07mahmudovexport rpc_client, rpc_type, rpc_server
14:51:17mahmudovit is content of nimrpc.nim
14:51:26FromGitter<TiberiumN> nooo
14:51:26mahmudovit works this way,correct ?
14:51:37FromGitter<TiberiumN> nimrpc.nim should be in the same folder as rpc_client and so
14:51:47FromGitter<TiberiumN> and you just "import rpc_client, rpc_type, rpc_server"
14:51:54FromGitter<TiberiumN> and "export rpc_client, rpc_type, rpc_server"
14:52:11FromGitter<TiberiumN> hmm
14:52:18FromGitter<TiberiumN> I'll redo this - https://www.youtube.com/watch?v=zKK9I-OvZng
14:52:28*endragor quit (Ping timeout: 260 seconds)
14:52:36FromGitter<TiberiumN> some music + a bit slower video
14:53:05*endragor_ quit (Ping timeout: 240 seconds)
14:53:26*sakalli joined #nim
14:54:06*Tiberium joined #nim
14:59:36mahmudovtiberium
14:59:37mahmudovhttps://github.com/milisarge/nimrpc
14:59:43mahmudovright?
14:59:58Tiberiumwell, no :) I meant to KEEP src dir
15:00:02Tiberiumand put all nim files into it
15:00:41*nattefrost quit (Remote host closed the connection)
15:01:03mahmudovif i put all files under src
15:01:14mahmudovso my client.nim cant compile
15:01:20mahmudovwith import nimrpc
15:04:22mahmudovah ok
15:04:30mahmudovi solved finally,sorry for messing
15:04:45mahmudovi put all .nim files under src directory
15:04:58mahmudovthen i removed old nimrpc
15:05:10mahmudovi install with my new repo
15:05:18mahmudov nimble install https://github.com/milisarge/nimrpc
15:05:42mahmudov, i looked under /root/.nimble/pkgs/nimrpc-0.1.0/
15:06:05*mjanssen_ quit (Ping timeout: 240 seconds)
15:06:17mahmudovno src directory.they all under nimrpc-0.1.0/
15:06:59Tiberiumyes, that's right
15:07:48mahmudovthnks much
15:08:08mahmudovshould i make pr
15:08:13mahmudovto https://github.com/nim-lang/packages/ ?
15:13:55*mahtov2 joined #nim
15:14:07couven92Araq, in a macro, is there a way to get the typedescription for the base type of a distinct type?
15:14:23Araqyes via getType() and friends
15:14:42couven92thats in the typedesc module?
15:15:18couven92err, typeinfo i mean?
15:16:47*nsf quit (Quit: WeeChat 1.9)
15:17:12*mahtov quit (Ping timeout: 260 seconds)
15:18:19dom96|wmahmudov: I'm afraid that's still incorrect. rpc_client.nim, rpc_server.nim and rpc_type.nim should be moved into src/nimrpc
15:26:18*Andris_zbx quit (Remote host closed the connection)
15:28:17Tiberiumok I think i've done setting up gource (it has a lot of settings)
15:30:20FromGitter<brentp> Hi all, thanks to some help yesterday, I made some progress on using c2nim + Nim to wrap a C library. Now I could use some help on destructors/finalizers. I have it stubbed out here: https://gist.github.com/brentp/6e03ce78a7a4ce66fcc195f21fdabccc#file-hts-nim-L37 but I'm unsure how to write the `hts_finalize` proc to clean up when that is GC'ed. Any help appreciated.
15:31:04FromGitter<brentp> ... and any other comments on how I've done this are welcome.
15:36:42*endragor joined #nim
15:41:28*endragor quit (Ping timeout: 260 seconds)
15:43:59*PMunch quit (Quit: Leaving)
15:47:58*endragor joined #nim
15:48:22krux02Araq: I thought about your plans for the macros in Nim, and I am a bit skeptical. I mean it's a nice idea, but it seems like a lot of work to implement and it would not provide new functionality. Therefore I don't like it.
15:50:45krux02I have a question, how much work do you expect it to be to have a function in the macros module that transforms an untyped syntax tree into a typed syntax tree?
15:51:47krux02so an identifier becomes a symbol
15:51:50krux02and so on
15:52:05*sakalli quit (Ping timeout: 240 seconds)
15:56:11couven92dom96|w, nimble does not honour `%APPDATA%\nim.cfg`?
15:56:59dom96|wkrux02: which plans?
15:57:12dom96|wcouven92: huh? what is there to honor?
15:57:26krux02dom96|w: well Araq mentioned it here in the chat
15:57:36dom96|wwhen?
15:58:07krux02he said that the long term plans for macros is have a different macro system that are more like compiler plugins
15:58:47krux02I don't think it's a good idea that when the VM doesn't work reliable enough that the language should shift the focus on another system. Because then there are bugs to fix in the VM and the plugin system.
15:59:00couven92dom96|w, It's the user config file and I have my platform-specific stuff for VCC in there... that means nimble does not know the correct values when I use `nimscript.get("cc")`
15:59:02krux02it was recently
15:59:13krux02maybe you can grep the logs
16:00:40dom96|wcouven92 nimble just calls the compiler, it doesn't read any of Nim's config files.
16:01:12Tiberiumcouven92, just edit nim compiler config?
16:01:15couven92dom96|w, okay, so I create a nims instead, and in the nimble taks I simply call exec "nim e myNims.nims"
16:01:32Tiberiumah, user config file
16:12:38couven92Araq, how can I append a string to a config option in nim.cfg?
16:14:57*Trustable joined #nim
16:25:26*willprice joined #nim
16:39:10couven92Araq, hmm... from what I can tell from compiler/nimconf.nim that does not seem possible? That's a shame :(
16:45:21*pilne joined #nim
16:47:17*sz0 quit (Quit: Connection closed for inactivity)
16:50:39ParashuramaAraq: I'm looking at the mitems iterator yielding tuple, in vm. issues https://github.com/nim-lang/Nim/issues/4741 & https://github.com/nim-lang/Nim/issues/5013
16:50:40ParashuramaLooking at the generated opcodes (with debugEchoCode option),
16:50:42ParashuramaI see a conversion from ex: (string, int) -> var (string, int).
16:50:43ParashuramaThis issue seems to be triggered by a Conv (nkHiddenSubConv) inserted between opcLdArr and AddrNode
16:50:45ParashuramaAnd this appear to make a copy of the data.
16:50:46ParashuramaFor comparison mpairs iterator works (no Conv/nkHiddenSubConv inserted)
16:50:48ParashuramaWhere do you think I can find the code for this.
16:51:31ParashuramaI'm looking at the moment at semYieldVarResult to inspect resulting AST.
16:54:06*endragor quit (Remote host closed the connection)
16:55:30*dddddd joined #nim
16:55:36*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
16:59:08*dom96|w joined #nim
17:03:20ParashuramaOkay, I got this working but its just a hack.
17:03:21Parashuramain semYieldVarResult, I just strip any nkHiddenStdConv, nkHiddenSubConv when yield var values.
17:03:23ParashuramaI didn't see any issue so far, but obviously it would be better if those weren't generated in the first place.
17:04:21*krux02 quit (Remote host closed the connection)
17:06:22*fredrik92 joined #nim
17:08:37*dom96|w quit (Quit: My Mac has gone to sleep. ZZZzzz…)
17:09:17*couven92 quit (Disconnected by services)
17:09:24*fredrik92 is now known as couven92
17:10:02*fredrik92 joined #nim
17:16:57*mahtov2 quit (Ping timeout: 240 seconds)
17:20:29*dankrad joined #nim
17:21:02*haha_ joined #nim
17:22:56*mahtov joined #nim
17:23:45*kunev quit (Ping timeout: 248 seconds)
17:24:49*kunev joined #nim
17:28:18*ketralnis quit (Quit: Coyote finally caught me)
17:29:09*yglukhov quit (Remote host closed the connection)
17:32:40*tdc_ quit (Read error: Connection reset by peer)
17:33:05*tdc_ joined #nim
17:33:13*cspar_ joined #nim
17:34:24*dankrad quit (Ping timeout: 260 seconds)
17:35:54*dankrad joined #nim
17:43:29FromGitter<brentp> @brentp I found I can use `=destroy`
17:43:32*Tiberium quit (Remote host closed the connection)
17:45:08*haha_ quit (Quit: haha_)
17:51:37FromGitter<brentp> actually, no apparently that's not what I want.
17:54:26*couven92 quit (Quit: Client Disconnecting)
17:55:04*BitPuffin|osx quit (Remote host closed the connection)
17:56:20*couven92 joined #nim
17:59:19*haha_ joined #nim
18:00:26mahmudovdom96 https://github.com/milisarge/nimrpc *.nim is under src/
18:00:37mahmudovwhen i type: nimble install https://github.com/milisarge/nimrpc
18:00:50mahmudovit installs without src
18:01:13mahmudovroot [ ~/.nimble/pkgs/nimrpc-0.1.0 ]# ls
18:01:13mahmudovnimblemeta.json nimrpc.nimble rpc_server.nim
18:01:13mahmudovnimrpc.nim rpc_client.nim rpc_type.nim
18:09:41*haha_ quit (Quit: haha_)
18:10:55*haha_ joined #nim
18:14:52*yglukhov joined #nim
18:19:24*haha_ quit (Quit: haha_)
18:19:34*yglukhov quit (Ping timeout: 255 seconds)
18:22:37*haha_ joined #nim
18:23:46*yglukhov joined #nim
18:24:31*sakalli joined #nim
18:30:00*tdc_ quit (Quit: Leaving)
18:31:20dom96mahmudov: Nimble likely gives you a warning
18:31:40dom96Like I said, you need to put the rpc_*.nim files into a 'nimrpc' directory
18:31:50dom96(and the 'nimrpc' directory needs to be inside 'src')
18:32:48mahmudovpls give me a package ex.
18:32:52mahmudovfrom github.
18:33:04mahmudovi messed sorry.
18:37:26subsetparkIs there a way to allocate a ref and assign in one line?
18:38:11*rauss quit (Quit: WeeChat 1.9)
18:38:40FromGitter<TiberiumN> use ; ?
18:38:57subsetparkhaha
18:39:02subsetparkI guess I meant... In one statement
18:39:52FromGitter<Smaehtin> @mahmudov https://github.com/nim-lang/sdl2
18:42:30*Parashurama quit (Ping timeout: 240 seconds)
18:43:23*Matthias247 joined #nim
18:49:11dom96mahmudov: if you're familiar with Linux CLI commands: cd nimrpc/src && mkdir nimrpc && mv rpc_*.nim nimrpc/* # is all you need (that last command might be wrong, but hopefully you see what I mean?)
18:49:44dom96subsetpark: var x = Type()
18:49:45mahmudovyes i see
18:49:48mahmudovok thnks
18:50:36*Parashurama joined #nim
18:51:19subsetparkdom96: I am pretty sure I need an explicit ref type - it has to be nillable, and respond to isNil
18:51:56dom96subsetpark: Huh? If `Type` is a ref then you've got one
18:52:37subsetparkdom96: yes, but when I said 'assign' I meant populate the value of x[]
18:53:43subsetparkhttps://www.irccloud.com/pastebin/gcPljkZl/
18:53:48subsetparkso the last two lines of that snippet
18:57:48dom96subsetpark: var tRef = TRef(value: 10)?
18:58:25mahmudovhttps://github.com/milisarge/nimrpc dom96 pls check.i also updated nimrpc.nim
18:58:52dom96mahmudov: Looks good :)
18:59:16mahmudovis it normal:
18:59:23mahmudovimport nimrpc/rpc_client, nimrpc/rpc_type, nimrpc/rpc_server
18:59:24mahmudovexport rpc_client, rpc_type, rpc_server
18:59:30mahmudovimporting fullpath
18:59:46mahmudovexporting is with basenames
19:01:20dom96Good question. I'm not sure :)
19:01:39dom96Can you write 'export nimrpc/rpc_client ...'?
19:02:22*couven92 quit (Ping timeout: 260 seconds)
19:04:20subsetparkdom96: yes, but in my case most of the time the object with value: 10 comes from elsewhere
19:05:06dom96I suspected that. I think I mentioned this before to you: Nim wasn't designed to be used like this AFAIK.
19:05:27dom96Why are you doing it this way?
19:06:10mahmudov 'export nimrpc/rpc_client error occurs
19:06:28mahmudovroot/.nimble/pkgs/nimrpc-0.1.0/nimrpc.nim(2, 14) Error: cannot export: nimrpc / rpc_client
19:06:54mahmudovit says this
19:07:18dom96mahmudov: I'll submit this as an issue just in case.
19:07:42dom96(Offtopic: NimBot should have a !createissue <msg> command)
19:07:44mahmudov+1
19:25:55*dankrad quit (Ping timeout: 246 seconds)
19:25:56FromGitter<faustinoaq> +1
19:27:18*haha_ quit (Read error: Connection reset by peer)
19:27:57*dankrad joined #nim
19:48:13*joeyparsons joined #nim
19:48:17FromGitter<zacharycarter> @Araq might be cool to make an implementation for Karax / Nim : https://github.com/gothinkster/realworld
19:48:58FromGitter<TiberiumN> it's already there, but not with akrax afaik
19:49:01FromGitter<TiberiumN> let me find it
19:49:18FromGitter<TiberiumN> *karax
19:50:17FromGitter<zacharycarter> ah I just found it I think
19:50:24FromGitter<zacharycarter> https://github.com/battila7/nim-realworld-example-app
19:50:43FromGitter<TiberiumN> yeah
19:51:30joeyparsonsqq, excited about nim after reading up on it, but running into some issues during `./koch tools`. output here: https://gist.github.com/joeyparsons/b0ac5e5827ce63a64a8c44af558eff68
19:52:55FromGitter<TiberiumN> hmm
19:53:10FromGitter<TiberiumN> can you try with latest devel just in case?
19:54:07FromGitter<TiberiumN> because it seems you're compiling from source anyway
19:54:59joeyparsonslemme give that a shot
19:57:34*cd joined #nim
19:59:11*cd quit (Client Quit)
20:00:19joeyparsonsstrangely fails on `Hint: gcc -c -w -O3 -fno-strict-aliasing -I/home/joey/nim/Nim/lib -o nimcache/r_linux_amd64/compiler_nim.o nimcache/r_linux_amd64/compiler_nim.c [Exec]` right after `scriptconfig` again
20:00:32joeyparsonsfrom master
20:00:39FromGitter<TiberiumN> I meant "devel" :)
20:00:47FromGitter<TiberiumN> but error probably would be the same, yeah
20:03:38dom96Hope batilla continues https://github.com/gothinkster/realworld/issues/60 :D
20:04:10*sz0 joined #nim
20:10:22FromGitter<TiberiumN> well another idea popped in my head
20:10:41FromGitter<TiberiumN> try to compile nim & run nim tests on ReactOS (windows clone)
20:10:53FromGitter<TiberiumN> it's far behind Windows, but it can do many stuff already
20:10:56FromGitter<TiberiumN> (and it's fully legal)
20:11:45*nhywyll joined #nim
20:12:22FromGitter<TiberiumN> but yeah, it's almost vm-only os for now
20:12:29FromGitter<TiberiumN> but it can run on real hardware (sometimes)
20:12:48FromGitter<TiberiumN> and it don't even have full compatibility with Windows XP/Server 2003
20:17:15*Trustable quit (Remote host closed the connection)
21:01:15*couven92 joined #nim
21:06:14*gangstacat joined #nim
21:09:27couven92dom96, I just saw, could you elaborate on Nim's filter instead of string formatting?
21:10:13*couven92 has no idea what dom96 is talking about in https://github.com/nim-lang/Nim/pull/6058#discussion_r132555623
21:10:48dom96https://nim-lang.org/docs/filters.html
21:11:00dom96see how it's used in the nimforum for an example
21:11:09couven92ooohh! nice! :D
21:11:29*Parashurama quit (Ping timeout: 248 seconds)
21:12:45couven92okay, will do that in the weekend... we need to circumvent SQLite in testament anyways, so there are major changes coming here anyways...
21:14:04couven92dom96: or would you like me to get it merged in the new release with the SQLite stuff, then I could speed hack it tomorrow evening
21:14:41dom96I don't mind :)
21:14:53couven92okay, I'll see what I can do
21:19:56*chemist69 quit (Ping timeout: 255 seconds)
21:33:43*chemist69 joined #nim
21:33:49*dankrad quit (Ping timeout: 276 seconds)
21:34:36couven92dom96, this might be kinda important to fix before the release? https://github.com/nim-lang/Nim/issues/6229
21:34:54couven92I have no idea how though... so I can't really do it :P
21:42:25*gokr quit (Ping timeout: 248 seconds)
21:43:01*nsf joined #nim
21:47:48*skrylar joined #nim
21:55:12*dankrad joined #nim
22:05:04*couven92 quit (Quit: Client Disconnecting)
22:05:33subsetparkdom96: > I suspected that. I think I mentioned this before to you: Nim wasn't designed to be used like this AFAIK. Why are you doing it this way?
22:05:53subsetparkwhen you say that, do you just mean that types should generally be either ref or not ref, and shouldn't be switched back and forth?
22:06:34subsetparkIn this case it's because I have a type that is totally value-semantics based, but needs to be nil sometimes
22:06:38subsetparkMaybe I should use options instead
22:08:04*mahmudov quit (Ping timeout: 240 seconds)
22:15:22*Jesin quit (Quit: Leaving)
22:16:11subsetparkdom96: put another way, it feels like an anti pattern to have foo[] all over the place
22:18:41skrylari missed the context; are you dereferencing pointers/refs?
22:21:04subsetparkYeah
22:21:27skrylarI have rarely needed to do that explicitly
22:22:01*nsf quit (Quit: WeeChat 1.9)
22:23:03subsetparkBasically there is an object type from an imported library, which I use across my application - but sometimes need to be nil. So I accept ref versions of the same type. Maybe what I could do is shadow the imported type as a ref to it. Then I would mostly only need to deref when passing back to the imported libraries
22:23:37skrylarwell that's up to you. i'm a fan of fat wrappers personally
22:23:51subsetparkWhat do you mean?
22:24:04skrylarhaving a layer of sugar over library bindings to nim-ize them
22:25:04skrylaryou don't normally have to deref ref types manually though, unless you're doing some really specific stuff
22:25:08subsetparkAh, I mean it's imported from another nim library
22:25:08subsetparkSo luckily that's not a concern
22:25:37skrylarA "clean" way to do it is with Maybe types. Which i think we have somewhere in stdlib
22:25:55subsetparkWell yeah that's what I meant by options
22:26:03skrylarnods
22:26:06subsetparkWhich I use quite a bit and like
22:26:48skrylarits a speed v. clarity decision
22:27:05*Matthias247 quit (Read error: Connection reset by peer)
22:27:33subsetparkBut I'm suspecting that the fact that there's more ref/non ref juggling is because I didn't go whole hog and define a new type for my application that is a ref to the imported type. Instead I just added 'ref' to the function signatures, so there ended up being a lot more steps to annotate
22:27:55skrylaroh. never tried ref on a function pointer
22:28:44subsetparkNo, I mean the arguments that the procs expect
22:31:45skrylarponder.
22:31:50*Pisuke quit (Ping timeout: 240 seconds)
22:32:08skrylarIt might be possible to use templates and such to have a maybe type that does that but looks nicer to the type system
22:32:29skrylarit'd just be a generic with an explicit deref proc
22:32:42skrylarFunctionally the same, but doesn't look like a pile of ref soup
22:34:00subsetparkYeah for sure. I actually experimented with that. But I think the added indirection of the tenplating such that you don't always know whether your variable is ref or not is not worth it
22:34:21skrylarnon-ref types couldn't be maybe's in the first place
22:36:10subsetparkYeah. In either case it seems that adding -some- type layer in the application is necessary
22:51:21*mahmudov joined #nim
22:58:07*willprice quit (Ping timeout: 255 seconds)
22:58:38*cspar joined #nim
23:00:49*cspar_ quit (Ping timeout: 255 seconds)
23:02:07*sakalli quit (Remote host closed the connection)
23:07:41*skrylar quit (Quit: My iMac has gone to sleep. ZZZzzz…)
23:18:17*yglukhov quit (Remote host closed the connection)
23:31:59*nhywyll quit (Quit: nhywyll)
23:40:10*mahmudov quit (Ping timeout: 240 seconds)
23:44:40dom96subsetpark: yeah, use an option[T] type instead
23:45:45*dddddd quit (Remote host closed the connection)
23:46:43*def-pri-pub joined #nim
23:49:21*skrylar joined #nim
23:55:20*endragor joined #nim