<< 12-11-2018 >>

00:35:12*wildlander quit (Quit: Konversation terminated!)
00:45:47*theelous3_ quit (Ping timeout: 240 seconds)
00:49:43*snowolf joined #nim
00:55:55FromGitter<zacharycarter> @kayabaNerve - was watching your interview on Ember - didn't realize DAGs were such a used thing in crypto
01:14:23*Aareon_ quit (Ping timeout: 276 seconds)
01:32:18FromGitter<kdheepak> @yglukhov I'm trying to build a iOS only app using just Nim, I think there are some features missing in the darwin (https://github.com/yglukhov/darwin) repository. Is the repo meant to be a macos/ios abstraction? I'm wondering if I should I make PRs when I find something that is iOS only?
01:49:55FromGitter<retsyo> OT: how to use AI/MachineLearning to decypher? Currently I have old applications from whose name I think they uses LZW compression. However I checked some LZW libs(C/python/nim) but none of them yields the same output files. I think the DOS app uses different code symbols during compression. So how can we program to fetch the proper compression algorithm? Thanks
01:50:45FromGitter<zacharycarter> @retsyo just FYI there is a nim offtopic channel on IRC and a nim-lang/twitch OT channel on gitter
01:50:55FromGitter<zacharycarter> not sure about discord or anything else
01:53:33FromGitter<zacharycarter> I don't have an answer to your question
01:53:36FromGitter<zacharycarter> sorry :(
01:58:23*smt quit (Read error: Connection reset by peer)
02:34:55*dddddd quit (Remote host closed the connection)
03:05:29*banc quit (Quit: ZNC - http://znc.in)
03:22:01*banc joined #nim
03:36:31*Aareon_ joined #nim
03:48:55FromGitter<technicallyagd> Is there a way to use `when` statement inside sequence construction to include more than one item?
03:48:59FromGitter<technicallyagd> like in here https://pastebin.com/MPKxWS0P
03:49:26FromGitter<technicallyagd> the second 6 will still be included
03:50:35FromGitter<technicallyagd> even when `no` is `false`
03:51:54FromGitter<zacharycarter> I don't think that will work
03:51:59FromGitter<zacharycarter> I think you'd have to do something like
03:53:26FromGitter<zacharycarter> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5be8f93692b7d1172175b5e3]
03:53:51FromGitter<zacharycarter> could probably find a more terse way to express that
03:54:09FromGitter<zacharycarter> but I don't think you can use when inside of an assignment statement like that - I could be wrong
03:54:24FromGitter<technicallyagd> you could have 1 item
03:54:27FromGitter<technicallyagd> max
03:56:02FromGitter<technicallyagd> ```code paste, see link``` ⏎ ⏎ this would work [https://gitter.im/nim-lang/Nim?at=5be8f9d26b9822140d17d8b7]
03:59:31FromGitter<technicallyagd> or do you mean this? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5be8faa3e0fd6b4360dcb6db]
04:00:07FromGitter<technicallyagd> they both work on my machine.
04:06:22FromGitter<zacharycarter> okay interesting
04:06:32FromGitter<zacharycarter> let me try a few things
04:06:34FromGitter<technicallyagd> Well actually, `when`won't work if you simply want to ignore the value ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ this will print `@[1, 2, 4, 5, 0, 0, 7]` [https://gitter.im/nim-lang/Nim?at=5be8fc4a6b9822140d17e9bf]
04:06:43FromGitter<technicallyagd> It will default to `0`
04:06:54FromGitter<zacharycarter> heh
04:08:30FromGitter<zacharycarter> well just a few guesses here
04:09:01FromGitter<zacharycarter> when is resolved at compile time - I'm guessing that's the reason 0 is the result instead of 6
04:09:35FromGitter<zacharycarter> I'm not sure what you're trying to do - but is there any reason you're relying on `when`?
04:11:05FromGitter<technicallyagd> I am trying to translate some cpp code that makes heavy use of preprocessor directives
04:11:41FromGitter<technicallyagd> ```code paste, see link``` ⏎ ⏎ Like this one [https://gitter.im/nim-lang/Nim?at=5be8fd7c47217e07ff0aff3b]
04:12:32*endragor joined #nim
04:12:53FromGitter<technicallyagd> oh wait it's actually `C`
04:13:33FromGitter<zacharycarter> I see
04:16:19FromGitter<technicallyagd> lol, that's a `Cmake` script. damn. I have wasted almost an hour on something I don't need.
04:19:57FromGitter<zacharycarter> lol
04:20:01FromGitter<zacharycarter> well
04:20:21FromGitter<zacharycarter> I'd definitely be Pinocchio if I said I hadn't been there before
04:20:35FromGitter<zacharycarter> but I'm glad you found some resolution :)
04:20:53FromGitter<zacharycarter> still curious to know if this is possible though - it seems like it should be
04:24:06FromGitter<technicallyagd> Yeah, that's kind of what I expected too.
04:28:43FromGitter<zacharycarter> I have a strong feeling it is and I'm just tired / don't know but I'll leave it up to someone else to answer
04:30:54FromGitter<technicallyagd> Lol, it's all good, this is not my priority now. Why haven't you gone to bed then? Deadline?
04:31:46FromGitter<zacharycarter> No - I am always tired haha, I slept most of the day away
04:32:09FromGitter<zacharycarter> personal issues not worth getting into here haha
04:33:04*vlad1777d joined #nim
04:33:56FromGitter<technicallyagd> I see.
04:33:58FromGitter<technicallyagd> Well, I hope you get the issues sorted out soon then.
04:34:19FromGitter<zacharycarter> thank you, me too :)
04:39:07*vlad1777d quit (Ping timeout: 268 seconds)
05:07:24*nsf joined #nim
05:20:45*kapil____ joined #nim
05:24:03*darithorn quit ()
05:46:25*ftsf joined #nim
06:06:34*Summertime quit (Quit: Sunsetting.)
06:07:31*Summertime joined #nim
06:34:40*stefanos82 joined #nim
06:57:07*brainproxy quit (Ping timeout: 246 seconds)
06:59:47*mech422_ joined #nim
07:02:05*smt joined #nim
07:03:00*krux02 joined #nim
07:03:04*mech422 quit (Ping timeout: 272 seconds)
07:19:05*brainproxy joined #nim
07:21:35*ftsf quit (Read error: Connection reset by peer)
07:21:55*ftsf joined #nim
07:26:28*ftsf quit (Remote host closed the connection)
07:57:51*Vladar joined #nim
08:10:39*smt quit (Read error: Connection reset by peer)
08:25:03*floppydh joined #nim
08:30:25*PMunch joined #nim
08:39:55*kapil____ quit (Quit: Connection closed for inactivity)
08:46:41PMunchHmm, I think your idea was better Araq. Create a DLL for nimsuggest instead of something I could just import directyl
08:47:08PMunchI tried to do it, but getting it to compile with both internals from the compiler and nimble packages was a pain :P
08:47:26PMunchBut does Nim <-> Nim DLLs work now?
08:47:49*smt joined #nim
08:56:40Araqwell it's covered by tests
08:56:54Araqand my idea wasn't "use a DLL", that was yours
08:57:08AraqI suggested you 'import' the compiler like nimsuggest does
08:57:28PMunchYeah that was my original plan
08:58:14PMunchBut after having made a copy of NimSuggest without all the input/output logic and trying to import it into my project I can't get it to compile properly
08:59:31*leorize quit (Remote host closed the connection)
08:59:52*leorize joined #nim
09:00:29PMunchAnd you were the first to mention a DLL: https://irclogs.nim-lang.org/03-11-2018.html#17:31:53 I always intended to try it as an import
09:00:36PMunchBut I'm not sure that is feasible
09:03:17PMunchHmm, what causes this error? http://ix.io/1rCo/
09:04:21PMunchIIRC the DLL tests where very basic. And the basic case work fine. But if you just get a tiny bit more complex the GC trips up: https://github.com/nim-lang/Nim/issues/6886
09:18:43*vlad1777d joined #nim
09:21:53*smt quit (Read error: Connection reset by peer)
09:24:26PMunchSeems like & throws an error when the program is compiled with -d:useNimRtl
09:24:31PMunchI'm guessing this is a bug?
09:26:36Araq"I can't get it to compile properly" why not?
09:27:22PMunchWell I tried to copy in the cfg file from nimsuggest. And when I tried to combine that with nimlsp which uses some nimble packages it was not happy
09:28:47PMunchIt uses --noNimblePath, turning it off or trying to manually specify the paths for the packages I use meant it didn't find things like Options
09:29:20*mrrio joined #nim
09:32:56Araqwith 0.19 out you can use the compiler Nimble package, I guess
09:33:09PMunchHmm
09:33:23Araqanyhow, that's easier to fix than the DLL problems
09:33:59PMunchGood point
09:35:32PMunchWhat's the deal with nimcore by the way?
09:43:12*dddddd joined #nim
10:01:04Araqsecurity
10:01:28Araqclients of nimscript don't necessarily want a gigant 'staticExec' loophole
10:04:12*couven92 joined #nim
10:05:14FromGitter<cyberlis> Hi, are there any service like hackerrank or leetcode, with nim support?
10:06:24FromGitter<mratsim> exercise.io
10:06:29FromGitter<mratsim> exercism.io
10:07:17FromGitter<mratsim> also this mentions Nim, but it doesn’t appear anywhere: https://www.hackerrank.com/environment/languages, I sent a mail 5 months ago but no answers
10:07:32FromGitter<cyberlis> @mratsim thank you :)
10:19:21FromGitter<gogolxdong> What's the canonical way of bit operation, like writing a bit ? Is it or?
10:34:04FromGitter<gogolxdong> or specifically , how to truncate 1 shl 8 to byte?
10:35:33Araqbyte((1 shl 8) and 0xff)
10:37:42*adeohluwa joined #nim
10:42:50*vlad1777d quit (Ping timeout: 272 seconds)
10:47:44FromGitter<gogolxdong> ``` +-+-+-+-+-+-+-+-+ ⏎ |1| 0x7f | ⏎ +-+-+-+-+-+-+-+-+``` [https://gitter.im/nim-lang/Nim?at=5be95a506b9822140d1a0da2]
10:47:53*smt joined #nim
10:49:21FromGitter<gogolxdong> from this layout to seq[byte]
10:50:36FromGitter<gogolxdong> a method as straightforward as this layout figures.
10:50:45*snowolf quit (Ping timeout: 252 seconds)
10:55:09*kapil____ joined #nim
11:00:03*snowolf joined #nim
11:01:41FromGitter<cyberlis> what is prefered string formating method in nim? strformat module?
11:10:08FromGitter<narimiran> @cyberlis yeah
11:13:07*hoijui quit (Quit: Leaving)
11:13:17FromGitter<cyberlis> i remember there was this type of syntax "text $1 another text $2" or "text #1 another text #2". was it deprecated?
11:13:54FromGitter<narimiran> well, you can still use it, but strformat might be more elegant/readable
11:17:51PMunch@gogolxdong, not sure what you are trying to do. But maybe binaryparse could be of help?
11:31:03FromGitter<AchalaSB> Hi, Im trying to compile Nim to wasm. I reffered https://github.com/Feneric/nim-wasm-helpers. Since it is not compatible with my OS Im not able to use this. ⏎ Is there any other approch to run Nim-> wasm??
11:35:51*snowolf quit (Ping timeout: 252 seconds)
11:36:04FromGitter<gogolxdong> I am writing QUIC.
11:38:22FromGitter<gogolxdong> initial packet.
11:38:44*snowolf joined #nim
11:49:36FromGitter<gogolxdong> construct initial packet.
11:53:18FromGitter<yglukhov> @kdheepak the darwin repo is intended to be a collection of ios/macos frameworks bindings. yet it lacks tons of things. Feel free to add anything missing.
11:54:32FromGitter<gogolxdong> need some magic or all the aligned field need 1 bit shift transform.
12:14:18*snowolf quit (Ping timeout: 264 seconds)
12:14:55FromGitter<Vindaar> Um, anyone else unable to bootstrap the compiler on current devel? Getting an `undeclared identifier: Stat` error from `os.nim`
12:19:56AraqVindaar: which OS?
12:20:07FromGitter<cyberlis> i can't find in documentation, can I dynamically append elements to set?
12:21:10FromGitter<alehander42> @AchalaSB have you tried the approach in the comments of https://github.com/nim-lang/Nim/issues/8713
12:21:29FromGitter<Vindaar> @Araq running void linux
12:21:58FromGitter<alehander42> e.g. compiling nim to C/C++(not sure which of those) code functional for clang and using clang to compile to wasm
12:22:05FromGitter<alehander42> what are you trying to build with nim & wasm
12:25:07FromGitter<zacharycarter> @AchalaSB you can't target WASM with Nim unless you're using NLVM - and I'm not sure how far along that is
12:25:39FromGitter<zacharycarter> you can use emscripten
12:26:40FromGitter<zacharycarter> I definitely wouldn't reference the repo you're looking at - while it might work, there's no reason you need to add vargarant to the mix
12:27:29FromGitter<zacharycarter> https://github.com/zacharycarter/zapp/blob/master/nim.cfg
12:29:13AraqVindaar: does 'nim --version' say "Linux"?
12:34:59FromGitter<Vindaar> @Araq yeah, it does: `Nim Compiler Version 0.19.9 [Linux: amd64]`
12:35:21PMunchgogolxdong: https://github.com/PMunch/binaryparse/blob/master/binaryparse.nim#L689 might be helpful
12:41:55FromGitter<Vindaar> @Araq ohh, I figured it out!
12:43:12FromGitter<Vindaar> It was a problematic `config.nims` which for some ended up defining `nimscript` which then caused the branch `when defined(nimscript)` in `os.nim` to be compiled, so `posix` was never imported. Sorry!
12:51:28*snowolf joined #nim
13:07:16*snowolf quit (Ping timeout: 260 seconds)
13:07:17*adeohluwa quit (Quit: Connection closed for inactivity)
13:08:28*snowolf joined #nim
13:12:12*endragor quit (Remote host closed the connection)
13:14:20*kapil____ quit (Quit: Connection closed for inactivity)
13:16:22*Yardanico joined #nim
13:16:51*pwntus quit (Quit: Leaving)
13:18:48*Yardanico quit (Remote host closed the connection)
13:19:33*Yardanico joined #nim
13:20:18*snowolf quit (Ping timeout: 264 seconds)
13:33:51*kapil____ joined #nim
13:54:15FromGitter<yyyc514> Are there shorthands for soring a seq? i feel like the common seq types should be defined somewhere
13:54:24FromGitter<yyyc514> or do i always reach for sortedByIt
13:58:04FromGitter<mratsim> everything is in nim algorithm: https://nim-lang.org/docs/algorithm.html
13:59:13FromGitter<yyyc514> yes i know that
13:59:31FromGitter<mratsim> if it’s not there build it ;)
13:59:53FromGitter<yyyc514> i found sort(system.cmp) but it's getting confused with tables for some reason i have no idea
14:00:21leorizedoesn't tables have their own sort?
14:00:41FromGitter<yyyc514> ah sort vs sorted :)
14:01:36FromGitter<yyyc514> `grades.deduplicate().sorted(system.cmp)`
14:01:44FromGitter<yyyc514> feels kind of verbose, feels like system.cmp shoudl be defaulted
14:02:36FromGitter<yyyc514> writeing sorted() is a one line but still
14:04:56FromGitter<yyyc514> i guess i can make it generic too though but still :)
14:05:16FromGitter<yyyc514> `proc sortedT (x: seq[T]) : seq[T] = sorted(x, system.cmp)` is there a reason that shouldn't be in core lib?
14:05:43FromGitter<mratsim> there is a PR open, but I thought it was merged in 0.19
14:06:29FromGitter<mratsim> https://github.com/nim-lang/Nim/pull/9174
14:06:34FromGitter<yyyc514> evidentally not :)
14:06:54FromGitter<yyyc514> sweet
14:10:14FromGitter<alehander42> are there any existing langs built as subsets of Nim compiling in a very niche way
14:10:31FromGitter<mratsim> spry-lang
14:11:41FromGitter<mratsim> and also this one: https://min-lang.org/
14:12:12FromGitter<alehander42> yeah I was reading on spry, I imagine their 'compilation' is compiling the interpreter + the program in one ?
14:13:09FromGitter<mratsim> you compile an interpreter, en then you can run it on.sy file or use a real
14:13:18FromGitter<mratsim> then*
14:13:28FromGitter<mratsim> a REPL*
14:13:36FromGitter<alehander42> yeah , this makes sense, so it uses nim values under the hood
14:14:37FromGitter<alehander42> ok, I was still wondering about a language that is actually a valid subset of Nim, just being compiled for something specific
14:15:02PMunchAraq, I got it compiled and working now
14:15:21PMunchNot sure what I did wrong yesterday, but it was a lot easier today :P
14:15:38FromGitter<alehander42> I wonder if I should use nim as the frontend for an eventual future version of https://github.com/alehander42/pseudo
14:16:52FromGitter<alehander42> but if I do, it would be a very limited subset which kinda makes it not idiomatic, so it feels like an unwise idea(this is a problem with the current frontend too)
14:17:37PMunchHuh, that is actually a pretty cool project
14:19:00FromGitter<pr-yemibedu> Nim has template language examples
14:19:48FromGitter<pr-yemibedu> so the JSON stuff is a subset.
14:25:16*Aareon_ quit (Ping timeout: 264 seconds)
14:34:21PMunchOh, I need to type up my FOSDEM lightning talk proposal
14:34:36PMunchAnyone else planning to propose a talk?
14:36:38Araqkrux02 might :P
14:37:39FromGitter<alehander42> what are you going to talk about @PMunch :O
14:39:15*Aareon_ joined #nim
14:40:29FromGitter<alehander42> @pr-yemibedu yeah, but I feel that reusing an existing language for pseudo sucks, as people who know that language now have to write in a very limited/bizarre version of it which is confusing
14:41:46FromGitter<alehander42> but maybe people already do it for some other langs/niche situations, so I was looking for examples
14:42:58*tribly quit (Ping timeout: 246 seconds)
14:44:10*tribly joined #nim
14:45:02AraqIMHO Pidgin-Nims are better than the alternative as hopefully the lexing rules (r"" vs "" vs """ """) remain
14:45:04FromGitter<pr-yemibedu> So writing in a DSL is the point of your pseudo.
14:45:19Araqwhich is always a pain to get right/remember
14:45:29Araq(Bash, I'm looking at you...)
14:47:24FromGitter<alehander42> @Araq what is a pidgin-nim ? a subset of nim?
14:47:32FromGitter<pr-yemibedu> pseudo is intended as a teaching aid for people just starting to learn a new language?
14:48:55FromGitter<alehander42> @Araq the problem is that I want to experiment with type safety and limit some unsafe features / add different type thingies, so this would be very unidiomatic, but maybe this would be obvious for an user
14:50:17FromGitter<narimiran> @yyyc514 regarding that PR about `sorted` with the default param: PR is merged (not open), so you should be able to use it if you switch to Nim devel
14:50:24FromGitter<alehander42> @pr-yemibedu it was intended as a format for "encoding" the logic of small programs/algorithms so you can easily generate it once (e.g. in a parser generator, by hand or in a ML-generating-code engine) and emit code in different languages
14:51:34shashlickHas anyone done any AST to Nim work before
14:52:21FromGitter<alehander42> @pr-yemibedu so I used Python for the "manual" usecase, as I thought it would be neat to write your logic in Python and bootstrap libs in e.g. C#/Go/Js/C++/wharever you need based on it, but today I feel a dynamic lang is a bad fit for this
14:53:54FromGitter<pr-yemibedu> so many this that make a ruby and python programmer happy also make life a pain for a Go or C# developer and vice versa.
14:55:31Araqalehander42: I would take Nim's lexer and parser and AST and modify it to suit your needs but I'm as biased as possible
14:55:31FromGitter<alehander42> well, I had lang-specific generators and middleware-s, so the generated code looks quite different in each lang
14:55:39FromGitter<pr-yemibedu> but I do think that showing the limits of one language and figuring out when is a good time to switch using pseudo could be nice.
14:57:04FromGitter<alehander42> Araq, I might do that, but this would be still a different language :D
14:57:20AraqI'm also not sure I understand your project
15:00:09Araqis this a least common denomiator language or a real language of its own?
15:00:16FromGitter<alehander42> it's 2 things
15:00:21FromGitter<alehander42> well, you have a intermediate format, let's call it "pseudoformat"
15:00:29FromGitter<tim-st> Araq: can this be legal syntax: `proc test(idx: var int = 0) = discard`
15:00:45FromGitter<tim-st> currently it doesnt work
15:01:28FromGitter<alehander42> and if you can encode a program/set of algorithms or a lib in it, it's basically ast + type info + a pseudo-specific "stdlib" definition
15:01:41PMunchalehander42, I was planning on pitching metaprogramming in Nim (as an imperative language)
15:01:54FromGitter<alehander42> and it generates code in e.g. 10 languages
15:02:03PMunchI think it's one of Nims more enticing features (asides from the syntax and the speed, but those are harder to wow people with)
15:02:29FromGitter<alehander42> the second thing is a frontend: you can use another language to compile to this intermediate pseudoformat ast
15:02:52AraqI personally am tired of metaprogramming talks and would love to see a "Nim as the new C(++)" talk
15:03:03Araqbut I'm not representative
15:03:08FromGitter<pr-yemibedu> so what is the upper limit of how powerful Pseudo can be?
15:03:19PMunchA small primer on what Nim is, then some high level stuff on what metaprogramming in Nim can do (more or less what this https://hookrace.net/blog/introduction-to-metaprogramming-in-nim/ shows off)
15:03:40FromGitter<alehander42> so that language frontend is the thing I am wondering about: subset of Nim vs Python vs some pseudo specific language
15:03:51PMunchAraq, well the C++ crowd is pretty entrenched I think
15:04:19FromGitter<pr-yemibedu> Really making something is great in a talk
15:04:20PMunchYou might be able to get some people who are new to game design or high-perf tasks that don't want to learn C++ though
15:04:21AraqPMunch, well I'm not telling you what to do
15:04:23FromGitter<arnetheduck> yay for less metaprogramming focus.. leads to a lot of hammer-and-everything-is-a-nail mentality
15:04:53FromGitter<alehander42> @pr-yemibedu powerful in what sense
15:05:41PMunchThat's fair, but I feel like it's one of Nims more "special" features
15:05:42PMunchIt's certainly one of the things that got (or maybe rather kept) my interest in the language
15:05:42Araqarnetheduck, metaprogramming is still great but I'm tired of *talks* about it :P
15:05:43*tiorock joined #nim
15:05:43*tiorock quit (Changing host)
15:05:43*tiorock joined #nim
15:05:43*rockcavera is now known as Guest38419
15:05:43*Guest38419 quit (Killed (livingstone.freenode.net (Nickname regained by services)))
15:05:43*tiorock is now known as rockcavera
15:05:49PMunchAraq, are there enough Nim talks at all to be tired of them?
15:05:53FromGitter<pr-yemibedu> if Pseudo has recursion, then it leaves out languages that need to be reimplement that functionality because of tying in some trampoline code.
15:06:20PMunchI'll make sure to mention all of the other great features Nim has to offer as well though, but I want to wet peoples appetites for learning Nim
15:06:34Araqalehander42, targetting 10 languages alone is a monster-task, you won't get to play with newish type system extensions :P
15:06:50FromGitter<pr-yemibedu> if Pseudo has pattern matching, how does that down grade to JS in an idiomatic way?
15:07:27FromGitter<arnetheduck> I'd like to see a talk on remolding the language with a different system.nim that does crazy stuff (implement a different `+` for `int`, remove `float` or whatever)
15:07:32PMunchAnd I will mention stuff like how meta-programming can be used to improve performance as well as promoting good patterns as well, so it should be interesting for a broad audience
15:08:04PMuncharnetheduck, that would indeed be interesting. But maybe not fit for a lighting talk at FOSDEM
15:08:07FromGitter<pr-yemibedu> so I was reading the very long list of Nim capabilities and it can just do almost anything with enough time and effort.
15:08:10FromGitter<arnetheduck> @PMunch you mean like https://github.com/status-im/nim-chronicles/issues/29? :)
15:08:25PMunchIt wold be cool if they had a "small" languages dev-room
15:08:49PMunchMight be a nice way to have more in-depth talks without having a full-on Nim dev-room
15:08:50FromGitter<alehander42> Araq, well I will have a very specific type system application
15:09:05FromGitter<alehander42> it's hard to explain quickly, I'll summarize my idea somewhere these days
15:09:58FromGitter<alehander42> @pr-yemibedu well it will probably not have pattern matching as it's very lang-specific indeed: also I want to make the code read-friendly , not write-friendly so it wouldn't use too many shiny things
15:10:10FromGitter<pr-yemibedu> @PMunch have you thought about a talk like "Solving small problems quickly in Nim" ?
15:10:49PMuncharnetheduck, with great power comes great responsibility. It's definitely easy to shoot oneself in the foot with metaprogramming
15:11:24PMunchpr-yemibedu, yeah I thought about it. But I don't think there's enough time..
15:11:33PMunchIt's a 15min max length
15:11:36FromGitter<pr-yemibedu> @alehander42 that answers the heart of the question about what your tool does. so it probably not good to target Nim, F#, Haskell, SML, for that reason possibly
15:12:03PMunchAnd I want to have at least 1/3 - 1/2 of it just introducing people to Nim as a language
15:12:26AraqPMunch, the other problem is not specific to meta-programming, but it definitely touches it. I call it "overly generic thinking"
15:12:56FromGitter<pr-yemibedu> the point of "small problems quickly" is to get you to show a practical or radical view of something. It would lend well to a C++ group. So instead of AWK and C++, just do it all in Nim.
15:13:04Araqyou have to sort 3 numbers and assuming you lack sort() in the stdlib, you write a sort algorithm
15:13:34Araqbut with guaranteed O(n log n), stable and using a dedicated algorithm for small Ns
15:13:44Araqbecause that's what the literature suggests.
15:14:03PMunchpr-yemibedu, not quite sure what you mean. Do you have an example of such a solved problem?
15:18:08FromGitter<pr-yemibedu> I am unfortunately just getting starting with Nim. I did not know how trivial you want it to be. AWK is just three for loops over a line reader that passes a predicate and string to be manipulated with a set of global sigils. Oh and a single START and END proc that get called.
15:18:50PMunchAraq, not quite sure what you mean.. Or rather what the problem was
15:19:52PMunchpr-yemibedu, ah no worries. But what would the problem to solve be?
15:20:51FromGitter<pr-yemibedu> instead of having to use AWK and C++ separate, you encode a mini-AWK in Nim.
15:21:11PMunchWhen do you use AWK and C++ together though?
15:21:14FromGitter<pr-yemibedu> what would be best to me is to show how you solve your own real problems
15:22:06AraqPMunch, never mind
15:22:49FromGitter<pr-yemibedu> awk is a better preprocessor of text files and C++ is a better language for a final algorithm. I would hate to do AWK in C++.
15:22:53PMunchYeah that was basically my plan, but with a high-light on metaprogramming
15:23:06PMunchThat's a good point
15:24:26FromGitter<pr-yemibedu> in Nim, meta is a broad spectrum. so much built in that actually looks like only simple procs
15:26:04FromGitter<mratsim> how about “Nim is the new Fortran” talk ;)
15:26:20*Trustable joined #nim
15:26:39FromGitter<pr-yemibedu> Nim Is actually better than Fortran, because you can write Fortran in Nim
15:28:09FromGitter<mratsim> well that argument doesn’t hold due to quine ;) https://github.com/mame/quine-relay
15:32:16PMunchHaha, that's a fun project :P
15:33:42PMunchOh Nim is in there as well, wonder what it does
15:36:26FromGitter<mratsim> the code is scary
16:01:35*darithorn joined #nim
16:04:24PMunchtim-st, if you are here could you try to run the suggestlib branch of nimlsp?
16:04:55PMunchI just updated it. It should use code that I've copied from nimsuggest intsead of spawning separate nim processes. I hope this makes it work better on Windows
16:04:57*PMunch quit (Quit: Leaving)
16:05:35*iffy joined #nim
16:05:42FromGitter<kdheepak> @yglukhov thanks for the reply. There's some things that are iOS specific, do you think that should go in there as well?
16:06:26*narimiran joined #nim
16:07:38iffyI'm getting sporadic IOErrors (on Travis-CI) when trying to do `write(stderr, longstring)`. Sometimes it fails, sometimes it doesn't (without changing the code). Since it's sporadic, I don't know how to reproduce it. But wondering if others have come across this?
16:09:49iffyalso, it never fails on my computer
16:10:01iffy(or hasn't yet, rather)
16:10:13FromGitter<pr-yemibedu> how long is the string?
16:10:57iffy776 bytes
16:11:18iffyI'm not flushing after I write; is that the problem? (I write lots of other stuff before it fails on the long string)
16:12:14FromGitter<pr-yemibedu> it is what I was thinking, not sure how the internals reuse the handle between writes.
16:12:36iffyk, I've added some flushes -- I'll see if it happens again
16:12:43FromGitter<pr-yemibedu> but beyond how long the string is, how often does the write call occur?
16:13:33iffyAbout a dozen times in a second -- not that fast
16:14:39FromGitter<pr-yemibedu> instrumentation?
16:14:50iffy?
16:15:26FromGitter<pr-yemibedu> I mean are you writing out diagnostic information or are you really getting a lot of non fatal errors that you are constantly outputting?
16:16:42iffyThe failures come in my unit tests, when I'm writing my application's normal log information to stderr. Here's a link to just above one of the errors: https://travis-ci.org/iffy/wiish/jobs/454045905#L1031
16:16:46FromGitter<pr-yemibedu> because if you capture the error in the loop and write it out only when you break out, that may also help.
16:17:05iffyI'm not capturing the error -- I just let it fail the test
16:17:18FromGitter<pr-yemibedu> oh okay.
16:18:17iffyI have more examples, too. Here's one that went a little nuts with the sysio/system loop: https://travis-ci.org/iffy/wiish/jobs/453468802#L1274
16:19:21iffyAnd here's one that didn't really go nuts at all: https://travis-ci.org/iffy/wiish/jobs/453468387#L1027
16:19:41iffyThe last two were on the same unchanged code. The first link I shared contains flushing
16:21:23FromGitter<kdheepak> When I try to run the profiler, I get the following error: `../../../.choosenim/toolchains/nim-0.19.0/lib/system/profiler.nim(92, 23) Error: undeclared identifier: 'framePtr'`
16:23:35FromGitter<kdheepak> There's a related issue to this: https://github.com/nim-lang/Nim/issues/8991
16:23:47FromGitter<kdheepak> so no profiler support in v0.19.0 at the moment?
16:26:03FromGitter<kdheepak> The problem is that a config.nims exists in the current folder. https://github.com/nim-lang/Nim/issues/4446#issuecomment-239356177
16:28:47*pwntus joined #nim
16:28:57*pwntus_ joined #nim
16:29:09*pwntus quit (Client Quit)
16:29:12*pwntus_ quit (Read error: Connection reset by peer)
16:29:28*pwntus joined #nim
16:32:52*smt quit (Ping timeout: 246 seconds)
16:40:18*smt joined #nim
16:44:20*kapil____ quit (Quit: Connection closed for inactivity)
16:45:18*smt quit (Read error: Connection reset by peer)
16:45:22*smt` joined #nim
16:50:25*smt` quit (Ping timeout: 244 seconds)
17:00:19*iffy1 joined #nim
17:02:49*iffy quit (Ping timeout: 244 seconds)
17:06:10FromGitter<tim-st> PMunch: yes, I will test it, thanks
17:07:49FromGitter<pr-yemibedu> @kdheepak I run with the profiler turned on.
17:08:28FromGitter<kdheepak> @pr-yemibedu I think if there's a config.nims file, it won't work.
17:09:03FromGitter<pr-yemibedu> I do in fact *not* have a custom config.nims setup
17:10:00FromGitter<tim-st> PMunch: build fails: `... nimlsppkg\suggestlib.nim(96, 9) Error: undeclared identifier: 'listUsages'`
17:10:22FromGitter<kdheepak> @yglukhov how much effort do you think it is to add the Python exception support in nimpy?
17:11:30FromGitter<kdheepak> ```code paste, see link``` ⏎ ⏎ I think the change needed is the above three lines to this macro: ⏎ ⏎ https://github.com/yglukhov/nimpy/blob/1054b36eab795109ccab43f1026fa129c83282a1/nimpy.nim#L738-L772 [https://gitter.im/nim-lang/Nim?at=5be9b44162866f74738a3d23]
17:12:29FromGitter<kdheepak> To get the bare minimum support for an Exception, i.e. raise a general purpose exception in all cases.
17:13:42*iffy1 left #nim (#nim)
17:14:18FromGitter<kdheepak> I think the `if` block here needs to include a `try`, `except` ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ with the `except` including the code above. [https://gitter.im/nim-lang/Nim?at=5be9b4ea3102f145218e812d]
17:14:37FromGitter<kdheepak> and returning a PPyObject(nil)
17:14:53FromGitter<kdheepak> Thoughts? I think you'll be able to think of better ways to do this.
17:15:04FromGitter<yglukhov> @kdheepak regarding darwin. there are already appkit and uikit frameworks there. so it's fine to add platform specific frameworks. platform-specific definitions within a single file should just be behind `when defined(ios/macosx)`
17:15:39FromGitter<kdheepak> Okay, great! I'll plan to do that.
17:16:54*snowolf joined #nim
17:18:52FromGitter<yglukhov> @kdheepak regarding py exceptions you've clearly outlined the way I would do it, there's not much to add, except more specific exception type mapping, but that's not necessary for the mvp :)
17:20:54FromGitter<kdheepak> I'd submit a PR but my nim macro knowledge is abysmal.
17:21:12FromGitter<yglukhov> ok, thank you.
17:21:25FromGitter<yglukhov> what do you want to add to darwin btw?
17:21:53FromGitter<kdheepak> I was planning to use pdfkit and add apple pencil support.
17:22:50FromGitter<kdheepak> I'm at the moment struggling to get a white screen with a button showing, so it'll be a little while before I can get everything going and get to a point where I'm actually contributing to your `darwin` repo.
17:23:19FromGitter<kdheepak> But you've done a great job with `darwin` (and `nimx`) too!
17:23:25FromGitter<yglukhov> wow, i've never even heard of pdfkit :)
17:23:43FromGitter<kdheepak> pdfkit is actually ios/macos :D
17:23:55FromGitter<kdheepak> so it makes a lot of sense to be in `darwin`.
17:26:57FromGitter<yglukhov> indeed. you can try give me some more details on your nimx problem, maybe I'd be able to help. maybe better pm though, not to flood here.
17:27:33FromGitter<kdheepak> Okay sounds good! I'll PM. I didn't know if it was more appropriate here or via PM.
17:28:04FromGitter<kdheepak> I will say, I'm really really liking Nim's objc interlop :)
17:30:12FromGitter<yglukhov> the nim one or the darwin one? those are different you know :)
17:30:44FromGitter<kdheepak> I don't think I follow?
17:31:11FromGitter<kdheepak> Nim's objc interlop vs the darwin objc interlop?
17:32:26FromGitter<yglukhov> nim has a builtin way to bind to objc (grep importobjc in the manual). darwin introduces its own way (grep objc macro in darwin).
17:32:42FromGitter<kdheepak> ohhhh I didn't know that!
17:35:00FromGitter<yglukhov> well, maybe it doesn't matter then. but it's good you started with darwin ;)
17:36:13FromGitter<kdheepak> Haha yeah, I think I was just using `{.objc.}`
17:36:16*smt joined #nim
17:36:59FromGitter<kdheepak> So I guess `darwin`'s mac specific objc interlop :)
17:36:59FromGitter<zacharycarter> Can someone explain this explanation to me? - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5be9ba3b9600d10e649c1ed7]
17:37:08FromGitter<zacharycarter> what exactly are offline objects?
17:37:16FromGitter<zacharycarter> does he mean like a binary executable?
17:38:59FromGitter<mrwonko> strutils.split's documentation (https://nim-lang.org/docs/strutils.html#split%2Cstring%2Cchar%2Cint) says "The same as the split iterator (https://nim-lang.org/docs/strutils.html#split.i,string,char,int), but is a proc that returns a sequence of substrings." It sounds like in my use case I should prefer the split iterator, but the link seems to be wrong…
17:39:59FromGitter<mrwonko> okay, found the documentation (https://nim-lang.org/docs/strutils.html#15) though
17:40:16FromGitter<kdheepak> @zacharycarter I think it means that with Nim I can compile code to C and ship C, (I can also compile to binaries and ship them). But with Scopes, I'm even though I can compile to JS and ship JS, I'm more likely (?) to ask the developers to install Scopes and compile to JS on their end and not ship the JS.
17:40:58FromGitter<zacharycarter> gotcha
17:41:08FromGitter<zacharycarter> thanks @kdheepak
17:41:37FromGitter<zacharycarter> it's interesting though that such an approach would be taken with a language (or an extension of one) targeting game development
17:41:45FromGitter<zacharycarter> I imagine a binary would be your end goal
17:41:57FromGitter<zacharycarter> not to have to fire up some interactive programming environment to play the game
17:42:04FromGitter<zacharycarter> I probably just need to explore the project a bit more
17:52:26*smt quit (Read error: Connection reset by peer)
17:52:40*smt joined #nim
17:54:31*PMunch joined #nim
17:54:46shashlickhow do you do multiple nimble packages in one repo?
17:55:22FromGitter<zacharycarter> I don't think you can?
17:55:22*Yardanico quit (Remote host closed the connection)
17:55:26FromGitter<zacharycarter> well
17:55:31FromGitter<zacharycarter> let me take that back - you can
17:55:35shashlickgot an example - https://github.com/nim-lang/graveyard
17:55:36FromGitter<zacharycarter> but not in the same directory
17:56:41FromGitter<zacharycarter> I don't think there is any way to manage them from a hierarchical manner
17:56:54FromGitter<zacharycarter> or like a top level manner - if you understand what I'm trying to get at
17:56:56*Yardanico joined #nim
17:57:07shashlickwould be nice but okay for now i guess
17:57:13shashlicki'm wrapping http://tree-sitter.github.io/tree-sitter/
17:58:28*Yardanico quit (Remote host closed the connection)
17:58:29PMunchtim-st, still here?
18:00:42FromGitter<tim-st> Yes, btw: I think if you echo the current exception here https://github.com/PMunch/nimlsp/blob/suggestlib/src/nimlsp.nim#L413 that can yield the error from last time
18:01:47PMunchHmm, I'm pretty sure I had that
18:02:52PMunchI just reset my local branch to the suggestlib one and it works fine..
18:03:38FromGitter<tim-st> for me building it doesnt work, I'm on 0.19. dev
18:04:28PMunchHmm, same here
18:04:33PMunchAre you building with "nimble debug"?
18:04:38FromGitter<tim-st> yes
18:04:45FromGitter<tim-st> hm, wait
18:05:06*martin1_ quit (Ping timeout: 268 seconds)
18:05:24FromGitter<tim-st> with nimble debug it seems to work, but then I get another error from the last time
18:05:49FromGitter<tim-st> Hint: ast_pattern_matching [Processing]..\lib\system.nim(2970) sysFatal ⏎ Error: unhandled exception: Unknown IO Error [IOError]
18:05:56FromGitter<pr-yemibedu> @Araq how were you able to get such a nice language that compiles on Linux and Mac and Windows?
18:07:02FromGitter<pr-yemibedu> was there a simple minimum that needed to be complete for the compiler to work on each platform?
18:07:29PMunchtim-st, hmm strange
18:07:35FromGitter<tim-st> PMuch: it compiles with `nim c -d:nimcore -d:nimsuggest -d:debugCommunication -d:debugLogging` nimlsp.nim
18:07:47FromGitter<tim-st> the problematic one is `-d:jsonSchemaDebug`
18:07:56PMunchHuh, strange
18:08:09PMunchAll that does is echo out the result from the jsonschema macro
18:09:13FromGitter<mrwonko> Is there reflection in Nim? I'd like to write a URL Query String Parser that takes a tuple type as an argument and creates a value of this type with the fields set using the arguments of the matching name. (Similar to Go's JSON/XML/… parsing into structs.)
18:10:14PMunchmrwonko, not 100% sure what you mean. But I'm pretty sure it should be possible .)
18:12:15FromGitter<tim-st> PMunch: same behaviour like before, I try to add the exception output
18:12:17FromGitter<pr-yemibedu> @mrwonko wants something like the F# type provider
18:13:43FromGitter<pr-yemibedu> @mrwonko you can get at the AST in Nim and push your new types or fields. I think that is how the JSon Parser works.
18:17:14FromGitter<pr-yemibedu> maybe this helps? https://hookrace.net/blog/introduction-to-metaprogramming-in-nim/#json-parsing
18:18:08*druonysus joined #nim
18:18:08*druonysus quit (Changing host)
18:18:08*druonysus joined #nim
18:20:25FromGitter<pr-yemibedu> Then https://nim-lang.org/docs/json.html and go down to the *`to` macro* section to see what may be your ideal.
18:23:04FromGitter<mrwonko> ah yes, `to` looks very close to what I have in mind
18:30:28*brainproxy quit (Ping timeout: 245 seconds)
18:40:02FromGitter<mrwonko> Okay, so if I understand this correctly I basically need to generate the AST to parse the string and construct the tuple from it, where my input is a NimNode of the tuple type. That looks like a nice way to get to know the macro system, but also like it would take me a couple of hours. I'll stick to a special case solution for now and will come back to it later.
18:42:38FromGitter<pr-yemibedu> Nim has templates too and really the hold thing is just a proc with an understanding of about four or five macro level things.
18:44:04FromGitter<tim-st> PMunch: how can I test the lsp server manually? I want to feed it some json data and look when it crashes
18:44:20FromGitter<pr-yemibedu> but you may want to implement a procedure that does the split and a parse in a case statement for building a dictionary of your query.
18:44:32PMunchHmm, well you would need to imitate the LSP protocol
18:44:46FromGitter<tim-st> I have some logged jsons
18:45:03FromGitter<tim-st> where it says `Got frame:`
18:45:21PMunchYou could basically use this: https://github.com/nim-lang/langserver/blob/master/langserver/client.nim
18:48:30FromGitter<mrwonko> Is there any standard non-exception error type?
18:48:56FromGitter<mrwonko> Or are you encouraged to use exceptions for all types of errors?
18:49:32FromGitter<mrwonko> I'm only aware of Option, which reduces errors to a simple "not present" state
18:50:00FromGitter<pr-yemibedu> I don't use exceptions
18:51:10FromGitter<pr-yemibedu> I think that https://nim-lang.org/docs/system.html#ValueError is what I use.
18:51:12FromGitter<mrwonko> Yeah, that would also be my preferred approach. I'm very used to thinking in Go idioms these days, where each function that can fail has an explicit `error` return value, although I personally prefer a proper Monad like Haskell's `Either`
18:51:43FromGitter<Clyybber> How can I create a macro that takes in strings?
18:51:48FromGitter<Clyybber> Or identifiers?
18:51:56FromGitter<Clyybber> Which are types?
18:53:55*miran joined #nim
18:54:00*zachk joined #nim
18:54:41*zachk quit (Changing host)
18:54:41*zachk joined #nim
18:55:03*narimiran quit (Ping timeout: 268 seconds)
18:55:25FromGitter<alehander42> @pr-yemibedu yeah it might be hard, I need the opposite: I want to have a lot of static guarentees in my input programs
18:55:52FromGitter<alehander42> so even if I generate e.g. a ruby or c program, it will still be checked very well
18:56:36FromGitter<alehander42> this would be hard tho, even for numbers, because of things like 1/0 or over/under-flow in different languages(I underestimated this, but Araq had a good point about it and error checking)
18:59:46FromGitter<alehander42> but I hate the idea of saturated arithmetic by default.. putting `mod X` after a primitive op invisibly is even worse
18:59:57FromGitter<alehander42> it needs special operators, as in Nim
19:00:59FromGitter<alehander42> and it leads to silent data corruption otherwise
19:01:18FromGitter<alehander42> e.g. https://stackoverflow.com/questions/50630376/int-overflow-coerced-to-0
19:01:19FromGitter<pr-yemibedu> what does that fix?
19:02:44*theelous3_ joined #nim
19:04:48FromGitter<pr-yemibedu> oh I see. well some languages have large number towers (Scheme) or internally go across the primitive and Object analogous types (Ruby?)
19:05:32FromGitter<pr-yemibedu> but that does not tell you anything about the algorithm. that just means the implementation in the language being naïve will give poor or incorrect results.
19:08:58FromGitter<pr-yemibedu> is the point to give *optimal* code ever? or only always correct code? the latter at least can clearly be given rules based on known types. You may have to `Box` an `int32` or call `.toString()` with a `.TryParse()` to form equivalence. Knowing is half the battle. I wonder what would be equivalent for the literal irrational `1/3` supported in Scheme?
19:09:09FromGitter<alehander42> well, my hope is that the input program will be proved relatively correct
19:09:26FromGitter<alehander42> the problem is that usually you control the backend
19:09:54FromGitter<alehander42> so you can make sure that the code will be executed as your type system promised
19:10:29FromGitter<alehander42> but if you target a lot of other languages, and you specifically want to generate idiomatic code in them, this becomes pretty hard in some cases
19:10:48FromGitter<alehander42> the point is to give correct & idiomatic code
19:12:23*brainproxy joined #nim
19:12:49FromGitter<alehander42> well I guess you can generate (/ 1.0 3) ? I am not sure about this part of scheme's standrd
19:13:18*floppydh quit (Quit: WeeChat 2.3)
19:15:23FromGitter<alehander42> anyway, this might be getting very offtopic for here, you can ping me in the pseudo room or on pm on this topic if you have questions I guess
19:21:48shashlickhow do you specify that nim should compile with gcc or g++ depending on file?
19:23:47*kapil____ joined #nim
19:42:37shashlickSome forward typedef declaration breaking in cpp mode but works in c mode
19:43:05*NimBot joined #nim
19:43:20*natrys joined #nim
19:51:07*platoff joined #nim
20:05:42*snowolf quit (Ping timeout: 252 seconds)
20:06:41*stefanos82 quit (Quit: Quitting for now...)
20:07:33*snowolf joined #nim
20:11:22*smt` joined #nim
20:12:00*smt quit (Ping timeout: 252 seconds)
20:13:40*Trustable quit (Remote host closed the connection)
20:14:50*smt` quit (Read error: Connection reset by peer)
20:15:01*smt joined #nim
20:15:10*vlad1777d joined #nim
20:15:13FromGitter<tim-st> PMunch: my only guess is, that `file:///C:/Users/-/test/test.nim` should be `file://C:/Users/-/test/test.nim` assuming it is seen as `/C:/Users/-/test/test.nim`
20:16:21PMunchWait, you get file:///C: ?
20:16:24PMunchThat's not right..
20:17:03FromGitter<tim-st> `server: New document opened for URI: file:///C:/Users/-/test/test.nim saving to C:\Users\-\nimlsp\08763A20C6A9BEC3.nim`
20:17:25FromGitter<tim-st> after this line the server is always already crashed
20:18:05PMunchHmm
20:18:58PMunchYeah it then tries to open nimsuggest for /C:/Users/-/test/test.nim
20:19:16PMunchCould you try "nimsuggest --v2 --stdin /C:/Users/-/test/test.nim" in a terminal?
20:19:22FromGitter<tim-st> sure
20:19:45FromGitter<tim-st> `cannot find file: C:\C:\Users\-\test\test.nim`
20:20:03FromGitter<tim-st> without the prefix it works
20:20:15FromGitter<tim-st> (prefix slash)
20:22:08PMunchAha..
20:22:10PMunchHmm
20:22:21PMunchDo you have an other editor to test with?
20:22:24*smt quit (Read error: Connection reset by peer)
20:22:39FromGitter<tim-st> yes, intellij-lsp plugin, but there already initialize fails
20:22:48PMunchJust to see if that's a bug in Sublime LSP (as I assume), or if it is a very strange design choice in LSP (not off the table)
20:23:02PMunchInitialize fails?
20:23:03*smt joined #nim
20:23:32FromGitter<tim-st> that's the error I get from intellij-lsp; maybe you can install it and test if it works for you
20:24:00PMunchWhat's the error?
20:24:13PMunchOh wait
20:24:29PMunchThe file:///C:/ thing is from intellij-lsp
20:24:39FromGitter<tim-st> no, sublime
20:24:47PMunchAh okay
20:24:59FromGitter<tim-st> I'm pretty sure the path is wrong
20:25:05PMunchWhat was the error from intellij then?
20:25:15PMunchYeah it should be file://C:/
20:25:19FromGitter<tim-st> it takes 2mins to start
20:26:06PMunchOuch..
20:27:25FromGitter<tim-st> it says: "LanguageServer for definition exe path ... not initialized after 10seconds"
20:30:24PMunchHmm, strange
20:30:29PMunchAny output from nimlsp?
20:30:57*oky left #nim (#nim)
20:31:49FromGitter<tim-st> only this few things where server: is from nimlsp https://gist.github.com/tim-st/a4d2f6388cfe07ff9f001395e83005b4
20:32:20FromGitter<tim-st> so it crashes shortly after nimsuggest was started
20:32:30FromGitter<tim-st> it even echoed it's config used
20:32:38FromGitter<tim-st> it must be the wrong path
20:34:40PMunchYeah, probably
20:34:54PMunchHmm
20:35:28PMunchSo we have to remove slashes until it's a valid path..
20:35:32PMunchOr something else silly
20:36:18FromGitter<tim-st> does it mean sublime gave us bad file path?
20:43:45PMunchThink so yeah
20:44:00PMunchBut it would be interesting to try it with another LSP client
20:44:07PMunchTo see if we get similar results
20:44:47PMunchIf you just want to test it locally you can just change the 7 to an 8 in the slicing of the URI
20:49:20FromGitter<tim-st> seems to work :)
20:50:50FromGitter<tim-st> but seems quite buggy :D
20:51:00FromGitter<tim-st> atleast no crash
20:51:18FromGitter<tim-st> well now it crashed
20:51:57*platoff quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
20:53:33*stefanos82 joined #nim
20:56:56FromGitter<zacharycarter> :P
20:59:39FromGitter<tim-st> PMunch: `graph.repr` doesn't work and results in stackoverflow exception, this made it crash
21:00:29PMunchtim-st, that is purely a debug statement. Just delete it
21:01:23FromGitter<tim-st> ok, nice, I think this plugin can really make lsp work good with nim
21:01:45PMunchThat's the idea :)
21:01:45*platoff joined #nim
21:03:13FromGitter<alehander42> if it crashes, does it crash the plugin host
21:03:25FromGitter<alehander42> i am not very well versed in sublime's plugin model
21:04:46PMunchWell, if nimlsp crashes it shouldn't crash the Sublime LSP plugin
21:04:47FromGitter<tim-st> you get an error window it asks you if you want to restart the server. But even if you restart, the server works again but sublime doesnt get it, so you have to restart sublime, at least this is my feeling
21:04:58PMunchBut if the Sublime LSP plugin crashes I have no idea what happens
21:05:50*nsf quit (Quit: WeeChat 2.3)
21:12:03*flyx quit (Ping timeout: 264 seconds)
21:12:20*flyx joined #nim
21:12:48*theelous3_ quit (Ping timeout: 252 seconds)
21:13:46FromGitter<alehander42> great, then I should really try the lsp plugin soon
21:14:24PMunchOh don't get me wrong
21:14:30PMunchIt's still very early stages :P
21:16:53*flyx quit (Ping timeout: 250 seconds)
21:17:16*flyx joined #nim
21:18:07PMunchBut by all means, try it out and create bug reports :)
21:23:40*miran quit (Ping timeout: 268 seconds)
21:41:54*stefanos82 quit (Quit: Quitting for now...)
21:42:56*kapil____ quit (Quit: Connection closed for inactivity)
21:58:48*mrrio quit (Quit: Connection closed for inactivity)
22:09:18*Vladar quit (Remote host closed the connection)
22:17:24*enthus1ast quit (Ping timeout: 252 seconds)
22:30:55*enthus1ast joined #nim
22:46:38FromGitter<gogolxdong> @PMunch ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bea02ce62866f74738c3c31]
22:49:08FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bea03646b9822140d1e722f]
22:50:53FromGitter<gogolxdong> Is string stream proper for putting bits as [1,0x7f, ...]?
22:57:57PMunchgogolxdong, what are you trying to do there?
22:59:09PMunchThat definition is a 9 bit sequence
22:59:14FromGitter<gogolxdong> putting 1, 0x7f binary into buffer
22:59:39FromGitter<gogolxdong> bit
23:00:15PMunchIt would read the first bit, which is 0, then the next 8 which is 00000010
23:00:55FromGitter<gogolxdong> How to achieve this?
23:01:06PMunchWhat are you trying to do?
23:01:40FromGitter<gogolxdong> construct QUIC initial packet
23:02:16FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bea0678bb06d73a9964aba5]
23:02:21*natrys quit (Quit: natrys)
23:03:05PMunchu1, u7
23:04:21PMunchhttp://ix.io/1rFC
23:04:31PMunchAssuming the numbers are bit lengths
23:07:24FromGitter<gogolxdong> How about putting? ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5bea07ac47217e07ff119017]
23:14:57FromGitter<gogolxdong> I know it's 0xff as a byte.
23:23:19PMunchhttp://ix.io/1rGv
23:23:42PMunchIt's a binary parer, so you need to give it binary data
23:24:03PMunch"\xff" will put a single byte 0xff into the string stream
23:24:16PMunchThen get will read it out
23:26:16PMunchAnd if you want to write the binary data: http://ix.io/1rGH
23:30:50FromGitter<gogolxdong> wow, very elaborative, very helpful. Thanks !
23:34:52FromGitter<gogolxdong> as you wrote so many libraries of serialization , which do you think has the most compress efficiency? I find this might be superior than any other like protobuf
23:38:32*snowolf quit (Ping timeout: 250 seconds)
23:39:21FromGitter<gogolxdong> or cbor
23:40:33PMunchHeard good things of Cap'n Proto
23:40:37PMunchNever tried it though
23:42:27*krux02 quit (Remote host closed the connection)
23:43:24FromGitter<gogolxdong> I think binaryparse beat them. :)
23:44:14PMunchWell, binaryparse isn't really any specific protocol
23:44:23PMunchIt's meant to just parse any odd binary data
23:44:42PMunchUsed it for work to implement satellite packet data generation
23:44:55PMunchBasically just copy down the spec and your off to the races :)
23:46:45xaceif i want to update a <pkg> with nimble, do I just run `nimble refresh && nimble install <pkg>` or is there a better approach?
23:47:09PMunchYou can just run "nimble install <pkg>"
23:47:26xacePMunch: what about tracking if there are updates available?
23:47:43PMunchHmm, check github?
23:47:54xaceim reading it atm,. im guessing nimble list --ver
23:47:54PMunchI don't think there's a way built in tbh
23:48:12PMunchOh yeah, that seems like it's right
23:49:03xaceyeah, but im guessing thats for all the repos, and not the ones on my local machine
23:50:55xacei could probably whip together something for this, but i wanted to see that im not reinventing an existing feature
23:54:28PMunchMaybe "nimble list --installed --ver"?
23:54:44PMunchWait, that lists the local version
23:55:00xacewell at least that info is helpful :)
23:55:29xacePMunch: dont bother with it, was just wondering if there was something, for the moment Ill just manually update it and bring it up later
23:58:07*PMunch quit (Remote host closed the connection)