| 00:00:10 | FromGitter | <timotheecour> can i make hintlink show linkcmd then? |
| 00:00:56 | FromGitter | <timotheecour> (instead of informationless "Link") |
| 00:10:26 | * | krux02 quit (Remote host closed the connection) |
| 00:14:50 | * | xet7 joined #nim |
| 00:16:30 | * | xet7 quit (Remote host closed the connection) |
| 00:18:21 | * | xet7 joined #nim |
| 00:18:58 | * | xet7 quit (Remote host closed the connection) |
| 00:21:00 | * | xet7 joined #nim |
| 00:21:55 | * | theelous3__ quit (Ping timeout: 246 seconds) |
| 00:22:05 | * | xet7 quit (Remote host closed the connection) |
| 00:22:46 | * | xet7 joined #nim |
| 00:23:48 | * | shpx joined #nim |
| 00:29:21 | * | theelous3 joined #nim |
| 00:35:03 | * | kinkinkijkin quit (Quit: Leaving) |
| 00:54:11 | * | kinkinkijkin joined #nim |
| 00:59:27 | * | xet7 quit (Quit: Leaving) |
| 01:03:07 | * | dddddd quit (Ping timeout: 240 seconds) |
| 01:03:51 | * | kinkinkijkin quit (Remote host closed the connection) |
| 01:07:47 | * | dddddd joined #nim |
| 01:20:09 | * | kinkinkijkin joined #nim |
| 01:28:21 | * | d10n-work quit (Quit: Connection closed for inactivity) |
| 01:33:43 | * | shpx quit (Quit: Textual IRC Client: www.textualapp.com) |
| 01:40:46 | * | theelous3 quit (Ping timeout: 250 seconds) |
| 01:47:58 | * | whaletechno joined #nim |
| 01:49:46 | * | ghost64 quit (Quit: See you!) |
| 01:50:24 | * | whaletechho quit (Ping timeout: 272 seconds) |
| 01:50:48 | * | ghost64 joined #nim |
| 01:55:55 | * | McSoFake quit (Ping timeout: 256 seconds) |
| 01:59:42 | * | zachk quit (Quit: Leaving) |
| 02:03:47 | * | PrimHelios quit (Ping timeout: 250 seconds) |
| 02:37:19 | * | leorize quit (Quit: WeeChat 2.3) |
| 02:37:36 | * | leorize joined #nim |
| 02:48:37 | * | kapil____ joined #nim |
| 02:58:55 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
| 03:00:01 | * | Tyresc quit (Quit: WeeChat 2.4-dev) |
| 03:00:01 | * | banc quit (Quit: Bye) |
| 03:00:38 | * | theelous3__ joined #nim |
| 03:16:00 | * | theelous3__ quit (Read error: Connection reset by peer) |
| 03:16:00 | * | banc joined #nim |
| 04:12:57 | * | ftsf joined #nim |
| 04:35:29 | bozaloshtsh | forward declarations are the work of the devil |
| 04:44:53 | bozaloshtsh | is there any way to see more than one compiler error? |
| 04:46:17 | * | dddddd quit (Remote host closed the connection) |
| 04:50:16 | * | nsf joined #nim |
| 04:55:10 | * | endragor joined #nim |
| 05:03:16 | * | stephenw` joined #nim |
| 05:05:18 | * | stephenwithav quit (Ping timeout: 250 seconds) |
| 05:21:04 | * | NimBot joined #nim |
| 05:25:05 | * | plushie quit (Quit: plushie) |
| 05:39:49 | FromGitter | <Varriount> bozaloshtsh: `nim check` |
| 06:00:32 | FromGitter | <timotheecour> i added --errormax which catches more types of errors than nim check |
| 06:23:21 | * | narimiran joined #nim |
| 06:47:31 | FromGitter | <AchalaSB> How to open/ read the any file from directory? and how to display it? |
| 07:10:31 | * | krux02 joined #nim |
| 07:11:22 | * | Vladar joined #nim |
| 07:19:15 | narimiran | `readFile` ? |
| 07:35:30 | FromGitter | <alehander42> @AchalaSB how do you want to display it? if it's a binary file, like a picture, it doesnt make sense to `echo` it, you need to invoke another program which displays it |
| 07:36:18 | FromGitter | <alehander42> (and in this case, probably you can just pass the path to that program: if you dont need to do anything else than show it, you probably dont need to directly read it) |
| 07:38:02 | FromGitter | <alehander42> you can invoke programs with execProcess or execShellCmd (again this is for reading e.g. image files) |
| 07:45:48 | * | narimiran quit (Remote host closed the connection) |
| 07:47:23 | * | narimiran joined #nim |
| 07:52:00 | * | narimiran quit (Remote host closed the connection) |
| 07:53:26 | * | narimiran joined #nim |
| 08:29:14 | FromGitter | <AchalaSB> Its an image or may be a text file |
| 08:29:41 | FromGitter | <AchalaSB> How to invoke it using another program? |
| 08:31:39 | FromGitter | <AchalaSB> let consider `var filecontent = readFile("/home/download/cat.png")` is a path. How can display my image?? |
| 08:34:12 | FromGitter | <alehander42> I told you: you see which program you have that can display images, how you can pass command args to it and then invoke it with execProcess or execShellCmd: please read their docs and try to do that first |
| 08:39:23 | FromGitter | <alehander42> (modules os.nim for example) |
| 08:39:28 | FromGitter | <alehander42> and osproc |
| 08:42:43 | FromGitter | <alehander42> Araq, I am just reading the nti nodes |
| 08:42:46 | FromGitter | <alehander42> and tm_ etc |
| 08:43:26 | FromGitter | <alehander42> Araq: what I mean is, I want cgen to generate the enum ones not only when reprEnum is used, but always when debug is in options |
| 08:44:09 | FromGitter | <alehander42> but not sure where to put it: in type section generation code(but genTypeSection seems empty, probably happens somehwere else?) , in enum literal generation code or somewhere else? |
| 08:44:22 | FromGitter | <alehander42> (the genTypeInfo invocation) |
| 08:52:46 | * | someone___ joined #nim |
| 08:53:02 | someone___ | hey! |
| 08:53:26 | someone___ | i'm trying to write a simple program that would compile to js |
| 08:53:40 | someone___ | it seems like closures work differently with js backend, is that so? |
| 08:56:47 | someone___ | oops, sorry, it was my mistake. all works if you start complaining about that something doesn't. |
| 09:00:59 | * | someone___ quit (Quit: Page closed) |
| 09:05:58 | * | floppydh joined #nim |
| 09:06:38 | * | narimiran quit (Remote host closed the connection) |
| 09:07:45 | * | narimiran joined #nim |
| 09:35:45 | Araq | alehander42: genTypeSection seems appropriate |
| 09:38:46 | * | endragor quit (Remote host closed the connection) |
| 09:45:42 | * | PMunch joined #nim |
| 09:49:45 | krux02 | https://www.youtube.com/watch?v=xUsAKstP-AQ&feature=youtu.be |
| 09:53:57 | FromGitter | <timotheecour> Hi @krux02 quick question if you’re here? |
| 09:55:01 | krux02 | yes |
| 09:57:38 | FromGitter | <timotheecour> just replying on this 1 point: ⏎ ⏎ > And btw, you did the mistake of importing strutils.cmpIgnoreStyle as well here: https://github.com/nim-lang/Nim/pull/10063/files#diff-dc05830f41a222a0b826e05a04ebd1e0R14 ⏎ Don't do it. [https://gitter.im/nim-lang/Nim?at=5c1cb91223323d58bd01a804] |
| 09:58:04 | FromGitter | <timotheecour> i ‘m not sure i agree, look at $nimc_D/compiler/wordrecg.nim |
| 09:58:30 | FromGitter | <timotheecour> it uses `from strutils import cmpIgnoreStyle` for this: ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5c1cb94623323d58bd01a9f5] |
| 09:58:32 | FromGitter | <timotheecour> proc findStr*(a: openArray[string], s: string): int = ⏎ for i in countup(low(a), high(a)): ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=5c1cb9486649aa1f82ab02a1] |
| 09:59:07 | FromGitter | <timotheecour> so the same `cmpIgnoreStyle` would be used |
| 10:03:45 | * | endragor joined #nim |
| 10:08:15 | * | endragor quit (Ping timeout: 250 seconds) |
| 10:13:04 | FromGitter | <krux02> yes same problem here. strutils.cmpIgnoreStyle is technically incorrect here, but it doesn.t cause a problem, because there are no identifiers used where the case of the first character matters. |
| 10:13:14 | FromGitter | <krux02> it just didn't cause a bug yet. |
| 10:14:45 | FromGitter | <timotheecour> ok so I’m just propagating an existing maybe-bug then; happy to fix in a separate PR since it’s pre-existing, to avoid conflating 2 things |
| 10:16:47 | FromGitter | <alehander42> @krux02 some of the frontends might target gdb < 7 without pretty printers ? but I doubt it, it is kinda old |
| 10:16:53 | FromGitter | <alehander42> (watching the video blog) |
| 10:16:55 | FromGitter | <timotheecour> at least we both agree that having 5 procs that do slightly different things with the same name is a terrible idea, and shd be fixed |
| 10:18:57 | Araq | I think it's high time you focus on more pressing issues |
| 10:19:12 | Araq | yes, parseEnum is optimized for "stuff comes from command line" |
| 10:19:34 | Araq | yes, it's slightly broken for convenience |
| 10:19:48 | Araq | but no, this is not a pressing problem |
| 10:20:40 | Araq | and while you're removing cruft others add new cruft like %* vs buildJson |
| 10:24:52 | FromGitter | <Vindaar> now I feel bad :P |
| 10:26:27 | * | stefanos82 joined #nim |
| 10:27:20 | Araq | sorry, wasn't my intention |
| 10:27:25 | Araq | I like buildJson |
| 10:27:48 | Araq | but now I'm faced with the decision if having both %* and buildJson is worse than just %* or not |
| 10:28:02 | Araq | and I made an old mistake |
| 10:28:17 | * | endragor joined #nim |
| 10:28:26 | Araq | I didn't communicate clear enough that it is a "if we do it, here is how..." |
| 10:29:11 | FromGitter | <timotheecour> i thought buildJson was settled and ready to ship... |
| 10:29:22 | Araq | ^ see :-) |
| 10:30:01 | Araq | in this case I say: ensure the docs and tests are really good and we'll merge and move on |
| 10:30:44 | Araq | btw the Fortran standard arrived https://wg5-fortran.org/f2018.html |
| 10:31:07 | Araq | which has a new "C interop" section that also seems to cover how to do matrixes and strides etc |
| 10:32:27 | * | endragor quit (Ping timeout: 240 seconds) |
| 10:40:21 | FromGitter | <Vindaar> heh, no worries, I was half joking ;) happy to make docs + tests really good though, if I'm given some guidance :) |
| 10:55:52 | * | endragor joined #nim |
| 10:56:15 | FromGitter | <mratsim> @araq, oh, I’m jumping ship to Fortran then :P |
| 10:57:34 | FromGitter | <mratsim> I hope the manual/Nim specs don’t become an “ISO-1234” reference fest |
| 10:59:16 | FromGitter | <gogolxdong> @alehander42 How do you use routing in karax? hashData or click? |
| 11:00:03 | * | endragor quit (Ping timeout: 245 seconds) |
| 11:07:07 | * | floppydh quit (Ping timeout: 240 seconds) |
| 11:08:43 | Araq | gogolxdong todoapp shows how routing can be done |
| 11:09:36 | * | floppydh joined #nim |
| 11:10:16 | FromGitter | <gogolxdong> There is an foreign node issue using click routing, echart works fine using hashPart . |
| 11:10:31 | FromGitter | <alehander42> yeah, I haven't used it iirc, I didn't really need it in electron |
| 11:12:08 | FromGitter | <dom96> What even is buildJSON? |
| 11:12:35 | * | narimiran quit (Remote host closed the connection) |
| 11:13:07 | FromGitter | <Vindaar> @dom96 https://github.com/nim-lang/Nim/pull/10037 |
| 11:22:07 | Araq | dom96 oh yeah, please take over :-) |
| 11:23:50 | * | PMunch quit (Remote host closed the connection) |
| 11:42:32 | FromGitter | <mratsim> ugh, how many people were pulled in that conversation |
| 12:04:56 | dom96 | Sorry, but I closed it |
| 12:08:51 | Araq | fine with me |
| 12:09:44 | Araq | at some point I'll write an araqslib nimble package that uses operators for everything |
| 12:10:42 | Araq | and it will have %*$ and %*$$ that uses marshal.$$ for super-stringifications |
| 12:11:27 | Araq | and $| for integrals |
| 12:12:08 | Araq | and $+ for sum |
| 12:12:18 | Araq | and $* for product |
| 12:12:41 | krux02 | ∫ΣΠ |
| 12:12:51 | krux02 | unicode for the win |
| 12:12:53 | krux02 | :P |
| 12:13:40 | Araq | and &* for the concatenative repeat |
| 12:15:17 | Araq | and $- for the derivation |
| 12:16:21 | krux02 | so you just want to reinvent APL |
| 12:17:08 | * | Trustable joined #nim |
| 12:17:48 | FromGitter | <mratsim> https://en.wikipedia.org/wiki/K_(programming_language) |
| 12:18:51 | FromGitter | <zacharycarter> most languages get by fine with marshalJSON unmarshalJSON |
| 12:19:51 | FromGitter | <zacharycarter> why not include that "interface" in the stdlib and then allow users to implement their own de/serializlation implementations |
| 12:20:18 | FromGitter | <zacharycarter> and use the json marshaling / unmarshaling facilities that are already present? |
| 12:21:16 | Araq | that's a different topic |
| 12:21:46 | FromGitter | <zacharycarter> okay |
| 12:25:34 | * | fthe joined #nim |
| 12:27:28 | * | floppydh quit (Ping timeout: 246 seconds) |
| 12:27:52 | FromGitter | <alehander42> I almost used Σ in my lang |
| 12:28:20 | FromGitter | <alehander42> actually its easy to type with a good editor plugin |
| 12:28:29 | FromGitter | <alehander42> but still wouldn't bet on it :D |
| 12:28:49 | FromGitter | <mratsim> debugging that in vim remote would be annoying ... |
| 12:29:07 | FromDiscord_ | <smal> I love using flame emojis in my code |
| 12:29:13 | FromDiscord_ | <smal> Makes it run faster |
| 12:29:52 | * | floppydh joined #nim |
| 12:30:16 | FromGitter | <alehander42> hm Araq, smal has a point, the compiler should handle a racecar emoji variable name as automatic `-opt:speed` |
| 12:30:25 | FromGitter | <mratsim> @smal, now you just need to upgrade your comments: https://github.com/pjreddie/darknet |
| 12:31:07 | FromGitter | <alehander42> ew |
| 12:31:34 | * | floppydh quit (Client Quit) |
| 12:32:46 | * | Tyresc joined #nim |
| 12:38:00 | FromGitter | <survivorm> Is this a sane world? ^D |
| 12:45:19 | * | fthe quit (Ping timeout: 246 seconds) |
| 12:57:37 | * | kapil____ quit (Quit: Connection closed for inactivity) |
| 13:02:32 | Araq | any ideas why tasynctry fails with 'nim cpp'? |
| 13:05:23 | * | kapil____ joined #nim |
| 13:20:59 | * | abm joined #nim |
| 13:22:51 | * | Snircle joined #nim |
| 13:32:06 | * | legogh joined #nim |
| 13:49:35 | * | legogh is now known as littleli |
| 13:54:01 | * | nsf quit (Quit: WeeChat 2.3) |
| 14:15:29 | littleli | hello everyone (waving) |
| 14:15:57 | FromGitter | <brentp> Hi am getting `SIGSEGV: Illegal storage access. (Attempt to read from nil?)` in a newSeq call from at least nim-0.19.0 and devel. Here is the gdb traceback: ⏎ ⏎ ```code paste, see link``` ⏎ ⏎ how would I go about debugging this? I am wrapping a C library and maybe something odd is happening there, but can't find anything suspicious. [https://gitter.im/nim-lang/Nim?at=5c1cf59dbabbc178b2b823ef] |
| 14:17:00 | * | rockcavera quit (Remote host closed the connection) |
| 14:18:41 | * | littleli quit (Quit: leaving) |
| 14:20:38 | FromGitter | <brentp> the error from nim is: ⏎ ⏎ ``` g.afs = newSeqUninitialized[float32](L) ⏎ echo g.afs.len``` ⏎ ⏎ so immediately after the newSeq, printing the len causes a problem. It's a fairly large seq. [https://gitter.im/nim-lang/Nim?at=5c1cf6b63c4093612c3ea89e] |
| 14:22:46 | leorize | brentp: if you're using gdb, you can build Nim with `-d:noSignalHandler` to disable the default SIGSEGV handler |
| 14:23:09 | leorize | oh, the crash looks like it come from the GC |
| 14:25:16 | leorize | if it worked before 0.19.0 then it must be a regression. Can you create a small reproducible sample? |
| 14:27:00 | Araq | "must be a regression" -- that's not how memory unsafe code works... |
| 14:27:34 | FromGitter | <brentp> I don't know if it worked before 0.19.0, I just mean it's not specific to a recent version. I haven't been able to make a reproducer. I think it's related to the c-lib I am using. |
| 14:27:43 | FromGitter | <brentp> but don't know how to find the problem. |
| 14:27:55 | Araq | cdecl vs stdcall problems |
| 14:28:01 | Araq | ptr T vs ptr ptr T problems |
| 14:28:46 | Araq | "I wrapped a nano-threads C library" problems |
| 14:29:09 | Araq | (= C library that mucks around with the stacks) |
| 14:29:17 | FromGitter | <brentp> ok. I'll look into those. the lib is here fwiw : https://github.com/brentp/nim-miniz/tree/Zip |
| 14:30:01 | Araq | "C's int is not Nim's int" problems |
| 14:30:08 | Araq | "C's float is not Nim's float" problems |
| 14:30:34 | Araq | C func of an unknown prototype is called |
| 14:30:48 | Araq | the wrappers doesn't use the .bycopy pragma |
| 14:31:00 | Araq | the wrapper wasn't created by c2nim |
| 14:32:03 | FromGitter | <brentp> @Araq, are you describing actual issues with this nim-miniz now, or enumerating possible problems? |
| 14:32:14 | Araq | enumerating possible problems :-) |
| 14:32:39 | Araq | mz_alloc_func* = proc (opaque: pointer; items: csize; size: csize): pointer <-- missing calling convention |
| 14:33:26 | Araq | all your callback types need to be annotated with {.cdecl.} |
| 14:34:24 | FromGitter | <brentp> ok. I jumped into someone else's lib assuming it was c2nim'ed. It did not have bycopy pragma, but adding that doesn't resolve. I'll look at the calling convention stuff. |
| 14:36:12 | Araq | discard pZip.mz_zip_writer_finalize_archive() # lines like these also make debugging harder, don't ignore errors, turn them into exceptions |
| 14:36:45 | Araq | var pZip: ptr mz_zip_archive = cast[ptr mz_zip_archive](alloc0(sizeof(mz_zip_archive))) # seems easier to do |
| 14:36:55 | Araq | var pZip: mz_zip_archive |
| 14:37:07 | Araq | and then the 'addr' operator |
| 14:39:00 | Araq | and things like MINIZ_USE_UNALIGNED_LOADS_AND_STORES are implementation hacks that have nothing to do in a Nim wrapper |
| 14:39:47 | FromGitter | <brentp> my code is the `Zip` type at the end where it `doAssert`s those instead of discarding. but maybe starting from a c2nim version would be simpler than tracking down the cause in this. |
| 14:40:07 | * | xet7 joined #nim |
| 14:41:49 | Araq | in general, wrap what you need, don't wrap the billion's typedef unsigned int zlib_uint; anachronism |
| 14:44:39 | FromGitter | <brentp> understood. thanks for taking a look. |
| 14:59:49 | * | dddddd joined #nim |
| 15:02:36 | * | d10n-work joined #nim |
| 15:02:48 | * | Ven`` joined #nim |
| 15:06:37 | * | endragor joined #nim |
| 15:10:47 | * | endragor quit (Ping timeout: 240 seconds) |
| 15:27:19 | dom96 | Araq, krux02: Nice video guys! |
| 15:27:26 | dom96 | For those that missed it: https://forum.nim-lang.org/t/4491 |
| 15:29:02 | FromGitter | <mratsim> reminds me @shashlick, you really should change the calling convention of nimgen to cdecl by default, maybe with a `when defined(vcc): {.push callingConvention: stdcall.} else: {.push callingConvention: cdecl.}` |
| 15:29:20 | FromGitter | <mratsim> only microsoft uses stdcall |
| 15:30:07 | krux02 | dom96: thanks |
| 15:38:27 | * | krux02 quit (Remote host closed the connection) |
| 15:40:25 | * | PrimHelios joined #nim |
| 15:40:51 | * | Ven`` quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
| 15:43:50 | Araq | dom96, oh thanks |
| 15:59:20 | * | whaletechno quit (Quit: ha det bra) |
| 16:16:57 | * | Vladar quit (Remote host closed the connection) |
| 16:26:16 | * | ftsf quit (Read error: Connection reset by peer) |
| 16:29:05 | * | PMunch joined #nim |
| 16:33:42 | * | OrganicAnywhere joined #nim |
| 16:38:25 | * | skelett1 quit (Quit: WeeChat 2.1) |
| 16:41:02 | * | thomasross quit (Remote host closed the connection) |
| 16:44:42 | * | PMunch quit (Ping timeout: 250 seconds) |
| 16:50:28 | * | PMunch joined #nim |
| 16:56:18 | * | Cthalupa quit (Ping timeout: 245 seconds) |
| 16:59:13 | * | Cthalupa joined #nim |
| 17:04:03 | * | endragor joined #nim |
| 17:08:35 | * | endragor quit (Ping timeout: 250 seconds) |
| 17:35:55 | * | plushie joined #nim |
| 17:44:33 | * | OrganicAnywhere quit (Ping timeout: 250 seconds) |
| 17:53:34 | * | endragor joined #nim |
| 17:58:20 | * | endragor_ joined #nim |
| 18:01:43 | * | endragor quit (Ping timeout: 246 seconds) |
| 18:17:10 | * | Vladar joined #nim |
| 18:18:14 | * | endragor_ quit (Remote host closed the connection) |
| 18:24:06 | * | endragor joined #nim |
| 18:26:13 | * | steshaw quit (Quit: Connection closed for inactivity) |
| 18:28:19 | * | endragor quit (Ping timeout: 246 seconds) |
| 18:28:24 | * | nsf joined #nim |
| 18:37:20 | * | abm quit (Quit: Leaving) |
| 18:57:35 | * | whaletechno joined #nim |
| 18:59:47 | * | MyMind joined #nim |
| 19:00:23 | * | Sembei quit (Ping timeout: 250 seconds) |
| 19:15:36 | FromGitter | <brentp> I started from scratch, used c2nim on the ~10 functions I needed, used cdecl, and get the exact same error. i already switched my code to use the nim/zipfiles/zip instead. ⏎ with -d:useLibzipSrc |
| 19:20:42 | * | OrganicAnywhere joined #nim |
| 19:24:26 | * | PMunch quit (Remote host closed the connection) |
| 19:32:07 | * | OrganicAnywhere left #nim ("Opi out.") |
| 19:37:50 | * | zachk joined #nim |
| 19:41:19 | * | zachk quit (Changing host) |
| 19:41:19 | * | zachk joined #nim |
| 19:55:46 | * | nsf quit (Quit: WeeChat 2.3) |
| 20:07:37 | * | kapil____ quit (Quit: Connection closed for inactivity) |
| 20:13:19 | * | Vladar quit (Remote host closed the connection) |
| 20:23:55 | * | druonysus quit (Ping timeout: 244 seconds) |
| 20:41:08 | * | elrood joined #nim |
| 20:42:06 | Araq | brentp interesting |
| 20:49:09 | FromGitter | <brentp> /shrug I got it to work with boehm, but figured it best to move on. |
| 20:51:31 | FromGitter | <Clyybber> Araq: Is ditching the GC an eventual goal? |
| 20:52:43 | * | Trustable quit (Remote host closed the connection) |
| 20:53:24 | Araq | yes and no |
| 20:55:14 | Araq | brentp: can you show me the code please? |
| 20:56:30 | Araq | clyyber: it's still a bit unclear what to do with 'ref' but mostly because we have so many different ideas about it :P |
| 20:59:19 | FromGitter | <brentp> @Araq : https://github.com/brentp/nim-minizip |
| 21:00:02 | FromGitter | <brentp> the test pass fine, but get weird stuff elsewhere. |
| 21:01:52 | Araq | GC is seen as suboptimal because (a) worse interop with C(++) and (b) O(heap size) tracing algorithm. That doesn't mean we have to throw away the idea of automatic MM though. |
| 21:02:07 | * | wildlander joined #nim |
| 21:02:20 | Araq | brentp: mz_alloc_func lacks the .cdecl afaict |
| 21:02:36 | Araq | mz_realloc_func too |
| 21:04:35 | FromGitter | <Clyybber> Araq: Ok, so destructors + GC will probably work together? Or do they already? |
| 21:04:50 | ldlework | would be interesting to see Nim become the second serious memory-safe language |
| 21:05:15 | FromGitter | <Clyybber> ldlework I would like *optionally* memory-safe |
| 21:05:21 | ldlework | see if it can make all that lifetime tracking stuff "friendly" like pythonize/delphize it |
| 21:05:45 | FromGitter | <Clyybber> Var parameters are already some kind of borrow checking |
| 21:06:27 | Araq | Clyybber: Yes they will work together and that's not the hard part in designing the system, ymmv |
| 21:06:52 | FromGitter | <Clyybber> ldlework And with features like no nil, or non nil strings that evade allocation the future looks great :D |
| 21:06:59 | FromGitter | <Clyybber> Araq: Ok, nice |
| 21:07:08 | Araq | the hard part is deciding on what 'ref' actually means :-) |
| 21:07:22 | FromGitter | <Clyybber> A safe ptr? |
| 21:07:32 | Araq | it's obviously an owning pointer, but does it allow cycles |
| 21:08:27 | FromGitter | <Clyybber> Why would cycles be a problem? |
| 21:08:41 | FromGitter | <Clyybber> Or would they? |
| 21:08:53 | FromGitter | <brentp> @Araq, if I add cdecl to those, then the tests won't even pass. |
| 21:08:53 | Araq | because then we need some kind of tracing mechanism |
| 21:09:16 | Araq | brentp: also compile with -d:useSysAssert -d:useGcAssert for more error checking |
| 21:09:23 | FromGitter | <Clyybber> Ah, yeah, without a gc that seems kinda tricky |
| 21:09:44 | Araq | there is a world of hardly explored semi-automatic schemes |
| 21:11:43 | FromGitter | <Clyybber> Araq: Do you think it's a good idea to optionally convert C "enums" to distinct cints, and then generate borrowed `+`, `-`, `=` procs? |
| 21:11:55 | FromGitter | <Clyybber> In c2nim |
| 21:11:57 | Araq | that's always the best idea |
| 21:12:57 | FromGitter | <Clyybber> I have patched c2nim a time ago to do that, but I remember my code being very hacky |
| 21:13:08 | FromGitter | <Clyybber> So I might clean that up and do a PR |
| 21:14:10 | Araq | that would be really nice, thank you |
| 21:16:36 | FromGitter | <Clyybber> Araq: Do you happen to know what to do with enums that contain code like ⏎ ⏎ ``` SOMETHING = SOMETHING``` ⏎ ⏎ It's in the vulkan headers, and I really don't know what the value is supposed to be then. [https://gitter.im/nim-lang/Nim?at=5c1d58336649aa1f82af1171] |
| 21:17:04 | FromGitter | <Clyybber> I currently just skip those |
| 21:18:48 | Araq | no idea either, sorry |
| 21:27:09 | * | druonysus joined #nim |
| 21:27:09 | * | druonysus quit (Changing host) |
| 21:27:09 | * | druonysus joined #nim |
| 21:33:30 | FromGitter | <Clyybber> Araq: How does c2nim currently deal with C identifiers resulting in the same Nim identifier? |
| 21:35:54 | Araq | not at all you use #mangle to fix it |
| 21:37:33 | FromGitter | <Clyybber> Ah ok thank you |
| 21:37:50 | FromGitter | <brentp> @Araq with those flags, I see: `[GCASSERT] markS: foreign heap root detected A!` |
| 21:39:15 | FromGitter | <Clyybber> Araq: Are objects `{.bycopy.}` by default? |
| 21:39:41 | FromGitter | <Clyybber> Or is that only for C interop? |
| 21:40:25 | FromGitter | <Clyybber> Oh, nvrmind, found it in the docs :P |
| 21:40:59 | FromGitter | <Clyybber> Still, what are objects by default? Are they a smart combination of both? |
| 21:44:49 | Araq | brentp: seems you have mapped 'ref' to something that isn't |
| 21:46:07 | Araq | or you assumed the old "it's immutable so I am free to share it" myth |
| 21:48:13 | FromGitter | <brentp> what would "mapping to 'ref' to something that isn't" look like? |
| 21:48:39 | FromGitter | <brentp> I think I understand the other one. |
| 21:51:48 | Araq | casting to 'ref' |
| 21:52:01 | Araq | or pretending C code returns a 'ref' |
| 21:52:27 | * | kinkinkijkin quit (Ping timeout: 240 seconds) |
| 21:57:00 | FromGitter | <brentp> I think the most skechcy thing I am doing is using an object with {.bitsize.} pragmas (which you previously told me to avoid) and then casting that to it's component type. |
| 21:58:30 | FromGitter | <brentp> ```code paste, see link``` ⏎ ⏎ and then casting that to uint64. [https://gitter.im/nim-lang/Nim?at=5c1d6206d945b96882d6f2ac] |
| 22:03:07 | Araq | that doesn't matter, we fixed bitsize for sizeof |
| 22:03:17 | Araq | and it doesn't contain GC'ed memory either |
| 22:10:27 | * | kinkinkijkin joined #nim |
| 22:18:13 | FromGitter | <mratsim> So Rust is adding macros (beyond string mixing): https://blog.rust-lang.org/2018/12/21/Procedural-Macros-in-Rust-2018.html |
| 22:18:20 | FromGitter | <mratsim> mixin* |
| 22:20:40 | Araq | that's old news as far as I'm concerned |
| 22:24:44 | Araq | does anybody know good offline speech-to-text software? |
| 22:26:57 | kinkinkijkin | sam for the commodore 64 |
| 22:27:07 | kinkinkijkin | just kidding, that's a little old |
| 22:27:15 | kinkinkijkin | and requires a commodore 64 |
| 22:34:10 | * | fthe joined #nim |
| 22:35:25 | FromGitter | <arnetheduck> I used dragon naturally speaking around 98', maybe that's still around :) |
| 22:37:08 | FromGitter | <Clyybber> Araq: https://github.com/kaldi-asr/kaldi is great |
| 22:45:40 | * | stefanos82 quit (Remote host closed the connection) |
| 22:45:58 | * | elrood quit (Remote host closed the connection) |
| 23:30:44 | * | McSoFake joined #nim |
| 23:30:53 | * | fthe quit (Ping timeout: 245 seconds) |
| 23:44:01 | * | fthe joined #nim |