00:08:52 | * | krux02[m] quit (Ping timeout: 240 seconds) |
00:08:52 | * | zielmicha[m] quit (Ping timeout: 240 seconds) |
00:08:53 | * | Miguelngel[m] quit (Ping timeout: 240 seconds) |
00:08:54 | * | libman[m] quit (Ping timeout: 246 seconds) |
00:08:55 | * | mgdelacroix[m] quit (Ping timeout: 246 seconds) |
00:08:57 | * | solitudesf quit (Ping timeout: 245 seconds) |
00:09:13 | * | byteflame quit (Ping timeout: 256 seconds) |
00:09:13 | * | pqflx3[m] quit (Ping timeout: 256 seconds) |
00:09:17 | * | Demos[m] quit (Ping timeout: 256 seconds) |
00:09:21 | * | stisa quit (Ping timeout: 240 seconds) |
00:09:22 | * | TheManiac quit (Ping timeout: 240 seconds) |
00:09:27 | * | dyce[m] quit (Ping timeout: 260 seconds) |
00:09:40 | * | notdekka[m] quit (Ping timeout: 256 seconds) |
00:09:47 | * | narimiran[m] quit (Ping timeout: 256 seconds) |
00:09:48 | * | Abnegation quit (Ping timeout: 256 seconds) |
00:09:58 | * | kunev quit (Ping timeout: 264 seconds) |
00:10:02 | * | petersjt014[m] quit (Ping timeout: 260 seconds) |
00:10:02 | * | unclechu quit (Ping timeout: 260 seconds) |
00:10:20 | * | planetis[m] quit (Ping timeout: 256 seconds) |
00:11:21 | * | kunev joined #nim |
00:16:08 | * | dada78641 quit (Ping timeout: 256 seconds) |
00:19:26 | * | dada78641 joined #nim |
00:21:02 | * | macsek1911[m] quit (Ping timeout: 276 seconds) |
00:21:41 | * | survivorm[m] quit (Ping timeout: 276 seconds) |
00:26:18 | * | xkapastel quit (Quit: Connection closed for inactivity) |
00:26:18 | * | krux02 quit (Remote host closed the connection) |
00:39:18 | * | BitPuffin quit (Remote host closed the connection) |
00:50:32 | * | xkapastel joined #nim |
01:07:21 | FromGitter | <amscotti> Is there a way to unpack an array? I would like to do something like `let a,b,c = myArray`, where my `myArray` has 3 items in it. |
01:08:18 | FromDiscord | <jos> nim support destructuring but i'm not sure if it supports it out of an array |
01:20:26 | FromGitter | <amscotti> Yeah, I can't find anything in the docs with unpacking arrays only tuples. |
01:25:25 | * | couven92 joined #nim |
01:44:34 | FromGitter | <cabhishek> yes, correctly. Only tuple unpacking is supported |
01:47:17 | FromGitter | <Varriount> It would be neat if tuple unpacking was generalized via a special procedure (like other operators) |
01:50:20 | FromGitter | <cabhishek> yeah, I wonder whats preventing it. |
01:53:53 | FromGitter | <Varriount> Probably implementation complexity. |
01:55:06 | FromDiscord | <claude> or that it would call for more pattern matching in variables which would take a lot of time |
01:55:49 | FromGitter | <Varriount> You might be able to use a term-rewriting macro or converter. |
02:02:46 | * | NimBot joined #nim |
02:21:46 | FromDiscord | <claude> do you guys know where the download for nimedit is, nim-lang.org/nimedit/download just redirects to nim-lang.org/install which is for installing nim |
02:30:39 | * | dddddd quit (Remote host closed the connection) |
02:36:44 | Tanger | claude: You could try the repo? https://github.com/Araq/nimedit |
04:04:19 | * | couven92 quit (Quit: Client Disconnecting) |
04:04:39 | * | wishi_ joined #nim |
04:04:59 | * | max3 quit (Quit: Connection closed for inactivity) |
04:05:25 | * | wishi quit (Remote host closed the connection) |
04:12:51 | FromGitter | <gogolxdong> How to debug with line and file information? |
04:13:12 | FromGitter | <gogolxdong> if crash. |
04:25:31 | FromGitter | <gogolxdong> sorry , how to print stack trace after catching exception? |
04:26:05 | * | MyMind joined #nim |
04:26:29 | * | Sembei quit (Ping timeout: 265 seconds) |
04:34:06 | FromGitter | <gogolxdong> echo getCurrentException().getStackTrace() print a newline. |
04:37:49 | shashlick | instantiationInfo() |
04:57:35 | * | macsek1911[m] joined #nim |
04:57:35 | * | narimiran[m] joined #nim |
04:57:52 | * | Pisuke joined #nim |
04:58:21 | * | MyMind quit (Ping timeout: 240 seconds) |
05:00:24 | * | unclechu joined #nim |
05:06:44 | * | Abnegation joined #nim |
05:08:54 | * | dyce[m] joined #nim |
05:23:48 | * | Demos[m] joined #nim |
05:28:33 | * | zielmicha[m] joined #nim |
05:29:10 | * | petersjt014[m] joined #nim |
05:30:39 | * | planetis[m] joined #nim |
05:35:21 | * | pqflx3[m] joined #nim |
05:38:04 | * | solitudesf joined #nim |
05:39:17 | * | TheManiac joined #nim |
05:39:18 | * | Miguelngel[m] joined #nim |
05:39:18 | * | libman[m] joined #nim |
05:39:52 | * | mgdelacroix[m] joined #nim |
05:41:10 | * | survivorm[m] joined #nim |
05:41:10 | * | notdekka[m] joined #nim |
05:44:48 | * | byteflame joined #nim |
05:45:54 | * | krux02[m] joined #nim |
05:46:00 | * | stisa joined #nim |
05:50:03 | * | nsf joined #nim |
06:06:14 | * | r3d9u11 joined #nim |
06:13:14 | FromGitter | <Varriount> @gogolxdong Usually just compiling in debug mode will cause exceptions to print stack traces by default. |
06:13:27 | FromGitter | <Varriount> (or rather *not* compiling with -d:release) |
06:54:05 | * | themagician joined #nim |
06:57:12 | * | PMunch joined #nim |
06:58:06 | * | chemist69 joined #nim |
07:01:59 | * | r3d9u11 quit (Ping timeout: 260 seconds) |
07:04:55 | * | yglukhov joined #nim |
07:08:37 | * | yglukhov quit (Remote host closed the connection) |
07:08:57 | * | yglukhov joined #nim |
07:44:19 | * | Arrrr joined #nim |
07:44:19 | * | Arrrr quit (Changing host) |
07:44:19 | * | Arrrr joined #nim |
07:52:35 | * | user1101 joined #nim |
07:57:52 | FromGitter | <mratsim> @jos, for ifdef you can pass preprocessor instruction -DYOURDEF like here -DTTMATH_NOASM: https://github.com/status-im/nim-ttmath/blob/master/src/ttmath.nim#L9 |
07:59:12 | FromGitter | <mratsim> @amscotti I’m pretty sure there was some recent unpackArrays discussion but it seems like the only related thing I found is just this: https://gist.github.com/gradha/8140318 |
07:59:25 | FromGitter | <mratsim> note that it’s from 4 years ago |
08:01:14 | FromGitter | <mratsim> parseStmt / using string can be replaced by `result = newPar(); array_input.copyChildrenTo result` I suppose |
08:05:51 | FromGitter | <mratsim> @zacharycarter Here is the Java truth: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition |
08:08:25 | FromGitter | <mratsim> "First, the dominant Java culture is one of mediocrity and bad taste, with MetaModelVibratorVisitorFactory classes dominating” wow, such anger. but I’m glad I only had to deal with Java from support/devops/sysadmin standpoint |
08:10:57 | livcd | mratsim: that does not make it bearable. Often it's terrible |
08:14:22 | * | rokups joined #nim |
08:28:54 | Araq | claude every user of NimEdit now has to sign a contract where he promises to fix one of the bugs in the issue tracker. :-) |
08:32:57 | * | yglukhov quit (Ping timeout: 240 seconds) |
08:33:16 | FromDiscord | <claude> haha, well good luck to those 6 people then |
08:34:27 | * | yglukhov joined #nim |
08:36:25 | Araq | at least it compiles with 0.18 :P |
08:36:31 | Araq | (I hope) |
08:38:31 | FromDiscord | <claude> this one's fairly easy https://github.com/Araq/nimedit/issues/7 |
08:44:29 | Araq | do it :-) |
08:52:05 | * | sleepyqt joined #nim |
09:13:25 | FromGitter | <allochi_twitter> @data-man, thanks, I tried `-d:nimPinToCpu` same problem, and I also tried same code on another MacBook Pro, I though maybe something on my machine, but it’s the same problme on the other machine, this is quit important really, since threadpool is the prefered way to manage threading in Nim, but it’s not working correctly in macOS. I will allocate some time to debug this. |
09:15:30 | FromGitter | <Bennyelg> How I can do something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad5bb32270d7d3708d65227] |
09:19:54 | FromDiscord | <claude> `let s = Job(name: "helloTest", procedure: proc() = test("HELLO WORLD"))` |
09:38:54 | yglukhov | Araq: I'd like to write a file during compile time, to which multiple disjoint macro invocations contribute. One way would be updating a compiletime-var state with every macro and flushing it to the file over and over. The downside is that the file would be rewritten lots of times (on every invocation). Can you see a better approach? |
09:39:58 | yglukhov | In other words, there's a compile-time variable, which is updated a lot of times, and i want to call one last compile-time action on it, when i'm sure noone is going to update it again. If that makes sense? |
09:41:20 | Araq | that's what I did too |
09:41:39 | yglukhov | rewrite on every change? |
09:47:47 | Araq | no, call a proc in a static context to write it. |
09:48:22 | yglukhov | but i never know if it's still going to be updated during this compilation run. |
09:50:36 | yglukhov | let's say i want to provide users of my lib with a nice api of subclassing java classes. the subclasses can be defined in user modules in arbitrary order. every subclass definition appends to the generated single java file under the hood. |
09:51:24 | yglukhov | so in my lib module i can't say "static: flushJavaFile()", because user definitions will follow after that |
09:54:15 | FromGitter | <alehander42> so you're looking for something like `addQuitProc` in compiletime context ? |
09:54:23 | yglukhov | yep, kinda |
09:59:51 | * | sendell joined #nim |
10:04:59 | * | BitPuffin joined #nim |
10:18:15 | Araq | yglukhov, yeah you have to export this and make the clients call it, I'm afraid |
10:18:44 | yglukhov | ok |
10:22:57 | Araq | alternatively all of the code has to be in a |
10:23:00 | Araq | section: |
10:23:09 | Araq | so that the macro knows where things end. |
10:23:33 | yglukhov | yes. alternatively every macro just rewrites the file completely =) |
10:25:47 | * | Vladar joined #nim |
10:26:57 | * | Suigetsu joined #nim |
10:38:10 | * | user1101 quit (Ping timeout: 265 seconds) |
10:38:38 | * | user1101 joined #nim |
10:48:31 | * | xet7 joined #nim |
10:49:06 | * | hal1 joined #nim |
10:54:20 | * | xet7 quit (Remote host closed the connection) |
10:54:37 | * | vantage joined #nim |
10:58:35 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
10:58:57 | hal1 | Hello. I compiled a binary on windows 10 with the 64bit mingw. It runs on my machine. I then gave that binary to someone else, who tried to run it on his windows 10, but he got an error stating pcre64.dll could not be found. |
10:59:13 | FromGitter | <krux02> is it possible to generate a searchable documentation index of all installed inmble packages? |
10:59:20 | * | xet7 joined #nim |
11:00:16 | FromGitter | <krux02> hal1: well in windows you can include dll files in the binary path and windows will find them, so include it in your binary |
11:00:38 | hal1 | I looked for this .dll on my computer but was not able to find it strangely |
11:00:54 | * | vantage joined #nim |
11:01:26 | * | vantage quit (Client Quit) |
11:01:43 | FromGitter | <krux02> hal1: if you had Linux I would know a tool that tells you exactly where all dynamic libraries are found that are used in a binary |
11:01:59 | FromGitter | <krux02> but on windows, maybe that tool is included in mingw, I don't know |
11:02:15 | * | dddddd joined #nim |
11:02:27 | FromGitter | <krux02> does your mingw have an instance of ldd? |
11:02:34 | dom96 | hal1: It's somewhere in your PATH |
11:02:38 | * | vantage joined #nim |
11:02:45 | dom96 | Likely in $nim/bin |
11:03:11 | dom96 | or C:\Documents and Settings\YourUsername\.nimble\bin (not sure if that's the exact path but you get the idea) |
11:03:27 | hal1 | krux02[m]: I tried the --passL:static flag or something similar but that did not change it. I'll have to look again |
11:03:41 | dom96 | You can't statically link pcre easily |
11:03:48 | dom96 | You just have to send the pcre dll with your program |
11:03:54 | hal1 | oh ok, I limited my search to the dlls in windows folder |
11:03:55 | dom96 | or use the native regex package |
11:04:05 | dom96 | which doesn't have a dependency on pcre |
11:04:08 | FromGitter | <krux02> hal1: you can leave out the [m] part of my name it is just a tag for the gitter bridge |
11:04:15 | dom96 | This one: https://github.com/nitely/nim-regex/ |
11:04:20 | hal1 | that it is in PATH and probbaly nim somewhere makes sense |
11:05:14 | hal1 | I don't even actively use regex. I imported strutils to have an easy replace(). replace is all I used |
11:05:25 | FromGitter | <krux02> dom96: I think nimble should do something about this pcre dependency. maybe warn about that it is a system requirement or something. I think it is quite bad to find out this late that a dependency is missing |
11:05:31 | FromGitter | <tim-st> does anyone know what are the most relevant cons of a rust backend for nim? |
11:05:50 | FromGitter | <tim-st> (besides compile time and no c support) |
11:05:53 | FromGitter | <krux02> @tim-st: you mean compile nim to rust? |
11:05:57 | FromGitter | <tim-st> yes |
11:06:07 | FromGitter | <krux02> well, you would have to implement it |
11:06:18 | * | xkapastel quit (Quit: Connection closed for inactivity) |
11:06:18 | dom96 | krux02: nimble? Why would Nimble do anything? It doesn't know anything about which dll your program is using |
11:06:20 | FromGitter | <krux02> and that is a lot of work |
11:06:22 | dom96 | Nim does |
11:06:51 | dom96 | I made a feature request for a flag that lists all DLLs in your program |
11:06:53 | FromGitter | <tim-st> I had a look at it, they have much in common, rust has no safe global mutual values and no recursive types |
11:06:54 | dom96 | It's in the issues somewhere |
11:07:03 | hal1 | hm or maybe it could be docopt that requires pcre |
11:07:09 | hal1 | do you know if strutils does? |
11:07:13 | dom96 | hal1: it's docopt |
11:07:15 | FromDiscord | <claude> nim doesnt have traits |
11:07:32 | FromDiscord | <claude> as in, you cant have concepts in rust |
11:07:37 | FromGitter | <krux02> dom96: well, I am not surce who is supposed to know what, but I am pretty sure that some package come with pcre |
11:07:44 | hal1 | too bad, that made the commandline arguments so easy ;) |
11:07:59 | hal1 | but I can write something basic for that myself now that I know |
11:08:05 | FromGitter | <krux02> so when that package is used, the binary won't be simply distributable anymore. |
11:09:01 | FromGitter | <krux02> claude: I used scala for a long time, Scala has traits. And the generics in Nim are less safe, yes. But much simpler and more powerful. |
11:09:08 | dom96 | hal1: https://github.com/docopt/docopt.nim/issues/33 :) |
11:09:14 | dom96 | Would be a nice PR :) |
11:09:20 | FromGitter | <krux02> the rust concepts forbid to implement a trait for a foreign type. |
11:09:37 | dom96 | krux02: 'pcre' is in the stdlib, how can Nimble know about it? |
11:09:59 | FromGitter | <krux02> and that is a pillar of their safety mechanisnms. b) pretty annoying. |
11:10:35 | FromGitter | <tim-st> ok, thanks |
11:11:18 | FromGitter | <krux02> dom96: I don't know, but nimble should know about it. Maybe if a package come with a dll bundled, it should explicitly tell nimble: "hey nimble, look I have here some windows stuff put on the path" |
11:11:55 | FromGitter | <krux02> @tim-st with foreign type, I just mean a type of a different module |
11:12:16 | hal1 | dom96: that would be a nice PR. Without having looked at the docopt code yet I'm thinking it might be too much for me but I'll have a look later |
11:12:29 | FromGitter | <krux02> In nim you can just add "methods" to types of a different module, and that is what makes nim so flexible and great. |
11:13:01 | FromGitter | <krux02> I really like it. It feels like sombody took off some handcuffs and let me program freely. |
11:14:03 | FromGitter | <tim-st> I also really like nim, but rust seems very safe and secure, even if only 90% of nim features could be implemented that would be the perfect language |
11:14:10 | FromGitter | <krux02> dom96: is there a way in nimble to generate a documentation index for all nimble packages? |
11:14:25 | dom96 | krux02: Nim should provide this info, it can read all the {.dynlib.} pragmas and report what they are |
11:14:38 | dom96 | krux02: no |
11:14:54 | FromGitter | <krux02> dom96: can I make a feature request about it? |
11:15:21 | dom96 | krux02: sure, if you explain exactly what you want. |
11:15:27 | FromGitter | <krux02> I would like to have a page like "theindex", but with all packages that are currently installed |
11:15:31 | dom96 | All installed packages? |
11:15:38 | FromGitter | <krux02> yes |
11:15:45 | FromGitter | <krux02> all joined in a single index |
11:16:13 | dom96 | Not sure if Nim would support that |
11:16:17 | dom96 | but would be nice |
11:16:43 | FromGitter | <krux02> I make a feature request |
11:25:25 | * | Suigetsu quit (Remote host closed the connection) |
11:31:07 | hal1 | nre (which uses pcre) and is used by docopt has a proc match and so does nim-regex. Those procs have very similar signatures. If it was as easy as changing the import from nre to nim-regex someone would surely have done it by now but I'll do that anyway and see how far I get with my naive approach ;) |
11:32:06 | FromGitter | <krux02> I made the feature request: https://github.com/nim-lang/nimble/issues/479 |
11:33:50 | dom96 | hal1: nim-regex is fairly new, so I wouldn't be surprised if it is that easy, but nobody did it yet :) |
11:56:55 | FromGitter | <krux02> hmm how do I get the length of a set http://ix.io/1810 |
11:57:09 | FromGitter | <krux02> calling `len` on a `set` doesn't seem to work |
11:58:41 | FromGitter | <allochi_twitter> @Araq sorry to bother you again, there is a problem in nim treadpool on macOS, I posted an issue on https://github.com/nim-lang/Nim/issues/7638, it’s too late for this project by now, and I will have to write the whole thing again in a different language, could you please look into it. Thanks! |
12:00:37 | * | smt joined #nim |
12:00:57 | * | SenasOzys quit (Ping timeout: 264 seconds) |
12:01:51 | FromGitter | <stisa> @krux02 maybe https://nim-lang.org/docs/system.html#card,set[T] ? not sure if card and len are different for a set |
12:06:07 | FromGitter | <krux02> @stisa, thanks a lot it is what I was looking for. |
12:08:11 | * | SenasOzys joined #nim |
12:14:31 | * | vantage left #nim (#nim) |
12:14:54 | * | vantage joined #nim |
12:17:06 | FromGitter | <narimiran> @krux02 see set inconsistencies: https://github.com/nim-lang/Nim/issues/7556 |
12:17:37 | FromGitter | <narimiran> tl;dr: we should add `len` to sets |
12:17:37 | * | dddddd quit (Ping timeout: 256 seconds) |
12:18:06 | * | dddddd joined #nim |
12:33:54 | dom96 | Is there any support for inheritance when wrapping C++ objects? |
12:34:27 | dom96 | I need to check whether it is safe to cast, would be nice if `of` worked seamlessly |
12:34:33 | dom96 | but I guess I need to wrap dynamic_cast |
12:35:45 | * | Suigetsu joined #nim |
12:41:09 | FromGitter | <krux02> dom96: I don't think of unless it is mapped to dynamic_cast |
12:43:32 | FromGitter | <krux02> I wonder how I can overload a proc for the empty set |
12:50:27 | * | xet7 quit (Ping timeout: 240 seconds) |
12:51:50 | FromGitter | <tim-st> what do you mean with empty set? is this an own type? |
12:54:13 | * | Suigetsu quit (Remote host closed the connection) |
12:57:17 | * | smt` joined #nim |
13:00:21 | * | smt quit (Ping timeout: 264 seconds) |
13:00:39 | vantage | hello all. im new to nimm |
13:02:37 | PMunch | Hi vantage, welcome to Nim :) |
13:03:16 | * | xet7 joined #nim |
13:08:19 | vantage | nim is nice. its got a great future ahead of it if it can keep up the momentum |
13:08:35 | * | sleepyqt quit (Ping timeout: 240 seconds) |
13:10:10 | * | Arrrr quit (Read error: Connection reset by peer) |
13:10:52 | PMunch | Agreed :) |
13:11:12 | PMunch | And I have no doubt that it will, more people are discovering it every day! |
13:13:43 | vantage | yeah, but even if they don't as long as nim has an semi ide then its fine, cause im not really afraid of getting boxed in by it... |
13:14:39 | vantage | what type of project are you working on PMunch? |
13:15:09 | PMunch | Currently I'm working on a native implementation of protobuf in Nim |
13:15:22 | PMunch | But I've done all sorts of things in it in the past |
13:15:33 | PMunch | From web-servers, games, and even my masters thesis |
13:16:48 | vantage | what about webservers... like nim doesnt have anything as solid as django atm |
13:17:02 | * | rockcavera quit (Ping timeout: 276 seconds) |
13:17:58 | vantage | i dont even know how youd go about deploying it... maybe docker... |
13:18:03 | PMunch | Well I've used Jester in the past with great success |
13:18:21 | * | rockcavera joined #nim |
13:18:22 | * | rockcavera quit (Changing host) |
13:18:22 | * | rockcavera joined #nim |
13:18:40 | PMunch | Personally I have my own server, but both the Nim forums and play.nim-lang.org are written in Nim and I think they both run on docker instances. |
13:18:55 | PMunch | Well maybe not the forums, but play.nim-lang.org I'm pretty sure uses docker |
13:19:54 | vantage | nim also has a webserver example that ive seen |
13:22:13 | vantage | what was your thesis about pmunch |
13:25:09 | FromGitter | <zetashift> Nim mentioned in this: https://sdevprog.blogspot.nl/2018/04/overview-of-efficient-programming.html :O |
13:25:45 | PMunch | vantage, I'm recording a small video-series on how to create a web-site in Nim, hopefully that won't take as long as some of my other projects have taken. My masters was about DDoS mitigation from the inside out. |
13:26:34 | FromGitter | <narimiran> PMunch: when is your presentation, btw? |
13:28:00 | FromGitter | <zetashift> Also the Nim in Action book has a great chapter about making a twitter clone in Nim + Jester |
13:28:41 | vantage | pmunch: was it a theory or a report... i dont really know how thesis work but i get the feeling its when you bring a new idea/concept to the field |
13:28:56 | PMunch | zetashift, interesting link :) |
13:29:05 | PMunch | narimiran, presentation? |
13:29:15 | PMunch | The one I held yesterday? |
13:30:20 | FromGitter | <narimiran> haha, i thought it is today :) |
13:30:23 | PMunch | vantage, it was a small program along with a longer report detailing how the system was envisioned to work along with benchmarks and such :) |
13:30:30 | FromGitter | <narimiran> how was it? |
13:30:41 | PMunch | narimiran, it was good. People seemed to enjoy it |
13:30:53 | FromGitter | <diegogub> Someone using nim as JS? Is it possible to do AJAX requests? |
13:31:06 | PMunch | But not too many people there, maybe we'll have to invite te a workshop with pizza :) |
13:31:12 | PMunch | Always a hit with university students |
13:31:14 | FromGitter | <narimiran> will there be a video? |
13:31:20 | FromGitter | <zetashift> @diegogub I don't but we have this: https://github.com/stisa/ajax |
13:31:54 | PMunch | narimiran, unfortunately not. We didn't have time to figure out how the recording system worked.. |
13:32:31 | FromGitter | <narimiran> maybe next time.... both pizza and video :) |
13:33:09 | PMunch | That would be great! |
13:33:43 | FromGitter | <diegogub> @zetashift thank you, I will check it. |
13:33:47 | vantage | why isnt there a js2nim program? |
13:33:53 | PMunch | We wanted to have a workshop part of this thing as well, but didn't have time to properly plan it |
13:35:08 | FromGitter | <narimiran> workshop seems like a good idea! |
13:35:46 | PMunch | We'd have to create some tasks though |
13:35:49 | PMunch | Which is the real work |
13:36:10 | PMunch | Maybe even some fun challenges with a point system to allow people to "compete" |
13:37:41 | FromGitter | <alehander42> @vantage what do you mean "js2nim" program? as in converting js type definitions to nim (e.g. typescript def), or converting js code to nim? |
13:38:10 | FromGitter | <alehander42> the second one wouldn't make a lot of sense, as you can easily reuse all your js code with Nim anyway |
13:38:46 | FromGitter | <alehander42> the first one, there is something like that https://github.com/mcclure/dts2nim |
13:39:01 | vantage | alehander like c2nim for js |
13:39:09 | Yardanico | vantage, there's none I know of |
13:39:13 | Yardanico | but you can wrap JS libraries very easily |
13:39:16 | FromGitter | <alehander42> so I guess ^ dts2nim is closest |
13:39:26 | FromGitter | <alehander42> but it's a bit older, I promised the author to update it eventually with newer nim features |
13:39:52 | FromGitter | <alehander42> but after py2nim I wanted to just rewrite it in nim and also autodetect int/float differences |
13:40:04 | FromGitter | <alehander42> (and add async annotations and `js` for `any`) |
13:40:10 | FromGitter | <alehander42> just didn't have much time until now |
13:40:41 | vantage | you can reuse js code but then its in js... correct me if im wrong, can you use js code from emscripten |
13:41:55 | FromGitter | <alehander42> aah, so you want to interact with js from native Nim code compiled with erm.. ? |
13:45:21 | vantage | aleh* so you created py2nim? |
13:47:38 | * | sleepyqt joined #nim |
13:48:15 | FromGitter | <zetashift> Him and zah I think |
13:48:22 | FromGitter | <alehander42> @zah and me created py2nim, but py2nim goal is to help with porting python code, not wrapping it, so I am not yet sure which of the two you want from a js2nim tool |
13:48:51 | vantage | dts2nim seems fine ;) |
13:49:30 | vantage | non care as long as it works |
13:50:45 | FromGitter | <alehander42> great, please let us know if you have any issues with it |
13:51:32 | vantage | will do |
13:52:10 | vantage | is the irc here linked to matrix and gitter? or are there places that are seperate? |
13:52:12 | * | tiorock joined #nim |
13:52:13 | * | tiorock quit (Changing host) |
13:52:13 | * | tiorock joined #nim |
13:52:13 | * | rockcavera quit (Killed (adams.freenode.net (Nickname regained by services))) |
13:52:13 | * | tiorock is now known as rockcavera |
13:54:00 | FromGitter | <alehander42> it is linked to gitter(I am on gitter right now) and I think discord and matrix? not sure about the other ones |
13:54:30 | FromGitter | <alehander42> but mostly you have the one chat (irc gitter etc) , nim forum and the nim subreddit |
13:55:51 | vantage | was just wondering. matrix only came out a few years back, right? |
14:02:44 | FromGitter | <alehander42> it is relative new indeed |
14:03:12 | FromGitter | <alehander42> relatively* |
14:03:34 | FromGitter | <alehander42> I think most ppl in this chat use irc or gitter tho |
14:04:26 | vantage | ive realized that. |
14:05:18 | PMunch | I've been meaning to try matrix, just haven't gotten around to it |
14:05:42 | vantage | anyway back to nim, would compiling my dependancies to a dll and linking to that speed up my compiling time? |
14:06:01 | Yardanico | not really |
14:06:08 | vantage | whay |
14:06:18 | Yardanico | Nim will still have to analyze .nim files of these deps |
14:06:29 | vantage | what, why not :'( |
14:06:30 | Yardanico | and nim doesn't compile C files of modules if nothing changed |
14:06:49 | Yardanico | in these modules |
14:07:15 | vantage | but sometimes the compilation takes ages,,, well three seconds |
14:07:52 | shashlick | Off topic but have a problem on my laptop, if I run an ftp or, proxy server and try to connect to it from remote server over VPN, I get recv failure, connection reset |
14:08:04 | PMunch | vantage, for what kind of program? |
14:08:25 | vantage | pmunch, simple gui app |
14:08:28 | shashlick | Firewall is configured properly, I get a log entry on server but just that client disconnected |
14:08:35 | Yardanico | vantage, what module do you use for GUI? |
14:09:02 | shashlick | Any ideas appreciated thanks |
14:09:03 | vantage | yardanico, ive tried ui and nigui... |
14:10:05 | * | SenasOzys_ joined #nim |
14:10:31 | vantage | shash try disabling firewall temporarily |
14:10:58 | shashlick | I tried that too, same |
14:11:50 | * | SenasOzys quit (Ping timeout: 256 seconds) |
14:11:52 | vantage | lol, shash i can play twenty questions, |
14:12:06 | shashlick | vantage, pmunch - I did use matrix / riot for several months for #nim, works great |
14:12:49 | shashlick | Only that i had a few days where it was unreliable so I moved to a weechat setup |
14:13:08 | shashlick | I'm good with 20 questions if it helps resolve this! |
14:13:23 | vantage | shash passwords |
14:13:46 | vantage | shash try using ftp client |
14:14:00 | vantage | shash try using online ftp client... |
14:15:27 | shashlick | I can connect from my local wifi network but not from work VPN to my laptop |
14:16:37 | vantage | shash is it even connected, the server i mean |
14:17:01 | shashlick | Ya I should into servers and |
14:17:08 | shashlick | Ugh |
14:17:23 | shashlick | I ssh into server and then try connecting back |
14:17:28 | shashlick | Ping etc works |
14:18:01 | vantage | maybe the program has its own connection settings |
14:19:16 | vantage | ive been thinking about trying to make something like sublime text with nim |
14:20:47 | shashlick | Check out nimedit |
14:21:15 | vantage | why did people make apporia if there was nimedit? |
14:21:51 | vantage | or was that afterwards |
14:22:20 | vantage | to have a good ide you need a good text editor |
14:22:27 | PMunch | NimEdit is upcoming, Aporia is old |
14:22:58 | PMunch | I personally think that creating a new IDE is a bad idea though |
14:23:11 | PMunch | Better focus on getting proper integration with existing IDEs |
14:25:32 | vantage | pmunch i think the integration is there... making an ide thats written in the language it edits is important... pycharm is written in java... and i think thats not something to do with nim, since performance isnt an issue... |
14:26:53 | vantage | but nimedit... if you take it as just a fancy notepad with the foundation to add ide tools then it should be good... if its anything like sublime |
14:26:58 | vantage | i use vscode |
14:27:04 | FromGitter | <zetashift> I think he means like a stable language server or something. Imho vscode plugin works fine |
14:27:19 | vantage | the debugging... and the build system... |
14:27:21 | shashlick | I used vscode for a while and it was really nice, but uses up so much RAM |
14:27:26 | shashlick | it's hard with a VM |
14:27:29 | shashlick | back to vim |
14:27:31 | PMunch | Oh yeah, the integration isn't bad as it is right now |
14:27:42 | PMunch | But I just don't see the need for a separate IDE |
14:28:29 | PMunch | I'd love to see something like this implemented for Nim though: https://langserver.org/ |
14:28:45 | vantage | pmunch i was thinking of somehow showing expanded macros if you hover over a piece |
14:29:44 | PMunch | Hmm, yeah that might be an edge case that would be hard to support |
14:29:59 | FromGitter | <zetashift> @PMunch i thought the vscode plugin wraps nimsuggest up into a ls? |
14:29:59 | PMunch | But it would be hard to implement in a Nim-native editor as well |
14:30:29 | PMunch | zetashift, a proper language server protocol compliant server? That's news to me |
14:30:37 | FromGitter | <zetashift> okay maybe not that :P |
14:30:48 | vantage | pmunch i think lsp is a place to focus |
14:31:13 | vantage | lsp seems similar to parts of llvm and nimsuggest? |
14:32:08 | PMunch | Yeah, if everyone writing implementations of editor specific nimsuggest wrappers would instead create a single LSP implementation it would solve the integration problem not only for one specific editor, but for all of them. |
14:32:18 | PMunch | Well, all that supports LSP |
14:32:22 | FromGitter | <zetashift> Should be worls apart, LSP is a protocal and LLVM is a compiler backend and nimsuggest are some ide tools |
14:32:52 | PMunch | Pretty sure you could write LSP as a wrapper for nimsuggest though |
14:32:55 | FromGitter | <alehander42> I think most of the stuff that you imagine can be supported by a plugin |
14:33:05 | FromGitter | <alehander42> and with a lot less work than writing a whole new editor/ide |
14:33:14 | vantage | write an lsp interpreter for any texteditor, write lsp server for nim, easy |
14:34:02 | vantage | lsp might become like w3 standard in browsers for ides |
14:34:13 | FromGitter | <alehander42> and if you somehow do the work needed for a new editor/ide , it isn't worth it to not make it extendable for new languages .. and you're back to a oneman-based more buggy less powerful normal editor |
14:35:02 | vantage | zeta i meant that llvm has ide tools as well, something that ides take advantage of |
14:36:05 | FromGitter | <zetashift> ah okay misread that |
14:36:32 | vantage | aleh i wasnt wanting to write an ide, just a sublime text clone, more specifically the text editing part |
14:38:13 | vantage | pmunch, how long do you think before vscode brings out lsp interpreter |
14:39:43 | PMunch | vantage, doesn't vscode already have lsp? |
14:40:18 | * | fvs joined #nim |
14:40:52 | PMunch | Yeah, it already has full suport |
14:41:17 | vantage | so now we only need to give nim the thing ? |
14:41:35 | Yardanico | vantage, add lsp support to nimsuggest |
14:42:41 | * | vantage nodes |
14:43:04 | FromGitter | <alehander42> @vantage I see, just wanted to warn you writing a sublime text clone for fun is very cool, but to really compare with the mainstream editors you'd need years of work |
14:43:21 | FromGitter | <alehander42> otherwise its a cool idea i always wanted to also do my own editor one day |
14:44:09 | * | leru joined #nim |
14:45:19 | * | miran joined #nim |
14:46:02 | PMunch | Yardanico, yeah either add it directly to nimsuggest, or create a wrapper |
14:48:30 | vantage | nimsuggest --languageserver |
14:48:46 | shashlick | ya I satisfied my itch to an extent by writing snip - text editors are fun to write but hard to perfect |
14:49:43 | shashlick | I kept snip reasonable by making it useful for a very specific use case, it's not something I'd want to use for general purpose text editing when there's so many good options out there |
14:50:17 | vantage | i just need vscode to have outlines for nim |
14:50:46 | vantage | shash so speaking from experience? |
14:52:00 | shashlick | ya, it's really fun, although I was just doing a command line version without ncurses which was a pain in itself |
14:52:28 | vantage | why doesnt windows have ncurses? |
14:52:46 | shashlick | i just didn't want the big dependency on dlls, etc. |
14:52:55 | shashlick | worked out for the most part |
14:54:05 | vantage | so the shash ideology: write for a usecase, dont compete with sea monsters |
14:55:07 | shashlick | well, the thing is that every project is a blackhole, it sucks up more and more requirements as you go - cool but dangerous ideas |
14:56:26 | vantage | yeah. wish i could control myself enough to not waste my time when i was younger |
14:56:58 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
14:57:02 | FromGitter | <krux02> vantage: yea always blame your younger self |
14:57:20 | FromGitter | <krux02> that doesn.t help |
14:57:27 | * | vantage joined #nim |
14:57:28 | * | leru quit (Quit: Konversation terminated!) |
14:57:41 | * | leru joined #nim |
14:58:14 | FromGitter | <krux02> when I was young my father often told me: "I wish I would have learned that when I was young" and I thougt, "and what is preventing you from doing it now if you want it?" |
14:59:13 | vantage | nothing but its so embarrising |
14:59:58 | vantage | its like standing infront of a crowd and saying "i am human, i am fallable" |
15:00:28 | * | PMunch quit (Quit: Leaving) |
15:01:53 | shashlick | I'm sure everyone has a directory full of dead projects that never made it |
15:02:52 | vantage | yeah |
15:03:21 | FromGitter | <alehander42> I have like 100 only in my private repos :D |
15:05:19 | vantage | okay so what i take from this is that a text editor project is not ideal, that i might make more of an impact with lsp |
15:05:37 | vantage | if i can figure it out |
15:09:31 | shashlick | Or you could work on snip :P or nimedit |
15:10:20 | * | themagician quit (Ping timeout: 256 seconds) |
15:10:40 | FromGitter | <alehander42> if you want impact, I think lang server would be definitely better than working on niche editing |
15:11:19 | FromGitter | <alehander42> if you want to build something cool, text editors are great |
15:11:47 | * | NimBot joined #nim |
15:12:09 | FromGitter | <alehander42> snip looks cool @hshashlick do you plan on supporting more langs i see py and js |
15:12:48 | FromGitter | <alehander42> I just butchered your nick :D |
15:16:11 | * | themagician joined #nim |
15:18:34 | shashlick | @alehander42: absolutely, as soon as there's interest, I can add functionality |
15:19:12 | shashlick | vantage: ya, definitely better being disciplined in what nim needs rather than what's fun to do, but at the same time, i think that's what makes nim fun - there's so many places you can contribute |
15:19:42 | shashlick | fix issues in nim, nimble, choosenim, nimforum, website, or review PRs, or add documentation, enhance stdlib, write packages |
15:20:31 | shashlick | so many fun things that can be done and araq, dom96 and the community are very helpful in getting ramped up and providing feedback and guidance |
15:21:12 | vantage | heres another question,,, can we precompile the stdlib and packages |
15:22:53 | vantage | cause atm it all has to be compiled when you use it in a project, not ideal |
15:22:54 | vantage | for me |
15:22:59 | vantage | slow pc |
15:24:02 | FromGitter | <zetashift> It should be a one time bump since Nim support incremental compilation |
15:24:33 | Yardanico | vantage, support for incremental compilation is already in the works |
15:24:51 | FromGitter | <zetashift> In the works? :O |
15:24:56 | vantage | is it in . |
15:25:47 | vantage | 0.18? |
15:26:11 | euantor | no, it's not finished yet and is a work in progress |
15:27:31 | Yardanico | vantage, how it would be in 0.18 if it's in the works? :D |
15:28:26 | * | Trustable joined #nim |
15:30:57 | * | vantage quit (Ping timeout: 276 seconds) |
15:34:57 | * | vantage joined #nim |
15:35:09 | shashlick | Some challenges - you could use different architectures, same directory on Windows and Linux, etc |
15:35:11 | vantage | im back |
15:43:43 | * | yglukhov quit (Remote host closed the connection) |
15:44:15 | * | yglukhov joined #nim |
15:45:31 | * | vantage quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
15:46:09 | * | Vantage joined #nim |
15:47:56 | FromGitter | <alehander42> interesting comparison on reddit including Nim https://sdevprog.blogspot.bg/2018/04/overview-of-efficient-programming.html |
15:48:19 | * | brainproxy joined #nim |
15:48:44 | * | yglukhov quit (Ping timeout: 256 seconds) |
15:50:03 | * | birdspider joined #nim |
15:52:33 | FromGitter | <zetashift> It also complains about the numerous keywords/operators/functions(wtf?) in Nim |
15:52:34 | miran | most comments on reddit are about rust.... nim is only mentioned by the existing nim user(s) |
15:52:36 | FromGitter | <zetashift> Not sure I agree |
15:52:56 | FromGitter | <zetashift> @miran that is usually the case ;p |
15:53:03 | miran | well, `notin` is really not needed if we have `not` and `in` |
15:53:34 | FromGitter | <zetashift> Btw miran I recall that you've worked with F#, how are you liking Nim compared to F#? |
15:54:16 | miran | zetashift: yeah, that's usually the case, but not many times we see nim compared with "the big boys" |
15:55:31 | miran | you recall correctly :) well, now i can tell that i've spent more time, and written more code, in nim than in F#. and that should answer the question :) |
15:55:48 | * | r3d9u11 joined #nim |
15:56:25 | miran | i switched to linux and didn't manage to make F# work as nicely as on windows so i more or less have abandoned it for now.... |
15:57:30 | miran | but i like F#, it is a nice language, and to me it was much easier than haskell (i have only very short experience with it) |
16:00:33 | FromGitter | <cabhishek> Hi everyone, if you have a minute can you review my slides -> https://slides.com/akapatkar/nim-for-python-programmers. Feedback welcome 😄. The primary audience is python developers. |
16:01:52 | FromGitter | <krux02> miran: I think notin can stay in the language and ∉ should be an alias for in in the parser |
16:02:06 | FromGitter | <krux02> 😄 |
16:02:09 | miran | :P |
16:02:15 | Vantage | zeta, The various keywords is something I think is one of Nim's strengths |
16:02:41 | Vantage | zeta, cause you can make your own, and its semi-standardized |
16:02:57 | Vantage | and not really a keyword... |
16:03:09 | FromGitter | <krux02> almost all operators have unicode representations of them |
16:03:40 | FromGitter | <krux02> I think these unicode versions of the operators should be allowed. But I think I am alone here |
16:04:45 | miran | cabhishek: slide 15 ("clean syntax"): the type of `mid` can be inferred too, and the last `return false` is not needed :) |
16:05:16 | Vantage | krux I like unicode... gives it a maths feeling |
16:05:53 | FromGitter | <zetashift> miran but the return false makes it look so python-esque hehe |
16:06:12 | FromGitter | <zetashift> also isn't it more idiomatic to use result = false or result = true? |
16:06:37 | miran | you want to return immediately when you come to true |
16:06:59 | Vantage | @cabhishek slide 5, cant you change the words here "Actively developed ~2008" |
16:07:14 | miran | btw, if you want python feel, put `var mid: int` outside the loop, so inside of it you don't have `let` |
16:08:16 | miran | and maybe in the example don't use key which is immediately in the middle :D :D |
16:08:29 | * | xkapastel joined #nim |
16:09:33 | miran | cabhisheck: slide 16 (UFCS): maybe show either `mapIt` or `filterIt` to simplify it even more |
16:10:47 | * | hal1 quit (Quit: WeeChat 1.4) |
16:11:44 | * | SenasOzys__ joined #nim |
16:11:46 | * | SenasOzys_ quit (Remote host closed the connection) |
16:11:59 | Vantage | cabhis https://slides.com/akapatkar/nim-for-python-programmers#/15 the last example, I hate having to do that in python :D |
16:14:03 | FromDiscord | <claude> go takes less time to write than julia and nim? |
16:15:20 | FromGitter | <cabhishek> miran: yes that `let min: int` is to show you can annotate variables with types for improved readability. But maybe this particular use case its less useful. |
16:16:36 | miran | `var mid: int` might do that, and you can then also explain that it has the default value of zero |
16:16:46 | FromGitter | <cabhishek> yes, good point |
16:16:50 | Vantage | https://slides.com/akapatkar/nim-for-python-programmers#/17 I'm new to nim but will p1 and p2 really become Point? arent they tuple? |
16:17:59 | FromGitter | <alehander42> you can alias any type with a custom name |
16:18:14 | FromGitter | <alehander42> Point *is* a tuple[x: int, y: int] |
16:19:01 | FromGitter | <alehander42> you can do some quite interesting things if you add distinct to the mix (but I rarely do it) |
16:19:41 | Vantage | ooohhh... aleh still trying to wrap my head around it... |
16:22:32 | * | SenasOzys__ quit (Remote host closed the connection) |
16:23:22 | * | SenasOzys joined #nim |
16:26:44 | FromGitter | <alehander42> well, you can just mentally replace Point with the other type everywhere |
16:33:55 | * | SenasOzys quit (Remote host closed the connection) |
16:35:30 | * | SenasOzys joined #nim |
16:36:32 | FromDiscord | <claude> how long has nim had incremental compliation? has it been a while? |
16:39:14 | Vantage | anyone know a json rpc for nim |
16:39:49 | Vantage | it has to comply with these specs http://www.jsonrpc.org/specification |
16:40:03 | * | smt` quit (Read error: Connection reset by peer) |
16:40:27 | * | smt` joined #nim |
16:46:34 | shashlick | Yardanico: who is working on incremental compilation? |
16:48:50 | Vantage | I thought it was Araq? |
16:48:56 | Vantage | But I'm likely wrong |
16:49:10 | Vantage | But I think I saw an article from him... |
16:58:53 | * | sendell quit (Remote host closed the connection) |
17:04:40 | * | SenasOzys quit (Ping timeout: 256 seconds) |
17:07:39 | * | birdspider quit (Quit: Leaving) |
17:20:22 | * | DarkArctic joined #nim |
17:21:19 | * | nsf quit (Quit: WeeChat 2.0.1) |
17:31:11 | * | smt_ joined #nim |
17:35:09 | * | smt` quit (Ping timeout: 264 seconds) |
17:39:21 | * | leru quit (Remote host closed the connection) |
17:39:40 | * | leru joined #nim |
17:41:21 | * | SenasOzys joined #nim |
17:49:45 | FromGitter | <krux02> claude: quite a while, and the incremental compilation works already pretty well, but not everything works. For example macros have to be evaluated every time. |
17:50:01 | Yardanico | krux02: how do I turn it on? :D |
17:50:13 | FromGitter | <krux02> it's on by default |
17:50:32 | FromGitter | <krux02> or what do you mean? |
17:51:24 | Yardanico | I mean incremental compilation with sqlite |
17:51:31 | Yardanico | (incremental compilation of .nim files) |
17:52:29 | FromGitter | <krux02> well incremental compilation is turned on by default. |
17:53:08 | FromGitter | <krux02> you can easily see it that only a fraction of the generated c files are recompiled when you compile the project again |
17:53:12 | FromGitter | <krux02> it's not perfect |
17:53:21 | FromGitter | <krux02> but it really does a very good job. |
17:54:54 | Yardanico | I know that incremental C compilation works |
17:55:26 | Yardanico | but incremental compilation for .nim code itself (so compiler don't need to process your modules if you don't change them for example) |
17:59:48 | FromGitter | <krux02> Yardanico: well that is not that easy, just because a file doesn't change doesn't mean it doesn't need to be recompiled. |
18:00:17 | FromGitter | <krux02> Think about macros, they can generate funcitons based on the current date |
18:01:23 | Vantage | for this code `type DocumentUri:string=discard` |
18:01:34 | Vantage | I get an error |
18:01:38 | Vantage | `tempCodeRunnerFile.nim(1, 6) Error: implementation of 'DocumentUri' expected` |
18:01:59 | Vantage | Can someone help? |
18:03:29 | FromGitter | <krux02> Vantage: Well I am like the compiler and can unly tell you I have no idea what you want to do there |
18:03:34 | FromGitter | <krux02> it's not valid nim syntax |
18:03:54 | FromGitter | <krux02> type DocumentUri = string |
18:04:05 | FromGitter | <krux02> type DocumentUri = distinct string |
18:04:28 | * | Vantage facepalms |
18:05:34 | * | smt_ quit (Read error: Connection reset by peer) |
18:06:03 | * | smt joined #nim |
18:08:44 | * | xkapastel quit (Quit: Connection closed for inactivity) |
18:10:03 | miran | don't worry Vantage, all of us (or at least me) had the same errors in the beginning :) |
18:10:36 | Vantage | I want to use the word `end` as an identifier... but its already a keyword |
18:10:40 | Vantage | Is it impossible? |
18:11:20 | miran | hmm, i think i've never used `end` in nim :D |
18:11:34 | FromDiscord | <claude> surround it with backticks |
18:11:49 | miran | can you use `last`, or something like that with the similar meaning? |
18:12:41 | Vantage | It yeah... I was wanting to use it for making a data type... |
18:13:05 | Vantage | I'm going to stick with specs and use end_ |
18:13:08 | Yardanico | Vantage, end is a keyword, but you can create an issue on github about removing it :) |
18:13:23 | Yardanico | or maybe Araq has something which will use `end` keyword |
18:13:25 | Vantage | I don't even know what end is used for |
18:13:26 | Yardanico | in the future |
18:13:37 | miran | Yardanico: where is the `end` used? is it? |
18:13:38 | Yardanico | Vantage, it's unused |
18:13:55 | Yardanico | "Some keywords are unused; they are reserved for future developments of the language." |
18:13:57 | Vantage | maybe like lua func end |
18:14:05 | Yardanico | Vantage, nooo |
18:14:12 | miran | Vantage: nope, we use whitespace |
18:14:12 | Yardanico | there's syntax skins, but they'll be removed |
18:14:18 | FromDiscord | <claude> if you do `? endX` i think it allows for `begin`/`end` syntax |
18:14:29 | FromDiscord | <claude> `#? endX` i mean |
18:14:32 | Yardanico | that's syntax skin |
18:14:39 | Vantage | one liners all the way |
18:14:41 | Vantage | irc safe |
18:15:17 | Yardanico | Vantage, I don't really understand why you have to use `end` or braces in a language if you already indentate your code |
18:15:28 | Vantage | Maybe you can syntax skin away all of the keywords? |
18:15:39 | Yardanico | Vantage, ? |
18:15:59 | Yardanico | Vantage, syntax skins are for using braces or `being` / `end` instead of whitespaces |
18:16:07 | Yardanico | and they'll be almost 100% removed |
18:16:12 | Yardanico | it's not recommended to use them |
18:16:15 | Vantage | Yardanico: Sometimes... Like on irc... typing one liner safe code is just better... |
18:16:51 | Vantage | I'm not gonna, it's just interfering with my data types |
18:17:02 | Yardanico | Vantage, we have paste services for code :) |
18:17:09 | Yardanico | and nim playground |
18:17:28 | Vantage | Why do data types even check for keywords inside a type body? You can't actually use if else do while and such |
18:17:35 | miran | Yardanico: gist/share doesn't work on playground last i checked |
18:18:23 | Vantage | type NimType=object[variable:int] |
18:18:57 | Vantage | http://play.nim.org/ is not working for me |
18:19:07 | Vantage | nvm |
18:19:25 | Yardanico | Vantage, well, it has some issues currently |
18:19:53 | Vantage | I used nim.org instead of nim-lang.org |
18:20:19 | Vantage | You should be able to import gists not just create gists -_- |
18:21:09 | * | krux02 joined #nim |
18:22:38 | Vantage | What paste service should I use |
18:22:47 | * | jjido joined #nim |
18:22:53 | FromGitter | <krux02> ix.io |
18:23:14 | FromGitter | <krux02> I use it, because it has a trivial editor entegration |
18:23:20 | FromGitter | <krux02> integration |
18:23:25 | Vantage | ? |
18:23:34 | Vantage | ix.io is not working from browser |
18:23:54 | FromGitter | <krux02> yes you need to use it from the api to send stuff |
18:24:08 | FromGitter | <krux02> so you can simply automate the task from within your editor |
18:26:42 | * | Lord_Nightmare quit (Ping timeout: 260 seconds) |
18:27:51 | * | Lord_Nightmare joined #nim |
18:31:09 | * | xkapastel joined #nim |
18:31:25 | * | SenasOzys quit (Remote host closed the connection) |
18:34:04 | * | dddddd quit (Quit: Hasta otra..) |
18:34:22 | * | dddddd joined #nim |
18:34:22 | * | rauss quit (Read error: Connection reset by peer) |
18:34:54 | * | rauss joined #nim |
18:48:05 | FromDiscord | <mraxilus> what's the difference between `type Object = object` and `type Object = object of RootObj`? |
18:48:20 | FromDiscord | <mraxilus> I'm not sure what inheritnig RootObj gives you, functionally |
18:49:19 | dom96 | it gives you polymorphism |
18:49:34 | dom96 | read up on what inheritance buys |
18:52:22 | FromGitter | <krux02> dom96: correct would be "inheritance based polymorphism" |
18:54:36 | FromGitter | <krux02> there is more than one way for polymorphism. And I think that inheritance based polymorphism should not be the default way. |
18:55:24 | shashlick | vantage: use snip if you want to work with snippets |
18:57:24 | dom96 | Vantage: Why don't you just use gist? |
18:59:52 | * | nsf joined #nim |
19:02:14 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:03:13 | livcd | so they just released graalvm v1.0 |
19:04:43 | * | PMunch joined #nim |
19:08:58 | shashlick | dom96: I'm finally running that httpbeast benchmark |
19:09:10 | dom96 | great |
19:09:27 | shashlick | httpbeast up and running for helloworld, building wrk right now |
19:12:03 | Yardanico | shashlick, also try mofuw :) |
19:15:23 | * | jjido joined #nim |
19:17:46 | * | yglukhov joined #nim |
19:19:13 | * | jjido quit (Client Quit) |
19:25:08 | * | r3d9u11 quit (Remote host closed the connection) |
19:27:37 | * | jjido joined #nim |
19:30:30 | * | amp907[m] joined #nim |
19:30:36 | * | SenasOzys joined #nim |
19:30:52 | FromGitter | <krux02> I need an antigrivity mouse, so that it doesn't constantly fall from the desk |
19:30:56 | FromGitter | <krux02> or a bigger desk |
19:36:10 | * | amp907 joined #nim |
19:38:13 | amp907 | Anyone have any success compiling ui on Windows x64 recently? Running into compiler errors trying out the example code. |
19:38:29 | PMunch | krux02, you need a tiling window manager so you can stop using your mouse :) |
19:43:36 | Vantage | I need help (like always |
19:47:15 | Vantage | https://nim-by-example.github.io/oop/ refers to methods... but I don't see it anywhere in the manual. Is it something new or something that was removed? |
19:48:57 | shashlick | dom96, Yardanico: https://pastebin.com/1MwJ48Rc |
19:48:59 | FromGitter | <stisa> Vantage https://nim-lang.org/docs/manual.html#multi-methods |
19:49:43 | Vantage | stisa so the tutorial isn't the be-all-end-all |
19:50:10 | Yardanico | shashlick, good but strange :) |
19:50:15 | Yardanico | well, it's actually very good |
19:50:36 | shashlick | mofuw is slower since it sends out the mime type too |
19:50:44 | shashlick | not sure if httpbeast does that |
19:51:46 | shashlick | dual proc = E5-2623 v3, 4 cores each |
20:00:38 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
20:01:07 | FromGitter | <zetashift> @Vantage you could also use: https://wandbox.org/ |
20:05:55 | * | noonien joined #nim |
20:06:29 | PMunch | What's up with the playground? |
20:06:57 | * | Vladar quit (Quit: Leaving) |
20:07:07 | * | rokups quit (Quit: Connection closed for inactivity) |
20:11:18 | Vantage | Pmunch... playground just spins when I click create gist >_< |
20:11:43 | PMunch | It spins when I click "Compile" as well |
20:12:19 | dom96 | shashlick: 780k niceee |
20:12:21 | Yardanico | PMunch, it doesn't work tepmorarily |
20:12:26 | Yardanico | temporarily* |
20:12:49 | * | SenasOzys quit (Remote host closed the connection) |
20:12:51 | PMunch | "Temporarily", it's been like this for at least a day now |
20:13:37 | dom96 | PMunch: Yeah :/ |
20:13:57 | dom96 | Dunno why zacharycarter didn't fix it |
20:18:37 | shashlick | dom96: what else should I compare with |
20:19:10 | dom96 | tokio-minihttp |
20:19:16 | dom96 | go as well |
20:19:37 | dom96 | You might be able to grab the code for those from techempower |
20:20:16 | dom96 | oh, apparently tokio-minihttp is fastest for plaintext on techempower now https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=plaintext |
20:20:33 | dom96 | so yeah, definitely try tokio-minihttp |
20:20:55 | * | PMunch quit (Quit: leaving) |
20:24:50 | shashlick | rust? hmm have to install the compiler, etc. |
20:29:35 | Vantage | why is nim and rust always compared? |
20:29:36 | dom96 | yeah, might be a bit painful |
20:29:53 | dom96 | IIRC I had to modify the tokio-minihttp code from techempower as well because it contains DB access and stuff |
20:30:09 | dom96 | Vantage: Because both are systems programming languages |
20:30:20 | * | fvs left #nim ("ERC (IRC client for Emacs 25.3.1)") |
20:32:16 | FromGitter | <zetashift> fwiw tokio-minihttp is extremely barebones |
20:33:11 | dom96 | httpbeast too :) |
20:33:21 | dom96 | Curious how it compares |
20:38:45 | shashlick | I got it installed |
20:38:49 | shashlick | but not able to build the example |
20:39:11 | shashlick | can't find crate futures even though i did a cargo build in root which installed all deps |
20:39:25 | shashlick | are you going to make me join #rust now? |
20:41:11 | dom96 | it's up to you if you want to pursue this, i'm happy enough with the httpbeast number |
20:41:32 | shashlick | :D |
20:46:50 | * | smt quit (Read error: Connection reset by peer) |
20:46:50 | FromGitter | <krux02> shashlick: the grass is always greener on the other side of the fence. |
20:47:26 | * | smt joined #nim |
20:47:37 | shashlick | this already smells, I am not able to figure out how to compile the helloworld.rs file |
20:47:42 | dom96 | I wonder though, @2vg opened a PR for httpbeast that enables some options to make it faster |
20:48:50 | dom96 | shashlick: maybe you could try this https://github.com/dom96/httpbeast/pull/3 ? |
20:49:09 | * | riidom quit (Ping timeout: 260 seconds) |
20:49:56 | * | jos1 joined #nim |
20:49:58 | jos1 | hey |
20:50:06 | jos1 | does anybody know if Table uses the hash exclusively? |
20:50:11 | jos1 | or if it does a more exhaustive check afterwards |
20:50:39 | dom96 | dunno, shouldn't be too difficult to see by looking at the source code though |
20:50:46 | planetis[m] | is there a way to set a seq[seq[float]] to zeros without running a loop? |
20:51:01 | jos1 | o ok, because my hash function only uses two properties on my struct |
20:51:07 | jos1 | i have a third one that i was using exclusively for debugging |
20:51:31 | jos1 | is there a generic equals operator or something i can override? |
20:52:47 | dom96 | jos1: what are you trying to do? |
20:52:51 | dom96 | planetis[m]: Don't think so |
20:53:37 | jos1 | i'm using a Table with a struct as a key |
20:53:45 | jos1 | the struct implements hash |
20:54:00 | jos1 | but i think i might have to overload the equals operator in order to make it work properly too |
20:54:36 | dom96 | Why? |
20:54:40 | jos1 | basically my hash function doesn't take every field on the struct into account, so my equals operator should do the same |
20:54:42 | dom96 | just make your hash unique |
20:54:50 | jos1 | well i think that Table resolves with both |
20:54:53 | jos1 | to prevent hash collisions |
20:54:58 | jos1 | because otherwise i don't understand why this is happening |
20:55:19 | dom96 | oh, well you can define `==` for your object (struct) |
20:55:32 | dom96 | proc `==`(a, b: Obj): bool = ... |
20:55:32 | jos1 | oh ok |
20:55:35 | jos1 | thank you so much |
20:57:31 | shashlick | dom96: crashes for me |
20:58:07 | jos1 | dom96: yup, that was the issue. overloading the equality operator fixed it :) thanks! |
20:58:14 | dom96 | shashlick: Hrm, please post the crash stack trace in the PR |
20:59:23 | dom96 | jos1: great |
21:02:25 | shashlick | https://github.com/dom96/httpbeast/pull/3#issuecomment-382143784 |
21:03:12 | dom96 | thanks |
21:05:37 | * | miran quit (Quit: Konversation terminated!) |
21:05:52 | * | Trustable quit (Remote host closed the connection) |
21:13:28 | shashlick | gosh who'd think building a hello world would be so complicated |
21:14:04 | dom96 | More than welcome to write an article about your experiences ;) |
21:19:58 | shashlick | ok got it working |
21:22:30 | * | jos1 quit (Ping timeout: 256 seconds) |
21:24:29 | * | nsf quit (Quit: WeeChat 2.0.1) |
21:31:57 | * | SenasOzys joined #nim |
21:36:35 | shashlick | dom96: https://clbin.com/UiJDp |
21:39:31 | FromGitter | <krux02> announcement at everybody: ast_pattern_matching is now released as a nimble package |
21:41:01 | FromGitter | <krux02> well I did nimble publish, and that has some delay until the thing is released. But I am happy to call it 1.0 |
21:41:07 | FromGitter | <krux02> it is fully tested |
21:41:19 | FromGitter | <krux02> or as full as you can get. |
21:41:58 | dom96 | shashlick: so tokio is slowest? 0_o |
21:42:07 | dom96 | Are you sure there isn't some release flag you missed? |
21:42:17 | shashlick | I did a cargo build --release |
21:43:28 | dom96 | that's weird |
21:43:57 | dom96 | Guess I need to get httpbeast onto techempower asap :) |
21:45:10 | FromGitter | <krux02> shameless advertisement: https://github.com/krux02/ast-pattern-matching |
21:45:47 | shashlick | dom96: ya I tried again and ensured it was release mode - of course, unclear how many threads it runs by default |
21:46:00 | FromGitter | <krux02> just look at the test to see how matching works: https://github.com/krux02/ast-pattern-matching/blob/master/tests/test1.nim |
21:46:11 | FromGitter | <krux02> feels good to have this off my shoulder. |
21:47:14 | shashlick | okay so hold - I tested the framework from it's github site, not the code on techempower |
21:48:20 | dom96 | Yeah, doesn't look like that one is parallel |
21:48:23 | dom96 | Try this one: https://github.com/tokio-rs/tokio-minihttp/blob/master/examples/techempower.rs |
21:52:13 | shashlick | https://clbin.com/HBmw7 |
21:52:19 | shashlick | much faster now but still slower than httpbeast |
21:56:17 | * | max3 joined #nim |
22:04:46 | dom96 | shashlick: Non-2xx or 3xx responses: 15700624 |
22:04:58 | dom96 | You're testing it against the wrong url |
22:05:08 | dom96 | you need /plaintext I think |
22:06:47 | shashlick | I see |
22:09:43 | shashlick | pretty much identical results |
22:14:06 | dom96 | ahh interesting |
22:15:41 | dom96 | If you click on "Data table" it seems that techempower runs each framework at increasing concurrency levels: https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=plaintext |
22:15:47 | dom96 | and picks the highest value |
22:16:16 | dom96 | is 400 what gave you the best results? |
22:16:31 | shashlick | i didn't try any other values |
22:18:06 | * | jos1 joined #nim |
22:31:38 | * | yglukhov_ joined #nim |
22:32:12 | * | Lord_Nightmare quit (Ping timeout: 256 seconds) |
22:33:39 | * | Lord_Nightmare joined #nim |
22:34:09 | * | yglukhov quit (Ping timeout: 256 seconds) |
22:37:52 | * | leru quit (Ping timeout: 256 seconds) |
22:45:26 | jos1 | exit |
22:45:28 | * | jos1 quit (Quit: WeeChat 2.1) |
22:55:53 | * | SitiSchu quit (Quit: Leaving) |
22:59:53 | * | sleepyqt quit (Read error: Connection reset by peer) |
23:01:51 | * | xet7 quit (Quit: Leaving) |
23:05:07 | * | Pisuke quit (Ping timeout: 246 seconds) |
23:05:27 | * | Sembei joined #nim |
23:19:13 | * | noonien quit (Quit: Connection closed for inactivity) |
23:22:27 | * | Vantage quit (Quit: Page closed) |
23:43:36 | * | regtools quit (Ping timeout: 256 seconds) |
23:44:35 | * | regtools joined #nim |
23:48:36 | * | amp907 quit (Quit: Leaving) |
23:48:44 | * | xkapastel quit (Quit: Connection closed for inactivity) |
23:53:52 | * | BitPuffin quit (Remote host closed the connection) |
23:57:37 | * | SitiSchu joined #nim |