00:03:14 | * | SenasOzys quit (Remote host closed the connection) |
00:07:22 | * | SenasOzys joined #nim |
00:12:28 | * | SenasOzys quit (Remote host closed the connection) |
00:28:20 | * | SenasOzys joined #nim |
00:30:39 | * | SenasOzys quit (Remote host closed the connection) |
00:35:10 | FromGitter | <bung87> anyone tried `options ` module? when I call `result.get` I get `attempting to call undeclared routine: 'get'` |
00:36:37 | leorize | can you give us a snippet? |
00:36:42 | leorize | last time I tried it worked fine |
00:37:49 | FromGitter | <bung87> oh sorry , forget import options in test file |
00:42:16 | * | martinium joined #nim |
00:46:27 | * | leorize quit (Quit: WeeChat 2.2) |
00:55:15 | FromGitter | <bung87> https://github.com/python/cpython/blob/9835696ec4c57a9a30f1c11cfb4c5d3e121bf97c/Lib/sched.py#L148 the non-blocking is designed for future usage with multi-thread ? |
02:21:50 | * | leorize joined #nim |
02:52:48 | * | leorize quit (Quit: WeeChat 2.2) |
02:56:07 | * | leorize joined #nim |
02:57:46 | * | leorize quit (Client Quit) |
02:57:56 | * | leorize joined #nim |
03:04:10 | * | tefter joined #nim |
03:17:43 | * | endragor joined #nim |
03:33:44 | * | kapil___ joined #nim |
03:51:00 | * | endragor quit (Ping timeout: 252 seconds) |
03:57:49 | * | leorize quit (Quit: WeeChat 2.2) |
04:07:39 | FromGitter | <codenoid> hi @Araq |
04:12:09 | * | shashlick quit (Remote host closed the connection) |
04:12:26 | * | shashlick joined #nim |
04:24:18 | * | dddddd quit (Remote host closed the connection) |
04:44:52 | * | endragor joined #nim |
05:14:27 | * | miran joined #nim |
05:39:09 | * | endragor quit (Ping timeout: 272 seconds) |
06:12:33 | * | martinium quit (Ping timeout: 245 seconds) |
06:29:59 | * | leorize joined #nim |
06:41:29 | * | RushPL quit (Ping timeout: 252 seconds) |
06:41:30 | * | RushPL joined #nim |
06:53:30 | * | leorize quit (Quit: WeeChat 2.2) |
07:06:36 | * | endragor joined #nim |
07:07:48 | * | nsf joined #nim |
07:14:18 | * | zachcarter quit (Ping timeout: 252 seconds) |
07:22:49 | FromDiscord | <2vg> non-blocking socket ? |
07:23:04 | * | endragor quit (Quit: Leaving) |
07:24:33 | FromGitter | <bung87> not as I known, seems the sched like some queued task lib in other language. |
07:26:34 | FromGitter | <bung87> no idea about why he just return a delay time that break the loop. |
07:29:39 | * | TheLemonMan joined #nim |
07:40:42 | * | nsf quit (Ping timeout: 252 seconds) |
07:43:29 | * | cspar joined #nim |
07:52:28 | * | stefanos82 joined #nim |
07:58:15 | TheLemonMan | Araq, why JS strings had a terminating nul? |
08:03:15 | * | gmpreussner quit (Ping timeout: 252 seconds) |
08:03:44 | * | gmpreussner joined #nim |
08:07:52 | * | nsf joined #nim |
08:15:16 | * | gangstacat quit (Ping timeout: 252 seconds) |
08:22:01 | * | tefter quit (Remote host closed the connection) |
08:22:58 | * | cspar quit (Ping timeout: 245 seconds) |
08:36:49 | * | cspar joined #nim |
08:38:38 | * | stefanos82 quit (Quit: Quitting for now...) |
08:53:29 | * | leorize joined #nim |
08:58:20 | * | cspar quit (Ping timeout: 244 seconds) |
09:00:10 | * | ftsf joined #nim |
09:00:54 | * | ftsf quit (Client Quit) |
09:01:20 | * | ftsf joined #nim |
09:01:29 | * | cspar joined #nim |
09:04:47 | * | nsf quit (Quit: WeeChat 2.2) |
09:07:02 | * | Vladar joined #nim |
09:07:15 | * | gb00s quit (Remote host closed the connection) |
09:09:46 | * | gangstacat joined #nim |
09:32:57 | * | echotangoecho joined #nim |
09:44:54 | * | gb00s joined #nim |
10:02:11 | FromGitter | <Clyybber> TheLemonMan Why did you close https://github.com/nim-lang/Nim/pull/8864? |
10:02:14 | FromGitter | <Clyybber> ? |
10:02:48 | TheLemonMan | found a couple of edge cases |
10:03:13 | FromGitter | <Clyybber> Ah ok |
10:28:06 | * | SenasOzys joined #nim |
10:37:19 | FromGitter | <tim-st> is there a reason why a var is not transfered by default to a `threadvar` when it's needed? |
10:40:17 | FromGitter | <alehander42> why can't i add a custom pragma to my top level as ⏎ ⏎ `{.example.}` |
10:40:29 | FromGitter | <alehander42> get 'cant attach custom pragma to module' |
10:48:21 | TheLemonMan | alehander42, what kind of custom pragma are we talking about? |
11:11:35 | FromGitter | <alehander42> A pragma defined by me |
11:12:24 | TheLemonMan | snippet please |
11:18:21 | FromGitter | <alehander42> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5b93affdf59e0c1555c97139] |
11:18:38 | FromGitter | <alehander42> at least that's similar to how i define a proc pragma |
11:20:55 | TheLemonMan | oh, macro pragmas are reserved for procs only |
11:21:24 | * | kapil___ quit (Quit: Connection closed for inactivity) |
11:24:40 | FromGitter | <alehander42> i just wanted to see how can i do https://github.com/alehander42/new-order |
11:24:44 | FromGitter | <alehander42> but proc is fine |
11:24:48 | FromGitter | <alehander42> is there a reason tho |
11:24:57 | FromGitter | <alehander42> hm makes sense |
11:27:33 | TheLemonMan | oh, I love New Order heh |
11:27:54 | * | stefanos82 joined #nim |
11:46:18 | * | SenasOzys quit (Ping timeout: 245 seconds) |
11:47:36 | FromGitter | <alehander42> yeah actually joy div are my fav band but it surprised me I still like new order too |
11:47:44 | * | ftsf quit (Ping timeout: 272 seconds) |
11:56:50 | * | ftsf joined #nim |
12:03:56 | * | SenasOzys joined #nim |
12:27:41 | * | abm joined #nim |
12:28:14 | FromGitter | <tim-st> what's the best way to cast array[size, char] to cstring? |
12:28:24 | FromGitter | <tim-st> or how does it work |
12:29:01 | FromGitter | <tim-st> https://github.com/nim-lang/Nim/issues/6350#issuecomment-335442216 |
12:39:57 | FromGitter | <tim-st> ended up using just string... |
12:43:18 | * | kapil___ joined #nim |
12:48:10 | * | xet7 joined #nim |
12:48:17 | FromGitter | <Bennyelg> https://github.com/Bennyelg/csvql - now it looks good. |
12:52:46 | * | miran quit (Quit: Konversation terminated!) |
13:02:03 | * | smt` quit (Remote host closed the connection) |
13:07:48 | * | echotangoecho quit (Read error: Connection reset by peer) |
13:09:16 | FromGitter | <bung87> cool like mysql-cli |
13:10:32 | FromGitter | <bung87> (https://files.gitter.im/nim-lang/Nim/GlXt/Screen-Shot-2018-09-08-at-9.09.59-PM.png) |
13:10:48 | FromGitter | <bung87> found issue with logo |
13:11:13 | FromGitter | <Bennyelg> :D |
13:12:42 | * | nsf joined #nim |
13:14:38 | * | zachcarter joined #nim |
13:15:57 | * | Vladar quit (Remote host closed the connection) |
13:16:19 | * | Vladar joined #nim |
13:21:02 | * | Tanger quit (Ping timeout: 268 seconds) |
13:35:47 | FromGitter | <Bennyelg> cligen library anyone faimiliar ? |
13:57:15 | * | echotangoecho joined #nim |
14:06:12 | * | SenasOzys quit (Remote host closed the connection) |
14:06:30 | * | SenasOzys joined #nim |
14:11:06 | * | zachcarter quit (Quit: Lost terminal) |
14:11:20 | * | zachcarter joined #nim |
14:12:42 | zachcarter | https://about.sourcegraph.com/go/gophercon-2018-go-says-wat/#wat-16 |
14:12:43 | zachcarter | hrmmm |
14:22:07 | * | smt joined #nim |
14:25:13 | dom96 | possible in Nim too :) |
14:25:52 | * | Trustable joined #nim |
14:26:22 | zachcarter | but is it that easy? |
14:26:47 | zachcarter | oh yes it is apparently |
14:26:47 | zachcarter | wow |
14:34:15 | zachcarter | is that really desired? |
14:34:46 | FromGitter | <zetashift> Why would you ever want to do that? |
14:35:34 | zachcarter | my thoughts as well |
14:42:17 | FromGitter | <mratsim> To win the Go code obfuscation challenge |
14:42:38 | FromGitter | <mratsim> @Bennyelg ping @shashlick |
14:43:02 | zachcarter | lol |
14:43:12 | FromGitter | <kaushalmodi> @Bennyelg I use cligen. It's awesome! |
14:43:25 | zachcarter | I do as well |
14:43:30 | zachcarter | it is a great lib! |
14:43:50 | FromGitter | <Bennyelg> I know it's awesome. But I found an annoying but or I dont know how to use it |
14:43:59 | FromGitter | <Bennyelg> when I pass seq[char] for example |
14:44:24 | FromGitter | <Bennyelg> I can't pass something like this: -d=';', ',' ⏎ I try escaping but it's not working. |
14:44:33 | FromGitter | <Bennyelg> -d=';','~' will work just fine. |
14:45:31 | FromGitter | <mratsim> and "';',’,’"? |
14:46:53 | FromGitter | <Bennyelg> nop |
14:46:55 | FromGitter | <mratsim> 50 years that we have escape hell and still not solved :P. I have horror stories with Excel quote interpolation btw (because since the escape character is quote in Excel you need to triple or quadruple your quotes ¯_(ツ)_/¯) |
14:49:37 | zachcarter | yeah |
14:49:42 | zachcarter | that shit is a nightmare |
14:49:51 | zachcarter | although I heard excel was getting Python as as scripting language soon |
14:49:57 | ldlework | lol really? |
14:50:02 | FromGitter | <mratsim> yes |
14:50:03 | zachcarter | so I wonder if all of the built in formulas will improve |
14:50:14 | zachcarter | yeah - I think they're trying to get off VB Macros |
14:50:23 | zachcarter | or at least give users more options |
14:50:27 | FromGitter | <mratsim> it has JS script too, because JS scripting is the only thing that works in Excel Online |
14:50:46 | ldlework | I wonder what version of Python they'll go with |
14:50:50 | FromGitter | <mratsim> though I raised a big last year because their intro example didn’t work xD |
14:50:56 | FromGitter | <mratsim> a bug* |
14:51:08 | * | Trustable quit (Remote host closed the connection) |
14:57:39 | shashlick | @mratsim: not me right? |
15:06:18 | FromGitter | <codenoid> @Bennyelg can i get example of .csv file |
15:06:28 | FromGitter | <codenoid> i still don't understant, what inside that .csv file |
15:08:28 | FromGitter | <mratsim> @shashlick @Bennyelg had parsing issues with quote in nimgen |
15:10:02 | FromGitter | <mratsim> @codenoid https://github.com/mratsim/Arraymancer/blob/master/tests/manual_checks/iris_numeric.csv |
15:10:09 | FromGitter | <mratsim> check the raw version as well |
15:10:37 | FromGitter | <codenoid> 👍 |
15:12:23 | FromGitter | <mratsim> parsing CSVs is one of the most hellish task though. ⏎ ⏎ for example, instead of transforming newline into \n, Excel will add a quote and go to the next line. |
15:12:50 | FromGitter | <mratsim> the quote format changes depending on your localization in Excel, as does the comma vs semi)colon |
15:13:04 | FromGitter | <mratsim> and people sometimes use tabs for separation in CSVs |
15:13:18 | FromGitter | <kayabaNerve> ... what |
15:13:18 | FromGitter | <Bennyelg> @codenoid the problem is not in the csv |
15:13:31 | FromGitter | <Bennyelg> the problem is passing delimiter ',' with -d= param (cligen) |
15:13:34 | FromGitter | <mratsim> you can’t encode the locale as well so French, Chinese will produce weird characters |
15:14:07 | FromGitter | <codenoid> i just want to ask, what's inside .csv :D @Bennyelg |
15:14:23 | FromGitter | <Bennyelg> just a random csv |
15:14:29 | FromGitter | <Bennyelg> nothing special , bullshit data. |
15:14:32 | FromGitter | <codenoid> i want make crystal version for that xD |
15:15:43 | FromGitter | <mratsim> http://thomasburette.com/blog/2014/05/25/so-you-want-to-write-your-own-CSV-code/ and http://www.secretgeek.net/csv_trouble |
15:19:07 | * | Jesin quit (Quit: Leaving) |
15:19:20 | dom96 | It's what happens when a format isn't standardised |
15:19:55 | FromGitter | <codenoid> i had same problem with plain text delimiter, sometime i change comma with something uniq, (but with my own csv builder, :/) |
15:22:59 | * | Jesin joined #nim |
15:23:10 | * | Jesin quit (Client Quit) |
15:25:01 | shashlick | @Bennyelg: what issue did you see with nimgen? |
15:30:33 | zachcarter | if I have a block macro, and then in the block I have procedures with pragma macros attached to them |
15:30:54 | zachcarter | is there anyway, with a reference to the proc node with the pragma macro attached, to execute to the pragma macro from within the block macro? |
15:32:57 | * | Jesin joined #nim |
15:36:27 | zachcarter | `result.add(getAst(constructor(cn)))` worked |
15:50:07 | * | SenasOzys quit (Ping timeout: 244 seconds) |
16:08:30 | * | echotangoecho quit (Quit: Lost terminal) |
16:09:16 | * | cspar quit (Ping timeout: 246 seconds) |
16:14:30 | * | cspar joined #nim |
16:14:41 | FromDiscord | <ZeetNickel> Potentially stupid beginner question here, but is there in Nim any way to get a ref to a non-ref object, or are pointers the only way to go? |
16:15:31 | FromGitter | <Bennyelg> @shashlick not parsing well |
16:16:04 | FromGitter | <Bennyelg> try to pass an argument which it's seq[string] or seq[char] and pass ',' or "," as an element |
16:17:50 | zachcarter | ZeetNickel - `proc box[T](x: T): ref T = |
16:17:53 | zachcarter | new(result); result[] = x` |
16:18:33 | FromDiscord | <ZeetNickel> Alright, thank you <zachcarter>, I'll try that |
16:18:41 | zachcarter | np |
16:19:50 | shashlick | I'm not sure, are you talking of cligen or nimgen |
16:25:14 | * | TheLemonMan quit (Quit: "It's now safe to turn off your computer.") |
16:32:16 | FromGitter | <Bennyelg> cligen |
16:32:51 | FromGitter | <Bennyelg> added new keyword ⏎ proc main(name: string, delimiters: seq[char]) |
16:32:56 | FromGitter | <Bennyelg> try to pass delimiter ',' |
16:33:00 | FromGitter | <Bennyelg> from the command line |
16:33:47 | * | cspar quit (Ping timeout: 240 seconds) |
16:34:43 | zachcarter | https://gist.github.com/zacharycarter/ed7f584a3acf2aa77d0a397cca11e100 - es2015 classes and getters / setters working now |
16:36:20 | * | SenasOzys joined #nim |
16:37:27 | FromGitter | <codenoid> is nim has sublime plugin with auto-indent feature |
16:37:47 | FromGitter | <Bennyelg> detch sublime use vs-code |
16:38:38 | zachcarter | https://github.com/Varriount/NimLime |
16:39:15 | * | cspar joined #nim |
16:40:11 | FromGitter | <codenoid> sorry, i don't use browser for coding |
16:42:37 | FromGitter | <codenoid> my computer ram is 2GB, i think vs-code not for me |
16:52:30 | FromGitter | <mratsim> ah @Bennyelg @shashlick, sorry i mixed up nimgen and cligen authors :/ |
16:55:31 | shashlick | 😉 |
16:55:45 | FromGitter | <Bennyelg> lol hehe |
16:55:48 | FromGitter | <Bennyelg> who worte cligen |
16:55:56 | FromGitter | <Bennyelg> wrote* |
17:01:01 | dom96 | ZeetNickel: You're better off defining your types as refs everywhere than boxing them IMO |
17:09:44 | FromDiscord | <ZeetNickel> But if I do that they get heap allocated no? I'm struggling with some basic concepts of Nim memory management here. |
17:09:44 | FromDiscord | <ZeetNickel> What I have is a sequence (or some other arbitrarily complex structure) of data, and then I want to refer to that data and pass it on to a proc that modifies it. I do not want a sequence of references to data that lives some other place in the heap. But maybe that isn't what it would mean to use a ref type...? |
17:12:43 | FromDiscord | <ZeetNickel> Here is a small test to illustrate my confusion: https://pastebin.com/FmauD5Cs |
17:13:31 | FromDiscord | <ZeetNickel> Second example does what I want. First example i show I would want to organize it. Third example crashes because I din't know what I'm doing |
17:15:18 | FromDiscord | <Generic> you can't just take a ref object out of a seq |
17:15:32 | FromDiscord | <Generic> `result[] = data[0]` this line is the problem |
17:15:51 | FromDiscord | <ZeetNickel> Alright, thanks |
17:16:07 | FromDiscord | <Generic> a ref object has to be allocated in a special way and then is tracked by the GC |
17:16:30 | FromDiscord | <Generic> but what you can do is using a raw pointer instead |
17:17:01 | FromDiscord | <Generic> change the return type to ptr int and use addr data[0] to get the pointer |
17:17:41 | FromDiscord | <ZeetNickel> So returning addr(data[0]), and then de-refing when passing it to the proc that modifies it? |
17:18:39 | FromDiscord | <Generic> yes, because you're taking a pointer to the address where data[0] is stored |
17:19:02 | FromDiscord | <Generic> you have to be careful that the pointer doesn't outlive the object it's coming from |
17:19:38 | FromDiscord | <Generic> the memory might be already used for something else, you probably can imagine what happens if you now read/write from/to it |
17:21:17 | FromGitter | <Bennyelg> newbie question |
17:21:25 | FromGitter | <Bennyelg> how do i initialize something like this? ⏎ var results: seq[Table[string, int]] = @[] |
17:21:38 | FromGitter | <Bennyelg> apparently it`s not enough |
17:22:09 | FromDiscord | <Generic> Bennyelg: [] creates an array and the @ operator turns it into a seq |
17:22:12 | FromDiscord | <ZeetNickel> Thanks Generic. I'm reasonably well versed in C++, I'm just struggling when trying to implement it in nim. I'm still "thinking in C++" when coding nim, so the issue might actually be that I'm trying to do things the wrong way. |
17:22:38 | FromGitter | <Bennyelg> so seq of Table |
17:22:40 | FromGitter | <Bennyelg> it's fine |
17:22:45 | FromDiscord | <Generic> ah, sorry |
17:22:48 | FromGitter | <Bennyelg> but the table need to be initialize ot |
17:22:50 | FromGitter | <Bennyelg> to* |
17:22:50 | FromDiscord | <Generic> I misread it |
17:24:08 | FromDiscord | <Generic> you initialise the tables when adding you're adding elements to the sequence |
17:24:42 | FromDiscord | <Generic> so results.add(initTable[string, int]()) or results.add({"key": 42}.toTable) |
17:24:43 | * | FromGitter quit (Remote host closed the connection) |
17:24:59 | * | FromGitter joined #nim |
17:35:20 | FromGitter | <Bennyelg> find max element in seq by key any implementation or i need to implement it ? |
17:37:29 | FromDiscord | <Generic> well the fastest way would be to just write it using a loop |
17:38:05 | FromDiscord | <Generic> the most elegant way would be to import sequtils and then write max(results.mapIt(it["key"])) |
17:44:24 | dom96 | Generic: A pointer should be considered an escape hatch in Nim |
17:44:38 | dom96 | And should only be used when absolutely necessary (FFI) |
17:46:33 | FromDiscord | <Generic> dom96: I saw them a lot in examples of the new destructor system |
17:47:07 | dom96 | Link? |
17:47:14 | FromDiscord | <Generic> https://nim-lang.org/araq/writetracking.html |
17:47:27 | FromDiscord | <Generic> also the tests of the new destructor system |
17:47:58 | Demos[m] | hmm anyone heard of pointer free programming |
17:48:00 | Demos[m] | like parasail |
17:48:18 | Demos[m] | where by avoiding pointers you construct a language where each subexpression can be evaluated in parallel |
17:48:34 | dom96 | ZeetNickel: What you should do in your case is pass the seq + an index |
17:48:45 | dom96 | and modify the item that way |
17:49:32 | dom96 | Generic: I don't see a single mention of 'ptr' there |
17:50:03 | FromDiscord | <Generic> sorry, wrong article |
17:50:54 | FromDiscord | <Generic> https://nim-lang.org/araq/destructors.html |
17:53:02 | FromDiscord | <Generic> it's also mentioned at the end of the post that it's problem atm that there's no safe way to get a mutable reference to an element of a container |
17:54:23 | FromDiscord | <Generic> and from my experience I can really say that's not a rare situation |
17:54:48 | dom96 | Indeed. Also, this is "Araq's musings". It shouldn't be misconstrued as "Use ptr for everything because this article about a feature that hasn't been implemented yet uses them" |
17:54:59 | FromDiscord | <Generic> of course |
18:09:30 | FromGitter | <Bennyelg> https://github.com/Bennyelg/csvql -> Now support auto guess for the csv delimiter. so no need to specify :D |
18:43:52 | zachcarter | Bennyelg: that library is pretty cool - but I wish it was combined with NimData |
18:44:21 | FromGitter | <Bennyelg> They are not in the same spot |
18:44:39 | zachcarter | well, let me clarify - |
18:44:54 | FromGitter | <Bennyelg> they do different things. |
18:45:54 | zachcarter | I'm using NimData in a cli tool at work. I need to read in a CSV file with an undetermined number of rows, filter out rows I don't, drop some columns from the CSV etc, and then execute an async http request for every row in the dataframe. |
18:46:31 | zachcarter | I realize that - I'm simply suggesting, it'd be nice if the interface for interacting with a dataframe was the same as in your library for interacting with a csv |
18:46:54 | zachcarter | where you could use AnsiSQL to get results from the dataframe |
18:47:32 | zachcarter | I understand your tool has its own use cases |
18:47:36 | zachcarter | apart from NimData |
18:47:37 | FromGitter | <Bennyelg> I got you, well it's doable it will make NimData sparky |
18:47:50 | FromGitter | <Bennyelg> apache-spark but without the distribution |
18:48:01 | zachcarter | ah - well unfortunately I think NimData has been abandoned |
18:48:07 | zachcarter | or is at least in hiatus mode |
18:48:19 | zachcarter | I issued a PR to fix the code for 0.18.1 - but the author hasn't responded |
18:48:51 | FromGitter | <Bennyelg> we can always fork it |
18:49:00 | zachcarter | yup! |
18:49:22 | zachcarter | lately my nights and weekends have consisted of writing macros and libraries in prepartion for building web components with Nim for a project at work |
18:51:51 | FromGitter | <Bennyelg> since I am coming from python I still don't know when I should think of writing Macro |
18:52:09 | FromGitter | <Bennyelg> it's pretty hard concept for me "interact with the AST" |
18:52:36 | zachcarter | well - for instance, Nim's JS backend compiles to like V2 of the JS spec |
18:53:03 | zachcarter | so a lot of things that are in newer iterations of ECMAScript (like Classes for instance - defined in ES2015) |
18:53:56 | FromGitter | <Bennyelg> you have some written code ? |
18:54:00 | zachcarter | so I'm using a macro which lets users declare ES2015 classes - and what the macro does is it generates a Nim type for the class, along with a new proc, and procs for getters and setters |
18:54:04 | zachcarter | yes |
18:54:04 | zachcarter | one second |
18:54:10 | FromGitter | <Bennyelg> I would like to brush my eyes a bit |
18:54:21 | * | halirc joined #nim |
18:54:31 | FromGitter | <Bennyelg> wonderful but its hard work |
18:54:33 | FromGitter | <Bennyelg> I guess |
18:56:06 | zachcarter | one sec - I got a snake to deal with in my basement - dog just freaked out and I found it |
18:56:26 | halirc | Good evening. If I want to move all the files in a directory (a few hundred files) is there a better/faster way than to use walkFiles and moveFile? |
19:00:17 | FromGitter | <Bennyelg> OMG sanke lol |
19:00:23 | FromGitter | <Bennyelg> be carful |
19:04:34 | zachcarter | was like a 4ft black or rat snake |
19:04:45 | zachcarter | whichever one starts stinking real bad when they get scared |
19:04:58 | zachcarter | he was just a lil noodle trying to hang out with us |
19:05:00 | FromGitter | <Bennyelg> so You killed it ? |
19:05:02 | zachcarter | or a big noodle I guess |
19:05:03 | zachcarter | nah |
19:05:14 | zachcarter | I grabbed him with a set of fireplace tongs and stuck him in a garbage bag |
19:05:15 | FromGitter | <Bennyelg> so what did you do |
19:05:16 | zachcarter | and let him loose outside |
19:05:17 | * | smt` joined #nim |
19:05:22 | FromGitter | <Bennyelg> lol |
19:05:35 | zachcarter | well I just threw the garbage bag outside but it wasn't tied shut |
19:05:36 | zachcarter | so he could get out |
19:05:43 | FromGitter | <Bennyelg> not a venom one |
19:05:51 | zachcarter | nah they're harmless and good for killing rodents |
19:05:56 | zachcarter | scared the crap out of me though |
19:06:01 | FromGitter | <Bennyelg> where are you from ? |
19:06:08 | zachcarter | Virginia |
19:06:25 | FromGitter | <Bennyelg> Oah My dream |
19:06:41 | zachcarter | haha |
19:07:06 | FromGitter | <Bennyelg> Im from Israel. wish to go USA soon |
19:07:15 | zachcarter | oh cool! |
19:08:00 | zachcarter | well - the US is alright - I'd go elsewhere if I could find a decent job and make a good living, but I've also been in Virginia my entire life, so it's all I really know. |
19:08:08 | dom96 | halirc: moveDir? |
19:08:13 | zachcarter | I'm not especially fond of Virginia, it's a bit backwords law-wise |
19:08:16 | zachcarter | anyway back on topic |
19:08:30 | FromGitter | <Bennyelg> yea post me samples |
19:08:37 | FromGitter | <Bennyelg> how old are ya ? 25 ? |
19:08:58 | dom96 | Speaking of the US, I'll be there in two weeks :) |
19:09:04 | dom96 | San Francisco to be exact |
19:09:10 | * | smt quit (Ping timeout: 272 seconds) |
19:09:15 | FromGitter | <Bennyelg> ? |
19:09:15 | zachcarter | @dom96: nice! |
19:09:19 | FromGitter | <Bennyelg> Apache-spark summit ? |
19:09:21 | zachcarter | Bennyelg: https://gist.github.com/zacharycarter/e499ec2015278cc42ab3ac8632569af5 |
19:09:29 | zachcarter | Bennyelg: 33 |
19:09:58 | FromGitter | <Bennyelg> I was visited in Miami , Olrando, Key west, Vegas |
19:10:03 | FromGitter | <Bennyelg> yet to come of course |
19:10:20 | zachcarter | I need to clarify with work what the legality around us posting Carfax sourecode publicly is. |
19:10:48 | zachcarter | I think this nim ecmascript library would be the first open source library carfax would have ever published |
19:10:51 | zachcarter | for public consumption |
19:11:11 | zachcarter | so right now it's living in our private SCM - until I get that clarification |
19:11:22 | halirc | dom96, thanks dom, I think moveDir does not do what I want in this case. I want to move all files from a directory into an existing dir where there are already other files. I just ran it with the walkFiles and moveFile and it's very fast, I don't notice a delay. So that should be ok. |
19:14:23 | halirc | dom96, by the way, did you have an idea about the nimble segfault in the travis build of docopt.nim? |
19:14:28 | FromGitter | <Bennyelg> @zacharycarter its looks very very complicted and very hard work |
19:14:50 | zachcarter | it's not |
19:14:51 | dom96 | halirc: nope. I need to figure out how to reproduce it. |
19:15:18 | dom96 | In case I forget, can you create an issue about it? https://github.com/nim-lang/nimble/issues |
19:15:21 | zachcarter | macros are relatively easy to write with Nim - you just need to learn how to use dumpTree and dumpAstGen |
19:15:55 | zachcarter | dumpTree lets you figure out what the incoming abstract syntax looks like when a macro is invoked |
19:16:08 | halirc | dom96, sure. Thank you! |
19:16:21 | zachcarter | and then dumpAstGen - when supplied with the code you want to create - lets you know the abstract syntax you need to create inside the macro |
19:17:01 | zachcarter | alot of the output of those two helper macros, you can copy and paste |
19:17:14 | FromGitter | <Bennyelg> @zacharycarter Yea I know, so basically you worte someting in ES and compile it into nim code ? |
19:17:17 | zachcarter | once you learn how to write macros - extending Nim to do things it currently isn't capable of - is quite easy |
19:17:42 | zachcarter | no - I just define a syntax for the user to use to define ES2015 classes |
19:17:47 | zachcarter | and then a macro proceses that |
19:17:57 | zachcarter | and creates JS for a ES2015 class using the emit pragma |
19:18:15 | FromGitter | <Bennyelg> I c so exactly the opposite |
19:18:16 | zachcarter | and creates Nim types / procedures that bind to the JS classe's functions |
19:18:33 | FromGitter | <Bennyelg> you wrote in pure nim and get JS compitable to ES2015 |
19:19:05 | zachcarter | well - the macro takes in an untyped parameter - meaning the code under the `class` block isn't going to go through any type checking - so it doesn't have to be Nim code |
19:19:22 | zachcarter | that's why I can do things like - `this.width = width` in the constructor proc |
19:19:29 | zachcarter | or the proc tagged with the constructor pragma |
19:19:31 | FromGitter | <Bennyelg> yea |
19:19:35 | zachcarter | that's not valid Nim |
19:19:36 | FromGitter | <Bennyelg> I wonder what this is |
19:20:01 | zachcarter | but the idea is - just define a constructor proc with Nim, and the parameters to the constructor become fields on the Nim type |
19:20:11 | zachcarter | and then the body underneath you write as you would in normal JS |
19:20:17 | zachcarter | and that becomes the body of the JS constructor that gets generated |
19:20:26 | FromGitter | <Bennyelg> pretty cool |
19:20:38 | zachcarter | well - we need to write this widget at work that we can embed on third party websites |
19:20:52 | zachcarter | and I dont want to use IFrames so we're going with web components |
19:21:01 | zachcarter | and thusly we need some ES constructs |
19:21:14 | FromGitter | <Bennyelg> at you work they use nim? |
19:21:26 | zachcarter | I just convinced my director / manager to let us start using it |
19:21:30 | zachcarter | a week or two ago |
19:21:40 | FromGitter | <Bennyelg> I tried to introduce nim in my work |
19:21:42 | zachcarter | we've writen a CLI tool with it - for enriching email marketing CSVs |
19:21:48 | FromGitter | <Bennyelg> but they stick to Go :/ |
19:21:55 | zachcarter | and now we're writing the frontend of this widget with Nim |
19:22:08 | zachcarter | we're using Go too - but I plan to replace Go with Nim on our project |
19:22:23 | FromGitter | <Bennyelg> I wishh |
19:22:30 | zachcarter | We have a lot of Go detractors at work - not really any Nim detractors, but Rust fanbois to deal with who have never written a line of Rust |
19:22:48 | zachcarter | it took me probably two years of evangalizing Nim at work, to get the green light. |
19:22:48 | FromGitter | <Bennyelg> lol |
19:23:27 | zachcarter | but I'm pair programming with the other guy I maintain this product with, and I'm teaching him how Nim macros work - and I'm letting him help me write this one |
19:23:36 | zachcarter | so the learning has begun! |
19:23:43 | FromGitter | <Bennyelg> Cool! |
19:23:58 | FromGitter | <Bennyelg> it will worth it evantualy |
19:24:07 | zachcarter | btw - this widget is going to be potentially embedded on thousands of websites |
19:24:18 | zachcarter | and it will be written entirely in Nim |
19:24:23 | zachcarter | at least the presentation layer |
19:24:34 | FromGitter | <Bennyelg> how's the performance ? |
19:24:50 | zachcarter | well I ported hyperHTML to Nim so we didn't need to use react |
19:25:00 | zachcarter | so we're going to use that for our dom diffing / rendering library |
19:25:29 | zachcarter | it should perform well I imagine |
19:25:43 | FromGitter | <Bennyelg> Oo, cool |
19:25:50 | zachcarter | we're staying light on / avoiding if we can all together any frameworks |
19:25:56 | zachcarter | and just using small libraries to do what we need |
19:26:22 | zachcarter | and we're writing as much pure Nim code as possible - though we will be relying on some JS libraries |
19:26:56 | FromGitter | <Bennyelg> yea Nim is not yet flawless with libraries |
19:28:26 | zachcarter | yeah - but that's where FFI comes in :) |
19:28:43 | FromGitter | <Bennyelg> yea |
19:28:44 | FromGitter | <Bennyelg> :) |
19:31:31 | zachcarter | when I showed macros to my co-worker, he was like - I had no idea programming languages could do this. |
19:31:57 | FromGitter | <Bennyelg> :D |
19:31:57 | zachcarter | I think most of the people I work with haven't really been exposed to how great metaprogramming can be. |
19:32:22 | zachcarter | especially with a language that has as many targets as Nim does |
19:32:37 | FromGitter | <Bennyelg> Agree |
19:35:21 | FromGitter | <mratsim> @Generic @ZeetNickel if you need to return a mutable reference use a var int `proc get_data_ref(data : var seq[int], index: int) : var int = data[index]` |
19:35:53 | FromGitter | <mratsim> but `[]` already exist for that |
19:36:36 | FromGitter | <tim-st> When I would use a nim created dll in another program (e.g. a webserver written in go) would this be possible regarding gc and would the performance go down much? |
19:37:16 | FromGitter | <tim-st> e.g. many requests per second would call to the dll |
19:37:18 | FromGitter | <mratsim> same perf, but you need to call NimMain or something |
19:37:49 | FromGitter | <mratsim> it’s like calling a C dll, except that you need to initialize the runtime at the beginning |
19:38:07 | FromGitter | <mratsim> then once it’s warm in your CPU cache it works like say libjpeg |
19:38:28 | FromGitter | <tim-st> ok, would I need to boot up the runtime once or once per request? |
19:39:40 | FromGitter | <tim-st> I want to bypass the async this way like having the complete backend logic in nim and just a small server in go that calls each request to nim exported proc `proc worker(input: string): string` |
19:41:39 | FromGitter | <mratsim> only when the Nim library is dlopened I think |
19:42:24 | * | kapil___ quit (Quit: Connection closed for inactivity) |
19:42:52 | FromGitter | <tim-st> hm, I saw that nims asynchttpserver has real problems with memory leaks I hope I could solve this by using a go webserver, am I overseeing some problems maybe? |
19:43:04 | FromGitter | <mratsim> you should pass and return ptr char in the FFI |
19:43:47 | FromGitter | <mratsim> make sure that either Nim manage the memory or go. Don’t mix and match within the same type. |
19:45:07 | * | kungtotte joined #nim |
19:45:10 | FromGitter | <tim-st> ok, thanks, I try to wrap my nim program and test if memory goes down |
19:45:17 | FromGitter | <tim-st> when called from go |
19:47:13 | dom96 | tim-st: The memory leaks really aren't that much of a problem |
19:47:17 | dom96 | and they will be fixed eventually |
19:47:31 | dom96 | You're better off just using Nim and not bothering integrating it into Go |
19:47:42 | FromGitter | <tim-st> dom96: you can test it here: https://github.com/tim-st/nim-zim |
19:49:22 | * | Trustable joined #nim |
19:49:48 | FromGitter | <tim-st> maybe I just need to close something, espcially when a file is sent the memory stays in ram |
19:52:50 | FromGitter | <mratsim> oh, zim, it’s been a while since I’ve used it |
19:53:18 | FromGitter | <tim-st> yeah, me too, but I need nlp resources for automated grammar learning |
19:53:56 | FromGitter | <mratsim> hopefully I get RNNs working this weekend in Arraymancer and I can add some NLP capabilities using neural networks |
19:54:09 | zachcarter | :D |
19:54:10 | FromGitter | <mratsim> but tokenizing text is a pain >_> |
19:54:11 | zachcarter | that'd be awesome |
19:54:23 | FromGitter | <mratsim> I want to be able to write a shakespear RNN |
19:54:34 | FromGitter | <tim-st> @mratsim I implement complete "understanding" of the language |
19:54:38 | FromGitter | <mratsim> or a “Haiku” RNN to produce Japanese Haikus |
19:56:33 | FromGitter | <mratsim> @tim-st you’re leaking because your ZimFile is in a global context not in a proc so it’s never garbage collected: https://github.com/tim-st/nim-zim/blob/master/zim.nim#L393. ⏎ ⏎ Add a `main()` proc |
19:57:38 | FromGitter | <tim-st> lol, if this is all that would be interesting, good idea, will try it, btw do you think `threadvar` is needed if I dont have `--threads:on`? |
19:58:28 | FromGitter | <mratsim> it’s not. threadvar is a global with one instance per thread. |
19:58:45 | FromGitter | <mratsim> in single threaded mode threadvar = global |
19:58:53 | FromGitter | <mratsim> because you only have one thread |
19:58:54 | FromGitter | <tim-st> but if I doesnt use it, it complaints that's not "gcsafe" |
19:59:01 | FromGitter | <tim-st> and doesnt compile |
20:00:13 | dom96 | mratsim: You should grab this channel's IRC logs and create an Araq RNN :D |
20:00:36 | FromGitter | <mratsim> It could start with “I know you will say consistency" |
20:00:48 | dom96 | :D |
20:01:10 | FromGitter | <mratsim> btw @tim-st I think likely and unlikely shouldn’t be used except for exceptional failures: https://github.com/tim-st/nim-zim/blob/master/zim.nim#L454 |
20:01:24 | FromGitter | <mratsim> network disconnection is happen often. |
20:02:57 | FromGitter | <tim-st> @mratsim wow I think the main procs really changes things... Now compiler doesnt complain on missing `threadvar` will check if the leaking is gone |
20:03:15 | FromGitter | <tim-st> I use likely and unlikely mainly for the code reader to "document" my code |
20:05:39 | * | smt joined #nim |
20:06:21 | FromGitter | <tim-st> it's not gone :( |
20:06:51 | FromGitter | <tim-st> goes from 20 mb to 80 in one second and stays although transfer is finished |
20:07:19 | FromGitter | <mratsim> for likely/unlikely read the following: http://blog.man7.org/2012/10/how-much-do-builtinexpect-likely-and.html |
20:07:47 | FromGitter | <tim-st> ok thanks |
20:07:56 | FromGitter | <mratsim> on the micro benchmark, code is slow down by 2x if you expect the wrong value |
20:08:13 | FromGitter | <mratsim> so unless that’s true more than 80% of the time it’s not worth it. |
20:08:52 | FromGitter | <tim-st> yes, I only use it when I expect more than 90% correctness |
20:09:14 | FromGitter | <tim-st> but maybe I'm wrong at the place where you mentioned the disconnection^^ |
20:09:15 | * | smt` quit (Ping timeout: 252 seconds) |
20:09:56 | FromGitter | <tim-st> it's interesting that the code now compiles without threadvar, I think it's nim bug, because the compiler could easily make a main proc around local vars |
20:10:01 | FromGitter | <tim-st> to get it working |
20:10:40 | FromGitter | <tim-st> ram is still at 80mb without new connection... |
20:10:50 | FromGitter | <tim-st> (I'm on windows) |
20:12:20 | FromGitter | <tim-st> now it stays at 80mb, maybe it's "reserved memory mapped" data; i will look at the advanced task manager |
20:12:23 | FromGitter | <mratsim> well I never played that much with async yet, but all async procs use the GC/closure iterator behind the scenes so |
20:12:55 | FromGitter | <mratsim> all the proc {.async.} are reserving heap memory and maybe are not deallocated. |
20:14:20 | FromGitter | <tim-st> 82/88mb is really used |
20:16:53 | FromGitter | <mratsim> well maybe it’s the async memory bug dom mentionned then |
20:18:37 | FromGitter | <tim-st> from what I read in forum and github issues it's not really known what causes the bug and where, I thought about giving every single proc inside `asyncdispatch.nim` a getOffcupiedMemory so I can findout after which call memory gets high |
20:20:30 | FromGitter | <tim-st> but maybe it's normal that a webserver stays at high memory because of cached open tcp connection or something, I will try the zim implmentatins in go and python and see if their servers also stay at high ram amount |
20:31:47 | * | martinium joined #nim |
20:47:49 | * | stefanos82 quit (Quit: Quitting for now...) |
20:52:12 | FromGitter | <tim-st> I just tried the python zim implementation with the same pdf file it stays at the same size like when I didnt click a link :\ |
21:02:46 | dom96 | The memory usage is certainly not normal |
21:03:00 | dom96 | Anything you can figure out about the cause would be very helpful |
21:03:26 | dom96 | That said, something you're doing might make it worse |
21:03:35 | dom96 | The forum doesn't go to 80MB straight away |
21:03:43 | dom96 | Only gradually over many days |
21:05:16 | FromGitter | <tim-st> ok, I'm currently trying it on archlinux |
21:17:39 | FromGitter | <tim-st> lol, the same code works different on linux... :\ |
21:22:10 | * | nsf quit (Quit: WeeChat 2.2) |
21:35:48 | * | Senketsu quit (Ping timeout: 252 seconds) |
21:36:12 | * | Trustable quit (Remote host closed the connection) |
21:36:52 | * | Senketsu joined #nim |
21:52:03 | FromGitter | <mratsim> were you on Windows or Mac before (or Haiku :P) |
21:52:11 | * | SenasOzys quit (Remote host closed the connection) |
21:52:25 | FromGitter | <tim-st> win7x64 |
21:52:55 | FromGitter | <tim-st> now on linux I always get the else branch :( |
21:54:52 | FromGitter | <mratsim> that’s “unlikely” (pun intended :P) |
21:55:34 | FromGitter | <tim-st> yes, it's really hard to debug now on vm, but at least all other code works and compilation too |
21:56:14 | FromGitter | <tim-st> I cannot test memory usage on linux because I cant open large files it always redirects to same page |
21:58:25 | * | SenasOzys joined #nim |
21:58:57 | * | SenasOzys quit (Remote host closed the connection) |
21:59:23 | * | SenasOzys joined #nim |
22:05:33 | FromGitter | <kayabaNerve> I'm not missing something here, right? |
22:05:40 | FromGitter | <kayabaNerve> https://github.com/nim-lang/Nim/issues/8922 |
22:07:02 | FromGitter | <mratsim> not a bug, working as intended |
22:07:46 | * | Senketsu quit (Remote host closed the connection) |
22:08:11 | * | Senketsu joined #nim |
22:08:56 | FromGitter | <mratsim> convention is to use CamelCase for enums like Red, Blue, AquaMarine or a prefix + camelCase like clrRed, clrBlue, clrAquaMarine |
22:09:32 | FromGitter | <kayabaNerve> @mratsim But the pure pragma is what's supposed to enable this behavior |
22:09:56 | FromGitter | <kayabaNerve> I didn't want a prefix. I wanted enum name \`.\` val. |
22:10:05 | FromGitter | <mratsim> not, pure was supposed to force prefixing |
22:10:21 | FromGitter | <mratsim> but that was removed in June |
22:10:42 | FromGitter | <kayabaNerve> You're right; misread |
22:10:49 | FromGitter | <kayabaNerve> I had the same behavior with .pure. though |
22:10:57 | FromGitter | <kayabaNerve> So it's impossible now/ |
22:11:14 | FromGitter | <mratsim> you can’t force but you can use it. |
22:11:27 | FromGitter | <mratsim> you always could |
22:11:29 | FromGitter | <kayabaNerve> But I have an object named the same as the enum value |
22:11:43 | FromGitter | <mratsim> ah. It should say ambiguous stuff then |
22:13:04 | * | Vladar quit (Remote host closed the connection) |
22:13:09 | FromGitter | <kayabaNerve> Eh. Works fine. |
22:13:15 | halirc | I just noticed that expandFilename works differently on windows and linux. On windows it can be used to get the absolute path of a non existing file, on linux it raises an error in that case. |
22:13:20 | FromGitter | <kayabaNerve> I need to prefix the enum but I don't need to prefix when I use var x: type |
22:14:39 | halirc | I used it to get rid of '/../' in paths for example, thats why I call it on files or paths that do not exist. |
22:17:55 | FromGitter | <mratsim> @halirc, probably relevant: https://irclogs.nim-lang.org/06-09-2018.html#14:17:36 but yeah raise a bug. |
22:23:21 | halirc | mratsim, looks like I'm just using the wrong proc for the job? There seems to be an os.absolutePath that does what I'm looking for https://github.com/nim-lang/Nim/issues/8174 |
22:24:21 | halirc | I don't see that one in the documentation of the os module though. Perhaps it is not yet in the 0.18.0 release |
22:25:30 | * | SenasOzys quit (Read error: Connection reset by peer) |
22:28:15 | FromGitter | <mratsim> it’s from July 5 |
22:39:19 | * | cspar quit (Ping timeout: 244 seconds) |
22:45:00 | FromGitter | <mratsim> also relevant: https://github.com/nim-lang/Nim/issues/8780 |
22:45:43 | * | seni joined #nim |
22:46:54 | FromGitter | <tim-st> streams.nim should work the very same on windows and linux? |
22:50:49 | halirc | mratsim, thanks, I'll make a workaround for now for my project |
22:50:56 | * | halirc quit (Quit: Leaving) |
22:51:50 | FromGitter | <tim-st> I think I have a bug regarding big endian / little endian, streams doesnt work out of the box the same on windows and linux |
22:55:10 | FromGitter | <mratsim> I used them on both and didn’t see an issue in my CI |
22:58:25 | FromGitter | <tim-st> I cannot imagine another bug, it seems only compressed data works fine and raw data doesnt, I think the pointer is read from stream different on windows and linux will test tomorrow |
22:59:01 | FromGitter | <tim-st> (pointer is here just an integer using s.readInt64) |
23:00:22 | FromGitter | <mratsim> FileStream and GzStream work exactly the same |
23:00:39 | FromGitter | <tim-st> I have lzma stream |
23:00:45 | FromGitter | <tim-st> and FileStream |
23:00:45 | FromGitter | <mratsim> if it’s coming from a socket/network I suppose it’s always big endian as well |
23:01:10 | FromGitter | <mratsim> didn’t try a lzma stream |
23:01:14 | FromGitter | <tim-st> ok, then I will do tests without network first |
23:01:37 | FromGitter | <tim-st> lzma works, the lib is very strict on erros and I see all html in browser |
23:01:46 | FromGitter | <tim-st> just the files dont work, they arent compressed |
23:02:42 | FromGitter | <mratsim> https://github.com/mratsim/Arraymancer/blob/master/src/io/io_npy.nim#L167 ⏎ ⏎ ^ no issue here, CI on Linux, Mac, Windows |
23:03:27 | FromGitter | <tim-st> this is writeMode |
23:03:34 | FromGitter | <mratsim> sorry the read is here: https://github.com/mratsim/Arraymancer/blob/master/src/io/io_npy.nim#L80 |
23:04:32 | FromGitter | <tim-st> oh: stream.readUInt16LE.int |
23:04:42 | FromGitter | <tim-st> maybe I need something like this too |
23:04:50 | FromGitter | <tim-st> :\ |
23:04:55 | FromGitter | <tim-st> thanks |
23:05:48 | * | cspar joined #nim |
23:05:50 | FromGitter | <mratsim> they are defined here: https://github.com/mratsim/Arraymancer/blob/master/src/io/io_stream_readers.nim |
23:06:24 | FromGitter | <tim-st> so you have your own procs for this not directly from stdlib? |
23:06:48 | FromGitter | <tim-st> ah I see: https://nim-lang.org/docs/endians.html |
23:07:14 | FromGitter | <mratsim> endianness is defined in a schema in the file I’m reading and it can be a lot fo thing: https://github.com/mratsim/Arraymancer/blob/master/src/io/io_npy.nim#L23-L36 |
23:07:43 | * | abm quit (Read error: Connection reset by peer) |
23:07:56 | FromGitter | <mratsim> The spec is there for reference: https://docs.scipy.org/doc/numpy-1.14.0/neps/npy-format.html#format-specification-version-1-0 |
23:08:20 | FromGitter | <tim-st> ok, thanks, that's a good point, I imagine that endianess thing can fix it |
23:09:20 | FromGitter | <tim-st> "all types are little-endian" it says |
23:09:59 | FromGitter | <tim-st> so I just need appropriate littleEndian16|32|64 proc around? |
23:10:35 | FromGitter | <mratsim> yes probably |
23:10:43 | FromGitter | <tim-st> ok, thanks! |
23:11:15 | FromGitter | <mratsim> to give you some convention: consumer computers are little-endian. |
23:11:22 | FromGitter | <mratsim> networking is big endian |
23:11:54 | FromGitter | <tim-st> does it mean I have to convert once again :O |
23:12:00 | FromGitter | <tim-st> on windows everything worked |
23:12:06 | FromGitter | <mratsim> and then for compression, it should be defined in the spec |
23:12:31 | FromGitter | <mratsim> maybe the LZMA reader doesn’t work |
23:12:56 | * | xet7 quit (Quit: Leaving) |
23:12:58 | FromGitter | <tim-st> lzma works for sure |
23:13:00 | FromGitter | <mratsim> compress a file on linux, read the stream, compare with windows |
23:13:16 | FromGitter | <mratsim> anyway, going to sleep. Good luck |
23:13:25 | FromGitter | <tim-st> I will try tomorrow, thanks for the help |
23:13:36 | FromGitter | <mratsim> something helpful is to dump the hex |
23:13:42 | FromGitter | <kayabaNerve> Endians suck |
23:13:47 | FromGitter | <tim-st> ^^ |
23:14:08 | FromGitter | <mratsim> feel free to use byteutils: https://github.com/status-im/nim-byteutils/blob/master/byteutils.nim#L103 |
23:14:20 | FromGitter | <kayabaNerve> Why did you link the file over the package? |
23:14:23 | FromGitter | <tim-st> thanks |
23:14:37 | FromGitter | <mratsim> debugging endianness in cryptography was a super pain, and I failed back in February :P |
23:15:12 | FromGitter | <tim-st> I didnt even knew that I have to recognize this in nim :\ |
23:15:14 | FromGitter | <kayabaNerve> @mratsim Flip it. Parse both. Use whichever works. |
23:15:25 | FromGitter | <mratsim> tough luck on a 1GB file ;) |
23:18:12 | * | SenasOzys joined #nim |
23:19:49 | * | SenasOzys quit (Remote host closed the connection) |
23:21:22 | FromGitter | <kayabaNerve> @mratsim Upgrade your CPU n00b |
23:21:23 | * | SenasOzys joined #nim |
23:24:09 | FromGitter | <mratsim> look at this bad boy |
23:24:16 | FromGitter | <mratsim> (https://files.gitter.im/nim-lang/Nim/r4cH/2018-09-07_15-48-11.png) |
23:25:27 | FromGitter | <kayabaNerve> The i9 sucks |
23:26:09 | FromGitter | <mratsim> Well I also prefer threadripper but that was the only water cooled build with 4x RTX2080ti I could find on the web |
23:26:43 | dom96 | This is pre-built, no? |
23:26:54 | FromGitter | <mratsim> well, not technically true, there is this monster as well: https://www.nvidia.com/en-us/data-center/dgx-station/ |
23:27:03 | * | dom96 wonders if you're actually buying an £11k PC 0_0 |
23:27:22 | FromGitter | <mratsim> @dom96 you can build it yourself: https://www.scan.co.uk/3xs/enterprise/deep-learning/training |
23:28:17 | FromGitter | <mratsim> but over €10k with watercooling and all the weird failure mode that can take away all GPUs :/ no I won’t :P |
23:28:32 | FromGitter | <mratsim> but I had good dreams :P |
23:30:08 | FromGitter | <Aaron-JM> Damnnn |
23:31:41 | FromGitter | <mratsim> @dom96, look at what some Kagglers are using for competitions: https://arxiv.org/abs/1809.00778 ⏎ ⏎ > 2nd Place Solution to Open Images Challenge 2018 Object Detection ⏎ > Our system enables training with huge datasets using 512 GPUs [https://gitter.im/nim-lang/Nim?at=5b945bddcddb292dff459cd7] |
23:32:31 | dom96 | People have too much money :P |
23:33:17 | FromGitter | <mratsim> Or they were mining :P |
23:34:30 | FromGitter | <bung87> `TimeInterval` how to make sure only one field is filled? |
23:37:02 | FromGitter | <bung87> I want do something like `every 3.hours` |
23:37:24 | FromGitter | <mratsim> I think you should use the new Duration (but it’s only on devel) |
23:40:48 | * | cspar quit (Ping timeout: 244 seconds) |
23:41:20 | FromGitter | <bung87> ah It haven't documented yet |
23:46:10 | FromGitter | <bung87> also `proc minutes*(dur: Duration)` accept Duration not like TimeInterval |