<< 11-12-2019 >>

00:05:08*ng0 quit (Ping timeout: 260 seconds)
00:05:37*zama quit (Remote host closed the connection)
00:06:00*zama joined #nim
00:06:16*ng0 joined #nim
00:08:37*nif quit (Quit: ...)
00:08:46*nif joined #nim
00:28:51disrupteki understand how to create .tags. i understand how to invoke .effects. but is there nothing else i can do with tags? can i query them from inside a macro? the manual is pretty damned skimpy here.
00:33:23*krux02 quit (Remote host closed the connection)
00:39:12*liam_ joined #nim
00:40:56liam_Hi all. I'm trying to wrap the Openssl RSA library for Nim, and I'm having some trouble using c2nim. When I run c2nim on (what I think is) the right header file I get syntax errors. Any ideas?
00:41:03*ng0 quit (Quit: Alexa, when is the end of world?)
00:41:34FromGitter<bung87> how to print c file specific define declaration in nim ? the quike way
00:42:31FromGitter<bung87> I use emit printf before
00:42:48FromDiscord<Fern & Simula (They/Them)> liam_: Could you give us the syntax errors and a link to the header file?
00:43:07FromDiscord<exelotl> liam_: you might have to edit the header file and make a simplified version
00:47:25liam_The header file is https://github.com/openssl/openssl/blob/master/include/crypto/rsa.h
00:47:48liam_And the error is "/home/liam/openssl/include/crypto/rsa.h(27, 57) Error: token expected: )"
00:49:16FromDiscord<exelotl> bung87: if you *need* to access a #define from a header file, you can do something like this:
00:49:19FromDiscord<exelotl> var pi {.importc:"M_PI", header:"math.h".}: cfloat
00:50:37FromGitter<bung87> can it declare as a const ?
00:51:11liam_Declare what?
00:51:35FromDiscord<exelotl> no, consts only exist at compile time in Nim
00:52:01FromGitter<bung87> I remember I write the same way but assign to const A = , the editor show syntax error
00:52:47FromGitter<bung87> ok , I got it , thank you , I will try it later.
00:53:14liam_exelotle: Are you suggesting to run c2nim on something other than that header file?
00:53:43FromDiscord<exelotl> bung87: it's generally recommended to just rewrite the definition in Nim. e.g. `const PI = 3.14159265358979323846`
00:54:11FromDiscord<exelotl> (at least I think so)
00:54:59FromGitter<bung87> hmm, I did see the way nim std write like this, just worry about what if the c lib change the define value ?
00:56:24FromDiscord<Fern & Simula (They/Them)> Different c libs may use different values. best to define it yourself so it never changes
00:56:33FromGitter<bung87> and it also need to print out the value to make this, the apple source does not have a search input.
00:56:56FromDiscord<Fern & Simula (They/Them)> also fun times if you're porting to a platform without libm. i've seen those in production
00:58:41FromGitter<bung87> I’m working on this https://github.com/johnscillieri/psutil-nim/pull/5/commits/bf1e3db9408ea7b95010c808580cf55b1b1a540b
00:58:42disbotfix compile error at nim v1.1.1 add psutil_macosx.nim only finished uptime
00:58:52FromGitter<bung87> dont know about libm
00:59:18FromDiscord<exelotl> hah I was just using pi/math.h as an example, don't worry
00:59:23FromDiscord<exelotl> liam_: lol what there's no line 27 in that file
00:59:49FromDiscord<exelotl> but yeah you might have to mess around with it, what if you remove the include guards?
01:00:48liam_exelotl: Oh yeah! Thats because of the modifications I made to it as per the c2nim tutorial. The error came from what is actually line 15
01:02:19FromDiscord<exelotl> ah, so it's probably complaining about STACK_OF(BIGNUM). You should figure out what STACK_OF expands to and use that instead?
01:02:31FromDiscord<exelotl> or you might just be able to cheat and replace it with void*
01:05:33liam_I kind of get the feeling that that line and the couple below it are tests or something, so maybe that cheat would work.
01:11:00*lritter quit (Ping timeout: 265 seconds)
01:13:24liam_I don't think that was the correct headerf ile to be using honestly. I'm trying a different one now but getting similar syntax errors
01:14:11liam_I'm not very familiar with how c projects are structured
01:14:38liam_https://github.com/openssl/openssl/blob/master/crypto/rsa/rsa_local.h maybe?
01:28:06liam_Im getting "/home/liam/openssl/crypto/rsa/rsa_local.h(29, 16) Error: expected ';'"
01:28:17liam_Maybe it's c2nim's parser?
01:28:52liam_Is there a way to do this without c2nim?
01:49:28FromDiscord<mratsim> c2nim helps but you need to manually intervene for each header in my experience
01:49:32FromDiscord<mratsim> try nimterop
01:49:50FromDiscord<mratsim> !package nimterop
01:49:50disbothttps://github.com/genotrance/nimtreesitter -- 9nimterop: 11Nimterop makes C/C++ interop within Nim seamless
01:50:06FromDiscord<mratsim> wrong one @disruptek :/
01:50:24FromDiscord<mratsim> or maybe there is a redirect? https://github.com/nimterop/nimterop
01:51:29liam_I'm having some success using Nimgen at the moment
01:52:01liam_Someone else used to to wrap parts of openssl, so i'm using their configuration as a baseline for what bits I want to wrap
01:52:44liam_Unfortunately they have the nimble package Nimssl despite only wrapping AES and SHA, which is a bit misleading
01:54:24shashlickAgreed, never got around to it
01:56:12liam_"Never got around to it". You made NimSSL?
01:59:49FromGitter<Asc2011> hi, i need some help with my first macro. It shall give me a 'unless <cond>' which is basically a 'if not( <cond>)'. I can't put the 'else'-part back in the ast ?
02:01:34FromGitter<gogolxdong> @liam_ no worry, shashlick is making a new nimssl with nimterop.
02:02:34FromGitter<gogolxdong> which requested by me two days ago :) , we are on the same boat.
02:02:51liam_Huh cool
02:03:18liam_sashlick: Thanks heaps. Make sure to let us know how you are doing!
02:09:16liam_sashlick, gogolxdong: I'm going to continue having a go at making my own wrapper anyway
02:13:00FromGitter<gogolxdong> with nimgen?
02:14:03liam_Maybe interop seeing as I am having some troubles with nimgen
02:14:13liam_Ill try some more with nimgen for now
02:14:19FromGitter<gogolxdong> shashlick said it's obsoloted.
02:14:34shashlickGot stuck with an issue with tree-sitter
02:14:42shashlickBut I have some ideas
02:15:07shashlickIf you both can prioritize which parts you want wrapped, will help
02:15:35shashlickYou can use nimterop but use c2nImport instead
02:15:44shashlickWhich will use c2nim behind the scenes
02:17:01liam_RSA is my priority (which relies on SHA for all practical purposes)
02:17:13FromGitter<gogolxdong> I for aes, gcm, sha256, pkcs7
02:18:22FromGitter<gogolxdong> Is it possible to tranlate entire crypto directory in theory?
02:18:28shashlickOk cool
02:18:48shashlickShould be possible ya, but easier to take small bites
02:20:33liam_Fair enough
02:26:01madpropscan nim create a universe?
02:27:01disrupteki'm gonna go out on a limb here and say, "nope."
02:32:52*fowl quit (Quit: Connection closed for inactivity)
02:47:33liam_shashlick: Btw, make sure you let us know how you are doing :)
02:58:09FromGitter<perfecto25> hello all, im learning Nim syntax right now sorry for dumb questions, Im coming from Python world and have to readjust how certain elements work in Py vs Nim, ie, Arrays
02:58:36FromGitter<perfecto25> how can I insert an element into a Sequence in a specific order, ie, seq.add("Bob", 2, 5)
02:58:46FromGitter<perfecto25> want to add Bob between 2nd and 5th index
02:59:20disrupteksee the sequtils module.
03:00:09disruptekalso, welcome. everyone starts off nim-stupid.
03:01:01FromGitter<perfecto25> thanks
03:01:57FromGitter<perfecto25> also, any easy way to tell what module a Proc is from, for example in Py you specify a module namespace or do 'from math import random', but in Nim you just import a module and use a Proc, hard to tell what module a Proc is coming from, is that by design?
03:02:19disruptekyes. but you can prefix the symbol with its module name if you like.
03:02:30disruptekeg. sequtils.insert()
03:02:44disruptekit doesn't change the import syntax.
03:03:19FromGitter<perfecto25> is that that the recommended way? Ive only seen direct imports w/o specifying module namespace
03:03:44disruptekas i said, it's optional. i don't personally recommend it.
03:04:25disruptekit's optional without regard to how the import was made.
03:04:49disruptekpure syntax. you feel me?
03:05:21FromGitter<perfecto25> yea, im just wrapping my head around this, python world is my way or the highway when it comes to syntax, this is a different approach
03:05:50disruptekyeah, it's not the huge problem you may have been led to believe.
03:06:42FromGitter<perfecto25> cooll thank you,
03:08:33FromGitter<perfecto25> found some good stuff for people coming over from python
03:08:36FromGitter<perfecto25> https://github.com/nim-lang/Nim/wiki/Nim-for-Python-Programmers
03:09:12disruptekcoming from python, it's liberating to have the headroom that nim provides. python continues to be a big influence here.
03:11:21FromGitter<perfecto25> yea thats why Im digging the syntax, some familiar stuff like indent, iterators, loops,etc but also statically typed new stuff like var declaration, types, Proc structure, etc, almost like a mix of python, golang and C
03:12:55disruptekyep. you get the power and speed of c with the convenience of a dynamic language like python and the metaprogramming of a lisp.
03:30:06FromGitter<Asc2011> and full macro-power :-) https://play.nim-lang.org/#ix=246q
04:02:47*endragor joined #nim
04:33:16*nsf joined #nim
04:40:05*sammich quit (Read error: Connection reset by peer)
04:42:03*sammich joined #nim
04:58:27*chemist69 quit (Ping timeout: 246 seconds)
04:59:15*narimiran joined #nim
05:00:36*chemist69 joined #nim
05:09:33*liam_ quit (Ping timeout: 250 seconds)
05:23:51*rockcavera quit (Remote host closed the connection)
05:26:36*ltriant quit (Read error: Connection reset by peer)
05:26:55*ltriant joined #nim
06:01:20*ltriant quit (Ping timeout: 276 seconds)
06:26:48FromDiscord<Rika> the deques module in 1.0.4 seems to be broken, i cannot seem to `addLast` an empty deque
06:31:12FromDiscord<Rika> ah, you have to initDeque, unlike most other types
06:34:50lqdev[m]@Rika auto-init is only available for strings, seqs, and Tables
06:42:09Araqshould be done for deques too
06:49:44*liam_ joined #nim
06:54:19*solitudesf joined #nim
06:55:59Zevvand HashMaps?
06:59:26Araqsure
07:00:51Araqidiomatic 134.81ms 7.42
07:00:51Araqmanual 201.99ms 4.95
07:00:51Araqcpp 93.62ms 10.68
07:00:59Araqsurprisingly bad results
07:01:54Araq(string concat performance)
07:02:31Araq^ that's ARC
07:03:17Zevvso you're there sitting and planning to beat C++ singlehandidly?
07:03:21Araqidiomatic 91.31ms 10.95
07:03:21Araqcpp 93.24ms 10.72
07:03:28Araq^ that's the default GC
07:03:54Araqwe do beat C++ in the benchmark with the old cruft ;-)
07:06:29Araqand with -d:useMalloc the timings are even worse
07:07:00Araq 255.67ms 3.91 that's so bad that I am beginning to distrust my benchmark
07:20:17madpropswell with cpp you have to make some weird combination of compile flags to make it fast
07:20:26*liam_ quit (Quit: Leaving)
07:25:34Araqnah, I simply use std::string and defeat the SSO
07:27:01Araqit's fast out of the box, language runtimes are not written by idiots :-)
07:28:03Araqthe problem is not that C++ is faster/slower, the real problem is that I only look at numbers, no insights into the CPU and where the time is spent
07:29:10madpropsi read recently that gnome was improved by canonical by inspecting, not spikes, but cold times where the cpu was doing nothing
07:29:46madpropsalso numbers could change on longer tests
07:30:18Zevv"measure first"
07:30:30Zevv"complain later"
07:32:07Zevvbut thats quite a difference indeed, 91 to 134
07:35:52Araqwith cheating I get to 23.93ms 41.79
07:45:45*salewski joined #nim
07:48:31salewski@admins, seems he has eddit in spam links again. Well I have not clicked on the links to proof
07:48:31salewskihttps://forum.nim-lang.org/t/5667
07:48:31salewskiBye.
07:50:35*PMunch joined #nim
07:50:48*salewski quit (Quit: WeeChat 2.6)
08:00:00*gmpreussner quit (Quit: kthxbye)
08:04:58*gmpreussner joined #nim
08:06:36*nif quit (Quit: ...)
08:06:46*nif joined #nim
08:44:35*aexoxea joined #nim
08:54:41Araqhttps://perspectives.mvdirona.com/2012/02/observations-on-errors-corrections-trust-of-dependent-systems/
08:58:24*Vladar joined #nim
09:46:30FromGitter<alehander92> Araq
09:48:02FromGitter<alehander92> sorry, nevermind
09:48:06Araqlol
09:48:34FromGitter<alehander92> thanks for the hints/warnings flags , very useful
09:49:12FromGitter<alehander92> otherwise is the arc stuff now ready for use in standalone mode
09:50:57Araqhmm depends, do you have malloc?
10:04:21FromGitter<alehander92> yes
10:05:06FromGitter<alehander92> i mean .. a very simple malloc which just increases a global pointer
10:05:32FromGitter<alehander92> but its there
10:06:56FromGitter<alehander92> i think i was using newruntime with this toy os the last time actually
10:08:30Araqwhat would you think about a .unique pragma?
10:08:50Araqit's the one thing that --newruntime models that we currently don't
10:09:28FromGitter<alehander92> dont get me wrong: i was using newruntime, because thats the easiest thing that seemed to work for me
10:09:39FromGitter<alehander92> what would a .unique pragma do
10:09:57FromGitter<alehander92> show that something is referred to only by one ref?
10:10:04Araqyes
10:10:43FromGitter<alehander92> how would it prove that
10:10:43Araqthe number of pragmas is getting unhealthy though
10:10:51PMunchHmm, interesting. Re-implemented some logic from C in Nim and the procedure now takes 44 bytes more than before..
10:11:29Araqalehander92: that works much like 'owned ref'
10:11:34FromGitter<alehander92> well, its either a keyword or a pragma i guess
10:11:46Araqconstructors and 'new' start with .unique and then it bubbles up
10:12:09PMunchhttp://ix.io/2478/Nim <- the two procs (second one is cut short because GCC manages to optimise out the other cases and I didn't care to implement those in Nim yet).
10:12:52AraqPMunch, well you need to tell me where these 44 bytes come from
10:13:21FromGitter<alehander92> Araq, well sounds useful i guess
10:13:22PMunchThat's what I'm trying to figure out
10:13:36FromGitter<alehander92> especially if it can mostly reuse the existing logic
10:15:51Araqalehander92: ideally .unique is also inferred though
10:30:55*ng0 joined #nim
10:35:32AraqPMunch, I would start with rewriting it to more idiomatic code via 'ptr UncheckedArray' instead of your ugly manual pointer increments
10:39:53*lritter joined #nim
10:42:41FromGitter<alehander92> Araq hm, what do you mean exactly
10:42:57FromGitter<alehander92> isn't it just a field(type??) annotation
10:49:19*Mister_Magister quit (Quit: bye)
10:51:42*krux02 joined #nim
10:53:09*nc-x joined #nim
10:56:41*Mister_Magister joined #nim
10:57:17*Mister_Magister is now known as Guest839
10:57:44*Guest839 quit (Client Quit)
10:58:19*nc-x quit (Ping timeout: 260 seconds)
10:59:23*Mister_Magister_ joined #nim
11:00:14*tklohna joined #nim
11:02:08*Mister_Magister_ quit (Remote host closed the connection)
11:02:34*nc-x joined #nim
11:02:47nc-xAraq: regarding https://github.com/nim-lang/Nim/pull/12860
11:02:49disbotUndefine `paramCount` & `paramStr` in nimscript.nim for *.nims
11:03:17nc-xnimscript.nim has plenty has procs which are actually defined in os.nim
11:03:36nc-xso what is the criteria for removal from nimscript.nim and moving to os.nim?
11:03:47nc-xi.e. should I move the other procs too?
11:05:25nc-xbut that creates a problem, because there are new procs with shorter names defined in nimscript.nim which uses those functions https://github.com/nim-lang/Nim/blob/94289161f9dd00b2fc3070b08895a3b6c557ef44/lib/system/nimscript.nim#L186-L273
11:05:49nc-xso it would then require to import os.nim
11:10:27*nc-x quit (Ping timeout: 260 seconds)
11:10:34*nc-x joined #nim
11:10:37nc-xbut that is a problem because os.nim uses procs defined in nimscript.nim, so it makes a circular dependency
11:10:58nc-xso my question: what is the criteria for removal from nimscript.nim and moving to os.nim?
11:12:31nc-xI can move those short named procs to os.nim too, , but I am pretty sure that would break almost everything
11:12:36*nc-x quit (Remote host closed the connection)
11:22:00*abm joined #nim
11:30:12*rockcavera joined #nim
11:32:08*Vladar quit (Ping timeout: 268 seconds)
11:37:53*solitudesf quit (Ping timeout: 265 seconds)
11:39:44*JustASlacker joined #nim
11:43:00FromDiscord<Stuffe> Is it possible to have an empty mutable table as a default parameter in nim?
11:43:30*Mister_Magister_ joined #nim
11:44:13JustASlackerhello peoples of nim
11:44:39JustASlackerI have a simple script -> https://termbin.com/5yrb in which I try to regex the server_names from nginx
11:45:05JustASlackerlooks pretty bad so far
11:45:46JustASlackerI wonder why I need to split the result I get in my matches array
11:46:08JustASlackerand Im unclear how I could output that HashSet as json
11:47:03*Mister_Magister_ is now known as Mister_Magister
11:47:46JustASlackeractually no, my regex is broken
11:59:59*fowl joined #nim
12:04:11*aexoxea quit (Quit: Goodbye!)
12:10:42leorize[m]@Stuffle: you can try with TableRef
12:11:05*couven92 joined #nim
12:12:43*solitudesf joined #nim
12:12:53PMunchAraq, yeah that's what I was thinking as well
12:13:06FromDiscord<Stuffe> leorize[m] thank you. I figured it out, I made two versions of the function, one without that instantiated the default argument and called the other
12:20:02*Vladar joined #nim
12:20:51*kungtotte quit (Ping timeout: 268 seconds)
12:24:17*livcd quit (Quit: leaving)
12:25:18*livcd joined #nim
12:26:13*tklohna quit (Ping timeout: 265 seconds)
12:40:24*tklohna joined #nim
12:51:29PMunchAraq, yeah changing from cast[ptr uint8](cast[int](bitmapData.addr) + 1)[] to cast[array[2, uint8]](bitmapData)[1] made it drop right down to the same size as the C code
12:52:02*FromGitter quit (Remote host closed the connection)
12:52:20*FromGitter joined #nim
12:54:37*tklohna quit (Ping timeout: 240 seconds)
13:00:38*tklohna joined #nim
13:02:51*a_b_m joined #nim
13:06:20*abm quit (Ping timeout: 265 seconds)
13:06:48FromDiscord<mratsim> Uh, it seems like this websites supports Nim for code-golfing: https://code-golf.io/
13:12:02PMunchHmm, seems a bit broken though..
13:12:18PMunchTry this in the Arabic to Roman hole: import os
13:12:18PMunchecho commandLineParams()
13:12:30PMunchThe first number is missing..
13:19:30*endragor quit (Remote host closed the connection)
13:19:47PMunchIs there a |= and &= equivalent in Nim?
13:20:25madpropsi've never seen those
13:20:37madpropshow would you normally use them?
13:21:21Zevvsetbits
13:21:24Zevvclearbits
13:23:09Zevvbitand bitor
13:23:26ZevvI added those when I had the same question :)
13:28:20FromDiscord<exelotl> Meanwhile I'm here typing `foo = foo and FLAG` like a scrub
13:29:03FromDiscord<Stuffe> Zevv It would have been more consistent with `or=` and `and=`
13:29:07PMunchZevv, added them where?
13:32:26FromDiscord<mratsim> or= and= seem veeerrry weird
13:32:51FromDiscord<Stuffe> But consistent 😉
13:33:00*tklohna quit (Ping timeout: 268 seconds)
13:33:08FromDiscord<Stuffe> Was trying to use them the other day, had they been there I wouldn't have had to look up how to do it
13:33:18PMunchThat was the first thing I tried to do :P
13:33:20PMunchor=
13:33:47FromDiscord<Stuffe> In general it would have been cool if any operator, even self defined ones automatically worked with the `=` added
13:33:56FromDiscord<Stuffe> but yeah, nitpicking
13:34:11PMunchThat would be cool indeed
13:35:08FromDiscord<Stuffe> is it plausible to do?
13:37:37PMunchHmm, I guess
13:39:01Zevvpmunch: bitops
13:50:30FromGitter<alehander92> yeah it sounds cool
13:52:21FromGitter<kaushalmodi_gitlab> woh, this works!
13:52:24FromGitter<kaushalmodi_gitlab> !eval echo 3.`+`(1).mod(3)
13:52:27NimBot1
13:52:44FromGitter<kaushalmodi_gitlab> i.e. ``echo 3.`+`(1).mod(3)``
14:01:30*a_b_m quit (Quit: Leaving)
14:03:23FromGitter<alehander92> yepp
14:04:08FromGitter<kaushalmodi_gitlab> nim has retained a lot of what I love about lisp :)
14:09:19*fowl quit (Quit: Connection closed for inactivity)
14:10:07PMunchOf course it works :)
14:10:23*ng0 quit (Quit: Alexa, when is the end of world?)
14:10:48*ng0 joined #nim
14:11:43PMunchZevv, wait. `bitand` returns an int?
14:12:06PMunchSo what is the difference between `x = x or 0xF0` and `x = bitor(x or 0xF0)`
14:19:38Zevvnothing - these are not mine btw, I added the setBit/clearBit thingies, I was confusing stuff
14:19:41Zevvnot that it matters
14:19:47ZevvbitAnd seems to be {.magic.}
14:22:00FromGitter<kaushalmodi_gitlab> is there something like this in stdlib: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df0fb88c62ef76b444eb23d]
14:22:13FromGitter<kaushalmodi_gitlab> above works nicely as an enum looper in either direction
14:23:48PMunchDefine "ensure"
14:25:48disruptekit's like carnation instant breakfast, but with an eye towards meal replacement.
14:26:30FromGitter<kaushalmodi_gitlab> hehe, I thought about that..
14:26:36FromGitter<kaushalmodi_gitlab> enums can be negatives?
14:26:39FromGitter<alehander92> this is so confusing
14:26:42FromDiscord<mratsim> bitor == or @Pmunch
14:26:51disruptekwhere are my "may ref" refs?
14:26:51FromDiscord<mratsim> and it's bitor(x, 0xF0)
14:27:02FromGitter<alehander92> zevv made that issue
14:27:14disruptekenums cannot be negatives.
14:27:16FromGitter<alehander92> for checking enums for invalid values on each convertion
14:27:26FromGitter<alehander92> disruptek they can currently if you do
14:27:29FromGitter<alehander92> value.Enum
14:27:37FromGitter<alehander92> iirc
14:27:42disruptekyeesh.
14:27:55disruptekthat feels like a bug.
14:28:09FromGitter<alehander92> so zevv opened an issue about that conversion thing
14:28:11FromGitter<alehander92> yeah
14:28:15FromGitter<kaushalmodi_gitlab> so the above getNext should "mostly" work?
14:28:17Zevvalehander92: what issue? Now *I'm* confused :)
14:28:30FromDiscord<mratsim> @disruptek, enum can be negative
14:28:47FromGitter<alehander92> https://github.com/nim-lang/Nim/issues/12815
14:28:47disruptekbut i actually needed negative enums and couldn't make them work.
14:28:48disbotNo run time checks on illegal values for enum with gaps ; snippet at 12https://play.nim-lang.org/#ix=23C5
14:28:49FromGitter<alehander92> i am not sure
14:28:53FromGitter<alehander92> why is it for gaps
14:29:00FromGitter<alehander92> but it should be for any enum imo
14:29:01disruptekwhat special incantation do i need to make negative enums?
14:29:14FromGitter<alehander92> huh so it has checks for that?
14:29:16FromGitter<kaushalmodi_gitlab> in that case, I can change `numVals = T.high.ord + 1` to `numVals = T.high.ord - T.low.ord + 1`
14:29:23FromGitter<alehander92> maybe i misunderstood sorry
14:29:33FromDiscord<mratsim> negative enums: https://github.com/mratsim/Arraymancer/blob/master/src/tensor/backend/blis_api.nim#L17-L52
14:30:06disruptekthis is nuts. i couldn't do this in my git wrapper.
14:31:09FromGitter<alehander92> maybe the `()` ??
14:31:56FromGitter<alehander92> sorry zevv i probably misunderstood the bug yeah
14:32:25PMunchmratsim, okay so what is that module for?
14:33:05disruptekall i can think is that i had something misordered.
14:33:39FromGitter<kaushalmodi_gitlab> above `genNext` here for further playing: https://play.nim-lang.org/#ix=248c
14:34:15FromDiscord<mratsim> file too large
14:34:31disrupteknoted.
14:34:52FromDiscord<mratsim> @PMunch it's a wrapper for a linear algebra library
14:35:22FromDiscord<mratsim> or where you asking for bitops?
14:35:31PMunchHaha, I was asking for bitops
14:35:51FromGitter<alehander92> @kaushalmodi_gitlab
14:35:54FromDiscord<mratsim> countTrailingZero, firstSetBit, countLeadingZero
14:36:08FromGitter<alehander92> i think this needs something like dependent typing
14:36:21PMunchYeah those are fine, but why is there a bitor when we have or?
14:36:23FromGitter<kaushalmodi_gitlab> update: nevermind I found a serious flaw in that logic :P
14:36:23FromGitter<alehander92> actually maybe not, but it needs the concept of
14:36:31FromGitter<alehander92> proving value >= 0
14:36:38FromGitter<alehander92> which i am not sure is easily accesible
14:36:42FromGitter<kaushalmodi_gitlab> @alehander92 Why did you put gitlab after my handle?
14:36:53FromDiscord<mratsim> because people complained that `or` for bits and or for bool where clashing and it was bad
14:37:04PMunchHmm
14:37:20FromGitter<alehander92> maybe somehow with ranges not sure
14:37:30FromGitter<alehander92> well thats your username
14:37:34FromGitter<alehander92> in gitter
14:37:43FromDiscord<mratsim> in discord as well
14:37:57FromGitter<alehander92> probably you logged in with gitlab
14:42:39FromGitter<kaushalmodi_gitlab> heh, I just noticed my own handle.. I am on Gitter.
14:43:15FromGitter<zacharycarter> @kaushalmodi_gitlab @kaushalmodi_gitlab
14:43:18FromGitter<zacharycarter> whoops
14:44:41FromGitter<kaushalmodi> Now signed in with GitHub
14:44:45FromGitter<kaushalmodi> good, this is better
14:48:57FromGitter<zacharycarter> I think we have another spammer on the forum - AmbrusFernas
14:49:03FromGitter<zacharycarter> https://forum.nim-lang.org/t/2770
14:50:23disruptekenums with negatives cannot be used as discriminators.
14:53:34FromGitter<zacharycarter> maybe he / she is not but they keep posting the same three spammy links at the bottom of their posts
14:58:10FromGitter<kaushalmodi> ok, this works: https://play.nim-lang.org/#ix=248f
14:58:19FromGitter<kaushalmodi> got `getNext` working with pos/neg enums
15:00:17*ng0_ joined #nim
15:02:04*ng0 quit (Ping timeout: 260 seconds)
15:03:20FromDiscord<mratsim> @zacharycarter, flagged
15:03:38*sagax quit (Quit: Konversation terminated!)
15:04:41FromGitter<zacharycarter> thanks mratsim
15:09:18FromDiscord<funcmike> Hi, why this is possible in Nim: https://play.nim-lang.org/#ix=248A (implicit cast instead of explicit)?
15:10:36*nsf quit (Quit: WeeChat 2.6)
15:10:59FromDiscord<mratsim> it's not an implicit cast, you are creating a type alias
15:11:03PMunchfuncmike, because you have defined it as a simple alias
15:11:20PMunchIf you do `type elo = distinct int` then you have a distinct type
15:11:26PMunchAnd it has to be explicitly cast
15:11:37*ng0_ is now known as ng0
15:11:45FromDiscord<funcmike> ok thx
15:13:26*couven92 quit (Read error: Connection reset by peer)
15:13:42*tklohna joined #nim
15:23:23PMunchHmm, how do I create the byte 0b1001_1111 as an actual byte?
15:23:57PMunchOh wait..
15:24:01PMunchI was just being tired
15:24:07PMunchI had it as 0x instead of 0x
15:24:09PMunch0b*
15:26:38*JustASlacker quit (Remote host closed the connection)
15:33:20*PMunch quit (Quit: Leaving)
15:36:57*dv^_^ quit (Ping timeout: 268 seconds)
15:43:52*Vladar quit (Quit: Leaving)
15:48:50FromGitter<kaushalmodi> who's doing advent of code btw?
15:49:09FromGitter<kaushalmodi> From here, I know zevv and Solitude are doing it, and me
15:49:30FromGitter<kaushalmodi> let me rephrase: who's doing advent of code *in Nim*
15:50:02FromDiscord<mratsim> Narimiran is doing it in Ocaml, the traitor :p
15:50:18*narimiran hides
15:50:57FromGitter<kaushalmodi> I know! That's why I rephrased
15:51:06disruptekit's good. ocaml is a good one.
15:51:07FromGitter<kaushalmodi> :)
15:53:27*abm joined #nim
15:55:11narimiranat least i'm not doing it in rust :P
15:55:24disruptekthat would probably be grounds for a ban.
15:55:31narimiranat minimum.
15:56:04FromGitter<Willyboar> no ban. Through him in fire :P
15:56:12narimiranbtw, has anybody tried to optimize day10 part 1?
15:56:24disrupteki changed the bot so now it just messages pmunch with all the playground links. think he'll notice?
15:57:49*dv^_^ joined #nim
15:58:32FromGitter<Willyboar> I guess he is
15:59:01FromGitter<kaushalmodi> narimiran: I get this (I did not do anything special with optimization): ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df11245235bd42f97c021b8]
15:59:21FromGitter<kaushalmodi> what's an "optimized" speed?
15:59:22FromGitter<kaushalmodi> I just compiled with danger
15:59:42narimiranthat's similar time to my ocaml solution (which proved to be surprisingly fast)
15:59:59narimiran(the language in general, not my solution in particular)
16:00:12FromGitter<kaushalmodi> that's good to know :)
16:00:26FromGitter<kaushalmodi> I think it's just Table doing all the magic in my code
16:01:00FromDiscord<exelotl> I was doing aoc in nim but then other stuff came up
16:01:08narimiranif somebody is interested in some quick nim-ocaml speed comparison, here's my AoC 2017 repo with some results at the bottom of the readme: https://github.com/narimiran/AdventOfCode2017
16:01:36FromDiscord<michalm> Hi. How I can run execProcess in an async way without blocking whole program. I've created something like that: https://pastebin.com/cS86hg7U but at the end when I am making myFuture.callback= proc() ...sth... it is still waiting untill os process will exit.
16:01:46FromDiscord<exelotl> Now I'm motivated to continue with GBA stuff (dialogue system etc.) so I'll spend the rest of the month on that instead
16:02:33FromGitter<kaushalmodi> narimiran: wow you put in quite some time in aoc2017
16:02:43FromGitter<kaushalmodi> the analysis is impressive
16:02:48FromGitter<kaushalmodi> good I am not using Python :)
16:02:54disruptekmichaelm: there's a pretty clear impl of this in golden.
16:02:57disruptek!repo golden
16:02:58disbothttps://github.com/disruptek/golden -- 9golden: 11a benchmark for compile-time and/or runtime Nim 15 9⭐ 0🍴
16:03:25FromGitter<kaushalmodi> disruptek: Cool! I will have a look
16:03:30FromGitter<kaushalmodi> have you tried hyperfine?
16:03:47disruptekwhat?
16:04:06FromGitter<kaushalmodi> disruptek: https://github.com/sharkdp/hyperfine
16:04:26disruptekno, that's cool, thanks.
16:04:28narimirankaushalmodi i've done nim+python at the time the tasks were coming out (2 years ago), then i did ocaml one month ago as a preparation for AoC 2019 — those were my first steps in ocaml
16:04:34disruptekprobably some good ideas here.
16:04:51FromGitter<kaushalmodi> disruptek: that's how I got the results above (https://gitter.im/nim-lang/Nim?at=5df11245235bd42f97c021b8)
16:05:56*tklohna quit (Ping timeout: 268 seconds)
16:06:11disruptekthe idea of golden is that we'll store all the data and then use it to roll between different git trees to identify regressions in your codebase.
16:06:27disruptekit's not finished.
16:08:03FromGitter<kaushalmodi> disruptek: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df11463c62ef76b444eb2db]
16:08:12FromGitter<kaushalmodi> git protocol is blocked at work (no idea why)
16:08:20FromGitter<kaushalmodi> can you change the url to https?
16:08:35FromGitter<kaushalmodi> I got above when doing nimble install golden
16:08:47disruptekgah nimble is dumb as a sack of hammers.
16:09:15disruptekbtw, i wish you'd try nimph. give me some feedback.
16:10:25FromGitter<kaushalmodi> I do have to check that out, will do soon
16:10:37FromGitter<kaushalmodi> btw that error has to do with the network restriction at work
16:10:51FromGitter<kaushalmodi> you'll need to change the url to https from git in the packages.json
16:11:05disruptekreally? because it looks like it merely cannot grok it.
16:11:25FromGitter<kaushalmodi> because.. even after I manually install cutelog, the installation of golden fails with the same error
16:11:27disruptektry golden now. it was a req in bump, which i also updated.
16:11:47FromGitter<kaushalmodi> ok, git cloning golden to do local install
16:12:34disruptekthis is a good tip in any event. we have to be careful not to specify reqs using git.
16:12:38FromGitter<kaushalmodi> ok, seems like nimble install now works
16:12:43FromGitter<kaushalmodi> I see it fetching https url
16:12:50disruptekyep, it should be fine.
16:13:17FromGitter<kaushalmodi> argh, now this:
16:13:24FromGitter<kaushalmodi> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df115a4c428267e21598368]
16:13:34FromGitter<kaushalmodi> "wanted 0.2.9 got 0.3.0." really?
16:13:58disrupteki know. i asked him to cut a release to fix this.
16:14:19disruptekpeople just refuse to tag stuff. it's infuriating. i think i actually forked his package so i could tag it.
16:14:32disruptekyep, i did. what does that tell you? it's absurd.
16:15:05FromGitter<kaushalmodi> somewhere the dep is probably looking for the exact version instead of `>=`
16:15:20disruptekof course it is. because i haven't tested it with 0.3.0.
16:15:32FromGitter<kaushalmodi> https://github.com/disruptek/golden/blob/647f8ff0819812674c72d450db36660cfac17f95/golden.nimble#L11
16:15:45disruptekright, i did it intentionally.
16:15:51disruptekbut what choice do i have?
16:16:07disruptekthe fault is with the maintainer who refuses to tag the package.
16:16:18FromGitter<kaushalmodi> so the msgpack4nim hasn't released 0.2.9?
16:16:25disruptekright.
16:16:32FromGitter<kaushalmodi> you can replace the package name with url to your fork in the .nimble
16:16:33disruptekthey just need to tag it.
16:17:01disrupteki know; i just haven't done it yet. my fork is tagged as 0.3.1 and i want to test 0.3.0.
16:18:09FromGitter<kaushalmodi> Magit (easy) makes tagging so easy.. just these bindings: `t t "tag name" P T` done
16:18:22disruptek!repo bump
16:18:23disbothttps://github.com/disruptek/bump -- 9bump: 11a tiny tool to bump nimble versions 🍻 15 7⭐ 1🍴 7& 1 more...
16:18:23FromGitter<kaushalmodi> heh, I meant to type Magit (emacs)
16:18:36FromGitter<kaushalmodi> that too! I need to try
16:18:43FromGitter<kaushalmodi> ok, got to sign off for now
16:18:47disruptekyeah, i sometimes use Magit for commits of individual hunks in vim.
16:18:52FromGitter<kaushalmodi> I'll try out golden later today
16:18:57disruptekthanks, boss.
16:20:48FromDiscord<yewpad> I'm currently in process of configuring a project and I just wanted to know what you guys prefer as max line length for Nim files. I heard that 80 is mostly used in the standard lib
16:20:59disruptekyep.
16:22:50*fireglow joined #nim
16:37:12*tiorock joined #nim
16:37:12*tiorock quit (Changing host)
16:37:12*tiorock joined #nim
16:37:12*rockcavera quit (Killed (sinisalo.freenode.net (Nickname regained by services)))
16:37:12*tiorock is now known as rockcavera
16:38:01FromGitter<kaushalmodi> disruptek: golden now installs fine
16:38:23disruptekthanks, yeah, i pointed it to a special #golden tag in my fork.
16:38:46disruptekbut i appreciate you adding to that ticket. ;-)
16:39:17FromGitter<kaushalmodi> few requests ⏎ ⏎ 1) Option to do run-only (like you already have compile-only). That will allow me to profile just `./day10 "part1"` etc ⏎ 2) print time in human readable units like ms, ns, etc [https://gitter.im/nim-lang/Nim?at=5df11bb555f95737829940df]
16:39:30*dddddd joined #nim
16:39:48disruptekit does 1; just pass it a binary instead.
16:39:53*tiorock joined #nim
16:40:40disruptekyeah, we should humanize numbers.
16:40:45FromGitter<kaushalmodi> this does not work - `golden -i=3 './day10 "part1"'`
16:41:04disruptekgolden -i=3 -- ./day10 part1
16:41:11disrupteki think that's the syntax.
16:41:38disruptekgolden -i=3 ./day10 -- part1
16:42:13disruptekit'll be hashing that day10 file and stuff, so it needs to know.
16:42:40FromGitter<kaushalmodi> passing the binary args after `--` worked. thanks
16:42:48*rockcavera quit (Ping timeout: 252 seconds)
16:43:00disruptekthat was actually kinda hard to do in cligen, relatively speaking.
16:43:15*rockcavera joined #nim
16:43:15*rockcavera quit (Changing host)
16:43:15*rockcavera joined #nim
16:44:20FromGitter<kaushalmodi> yeah..
16:45:00FromGitter<kaushalmodi> (https://files.gitter.im/nim-lang/Nim/xIJY/image.png)
16:45:22*tiorock quit (Ping timeout: 252 seconds)
16:45:50disruptekseems like we're a little more efficient.
16:46:32disruptekare you on linux?
16:46:53FromGitter<kaushalmodi> yes
16:47:04FromGitter<kaushalmodi> can I have just one final table of min/max/mean?
16:47:08disruptekif you can run kitty, you can play with the graphs-in-console.
16:47:19disruptek!repo kitty
16:47:20FromGitter<kaushalmodi> the 0s times are usually not useful
16:47:21disbothttps://github.com/kovidgoyal/kitty -- 9kitty: 11A cross-platform, fast, feature full, GPU based terminal emulator 15 8001⭐ 371🍴 7& 29 more...
16:47:57FromGitter<kaushalmodi> ok, it's tempting, but I really need to get back to work stuff :)
16:48:00disrupteki made a ticket for humanizing.
16:48:15FromGitter<kaushalmodi> *I should have done that instead of pinging here* Thanks!
16:48:23disruptek!search humanize numbers
16:48:24disbothttps://github.com/disruptek/golden/issues/16 -- 3humanize numbers with units 7& 1 more...
16:48:31disruptekthanks for playing with golden.
16:49:16disruptekyou get a final table, always, but if you want it briefer, we can add that.
16:51:49*tiorock joined #nim
16:51:49*rockcavera is now known as Guest55834
16:51:49*tiorock quit (Changing host)
16:51:49*tiorock joined #nim
16:51:49*Guest55834 quit (Killed (cherryh.freenode.net (Nickname regained by services)))
16:51:49*tiorock is now known as rockcavera
16:54:57Araqso ... turns out the cycle collector had yet another silly bug...
16:56:25Araqbut now the one and only test case that matters is green
16:56:55Araqquite impressive given that I personally don't really understand the involved topology
16:57:43disruptekcomputers ftw
16:58:14Araqthis Lins guy is a mad genius
16:58:40Araq"The two decade long research path followed by the
16:58:40Araqauthor was fundamental to arrive at the new algorithm..."
16:59:45*tiorock joined #nim
17:02:41*rockcavera quit (Ping timeout: 265 seconds)
17:02:54disrupteki really need devel dependencies in my package manager.
17:03:14*rockcavera joined #nim
17:03:14*rockcavera quit (Changing host)
17:03:14*rockcavera joined #nim
17:04:37FromDiscord<mratsim> Disruptek benchmark are melting and vaporizing CPUs: https://github.com/disruptek/golden/blob/master/src/golden/fsm.nim#L82-L84
17:04:54disrupteki know, right?
17:05:18disrupteki actually found the source to that fsm recently. i should credit it.
17:07:02*tiorock quit (Ping timeout: 265 seconds)
17:09:01FromDiscord<mratsim> I need a code generated state machine without any heap memory for my runtime
17:09:34*LyndsySimon quit ()
17:09:59*LyndsySimon joined #nim
17:13:10disruptekthe problem is, without a devel requirement, nimph doesn't attempt to add --path statements for dependencies, local or not. should it just add anything it finds that is local to the project?
17:13:26disruptekor should we add the concept of devel dependencies?
17:13:56disrupteki think the 2nd option is more conceptually pure.
17:14:15*ponyride1 quit (Read error: Connection reset by peer)
17:14:21*krux02 quit (Remote host closed the connection)
17:15:20*d10n-work quit ()
17:16:09*d10n-work joined #nim
17:17:13*NimBot joined #nim
17:19:58*nsf joined #nim
17:23:48*npgm quit ()
17:24:15*npgm joined #nim
17:24:56*narimiran quit (Ping timeout: 240 seconds)
17:26:28*tiorock joined #nim
17:26:29*rockcavera quit (Killed (card.freenode.net (Nickname regained by services)))
17:26:29*tiorock is now known as rockcavera
17:26:29*rockcavera quit (Changing host)
17:26:29*rockcavera joined #nim
17:28:35rayman22201I vote devel dependencies. npm does it that way and I like that feature.
17:40:36lqdev[m]is there a way of determining if a proc {.raises.} in a macro, without having to recursively walk all of the called procs' implementations and seeing if they raise?
17:41:29disrupteki have the same question wrt tags in general.
17:42:16*dddddd quit (Ping timeout: 240 seconds)
17:45:11*Jjp137 quit (Quit: Leaving)
17:45:19*Jjp137 joined #nim
17:53:50*nsf quit (Quit: WeeChat 2.6)
17:54:46*dddddd joined #nim
18:00:01*sagax joined #nim
18:01:03*rockcavera quit (Remote host closed the connection)
18:01:36disruptekprocs need to be in global scope to be passed to ffi calls?
18:25:46FromDiscord<mratsim> they just need exportc afaik
18:43:55lqdev[m]oh man, what a release. https://github.com/liquid600pgm/euwren/releases/tag/0.8.0
18:44:10lqdev[m]disruptek: how do you like my new test suite? ;)
18:44:38disrupteklet's see...
18:45:09disruptekneat. i bet you have some ideas on how to simplify it.
18:45:32lqdev[m]not really.
18:45:49disruptekyou might want to see if you can parallelize it with unittest2.
18:45:58disruptek!repo unittest2
18:46:01disbothttps://github.com/nose-devs/nose2 -- 9nose2: 11The successor to nose, based on unittest2 15 595⭐ 128🍴 7& 29 more...
18:46:05lqdev[m]hmm, let's see
18:46:12disrupteki don't think that's the right repo.
18:46:18disruptek!repo nim-unittest2
18:46:20disbothttps://github.com/stefantalpalaru/nim-unittest2 -- 9nim-unittest2: 11fork of the "unittest" Nim module, focused on parallel test execution 15 2⭐ 0🍴
18:47:35federico3another 2?
18:48:31FromDiscord<exelotl> "nim-unittest2" 2
18:48:47disruptekdeuce, part deux.
18:49:53lqdev[m]I might stick to stdlib unittest for the time being, and switch to this if tests take a horribly long time to execute.
18:50:12lqdev[m]s/take/start taking/
18:50:28disruptekthe main reason to switch is that the powers that He are currently rather negative on continued unittest support in the stdlib.
18:51:18*kungtotte joined #nim
18:52:33lqdev[m]but this repo was updated about half a year ago, that's why I'm worried about switching
18:52:54disruptekyou and me, buddy, we can maintain it.
18:53:02disrupteknimph fork unittest2
18:54:26lqdev[m]sounds like an idea. let's make a unittest3 ;)
18:57:39FromDiscord<mratsim> just ping @stefantalpalaru. We are considering switching away from unittest for tsting Nimbus
18:58:23disruptekthe only problem i have with unittest is that it hides logging output, presumably stderr.
18:58:38disruptekmratsim: what do you dislike about it?
18:59:08stefantalpalaruWe are already using nim-unittest2 in https://github.com/status-im/nimbus/ but with parallelism disabled, due to bugs in threadpool.
18:59:32disruptekoh, so you're switching from unittest to unittest2.
19:00:15disruptekwhy not move unittest2 threadpool to yuri's?
19:00:26disruptekseems unlikely that you're using stdlib threadpool anywhere.
19:01:01stefantalpalaruI have not given up fixing the stdlib one.
19:04:31stefantalpalaruDynamic pool size changes complicate things, but it must be possible to fix it without changing the API.
19:07:20disruptekfair enough.
19:13:05*nsf joined #nim
19:14:52planetis[m]mratsim: hi, take a look at https://github.com/b3liever/macromachining/blob/master/macromachining.nim might be useful
19:15:00*liam_ joined #nim
19:17:04liam_sashlick: Any luck with getting the new OpenSSL wrappers working?
19:18:09federico3uh?
19:18:26*rockcavera joined #nim
19:26:29lqdev[m]how do you print an exception's stack trace to a string?
19:26:53lqdev[m]ah, there's `getStackTrace()`.
19:27:08*tane joined #nim
19:27:44*clyybber joined #nim
19:28:25*clyybber quit (Client Quit)
19:29:04*liam__ joined #nim
19:29:28*ng0 quit (Ping timeout: 260 seconds)
19:31:11FromDiscord<Clyybber> @mratsim FYI you shouldnt need to workaround the enum-atomics bug anymore, its fixed in devel
19:31:38FromDiscord<mratsim> ah yes, thanks for the reminder
19:31:53*liam_ quit (Ping timeout: 276 seconds)
19:37:37Araqclyybber: one line and the nice async_prototype works with the cycle collector
19:40:22Araqhamming.nim still leaks memory though
19:41:54FromDiscord<Clyybber> Araq: Awesome!
19:42:54*ng0 joined #nim
19:43:06Araqthavlak also leaks :-(
19:45:20*nsf quit (Quit: WeeChat 2.6)
19:46:29rayman22201🎉
19:48:38Araqoh wait
19:48:49Araqit keeps stuff alive, no wonder it leaks
19:52:50Araqleaks 36MB
20:13:32*nif left #nim ("Leaving")
20:20:37disruptekno one will miss 36mb.
20:21:15disruptektell them i'll email them an extra 36mb if they need it.
20:34:35*ng0 quit (Quit: Alexa, when is the end of world?)
20:34:40FromDiscord<mratsim> @Clyybber, I managed to fix my deadlock, I don't know what I did, I just uncommented everything I stashed before and voilà, it works ...
20:34:55*krux02 joined #nim
20:37:28*ng0 joined #nim
20:38:16lqdev[m]disruptek: how would you mail someone 0.0045 B though
20:39:09disrupteki'd cut it up with a very small knife.
20:41:03lqdev[m]sounds like an idea. I think a laser cutter with a very fine resolution would be a better idea. after all, it has better resolution than your hand. (unless you're a robot)
20:41:45disruptekassume nothing.
20:41:50FromDiscord<Clyybber> @mratsim nice
20:44:02FromDiscord<Clyybber> disruptek: sending ram and prayers your way 🚾
20:45:11disruptekrobots don't need prayer.
20:45:33FromDiscord<mratsim> they need robots.txt
21:02:51lqdev[m]how can you check if the build is a debug build? `defined(debug)` doesn't seem to work.
21:03:26disruptekcheck that release/danger are not defined.
21:03:48lqdev[m]I thought so, but I also thought that maybe there's some shortcut
21:05:53*Kaynatwo joined #nim
21:06:54*Kanato joined #nim
21:09:16*Kaynato quit (Ping timeout: 240 seconds)
21:10:38*Kaynatwo quit (Ping timeout: 265 seconds)
21:17:23*narimiran joined #nim
21:19:47*liam__ quit (Quit: Leaving)
21:21:05FromDiscord<mratsim> ah, defined debug doesn't work?
21:21:54FromGitter<kaushalmodi> hmm, I have been using `when defined(debug)` to mask debug echoes :P
21:22:09FromGitter<kaushalmodi> I compile with `-d:debug` to show more verbose echoes
21:22:34FromGitter<kaushalmodi> .. so it works with `-d:danger -d:debug` too
21:27:26*tane quit (Quit: Leaving)
21:35:30lqdev[m]all right. I'm done for now https://github.com/liquid600pgm/euwren/releases
21:35:36lqdev[m]I'll be working on my game, then
21:37:49*krux02 quit (Remote host closed the connection)
21:44:21FromGitter<kaushalmodi> Can I derive a const Table value based off another const Table at compile time?
21:45:44FromGitter<kaushalmodi> I have this code to populate a table variable, but it's essentially a const, but how can I populate it at compile time: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df163880dc628523e1c5bc0]
21:49:52disruptekdo you see software in 1d, 2d, 3d, or more?
21:50:45FromGitter<phillvancejr> hello. How can I subclass a C++ object? I'm working with the wxWidgets bindings and want to subclass one of the controls
21:50:55*narimiran quit (Quit: leaving)
21:51:15disruptekkaushalmodi: you could init a new table from a retrieval of all values in the old.
21:55:14FromGitter<kaushalmodi> I didn't quite understand.. the new table is populating fine.. but it's happening at run time
21:55:29FromGitter<kaushalmodi> I would like to know if the above can happen at compile time
21:56:00disrupteki think i do this with a .compileTime proc.
22:01:44Araqphillvancejr: object of Superclass
22:02:19FromDiscord<Clyybber> Araq: So thavlak leaks because we check the memory before the destroy calls?
22:02:32Araqwhat?
22:02:39FromDiscord<Clyybber> Or why does it leak?
22:02:54AraqI don't know, sometimes I stop working and watch TV
22:03:01disruptekgtfo
22:03:14FromGitter<kaushalmodi> disruptek: Thanks! This works: ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5df167a2e72656230129ed44]
22:03:20FromDiscord<Clyybber> Araq: Ah, I thought you knew why :p
22:03:45FromDiscord<Clyybber> "it keeps stuff alive, no wonder it leaks"
22:04:32Araqah that
22:04:36disruptekkaushalmodi: yeah, if you have to do logic, you probably need a proc. but you could pass all the items to a new construction of the table otherwise.
22:04:39Araqthat was caused by globals
22:04:49Araqbut I moved it inside a main and yet it still leaks
22:05:08disrupteki'm not sure that was caused by globals.
22:05:18FromDiscord<Clyybber> Araq: Ah ok.
22:08:12disruptek14 new aws apis added 🎉
22:10:54FromDiscord<Clyybber> 🦀
22:14:06*ltriant joined #nim
22:14:35Araqat least ARC still kicks ass for gcbench on my machines
22:29:21FromDiscord<yewpad> Is there a way to intercept write/writeLine/echo calls?
22:38:30FromDiscord<Clyybber> null terminated strings are dumb IMO, but this is a nice trick: https://youtu.be/kPR8h4-qZdk?t=541
22:42:59FromDiscord<yewpad> Do I have really have to come up with a unique name? I really love the stake at not having name shadowing but this is just...
22:42:59FromDiscord<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/654453101767426049/unknown.png
22:43:29FromDiscord<yewpad> That's just unnecessary work for me to think of a new term
22:43:42disrupteki'll think of one for you.
22:43:46disruptekhow about `goatse`?
22:43:53FromDiscord<yewpad> hahahahahahhaha
22:44:56FromDiscord<yewpad> @Araq: whhhyyyyyyyyy??
22:44:56FromDiscord<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/654453591557537814/unknown.png
22:46:36FromDiscord<Clyybber> ?
22:47:14FromDiscord<yewpad> ok nvm, the second one was my fault by not making the type public
22:47:40FromDiscord<yewpad> but i'd really like to name it `var terminal` and not `var term`
22:48:19disruptekgo ahead.
22:48:35FromDiscord<yewpad>
22:48:35FromDiscord<yewpad> https://cdn.discordapp.com/attachments/371759389889003532/654454510592196659/unknown.png
22:58:29*solitudesf quit (Ping timeout: 268 seconds)
23:36:52FromDiscord<mratsim> naming your variable the same name as a module is a recipe for headscratching bug
23:36:59FromDiscord<mratsim> the error messages get really bad
23:37:06disruptekoh c'mon, it's fun!
23:37:42*leorize joined #nim
23:50:35*lritter quit (Quit: Leaving)
23:55:15FromGitter<phillvancejr> Hello, I ran the scripts/convert file in the wxWidgets bindings to convert some additional headers and got a bunch of errors. I added all the headers from my wxwidgets include directory into the bindings headers hoping it would also compile them. It did compile a lot of them but many of them failed. Should I be passing wx-config to the convert script? I know this is an older library but if anyone has any ideas
23:55:15FromGitter... it would be awesome! thanks