<< 17-09-2017 >>

00:01:08*shaiekx quit (Quit: Leaving)
00:04:48*crem quit (Ping timeout: 240 seconds)
00:07:09*crem joined #nim
00:29:23*yglukhov joined #nim
00:35:13*yglukhov quit (Ping timeout: 248 seconds)
00:54:22*Nobabs27 joined #nim
01:12:23*def-pri-pub quit (Ping timeout: 240 seconds)
01:15:02*arnetheduck quit (Ping timeout: 260 seconds)
01:19:19*arnetheduck joined #nim
01:25:46*TjYoco quit (Quit: Leaving)
02:00:36*chemist69 quit (Ping timeout: 252 seconds)
02:05:57FromGitter<zacharycarter> def-pri-pub: I'm assuming you're trying to get the sphere to rotate?
02:14:06*chemist69 joined #nim
02:17:28FromGitter<zacharycarter> def-pri-pub: I need to make a commit and then I have an example for you, lmk when you're around please
02:20:55FromGitter<zacharycarter> I'm digging theses spaceships
02:21:21FromGitter<zacharycarter> (https://files.gitter.im/nim-lang/Nim/ksLd/Screen-Shot-2017-09-16-at-10.20.45-PM.png)
02:32:58*yglukhov joined #nim
02:37:34*yglukhov quit (Ping timeout: 264 seconds)
02:37:35*nkr joined #nim
02:37:52*nkr left #nim ("Leaving")
02:40:06FromGitter<zacharycarter> https://github.com/zacharycarter/nimrl
02:55:38*def-pri-pub joined #nim
02:55:38*def-pri-pub quit (Changing host)
02:55:38*def-pri-pub joined #nim
03:08:42*relax joined #nim
03:16:48def-pri-pubzacharycarter: have you been able to take a look at that one thing yet?
03:26:08FromGitter<zacharycarter> yup
03:26:18FromGitter<zacharycarter> def-pri-pub: I'm going to push up a commit
03:27:45FromGitter<zacharycarter> def-pri-pub: please see the latest commit
03:29:46*Jesin quit (Quit: Leaving)
03:35:40*def-pri-pub quit (Quit: leaving)
04:10:02*relax quit (Ping timeout: 260 seconds)
04:33:39*rauss quit (Read error: Connection reset by peer)
04:42:16*Nobabs27 quit (Quit: Leaving)
05:03:27*kier quit (Quit: No Ping reply in 180 seconds.)
05:08:52*kier joined #nim
05:20:48*endragor joined #nim
05:36:59*hcorion joined #nim
05:37:44hcorionHey all, I'm having trouble, I want to set a const public variable, but have it behind an if, else statement
05:38:22hcorionbut it complains that 'export is only allowed at top level'
05:41:27hcorionThe if statement is just checking if the cpuEndian == bigEndian
05:41:36def-hi hcorion
05:41:43def-make that a compile-time "when" instead of "if"
05:41:50hcorionahh, thanks
05:41:58FromGitter<Bennyelg> GOod Morning all
05:42:16FromGitter<Bennyelg> I'm starting to dream on nim at night 
05:42:52hcorionAlso, how might I add a pointer to a function in say, an object?
05:43:21def-funcPointer: proc(x: int): string
05:43:30def-and then foo.funcPointer = myFunc
05:44:03hcorionAwesome, thanks a ton @def-
05:46:51*Sembei joined #nim
05:48:58*Pisuke quit (Ping timeout: 264 seconds)
05:59:23*endragor quit (Remote host closed the connection)
06:02:38*miran joined #nim
06:06:03*endragor joined #nim
06:21:36*gokr joined #nim
06:23:24*Yardanico joined #nim
06:25:15*kang0 joined #nim
06:26:50*jsgrant quit (Ping timeout: 246 seconds)
06:27:24*solitudesf joined #nim
06:29:54*Arrrr joined #nim
06:29:54*Arrrr quit (Changing host)
06:29:54*Arrrr joined #nim
06:29:55*kang0 quit (Read error: Connection reset by peer)
06:32:44*endragor_ joined #nim
06:36:23*Sentreen quit (Ping timeout: 240 seconds)
06:36:58*endragor quit (Ping timeout: 264 seconds)
06:43:08*kang0 joined #nim
06:44:39*haha_ joined #nim
06:46:41*kang0 quit (Client Quit)
06:48:30Araqhttps://github.com/nim-lang/Nim/issues/6393 who wants to give it a shot?
06:48:45AraqI guide you.
06:49:26*Sentreen joined #nim
06:49:46YardanicoAraq, btw, maybe I'm wrong, but I think there's an issue like this already
06:49:57Yardanicoit's hard to search for it though
06:52:56Yardanicoah, no
06:53:07Yardanicobut it's a related one - https://github.com/nim-lang/Nim/issues/4971
06:53:09Yardanico(maybe)
06:53:46YardanicoAraq, so where in nim compiler a check for this can be added?
06:55:30Araqcompiler/types.nim line 799
06:55:39Araqyou need to check why that doesn't trigger
06:58:38*endragor joined #nim
06:58:45YardanicoAraq, probably because a == b is true then both a and b are nil
06:59:36Araqthey are not nil, the return types are 'int' and 'string'
06:59:41FromGitter<Bennyelg> @Yardanico I managed to create PrestoDB locally, With Mysql as a metastore. ⏎ I'll create docker + tests to allow others easily improve the libarary
07:01:53*endragor_ quit (Ping timeout: 240 seconds)
07:12:38YardanicoAraq, so I need to add warning or to fix it so this code compiles?
07:19:36Araqthe code shouldn't compile
07:19:44Araqthe bug is about "why does this compile?"
07:26:24*hcorion quit (Ping timeout: 260 seconds)
07:29:38*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
07:37:41*haha_ quit (Quit: haha_)
07:38:41*Sentreen quit (Ping timeout: 255 seconds)
07:51:55*Sentreen joined #nim
07:53:34*claudiuinberlin joined #nim
07:54:32*rokups joined #nim
08:00:42*yglukhov joined #nim
08:02:23*gokr quit (Ping timeout: 240 seconds)
08:04:08Araq(NCSTRING)((($1>0)*((NU)($1->data))) | (($1==0)*((NU)(\"\"))))
08:06:30*yglukhov quit (Remote host closed the connection)
08:11:13YardanicoAraq, not nil string?
08:11:23Yardanicoor without null terminator?
08:11:49Araqkrux02's patch produces totally puzzling crashes :-)
08:12:06AraqI thought because of this weird construct
08:12:11Araqbut it makes no difference...
08:16:15YardanicoAraq, does "assert" work in nim testament?
08:17:51Araqsure
08:21:36YardanicoAraq, ah, maybe I should've used doAssert instead of "assert" ?
08:22:08Araqit's better for tests yes but most tests are not run with -d:release
08:24:19*yglukhov joined #nim
08:27:59*yglukhov quit (Remote host closed the connection)
08:29:04*yglukhov joined #nim
08:47:27*gangstacat quit (Quit: Ĝis!)
08:48:41*miran quit (Remote host closed the connection)
08:52:55Arrrrin the past i had some bugs because of assert and -d:release. I didn't realize why some code would not run under release
09:24:27*haha_ joined #nim
09:35:39AraqArrrr: unfortunately x{noSideEffect} is broken, otherwise 'assert' could enforce the condition must not have side effects
09:43:46*arnetheduck quit (Remote host closed the connection)
09:44:24*arnetheduck joined #nim
09:48:44*nsf joined #nim
09:56:00FromGitter<ephja> like I said, asserts don't seem to work for me unless I add something like `output: ""`. are you sure that incorrect assertions are being caught?
09:56:07*gangstacat joined #nim
09:56:36YardanicoAraq, yeah, it seems they're not caught
09:56:58Araqthat has nothing to do with assert
09:57:10Araqtests without output section are not run at all
09:57:14Yardanicooh
09:57:33FromGitter<ephja> so your test also does nothing? :p good to know
09:59:15FromGitter<ephja> I'll check if any other tests are missing something
09:59:36Yardanicocan you make a PR after? I think I saw a couple of tests without "discard" section
09:59:55Araqwhich one?
10:00:35Yardanicoso wait, tests without "discard" section are not run, but still compiled?
10:01:02FromGitter<ephja> tvectorspace.nim? I wonder if static asserts are different
10:03:26FromGitter<ephja> possibly
10:03:31AraqYardanico: yes, that is the point
10:03:51YardanicoAraq, oh, then I should change tvmmisc
10:03:54Araqprobably we should change it to an explicit norun
10:05:38FromGitter<ephja> yeah static asserts work without a test spec
10:06:53*Arrrr quit (Ping timeout: 240 seconds)
10:13:05*yglukhov quit (Remote host closed the connection)
10:15:51*dddddd joined #nim
10:22:00FromGitter<ephja> `exitcode` doesn't do anything on its own
10:25:46*yglukhov joined #nim
10:27:51*Arrrr joined #nim
10:27:51*Arrrr quit (Changing host)
10:27:51*Arrrr joined #nim
11:00:51*ShalokShalom quit (Read error: Connection reset by peer)
11:01:02*ShalokShalom joined #nim
11:06:08*Sentreen quit (Ping timeout: 246 seconds)
11:14:10*shaiekx joined #nim
11:16:49shaiekxcan I see when a thread dies?
11:16:54shaiekxvar x = spawn openProc()
11:19:44*Sentreen joined #nim
11:26:44FromGitter<Bennyelg> @Shaiekx you can do var x = ^spawn openProc()
11:27:02FromGitter<Bennyelg> var x should be available only after openProc done,
11:27:07FromGitter<Bennyelg> Try, Im not sure
11:28:44FromGitter<zacharycarter> https://gist.github.com/zacharycarter/5887af4e36b74f0236b997126731edb7
11:28:47FromGitter<zacharycarter> big ship
11:29:19FromGitter<Bennyelg> lol
11:30:02FromGitter<zacharycarter> I sense a sci fi roguelike in my future :D
11:33:33*PMunch joined #nim
11:38:50shaiekx@Bennyelg that does work but that locks my http server
11:39:10FromGitter<Bennyelg> because it's waiting for him to be down
11:39:21shaiekxhttps://pastebin.com/Y3V4Gvze
11:39:30FromGitter<Bennyelg> you can try var x = spwan proc ⏎ then xif .isReady:
11:41:31FromGitter<zacharycarter> https://nim-lang.org/rst.html is broken
11:41:51Yardanicoyes
11:41:53Yardanicoproper link is https://nim-lang.org/docs/rst.html
11:42:01FromGitter<zacharycarter> I'll put a pr into the forums
11:45:00shaiekxvar x = spawn openProc()
11:45:00shaiekx if x.isReady:
11:45:00shaiekx echo "x"
11:45:14Yardanicowell no
11:45:18Yardanicoit wouldn't work
11:45:22shaiekxyeah i thought so
11:45:32Yardanicoyou need to spawn it once
11:45:37Yardanicoand then check if it's done
11:45:47Yardanicomaybe in some async loop
11:46:13FromGitter<Bennyelg> waitFor loop probably
11:46:30Yardaniconoooa
11:46:34Yardanico" that does work but that locks my http server"
11:46:40Yardanicohe would use "asyncCheck loop"
11:46:54Yardanicoshaiekx, wait
11:47:02Yardanicoyou want to give user the answer from spawned proc?
11:47:03FromGitter<Bennyelg> but asyncCheck discard the return value
11:47:09FromGitter<Bennyelg> he want it
11:47:20shaiekxYes, yardanico
11:47:42Yardanicoshaiekx, ah, ok
11:47:44shaiekxbasically the user will give a youtube url and it will return when its ready to the user
11:49:37YardanicoI'll try to make it work now :)
11:50:23shaiekxthank you
11:51:20FromGitter<zacharycarter> @qqtop I replied to your issue on NimRL btw, I think you just have to do a nimble install to get things going
11:52:05*ShalokShalom_ joined #nim
11:55:34*ShalokShalom quit (Ping timeout: 264 seconds)
12:16:06FromGitter<qqtop> @zacharycarter Thank you , aStar is ok but test still fails , see traceback in issues
12:18:15FromGitter<Bennyelg> Does nim have any docs generator ?
12:19:47federico3Bennyelg nim doc
12:19:59*Sentreen quit (Ping timeout: 246 seconds)
12:20:08federico3see https://nim-lang.org/docs/docgen.html
12:20:19FromGitter<Bennyelg> :-*
12:24:18FromGitter<ephja>
12:32:59*nattefrost joined #nim
12:33:14*Sentreen joined #nim
12:39:45FromGitter<zacharycarter> @qqtop : replied
12:41:23*forcefaction joined #nim
12:48:38*yglukhov quit (Remote host closed the connection)
12:58:52*BigEpsilon joined #nim
13:01:43*claudiuinberlin quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:04:22FromGitter<ephja> what should we call the concepts that define some container interface? C++ uses the term 'iterator' and D uses the term 'range'.
13:05:35Araqwe call it 'int'
13:06:56FromGitter<ephja> what's that now? :p
13:07:34YardanicoIterable
13:07:38Yardanicoiterable
13:07:50*rokups quit (Quit: Connection closed for inactivity)
13:13:08*Matthias247 joined #nim
13:17:28*yglukhov joined #nim
13:19:01*yglukhov quit (Remote host closed the connection)
13:23:46obadzso vscode calls nim c -r … is there a way for me to change the default compile options it invokes when I hit F6 ?
13:24:20FromGitter<Bennyelg> command /shift ,
13:24:25FromGitter<Bennyelg> search for nim
13:24:49FromGitter<Bennyelg> // Nim build command (c, cpp, doc, etc) ⏎ "nim.buildCommand": "c"
13:24:51FromGitter<Bennyelg> try there
13:25:39obadzbut that's global to all projects. if I have a project that just needs a C library, I ought to be able to specify that somewhere?
13:26:11FromGitter<ephja> doesn't vscode support project local settings?
13:26:21AraqI never found project specific settings for vscode
13:26:43obadzAraq: what editor do you recommend then?
13:26:54obadzthat has good interop with nimsuggest
13:26:56*yglukhov joined #nim
13:27:57FromGitter<ephja> I've seen .vscode directories in various directories that I've opened
13:29:29FromGitter<ephja> `> Preferences: Open Workspace Settings`?
13:30:02obadzephja: Command 'Preferences: Open Workspace Settings' is not enabled in the current context.
13:30:37FromGitter<ephja> obadz: have you opened a directory?
13:30:49obadzephja: I'm in a nim file
13:31:02obadzah I see, I need to 'open folder'
13:31:05obadzlet me try
13:31:14FromGitter<ephja> @Bennyelg the task mapped to F6 is called "run" something though, so it might not be relevant
13:32:26FromGitter<ephja> ```code paste, see link```
13:32:34obadzcan't I put some nim.cfg in the folder?
13:33:03obadzTo fix this for instance: lib/pure/concurrency/threadpool.nim(13, 10) Error: Threadpool requires --threads:on option.
13:34:50Araqyeah that works
13:34:54FromGitter<ephja> yes, you can specify any of the options in the cfg
13:36:03obadzah, cfg did the trick
13:42:55*ShalokShalom_ is now known as ShalokShalom
13:48:17obadz--clib:blas in the .cfg somehow expands to -l/path/to/project/blas
13:48:19obadzinstead of -lblas
13:49:42FromGitter<ephja> maybe slices references should be called views
13:49:56obadzis there a documentation for the nim.cfg format somewhere?
13:51:25FromGitter<mratsim> There is a nimblas package already, if it doesn’t auto link to your system BLAS, change nimblas.nimble with switch(‘clibdir’, $PATHTOBLAS) (not sure of the clibdir) and it should always compile with it instead of having to specify it on the commandline
13:52:25Araqthe format is
13:52:27Araq#comment
13:52:31Araq--option:value
13:52:44Araq@if windows: ... @else ... @end
13:53:09Araqthe lexing is done according to Nim's rules
13:53:17FromGitter<ephja> option:value works too, right? and option=value IIRC
13:53:23Araqtrue
13:54:50obadzbut --clib:blas in the cfg does not behave the same as --clib:blas on the command line
13:55:01obadz--clib:blas in the cfg prepends blas by some path
13:55:43obadzsorry I take that back
13:55:46obadzcommand line does the same
13:56:11obadzbut either way, I can't use --clib as it doesn't pass it straight through to gcc. It adds a path..
13:56:11*BigEpsilon quit (Remote host closed the connection)
13:56:34Araquse --passc instead
13:56:47*BigEpsilon joined #nim
13:56:50FromGitter<ephja> is anything using the 'coro' module?
13:57:34Araqno.
13:58:38obadz{.passL: "-L" & gorge("nix-build '<nixpkgs>' -A blas --no-out-link") & " -lblas".} ⇐ this worked!
13:59:51FromGitter<ephja> I might try it if I can think of anything to use it for
14:02:50obadzcan I use gorge() in the .cfg ?
14:10:41*obadz quit (Ping timeout: 248 seconds)
14:16:07*BigEpsilon quit (Ping timeout: 255 seconds)
14:16:18*obadz joined #nim
14:18:25*Snircle joined #nim
14:24:35Araqno.
14:31:14*haha_ quit (Quit: haha_)
14:39:56FromGitter<ephja> https://gist.github.com/ephja/6be3d70c31cb0a586df274a62757cd5b this might not have been reported
14:42:42obadzam I correct in assuming that nim packaging works in such a way that all libraries are included as nim sources rather than separately compiled binaries?
14:42:54*adeohluwa joined #nim
14:43:03obadz(and I assume this is a consequence of the overloading mechanisms?)
14:44:43Araqyes (and no, that's completely unrelated, learn how compilers work)
14:46:01*jsgrant joined #nim
14:48:02obadzI'm not an expert in compilers but I've done a decent bit of reading… Seems to be than a C compiler is nearly always able to produce object code that is linked later on. C++ templates however requires knowledge of which types are instantiated so the source code is required at compiled time… In languages like Haskell typeclasses have a strict structure that enables separate compilation but specialization (for
14:48:04obadzperformance) requires some hacky things that are essentially equivalent to having the source code of the depencency when compiling the dependent… If not for template-style polymorphism, why else does one need full nim source code?
14:48:21obadz(as oppposed to object code + some headers)
14:50:35Araq"why else" because it's work to implement, that's why.
14:51:24Araqbtw overloading is orthogonal to type specialization for generics.
14:51:47Araqthe C model would work fine with overloading.
14:51:57obadzThat's a completely acceptable answer, but not sure how me 'learning about compilers' would have taken me to it…
14:52:38*ofelas joined #nim
14:52:53*forcefaction quit (Quit: Using Circe, the loveliest of all IRC clients)
14:53:08obadzhow would you overload in C without any runtime implications? name mangling?
14:53:28Araqfor instance, yes.
14:53:50Araqin fact the later C versions have some support for overloading
14:53:59obadzbut then if you need an implementation for a combination of types that hasn't yet been produced, you need the original source (a la C++ template), no?
14:54:07*TjYoco joined #nim
14:54:45*forcefaction joined #nim
14:55:15*forcefaction quit (Remote host closed the connection)
14:55:35*forcefaction joined #nim
14:56:30obadzunless you eagerly produce all object code for all possible type combos as soon as they become 'feasible;
14:56:37Araqyou only need the AST, not the source
14:56:45obadzyes agreed
14:56:56obadzthat's the haskell hack I was referring to ;-)
14:57:15Araqthat's not a "hack"
14:58:14*forcefaction quit (Client Quit)
14:59:12*forcefaction joined #nim
14:59:29*forcefaction quit (Remote host closed the connection)
15:01:17Araqthe real hack here is assuming that the object file format came from god and cannot ever support monorphization.
15:02:26obadzwell one could also include an interpreter and source code in the object file.. I'd classify that as a hack but I suppose that's subjective.
15:03:50Araqyou need an internal representation (IR) that doesn't lose as much information as the current object file formats do.
15:06:01obadzyes if memory serves, haskell stores pre-specialization stuff in its core IR which is essentially system F
15:10:18*haha_ joined #nim
15:10:38*shaiekx quit (Quit: Leaving)
15:12:48*mahsav2 quit (Ping timeout: 240 seconds)
15:12:59FromGitter<mratsim> Is it possible to configure the compiler/compile switches directly in a .nim file (instead of .nimble or .nims)? ⏎ ⏎ I would like to have a cuda.nim file that automatically use nvcc instead of gcc/clang.
15:13:08*mahsav joined #nim
15:13:29FromGitter<mratsim> so that people can just `import arraymancer/cuda` to be properly configured
15:15:30FromGitter<mratsim> oh, maybe import nimscript
15:16:40Araqthat's not possible
15:16:51Araqand would be a pita to support
15:17:09*smt` joined #nim
15:17:20Araqyour cuda uses nvcc, my wxWidgets use g++, see the problem?
15:18:41*nsf quit (Quit: WeeChat 1.9)
15:20:41*smt_ quit (Ping timeout: 240 seconds)
15:21:05*Yardanico quit (Ping timeout: 240 seconds)
15:21:16FromGitter<mratsim> Well, you found clever solutions for a lot of things, why not this one ;)
15:21:17*BigEpsilon joined #nim
15:21:25federico3how to undefine/delete a variable?
15:21:43*endragor quit (Remote host closed the connection)
15:21:56Araqfederico3: --undef:var ?
15:22:18*endragor joined #nim
15:23:44*endragor quit (Remote host closed the connection)
15:25:42*Yardanico joined #nim
15:27:15federico3a variable in a proc scope, not a conditional symbol :)
15:27:37Yardanicowould "sleep" called from a proc which is being called using "spawn" block the whole program or only the thread where this proc is running?
15:28:03*yglukhov quit (Remote host closed the connection)
15:28:31Yardanicoguys, 19 stars on github for 4k !!!
15:28:53federico3Yardanico: 4k?
15:29:02Yardanicofederico3, 4000 stars
15:29:04FromGitter<Bennyelg> 4000
15:29:10AraqYardanico: sleep is thread local
15:29:13FromGitter<Bennyelg> Very very impressive
15:29:37federico3Yardanico: URL? :)
15:29:45Yardanicofederico3, https://github.com/nim-lang/Nim ?
15:29:57Yardanico3981 stars right now
15:30:30federico3hah :D
15:32:24*Sentreen quit (Ping timeout: 246 seconds)
15:32:41*endragor joined #nim
15:37:23YardanicoAraq, am I doing something wrong here? https://gist.github.com/Yardanico/923a1d7ea798d15210a32b95489532c4
15:37:33Yardanicoe.g. one request will block whole process
15:37:44Yardanicoit's the same with asynchttpserver
15:38:32FromGitter<Bennyelg> @Yardanico dont u need to use poll(500) ?
15:38:39Araqto figure out why that is, you need to read the code :-)
15:38:57Araqoh sorry, I misread lol
15:39:41Araq'spawn' is allowed to block
15:39:47Yardanicoah
15:39:59Araqand often does so because "cpu usage is low, so I'm gonna run this on the very same core"
15:40:29Araqwe have a better spawn implementation in the works
15:40:45Yardanicoso it would allow stuff like this? cool
15:42:10Yardanicowell also, in this example "spawn" doesn't block - e.g. this "while" loop can run
15:45:57Araqdunno, async is too clever for me.
15:46:08*Sentreen joined #nim
15:49:39*yglukhov joined #nim
15:49:47*couven92 joined #nim
16:00:48*mahmudov joined #nim
16:04:50Yardanicohmm, nice! https://github.com/IoTone/huenim
16:04:59Yardanicohttps://github.com/IoTone
16:05:32Yardanicowell code looks a lot C-like :)
16:05:58Yardanicoand for some reason it uses async http client + waitFor
16:13:28Yardanicowell it seems this was written by someone who's not familiar with Nim
16:16:05*claudiuinberlin joined #nim
16:19:24*SusWombat joined #nim
16:29:16*Matthias247 quit (Read error: Connection reset by peer)
16:32:29*Matthias247 joined #nim
16:32:48*BigEpsilon quit (Ping timeout: 240 seconds)
16:33:08*Matthias247 quit (Read error: Connection reset by peer)
16:34:11*Matthias247 joined #nim
16:39:57*Matthias247 quit (Read error: Connection reset by peer)
16:40:59CalinouYardanico: by the way, don't include binaries in Git repositories
16:41:07YardanicoCalinou, I don't
16:41:07Calinouif you want to publish binaries, use GitHub Releases
16:41:12Calinouoh, I thought that was you
16:41:14YardanicoCalinou, it's not my repo :)
16:41:18Calinousorry :P
16:41:22YardanicoI wouldn't do this :P
16:48:17*nsf joined #nim
16:49:30FromGitter<mratsim> the `.gitignore` setup for Nim is a bit different from other languages. If you use plain `nim c foo` for compilation, your directories will be littered with executable with no extensions that you must ignore and same thing for nimcache
16:50:20*yglukhov quit (Remote host closed the connection)
16:50:20Yardanicowell it's the same for other languages
16:50:40Yardanicomost binaries on linux doesn't have extensions
16:51:09TjYocoThis works well enough for me https://github.com/Tyler-Yocolano/nimbomb/blob/master/.gitignore
16:51:41TjYocoI guess it gets worse the bigger your project is though
16:53:09FromGitter<zacharycarter> so for a 256x256 ship - CPU Time [ship generation] 2.650s
16:53:13FromGitter<zacharycarter> that's not toooo bad
16:53:27Yardanicodo you have source?
16:53:30Yardanicoof this benchmark :)
16:53:45FromGitter<zacharycarter> oh yeah
16:53:48FromGitter<zacharycarter> one sec
16:54:18FromGitter<zacharycarter> I'd be curious for any thoughts on the library so far
16:55:10FromGitter<zacharycarter> https://github.com/zacharycarter/nimrl
16:55:45FromGitter<zacharycarter> run tests/test.nim from the root of the project directory Yardanico
16:55:49Yardanicook :)
16:56:46FromGitter<zacharycarter> :D
17:05:07*endragor quit (Remote host closed the connection)
17:13:00*solitudesf quit (Remote host closed the connection)
17:13:47*nsf quit (Quit: WeeChat 1.9)
17:17:41*nsf joined #nim
17:20:25FromGitter<zacharycarter> can anyone explain why this is segfaulting?
17:20:46FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59beaeee1081499f1f4223a7]
17:21:11FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=59beaf07bac826f054cc196f]
17:21:16FromGitter<Yardanico> soomething to do with unsafe things ? :)
17:21:17FromGitter<Yardanico> freeShared
17:21:21FromGitter<zacharycarter> nope
17:21:32FromGitter<zacharycarter> if I remove spaceship.doors[].add(...) everything is fine
17:21:44FromGitter<Yardanico> This procedure is dangerous! If one forgets to free the memory a leak occurs; if one tries to access freed memory (or just freeing it twice!) a core dump may happen or other memory may be corrupted
17:22:08FromGitter<zacharycarter> I tried it without shared memory first of course and it blew up with the same issue
17:23:04*Trustable joined #nim
17:23:15FromGitter<zacharycarter> something with parallel I think
17:24:44TjYocoadd a lock for the door[]
17:25:07TjYocoso only one thread can write/read to it at a time
17:26:21FromGitter<zacharycarter> thanks TjYoco I'll try that
17:27:43TjYocoI'm just guessing. Maybe import locks; var doorLock: Lock; initLock(doorLock); var spaceship.doors[] {.guard: doorLock.} = @[]; in the generateHallways proc
17:28:18Yardanicowell then parallel wouldn't have any performance impact here :)
17:29:07TjYocowell split the spaceship into two halves and do that
17:29:17Yardanicoyeah
17:29:18TjYocoidk haha
17:31:53FromGitter<zacharycarter> I have another idea
17:32:08FromGitter<zacharycarter> simplify the problem
17:32:35*nsf quit (Quit: WeeChat 1.9)
17:33:12*haha_ quit (Quit: haha_)
17:39:07*nsf joined #nim
17:44:41FromGitter<zacharycarter> well I didn't simplify the problem but I'm about to have to
17:44:47FromGitter<zacharycarter> I tried a lock and that didn't resolve the error
17:46:23*madmalik quit (Quit: Connection closed for inactivity)
17:48:47*shashlick joined #nim
17:49:14*haha_ joined #nim
17:50:51*yglukhov joined #nim
17:52:19*nsf quit (Quit: WeeChat 1.9)
17:54:39*shashlick quit (Ping timeout: 248 seconds)
17:55:11*BigEpsilon joined #nim
17:55:34*yglukhov quit (Ping timeout: 264 seconds)
18:00:48*adeohluwa quit (Quit: Connection closed for inactivity)
18:02:27*haha_ quit (Quit: haha_)
18:02:43*yglukhov joined #nim
18:03:07Araqyglukhov: can we get your threadpool impl for 0.18?
18:04:01*nsf joined #nim
18:08:37yglukhovAraq: no promises. parallel requires some labor (
18:09:08*TjYoco quit (Quit: Leaving)
18:10:07*vendethiel- quit (Ping timeout: 248 seconds)
18:11:39*nsf quit (Quit: WeeChat 1.9)
18:13:18Arrrrhttps://github.com/nim-lang/Nim/pull/6032 the more goodest. We need one for enums
18:14:00*nsf joined #nim
18:28:56*solitudesf joined #nim
18:29:41*Guest89124 quit (Ping timeout: 240 seconds)
18:35:43*haha_ joined #nim
18:37:22*Guest89124 joined #nim
18:37:24*haha_ quit (Client Quit)
18:42:46*yglukhov quit (Remote host closed the connection)
18:43:49FromGitter<ephja> Arrr: https://github.com/nim-lang/Nim/pull/6180
18:48:20*haha_ joined #nim
18:49:03*haha_ quit (Read error: Connection reset by peer)
18:49:55*haha_ joined #nim
18:49:56ArrrrI think it won't happen, Araq is against it.
18:51:31AraqI don't mind the feature but the implementation is overkill
18:51:42Araqsorry that I try to care about code quality here
18:52:21Yardanicowell you can manually merge a part of it ? :)
18:53:06Araq240 lines to cover a fringe case? come on
18:53:37Araq4 new magics, 2 new VM opcodes
18:53:45*nsf quit (Quit: WeeChat 1.9)
18:54:06YardanicoAraq, well I'm about length
18:57:04*nsf joined #nim
18:57:08FromGitter<ephja> yeah it's kinda big :p
18:57:40Yardanicolength for enums is only 3 lines in the compiler :P
18:57:56FromGitter<Bennyelg> Im trying to install Nim using tavis.yml and the devel version but I failed to do so :(
18:58:04FromGitter<Bennyelg> I get something at the end ⏎ /Users/travis/.travis/job_stages: line 57: shell_session_update: command not found
18:58:09FromGitter<Bennyelg> No Idea how to trace this
18:58:10Yardanicocan you give me your repo?
18:58:16Yardanicowhere you've added .travis.yml
18:58:16FromGitter<Bennyelg> Sure
18:58:45FromGitter<Bennyelg> https://github.com/Bennyelg/nimPresto/tree/tests_builds
18:59:13Yardanicoehm, and the link for travis?
18:59:16*sz0 joined #nim
18:59:31FromGitter<Bennyelg> at the top of this directory
18:59:35FromGitter<Bennyelg> https://github.com/Bennyelg/nimPresto/blob/tests_builds/.travis.yml
18:59:42Araqbennyelg: copy&adapt the travis.yml of my karax project
18:59:57FromGitter<Bennyelg> OK, I''l try to do it
19:00:04Yardanicohttps://github.com/nim-lang/Nim/wiki/BuildServices
19:00:20Yardanicothere's circleci/travis/appveyor
19:02:38*adeohluwa joined #nim
19:05:50*def-pri-pub joined #nim
19:07:35*shashlick joined #nim
19:07:42FromGitter<ephja> Yardanico: iteration excluding holes is nice too :p
19:07:44*haha_ quit (Quit: haha_)
19:12:49FromGitter<ephja> jsgen.nim(1562) createVar "Error: internal error: createVar: tyUserTypeClassInst" should a node with this kind not end up here?
19:14:42Yardanicoany ICE should be reported I think :)
19:16:10FromGitter<ephja> I'm making slightly less half assed attempts at fixing bugs these days :p
19:22:05*def-pri-pub quit (Ping timeout: 240 seconds)
19:24:23*def-pri-pub joined #nim
19:26:46*BigEpsilon quit (Ping timeout: 264 seconds)
19:26:59def-pri-pubzacharycarter: I've pushed the latest version of what I'm trying to do. If you could explain how ZGL works, or how to use it properly I'd be appreciative of that.
19:27:26def-pri-pubThe gist of what I'm trying to do is to get that box to rotate about a non-center origin
19:30:07Yardanico16 stars for 4000 !
19:31:04FromGitter<zacharycarter> def-pri-pub: okay sure
19:31:26*smt_ joined #nim
19:31:41*def-pri-pub quit (Ping timeout: 240 seconds)
19:32:40FromGitter<zacharycarter> I will try to write something up in a few moments
19:33:49*def-pri-pub joined #nim
19:33:49*def-pri-pub quit (Changing host)
19:33:49*def-pri-pub joined #nim
19:35:18*smt` quit (Ping timeout: 246 seconds)
19:43:17*yglukhov joined #nim
19:46:34FromGitter<mratsim> Is it possible to remove compiler flags like “-fno-strict-aliasing” or “-fpermissive” directly from a nimble package with switches?
19:47:28*yglukhov quit (Ping timeout: 240 seconds)
19:49:21Yardanicoehm I don't think so
19:49:50Yardanicoideally, as I said - you may add nvcc as a proper C compiler (in nim source)
19:51:06*gokr joined #nim
19:51:57FromGitter<mratsim> I guess I will have to
19:56:34*yglukhov joined #nim
20:00:03FromGitter<mratsim> With nvcc, nim c -d:release is broken because -fno-strict-aliasing must be behind -Xcompiler. no release works ⏎ Funnily, nim cpp is broken because of -fpermissive but nim cpp -d:release works >_>
20:03:08*yglukhov quit (Ping timeout: 240 seconds)
20:04:54*PMunch quit (Quit: leaving)
20:07:37*Arrrr quit (Read error: Connection reset by peer)
20:08:23*mahmudov quit (Ping timeout: 255 seconds)
20:10:54YardanicoAraq, can I create a list of (most probably) fixed issues (maybe on gist)? because sometimes I'm bored and I'm looking at random nim issues
20:11:03*def-pri-pub quit (Quit: leaving)
20:11:13Yardanicoand it would be better to have 1 place instead of commenting in every issue :)
20:13:53*ofelas quit (Quit: shutdown -h now)
20:19:12*Trustable quit (Remote host closed the connection)
20:33:34*nsf quit (Quit: WeeChat 1.9)
20:34:21*Yardanico quit (Remote host closed the connection)
20:42:14*nsf joined #nim
20:48:50FromGitter<mratsim> maybe something like https://waffle.io/ would be useful
20:48:57*xet7 quit (Quit: Leaving)
20:51:47*nsf quit (Quit: WeeChat 1.9)
21:03:21FromGitter<mratsim> @Yardanico I found out how to remove the compiler flags. You can overwrite the whole config flags with switches in the .nimble. I don’t know how it interacts with user-defined flags though
21:08:47*solitudesf quit (Ping timeout: 248 seconds)
21:11:29*gokr left #nim (#nim)
21:18:52*nsf joined #nim
21:21:21*Sentreen quit (Ping timeout: 246 seconds)
21:26:14*nsf quit (Quit: WeeChat 1.9)
21:27:34*claudiuinberlin quit (Quit: Textual IRC Client: www.textualapp.com)
21:28:53*Serenitor joined #nim
21:33:21shashlickwhy does Nim default to fastcall? When interop'ing with C, I end up having to use cdecl or stdcall or end up running into issues. https://stackoverflow.com/questions/5479362/why-is-fastcall-slower-than-stdcall
21:33:35shashlickI'm on Windows
21:35:08*Sentreen joined #nim
21:40:18*TjYoco joined #nim
21:40:50obadzhas anyone nimified the linux kernel headers? I find myself in a deep rabbit whole of c2nim requiring lots and lots of dependencies..
21:51:37*TjYoco quit (Quit: Leaving)
21:52:57obadzit seems that when I "import mod as M", all the symbols in mod are still visible unqualified (i.e. without the M. prefix). Is that expected?
21:56:38FromGitter<superfunc> obadz: I think you want `from mod as M import nil`
21:57:19FromGitter<superfunc> I think your example is expected to just provide an alias, not change what gets imported
21:57:26obadz@superfunc: indeed that is. thx
21:57:31FromGitter<superfunc> np
21:57:57FromGitter<superfunc> I wonder if a macro in the stdlib/compiler would be useful for ppl who want that behavior by default
21:58:51obadzbah it's an odd bit of syntax but I think it's fine as is
22:00:39FromGitter<superfunc> Sure, it'd be a p easy template though: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=59bef087b59d55b8230ac8c1]
22:03:59Serenitorhe I'll use that. the import nil thing is a bit odd indeed. just have to keep in mind that when doing this, you can't use the method syntax any longer: type.proc() instead of proc(type)
22:05:01FromGitter<superfunc> Ah thats a nice point, thanks
22:05:23FromGitter<superfunc> I don't mind the default import semantics at all personally, I just know its a bit weird to ppl coming from other langs
22:05:26*nsf joined #nim
22:06:51obadzwhy couldn't you use val.proc() ?
22:07:25*couven92 quit (Read error: Connection reset by peer)
22:15:44FromGitter<zacharycarter> def-pri-pub: you around?
22:26:19obadzSo, c2nim produced this type for me: https://gist.github.com/obadz/f2bbee7028e872bc99ef69d7d355e105 — how would I instantiate a value that's essentially x = { ifr_ifrn = "blah", ifr_ifru = 3 } ?
22:26:31federico3Can nimPNG be used to generate animated PNGs?
22:26:47obadzI get type mismatch: got (cshort) but expected 'ifr_ifru_union = object'
22:39:35*nsf quit (Quit: WeeChat 1.9)
22:40:25*nsf joined #nim
22:57:10FromGitter<zacharycarter> def-pri-pub: I replied
22:57:24*nsf quit (Quit: WeeChat 1.9)
22:57:25*xet7 joined #nim
23:00:35*Jesin joined #nim
23:08:27*sz0 quit (Quit: Connection closed for inactivity)
23:19:21*arnetheduck quit (Ping timeout: 240 seconds)
23:20:48*adeohluwa quit (Quit: Connection closed for inactivity)
23:23:45FromGitter<Varriount> How is it that people actually like javascript.
23:24:10FromGitter<Varriount> when something like this exists: https://stackoverflow.com/questions/4059147/check-if-a-variable-is-a-string
23:26:10*Sembei quit (Ping timeout: 264 seconds)
23:41:35*pilne joined #nim
23:56:53*jsgrant quit (Remote host closed the connection)