00:09:28 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
00:23:01 | * | CodeVance joined #nim |
00:28:31 | * | jrbrt quit (Quit: jrbrt) |
00:30:51 | * | NimBot joined #nim |
00:48:33 | * | CodeVance left #nim ("Leaving") |
01:19:15 | * | sz0 joined #nim |
01:44:33 | * | vivus quit (Quit: Leaving) |
01:47:53 | * | CodeVance joined #nim |
02:01:11 | * | CodeVance_ joined #nim |
02:02:25 | * | CodeVance quit (Read error: Connection reset by peer) |
02:10:05 | * | xkapastel joined #nim |
02:36:35 | * | brainpro1 quit (Ping timeout: 240 seconds) |
02:37:36 | * | arecaceae quit (Read error: Connection reset by peer) |
02:38:00 | * | arecaceae joined #nim |
02:41:27 | * | brainpro1 joined #nim |
02:45:57 | * | brainpro1 quit (Ping timeout: 240 seconds) |
03:09:39 | * | rauss quit (Quit: WeeChat 2.1) |
03:10:35 | * | rauss joined #nim |
03:53:27 | * | brainpro1 joined #nim |
03:59:57 | * | dddddd quit (Remote host closed the connection) |
04:06:20 | FromGitter | <zacharycarter> dom96: I guess we both made libsass wrappers :/ |
04:11:09 | * | CodeVance_ left #nim ("Leaving") |
04:35:09 | * | brainpro1 quit (Ping timeout: 264 seconds) |
04:40:29 | * | darithorn quit (Quit: Leaving) |
04:41:21 | * | miran joined #nim |
05:09:34 | * | brainpro1 joined #nim |
05:14:27 | * | brainpro1 quit (Ping timeout: 255 seconds) |
05:33:50 | FromGitter | <CodeVance> I need to run nim with clang... but how to install... |
05:48:15 | * | brainpro1 joined #nim |
06:01:33 | * | brainpro1 quit (Ping timeout: 264 seconds) |
06:05:29 | * | yglukhov_ quit (Ping timeout: 246 seconds) |
06:25:30 | FromDiscord | <2vg> clang install ? |
06:35:34 | * | brainpro1 joined #nim |
06:40:29 | * | brainpro1 quit (Ping timeout: 246 seconds) |
07:14:18 | * | brainpro1 joined #nim |
07:19:27 | * | brainpro1 quit (Ping timeout: 240 seconds) |
07:19:38 | * | skrylar joined #nim |
07:20:03 | skrylar | well, added support for also writing protobufs and recursion. can reuse parts of the macros to fix up flatbuffer writing also |
07:21:09 | skrylar | mildly interesting note: you have to pre-calculate the size of a protobuf so you can write an encoded integer of its size. flat buffers seem not to care, you just have to dump them in to memory and go back and write a fixed int. so. haven't benched to see the tradeoffs with that. |
07:54:36 | * | skrylar quit (Remote host closed the connection) |
08:03:15 | FromGitter | <narimiran> @mratsim do you maybe know what is the situation with numpy <-> nim? https://www.reddit.com/r/Python/comments/8imw2z/python_vs_numpy_vs_nim/dyu6sgt/ |
08:04:05 | * | gmpreussner quit (Ping timeout: 256 seconds) |
08:05:22 | * | gmpreussner joined #nim |
08:06:40 | FromGitter | <dom96> @zacharycarter yeah. Please be sure to add your packages to nimble. I searched there and didn't see your package so I created one, only notice the existence of your package once I was mostly done :( |
08:06:47 | FromGitter | <dom96> *noticed |
08:18:34 | FromGitter | <mratsim> @narimiran I replied |
08:18:58 | FromGitter | <xmonader> @dom96 i keep getting ``` ⏎ {"data": [{"Field0": 0, "Field1": null, "Field2": null}, {"Field0": 0, "Field1": null, "Field2": null}, {"Field0": 33193760206252338, "Field1": "id*", "Field2": "9"}, {"Field0": 0, "Field1": null, "Field2": null}, {"Field0": 0, "Field1": null, "Field2": null}, {"Field0": 0, "Field1": null, "Field2": null}, {"Field0": 0, "Field1": null, "Field2": null}, {"Field0": 0, "Field1": null, |
08:18:58 | FromGitter | ... "Field2": null}], "counter": 1} ⏎ ⏎ ```for serializing ``` ⏎ var respJson = $$({"id": $id}.toTable())``` [https://gitter.im/nim-lang/Nim?at=5af6a3722df44c2d062032ce] |
08:28:50 | * | nsf joined #nim |
08:29:51 | FromGitter | <dom96> Okay? That's not wrong. |
08:31:32 | FromGitter | <xmonader> @dom96 How is it not wrong? |
08:31:53 | FromGitter | <xmonader> I'm expecting to see data in the table {"id": id} serialized into a string |
08:32:27 | * | miran quit (Ping timeout: 240 seconds) |
08:32:52 | FromGitter | <dom96> Because it's the marshal module you're using. It can use whatever format it wants, as long as you can deserialise it. |
08:33:10 | FromGitter | <dom96> Use the JSON module instead. |
08:33:48 | FromGitter | <xmonader> @dom96 i tried using the json module and couldn't figure out how to serialize it |
08:33:57 | FromGitter | <xmonader> clearly $(%* didn't work |
08:34:18 | FromGitter | <xmonader> https://gitter.im/nim-lang/Nim?at=5af5ed69e1cf621dba11a881 check please |
08:34:26 | * | yglukhov joined #nim |
08:35:18 | FromGitter | <dom96> Ahh yes. Unfortunately there is a PR to fix this that's still not merged. |
08:35:32 | FromGitter | <dom96> You can copy the code from it to get the functionality though. |
08:35:40 | * | yglukhov quit (Read error: Connection reset by peer) |
08:36:15 | * | yglukhov joined #nim |
08:36:31 | FromGitter | <xmonader> i'm curious how did u do the json responses in the nim forum? |
08:36:57 | FromGitter | <xmonader> @dom96 can you link me the the PR? |
08:41:35 | FromGitter | <dom96> Or you could just get rid of the `toTable` in this instance. |
08:44:34 | FromGitter | <xmonader> @dom96 u mean like this? ⏎ ⏎ ``` var respJson = $(%*({"id": $id})) ⏎ echo "RESP JSON: ", respJson``` [https://gitter.im/nim-lang/Nim?at=5af6a971e0b50c2d05b798db] |
08:46:00 | FromGitter | <xmonader> also if i do it like this ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5af6a9c85e8e2175e25cfc61] |
09:03:44 | * | brainpro1 joined #nim |
09:04:26 | FromGitter | <tim-st> does someone knows if there is a better way to treat int32 as unsigned int (e.g. -5 should be the same as +5) besides doing if x < 0: x = abs(x)? all my values are >= 0 and I want to save a bool information on the least significant bit so I can use unsigned int |
09:04:54 | FromGitter | <tim-st> *cant |
09:05:49 | dom96 | xmonader: remove the parenthesis: %*{"id": $5} |
09:05:56 | dom96 | Seems like a bug, report it. |
09:06:35 | dom96 | tim-st: You can just call abs(x), you don't need that if |
09:07:09 | FromGitter | <tim-st> @dom96 yes, I would do it in worst case, I just thought there would some bit hacking way that is better than abs proc |
09:07:39 | FromGitter | <xmonader> @dom96 it works thank you i'll report a bug |
09:07:59 | FromGitter | <tim-st> @dom96 well I need the if check to find out if the lsb is set |
09:08:25 | FromGitter | <tim-st> this is the bit where I store the information and thus save the additonal 8bit bool |
09:08:53 | FromGitter | <tim-st> this saves 32k*8bit |
09:09:20 | * | Vladar joined #nim |
09:12:37 | FromGitter | <tim-st> Maybe `x & 31 == x ` does it |
09:12:58 | FromGitter | <mratsim> @tim-st castint32 (cast[uint32]((-5’i32).not + 1’u32)). |
09:13:14 | FromGitter | <tim-st> @mratsim that looks promising, thanks! |
09:13:35 | FromGitter | <mratsim> edited, Gitter ate my brackets |
09:13:55 | FromGitter | <tim-st> but I dont need a uint cast |
09:14:13 | FromGitter | <mratsim> basically negative number are two complement ie. positive = not(negative) + 1 |
09:14:15 | FromGitter | <tim-st> my value is always >= 0 and always in range int32 (2**31) |
09:14:44 | FromGitter | <tim-st> that means always the lsb is the same, and because of this I want to use it as a bool flag |
09:14:52 | FromGitter | <mratsim> feel free to check the code I use here for signed arithmetic implemented from scratch in terms of unsigned int: https://github.com/status-im/nim-stint |
09:15:09 | FromGitter | <mratsim> don’t you mean the msb? |
09:15:28 | FromGitter | <mratsim> https://github.com/status-im/nim-stint/blob/master/stint/private/bithacks.nim#L28 |
09:15:33 | FromGitter | <tim-st> hm, possible^^ I mean the bit responsible for minus or plus |
09:15:56 | FromGitter | <mratsim> that won’t work, what you are describing is not how it’s implemented in hardware |
09:16:30 | FromGitter | <tim-st> hm, ok, do you have an idea how this could work? |
09:16:31 | FromGitter | <mratsim> assuming a 4 bit integer, 1 is 0001, -1 is 1110. |
09:16:58 | FromGitter | <mratsim> 2 is 0010 -2 is 1101 |
09:17:09 | FromGitter | <mratsim> (in big endian) |
09:17:44 | * | SenasOzys quit (Ping timeout: 260 seconds) |
09:17:50 | FromGitter | <tim-st> but using my way to explicitly check if val >= 0 else abs(val) does work |
09:18:01 | FromGitter | <tim-st> so I can store the information |
09:18:03 | FromGitter | <mratsim> ah you can just check the msb for that |
09:18:06 | FromGitter | <mratsim> indeed |
09:18:09 | FromGitter | <tim-st> yes |
09:18:21 | FromGitter | <mratsim> if 2^31 is indeed the max |
09:18:23 | FromGitter | <tim-st> but I'm not a bit hacker :( |
09:18:44 | FromGitter | <mratsim> https://github.com/status-im/nim-stint/blob/master/stint/private/int_comparison.nim#L22 |
09:18:53 | FromGitter | <mratsim> https://github.com/status-im/nim-stint/blob/master/stint/private/bithacks.nim#L28 |
09:19:05 | FromGitter | <mratsim> result = T(castUint (n) shr msb_pos) |
09:19:21 | FromGitter | <mratsim> for int32 only that’s 4 line of code ;) |
09:19:40 | FromGitter | <mratsim> let me wrap something for you |
09:19:41 | FromGitter | <tim-st> perfect, thank you very much, exactly what I needed |
09:21:17 | FromGitter | <mratsim> ```func isNegative(n: int32): bool = ⏎ result = bool(cast[uint32](n) shr 31)``` [https://gitter.im/nim-lang/Nim?at=5af6b20c9ad18967b9dcd8a2] |
09:21:51 | FromGitter | <mratsim> 2 lines! |
09:21:51 | * | salewski joined #nim |
09:22:31 | FromGitter | <tim-st> thank you! and for the other task to now handle the value as abs I should use `abs` proc? |
09:23:01 | salewski | tim-st, replace if val >= 0 else abs(val) |
09:23:19 | FromGitter | <mratsim> if you stay in int32 land use abs, GCC now how to optimize it |
09:23:24 | FromGitter | <mratsim> just abs(val) is enough |
09:23:44 | salewski | sorry, replace abs() by just -x |
09:24:01 | FromGitter | <mratsim> if you stay in uint land if val.isNegative: not(val) + 1 else: val |
09:24:04 | FromGitter | <tim-st> @mratsim thanks! |
09:24:19 | salewski | or use only abs() if possible. That prevent branching. |
09:25:06 | FromGitter | <tim-st> salweski: I need to know 1) is x.int32 < 0 and 2) abs(x.int32) |
09:25:08 | FromGitter | <mratsim> abs() is branching internally ;) but the compiler should optimize it the best (and hardware can deal with that just fine) |
09:25:58 | FromGitter | <mratsim> also not that if you check if it’s negative and use abs just after, a proper compiler will only do one comparison. |
09:26:02 | FromGitter | <mratsim> note* |
09:26:13 | * | nsf quit (Quit: WeeChat 2.1) |
09:26:17 | FromGitter | <tim-st> ah, cool, good to know |
09:26:48 | salewski | mratsin, abs() gives really fast code with gcc -O3, I recently checked at godbolt.org |
09:27:09 | salewski | I did not see a real branch. |
09:27:17 | FromGitter | <tim-st> one other question regarding gcc and nim: |
09:28:37 | FromGitter | <tim-st> if I want gcc to use gperf algo 100% should I just copy my pair in a const array in nim and compare linear? Maybe if I put in a `Table` or a `case` gcc cannot understand that it can build a minimal perfect hash function using gperf |
09:28:51 | FromGitter | <tim-st> *pairs (~32k) |
09:28:55 | FromGitter | <mratsim> @salewski, apparently abs is done without branching with: (x XOR y) - y |
09:29:58 | salewski | See https://forum.nim-lang.org/t/3784 |
09:30:10 | FromGitter | <mratsim> not to sure what y is but oh well |
09:30:14 | salewski | Bye. |
09:31:45 | * | Cthalupa quit (Ping timeout: 248 seconds) |
09:31:54 | * | salewski quit (Quit: WeeChat 2.0.1) |
09:32:07 | * | yglukhov quit (Remote host closed the connection) |
09:33:03 | * | Cthalupa joined #nim |
09:33:52 | FromGitter | <mratsim> one thing I still don’t understand is why can’t you just use normal int32 instead of having to check bits? |
09:34:27 | * | brainpro1 quit (Ping timeout: 240 seconds) |
09:34:47 | FromGitter | <mratsim> doing result.wasNeg = val < 0 is plain simpler @tim-st |
09:35:20 | FromGitter | <tim-st> yes, that was my first idea^^, I thought I can solve it in one step |
09:36:29 | FromGitter | <mratsim> working on individual bits is slower than working on machine words (int32 for 32-bit or int64 for 64-bit). |
09:37:30 | FromGitter | <mratsim> if you check the assembly produced for int8 or int16 for example, you will see a lot of movZBL instead of mov —> that’s moving a small integer and zero-extending it so that it matches the register size (32/64 bit). |
09:38:21 | FromGitter | <tim-st> I already thought this, but would you prefer saving const 32k * int64, if you can save it in 32k* int8 ? |
09:38:33 | FromGitter | <mratsim> This is assuming all your data fits in the CPU L1 cache. |
09:38:58 | FromGitter | <tim-st> ok |
09:39:40 | FromGitter | <mratsim> if you have 32k items it might be faster indeed.But the only way to know is benchmarking. |
09:40:12 | FromGitter | <tim-st> I remember that Araq told binary size is very important^^ |
09:40:17 | FromGitter | <mratsim> For example for my go playing bot, simulating millions of move per second, using int32 indexes is faster than int16 indexes: https://github.com/mratsim/golem-prime/blob/master/src/datatypes.nim#L12 |
09:40:58 | FromGitter | <tim-st> interesting, thanks! I will declare an alias type for the int and then test it for different alias int sizes |
09:41:20 | FromGitter | <mratsim> for my prime generator, bit packing (8 bool in one byte) made it more than 10x faster because I could fit more in cache: https://github.com/numforge/number-theory/blob/master/src/primes.nim#L6-L15 |
09:42:04 | FromGitter | <mratsim> yeah type alias is a good way to easily switch for perf testing |
09:43:06 | FromGitter | <tim-st> Is there any downside if my tuple type is not mod 64bit like 48bit or is that packed efficiently next to next? |
09:44:37 | FromGitter | <mratsim> Nim and C compiler are aligning depending on the type I think, so if it’s a int64 it will be starting on a mod 64 address boundary |
09:44:49 | FromGitter | <mratsim> if it’s int16 it will be on a mod 16 |
09:45:16 | FromGitter | <tim-st> I have (uint16, uint8, int8) |
09:45:16 | FromGitter | <mratsim> otherwise just use an object with the {.packed.} pragma. |
09:45:27 | FromGitter | <mratsim> that will be ok. |
09:45:30 | FromGitter | <tim-st> and (int32, int16) |
09:46:16 | FromGitter | <mratsim> !eval var a = (0’i16, 0’i8, 0’i8); echo a.sizeof |
09:46:18 | NimBot | Compile failed: in.nim(1, 11) Error: invalid token: ⠨\226) |
09:46:52 | FromGitter | <tim-st> !eval var a = (0i16, 0i8, 0i8); echo a.sizeof |
09:46:54 | NimBot | 4 |
09:47:22 | FromGitter | <mratsim> var a = (0'i32, 0'i16); echo a.sizeof |
09:47:38 | FromGitter | <mratsim> !eval var a = (0'i16, 0'i8, 0'i8); echo a.sizeof |
09:47:41 | NimBot | 4 |
09:47:47 | FromGitter | <tim-st> but it was unsigned not signed |
09:47:59 | FromGitter | <tim-st> maybe doesnt matter^^ |
09:48:19 | FromGitter | <mratsim> !eval var a = ((0’u32, 0’u16),(0’u16, 0’u8, 0’u8)); echo a.sizeof |
09:48:20 | NimBot | Compile failed: in.nim(1, 12) Error: invalid token: ⠨\226) |
09:48:38 | FromGitter | <mratsim> !eval var a = ((0'u32, 0'u16),(0'u16, 0'u8, 0'u8)); echo a.sizeof |
09:48:41 | NimBot | 12 |
09:48:49 | FromGitter | <mratsim> I wonder why I produce invalid quote |
09:48:58 | FromGitter | <mratsim> mmm strange there is padding here |
09:49:23 | FromGitter | <mratsim> anyway, you know how to check now ;) |
09:49:23 | FromGitter | <tim-st> isnt 12 too large? |
09:49:30 | FromGitter | <tim-st> yes, thank you! |
09:50:01 | FromGitter | <mratsim> yes, it can be 8 if packed, but the compiler is aligning the second tuple I think |
09:50:31 | FromGitter | <mratsim> 10* not 8 |
09:50:34 | FromGitter | <tim-st> ok, thanks for your help :) |
09:51:08 | FromGitter | <mratsim> you’re welcome. |
10:09:57 | * | rauss quit (Ping timeout: 240 seconds) |
10:19:25 | * | xkapastel quit (Quit: Connection closed for inactivity) |
10:20:10 | FromGitter | <xmonader> @dom96 I created an issue https://github.com/nim-lang/Nim/issues/7817 |
10:28:09 | * | sz0 quit (Quit: Connection closed for inactivity) |
10:28:38 | * | brainpro1 joined #nim |
10:33:14 | * | brainpro1 quit (Ping timeout: 246 seconds) |
10:51:44 | * | CodeVance joined #nim |
10:55:22 | * | SenasOzys joined #nim |
11:04:15 | * | yglukhov joined #nim |
11:04:18 | * | CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
11:09:38 | * | CodeVance joined #nim |
11:10:56 | * | jjido joined #nim |
11:13:50 | * | CodeVance left #nim (#nim) |
11:14:56 | * | brainpro1 joined #nim |
11:19:27 | * | brainpro1 quit (Ping timeout: 240 seconds) |
11:24:14 | * | derlafff quit (Remote host closed the connection) |
11:24:30 | * | derlafff joined #nim |
11:26:56 | * | Snircle joined #nim |
11:27:06 | * | dddddd joined #nim |
11:28:05 | * | sz0 joined #nim |
11:31:23 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
11:35:08 | federico3 | a little help with this? https://ci.appveyor.com/project/FedericoCeratto/nim-lmdb |
11:35:33 | federico3 | similar appveyor confs seem to work fine - I'm not sure why there an architecture mismatch here |
11:44:53 | FromGitter | <xmonader> Day 7 https://xmonader.github.io/nimdays/day7_shorturl.html#cid20 |
11:44:56 | FromGitter | <tim-st> federico3: maybe this? https://github.com/nim-lang/Nim/issues/4460 |
11:46:54 | federico3 | if someone more familiar with appveyor could check/update https://github.com/nim-lang/Nim/wiki/BuildServices#appveyor it would help |
11:47:17 | FromGitter | <data-man> @federico3: Why in your appveyor.yml ```set path = ...;C:\mingw-w64\i686-5.3.0-posix-dwarf-rt_v4-rev0;...``` i686? |
11:47:48 | federico3 | I tried using other appveyor confs on github as examples |
11:50:13 | * | brainpro1 joined #nim |
11:55:32 | * | yglukhov quit (Remote host closed the connection) |
11:58:25 | * | brainpro1 quit (Ping timeout: 248 seconds) |
11:59:59 | * | yglukhov joined #nim |
12:05:33 | * | cspar joined #nim |
12:25:27 | * | brainpro1 joined #nim |
12:30:56 | * | CodeVance joined #nim |
12:31:34 | FromGitter | <mratsim> THis looks fun: https://github.com/olistic/warriorjs |
12:33:05 | * | CodeVance_ joined #nim |
12:33:36 | * | CodeVance_ quit (Read error: Connection reset by peer) |
12:37:45 | * | yglukhov quit (Remote host closed the connection) |
12:41:22 | * | miran joined #nim |
12:44:57 | * | CodeVance quit (Ping timeout: 240 seconds) |
12:45:46 | * | CodeVance joined #nim |
12:54:57 | * | CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
12:54:57 | * | girvo quit (Ping timeout: 240 seconds) |
12:55:54 | * | CodeVance joined #nim |
12:55:59 | * | girvo joined #nim |
13:04:35 | * | CodeVance quit (Read error: Connection reset by peer) |
13:04:49 | * | CodeVance joined #nim |
13:17:09 | * | cspar quit (Ping timeout: 264 seconds) |
13:21:48 | * | Abnegation quit (*.net *.split) |
13:23:08 | * | nsf joined #nim |
13:25:05 | * | unclechu quit (Ping timeout: 246 seconds) |
13:25:22 | * | zielmicha[m]1 quit (Ping timeout: 240 seconds) |
13:25:22 | * | stisa quit (Ping timeout: 240 seconds) |
13:25:26 | * | hohlerde quit (Ping timeout: 246 seconds) |
13:25:26 | * | metaden92[m] quit (Ping timeout: 246 seconds) |
13:25:26 | * | TheManiac quit (Ping timeout: 246 seconds) |
13:25:27 | * | mgdelacroix[m] quit (Ping timeout: 246 seconds) |
13:25:33 | * | notdekka[m] quit (Ping timeout: 250 seconds) |
13:25:34 | * | solitudesf quit (Ping timeout: 250 seconds) |
13:25:39 | * | amp907[m] quit (Ping timeout: 255 seconds) |
13:25:39 | * | narimiran[m] quit (Ping timeout: 255 seconds) |
13:25:43 | * | petersjt014[m] quit (Ping timeout: 256 seconds) |
13:25:43 | * | endes[m] quit (Ping timeout: 256 seconds) |
13:25:51 | * | planetis[m] quit (Ping timeout: 255 seconds) |
13:25:51 | * | libman[m] quit (Ping timeout: 255 seconds) |
13:25:58 | * | Miguelngel[m] quit (Ping timeout: 250 seconds) |
13:26:05 | * | byteflame quit (Ping timeout: 255 seconds) |
13:26:07 | * | Demos[m] quit (Ping timeout: 260 seconds) |
13:26:08 | * | macsek1911[m] quit (Ping timeout: 246 seconds) |
13:26:09 | * | pqflx3[m] quit (Ping timeout: 256 seconds) |
13:26:09 | * | dyce[m] quit (Ping timeout: 256 seconds) |
13:28:09 | * | sz0 quit (Quit: Connection closed for inactivity) |
13:28:57 | * | CodeVance quit (Ping timeout: 240 seconds) |
13:31:08 | * | CodeVance joined #nim |
13:32:36 | * | skrzyp quit (Ping timeout: 255 seconds) |
13:33:46 | * | skrzyp joined #nim |
13:41:16 | Yardanico | CodeVance, wow, YAAIC :) |
13:42:18 | * | pqflx3[m] joined #nim |
13:43:19 | FromGitter | <CodeVance> gitter through irc |
13:43:21 | FromGitter | <CodeVance> :P |
13:43:46 | * | CodeVance quit (Quit: Yaaic - Yet another Android IRC client - http://www.yaaic.org) |
13:44:04 | FromGitter | <CodeVance> http://irc.gitter.im |
13:44:13 | * | CodeVance_ joined #nim |
13:46:46 | Yardanico | CodeVance_, btw, there's a relatively good IRC client for android - Revolution IRC (it's in beta, but it's available on google play) |
13:47:22 | CodeVance_ | Yardanico, my android is very old (Why you think I use yaairc? |
13:47:37 | Yardanico | CodeVance_, Revolution IRC doesn't work for you? |
13:48:50 | CodeVance_ | probably won't |
13:49:01 | CodeVance_ | I mean... play store doesn't even work :| |
13:49:23 | CodeVance_ | its on fdroid at least |
13:50:11 | CodeVance_ | nope fdroid says incompatible XD |
13:50:26 | CodeVance_ | anyway #nim-offtopic |
13:51:22 | * | cspar joined #nim |
13:56:46 | * | solitudesf joined #nim |
13:56:47 | * | Abnegation joined #nim |
13:56:47 | * | dyce[m] joined #nim |
13:56:47 | * | unclechu joined #nim |
13:56:47 | * | mgdelacroix[m] joined #nim |
13:56:47 | * | Miguelngel[m] joined #nim |
13:56:48 | * | Demos[m] joined #nim |
13:56:53 | * | narimiran[m] joined #nim |
13:56:53 | * | macsek1911[m] joined #nim |
13:56:53 | * | endes[m] joined #nim |
13:56:53 | * | TheManiac joined #nim |
13:56:53 | * | stisa joined #nim |
13:56:54 | * | notdekka[m] joined #nim |
13:56:54 | * | zielmicha[m]1 joined #nim |
13:56:54 | * | metaden92[m] joined #nim |
13:56:54 | * | planetis[m] joined #nim |
13:56:54 | * | libman[m] joined #nim |
13:56:54 | * | petersjt014[m] joined #nim |
13:56:55 | * | amp907[m] joined #nim |
13:56:55 | * | byteflame joined #nim |
13:56:55 | * | hohlerde joined #nim |
13:58:12 | Yardanico | why matrix irc bridge stops from time to time? |
14:01:17 | * | xkapastel joined #nim |
14:01:19 | CodeVance_ | xmonader published the next nim-day |
14:02:28 | Yardanico | CodeVance_, I saw it |
14:02:47 | Yardanico | for anyone who didn't see it -> https://xmonader.github.io/nimdays/ |
14:04:36 | Yardanico | but the code there isn't the best in some places (that's ok because afaik author is relatively new in nim) |
14:05:19 | miran | Yardanico: you can post an issue in his repo. |
14:05:24 | Yardanico | miran, oh :) |
14:05:39 | miran | i've learned a lot by writing a bad code and then someone correcting me :) |
14:05:58 | miran | if they didn't, i would probably still write code like that |
14:07:04 | * | PMunch joined #nim |
14:11:36 | * | CodeVance joined #nim |
14:12:10 | * | cspar quit (Ping timeout: 256 seconds) |
14:13:04 | * | CodeVance_ quit (Read error: Connection reset by peer) |
14:15:57 | * | SenasOzys quit (Ping timeout: 264 seconds) |
14:22:04 | CodeVance | how to run nim with clang |
14:22:09 | CodeVance | Still testing that |
14:22:12 | CodeVance | GCC works |
14:22:55 | Yardanico | CodeVance, just change cc = gcc to cc = clang in config/nim.cfg (in compiler directory) |
14:23:07 | Yardanico | or call nim like that: nim c --cc:clang yourfile.nim |
14:23:23 | CodeVance | clang doesn't have the gcc headers |
14:23:43 | CodeVance | does this mean I need to install vcc to get the gcc headers |
14:23:57 | miran | ...or just change/create nim.cfg inside of your project directory |
14:24:12 | Yardanico | CodeVance, maybe it's better to install mingw for gcc headers? :) |
14:24:36 | CodeVance | I've tried this --passC: r"--include-directory C:\Users\Public\Documents\mingw64-6.3.0\mingw64\x86_64-w64-mingw32\include" |
14:26:08 | Yardanico | and what happens? |
14:26:39 | Yardanico | CodeVance, did you try this - https://stackoverflow.com/a/47148526/5476128 |
14:28:39 | PMunch | Hmm, anyone remember where the call syntax table is? |
14:28:57 | PMunch | As in the table in the documentation showing the different ways we can call a procedure |
14:29:05 | CodeVance | Yardanico, I'll try that in a bit |
14:30:14 | miran | PMunch: oh, i know what you're looking for. let me take a look |
14:33:27 | miran | it was something like this IIRC: https://nim-lang.org/docs/apis.html |
14:33:48 | PMunch | No that's not the one I'm looking for |
14:34:24 | miran | yeah, i know, it was something *like that*. i think Araq has posted it in last week or so |
14:34:52 | PMunch | I meant the one that lists "f(a) == f(a); a.f() == f(a); a.f(b) == f(a, b); a.f b == f(a, b); f a, b == f(a, b)" |
14:35:39 | miran | yup, that's the one. i'm trying to find it. (and this is, once more, the evidence that nim needs much clearer documentation) |
14:36:26 | miran | now the things are in five different locations, and good luck looking at the right place (on your first attempt) |
14:37:11 | PMunch | I have a feeling that it was here: https://nim-lang.org/docs/manual.html#procedures-method-call-syntax and in the following section command call syntax |
14:37:47 | miran | when i saw it, it was a separate, quite small, document |
14:38:22 | * | yglukhov joined #nim |
14:41:16 | miran | nope. can't find it. |
14:41:53 | PMunch | Me neither.. |
14:42:00 | PMunch | I even remember seeing it a couple months back |
14:42:27 | miran | it was even more recent for me |
14:42:48 | * | yglukhov quit (Ping timeout: 255 seconds) |
14:58:33 | * | cspar joined #nim |
14:58:54 | * | SenasOzys joined #nim |
15:00:38 | * | SenasOzys quit (Remote host closed the connection) |
15:01:40 | * | SenasOzys joined #nim |
15:03:40 | FromGitter | <zacharycarter> @dom96 - yeah sorry - I haven't been as active / had as much free time as I would have liked to have lately |
15:03:45 | FromGitter | <zacharycarter> I'm working on the new version of the Nim playground now |
15:03:55 | FromGitter | <zacharycarter> and I"m using your libsass module :) |
15:18:53 | * | gokr joined #nim |
15:31:01 | FromGitter | <zacharycarter> I wrote an extension for the bundler - https://github.com/parcel-bundler/parcel - which will automatically bundle up all my js / css / html etc and resolve all my imports for me, with very little config |
15:36:23 | CodeVance | goz did you make gulp.nim? |
15:37:07 | FromGitter | <zacharycarter> https://gist.github.com/zacharycarter/93776411cbebe94bd7078b74c48ee398 |
15:37:52 | FromGitter | <zacharycarter> still tons of work to do |
15:38:16 | FromGitter | <zacharycarter> cool thing is - I can change a nim file and the project will hot reload in the browser |
15:38:23 | FromGitter | <zacharycarter> or hot module load or whatever |
15:40:15 | FromGitter | <zacharycarter> CodeVance: not quite gulp :P - I think parcel is like a much better webpack |
15:41:03 | FromGitter | <CodeVance> I can only vaguely remember my journey into js land |
15:41:10 | * | CodeVance left #nim ("Leaving") |
15:41:21 | FromGitter | <zacharycarter> I'm about to push up an initial commit to github |
15:41:30 | FromGitter | <zacharycarter> just so I don't lose this work :P |
15:43:01 | dom96 | Do you even need parcel? |
15:43:11 | FromGitter | <zacharycarter> yes |
15:43:19 | dom96 | The only reason I wrapped libsass is because I wanted to avoid the npm ecosystem |
15:43:22 | dom96 | Why? |
15:44:41 | FromGitter | <zacharycarter> because I'm using ES6/2017 features and I don't want to deal with webpack |
15:44:49 | FromGitter | <zacharycarter> also I'm going to be using a ton of npm modules |
15:45:17 | FromGitter | <zacharycarter> parcel isn't really difficult to use either |
15:45:27 | FromGitter | <zacharycarter> it is pretty much zero config |
15:45:30 | dom96 | Yeah, I would forgo those things to avoid npm |
15:45:48 | FromGitter | <zacharycarter> meh - npm isn't that bad |
15:45:58 | FromGitter | <zacharycarter> it's a lot faster in newer versions than it used to be |
15:46:00 | dom96 | It's yet another dependency, and a big one at that |
15:46:11 | FromGitter | <zacharycarter> it's not like it's going into my binary |
15:46:17 | FromGitter | <zacharycarter> or being used at runtime |
15:46:23 | FromGitter | <zacharycarter> everything is dockerized anyway |
15:46:31 | FromGitter | <zacharycarter> so you don't have to install npm or node or anything anyway |
15:46:43 | FromGitter | <zacharycarter> hell you don't even have to install Nim |
15:46:46 | FromGitter | <zacharycarter> :P |
15:47:02 | FromGitter | <CodeVance> Is the nim playground written in nim? |
15:47:06 | FromGitter | <zacharycarter> yes |
15:47:12 | FromGitter | <CodeVance> full-stack? |
15:47:13 | FromGitter | <zacharycarter> all of it |
15:47:16 | FromGitter | <zacharycarter> mmhmm |
15:47:35 | FromGitter | <CodeVance> when it works add to reddit :| |
15:47:49 | FromGitter | <zacharycarter> hopefully I'll have something cool looking by the end of the weekend |
15:48:00 | FromGitter | <zacharycarter> but it will probably be a few more weeks before it's ready for a public beta |
15:48:31 | FromGitter | <CodeVance> More like everything is always in beta. nim is for devs, there is no beta |
15:48:33 | dom96 | Lowering the barrier to entry for contributions is always a good idea too |
15:48:38 | FromGitter | <CodeVance> r/nim |
15:48:47 | FromGitter | <zacharycarter> dom96 - I'm trying to do that |
15:49:00 | FromGitter | <zacharycarter> thus the hot module reloading |
15:49:08 | FromGitter | <zacharycarter> being able to spin up the entire thing locally with one command |
15:49:18 | FromGitter | <CodeVance> is it fast? |
15:49:22 | FromGitter | <zacharycarter> the module reloading? |
15:49:25 | FromGitter | <CodeVance> ya |
15:49:35 | FromGitter | <CodeVance> compiling to js I guess |
15:49:43 | FromGitter | <CodeVance> reloading |
15:49:44 | FromGitter | <zacharycarter> I mean I can change a nim file and the page is refreshed in less than 0.2 seconds usually |
15:49:48 | dom96 | Why the need for ES6/2017 features? |
15:49:51 | FromGitter | <zacharycarter> or sass |
15:49:52 | FromGitter | <CodeVance> that's fast |
15:50:19 | FromGitter | <zacharycarter> I'm just used to having them at my disposal |
15:50:40 | FromGitter | <zacharycarter> also for the editor I"m using - I need TS |
15:50:51 | dom96 | but... you're writing this in Nim, no? |
15:50:57 | FromGitter | <zacharycarter> yes |
15:51:05 | FromGitter | <CodeVance> I think its fine, it might even attract node devs if they can still use npm |
15:51:20 | FromGitter | <zacharycarter> dom - please give me a chance before you poo all over it :P |
15:51:28 | dom96 | Sorry, I just hate dependencies |
15:51:31 | FromGitter | <zacharycarter> let me get it up on github and maybe you can clone it and I can tell you how to run it |
15:51:35 | FromGitter | <zacharycarter> meh |
15:51:41 | FromGitter | <zacharycarter> it's JS man - I think they're inevitable |
15:51:46 | FromGitter | <zacharycarter> unless we replace all the npm tooling |
15:51:49 | FromGitter | <zacharycarter> and wrap every js lib |
15:51:52 | dom96 | and I am very sceptical about the need for this |
15:52:11 | FromGitter | <zacharycarter> well you can take a look once I get it up |
15:52:14 | FromGitter | <CodeVance> dom96 why is there even a js backend? |
15:52:17 | dom96 | we should replace all the tooling :) |
15:52:22 | FromGitter | <zacharycarter> well that takes time |
15:52:23 | FromGitter | <CodeVance> lol |
15:52:26 | FromGitter | <zacharycarter> so far we have a sass compiler :P |
15:52:33 | dom96 | CodeVance: So you can target the browser :) |
15:52:34 | FromGitter | <CodeVance> ideal and practice |
15:53:53 | FromGitter | <CodeVance> dom96 you said "sceptical about all of this" it sounds like you think using node modules is a bad idea. Atm we don't really have a choice. Rolling your own comes with pitfalls too. |
16:02:36 | dom96 | Node modules aren't the only way to add JS libraries to a web page |
16:03:18 | dom96 | It's not node modules vs. rolling your own |
16:05:22 | FromGitter | <CodeVance> okay so download unzip copy paste? |
16:05:56 | dom96 | Yes, or just use a CDN |
16:07:39 | FromGitter | <CodeVance> ok |
16:18:24 | * | zebralan joined #nim |
16:19:34 | * | zebralan quit (Client Quit) |
16:24:58 | FromGitter | <mratsim> somehow I read “we should replace all the trolling" |
16:32:36 | * | xet7 quit (Remote host closed the connection) |
16:34:23 | * | xet7 joined #nim |
16:45:00 | federico3 | dom96: are the stickers drawing available somewere? in SVG perhaps? |
16:47:50 | * | yglukhov joined #nim |
16:50:20 | * | CodeVance joined #nim |
16:51:56 | * | yglukhov quit (Ping timeout: 246 seconds) |
17:04:43 | FromGitter | <dom96> Bah. Missed this train by mere seconds. |
17:05:23 | FromGitter | <dom96> I've got re-order link. I'll share it soon. |
17:09:27 | * | CodeVance quit (Ping timeout: 240 seconds) |
17:11:59 | * | CodeVance joined #nim |
17:12:57 | * | dddddd quit (Remote host closed the connection) |
17:13:42 | * | Hashirama joined #nim |
17:14:03 | FromGitter | <dom96> https://www.stickermule.com/artworks/1123185/shared |
17:14:07 | * | CodeVance quit (Read error: Connection reset by peer) |
17:15:16 | Hashirama | Heyo — I am running `nimble update` and keep getting a notice about openssl. However, I think ai already have latest openssl |
17:15:17 | FromGitter | <dom96> federico3: ^ |
17:15:43 | FromGitter | <dom96> What version of openssl do you have? ``openssl version`` (IIRC) |
17:17:10 | Hashirama | Heres the output https://pastebin.com/cRszR3xa |
17:17:17 | Hashirama | OpenSSL 1.0.2o 27 Mar 2018 |
17:19:36 | FromGitter | <dom96> What error are you getting? |
17:19:48 | FromGitter | <dom96> It's possible your openssl is so new it causes another issue :) |
17:20:15 | Hashirama | dom96: https://pastebin.com/raw/FrwxTHBW |
17:22:37 | FromGitter | <dom96> Weird. Are you sure you don't have an older version in your PATH? |
17:22:44 | FromGitter | <dom96> What OS is this on? |
17:22:57 | Hashirama | Mac OSX |
17:24:05 | FromGitter | <dom96> In that case try something like this: |
17:24:08 | FromGitter | <dom96> `export DYLD_LIBRARY_PATH=/usr/local/opt/[email protected]/lib` |
17:24:15 | FromGitter | <dom96> But make sure the path is correct |
17:24:57 | Hashirama | hm, that allowed me to update nimble. |
17:27:24 | FromGitter | <dom96> Yeah, Nimble was using an older version that's probably bundled with macOS |
17:27:26 | Hashirama | dom96: Looks like additionally, following the https://medium.com/@katopz/how-to-upgrade-openssl-8d005554401 finished the issue (restarted shell s/t DYLD_LIBRARY_PATH no longer in path from previous run). |
17:28:03 | Hashirama | tyvm dom96 |
17:28:09 | * | CodeVance joined #nim |
17:28:39 | * | CodeVance quit (Read error: Connection reset by peer) |
17:28:50 | FromGitter | <dom96> You can do that, but as homebrew mentions it might be dangerous :) |
17:32:14 | Hashirama | I had an unrelated question, nimble installs packages in my homedirectory instead of under the project (i.e: like `node_modules`)? |
17:32:26 | Hashirama | not sure which of the two install methods i like |
17:36:51 | FromGitter | <dom96> indeed |
17:37:44 | * | PMunch quit (Quit: leaving) |
17:39:51 | Yardanico | Hashirama, most nim packages always use latest version of other packages :) |
17:40:06 | Yardanico | so this directory will be small anyway |
17:41:52 | * | CodeVance2 joined #nim |
17:44:50 | * | Sembei joined #nim |
17:46:24 | * | CodeVance2 quit (Ping timeout: 260 seconds) |
17:46:59 | * | Pisuke quit (Ping timeout: 260 seconds) |
17:47:57 | * | SenasOzys quit (Ping timeout: 240 seconds) |
17:57:09 | FromGitter | <brentp> am I missing a way to get the file path from a `File` in nim? can't seem to find this. |
17:58:36 | * | nsf quit (Quit: WeeChat 2.1) |
18:02:14 | * | Hashirama quit (Quit: Leaving.) |
18:12:01 | * | CodeVance joined #nim |
18:12:44 | * | CodeVance quit (Read error: Connection reset by peer) |
18:14:09 | * | SenasOzys joined #nim |
18:18:53 | FromGitter | <Varriount> @brentp Does getFileInfo do it? |
18:21:02 | FromGitter | <Varriount> Ah, no it doesn't. |
18:21:32 | FromGitter | <brentp> seems not. I got around it another way. |
18:21:37 | FromGitter | <Varriount> @brentp There is no reliable, cross-platform way to turn a file handle back into a party |
18:21:43 | FromGitter | <Varriount> *path |
18:22:26 | FromGitter | <brentp> @Varriount `getPartyFromFileHandle(f:File)` could be very useful. |
18:26:25 | * | max3 joined #nim |
18:31:50 | FromGitter | <data-man> @dom96: What's wrong with https://github.com/nim-lang/packages/pull/734 ? |
18:34:10 | Yardanico | @data-man: IDK, but pro tip: you can publish packages using nimble itself |
18:34:19 | Yardanico | so you wouldn't do stuff like this - https://github.com/nim-lang/packages/pull/734/commits/31fc85f063ed7b663f409ff311df2b6ee9e7c521 |
18:35:49 | * | cspar quit (Ping timeout: 265 seconds) |
18:36:10 | FromGitter | <data-man> I don't use Nimble. |
18:36:37 | Yardanico | WHY? |
18:36:39 | Yardanico | why do you add a package to nimble when? :D |
18:36:49 | Yardanico | first and second ones are separate questions* |
18:38:23 | FromGitter | <data-man> Because Nimble can't install a package if it not exists in the packages list. |
18:41:05 | * | rauss joined #nim |
18:41:46 | Yardanico | it can lol |
18:41:55 | Yardanico | go to folder with your package and run "nimble install" |
18:42:28 | FromGitter | <data-man> Can't install from a repo lol |
18:42:40 | Yardanico | clone it and run nimble install :D |
18:43:48 | FromGitter | <data-man> Well, how you can install my package right now? |
18:44:36 | Yardanico | Clone it and run nimble install? |
18:44:58 | Yardanico | well, I have nothing against, it's good that there would be more nimble packages |
18:45:07 | Yardanico | but yeah, there's still quite a lot of useful packages in nimble :) |
18:59:27 | * | gmpreussner quit (Ping timeout: 240 seconds) |
19:00:17 | * | gmpreussner joined #nim |
19:05:54 | * | cspar joined #nim |
19:27:46 | FromGitter | <tim-st> Is there any string search tree for nim that can be made constant? or do all of them use ref types? |
19:28:39 | * | Nim-noob joined #nim |
19:37:15 | * | athenot joined #nim |
19:41:11 | * | yglukhov joined #nim |
19:42:13 | * | athenot quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
19:45:37 | * | yglukhov quit (Ping timeout: 256 seconds) |
19:52:33 | * | cspar quit (Ping timeout: 248 seconds) |
19:55:23 | * | Nim-noob quit (Quit: Page closed) |
19:57:23 | * | Arrrr joined #nim |
19:58:08 | Arrrr | Nimscript, is it possible to retrieve the output of an executed command? |
19:58:19 | Arrrr | osprocs is not usable |
19:58:33 | * | nsf joined #nim |
19:59:56 | * | Ven`` joined #nim |
20:00:14 | * | euantor quit (Ping timeout: 256 seconds) |
20:00:36 | * | euantor joined #nim |
20:01:52 | Arrrr | like 'let output = exec("pwd")' |
20:04:09 | * | arecaceae quit (Remote host closed the connection) |
20:04:16 | * | xet7 quit (Remote host closed the connection) |
20:04:45 | * | SenasOzys quit (Remote host closed the connection) |
20:05:13 | * | SenasOzys joined #nim |
20:05:34 | * | arecaceae joined #nim |
20:16:59 | * | Ven`` quit (Read error: Connection reset by peer) |
20:17:31 | shashlick | I think you can do staticExec |
20:18:38 | Arrrr | Well you are right |
20:21:10 | * | Ven`` joined #nim |
20:22:58 | Arrrr | This question deserves an update https://stackoverflow.com/questions/36103424/how-to-read-from-the-stdin-with-nim-script |
20:44:57 | FromGitter | <dom96> @data-man I didn't reject it? |
20:46:19 | * | vendethiel- joined #nim |
20:48:41 | FromGitter | <data-man> I don't know. |
20:48:41 | Arrrr | I leave now, thank you shashlick |
20:48:44 | * | Arrrr quit (Quit: Leaving.) |
20:50:20 | * | Ven`` quit (Ping timeout: 276 seconds) |
20:59:58 | * | jjido joined #nim |
21:03:33 | * | yglukhov joined #nim |
21:04:00 | FromGitter | <Varriount> @brentp it would actually be `getPartyFromFileHandle(f: File, kind: PartyKind)` |
21:07:35 | * | yglukhov quit (Ping timeout: 240 seconds) |
21:18:27 | * | miran quit (Ping timeout: 240 seconds) |
21:23:48 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
21:24:22 | * | athenot joined #nim |
21:31:17 | * | athenot quit (Ping timeout: 276 seconds) |
21:34:41 | * | athenot joined #nim |
21:38:56 | * | Vladar quit (Quit: Leaving) |
21:38:56 | * | athenot quit (Ping timeout: 246 seconds) |
21:52:55 | * | HYP3RBOR3A joined #nim |
21:54:15 | * | jjido joined #nim |
21:56:43 | * | Sentreen quit (Quit: WeeChat 1.6) |
21:59:31 | * | athenot joined #nim |
22:04:01 | * | Sentreen joined #nim |
22:04:26 | * | athenot quit (Ping timeout: 276 seconds) |
22:10:18 | * | jjido quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
22:11:21 | * | Hashirama joined #nim |
22:15:20 | Hashirama | Long time Python user, I've also dabbled with Java and C99 but the latter were for school projects etc. I've dabbled with some other languages i.e: Elixir, Rust, Go but I never felt like "okay I am going to use this language now, I know enough". What can I do make sure something like that clicks (if thats even possible) |
22:16:31 | Hashirama | I think Nim and (Elixir or Pony) will be the two languages I'd like to learn. Going back to Niim though, I dont know how much value going through the tutorial will give. What did you folks to do to learn the langauge? I can def. spend an hour each day as a minimum |
22:17:45 | shashlick | Depends on your style hashirama |
22:18:42 | Hashirama | Thats understandable, hence just assuming will be given feedback (things to pick from) rather than "here is the recipe to becoming a l33t h4x0r" |
22:20:06 | Hashirama | Not asking for a magical pill or anything, I am just wondering what are some things I can try to see which work for me. I have the time, juts need to sample some techniques and see what works for me. I am very surpised how this "learning new langauge" baffles me given that it didn't when I learned python. I guess I just need a project to work on... |
22:20:21 | shashlick | I ported some of my python code to get on board |
22:20:52 | shashlick | Some like doing specific projects, see xmonader's Nim a day effort |
22:21:27 | Hashirama | Reference |
22:21:45 | dom96 | I think it's fairly simple: you just have to continue building software in the language you want to learn. |
22:21:48 | Hashirama | Err, pressed enter by accident. I meant, Reference link for "Nim a day" would be appreciated. |
22:22:02 | shashlick | https://xmonader.github.io/nimdays/ |
22:22:20 | Hashirama | tyvm |
22:22:58 | shashlick | I'm also a python guy who came to nim for performance |
22:23:43 | shashlick | I don't like doing practice projects, I prefer building things that are useful for me |
22:23:54 | shashlick | So just depends if you have one handy |
22:24:39 | shashlick | Or you could simply read existing code to see how nim is being used, it's open source so lots to read 😊 |
22:24:42 | dom96 | Good point. Build things you need or find fun working on. |
22:26:25 | dom96 | As they say though: practice makes perfect |
22:27:03 | shashlick | So dom96, you back 100%? |
22:27:27 | dom96 | Sure, I'm on my laptop |
22:27:36 | dom96 | Watching Eurovision in the background though :) |
22:28:48 | shashlick | 👍 |
22:29:17 | dom96 | Why? What's up? |
22:29:19 | shashlick | Araq been out for a few days looks like |
22:31:23 | dom96 | Yeah, I think he's just spending time with family. There was a holiday in Germany recently. |
22:32:16 | shashlick | That's cool |
22:32:27 | shashlick | I might travel to Munich in October |
22:32:34 | * | Hashirama quit (Quit: Leaving.) |
22:34:16 | shashlick | Have you had a chance to see if tissue is useful to you in debugging Nim issues? |
22:35:06 | * | Hashirama joined #nim |
22:43:58 | FromGitter | <mratsim> @Hashirama the best way to learn and keep the drive to learn is either curiosity or hunger, but I think the later only apply to COBOL devs. |
22:44:43 | dom96 | shashlick: Afraid not. |
22:45:15 | FromGitter | <mratsim> In my case I wanted to learn deep learning by implementing it from scratch instead of using Numpy, so I thought why not learn that + a new language |
22:48:05 | FromGitter | <mratsim> Going on this project, I of course learned a lot about Nim, and deep learning, but also how memory work, assembly, cache optimization, pointers, ... |
22:48:52 | * | nsf quit (Quit: WeeChat 2.1) |
22:49:20 | Hashirama | Yeah I am going to make a barebones static site generator. |
22:50:31 | * | Hashirama quit (Quit: Leaving.) |
22:51:07 | * | Hashirama joined #nim |
22:51:24 | FromGitter | <mratsim> ah that would be awesome |
22:51:47 | FromGitter | <mratsim> I played a bit with Gatsby recently and I really liked it. |
22:52:58 | FromGitter | <mratsim> A static website generator would be useful for documentation as well, I’m hitting the limit of nimdoc.cfg. |
22:57:35 | * | Hashirama quit (Quit: Leaving.) |
23:12:17 | * | tmm1 quit (Ping timeout: 265 seconds) |
23:14:31 | * | Hashirama joined #nim |
23:17:59 | * | darithorn joined #nim |
23:24:08 | federico3 | uh? |
23:24:49 | FromGitter | <data-man> @dom96: I've the idea about tool for packages stats : by author, by tags, by license, etc. ⏎ Where it is better to add, as a separate tool in the packages repo or to add new command to Nimble? |
23:26:16 | * | vendethiel- quit (Quit: q+) |
23:28:21 | FromGitter | <Quelklef> hi guys, quick question: if I have a generic type e.g. `type X[N: static[int]]`, when I'm writing procs and methods for it is there any reason to write them like `proc fN: static[int (x: X[N])`, with a fully specified generic type, rather than just `proc fN (x: X[N])`? |
23:28:52 | FromGitter | <mratsim> you can but sometimes you get Cannot Instantiate Foo |
23:29:18 | FromGitter | <mratsim> another reason is documentation |
23:29:33 | FromGitter | <Quelklef> Documentation is a good point. Can you elaborate on the first |
23:29:40 | FromGitter | <mratsim> if you don’t use the N at all tou can just do proc f(x: X) by the way |
23:29:54 | FromGitter | <Quelklef> oh, cool |
23:30:28 | FromGitter | <Quelklef> but as for 'cannot instantiate', why's that happen? Shouldn't the supplied x: X[N] 'decide' what N is? |
23:30:47 | FromGitter | <mratsim> I don’t know, static bug :P |
23:30:58 | FromGitter | <Quelklef> damnit, static |
23:31:05 | FromGitter | <Quelklef> I actually haven't had any problems with static so far! |
23:31:14 | FromGitter | <mratsim> Nim can also infer the result N, for example: https://github.com/status-im/nim-stint/blob/master/stint/private/int_bitwise_ops.nim |
23:31:41 | FromGitter | <Quelklef> I thought this was done with `auto`? |
23:32:39 | FromGitter | <mratsim> auto is for the whole type, for subtype you can just not mention it and it will be auto |
23:32:54 | FromGitter | <mratsim> though Nim sometimes will complain with canont instantiate. |
23:33:05 | FromGitter | <Quelklef> oh, I see, IntImpl is generic then |
23:33:35 | * | Hashirama quit (Quit: Leaving.) |
23:33:55 | FromGitter | <mratsim> yes, and it’s used in probably the most complex static Nim library: https://github.com/status-im/nim-stint/blob/master/stint/int_public.nim#L22 |
23:34:26 | FromGitter | <mratsim> See here for the type declaration: https://github.com/status-im/nim-stint/blob/master/stint/private/datatypes.nim#L143 |
23:34:45 | FromGitter | <mratsim> I pass the N: static[int] to a macro to choose the implementation at compile-time |
23:35:01 | FromGitter | <Quelklef> ooh, this is exactly was I was looking for: before I found bigint, but that didn't work |
23:35:02 | FromGitter | <mratsim> uint64, or uint32 or 2xuint64 or 4xuint64 |