<< 13-12-2018 >>

00:43:15*vlad1777d joined #nim
00:47:40FromGitter<gogolxdong> Is there a name of VDOM and DOM synchronization?
00:48:12FromGitter<gogolxdong> hook or something
00:56:19FromGitter<gogolxdong> React uses diffing, there is no such operation since karax1.0,what I should call this technology?
00:57:42FromGitter<zacharycarter> there's definitely DOM diffing in karax - https://github.com/pragmagic/karax/blob/master/karax/karax.nim#L117
01:02:08FromGitter<gogolxdong> noticed thunk
01:03:53FromGitter<gogolxdong> lazy computing?
01:05:58*Tyresc quit (Quit: WeeChat 2.3-dev)
01:05:59*vlad1777d quit (Ping timeout: 250 seconds)
01:06:45FromGitter<gogolxdong> the name of Araq's idea?
01:08:30FromGitter<gogolxdong> reads like VDOM and DOM switching.
01:15:34FromGitter<gogolxdong> dthunk
01:16:10FromDiscord_<Virepri> ok
01:16:28FromDiscord_<Virepri> I need some real serious help.
01:16:29FromDiscord_<Virepri> https://hastebin.com/oyiriyogof.bash
01:16:34FromDiscord_<Virepri> what even is the difference?
01:16:47FromDiscord_<Virepri> it feels like nimc is just butthurt for the sake of being butthurt
01:18:08FromDiscord_<Virepri> I just don't get how `proc(x,y:T):int{.closure.}' is ANY different from `proc(x,y:TimeEvent): int{.noSideEffect, gcsafe, locks: 0}`
01:18:16FromDiscord_<Virepri> I just don't get how `proc(x,y:T):int{.closure.}` is ANY different from `proc(x,y:TimeEvent): int{.noSideEffect, gcsafe, locks: 0}`
01:18:23FromDiscord_<Virepri> like, it just makes no sense
01:18:29FromDiscord_<Virepri> I have gotten this error so many times today
01:20:00FromDiscord_<Virepri> there *has* to be *some* logical explanation to that
01:20:41*omenar joined #nim
01:21:24shashlickPlease gist your code
01:21:43shashlickThe two procs are not identical in signature
01:21:45FromDiscord_<Virepri> https://hastebin.com/soboherato.sql
01:21:56shashlickWhich includes pragmas
01:22:40FromDiscord_<Virepri> like, I just don't even know where to _start_ with fixing the issue
01:23:17shashlickjust a sec
01:25:22*omenar quit (Ping timeout: 272 seconds)
01:25:24shashlicki haven't used the do syntax for procs
01:25:40FromDiscord_<Virepri> I was trying it to see if it'd help
01:25:47shashlickhttps://nim-lang.org/docs/algorithm.html#sort%2CopenArray%5BT%5D%2Cproc%28T%2CT%29 is the function signature for sort
01:25:58shashlickyou need to declare a closure
01:26:23shashlickhttps://nim-lang.org/docs/manual.html#procedures-closures is how closures are declared
01:28:28shashlick`events.sort proc (x,y: TimeEvent): int = if x.timeUnix > y.timeUnix: 1 else: 0` perhaps
01:31:21FromDiscord_<Virepri> nope
01:31:23FromDiscord_<Virepri> same issue
01:31:47*martin2 quit (Ping timeout: 244 seconds)
01:32:35*martin2 joined #nim
01:53:39*snowolf_ quit (Ping timeout: 268 seconds)
01:56:40*zachk quit (Quit: Leaving)
01:58:06*ftsf joined #nim
02:00:16*ftsf quit (Client Quit)
02:00:36*ftsf joined #nim
02:01:47*kapil____ joined #nim
02:05:09shashlickhttps://github.com/nim-lang/Nim/issues/6706
02:05:19shashlickSeems similar, not sure what came out of it
02:16:28*dddddd quit (Remote host closed the connection)
02:28:27*abm quit (Ping timeout: 240 seconds)
02:49:34FromGitter<xmonader> what is the idiomatic way to insert multiline strings in multiline strings in nim? ⏎ ⏎ stringWith3quotes = fmt"myvalue = """ """ " ⏎ lines = fmt""" ⏎ {stringWith3quotes} ... [https://gitter.im/nim-lang/Nim?at=5c11c8be4808192b032a8ca8]
03:00:44FromGitter<genotrance> Well once it is a string, fmt should work per usual
03:00:51FromGitter<genotrance> Regardless of multi line or not
03:02:27FromGitter<xmonader> it's about having triple quotes in it @genotrance
03:06:13shashlickYou could escape it with \
03:08:46*banc quit (Quit: Bye)
03:09:19FromGitter<xmonader> @shashlick I'm.
03:10:10*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
03:12:06shashlickCan you please gist
03:16:37FromGitter<xmonader> https://pastebin.com/9gMu5n31
03:17:04FromGitter<xmonader> doesn't work within fmt context @shashlick
03:18:35*martin2 quit (Ping timeout: 250 seconds)
03:19:18leorizexmonader: replace fmt with `&`
03:19:34leorizein the `let s` line
03:19:51leorizethis is because the escape `\` operator does not work with raw string
03:21:41FromGitter<xmonader> @leorize thank you :(
03:24:18*banc joined #nim
03:34:03*leorize quit (Quit: WeeChat 2.2)
03:35:56*leorize joined #nim
03:48:31*vlad1777d joined #nim
04:08:54FromGitter<arnetheduck> on package managers and build systems: https://matthewbauer.us/blog/build-systems.html
04:26:56*nsf joined #nim
04:27:14*snowolf joined #nim
04:32:16*nc-x joined #nim
04:33:09nc-xshashlick: what is the type of EDIT_ALWAYS_INSERT_MODE https://github.com/nim-lang/Nim/issues/9952
04:36:43nc-xenums are always supposed to be ordinal type (int), i.e. they are implemented. There was a regression for some time, when it did not show any error for that and silently used wrong values instead.
04:38:30nc-xOh I see
04:38:57nc-xuse EDIT_ALWAYS_INSERT_MODE.int32 like in the next line and it will work
04:41:55nc-xBut i think assigning another enum value should be allowed.
04:43:33leorizenc-x: it's allowed, but only if that enum doesn't have holes
04:43:33ldleworkarnetheduck that article could be a lot longer heh
04:44:14*vlad1777d quit (Ping timeout: 272 seconds)
04:46:43*nc-x quit (Ping timeout: 256 seconds)
04:48:41FromDiscord_<citycide> @alehander42 @technicallyagd I did a huge refactoring of https://github.com/citycide/fugitive to use gara & unpack. After doing it I ran into a pretty nasty hidden conflict between the two
04:48:53FromDiscord_<citycide> since gara generates code calling an `unpack` proc and unpack happens to introduce one. all I got was an unhelpful error about the expression gara generates being untyped or ambiguous
04:49:11FromDiscord_<citycide> at least until I updated unpack which deprecates that `unpack` proc which is what tipped me off
04:49:43FromDiscord_<citycide> I don't think there's anything that can be done about it but it caused me tremendous pain 😁
04:50:47*kapil____ quit (Quit: Connection closed for inactivity)
04:52:00FromDiscord_<citycide> the two packages are great though, I love me some pattern matching & syntax sugar
04:54:25*lritter quit (Ping timeout: 268 seconds)
04:55:04*lritter joined #nim
04:57:25*lritter quit (Remote host closed the connection)
04:58:42FromDiscord_<citycide> (by the way, using `import unpack except unpack` fixed it even if it sounds goofy haha)
05:02:57FromGitter<kdheepak> Wow. This puzzle today.
05:07:51*narimiran joined #nim
05:20:08*endragor joined #nim
05:31:15FromGitter<xmonader> i managed to finish this in my first 4 hours of my vacation today :D https://github.com/xmonader/nimassets
05:31:30FromGitter<xmonader> can someone take a look at the code for review?
05:38:56*snowolf quit (Ping timeout: 250 seconds)
05:40:00*gangstacat quit (Quit: Ĝis!)
05:52:34*omenar joined #nim
05:56:50*omenar quit (Ping timeout: 246 seconds)
06:41:22*snowolf joined #nim
06:44:07FromDiscord_<citycide> @xmonader very cool, I'll be taking a look soon. one thing I can say initially is that I'm not a fan of including the name of the language you use in the name of a module or tool especially when publishing to something like nimble (it's all nim anyway)
06:50:56FromGitter<xmonader> @citycide thanks! I feel the same too. maybe assets is just enough
06:55:41*narimiran quit (Ping timeout: 250 seconds)
07:03:34*Cthalupa quit (Ping timeout: 272 seconds)
07:04:28*Cthalupa joined #nim
07:14:53*Cthalupa quit (Ping timeout: 246 seconds)
07:15:30*Cthalupa joined #nim
07:21:59AraqVirepri: Please gist a longer example.
07:22:04*Cthalupa quit (Ping timeout: 250 seconds)
07:22:28AraqI'm sure the problem is that something is .closure and yours is nimcall
07:22:52Araqwhich is a type conversion and these don't compose with containers
07:23:05Araqbut to be able to help you further I need to see some code
07:24:16*Cthalupa joined #nim
07:30:45*krux02 joined #nim
07:32:55FromGitter<alehander42> @citycide thanks! fugitive looks very cool btw!
07:33:45FromGitter<kungtotte> Using a unique name or including "nim" in the name does improve search results though. Googling "nim assets" is likely going to be futile, for example.
07:38:18FromGitter<xmonader> @kungtotte i think he meant in the binary name not in the repo name itself
07:40:48*omenar joined #nim
07:45:31*omenar quit (Ping timeout: 250 seconds)
08:02:02*ftsf quit (Quit: Leaving)
08:06:26*snowolf quit (Ping timeout: 260 seconds)
08:07:48*snowolf joined #nim
08:21:36*snowolf quit (Ping timeout: 260 seconds)
08:23:42*zakora joined #nim
08:27:29*snowolf joined #nim
08:37:05*snowolf quit (Ping timeout: 250 seconds)
08:41:00*rockcavera quit (Remote host closed the connection)
08:42:42*jjido joined #nim
08:43:58*stefanos82 joined #nim
08:52:26FromGitter<timotheecour> @araq i’m not making up the bug i’m seeing; if you have OSX you shd be able to reproduce
08:54:35FromGitter<narimiran> idiomatic way to wrap around an enum?
08:56:18FromGitter<narimiran> e.g. if myEnum is `one, two, three`, when i `inc myEnum` repeatedly i want to go one, two, three, one, two, three, one, ...
08:56:58*snowolf joined #nim
08:58:57FromGitter<alehander42> i guess you have to write one, but it might be surprising .. I'd call it incCycle or incMod maybe
08:59:34FromGitter<alehander42> as just `inc`leads to the assumption `inc(a) > a`
08:59:53FromGitter<narimiran> eh, i guess i'll just have a separate int counter which i increase, and then `mod` with enum length
09:00:55FromGitter<narimiran> well, and use an array. ugly hack, but i don't have an extra time to invent things currently
09:01:18*snowolf quit (Ping timeout: 250 seconds)
09:02:39Araqe = EnumType(ord(e) + 1 mod M)
09:02:56Araq^ here, I "invented" it for you
09:03:53FromGitter<narimiran> haha, ok, i thought it would be more complicated than that :)
09:06:34FromGitter<alehander42> proc incCycleT: enum (a: var T) = ⏎ a = T((a.int + 1) mod (T.high.int + 1))
09:07:40FromGitter<alehander42> is mod with less priority than + o.O
09:08:32FromGitter<alehander42> `proc incCycleT: enum (a: var T) =` * as a header
09:09:37FromGitter<alehander42> Araq's solution is simpler
09:10:49Araqtimotheecour: I don't think you're making it up. I think it's some special case. osproc is used
09:10:53Araq- in testament
09:10:59Araq- by tests testament runs
09:11:02Araq- by the compiler
09:11:24Araqare these all broken for you? no, they are not
09:11:44FromGitter<timotheecour> I’ve been using it before too; it works in many cases, but I’ve just hit a bug I believe
09:12:12FromGitter<alehander42> btw Araq, I updated my nim yesterday and I saw all the ospaths stuff is now not available for the JS backend: does it make sense to provide it with some custom "assume this os for ospaths" flag/arg
09:12:44FromGitter<gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c12228c5e409525035cd59c]
09:14:28FromGitter<gogolxdong> 7323 line is `rawEcho(cstrToNimstr((len_182039(instance_234123))+""));`
09:18:40*kapil____ joined #nim
09:19:20FromGitter<mratsim> the joy of JS undefined
09:22:32FromGitter<alehander42> so the original code is echo instance.len ? what is instance
09:23:53FromGitter<alehander42> @mratsim just was making PR about https://github.com/nim-lang/Nim/issues/9946 :D
09:24:15FromGitter<mratsim> no, you were starring super weird repo :P - https://github.com/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee/eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
09:26:08FromGitter<alehander42> fuzz testing github :D
09:27:38FromGitter<alehander42> i like that the code of conduct is the only normal file there
09:28:59*omenar joined #nim
09:33:22*omenar quit (Ping timeout: 250 seconds)
09:35:27FromGitter<gogolxdong> instance is of JsonNode type.
09:36:46FromGitter<alehander42> Araq, is `== nil` always converted to magic isNil
09:36:56FromGitter<alehander42> mIsNil
09:37:05Araqno
09:37:16FromGitter<gogolxdong> which yielded by pairs iterator in jsffi which I have hacked JsObject to JsonNode.
09:37:18Araqit's mEqRef or something
09:38:10FromGitter<alehander42> @gogolxdong you changed JsObject to JsonNode? they don't really anything in common
09:38:12FromGitter<gogolxdong> it works in a minimal test code.
09:38:46FromGitter<gogolxdong> JsonNode of karax jjson
09:39:07FromGitter<gogolxdong> not stdlib JsonNode
09:39:19*dddddd joined #nim
09:39:46FromGitter<alehander42> `proc len*(x: JsonNode): int = (if x.isNil: 0 else: x.length)`
09:39:50FromGitter<gogolxdong> it's the same in js context.
09:39:57FromGitter<alehander42> oh well, already something that wouldn't be broken after my PR :D
09:40:09FromGitter<alehander42> if x is undefine
09:40:32FromGitter<alehander42> but still not sure why your instance becomes undefined in the first place then
09:40:51FromGitter<gogolxdong> me too
09:41:04FromGitter<alehander42> do you have like a small gist with the example
09:42:49FromGitter<gogolxdong> sure.it's easy to work.But it doesn't work in project context.what is your PR about?
09:44:36FromGitter<alehander42> what I meant was, can you upload an actual example with your code? because it's hard to guess only from a limited error
09:45:16FromGitter<alehander42> I am still not sure what do you mean by "which yielded by pairs iterator in jsffi which I have hacked JsObject to JsonNode."
09:49:15FromGitter<alehander42> it sounds like you changed directly `iterator pairs*(obj: JsObject): (cstring, JsObject)` which isn't a good idea
09:54:36FromDiscord_<technicallyagd> @citycide well, I guess it's time to actually get rid of the deprecated `unpack,lunpack,vunpack` then.
09:56:02*stefanos82 quit (Read error: Connection reset by peer)
09:56:22*floppydh joined #nim
10:11:07*dom96_w joined #nim
10:13:17FromGitter<gogolxdong> @alehander42 in my project context
10:13:55FromGitter<gogolxdong> changed JsObject to JsonNode
10:15:45*PMunch joined #nim
10:16:06FromGitter<alehander42> well, in any case `instance` is undefined for some reason
10:16:39FromGitter<alehander42> the place where `instance` comes from generates an undefined value
10:18:43FromGitter<alehander42> you have to either find out why and make it stop producing undefined or check if it's undefined somewhere in your code, the same way as with nil (this doesn't have much to do with karax/JsObject/JsonNode)
10:19:22FromGitter<gogolxdong> it works in test code.I will check later.Is your PR about isNil?
10:21:16FromGitter<alehander42> do you mean it works in karax tests? without supplying an actual example we can run, it's just very hard to say anything more
10:21:24*zakora quit (Quit: WeeChat 2.2)
10:22:00FromGitter<alehander42> yes, it simplifies things a bit, but you still have to check with isNil if it's possible that there is a nil/undefined value after it
10:34:31FromGitter<gogolxdong> http://ix.io/1vUE
10:35:13FromGitter<gogolxdong> I was on metro , and the string is huge .
10:36:09FromGitter<gogolxdong> This works well, it's almost the same and doesn't work where it is.
10:36:37*omenar joined #nim
10:37:11*rockcavera joined #nim
10:41:07*omenar quit (Ping timeout: 240 seconds)
10:42:03FromGitter<alehander42> so this works for me too
10:44:35FromGitter<alehander42> however this pairs impl doesn't even check if the JsonNode is actually an JObject
10:44:49FromGitter<alehander42> so it will fail for some other cases
10:46:00FromGitter<alehander42> when you are sure you have a {..} thing, it's best to use JsAssoc
10:46:12FromGitter<alehander42> which already has pairs/and most other iterators
10:46:23FromGitter<alehander42> {a: b, e: ..} thing *
10:49:10FromGitter<alehander42> not perfect, but something like this https://gist.github.com/alehander42/2bce6547624d18224b5da028bca88d06
10:50:48FromGitter<alehander42> JsonNode is good where you really aren't sure what type a value is (or while you're prototyping and you don't want to write down fields, but in a perfect world, I'd type your subobjects too)
10:55:05FromGitter<mratsim> btw, I think JsonNode should be in their own library called DynType or RtType
10:55:21FromGitter<mratsim> so that everyone that needs runtime types standardise of those
10:55:40FromGitter<alehander42> yeah, I also thought that a lot
10:55:55FromGitter<alehander42> everytime ppl say "use JsonNode for <dynamic dsdgdfg>"
10:56:06FromGitter<mratsim> RFC :P
10:57:16FromGitter<mratsim> ok I’m writing one, but it will be short.
10:57:47FromGitter<alehander42> grat
10:57:48FromGitter<alehander42> great
10:59:13AraqJsonNode is JSON data
10:59:22AraqJavascript is not JSON
10:59:51AraqJsonNode is also not "I dunno, some JS dynamic fluff"
11:00:32Araquse this instead: type Dunno {.importc.} = ref object
11:03:08FromGitter<alehander42> JsonNode should be a distinct DynamicValue imo
11:03:52FromGitter<alehander42> but you're right, Dynamic is not exact, it's more like a union
11:04:02FromGitter<alehander42> or c variant
11:04:22FromGitter<alehander42> JsObjects are DynamicValue (overloading `.` `()` etc)
11:05:02FromGitter<zah> Dynamic values may have their specific fields. If you want a general library, "dynamic" can be an opt-in concept that remaps the dot operators to more specific procs such as "getField", "executeCall", etc
11:05:02FromGitter<alehander42> but still yaml/toml/many others etc produce basically the same variant
11:05:56FromGitter<zah> And there will be at least several types of dynamic values - full foreign objects (such as js, numpy, etc that support calls) and just dynamic data structures (such as json, yaml, xml, etc)
11:17:24FromGitter<mratsim> here you go: https://github.com/nim-lang/Nim/issues/9962
11:18:12FromGitter<mratsim> there is a distinction between binary and non-binary format
11:18:33FromGitter<mratsim> we should focus on non-binary like json, xml, yaml, toml
11:18:48FromGitter<mratsim> html as well
11:20:27*snowolf joined #nim
11:21:13FromGitter<alehander42> I think it's important to have an easy way for people to parse formats directly to normal typesafe nim objects
11:21:30FromGitter<alehander42> defined with schema-s or similar to json's `to` or something else
11:22:10FromGitter<alehander42> I think the `json` approach might be suboptimal for some cases: e.g. taking the type info in consideration while parsing might let you directly construct the final objects instead of text -> JsonNode -> obj
11:24:54FromGitter<alehander42> so such dynamic and variant-like ( fully dynamic / dynamic data structures as @zah calls them) generalizations would be very useful, but for the variant-like ones people should be motivated to use schemas whenever possible
11:27:48dom96_wOver use of RFCs will soon be a Nim meme
11:29:33FromGitter<zah> I'm about to release a general serialization library that is able to deserialize formats such as JSON to strongly typed objects without using any intermediate representations
11:29:55FromGitter<zah> I was planning to share it when some docs are written. It already works
11:34:51PMunchdom96_w, RFC: Official Nim RFC meme
11:35:10PMunchzah, cool
11:36:51Zevvdom96_w: I'm risking to be considered too stupid for this stuff, but I still do not grasp the root cause of the async/gcsafe issue. Do you have a minute for me? Since the async mechanism relies solely on futures and callbacks, why is there even an threading issue?
11:37:27dom96_wZevv: It's just the compiler being extra sensitive
11:37:50dom96_wIf you enable threads then there is a chance your callback will be called in another thread
11:37:57dom96_wso it must be gcsafe
11:38:14ZevvBut where is the culprit then? Where does this possible call originate?
11:38:25FromGitter<alehander42> @zah nice, does it support any other formats currently
11:38:30FromGitter<alehander42> already
11:39:21ZevvIf there is only one async event loop in one thread, all callbacks will run from this thread, right?
11:39:23FromGitter<zah> I will implement what we need in Status - JSON, RLP and ProtoBuf, but adding new formats should be relatively simple
11:40:44FromGitter<zah> Avro support would be valuable and I hope somebody will do it soon
11:41:33PMunchIt's really annoying that Nim nodes don't support .high and slicing..
11:42:17FromGitter<alehander42> @PMunch I usually define my own `slice`
11:42:26FromGitter<alehander42> for them
11:42:31PMunchYeah.. But we shouldn't have to IMO
11:42:45FromGitter<alehander42> agreed, probably a helper would be accepted in macros.nim
11:43:13FromGitter<alehander42> I don't really need `.high` tho, I usually just iterate with pairs, not sure of other usecase
11:44:33FromGitter<mratsim> @zah, not Avro, no one uses that. Apache Arrow is better
11:44:46PMunchWell, I tried to use 1..high because I couldn't do [1..^1]
11:45:19FromGitter<mratsim> see for example Nvidia RAPIDS: https://devblogs.nvidia.com/wp-content/uploads/2018/10/pipeline-1024x382.png
11:46:18FromGitter<mratsim> for data science Protobuf for Neural net and CSV/Apache Arrow for dataframes
11:46:52FromGitter<mratsim> and hdf5 but that’s an insane format ...
11:48:09FromGitter<zah> Apache Arrow looks quite cool indeed
11:48:46FromGitter<zah> But Mamy, you could look into it when I write some docs about the framework
11:49:21FromGitter<alehander42> @PMunch ah makes sense
11:49:24FromGitter<mratsim> another use of Apache Arrow: https://blog.cloudera.com/blog/2016/03/feather-a-fast-on-disk-format-for-data-frames-for-r-and-python-powered-by-apache-arrow/
11:49:51FromGitter<mratsim> yeah, no problem. I need some serialisation in Arraymancer
11:50:17FromGitter<mratsim> I have hdf5 and Numpy, but I need to read from protobuf for Tensorflow and the new ONNX format pushed by Facebook and Microsoft
11:51:55PMunchalehander42, using something like this is very nice though: https://github.com/krux02/ast-pattern-matching
11:52:02FromGitter<mratsim> I’m still waiting for vtref btw ;) I have weird cases when combining generic methods with object variant where the generic method cannot see the variant fields.
11:52:46*snowolf quit (Ping timeout: 260 seconds)
11:52:47Zevvdom96_w: I did a - naive - experiment by removing the gcsafe requirement of the asyncHttpServer processRequest, and now I'm able to just specify a callback without any need for gc-safity. My initial tests "just work" for me, and no complaints from the compiler. So Why is it that the processRequest callback is marked gcsafe? I'm trying to understand by going through the git history, but it seems that Araq added
11:52:53Zevva first 'gcsafe' pragma in asyncHttpServer in 2014 with the comment "asynchttpserver compiles again", and from there on it propagated through the rest of the functions up to the callbacks
11:58:32dom96_wPretty sure you won't be able to use asynchttpserver without that gcsafe pragma in a program that uses threads
11:58:35dom96_wThat's the reason for it
11:58:37dom96_wBut give it a try
12:03:56Zevvdom96_w: I did. And I don't see any side effects. http://paste.ubuntu.com/p/4X46K9hbF5/ is all that is needed
12:04:39ZevvCompiles and runs with --threads:on
12:13:24dom96_wAraq, please explain
12:14:36ZevvMy only guess is that the whole .gcsafe. propagation is ment to protect the user from polling the event loop from the wrong thread
12:16:17FromGitter<alehander42> @PMunch you don't have to convince me, I also have a pattern matching lib, that's the best approach
12:17:48FromGitter<alehander42> but ast_pattern_matching is the best for the macro Node-s indeed, very nice UX
12:18:24FromGitter<alehander42> and nice error messages
12:32:15*Snircle joined #nim
12:35:25*jjido quit (Ping timeout: 250 seconds)
12:37:23*stefanos82 joined #nim
12:45:42dom96_wZevv: yes, the compiler cannot infer where the callback will be called from
12:48:21ZevvOk, that finally makes sense - this has been bothering for over a year now
12:48:42ZevvThis should protect me from poll()ing the event queue from the wrong thread
12:49:05Zevvand the price I pay is hassle with pragmas to tell the compiler "trust me, I know what I'm doing"
12:49:47ZevvThis has been a bit of a pain. I am trying to convince some of my collueges to look into Nim, but me not being able to explain why the gcsafe was needed does not help my credibility :)
12:51:30ZevvBut then again: this happens to be in place for the Async HTTP server, but it is missing for a lot of other async functions. I'm able to do async TCP sockets without any requirements on .gcsafe. pragmas.
12:52:43FromGitter<arnetheduck> @Araq rename branch?
12:53:55FromGitter<mratsim> someone removed JS from Nim? https://travis-ci.org/nim-lang/Nim/jobs/467452950#L2748-L2750
12:54:10FromGitter<mratsim> https://travis-ci.org/nim-lang/Nim/jobs/467452950#L3493-L3512
12:55:20*vlad1777d joined #nim
12:55:29*snowolf joined #nim
13:12:46*abm joined #nim
13:29:45Araqarnetheduck: haven't forgotten, I'm going through the PR queue
13:30:04*dom96_w quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
13:30:28Araqdom96_w, can't explain what I don't know. I know that there is a lovely special effect system rule regarding callback parameters
13:31:14Araqthat seems to apply here, but cooldome wants to remove this rule :-)
13:40:53sendell[m]should we add a macro for hasing objects (by hasing all their fields) in "hashes" module, maybe? https://nim-lang.org/docs/hashes.html#hash%2CT
13:41:12sendell[m]there's no convenient way to "default hash" an object as I understand it
13:42:25Araqdon't repeat the $ mistake
13:42:42Araqwhere everything has a string repr and compiles even though it shouldn't
13:43:07FromGitter<mratsim> array should have a `$`
13:43:14FromGitter<mratsim> and ref objects don’t compile ;)
13:43:26Araqarray has a `$`
13:43:36FromGitter<mratsim> since only 1 year ago
13:43:46FromGitter<mratsim> it was painful when I started Nim
13:44:03Araqit's less painful now
13:44:16FromGitter<mratsim> now I have generic problems :D
13:45:17sendell[m]why would that be a mistake? sounds practical haha
13:49:42sendell[m]well yeah maybe for hashes it's dangerous, and the macro i'm talking about should not be named "hash" but "defaultHash" or someting. But I cannot see why having a default string repr for everythiung is bad
13:50:21FromGitter<alehander42> +1
13:50:39Araqif every type T supports every operation O it's generic valhalla. It also means you don't have any type checking left..
13:52:50FromGitter<mratsim> what’s wrong with Valhalla?
13:53:18*Vladar joined #nim
13:54:27sendell[m]I love type checking but since $ is not automatically inserted (except for echo) I think there's no consequences on type checking ? If you type "$" you know you want a string repr, and it's good to have a default one provided
13:55:58sendell[m]I do agree though that for hash it's dangerous since most of the time you want to provide a custom one, and having a default hash for objects allows to forget that :)
13:56:57sendell[m]If the name is different from "hash", it allows the user to knowingly wrap that default implementation for its type
14:02:54FromGitter<arnetheduck> good hashing functions are optimizations - you can essentially have `hash(t: auto) = 0` and it will be correct for its intened use in a hash map - don't see why it's dangerous to have a better one than that by default as long as it's easy to override.. only problem perhaps is that `hash` is overloaded to mean `some hopefully distinct value` and `cryptographiccally secure hash`
14:05:27*snowolf quit (Ping timeout: 264 seconds)
14:12:50sendell[m]valid point. What I meant by dangerous is that it removes the "warning" of the compiler telling you "take care, now you should implement hashing for this type, since its now used"
14:17:56FromGitter<alehander42> @Araq `$` is not every operation
14:18:27*dddddd quit (Quit: Hasta otra..)
14:18:33FromGitter<alehander42> it's possible to have a default string representation of every valid object
14:18:53*dddddd joined #nim
14:18:53FromGitter<mratsim> that’s like random: crypto secure or pseudo random
14:19:26FromGitter<alehander42> I guess your hope is that having only several `$` will lead to easy finding errors e.g. when you write "e" & $e instead of "e" & $e.f or "e" & e instead of "e" & e(f)
14:20:11FromGitter<alehander42> this might make sense, but then representation should just be e.g. `.repr`
14:20:19FromGitter<alehander42> and afaik it is actually `.repr`
14:20:23FromGitter<arnetheduck> yeah, good point sendell.. thinking about it, I like the balance where an automated field hasher exists in the hash module, but you have to enable it explicitly through some simple means, per type
14:20:42shashlick@xmonader: check out nimdeps
14:24:19Araqhashing is like equality, a tough problem and "just do it memberwise" may not cut it
14:24:50sendell[m]@arnetheduck exactly what I'm thinking :) one way would be to provide that macro as a different name like "defaultHash" that the user could wrap using "proc hash(v:MyType):Hash = defaultHash(v)" but there might be other (better) ways I don't know about
14:25:15FromGitter<mratsim> sane defaults that can be overridden
14:25:44AraqI prefer an explicit lift(MyObject, `$`)
14:26:00Araqlift(MyObject, hash)
14:26:27Araqnot a fan of defaults that I need to disable but you can argue either way
14:26:44FromGitter<mratsim> I don’t mind, I like lift as well: https://github.com/numforge/laser/blob/master/tests/test_x86_reductions.nim#L15-L17
14:27:58FromGitter<mratsim> we need a monad.nim :P
14:28:00*snowolf joined #nim
14:28:43sendell[m]@Araq here it would a default that you need to manually enable, instead of disable
14:30:44FromGitter<mratsim> We all know how GDP opt-in went ;)
14:30:48FromGitter<mratsim> GDPR*
14:31:15FromGitter<mratsim> the do you want cookies on every single websites is just insane
14:32:12sendell[m]https://addons.mozilla.org/fr/firefox/addon/i-dont-care-about-cookies/
14:32:20sendell[m];)
14:33:20sendell[m](No I'm not arguing in favor of a "i-dont-care-about-hashes" pluggin for vscode)
14:33:30*floppydh quit (Ping timeout: 244 seconds)
14:34:22*endragor quit (Remote host closed the connection)
14:34:51*floppydh joined #nim
14:34:52*floppydh quit (Client Quit)
14:35:02*floppydh joined #nim
14:35:31*snowolf quit (Ping timeout: 260 seconds)
14:39:23shashlick@Araq, @dom96, i did some preliminary research on removing compiler dependency in nimble and it seems feasible
14:40:00shashlickI'll submit a basic PR to remove the dependency for just one proc to give an idea, it can be incrementally removed. The advantage is that in the future, nimble could support full Nim capabilities in nimble rather than just the vm
14:42:10shashlickPackage owner could decide how much functionality he wants to leverage beyond vm but will think of that later if it is worth the effort
14:43:30shashlickMost of the changes can be isolated to nimscript support.nim
14:45:41shashlickAlso, I think all the code for supporting older versions of the compiler can be discarded since new implementation won't depend on internals
14:46:03shashlickJust the command line interface which is stable for a while
14:46:35Araqsounds good
14:50:07shashlickAraq: does the compiler package install the entire lib directory today?
14:50:39Araqhmmm I don't know
14:50:53Araqwhy would it, it's the stdlib, every Nim has it
14:51:46shashlickRight, looking at the nimble file, it's only the compiler directory
14:52:38shashlickBut you could have a mismatch of an older compiler built into nimble but newer stdlib
14:53:02Araqyeah there is a check for that in Nimble somewhere
14:53:20shashlickAnother tight coupling of tool to installed compiler rather than one that can stand independently
14:53:49shashlickEven if we did improve nimble, other tools will still be tightly coupled
14:55:04shashlickI'd think that if I depended on the compiler but be truly independent, I'd like to include the stdlib as well in the compiler nimble package
14:56:03shashlickOr perhaps have a separate stdlib package that can be versioned and depended on
14:58:01Araqyou trade one set of problems for another, then every Nim tool comes with its own stdlib version
14:59:42shashlickYep either you link to the installed Nim compiler and stdlib which means being compiled right there or carrying your own copy of everything
15:00:03shashlickCan't be in the middle which is the same as the former but perhaps an untested configuration
15:01:23shashlickC2nim could break at any time if it tags an old compiler but depends on stdlib which can be different on the current install
15:03:16Araqno, c2nim only uses the compiler's AST rendering engine
15:03:32Araqc2nim doesn't process system.nim
15:04:19Araqyeah, I know, I know, this means the compiler AST+render should be a Nimble package that the Nim compiler depends on
15:07:50shashlickSo what's happening is that these tools are using a specific version of compiler component but built with a completely different compiler and stdlib combo
15:09:24PMunchHmm, is there a way to take an object created in a macro and make it available on runtime? Or do I have to manually create the AST to create that object?
15:09:35shashlickI guess it works but makes me feel queasy, perhaps it's not an issue
15:09:38FromGitter<mratsim> quote do:
15:10:10shashlickPMunch: const x = macro()
15:10:38PMunchshashlick, but how would the macro return the object?
15:11:45FromGitter<mratsim> quote do
15:12:11FromGitter<mratsim> or result = newStmtList().add newLit(yourObject)
15:12:13shashlickIt could even be a proc
15:12:37shashlickSince it is a const, Nim knows to do it at compile time
15:12:46*Cthalupa quit (Ping timeout: 244 seconds)
15:13:11FromGitter<alehander42> what kind of obj is it @PMunch
15:13:41shashlickIn nimdeps, I created the const in a macro
15:13:41shashlickhttps://github.com/genotrance/nimdeps/blob/master/nimdeps.nim
15:13:54*Cthalupa joined #nim
15:14:54shashlickIn snip, I do it inline
15:14:54shashlickhttps://github.com/genotrance/snip/blob/master/src/snip/keymap.nim
15:17:00PMunchalehander42, what do you mean what kind?
15:17:11PMunchCurrently trying out mratsims, suggestion
15:18:49*NimBot joined #nim
15:19:40FromGitter<alehander42> well, if it's a literal, you can just construct it easily, if it's a complicated ref object with cycles, it's pretty different
15:19:47PMunchHmm, didn't seem to like that..
15:20:01PMunchWell its not a ref object, and no cycles
15:20:07PMunchBut it is a variant object
15:20:10FromGitter<mratsim> @Pmunch for example: https://github.com/numforge/laser/blob/master/laser/primitives/matrix_multiplication/gemm_ukernel_generator.nim#L225-L226
15:20:19PMunchWhich newLit doesn't seem to like
15:20:26FromGitter<mratsim> and definition: https://github.com/numforge/laser/blob/master/laser/primitives/matrix_multiplication/gemm_ukernel_generator.nim#L157
15:20:35FromGitter<mratsim> yeah for non native type you need to use quote do
15:22:31FromGitter<alehander42> @PMunch and all of its fields are not ref objects and have no cycles?
15:22:41PMunchCorrect
15:22:43FromGitter<alehander42> well, you'll have to construct it in this case
15:22:50PMunchError: object constructor needs an object type
15:23:06PMunchWhen trying to use "quote do: `nameOfMyVariable`"
15:23:21FromGitter<alehander42> no, this can't possibly work
15:23:30FromGitter<alehander42> you need to generate the code that constructs it
15:23:35FromGitter<alehander42> in the `quote`
15:23:49PMunchHmm, that's what I was afraid of
15:24:20FromGitter<alehander42> well, it's just a interpreted value in the nim VM
15:24:29PMunchYeah I know
15:24:43FromGitter<alehander42> probably it's possible for one to write a more general constructValue helper
15:25:08FromGitter<alehander42> but I guess it's just not a very common usecase
15:25:18PMunchBasically what I'm trying to do is to parse a DSL and convert that code into something that would at runtime be an object
15:25:27PMunchI'd imagine that would be rather common..
15:26:27FromGitter<alehander42> but why do you need to create the same object on compile time, that seems more unusual to me
15:26:49FromGitter<alehander42> usually one needs to directly create the constructing NimNode
15:27:01PMunchYeah, I was just silly when I wrote the macro
15:28:06FromGitter<alehander42> it shouldn't be too ugly, also one can just generate many ⏎ ⏎ ```quote: ⏎ `stuff`.`field` = `node```` ⏎ ⏎ etc [https://gitter.im/nim-lang/Nim?at=5c127a86f992693c7a6ad01f]
15:28:51FromGitter<mratsim> DSL parsing: https://github.com/numforge/laser/blob/master/laser/photon_jit/x86_64/x86_64_ops.nim#L24-L55
15:29:10FromGitter<mratsim> another one: https://github.com/mratsim/glyph/blob/master/glyph/snes/opcodes.nim#L16-L34
15:29:25*virtualm64 joined #nim
15:29:59FromGitter<mratsim> and to create the object: https://github.com/numforge/laser/blob/master/laser/photon_jit/x86_64/x86_64_base.nim#L282-L288
15:30:58PMunchYeah I guess I could do something similar..
15:31:21FromGitter<mratsim> what I can instantiate with newLit, I use newLit on
15:31:28FromGitter<mratsim> otherwise I need to construct objects
15:31:33PMunchJust wondering if there was a way to do it automatically
15:32:08FromGitter<mratsim> well you can’t even quote do enums, because they are transformed in int ;)
15:33:02FromGitter<mratsim> you can create an objConstr macro
15:33:58FromGitter<mratsim> you can getImpl the type to get the number of fields and the macro does objConstr(newIdentNode”MyType”, GenType1, GenType2, Field1, Field2)
15:34:28FromGitter<mratsim> GenType if you need to provide generic type isntantiation
15:35:02FromGitter<mratsim> but it’s a lot of work for something that is probably use rarely in a codebase.
15:37:03shashlickPMunch: I did the exact thing using the proc approach though not for a variant
15:37:17shashlickFor testing purposes in nimterop
15:38:03shashlickhttps://github.com/genotrance/nimterop/blob/master/nimterop/globals.nim
15:38:23shashlickThe Ast object there, I could create it in grammar.nim at compile time
15:38:50shashlickIt didn't work with a proc type though so I had to use int there
15:41:28xaceis there a existing tool that generates the full docs with json formatting or is my vest choice to make my own based on this https://github.com/nim-lang/Nim/blob/devel/tools/kochdocs.nim ?
15:44:08FromGitter<mratsim> nim jsondoc is a thing :P
15:44:22FromGitter<mratsim> https://nim-lang.org/docs/docgen.html#document-types-json
15:45:51FromGitter<arnetheduck> that's funny, given that json is the one text format that doesn't allow you to put comments in it :)
15:46:20FromGitter<mratsim> I think text is an implementation detail ;)
15:48:08*narimiran joined #nim
15:48:09*nsf quit (Quit: WeeChat 2.3)
15:54:35xacemratsim: yeah, i was aware of jsondoc. I was mostly curious on how to generate the full https://nim-lang.org/docs/theindex.html documentation and store it locally as json, so that I can my own tool to view documentation
15:54:44xacemake my own*
15:55:02FromGitter<mratsim> Nim generates a .idx file if you pass certain flags
15:55:09FromGitter<mratsim> I don’t remember which one though
15:55:30xacemy tool will be cli only as thats commonly the only thing i have access too
15:56:05shashlickThat's a fun use case - I'd use it
15:56:30xacereading the docs on my phone is a pain... seems like google search results behave differently on my phone, even when i use incognito
15:57:52xaceshashlick: yeah, it has been on my mind for a while, and last night i figured, it is time to do it...
16:02:15FromGitter<kaushalmodi> xace: That would be nice; looking forward to it
16:02:37FromGitter<kaushalmodi> For now, I am using the docs from devdocs to get "CLI-like" doc access interface
16:02:49FromGitter<kaushalmodi> my post on that: https://scripter.co/accessing-devdocs-from-emacs/#devdocs-lookup-demo (click on that image to see the GIF)
16:03:12xacecool, ill check it now :)
16:06:05xaceusing devdocs json seems like a good idea. but last time i checked over there they had old nim documentation
16:06:35*vlad1777d quit (Ping timeout: 268 seconds)
16:07:19FromGitter<kaushalmodi> xace: I had sent a PR to devdocs
16:07:26FromGitter<kaushalmodi> it now reflects 0.19.0 docs
16:07:52FromGitter<kaushalmodi> I had also enabled devel branch docs, but the devdocs dev did not want to support publishing unreleased version docs
16:09:26xaceAh, thats cool
16:10:15FromGitter<kaushalmodi> xace: But you are still working on that CLI tool you promised, right? :)
16:10:39xaceyeah, just thinking of a clever way to make it generate the docs on other people computers
16:22:43*ng0 joined #nim
16:35:03shashlickdevdocs link anchors don't work anymore
16:35:30shashlickPlus having links to source would be cool
16:37:15shashlickBut cli app will be much preferred
16:45:35*PMunch quit (Remote host closed the connection)
16:47:58Zevvnarimiran[m]: can you push your AoC repo up to date
16:49:08*Cthalupa quit (Ping timeout: 268 seconds)
16:49:28*Vladar quit (Remote host closed the connection)
16:49:35*Cthalupa joined #nim
17:03:00narimiranZevv: heh, i will i will :)
17:03:23narimirani'm trying to make my solution a bit less messy
17:11:53*virtualm64 quit (Quit: Page closed)
17:12:31*gangstacat joined #nim
17:15:47*abm quit (Ping timeout: 250 seconds)
17:20:18*nsf joined #nim
17:23:47Zevvthanks :)
17:30:14stephenwithavHas anyone had success using ahirner's ffmpeg bindings? I'm attempting to build a rough encoder outline and it's failing spectacularly. Code and detailed errors at: https://gist.github.com/stephenwithav/9db7b6758d59e6491e7353cd6e590d1c
17:30:50narimiranZevv: why do you need it? ;)
17:38:51*snowolf joined #nim
17:49:35FromGitter<mratsim> @stephenwithav, this reminds me of some issue I had with Nim OpenCL
17:49:53FromGitter<mratsim> I had to pass a pointer to a pointer to textures instead of a ptr to textures
17:51:10FromGitter<mratsim> create a `var ctxPtr: ptr ptr AVCodecContext` and do `ctxPtr[] = context`
17:51:30FromGitter<mratsim> and pass that to avcodec_free_context
17:51:35FromGitter<mratsim> it should work
17:53:58Zevvnarimiran: "need" is a big word. But I'm trying to get more proficient in Nim idiom, so it's nice to compare my solutions with others
17:57:29narimiranZevv: yeah, sorry for the too strong word. i'm still not satisfied with my solution. in the mean time, can i have a link to your repo?
18:00:10xaceeven generating jsondoc based on this code https://github.com/nim-lang/Nim/blob/devel/tools/kochdocs.nim seems to get various errors, e.g. this time it's complaining about https://pastebin.com/raw/BFEcR3xP
18:02:16xacethat error came up after trying to run nim jsondoc -o:$HOME/.cache/noc/cpuload.json $HOME/.choosenim/toolchains/nim-0.19.0/lib/pure/concurrency/cpuload.nim
18:04:59Zevvnarimiran: my repo is only local, I'll put it online when I get home
18:10:09narimiranZevv: here's my solution, not yet in the repo: https://old.reddit.com/r/adventofcode/comments/a5qd71/2018_day_13_solutions/ebpncfj/
18:11:23narimiranZevv: if you have any comments/questions/suggestions, let me know
18:14:20xacekaushalmodi: when you generated the PR to devdocs, did you create the docs in json format? as i'm trying to `nim jsondoc lib/pure/concurrency/cpuload.nim` # it fails as it doesnt import os (im guessing). How did you deal with this?
18:23:24xacelooking at some of the jsondoc output they come with <span> and other html tags...
18:26:19FromGitter<mratsim> @Araq, I have a direct acyclic graph, a context owns all the nodes which are ref objects. For convenience the Nodes refer back to their context and their parents. ⏎ ⏎ To break the cyclic referencing I used to use `ref MyObj` for the owning context and `ptr MyObj` for those back references but then I had issues with the GC moving “MyObj” (during mark-and-sweep I suppose). ⏎ ⏎ Due to that I went back to
18:26:19FromGitter... using ref everywhere but I expect that it’s pretty stressing for the GC. ... [https://gitter.im/nim-lang/Nim?at=5c12a44bca317a0e25c0586e]
18:32:54FromGitter<alehander42> Mamy,you really hate `ref
18:33:21Zevvnarimiran: https://github.com/zevv/aoc2018. Nothing is polished for publication :)
18:44:14*zakora joined #nim
18:49:19Araqmratsim: ok
18:51:17*floppydh quit (Quit: WeeChat 2.3)
19:00:50FromGitter<mratsim> Are you talking like the librarian in the DiscWorld? :P
19:03:41*snowolf quit (Ping timeout: 250 seconds)
19:06:41FromGitter<kaushalmodi> xace: The JSON is created by devdocs itself
19:06:53FromGitter<kaushalmodi> My PR was to just update their config file related to Nim: https://github.com/freeCodeCamp/devdocs/pull/896/files
19:07:41stephenwithavThank you, mratsim. I had a ctxPtr, but didn't assign it with ctxPtr[] = context.
19:08:05stephenwithavctxptr
19:08:37xacekaushalmodi: Hmm oki.
19:14:03*Cthalupa quit (Ping timeout: 244 seconds)
19:16:47*Cthalupa joined #nim
19:28:59stephenwithavmratsim: same "Illegal storage access" error with Nim 0.19
19:31:37*kapil____ quit (Quit: Connection closed for inactivity)
19:33:48*snowolf joined #nim
19:34:08*zakora quit (Quit: WeeChat 2.2)
19:35:38*shodan45 quit (Quit: No Ping reply in 180 seconds.)
19:38:24*snowolf quit (Ping timeout: 252 seconds)
19:39:59*shodan45 joined #nim
19:43:07*abm joined #nim
19:50:08*tdc joined #nim
19:52:32*nsf quit (Quit: WeeChat 2.3)
20:04:47*gmpreussner quit (Ping timeout: 240 seconds)
20:08:18*gmpreussner joined #nim
20:20:36FromGitter<brentp> anyone know of strformat-like libraries for nim that let the format string be created at run-time?
20:29:48xaceshouldnt nim docgen -d:nimdoc lib/pure/concurrency/cpuload.nim ignore this section: https://github.com/nim-lang/Nim/blob/devel/lib/pure/concurrency/cpuload.nim#L84
20:30:06xace*nim jsondoc -d:nimdoc
20:37:33*miran joined #nim
20:39:00Araqxace, I think jsondoc should define nimdoc on its own
20:39:11Araqmratsim: that would be "ugh", no?
20:39:20xaceAraq: yeah i saw it in compiler/main.nim # but it still triggers an error on cpuload.nim
20:40:23*narimiran quit (Ping timeout: 268 seconds)
20:40:28FromGitter<yyyc514> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c12c3bc987052387edf7498]
20:41:05Araqno, it's ok
20:41:15FromGitter<yyyc514> ugly though :)
20:42:22Araqfor more fields you can write a template or a macro
20:42:31FromGitter<yyyc514> ah
20:42:33Araqbut for just these two it's ok
20:42:47xacenim jsondoc -o:/tmp/testdoc.json nim-0.19.0/lib/pure/concurrency/cpuload.nim # Araq: do you know what this isn't working? it results in this error: https://pastebin.com/raw/BFEcR3xP
20:42:49*miran quit (Remote host closed the connection)
20:43:03*snowolf joined #nim
20:44:09xaceAraq: nvm, the 0.19.0 version doesnt check for defined(nimdoc)
21:00:51FromGitter<brentp> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c12c8830a86bc6f8da2d0f0]
21:01:26FromGitter<brentp> I can't get that to use `stringable` for the table value. Am I missing something?
21:04:07FromGitter<mratsim> @Araq the librarian says Ook. Ook! Oook
21:04:23FromGitter<mratsim> https://en.wikipedia.org/wiki/Unseen_University#Librarian
21:04:41AraqI read it in German :P
21:04:44FromGitter<mratsim> https://esolangs.org/wiki/ook!
21:04:48Araqthere it's "ugh"
21:04:52FromGitter<mratsim> there is even a programming language ;)
21:04:58FromGitter<mratsim> In French it’s ook as well
21:05:08Araqwell German is special
21:05:48FromGitter<kayabaNerve> @mratsim ... dare you to create a Funge to Nim macro.
21:06:21FromGitter<kayabaNerve> I'll settle for 2D but I would like the full Funge98 set. :thinking:
21:06:49Araqbrentp: well you don't use 'stringable' anyway
21:06:53Araq*anywhere
21:07:25FromGitter<brentp> @Araq, when I do, I get: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5c12ca0d539aca60b20648dd]
21:07:58FromGitter<mratsim> @kayabaNerve this? https://en.wikipedia.org/wiki/Befunge
21:10:47*pbodev1 joined #nim
21:10:57*pbodev1 left #nim (#nim)
21:12:35Araqyou can't instantiate a generic with a syntactic constraint
21:12:53Araqat some point the compiler needs to know the concrete types and their sizes
21:13:00Araqit's called "concept", not "interface"
21:18:14FromGitter<iffy> Is there a way to display logging output when running `nimble test`?
21:20:06FromGitter<iffy> `--verbose` doesn't do it
21:21:54FromGitter<kayabaNerve> @mratsim Funge98 is 3D
21:22:13FromGitter<kayabaNerve> https://esolangs.org/wiki/Funge-98
21:22:14FromGitter<brentp> ok. thanks @Araq . indeed I was thinking it of interface
21:22:30FromGitter<kayabaNerve> So I understand Nim isn't and you can't effectively work on a 3D map
21:22:42FromGitter<kayabaNerve> But you can still use the new commands unrelated to 3D
21:25:09FromGitter<mratsim> that seems fun :P
21:25:19FromGitter<mratsim> but I have too many stuff :P
21:25:32FromGitter<mratsim> even when I need a break I always something fun to work on
21:28:54*stefanos82 quit (Remote host closed the connection)
21:42:40*Jesin quit (Quit: Leaving)
21:47:59*Jesin joined #nim
21:53:04*Snircle quit (Ping timeout: 250 seconds)
21:53:26*Tyresc joined #nim
21:57:20*Snircle joined #nim
22:24:03*stefantalpalaru joined #nim
22:24:12*vlad1777d joined #nim
22:40:06FromGitter<mratsim> @alehander42 sorry I got swept up in a bench. I don’t hate ref, what I hate is allocating in a loop. And allocating with cyclic dependency is worse because you need a mark and sweep pass to collect unused references
23:14:09*zachk joined #nim
23:16:37*zachk quit (Changing host)
23:16:37*zachk joined #nim
23:33:58FromDiscord_<citycide> anyone have a good way to get shell output asynchronously?
23:40:19*PrimHelios joined #nim
23:41:35FromGitter<rayman22201> @citycide, maybe the cheatface asynctools library again? https://github.com/cheatfate/asynctools/blob/master/asynctools/asyncproc.nim
23:43:42PrimHeliosis it possible to use var parameters in an async procedure? this code (https://hastebin.com/sopuduhifu.cs) compiles without the async pragma, but with it, I get the error: "temp1.nim(4, 3) Error: illegal capture 'x' of type <var int> which is declared here: temp1.nim(3, 12)"
23:47:58FromDiscord_<citycide> @rayman22201 hmm, Nimble can pull a PR branch right? master doesn't compile on 0.19.0. it's interesting that asyncproc is mostly a copy of osproc - would be nice to have in stdlib if possible
23:53:39FromGitter<rayman22201> @citycide you can do `nimble install package&#git-tag` to install an arbitrary branch. Yes, it would be nice to be in the stdlib, but #small-language problems. Too much to do and too few people to do it.
23:54:16FromGitter<rayman22201> no `&` that was a typo
23:54:41FromGitter<rayman22201> it's `nimble package@git-tag`