<< 17-04-2018 >>

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:21FromGitter<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:18FromDiscord<jos> nim support destructuring but i'm not sure if it supports it out of an array
01:20:26FromGitter<amscotti> Yeah, I can't find anything in the docs with unpacking arrays only tuples.
01:25:25*couven92 joined #nim
01:44:34FromGitter<cabhishek> yes, correctly. Only tuple unpacking is supported
01:47:17FromGitter<Varriount> It would be neat if tuple unpacking was generalized via a special procedure (like other operators)
01:50:20FromGitter<cabhishek> yeah, I wonder whats preventing it.
01:53:53FromGitter<Varriount> Probably implementation complexity.
01:55:06FromDiscord<claude> or that it would call for more pattern matching in variables which would take a lot of time
01:55:49FromGitter<Varriount> You might be able to use a term-rewriting macro or converter.
02:02:46*NimBot joined #nim
02:21:46FromDiscord<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:44Tangerclaude: 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:51FromGitter<gogolxdong> How to debug with line and file information?
04:13:12FromGitter<gogolxdong> if crash.
04:25:31FromGitter<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:06FromGitter<gogolxdong> echo getCurrentException().getStackTrace() print a newline.
04:37:49shashlickinstantiationInfo()
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:14FromGitter<Varriount> @gogolxdong Usually just compiling in debug mode will cause exceptions to print stack traces by default.
06:13:27FromGitter<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:52FromGitter<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:12FromGitter<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:25FromGitter<mratsim> note that it’s from 4 years ago
08:01:14FromGitter<mratsim> parseStmt / using string can be replaced by `result = newPar(); array_input.copyChildrenTo result` I suppose
08:05:51FromGitter<mratsim> @zacharycarter Here is the Java truth: https://github.com/EnterpriseQualityCoding/FizzBuzzEnterpriseEdition
08:08:25FromGitter<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:57livcdmratsim: that does not make it bearable. Often it's terrible
08:14:22*rokups joined #nim
08:28:54Araqclaude 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:16FromDiscord<claude> haha, well good luck to those 6 people then
08:34:27*yglukhov joined #nim
08:36:25Araqat least it compiles with 0.18 :P
08:36:31Araq(I hope)
08:38:31FromDiscord<claude> this one's fairly easy https://github.com/Araq/nimedit/issues/7
08:44:29Araqdo it :-)
08:52:05*sleepyqt joined #nim
09:13:25FromGitter<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:30FromGitter<Bennyelg> How I can do something like this: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ad5bb32270d7d3708d65227]
09:19:54FromDiscord<claude> `let s = Job(name: "helloTest", procedure: proc() = test("HELLO WORLD"))`
09:38:54yglukhovAraq: 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:58yglukhovIn 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:20Araqthat's what I did too
09:41:39yglukhovrewrite on every change?
09:47:47Araqno, call a proc in a static context to write it.
09:48:22yglukhovbut i never know if it's still going to be updated during this compilation run.
09:50:36yglukhovlet'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:24yglukhovso in my lib module i can't say "static: flushJavaFile()", because user definitions will follow after that
09:54:15FromGitter<alehander42> so you're looking for something like `addQuitProc` in compiletime context ?
09:54:23yglukhovyep, kinda
09:59:51*sendell joined #nim
10:04:59*BitPuffin joined #nim
10:18:15Araqyglukhov, yeah you have to export this and make the clients call it, I'm afraid
10:18:44yglukhovok
10:22:57Araqalternatively all of the code has to be in a
10:23:00Araqsection:
10:23:09Araqso that the macro knows where things end.
10:23:33yglukhovyes. 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:57hal1Hello. 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:13FromGitter<krux02> is it possible to generate a searchable documentation index of all installed inmble packages?
10:59:20*xet7 joined #nim
11:00:16FromGitter<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:38hal1I 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:43FromGitter<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:59FromGitter<krux02> but on windows, maybe that tool is included in mingw, I don't know
11:02:15*dddddd joined #nim
11:02:27FromGitter<krux02> does your mingw have an instance of ldd?
11:02:34dom96hal1: It's somewhere in your PATH
11:02:38*vantage joined #nim
11:02:45dom96Likely in $nim/bin
11:03:11dom96or C:\Documents and Settings\YourUsername\.nimble\bin (not sure if that's the exact path but you get the idea)
11:03:27hal1krux02[m]: I tried the --passL:static flag or something similar but that did not change it. I'll have to look again
11:03:41dom96You can't statically link pcre easily
11:03:48dom96You just have to send the pcre dll with your program
11:03:54hal1oh ok, I limited my search to the dlls in windows folder
11:03:55dom96or use the native regex package
11:04:05dom96which doesn't have a dependency on pcre
11:04:08FromGitter<krux02> hal1: you can leave out the [m] part of my name it is just a tag for the gitter bridge
11:04:15dom96This one: https://github.com/nitely/nim-regex/
11:04:20hal1that it is in PATH and probbaly nim somewhere makes sense
11:05:14hal1I don't even actively use regex. I imported strutils to have an easy replace(). replace is all I used
11:05:25FromGitter<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:31FromGitter<tim-st> does anyone know what are the most relevant cons of a rust backend for nim?
11:05:50FromGitter<tim-st> (besides compile time and no c support)
11:05:53FromGitter<krux02> @tim-st: you mean compile nim to rust?
11:05:57FromGitter<tim-st> yes
11:06:07FromGitter<krux02> well, you would have to implement it
11:06:18*xkapastel quit (Quit: Connection closed for inactivity)
11:06:18dom96krux02: nimble? Why would Nimble do anything? It doesn't know anything about which dll your program is using
11:06:20FromGitter<krux02> and that is a lot of work
11:06:22dom96Nim does
11:06:51dom96I made a feature request for a flag that lists all DLLs in your program
11:06:53FromGitter<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:54dom96It's in the issues somewhere
11:07:03hal1hm or maybe it could be docopt that requires pcre
11:07:09hal1do you know if strutils does?
11:07:13dom96hal1: it's docopt
11:07:15FromDiscord<claude> nim doesnt have traits
11:07:32FromDiscord<claude> as in, you cant have concepts in rust
11:07:37FromGitter<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:44hal1too bad, that made the commandline arguments so easy ;)
11:07:59hal1but I can write something basic for that myself now that I know
11:08:05FromGitter<krux02> so when that package is used, the binary won't be simply distributable anymore.
11:09:01FromGitter<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:08dom96hal1: https://github.com/docopt/docopt.nim/issues/33 :)
11:09:14dom96Would be a nice PR :)
11:09:20FromGitter<krux02> the rust concepts forbid to implement a trait for a foreign type.
11:09:37dom96krux02: 'pcre' is in the stdlib, how can Nimble know about it?
11:09:59FromGitter<krux02> and that is a pillar of their safety mechanisnms. b) pretty annoying.
11:10:35FromGitter<tim-st> ok, thanks
11:11:18FromGitter<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:55FromGitter<krux02> @tim-st with foreign type, I just mean a type of a different module
11:12:16hal1dom96: 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:29FromGitter<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:01FromGitter<krux02> I really like it. It feels like sombody took off some handcuffs and let me program freely.
11:14:03FromGitter<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:10FromGitter<krux02> dom96: is there a way in nimble to generate a documentation index for all nimble packages?
11:14:25dom96krux02: Nim should provide this info, it can read all the {.dynlib.} pragmas and report what they are
11:14:38dom96krux02: no
11:14:54FromGitter<krux02> dom96: can I make a feature request about it?
11:15:21dom96krux02: sure, if you explain exactly what you want.
11:15:27FromGitter<krux02> I would like to have a page like "theindex", but with all packages that are currently installed
11:15:31dom96All installed packages?
11:15:38FromGitter<krux02> yes
11:15:45FromGitter<krux02> all joined in a single index
11:16:13dom96Not sure if Nim would support that
11:16:17dom96but would be nice
11:16:43FromGitter<krux02> I make a feature request
11:25:25*Suigetsu quit (Remote host closed the connection)
11:31:07hal1nre (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:06FromGitter<krux02> I made the feature request: https://github.com/nim-lang/nimble/issues/479
11:33:50dom96hal1: nim-regex is fairly new, so I wouldn't be surprised if it is that easy, but nobody did it yet :)
11:56:55FromGitter<krux02> hmm how do I get the length of a set http://ix.io/1810
11:57:09FromGitter<krux02> calling `len` on a `set` doesn't seem to work
11:58:41FromGitter<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:51FromGitter<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:07FromGitter<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:06FromGitter<narimiran> @krux02 see set inconsistencies: https://github.com/nim-lang/Nim/issues/7556
12:17:37FromGitter<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:54dom96Is there any support for inheritance when wrapping C++ objects?
12:34:27dom96I need to check whether it is safe to cast, would be nice if `of` worked seamlessly
12:34:33dom96but I guess I need to wrap dynamic_cast
12:35:45*Suigetsu joined #nim
12:41:09FromGitter<krux02> dom96: I don't think of unless it is mapped to dynamic_cast
12:43:32FromGitter<krux02> I wonder how I can overload a proc for the empty set
12:50:27*xet7 quit (Ping timeout: 240 seconds)
12:51:50FromGitter<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:39vantagehello all. im new to nimm
13:02:37PMunchHi vantage, welcome to Nim :)
13:03:16*xet7 joined #nim
13:08:19vantagenim 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:52PMunchAgreed :)
13:11:12PMunchAnd I have no doubt that it will, more people are discovering it every day!
13:13:43vantageyeah, 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:39vantagewhat type of project are you working on PMunch?
13:15:09PMunchCurrently I'm working on a native implementation of protobuf in Nim
13:15:22PMunchBut I've done all sorts of things in it in the past
13:15:33PMunchFrom web-servers, games, and even my masters thesis
13:16:48vantagewhat about webservers... like nim doesnt have anything as solid as django atm
13:17:02*rockcavera quit (Ping timeout: 276 seconds)
13:17:58vantagei dont even know how youd go about deploying it... maybe docker...
13:18:03PMunchWell 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:40PMunchPersonally 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:55PMunchWell maybe not the forums, but play.nim-lang.org I'm pretty sure uses docker
13:19:54vantagenim also has a webserver example that ive seen
13:22:13vantagewhat was your thesis about pmunch
13:25:09FromGitter<zetashift> Nim mentioned in this: https://sdevprog.blogspot.nl/2018/04/overview-of-efficient-programming.html :O
13:25:45PMunchvantage, 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:34FromGitter<narimiran> PMunch: when is your presentation, btw?
13:28:00FromGitter<zetashift> Also the Nim in Action book has a great chapter about making a twitter clone in Nim + Jester
13:28:41vantagepmunch: 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:56PMunchzetashift, interesting link :)
13:29:05PMunchnarimiran, presentation?
13:29:15PMunchThe one I held yesterday?
13:30:20FromGitter<narimiran> haha, i thought it is today :)
13:30:23PMunchvantage, 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:30FromGitter<narimiran> how was it?
13:30:41PMunchnarimiran, it was good. People seemed to enjoy it
13:30:53FromGitter<diegogub> Someone using nim as JS? Is it possible to do AJAX requests?
13:31:06PMunchBut not too many people there, maybe we'll have to invite te a workshop with pizza :)
13:31:12PMunchAlways a hit with university students
13:31:14FromGitter<narimiran> will there be a video?
13:31:20FromGitter<zetashift> @diegogub I don't but we have this: https://github.com/stisa/ajax
13:31:54PMunchnarimiran, unfortunately not. We didn't have time to figure out how the recording system worked..
13:32:31FromGitter<narimiran> maybe next time.... both pizza and video :)
13:33:09PMunchThat would be great!
13:33:43FromGitter<diegogub> @zetashift thank you, I will check it.
13:33:47vantagewhy isnt there a js2nim program?
13:33:53PMunchWe wanted to have a workshop part of this thing as well, but didn't have time to properly plan it
13:35:08FromGitter<narimiran> workshop seems like a good idea!
13:35:46PMunchWe'd have to create some tasks though
13:35:49PMunchWhich is the real work
13:36:10PMunchMaybe even some fun challenges with a point system to allow people to "compete"
13:37:41FromGitter<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:10FromGitter<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:46FromGitter<alehander42> the first one, there is something like that https://github.com/mcclure/dts2nim
13:39:01vantagealehander like c2nim for js
13:39:09Yardanicovantage, there's none I know of
13:39:13Yardanicobut you can wrap JS libraries very easily
13:39:16FromGitter<alehander42> so I guess ^ dts2nim is closest
13:39:26FromGitter<alehander42> but it's a bit older, I promised the author to update it eventually with newer nim features
13:39:52FromGitter<alehander42> but after py2nim I wanted to just rewrite it in nim and also autodetect int/float differences
13:40:04FromGitter<alehander42> (and add async annotations and `js` for `any`)
13:40:10FromGitter<alehander42> just didn't have much time until now
13:40:41vantageyou can reuse js code but then its in js... correct me if im wrong, can you use js code from emscripten
13:41:55FromGitter<alehander42> aah, so you want to interact with js from native Nim code compiled with erm.. ?
13:45:21vantagealeh* so you created py2nim?
13:47:38*sleepyqt joined #nim
13:48:15FromGitter<zetashift> Him and zah I think
13:48:22FromGitter<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:51vantagedts2nim seems fine ;)
13:49:30vantagenon care as long as it works
13:50:45FromGitter<alehander42> great, please let us know if you have any issues with it
13:51:32vantagewill do
13:52:10vantageis 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:00FromGitter<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:30FromGitter<alehander42> but mostly you have the one chat (irc gitter etc) , nim forum and the nim subreddit
13:55:51vantagewas just wondering. matrix only came out a few years back, right?
14:02:44FromGitter<alehander42> it is relative new indeed
14:03:12FromGitter<alehander42> relatively*
14:03:34FromGitter<alehander42> I think most ppl in this chat use irc or gitter tho
14:04:26vantageive realized that.
14:05:18PMunchI've been meaning to try matrix, just haven't gotten around to it
14:05:42vantageanyway back to nim, would compiling my dependancies to a dll and linking to that speed up my compiling time?
14:06:01Yardaniconot really
14:06:08vantagewhay
14:06:18YardanicoNim will still have to analyze .nim files of these deps
14:06:29vantagewhat, why not :'(
14:06:30Yardanicoand nim doesn't compile C files of modules if nothing changed
14:06:49Yardanicoin these modules
14:07:15vantagebut sometimes the compilation takes ages,,, well three seconds
14:07:52shashlickOff 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:04PMunchvantage, for what kind of program?
14:08:25vantagepmunch, simple gui app
14:08:28shashlickFirewall is configured properly, I get a log entry on server but just that client disconnected
14:08:35Yardanicovantage, what module do you use for GUI?
14:09:02shashlickAny ideas appreciated thanks
14:09:03vantageyardanico, ive tried ui and nigui...
14:10:05*SenasOzys_ joined #nim
14:10:31vantageshash try disabling firewall temporarily
14:10:58shashlickI tried that too, same
14:11:50*SenasOzys quit (Ping timeout: 256 seconds)
14:11:52vantagelol, shash i can play twenty questions,
14:12:06shashlickvantage, pmunch - I did use matrix / riot for several months for #nim, works great
14:12:49shashlickOnly that i had a few days where it was unreliable so I moved to a weechat setup
14:13:08shashlickI'm good with 20 questions if it helps resolve this!
14:13:23vantageshash passwords
14:13:46vantageshash try using ftp client
14:14:00vantageshash try using online ftp client...
14:15:27shashlickI can connect from my local wifi network but not from work VPN to my laptop
14:16:37vantageshash is it even connected, the server i mean
14:17:01shashlickYa I should into servers and
14:17:08shashlickUgh
14:17:23shashlickI ssh into server and then try connecting back
14:17:28shashlickPing etc works
14:18:01vantagemaybe the program has its own connection settings
14:19:16vantageive been thinking about trying to make something like sublime text with nim
14:20:47shashlickCheck out nimedit
14:21:15vantagewhy did people make apporia if there was nimedit?
14:21:51vantageor was that afterwards
14:22:20vantageto have a good ide you need a good text editor
14:22:27PMunchNimEdit is upcoming, Aporia is old
14:22:58PMunchI personally think that creating a new IDE is a bad idea though
14:23:11PMunchBetter focus on getting proper integration with existing IDEs
14:25:32vantagepmunch 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:53vantagebut 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:58vantagei use vscode
14:27:04FromGitter<zetashift> I think he means like a stable language server or something. Imho vscode plugin works fine
14:27:19vantagethe debugging... and the build system...
14:27:21shashlickI used vscode for a while and it was really nice, but uses up so much RAM
14:27:26shashlickit's hard with a VM
14:27:29shashlickback to vim
14:27:31PMunchOh yeah, the integration isn't bad as it is right now
14:27:42PMunchBut I just don't see the need for a separate IDE
14:28:29PMunchI'd love to see something like this implemented for Nim though: https://langserver.org/
14:28:45vantagepmunch i was thinking of somehow showing expanded macros if you hover over a piece
14:29:44PMunchHmm, yeah that might be an edge case that would be hard to support
14:29:59FromGitter<zetashift> @PMunch i thought the vscode plugin wraps nimsuggest up into a ls?
14:29:59PMunchBut it would be hard to implement in a Nim-native editor as well
14:30:29PMunchzetashift, a proper language server protocol compliant server? That's news to me
14:30:37FromGitter<zetashift> okay maybe not that :P
14:30:48vantagepmunch i think lsp is a place to focus
14:31:13vantagelsp seems similar to parts of llvm and nimsuggest?
14:32:08PMunchYeah, 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:18PMunchWell, all that supports LSP
14:32:22FromGitter<zetashift> Should be worls apart, LSP is a protocal and LLVM is a compiler backend and nimsuggest are some ide tools
14:32:52PMunchPretty sure you could write LSP as a wrapper for nimsuggest though
14:32:55FromGitter<alehander42> I think most of the stuff that you imagine can be supported by a plugin
14:33:05FromGitter<alehander42> and with a lot less work than writing a whole new editor/ide
14:33:14vantagewrite an lsp interpreter for any texteditor, write lsp server for nim, easy
14:34:02vantagelsp might become like w3 standard in browsers for ides
14:34:13FromGitter<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:02vantagezeta i meant that llvm has ide tools as well, something that ides take advantage of
14:36:05FromGitter<zetashift> ah okay misread that
14:36:32vantagealeh i wasnt wanting to write an ide, just a sublime text clone, more specifically the text editing part
14:38:13vantagepmunch, how long do you think before vscode brings out lsp interpreter
14:39:43PMunchvantage, doesn't vscode already have lsp?
14:40:18*fvs joined #nim
14:40:52PMunchYeah, it already has full suport
14:41:17vantageso now we only need to give nim the thing ?
14:41:35Yardanicovantage, add lsp support to nimsuggest
14:42:41*vantage nodes
14:43:04FromGitter<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:21FromGitter<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:02PMunchYardanico, yeah either add it directly to nimsuggest, or create a wrapper
14:48:30vantagenimsuggest --languageserver
14:48:46shashlickya I satisfied my itch to an extent by writing snip - text editors are fun to write but hard to perfect
14:49:43shashlickI 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:17vantagei just need vscode to have outlines for nim
14:50:46vantageshash so speaking from experience?
14:52:00shashlickya, it's really fun, although I was just doing a command line version without ncurses which was a pain in itself
14:52:28vantagewhy doesnt windows have ncurses?
14:52:46shashlicki just didn't want the big dependency on dlls, etc.
14:52:55shashlickworked out for the most part
14:54:05vantageso the shash ideology: write for a usecase, dont compete with sea monsters
14:55:07shashlickwell, 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:26vantageyeah. 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:02FromGitter<krux02> vantage: yea always blame your younger self
14:57:20FromGitter<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:14FromGitter<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:13vantagenothing but its so embarrising
14:59:58vantageits like standing infront of a crowd and saying "i am human, i am fallable"
15:00:28*PMunch quit (Quit: Leaving)
15:01:53shashlickI'm sure everyone has a directory full of dead projects that never made it
15:02:52vantageyeah
15:03:21FromGitter<alehander42> I have like 100 only in my private repos :D
15:05:19vantageokay 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:37vantageif i can figure it out
15:09:31shashlickOr you could work on snip :P or nimedit
15:10:20*themagician quit (Ping timeout: 256 seconds)
15:10:40FromGitter<alehander42> if you want impact, I think lang server would be definitely better than working on niche editing
15:11:19FromGitter<alehander42> if you want to build something cool, text editors are great
15:11:47*NimBot joined #nim
15:12:09FromGitter<alehander42> snip looks cool @hshashlick do you plan on supporting more langs i see py and js
15:12:48FromGitter<alehander42> I just butchered your nick :D
15:16:11*themagician joined #nim
15:18:34shashlick@alehander42: absolutely, as soon as there's interest, I can add functionality
15:19:12shashlickvantage: 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:42shashlickfix issues in nim, nimble, choosenim, nimforum, website, or review PRs, or add documentation, enhance stdlib, write packages
15:20:31shashlickso 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:12vantageheres another question,,, can we precompile the stdlib and packages
15:22:53vantagecause atm it all has to be compiled when you use it in a project, not ideal
15:22:54vantagefor me
15:22:59vantageslow pc
15:24:02FromGitter<zetashift> It should be a one time bump since Nim support incremental compilation
15:24:33Yardanicovantage, support for incremental compilation is already in the works
15:24:51FromGitter<zetashift> In the works? :O
15:24:56vantageis it in .
15:25:47vantage0.18?
15:26:11euantorno, it's not finished yet and is a work in progress
15:27:31Yardanicovantage, 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:09shashlickSome challenges - you could use different architectures, same directory on Windows and Linux, etc
15:35:11vantageim 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:56FromGitter<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:33FromGitter<zetashift> It also complains about the numerous keywords/operators/functions(wtf?) in Nim
15:52:34miranmost comments on reddit are about rust.... nim is only mentioned by the existing nim user(s)
15:52:36FromGitter<zetashift> Not sure I agree
15:52:56FromGitter<zetashift> @miran that is usually the case ;p
15:53:03miranwell, `notin` is really not needed if we have `not` and `in`
15:53:34FromGitter<zetashift> Btw miran I recall that you've worked with F#, how are you liking Nim compared to F#?
15:54:16miranzetashift: yeah, that's usually the case, but not many times we see nim compared with "the big boys"
15:55:31miranyou 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:25mirani 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:30miranbut 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:33FromGitter<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:52FromGitter<krux02> miran: I think notin can stay in the language and ∉ should be an alias for in in the parser
16:02:06FromGitter<krux02> 😄
16:02:09miran:P
16:02:15Vantagezeta, The various keywords is something I think is one of Nim's strengths
16:02:41Vantagezeta, cause you can make your own, and its semi-standardized
16:02:57Vantageand not really a keyword...
16:03:09FromGitter<krux02> almost all operators have unicode representations of them
16:03:40FromGitter<krux02> I think these unicode versions of the operators should be allowed. But I think I am alone here
16:04:45mirancabhishek: slide 15 ("clean syntax"): the type of `mid` can be inferred too, and the last `return false` is not needed :)
16:05:16Vantagekrux I like unicode... gives it a maths feeling
16:05:53FromGitter<zetashift> miran but the return false makes it look so python-esque hehe
16:06:12FromGitter<zetashift> also isn't it more idiomatic to use result = false or result = true?
16:06:37miranyou want to return immediately when you come to true
16:06:59Vantage@cabhishek slide 5, cant you change the words here "Actively developed ~2008"
16:07:14miranbtw, if you want python feel, put `var mid: int` outside the loop, so inside of it you don't have `let`
16:08:16miranand maybe in the example don't use key which is immediately in the middle :D :D
16:08:29*xkapastel joined #nim
16:09:33mirancabhisheck: 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:59Vantagecabhis https://slides.com/akapatkar/nim-for-python-programmers#/15 the last example, I hate having to do that in python :D
16:14:03FromDiscord<claude> go takes less time to write than julia and nim?
16:15:20FromGitter<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:36miran`var mid: int` might do that, and you can then also explain that it has the default value of zero
16:16:46FromGitter<cabhishek> yes, good point
16:16:50Vantagehttps://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:59FromGitter<alehander42> you can alias any type with a custom name
16:18:14FromGitter<alehander42> Point *is* a tuple[x: int, y: int]
16:19:01FromGitter<alehander42> you can do some quite interesting things if you add distinct to the mix (but I rarely do it)
16:19:41Vantageooohhh... 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:44FromGitter<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:32FromDiscord<claude> how long has nim had incremental compliation? has it been a while?
16:39:14Vantageanyone know a json rpc for nim
16:39:49Vantageit 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:34shashlickYardanico: who is working on incremental compilation?
16:48:50VantageI thought it was Araq?
16:48:56VantageBut I'm likely wrong
16:49:10VantageBut 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:45FromGitter<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:01Yardanicokrux02: how do I turn it on? :D
17:50:13FromGitter<krux02> it's on by default
17:50:32FromGitter<krux02> or what do you mean?
17:51:24YardanicoI mean incremental compilation with sqlite
17:51:31Yardanico(incremental compilation of .nim files)
17:52:29FromGitter<krux02> well incremental compilation is turned on by default.
17:53:08FromGitter<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:12FromGitter<krux02> it's not perfect
17:53:21FromGitter<krux02> but it really does a very good job.
17:54:54YardanicoI know that incremental C compilation works
17:55:26Yardanicobut 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:48FromGitter<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:17FromGitter<krux02> Think about macros, they can generate funcitons based on the current date
18:01:23Vantagefor this code `type DocumentUri:string=discard`
18:01:34VantageI get an error
18:01:38Vantage`tempCodeRunnerFile.nim(1, 6) Error: implementation of 'DocumentUri' expected`
18:01:59VantageCan someone help?
18:03:29FromGitter<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:34FromGitter<krux02> it's not valid nim syntax
18:03:54FromGitter<krux02> type DocumentUri = string
18:04:05FromGitter<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:03mirandon't worry Vantage, all of us (or at least me) had the same errors in the beginning :)
18:10:36VantageI want to use the word `end` as an identifier... but its already a keyword
18:10:40VantageIs it impossible?
18:11:20miranhmm, i think i've never used `end` in nim :D
18:11:34FromDiscord<claude> surround it with backticks
18:11:49mirancan you use `last`, or something like that with the similar meaning?
18:12:41VantageIt yeah... I was wanting to use it for making a data type...
18:13:05VantageI'm going to stick with specs and use end_
18:13:08YardanicoVantage, end is a keyword, but you can create an issue on github about removing it :)
18:13:23Yardanicoor maybe Araq has something which will use `end` keyword
18:13:25VantageI don't even know what end is used for
18:13:26Yardanicoin the future
18:13:37miranYardanico: where is the `end` used? is it?
18:13:38YardanicoVantage, it's unused
18:13:55Yardanico"Some keywords are unused; they are reserved for future developments of the language."
18:13:57Vantagemaybe like lua func end
18:14:05YardanicoVantage, nooo
18:14:12miranVantage: nope, we use whitespace
18:14:12Yardanicothere's syntax skins, but they'll be removed
18:14:18FromDiscord<claude> if you do `? endX` i think it allows for `begin`/`end` syntax
18:14:29FromDiscord<claude> `#? endX` i mean
18:14:32Yardanicothat's syntax skin
18:14:39Vantageone liners all the way
18:14:41Vantageirc safe
18:15:17YardanicoVantage, I don't really understand why you have to use `end` or braces in a language if you already indentate your code
18:15:28VantageMaybe you can syntax skin away all of the keywords?
18:15:39YardanicoVantage, ?
18:15:59YardanicoVantage, syntax skins are for using braces or `being` / `end` instead of whitespaces
18:16:07Yardanicoand they'll be almost 100% removed
18:16:12Yardanicoit's not recommended to use them
18:16:15VantageYardanico: Sometimes... Like on irc... typing one liner safe code is just better...
18:16:51VantageI'm not gonna, it's just interfering with my data types
18:17:02YardanicoVantage, we have paste services for code :)
18:17:09Yardanicoand nim playground
18:17:28VantageWhy do data types even check for keywords inside a type body? You can't actually use if else do while and such
18:17:35miranYardanico: gist/share doesn't work on playground last i checked
18:18:23Vantagetype NimType=object[variable:int]
18:18:57Vantagehttp://play.nim.org/ is not working for me
18:19:07Vantagenvm
18:19:25YardanicoVantage, well, it has some issues currently
18:19:53VantageI used nim.org instead of nim-lang.org
18:20:19VantageYou should be able to import gists not just create gists -_-
18:21:09*krux02 joined #nim
18:22:38VantageWhat paste service should I use
18:22:47*jjido joined #nim
18:22:53FromGitter<krux02> ix.io
18:23:14FromGitter<krux02> I use it, because it has a trivial editor entegration
18:23:20FromGitter<krux02> integration
18:23:25Vantage?
18:23:34Vantageix.io is not working from browser
18:23:54FromGitter<krux02> yes you need to use it from the api to send stuff
18:24:08FromGitter<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:05FromDiscord<mraxilus> what's the difference between `type Object = object` and `type Object = object of RootObj`?
18:48:20FromDiscord<mraxilus> I'm not sure what inheritnig RootObj gives you, functionally
18:49:19dom96it gives you polymorphism
18:49:34dom96read up on what inheritance buys
18:52:22FromGitter<krux02> dom96: correct would be "inheritance based polymorphism"
18:54:36FromGitter<krux02> there is more than one way for polymorphism. And I think that inheritance based polymorphism should not be the default way.
18:55:24shashlickvantage: use snip if you want to work with snippets
18:57:24dom96Vantage: 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:13livcdso they just released graalvm v1.0
19:04:43*PMunch joined #nim
19:08:58shashlickdom96: I'm finally running that httpbeast benchmark
19:09:10dom96great
19:09:27shashlickhttpbeast up and running for helloworld, building wrk right now
19:12:03Yardanicoshashlick, 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:52FromGitter<krux02> I need an antigrivity mouse, so that it doesn't constantly fall from the desk
19:30:56FromGitter<krux02> or a bigger desk
19:36:10*amp907 joined #nim
19:38:13amp907Anyone have any success compiling ui on Windows x64 recently? Running into compiler errors trying out the example code.
19:38:29PMunchkrux02, you need a tiling window manager so you can stop using your mouse :)
19:43:36VantageI need help (like always
19:47:15Vantagehttps://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:57shashlickdom96, Yardanico: https://pastebin.com/1MwJ48Rc
19:48:59FromGitter<stisa> Vantage https://nim-lang.org/docs/manual.html#multi-methods
19:49:43Vantagestisa so the tutorial isn't the be-all-end-all
19:50:10Yardanicoshashlick, good but strange :)
19:50:15Yardanicowell, it's actually very good
19:50:36shashlickmofuw is slower since it sends out the mime type too
19:50:44shashlicknot sure if httpbeast does that
19:51:46shashlickdual proc = E5-2623 v3, 4 cores each
20:00:38*jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:01:07FromGitter<zetashift> @Vantage you could also use: https://wandbox.org/
20:05:55*noonien joined #nim
20:06:29PMunchWhat's up with the playground?
20:06:57*Vladar quit (Quit: Leaving)
20:07:07*rokups quit (Quit: Connection closed for inactivity)
20:11:18VantagePmunch... playground just spins when I click create gist >_<
20:11:43PMunchIt spins when I click "Compile" as well
20:12:19dom96shashlick: 780k niceee
20:12:21YardanicoPMunch, it doesn't work tepmorarily
20:12:26Yardanicotemporarily*
20:12:49*SenasOzys quit (Remote host closed the connection)
20:12:51PMunch"Temporarily", it's been like this for at least a day now
20:13:37dom96PMunch: Yeah :/
20:13:57dom96Dunno why zacharycarter didn't fix it
20:18:37shashlickdom96: what else should I compare with
20:19:10dom96tokio-minihttp
20:19:16dom96go as well
20:19:37dom96You might be able to grab the code for those from techempower
20:20:16dom96oh, apparently tokio-minihttp is fastest for plaintext on techempower now https://www.techempower.com/benchmarks/#section=data-r15&hw=ph&test=plaintext
20:20:33dom96so yeah, definitely try tokio-minihttp
20:20:55*PMunch quit (Quit: leaving)
20:24:50shashlickrust? hmm have to install the compiler, etc.
20:29:35Vantagewhy is nim and rust always compared?
20:29:36dom96yeah, might be a bit painful
20:29:53dom96IIRC I had to modify the tokio-minihttp code from techempower as well because it contains DB access and stuff
20:30:09dom96Vantage: Because both are systems programming languages
20:30:20*fvs left #nim ("ERC (IRC client for Emacs 25.3.1)")
20:32:16FromGitter<zetashift> fwiw tokio-minihttp is extremely barebones
20:33:11dom96httpbeast too :)
20:33:21dom96Curious how it compares
20:38:45shashlickI got it installed
20:38:49shashlickbut not able to build the example
20:39:11shashlickcan't find crate futures even though i did a cargo build in root which installed all deps
20:39:25shashlickare you going to make me join #rust now?
20:41:11dom96it's up to you if you want to pursue this, i'm happy enough with the httpbeast number
20:41:32shashlick:D
20:46:50*smt quit (Read error: Connection reset by peer)
20:46:50FromGitter<krux02> shashlick: the grass is always greener on the other side of the fence.
20:47:26*smt joined #nim
20:47:37shashlickthis already smells, I am not able to figure out how to compile the helloworld.rs file
20:47:42dom96I wonder though, @2vg opened a PR for httpbeast that enables some options to make it faster
20:48:50dom96shashlick: 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:58jos1hey
20:50:06jos1does anybody know if Table uses the hash exclusively?
20:50:11jos1or if it does a more exhaustive check afterwards
20:50:39dom96dunno, shouldn't be too difficult to see by looking at the source code though
20:50:46planetis[m]is there a way to set a seq[seq[float]] to zeros without running a loop?
20:51:01jos1o ok, because my hash function only uses two properties on my struct
20:51:07jos1i have a third one that i was using exclusively for debugging
20:51:31jos1is there a generic equals operator or something i can override?
20:52:47dom96jos1: what are you trying to do?
20:52:51dom96planetis[m]: Don't think so
20:53:37jos1i'm using a Table with a struct as a key
20:53:45jos1the struct implements hash
20:54:00jos1but i think i might have to overload the equals operator in order to make it work properly too
20:54:36dom96Why?
20:54:40jos1basically my hash function doesn't take every field on the struct into account, so my equals operator should do the same
20:54:42dom96just make your hash unique
20:54:50jos1well i think that Table resolves with both
20:54:53jos1to prevent hash collisions
20:54:58jos1because otherwise i don't understand why this is happening
20:55:19dom96oh, well you can define `==` for your object (struct)
20:55:32dom96proc `==`(a, b: Obj): bool = ...
20:55:32jos1oh ok
20:55:35jos1thank you so much
20:57:31shashlickdom96: crashes for me
20:58:07jos1dom96: yup, that was the issue. overloading the equality operator fixed it :) thanks!
20:58:14dom96shashlick: Hrm, please post the crash stack trace in the PR
20:59:23dom96jos1: great
21:02:25shashlickhttps://github.com/dom96/httpbeast/pull/3#issuecomment-382143784
21:03:12dom96thanks
21:05:37*miran quit (Quit: Konversation terminated!)
21:05:52*Trustable quit (Remote host closed the connection)
21:13:28shashlickgosh who'd think building a hello world would be so complicated
21:14:04dom96More than welcome to write an article about your experiences ;)
21:19:58shashlickok 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:35shashlickdom96: https://clbin.com/UiJDp
21:39:31FromGitter<krux02> announcement at everybody: ast_pattern_matching is now released as a nimble package
21:41:01FromGitter<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:07FromGitter<krux02> it is fully tested
21:41:19FromGitter<krux02> or as full as you can get.
21:41:58dom96shashlick: so tokio is slowest? 0_o
21:42:07dom96Are you sure there isn't some release flag you missed?
21:42:17shashlickI did a cargo build --release
21:43:28dom96that's weird
21:43:57dom96Guess I need to get httpbeast onto techempower asap :)
21:45:10FromGitter<krux02> shameless advertisement: https://github.com/krux02/ast-pattern-matching
21:45:47shashlickdom96: ya I tried again and ensured it was release mode - of course, unclear how many threads it runs by default
21:46:00FromGitter<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:11FromGitter<krux02> feels good to have this off my shoulder.
21:47:14shashlickokay so hold - I tested the framework from it's github site, not the code on techempower
21:48:20dom96Yeah, doesn't look like that one is parallel
21:48:23dom96Try this one: https://github.com/tokio-rs/tokio-minihttp/blob/master/examples/techempower.rs
21:52:13shashlickhttps://clbin.com/HBmw7
21:52:19shashlickmuch faster now but still slower than httpbeast
21:56:17*max3 joined #nim
22:04:46dom96shashlick: Non-2xx or 3xx responses: 15700624
22:04:58dom96You're testing it against the wrong url
22:05:08dom96you need /plaintext I think
22:06:47shashlickI see
22:09:43shashlickpretty much identical results
22:14:06dom96ahh interesting
22:15:41dom96If 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:47dom96and picks the highest value
22:16:16dom96is 400 what gave you the best results?
22:16:31shashlicki 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:26jos1exit
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