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:14 | FromGitter | <theretromaniac> @Ara |
00:22:50 | shashlick | @iffy I've mainly used --app:lib along with exportc and dynlib pragmas |
00:23:42 | FromGitter | <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:22 | FromGitter | <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:36 | marcazar | quit |
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:19 | FromGitter | <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:57 | Julienr | Hi, I have a question about the filterIt method on sequtils. What is the asymptotics complexity of it? |
03:03:46 | Julienr | A follow up question: Are the asymptotics complexity of the function in the standar library available somewhere? |
03:10:03 | FromDiscord | <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:05 | Julienr | I think the filterIt complexity is O(n) after looking at the source |
03:14:42 | * | rnrwashere joined #nim |
03:17:25 | leorize | !eval echo "hello" |
03:17:26 | NimBot | Compile 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:29 | FromGitter | <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:21 | FromGitter | <kayabaNerve> Real quick, how many people here still use `discard """` instead of `#[`? |
04:56:38 | FromGitter | <kayabaNerve> I didn't even realize `#[` was added until I used it accidentally, lol. |
04:58:59 | FromDiscord | <juan_carlos> I use {.hint:"".}, {.warning:"".},etc since its compile-time, has colors, produces no code at output. Or selfdoc comments. |
05:00:26 | FromGitter | <kayabaNerve> Smart. |
05:00:56 | FromGitter | <kayabaNerve> Does discarding a string literal have a different cycle count depending on its length? |
05:02:46 | FromDiscord | <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:08 | FromGitter | <kayabaNerve> I'm concerned about runtime, not compile time. |
05:03:16 | FromGitter | <kayabaNerve> But yes, easy enough to check. |
05:03:44 | FromDiscord | <juan_carlos> I think discard will not be run on runtime. |
05:04:16 | FromGitter | <kayabaNerve> Prob optimized out |
05:04:47 | FromDiscord | <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:04 | FromGitter | <Varriount> @cheatfate I have blessed https://github.com/status-im/nim-http-utils/commits/master with an issue. :3 |
06:55:42 | FromGitter | <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:28 | FromDiscord | <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:46 | FromDiscord | <drewp> import threadpool |
06:59:46 | FromDiscord | <drewp> |
06:59:46 | FromDiscord | <drewp> var events1: Channel[int] |
06:59:46 | FromDiscord | <drewp> events1.send(1) |
06:59:46 | FromDiscord | <drewp> |
06:59:47 | FromDiscord | <drewp> proc main(): |
06:59:47 | FromDiscord | <drewp> var events2: Channel[int] |
06:59:48 | FromDiscord | <drewp> events2.send(2) |
06:59:48 | FromDiscord | <drewp> |
06:59:50 | FromDiscord | <drewp> main() |
07:00:17 | FromDiscord | <drewp> Error: undeclared identifier: 'events2' <- what's different about events2? |
07:03:22 | narimiran | no 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:26 | FromDiscord | <drewp> https://gist.github.com/drewp/edd51d38144f09844c1d9e527011fe49 |
07:17:24 | * | stratact joined #nim |
07:18:04 | FromDiscord | <Avatarfighter> Whats the best way of parsing ISO-8601 time formats? |
07:18:36 | FromDiscord | <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:03 | stratact | Hi, 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:49 | FromDiscord | <juan_carlos> Depending what are you trying to do, probably you can just compile using: --gc:markAndSweep |
07:29:18 | FromGitter | <Varriount> @Bennyelg Isn't that what cookies are for? |
07:30:44 | FromGitter | <Varriount> AvatarFighter: The `parse` procedure in the times module will do what you want. |
07:34:15 | * | Vladar joined #nim |
07:35:07 | FromDiscord | <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:45 | FromGitter | <Varriount> AvatarFighter: Try `parse("2019-02-23T02:00:00.000Z", "yyyy-MM-dd'T'hh:mm:ss'.'fff'Z'")` |
07:38:04 | FromGitter | <Varriount> You have to escape certain characters in your format string |
07:38:21 | FromDiscord | <Avatarfighter> ohhh |
07:38:36 | FromGitter | <Varriount> AvatarFighter: Just in case you don't know, I don't think that date string is strictly ISO-8601 compliant |
07:38:43 | FromGitter | <Varriount> It doesn't appear to have the time zone field |
07:39:42 | FromDiscord | <Avatarfighter> It should be compliant for Datetime |
07:40:32 | FromGitter | <Varriount> You should also use "HH" as your hour format, since ISO-8601 uses 24 hour format |
07:40:41 | FromDiscord | <Avatarfighter> ah I shall fix that |
07:41:13 | FromDiscord | <Avatarfighter> I believe that I don't need the time zone field since its exactly UTC |
07:41:36 | FromGitter | <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:21 | FromDiscord | <Avatarfighter> Honestly I love this language as a whole |
07:42:34 | FromDiscord | <Avatarfighter> I wish there was a dedicated IDE though ;L |
07:46:15 | FromDiscord | <Avatarfighter> The times module is probably one of the best imo just because of its simplicity |
07:46:28 | FromDiscord | <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:46 | FromDiscord | <Avatarfighter> Varriount if you're still here, do you know how to shift time to your timezone with times? |
08:02:50 | Araq | stratact: it works by you giving it a deadline |
08:03:29 | Araq | see https://nim-lang.org/docs/gc.html for more information |
08:04:40 | * | gmpreussner joined #nim |
08:05:08 | Araq | and the 2ms is super pessimistic, you can get below that |
08:05:25 | Araq | easily. depends on your CPU speed, of course |
08:10:47 | FromDiscord | <juan_carlos> echo GC_getStatistics() gives some cool info. |
08:12:13 | * | rnrwashere quit (Remote host closed the connection) |
08:22:13 | FromDiscord | <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:24 | FromGitter | <alehander42> hm how much is good deadline |
09:33:27 | FromGitter | <alehander42> 1) 5 ms? |
09:38:23 | PMunch | For what? |
09:53:12 | Araq | 60fps, you have 16ms to render an image |
09:54:29 | Araq | you 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:24 | Araq | or 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:29 | FromGitter | <mratsim> lol what is this: https://forum.nim-lang.org/t/4669#29166 |
10:02:21 | FromGitter | <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:46 | FromGitter | <mratsim> object pool would be much faster |
10:03:27 | * | neceve joined #nim |
10:03:54 | * | dom96_w joined #nim |
10:05:40 | FromDiscord | <juan_carlos> Their eyes see at 240 fps ;P |
10:06:17 | PMunch | mratsim, is a message from the President of Bodabe of course :P |
10:07:37 | FromGitter | <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:55 | FromGitter | <mratsim> Hence why I'm not buying any phone with Samsung OLED screen. |
10:08:23 | Zevv | Pfew, lucky that I'm not a significant part of the population! |
10:08:38 | Araq | incompatible type 'NimStringV2' (aka 'struct NimStringV2') |
10:08:47 | Araq | can somebody please fix clang's error messages? |
10:09:05 | Zevv | 2>/dev/null? |
10:09:10 | Araq | "aka struct NimStringV2" is pure noise |
10:09:14 | FromGitter | <mratsim> sounds like "got <T> but expected <T>" ;) |
10:09:32 | Araq | mratsim: yeah but here is the difference: |
10:09:52 | Araq | everybody complains about Nim's error messages whereas clang's are the pinnacle of human achievement |
10:10:08 | FromGitter | <mratsim> Elm* |
10:10:25 | FromGitter | <mratsim> I think people praises clang-pretty or whatever it's called |
10:11:19 | FromGitter | <mratsim> you're working on writetracking again? https://forum.nim-lang.org/t/4658#29157 |
10:12:03 | Araq | "working" is a big word |
10:12:27 | Araq | I learned a few things since then |
10:14:23 | FromGitter | <mratsim> It may be big but it's your word :P |
10:15:05 | * | mal`` quit (Quit: Leaving) |
10:17:07 | Araq | btw I think Nim's error message are really good nowadays |
10:17:37 | Araq | except for some terrible oversights ("can have side effects" -- omg, WHERE? WHY?) |
10:20:26 | * | vlad1777d joined #nim |
10:22:57 | livcd | ok help me here |
10:23:09 | * | mal`` joined #nim |
10:23:15 | livcd | I just downloaded the latest compiler and trying to compile a simple hello world for js |
10:23:21 | livcd | and I get Error: 'getCurrentException' is not GC-safe as it accesses 'lastJSError' which is a global using GC'ed memory |
10:24:24 | FromDiscord | <juan_carlos> Can have special effects, explosions and smoke :P |
10:25:18 | Araq | livcd: mark lastJSError as .threadvar and create a PR |
10:25:31 | Araq | but 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:25 | livcd | hmm i am not sure how //39 var lastJSError {.importc, nodecl, volatile.}: PJSError = nil it does not let me |
10:44:06 | Araq | use threadvar, not volatile |
10:48:51 | FromGitter | <mratsim> threadvar in JS? |
11:11:52 | Araq | the JS codegen should just ignore the .threadvar and the effect tracking will be happy |
11:17:11 | * | sealmove joined #nim |
11:19:40 | Araq | hmm strutils is green with --gc:destructors |
11:24:17 | Araq | this supposed to take me the full weekend, so now I'm out of work |
11:25:08 | FromGitter | <Vindaar> Poor Araq :D good job! |
11:26:08 | Araq | ok, Nim is complete, time to watch Strawberry Shortcake |
11:28:12 | sealmove | nice!! |
11:30:14 | Araq | well it's lunch time anyway, see you later. |
11:33:54 | sealmove | bon appetit |
11:36:44 | * | marcazar joined #nim |
11:37:03 | * | abm quit (Quit: Leaving) |
12:12:15 | livcd | Araq: 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:26 | sealmove | Araq: For making a repl, do I have to handle each statement the user enters as a seperate module in a common graph? |
12:45:19 | Zevv | TIL who Strawberry Shortcake is |
12:47:08 | Araq | sealmove: no way, look at how "nim secret" does it |
12:48:12 | sealmove | That's what I've been trying to figure out >< Can you give me a high-level view? |
12:51:07 | Araq | "secret" --> commandInteractive() --> |
12:51:10 | Araq | var m = graph.makeStdinModule() |
12:51:10 | Araq | incl(m.flags, sfMainModule) |
12:51:10 | Araq | processModule(graph, m, llStreamOpenStdIn()) |
12:51:24 | Araq | it's just a special stream |
12:54:13 | * | Sentreen quit (Ping timeout: 245 seconds) |
12:54:50 | sealmove | But 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:11 | Araq | there is no clear separation |
12:55:48 | Araq | tcompilerapi gives the high level API that is more stable, but you can import llstreams and use llStreamOpenStdIn() |
12:55:48 | FromGitter | <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:30 | sealmove | Araq: Yeah, that compicates stuff. I think first step is to make a nice API for making stand-alone REPLs |
12:56:32 | Araq | sealmove: the compiler API is the compiler in its entirety |
12:56:35 | narimiran | @greenfork try `toSeq(1..3) |
12:57:11 | FromGitter | <greenfork> @narimiran yes, thank you! |
12:57:53 | narimiran | @greenfork btw, your original example works with Nim 0.19.9 (devel) |
12:57:54 | Araq | sealmove: please tinker with it and once it works for you, we can extract a better API out of it |
12:58:34 | sealmove | thanks Araq, I'll figure it out |
12:59:00 | FromGitter | <greenfork> I see, I see |
13:00:30 | * | neceve quit (Read error: Connection reset by peer) |
13:03:50 | Zevv | Araq: whole of strlib now works with destructors? \o/ push it! |
13:04:14 | Araq | I said "strutils" |
13:04:37 | Zevv | still \o/ :) |
13:04:43 | Araq | and I know parseutils is broken :P |
13:05:04 | Araq | my goal is to make koch.nim with --gc:destructors without crashes or memory leaks |
13:06:37 | Zevv | do you find a lot of up-to-now-hidden problems in existing libs code with a transition to a new gc? |
13:08:07 | Araq | not really, but I did find GC bugs by thinking about this problem from a destructor-based angle |
13:09:05 | Araq | the bugfixes are in 0.19.x |
13:10:16 | Araq | also: 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:41 | bashbjorn | hi, 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:06 | bashbjorn | would be definining procs for it specifically, or is there a library for this kind of stuff? |
13:15:36 | Araq | we have bigint implementations as Nimble packages |
13:15:43 | narimiran | bashbjorn: if you're working with matrices/vectors, take a look at Neo package https://github.com/unicredit/neo |
13:16:09 | Zevv | or arraymancer? |
13:16:14 | Araq | but if you do it on your own, arrays seem to be a better starting point |
13:16:38 | narimiran | Zevv: for vectors/matrices, i really prefer Neo |
13:17:08 | bashbjorn | awesome, thanks. I'll look into arraymancer and neo, and make my decision |
13:17:41 | bashbjorn | but my usecase really is very simple. it's mostly just 2d geometric vectors and points |
13:18:19 | Araq | we used to have basic2d in the stdlib |
13:18:35 | Zevv | not much use to him now, is it? :) |
13:19:01 | Araq | https://github.com/nim-lang/basic2d |
13:19:04 | Araq | still exists |
13:19:12 | Zevv | oh! |
13:22:32 | bashbjorn | oh thats cool! |
13:22:34 | bashbjorn | perfect! |
13:22:52 | bashbjorn | seriously the nim community never fails |
13:22:54 | bashbjorn | thanks guys |
13:23:12 | Araq | narimiran: is neo in important_packages? |
13:23:59 | narimiran | Araq: of course! since that is one of just few packages i use, it was my piority to have it :) |
13:24:33 | Araq | o.O use more Nimble packages then. Also do we have yaml in it? |
13:25:56 | narimiran | there was some problem with yaml, i don't remember the details |
13:26:34 | narimiran | https://github.com/flyx/NimYAML/issues/67 |
13:29:58 | ldlework | Is 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:30 | ldlework | Maybe even some existing integration with some JS multimedia libs like pixi/impact/phaser? |
13:32:10 | ldlework | I'm trying to decide between Nim and Typescript for a canvas/webgl demo |
13:32:33 | FromDiscord | <juan_carlos> For Frontend only?. |
13:33:25 | FromDiscord | <juan_carlos> Check Nimx maybe, it has a demo thingy. |
13:33:27 | ldlework | I 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:48 | FromDiscord | <juan_carlos> Theres Frontend libs on Nimble. |
13:35:02 | * | Vladar joined #nim |
13:35:34 | FromDiscord | <juan_carlos> Depending what you are trying to do, but is not complicated to get started. |
13:37:12 | FromDiscord | <juan_carlos> If its just a demo for frontend only, maybe you dont even need a backend. |
13:38:07 | ldlework | Right 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:18 | FromDiscord | <juan_carlos> Check Karax or NimX maybe. |
13:39:20 | ldlework | I'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:14 | FromDiscord | <juan_carlos> Ive seen template projects, but those are on Github, searching for Nim on lang I found it. |
13:41:36 | ldlework | 👍 |
13:42:26 | FromDiscord | <juan_carlos> I guess the same style and best practice than for Backend also apply for Frontend. |
13:43:19 | FromGitter | <gogolxdong> I just done some canvas charts. |
13:43:47 | narimiran | ldlework: is this of any help? https://moigagoo.svbtle.com/exploring-karax |
13:44:32 | FromGitter | <gogolxdong> (https://files.gitter.im/nim-lang/Nim/tNea/image.png) |
13:44:38 | FromGitter | <gogolxdong> like this, but not interactive. |
13:45:10 | * | nsf quit (Quit: WeeChat 2.3) |
13:45:16 | FromGitter | <gogolxdong> just rotate with the latency. |
13:47:57 | ldlework | gogolxdong, this is an article about frontend dev with Nim so this is warmer, yes thanks :) |
13:49:07 | ldlework | Is there a "planet Nim" where all Nim blogs are colocated? |
13:49:15 | FromDiscord | <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:23 | federico3 | ldlework: more like aggregated |
13:49:28 | ldlework | found it |
13:49:29 | FromDiscord | <juan_carlos> Im not much on Fronted-only stuff anyways. |
13:49:59 | FromGitter | <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:24 | FromGitter | <gogolxdong> code speaks better than articles. |
13:50:33 | narimiran | ldlework: https://planet.nim-lang.org/ |
13:50:34 | ldlework | that's a matter of preference and mood |
13:50:40 | ldlework | so |
13:50:54 | ldlework | narimiran: yeah i found it thank you |
13:51:11 | ldlework | looks like only three blogs so far |
13:51:33 | federico3 | ldlework: feeds are welcome :) |
13:51:56 | ldlework | well someone just posted one that isn't there so without me would it go unadded |
13:52:09 | ldlework | i wouldn't depend on me to add stuff to your planet |
13:55:40 | ldlework | juan_carlos, nice! |
13:56:28 | ldlework | conceptual question, in typescript they get typesafety for js API's with typings declaration files - how does Nim handle that? |
13:56:50 | ldlework | same thing basically? like how it does for C integration just extern declarations? |
14:01:56 | ldlework | welp |
14:02:34 | FromDiscord | <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:10 | FromDiscord | <juan_carlos> Types for JS target are same as for C target, you just code and Nim does its stuff. |
14:03:14 | ldlework | Oh 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:16 | ldlework | So I was wondering if I can yet swap out typescript for Nim yet without bending backwards. |
14:04:44 | FromGitter | <gogolxdong> frontend.rar (https://files.gitter.im/nim-lang/Nim/E1gF/frontend.rar) |
14:04:55 | FromDiscord | <juan_carlos> If you come from TS, probably you biased towards TS yeah :) |
14:05:14 | ldlework | juan_carlos, technically I learned Nim before Typescript some years ago now |
14:06:12 | FromGitter | <gogolxdong> some APIs doesn't take effect , you have to importcpp manually. |
14:07:39 | ldlework | juan_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:59 | ldlework | i wonder if "importcpp" will ever be renamed to reflect Nim's arbitrary backendedness :) |
14:09:30 | FromGitter | <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:31 | Araq | ldlework: I doubt it's as "frictionless" as TypeScript, but it has its advantages |
14:09:40 | ldlework | Hey there. |
14:10:04 | ldlework | Last I checked in, a Nim language server was being worked on I think but not complete. How is that stuff these days? |
14:11:06 | Araq | I am not sure, I use tabnine with Nim these days |
14:11:08 | ldlework | If it's working, what's the editor with the best integration? |
14:11:15 | FromGitter | <gogolxdong> Nim web dev mostly based on Karax. |
14:11:16 | * | ldlework googles "tabnine" |
14:11:56 | * | ldlework raises an eyebrow |
14:12:23 | FromDiscord | <juan_carlos> I didnt liked TS too much, but I used to use CoffeeScript, probably biased. |
14:12:55 | narimiran | ldlework: while it is not LSP, leorize's neovim plugin works like a charm! |
14:12:56 | ldlework | TS is a totally competent modern language with a type-system that supports generics with constraints and stuff. |
14:13:52 | ldlework | Ah, emacs user myself unfortunately. |
14:16:49 | FromDiscord | <juan_carlos> I wonder if would be hard to make Nim target Lisp, since macros module already spits Lisp. :P |
14:16:54 | ldlework | juan_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:55 | ldlework | devcrap.. |
14:17:05 | ldlework | that'd be neat |
14:17:14 | ldlework | have there been any other target experiments? |
14:17:51 | ldlework | I hear Lua is easy to target too |
14:18:23 | Araq | Lua is much more unproductive than Python |
14:18:29 | ldlework | Oh god, I hate Lua |
14:18:38 | Araq | nil errors everywhere |
14:19:13 | Araq | and it "simplified" lists and tables into a single structure, it's broken. |
14:19:20 | ldlework | at 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:33 | ldlework | But then you realize it definitely is bad because the array isn't 1 indexed |
14:19:42 | ldlework | it's "lowest integer indexed" |
14:19:43 | ldlework | wtff |
14:19:55 | Araq | and it has to guess what 'len' means |
14:20:00 | FromDiscord | <juan_carlos> LuaJIT seems kinda abandoned or reaaally stalled, several years without Release. Lua without LuaJIT kinda slow. |
14:20:28 | Araq | you can beat C++ on every benchmark with LuaJIT and I still wouldn't use it |
14:20:42 | ldlework | Araq, 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:01 | ldlework | that's how much i hate lua |
14:21:18 | Araq | because Lua is just unproductive, it can be as fast as it wants |
14:22:03 | ldlework | When someone says to me that they love Lua I assume the only code they've ever written is game mods |
14:22:09 | ldlework | which is fine but that's what it says to me |
14:22:42 | Araq | it's fine to love Lua, I don't assume anything when you say it |
14:22:50 | Araq | but it's not for me. |
14:23:31 | ldlework | I 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:19 | ldlework | I'm not sure that Tabnine is sufficient solution to language support |
14:26:03 | Araq | well it helps that I already know Nim's APIs |
14:26:32 | Araq | if you use auto-completion to explore the language than tabnine is worse than nimsuggest |
14:26:32 | ldlework | haha yeah |
14:27:05 | * | aguspiza joined #nim |
14:28:39 | FromGitter | <alehander42> You kinda can I think |
14:28:45 | FromGitter | <alehander42> Idlework |
14:29:02 | FromGitter | <alehander42> I did it for a small project and I think it can be mostly equivalent |
14:29:09 | ldlework | Can what? |
14:29:28 | FromGitter | <alehander42> We just miss automatically porting typesxript definition files |
14:29:54 | FromGitter | <alehander42> Which a project did before but it needs to be updated or rewritten taking new Nim js features in min |
14:31:53 | ldlework | I'm not sure what you're saying. But automatically converting .d.ts files to Nim JS wrappers would be prety nifty |
14:40:50 | FromGitter | <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:21 | Araq | yeah, but it's for the macro system |
14:42:41 | FromGitter | <deech> Could you elaborate? |
14:44:12 | Araq | look at tfields.nim, block timplicit_with_partial |
14:44:41 | Araq | it offers the building block for your own task system, it's undocumented though |
14:45:15 | FromGitter | <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:24 | Araq | let's say I intend to leave it undocumented for the time being |
14:46:32 | FromGitter | <deech> ok :) |
14:46:37 | FromGitter | <Clyybber> I love lua. It's great for teaching someone to code. |
14:46:39 | Araq | like the nnkGotoState AST node |
14:46:53 | FromGitter | <Clyybber> But of course its not safe in any way, neither more productive than python |
14:46:55 | FromGitter | <deech> sneaky ... |
14:47:55 | * | abm joined #nim |
15:25:33 | * | Trustable joined #nim |
15:56:04 | sealmove | Araq: I made it work! |
16:01:47 | * | rnrwashere joined #nim |
16:02:45 | sealmove | Araq: https://bpaste.net/show/175b2b3de37b |
16:17:49 | Araq | course you did, nice job |
16:22:18 | sealmove | it works with current api after all: https://bpaste.net/show/ae9a835e0baa |
16:22:36 | FromGitter | <mratsim> We might have to look for a replacement to Travis soon: https://twitter.com/carmatrocity/status/1098538649908666368 |
16:23:04 | narimiran | @mratsim Araq will shed exactly zero tears :D |
16:23:27 | FromGitter | <mratsim> well, he'll wait hours for Appveyor builds then :p |
16:25:41 | sealmove | Araq: current api doesn't allow for repl modifications. the implementation has to change completely... |
16:30:04 | euantor | What about Azure Pipelines? They support Mac, Windows & Linux and seem to give pretty good time allowances |
16:31:08 | narimiran | euantor: we also heard good stories about it, but haven't investigated it (yet) |
16:32:27 | Calinou | Azure Pipelines is nice, but scheduled pipelines only work if you visit the builds page regularly |
16:32:33 | Calinou | (they probably weren't happy with my usage :)) |
16:33:03 | Calinou | there'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:36 | narimiran | Calinou: what about circle ci? people usually speak positively about it too |
16:33:57 | Calinou | I have no experience with it |
16:34:15 | Calinou | I've used AppVeyor (meh), Travis CI (alright), GitLab CI (pretty good) and Azure Pipelines (good too) |
16:38:19 | FromGitter | <mratsim> CircleCI looks like the most established alternative at the moment |
16:38:48 | euantor | There’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:33 | Calinou | CircleCI has a few downsides, e.g. access to macOS instances requires contacting CircleCI |
16:39:39 | Calinou | (it's still free for open source projects) |
16:40:05 | * | Jesin quit (Quit: Leaving) |
16:40:10 | Calinou | they 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:21 | Calinou | hmm, AppVeyor doesn't offer macOS actually, I thought they did |
16:40:59 | FromGitter | <mratsim> Appveyor offers macOS? :O |
16:41:31 | Calinou | no, they don't :( I'm mixing things up |
16:42:00 | Calinou | GitLab CI is Linux-only with the shared runners, but you can host your own runners on any OS |
16:42:30 | Calinou | GitLab 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:41 | sealmove | Araq: 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:21 | sealmove | maybe 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:32 | Araq | sealmove: just write your own stream to do that, the llstream doesn't allow overriding though, yay |
16:54:41 | sealmove | the "correct" solution is to implement yet another "special" stream and somehow give |
16:54:57 | sealmove | lol was just thinking that |
16:58:09 | sealmove | in passes.nim, there has to be made a small addition to account for user-defined streams |
16:58:18 | sealmove | would you let me add that? |
16:58:36 | sealmove | (never changed Nim compiler code before, that's why I am asking) |
17:00:05 | * | stefanos82 quit (Remote host closed the connection) |
17:01:27 | sealmove | sorry, 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:09 | Araq | sealmove: 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:48 | sealmove | Araq: Yeah, I realized later that the new stream can be of kind llsStdin so that processModule keeps looping |
17:15:07 | sealmove | llsStdIn * |
17:16:09 | sealmove | so I'll try to make an API for making custom llsStdIn streams |
17:17:49 | FromGitter | <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:22 | sealmove | hmm 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:30 | ryukoposting | hey 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:56 | narimiran | hey ryukoposting, when is your next video coming up? |
17:25:31 | ryukoposting | I 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:12 | ryukoposting | narimiran: 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:43 | narimiran | but you weren't satisfied with the last one, and it became people's favourite ;) |
17:26:44 | FromDiscord | <juan_carlos> Previous video was awesome. |
17:27:01 | ryukoposting | thanks! |
17:27:53 | ryukoposting | I 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:16 | Calinou | ryukoposting: I think there are Linux binaries for Nim available now? |
17:28:26 | Calinou | so you only need to download binaries and extract them into the PATH |
17:29:19 | ryukoposting | Calinou 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:19 | Araq | ryukoposting: ask ldlework? |
17:29:47 | ryukoposting | will do, are they the one hosting it on github? |
17:30:11 | * | rnrwashere quit (Remote host closed the connection) |
17:31:06 | Araq | sealmove: it's fine if you explain in the PR why it is required |
17:31:40 | ryukoposting | I 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:46 | ryukoposting | oh 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:08 | Calinou | ryukoposting: that works too, you can host binaries on GitHub Releases or similar |
17:37:13 | ryukoposting | Calinou 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:03 | Calinou | but if you host them on GitHub Releases, you won't use any of your bandwidth? |
17:38:17 | Calinou | (GitHub Releases' bandwidth limit is 100 GB/month) |
17:38:20 | Calinou | and 1 GB per file |
17:38:31 | ryukoposting | however, 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:33 | Calinou | Bintray is even more generous, with 1 TB/month for free :) |
17:38:50 | ryukoposting | my VPS is 1TB/month |
17:38:50 | * | rnrwashere quit (Remote host closed the connection) |
17:41:21 | ryukoposting | heck, 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:23 | Calinou | that can work well too, you can have jobs that you trigger manually on GitLab CI |
17:43:36 | Calinou | then you can download the latest artifacts for a given job in another job :) |
17:43:42 | ryukoposting | Araq where can I find ldlework, is that like a github username or something? |
17:43:58 | Araq | he was here in #nim a couple of hours ago |
17:44:05 | ryukoposting | aaaah okay |
17:44:10 | ryukoposting | .tell |
17:44:32 | ryukoposting | :( no tell bot |
17:45:00 | FromGitter | <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:23 | FromGitter | <deech> Just using a `static` block with some code duplication makes it much easier to understand IMO. |
17:47:22 | Araq | deech: +1 |
17:48:21 | narimiran | ryukoposting: 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:25 | ryukoposting | shot him a message |
17:51:04 | * | Marumto quit (Ping timeout: 250 seconds) |
17:52:10 | ryukoposting | how difficult would it be to have the dockerhub images update automatically when a new version of the compiler is released? |
17:53:06 | Calinou | it's definitely possible, not sure about the difficulty. I should study building Docker images :) |
17:54:25 | ldlework | Why 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:56 | ryukoposting | I'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:06 | ldlework | Looks like moigagoo has been maintaining them, https://forum.nim-lang.org/t/2430 |
17:56:01 | ryukoposting | ldlework 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:54 | Calinou | ryukoposting: 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:47 | ryukoposting | NICE |
18:01:42 | ryukoposting | I'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:58 | xace_ | ryukoposting: I thought of a idea of a nim video I would be interested in: How to use multithreading in nim |
18:29:14 | narimiran | xace_: nice idea, +1 |
18:29:22 | ryukoposting | was thinking about doing that, I'll have to get familiar with it myself first lol |
18:30:04 | xace_ | ryukoposting: hahaha, i wanted to make myself but i hardly have the time to learn the language properly myself |
18:30:07 | ryukoposting | I 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:16 | xace_ | *make a video myself |
18:30:42 | FromDiscord | <juan_carlos> Video about MultiSync, thats something not many langs have. |
18:30:56 | xace_ | yeah, there are multiple options, hence i referred to it as "multi threading" but actually any concurency / parallelism in nim |
18:31:25 | ryukoposting | yeah, 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:25 | xace_ | actually meant* jesus, my mistakes in chats are gettings really bad.... |
18:32:39 | xace_ | 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:49 | xace_ | geez. i think im having the keyboard typing variation of stroke symptoms |
18:34:05 | ryukoposting | I have a propensity for fat-fingering the enter key, you're not alone |
18:34:51 | xace_ | :) i even bound capslock to the enter key, akimbo enter. double the fire rate *pew pew pew* |
18:35:08 | ryukoposting | thank 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:59 | xace_ | Well I'm looking forward to it. I even learned your website url by heart... |
18:36:09 | FromDiscord | <juan_carlos> Dont feel like you got to be a guru to make a video tho... :) |
18:36:09 | ryukoposting | The 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:57 | narimiran | ryukoposting: i like it that they are on your site! |
18:37:09 | FromGitter | <iffy> @Varriount thnks for that link |
18:37:37 | FromGitter | <Clyybber> ryukoposting: My gitlab ci also builds nim from source everytime. |
18:37:40 | ryukoposting | I 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:40 | narimiran | and for more exposure, post link to it here, on reddit, our telegram channel, forum, etc. |
18:37:48 | FromGitter | <Clyybber> I tried to use the docker images, but they are outdated |
18:38:02 | xace_ | 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:26 | ryukoposting | Clyybber 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:31 | narimiran | and with couple videos more, i'll put your site on our learn section of the website |
18:38:56 | FromGitter | <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:00 | narimiran | oh, and add twitter to that list above |
18:39:15 | FromGitter | <Clyybber> ryukoposting Are you using nimble in your gitlab-runner? |
18:39:21 | ryukoposting | xace_ I've been trying to un-google, if that makes any sense, so youtube would kinda defeat that. |
18:39:26 | narimiran | ryukoposting: just mention @nim_lang there and you'll be officially retweeted :) |
18:39:52 | ryukoposting | but 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:56 | xace_ | 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:17 | ryukoposting | Clyybber yes |
18:40:22 | narimiran | haha, you think we're that popular? :D |
18:40:23 | FromDiscord | <juan_carlos> For maximum exposure theres https://restream.io allows to send a prerecorded video as "live" |
18:40:45 | xace_ | ryukoposting: i can spare 250GB a month on a 1GB network, I don't have https though |
18:41:18 | FromGitter | <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:21 | ryukoposting | I get 1TB/month on my VPS, latency is bad since the thing's in Romania but the speeds are fantastic |
18:42:13 | xace_ | oh, whats the monthly fee for thata? |
18:42:21 | ryukoposting | $10/month |
18:42:29 | narimiran | GTFO |
18:42:44 | ryukoposting | i got a sweet deal, dude |
18:42:54 | xace_ | any limitations on the cpu usage ? any link you can send my way? |
18:43:16 | ryukoposting | oh yeah, it's only got ~1GB of RAM and a since vcpu core, but that's enough for my purposes |
18:43:33 | xace_ | ah, nim will run just fine on that :) |
18:43:53 | ryukoposting | sadly 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:44 | xace_ | 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:19 | ryukoposting | I've got 3 roommates, I know the feel |
18:45:25 | FromGitter | <Clyybber> ryukoposting: Any reason you are running build.sh instead of build_all.sh in your gitlab-runner? |
18:46:02 | ryukoposting | Clyybber ? |
18:46:10 | ryukoposting | not sure what you mean |
18:46:51 | FromGitter | <Clyybber> You are running build.sh to build nim, and then manually invoke koch to build the tools and stuff |
18:47:07 | FromGitter | <Clyybber> running build_all.sh would handle that for you |
18:47:09 | FromGitter | <Clyybber> I think |
18:47:20 | ryukoposting | oh, it just follows the instructions on the website, didn't know there was another script that would do it for me |
18:47:24 | FromGitter | <Clyybber> I do it like this: https://gitlab.com/Clyybber/wyven/blob/master/.gitlab-ci.yml |
18:47:35 | FromGitter | <Clyybber> Theres some vulkan related stuff there though. |
18:47:46 | FromGitter | <Clyybber> And a workaround for a nimble package name conflict |
18:48:11 | ryukoposting | CI_COMMIT_TAG... is that some magic environment variable? |
18:48:20 | FromGitter | <Clyybber> Yep |
18:48:24 | ryukoposting | nice |
18:48:31 | * | ng0 quit (Quit: Alexa, when is the end of world?) |
18:48:38 | FromGitter | <Clyybber> Its documented here: https://gitlab.com/help/ci/variables/README.html#predefined-variables-environment-variables |
18:49:02 | ryukoposting | oh sweet, that's super useful |
18:49:26 | * | planetis[m] joined #nim |
18:49:28 | FromGitter | <Clyybber> Indeed |
18:51:43 | FromGitter | <Clyybber> Also, kind of useless tip, but you can leave out the y in apt-get install -yqq, because -qq implies -y |
18:52:24 | ryukoposting | oh cool, didn't notice that. that part is just copied from my boilerplate for gitlab CI files |
18:53:04 | FromGitter | <Clyybber> At least it should according to the manpage... haven't tested it though, so don't quote me on it :P |
18:53:38 | ryukoposting | I mean, it does the job the way it is, and I don't think it's hurting anything lol |
18:53:52 | ryukoposting | the bigger concern is building the damn compiler every single time I run tests |
18:54:48 | FromGitter | <Clyybber> yeah |
18:55:50 | FromGitter | <Clyybber> Calinou AFAIK the nightlies are only built for winows |
18:56:03 | FromGitter | <Clyybber> And the linux releases just contain the source. |
18:59:33 | ryukoposting | which 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:56 | Calinou | narimiran: 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:03 | Calinou | uptime is pretty good too, but it's not really guaranteed |
19:06:30 | xace_ | Calinou: what's the pricing? / link? |
19:06:31 | Calinou | (8 vCores, 15 GB RAM, 60 GB SSD, 100Mb/s+ unmetered bandwidth on Ubuntu 18.04 for €15/month) |
19:06:47 | Calinou | most of them only speak French, so it's going to be difficult if you need support |
19:07:11 | Calinou | it'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:45 | FromDiscord | <Avatarfighter> Calinou: Mind sharing the vps provider? |
19:30:29 | * | ng0 joined #nim |
19:41:45 | FromGitter | <iffy> Any tips to for how wrap my procs in `extern "C" { ... }` for a static lib? |
19:42:02 | FromGitter | <iffy> I guess I need to wrap the declarations, too |
19:42:51 | FromGitter | <Varriount> @iffy Use the exportc pragma? |
19:43:12 | FromGitter | <iffy> I am already |
19:43:46 | FromGitter | <Varriount> On the procedure's declaration? |
19:44:24 | FromGitter | <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:37 | FromGitter | <Varriount> So your doing something like `proc foo(): {.exportc.} = ...`? |
19:46:42 | FromGitter | <iffy> right |
19:46:43 | FromGitter | <Varriount> That should work... |
19:47:01 | FromGitter | <iffy> It works on macOS and Linux, but not on Windows when I link using VS |
19:47:44 | FromGitter | <iffy> I compile the static lib using nim (which uses gcc) and then try to link against the static lib using VS |
19:48:07 | FromGitter | <iffy> but the VS linker can't find the symbols |
19:48:35 | FromGitter | <iffy> I reproduced the problem with a simple c program (no nim) and the linker gave the same error |
19:49:07 | FromGitter | <iffy> the error was fixed when I added `extern "C" { ... }` around the declaration and ... is it definition? implementation? |
19:50:39 | FromGitter | <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:15 | FromGitter | <iffy> hmm... maybe it's a calling convention thing? different calling conventions would result in different symbols, right? |
19:55:55 | FromGitter | <Varriount> @iffy Oh, you can't do that. |
19:56:05 | FromGitter | <iffy> Can't do what? |
19:56:46 | FromGitter | <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:52 | FromGitter | <Varriount> Unless you're using mingw? |
19:57:01 | FromGitter | <iffy> mingw for GCC, yes |
19:57:19 | FromGitter | <iffy> for VC... whatever node-gyp installed |
19:57:32 | FromGitter | <iffy> can I get Nim to use VC? |
19:58:53 | FromGitter | <Varriount> Yeah |
19:59:35 | * | rnrwashere quit (Remote host closed the connection) |
19:59:49 | FromGitter | <iffy> ooo, I'll scan through this: https://forum.nim-lang.org/t/2770 |
20:00:46 | FromGitter | <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:58 | FromGitter | <Varriount> For example `--cc:clang` or `--cc:vcc` |
20:01:07 | FromGitter | <iffy> just found that: https://forum.nim-lang.org/t/2770#21109 |
20:01:13 | FromGitter | <iffy> awesome! I'll try it out |
20:01:42 | FromGitter | <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:24 | FromGitter | <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:47 | FromGitter | <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:48 | FromGitter | <iffy> `--verbosity:2` shows it's trying to call `lib` not `cl` -- okay, I'll dig deeper |
20:13:52 | FromGitter | <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:21 | FromGitter | <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:08 | Araq | deech: nope, but I know how to do it |
22:00:05 | FromGitter | <Varriount> @iffy Have you managed to make any progress? |
22:00:34 | FromGitter | <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:17 | FromGitter | <Varriount> @iffy Have you taken a look at https://github.com/nim-lang/Nim/tree/devel/tools/vccexe ? |
22:01:53 | FromGitter | <iffy> @Varriount it looks like doing `--cc:vcc` uses vccexe already. At least, I see it being called in the output |
22:02:47 | FromGitter | <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:59 | FromGitter | <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:23 | FromGitter | <Varriount> Can't you just add lib.exe to your PATH environment variable? |
22:04:31 | FromGitter | <Varriount> Or rather, the directory it lies in? |
22:05:30 | FromGitter | <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:52 | FromGitter | <iffy> the VBox guest additions don't ever seem to have the same environment as a legit cmd terminal |
22:07:55 | FromGitter | <iffy> (it probably doesn't help that I don't understand Windows users/environments/permissions) |
22:17:19 | FromGitter | <Varriount> Make sure to use a semicolon as the path separator, not a colon |
22:20:44 | FromGitter | <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:03 | FromGitter | <Varriount> It generally sets up all the environment variables that one needs to invoke the compiler correctly. |
22:22:17 | FromGitter | <iffy> the vcvarsall.bat thing? |
22:22:51 | * | rnrwashere joined #nim |
22:23:03 | FromGitter | <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:49 | FromGitter | <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:25 | FromGitter | <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:17 | FromGitter | <iffy> k, now I'm getting a nim error: nimbase.h(490): error C2118: negative subscript |
22:34:33 | FromGitter | <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:45 | FromGitter | <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:48 | FromGitter | <iffy> bah, I'm so sick of node/node-gyp |
23:43:32 | * | Trustable quit (Remote host closed the connection) |