00:27:31 | * | dwdv quit (Ping timeout: 265 seconds) |
01:06:12 | * | zacharycarter quit (Quit: Lost terminal) |
01:14:53 | FromDiscord | <dryajov> I'm trying to dump the heap contents using `-d:nimTypeNames` and `dumpNumberOfInstances`, but getting `undeclared identifier: 'dumpNumberOfInstances'`, any hints at how to get it working? |
01:19:42 | FromDiscord | <Rika> thats not a function anywhere |
01:20:39 | FromDiscord | <dryajov> interesting, it actually builds, but vscode complains about it... never mind, seems to work ๐ |
01:24:08 | * | chemist69 quit (Ping timeout: 246 seconds) |
01:26:22 | * | chemist69 joined #nim |
01:32:14 | * | lritter quit (Ping timeout: 240 seconds) |
01:36:34 | * | couven92 quit (Ping timeout: 240 seconds) |
02:03:29 | sagax | hi all! |
02:03:37 | sagax | how to `echo` without new line/ |
02:03:38 | sagax | ? |
02:04:52 | leorize | stdout.write <- use that instead |
02:06:57 | * | jegfish joined #nim |
02:10:13 | axion | how do i divide 2 uint64's to get a float? |
02:11:43 | Yardanico | float(a / b) ? |
02:12:06 | Yardanico | or you want float(a) / float(b) ? |
02:12:08 | axion | it's telling me that there is no overload for uint64, uint64 |
02:12:37 | Yardanico | ah, use "div" then |
02:12:53 | Yardanico | "a div b" if you want to divide uint64s |
02:12:55 | axion | doesn't that do integer division dropping the remainder? |
02:13:06 | Yardanico | well, if you want to get a float then do |
02:13:10 | Yardanico | float(a) / float(b) |
02:13:15 | axion | Ok cool |
02:15:16 | * | jegfish quit (Quit: Leaving) |
02:15:37 | * | jegfish joined #nim |
02:16:12 | sagax | thanks |
02:29:27 | * | krux02_ quit (Remote host closed the connection) |
02:32:26 | axion | @Rika I have more questions for you sometime :) |
02:37:17 | * | muffindrake quit (Ping timeout: 246 seconds) |
02:39:41 | * | muffindrake joined #nim |
02:45:46 | FromDiscord | <Rika> ๐ฎ |
02:55:00 | * | nekits quit (Ping timeout: 256 seconds) |
02:58:26 | * | nekits joined #nim |
03:04:42 | * | jegfish quit (Quit: Leaving) |
03:10:44 | * | rnrwashere joined #nim |
03:10:44 | * | rnrwashere quit (Client Quit) |
03:52:04 | * | rockcavera quit (Remote host closed the connection) |
03:54:46 | * | endragor joined #nim |
04:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
04:06:43 | * | supakeen joined #nim |
04:18:17 | * | sz0 quit () |
04:19:06 | * | sz0 joined #nim |
04:41:44 | * | waleee-cl quit (Quit: Connection closed for inactivity) |
05:16:06 | * | letto quit (Quit: Konversation terminated!) |
05:20:20 | * | narimiran joined #nim |
05:22:40 | * | letto joined #nim |
05:24:36 | * | dddddd quit (Ping timeout: 256 seconds) |
05:27:45 | * | dadada joined #nim |
05:28:09 | * | dadada is now known as Guest40604 |
05:33:40 | * | rnrwashere joined #nim |
05:42:56 | * | rnrwashere quit (Remote host closed the connection) |
05:45:21 | * | rnrwashere joined #nim |
05:53:08 | * | CcxWrk quit (Quit: ZNC 1.7.4 - https://znc.in) |
05:53:28 | * | CcxWrk joined #nim |
06:12:01 | * | solitudesf joined #nim |
06:23:27 | * | tane joined #nim |
06:26:44 | * | Pixeye joined #nim |
06:36:27 | * | PMunch joined #nim |
06:49:47 | FromDiscord | <Benumbed> So while hunting for something else today, I found this: https://scripter.co/notes/nim/ |
06:49:50 | FromDiscord | <Benumbed> It may help the Python people who drop in |
06:50:18 | FromDiscord | <Benumbed> (or other languages, Python just seems to be the common denominator) |
06:51:20 | leorize | that's @kaushalmodi blog iirc |
06:51:44 | * | NimBot joined #nim |
06:52:53 | FromDiscord | <Benumbed> It's not linked in 'Learn' |
06:56:52 | * | rnrwashere quit (Remote host closed the connection) |
06:57:14 | narimiran | it is |
06:57:26 | narimiran | Nim Notes: A collection of Nim snippets with brief notes. |
06:58:12 | FromDiscord | <Benumbed> Ohhh oops, I was looking for 'script' as a keyword ๐ |
06:58:54 | * | rnrwashere joined #nim |
07:00:00 | * | gmpreussner quit (Quit: kthxbye) |
07:01:30 | * | kenran joined #nim |
07:04:50 | * | gmpreussner joined #nim |
07:12:50 | * | andinus joined #nim |
07:22:01 | FromDiscord | <Benumbed> Hah, I just found the AKB48 reference in `unittest`'s docs |
07:22:29 | FromDiscord | <Benumbed> Someone's a fan of JPop ๐ |
07:27:55 | * | chemist69 quit (Ping timeout: 272 seconds) |
07:28:28 | * | chemist69 joined #nim |
07:54:54 | * | kenran quit (Quit: leaving) |
08:01:58 | * | rnrwashere quit (Remote host closed the connection) |
08:15:34 | * | munksgaard joined #nim |
08:16:20 | munksgaard | For weird reasons I want to `nim compile` a file with no .nim extension, is that possible? It seems like when I try to do `nim compile foo` it automatically adds a `.nim` at the end. |
08:19:42 | Araq | maybe it's possible but files are better with extensions |
08:20:51 | PMunch | Sure it's possible: "mv myfile myfile.nim && nim c myfile.nim; mv myfile.nim myfile" |
08:20:57 | * | MarderIII joined #nim |
08:21:36 | PMunch | Oh wait: "mv myfile myfile.nim && nim c myfile.nim && mv myfile myfile.a; mv myfile.nim myfile" |
08:21:53 | PMunch | Or just use -o I guess |
08:23:07 | munksgaard | Okay, thank you :-) |
08:50:12 | * | sleepyqt joined #nim |
08:50:34 | * | hax-scramper quit (Ping timeout: 240 seconds) |
08:52:47 | * | hax-scramper joined #nim |
08:53:32 | * | Trustable joined #nim |
08:56:51 | * | hax-scramper quit (Read error: Connection reset by peer) |
08:57:08 | * | hax-scramper joined #nim |
09:02:03 | * | opal quit (Ping timeout: 240 seconds) |
09:05:33 | * | dwdv joined #nim |
09:08:56 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:09:15 | * | hax-scramper joined #nim |
09:11:42 | * | Vladar joined #nim |
09:14:22 | * | opal joined #nim |
09:15:34 | * | hax-scramper quit (Ping timeout: 240 seconds) |
09:16:14 | * | hax-scramper joined #nim |
09:16:28 | * | emery[m] is now known as ehmry[m] |
09:21:27 | * | ehmry left #nim ("https://quassel-irc.org - Chat comfortably. Anywhere.") |
09:22:58 | * | kenran joined #nim |
09:24:10 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:24:27 | * | hax-scramper joined #nim |
09:30:29 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:31:30 | * | hax-scramper joined #nim |
09:36:19 | Araq | narimiran, I think it's something like |
09:36:27 | Araq | "converter allowed for distinct types" |
09:36:41 | Araq | and localized conversions based on proc definitions like |
09:37:41 | narimiran | (before anyone gets scared, this is just some "thinking aloud" about converters, nothing serious (yet :P)) |
09:37:52 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:37:59 | Araq | proc `+`(x: Matrix; y: Matrix.alsoAllowedAs(Vector, toVector)): Matrix |
09:38:07 | * | hax-scramper joined #nim |
09:38:52 | Araq | something along the lines of varargs[`$`] where we got it right |
09:39:28 | Araq | yeah, like this |
09:40:11 | Araq | proc `+`(x: Matrix; y: convert[Matrix, toMatrix]): Matrix |
09:41:28 | Araq | then toMatrix can also be a template or a method |
09:41:30 | * | hax-scramper quit (Read error: Connection reset by peer) |
09:41:42 | * | hax-scramper joined #nim |
09:43:52 | * | Vladar quit (Remote host closed the connection) |
09:43:52 | * | solitudesf quit (Read error: Connection reset by peer) |
09:44:14 | * | Vladar joined #nim |
09:45:53 | * | inv2004 joined #nim |
09:50:40 | * | hax-scramper quit (Ping timeout: 258 seconds) |
09:51:14 | * | hax-scramper joined #nim |
09:52:00 | * | solitudesf joined #nim |
10:04:45 | * | natrys joined #nim |
10:07:43 | * | solitudesf quit (Read error: Connection reset by peer) |
10:09:31 | * | sunwukong joined #nim |
10:13:21 | * | solitudesf joined #nim |
10:13:26 | * | dddddd joined #nim |
10:19:13 | FromDiscord | <Rika> `use strformat module instead, round is deprecated` what, so i have to fmt it then parseFloat? |
10:22:40 | FromDiscord | <flywind> `parseFloat` and then `round`? generic round is deprecated, but float round is ok. |
10:23:58 | FromDiscord | <Rika> i already have it, i dont understand what you mean by generic round |
10:30:46 | FromDiscord | <flywind> find this: https://forum.nim-lang.org/t/4402 |
10:48:26 | * | PMunch quit (Quit: leaving) |
10:54:58 | * | kenran quit (Ping timeout: 256 seconds) |
10:56:30 | * | Trustable quit (Remote host closed the connection) |
10:57:16 | * | nsf joined #nim |
11:00:55 | * | kenran joined #nim |
11:02:50 | * | sleepyqt quit (Read error: Connection reset by peer) |
11:23:43 | WilhelmVonWeiner | does the db_mysql library keep the mysql socket alive? |
11:24:02 | WilhelmVonWeiner | or will it eventually timeout? |
11:25:35 | * | narimiran quit (Ping timeout: 260 seconds) |
11:27:08 | Araq | dunno, try it |
11:28:38 | WilhelmVonWeiner | well i think it's timing out but hard to test especially as i cant get very many erros logged from it |
11:29:36 | FromGitter | <eliezedeck> Hey guys, using `httpclient` ... how can I POST dynamic data that is not yet known in advanced, and is generated with time? |
11:30:10 | * | liblq-dev joined #nim |
11:35:29 | Yardanico | you want to stream POST request? is that even possible with http 1? |
11:36:36 | Yardanico | I'm not really sure if that's possible with httpclient |
11:43:00 | * | krux02 joined #nim |
11:43:27 | * | nsf quit (Quit: WeeChat 2.7) |
11:47:20 | * | MarderIII quit (Ping timeout: 256 seconds) |
11:58:54 | FromGitter | <eliezedeck> I have a Golang program that does exactly this, but I'm looking for a way to do this in Nim |
12:00:12 | FromDiscord | <Recruit_main707> by "dynamic data that is not yet known" you mean you dont know its size? |
12:00:14 | FromGitter | <eliezedeck> for Golang, the API takes an io.Reader ... so, you can basically plug in any reader and stream POST anything to the server |
12:00:49 | FromGitter | <eliezedeck> I believe one will have to set a size in HTTP/1.1 |
12:01:09 | FromGitter | <eliezedeck> but the content, you should be able to stream it, as you create it dynamically |
12:03:02 | * | Kaivo quit (Quit: WeeChat 2.7.1) |
12:04:11 | Araq | the API uses a 'bodyStream' |
12:04:13 | Araq | er |
12:04:22 | Yardanico | it's only for the response :( |
12:04:28 | * | Kaivo joined #nim |
12:04:31 | Araq | the implementation uses a bodyStream but it's not exported |
12:05:03 | FromGitter | <eliezedeck> indeed, Response only |
12:05:06 | * | filcuc joined #nim |
12:05:21 | FromDiscord | <Recruit_main707> can we interop with Go? |
12:05:23 | FromGitter | <eliezedeck> oh... for the Request? |
12:06:02 | * | supakeen quit (Quit: WeeChat 1.9.1) |
12:06:18 | Yardanico | well, scrolling through httpclient I don't think it supports that |
12:06:41 | * | supakeen joined #nim |
12:07:01 | shashlick | Shouldn't be hard to add |
12:09:10 | FromGitter | <eliezedeck> yes, I also looked at it, and it's only for Response ... not request |
12:09:53 | FromGitter | <eliezedeck> I'll create a bug report to track this |
12:10:58 | FromGitter | <eliezedeck> > but bear in mind that adding new features to the language is currently a low priority. |
12:11:09 | FromGitter | <eliezedeck> hmm... |
12:11:20 | Yardanico | it's okay |
12:11:26 | * | narimiran joined #nim |
12:13:11 | * | s4mu3lbk quit (Ping timeout: 265 seconds) |
12:13:47 | * | inv2004_ joined #nim |
12:14:37 | inv2004_ | I did: proc auth(): Future[JsonNode] {.async.} and result.add(json) internally. It compiles, but I have "SIGSEGV: Illegal storage access. (Attempt to read from nil?)" is it ok ? |
12:15:15 | Yardanico | can you somehow make a reproducible example? and is it with latest stable nim? |
12:15:24 | Yardanico | maybe your "json" variable is not initialized |
12:15:54 | * | s4mu3lbk joined #nim |
12:16:37 | * | andinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
12:16:38 | Yardanico | oh yeah, I just tested it |
12:16:43 | Araq | eliezedeck: stdlib additions are not language features |
12:16:49 | Yardanico | you didn't initialize that "json" variable most likely |
12:16:59 | inv2004_ | @Yardanico, if it would not be initialized I would expect compile error anyway, let me create one |
12:17:12 | Yardanico | inv2004_: well I already made it myself kinda |
12:17:16 | inv2004_ | Nim Compiler Version 1.0.6 [Linux: amd64] |
12:17:24 | inv2004_ | @Yardanico, nice |
12:17:29 | Yardanico | but JsonNode is a "ref" so in "var json: JsonNode" json will be "nil" |
12:19:14 | inv2004_ | But I do echo json.pretty and I see it |
12:19:29 | Yardanico | well, then can you make an example? :) |
12:19:46 | Yardanico | in my code I just tries to declare "var a: JsonNode" and "result.add(a)" with the proc definition like in your case |
12:20:03 | FromGitter | <eliezedeck> Here is the bug report: https://github.com/nim-lang/Nim/issues/13856 |
12:21:37 | * | Guest40604 quit (Ping timeout: 250 seconds) |
12:22:13 | FromGitter | <eliezedeck> At this time, I'm going to have to prepare and send a string |
12:22:40 | FromGitter | <eliezedeck> and on that subject: how can I get a string from a pointer (created using `alloc()`) ? |
12:23:03 | * | dadada joined #nim |
12:23:07 | FromGitter | <eliezedeck> may be casting? but then that won't have a proper length |
12:23:17 | * | andinus joined #nim |
12:23:26 | * | dadada is now known as Guest19241 |
12:23:40 | FromGitter | <eliezedeck> ... it's been a while since I last used Nim, I'm relearning again :) ... |
12:23:44 | FromDiscord | <Recruit_main707> varname[] will give you what the pointer points to |
12:24:29 | FromGitter | <eliezedeck> and what about the length? needless to say that this is an buffer that has plenty of null-char in it |
12:25:17 | FromDiscord | <Rika> prolly have to figure the length out yoursel |
12:25:18 | FromDiscord | <Rika> f |
12:25:27 | * | rockcavera joined #nim |
12:25:52 | FromGitter | <eliezedeck> I know the length |
12:26:28 | FromDiscord | <Recruit_main707> then what length do you want? |
12:26:31 | FromGitter | <eliezedeck> source is: `pointer` + `length` .... desired outcome: `string` with length |
12:26:38 | Yardanico | well I'm not sure if that's really correct |
12:26:51 | Yardanico | but I did $cast[cstring](outData) in some project where "outData" is "ptr cuchar" |
12:27:38 | Yardanico | basically to create a nim string out of C string (it'll do an allocation too because nim strings are GC'd IIRC ) |
12:28:50 | * | waleee-cl joined #nim |
12:29:35 | FromGitter | <eliezedeck> it is a `pointer` to a series of `uint8`, just a sequence of bytes ... I allocated it using `alloc()` so I know the exact `length` ... but to create a string out of it, one will have to cast, and *then*, also set some may be hidden field for the `.len` to be reported correctly, right? |
12:29:50 | inv2004_ | @Yardanico, https://gist.github.com/0a71607514cb278bcd64543c225e1166 |
12:29:51 | Yardanico | well idk how it worked lol |
12:29:51 | FromGitter | <eliezedeck> or, may be, I should have created a `string` in the first place? |
12:30:01 | Yardanico | why are you even doing alloc ? |
12:30:17 | Yardanico | inv2004_: ahhh |
12:30:21 | Yardanico | I understand now |
12:30:28 | FromDiscord | <Rika> you'd prolly have an easier time making the string first then the cstring |
12:30:28 | Yardanico | basically your "result" is uninitialized |
12:30:34 | FromGitter | <eliezedeck> @Yardanico: alloc 50 MB or memory? |
12:30:46 | Yardanico | you must do result = newJsonNode() and after that you can append to it |
12:30:47 | FromGitter | <eliezedeck> *of |
12:31:16 | Yardanico | ah sorry |
12:31:26 | Yardanico | it's newJObject |
12:31:34 | inv2004_ | @Yardanico, But it is Future. I would say that should be Future[seq[JsonNode]] probably |
12:31:37 | Yardanico | or actually |
12:31:48 | Yardanico | inv2004_: why do you need a seq of json nodes though? |
12:31:51 | Yardanico | why not a json array |
12:32:03 | Yardanico | "result = newJArray()" and then add json nodes to it |
12:32:04 | inv2004_ | Because I like normal seq more than json :) |
12:32:49 | inv2004_ | But result = newJArray() does not help also |
12:32:59 | inv2004_ | maybe because it is Future |
12:33:07 | Yardanico | inv2004_: it does help |
12:33:18 | Yardanico | https://play.nim-lang.org/#ix=2gto |
12:33:50 | inv2004_ | Maybe my local nim is 1.0.4 |
12:34:04 | Yardanico | it works on 1.0.4 on playground |
12:34:11 | inv2004_ | https://gist.github.com/inv2004/0a71607514cb278bcd64543c225e1166 |
12:34:28 | Yardanico | yes that works for me |
12:34:33 | Yardanico | and it works on playground with 1.0.4 too |
12:34:45 | inv2004_ | I am a bit confused - does not work for me :) |
12:34:48 | Yardanico | try to --forceBuild ? |
12:34:52 | Yardanico | maybe something got cached or idk |
12:35:36 | Yardanico | it even works on the oldest nim version on playground - 0.13.0 :P |
12:35:58 | inv2004_ | Ah, I have 1.0.6, but --forceBuild did not help |
12:36:11 | inv2004_ | let me go to another machine |
12:36:15 | Yardanico | well really strange, are you sure you actually recompile the file? did you save it? |
12:36:40 | FromGitter | <eliezedeck> alright ... so, how can I create a string with a specific length? preferably without having to zero-out (or set) its content? |
12:36:43 | inv2004_ | ok, it works on another linux machine |
12:37:11 | Yardanico | @eliezedeck there are both newString and newStringOfCap |
12:37:20 | inv2004_ | One question: Do I undestand correct that "result" should not initialize Future for {.async.} ? |
12:37:21 | FromGitter | <eliezedeck> cool ... thanks |
12:37:29 | Yardanico | inv2004_: yeah, async macro does that automagically :P |
12:37:36 | Yardanico | with newString you need to assign data like str[0] = 'a', str[1] = 'b' , etc |
12:37:54 | Yardanico | with newStringOfCap you do str.add("stuff"); str.add("morestuff") |
12:38:04 | inv2004_ | That is why, if I set seq[JsonNode] - then it should init automatically without newJArray |
12:38:22 | FromDiscord | <Rika> for wrapping i think you want newString and not the OfCap one |
12:38:32 | Yardanico | @Rika I don't think he's wrapping though |
12:38:40 | Yardanico | inv2004_: it depends on how your code works |
12:38:53 | Yardanico | like do you need a JSON with an array of these values, or you _really_ need a seq of json nodes? |
12:38:55 | inv2004_ | and fine, seq[JsonNode] is why |
12:39:08 | FromDiscord | <Rika> Yardanico, im just sayin thougj |
12:39:35 | inv2004_ | ok, another question: why the JsonNode is not initialized somehow to default value ? |
12:39:41 | Yardanico | because it's a "ref" |
12:39:49 | Yardanico | all "ref" objects have a "nil" value |
12:39:54 | FromDiscord | <Rika> anything ref is default nil |
12:39:54 | Yardanico | "ref" is GC'd pointer |
12:40:14 | Yardanico | I mean traced/managed/etc |
12:40:18 | * | josch557 joined #nim |
12:40:44 | FromDiscord | <Rika> i still dont know the difference of `pointer` and `ptr`... |
12:41:10 | inv2004_ | @Rika, I suppose one with type and another is not |
12:41:14 | Yardanico | yeah |
12:41:22 | Yardanico | 4raq's reply from the forum from 2015: "ptr without anything is a typeclass, perhaps it would have been better to use SomePtr for that instead. ptr[T] is the same as ptr T, pointer is just the untyped pointer, like C's void*." |
12:41:26 | Yardanico | https://forum.nim-lang.org/t/823#4753 |
12:41:34 | FromDiscord | <Rika> huh |
12:42:04 | FromDiscord | <Rika> so from increasing "unsafeness", its ref -> ptr -> pointer |
12:42:16 | inv2004_ | ok, I have to think is it problem or not to have unitialized ref :) and what would I have in rust |
12:42:39 | Yardanico | well if you will automatically initialize it then you'll lose some performance in some cases |
12:42:52 | Yardanico | like what if you wouldn't want to initialize it? |
12:42:54 | FromDiscord | <Rika> you cant do much with an uninitialized ref |
12:43:07 | FromGitter | <eliezedeck> thanks @Yardanico |
12:43:20 | inv2004_ | It is why, probably I would expect warning from compiler |
12:44:43 | Yardanico | well maybe with https://github.com/nim-lang/Nim/pull/13808 some annotations can be added to stdlib types |
12:47:32 | inv2004_ | I would be fine, because in 5 minutes I had a feeling like I returned to the age when I was C-dev :) After Rust it was a bit painful :) |
12:47:43 | * | couven92 joined #nim |
12:47:46 | Yardanico | well, I would prefer nim style over Rust anyway |
12:47:52 | Yardanico | rust just seems too verbose for me |
12:48:02 | FromDiscord | <Recruit_main707> ^ |
12:48:22 | inv2004_ | I do the same, but the question about the nil-refs is also important I suppose |
12:49:55 | Yardanico | well yeah, there's always work in safety direction |
12:50:02 | Yardanico | but you need to understand that it's not easy :P |
12:52:26 | inv2004_ | I am just trying to compare how rust would help to avoid the problem |
12:52:42 | Yardanico | well yeah I understand that rust is all about safety, i'm not doubting that |
12:53:23 | FromDiscord | <Recruit_main707> too safe and verbose for me, there is no fun if there is no little risk |
12:53:24 | inv2004_ | I am not trying to compare best/not best. Is it possible with result only? |
12:53:38 | Yardanico | as I said, initialize it |
12:53:45 | * | endragor quit (Remote host closed the connection) |
12:55:18 | FromGitter | <eliezedeck> Where can I find the implementation of `string.add()` => `AppendStrStr ` ... in the source, it's just magic :) โ ultimately, what I'd like to know is the behavior of this function in regards to many calls to `string.add()` in trying to create the HTTP request body ... I'm trying to find an analogy with Golang's `bytes.Buffer`, which tries to reallocate the buffer if it grows beyond capacity with some smart |
12:55:18 | FromGitter | ... algorithms to avoid too many memory re/allocations |
12:55:39 | Yardanico | nim does that too AFAIK |
12:55:51 | FromGitter | <eliezedeck> Sweet! |
12:56:30 | Yardanico | or not, lemme check :D |
12:57:09 | Yardanico | ah yeah it does kinda |
12:57:10 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/compiler/ccgexprs.nim#L1120 |
12:58:44 | Yardanico | the most efficient way would be to use newString and then set values like data[0] = ... |
12:58:56 | Yardanico | but newStringOfCap is easier to use I think |
12:59:06 | FromGitter | <eliezedeck> yes, indeed |
12:59:17 | Yardanico | newStringOfCap preallocates too |
12:59:20 | FromGitter | <eliezedeck> but that code looks cryptic/complex |
12:59:29 | Yardanico | well it's C backend's code :) |
12:59:43 | Yardanico | I think the resizing logic is not exactly in there |
12:59:56 | Yardanico | ah right |
12:59:59 | FromGitter | <eliezedeck> yeah, that's what I was trying to look for |
13:00:23 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim#L199 |
13:01:40 | * | sunwukong quit (Quit: Leaving) |
13:02:11 | FromGitter | <eliezedeck> what is `nimIncrSeqV3 `? |
13:02:19 | FromGitter | <eliezedeck> or, what does it denote? |
13:02:30 | Yardanico | a define |
13:02:52 | FromGitter | <eliezedeck> yes, but do you know what does it mean? |
13:03:16 | Yardanico | these defines mostly exist for bootstrapping new nim compiler with old one |
13:03:25 | Yardanico | see https://github.com/nim-lang/Nim/blob/version-1-0/compiler/condsyms.nim#L34 (nimIncrSeqV3 is in there too) |
13:04:09 | FromGitter | <eliezedeck> it doesn't seem to allocate a bit more space that is needed |
13:04:47 | Yardanico | well it kinda does |
13:04:52 | Yardanico | https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim#L43 |
13:04:57 | FromGitter | <eliezedeck> yeah, but that's not helping in trying to know the actual meaning |
13:05:07 | Yardanico | but well, it's compiler logic :P |
13:05:25 | Yardanico | and string implementation |
13:06:30 | FromGitter | <alehander92> Araq i see you merged the sourcemap PR, i wondered if you want to somehow test the sourcemap itself |
13:06:35 | FromGitter | <eliezedeck> hmm... all I'm seeing is extra 7 bytes ... or may be I'm dumb |
13:07:09 | Yardanico | well yeah, 7 minimum and maybe + 1 (if I understand " + s + 1" correctly) |
13:07:29 | Yardanico | that code is not that new, and string appending is a hot path in quite a lot of programs, so it's all pretty optimized |
13:07:43 | FromGitter | <alehander92> i can also PR a little code removal for one global variable that's not needed now i think |
13:08:03 | FromGitter | <eliezedeck> but that's not of much importance in regards to large buffer use cases, my current use case is dealing with `string.add()` until it reaches 50 MB |
13:08:14 | Yardanico | well but you preallocate it |
13:08:18 | Yardanico | so why do you care? |
13:08:52 | FromGitter | <eliezedeck> and it can be much lower, like less than 5 MB at times |
13:09:39 | FromGitter | <eliezedeck> so, one would love for the language/compiler/... to take care of that kind of thing automatically |
13:09:48 | Yardanico | what thing exactly? |
13:09:54 | Yardanico | how it can predict the future? :P |
13:10:15 | Yardanico | let's not try to compare the code but rather compare the actual performance :) |
13:10:46 | FromGitter | <alehander92> @eliezedeck the language probably does, but its not clear what you want |
13:11:05 | Yardanico | @alehander92 they asked if the compiler does some "smart" string preallocation |
13:11:12 | FromGitter | <alehander92> actually, the simplest way `add` can work is by periodically reallocating stuff |
13:11:19 | FromGitter | <alehander92> i dont see what simpler way is to do it |
13:11:47 | FromGitter | <alehander92> like, i suppose "allocate certain capacity, if len > capacity, allocate function(currentcapacity)" |
13:11:49 | FromGitter | <alehander92> etc |
13:11:51 | FromGitter | <eliezedeck> you are right, it doesn't predict the future indeed ... I'm just trying to translate an existing Golang app to Nim ... I used `bytes.Buffer`, which does smart reallocation |
13:12:16 | FromGitter | <alehander92> but what is "not smart" reallocation |
13:12:33 | FromGitter | <alehander92> is it reallocation after each `add` |
13:12:47 | FromGitter | <eliezedeck> that would not be smart |
13:12:50 | FromGitter | <alehander92> :)))) |
13:12:53 | FromGitter | <eliezedeck> :D |
13:13:02 | FromGitter | <alehander92> sorry |
13:13:12 | FromGitter | <eliezedeck> anyway, let's drop that |
13:13:20 | FromGitter | <alehander92> no, you're right |
13:13:37 | FromGitter | <eliezedeck> I think it would be better to manually implement that in a different library |
13:13:51 | FromGitter | <eliezedeck> I understand that string is a core part of the language |
13:14:05 | * | natrys quit (Ping timeout: 265 seconds) |
13:14:12 | Yardanico | why? |
13:14:13 | FromGitter | <eliezedeck> and the feature that I'm referring too, even in Go, is from a library |
13:14:19 | Yardanico | well nim has Stream |
13:14:33 | Yardanico | it's just that httpclient doesn't support it for sending requests (yet) |
13:15:01 | FromGitter | <alehander92> @eliezedeck i dont understand the problem |
13:15:20 | FromGitter | <alehander92> strings and seq-s do smart reallocation |
13:15:23 | FromGitter | <eliezedeck> so, I suppose we don't have this kind of library yet in Nim, right? |
13:15:30 | Yardanico | what kind of library? |
13:15:32 | Yardanico | streams are in nim |
13:15:47 | Yardanico | but if you specifically mean streams for sending requests - they're not implemented in httpclient (yet) |
13:15:49 | FromGitter | <kaushalmodi> Benumbed: Glad you are finding my Nim notes useful :) |
13:17:14 | * | natrys joined #nim |
13:18:10 | FromGitter | <eliezedeck> like I said, I haven't used Nim for years, I'm not aware of a lot of things that have changed ... the last time I used Nim was I think in v0.4.x something โ I don't even know what Streams are now :) ... thanks for the information guys, I'll try to keep up |
13:19:12 | FromGitter | <alehander92> maybe you can use them |
13:19:34 | FromGitter | <eliezedeck> > strings and seq-s do smart reallocation โ For now, I'll trust what you say, but I'll have to see how it goes. Thanks |
13:20:20 | FromGitter | <alehander92> you're right that we should look at the source: i havent studied this particular part of it before |
13:27:36 | FromGitter | <alehander92> so from what i see https://github.com/nim-lang/Nim/blob/devel/lib/system/sysstr.nim#L18 |
13:27:38 | * | filcuc quit (Remote host closed the connection) |
13:27:38 | FromGitter | <alehander92> is being called |
13:27:49 | FromGitter | <alehander92> when a resize is needed, so here you can see the reallocation logic |
13:28:18 | FromGitter | <alehander92> (unless you use destructors etc which default nim iirc doesnt) |
13:28:31 | Yardanico | how is memory allocated/resized with --gc:arc btw? |
13:28:35 | FromGitter | <alehander92> this seems to return the new capacity, which seems to then be malloc-ed and the previous string to be memcopied there |
13:28:41 | FromGitter | <alehander92> hm, i have to try with --gc:arc |
13:28:53 | Yardanico | well I mean strings |
13:29:01 | Yardanico | memory itself is still memory, it wouldn't change with --gc:arc :D |
13:29:04 | * | filcuc joined #nim |
13:29:38 | * | sleepyqt joined #nim |
13:30:40 | FromGitter | <alehander92> it seems it does something similar |
13:30:46 | FromGitter | <alehander92> on low level |
13:31:25 | FromGitter | <alehander92> it calls reallocShared |
13:31:43 | * | filcuc quit (Client Quit) |
13:33:47 | * | filcuc joined #nim |
13:34:32 | FromGitter | <alehander92> interesting thing is it seems to often reallocate from existing gc lists free cells |
13:34:50 | FromGitter | <alehander92> and it allocates pages if this fails from os, e.g. `mmap` on posix |
13:35:17 | FromGitter | <alehander92> but you can also use -d:useMalloc , right |
13:35:21 | Yardanico | yeah |
13:35:42 | inv2004_ | Hey, hey, my first nim project :) https://github.com/inv2004/strava_nim |
13:36:11 | FromGitter | <alehander92> yes, if you do that, you just get `realloc` indeed |
13:36:18 | FromGitter | <alehander92> so thats predictable |
13:36:26 | Yardanico | inv2004_: 4-space indents oh no |
13:37:01 | inv2004_ | @Yardanico, it was another question! I set plugin into vs-code, and it did not change default ts=4 |
13:37:17 | inv2004_ | + ?nim format? did not change it also |
13:37:28 | Yardanico | it's nimpretty |
13:37:41 | Yardanico | and i doubt it will change number of spaces |
13:37:56 | Yardanico | inv2004_: you have to set indentation level globally in vscode I think |
13:38:02 | inv2004_ | yes, nimpretty. Ok, but anyway, I wondered, what nim-vscode did not overwrite default value for nim files |
13:38:42 | inv2004_ | @Yardanico, I am not sure that it is a rule, because a lot of plugins change it for your own files-types |
13:39:22 | FromGitter | <alehander92> hm, so thats interesting, following memory access patterns |
13:47:13 | FromGitter | <eliezedeck> > when a resize is needed, so here you can see the reallocation logic โ โ Thanks @alehander92 ... that is exactly what I was looking for ... now I can code in pease :D |
13:52:44 | FromGitter | <eliezedeck> So, I also take it that if I have a `string.len == 500` and the capacity is also 500, and I do a `string.setLen(0)` to truncate the length of the string, the underlying buffer will be reused and will still have the same capacity so I can `.add` more data to it, right? |
13:52:56 | FromGitter | <eliezedeck> I'm thinking to re-use the string |
13:53:51 | FromGitter | <eliezedeck> and may be: is there a kind of object pool library that I'm not aware of ? |
13:54:49 | * | endragor joined #nim |
13:55:16 | * | endragor quit (Remote host closed the connection) |
13:57:37 | Araq | right, reusing memory is easy with Nim's strings |
13:57:58 | FromGitter | <eliezedeck> Wonderful! |
14:10:36 | * | endragor joined #nim |
14:16:51 | * | endragor quit (Remote host closed the connection) |
14:18:31 | * | MarderIII joined #nim |
14:19:30 | Araq | I think I made a mistake and choosenim already knows about 1.2 :P |
14:19:33 | Araq | bbl |
14:19:57 | FromGitter | <eliezedeck> Yay!!! :P |
14:20:17 | FromGitter | <eliezedeck> can't wait for the blog post |
14:23:12 | FromGitter | <alehander92> @eliezedeck no problem |
14:26:30 | FromDiscord | <mratsim> @eliezedeck, setLen will reallocate if needed, if you want to preallocate a specific size use newStringOfCap |
14:27:01 | FromDiscord | <mratsim> then you now that realloc will only occur if you exceed the initial capacity you predefined with newSeqOfCap |
14:27:31 | FromDiscord | <mratsim> i.e. add + setLen + newSeqOfCap should give you all the flexibility you need |
14:28:17 | FromDiscord | <mratsim> regarding object pools I have 2 varieties depending on your use cases |
14:30:26 | FromDiscord | <mratsim> a simple one, that implements a simple bounded object pool: https://github.com/mratsim/weave/blob/master/weave/memory/persistacks.nim |
14:30:34 | * | couven92 quit (Ping timeout: 240 seconds) |
14:31:11 | FromDiscord | <mratsim> and a threadsafe unbounded memory pool that can only serve fixed-sized memory blocks: https://github.com/mratsim/weave/blob/master/weave/memory/memory_pools.nim |
14:32:25 | FromGitter | <eliezedeck> thanks @mratsim ... greetings and best regards from a fellow citizen :) |
14:41:05 | * | inv2004_ quit (Ping timeout: 265 seconds) |
14:41:18 | * | inv2004 quit (Ping timeout: 256 seconds) |
14:44:05 | * | solitudesf quit (Read error: Connection reset by peer) |
14:49:53 | * | abm joined #nim |
15:11:09 | * | inv2004 joined #nim |
15:11:09 | * | inv2004_ joined #nim |
15:12:14 | * | kenran quit (Ping timeout: 240 seconds) |
15:13:02 | * | filcuc quit (Quit: Konversation terminated!) |
15:16:50 | FromGitter | <maattdd> The doc website seems down : https://nim-lang.org/docs/manual.html |
15:16:56 | krux02 | mratsim: I think `shrinkToFit` and `reserve` from c++ is still missing. |
15:17:34 | krux02 | maattdd: maybe you can take this instead: https://nim-lang.org/0.11.0/theindex.html |
15:17:52 | krux02 | sorry |
15:17:54 | krux02 | outdated |
15:18:09 | liblq-dev | https://nim-lang.github.io/Nim/ |
15:18:32 | * | s4mu3lbk quit (Ping timeout: 256 seconds) |
15:18:38 | liblq-dev | is the latest devel documentation, but most of the time it's fine for regular use |
15:18:57 | * | inv2004_ quit (Quit: Leaving) |
15:19:00 | * | Mister_Magister quit (Excess Flood) |
15:19:13 | * | s4mu3lbk joined #nim |
15:21:14 | * | solitudesf joined #nim |
15:25:37 | * | Mister_Magister joined #nim |
15:37:08 | * | solitudesf quit (Read error: Connection reset by peer) |
15:48:44 | * | lritter joined #nim |
15:58:17 | Araq | who can update the #nim channel? |
15:59:41 | liblq-dev | I think dom96 can, but he isn't here atm |
16:02:50 | narimiran | https://nim-lang.org/blog/2020/04/03/version-120-released.html |
16:03:04 | FromDiscord | <clyybber> \o/ |
16:09:53 | FromDiscord | <Kiloneie> Nim documentation now has dark mode D:, wooo my eyes ! |
16:10:30 | FromDiscord | <Kiloneie> Wait what 1.2.0, wellp gotta install that |
16:12:35 | liblq-dev | 1.2 yay! \o/ |
16:19:00 | * | andinus quit (Quit: ERC (IRC client for Emacs 26.3)) |
16:19:08 | * | solitudesf joined #nim |
16:20:18 | FromGitter | <maattdd> @krux02 thanks :) |
16:20:35 | FromGitter | <maattdd> Another question: I guess the VM can't deal with opening socket at compiletime right ? |
16:20:57 | FromGitter | <maattdd> `/Users/matthieudubet/repos/Nim/lib/pure/net.nim(232, 12) Error: cannot evaluate at compile time: osInvalidSocket` |
16:22:25 | krux02 | maattdd: I realized it is very outdated, but better than nothing I guess. |
16:24:14 | FromGitter | <maattdd> Official link is back online anyway :) Might be related to the 1.2.0 release |
16:24:49 | dom96 | Nice, 1.2 |
16:26:03 | dom96 | Some grammar mistakes in that release article |
16:27:10 | dom96 | "We tried to keep breaking changes to a minimum" fun |
16:27:34 | narimiran | dom96: fix them ;) |
16:27:42 | dom96 | I am |
16:28:50 | dom96 | does --useVersion:1.2 work per-module? |
16:29:22 | FromGitter | <alehander92> hey is the sourcemap |
16:29:24 | FromGitter | <alehander92> in the changelog |
16:29:28 | FromGitter | <alehander92> or is it under 1.4 |
16:29:44 | FromGitter | <alehander92> i forgot to really write anything in the changelog |
16:30:21 | * | nsf joined #nim |
16:31:22 | dom96 | https://github.com/nim-lang/website/commit/76e3ce5a22b4badb29ee1f4a828cdbded234ba7e |
16:31:23 | * | vegai quit (*.net *.split) |
16:31:33 | * | vegai joined #nim |
16:31:54 | FromGitter | <alehander92> i guess it cant be as it just got merged |
16:31:54 | shashlick | unbelievable number of changes, fantastic job folks! |
16:32:19 | FromGitter | <alehander92> but i have to ping @skellock about it anyway :D |
16:32:20 | narimiran | dom96: :thumb up: |
16:32:58 | narimiran | @alehander92 your changes are in 1.2, but if you didn't write anything in the changelog then there's nothing about it in the changelog :) |
16:33:13 | FromGitter | <alehander92> ohh no |
16:34:18 | FromGitter | <alehander92> it should be inside, many people asked for it |
16:35:21 | narimiran | people asked to have a line in the changelog? :P |
16:36:08 | * | tefter quit (Quit: WeeChat 2.8) |
16:36:43 | FromGitter | <alehander92> well, to have sourcemaps for the javascript backend |
16:37:25 | FromGitter | <alehander92> it's something that should be mentioned in the "new features" of the release for sure |
16:38:09 | * | abm quit (Ping timeout: 250 seconds) |
16:41:30 | narimiran | @alehander92 can you write something and make a PR here: https://github.com/nim-lang/website ? |
16:41:49 | narimiran | this is the file you need to edit: https://github.com/nim-lang/website/blob/master/jekyll/_posts/2020-04-03-version-120-released.md |
16:42:36 | FromGitter | <alehander92> it might as well be in the `compiler changes`, sorry if i am being pushy, i just think it's eye-catching, as improved debugging/javascript support are often a discussion starter in forums |
16:42:44 | FromGitter | <alehander92> no problem |
16:43:04 | dom96 | better yet, write a separate article talking about your changes |
16:45:20 | FromGitter | <alehander92> well, that might be too much? i dont know |
16:46:29 | FromGitter | <alehander92> on the other hand i guess one can share that in javascript/web communities for some exposure |
16:46:52 | * | inv2004 quit (Ping timeout: 256 seconds) |
16:47:53 | * | inv2004 joined #nim |
16:50:43 | * | MarderIII quit (Ping timeout: 250 seconds) |
16:50:51 | dom96 | yep |
16:51:15 | dom96 | too much? We've got like no articles being written about things that Nim can do |
16:51:44 | FromGitter | <alehander92> awesome |
16:51:51 | FromGitter | <alehander92> ok, i can write a small one these days |
16:52:24 | FromGitter | <alehander92> otherwise writing about 3rd party projects really does it best imho(tho compiler writeups are also very cool) |
16:52:40 | FromGitter | <alehander92> e.g. the vim 3d post: suddenly it got so many random people to read about nim/nimble |
16:52:56 | FromGitter | <alehander92> because that's what sparks up people's imagination |
16:54:49 | FromGitter | <zetashift> 1) 2 looks superb, thanks for all the hard work! |
16:55:08 | * | Jesin quit (Quit: Leaving) |
16:55:56 | * | MarderIII joined #nim |
16:56:07 | Araq | alehander92: do you think it's production ready? (source maps) |
16:56:23 | Araq | I merged it because it looked good and we can always fix bugs later |
16:56:30 | dom96 | narimiran, why does the article not have a clear list of breaking changes? |
16:56:50 | FromGitter | <alehander92> Araq well, not sure , i think I expected it to be merged later |
16:57:06 | Araq | see? so test it well once again before you announce it :P |
16:57:23 | FromGitter | <alehander92> i absolutely want to, but i am not sure why it got included into 1.2 then |
16:57:54 | Araq | because 1.2 is not an LTS |
16:58:49 | FromGitter | <alehander92> i just thought we cant announce it in 1.4 if it's released in 1.2 :D |
16:59:20 | FromGitter | <alehander92> but yeah probably best to include it in some kind of experimental/compiler changes list with a note for people to play with it |
16:59:31 | dom96 | is 1.4 going to be an LTS? |
16:59:37 | FromGitter | <alehander92> (but still people need to know that it actually exists now) |
17:00:37 | Araq | dom96, IMO 2.0 is going to be one |
17:01:01 | federico3 | "new commits which have not already been backported" ? |
17:01:25 | dom96 | Araq, and what is that scheduled to break? |
17:02:10 | Araq | my plan is roughly: we add features in 1.2, 1.4, 1.6. features that can replace older features. and then 2.0 removes the old stuff |
17:02:55 | FromGitter | <alehander92> is incremental compilation still coming |
17:03:11 | FromGitter | <alehander92> for 2.0 |
17:03:15 | Araq | disruptek is/was working on it |
17:03:19 | FromGitter | <alehander92> i am willing to help in my spare time somehow if its still in the plans |
17:03:23 | Araq | and I'm trying to guide him |
17:03:24 | dom96 | Araq, right, so which features are you planning to remove? |
17:03:25 | FromGitter | <alehander92> ah ok |
17:03:59 | * | Vladar quit (Quit: Leaving) |
17:04:29 | Araq | dom96, don't quote me on that but we could remove implicit items/pairs, 'converter', redo concepts, redo "term rewriting macros", redo the .tags system |
17:04:54 | Araq | remove proc vs iterator overloading |
17:05:05 | FromGitter | <alehander92> whats the plan about the `.tags` system? |
17:05:06 | dom96 | okay, I can deal with that. Just don't remove GC or async await :P |
17:05:25 | dom96 | Also, we should talk about .tags. I wonder why you need breaking changes for that |
17:05:31 | FromGitter | <zetashift> feels good Nim 1.2 at the top of HN |
17:05:48 | FromGitter | <alehander92> wow, people actually use it fo rweb |
17:06:00 | Araq | dom96, DrNim can check for 'not Tag' |
17:06:02 | leorize | quarantine happens to get people to discover new things :) |
17:06:16 | * | PMunch joined #nim |
17:06:36 | Araq | and once we have the 'not' operator for tags the system is hopefully more useful |
17:07:32 | Araq | in general I like the fact that DrNim gives us a "staged" type system. the compiler does basic type checking, DrNim does the clever checking and proves things about your code |
17:07:39 | liblq-dev | wtf, repr() does not support uint16 |
17:07:48 | Araq | but it's too early to talk about DrNim really |
17:07:52 | FromGitter | <Vindaar> congrats for Nim 1.2! :) |
17:07:57 | dom96 | Araq, hmm, okay, interesting idea. |
17:07:59 | liblq-dev | under --gc:arc |
17:08:13 | dom96 | Araq, regarding my question above, can --useVersion be used per-module? Is that the plan? |
17:08:26 | Araq | dom96, you cannot. |
17:08:32 | Araq | but it might be a good idea |
17:08:51 | dom96 | without that I don't really see the point of this. |
17:08:58 | * | s4mu3lbk quit (Ping timeout: 256 seconds) |
17:09:01 | dom96 | You can much more easily and reliably just use an older Nim |
17:09:26 | FromGitter | <alehander92> Araq, but still would there be a way to annotate "positive" tags just one by one |
17:10:29 | * | Jesin joined #nim |
17:10:31 | FromGitter | <alehander92> because even if you can just write `not Blocking` for `a` (just my example, dont press on the blocking thing), you still have to write down other non-related tags for `b` which has the effect |
17:10:40 | * | s4mu3lbk joined #nim |
17:11:14 | FromGitter | <alehander92> which i think is making it hard, as often people would be interested in just some effects in their codebase, while wanting to ignore the others |
17:12:02 | rayman22201 | Yay 1.2 ๐ |
17:15:15 | FromGitter | <maattdd> the VM can't deal with opening socket at compiletime right ? I was trying to reimplement some procedural macro from Rust |
17:15:37 | FromGitter | <alehander92> what are you trying to do |
17:15:45 | dom96 | indeed, you cannot use the FFI at compile-time |
17:15:56 | dom96 | but you can call out to a process, so you can write what you need as a nim program and then exec it |
17:16:13 | FromGitter | <alehander92> also you might be able to workaround with some flags if its just for personal use |
17:16:15 | FromDiscord | <slymilano> Nim 1.2 hit the hackernews frontpage ๐ |
17:16:21 | FromGitter | <maattdd> I'm trying to write a func which connect to postgres and typecheck some sql query |
17:16:59 | FromGitter | <alehander92> nice! |
17:17:40 | * | dom96 is watching google analytics users rise |
17:17:45 | dom96 | 90 currently |
17:18:00 | FromGitter | <maattdd> (reimplement this basically https://github.com/launchbadge/sqlx#compile-time-verification ) |
17:18:04 | FromGitter | <alehander92> @maattdd so you can do this in general using `staticExec` as @dom96 said : in general you can even make this nice by using some serialization |
17:18:36 | FromGitter | <alehander92> one we talked with PMunch that one can make an api that lets you call typed runtime code from CT this way |
17:18:50 | leorize | @maattdd: you might be interested in this too: https://github.com/araq/ormin |
17:19:13 | PMunch | Huh? |
17:19:37 | PMunch | Oh nice 1.2.0 is out :) |
17:19:50 | PMunch | I guess it's time to check all my packages again for breakages.. |
17:20:06 | * | inv2004 quit (Ping timeout: 265 seconds) |
17:20:08 | leorize | @maattdd: and here's the documentation: https://github.com/Araq/blog/blob/master/ormin.rst |
17:20:08 | FromGitter | <alehander92> well, i had this strange idea that you can write something like `run: code` and on compile time to put it in a file, compile it if needed and staticExec it and decode the results from the exec |
17:20:23 | FromGitter | <alehander92> i think this was because of some of your code PMunch but i might not remember well |
17:20:25 | PMunch | Ah right, yes I remember we talked about that |
17:20:39 | PMunch | I don't think I needed it for anything in particular |
17:20:50 | PMunch | But I might've |
17:21:02 | FromGitter | <alehander92> @maattdd but you can put your code in a normal nim module, generate all the typeinfo there and just return as e.g. json |
17:21:13 | PMunch | That's kinda how scopes works (the programming language) |
17:21:15 | FromGitter | <alehander92> and load it from your lib using staticExec |
17:21:26 | FromGitter | <alehander92> which might be even faster, as you dont run this in the vm |
17:21:32 | FromGitter | <maattdd> actually I think this kind of "typesafe" ORM is the wrong approach, because it need to support an arbitrary set of SQL constructs. The only way to support *exactly* what your database supports is to call postgres decribe feature. |
17:21:43 | PMunch | Well it certainly depends on what you're doing |
17:21:55 | FromGitter | <alehander92> so this way it can work: and you can generalize it for different databases |
17:22:03 | FromDiscord | <Chiqqum_Ngbata> How to write a type for a proc that may contain a side effect? |
17:22:09 | PMunch | But if you want to do some heavy processing then offloading that to a compiled program might offer a performance benefit |
17:22:39 | leorize | @Chiqqum_Ngbata: then it'd just be a normal proc type |
17:22:45 | PMunch | Chiqqum_Ngbata, what do you mean? |
17:22:55 | leorize | the opposite of `{.noSideEffect.}` is to not specify it :P |
17:23:03 | FromGitter | <alehander92> now, calling the other one might feel icky, but i think it is not really hard |
17:23:06 | Araq | maattdd well ymmv but I've never written a single program where I need to support "an arbitrary set of SQL constructs" |
17:23:18 | PMunch | Yeah, that's just a normal `proc`. If you want to have no side effects then you can use `func` or the `noSideEffect` pragma |
17:23:30 | FromGitter | <maattdd> @alehander92 indeed, I guess I can glue something with staticExec |
17:23:38 | Araq | it also sounds like a security desaster |
17:23:57 | PMunch | Nice top comment on HN :) |
17:24:01 | FromGitter | <alehander92> @maattdd one can even make a good api for that, but if you just use it for one lib, its not needed |
17:24:15 | dom96 | That dark mode though. Big props to whoever implemented that! |
17:24:45 | FromDiscord | <Chiqqum_Ngbata> I have a type for a normal proc. The implementation is a proc that has a side effect (in v1.2 seems os.sleep() side-effects, makes sense I guess) |
17:25:02 | FromDiscord | <Chiqqum_Ngbata> Not sure how to adjust the type to accommodate proc that may contain side effect |
17:25:56 | FromGitter | <alehander92> but procs with side effects are normal procs |
17:26:03 | FromGitter | <maattdd> @Araq Well obviously you need a DB access at compile-time :) |
17:29:20 | FromDiscord | <Chiqqum_Ngbata> type mismatch: got <tuple of (proc (): Thing{.gcsafe, locks: 0.})> but expected 'tuple of (proc (): Thing{.noSideEffect, gcsafe, locks: <unknown>.})' |
17:29:25 | FromDiscord | <Chiqqum_Ngbata> Type doesn't have any pragmas |
17:29:38 | leorize | how did you define the type? |
17:29:48 | FromGitter | <alehander92> ah so you want to accept funcs in place of procedures |
17:30:11 | FromGitter | <alehander92> huh, yeah there should be a rule for that in the type system somewhere |
17:30:38 | FromDiscord | <Chiqqum_Ngbata> type FnType* = proc(a: string, b: string): RetType |
17:31:37 | PMunch | Hmm, what's the difference between useVersion and just choosenim-ing the version you want? |
17:31:51 | leorize | you get to use the newer stdlib :P |
17:32:03 | PMunch | Aah |
17:33:02 | livcd | should choosenim update self work? |
17:33:04 | livcd | dom96: |
17:33:16 | dom96 | leorize: huh? How do you? |
17:33:21 | dom96 | livcd, sure |
17:33:40 | livcd | Error: unhandled exception: 404 Not Found [HttpRequestError] |
17:34:55 | FromGitter | <zetashift> shoudln't you do choosenim update stable? |
17:35:02 | FromGitter | <zetashift> or you want to update choosenim itself? |
17:35:37 | livcd | update stable works |
17:35:57 | livcd | update self should update choosenim binary no? :D |
17:37:28 | dom96 | livcd, yeah, maybe you got a broken choosenim version. Can you update manually and try again? Just download https://github.com/dom96/choosenim/releases/download/v0.6.0/choosenim-0.6.0_windows_amd64.exe |
17:37:34 | dom96 | and replace your choosenim.exe with it |
17:37:38 | livcd | yes please |
17:38:55 | livcd | do you also set env vars with choosenim? |
17:40:22 | FromGitter | <zetashift> update self works fine for me tho(but I got the latest version already so I don't know how it checks that) |
17:41:21 | livcd | well it's not a biggie i usually just dump Nim to my kitchen sink path |
17:42:51 | FromDiscord | <Chiqqum_Ngbata> Surely there is a way to capture a proc that might contain side effect? |
17:44:20 | livcd | btw can one get a Nim compiler version from the binary it compled? |
17:46:25 | liblq-dev | what is the overhead of `sequtils.any` and `sequtils.all` compared to just making a regular for loop? |
17:47:01 | leorize | function call overhead |
17:47:06 | leorize | use anyIt or allIt to avoid it |
17:47:53 | leorize | also if the proc passed to is a closure then there's that as well |
17:50:34 | leorize | Araq: what do you think about a function in macros that let you check if a generic matches with the type symbol that you have? |
17:50:40 | Araq | dom96, effictively it's how C/C++ handle this too, eg. -std=gnu++14 |
17:50:59 | * | luis_ joined #nim |
17:51:01 | leorize | ie. something to check if `int` matches the `T` in `proc something[T: SomeInteger](i: T)` |
17:51:11 | Araq | and if you don't see the point of that consider that you might want to use old code on a new platform |
17:51:31 | Araq | so "just use an old compiler" doesn't work well in practice |
17:51:54 | * | luis_ quit (Client Quit) |
17:52:13 | Araq | leorize, macro expansion is often done before typechecking though |
17:52:23 | * | luis_ joined #nim |
17:53:36 | leorize | then I guess I should complete the `{.borrow: identifier.}` feature instead of trying to write a macro for it... |
17:53:55 | planetis[m] | congratulations on the new release people! well done! |
17:54:10 | Araq | thanks! |
18:03:07 | * | rockcavera quit (Remote host closed the connection) |
18:05:41 | * | josch557 quit (Ping timeout: 252 seconds) |
18:10:28 | * | Vladar joined #nim |
18:17:23 | * | luis_ quit (Quit: luis_) |
18:18:01 | * | luis_ joined #nim |
18:21:56 | * | luis_ quit (Client Quit) |
18:21:57 | * | Jesin quit (Quit: Leaving) |
18:27:51 | * | luis_ joined #nim |
18:29:11 | rayman22201 | @dom96 I would riot with you if async were removed lol, and while I'm an arc fan boi, even I have come around to the idea that leaving the other gc's is a good idea :-) |
18:29:48 | * | inv2004 joined #nim |
18:31:55 | FromDiscord | <exelotl> "Added a `with` macro for easy function chaining thatโs available everywhere" |
18:32:28 | * | couven92 joined #nim |
18:32:43 | FromDiscord | <exelotl> This one is a bit misleading because you still have to import it |
18:33:08 | FromDiscord | <exelotl> At least in the playground where I tried it |
18:33:23 | leorize | yep, you still have to import it:) |
18:33:57 | * | kenran joined #nim |
18:35:08 | FromDiscord | <exelotl> Will it be moved to system in the future, if it sees good adoption? |
18:35:20 | PMunch | Link to an example? |
18:35:22 | * | s4mu3lbk quit (Quit: WeeChat 2.3) |
18:35:29 | leorize | I think we should keep things out of `system` |
18:35:36 | leorize | that module is just huge |
18:36:16 | FromDiscord | <exelotl> In that case I guess it should be moved to sugar in the future instead then |
18:38:07 | * | rockcavera joined #nim |
18:40:30 | FromDiscord | <dryajov> question, what is -d:smokeCycles |
18:40:30 | FromDiscord | <dryajov> this seemed to trigger GC collects much more frequently and aggressively |
18:46:34 | leorize | it basically tell the gc to collect cycles at all costs |
18:47:09 | leorize | the gc usually defers cycle collecting until it passes a threshold |
18:48:35 | Araq | rayman22201, fwiw I still think once I fixed more bugs 'thinout' will work well enough |
18:49:46 | Araq | with a slight modification to async it might work |
18:49:59 | * | Trustable joined #nim |
18:51:51 | FromGitter | <ksandvik_gitlab> Congrats to 1.2! |
18:52:48 | FromGitter | <ksandvik_gitlab> Quick question, each time I do choosenim update devel I'm getting: โ Extracting nim-1.1.1-osx.tar.xz โ Is this still top of trunk? |
18:54:12 | leorize | guess we haven't bumped the version to 1.3 for devel yet |
18:57:37 | * | luis_ quit (Ping timeout: 272 seconds) |
18:57:51 | Araq | ksandvik_gitlab: update your choosenim please |
19:01:48 | * | kenran quit (Ping timeout: 256 seconds) |
19:02:19 | shashlick | livcd: for choosenim, do you mean setting up PATH? |
19:02:47 | shashlick | ksandvik - update devel will update to latest nightly release |
19:02:55 | shashlick | if you want 1.2, use stable |
19:03:06 | shashlick | devel will become 1.3.x soon |
19:03:07 | FromGitter | <ksandvik_gitlab> choosenim update self โ Updating choosenim โ โ ``` Info: Already up to date at version 0.6.0``` [https://gitter.im/nim-lang/Nim?at=5e87886b17a95e30a19ad48e] |
19:03:37 | FromGitter | <ksandvik_gitlab> So I assume then that Extracting nim-1.1.1-osx.tar.xz is dev trunk.... |
19:04:38 | FromGitter | <ksandvik_gitlab> or soon.... |
19:05:23 | shashlick | it is the last devel nightly build |
19:05:35 | Zevv | ah 1.2, i missed the party! |
19:05:35 | shashlick | if you want #head then use `choosenim update devel --latest` |
19:06:12 | FromGitter | <ksandvik_gitlab> Thx, adding that to my notes. |
19:06:17 | rayman22201 | Araq: cool. I hope it works, for the sake of all the existing async code. I still think it's worth investigating this alternative async implementation for the memory efficiency benefits. |
19:06:32 | Araq | rayman22201, oh definitely! |
19:06:38 | FromGitter | <alehander92> where is disruptek |
19:06:49 | liblq-dev | oh, hi Zevv |
19:06:51 | FromGitter | <alehander92> !last disruptek |
19:06:56 | Araq | alehander92: busy, his country is burning |
19:07:09 | FromGitter | <alehander92> ughhhh |
19:08:27 | rayman22201 | Lol. He didn't come to my part of the country fast enough |
19:09:51 | FromGitter | <alehander92> didnt he live in a truck |
19:10:04 | FromGitter | <alehander92> i hope he's fine with their new rules |
19:10:29 | * | inv2004 quit (Ping timeout: 265 seconds) |
19:11:02 | shashlick | he's just on vacation |
19:11:50 | dom96 | shashlick, am I misremembering, I thought semantics of `choosenim update devel` were going to remain as-is? :( |
19:12:16 | shashlick | you wanted `choosenim update devel` to install nightlies and `--latest` to install head |
19:13:28 | dom96 | right, I was hoping the messages would be clearer about what the nightly being installed is |
19:13:38 | Zevv | liblq-dev: you had problems, but i only saw the error dump, not what caused it. care to share? |
19:14:07 | liblq-dev | yea I was going to submit an issue but then forgot about it |
19:14:17 | liblq-dev | all I tried to do was `patt("frame=")` |
19:14:22 | Zevv | and why are you changing your nick all of the time, thats confusing as hell |
19:14:25 | FromGitter | <zetashift> he's on vacation..during lockdown? |
19:14:30 | liblq-dev | sorry dude, lqdev was taken |
19:14:50 | liblq-dev | freenode is purging the nick database soon though so maybe I'll be able to get it back :) |
19:15:00 | Zevv | for me you are now "the guy with something l something q seomething" |
19:15:09 | liblq-dev | lol |
19:15:45 | * | luis_ joined #nim |
19:15:46 | liblq-dev | but while you were away I moved to plain IRC from Matrix, the lag pissed me off |
19:15:55 | liblq-dev | but it turned out that the name 'lqdev' was taken |
19:16:11 | liblq-dev | I quickly had to come up with a different name, this is the resultโฆ |
19:16:56 | shashlick | dom96: #head isn't updated yet so looks like devel is old - https://github.com/nim-lang/Nim/blob/devel/lib/system.nim#L2048 |
19:17:17 | Zevv | anyway, i'd like to hear how npeg barfed up on you, if you can reproduce |
19:17:40 | FromGitter | <alehander92> is npeg a dog now |
19:17:55 | dom96 | shashlick, so we don't have any functionality to detect this and let the user know yet, right? |
19:18:01 | Zevv | it"s whatever you want it to be |
19:18:10 | FromGitter | <alehander92> i can use a dog honestly |
19:18:28 | Zevv | its turing complete |
19:18:51 | liblq-dev | Zevv: somehow it's working now, but it didn't wanna work in my bigger module |
19:18:57 | liblq-dev | not sure what caused the crash |
19:18:58 | FromGitter | <alehander92> with so much dogfooding .. |
19:19:01 | FromGitter | <alehander92> not surprised |
19:19:33 | Zevv | hm ok, just let me know if you need any help on that. I'd like to keep up the hygiene on these kind of errors. |
19:19:38 | dom96 | Araq, I am part of the HN hive-mind: https://news.ycombinator.com/item?id=22772362 |
19:24:30 | shashlick | dom96: nope - it just downloads and installs latest release in devel branch |
19:25:06 | * | rnrwashere joined #nim |
19:27:37 | supakeen | Is the primary package index for nim the nim-lang/packages repository? :) |
19:28:04 | liblq-dev | yes |
19:28:08 | FromGitter | <zetashift> Yes but for easier browsing you have : https://nimble.directory/ |
19:29:06 | supakeen | Yea, I've seen it and some of the discussion surrounding versions/discoverability! |
19:29:24 | supakeen | I was wondering if there had been any movement on that front as most of the discussion seems to date back about a year. |
19:35:38 | * | rnrwashere quit (Remote host closed the connection) |
19:36:08 | FromGitter | <eliezedeck> How do I disable the `Async traceback:` stack trace ? I tried `--stacktrace:off`, but no |
19:37:12 | FromDiscord | <dryajov> thanks @leorize |
19:40:41 | rayman22201 | @dom96 and what do you have to say about the counterpoints in that thread? |
19:41:51 | * | Jesin joined #nim |
19:42:06 | shashlick | i think useVersion should be maintained for n-1 and perhaps n-2 at best so that people get enough time to transition |
19:42:39 | shashlick | after that, older versions should be cleaned out so that people can be expected to move on rather than being stuck with 1989's version of C |
19:43:07 | FromGitter | <eliezedeck> It seems that only `-d:release` will get rid of it!: โ โ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e8791cb9d4ed673c4256897] |
19:43:43 | shashlick | will make it a pain to keep libraries up to date but an old library from 15 years ago that is unmaintained is probably not useful either |
19:44:11 | shashlick | if it is useful, that someone will update it |
19:44:27 | dom96 | eliezedeck: don't think there is a way to get rid of it except that I'm afraid, feel free to make a PR to improve this (you can introduce this with a -d:noAsyncStacks or similar) |
19:45:28 | FromGitter | <eliezedeck> Oh, I see โ On another thing, what's with: `Cannot prove that 'result' is initialized. This will become a compile time error in the future. [ProveInit]`? how to fix this? |
19:46:47 | dom96 | rayman22201, ehh I guess. Still think it's time better spent elsewhere |
19:49:32 | FromGitter | <alehander92> well, is it initialized @eliezedeck |
19:49:35 | krux02 | eliezedeck: The correct way to handle it would be to open an issue on github about it if you can't get rid of the warning. |
19:50:10 | krux02 | before enforced initialization becomes a compile time error message, all issues related to it must be fixed. |
19:50:25 | FromGitter | <eliezedeck> @krux02 I believe someone already did |
19:51:00 | krux02 | well then you shouldn't worry about it becoming a compile time error. |
19:51:51 | dom96 | You do, if the compiler is complaining then it's likely to become a compile-time error. You probably just need to use the MyObject(field1: 124) object constructor syntax |
19:51:59 | dom96 | instead of setting each field manually |
19:54:41 | FromGitter | <eliezedeck> Oh, ok ... thanks for the tips |
19:55:52 | livcd | shashlick: yeah was thinking about setting the PATH |
19:56:22 | * | Jesin quit (Quit: Leaving) |
19:58:02 | shashlick | --firstInstall should ask you if you want to do it |
19:58:45 | shashlick | but only on windows |
19:59:50 | * | rnrwashere joined #nim |
20:04:29 | * | Jesin joined #nim |
20:09:41 | livcd | right |
20:12:09 | supakeen | Hey, I've been playing with asynchttpserver and pasted the example code in a test file but I end up with a traceback: https://bpaste.net/raw/XEMA my nim version is 1.2.0, what am I missing :) |
20:12:47 | supakeen | Sorry, I copy/pasted the example from here: https://nim-lang.org/docs/asynchttpserver.html |
20:17:40 | shashlick | Araq: had a question around wrapping C variables if you're here |
20:18:45 | * | liblq-dev quit (Quit: WeeChat 2.7.1) |
20:20:39 | * | MarderIII quit (Read error: Connection reset by peer) |
20:23:50 | * | moerm joined #nim |
20:23:52 | moerm | everyone |
20:24:16 | matlock | Where is the best place to raise an issue I am having with my account on the Nim forum? Thanks in advance. |
20:24:30 | PMunch | matlock, depends on the issue |
20:25:24 | matlock | PMunch, I am trying to set my e-mail to the e-mail associated with my Gravatar and I use for work, but when I put in it and click Save I get the message 'You cannot set a rank that is higher than yours.' |
20:27:35 | PMunch | Huh, that's strange. Try highlighting dom96 |
20:27:45 | PMunch | Well, I guess I just did.. |
20:31:02 | matlock | Happens in Edge and Firefox. In trying to change it I also got downgraded to moderated, my username here is haydenb. |
20:33:31 | matlock | Anyways, the snap packages of Nim are rebuilt nightly but I went ahead and triggered a build of 1.2 to go out on stable, so those are available with $ snap install nim-lang |
20:38:08 | FromGitter | <kaushalmodi> Congrats on the 1.2 release! |
20:38:49 | PMunch | !eval echo NimVersion |
20:38:51 | NimBot | 1.2.0 |
20:39:10 | PMunch | Yes! The auto-build and update of the playground is working :) |
20:39:11 | moerm | Yay! Hurray! |
20:40:47 | * | rnrwashere quit () |
20:41:43 | * | rnrwashere joined #nim |
20:43:23 | leorize | shashlick: just ask, maybe I can answer :) |
20:44:04 | FromGitter | <kaushalmodi> PMunch: ๐ |
20:44:31 | PMunch | Hmm, trying to make my tree edit distance library generic is proving to be a pain |
20:45:12 | * | nsf quit (Quit: WeeChat 2.7) |
20:45:48 | * | narimiran quit (Quit: leaving) |
20:55:00 | PMunch | This for example seems to fail: http://ix.io/2gx5/nim |
20:55:22 | PMunch | It suddenly doesn't recognise that `index` is port a parameter and the name of the procedure.. |
20:56:59 | * | NimBot joined #nim |
20:58:35 | Araq | PMunch: come on, that's bad code |
20:58:51 | Araq | why not use 'result'? |
20:58:56 | PMunch | Naming things are hard okay! |
20:59:19 | PMunch | Can I use result as the input variable? |
20:59:20 | moerm | Hello, Araq. Thanks for 1.2! |
20:59:44 | Araq | you're welcome. don't use DrNim yet though |
20:59:50 | Araq | it's still junk :-) |
21:00:10 | PMunch | Nope, apparently not.. |
21:00:39 | moerm | meaning? "totally useless"? "unreliable"? "lots of open ends dangling"? |
21:01:56 | PMunch | What about this then: http://ix.io/2gx5/nim |
21:02:06 | * | Pixeye quit (Ping timeout: 256 seconds) |
21:02:24 | PMunch | That last line I get an error: `Error: type mismatch: got <int, proc (x: var seq[T], i: Natural){.noSideEffect.}>` |
21:02:33 | PMunch | expression: forestdist[i1 - 1][0] + delete |
21:02:58 | PMunch | So it doesn't see delete as the int argument to zhangShasha, but rather as the delete procedure? |
21:04:25 | * | luis_ quit (Ping timeout: 264 seconds) |
21:04:26 | Araq | moerm: I need to implement 'old' properly and base it on a CFG |
21:04:43 | shashlick | @leorize @Araq - if a C header has a global variable - is there value in wrapping it if {.header.} is not included |
21:04:57 | * | inv2004 joined #nim |
21:05:01 | moerm | Araq Hmmm, OK (a bit grumbly because I was soooo hot for Drnim) |
21:05:07 | Araq | shashlick: what does that mean? |
21:05:43 | moerm | PMunch are you sure you want to name an arg just like the proc? |
21:06:04 | PMunch | I've fixed that now, as Araq said, not very good code |
21:06:33 | PMunch | It was just an issue with index being a verb and a noun.. |
21:06:47 | shashlick | Example https://github.com/svn2github/pcre/blob/10e4adbfe9aab5869079fba5edc0ce56fa1b078e/pcre.h.in#L489 |
21:07:14 | shashlick | Does pcre_malloc even exist if the header isn't included |
21:07:17 | leorize | shashlick: yes, you still have to wrap them |
21:08:08 | moerm | A global var in a header? Someone with a dark sense of humour ... |
21:08:16 | shashlick | Will it refer to the same memory |
21:09:04 | Araq | moerm: still waiting for your article :-) |
21:09:04 | leorize | yes, mark it with `{.importc.}` |
21:09:19 | leorize | and maybe `{.dynlib.}` |
21:09:37 | leorize | but `{.importc.}` should be more than enough |
21:10:04 | moerm | Aray Almost completed, sir |
21:10:23 | Araq | and btw DrNim received about 5 days of development, give me 5 more days and I'll use it myself for the Nim compiler :-) |
21:10:33 | shashlick | Ok makes sense |
21:11:07 | * | inv2004 quit (Ping timeout: 260 seconds) |
21:11:30 | moerm | Praise the Lord ... and right after Him, praise Araq! *g |
21:12:02 | Araq | but for the Nim compiler I'll add --assumeUnique |
21:12:37 | Araq | it's unsound but otherwise not useful for the Nim compiler |
21:13:18 | moerm | Araq ... like "restrict"? Makes sense |
21:13:47 | shashlick | Some questions feel dumb in retrospect but what can you do |
21:14:03 | Araq | moerm: lise 'assume restrict everywhere' |
21:14:06 | Araq | *like |
21:14:41 | PMunch | Huh, curiously removing the [T] from the closure procedure there fixed the issue.. |
21:15:04 | moerm | Araq As long as there is a way to declare an alias, no problem |
21:16:43 | FromDiscord | <kaderallam> Hello Guys, it's been a long time since i first tried to switch to Nim back in 2015/2016 then had not time and now i am again looking at a language to replace C/Python combination, I am looking at Go/Rust and of course Nim. |
21:17:22 | FromDiscord | <kaderallam> I have a question, is there a simple way to exchange/synchronise/persist data between nim program sitting on different servers |
21:18:00 | leorize | you can just turn data into json then beam them to whatever servers of your choice :) |
21:18:44 | * | Vladar quit (Quit: Leaving) |
21:19:58 | PMunch | Wait, when was this warning removed? "Warning: 'l' should not be used as an identifier; may look like '1' (one) [SmallLshouldNotBeUsed]" |
21:20:38 | FromDiscord | <kaderallam> Thanks @leorize how do you beam data between servers |
21:21:15 | PMunch | However you want |
21:21:41 | PMunch | HTTP is an obvious candidate |
21:22:08 | FromDiscord | <kaderallam> http is slow |
21:22:34 | FromDiscord | <kaderallam> is there a way to keep a tcp socket between nim programs and stream data over it |
21:22:38 | PMunch | You could use a straight socket if you'd like |
21:22:44 | PMunch | Sure |
21:23:11 | FromDiscord | <kaderallam> Thanks @PMuch |
21:24:09 | * | rnrwashere quit (Remote host closed the connection) |
21:24:37 | PMunch | Lots of new "faces" here today, is it because the 1.2.0 release and HN coverage? |
21:25:34 | FromDiscord | <kaderallam> Yeah I saw the 1.2 |
21:25:39 | FromDiscord | <kaderallam> on hackers news |
21:25:50 | FromDiscord | <kaderallam> and also i am killing myself trying to do rust |
21:27:12 | FromDiscord | <Rika> what 1.2 released?? |
21:27:18 | FromDiscord | <Rika> man am i not in touch lol |
21:28:01 | PMunch | Haha, yeah it dropped today |
21:28:26 | PMunch | kaderallam, Nim might be a good fit if you're trying to replace Python/C |
21:28:54 | PMunch | Not sure if you saw the Nim April fools joke, but it basically played on how Nim is great for exactly that usecase |
21:31:05 | * | rnrwashere joined #nim |
21:32:03 | * | Zectbumo joined #nim |
21:32:08 | FromDiscord | <Rika> `The compiler now warns about inheriting directly from system.Exception as this is very bad style.` WOOOOOOOOOO |
21:32:14 | FromDiscord | <Rika> yes! |
21:32:16 | FromDiscord | <kaderallam> no where can i see ? I did write some code in Nim just to test it a few years ago, ( https://github.com/aallamaa/desirnim ) but finally never made the switch |
21:33:03 | leorize | it's on the forum, you can't miss it :P |
21:33:17 | PMunch | kaderallam: https://forum.nim-lang.org/t/6136 |
21:33:32 | FromDiscord | <kaderallam> thx @PMunch |
21:37:22 | * | luis_ joined #nim |
21:42:10 | FromDiscord | <Rika> oh man, docs dark mode is now on stable docs |
21:45:28 | PMunch | Oof, my .choosenim directory is 11G.. |
21:48:20 | PMunch | https://uploads.peterme.net/choosenim.png |
21:48:30 | * | natrys quit (Quit: natrys) |
21:48:33 | PMunch | The red inner circle is toolchains |
21:48:43 | PMunch | The orange is downloads |
21:49:02 | FromDiscord | <Rika> what versions do you have??? |
21:49:25 | PMunch | And in each of those blocks in toolchains (one for each version) there is a c_sources folder that is the bulk of the thing |
21:50:10 | PMunch | https://uploads.peterme.net/choosenim_list.png |
21:50:16 | PMunch | Rika ^ |
21:50:22 | PMunch | Most of them I think :P |
21:52:44 | FromDiscord | <Rika> nim 0.11... |
21:53:17 | * | Trustable quit (Remote host closed the connection) |
21:54:23 | rayman22201 | Nim evangelism strike force engage :-P |
21:55:36 | PMunch | Rika, well I started using Nim around version 0.13 I think.. |
22:06:14 | * | solitudesf quit (Ping timeout: 265 seconds) |
22:11:52 | moerm | - falling back into the chat - hello to the new ones |
22:13:39 | FromDiscord | <Rika> hello moerm, i saw the post you made in the april fools thread |
22:13:45 | FromDiscord | <Rika> and i hate it lmao |
22:18:04 | Araq | uh oh |
22:20:58 | FromDiscord | <Rika> uh oh? |
22:21:57 | FromDiscord | <Recruit_main707> It was Araq to my iirc |
22:21:58 | leorize | PMunch: https://old.reddit.com/r/programming/comments/fub4s0/nim_v12_released/fmcdyv0/ <- you can advertise here :) |
22:22:17 | FromDiscord | <Recruit_main707> Released already!!! |
22:22:22 | FromDiscord | <Recruit_main707> HYPE |
22:23:47 | * | WilhelmVonWeiner quit (Ping timeout: 240 seconds) |
22:26:19 | * | rnrwashere quit (Remote host closed the connection) |
22:27:43 | * | rnrwashere joined #nim |
22:27:52 | * | inv2004 joined #nim |
22:28:18 | * | jegfish joined #nim |
22:32:38 | shashlick | PMunch: choosenim now deletes csources after installation |
22:32:58 | FromGitter | <brentp> ```[SYSASSERT] sizeof FreeCell โ Error: execution of an external program failed: ...``` [https://gitter.im/nim-lang/Nim?at=5e87b99a17666550b2024fb3] |
22:33:34 | PMunch | Oh, I guess I should update it then.. |
22:33:58 | FromGitter | <brentp> should i open an issue? this is on `Nim Compiler Version 1.3.1 [Linux: amd64]` |
22:34:25 | PMunch | choosenim v0.3.2 (2018-02-28 14:12:37) |
22:34:33 | PMunch | Right, I was a couple of versions behind.. |
22:34:35 | shashlick | v0.6.0 is latest |
22:34:39 | * | luis_ quit (Quit: luis_) |
22:34:43 | shashlick | but it won't clean up older versions |
22:34:47 | moerm | 1.3.1 ? From what I know we just got 1.2 |
22:34:54 | shashlick | so might want to xargs rm or something |
22:35:18 | shashlick | moerm: that will be the next devel version - like 1.1.1 |
22:37:05 | moerm | Ah, OK |
22:37:24 | PMunch | find . -type d -name c_code -exec rm -rf {} + |
22:37:35 | PMunch | Took that folder from 11.6G to 2.9G :P |
22:43:53 | * | rnrwashere quit (Remote host closed the connection) |
22:45:14 | * | rnrwashere joined #nim |
22:47:11 | moerm | Bye, cu soon |
22:47:17 | * | moerm quit (Quit: Leaving) |
23:01:29 | * | rnrwashere quit (Remote host closed the connection) |
23:08:37 | * | inv2004 quit (Quit: Leaving) |
23:08:52 | * | dddddd quit (Ping timeout: 256 seconds) |
23:15:40 | * | tane quit (Quit: Leaving) |
23:18:53 | * | noonien joined #nim |
23:35:43 | PMunch | Oh nice, StackOverflow now also has a darkmode |
23:43:34 | * | rnrwashere joined #nim |
23:46:14 | * | krux02_ joined #nim |
23:48:26 | * | krux02 quit (Ping timeout: 240 seconds) |
23:49:02 | * | PMunch quit (Quit: leaving) |
23:56:56 | FromDiscord | <exelotl> lol yeah that blew my mind |
23:57:34 | FromDiscord | <exelotl> I'm still using the april fools skin from last year lol |
23:57:43 | FromDiscord | <exelotl> (as a userscript) |
23:58:04 | FromDiscord | <exelotl> I wish github would get a dark mode |
23:58:44 | * | rnrwashere quit (Remote host closed the connection) |