<< 11-04-2018 >>

00:00:24FromDiscord<2vg> hmm,
00:00:24FromDiscord<2vg> since mofuw 's routing macro was doing useless routing, I need to cure it ...
00:00:30FromGitter<zacharycarter> benchmarks are stupid anyway - you can sit there and optimize a certain solution to satisfy a certain benchmark
00:00:43FromGitter<zetashift> and I do know that actix-web(a Rust framework) did optimize for TechEmpowers benchmarks a lot before the last one came out
00:00:55FromGitter<zacharycarter> see ^ :P
00:01:23FromGitter<zetashift> and tokio-minihttp is barebones and maybe even less documentated than Jester ;P
00:02:09FromGitter<zacharycarter> Honestly - if I'm writing any type of enterprisey sotware these days
00:02:19FromGitter<zacharycarter> and I had the reigns of what was going on
00:02:21FromGitter<zetashift> Jester is explained very well in the book
00:02:32FromGitter<zacharycarter> I'd probably pick erlang / elixir / phoenix
00:02:34FromDiscord<2vg> yee, I think that tokio-mini is not a web framework
00:02:45FromGitter<zetashift> @zacharycarter are you reading my mind?
00:02:54FromGitter<zetashift> Elixir/Phoenix is neat
00:03:14FromGitter<zacharycarter> well erlang is neat
00:03:18FromGitter<zetashift> kinda sucks that it's not strictly typed tho that's all I dislik
00:03:31FromGitter<zetashift> well the BEAM vm is neat :P
00:03:35FromGitter<zacharycarter> yes
00:03:58*xet7 quit (Ping timeout: 265 seconds)
00:04:06FromGitter<zacharycarter> I don't know - I mean the whole thing about enterprise IT is availability and scalability
00:04:23FromGitter<zacharycarter> so like - why not invest in a system that is fault tolerant by nature
00:04:42FromGitter<zacharycarter> but I don't want to work in enterprise IT anymore
00:05:00FromGitter<zacharycarter> so I hope I never think about erlang / phoenix / elixir again!
00:05:02FromGitter<zacharycarter> :P
00:05:43FromGitter<zetashift> isn't most enterprise stuff on JVM and .NET? Those are pretty good systems and they thought well Sun/MS are big tech people lets use what they use
00:05:59*SenasOzys quit (Remote host closed the connection)
00:06:05FromGitter<zacharycarter> yeah but Java sucks ass
00:06:09FromGitter<zetashift> Elixir is neat for small webdev too, especially if you're looking for a fp first lang
00:07:41FromGitter<zacharycarter> C# is fine and the CLR imo is the better runtime vs the JVM but still - you're stuck in that OOP world
00:07:46FromGitter<zetashift> Mhmhm I might scrap this Monkey interpreter in Nim project, it's basically Go in Nim syntax I feel like I don't get to learn Nim
00:08:10FromGitter<zetashift> I'm just gonna make a small game again, that's more fun
00:09:18FromGitter<zetashift> You have Scala/F# and Kotlin has some fp stuff
00:09:39FromGitter<zacharycarter> yeah but Scala performs worse than Java
00:10:00FromGitter<zacharycarter> F# I have no experience / opinion on - I just know the community that uses it loves it
00:10:15FromGitter<zacharycarter> Kotlin feels like JetBrains trying to pull an Oracle
00:10:27FromGitter<zetashift> F# is just OCaml on CLR
00:11:24FromGitter<zacharycarter> yeah - I mean if you're stuck in that JVM vs .NET argument - IMO, you're not even really looking at the problem through the right lenses
00:11:37FromGitter<zacharycarter> you're too focused on buzz words like OOP and SOA and crap like that
00:12:06FromGitter<zacharycarter> because haven't we all learned yet that besides for Netflix - OOP doesn't lead to gold
00:12:48FromGitter<zetashift> The hype around it leads to a lot of $$$, probably I don't know jack about enterprise
00:44:39*SenasOzys joined #nim
00:48:32*SenasOzys quit (Remote host closed the connection)
00:55:18*smt joined #nim
00:59:09*smt` quit (Ping timeout: 264 seconds)
01:18:16*dddddd quit (Remote host closed the connection)
01:21:26*smt` joined #nim
01:25:10*smt quit (Ping timeout: 265 seconds)
01:34:10*SenasOzys joined #nim
01:37:29FromGitter<gogolxdong> what's the nnk of """
01:38:09FromGitter<gogolxdong> three quotes
01:42:34*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:10:57*deech`` quit (Ping timeout: 240 seconds)
02:13:35FromGitter<data-man> @gogolxdong: nnkTripleStrLit?
02:44:53*athenot joined #nim
02:49:13FromGitter<feihong> how does one convert an int ordinal to a unicode character? chr function doesn't work for ordinals > 255
02:52:37FromGitter<data-man> ```import unicode ⏎ let s = toUTF8(Rune(code))``` [https://gitter.im/nim-lang/Nim?at=5acd78717c3a01610dccdc85]
02:55:15FromGitter<feihong> awesome, that did the trick!
02:57:13*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
03:18:41FromGitter<Varriount> @feihong Just to let you know, that will create a single-letter string (which means a memory allocation on the heap). You might be better off using some other technique.
03:19:04FromGitter<Varriount> @zacharycarter I like the CLR more, purely because it's less of a memory hog.
03:22:27*darithorn quit (Quit: Leaving)
03:22:31FromGitter<Varriount> @feihong What are you writing?
03:24:09FromGitter<feihong> @Varriount just a demo program for learning nim. basically i generate a random number within a certain range and then just print out the corresponding unicode character.
04:53:43*couven92 joined #nim
05:21:18*leorize joined #nim
05:23:12*xet7 joined #nim
05:29:34*leorize quit (Quit: WeeChat 2.1)
05:32:25*LyndsySimon quit (Quit: Connection closed for inactivity)
05:35:03*Lord_Nightmare quit (Ping timeout: 265 seconds)
05:35:49*leorize joined #nim
05:40:05*Lord_Nightmare joined #nim
05:50:57*user1101 joined #nim
05:51:29user1101Is there a way to instruct the compiler
05:51:44user1101to detect if its in release mode
05:51:52user1101so I can print stuff in debug builds
05:55:41*leorize quit (Quit: WeeChat 2.1)
05:56:20Araqwhen not defined(release)
05:59:34FromGitter<alehander42> @zacharycarter some benchmarks are stupid, but good performance in any benchmarks certainly leads to interest/hype, people who see benchmark rankings don't start to "let's analyze how well the benchmark models a situation", they're "OH LOOK LANGX HERE" :( :D
06:10:25*smt` quit (Read error: Connection reset by peer)
06:10:45*smt` joined #nim
06:15:17*user1101 quit (Quit: user1101)
06:31:57*gmpreussner quit (Ping timeout: 240 seconds)
06:32:47*nsf joined #nim
06:36:34*gmpreussner joined #nim
06:47:42*arecaceae quit (Remote host closed the connection)
06:48:27*arecaceae joined #nim
06:49:48*gokr joined #nim
06:50:31*rockcavera quit (Remote host closed the connection)
06:57:26*rockcavera joined #nim
07:23:19*yglukhov joined #nim
07:32:11*Vladar joined #nim
07:45:04*xet7 quit (Ping timeout: 265 seconds)
07:46:43*dddddd joined #nim
07:47:17*jaco60 joined #nim
07:54:43*endragor joined #nim
07:56:19*xet7 joined #nim
07:56:40*SenasOzys quit (Ping timeout: 265 seconds)
07:59:46*yglukhov_ joined #nim
08:00:27*yglukhov quit (Ping timeout: 240 seconds)
08:03:44*SenasOzys joined #nim
08:04:35*gmpreussner quit (Ping timeout: 276 seconds)
08:05:09*gmpreussner joined #nim
08:06:59FromGitter<tim-st> When I take an immutable slice from an immutable string is this copied or does the compiler just uses fitting int indices for this case?
08:09:10*Torro joined #nim
08:12:23FromGitter<alehander42> btw Araq, did anybody use the reactive values in karax? I thought about using them, but I can't quite imagine how do they deal with many grouped changes (e.g. I change 3 reactive values in a function: would that invoke redraw after each change, or can it invoke it only after all of them: only thing I can imagine is explicit `redraw()` or some setInterval-based redraw mechanism)
08:13:52*xet7 quit (Ping timeout: 260 seconds)
08:25:28*xet7 joined #nim
08:36:24*xkapastel quit (Quit: Connection closed for inactivity)
08:42:58*sendell joined #nim
08:45:26*rokups joined #nim
08:59:02Yardanicois this true? https://github.com/timotheecour/D_vs_nim/issues/23#issuecomment-380293974
09:06:57*SenasOzys quit (Ping timeout: 260 seconds)
09:09:07FromGitter<Varriount> @Yardanico Yes, however Nim can invoke the C compiler in parallel, so this isn't much of an issue until linking
09:09:47FromGitter<Varriount> Also, the things that are "redefined" across all files are rather small
09:15:05FromGitter<Varriount> Anyone know if something like "for x in sequence:" copies X?
09:18:16*SenasOzys joined #nim
09:24:42*SenasOzys quit (Ping timeout: 256 seconds)
09:25:39*SenasOzys joined #nim
09:42:52*skelett2 quit (Quit: WeeChat 2.0.1)
09:44:48*skelett joined #nim
09:45:21*SenasOzys quit (Ping timeout: 263 seconds)
09:48:08FromGitter<mratsim> for primitive types it does (no use given a pointer if we don’t mutate)
09:48:57FromGitter<mratsim> for big types I suppose it has the same threshold as parameter passing (pass by ref if it contains more than 3 primitive types) but I’m not sure
09:49:20FromGitter<mratsim> just look at the C code
10:02:53*SenasOzys joined #nim
10:11:16FromGitter<krux02> @Varriount it does not copy
10:11:54FromGitter<krux02> maybe the documentation should be a bit more precise here
10:15:13FromGitter<tim-st> does someone knows the answer to my question above?
10:16:33FromGitter<krux02> @tim-st it copies
10:16:44*noonien joined #nim
10:16:49FromGitter<tim-st> Thanks but it's not needed?
10:16:51FromGitter<krux02> at least when you use slice operators
10:17:07FromGitter<krux02> str[1..3] creates a new string
10:17:19FromGitter<krux02> and no this copy would not be necessary
10:17:21FromGitter<tim-st> when bot are `let` or passed as arg without beeing `var`
10:17:40FromGitter<tim-st> ok, thanks. So I can use this style in my code and hope it will be changed in future?
10:17:42FromGitter<krux02> it compies, no matter what you do
10:17:53FromGitter<krux02> the is just the other operator `[]=`
10:17:57FromGitter<krux02> this one mutates
10:18:17FromGitter<krux02> str[3..7] = "döäügfphcu"
10:18:31FromGitter<krux02> this operator does not copy anything, it mutares str
10:19:02FromGitter<tim-st> yes, I mean this. But this should only work without copying when I use `let`?
10:20:12FromGitter<tim-st> No, I meant `let x = "abcdefg"`; `let subs = x[2..4]`
10:20:15FromGitter<krux02> no I this slicing such as `str[a..b]` should create a value of `openArray[char]`
10:20:35FromGitter<krux02> and this openarray can then bu used to mutate the values that are stored inside of str
10:20:45FromGitter<tim-st> So it does copying?
10:21:06FromGitter<krux02> or better substring = distinct openArray[char]
10:21:12FromGitter<krux02> yes it does copy
10:21:22FromGitter<krux02> no matter what you do
10:21:50FromGitter<tim-st> The example above with two `let`. Copying shouldnt be needed here under my assumption; but it does?
10:23:09FromGitter<krux02> it is needed, because the slicing operator on strings returns a string
10:23:39FromGitter<tim-st> `let entry = mwTemplate[templateStart..templateEnd]`; I could also just operate on `mwTemplate` but then I would need to calculate string indices harder
10:23:40FromGitter<krux02> and a string can technically not be part of another string object.
10:24:22FromGitter<tim-st> So I thought the compiler understands, that it can just replace the slice call with fitting indices on the `mwTemplate`
10:24:48FromGitter<krux02> a string is like this `ref object(len,cap: int; data: UncheckdArray[char]`
10:25:42FromGitter<tim-st> yes I know, and I know that slice does it, but for my use case with two let it woudlnt be needed and in my assumption it would never be needed if two times with `let`
10:25:58FromGitter<tim-st> it could just operate on indices on the string below
10:26:01FromGitter<krux02> when you do not want to copy, you need to create your own substring type that does not copy, and you need your own substring operations
10:26:22FromGitter<tim-st> but instead the nim compiler could integrate this "feature" for everyone?
10:26:33FromGitter<krux02> don't assume the nim compiler to be super smart.
10:26:48FromGitter<tim-st> but this is an important thing on an important data type
10:26:58FromGitter<krux02> the nim compiler is good, but it does not have a lot of man power to implement a lot of smartness.
10:27:25FromGitter<krux02> most of the optimizations that Nim benefits from are the optimizations that are built into the C backend compiler
10:27:43FromGitter<krux02> nim just makes sure to generate constructs that are nice of a C compiler to handle
10:28:12FromGitter<tim-st> Ok, thanks for the answer. Then I will probably change my code to not copy the strings
10:28:26FromGitter<krux02> ok do that
10:28:49FromGitter<krux02> just one information that I would like to throw in the room
10:30:21*Sentreen quit (Quit: WeeChat 1.6)
10:31:47FromGitter<krux02> I heared that the substring operation in Java used to be non-copying. Then a lot of people did read files and then took only the parts they needed with the substring.
10:32:14*Torro quit (Read error: Connection reset by peer)
10:32:27*Sentreen joined #nim
10:32:59FromGitter<krux02> the memory was full of strings that could not be deleted, because there were substrings referencing it
10:33:14FromGitter<krux02> then java changed it and substring did copy
10:34:34FromGitter<tim-st> That sounds interesting, but my idea was that the nim compiler changes it at compile time at the source code and replace the second let with the first var and calculates the correct indices on the underlying string
10:34:42FromGitter<tim-st> I think java cannot do that
10:35:08FromGitter<krux02> java strings are immutable
10:36:13FromGitter<tim-st> Well that's true :) Then you could be correct
10:36:36FromGitter<tim-st> Thanks for the information
10:43:19FromGitter<tim-st> It seems, this is discussed here about java: https://stackoverflow.com/a/26246580/3646022
10:46:45*gokr left #nim (#nim)
10:47:54*Torro joined #nim
10:51:43FromGitter<data-man> C++17 also has read-only string_view
10:57:02FromGitter<krux02> @data-man yes that is totally true, and because I know this string_view type and what it is for, I was very sad when I saw that in nim the substring operator returned string copies
10:57:16FromGitter<krux02> but the c++ way is the way to go here.
11:03:33FromGitter<vendethiel> other interesting thing is how JS engines do it. https://stackoverflow.com/questions/6194466/large-substrings-9000x-faster-in-firefox-than-chrome-why (This is outdated for chrome but still an interesting read)
11:04:33FromGitter<data-man> @krux02: very sad that #5957 was closed
11:05:47Araqwhat was #5957 ?
11:06:37FromGitter<data-man> view type
11:07:02Araqwe got toOpenArray in devel
11:09:07FromGitter<data-man> strutils supports it? No.
11:09:38Araqstrutils wouldn't support a view type either
11:09:48Araqwe should patch it
11:10:09FromGitter<data-man> So many tasks! :)
11:13:09*arecaceae quit (Remote host closed the connection)
11:13:33*arecaceae joined #nim
11:14:52FromGitter<data-man> @Araq: About timers. Maybe to rename Nanos to NanoTime?
11:16:32Araqyou're turning this into a stdlib module, right?
11:16:46FromGitter<data-man> Yes
11:17:56*user1101 joined #nim
11:18:20AraqNanoTime? NanoSeconds?
11:18:32AraqGULPF, we need you
11:19:19FromGitter<mratsim> @tim-st use a shallow string if you don’t want copy
11:19:53FromGitter<mratsim> either use `shallow(yourstring)` or `type SHallowString {.shallow.} = object; data: string`
11:20:00FromGitter<data-man> @Araq: https://github.com/nim-lang/Nim/pull/7560#issuecomment-380178502
11:21:31FromGitter<krux02> @mratsim shallow strings don't copy on assignment, but substrings still have to be copied.
11:21:55FromGitter<mratsim> oh right
11:22:10FromGitter<tim-st> @mratsim ok thanks! I think in my case I could just directly access the underlying string type with different indices. So my guess was that the compiler replaces this instead of slicing, but if that has negative effects then maybe I let it this way
11:22:36FromGitter<krux02> Araq: the option optimization is done
11:22:43FromGitter<krux02> ready for review/pull
11:22:49FromGitter<krux02> as well as the `get symbol kind`
11:23:09FromGitter<krux02> I renamed the PR, because if the other changes I made
11:26:48FromGitter<krux02> here for attention grabbing: https://github.com/nim-lang/Nim/pull/7491 and https://github.com/nim-lang/Nim/pull/6253
11:29:39Araqcan we use .deprecated: "use X instead" nowadays? only since 0.18 though
11:29:53Araqso 0.18.x would require 0.18 for bootstrapping
11:31:23enthus1a1thow can instantiate a optional datetime? https://gist.github.com/enthus1ast/27e45da51cc23639eb678bae6673d9bd
11:31:29FromGitter<krux02> Araq: how should I quote X?
11:32:10FromGitter<krux02> `backticks`? ``double backticks``? the emacs way backtick and singln quote
11:32:23Araqquote what?
11:32:40FromGitter<krux02> the symbol
11:34:24FromGitter<krux02> {.deprecate: "use `X` instead".}
11:34:48FromGitter<krux02> and is the type in the argument like I did it ok?
11:35:01FromGitter<krux02> ident(string)
11:35:09FromGitter<krux02> foobar(FirstType, ...)
11:37:02Araqwait getImpl() is deprecated? why?
11:44:37Araqenthus1a1t: I think the syntax is none(DateTime)
11:47:45enthus1a1tthank you Araq
12:04:49FromGitter<alehander42> does this ident/sym/name PR change something for existing macros ?
12:07:31Araqthe string representation
12:07:48Araqthe old stuff continues to work otherwise but is now also easier to use
12:08:01Araqit's really nice :-)
12:08:06FromGitter<alehander42> coool
12:11:57dom96Araq: Did you get a chance to look into the memory leak I reported?
12:16:53*leorize joined #nim
12:19:32FromGitter<krux02> @alehander42 it changes the output of lispRepr treeRepr
12:20:18FromGitter<krux02> @alehander42 but I made all changes backwards compatible, for the most part I just added deprication pragmas
12:20:49FromGitter<krux02> a lot of functions are simply unnecessary, and I could simplyfiy the view on the ast.
12:21:21FromGitter<krux02> A i just saw Araq already replied
12:22:17*yglukhov_ quit (Read error: Connection reset by peer)
12:22:17FromGitter<krux02> Araq: getImpl is not deprecated, it is just getImpl(NimSym) that is deprecated, `getImpl(NimNode)` works
12:22:50*yglukhov joined #nim
12:23:23FromGitter<krux02> but I am not sure how to annotate that
12:23:41Araqyeah got it.
12:23:52Araqwell you annotate it like
12:23:56FromGitter<krux02> proc getImpl(...): NimNode {.deprecated: "use getImpl instead".}
12:24:06FromGitter<krux02> very non confusing
12:24:14Araq.deprecated: "use the `getImpl` that takes a NimNode instead"
12:24:44Araqthe only problem is that then 0.17.x cannot build 0.18.x
12:24:52FromGitter<krux02> what do you think about "use `getImpl(NimNode)` instead"
12:25:19Araqthat's too ambiguous given Nim's typedesc parameters
12:25:50Araq `getImpl: NimNode -> NimNode` maybe
12:26:07Araqin the hope '->' gets moved into system
12:26:31FromGitter<krux02> well for typedesc parameteres I would use `foobar(typedesc[FooBar])`
12:26:56FromGitter<krux02> what is preventing '->' to be in system?
12:27:04Araqyou would, but I wouldn't and I still think that notation in concepts is the ugliest thing ever
12:27:40Araqjust when you understood what 'typedesc' is about Nim fucks with you and changes the rules in a 'concept' context.
12:27:52FromGitter<krux02> well I think concepts are pretty ugly, because they confuse type expressions with value expressions
12:27:56FromGitter<krux02> I don't like that
12:28:03Araqme neither.
12:28:24Araquse getImpl: NimNode -> NimNode
12:28:31FromGitter<krux02> ok
12:29:58Araqdom96: seq[SelectorKey[asyncdispatch.AsyncData]] : #1; bytes: 409632
12:30:25Araqthat seq seems pretty big
12:32:08FromGitter<krux02> Araq: I did the cleanup while I was working on my ast pattern matching
12:32:27FromGitter<krux02> with this cleanup the patterns also do make a lot of more sense
12:32:50FromGitter<krux02> I really like that I can have a caseof expression as a macro
12:33:30FromGitter<krux02> the only thing that is confusing is the colon already in the first line where the macro is called, normal case-of-expressions do not have that.
12:35:12Araqcase-of-expressions can have it too though
12:35:22FromGitter<krux02> really?
12:35:27Araqso you can be consistent.
12:35:37Araqbut I don't like the colon there. :-)
12:35:43Araqyes, really.
12:36:15FromGitter<krux02> oh yea they can
12:36:18FromGitter<krux02> that is interesting
12:36:23FromGitter<alehander42> yeah I always use `case ..:` I didn't even know you can without
12:36:47FromGitter<krux02> is it possible that they could not do it in the past, and then I learned it that way, and now they can and I just never noticed?
12:37:23FromGitter<alehander42> I think they should always have a colon because otherwise it's so inconsistent (but I guess that would break code)
12:37:57Araqactually it is inconsistent with the colon but *shrug*
12:38:03FromGitter<krux02> well I agree, I think a colon is a good idea here, even though that confuses my emacs and I have to punch it every time
12:38:12Araqdom96: it leaks with --gc:boehm too
12:38:38Araqlooks like a stdlib leak but it is tricky. I think it's caused by that large seq we allocate upfront
12:38:43Araqthe seq is constant
12:38:54FromGitter<krux02> well at some point I will also take a deeper look into the nim-mode for emacs
12:38:57Araqthe seq's size is constant during program run
12:39:06Araqbut it keeps ever more Futures alive.
12:39:26Araqthat's why there is no obviously growing root visible.
12:39:56Araqafter a colon a list of statements follows (or a type)
12:40:08Araq'of' is not a list of statements.
12:40:15Araqhence no colon after 'case x'
12:40:27Araqperfectly consistent, you also write
12:40:28Araqlet
12:40:33Araq x = foo
12:40:35Araqand not
12:40:37Araqlet:
12:40:43Araq x = foo
12:40:52FromGitter<krux02> but let has an identation level
12:41:26Araqwell ok, that's fair I guess
12:42:05FromGitter<krux02> but I see in case the indentation is allowed, too
12:42:13FromGitter<krux02> even though I prefer not to put it
12:42:31FromGitter<alehander42> well then it should be `let:` :D in a pure pure world
12:42:49FromGitter<alehander42> it could even be a macro
12:43:17FromGitter<alehander42> if one could differentiate between `:` args and normal args
12:44:08FromGitter<krux02> well with a macro the indentation is not allowed
12:44:26couven92Hi Araq, sry I have been very absent in the past months... Uhm, I got pinged yesterday, did you sort it out by yourselves?
12:44:41FromGitter<krux02> http://ix.io/17wv
12:44:46FromGitter<krux02> this does not compiler
12:44:59Araqcouven92: no.
12:45:33FromGitter<krux02> ok, I have to go for now, I will be back
12:47:40FromGitter<alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ace03ec6bbe1d2739d5ba11]
12:47:50FromGitter<alehander42> this compiles :D
12:49:02FromGitter<alehander42> hm the previous one works without indentation, that's bizarrre
12:51:14couven92ok... Araq, I am looking at https://irclogs.nim-lang.org/10-04-2018.html#14:55:26 at you were talking about the VM, environment variables, putEnv and getEnv? Or what was I supposed to answer? :O
12:53:36Araqsomethin about android
12:54:05Araqoh and whether putEnv in NimScript is useful for vcc support
12:55:37couven92The first concerned the ctermid PR for android? You cc'ed me on that, I have looked a little on that and made suggestions, but I am not really sure about that one yet...
12:56:53Araqyeah that one
12:57:10couven92putEnv for vcc? Hmmm... not really, the whole vcc ecosystem is so amazingly complex that you actually need a fair amout of logic whihc vccexe will provide
12:58:02couven92Although tbf, currently vccexe just features a semi-intelligent way of finding vcvarsall.bat and invoking the compiler...
12:58:06Araqyeah that's what I imagined
12:59:48couven92In theory you could cache the state that vcvarsall creates and then create a nim.cfg (or script) with putEnv commands
13:00:47couven92However, there would need to be a fair amount of logic here, since vcvarsall.bat actually preserves the environment you have already set and just appends a LOT of stuff where it needs to
13:02:04couven92Actually, it does not even append, for some vars (like PATH and INCLUDE) it actually does some appending and some prepending...
13:02:50couven92it's complicated. And most importantly: it changes for each installed component in the Win SDK and of course for each new version of the compiler toolset
13:05:09*Trustable joined #nim
13:12:10*nixfreak joined #nim
13:13:29nixfreakHello, I see the nim site is actually programmed in Nim, is there any docs to start with Jester ? Github doesn't have much unless I spend quite a bit of time looking at the code. I am trying to learn more nim than python and would like to try to create a blog by learning
13:17:07FromGitter<zacharycarter> Jester is pretty simple
13:17:37FromGitter<zacharycarter> but unfortunately - you're going to have to look at code to learn how to program with Nim :)
13:18:01FromGitter<zacharycarter> I'm pretty sure if you look around on github - you should be able to find some projects using Jester that aren't all that complicated
13:18:10FromGitter<zacharycarter> and the Jester project itself has basic docs
13:19:11Yardanicoleast recently updated Nim repository on github (according to search) - https://github.com/dom96/nael
13:21:27nixfreakthank you
13:21:45Yardaniconixfreak, jester is really simple to use
13:21:57Yardanicometaprogramming ftw
13:22:05nixfreakoh ok
13:27:59dom96nixfreak: hrm, your nickname sounds familiar :)
13:28:19nixfreakso is the forum programmed in vim also ?
13:28:23nixfreaksorry nim
13:28:27dom96yes
13:28:29dom96it uses jester
13:28:42nixfreakis the code posted ?
13:28:57dom96yes
13:28:59dom96google it
13:29:11FromDiscord<2vg> ya https://github.com/nim-lang/nimforum
13:30:49FromGitter<zacharycarter> OT but - I've gotten to the programming test w/ that gaming company I'm applying at
13:31:32FromGitter<zacharycarter> so phone interview with recruiter done, phone interview with CEO done, they reviewed my github, and skipped me to the programming test (instead of having me interview with one of their engineers)
13:31:41FromGitter<zacharycarter> so I'm doing that tomorrow AM, and if I pass that - I'm hoping it's offer time
13:32:02FromDiscord<2vg> cool 😃
13:32:11FromGitter<zacharycarter> I did verify with them that if I get the job - I can contribute to Nim - just can't make any more game related stuff
13:37:27*nixfreak quit (Ping timeout: 240 seconds)
13:37:53*nixfreak joined #nim
13:39:57*Lord_Nightmare quit (Ping timeout: 265 seconds)
13:39:57*nsf quit (Quit: WeeChat 2.0.1)
13:45:25FromGitter<alehander42> nice!
13:46:06FromGitter<krux02> @alehander42 I am back, and yes your example compiles, but then it is not an a case of statement anymor. The node kind is different.
13:47:13*Lord_Nightmare joined #nim
13:48:09FromGitter<krux02> @zacharycarter have fun at your programming test.
13:50:57*floppydh quit (Quit: WeeChat 2.1)
13:52:52FromGitter<mratsim> @zacharycarter might be useful for you: nimble install -dy && nimble test
13:52:55FromGitter<mratsim> argh not this
13:53:00FromGitter<mratsim> https://medium.freecodecamp.org/ten-rules-for-negotiating-a-job-offer-ee17cccbdab6?gi=8c9be0dc5d79
13:55:24*smt_ joined #nim
13:58:05*leorize quit (Quit: WeeChat 2.1)
13:58:06FromGitter<gogolxdong> @Varriount can you switch AWS reponse in xml to json?
13:59:09*smt` quit (Ping timeout: 265 seconds)
13:59:17FromGitter<alehander42> i can already see it, the programming test ends, the game ppl enter the room and find @zacharycarter scribbling NIMLE INSTALL -DY NIMBLE TEST on the walls with a crazy look
14:09:49FromGitter<data-man> Summarize: get everything in powerful positive informative writing about motives without money but win with alternatively opened doors. ⏎ Sorry for my alternative English :)
14:10:03*floppydh joined #nim
14:11:56*endragor quit (Remote host closed the connection)
14:12:25*endragor joined #nim
14:17:09*endragor quit (Ping timeout: 264 seconds)
14:27:58*endragor joined #nim
14:28:34*endragor quit (Remote host closed the connection)
14:29:08*endragor joined #nim
14:33:40*endragor quit (Remote host closed the connection)
14:35:23FromGitter<dandevelo> Is there a way to set the bit width(16/32/64) of an enum?
14:41:13Araq.sizeof pragma for enums
14:43:22*xkapastel joined #nim
14:44:42FromGitter<dandevelo> Thanks @Araq! Could not find it in the docs
14:47:01*miran joined #nim
14:48:09*federico3 quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.)
15:15:40FromGitter<Varriount> @gogolxdong No, it's not possible to switch the response format of the api.
15:15:52FromGitter<Varriount> At least, not with EC2
15:19:28*aguspiza joined #nim
15:21:54*athenot joined #nim
15:39:41*nsf joined #nim
15:57:39*Torro left #nim ("-bye")
16:01:24*rockcavera quit (Remote host closed the connection)
16:08:13*ofelas quit (Ping timeout: 265 seconds)
16:09:58*aguspiza quit (Ping timeout: 260 seconds)
16:11:46*ofelas joined #nim
16:23:29*hal joined #nim
16:24:59*rockcavera joined #nim
16:27:16*athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
16:28:10*athenot joined #nim
16:33:38*couven92 quit (Quit: Client disconnecting)
16:40:41*rokups quit (Quit: Connection closed for inactivity)
16:50:02*deech quit (Remote host closed the connection)
16:54:27haldom96: Hello. Could you give me some advice on adding tests to the pull request I made? It's the one for setLastModificationTime of a file. https://github.com/nim-lang/Nim/pull/7543
16:54:34*nsf quit (Quit: WeeChat 2.0.1)
17:00:37halShould there be a test for all new procs? I could not locate an existing test for openHandle. A test for toWinTime could be added to tests/stdlib/ttimes.nim I would think. Could I just add some doAssert lines there?
17:02:52*sendell quit (Remote host closed the connection)
17:13:43*natrys joined #nim
17:18:57*tmm1 quit (Ping timeout: 265 seconds)
17:22:21*tmm1 joined #nim
17:31:43*rokups joined #nim
17:45:16miranif i do `type Reg = Table[char, int]`, how do i initialize it? (i can't use `initTable`)
17:50:59FromGitter<zacharycarter> ?
17:51:08FromGitter<zacharycarter> ```code paste, see link``` ⏎ ⏎ compiles fine for me [https://gitter.im/nim-lang/Nim?at=5ace4b0c109bb04332b0ff0c]
17:51:16FromGitter<zacharycarter> oh crapy
17:51:17FromGitter<zacharycarter> sorry
17:51:53FromGitter<zacharycarter> ```code paste, see link``` ⏎ ⏎ compiles fine [https://gitter.im/nim-lang/Nim?at=5ace4b3927c509a774001bdd]
17:52:11FromGitter<zacharycarter> why can't you use initTable miran?
17:53:37miranzacharycarter: yeah, that way i can. I thought maybe there is a way to do something like `initTable[Reg]
17:53:47shashlickyou can cast
17:54:00shashlickvar reg: Reg = cast[Reg](initTable[char,int]())
17:54:12FromGitter<zacharycarter> well in this case - you're just making Reg an alias for a Table[char, int]
17:54:30FromGitter<zacharycarter> so you'd still initialize a variable of type Reg, with a value of type Table[char, int]
17:54:34FromGitter<zacharycarter> that doesn't change
17:55:11FromGitter<zacharycarter> If you're trying to alias char, int as Reg
17:55:13FromGitter<zacharycarter> I'm not sure how to do that
17:55:38miran`init myCustomTable`
17:56:08miranthere isn't something like that
17:56:14miranfrom what i can tell
17:58:53FromGitter<zacharycarter> I'm not exactly sure what you're trying to do :/
17:59:04FromGitter<zacharycarter> you haven't defined a custom table
17:59:11FromGitter<zacharycarter> you've just aliased Table[char,int] in your example
18:00:56mirani'm not sure either what i'm trying to do :D :D
18:03:24FromGitter<zacharycarter> hahaha
18:03:32FromGitter<zacharycarter> well maybe just try to describe your end goal
18:03:54FromGitter<zacharycarter> if you have one :)
18:05:07FromGitter<zacharycarter> https://hacks.mozilla.org/2018/04/sneak-peek-at-webassembly-studio/ - wonder if we can get Nim support added
18:06:11FromGitter<zacharycarter> or maybe we just do this - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ace4e922b9dfdbc3a7dd36f]
18:06:55shashlickmiran: looks like you should write your own initReg() - https://github.com/nim-lang/Nim/blob/master/lib/pure/collections/tables.nim#L318
18:08:25FromGitter<zetashift> @zacharycarter seems they use Monaco(or whatever VSCode is build on) so it might be very plausible!
18:15:21FromDiscord<geckojsc> I'm like, blown away by this https://nim-by-example.github.io/oop_macro/
18:15:36FromDiscord<geckojsc> too much power for one man to have
18:16:27*nsf joined #nim
18:20:33FromGitter<zacharycarter> please don't do that though :P
18:22:17FromGitter<zacharycarter> just avoid OOP :P
18:23:41FromGitter<zacharycarter> ah damn - wasm studio doesn't support emscripten yet
18:23:49FromGitter<zacharycarter> guess we'll have to either wait for that or the Nim wasm backend :)
18:26:42FromDiscord<geckojsc> I'm pretty new to this language, haven't quite wrapped my head around the metaprogramming capabilties
18:27:39FromGitter<zacharycarter> although - https://github.com/wasdk/WebAssemblyStudio - says LLVM, Rust, Emscripten running server side.
18:27:49FromGitter<zacharycarter> so... ¯\_(ツ)_/¯
18:28:22FromDiscord<geckojsc> would it be possible to make like, a game engine with implied 'this' during entity definitions? so I can just do x += 1 instead of player.x += 1 and it makes sense in the given context?
18:28:24FromGitter<zacharycarter> geckojsc - templates are compile time substitutions similar to macros in C++
18:28:32FromGitter<zacharycarter> or C I guess rather
18:28:50FromGitter<zacharycarter> macros are evaluated at compile time and modify the AST
18:30:00FromGitter<zacharycarter> I'm sure you could write a macro doing what you're describing yes - regardless of the game engine part :)
18:30:20FromDiscord<geckojsc> ahh awesome
18:30:25FromDiscord<geckojsc> thanks :)
18:32:38FromGitter<zacharycarter> sure thing!
18:48:58*loki_ joined #nim
18:49:35*loki_ left #nim (#nim)
18:54:15shashlickI think we could use some good Nim replies in these threads: https://www.reddit.com/r/nim/duplicates/8b2n2x/nim_or_rust_advice/
18:54:22*Trustable quit (Remote host closed the connection)
18:54:29shashlickrelated to gamedev
19:39:32FromGitter<zetashift> the rust thread is kinda turning into a language flamewar so I'd rather stay out of that. I added a post on the Nim on( also miran can't wait for the guide!)
19:40:27*yglukhov quit (Remote host closed the connection)
19:40:41*rokups quit (Quit: Connection closed for inactivity)
19:41:01*yglukhov joined #nim
19:45:19*yglukhov quit (Ping timeout: 256 seconds)
19:48:34FromGitter<krux02> well that is probably the reason why such questions are not allowed on stack overflow
19:49:01*endragor joined #nim
19:49:05FromGitter<krux02> but I think there is a good reason to compare two solutions with each other and discuss the advantages and disadvantages
19:49:37FromGitter<krux02> but forum threads are not a good place for that because only opinionated people will provide their opinion
19:50:15subsetparkHey dom96 - the nimble docs have this: 'Private modules
19:50:17subsetparkYou may wish to hide certain modules in your package from the users. Create a private directory for that purpose. For example:
19:50:46subsetpark' - but that's not enforced at the compiler, is it? I can still import foo.private.bar and access anything exposed on that module
19:53:13FromGitter<krux02> dom96: are you working on the html generation for the nim documentation? I have a feature request, I would like deprecated functions to have less contrast in the generated html page
19:53:31FromGitter<krux02> like if they are fading out
19:54:01*endragor quit (Ping timeout: 268 seconds)
19:55:52*Vladar quit (Quit: Leaving)
19:58:32FromGitter<zacharycarter> hrm interesting - https://fuchsia.googlesource.com/fargo/
19:58:47FromGitter<zacharycarter> looks like Rust is pretty embedded into fuchsia
20:03:59FromGitter<zacharycarter> also - https://fuchsia.googlesource.com/garnet/+/master/public/lib/escher/
20:05:20FromGitter<zacharycarter> so the operating system ships with a physically based renderer?
20:09:33FromGitter<zacharycarter> this blurb from the wiki is enlightening - ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ace6b7d270d7d3708b9211b]
20:13:40FromGitter<zetashift> I mean it also has a Swift repo
20:14:03*hal quit (Remote host closed the connection)
20:15:37FromGitter<zacharycarter> well yeah apparently the OS is written in - C, C++, Dart, Go, LLVM, Python, Rust, Shell, TypeScript :D
20:15:50FromGitter<zacharycarter> so why NOT throw a little swift in there too?
20:17:21FromGitter<zacharycarter> wasn't aware of this library before - https://github.com/google/skia - might be a good candidate for someone to create bindings to
20:17:23FromGitter<zetashift> Flutter however is nice too use. Dart is alright
20:17:33FromGitter<zacharycarter> apparently flutter uses this lib
20:17:36FromGitter<zacharycarter> for rendering I guess
20:19:35*federico3 joined #nim
20:20:41FromGitter<zetashift> the microkernel Fuchsia is based on is still in C btw
20:22:57*Calinou_ joined #nim
20:26:53*jonafato joined #nim
20:27:13FromGitter<zacharycarter> not surpriserd
20:27:21*^GaveUp^ joined #nim
20:28:34*petersjt014[m] quit (*.net *.split)
20:28:36*stisa quit (*.net *.split)
20:28:37*Calinou quit (*.net *.split)
20:28:39*GaveUp quit (*.net *.split)
20:28:39*jonafato- quit (*.net *.split)
20:30:57*byte512 quit (Ping timeout: 240 seconds)
20:31:37*stisa joined #nim
20:31:38*petersjt014[m] joined #nim
20:32:30FromGitter<zacharycarter> yeah - I guess it started out as a fork of - https://github.com/littlekernel/lk
20:33:33FromGitter<zacharycarter> sounds like it's deviated quite a bit though - ⏎ ⏎ More specifically, some the visible differences are: ⏎ ⏎ ```code paste, see link``` ... [https://gitter.im/nim-lang/Nim?at=5ace711cdf3e0fb547c9455f]
20:33:54*byte512 joined #nim
20:34:12*miran quit (Quit: Konversation terminated!)
20:41:06*^GaveUp^ is now known as GaveUp
20:44:44*gokr joined #nim
20:59:27*natrys quit (Ping timeout: 240 seconds)
21:03:25FromGitter<AjBreidenbach> do I have this formatted properly so that I can publish it? https://github.com/AjBreidenbach/napibindings
21:04:21FromGitter<zetashift> Is N-API the NodeJS api so you can write native functions for node?
21:06:14FromGitter<AjBreidenbach> yeah
21:22:55*nsf quit (Quit: WeeChat 2.0.1)
21:32:08*jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:44:11Araqhmm how hard is it to use the github API to extract code snippets from all open issues?
21:44:49*yglukhov joined #nim
21:47:18shashlickfun idea
21:48:57*yglukhov quit (Ping timeout: 240 seconds)
21:49:14FromGitter<krux02> shouldn't be too hard
21:49:37FromGitter<stisa> @AjBreidenbach you skip `src`, but `napibindings.nim` depends on `src/utils.nim` ? Also I'm pretty sure with `src` you should put all .nim files inside it. Maybe check https://github.com/nim-lang/nimble#hybrids? There are some example structures above it
21:50:22shashlickaraq: https://github.com/nim-lang/Nim/issues/1471#issuecomment-51786375 => https://api.github.com/repos/nim-lang/Nim/issues/comments/51786375
21:50:39shashlickshould be easy to go through all open issues and find associated comments
21:50:51shashlicksee the body: which has an ```xyz``` in it
21:53:35shashlickwhat exactly do you want to do
21:53:44*natrys joined #nim
21:54:06FromGitter<AjBreidenbach> @stisa thanks
22:02:49*xkapastel quit (Quit: Connection closed for inactivity)
22:03:41FromGitter<diegogub> hi guys, whats the correct way of an DB API in nim to respond to a very long query? I would use a Channel but Im not sure..
22:04:29*endragor joined #nim
22:09:18*endragor quit (Ping timeout: 260 seconds)
22:11:38FromGitter<zacharycarter> @diegogub I don't really understand your question... which DBMS?
22:15:22*nixfreak quit (Ping timeout: 256 seconds)
22:18:08FromGitter<krux02> @diegogub I am not sure, what does the DB provide you?
22:18:31Araqprobably make it async
22:19:09FromGitter<zacharycarter> I'm guessing you're after some sort of DB result streaming functionality...
22:19:16FromGitter<zacharycarter> that or you could paginate the result set
22:19:36FromGitter<zacharycarter> but I don't really understand what you mean by - ⏎ ⏎ > a very long query
22:19:56FromGitter<zacharycarter> are you implying the result set is large? it's execution time? it's actual length?
22:21:20FromGitter<zacharycarter> also - after today - I hope I never hear anyone ever suggest another OSS Netflix project to me again
22:21:45FromGitter<zacharycarter> I can't guarantee my reaction the next time it happens, I might go totally insane or jump out of a window or something
22:24:11*natrys quit (Quit: natrys)
22:28:23FromGitter<krux02> @zacharycarter I did not read that discussion, what is OSS Netflix
22:29:38FromGitter<zacharycarter> well the discussion took place at my office - so I would be surprised if you had read it :P
22:29:57FromGitter<zacharycarter> https://github.com/Netflix this is Netflix OSS
22:30:21FromGitter<zacharycarter> and I think about at least 15 of their projects have been named in my company's slack channels over the past couple of months
22:30:44FromGitter<zacharycarter> people like pining over their solutions / projects, without having used them or set them up in any kind of capacity
22:31:09FromGitter<krux02> well Netflix is technically pretty good, but Netflix is also cheating with their content providing service
22:31:24FromGitter<zacharycarter> yeah - but folks need to realize - that they're not Netflix
22:31:40FromGitter<krux02> yes
22:32:10FromGitter<zacharycarter> like for instance - I demonstrated deploying to a Kubernetes cluster using Gitlab's managed SaaS CI / CD Auto Devops stuff that they've been working on
22:32:32FromGitter<diegogub> @zacharycarter @krux02 basically I have a event store, which has very long streams..one of the functions I need is to range a stream, not Im ranging but returning all the events in a seq...I would like to return a channel.. so I dont have to allocate all the events in memory..and I can consume them while also getting more
22:32:55FromGitter<zacharycarter> yet no one wants to use gitlab for some reason, everyone wants to use Jenkins and Spinnaker and all these other netflix projects
22:33:08FromGitter<zacharycarter> and I guess they want to also have to maintain and administer all that crap and configure it all etc
22:33:39FromGitter<zacharycarter> @diegogub I think you're going to be left with whatever the various DB APIs you're using offer you
22:34:38FromGitter<diegogub> I'm starting to code the API for this event store
22:35:04FromGitter<zacharycarter> I see
22:35:09FromGitter<diegogub> @zacharycarter just wanted to check the correct way of doing it in nim
22:35:22FromGitter<zacharycarter> Yeah - Nim's channels aren't analogous to golang's channels and goroutines
22:35:38FromGitter<zacharycarter> I think like Araq suggested you probably want to look into async
22:35:50FromGitter<zacharycarter> Nim's channels are used for communicating between threads
22:36:11FromGitter<zacharycarter> and any data you pass through a channel will go through boxing / unboxing if I'm not mistaken
22:37:19FromGitter<diegogub> I will have to channel of Events..then I build a macro to parse it into the correct object
22:37:24FromGitter<diegogub> I see.
22:37:51FromGitter<diegogub> @krux02 few REST endpoints
22:38:21FromGitter<zacharycarter> https://github.com/vegansk/nimboost/blob/master/src/boost/io/asyncstreams.nim
22:38:24FromGitter<zacharycarter> maybe?
22:38:26FromGitter<zacharycarter> I dunno
22:42:07FromGitter<diegogub> @zacharycarter I will check it..there is always to option to avoid large ranges..but if someone use it..its not safe
22:59:57*xkapastel joined #nim
23:05:30*xet7 quit (Quit: Leaving)
23:59:22*nixfreak joined #nim