<< 22-02-2019 >>

00:00:23*rnrwashere joined #nim
00:04:55*rnrwashere quit (Ping timeout: 250 seconds)
00:05:30*noeontheend quit (Ping timeout: 250 seconds)
00:06:10*sealmove joined #nim
00:14:54*krux02 quit (Remote host closed the connection)
00:18:14FromGitter<theretromaniac> @Ara
00:22:50shashlick@iffy I've mainly used --app:lib along with exportc and dynlib pragmas
00:23:42FromGitter<deech> The compiler seems to support this thing called a partial object. What is that and how do I construct it?
00:26:06*abm quit (Ping timeout: 272 seconds)
00:30:22FromGitter<deech> Scratch that, my real question is how `let` or `var` constructs dotted expressions, the compiler seems to check for that here (https://github.com/nim-lang/Nim/blob/devel/compiler/semstmts.nim#L502) which seems to suggest that `let x.y.z = ...` is valid.
00:39:48*noeontheend joined #nim
00:46:51*zachk quit (Quit: Leaving)
00:49:36marcazarquit
00:49:45*marcazar quit (Remote host closed the connection)
00:52:44*sealmove quit (Quit: WeeChat 2.4)
00:59:30*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:03:24*Snircle joined #nim
01:09:19FromGitter<Varriount> @iffy https://softwareengineering.stackexchange.com/questions/355466/why-are-function-names-decorated-in-c
01:22:14*rnrwashere joined #nim
01:33:27*sealmove joined #nim
01:49:45*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
01:51:30*stefanos82 quit (Remote host closed the connection)
01:58:03*ng0 quit (Ping timeout: 256 seconds)
02:04:31*ng0 joined #nim
02:07:29*noeontheend quit (Ping timeout: 246 seconds)
02:20:28*ng0_ joined #nim
02:23:33*ng0 quit (Ping timeout: 256 seconds)
02:41:23*leorize joined #nim
02:42:19*rnrwashere quit (Remote host closed the connection)
03:01:52*Julienr joined #nim
03:02:32*banc quit (Quit: Bye)
03:02:52*sealmove quit (Quit: WeeChat 2.4)
03:02:57JulienrHi, I have a question about the filterIt method on sequtils. What is the asymptotics complexity of it?
03:03:46JulienrA follow up question: Are the asymptotics complexity of the function in the standar library available somewhere?
03:10:03FromDiscord<juan_carlos> I dont think theres the complexity of whole std lib, but would be great to document it if you find it out.
03:12:05JulienrI think the filterIt complexity is O(n) after looking at the source
03:14:42*rnrwashere joined #nim
03:17:25leorize!eval echo "hello"
03:17:26NimBotCompile failed: <no output>
03:19:36*seni quit (Quit: Leaving)
03:19:42*rnrwashere quit (Ping timeout: 264 seconds)
03:23:55*banc joined #nim
03:29:50*Julienr quit (Quit: Page closed)
03:49:29FromGitter<matrixbot> `bobmolson` !eval 20 / 6
04:03:02*nsf joined #nim
04:09:54*vlad1777d quit (Ping timeout: 250 seconds)
04:14:51*rnrwashere joined #nim
04:14:53*rnrwashere quit (Remote host closed the connection)
04:15:09*rnrwashere joined #nim
04:23:50*rnrwashere quit (Remote host closed the connection)
04:26:45*rnrwashere joined #nim
04:29:08*noeontheend joined #nim
04:32:59*rnrwashere quit (Remote host closed the connection)
04:41:02*rnrwashere joined #nim
04:56:21FromGitter<kayabaNerve> Real quick, how many people here still use `discard """` instead of `#[`?
04:56:38FromGitter<kayabaNerve> I didn't even realize `#[` was added until I used it accidentally, lol.
04:58:59FromDiscord<juan_carlos> I use {.hint:"".}, {.warning:"".},etc since its compile-time, has colors, produces no code at output. Or selfdoc comments.
05:00:26FromGitter<kayabaNerve> Smart.
05:00:56FromGitter<kayabaNerve> Does discarding a string literal have a different cycle count depending on its length?
05:02:46FromDiscord<juan_carlos> I dunno, would be cool to "benchmark" each method with huge strings like a megabyte string and see the compilation time
05:03:08FromGitter<kayabaNerve> I'm concerned about runtime, not compile time.
05:03:16FromGitter<kayabaNerve> But yes, easy enough to check.
05:03:44FromDiscord<juan_carlos> I think discard will not be run on runtime.
05:04:16FromGitter<kayabaNerve> Prob optimized out
05:04:47FromDiscord<juan_carlos> on release build for sure.
05:12:24*rnrwashere quit (Remote host closed the connection)
05:18:03*leorize quit (Remote host closed the connection)
05:20:05*rnrwashere joined #nim
05:24:43*flaviut[m] joined #nim
05:48:45*Marumoto joined #nim
05:51:29*Marumto quit (Ping timeout: 255 seconds)
05:53:17*narimiran joined #nim
05:56:37*zyklon quit (Ping timeout: 258 seconds)
06:08:43*zyklon joined #nim
06:33:41*Marumto joined #nim
06:33:59*Marumoto quit (Remote host closed the connection)
06:35:37*Summertime quit (Quit: Sunsetting.)
06:36:08*Summertime joined #nim
06:51:04FromGitter<Varriount> @cheatfate I have blessed https://github.com/status-im/nim-http-utils/commits/master with an issue. :3
06:55:42FromGitter<Bennyelg> Hey I need help, I want to save logged in user sessions and refresh it every lets say 15 minutes . Im using jester. any example how to do it ?
06:59:28FromDiscord<juan_carlos> Check the code (or maybe use it actually, since you can do whatever you want via plugins) of https://nimwc.org/login
06:59:46FromDiscord<drewp> import threadpool
06:59:46FromDiscord<drewp>
06:59:46FromDiscord<drewp> var events1: Channel[int]
06:59:46FromDiscord<drewp> events1.send(1)
06:59:46FromDiscord<drewp>
06:59:47FromDiscord<drewp> proc main():
06:59:47FromDiscord<drewp> var events2: Channel[int]
06:59:48FromDiscord<drewp> events2.send(2)
06:59:48FromDiscord<drewp>
06:59:50FromDiscord<drewp> main()
07:00:17FromDiscord<drewp> Error: undeclared identifier: 'events2' <- what's different about events2?
07:03:22narimiranno code pasting here, please
07:04:02*krux02 joined #nim
07:05:25*leorize joined #nim
07:06:23*noeontheend quit (Ping timeout: 246 seconds)
07:07:26FromDiscord<drewp> https://gist.github.com/drewp/edd51d38144f09844c1d9e527011fe49
07:17:24*stratact joined #nim
07:18:04FromDiscord<Avatarfighter> Whats the best way of parsing ISO-8601 time formats?
07:18:36FromDiscord<Avatarfighter> Given a time like "2019-02-23T02:00:00.000Z" I don't exactly know how to parse it using the times lib
07:20:03stratactHi, I'm interested in Nim. I want to understand more about the real time gc option that it has. How does it work?
07:23:49FromDiscord<juan_carlos> Depending what are you trying to do, probably you can just compile using: --gc:markAndSweep
07:29:18FromGitter<Varriount> @Bennyelg Isn't that what cookies are for?
07:30:44FromGitter<Varriount> AvatarFighter: The `parse` procedure in the times module will do what you want.
07:34:15*Vladar joined #nim
07:35:07FromDiscord<Avatarfighter> @Varriount I don't believe it does as i'm trying to parse ISO-8601 datetime format using this of "parse("2019-02-23T02:00:00.000Z", "yyyy-mm-ddThh:mm:ss.ffffff")" but its not accepting this read format
07:37:45FromGitter<Varriount> AvatarFighter: Try `parse("2019-02-23T02:00:00.000Z", "yyyy-MM-dd'T'hh:mm:ss'.'fff'Z'")`
07:38:04FromGitter<Varriount> You have to escape certain characters in your format string
07:38:21FromDiscord<Avatarfighter> ohhh
07:38:36FromGitter<Varriount> AvatarFighter: Just in case you don't know, I don't think that date string is strictly ISO-8601 compliant
07:38:43FromGitter<Varriount> It doesn't appear to have the time zone field
07:39:42FromDiscord<Avatarfighter> It should be compliant for Datetime
07:40:32FromGitter<Varriount> You should also use "HH" as your hour format, since ISO-8601 uses 24 hour format
07:40:41FromDiscord<Avatarfighter> ah I shall fix that
07:41:13FromDiscord<Avatarfighter> I believe that I don't need the time zone field since its exactly UTC
07:41:36FromGitter<Varriount> AvatarFighter: I know it's rather large, but I rather like the times module. It's received a lot of love recently.
07:42:21FromDiscord<Avatarfighter> Honestly I love this language as a whole
07:42:34FromDiscord<Avatarfighter> I wish there was a dedicated IDE though ;L
07:46:15FromDiscord<Avatarfighter> The times module is probably one of the best imo just because of its simplicity
07:46:28FromDiscord<Avatarfighter> The times module is probably one of the best in the whole standard lib imo just because of its simplicity
08:00:00*gmpreussner quit (Quit: kthxbye)
08:01:10*aguspiza joined #nim
08:02:46FromDiscord<Avatarfighter> Varriount if you're still here, do you know how to shift time to your timezone with times?
08:02:50Araqstratact: it works by you giving it a deadline
08:03:29Araqsee https://nim-lang.org/docs/gc.html for more information
08:04:40*gmpreussner joined #nim
08:05:08Araqand the 2ms is super pessimistic, you can get below that
08:05:25Araqeasily. depends on your CPU speed, of course
08:10:47FromDiscord<juan_carlos> echo GC_getStatistics() gives some cool info.
08:12:13*rnrwashere quit (Remote host closed the connection)
08:22:13FromDiscord<Avatarfighter> nvm i got it
08:27:12*PMunch joined #nim
08:38:46*aguspiza quit (Ping timeout: 258 seconds)
08:57:42*rnrwashere joined #nim
09:02:01*rnrwashere quit (Ping timeout: 250 seconds)
09:03:29*floppydh joined #nim
09:06:10*abm joined #nim
09:29:18*stefanos82 joined #nim
09:33:24FromGitter<alehander42> hm how much is good deadline
09:33:27FromGitter<alehander42> 1) 5 ms?
09:38:23PMunchFor what?
09:53:12Araq60fps, you have 16ms to render an image
09:54:29Araqyou tweaked the GC so that it runs for 0.5ms, the GC is thread local, everything works, you go out and enjoy the sun.
09:57:09*lritter joined #nim
09:58:24Araqor you go to reddit and read about how some people have so much tighter performance requirements than that and only C++ with its atomic reference counting and unbounded pause times on destruction can deliver it
10:01:29FromGitter<mratsim> lol what is this: https://forum.nim-lang.org/t/4669#29166
10:02:21FromGitter<mratsim> I'm pretty sure atomic ref counting would be super slow if you had for example to track bullets in a game.
10:02:46FromGitter<mratsim> object pool would be much faster
10:03:27*neceve joined #nim
10:03:54*dom96_w joined #nim
10:05:40FromDiscord<juan_carlos> Their eyes see at 240 fps ;P
10:06:17PMunchmratsim, is a message from the President of Bodabe of course :P
10:07:37FromGitter<mratsim> @juan_carlos well technically they can, it has been reported that pulse width modulation of screen brightness below 400Hz causes headaches in a significant part of the population.
10:07:55FromGitter<mratsim> Hence why I'm not buying any phone with Samsung OLED screen.
10:08:23ZevvPfew, lucky that I'm not a significant part of the population!
10:08:38Araqincompatible type 'NimStringV2' (aka 'struct NimStringV2')
10:08:47Araqcan somebody please fix clang's error messages?
10:09:05Zevv2>/dev/null?
10:09:10Araq"aka struct NimStringV2" is pure noise
10:09:14FromGitter<mratsim> sounds like "got <T> but expected <T>" ;)
10:09:32Araqmratsim: yeah but here is the difference:
10:09:52Araqeverybody complains about Nim's error messages whereas clang's are the pinnacle of human achievement
10:10:08FromGitter<mratsim> Elm*
10:10:25FromGitter<mratsim> I think people praises clang-pretty or whatever it's called
10:11:19FromGitter<mratsim> you're working on writetracking again? https://forum.nim-lang.org/t/4658#29157
10:12:03Araq"working" is a big word
10:12:27AraqI learned a few things since then
10:14:23FromGitter<mratsim> It may be big but it's your word :P
10:15:05*mal`` quit (Quit: Leaving)
10:17:07Araqbtw I think Nim's error message are really good nowadays
10:17:37Araqexcept for some terrible oversights ("can have side effects" -- omg, WHERE? WHY?)
10:20:26*vlad1777d joined #nim
10:22:57livcdok help me here
10:23:09*mal`` joined #nim
10:23:15livcdI just downloaded the latest compiler and trying to compile a simple hello world for js
10:23:21livcdand I get Error: 'getCurrentException' is not GC-safe as it accesses 'lastJSError' which is a global using GC'ed memory
10:24:24FromDiscord<juan_carlos> Can have special effects, explosions and smoke :P
10:25:18Araqlivcd: mark lastJSError as .threadvar and create a PR
10:25:31Araqbut it's strange our JS tests don't cover it
10:30:20*Vladar quit (Remote host closed the connection)
10:30:58*Vladar joined #nim
10:33:23*ng0_ is now known as ng0
10:40:25livcdhmm i am not sure how //39 var lastJSError {.importc, nodecl, volatile.}: PJSError = nil it does not let me
10:44:06Araquse threadvar, not volatile
10:48:51FromGitter<mratsim> threadvar in JS?
11:11:52Araqthe JS codegen should just ignore the .threadvar and the effect tracking will be happy
11:17:11*sealmove joined #nim
11:19:40Araqhmm strutils is green with --gc:destructors
11:24:17Araqthis supposed to take me the full weekend, so now I'm out of work
11:25:08FromGitter<Vindaar> Poor Araq :D good job!
11:26:08Araqok, Nim is complete, time to watch Strawberry Shortcake
11:28:12sealmovenice!!
11:30:14Araqwell it's lunch time anyway, see you later.
11:33:54sealmovebon appetit
11:36:44*marcazar joined #nim
11:37:03*abm quit (Quit: Leaving)
12:12:15livcdAraq: that's what's in the source not my modification
12:14:26*stratact quit (Ping timeout: 255 seconds)
12:14:40*stratact joined #nim
12:39:26sealmoveAraq: For making a repl, do I have to handle each statement the user enters as a seperate module in a common graph?
12:45:19ZevvTIL who Strawberry Shortcake is
12:47:08Araqsealmove: no way, look at how "nim secret" does it
12:48:12sealmoveThat's what I've been trying to figure out >< Can you give me a high-level view?
12:51:07Araq"secret" --> commandInteractive() -->
12:51:10Araq var m = graph.makeStdinModule()
12:51:10Araq incl(m.flags, sfMainModule)
12:51:10Araq processModule(graph, m, llStreamOpenStdIn())
12:51:24Araqit's just a special stream
12:54:13*Sentreen quit (Ping timeout: 245 seconds)
12:54:50sealmoveBut that's within the compiler, i was trying to use compilerapi. If compilerapi is not used then I just make a NimProg object and call commandInteractive()?
12:55:11Araqthere is no clear separation
12:55:48Araqtcompilerapi gives the high level API that is more stable, but you can import llstreams and use llStreamOpenStdIn()
12:55:48FromGitter<greenfork> Hi. I feel dumb. Can I make `@[1, 2, 3]` from a subrange with something like `(1..3).toSeq` (obviously not working)?
12:56:30sealmoveAraq: Yeah, that compicates stuff. I think first step is to make a nice API for making stand-alone REPLs
12:56:32Araqsealmove: the compiler API is the compiler in its entirety
12:56:35narimiran@greenfork try `toSeq(1..3)
12:57:11FromGitter<greenfork> @narimiran yes, thank you!
12:57:53narimiran@greenfork btw, your original example works with Nim 0.19.9 (devel)
12:57:54Araqsealmove: please tinker with it and once it works for you, we can extract a better API out of it
12:58:34sealmovethanks Araq, I'll figure it out
12:59:00FromGitter<greenfork> I see, I see
13:00:30*neceve quit (Read error: Connection reset by peer)
13:03:50ZevvAraq: whole of strlib now works with destructors? \o/ push it!
13:04:14AraqI said "strutils"
13:04:37Zevvstill \o/ :)
13:04:43Araqand I know parseutils is broken :P
13:05:04Araqmy goal is to make koch.nim with --gc:destructors without crashes or memory leaks
13:06:37Zevvdo you find a lot of up-to-now-hidden problems in existing libs code with a transition to a new gc?
13:08:07Araqnot really, but I did find GC bugs by thinking about this problem from a destructor-based angle
13:09:05Araqthe bugfixes are in 0.19.x
13:10:16Araqalso: system.nim tends to be too low level with strings so changing the implementation is more messy than I would like
13:11:39*Snircle joined #nim
13:14:41bashbjornhi, simple-ish question: what would be the best way to perform arithmetic on tuple[int]s? I mean like multiplying the tuple by an int, or subtracting tuples..
13:15:06bashbjornwould be definining procs for it specifically, or is there a library for this kind of stuff?
13:15:36Araqwe have bigint implementations as Nimble packages
13:15:43narimiranbashbjorn: if you're working with matrices/vectors, take a look at Neo package https://github.com/unicredit/neo
13:16:09Zevvor arraymancer?
13:16:14Araqbut if you do it on your own, arrays seem to be a better starting point
13:16:38narimiranZevv: for vectors/matrices, i really prefer Neo
13:17:08bashbjornawesome, thanks. I'll look into arraymancer and neo, and make my decision
13:17:41bashbjornbut my usecase really is very simple. it's mostly just 2d geometric vectors and points
13:18:19Araqwe used to have basic2d in the stdlib
13:18:35Zevvnot much use to him now, is it? :)
13:19:01Araqhttps://github.com/nim-lang/basic2d
13:19:04Araqstill exists
13:19:12Zevvoh!
13:22:32bashbjornoh thats cool!
13:22:34bashbjornperfect!
13:22:52bashbjornseriously the nim community never fails
13:22:54bashbjornthanks guys
13:23:12Araqnarimiran: is neo in important_packages?
13:23:59narimiranAraq: of course! since that is one of just few packages i use, it was my piority to have it :)
13:24:33Araqo.O use more Nimble packages then. Also do we have yaml in it?
13:25:56narimiranthere was some problem with yaml, i don't remember the details
13:26:34narimiranhttps://github.com/flyx/NimYAML/issues/67
13:29:58ldleworkIs there a good tutorial/boilerplate project for getting started with Nim on the web?
13:30:41*PMunch quit (Remote host closed the connection)
13:31:30ldleworkMaybe even some existing integration with some JS multimedia libs like pixi/impact/phaser?
13:32:10ldleworkI'm trying to decide between Nim and Typescript for a canvas/webgl demo
13:32:33FromDiscord<juan_carlos> For Frontend only?.
13:33:25FromDiscord<juan_carlos> Check Nimx maybe, it has a demo thingy.
13:33:27ldleworkI mean it would be sick if there was existing stuff for doing Nim on the front and backend with shared code, etc but I'm mostly interested in just getting some interactive canvas stuff going
13:34:31*Vladar quit (Remote host closed the connection)
13:34:48FromDiscord<juan_carlos> Theres Frontend libs on Nimble.
13:35:02*Vladar joined #nim
13:35:34FromDiscord<juan_carlos> Depending what you are trying to do, but is not complicated to get started.
13:37:12FromDiscord<juan_carlos> If its just a demo for frontend only, maybe you dont even need a backend.
13:38:07ldleworkRight now I don't need a backend. I just need the ability to compile Nim to JS such that I can work with canvas and integrate with existing JS libs, like call their functions and work with their objects.
13:39:18FromDiscord<juan_carlos> Check Karax or NimX maybe.
13:39:20ldleworkI'm aware Nim has a JS backend - is there any good community guides on using that stuff beyond the raw documentation? That's what I'm asking. I know how to search Nimble and look at code. I'm wondering if anyone has written any exposition on it, or created any template projects.
13:41:14FromDiscord<juan_carlos> Ive seen template projects, but those are on Github, searching for Nim on lang I found it.
13:41:36ldlework👍
13:42:26FromDiscord<juan_carlos> I guess the same style and best practice than for Backend also apply for Frontend.
13:43:19FromGitter<gogolxdong> I just done some canvas charts.
13:43:47narimiranldlework: is this of any help? https://moigagoo.svbtle.com/exploring-karax
13:44:32FromGitter<gogolxdong> (https://files.gitter.im/nim-lang/Nim/tNea/image.png)
13:44:38FromGitter<gogolxdong> like this, but not interactive.
13:45:10*nsf quit (Quit: WeeChat 2.3)
13:45:16FromGitter<gogolxdong> just rotate with the latency.
13:47:57ldleworkgogolxdong, this is an article about frontend dev with Nim so this is warmer, yes thanks :)
13:49:07ldleworkIs there a "planet Nim" where all Nim blogs are colocated?
13:49:15FromDiscord<juan_carlos> I made a webaudio Xylophone (basic example) https://github.com/juancarlospaco/nim-presentation-slides/blob/master/ejemplos/avanzado/web_audio/main.nim
13:49:23federico3ldlework: more like aggregated
13:49:28ldleworkfound it
13:49:29FromDiscord<juan_carlos> Im not much on Fronted-only stuff anyways.
13:49:59FromGitter<gogolxdong> https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/Tutorial/Basic_animations ,you can directly use MDN canvas API, I will give you my code instead.
13:50:24FromGitter<gogolxdong> code speaks better than articles.
13:50:33narimiranldlework: https://planet.nim-lang.org/
13:50:34ldleworkthat's a matter of preference and mood
13:50:40ldleworkso
13:50:54ldleworknarimiran: yeah i found it thank you
13:51:11ldleworklooks like only three blogs so far
13:51:33federico3ldlework: feeds are welcome :)
13:51:56ldleworkwell someone just posted one that isn't there so without me would it go unadded
13:52:09ldleworki wouldn't depend on me to add stuff to your planet
13:55:40ldleworkjuan_carlos, nice!
13:56:28ldleworkconceptual question, in typescript they get typesafety for js API's with typings declaration files - how does Nim handle that?
13:56:50ldleworksame thing basically? like how it does for C integration just extern declarations?
14:01:56ldleworkwelp
14:02:34FromDiscord<juan_carlos> Yes, basically AFAIK kinda like that, my opinion is Nim has better types than Typescript at least last time I tried it, they only have a weak "Number" type, but thats opinionated because is an opinion :P
14:03:10FromDiscord<juan_carlos> Types for JS target are same as for C target, you just code and Nim does its stuff.
14:03:14ldleworkOh definitely agree with you there, but I just came off one Typescript project and holy crap was it zero-friction the whole way.
14:04:16ldleworkSo I was wondering if I can yet swap out typescript for Nim yet without bending backwards.
14:04:44FromGitter<gogolxdong> frontend.rar (https://files.gitter.im/nim-lang/Nim/E1gF/frontend.rar)
14:04:55FromDiscord<juan_carlos> If you come from TS, probably you biased towards TS yeah :)
14:05:14ldleworkjuan_carlos, technically I learned Nim before Typescript some years ago now
14:06:12FromGitter<gogolxdong> some APIs doesn't take effect , you have to importcpp manually.
14:07:39ldleworkjuan_carlos, and I'd say I'm biased towards Nim since I'm trying to replace Typescript with Nim as it is the better language, but wondering if the workflow is there yet is all. I'm definitely gonna give Karax a try!
14:08:59ldleworki wonder if "importcpp" will ever be renamed to reflect Nim's arbitrary backendedness :)
14:09:30FromGitter<gogolxdong> canvas API works with Nim's importcpp pattern, but I'm afraid I cannot tell clearly what pattern of javascript module could be imported.
14:09:31Araqldlework: I doubt it's as "frictionless" as TypeScript, but it has its advantages
14:09:40ldleworkHey there.
14:10:04ldleworkLast I checked in, a Nim language server was being worked on I think but not complete. How is that stuff these days?
14:11:06AraqI am not sure, I use tabnine with Nim these days
14:11:08ldleworkIf it's working, what's the editor with the best integration?
14:11:15FromGitter<gogolxdong> Nim web dev mostly based on Karax.
14:11:16*ldlework googles "tabnine"
14:11:56*ldlework raises an eyebrow
14:12:23FromDiscord<juan_carlos> I didnt liked TS too much, but I used to use CoffeeScript, probably biased.
14:12:55narimiranldlework: while it is not LSP, leorize's neovim plugin works like a charm!
14:12:56ldleworkTS is a totally competent modern language with a type-system that supports generics with constraints and stuff.
14:13:52ldleworkAh, emacs user myself unfortunately.
14:16:49FromDiscord<juan_carlos> I wonder if would be hard to make Nim target Lisp, since macros module already spits Lisp. :P
14:16:54ldleworkjuan_carlos, the number of things VSCode's intellisense and tslint features can tell you about your code is above and beyond. I'm still on-board with the idea that languages like Nim, Rust, Haskell and so on have richer type-systems but as a whole the Typescript ecosystem is just crazy productive. All the tools are hyper-integrated and nothing I needed to do/use was broken. It's actually pretty typical of MS
14:16:55ldleworkdevcrap..
14:17:05ldleworkthat'd be neat
14:17:14ldleworkhave there been any other target experiments?
14:17:51ldleworkI hear Lua is easy to target too
14:18:23AraqLua is much more unproductive than Python
14:18:29ldleworkOh god, I hate Lua
14:18:38Araqnil errors everywhere
14:19:13Araqand it "simplified" lists and tables into a single structure, it's broken.
14:19:20ldleworkat first you think Lua is bad because its table is used for both maps and lists based on whether there are numerical ... yeah
14:19:33ldleworkBut then you realize it definitely is bad because the array isn't 1 indexed
14:19:42ldleworkit's "lowest integer indexed"
14:19:43ldleworkwtff
14:19:55Araqand it has to guess what 'len' means
14:20:00FromDiscord<juan_carlos> LuaJIT seems kinda abandoned or reaaally stalled, several years without Release. Lua without LuaJIT kinda slow.
14:20:28Araqyou can beat C++ on every benchmark with LuaJIT and I still wouldn't use it
14:20:42ldleworkAraq, this typescript project I've been working on is actually a VSCode extension to integrate a Lua bundler I wrote (multi-files -> one-file) and TypescriptToLua transpiler so that I don't have to fucking write Lua to make mods for Tabletop Simulator :P
14:21:01ldleworkthat's how much i hate lua
14:21:18Araqbecause Lua is just unproductive, it can be as fast as it wants
14:22:03ldleworkWhen someone says to me that they love Lua I assume the only code they've ever written is game mods
14:22:09ldleworkwhich is fine but that's what it says to me
14:22:42Araqit's fine to love Lua, I don't assume anything when you say it
14:22:50Araqbut it's not for me.
14:23:31ldleworkI feel like it's safe to assume that using basically any other language gives you the insights needed to realize that Lua is crummy.
14:25:19ldleworkI'm not sure that Tabnine is sufficient solution to language support
14:26:03Araqwell it helps that I already know Nim's APIs
14:26:32Araqif you use auto-completion to explore the language than tabnine is worse than nimsuggest
14:26:32ldleworkhaha yeah
14:27:05*aguspiza joined #nim
14:28:39FromGitter<alehander42> You kinda can I think
14:28:45FromGitter<alehander42> Idlework
14:29:02FromGitter<alehander42> I did it for a small project and I think it can be mostly equivalent
14:29:09ldleworkCan what?
14:29:28FromGitter<alehander42> We just miss automatically porting typesxript definition files
14:29:54FromGitter<alehander42> Which a project did before but it needs to be updated or rewritten taking new Nim js features in min
14:31:53ldleworkI'm not sure what you're saying. But automatically converting .d.ts files to Nim JS wrappers would be prety nifty
14:40:50FromGitter<deech> @Araq Why does the compiler check `let`/`var` expressions for dots (https://github.com/nim-lang/Nim/blob/devel/compiler/semstmts.nim#L502)? Is `var x.y = ...` valid syntax?
14:42:21Araqyeah, but it's for the macro system
14:42:41FromGitter<deech> Could you elaborate?
14:44:12Araqlook at tfields.nim, block timplicit_with_partial
14:44:41Araqit offers the building block for your own task system, it's undocumented though
14:45:15FromGitter<deech> Interesting, thanks. Yeah, I was just about to say I couldn't find anything in the manual. Are you planning on keeping this feature around?
14:46:24Araqlet's say I intend to leave it undocumented for the time being
14:46:32FromGitter<deech> ok :)
14:46:37FromGitter<Clyybber> I love lua. It's great for teaching someone to code.
14:46:39Araqlike the nnkGotoState AST node
14:46:53FromGitter<Clyybber> But of course its not safe in any way, neither more productive than python
14:46:55FromGitter<deech> sneaky ...
14:47:55*abm joined #nim
15:25:33*Trustable joined #nim
15:56:04sealmoveAraq: I made it work!
16:01:47*rnrwashere joined #nim
16:02:45sealmoveAraq: https://bpaste.net/show/175b2b3de37b
16:17:49Araqcourse you did, nice job
16:22:18sealmoveit works with current api after all: https://bpaste.net/show/ae9a835e0baa
16:22:36FromGitter<mratsim> We might have to look for a replacement to Travis soon: https://twitter.com/carmatrocity/status/1098538649908666368
16:23:04narimiran@mratsim Araq will shed exactly zero tears :D
16:23:27FromGitter<mratsim> well, he'll wait hours for Appveyor builds then :p
16:25:41sealmoveAraq: current api doesn't allow for repl modifications. the implementation has to change completely...
16:30:04euantorWhat about Azure Pipelines? They support Mac, Windows & Linux and seem to give pretty good time allowances
16:31:08narimiraneuantor: we also heard good stories about it, but haven't investigated it (yet)
16:32:27CalinouAzure Pipelines is nice, but scheduled pipelines only work if you visit the builds page regularly
16:32:33Calinou(they probably weren't happy with my usage :))
16:33:03Calinouthere's also GitLab CI, but your repository needs to be mirrorred on GitLab (which is easy to do, and CI status can be reported on GitHub)
16:33:36narimiranCalinou: what about circle ci? people usually speak positively about it too
16:33:57CalinouI have no experience with it
16:34:15CalinouI've used AppVeyor (meh), Travis CI (alright), GitLab CI (pretty good) and Azure Pipelines (good too)
16:38:19FromGitter<mratsim> CircleCI looks like the most established alternative at the moment
16:38:48euantorThere’s also builds.sr.ht which is pretty nice and supports platforms like FreeBSD and soon NetBSD. Don’t think they have any windows plans though
16:39:33CalinouCircleCI has a few downsides, e.g. access to macOS instances requires contacting CircleCI
16:39:39Calinou(it's still free for open source projects)
16:40:05*Jesin quit (Quit: Leaving)
16:40:10Calinouthey don't have Windows instances too. In contrast, AppVeyor (since recently) and Azure Pipelines (since its launch) offer Windows, macOS and Linux (+ Docker) instances
16:40:21Calinouhmm, AppVeyor doesn't offer macOS actually, I thought they did
16:40:59FromGitter<mratsim> Appveyor offers macOS? :O
16:41:31Calinouno, they don't :( I'm mixing things up
16:42:00CalinouGitLab CI is Linux-only with the shared runners, but you can host your own runners on any OS
16:42:30CalinouGitLab CI also offers the convenient-but-deprecated "gitlab-runner exec" for running CI jobs locally. No more furious pushing :)
16:43:50*noeontheend joined #nim
16:44:11*Jesin joined #nim
16:44:41sealmoveAraq: I'll try to make an API where you can do stuff before passing the statement that the users enters to nim compiler. This will allow custom preprocessing. Without changing the compiler api this can be achieved by treating each statement as a seperate module, and exporting all symbols.
16:45:21sealmovemaybe ugly solution but it's relatively easy to try out, so i'll probably do that for starters
16:50:25*bobby quit (Quit: bye bye)
16:54:32Araqsealmove: just write your own stream to do that, the llstream doesn't allow overriding though, yay
16:54:41sealmovethe "correct" solution is to implement yet another "special" stream and somehow give
16:54:57sealmovelol was just thinking that
16:58:09sealmovein passes.nim, there has to be made a small addition to account for user-defined streams
16:58:18sealmovewould you let me add that?
16:58:36sealmove(never changed Nim compiler code before, that's why I am asking)
17:00:05*stefanos82 quit (Remote host closed the connection)
17:01:27sealmovesorry, I'll think it more throughly and report back when I have a real plan
17:02:12*MyMind joined #nim
17:02:20*Sembei quit (Ping timeout: 268 seconds)
17:06:29*floppydh quit (Quit: WeeChat 2.3)
17:10:09Araqsealmove: I think you only need to patch llstreams.nim to allow for a Nim stream
17:13:48*rockcavera quit (Ping timeout: 245 seconds)
17:14:44*rockcavera joined #nim
17:14:48sealmoveAraq: Yeah, I realized later that the new stream can be of kind llsStdin so that processModule keeps looping
17:15:07sealmovellsStdIn *
17:16:09sealmoveso I'll try to make an API for making custom llsStdIn streams
17:17:49FromGitter<deech> Running into more bugs with `var`/`let` assignment and the `compileTime` pragma. All these cause an illegal storage error: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c702ebd7667931e2fe3d2be]
17:21:22sealmovehmm my bad, it has to be different kind than llsStdIn. So line 204 of passes.nim needs a little patch, the line `if s.kind != llsStdIn: break`
17:23:24*ryukoposting joined #nim
17:24:30ryukopostinghey all, I noticed that the nim container on dockerhub hasn't been updated recently. I'm not very good with docker, so I'm hoping someone else would be able to update it.
17:24:56narimiranhey ryukoposting, when is your next video coming up?
17:25:31ryukopostingI use GitLab CI to run tests on my nimble libraries, and right now I have to download and build Nim every time I run remote tests, but if the docker container was updated I wouldn't have to do that
17:26:12ryukopostingnarimiran: next video is ready, was gonna post it tonight. I'm really not happy with how this one turned out, but I think I have it in a spot where it's "good enough"
17:26:43narimiranbut you weren't satisfied with the last one, and it became people's favourite ;)
17:26:44FromDiscord<juan_carlos> Previous video was awesome.
17:27:01ryukopostingthanks!
17:27:53ryukopostingI was able to do the first one in a single take, ended up doing 3 takes for some parts of the new video.
17:28:16Calinouryukoposting: I think there are Linux binaries for Nim available now?
17:28:26Calinouso you only need to download binaries and extract them into the PATH
17:29:19ryukopostingCalinou I'll look into that, it would make life a lot easier. I was thinking about just hosting my own prebuilt compilers, then downloading them from there.
17:29:19Araqryukoposting: ask ldlework?
17:29:47ryukopostingwill do, are they the one hosting it on github?
17:30:11*rnrwashere quit (Remote host closed the connection)
17:31:06Araqsealmove: it's fine if you explain in the PR why it is required
17:31:40ryukopostingI think I'm gonna do a video about how to make/maintain a nimble library. There's a lot of stuff on Nimble that's pretty nasty- poorly documented, no git tags, people pushing to master instead of development branches, no automated tests, etc
17:33:46ryukopostingoh and if any of you have nimble libraries and you don't have a place to host documentation, I can set up a spot for you to host your docs
17:34:38*noeontheend quit (Ping timeout: 272 seconds)
17:34:55*rnrwashere joined #nim
17:34:56*rnrwashere quit (Remote host closed the connection)
17:35:09*rnrwashere joined #nim
17:36:08Calinouryukoposting: that works too, you can host binaries on GitHub Releases or similar
17:37:13ryukopostingCalinou nah I'd just be putting them on my VPS. It'd be a me-only thing since I have limited monthly bandwidth and those binaries aren't exactly small
17:37:21*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
17:38:03Calinoubut if you host them on GitHub Releases, you won't use any of your bandwidth?
17:38:17Calinou(GitHub Releases' bandwidth limit is 100 GB/month)
17:38:20Calinouand 1 GB per file
17:38:31ryukopostinghowever, I'd be happy to host some people's docs. My personal VPS has enough bandwidth for that, and there's a few other places I can put them as well
17:38:33CalinouBintray is even more generous, with 1 TB/month for free :)
17:38:50ryukopostingmy VPS is 1TB/month
17:38:50*rnrwashere quit (Remote host closed the connection)
17:41:21ryukopostingheck, maybe I could just save the binaries as artifacts from gitlab CI, have it roll a new compiler if there's an update
17:43:23Calinouthat can work well too, you can have jobs that you trigger manually on GitLab CI
17:43:36Calinouthen you can download the latest artifacts for a given job in another job :)
17:43:42ryukopostingAraq where can I find ldlework, is that like a github username or something?
17:43:58Araqhe was here in #nim a couple of hours ago
17:44:05ryukopostingaaaah okay
17:44:10ryukoposting.tell
17:44:32ryukoposting:( no tell bot
17:45:00FromGitter<deech> I also strongly suggest disallowing constructions like: ⏎ ⏎ ```let a {.compileTime}, b {.compileTime.}, c = someSideEffectingOp``` ⏎ ⏎ because now the order of `let` assignment (even at `compileTime`) matters and reasoning about effects is quite confusing. It is also unclear that `someSideEffectingOp` will run twice at compile time and once at run time. [https://gitter.im/nim-lang/Nim?at=5c70351ca7d733509dac2441]
17:46:23FromGitter<deech> Just using a `static` block with some code duplication makes it much easier to understand IMO.
17:47:22Araqdeech: +1
17:48:21narimiranryukoposting: you can find ldlework here - notice that the first letter is small L, not I
17:48:47*Marumoto joined #nim
17:50:18*marcazar quit (Quit: Leaving)
17:50:25ryukopostingshot him a message
17:51:04*Marumto quit (Ping timeout: 250 seconds)
17:52:10ryukopostinghow difficult would it be to have the dockerhub images update automatically when a new version of the compiler is released?
17:53:06Calinouit's definitely possible, not sure about the difficulty. I should study building Docker images :)
17:54:25ldleworkWhy am I associated with Nim's Dockerfile? I'm guessing I built it at some point but how are people currently associating me with it?
17:54:56ryukopostingI'm a bit of a docker/CICD/devops in general novice, the only thing I know how to do is the basics of GitLab CI. Realistically, though, that's really all you need to have a well-maintained nimble library
17:55:06ldleworkLooks like moigagoo has been maintaining them, https://forum.nim-lang.org/t/2430
17:56:01ryukopostingldlework I just put up an issue there, hopefully moigagoo will address it. Doesn't look like he's touched that repository in months, though.
17:56:51*Perkol joined #nim
17:59:54Calinouryukoposting: I spent a lot of time studying CI in the last 1.5 years, I maintain a Godot daily builds page that uses Azure Pipelines and GitLab CI :)
18:00:47ryukopostingNICE
18:01:42ryukopostingI'll try to update moigagoo's repo, and I'll run it past you before making a PR
18:04:35*ryukoposting quit (Quit: Lost terminal)
18:14:18*natrys joined #nim
18:19:03*Perkol quit (Quit: Leaving)
18:19:30*ryukoposting joined #nim
18:19:52*rnrwashere joined #nim
18:27:52*rnrwashere quit (Remote host closed the connection)
18:28:11*rnrwashere joined #nim
18:28:58xace_ryukoposting: I thought of a idea of a nim video I would be interested in: How to use multithreading in nim
18:29:14narimiranxace_: nice idea, +1
18:29:22ryukopostingwas thinking about doing that, I'll have to get familiar with it myself first lol
18:30:04xace_ryukoposting: hahaha, i wanted to make myself but i hardly have the time to learn the language properly myself
18:30:07ryukopostingI know my way around async/await, so I'll probably just do one big "concurrency in nim" video where I cover parallel/spawn and async/await together
18:30:16xace_*make a video myself
18:30:42FromDiscord<juan_carlos> Video about MultiSync, thats something not many langs have.
18:30:56xace_yeah, there are multiple options, hence i referred to it as "multi threading" but actually any concurency / parallelism in nim
18:31:25ryukopostingyeah, I'm no master of the lang either. I think that kind of helps though, since I know what stuff was confusing for me and I can point that stuff out
18:31:25xace_actually meant* jesus, my mistakes in chats are gettings really bad....
18:32:39xace_ryukoposting: yeah. I already knew how to use iterators, but i still liked your video, and I think it explained exactly how to you it really well. and the production quality was high. no 4px font, good mic, good presentation manners etc...
18:33:49xace_geez. i think im having the keyboard typing variation of stroke symptoms
18:34:05ryukopostingI have a propensity for fat-fingering the enter key, you're not alone
18:34:51xace_:) i even bound capslock to the enter key, akimbo enter. double the fire rate *pew pew pew*
18:35:08ryukopostingthank you so much! I'm really happy people liked the first video. I'm not very satisfied with the second one, it took a lot of work to even get it to "good enough that it wouldn't be embarassing to publish"
18:35:59xace_Well I'm looking forward to it. I even learned your website url by heart...
18:36:09FromDiscord<juan_carlos> Dont feel like you got to be a guru to make a video tho... :)
18:36:09ryukopostingThe second one will probably go up this afternoon. I'm looking into options to host the videos elsewhere. I'm not planning to monetize, so I'd prefer to avoid Youtube, but I'd still like to put them somewhere where they'll get more exposure than my personal site
18:36:57narimiranryukoposting: i like it that they are on your site!
18:37:09FromGitter<iffy> @Varriount thnks for that link
18:37:37FromGitter<Clyybber> ryukoposting: My gitlab ci also builds nim from source everytime.
18:37:40ryukopostingI do too, I'd prefer that people can download and save my videos and most sites try to block you from doing that
18:37:40narimiranand for more exposure, post link to it here, on reddit, our telegram channel, forum, etc.
18:37:48FromGitter<Clyybber> I tried to use the docker images, but they are outdated
18:38:02xace_ryukoposting: I think vimeo is free too... but youtube permits removing monetization, but I'm not sure if youtube's terms vibe with your ideoligy. though a problem with using the site is lack of spreading the video to people who really need to see it... I dont care much, I'm just happy there are high quality videos to watch when i can't satisfy my nim-needs
18:38:26ryukopostingClyybber yeah, they're still on 0.19.0. My GitLab CI just runs a shell script that builds the compiler and sets up some symlinks to it
18:38:31narimiranand with couple videos more, i'll put your site on our learn section of the website
18:38:56FromGitter<Clyybber> Also, yes there is a way to automatically update docker images, each time a change in nim's repo occurs, but Araq woud need to set that up, as you have to be the owner of the repo you set it up for.
18:39:00narimiranoh, and add twitter to that list above
18:39:15FromGitter<Clyybber> ryukoposting Are you using nimble in your gitlab-runner?
18:39:21ryukopostingxace_ I've been trying to un-google, if that makes any sense, so youtube would kinda defeat that.
18:39:26narimiranryukoposting: just mention @nim_lang there and you'll be officially retweeted :)
18:39:52ryukopostingbut if I'm gonna be put on the nim website, I'm gonna want to host the videos somewhere where they won't eat all my bandwidth
18:39:56xace_ryukoposting: yeah I'm kind of the same, hence I'm familiar with what your desires are... I'm not going to bother you about it, I do the same tbh...
18:40:17ryukopostingClyybber yes
18:40:22narimiranhaha, you think we're that popular? :D
18:40:23FromDiscord<juan_carlos> For maximum exposure theres https://restream.io allows to send a prerecorded video as "live"
18:40:45xace_ryukoposting: i can spare 250GB a month on a 1GB network, I don't have https though
18:41:18FromGitter<iffy> I'm doing `nim c --app:staticlib ...` on Windows, and it's making a static lib with names mangled differently than what MSVS can link. I made a C-only (no Nim) example to demonstrate the problem. The fix to the C-only version was to wrap the whole C program in `extern "C" { ... }` What's the equivalent change to my nim program? Use `{.emit:`?
18:41:21ryukopostingI get 1TB/month on my VPS, latency is bad since the thing's in Romania but the speeds are fantastic
18:42:13xace_oh, whats the monthly fee for thata?
18:42:21ryukoposting$10/month
18:42:29narimiranGTFO
18:42:44ryukopostingi got a sweet deal, dude
18:42:54xace_any limitations on the cpu usage ? any link you can send my way?
18:43:16ryukopostingoh yeah, it's only got ~1GB of RAM and a since vcpu core, but that's enough for my purposes
18:43:33xace_ah, nim will run just fine on that :)
18:43:53ryukopostingsadly they don't offer that plan currently, it might come back in the future though. cheapest one you can get right now is $20/month, 2TB bandwidth, 2GB RAM, 2 vcpu
18:44:44xace_I see... Well If I didn't have so many servers in my house, I would also record nim videos :) the noise in my house is too loud o_O
18:45:19ryukopostingI've got 3 roommates, I know the feel
18:45:25FromGitter<Clyybber> ryukoposting: Any reason you are running build.sh instead of build_all.sh in your gitlab-runner?
18:46:02ryukopostingClyybber ?
18:46:10ryukopostingnot sure what you mean
18:46:51FromGitter<Clyybber> You are running build.sh to build nim, and then manually invoke koch to build the tools and stuff
18:47:07FromGitter<Clyybber> running build_all.sh would handle that for you
18:47:09FromGitter<Clyybber> I think
18:47:20ryukopostingoh, it just follows the instructions on the website, didn't know there was another script that would do it for me
18:47:24FromGitter<Clyybber> I do it like this: https://gitlab.com/Clyybber/wyven/blob/master/.gitlab-ci.yml
18:47:35FromGitter<Clyybber> Theres some vulkan related stuff there though.
18:47:46FromGitter<Clyybber> And a workaround for a nimble package name conflict
18:48:11ryukopostingCI_COMMIT_TAG... is that some magic environment variable?
18:48:20FromGitter<Clyybber> Yep
18:48:24ryukopostingnice
18:48:31*ng0 quit (Quit: Alexa, when is the end of world?)
18:48:38FromGitter<Clyybber> Its documented here: https://gitlab.com/help/ci/variables/README.html#predefined-variables-environment-variables
18:49:02ryukopostingoh sweet, that's super useful
18:49:26*planetis[m] joined #nim
18:49:28FromGitter<Clyybber> Indeed
18:51:43FromGitter<Clyybber> Also, kind of useless tip, but you can leave out the y in apt-get install -yqq, because -qq implies -y
18:52:24ryukopostingoh cool, didn't notice that. that part is just copied from my boilerplate for gitlab CI files
18:53:04FromGitter<Clyybber> At least it should according to the manpage... haven't tested it though, so don't quote me on it :P
18:53:38ryukopostingI mean, it does the job the way it is, and I don't think it's hurting anything lol
18:53:52ryukopostingthe bigger concern is building the damn compiler every single time I run tests
18:54:48FromGitter<Clyybber> yeah
18:55:50FromGitter<Clyybber> Calinou AFAIK the nightlies are only built for winows
18:56:03FromGitter<Clyybber> And the linux releases just contain the source.
18:59:33ryukopostingwhich is weird, I assume they run tests on linux to make sure it works before releases, presumably that could be part of the testing process for nightly builds
18:59:53*rockcavera quit (Remote host closed the connection)
19:00:45*rockcavera joined #nim
19:03:05*rnrwashere quit (Remote host closed the connection)
19:05:56Calinounarimiran: I have a nice cheap VPS too, and it's located pretty close to me. Here in France, we have many hosts acting as nonprofits so they can drag the prices lower
19:06:03Calinouuptime is pretty good too, but it's not really guaranteed
19:06:30xace_Calinou: what's the pricing? / link?
19:06:31Calinou(8 vCores, 15 GB RAM, 60 GB SSD, 100Mb/s+ unmetered bandwidth on Ubuntu 18.04 for €15/month)
19:06:47Calinoumost of them only speak French, so it's going to be difficult if you need support
19:07:11Calinouit's KVM too, so Docker works :)
19:10:06*sealmove quit (Quit: WeeChat 2.4)
19:11:07*ng0 joined #nim
19:22:41*vlad1777d quit (Remote host closed the connection)
19:25:28*vlad1777d joined #nim
19:26:20*FromGitter quit (Read error: Connection reset by peer)
19:26:36*FromGitter joined #nim
19:28:49*ng0 quit (Remote host closed the connection)
19:29:45FromDiscord<Avatarfighter> Calinou: Mind sharing the vps provider?
19:30:29*ng0 joined #nim
19:41:45FromGitter<iffy> Any tips to for how wrap my procs in `extern "C" { ... }` for a static lib?
19:42:02FromGitter<iffy> I guess I need to wrap the declarations, too
19:42:51FromGitter<Varriount> @iffy Use the exportc pragma?
19:43:12FromGitter<iffy> I am already
19:43:46FromGitter<Varriount> On the procedure's declaration?
19:44:24FromGitter<iffy> I don't have separate declarations. I just have it on the ... what do you call the part when you define the function body? :)
19:46:37FromGitter<Varriount> So your doing something like `proc foo(): {.exportc.} = ...`?
19:46:42FromGitter<iffy> right
19:46:43FromGitter<Varriount> That should work...
19:47:01FromGitter<iffy> It works on macOS and Linux, but not on Windows when I link using VS
19:47:44FromGitter<iffy> I compile the static lib using nim (which uses gcc) and then try to link against the static lib using VS
19:48:07FromGitter<iffy> but the VS linker can't find the symbols
19:48:35FromGitter<iffy> I reproduced the problem with a simple c program (no nim) and the linker gave the same error
19:49:07FromGitter<iffy> the error was fixed when I added `extern "C" { ... }` around the declaration and ... is it definition? implementation?
19:50:39FromGitter<iffy> (the explanation for the fix was that GCC and VS mangle differently and this would make GCC mangle the same)
19:51:07*natrys quit (Quit: natrys)
19:55:15FromGitter<iffy> hmm... maybe it's a calling convention thing? different calling conventions would result in different symbols, right?
19:55:55FromGitter<Varriount> @iffy Oh, you can't do that.
19:56:05FromGitter<iffy> Can't do what?
19:56:46FromGitter<Varriount> I don't believe the GCC linkers and VCC linkers have the same expectations with regards to things like input formats.
19:56:50*rnrwashere joined #nim
19:56:52FromGitter<Varriount> Unless you're using mingw?
19:57:01FromGitter<iffy> mingw for GCC, yes
19:57:19FromGitter<iffy> for VC... whatever node-gyp installed
19:57:32FromGitter<iffy> can I get Nim to use VC?
19:58:53FromGitter<Varriount> Yeah
19:59:35*rnrwashere quit (Remote host closed the connection)
19:59:49FromGitter<iffy> ooo, I'll scan through this: https://forum.nim-lang.org/t/2770
20:00:46FromGitter<Varriount> Huh, I don't know why this isn't in the help printout, but you can manually select the compiler to use through the '--cc' switch
20:00:58FromGitter<Varriount> For example `--cc:clang` or `--cc:vcc`
20:01:07FromGitter<iffy> just found that: https://forum.nim-lang.org/t/2770#21109
20:01:13FromGitter<iffy> awesome! I'll try it out
20:01:42FromGitter<Varriount> I believe there's also a vcc helper program in Nim's `tools` directory.
20:02:55*Senketsu_ joined #nim
20:05:50*Senketsu quit (Ping timeout: 250 seconds)
20:09:24FromGitter<iffy> Compilation works, but it fails when linking `Error: invocation of external linker program failed. The system cannot find the file specified.` It doesn't say what file it's trying to find, though.
20:09:47FromGitter<iffy> According to https://github.com/nim-lang/Nim/blob/devel/compiler/extccomp.nim#L133 my guess is that it uses `cl` for compiling and linking... so maybe it can't find something else?
20:13:48FromGitter<iffy> `--verbosity:2` shows it's trying to call `lib` not `cl` -- okay, I'll dig deeper
20:13:52FromGitter<iffy> Thank you @Varriount
20:41:06*rnrwashere joined #nim
20:45:31*narimiran_ joined #nim
20:47:58*narimiran quit (Ping timeout: 246 seconds)
20:54:47*zachk joined #nim
20:56:21*zachk quit (Changing host)
20:56:21*zachk joined #nim
21:07:21FromGitter<deech> @Araq Is Nim's side effect pragma/inference robust enough that sequential independent expressions could be parallelized and memoized?
21:20:10*lritter quit (Quit: Leaving)
21:25:17*abm quit (Quit: Leaving)
21:41:15*krux02 quit (Remote host closed the connection)
21:43:59*rnrwashere quit (Remote host closed the connection)
21:44:24*rnrwashere joined #nim
21:45:27*narimiran_ quit (Ping timeout: 245 seconds)
21:46:02*rnrwashere quit (Remote host closed the connection)
21:52:08Araqdeech: nope, but I know how to do it
22:00:05FromGitter<Varriount> @iffy Have you managed to make any progress?
22:00:34FromGitter<iffy> @Varriount still can't find lib, but I think it's a path problem. I'm trying to find documentation on what I need to put into nim.cfg so that it can find it
22:01:17FromGitter<Varriount> @iffy Have you taken a look at https://github.com/nim-lang/Nim/tree/devel/tools/vccexe ?
22:01:53FromGitter<iffy> @Varriount it looks like doing `--cc:vcc` uses vccexe already. At least, I see it being called in the output
22:02:47FromGitter<Varriount> Yeah, but I believe the one in the Nim tree is a "wrapper" program, which will call the real vccexe (or cl) compiler, as the case may be.
22:03:59FromGitter<iffy> so now I'm looking for how to tell nim the path to `lib.exe` I wish there was a nim.cfg that showed all possible options
22:04:23FromGitter<Varriount> Can't you just add lib.exe to your PATH environment variable?
22:04:31FromGitter<Varriount> Or rather, the directory it lies in?
22:05:30FromGitter<iffy> I thought I did, but it doesn't seem to think I did. I'm in this goofy environment: macOS -> VirtualBox GuestAdditions run -> Windows guest
22:05:52FromGitter<iffy> the VBox guest additions don't ever seem to have the same environment as a legit cmd terminal
22:07:55FromGitter<iffy> (it probably doesn't help that I don't understand Windows users/environments/permissions)
22:17:19FromGitter<Varriount> Make sure to use a semicolon as the path separator, not a colon
22:20:44FromGitter<Varriount> @iffy You might have better luck by finding the "Visual Studio Command Prompt" tool somewhere on your system, and running Nim from that.
22:21:03FromGitter<Varriount> It generally sets up all the environment variables that one needs to invoke the compiler correctly.
22:22:17FromGitter<iffy> the vcvarsall.bat thing?
22:22:51*rnrwashere joined #nim
22:23:03FromGitter<iffy> oh, hooray! I got the path set. ...but it has the same linker error :)
22:24:41*rockcavera quit (Remote host closed the connection)
22:27:49FromGitter<iffy> oh, but it includes new errors too: `error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in jstonimbinding.obj`
22:28:25FromGitter<iffy> that's not a nim thing though, so I'll go search around
22:29:19*rockcavera joined #nim
22:30:30*noeontheend joined #nim
22:31:10*Vladar quit (Remote host closed the connection)
22:34:17FromGitter<iffy> k, now I'm getting a nim error: nimbase.h(490): error C2118: negative subscript
22:34:33FromGitter<iffy> does that mean I'm trying to mix 32/64bit?
22:38:01*tiorock joined #nim
22:38:01*tiorock quit (Changing host)
22:38:01*tiorock joined #nim
22:38:02*rockcavera is now known as Guest86106
22:38:02*Guest86106 quit (Killed (asimov.freenode.net (Nickname regained by services)))
22:38:02*tiorock is now known as rockcavera
22:44:45FromGitter<iffy> yep, it does
22:44:52*rockcavera quit (Remote host closed the connection)
22:48:21*rockcavera joined #nim
22:53:07*rnrwashere quit (Remote host closed the connection)
22:59:27*rnrwashere joined #nim
23:03:48*rnrwashere quit (Remote host closed the connection)
23:06:55*rnrwashere joined #nim
23:13:54*rnrwashere quit (Remote host closed the connection)
23:19:45*rnrwashere joined #nim
23:41:48FromGitter<iffy> bah, I'm so sick of node/node-gyp
23:43:32*Trustable quit (Remote host closed the connection)