00:00:08 | FromGitter | <zacharycarter> well there is this too - https://github.com/nim-lang/Nim/blob/a9691aeef513ea20a9b1735f37172a1bd66a80dd/lib/system.nim#L3254 |
00:00:21 | FromGitter | <zacharycarter> π€· |
00:00:39 | FromGitter | <Varriount> I need a cmp function, so that strings can be sorted |
00:00:48 | FromGitter | <zacharycarter> I just know w/ bgfx I used the copyMem proc before when interfacing w/ C |
00:01:02 | FromGitter | <zacharycarter> it looks like the last link I posted is a binding to memcmp in string.h |
00:01:05 | FromGitter | <Varriount> A function that returns 0, -1, or 1 |
00:01:07 | FromGitter | <zacharycarter> so that's probably what you want |
00:01:26 | FromGitter | <zacharycarter> and it just casts it to a nim bool |
00:01:41 | FromGitter | <Varriount> Yeah, but that means you can't use it to sort strings |
00:01:48 | FromGitter | <zacharycarter> ah okay |
00:02:41 | FromGitter | <zacharycarter> I have to run but... if you still want to meet up this weekend and work on AWS stuff or whatever I'm game |
00:02:58 | FromGitter | <zacharycarter> or Friday |
00:02:59 | FromGitter | <zacharycarter> whatever |
00:04:29 | FromGitter | <Varriount> It'll have to be this weekend. I have a German test on Saturday. :/ |
00:05:23 | FromGitter | <krux02> I don't need a German test anymore |
00:05:30 | FromGitter | <krux02> I am German :P |
00:08:47 | FromGitter | <Varriount> @krux02 Unlike Germany's exemplary educational system, the US doesn't make a point of teaching a second language thoroughly in high school. |
00:10:53 | FromGitter | <zacharycarter> the weekend works for me - I'm busy sat morning but free the rest of the weekend - just PM me and let me know what works for you. gotta run for now - be back later! |
00:11:07 | * | rauss quit (Quit: WeeChat 2.1) |
00:13:15 | FromGitter | <krux02> @Varriount Well in Germany it is mandatory to learn 2 foreign languages in school. Meaning English and probably French. |
00:13:59 | FromGitter | <krux02> But I would say learning French was a waste of Time. I don't know anything anymore. |
00:15:55 | subsetpark | @zacharycarter - Good call about the name. That would definitely be confusing. |
00:17:06 | FromGitter | <Varriount> @krux02 It would be nice if children in the US were required to learn Spanish. |
00:17:12 | subsetpark | krux02 - `pubsub` is a generic way of structuring systems around messaging queues (like rabbitmq or kafka) where some services *publish* to a specified topic, and other services are *subscribing* to that topic and get all any message that matches their subscription |
00:18:08 | * | smt joined #nim |
00:28:56 | * | jrbrt joined #nim |
00:31:44 | * | dddddd quit (Remote host closed the connection) |
00:32:07 | * | jrbrt quit (Client Quit) |
00:34:13 | FromGitter | <krux02> subsetpark: that reminds me of Scala Akka |
00:34:25 | FromGitter | <krux02> but I didn't like Akka a lot. |
00:35:02 | * | arnetheduck_ quit (Read error: Connection reset by peer) |
00:35:15 | * | arnetheduck joined #nim |
00:35:21 | FromGitter | <krux02> yea it was well engineered, probably. But it was too much friction to just start coding with it. |
00:35:35 | FromGitter | <krux02> the scala actors were better in ther respect. |
00:35:41 | FromGitter | <krux02> but they got deprecated. |
00:36:45 | * | jrbrt joined #nim |
00:38:19 | * | vlad1777d joined #nim |
00:41:13 | * | jrbrt quit (Client Quit) |
01:10:45 | * | rauss joined #nim |
01:11:14 | * | S1tiSchu joined #nim |
01:14:47 | * | S1t1Schu quit (Ping timeout: 256 seconds) |
01:15:46 | * | SenasOzys_ quit (Remote host closed the connection) |
01:16:11 | * | SenasOzys_ joined #nim |
01:17:50 | * | SenasOzys_ quit (Remote host closed the connection) |
01:20:25 | * | SenasOzys_ joined #nim |
01:24:58 | * | NimBot joined #nim |
01:28:33 | * | vlad1777d quit (Ping timeout: 248 seconds) |
01:36:04 | * | BitPuffin quit (Remote host closed the connection) |
02:09:52 | * | leorize joined #nim |
02:15:24 | * | libman_ left #nim (#nim) |
02:20:08 | FromGitter | <gogolxdong> what does nnkDo mean? |
02:29:03 | * | endragor joined #nim |
02:33:53 | * | endragor quit (Ping timeout: 260 seconds) |
02:35:19 | * | SenasOzys_ quit (Read error: Connection reset by peer) |
02:35:32 | * | SenasOzys_ joined #nim |
02:46:18 | FromGitter | <gogolxdong> How to invoke a newProc NimNode? |
02:59:45 | * | SenasOzys_ quit (Ping timeout: 264 seconds) |
03:01:49 | FromGitter | <data-man> @gogolxdong: What is the problem? |
03:02:22 | FromGitter | <gogolxdong> I am trying to abstract some macros from codes. |
03:02:39 | FromGitter | <data-man> And? |
03:03:56 | FromGitter | <gogolxdong> don't quite understand how. |
03:04:46 | FromGitter | <data-man> Do you need to create a proc by a macro? |
03:06:30 | FromGitter | <data-man> The telepath mode is on. :) |
03:06:54 | FromGitter | <gogolxdong> there are many nnk.. types, though I can conclude some mapping to the human-readable nim code from source code of Nim , there are plenty of uncovered, like nnkCaseStmt, and what does nnkDo mean , what's the difference between newProc and newCall .etc. |
03:07:31 | * | SenasOzys_ joined #nim |
03:11:02 | FromGitter | <gogolxdong> Is nnkCall the only gap between newProc and newCall? |
03:13:40 | FromGitter | <data-man> newProc - shortcut for creating a new proc β newCall produces a new call node. ```theProc``` is the proc that is called with the arguments ```args[0..]``` |
03:13:52 | FromGitter | <data-man> From docs :) |
03:14:18 | FromGitter | <gogolxdong> which doc? |
03:14:32 | FromGitter | <gogolxdong> Are you familiar with marcos? |
03:14:50 | FromGitter | <data-man> core/macros.nim |
03:15:30 | FromGitter | <data-man> A little familiar. |
03:15:42 | * | vivus joined #nim |
03:16:22 | FromGitter | <gogolxdong> means you have to newProc ,then newCall with args to call the proc? |
03:18:12 | FromGitter | <gogolxdong> it's not necessary to newProc if the AST can't be transformed nim code. |
03:19:18 | FromGitter | <gogolxdong> I am trying to make compiler write nim code according to the http request. |
03:20:08 | FromGitter | <data-man> Closed source? :) |
03:20:21 | FromGitter | <gogolxdong> what do you mean |
03:21:17 | * | NimBot joined #nim |
03:23:56 | FromGitter | <data-man> A piece of code will help to understand what you can't do. |
03:27:02 | FromGitter | <data-man> See https://github.com/Araq/ormin/blob/master/ormin/queries.nim#L906 |
03:27:40 | FromGitter | <gogolxdong> we parse http request cmd to execute pre-defined procs reponsively based on case of branches , which I think is not necessary as I reviewed the code, then things become different, it's a semi automatic programming compiler. |
03:29:00 | FromGitter | <gogolxdong> can AST be transformed into human readable nim code? |
03:31:59 | FromGitter | <data-man> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac4472e1130fe3d369c819e] |
03:33:02 | FromGitter | <data-man> Zachary Carter Β© |
03:35:45 | FromGitter | <gogolxdong> yes , it dumps the AST , what I am trying is the reverse, make the result of macros transform to nim code |
03:37:24 | * | endragor joined #nim |
03:55:34 | FromGitter | <gogolxdong> can compiler do the reverse? |
03:57:22 | * | leorize quit (Ping timeout: 264 seconds) |
04:01:54 | FromGitter | <data-man> Maybe β β ```expandMacros: β yourmacro``` [https://gitter.im/nim-lang/Nim?at=5ac44e321130fe3d369c9f47] |
04:10:40 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac450405f188ccc152a6f38] |
04:10:50 | FromGitter | <gogolxdong> main.nim(8, 6) Error: request to generate code for .compileTime proc: treeRepr |
04:15:35 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac451677c3a01610da63c2e] |
04:23:50 | FromGitter | <data-man> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac453562b9dfdbc3a5329ad] |
04:32:24 | * | Widdershins joined #nim |
04:39:03 | * | endragor_ joined #nim |
04:41:50 | * | endragor quit (Ping timeout: 255 seconds) |
05:00:52 | * | arecaceae quit (Remote host closed the connection) |
05:01:15 | * | arecaceae joined #nim |
05:20:32 | * | leorize joined #nim |
05:20:53 | * | r3d9u11 joined #nim |
05:31:16 | * | leorize quit (Ping timeout: 268 seconds) |
05:37:12 | * | r3d9u11 quit (Remote host closed the connection) |
05:44:37 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac466451130fe3d369d0481] |
05:44:56 | FromGitter | <gogolxdong> hints a,b undeclared. |
05:46:04 | FromGitter | <gogolxdong> identifier. |
06:04:06 | * | smt quit (Read error: Connection reset by peer) |
06:04:28 | * | smt joined #nim |
06:06:01 | FromGitter | <stisa> @gogolxdong use `a` and `b` instead of `newIdent("a")`, as a and b don't exist outside the macro. |
06:06:21 | * | nsf joined #nim |
06:06:58 | FromGitter | <gogolxdong> @stisa thanks,help a lot. |
06:07:34 | FromGitter | <stisa> Also your macro doesn't return anything a value, so remove `echo` from `echo add(1,2)` |
06:08:38 | FromGitter | <gogolxdong> yes ,aware of that, ``` β import macros β β macro add(a,b:int): untyped = β result = nnkStmtList.newTree( ... [https://gitter.im/nim-lang/Nim?at=5ac46be692f5d62057902d02] |
06:11:30 | * | leorize joined #nim |
06:25:53 | FromGitter | <alehander42> @krux02 yeah, I also pondered with the idea of writing a full pattern matching library, but I also thought of just finishing some of the patty features |
06:26:32 | FromGitter | <alehander42> and somehow combining them with the ability to use matching on proc level |
06:34:37 | FromGitter | <alehander42> I'll take a look at both libs (your and patty) when I have time β btw are you planning to support various kinds of types and matches? (sequences patterns, arithmetic operations) |
06:37:55 | FromGitter | <alehander42> e.g. can I have something like β β ```of A(e: @[0, `args` @ .. ^ 1], f > 0): β code``` [https://gitter.im/nim-lang/Nim?at=5ac472c2270d7d37088ee061] |
06:38:05 | FromGitter | <alehander42> wow I can't believe `..` @ .. ^ 1 works |
06:39:27 | Widdershins | as someone who hasn't done much with nim yet, that's remarkably opaque |
06:40:06 | FromGitter | <alehander42> @Widdershins I agree :D , mostly a contrived example |
06:40:16 | FromGitter | <gogolxdong> @stil |
06:40:27 | FromGitter | <gogolxdong> @stisa |
06:40:34 | FromGitter | <gogolxdong> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac47362c4d0ae8007333509] |
06:41:54 | FromGitter | <alehander42> @krux02 also consider just for a second if anything else than ``` is possible |
06:42:00 | FromGitter | <alehander42> than ` |
06:42:05 | FromGitter | <alehander42> e.g. `%name` |
06:42:37 | FromGitter | <alehander42> or `~name` as using quotes will make it hard to generate matches in templates and macros I guess ? |
06:46:43 | FromGitter | <alehander42> maybe you don't even need anything if you always capture with `@` : `<ident> @ <stuff>` or `<ident> @ _` (any) |
06:54:36 | * | Vladar joined #nim |
07:11:25 | * | donotturnoff joined #nim |
07:21:57 | Widdershins | @alexhander42 I'm not finding anything in the docs about an infix `@` operator :-/ |
07:24:50 | Widdershins | ...ah, it's user-defined somewhere. gotcha. |
07:47:56 | * | vivus quit (Quit: Leaving) |
07:49:23 | * | dddddd joined #nim |
07:49:54 | FromGitter | <tim-st> Doesn't `static[bool]` makes more sense for many flag params in `strutils` like here: https://github.com/nim-lang/Nim/issues/7478 |
07:55:20 | livcd | zacharycarter: by talking to AWS did you mean AWS SDK ? |
07:55:53 | FromGitter | <phrmoy> what's the current status of Nim for building UI? |
07:56:09 | * | yglukhov quit (Read error: Connection reset by peer) |
07:56:51 | * | yglukhov joined #nim |
07:57:37 | FromGitter | <phrmoy> This thing here is a productivity booster for internal apps like almost unmatched except for R's version: https://plot.ly/products/dash/ |
07:59:24 | livcd | Does no JS required just mean it generates JS for you ? |
07:59:38 | Widdershins | livcd: almost certainly |
08:00:02 | Widdershins | it _must_, at some point, or it wouldn't run in the browser. |
08:00:26 | Widdershins | @phrmoy are you looking for desktop GUI or webui? |
08:00:31 | * | floppydh joined #nim |
08:04:47 | * | athenot quit (Ping timeout: 255 seconds) |
08:20:15 | FromGitter | <phrmoy> actually, I would prefer a native GUI |
08:20:45 | FromGitter | <phrmoy> webui is what is left for us at the moment to get something going real fast backed by current hypes |
08:21:29 | FromGitter | <phrmoy> like, REBOL sort productive ^^ |
08:23:25 | FromGitter | <phrmoy> right you just write python code to build that UI everything included. HTML, CSS, JS never see the light of day. This is great for experimentation and internal apps. |
08:25:44 | FromGitter | <alehander42> @Widdershins yeah `@` is just a part of the dsl (I think some other languages use it too for capturing subpatterns) |
08:26:41 | FromGitter | <alehander42> @Widdershins basically the idea is `some pattern(stuff (name @ subpattern))` and you have the value matching subpattern in name |
08:27:10 | FromGitter | <alehander42> (but that's purely a DSL / lib thing, not part of Nim itself) |
08:27:29 | Widdershins | :) |
08:28:22 | * | rokups joined #nim |
08:33:48 | * | Guest74495 joined #nim |
08:35:56 | * | Guest74495 quit (Client Quit) |
08:38:18 | * | r2 joined #nim |
08:38:47 | * | Guest74495 joined #nim |
08:40:30 | * | Guest74495 quit (Client Quit) |
08:40:41 | * | Guest74495 joined #nim |
08:42:35 | * | r2 quit (Ping timeout: 255 seconds) |
08:44:17 | * | xkapastel quit (Quit: Connection closed for inactivity) |
08:46:42 | FromGitter | <survivorm> ` Error: ambiguous call; both base_button.pressed(self: BaseButton)[declared in /home/survivor/g-engine/godot/_godotapi/base_button.nim(80, 5)] and base_button.pressed(self: BaseButton)[declared in /home/survivor/g-engine/godot/_godotapi/base_button.nim(197, 7)] match for: (TextureButton)` |
08:47:06 | FromGitter | <survivorm> What's the way to disambiguate such a situation? |
08:47:55 | FromGitter | <survivorm> Basically, i have proc and method doing the same thing, but how to tell the compiler which one i need? |
08:48:41 | * | Guest74495 quit (Quit: Guest74495) |
08:48:46 | FromGitter | <survivorm> No changes to api, as it's generated (playing with nim GoDot bindings) |
08:48:58 | * | arecaceae quit (Ping timeout: 260 seconds) |
08:49:09 | * | r2 joined #nim |
08:53:50 | * | r2 quit (Ping timeout: 255 seconds) |
08:55:32 | * | Lando_ joined #nim |
08:57:26 | * | Lando_ quit (Client Quit) |
08:57:34 | * | Lando_ joined #nim |
08:58:16 | * | Lando_ left #nim (#nim) |
08:59:08 | * | Lando_ joined #nim |
09:00:04 | * | Lando_ quit (Client Quit) |
09:07:31 | * | donotturnoff quit (Quit: Leaving) |
09:09:59 | * | SenasOzys joined #nim |
09:10:00 | * | SenasOzys_ quit (Read error: Connection reset by peer) |
09:13:13 | FromGitter | <gemath> Any policies about licenses in the stdlibs? Does it have to be MIT or is Apache v2 ok? |
09:17:30 | * | arnetheduck quit (Remote host closed the connection) |
09:22:05 | * | arnetheduck joined #nim |
09:25:04 | * | xet7 joined #nim |
09:28:15 | * | xet7 quit (Remote host closed the connection) |
09:29:56 | * | xet7 joined #nim |
09:30:12 | * | endragor_ quit (Remote host closed the connection) |
09:30:45 | * | endragor joined #nim |
09:30:57 | * | endragor quit (Remote host closed the connection) |
09:31:07 | * | SenasOzys_ joined #nim |
09:32:48 | * | endragor joined #nim |
09:33:57 | * | SenasOzys quit (Ping timeout: 264 seconds) |
09:36:56 | FromGitter | <dom96> @gemath any license is fine |
09:38:17 | FromGitter | <dom96> @survivorm seems like a bug in the wrapper? |
09:41:09 | FromGitter | <mratsim> donβt put GPL in the stdlib :P |
09:47:03 | FromGitter | <gemath> Yes, Apache imposes less restrictions and provides somne patent troll protection |
09:54:25 | * | leorize quit (Ping timeout: 256 seconds) |
09:58:46 | FromGitter | <data-man> What do you think about one more RFC? :-D β Predicates, something like this: β β ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac4a1d5270d7d37088fc52b] |
10:05:31 | FromGitter | <alehander42> are not all predicates boolean ? |
10:16:17 | * | NimBot joined #nim |
10:17:50 | * | Widdershins joined #nim |
10:18:06 | * | dddddd joined #nim |
10:18:20 | * | Pwntus joined #nim |
10:20:14 | * | zama_ quit (Changing host) |
10:20:14 | * | zama_ joined #nim |
10:20:21 | * | zama_ is now known as zama |
10:23:57 | * | awalgarg is now known as awal |
10:31:21 | dom96 | survivorm: yes, it's unresolvable. You shouldn't have both a proc and method on the same type AFAIK |
10:31:51 | FromGitter | <survivorm> Ok. Reported a bug on godot bindings |
10:36:58 | FromGitter | <Vindaar> @dom96 just added a comment on the `nimble test` issue. No idea what's going on (-: https://github.com/nim-lang/nimble/issues/456 |
10:37:29 | dom96 | I PM'd Araq, maybe he can help |
10:37:54 | FromGitter | <Vindaar> thanks |
10:40:44 | * | so joined #nim |
10:44:58 | FromGitter | <data-man> Hmm β http://en.cppreference.com/w/cpp/concept β https://github.com/CaseyCarter/cmcstl2 |
10:46:49 | * | so quit (Ping timeout: 260 seconds) |
10:50:04 | * | so joined #nim |
10:50:11 | dom96 | Amazing how much a single dedicated person can accomplish. Props to @timotheecour :) |
10:50:47 | dom96 | (But also all the other contributors that just showed up and started creating PRs/Issues/discussions |
10:56:14 | * | kaliy joined #nim |
11:18:29 | * | smt` joined #nim |
11:21:17 | * | leorize joined #nim |
11:21:41 | * | smt quit (Ping timeout: 256 seconds) |
11:23:54 | * | smt joined #nim |
11:27:33 | * | smt` quit (Ping timeout: 256 seconds) |
11:30:30 | * | smt` joined #nim |
11:31:51 | * | smt_ joined #nim |
11:34:23 | * | smt quit (Ping timeout: 252 seconds) |
11:35:07 | * | smt` quit (Ping timeout: 252 seconds) |
11:45:32 | * | Vladar quit (Remote host closed the connection) |
12:00:07 | * | sendell joined #nim |
12:00:48 | FromGitter | <data-man> @alehander42: New version :) β β `````` [https://gitter.im/nim-lang/Nim?at=5ac4be707c3a01610da82f7e] |
12:17:58 | FromGitter | <alehander42> there is a typo: it should be `UnaryPredicate[T]` and `BinaryPredicate[T1, T2]` |
12:18:04 | FromGitter | <alehander42> otherwise sounds good to me :D |
12:20:05 | Araq | cmp returns 'int' so that the implementation can be a - b in simple cases |
12:20:53 | FromGitter | <alehander42> well, one can have a converten `int -> CompareResult` and make `cmp` return `CompareResult` |
12:21:23 | Araq | I dislike converters |
12:21:43 | * | craigger quit (Quit: bye) |
12:21:52 | * | craigger joined #nim |
12:21:56 | Araq | the only reason they remain in Nim is they are too useful for interfacing with C++'s plethora of string types |
12:22:20 | FromGitter | <alehander42> well "is a bigger than b? 582!" is a weird conversation :D |
12:22:51 | FromGitter | <alehander42> ofc, not a big deal, just saying that if one wants to be very typesafe, converters + enum help in that case |
12:23:21 | Araq | 582 says it's pretty far off |
12:23:40 | Araq | "what is the distance between a and b?" 582 |
12:23:57 | FromGitter | <alehander42> well if you want to know how far off, you'll just use `-` |
12:24:30 | FromGitter | <alehander42> it's just arbitrary, one can conceptually return `a.float/b.float` too |
12:37:03 | FromGitter | <data-man> @alehander42: My mistake in UnaryPredicate (damn copy-paste). But for BinaryPredicate isn't. :) β Usually, a values ββof a same type are compared. |
12:38:26 | FromGitter | <alehander42> so now I can't describe `contains` ? :D |
12:39:15 | FromGitter | <alehander42> is it possible to do `BinaryPredicate[T1, T2=T1]` :D |
12:44:03 | FromGitter | <data-man> For ```contains``` use ```BinaryProc``` |
12:44:22 | FromGitter | <krux02> well I think that sort should just use `cmp` as a mixin and people should be able to override `cmp` for arbitrary types, and `<` and `<=` `>` `>=` should be implemented generically with the same `cmp`. |
12:44:41 | FromGitter | <krux02> so thet it is simple to just implement `cmp` and sorting and comparison operators just work. |
12:44:50 | FromGitter | <alehander42> @data-man nope, `BinaryPredicate` should be usable for `contains` etc |
12:45:05 | FromGitter | <alehander42> after all, that is exactly a predicate |
12:45:30 | FromGitter | <alehander42> and you don't know what kind of predicates will people think of :D |
12:46:06 | FromGitter | <krux02> @alehander42 well I am a bit scared. People often make things much more complicated than they need to be |
12:47:14 | FromGitter | <krux02> Araq: what do you think about my other two pull requests? You din't leave a commen at all. |
12:47:15 | FromGitter | <alehander42> @krux02 predicate is literally "a boolean pure function" in 99% of cases, it doesn't make sense to limit it to `T, T -> bool` as there are many useful `T1, T2 -> bool` |
12:48:21 | FromGitter | <krux02> apple > pear? |
12:48:43 | FromGitter | <alehander42> apple in apples .. |
12:49:28 | FromGitter | <krux02> well my teachers always taught me to not compare apples with pears, but I guess that saying in English is to not compare apples and oranges. |
12:49:58 | FromGitter | <alehander42> :D ok, but I am not talking about `CompareProc[T |
12:50:07 | FromGitter | <alehander42> I am talking about `BinaryPredicate[T1, T2]` |
12:50:43 | FromGitter | <krux02> well I think there is some point to provide `<` etc for `int64`, `uint64``float64` for precision |
12:50:55 | FromGitter | <krux02> well then what is a binaryPredicate? |
12:51:02 | FromGitter | <alehander42> it's a binary predicate |
12:51:27 | FromGitter | <krux02> can you name a useful example that is not a bool? |
12:51:39 | FromGitter | <alehander42> I am not sure what you mean |
12:51:51 | FromGitter | <alehander42> the point of predicates is that they are boolean functions |
12:52:03 | FromGitter | <alehander42> it's just a naming / convention thing |
12:52:19 | FromGitter | <krux02> well sorry, I interrupted you. I just entered the conversation and I have no idea what you are actually trying to do. |
12:52:44 | FromGitter | <alehander42> :D I was just commenting on @data-man 's RFC , otherwise I also agree with him and you about compare |
12:53:21 | FromGitter | <data-man> @Arag: And https://github.com/nim-lang/Nim/pull/7489 -1 High Priority |
12:58:43 | FromGitter | <krux02> @data-man i just left a comment for you |
12:58:47 | FromGitter | <krux02> in the PR |
12:59:01 | FromGitter | <krux02> I have no power of merging, but maybe you do care |
12:59:14 | FromGitter | <krux02> is anybody interested in this: https://github.com/nim-lang/Nim/issues/7473 |
12:59:44 | FromGitter | <krux02> it's about inconsistent escaping of string literal in different contextst when it is even done at all. |
13:00:17 | * | r2 joined #nim |
13:01:27 | FromGitter | <data-man> @krux02: https://github.com/nim-lang/Nim/blob/devel/tests/osproc/tstdout.nim#L24 :) |
13:02:08 | FromGitter | <krux02> ouch |
13:02:12 | FromGitter | <krux02> that hurts |
13:02:46 | FromGitter | <krux02> I create an issue |
13:03:51 | Araq | huh? what? |
13:04:00 | Araq | distinct types allow explicit type conversions |
13:04:08 | Araq | in both directions. |
13:04:17 | Araq | why would that be wrong? |
13:04:39 | Araq | you need to claim "ok, I checked it, it's not tainted anymore now" |
13:04:44 | * | athenot joined #nim |
13:04:58 | Araq | as well as "I have a raw string, but that's fine as a tainted string too" |
13:06:37 | * | sebastianb joined #nim |
13:06:49 | * | r2 quit (Ping timeout: 260 seconds) |
13:07:21 | Araq | krux02: which ones? |
13:07:52 | * | sebastianb quit (Client Quit) |
13:09:28 | FromGitter | <krux02> well yea i can then close the issue again? |
13:10:22 | FromGitter | <krux02> Araq: https://github.com/nim-lang/Nim/pull/7491 https://github.com/nim-lang/Nim/pull/7475 |
13:11:13 | FromGitter | <zacharycarter> livcd: yes I meant aws sdk |
13:11:55 | FromGitter | <data-man> @Araq: Can I merge @krux02's PRs? For the first time. :) |
13:13:20 | * | Kyle joined #nim |
13:13:43 | * | Kyle is now known as Guest32610 |
13:13:44 | * | Guest32610 quit (Client Quit) |
13:51:53 | * | endragor quit (Remote host closed the connection) |
13:52:32 | * | DarkArctic_ joined #nim |
13:52:42 | * | icebattl1 joined #nim |
13:56:08 | * | icebattle quit (Ping timeout: 276 seconds) |
13:56:20 | * | DarkArctic quit (Ping timeout: 268 seconds) |
13:56:43 | * | DarkArctic_ quit (Client Quit) |
13:56:57 | * | DarkArctic_ joined #nim |
13:56:58 | * | DarkArctic_ quit (Client Quit) |
13:57:17 | * | DarkArctic joined #nim |
14:02:32 | * | leorize quit (Ping timeout: 255 seconds) |
14:06:33 | Araq | data-man: https://github.com/nim-lang/Nim/issues/7498 this one is for you. |
14:07:26 | * | Vladar joined #nim |
14:07:59 | * | poopBot joined #nim |
14:08:22 | poopBot | hmm what does Nim have better then crystal? |
14:09:18 | Araq | it's shorter to type and doesn't remind you of a drug |
14:09:33 | dom96 | lol |
14:09:36 | FromGitter | <narimiran> :D :D |
14:09:40 | dom96 | poopBot: It works natively on Windows. |
14:09:49 | dom96 | Supports parallelism |
14:10:00 | dom96 | and has many GC choices |
14:10:06 | dom96 | probably a lot more too |
14:10:15 | * | jaco60 joined #nim |
14:11:11 | poopBot | from what i see , and i am newbis only thing it hase better is concurency for threads right? |
14:11:36 | poopBot | crystal right, nim uses locks or am i wrong? |
14:11:55 | dom96 | concurrency is not the same as parallelism |
14:12:32 | dom96 | You don't have to use locks in Nim |
14:12:33 | poopBot | googling parallelism |
14:13:00 | poopBot | like i say i am newbis just wanted to know can i multy thread stuff good in Nim when i need it :) |
14:13:18 | dom96 | https://stackoverflow.com/questions/1050222/what-is-the-difference-between-concurrency-and-parallelism |
14:13:58 | poopBot | ye i google it got same |
14:14:04 | poopBot | am reading |
14:14:06 | Araq | using 'spawn' is quite easy in Nim IMO but it's always a bit tricky to get good performance out of it. it's all about the task granularity |
14:14:47 | Araq | too little tasks and you get communication overhead that nukes all benefits of using multi-core. |
14:15:04 | euantor | I think first class Windows support is a big advantage for Nim |
14:15:38 | dom96 | yep, also, no other language can bind to C++ as well as Nim (except C++ ;)) |
14:15:40 | euantor | Aren't Crystal build times really slow too? They certainly used to be |
14:16:02 | FromGitter | <alehander42> release compile times are very slow, dev compile times are normal |
14:16:22 | FromGitter | <narimiran> i have used `spawn` for some nice speed improvements |
14:16:22 | euantor | ah, makes sense |
14:16:33 | FromGitter | <alehander42> I also think nim's type system is much more interesting too (but I admit I might not remember crystal's type system well) |
14:16:39 | FromGitter | <narimiran> not to use it on too small task should be "well known" |
14:16:41 | euantor | I remember they had an issue on the GitHub complaining about it and saying they were somewhat restricted by LLVM |
14:17:01 | FromGitter | <alehander42> yeah, I did some benchmarks of zero_functional and I was shocked by the release compile time :D |
14:17:39 | * | leorize joined #nim |
14:17:40 | FromGitter | <alehander42> of zero_functional vs other language libs* |
14:18:44 | FromGitter | <alehander42> I think it has something to do with their type inference, but not sure |
14:19:20 | poopBot | from crystal i just check there page and i like sytax it almost like reading English :) |
14:20:20 | FromGitter | <zacharycarter> cool |
14:20:41 | Yardanico | poopBot, nim not hard to read too |
14:20:44 | Yardanico | *is not |
14:20:50 | poopBot | othere then that nothing , should have stolen more sytax from Crystal , but np can adjust my brain to Nimish |
14:22:18 | Yardanico | poopBot, IIRC you was in this cha like 1-3 months ago? |
14:22:22 | Yardanico | *chat |
14:22:49 | FromGitter | <alehander42> I think they both have nice syntaxes, I prefer a bit the indentation aspect as it reduces the `end` noise |
14:23:33 | Yardanico | yeah, I don't understand why would you need to write "end" if you already indentate your code ;) |
14:24:26 | dom96 | Because my editor can then auto-format!!!111 |
14:24:31 | dom96 | That's the usual reasoning :) |
14:24:32 | poopBot | Yardanico, yep was here , am lazy last 3 months basicly played games whole day :( |
14:31:33 | * | leorize1 joined #nim |
14:34:29 | * | leorize quit (Ping timeout: 276 seconds) |
14:41:45 | * | athenot_ joined #nim |
14:43:07 | * | athenot quit (Ping timeout: 245 seconds) |
14:50:46 | * | leorize2 joined #nim |
14:51:50 | subsetpark | Does the stdlib have any procs for constructing URL query strings? |
14:52:59 | * | leorize1 quit (Ping timeout: 260 seconds) |
14:55:32 | dom96 | nope |
14:55:58 | dom96 | pretty sure there is an encoding function somewhere though |
14:57:42 | euantor | yes, it's in the `cgi` module |
14:57:48 | euantor | which is a bit weird |
14:58:26 | euantor | or perhaps not, looking at the docs |
14:58:36 | euantor | https://nim-lang.org/docs/uri.html#encodeUrl,string |
14:58:48 | euantor | Maybe it used to be there or maybe I'm getting confused |
14:58:50 | Yardanico | yeah, it is a little bit weird |
14:59:28 | Yardanico | euantor, maybe because of this: https://github.com/nim-lang/Nim/blob/master/lib/pure/cgi.nim#L33 |
14:59:59 | euantor | Ah, yes that would be it! Thanks Yardanico :) |
15:00:06 | FromGitter | <zacharycarter> https://svelte.technology/ - looks pretty sweet |
15:07:09 | * | miran joined #nim |
15:08:15 | * | leorize2 quit (Ping timeout: 255 seconds) |
15:09:48 | Yardanico | euantor, personally I just use a proc like this https://gist.github.com/Yardanico/f7e0e0b7ae179f5f80aeb29638aca1b9 |
15:10:07 | * | xkapastel joined #nim |
15:10:30 | Yardanico | oh wait, maybe this is an old snippet |
15:11:53 | Yardanico | I've updated the gist (but I don't know why I've used strtabs there, I will change that in my project) |
15:13:17 | Yardanico | it can be easily changed to accept openarray[(string, string)] instead though |
15:16:28 | euantor | Yeah, that should work, but personally I wouldn't build a seq - I'd just build a string |
15:17:22 | Yardanico | euantor, I've changed the gist already with my updated code (this gist is 5 months old :P ) |
15:17:42 | * | arnetheduck_ joined #nim |
15:17:47 | * | arnetheduck quit (Read error: No route to host) |
15:18:15 | Yardanico | this encode proc can be used for GET requests (query parameters), and for POST request body |
15:18:15 | euantor | Oh, I was going off what IRC Cloud rendered which obviously didn't show the update |
15:21:58 | FromGitter | <zacharycarter> going to start a company |
15:22:00 | FromGitter | <zacharycarter> called rotten gitatoes |
15:22:08 | FromGitter | <zacharycarter> going to rate git repos on freshness |
15:22:58 | miran | :D :D |
15:24:36 | * | endragor joined #nim |
15:29:24 | * | endragor quit (Ping timeout: 255 seconds) |
15:32:28 | dom96 | haha |
15:33:25 | FromGitter | <zacharycarter> also - https://www.npmjs.com/package/isobject - NPM is sooooo screwed eventually |
15:33:34 | FromGitter | <zacharycarter> the internet is going to eventually break |
15:33:49 | * | smt_ quit (Ping timeout: 252 seconds) |
15:38:20 | Yardanico | https://github.com/jonschlinkert/isobject/blob/master/index.js |
15:39:46 | FromGitter | <zacharycarter> thank goodness we have that package! |
15:41:16 | * | Trustable joined #nim |
15:47:45 | * | smt joined #nim |
15:55:07 | Yardanico | LOL - https://github.com/jonschlinkert/isobject/pull/10 |
15:59:46 | FromGitter | <zacharycarter> hahaha |
16:01:37 | FromGitter | <alehander42> well, to be honest, there wouldn't be a need for that if there was a browser stdlib |
16:02:06 | FromGitter | <alehander42> btw how does raise create traceback |
16:05:45 | FromGitter | <zacharycarter> that's true @alehander42 - but it still doesn't justify this kind of nonsense |
16:06:10 | dom96 | Argh, I keep getting distracted by GitHub notifications |
16:06:37 | FromGitter | <gemath> issue reports? that's me .o) |
16:06:48 | FromGitter | <krux02> dom96: unplug the internet when you want to be productive |
16:08:04 | dom96 | No access to docs then :) |
16:08:51 | dom96 | gemath: lots of people LD |
16:08:52 | dom96 | *:D |
16:13:25 | FromGitter | <krux02> dom96: well I think you have nim installed somewhere on your PC, don't you? |
16:13:54 | dom96 | krux02: yes, but I don't have clang docs |
16:16:01 | FromGitter | <krux02> dom96: https://devdocs.io/offline |
16:16:41 | FromGitter | <krux02> sorry I think with clang you mean internals not just c++ |
16:16:49 | dom96 | yep |
16:22:04 | FromGitter | <krux02> but i am sure you can get them offline as well. |
16:22:52 | FromGitter | <krux02> fun fact, when you type "man man" in the terminal, it says "man - an interface to the on-line reference manuals" |
16:23:13 | FromGitter | <krux02> interesting how the definition of on-line changed over the years. |
16:26:37 | * | athenot_ quit (Ping timeout: 252 seconds) |
16:27:11 | * | athenot joined #nim |
16:27:37 | * | aguspiza joined #nim |
16:30:50 | * | athenot quit (Remote host closed the connection) |
16:31:19 | * | athenot joined #nim |
16:35:01 | * | athenot quit (Remote host closed the connection) |
16:35:09 | FromGitter | <krux02> any feedback for my patter matching? here this is what currently works |
16:35:11 | FromGitter | <krux02> http://ix.io/16ym |
16:35:24 | * | athenot joined #nim |
16:35:28 | FromGitter | <krux02> matchAst is where the magic happens |
16:36:35 | * | sendell quit (Remote host closed the connection) |
16:36:51 | FromGitter | <krux02> in the `of` branch you would pass a lispRepr of an ast and the matcher generates the code to match for exactly that tree structure and node kinds. |
16:37:48 | FromGitter | <krux02> then a node kind such as `Infix` without arguments does not check for children, it just checks for kind |
16:38:24 | FromGitter | <krux02> and `mysym` assigns an ast to a new variables that you can then use in the block below |
16:39:18 | FromGitter | <krux02> and `` `mysym` @ ... `` does the same as `mysym` but it aloso continues to check the pattern of `mysym` |
16:40:03 | * | athenot quit (Ping timeout: 255 seconds) |
16:40:49 | * | athenot joined #nim |
16:45:56 | * | endragor joined #nim |
16:46:05 | FromGitter | <nathandaly> Hey there, new to Nim, impressed with it so far. I am using it for deployment of containers. I have a script with a proc to read from a JSON file that looks like this https://github.com/Yuma-Framework/_automation/blob/master/services.json I need to iterate over the JsonNode that I have in my hand |
16:46:14 | FromGitter | <nathandaly> `dad` |
16:46:59 | Yardanico | hello, do you have a problem with something? :) |
16:48:36 | FromGitter | <nathandaly> ```code paste, see link``` β β Some example code [https://gitter.im/nim-lang/Nim?at=5ac501e35f188ccc152df3d0] |
16:49:31 | FromGitter | <nathandaly> It's dynamic (could be any env variables) so really needs to be a JArray |
16:50:07 | FromGitter | <Yardanico> It's very easy: |
16:50:12 | FromGitter | <Yardanico> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5ac50243270d7d370891cf7e] |
16:50:56 | FromGitter | <Yardanico> ah, sorry, didn't see last part |
16:51:50 | FromGitter | <Yardanico> https://gist.github.com/Yardanico/c663ce149ebe3e0daea4598e62fb2343 |
16:52:06 | FromGitter | <nathandaly> Ha that is easy |
16:52:15 | FromGitter | <nathandaly> My bad :) |
16:52:58 | * | r3d9u11 joined #nim |
16:53:41 | FromGitter | <nathandaly> Does parseFile give the same datatype as parseJson |
16:53:58 | Yardanico | yes |
16:55:02 | FromGitter | <alehander42> Hey krux02 is it only for one of |
16:55:26 | * | aziz joined #nim |
16:56:05 | FromGitter | <data-man> @nathandaly: How big your file? |
16:57:09 | FromGitter | <nathandaly> Small right now? |
16:57:27 | FromGitter | <alehander42> I mean so you support multiple is |
16:57:34 | FromGitter | <alehander42> Ofs* |
16:58:14 | FromGitter | <nathandaly> Ofs? |
16:58:25 | Yardanico | @data-man: performance of json module wouldn't matter for small config files (because it's pretty good even for big ones) :) |
17:00:30 | FromGitter | <krux02> @alehander42 currently it is one of only. |
17:00:39 | FromGitter | <krux02> but I have a todo to support many |
17:01:15 | FromGitter | <krux02> I come from scala, I want powerful pattern matching not half ass pattern machtching that only works for one use case but falls flat for everything else |
17:02:04 | FromGitter | <data-man> @Yardanico: That's why I asked about the size. :) |
17:02:28 | Yardanico | @data-man if you've read the file or repo you can see it's a config :) |
17:03:41 | FromGitter | <data-man> @Yardanico: What about 1 GiB file? |
17:04:24 | Yardanico | @data-man: why would a config file be a 1GiB in size? |
17:05:33 | FromGitter | <data-man> I'm not talking about a config. |
17:06:27 | Yardanico | @data-man: but I've talked only about it |
17:08:07 | FromGitter | <abijahm> @data-man for large files use https://nim-lang.org/docs/json.html#JsonEventKind |
17:08:18 | FromGitter | <data-man> Well. I'll just post this for the logs. :) https://github.com/OpenSystemsLab/jsmn.nim |
17:09:13 | FromGitter | <abijahm> but it needs jsonkey event to differentiate between key strings and values |
17:11:46 | FromGitter | <Varriount> @data-man That's more of a json tokenizer than a parser. |
17:13:03 | * | couven92 joined #nim |
17:17:01 | * | Trustable quit (Remote host closed the connection) |
17:22:06 | FromGitter | <zacharycarter> is there any http/2 support for Nim atm? |
17:22:47 | Yardanico | yes! |
17:23:08 | Yardanico | ah wait, no :( |
17:23:10 | Yardanico | only this - https://github.com/nitely/nim-hpack |
17:25:54 | * | ofelas quit (Quit: shutdown -h now) |
17:26:21 | FromGitter | <data-man> @zacharycarter: Probably, a libcurl-wrapper can work. |
17:26:27 | * | r3d9u11 quit (Ping timeout: 240 seconds) |
17:27:23 | * | ofelas joined #nim |
17:30:27 | FromGitter | <zacharycarter> @data-man true |
17:36:06 | FromDiscord_ | <--HA--> hello |
17:36:40 | Yardanico | hello! |
17:38:37 | Yardanico | dom96, btw, are you registered on discord? I can add you as an admin here |
17:38:53 | poopBot | discord sux |
17:39:18 | * | ketralnis quit (Quit: Coyote finally caught me) |
17:39:32 | FromDiscord_ | <--HA--> I'm looking for a way to change modification and last access time of files. Can someone point me in the right direction perhaps? I found the posix module and the utimes proc and that works on linux but I need a solution that works on windows too |
17:39:51 | Yardanico | You'll probably need to use win32 api |
17:40:16 | * | endragor quit (Remote host closed the connection) |
17:41:09 | Yardanico | check https://nim-lang.org/docs/winlean.html for needed win32 api function, and if it isn't there, use https://github.com/nim-lang/oldwinapi (it contains WHOLE win32 api) |
17:43:17 | FromDiscord_ | <--HA--> thank you, I had a look at winlean but did not see it on first read, I'll check again and search oldwinapi otherwise |
17:43:51 | Yardanico | oh wait, https://stackoverflow.com/questions/2185338/how-to-set-the-modification-time-of-a-file-programmatically |
17:43:58 | Yardanico | "Windows (or the standard CRT, anyhow) has the same utimes family of functions that UNIX has." |
17:44:21 | Yardanico | and it also contains a win32 api example |
17:57:32 | FromDiscord_ | <--HA--> I don't know how I would go about calling those win32 api functions. Is there a proc in winlean to help me with that? |
17:57:46 | Yardanico | you would need to use importc |
17:59:14 | Yardanico | you can see how things are implemented in winlean module |
18:08:18 | FromGitter | <data-man> @Yardanico β β > it contains WHOLE win32 api β β Isn't true :) [https://gitter.im/nim-lang/Nim?at=5ac51491e4ff28713aa9ecc7] |
18:08:41 | miran | what would be the best way to send/receive something to/from python script? |
18:08:59 | FromGitter | <Varriount> stdin/out? |
18:09:24 | miran | i would like to use ODE solver from python's scipy, and to have results of it in nim |
18:12:48 | Yardanico | @data-man well I know |
18:26:29 | FromDiscord_ | <--HA--> Thank you for importc, I think I'm at least looking in the right place now. I found this in oldwinapi. I'll try to get just that proc working in my code without all the rest of oldwinapi. Does that make sense? |
18:26:29 | FromDiscord_ | <--HA--> |
18:26:30 | FromDiscord_ | <--HA--> proc SetFileTime*(hFile: HANDLE, lpCreationTime: LPFILETIME, |
18:26:30 | FromDiscord_ | <--HA--> lpLastAccessTime: LPFILETIME, lpLastWriteTime: LPFILETIME): WINBOOL{. |
18:26:30 | FromDiscord_ | <--HA--> stdcall, dynlib: "kernel32", importc: "SetFileTime".} |
18:27:18 | Yardanico | yes, it does |
18:28:26 | FromGitter | <zacharycarter> wasn't there some blog post about a debugger / gdb? |
18:28:37 | FromGitter | <zacharycarter> with some kind of cool new time travel feature - not reverse debugging? |
18:29:05 | FromGitter | <zacharycarter> is that what - http://rr-project.org/ - is? |
18:32:49 | * | aguspiza quit (Ping timeout: 265 seconds) |
18:40:30 | * | jaco60 quit (Quit: Textual IRC Client: www.textualapp.com) |
18:42:55 | * | yglukhov quit (Remote host closed the connection) |
18:44:05 | FromGitter | <data-man> I like edb-debugger or x64dbg |
18:50:52 | * | smt` joined #nim |
18:50:59 | * | ofelas quit (Quit: shutdown -h now) |
18:52:18 | * | Jesin joined #nim |
18:54:06 | * | smt quit (Ping timeout: 256 seconds) |
18:55:24 | miran | to answer my question: `execCmdEx` from `osproc` module seems like the thing i need |
18:58:14 | * | aziz quit (Remote host closed the connection) |
18:59:05 | FromDiscord_ | <dom> @Yardanico I am indeed. |
19:00:43 | Yardanico | dom96, I've added you on this server (so you have full admin rights) |
19:00:52 | dom96 | thx |
19:03:15 | Yardanico | also idk why FromDiscord_ has a _, i'll restart it |
19:03:57 | * | FromDiscord_ quit (Remote host closed the connection) |
19:04:26 | * | FromDiscord joined #nim |
19:12:24 | * | ofelas joined #nim |
19:17:15 | * | noonien joined #nim |
19:20:08 | dom96 | Yardanico: Did you register the nickname btw? |
19:20:28 | Yardanico | dom96, on freenode? node :( |
19:20:35 | * | smt` quit (Remote host closed the connection) |
19:21:01 | * | smt` joined #nim |
19:21:14 | dom96 | yeah on freenode |
19:21:45 | dom96 | you should register it |
19:31:39 | * | rokups quit (Quit: Connection closed for inactivity) |
19:41:19 | FromGitter | <zacharycarter> this is the best one yet - https://github.com/jezen/is-thirteen |
19:55:16 | FromGitter | <wu-lee> I find I am foot-shooting myself with refs rather easily, making partial copies of objects. I don't suppose there's any way to ask nim to warn me when I'm doing so? |
19:56:13 | FromGitter | <wu-lee> Since objects in nim include type info (if I understand correctly), this seems within the realm of plasibility... |
19:59:29 | * | Jesin quit (Quit: Leaving) |
20:02:11 | dom96 | why are you making partial copies? |
20:04:28 | FromGitter | <nathandaly> Someone make a Udemy course for Nim (y) |
20:05:46 | * | poopBot quit (Remote host closed the connection) |
20:08:16 | FromGitter | <wu-lee> @dom96 I'm trying to operate on polymorphic objects, with their own method implementations which update their states. I'm passing the objects to updates as a var param, with a previous object state as a non-var param (to guarantee it is not mutated). |
20:09:34 | FromGitter | <Vindaar> @miran I need to do the same thing basically. Have to fit some ugly combination of gaussians to some data, which I'm doing with scipy's curve_fit currently. Currently I'm just calling the Python script by hand, simply because I couldn't decide how to get the data from Python back to Nim. Read Python's stdout, use a return value, write to a tmp file... What do you plan to do? |
20:09:51 | FromGitter | <wu-lee> I've also a clone method, which creates a new ref of the same type. In both cases I seem to be getting things wrong and the program is either exploding, or simply not working because some fields are not copied somewhere. |
20:11:36 | FromGitter | <wu-lee> @dom96 I've tracked a few mistakes down, but as mentioned at the end of the article here it seems to be quite easy for the uninitiated to make them. http://goran.krampe.se/2014/10/29/nim-and-oo/ |
20:13:55 | dom96 | Do you have any examples of how it blows up? |
20:15:35 | FromGitter | <zacharycarter> @nathandaly why not just make a Nim book like the Rust book instead |
20:15:39 | FromGitter | <zacharycarter> also - I despise video tutorials |
20:16:11 | FromGitter | <zacharycarter> not to say that everyone does - that's obviously not the case - but still I prefer a nicely written text over a video |
20:17:02 | FromGitter | <zetashift> If you already have experience in Go or C# or anything that looks like that, Nim in Action is a superb read |
20:18:18 | FromGitter | <nathandaly> I like go, I am just not a fan of the package management |
20:18:41 | * | smt joined #nim |
20:19:15 | FromGitter | <wu-lee> @dom96 I've been trying to eliminate them, but I might be able to recreate one... |
20:21:05 | * | smt` quit (Ping timeout: 265 seconds) |
20:24:38 | * | Vladar quit (Quit: Leaving) |
20:30:28 | FromGitter | <wu-lee> However, the question is more of general one (partly a 'could nim warn...' as well as 'does nim warn...') |
20:30:43 | FromGitter | <wu-lee> @dom96 Here's a gist: https://gist.github.com/wu-lee/704d66367e1466ff763b332b393e1863 |
20:32:43 | * | nsf quit (Quit: WeeChat 2.0.1) |
20:36:12 | * | jrbrt joined #nim |
20:37:44 | * | miran quit (Ping timeout: 260 seconds) |
20:37:45 | * | miran_ joined #nim |
20:37:45 | * | miran_ is now known as miran |
20:38:00 | miran | Vindaar: is your nim-python code maybe available? |
20:40:04 | * | jaco60 joined #nim |
20:40:19 | miran | Vindaar: what i have come up with is calling python script with all the needed `argv`s, doing my calculations, and printing the result - that is saved as a nim-string (as a return from `execCmdEx`), and i convert it to a `seq[float]` |
20:43:29 | * | yglukhov joined #nim |
20:44:20 | miran | it is not very pretty (if there's a way to make it prettier, i would like to know), but it works.... |
20:44:45 | FromGitter | <Vindaar> @miran Ok, good to hear that works. Wasn't sure about the parsing of the printed content from Python. Ah yeah, not pretty indeed. |
20:45:39 | miran | yeah, i have came up with `outp.strip.splitLines.map(parseFloat)` (where `outp` is python output) |
20:46:11 | FromGitter | <Vindaar> The code is currently not on Github, because it's still part of a larger repo containing all sorts of random other work stuff. I wanted to split it off the rest of that repo anyways, so you asking might as well be the thing that makes me do it :) |
20:46:38 | dom96 | wu-lee: You're over-complicating things a bit |
20:46:58 | dom96 | and putting yourself into a strange gotcha |
20:46:59 | dom96 | https://gist.github.com/dom96/253997643d18b961f79ddc5336d9e139 |
20:47:12 | miran | so we have nim, which compiles to C, which calls python, which calls some fortran functions :D :D |
20:47:21 | dom96 | You can save yourself from that by always declaring your types with 'ref' if that's how you intend to use them |
20:47:58 | FromGitter | <Vindaar> @miran maybe we could come up with a nice way to interface between Python and Nim for this sort of thing? Haha, indeed |
20:48:14 | * | yglukhov quit (Ping timeout: 260 seconds) |
20:49:27 | FromGitter | <wu-lee> @dom96 - quite possibly. I wanted to avoid refs everywhere, mainly so I can make promises about immutability in my function signatures |
20:50:21 | dom96 | Why use them at all then? |
20:50:43 | dom96 | Your non-ref objects will be copied when you assign them anyway |
20:50:58 | dom96 | maybe you thought you need to deepCopy them too? |
20:51:01 | miran | Vindaar: i'll see how will this work when i start to use it for something a bit more serious (i have just tried it on some toy example), but a nicer/easier interface between python and nim would be great thing to have |
20:51:27 | dom96 | well, if you have ref types inside your object then it's not quite that simple L/ |
20:51:28 | dom96 | *:/ |
20:51:52 | * | jrbrt quit (Quit: SlΓ‘n agat) |
20:52:29 | subsetpark | dom96: in `runnableExamples`, is there a way to create multiple separate text boxes, indicating separate sessions (rather than a sequence of statements)? Right now I'm just using a new `runnableExamples` for each one, but that has the effect of repeating the "Examples:" header |
20:53:04 | dom96 | subsetpark: No, make a feature request :) |
20:53:23 | subsetpark | What, and keep us from 1.0??? |
20:57:09 | * | miran quit (Quit: Konversation terminated!) |
21:00:48 | FromGitter | <Vindaar> @miran: Indeed. To share little data between the two it's fine I suppose. For a start putting the stuff into a JSON message might make it a little nicer |
21:03:09 | FromGitter | <Vindaar> And given good JSON support I guess one could write a couple of procs in Nim and Python to streamline that? For larger datasets using a temp HDF5 file would work. Hmmm... :) |
21:10:44 | * | vlad1777d joined #nim |
21:15:29 | * | jaco60 quit (Quit: My MacBook has gone to sleep. ZZZzzzβ¦) |
21:24:49 | * | dddddd quit (Ping timeout: 248 seconds) |
21:29:22 | Araq | use a database :P |
21:42:50 | * | dddddd joined #nim |
21:43:39 | FromGitter | <Vindaar> But, but, but... scientists and databases don't get along :P |
21:51:52 | * | noonien quit (Quit: Connection closed for inactivity) |
22:27:59 | * | couven92 quit (Read error: Connection reset by peer) |
22:47:59 | FromGitter | <Vindaar> @miran @narimiran just added the code to Github: https://github.com/Vindaar/TimepixAnalysis β write me a PM on Gitter, if you're interested in the whole Nim <-> Python stuff (or missing stuff..) |
22:49:13 | FromGitter | <wu-lee> @dom96 - the example I gave is possibly a bad one for making my point. I'm more concerned here with avoiding losing type information in assignments than specifics of refs or deepCopy. (Saying that, I really would like to be able to declare immutable ref params, too.) |
23:00:49 | * | Lord_Nightmare quit (Ping timeout: 248 seconds) |
23:02:17 | * | Lord_Nightmare joined #nim |
23:03:54 | * | xet7 quit (Quit: Leaving) |
23:12:06 | * | SenasOzys_ quit (Remote host closed the connection) |
23:12:33 | * | SenasOzys joined #nim |
23:15:52 | * | SenasOzys quit (Remote host closed the connection) |
23:16:18 | * | SenasOzys joined #nim |
23:19:52 | * | SenasOzys quit (Remote host closed the connection) |
23:20:12 | * | SenasOzys joined #nim |
23:39:40 | * | leorize2 joined #nim |
23:40:26 | * | leorize2 is now known as leorize |
23:41:40 | FromGitter | <sivakon> Does Nim have a wrapper for OpenAI gym? |