<< 16-10-2017 >>

00:23:10*chemist69 quit (Ping timeout: 264 seconds)
00:23:33*chemist69 joined #nim
00:51:23FromGitter<zacharycarter> just finished blocking out the low poly
00:51:25FromGitter<zacharycarter> https://imgur.com/a/z8dHJ
00:54:28*ftsf joined #nim
01:04:24*couven92 quit (Quit: Client Disconnecting)
01:04:48*Pisuke joined #nim
01:07:16*MyMind quit (Ping timeout: 255 seconds)
01:23:25FromGitter<zacharycarter> would love any / all feedback so far
01:36:15*vlad1777d quit (Quit: Leaving)
01:36:31*yglukhov joined #nim
01:37:53*kunev quit (Ping timeout: 255 seconds)
01:38:15*kunev joined #nim
01:38:41*chemist69 quit (Disconnected by services)
01:38:46*chemist69_ joined #nim
01:41:01*yglukhov quit (Ping timeout: 255 seconds)
01:57:21*ipjk quit (Ping timeout: 248 seconds)
02:08:05*dddddd quit (Remote host closed the connection)
02:25:08*smt` quit (Ping timeout: 255 seconds)
02:58:38*libman quit (Quit: Connection closed for inactivity)
03:16:20*endragor joined #nim
03:38:33*yglukhov joined #nim
03:42:57*yglukhov quit (Ping timeout: 248 seconds)
03:49:55*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
04:18:05*UxerUospr quit (Ping timeout: 240 seconds)
04:37:40*rauss quit (Read error: Connection reset by peer)
04:40:21*rauss joined #nim
04:43:03*rauss quit (Client Quit)
04:43:54*rauss joined #nim
05:03:50FromGitter<Bennyelg> Looks fantastic
05:04:02FromGitter<Bennyelg> are you in the right profession :P ?
05:08:00*Yardanico joined #nim
05:12:11*Yardanico quit (Remote host closed the connection)
05:13:50FromGitter<Bennyelg> https://nim-lang.org/docs/manual.html#types-auto-type ⏎ Auto type ⏎ The auto type can only be used for return types and parameters. For return types it causes the compiler to infer the type from the routine body: ⏎ ⏎ I didn't get this type right, the compiler try to fetch the returnType from the proc name? [https://gitter.im/nim-lang/Nim?at=59e4400ef7299e8f53f0fd00]
05:41:21*yglukhov joined #nim
05:45:37*yglukhov quit (Ping timeout: 248 seconds)
05:54:14FromGitter<Bennyelg> Another Q: ⏎ Why writing i.e proc x[T: SomeSignedInt] ⏎ And not just x ()..
05:58:32FromGitter<zacharycarter> thank you @Bennyelg !
06:07:32*Laon joined #nim
06:24:53*Syneh_ quit (Ping timeout: 255 seconds)
06:24:58*odc quit (Ping timeout: 264 seconds)
06:26:34*Syneh_ joined #nim
06:30:19*nsf joined #nim
06:31:47FromGitter<mratsim> looks gorgeous @zacharycarter
06:38:08*PMunch joined #nim
06:40:41*Arrrr joined #nim
06:40:41*Arrrr quit (Changing host)
06:40:41*Arrrr joined #nim
06:51:10FromGitter<zacharycarter> thank you @mratsim !
06:52:40PMunchAha, I think I've figured out the problem I had with the JS/Karax version of the layout engine
06:52:52ArrrrI hope this nim pretty is not enforced upon us
06:54:04PMunchSince Karax has the renderer procedure thing it meant that the code to generate the layout was placed within a function. This won't work since it can't do compile-time procedure calls within a regular function call
06:59:51PMunchArrrr, I think it will be a separate tool
07:00:19PMunchBut it might be that all commits to the compiler and/or stdlib will have to be formatted by it
07:07:18*gokr joined #nim
07:19:54*claudiuinberlin joined #nim
07:25:49AraqPMunch: maybe. I don't really believe in these things though and will likely not use nimpretty myself
07:27:12Araqit's a tradeoff here between forcing yet another rule on co-developers vs learning to deal with minor style differences, something which human brains are actaully superb at
07:27:42Araqprogrammers love to pretend they are foolish machines though, can't help them
07:29:03PMunchProblem is if someone writes a plug-in for e.g. VS Code that auto-styles Nim code and then someone who has auto-styled their code is doing a pull request and the diff message is all over the place
07:29:09Araqanyway this tradeoff never saw a serious cost/benefit analysis and so it remains superstition or conjecture
07:29:38*Sembei joined #nim
07:30:16PMunchThen you would have to force developers to not use the tool you have written to create pretty Nim code for anything that goes into the main repo.
07:31:05*Pisuke quit (Ping timeout: 240 seconds)
07:31:38Araqhttp://www.foxnews.com/story/2009/03/31/if-can-raed-tihs-msut-be-raelly-smrat.html this would be an impossibility
07:33:35PMunchgit diff is unfortunately not that smart
07:34:06PMunchI'm not worried about the people reading or writing their code
07:34:36Araqgit diff is always a good argument in favour of not changing anything
07:36:37Arrrrhaha
07:36:53PMunch-_-
07:39:51ArrrrI have update my compiler to devel. For some reason, `include one/two.nim` is interpreted as `include one/two/nim`
07:40:24PMunchDon't you need quotes when using paths as imports?
07:40:41ArrrrThe first time i hear this
07:41:04PMunchOr maybe that was just for "../something" imports
07:45:33ArrrrThis seems to be the only breaking change, for now.
07:52:55AraqArrrr: oh interesting
07:53:09AraqI thought this logic wasn't changed
07:58:51*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:02:22*claudiuinberlin joined #nim
08:02:51*Vladar joined #nim
08:03:58*yglukhov joined #nim
08:08:01*yglukhov quit (Ping timeout: 240 seconds)
08:13:53*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
08:14:23PMunchUpdated the new genui project now. Layouts are working fine
08:16:06Araqwhich software do you use to cut videos?
08:16:17*yglukhov joined #nim
08:16:25PMunchI've used kdenlive before, pretty solid tool
08:17:49SunDwarfmy two cents, every time ive used kdenlive it shat out a choppy 24-fps x264 file no matter what preset or settings i tried
08:18:17PMunchHuh, never had that problem myself
08:21:47FromGitter<mratsim> I use Avidemux to cut video if it's just cutting (not moving part before/after/fading)
08:22:24*odc joined #nim
08:22:41FromGitter<mratsim> If I want to process a video like a (Python) program and assign part of a video to a variable I use Vapoursynth, you can directly feed it to x264
08:22:59FromGitter<mratsim> Sometimes Handbrake is useful for quick and dirty presets
08:23:14FromGitter<mratsim> Or command line ffmpeg
08:24:30FromGitter<mratsim> And to add subtitles and make sure they are in sync with the sound I use Aegisub
08:32:30*dddddd joined #nim
08:36:17FromGitter<Varriount> <3 Handbrake
08:39:10*couven92 joined #nim
08:39:10*fredrik92 joined #nim
08:40:07*fredrik92 quit (Client Quit)
08:48:48*claudiuinberlin joined #nim
09:10:32PMunchcouven92, do you still have machines set up to use fredrik92?
09:11:21couven92You mean in the TD-serverroom?
09:11:50PMunchNo, you just logged in with both couven92 and fredrik92 before fredrik92 quit
09:13:12couven92Ah! Sorry, yeah, I rebooted my machine and Windows remembered what applications I had running before turning off... Then I started HexChat myself when the machine was up and running again, and then Windows also relaunched HexChat itself...
09:13:27couven92fredrik92 is my (first) alternate nick...
09:13:39PMunchAah, that makes sense :P
09:13:46couven92PMunch, you'll notice that both logged in from the same IP
09:24:46dom96ooh, a storm heading towards Ireland. How fun.
09:24:58dom96Uni classes cancelled woop woop
09:25:09PMunchYeah I heard about that, pretty big one by the looks of it
09:25:13PMunchLucky you :P
09:25:47dom96Nowhere near as big as what hit the US/Caribbean
09:27:51PMunchWell they are known for having bigger storms
09:33:47*PMunch quit (Ping timeout: 252 seconds)
09:33:54dom96Literally what Nim is https://twitter.com/d0m96/status/919857258191818752
09:34:13*Vladar quit (Remote host closed the connection)
09:36:37*Vladar joined #nim
09:39:04*PMunch joined #nim
09:39:31FromGitter<mratsim> Hum Haskell is not simple, though I really like the language
09:40:37FromGitter<mratsim> Especially currying/function composition
10:09:12FromGitter<mratsim> Someone suggested Crystal in the comments of my blog article. I found a linalg crystal library much like neo. List comprehension syntax in Crystal can probably be stolen:
10:09:21FromGitter<mratsim> ===or using block m = GMat32.new(3, 4) { |i, j| i*3 + j + 1 } # or using one of other ways, check "spec" directory===
10:23:24*gokr left #nim (#nim)
10:26:15*user0__ quit (Quit: user0__)
10:26:30*user0__ joined #nim
10:26:31*user0__ is now known as user0
10:30:46*user0 quit (Client Quit)
10:31:03*user0 joined #nim
10:38:14*PMunch_ joined #nim
10:38:31*zolk3ri joined #nim
10:40:24*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
10:41:05*PMunch quit (Ping timeout: 248 seconds)
10:41:56*chemist69_ quit (Ping timeout: 255 seconds)
10:42:18*chemist69 joined #nim
10:55:00*Yardanico joined #nim
10:59:32Yardanicohi everyone!
10:59:38*yglukhov quit (Read error: Connection reset by peer)
10:59:39YardanicoAraq, is there a specific place for lambda tests?
10:59:54*yglukhov joined #nim
10:59:55Yardanicoah, it's closure
11:01:04dom96mratsim: I discussed list comprehensions with Araq a while back, I think the plan is to allow for loops as expressions
11:01:58*Snircle joined #nim
11:03:29dom96I don't see why Crystal would be faster in this case
11:05:16Arrrrfor-loops as expressions? how would that work?
11:05:50dom96var x = (for i in 0 .. 5: i)
11:05:56cremAre there recursive lambdas by any chance?
11:06:09dom96(I'm guessing)
11:06:44Yardanicoyeah, same as ifs and cases
11:07:00FromGitter<mratsim> @dom96 I replied to the Crystal comment:
11:07:11FromGitter<mratsim> > I would probably use Crystal if I didn't hear of Nim first actually. Both strike an excellent balance of ergonomics, flexibility and speed. The other language with those characteristics would be D. ⏎ ⏎ Regarding speed, I don't think Crystal would be faster if you cannot solve those questions: ⏎ ⏎ 1) How to insert OpenMP from Crystal ? ... [https://gitter.im/nim-lang/Nim?at=59e492de210ac26920f0a37e]
11:07:17Arrrrso x == 5?
11:07:53FromGitter<narimiran> test 1 2
11:08:28YardanicoArrrr, no, I think it should be @[0, 1, 2, 3, 5]
11:08:44Yardanicothere wouldn't be any point in for-expression if it would return only last value
11:08:52Arrrrwtf
11:08:53federico3"simple" list comprehensions don't seem to be much more useful than map(). Can you have multiple cycles?
11:09:39Yardanicooh, sorry
11:09:55Yardanico@[0, 1, 2, 3, 4, 5]
11:10:05FromGitter<mratsim> by the way @dom96, this breaks nimsuggest on my Cuda functions: ⏎ ⏎ ```when defined(cuda): ⏎ import ./tensor_cuda ⏎ export tensor_cuda``` ⏎ ⏎ Is there a way to tell nimsuggest to “define” some stuff in a repo for proper auto completion? ... [https://gitter.im/nim-lang/Nim?at=59e4938c32e080696ee763b8]
11:10:25FromGitter<Yardanico> yes
11:10:28FromGitter<Yardanico> edit your nim.cfg
11:10:37FromGitter<Yardanico> to define cuda
11:10:45FromGitter<Yardanico> it should probably work
11:11:14FromGitter<mratsim> @federico3 do you mean something like this? ⏎ ⏎ ```l = [[1,2,3],[4,5,6]] ⏎ flattened_l = [item for sublist in l for item in sublist]``` ⏎ ⏎ I find this unreadable [https://gitter.im/nim-lang/Nim?at=59e493d1177fb9fe7e84b9c0]
11:12:00federico3yep
11:12:04FromGitter<narimiran> why unreadable?
11:12:10FromGitter<mratsim> I guess I will have to ship about 5 nim.cfg with Arraymancer (Cuda, OpenMP, Cuda+OpenMP, MKL, Cuda + MKL + OpenMP ….)
11:12:49FromGitter<mratsim> I would expect the outermost list on the right
11:13:20cremGenerally list comprehention in python are readable, but one to flatten the nested list I always search in stackoverflow.
11:13:29FromGitter<mratsim> but here it’s [item for inner_list in outer_list for item in inner_list]
11:13:39federico3mratsim: yes, the inversion is a bit confusing
11:14:43FromGitter<mratsim> Haha, I have an idea to get an Hacktoberfest shirt
11:14:44FromGitter<narimiran> @mratsim "I would expect the outermost list on the right" -> you read it from left to right like you would read it in multiline for loop:
11:14:52Yardanicomratsim: I already got it :)
11:14:56FromGitter<mratsim> A flatten for sequtils
11:14:58YardanicoI mean I completed 4 PRs
11:15:04YardanicoI didn't receive t-shirt yet
11:15:19Yardanicoand guess what? all these 4 prs are for nim
11:15:31FromGitter<narimiran> ```for line in outer: ⏎ for char in line:``` [https://gitter.im/nim-lang/Nim?at=59e494d3f7299e8f53f2ab0c]
11:15:59FromGitter<narimiran> is the same as `[char for line in outer for char in line]`
11:16:05FromGitter<mratsim> actually you’re right, it’s easier ike this
11:16:15*user0 quit (Quit: user0)
11:16:24federico3perhaps this would be more Nim-like: http://paste.debian.net/991022/
11:16:30*user0 joined #nim
11:16:31Yardanico1 for nim repo, 2 for vscode-nim, one for nimble
11:18:14FromGitter<narimiran> something like: `[x | x in 0 .. 10]`?
11:18:49FromGitter<mratsim> actually it’s possible via the `future`module with `lc[…]`
11:20:12FromGitter<narimiran> well then, we just need to make it regular part of the language :)
11:20:46*user0 quit (Client Quit)
11:23:11*user0 joined #nim
11:24:48FromGitter<Yardanico> Well no
11:25:17FromGitter<Yardanico> It's better when they're separated
11:28:18FromGitter<mratsim> lc[] is nice as a proof of concept but it’s too ugly for now :P
11:28:52*miran joined #nim
11:30:07FromGitter<mratsim> It at least needs a nice bracket/brace like syntaxt like `[. x | x in 0 .. 10 .]` or `{x | x in 0 .. 10}`
11:31:04FromGitter<mratsim> or just @[x | x in 0 .. 10]
11:32:48FromGitter<narimiran> the last one
11:33:02FromGitter<narimiran> @[ ... ] is in accordance to seq syntax
11:33:36YardanicoI think @[] wouldn't work without a language change
11:33:55FromGitter<narimiran> `x in 0 .. 10` is also familiar. combine those two and you get a sane synatax for comprehension
11:34:45FromGitter<mratsim> I think Nim might need a FAQ like Crystal’s, aka “Why doesn’t Nim do” https://github.com/crystal-lang/crystal/wiki/FAQ
11:34:55mirantest 1 2
11:35:04miranyeah, i'll switch here (from narimiran)
11:35:30Yardanicomratsim: there is
11:35:47Yardanicobut it's not completed
11:35:47Yardanicohttps://github.com/nim-lang/Nim/wiki/Common-Criticisms
11:35:52Yardanicoand https://github.com/nim-lang/Nim/wiki/Unofficial-FAQ
11:36:08Yardanicosecond one
11:36:23*sleepyqt joined #nim
11:38:18Yardanicoand crystal still doesn't have windows support :)
11:38:34YardanicoI think nim has windows support because Araq uses windows :P
11:43:14*PMunch_ is now known as PMunch
11:44:46FromGitter<mratsim> He was asking about profiling on MacOS 2 days ago :P
11:45:12FromGitter<mratsim> By the way Yardanico, I think the tag should be C++ Codegen, not codegen: https://github.com/nim-lang/Nim/issues/6512
11:45:26Yardanicoah, sorry
11:47:31*vlad1777d joined #nim
11:49:01*claudiuinberlin joined #nim
12:01:46*JappleAck joined #nim
12:02:19*PMunch_ joined #nim
12:03:40*yglukhov quit (Remote host closed the connection)
12:04:03*yglukhov joined #nim
12:04:57*PMunch quit (Read error: Connection reset by peer)
12:06:00*PMunch joined #nim
12:09:22*PMunch_ quit (Ping timeout: 264 seconds)
12:11:13PMunchhttps://www.krackattacks.com/
12:11:18PMunchShit, this is not good
12:14:31PMunchYardanico, the common criticism page should use the same type for OCaml and Nim to make it a bit easier to understand
12:18:16cremkrackattacks is not THAT bad.
12:19:05cremEavesdropper should be in the range of wifi network, and also most of traffic is encrypted anyway.
12:19:12*Ven joined #nim
12:19:55*Ven is now known as Guest23284
12:20:09PMunchStill, voiding the security of WPA2 is pretty bad..
12:20:48PMunchWPA2 really only offers security in the range of the WiFi network anyways, so the attack applies to wherever it could apply
12:20:57dom96I find it difficult to remember the common questions
12:21:08dom96If you guys have any that should be answered in the FAQ please let us know
12:21:42cremAlso fixes for most devices will be released soon.
12:22:11Yardanicodom96, common question or misunderstanding - "translating" vs "compiling"
12:22:16Yardanicoe.g.
12:22:22Yardanico"Is Nim transpiled to C?"
12:22:25PMunchcrem, tell that to all the people that never updates their routers/phones..
12:22:40*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:22:49Yardanicoand maybe rename unofficial FAQ to FAQ?
12:23:09*ShalokShalom_ joined #nim
12:23:09dom96No, we've got one here: https://nim-lang.org/faq.html
12:25:57*ShalokShalom quit (Ping timeout: 240 seconds)
12:35:27*arnetheduck quit (Ping timeout: 260 seconds)
12:40:11*claudiuinberlin joined #nim
12:41:09federico3PMunch: wifi has been a mess since day 1
12:41:18*Guest23284 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
12:43:33*manjaro-kde5- joined #nim
12:46:17*Arrrr quit (Ping timeout: 252 seconds)
12:51:26skrylarPMunch, these things wouldn't be a problem if people didn't have a radio fetish
12:51:55*skrylar still hardlines things that can be hardlined, but sadly it can be hard to find jacks these days
12:52:50*NimBot joined #nim
12:54:44Yardanicohow to get current time via NimBot ? :) easy
12:54:53Yardanico!eval echo CompileTime
12:54:55NimBot12:54:53
12:56:29*Ven joined #nim
12:56:53*Ven is now known as Guest98574
13:00:21YardanicoAraq, where "crash" label should be generally added? in ALL issues where compiler crashes?
13:00:56dom96yes
13:01:06Araqyes except for "I fooled Nim by setting .extern names that clash with other C identifiers"
13:01:21AraqNim doesn't perform a linking step checking
13:01:33Yardanicookay
13:01:42Araqbut I suppose these could just be closed as "won't fix"
13:01:56*yglukhov quit (Read error: Connection reset by peer)
13:02:15*yglukhov joined #nim
13:02:37Yardanicoand "semcheck" for issues where there is a C compiler error, but nim compiler should prevent it?
13:03:46Yardanicoor even if there's no C/Nim compiler error, but code is invalid
13:04:22Araqyeah
13:05:39Yardanicothere's only 63 issues without labels now :)
13:06:23*Guest98574 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:10:49*ipjk joined #nim
13:11:07*Arrrr joined #nim
13:11:07*Arrrr quit (Changing host)
13:11:07*Arrrr joined #nim
13:12:21*Laon quit (Ping timeout: 240 seconds)
13:20:05FromGitter<krux02> yay just fixed for an hour breaking changes in the Nim language
13:20:09PMunchfederico3, skrylar yeah WiFi is a bit of a hack. I still use cable whenever I can, but phones and lap-tops are easier to use on WiFi (don't have cat5s to my couch).
13:20:46Araqkrux02: what are you talkinga bout?
13:21:04skrylarPMunch, i wouldn't say it's a hack, it's just overused decadence
13:21:05FromGitter<krux02> quote does not create stmtLists anymore
13:21:11Yardaniconot only quote do
13:21:18FromGitter<krux02> at least not, when it can avoid that node
13:21:26FromGitter<krux02> I kind of relied of stmtList
13:21:34Araqkrux02: oh sorry.
13:21:38FromGitter<krux02> var node = quote do: ...
13:21:42AraqI was aware of this breaking change
13:21:45FromGitter<krux02> node.add quote do:
13:21:54Araqbut I thought I improved things
13:21:54skrylardoesn't `quote` break often
13:21:55Yardanicoyeah, I've helped to fix issue related to nnkStmtList in another nim project on github too
13:22:00FromGitter<krux02> I fixed it by now
13:22:09Yardanicohttps://github.com/xomachine/NESM if anyone is interested
13:22:23Araqwasn't obvious to me it breaks so much code out there :-(
13:23:28FromGitter<krux02> well it's not exactly trivial to fix all the quote do issues if you don't exactly know what is going on
13:23:34FromGitter<krux02> the erros are quite weird
13:23:42skrylarnesm looks pretty neat
13:23:50Yardanicoyeah
13:23:59Yardanicohttps://github.com/xomachine/NESM/blob/master/tests/basic.nim
13:24:09Yardanicoit uses "endians" and "streams" module internally
13:24:14Yardanicofor serialization
13:24:42Yardanicoand code generated by it is very small
13:25:10Yardanicoexample from docs - https://xomachine.github.io/NESM/
13:25:28FromGitter<krux02> well I have a serialization library that works with generics entirely.
13:25:35skrylari have a partial one that does finite state machines. earmarked to fiddle with one for generating netcode
13:25:42FromGitter<krux02> I don't need macros to generate methods
13:25:51FromGitter<krux02> I just have a generic serialize funciton
13:25:51Yardanicokrux02: is it public?
13:26:13FromGitter<krux02> no it's not
13:26:23FromGitter<krux02> but I can show you that part if you want
13:27:08ArrrrDoes this fix speed up compilation https://github.com/nim-lang/Nim/issues/5007 ?
13:27:09YardanicoNESM supports almost all nim types
13:27:47Yardanicoincluding object variants with nested case statements
13:27:47AraqArrrr: only for edge cases
13:28:05Yardanicoalso endianess
13:28:16Yardanicohttps://xomachine.github.io/NESM/#endianness-switching looks pretty cool
13:28:33FromGitter<krux02> http://ix.io/Bko
13:28:47ArrrrI see.
13:29:19Yardanicokrux02: hmm, nice, it's probably faster than using streams
13:29:43FromGitter<krux02> well I wrote it to be fast
13:29:45PMunchThat is pretty cool
13:29:50PMunchThe endianess thing
13:29:58FromGitter<krux02> not handled
13:31:04FromGitter<krux02> I just use copyMam on numbers
13:31:53FromGitter<krux02> if you want to, you can add support for endianness
13:32:49FromGitter<krux02> I use it to cache a json file
13:33:17FromGitter<krux02> I have a json file and parsing that at every startup of the program takes to long, so I wrote a simple but fast binary dump
13:33:23FromGitter<krux02> and I load that instead
13:33:54FromGitter<krux02> much faster and no unnecessary memory allocation
13:35:06ArrrrHow is faster than streams?
13:35:25FromGitter<krux02> well streams are a concept of the past
13:35:29ArrrrI think it does the same thing. Probably more comfortable to write code with
13:35:39FromGitter<krux02> I use memory mapped files
13:35:45*sz0 joined #nim
13:35:48*nsf quit (Quit: WeeChat 1.9)
13:35:56ArrrrAh-
13:37:07FromGitter<krux02> memory mapped files pretend that a file is completely in memory, but under the hood it uses a memory paging algorithm that is also used for memory swapping
13:37:48Araqthey also eat up address space like there is no tomorrow
13:38:14ArrrrAnd myreadwrite i guess is a seq[byte]
13:38:19FromGitter<krux02> yes but with 64 bit being the norm, I don't that that is a problem
13:39:05FromGitter<krux02> it's just a struct/object holding a memory mapped file handle and a write offset
13:39:50Araq64 bit pointers are foolish though and most devices (phones?) are 32 bit ARM machines. I think.
13:40:03FromGitter<krux02> I forgot these lines: ```nim ⏎ ⏎ import memfiles ⏎ ⏎ type ... [https://gitter.im/nim-lang/Nim?at=59e4b6b3614889d475bf634f]
13:40:46FromGitter<krux02> well I don't develop for phones
13:41:01FromGitter<krux02> and on desktop machines 32 bit is really a small minority
13:41:43FromGitter<krux02> bit even on 32 bit, creating one memory mapped file to dump a file and close it afterwards is also not really a big deal
13:42:17FromGitter<krux02> The file I am processing is just a few hundred MB not necessarily huge
13:43:02FromGitter<krux02> and the memory mapping is releast as fast as possible
13:43:26*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:44:38ArrrrInteresting, i have to give it a shot. Hope the api is not too different from files
13:45:58*claudiuinberlin joined #nim
13:46:15*user0 quit (Quit: user0)
13:48:42*user0 joined #nim
13:50:46*user0 quit (Client Quit)
13:51:02*user0 joined #nim
13:51:52*Arrrr quit (Ping timeout: 260 seconds)
13:56:08FromGitter<krux02> The api is just pointer arithmetic
14:07:02*yglukhov quit (Remote host closed the connection)
14:09:46*yglukhov joined #nim
14:13:51*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
14:19:11*endragor quit (Remote host closed the connection)
14:19:38*endragor joined #nim
14:21:32*endragor_ joined #nim
14:22:02euantorQuit a lot of phones are ARM64 now, including all current supported iOS devices
14:22:18Araqmadness :-)
14:22:42euantoryep
14:22:55euantorBut I guess it's required when some andorid phones are shipping with like 6GB of RAM
14:23:02euantorBecause Java likes to eat memory :)
14:23:44*UxerUospr joined #nim
14:23:48*endragor quit (Ping timeout: 240 seconds)
14:23:55FromGitter<Bennyelg> Anyone can explain me once and for all what is the different (key difference) between type of tuple and ref object ?
14:24:27*TjYoco joined #nim
14:24:31Yardanicowell, firstly I want to say that there's no difference between tuple and usual "object"
14:24:38Yardanico"ref object" is a reference to an object
14:24:51FromGitter<Bennyelg> yea i know
14:24:59FromGitter<Bennyelg> so object and tuple are equal?
14:25:07FromGitter<Bennyelg> just a way of typing ?
14:25:28Yardanicothere are differences between tuple an an object - https://nim-lang.org/docs/manual.html#types-tuples-and-object-types
14:25:49*endragor_ quit (Ping timeout: 252 seconds)
14:28:08FromGitter<Bennyelg> @Yardanico thanks
14:28:14FromGitter<Bennyelg> this is what I was looking for
14:29:09*claudiuinberlin joined #nim
14:33:21*endragor joined #nim
14:37:27*endragor quit (Ping timeout: 240 seconds)
14:37:30Yardanicoguys, is there a way to get a seed for randomize() at compile-time? without system commands/files
14:38:10Yardanicomaybe we can add a new constant CompileTimestamp?
14:39:33Araqsystem.NimVersion
14:39:52Araqit changes to frequently that's good enough
14:40:00Araqso*
14:40:07YardanicoxD
14:40:17PMunchUpdated genui, now it's structured much nicer :)
14:40:27PMunchAnd I can begin implementing the DSL Yardanico ;)
14:40:32YardanicoPMunch, nice!
14:40:56YardanicoAraq, it's for this issue: https://github.com/nim-lang/Nim/issues/6424. It can be closed, but I don't know a way to get some seed which changes on every compilation
14:41:15*user0 quit (Quit: user0)
14:41:26Yardanicooh wait, it seems to be a random module issue
14:41:31*user0 joined #nim
14:41:32Yardanicoah, no
14:42:47PMunchHeading home now but would love some input on the DSL design, you had some good ideas when I was implementing it for NiGui :)
14:43:01PMunchI started dabling with it in the test2 file
14:43:37*libman joined #nim
14:45:21*miran_ joined #nim
14:45:24*Ven joined #nim
14:45:46*user0 quit (Client Quit)
14:45:48*Ven is now known as Guest84089
14:45:53dom96Yardanico: the labels beginning with 'S' are mainly for PRs
14:46:00*user0 joined #nim
14:46:04Yardanicodom96, ah, ok
14:47:22PMunchhttps://github.com/PMunch/genui/issues/1
14:47:33PMunchCreated an issue were we can discuss the design :)
14:47:42*PMunch quit (Quit: Leaving)
14:47:53skrylari would just throw the miglayout cheat sheet at you and call it done
14:54:21FromGitter<krux02> when I install an executable with nimble, how can I access resources like pictures and fonts?
14:54:26*smt joined #nim
14:55:24FromGitter<krux02> lets say my binary is in "~/.nimble/bin/bybin"
14:55:52FromGitter<krux02> and the resuorces are in "~/.nimble/pkgs/mylib-1.0.0/resources"
14:56:13FromGitter<krux02> how do I read platform independent from this folder?
14:58:11AraqI doubt it's possible. it's the /usr/bin problem which has no solution either
14:58:17Yardanicoyay, gcv2 is stable - https://github.com/nim-lang/Nim/commit/309838c6edc67b17e6366a0681db2875997ccd0d
14:58:32YardanicoAraq, will you eventually remove gc v1 ?
14:59:21FromGitter<krux02> that sucks
15:00:21FromGitter<krux02> well when there is no solution to this, I can generally eliminate nimble as a solution to distribute my library
15:03:22federico3krux02: the problem has been solved in Python, Ruby and most languages. Open a bug on nimble if needed
15:03:59dom96krux02: getAppFilename()
15:04:49dom96although hrm
15:05:03dom96I guess you need to query Nimble for the package's directory
15:05:03FromGitter<krux02> dom96: what is that supposed to help me
15:05:12federico3dom96: if you do that you are hardcoding in your code the assumption that the binary in installed in a given location relative to the other files
15:06:09FromGitter<krux02> if nimble would build the project with a flag like "-d:libdir=mylib-1.0.0" then it would be possible to recover the directory
15:07:03dom96that seems fragile to me
15:07:21dom96I'm curious how Python and others solve this problem
15:07:25federico3krux02: it should be discovered at runtime, so it's not hardcoded in the binary
15:07:58FromGitter<krux02> getAppDir / ".." / "pkgs" / libdir / resources
15:07:59federico3dom96: Python asks a library where the extra files are located
15:08:34dom96federico3: how?
15:08:37FromGitter<krux02> federico3: well actually it should be hardcoded in the binary
15:09:00FromGitter<krux02> because a binary is always build for exactly one version and not dynamic in any way
15:09:48dom96krux02: so you can just use `staticExec("nimble path yourpkg") / resources`
15:09:58federico3krux02: the location of the binary and the extra files should not be relevant
15:10:52FromGitter<krux02> federico well yes, it should not be
15:11:05federico3dom96: setuptools and pkg_resouces do that
15:11:34FromGitter<krux02> dom96: that seems fragile to me
15:11:56dom96it is
15:11:56FromGitter<krux02> staticExec("nimble path yourpkg" ) does not guarantee the same version
15:12:00dom96but that's what you want
15:12:09FromGitter<krux02> not really
15:12:45FromGitter<krux02> I want that my binary can be bundled with resources and that I have a secure way to access those resources
15:12:51dom96In the future you'll be able to script the build process in the .nimble file
15:12:58FromGitter<krux02> with secure I mean reliable
15:13:12FromGitter<krux02> I don't want to script the build process in the nimble file
15:13:48FromGitter<krux02> I just want a binary with resources attached to it
15:13:51FromGitter<krux02> nothing more
15:13:54FromGitter<krux02> very simple task
15:14:16FromGitter<krux02> coda and data distributed as a bundle
15:14:20*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
15:14:40federico3isn't there already a nimbledir env var that defaults to ~/.nimble ?
15:14:46Yardanicokrux02: embed resources in a binary :D
15:15:18dom96so you think Nimble should pass -d:jesterDir=~/.nimble/pkgs/jester-0.1.0 for each package when building?
15:15:28FromGitter<krux02> Yardanico yes if I want to explode my build time, then I will do it
15:15:37federico3urgh
15:15:53dom96What happens when someone moves their Nimble directory?
15:15:55FromGitter<krux02> dom96
15:15:58FromGitter<krux02> no I don't think so
15:16:07federico3that's why you should not hardcode it...
15:16:20federico3dom96: isn't there already a nimbledir env var that defaults to ~/.nimble ?
15:16:36FromGitter<krux02> I think it should onld define the path after "~/.nimble/pkgs/
15:16:56FromGitter<krux02> the other part depends on the environment and should not be passed as a compile time argument
15:16:56dom96federico3: no.
15:17:00federico3ouch
15:17:46dom96krux02: so -d:jesterDir=jester-0.1.0?
15:17:56dom96and then how will you get the Nimble dir?
15:18:14federico3then a basic implementation could be getPkgDataDir() that returns "~/.nimble/pkgs/<name>-<version>/extras/"
15:18:42FromGitter<krux02> getAppDir / ".." / "pkgs" / libdir / "resources"
15:18:46federico3the binary needs to hardcode its own package name and version and that's actually a good thing
15:19:22FromGitter<krux02> or ``getNimbleDir / "pkgs" / libdir / "resources"``
15:19:24dom96krux02: actually if you want to do that: just define a const in your .nim file
15:19:29dom96with the version of your package
15:20:00FromGitter<krux02> how do I do that with nimble?
15:20:02dom96then in your .nimble file write: import myPkgVersions; requires "myPkg " & myPkgVersions.myPkgVersion
15:20:28FromGitter<krux02> I am confused
15:20:36federico3dom96: if the package contains a call to "getPkgDataDir" it can bake in the version
15:21:00FromGitter<krux02> federico3: yes exactly, thank you
15:21:01FromGitter<Bennyelg> what is not ok with my example ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4ce5d210ac26920f21a1d]
15:21:33dom96federico3: and what is this "getPkgDataDir"?
15:21:45FromGitter<krux02> @Bennyelg: you concept uses an undefined identifier b
15:21:56federico3a simple helper that bakes in the name and version at build time but *not* the path
15:22:13federico3and discovers the path at runtime using getNimbleDir (and in future an env var)
15:22:36dom96ahh because the package knows its version
15:22:46federico3yup
15:23:10federico3so at runtime the user can move the binary and/or the nimbledir to any new location
15:23:11dom96Okay, no need to implement anything new in Nimble for that
15:23:13FromGitter<krux02> now you get it 
15:23:42federico3dom96: indeed - but adding a paragraph on the documentation perhaps ;)
15:24:19dom96sure.
15:24:23dom96PRs welcome :P
15:24:23*Senketsu joined #nim
15:24:29*Senketsu quit (Client Quit)
15:24:32*skrylar quit (Quit: Leaving)
15:24:39FromGitter<krux02> dom96: please implement that. It seems very easy to implement and it should provide a very important feature
15:24:49dom96implement what?
15:25:05FromGitter<Bennyelg> the only example in Doms book regarding concepts and it's not working :|
15:25:09FromGitter<krux02> waht federice3 just suggested
15:25:11FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4cf5701110b7231c1da35]
15:25:27FromGitter<krux02> I already make at lot of Nim PR and it is very time consuming to get into that codebase
15:25:34dom96krux02: You want me to add docs?
15:25:34FromGitter<krux02> and with nimble it is very similar
15:25:46dom96I feel like you're misunderstanding what federico3 suggested.
15:26:06FromGitter<Yardanico> @Bennyelg are you sure there's that example in the book?
15:26:16FromGitter<Bennyelg> why not just do that ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4cf9701110b7231c1db9c]
15:26:22FromGitter<Bennyelg> why do concepts ?
15:26:35dom96You put `proc getPkgDataDir*(): string = "pkg-" & pkgVer / "resources"`
15:26:39dom96into your package's source code
15:26:50FromGitter<Yardanico> @Bennyelg are you sure this example is in the book?
15:26:59federico3well the function should be in a library just for convenience
15:27:17FromGitter<krux02> @Bennyelg you never need concepts, you can always just use generics it is just for better error messages
15:27:29FromGitter<krux02> if you don't understand Concepts you won't miss out on anything
15:27:55*claudiuinberlin joined #nim
15:28:05FromGitter<Bennyelg> I'm on my learning phase now so I am trying anything Nims offer
15:28:10FromGitter<Bennyelg> @Yardanico yes Im sure
15:28:25Yardanicoah, found it
15:28:31FromGitter<krux02> @Bennyelg you concept should ony use a, not b
15:28:42Yardanicoyeah
15:28:44FromGitter<Bennyelg> I know
15:28:46FromGitter<krux02> you have a single type that can compare to itself
15:28:47FromGitter<Bennyelg> but it's not working
15:28:58Yardanicoyou changed it
15:29:00*nsf joined #nim
15:29:03Yardanicoplease re-read it in the book
15:29:07Yardanicoit's (a < a) in the book
15:29:10dom96yeah, I just looked at the book
15:29:12dom96It's different
15:29:34FromGitter<Bennyelg> you right it's a < a
15:30:25FromGitter<Bennyelg> i couldn't understand why it's not working. ⏎ this writing style is so strange. ⏎ why I check a < a
15:30:28FromGitter<Bennyelg> a is a
15:30:31FromGitter<Bennyelg> I cant get it
15:30:59FromGitter<krux02> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4d0b3f7299e8f53f4273e]
15:31:24*claudiuinberlin quit (Client Quit)
15:31:48FromGitter<krux02> You only have a single typo of concept Comparable and call that type T
15:32:03FromGitter<krux02> then both argument are of that same type as well as the result
15:32:38FromGitter<krux02> Concepts should restrict the types allowed for a generic
15:32:51FromGitter<Bennyelg> yea the example in the book itself not wokring ⏎ ⏎ proc getMax(a, b :Comperable): Comperable = ⏎ ... [https://gitter.im/nim-lang/Nim?at=59e4d123f7299e8f53f429a9]
15:33:00*d10n-work joined #nim
15:33:02FromGitter<krux02> oh
15:33:05FromGitter<krux02> yea that is a problem
15:33:25FromGitter<krux02> That is a bug I guess
15:33:28*claudiuinberlin joined #nim
15:33:36FromGitter<Bennyelg> book example is not align with the nim version any more or it's just typo
15:33:55FromGitter<krux02> I don't know I don't have the book next to me
15:36:21FromGitter<Yardanico> @Bennyelg what example you're referring to?
15:36:30FromGitter<Yardanico> ```code paste, see link``` ⏎ ⏎ Works [https://gitter.im/nim-lang/Nim?at=59e4d1fe177fb9fe7e863ef8]
15:36:46dom96yep, doesn't work
15:37:40FromGitter<Bennyelg> lol now it's work
15:37:44FromGitter<Bennyelg> I dont get it anymore
15:37:45FromGitter<Bennyelg> :D
15:38:34FromGitter<Bennyelg> no
15:38:44FromGitter<Bennyelg> @Yardanico change the name of you proc
15:38:47FromGitter<Bennyelg> to what ever you want
15:38:49FromGitter<Bennyelg> and try
15:38:51FromGitter<Bennyelg>
15:38:54Yardanicoah
15:38:58FromGitter<Bennyelg> :D *
15:39:01Yardanicoseems to be a regression
15:39:02Yardanicocc Araq :)
15:39:04FromGitter<Bennyelg> this is strange
15:39:28YardanicoAraq, is this supposed to work? https://gist.github.com/Yardanico/62b62f39c4c7f7a17d367bb5d3cacf3d
15:39:50dom96weird
15:39:51FromGitter<Bennyelg> only if you change it to max :D
15:40:26dom96but then you're probably just calling the 'max' stdlib proc...
15:40:30FromGitter<Bennyelg> or if you do this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e4d2ed177fb9fe7e86448c]
15:40:33dom96please report this as a bug
15:41:09FromGitter<Bennyelg> I want to fix it, it's time for me to add my first contribution to the nim community
15:41:17FromGitter<Bennyelg> Start hint me what to do LOL
15:41:34Yardanicoit's one of the most complicated things in nim compiler
15:41:37Yardanicoconcepts
15:41:49FromGitter<Bennyelg> :) I''l report it than
15:42:08FromGitter<Bennyelg> you always welcome to push me a "Easy" missions to build my strength
15:42:26Yardanicomaybe it's not valid to return a variable of a type Comparable?
15:42:27Yardanicoah
15:42:29Yardanicoprobably it is
15:42:41Yardanicoyeah
15:42:59Yardanicodom96, I think this code is invalid because Comparable (return type) is not a concrete type
15:43:12Yardanicoyou should use generics + concepts here to make it work, as Bennyelg suggested
15:43:17FromGitter<Bennyelg> Maybe, so you need to "cast" it
15:43:35Yardanicoprobably it was a bug that this worked before
15:43:48Yardanicoso e.g. something like this: https://gist.github.com/Yardanico/2d5c1dd444918ec34a43929cfa2c9a87
15:43:50dom96well, it's in my book so it must have worked at some point
15:43:55Yardanicoyeah
15:44:27dom96and it makes sense for that to work IMO
15:44:33FromGitter<Bennyelg> Yea, but it's good its not working
15:45:05FromGitter<Bennyelg> because its drive me insane, @Yardanico looks far more readable
15:47:02FromGitter<Bennyelg> this is also working
15:47:09FromGitter<Bennyelg> ```proc x[T](a, b: T): Comparable = ⏎ if a < b: ⏎ return b ⏎ return a ``` [https://gitter.im/nim-lang/Nim?at=59e4d47c614889d475c025b0]
15:47:23TjYocoIs it part of Nim's style to use `self: T` on objects or are you supposed to use a more descriptive name?
15:47:31Yardanicoit's only for generics
15:47:36YardanicoBennyelg: oh
15:47:37TjYocoIn procs I mean
15:47:41Yardanicothen I have no clue
15:47:50YardanicoTjYoco, no, I dont' think so
15:48:09Yardanicoyou can always use "using" thing to make your proc declarations shorter
15:48:09FromGitter<Bennyelg> If my newest example is also working than its a bug.
15:48:27miran_another beginner question: how do i process nested json? is there some working example somewhere available?
15:48:36Yardanicomiran_, what do you mean by process?
15:48:58miran_i want to extract some values
15:49:20Yardanicomiran_, myjsonobj["somefield"]["someanotherfield"]
15:49:36Yardanicomyjsonobj["somefield"]["someanotherfield"].getBool()
15:49:44Yardanicomyjsonobj["somefield"]["someanotherfield"].getBVal() if you're on 0.17.2
15:50:13miran_i don't have `somefield` names, i should iterate through them...
15:50:24miran_it is AoC task, of course :)
15:50:38Yardanicoah, you mean you have actualy json fields and you don't know names of them?
15:50:46Yardanicohttps://nim-lang.org/docs/json.html#getFields
15:50:57miran_i can share the json file
15:51:15YardanicoI think getFields would work for your use-case
15:51:22miran_i started with `getfields`, but didn't get much further than that
15:52:13*Trustable joined #nim
15:52:34miran_with `getFields` i get a nested table. so i have to do it recursively until i come to the values?
15:53:17Yardanicoyeah, you just check kind of current field
15:53:28Yardanicoif it's a JObject - iterate over it
15:53:32*couven92 quit (Quit: Client disconnecting)
15:53:37Yardanicootherwise you have an actual value
15:54:30FromGitter<krux02> dom96: I actually try at the moment to fix nimple to give each executable it builds a define with the directoryname that is used in the .nimble/pkgs/ folder
15:54:41FromGitter<krux02> but I am sorry I don't understand that codebase
15:55:20dom96Why are you trying to do this?
15:55:20FromGitter<krux02> for you it would probably be just a single line that you have to write for me it is 100s of lines that I have to read and understand
15:55:48FromGitter<krux02> didn't you just say pull requests are welcome when we were talking about exactly that?
15:55:50dom96No changes to Nimble are necessary from what I understand.
15:56:08dom96federico3 suggested a solution
15:56:14FromGitter<krux02> yes he did
15:56:20dom96it requires no changes to Nimble
15:56:37FromGitter<krux02> ???
15:56:43FromGitter<krux02> then how do I do it?
15:56:47*abeaumont quit (Ping timeout: 248 seconds)
15:57:10FromGitter<krux02> to be honest I don't know a lot about nimble
15:58:18miran_thanks Yardanico, i'll try this what you've said
15:58:35dom96krux02: https://irclogs.nim-lang.org/16-10-2017.html#15:26:35
15:59:11dom96Your package knows its version
15:59:19dom96so it can provide that procedure for all software that uses it
15:59:31*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:01:15*user0 quit (Quit: user0)
16:01:28FromGitter<krux02> `proc getPkgDataDir*(): string = "pkg-" & pkgVer / "resources"`
16:01:29*user0 joined #nim
16:01:41FromGitter<krux02> undeclared identifier: 'pkgVer'
16:02:34dom96let pkgVer = "0.1.0"
16:02:37dom96or const
16:02:39Yardanicodom96, https://github.com/nim-lang/Nim/issues/5506 is easy to do, but what should be the error message?
16:02:44dom96Just hardcode this
16:02:53FromGitter<krux02> args
16:02:55FromGitter<krux02> :(
16:03:00FromGitter<krux02> :'(
16:03:07dom96If you want to get rid of the duplication you can import the module that defines it in your .nimble file
16:03:17*claudiuinberlin joined #nim
16:03:35FromGitter<krux02> really you are making it harder that it needs to be
16:03:47FromGitter<vindarel> Hello there, little question on a Nimble error: I get "Could not read package info file in /tmp/[… ] reading as ini file failed with [blah] Error: system module needs 'string'". Does that look familiar ? On Nimble v0.8.8 and Nim compiler v0.17.2. I ran "nimble install nimquery". Thanks !
16:04:08dom96vindarel: how did you install Nim?
16:04:17FromGitter<krux02> what is so bad about nimble providing by default a compilation flag that tells the library what version it is?
16:04:27FromGitter<krux02> nimble know the version?
16:04:44FromGitter<vindarel> with choosenim.
16:04:44FromGitter<krux02> the application should know it, too
16:04:54*claudiuinberlin quit (Client Quit)
16:04:56FromGitter<krux02> why not providing a default way to do it?
16:05:35dom96krux02: because you can do it without the need for Nimble to provide this
16:05:44dom96And there are in fact multiple solutions
16:05:47*user0 quit (Client Quit)
16:06:00*user0 joined #nim
16:06:31dom96vindarel: that's very strange
16:06:56dom96krux02: but okay, let's add it
16:07:03FromGitter<krux02> nimble uses the function "weiredMagic" to generate the folder name in the "pkgs" folder, please understand me, if I don't want to reimplement the function weirdMagic from nimble into my library
16:07:58FromGitter<vindarel> @dom96 may it be an old init file ? I installed Nim 0.16 (also with choosenim) a few months ago. And if it's strange I can open a github issue, for reference.
16:07:58*yglukhov quit (Remote host closed the connection)
16:08:04dom96krux02: Here is the relevant code, think you can take it from there? https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L229
16:08:27dom96hrm, wait
16:09:05dom96You'll need access to the deps, so you'll need to do it here https://github.com/nim-lang/nimble/blob/master/src/nimble.nim#L356
16:09:54*Arrrr joined #nim
16:09:54*Arrrr quit (Changing host)
16:09:54*Arrrr joined #nim
16:09:55dom96vindarel: and Nimble works with 0.16.0?
16:10:25Yardanicovindarel: but please open it in the choosenim repo :)
16:10:30dom96vindarel: but yeah, please submit an issue. If you could zip up your ~/.nimble and ~/.choosenim and attach it
16:11:20Yardanicobecause often people open website/choosenim related issues in main nim repo :)
16:13:30FromGitter<vindarel> ok I'll do that. Nimble has worked (will downgrade and tell you but rather no). I had this same error when trying Karax, then upgraded to the latest Nim and it worked. Now I want to install another lib, and same pb. I'll open the issue at the right place :) regards
16:14:14Yardanicoyou can also try to fully uninstall choosenim and bim
16:14:16Yardanico*nim
16:14:18Yardanicoand reinstall it
16:14:36*ShalokShalom_ is now known as ShalokShalom
16:16:01*Guest84089 quit (Ping timeout: 240 seconds)
16:17:49*ofelas joined #nim
16:18:41*Ven joined #nim
16:19:04*Ven is now known as Guest49263
16:22:51FromGitter<Yardanico> https://josjong.com/2017/10/16/null-vs-empty-strings-why-oracle-was-right-and-apple-is-not/
16:29:59FromGitter<vindarel> @Yardanico you'r right, and it helped. So I deleted ~/.nimble and re-installed choosenim. It began with Nim 0.16. Installing a lib failed, upgrading to Nim 0.17.2 (which was instantaneous, looks like there is a hidden cached version somewhere) made installing my lib ok.
16:32:15*Guest49263 quit (Ping timeout: 258 seconds)
16:33:24FromGitter<brentp> anyone know of an interval tree package in nim?
16:33:58FromGitter<krux02> how do I use the --define flag in nim when I acutally want to assigne it a value?
16:34:16FromGitter<krux02> when defined(mysym): echo mysym
16:34:30FromGitter<krux02> error: undeclared identifier 'mysym'
16:34:40FromGitter<krux02> I just checked if it is defined, but it is still undeclared
16:34:48FromGitter<krux02> so how do I use it?
16:36:57Arrrrthere is a special pragma for that
16:37:46*Ven joined #nim
16:38:09*Ven is now known as Guest48109
16:38:14FromGitter<krux02> ah I found it
16:38:16FromGitter<krux02> thanks
16:39:57*claudiuinberlin joined #nim
16:40:12*claudiuinberlin quit (Client Quit)
16:51:54*nsf quit (Quit: WeeChat 1.9)
16:53:18*yglukhov joined #nim
16:58:02*yglukhov quit (Ping timeout: 255 seconds)
16:58:48*UxerUospr quit (Ping timeout: 240 seconds)
17:01:34*Guest48109 quit (Ping timeout: 264 seconds)
17:05:44*lastjedi joined #nim
17:10:40shashlickcan a nim program load a nimble script at runtime? as a configuration file of sorts?
17:10:57Yardanicoshashlick, not nimble, but nimscript - yes
17:11:13Yardanicoif it's what you want
17:11:44Yardanicoshashlick, https://github.com/Serenitor/embeddedNimScript
17:11:49Yardanicosorry for bold text
17:12:48shashlickYardanico: thanks will check out
17:13:13Yardanicoyou can for example return a table from your nimscript to your program
17:13:17Yardanicobut your program would be a bit too big
17:13:28Yardanicobecause it would include some parts of the compiler including VM
17:13:46shashlickdom96: I used gorge() in the {.passC.} declaration and have gotten the include headers to work
17:13:51Yardanicoshashlick, maybe you can try parsecfg or nimyaml or parsetoml?
17:13:57Yardanicoparsecfg is in stdlib
17:14:19FromGitter<krux02> dom96: my approach to fix nimble failed, when I use the compilation parameter, then a library never knows it's own package folder name, only the package folder name of the package that the library is being built for
17:14:25shashlickYardanico: I see - might not be worth it - I'm using the parsecfg for now but since the lib needs a nimble file too, figured I could use it for the cfg parameters too
17:14:42Yardanicoshashlick, well I don't think you can do that with a nimble file at runtime
17:14:49Yardaniconimble files are meant for compile-time only
17:14:57Yardanicoand with parsecfg you can read some config at runtime
17:15:29shashlickmakes sense, trying to oversimplify
17:17:52shashlickcan't you write files in nimscript?
17:17:57Yardanicoyou can
17:18:16Yardanicoso you can use https://github.com/Serenitor/embeddedNimScript to interpret nimscript with your program at runtime
17:19:41ldleworkneat
17:28:32*yglukhov joined #nim
17:28:39Yardanicobah
17:28:44Yardanicoappveyor time limit again
17:28:53Yardanicoon all recent commits
17:29:08Yardanicooh wait, our tests are failing :P
17:30:25Yardanicoit doesn't even compile - https://ci.appveyor.com/project/dom96/nim/build/539
17:31:15*user0 quit (Quit: user0)
17:31:32*user0 joined #nim
17:32:57*gmpreussner quit (Ping timeout: 240 seconds)
17:33:10*Trustable quit (Remote host closed the connection)
17:33:14*Demos joined #nim
17:35:09*gmpreussner joined #nim
17:35:46*user0 quit (Client Quit)
17:36:01*user0 joined #nim
17:39:28Araqhttp://www.strawpoll.me/14163114
17:40:40YardanicoAraq, wow, streaming every day? you're a god
17:40:44*lastjedi quit (Quit: Leaving)
17:41:02Araqit's a poll about the next topic
17:41:09YardanicoAraq, well anyway
17:41:21*lastjedi joined #nim
17:43:17*claudiuinberlin joined #nim
17:45:38*firstjedi joined #nim
17:45:45*lastjedi quit (Client Quit)
17:46:01*firstjedi quit (Remote host closed the connection)
17:46:22*lastjedi joined #nim
17:47:18*lastjedi quit (Client Quit)
17:47:33*lastjedi joined #nim
17:48:17YardanicoAraq, is there an estimated day of the next stream?
17:49:19Araqmaybe today
17:53:50ArrrrAre those streams recorded?
17:54:26YardanicoArrrr, yes, but AFAIK Araq has uploaded them yet
17:54:28Yardanico*hasn't
17:54:37Arrrrwere
17:54:41Arrrr*where
17:54:42Arrrrok
17:56:14ArrrrI'm out of the loop
17:56:47shashlickhow do you get the pkgname within a Nimble script?
18:05:23*abeaumont joined #nim
18:07:37Araqshashlick: 'pkgname' is a variable you can access iirc
18:11:53Araqlol poor guy who keeps asking for state machines
18:13:20YardanicoAraq, xD
18:13:40YardanicoI think you will eventually have only 1 topic - state machines for game programming
18:13:49Yardanico(only one topic for a poll)
18:14:01AraqI think I might do that first as it looks "really really simple"
18:14:12Araqand you know the saying, "if it looks simple, it's hard"
18:14:23Araq"if it looks hard, it's almost impossible"
18:20:53*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
18:21:48*claudiuinberlin joined #nim
18:24:33Yardanicooh no
18:24:44Yardanicoapplication development with Karax and Ormin has almost the same number of votes as destructors :P
18:27:35Yardanico``nil`` strings are equal to empty strings. yay!
18:28:24*UxerUospr joined #nim
18:29:49*nsf joined #nim
18:32:23Yardanicois this valid "Constants cannot be of type ptr, ref, var or object, nor can they contain such a type."?
18:32:30YardanicoI think that constants can be of type "object"
18:34:30Araqtrue
18:34:35FromGitter<Bennyelg> well it's a girl
18:35:01FromGitter<Bennyelg> I'm going to be a father to girl :D I wanted a boy nimmer
18:35:04Araqcongratulations!
18:35:26ArrrrCongrats my friend. You got a girl nimmer
18:35:41Yardanicocongrats!!
18:35:42FromGitter<Bennyelg> heheh I wish
18:36:04FromGitter<Bennyelg> Thanks all
18:36:11Araqwe need more programmer girls
18:36:21FromGitter<Bennyelg> I know
18:36:26Araqwhy should only the boys suffer all the time, right?
18:36:35FromGitter<Bennyelg> I'll send her to Nim Confereance 2030
18:36:42FromGitter<Bennyelg> Conference
18:36:56Araqthat will be in Tokio
18:37:19FromGitter<Bennyelg> Wow So I'm In too
18:37:22FromGitter<Bennyelg> ;]
18:39:03YardanicoAraq, so can I just remove "or object" there ?
18:39:12Araqyep
18:39:20Araqbut case objects are still not supported
18:39:31FromGitter<Bennyelg> @Yardanico what about what we spoke earlier about the Concept & Comperable
18:39:35FromGitter<Bennyelg> is it a bug? right ?
18:40:25Yardanicoyou can post an issue
18:40:54FromGitter<Bennyelg> I''ll create on
18:43:19*sleepyqt quit (Quit: Leaving)
18:45:42Araqbtw can we change the master/devel roles slightly?
18:45:54YardanicoAraq, how exactly?
18:46:01Araqwhen the tests are green, changes should be merged from devel to master automatically
18:46:35Yardanicothat's nice, but is there any services for this? or we'll need to have our custom webhook
18:46:46Yardanicobut I like this change
18:46:57Araqwell not sure how this "automatically" can be implemented
18:48:09Yardanicogithub api for merging stuff
18:48:18Yardanicotravis has notifications on build success
18:48:25Yardanicobut they're only sent to slack, email and IRC
18:49:02FromGitter<Bennyelg> https://github.com/nim-lang/Nim/issues/6521
18:50:38Yardanicooh wait
18:50:44YardanicoAraq, we are lucky - https://developer.github.com/v3/activity/events/types/#statusevent
18:51:15*user0 quit (Quit: user0)
18:51:18dom96I'm sure there is a tool that does this
18:51:30*user0 joined #nim
18:51:38Araqwhat's the difference between на and в?
18:52:02YardanicoAraq, "на" means "on", on a table, on the floor (на столу, на полу)
18:52:25Yardanico"в" means "in", in the house - в доме
18:52:37Araqok that's simpler than I thought then
18:52:49dom96"Na stole"? :)
18:53:00Yardanicoyeah
18:53:00Araq"stolu"
18:53:02FromGitter<Bennyelg> @Araq do you plan any Conference soon ?
18:53:09dom96I just translated it to Polish heh
18:53:18Yardanicowell "на столе" is gramatically correct
18:53:23Yardanicobut sometimes people say "на столу'
18:53:37YardanicoAraq, http://masterrussian.com/vocabulary/na_preposition.htm for "na"
18:53:46Yardanicoand for "в" - http://masterrussian.com/vocabulary/v_preposition.htm
18:53:47FromGitter<Bennyelg> Doulingo
18:54:08FromGitter<Bennyelg> Moscow Svaniatka lakala Moscow Rodina maya :P
18:55:06AraqBennyelg: not really, any suggestions?
18:55:38FromGitter<Bennyelg> Amsterdam ? :P ⏎ I dont care where I'm In. ⏎ and you are always invited to israel
18:55:46*user0 quit (Client Quit)
18:56:00*user0 joined #nim
18:56:06FromGitter<Bennyelg> Yardanico where you live in russia?
18:56:35FromGitter<mratsim> Remember my question this morning about nimsuggest not seeing optional modules gated by `when defined(cuda): import ./tensor_cuda` is there something instead to do `when not defined(cuda): unimportant ./tensor_cuda` ?
18:57:06FromGitter<Bennyelg> If you would like @Araq I can speak to my boss in my company to invite you come and introduce Nim.
18:58:26*Ven joined #nim
18:58:49*Ven is now known as Guest97114
19:00:00Araqmratsim: nimsuggest reads the .nim.cfg files
19:00:12Araqbennyelg: which country?
19:00:23FromGitter<Bennyelg> Israel :D
19:00:47FromGitter<Bennyelg> Gettaxi Is like Uber but samller, we work on UK, RUSSIA & Israel
19:01:04Araqok
19:01:12*couven92 joined #nim
19:02:08FromGitter<Bennyelg> So Should I talk to him ?
19:02:27FromGitter<Bennyelg> I'll try to see if it's an option
19:03:49Araqsure
19:04:27*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:05:06*gangstacat quit (Quit: Ĝis!)
19:06:03FromGitter<stisa> @mratsim I think you can use `when defined nimcheck` if you are using vscode, or you could hack nimsuggest to define nimssugest
19:06:55*claudiuinberlin joined #nim
19:07:37YardanicoBennyelg: http://goo.gl/4s5jpW
19:07:44YardanicoI live there
19:08:14FromGitter<mratsim> @stisa right I can use a hack like that
19:08:32Yardanicomy town is next to Kazan
19:08:44*Guest97114 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
19:08:46Yardanicoonly ~40km to Kazan
19:10:31YardanicoBennyelg: you work at Getttaxi?
19:11:59*gangstacat joined #nim
19:13:55FromGitter<mratsim> @Araq I'm developing on VScode on a Mac without Cuda and syncing with a server with GPU, so I want to avoid having to modify nim.cfg before each compilation
19:18:42*Demos quit (Read error: Connection reset by peer)
19:20:44FromGitter<Bennyelg> Ya I work on gettaxi
19:22:10FromGitter<Bennyelg> Uber yandex are strong in your region
19:22:40FromGitter<Bennyelg> @Yardanico
19:22:46Yardanicoyeah they are
19:23:19FromGitter<Bennyelg> I know
19:23:42Yardanicobut I don't use them anyway, I don't really know if they're available in my town :P
19:23:55FromGitter<Bennyelg> Gettaxi yes
19:24:04FromGitter<Bennyelg> At least In kazan they are
19:24:36FromGitter<Bennyelg> Im big data developer their so I came across the data heheh
19:28:07*Laon joined #nim
19:31:43*Laon89 joined #nim
19:32:43*Laon quit (Ping timeout: 252 seconds)
19:37:06Yardanicoif someone didn't vote yet - vote for the next topic on Araq's stream - http://www.strawpoll.me/14163114
19:38:11FromGitter<Bennyelg> tomorrow?
19:38:27YardanicoI don't know, maybe today, maybe tomorrow
19:44:36*ofelas quit (Quit: shutdown -h now)
19:48:26FromGitter<Bennyelg> i can't do this? ⏎ echo("Failed on try: NO# 1$, because: $2" % [i.intToStr, $err.msg])
19:48:36FromGitter<Bennyelg> import strutils of course
19:48:54Yardanicobtw,
19:48:57Yardanicodon't use intToStr
19:49:02Yardanicojust use $i
19:49:05*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
19:49:14FromGitter<Bennyelg> I did, what is the different between them?
19:49:57FromGitter<Bennyelg> strutils.nim % ⏎ strutils.nim addf ⏎ strutils.nim invalidFormatString ⏎ Error: unhandled exception: invalid format string [ValueError] [https://gitter.im/nim-lang/Nim?at=59e50d65b20c6424290dc753]
19:50:07Yardanicoyou can generate "00001" for int 1 with intToStr(1, 5)
19:50:27FromGitter<Bennyelg> echo("Failed on try: NO# 1$, because: $2" % [$i, err.msg])
19:50:52FromGitter<Yardanico> "1$"
19:50:56FromGitter<Yardanico> it should be "$1"
19:51:11FromGitter<Bennyelg> Thanks!
19:52:56*Vladar quit (Remote host closed the connection)
20:00:05FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e50fc401110b7231c36ae6]
20:00:11FromGitter<Bennyelg> this is why I freaking love nim.
20:00:33FromGitter<Yardanico> you also don't need to specify numberOfTimes and sleepTimeInSec
20:00:37FromGitter<Yardanico> just retry(5, 5)
20:00:46FromGitter<Bennyelg> I know I'ts just for readability
20:03:18FromGitter<Yardanico> also it should be sleepTimeInSec * 1000
20:03:24FromGitter<Yardanico> because 1 second is 1000 ms :)
20:03:30FromGitter<Bennyelg> yea I misplled it
20:06:37*Laon joined #nim
20:09:01*Laon89 quit (Ping timeout: 252 seconds)
20:18:45*Jesin quit (Quit: Leaving)
20:20:17*Jesin joined #nim
20:20:20FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5148332e080696eea8d84]
20:20:37FromGitter<Bennyelg> little help with Option[person] which means I dont always will get a result?
20:21:46FromGitter<Yardanico> @Bennyelg https://nim-lang.org/docs/options.html
20:22:47FromGitter<Yardanico> you should return some(person)
20:23:05FromGitter<Bennyelg> proc `[]`*(persons: seq[Person], pName: string): Option[Person] = ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e51529614889d475c1b47a]
20:23:06FromGitter<Bennyelg> thanks
20:23:09FromGitter<Bennyelg> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59e5152de44c43700a3f114f]
20:23:11FromGitter<Bennyelg> :)
20:23:29FromGitter<Yardanico> and you don't need none(Person)
20:23:31FromGitter<Yardanico> it's optional :)
20:23:56FromGitter<Bennyelg> oh, brilliant I'm always inspired & get surprised more
20:24:48Yardanicowell in some places nim requires you to be explicit
20:24:57Yardanicoe.g. with async procedures you should write Future[mytype] as return type
20:25:12Yardanicobut this can be actually made to be implicit - macro can change proc definition
20:25:25Yardanicoso in this case it's optional
20:25:29YardanicoOption(al)
20:25:33FromGitter<Bennyelg> Ya, I save macros to the end because this is pretty hard subject
20:33:42*Ven joined #nim
20:34:06*Ven is now known as Guest35881
20:34:21*Arrrr quit (Read error: Connection reset by peer)
20:37:07shashlickAraq: I tried echo pkgname and it doesn't work within a .nimble file. echo version works. However, I'm only setting version and not pkgname since it wasn't mentioned in the docs to be set
20:37:48Yardanicoshashlick, are you sure it wasn't?
20:38:09Yardanicoah yes
20:38:14Yardanicoit's not :P
20:38:31shashlicki presume nimble deciphers it from the nimble file name
20:39:28Araqoh yeah right
20:39:40Araqso ... your script should know the name :P
20:41:00shashlick it doesn't so not quite sure what to do other than hard code
20:41:24*Nobabs27 joined #nim
20:42:43YardanicoAraq, I assume you will not stream today?
20:54:09FromGitter<hcorion> what platform does Araq stream to?
20:54:58FromGitter<mratsim> twitch
20:55:03FromGitter<hcorion> link?
20:55:14*miran_ quit (Quit: Leaving)
20:55:59*Guest35881 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:57:04Yardanicohttps://go.twitch.tv/araq4k
20:57:08Yardanicobut he doesn't stream now
21:00:08*Laon89 joined #nim
21:00:57*Laon quit (Ping timeout: 240 seconds)
21:02:41Araqsorry no
21:05:49YardanicoAraq, just save this poll link for tomorrow :)
21:06:15*user0 quit (Quit: user0)
21:08:42*user0 joined #nim
21:10:07*derlafff quit (Ping timeout: 255 seconds)
21:10:46*user0 quit (Client Quit)
21:11:01*user0 joined #nim
21:13:27*lastjedi quit (Ping timeout: 260 seconds)
21:19:58*Laon89 quit (Ping timeout: 252 seconds)
21:24:46*fauzi joined #nim
21:26:04*fauzi left #nim (#nim)
21:32:09*couven92 quit (Quit: Client Disconnecting)
21:37:27*yglukhov quit (Remote host closed the connection)
21:40:35*derlafff joined #nim
21:45:01*dhalinar joined #nim
21:47:28*derlafff quit (Ping timeout: 255 seconds)
21:55:20*derlafff joined #nim
22:00:21*kafke joined #nim
22:03:48*nsf quit (Quit: WeeChat 1.9)
22:17:02FromGitter<zacharycarter> o/
22:18:28Yardanicohi
22:18:34Yardanicoit's 01:18 am here
22:19:20FromGitter<zacharycarter> late
22:19:23FromGitter<zacharycarter> I'm about to start modeling again
22:24:52*JappleAck quit (Ping timeout: 252 seconds)
22:29:22*def-pri-pub joined #nim
22:30:18*SusWombat quit (Remote host closed the connection)
22:31:16FromGitter<mratsim> @Araq, I think the mutable iterator in C++ issue is not completely solved ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ bug report coming tomorrow when I have a test case with seqs [https://gitter.im/nim-lang/Nim?at=59e53334177fb9fe7e88965c]
22:37:35*JappleAck joined #nim
22:37:58*yglukhov joined #nim
22:42:27*yglukhov quit (Ping timeout: 240 seconds)
22:42:37FromGitter<Yardanico> @mratsim btw, nimsuggest doesn't check for errors
22:42:40FromGitter<Yardanico> "nim check" does
22:47:42Yardanicodom96, probably you're not here, but I think I know why you didn't spot that your concepts example is wrong
22:48:12Yardanicosimply because it executed built-in "max" procedure, and not yours :) so that's why it "worked", it "works" the exact same way now
22:48:52Yardanicoyou can already know that because nim check says that our "max" proc isn't used
22:50:27*dhalinar quit (Ping timeout: 240 seconds)
22:51:12Yardanicoprobably you don't use concepts very often :) I think most of us doesn't :D
22:56:09Yardanicodom96, also this vscode extension can be helpful for twitch - https://marketplace.visualstudio.com/items?itemName=irth.twitchlint
23:04:33*kafke quit (Ping timeout: 248 seconds)
23:05:58*arnetheduck joined #nim
23:06:34FromGitter<mratsim> This morning we were talking about list comprehension, this is quite another way to do it: https://forum.nim-lang.org/t/2223
23:07:58Yardanicothat's actually a nice way
23:08:21Yardanicobtw I tested now how good can I stream on twitch, and the quality is pretty good - https://go.twitch.tv/yardanico
23:08:48*kafke_ joined #nim
23:09:03Yardanicoit's also because I have Nvidia GPU
23:09:40Yardanicoso I can use NVENC for video encoding in OBS studio (on linux)
23:10:45*TjYoco quit (Quit: Leaving)
23:11:09Yardanicomratsim: yeah, the whole implementation is only ~100 lines
23:11:21Yardanicohttps://gist.github.com/Yardanico/3ec5b9a83421a3de5d220dde66a6ee63
23:14:48*Yardanico quit (Remote host closed the connection)
23:17:23*def-pri-pub quit (Quit: Leaving.)
23:33:48*dhalinar joined #nim
23:38:42*ryanhowe joined #nim
23:45:59*zolk3ri quit (Quit: Lost terminal)
23:48:29*JappleAck quit (Ping timeout: 258 seconds)
23:50:24*ryanhowe quit (Read error: Connection reset by peer)
23:50:28*def-pri-pub joined #nim
23:50:38*def-pri-pub quit (Client Quit)
23:54:41*voiceftp quit (Quit: Leaving)
23:57:27*ipjk quit (Quit: Leaving)