<< 10-01-2020 >>

00:04:25shashlickPhew basic CI is back up
00:10:25*Hideki_ joined #nim
00:24:50*Hideki_ quit (Remote host closed the connection)
00:25:25*Hideki_ joined #nim
00:29:58*Hideki_ quit (Ping timeout: 265 seconds)
00:36:31*Hideki_ joined #nim
00:38:07*Hideki_ quit (Remote host closed the connection)
00:45:10*Hideki_ joined #nim
00:50:50*ltriant quit (Ping timeout: 240 seconds)
01:05:32*Hideki_ quit (Remote host closed the connection)
01:19:40*abm joined #nim
01:21:37FromGitter<mratsim> @Araq this might be a lightweight alternative to Z3, if just for array accesses (though Z3 would bring a lot more advantages I think): https://www.mendeley.com/catalogue/fadalib-open-source-c-library-fuzzy-array-dataflow-analysis/ (Fuzzy Array Dataflow Analysis is based on a paper from one of the main contrbutor of Polyhedral Research, Paul Feautrier)
01:23:42FromGitter<mratsim> Scrap it, the library is in bad shape + it's GPL
01:24:12*ltriant joined #nim
01:29:33*ltriant quit (Ping timeout: 260 seconds)
01:31:34*sealmove quit (Quit: WeeChat 2.7)
01:37:13*Hideki_ joined #nim
01:37:23FromGitter<gogolxdong> Anyone knows how to cancel the order of static library matual link dependency of llvm?
01:48:13*ltriant joined #nim
01:55:38*Hideki_ quit (Ping timeout: 240 seconds)
02:03:21*ltriant quit (Ping timeout: 268 seconds)
02:16:55*abm quit (Quit: Leaving)
02:31:17*ltriant joined #nim
02:31:44*rockcavera quit (Remote host closed the connection)
02:40:34disruptekfinally at a point where if i change a statement from let to var, the bug goes away.
02:44:48*ltriant quit (Ping timeout: 260 seconds)
02:58:57*dddddd quit (Remote host closed the connection)
03:17:19*ltriant joined #nim
03:22:15*mal`` quit (Quit: Leaving)
03:25:25*ltriant quit (Ping timeout: 265 seconds)
03:29:24*ltriant joined #nim
03:35:13*martinium joined #nim
03:40:11*ltriant_ joined #nim
03:43:18*ltriant quit (Ping timeout: 265 seconds)
03:44:33*mal`` joined #nim
03:50:50*ltriant_ quit (Ping timeout: 240 seconds)
03:52:55*Hideki_ joined #nim
03:55:48*muffindrake quit (Ping timeout: 248 seconds)
03:55:56*lxbarbosa quit (Ping timeout: 246 seconds)
03:57:43*Hideki_ quit (Ping timeout: 260 seconds)
03:57:44*muffindrake joined #nim
03:58:59FromGitter<kayabaNerve> Is Nim's random standard lib platform independent? As in, it generates the same results for the same seed no matter the OS.
04:00:36Yardanicoit should? it's pseudo random number generator after all
04:04:31skrylar[m]was reading on gui stuff earlier. apparently qt quick was inspired by this ring language 🤔 have not used either admittedly
04:18:14*chenhq2005 joined #nim
04:22:49*ltriant joined #nim
04:28:15*ltriant quit (Ping timeout: 265 seconds)
04:33:20disruptekhttps://github.com/disruptek/gittyup/commit/a160d0f53eea53f44dbcc08df1511480d25bd8dd#diff-3624edfe32a9fc6d2fb4d9f62f2d5aebR1421
04:40:12*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:43:39*martinium joined #nim
04:52:28*nsf joined #nim
04:55:25*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
04:55:47TangerIs it possible to get the children of a NimNode as a seq, rather than using the `children` iterator?
04:56:18*ltriant joined #nim
04:57:00TangerNot possible, sorry, I mean does a helper function exist?
04:57:05YardanicoTanger: maybe try using toSeq from sequtils?
04:57:35Yardanicoit gets all values from an iterator and stores them in a sequence
04:58:29TangerAwesome, that's perfect, thanks Yardanico !
05:05:38*chenhq2005 quit (Ping timeout: 240 seconds)
05:08:14*chenhq2005 joined #nim
05:23:32madpropswondering if it's possible to read the start of a file instead of loading the whole file ..
05:23:46*ltriant quit (Ping timeout: 268 seconds)
05:24:46*Jjp137 quit (Read error: Connection reset by peer)
05:26:52*chenhq2005 quit (Ping timeout: 258 seconds)
05:29:50FromGitter<gogolxdong> https://github.com/gogolxdong/clang2nim
05:34:25*ltriant joined #nim
05:45:14*ltriant quit (Ping timeout: 240 seconds)
05:54:24*ltriant joined #nim
05:59:27*ltriant quit (Ping timeout: 258 seconds)
06:01:51*uu91 joined #nim
06:02:42*chenhq2005 joined #nim
06:05:58*oculux quit (Ping timeout: 258 seconds)
06:06:25*deepend quit (Remote host closed the connection)
06:06:46*deepend joined #nim
06:07:41*narimiran joined #nim
06:11:16FromGitter<sheerluck> @gogolxdong I compiled clang2nim with "clang++ -v -std=c++2a clang2nim.cpp -o clang2nim -I/usr/lib/llvm/8/include/ -lclangTooling -lclangBasic -lclangFrontend -lclangSerialization -lclangAST -lclangRewrite -lclangLex `llvm-config --libs --system-libs`"
06:11:42FromGitter<sheerluck> but I don't know how to use it
06:17:13FromGitter<Varriount> @gogolxdong What does it do?
06:30:09*ltriant joined #nim
06:32:44Zevvdisruptek: the bug goes away, but the root cause is still there, right
06:35:06*ltriant quit (Ping timeout: 258 seconds)
06:38:26*marmotini_ joined #nim
06:58:41*martinium joined #nim
07:03:40FromGitter<gogolxdong> it translates c/c++ to nim.
07:05:44FromGitter<gogolxdong> you tranverses ast and change each to nim ast.
07:05:52Tangermadprops, I think `.lines` only loads one line into memory at a time
07:06:04TangerSo long as it's newlined correctly.
07:07:50TangerActually, a file is just a ptr to a cuint (file descriptor). So maybe check the IO module to read the first X characters of a file without loading the whole thing into memory https://nim-lang.org/docs/io.html
07:11:12FromGitter<gogolxdong> then replace it with the default clang or gcc so that it can translate project.
07:12:04FromGitter<gogolxdong> replace clang or gcc
07:13:03FromGitter<gogolxdong> your compilation option is helpful for those who have llvm installed.
07:13:56FromGitter<gogolxdong> It traverses ast and replace with nim ast.
07:14:23FromGitter<gogolxdong> there is still a lot to do.
07:15:24FromGitter<gogolxdong> use it as a compiler.
07:22:50*Jjp137 joined #nim
07:23:11madpropshow can I .. var content: openArray[char]
07:23:35narimiranyou cannot use openArray like that, AFAIK
07:23:49madpropsim supposed to send a var openarray to a function, to fill it
07:24:17narimiranyou can pass seq or array
07:25:16narimiranor even string
07:26:12narimiranmadprops: https://play.nim-lang.org/#ix=2702
07:31:48madpropsoh cool
07:35:03FromGitter<Varriount> Tanger: isn't it already a sequence?
07:35:19madpropsim confused about: proc readChars(f: File; a: var openArray[char]; start, len: Natural)
07:35:43madpropsto do that, im sending a file which i opened, then sending a var seq, then 0 for start, and 300 for len
07:35:52madpropsbut im confused about the ; and , there
07:35:52FromGitter<Varriount> Stored in something like a 'child' field?
07:37:41*martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
07:38:57TangerVarriount: .children returns an iterator type, not a seq unfortunately. But the toSeq accepts an iter
07:39:30narimiran"im confused about the ; and , there" -- there's no difference between them
07:40:33TangerIs an nnkStmtList literally a call and a colon, followed by a block of code? Or is it the colon and an indented block after?
07:41:19TangerLike, if I wanted to describe to someone what StatementLists do to a noob when dicking about with the AST
07:42:58Tangerie "An nnkStmtList block is the section of code that consists of a colon and an indented body of code." maybe?
07:43:14*kungtotte is now known as kungtotte_
07:43:20lqdev[m]actually it's just a statement list, without a colon, but let's omit the details
07:43:51madpropsnarimiran, problem I have is, i'd like to use readChars (from io) but it seems i need to know the max number of chars it has or else it overflows
07:44:00madpropsi could use readLine, but the first line could be huge
07:44:10madpropsor i could use readBytes
07:44:37narimiranmadprops: can you go a step back and tell us what you're trying to achieve generally (without specific procs mentioned)?
07:45:02TangerThanks lqdev[m]
07:45:12narimiranwhat i'm trying to say: if you want to read from a file line by line, i would use `lines` iterator
07:45:29madpropsI'm checking the first 300 chars of a lot of textfiles, to check if they contain \0 (meaning it's probably not a text file). What I was doing was using readFile, and checking a substring, but that's slow on big files
07:45:59madpropsso i would rather just read the first bytes, not the whole file, and check those
07:48:37madpropsi think the way to go is readBytes and finding the max number of bytes the file has
07:50:26narimiranmadprops: there are `io.getFileSize` and `os.getFileSize`
07:50:26Tangermadprops: https://play.nim-lang.org/#ix=2707
07:51:11madpropsthank you both
07:51:36TangerThat's an example of reading 255 chars in and printing them. You could substitute the loop with a look that goes over all files in a dir
07:54:27*chenhq2005 quit (Ping timeout: 258 seconds)
07:57:47*ltriant joined #nim
08:00:00*gmpreussner quit (Quit: kthxbye)
08:02:43*ltriant quit (Ping timeout: 260 seconds)
08:03:50madpropsare string and seq[int8] interchangeable?
08:04:41madpropsor .. how should I convert those bytes to string?
08:05:09*gmpreussner joined #nim
08:08:27madpropsok cast works
08:10:58*solitudesf joined #nim
08:14:13FromDiscord<Rika> cast works but isnt recommended
08:14:26FromDiscord<Rika> i still do not know what the recommended way to convert between them are
08:14:33*chenhq2005 joined #nim
08:20:34skrylar[m]static assert char.sizeof == int8.sizeof; set_len(foo, bar.len); copymem(addr foo[0], bar[0], bar.len)?
08:22:24skrylar[m]though technically strings are unicode so going the other direction should pedantically come with a correctness check first
08:35:46Araqwhy int8? shouldn't this be uint8/byte?
08:40:07ZevvWhat is up-drafting?
08:40:59TangerZevv: In what context?
08:41:12Zevvoh, "un-draft" :)
08:41:20Zevvcomment from ar_q
08:44:24ZevvAraq: is os:standalone going to stay?
08:44:51Araqsure but we won't develop it further
08:45:03Araqos:ansic is the new mode
08:45:19Zevvbut not throwing it out yet
08:45:45Zevvok
08:59:13FromGitter<alehander92> @dom96 yes i wondered about that: is it planned to be able to generate inferred exceptions to docs etc
08:59:29*kungtotte_ is now known as kungtotte
08:59:37FromGitter<alehander92> because this is a big `-` compared to the error Result type currently
09:02:20*floppydh joined #nim
09:06:08*ltriant joined #nim
09:11:19*ltriant quit (Ping timeout: 268 seconds)
09:19:06FromGitter<Varriount> Tanger: see the source code of the macros module
09:20:33skrylar[m]had to google ansic before realizing ANSI C
09:21:37FromGitter<Varriount> It's because if you google "C", all you get is C++
09:22:08skrylar[m]`ansi-c`
09:23:58*ltriant joined #nim
09:29:12*ltriant quit (Ping timeout: 268 seconds)
09:34:18Zevvwhat's with ansi C
09:38:13*letto quit (Quit: Konversation terminated!)
09:38:26Araqyeah we need a better name
09:38:37Araq--os:mallocButNoOs
09:38:40WilhelmVonWeinercansi
09:39:00FromGitter<alehander92> --os:core
09:39:07Araq--os:ihaveAHeadNowGiveMeALolipop
09:39:15Araq*Heap lol
09:39:22Araq--os:ihaveAHeapNowGiveMeALolipop
09:40:28FromGitter<alehander92> but core is the rust name for the bare metal supported part of stdlib iirc so no
09:43:13ZevvAnd I wanna target C89 as well :)
09:43:34ZevvLua can run in Turbo C 1.0, so should nim!
09:43:37*dddddd joined #nim
09:53:49*muffindrake quit (Quit: muffindrake)
09:54:02FromGitter<sheerluck> And I wanna Nim proof assistant to prove Pythagorean Theorem
09:55:09*NimBot joined #nim
09:59:38FromDiscord<Rika> lollipop has 3 Ls
10:00:21AraqI know but I follow the tradition
10:00:34Araqeverything must be misspelt and misnamed
10:01:32Araqguys we are about to stream
10:04:42FromGitter<sheerluck> is it https://www.twitch.tv/araq4k
10:04:49*marmotini_ quit (Remote host closed the connection)
10:06:02narimiranit is
10:07:03*oculux joined #nim
10:08:55narimiranit is live now
10:10:40*letto joined #nim
10:15:33FromDiscord<Rika> can `json`
10:15:43FromDiscord<Rika> aygebpuasj why is `'` so near enter
10:18:10FromDiscord<Rika> anyway can `json.to` convert a json node to a `times.DateTime`
10:27:30*abm joined #nim
10:54:08FromDiscord<Rika> https://play.nim-lang.org/#ix=270D i dont seem to understand what the issue is here
11:01:58FromDiscord<mratsim> there is no aDate field in your json
11:02:22FromDiscord<Rika> its not being called
11:03:11FromDiscord<Rika> j{} is not a json object, it's like `j["data"]["SomeObject"]` is it not?
11:05:33FromDiscord<Rika> if i removed all `Date` fields (assuming there are fields left), the program compiles
11:07:15*krux02 joined #nim
11:08:21FromDiscord<mratsim> I can't say, I never used the "to" proc in Nim json
11:08:35FromDiscord<mratsim> for when I know the schema I use nim-json-serialization
11:10:36FromDiscord<Rika> TIL
11:11:44FromDiscord<Rika> ok so how the hell do i use it, i dont seem to find their docs if any
11:13:33FromGitter<IamRifki> Is there a list of things I have to worry about when using Nim without garbage collection
11:13:51FromGitter<IamRifki> I'm using Nim on a GBA so I can't use GC
11:15:41FromDiscord<Rika> use destructors "gc"
11:16:44FromGitter<IamRifki> Destructors?, that's it?
11:17:05FromGitter<IamRifki> I only have to worry about destructing?
11:17:17FromDiscord<Rika> uh i mean
11:17:24FromDiscord<Rika> thats not all
11:17:42FromDiscord<Rika> i dont have much knowledge on it but afaik you have to manually manage any ref objects you make
11:17:49FromDiscord<Rika> (i dont know how)
11:18:00FromDiscord<Rika> i only have small scraps of knowhow ;;
11:18:00FromGitter<IamRifki> Welp
11:18:26FromDiscord<Rika> something about a `=destroy` proc and a `=sink` proc and stuff i dont recall
11:24:09Zevvgood timing. Zevv joined the twitch: "... that's it for today, bye bye"
11:24:53*ltriant joined #nim
11:24:58*rockcavera joined #nim
11:26:10FromGitter<sheerluck> @Araq your recursive `transform` does not have explicit "return" in non recursive path. And still works. Nim is magic
11:27:39FromDiscord<Rika> what? if there's a value to return, nim returns the last statement in the proc
11:29:47*nsf quit (Quit: WeeChat 2.7)
11:29:53*ltriant quit (Ping timeout: 258 seconds)
11:30:07FromGitter<sheerluck> Rika https://i.imgur.com/jwJk1sg.png
11:34:26FromGitter<alehander92> what was the stream
11:35:32FromDiscord<Rika> result variable is implicitly returned
11:37:40Araqalehander42: finalizers and 'repr' for ARC
11:38:48FromGitter<alehander92> so `repr` stays?
11:43:43Araqyeah
11:43:57Araqits implementation is copy&paste from '$' though
11:46:28FromGitter<alehander92> yeah i still feel maybe `$`/`repr` can be unified
11:46:28Zevvstupid question: why can't it use the same implementation instead of copy&paste?
11:46:36FromGitter<alehander92> hm and this seems like an argument for that
11:46:37Araqhttps://github.com/nim-lang/Nim/pull/13098 well this is the result
11:46:38disbotmore arc features
11:47:49AraqZevv, there are differences, for example 'ref object' is supported out of the box
11:48:13*ltriant joined #nim
11:48:16*Hideki_ joined #nim
11:48:57*muffindrake joined #nim
11:53:08*ltriant quit (Ping timeout: 260 seconds)
11:58:18*aexoxea joined #nim
12:02:02FromDiscord<mratsim> @Rika, it's Json.loadFile("file/path", TargetType) see https://github.com/status-im/nim-beacon-chain/blob/1f96340611d106fa01df56603f3bf3ead51dda3f/tests/official/fixtures_utils.nim#L44
12:02:37FromDiscord<mratsim> and if in memory "Json.decode(JsonNode, TargetType)
12:11:06FromGitter<alehander92> Araq
12:11:19FromDiscord<Rika> mm okay
12:12:00FromGitter<alehander92> i define stuff like `[T: range; U]` and `[T: not range; U]` taking `array[T, U]` and it seems that e.g. `array[-1..1, int]` always overloads both ?
12:12:14FromGitter<alehander92> so it leads to `ambigious call`
12:12:26FromGitter<alehander92> matches both*
12:13:13rockcaveraIs there any way to do recursion with iterators?
12:25:08FromDiscord<Rika> ah, okay, the `json.to` macro doesnt like ranges
12:27:47Zevvrockcavera: limited, since iterators are not reentrant at this time
12:29:29rockcaverapossibility to hack?
12:30:45Zevvalways, you have the full source, right? :)
12:31:05rockcavera=)
12:37:49FromDiscord<mratsim> you can do recursion if it can be unrolled at compile-time
12:38:00FromDiscord<mratsim> for example if it's based on types
12:46:48*endragor quit (Ping timeout: 260 seconds)
12:47:08*lritter joined #nim
12:49:08*Hideki_ quit (Ping timeout: 260 seconds)
12:49:15*aexoxea quit (Quit: Goodbye!)
12:49:22Araqalehander92: dunno
12:51:28*aexoxea joined #nim
12:57:02*vsantana joined #nim
13:09:22FromGitter<alehander92> like, is it supposed to work
13:13:15AraqI think so, how can an array index type be both a range and not a range at the same time?
13:13:28*vsantana quit (Quit: leaving)
13:13:30*Kaivo joined #nim
13:13:37FromGitter<alehander92> thats what i wondered :D :D
13:13:44Araqanybody familiar with ".github/workflow"?
13:13:52Araqhttps://github.com/Araq/ormin/pull/24/files
13:13:54disbotAllow custom functions ; snippet at 12https://play.nim-lang.org/#ix=2712
13:14:49Araqwell it looks good enough, so nice people taking over my Ormin
13:17:39Araqopen source works!
13:17:43Araqbbl
13:17:57FromGitter<alehander92> hm seems interesting
13:20:38*marmotini_ joined #nim
13:21:18*Hideki_ joined #nim
13:23:20*aexoxea quit (Quit: Goodbye!)
13:24:16*chenhq2005 quit (Ping timeout: 265 seconds)
13:25:39*Hideki_ quit (Ping timeout: 258 seconds)
13:25:43*aexoxea joined #nim
13:39:12FromDiscord<Rika> how do i post json with `httpclient.post`
13:40:55*floppydh quit (Quit: WeeChat 2.6)
13:48:21Yardanicowhat do you exactly mean?
13:48:46Yardanicohttps://nim-lang.org/docs/httpclient.html#using-http-post has a JSON example
13:48:57*ltriant joined #nim
13:54:17*chenhq2005 joined #nim
13:54:33*ltriant quit (Ping timeout: 268 seconds)
14:05:07FromDiscord<Clyybber> @IamRifki Regarding wanting to develop for the GBA with nim (that makes 3 of us!); @exelotl is already doing that
14:06:16FromDiscord<Clyybber> https://twitter.com/hot_pengu/status/1137819284246323203
14:06:24FromDiscord<Clyybber> !repo nim-tonc
14:06:25disbothttps://github.com/exelotl/nim-tonc -- 9nim-tonc: 11Nim bindings for tonclib (GBA framework) 15 12⭐ 0🍴
14:06:39FromDiscord<exelotl> Aha, why hello there
14:06:50FromDiscord<Clyybber> Ah, general exeotl
14:07:11FromDiscord<Rika> Yardanico, i missed it
14:07:14FromDiscord<Rika> its okay now
14:08:54FromDiscord<exelotl> Way ahead of you, I already met rifki on the gbdev discord haha :P
14:09:12FromDiscord<Clyybber> hehe
14:09:29FromDiscord<Clyybber> do you have an invite link for that discord?
14:10:16FromDiscord<exelotl> https://gbdev.github.io/
14:10:48FromDiscord<exelotl> the #gba channel is a relatively small part of it but it's the best place I've found on discord to talk about this stuff x)
14:10:54FromDiscord<Clyybber> Nice, thanks
14:12:40FromDiscord<exelotl> also looks like you scared them away lol
14:13:15FromDiscord<Clyybber> lol
14:13:56*aexoxea quit (Quit: Goodbye!)
14:16:54*aexoxea joined #nim
14:21:57FromDiscord<exelotl> my wrapper is starting to diverge from tonc a little
14:22:12FromDiscord<exelotl> so I'm searching for a different 4 letter name
14:22:23*chenhq2005 quit (Ping timeout: 258 seconds)
14:24:51FromDiscord<Clyybber> gbAh
14:26:59FromDiscord<niv> hello. im seeing some kind of malloc structures corruption occuring: https://gist.github.com/niv/d7d63b406fcdc2cac6cf26d87589026e
14:26:59FromDiscord<niv> i've found the bug https://github.com/nim-lang/Nim/issues/5636, which indicates this was fixed. any idea? @araq?
14:27:00disbotSegfault while trying to allocate
14:28:44FromDiscord<Clyybber> @exelotl Does it have to be 4 letters?
14:30:37FromDiscord<Clyybber> maybe ntonc is fitting, similar to ncurses vs curses
14:34:50FromDiscord<exelotl> huh that could work
14:40:23ZevvHow serious are compiler warnings when compiling Nim code "by hand"? These are conveniently hidden while doing "nim c", but wouldn't it be nice to have this compile clean?
14:41:34FromDiscord<Clyybber> what kind of warnings?
14:45:21FromDiscord<Clyybber> Zevv: ping
14:45:26Zevvoi
14:45:30FromDiscord<Clyybber> oi
14:45:42Zevvdiscarding const, things like that
14:46:03Yardanicoare you about https://forum.nim-lang.org/t/5785 ?
14:46:59Zevvoh look, I I hadn't seen that yet
14:47:09ZevvI just noticed with all the crosscompiling stuff I was doing
14:49:36FromDiscord<Clyybber> I think they are safe to ignore
14:49:54FromDiscord<Clyybber> the noreturn stuff looks a bit crazy, but it shouldn't matter
14:55:21Zevvyeah, but the problem is always that you start ignoring them and miss other warnings when they *do* matter
14:55:34FromDiscord<Clyybber> true that
14:59:12*aexoxea quit (Quit: Goodbye!)
15:02:40*aexoxea joined #nim
15:12:26*ng0_ joined #nim
15:12:26*ng0_ quit (Changing host)
15:12:26*ng0_ joined #nim
15:13:07FromGitter<matrixbot> `grantmwilliams` Does someone have a good project i can look at for some examples of unit testing in Nim?
15:13:36FromGitter<matrixbot> `grantmwilliams` been rewriting a python library and wanted to make sure im doing it the "correct way"
15:14:45ZevvThe 'correct' way is using the unittest module
15:14:51*ng0 quit (Ping timeout: 240 seconds)
15:15:01*ng0_ is now known as ng0
15:15:24ZevvI think about any mature library you pick will use that
15:15:39ZevvI happen to know this one well: https://github.com/zevv/npeg/blob/master/tests/basics.nim
15:17:12*solitudesf quit (Ping timeout: 258 seconds)
15:21:11disruptek!repo unittest2
15:21:14disbothttps://github.com/nose-devs/nose2 -- 9nose2: 11The successor to nose, based on unittest2 15 595⭐ 127🍴 7& 29 more...
15:21:21disrupteknope, not that one.
15:22:01disruptek!repo stefantalpalaru/nim-unittest2
15:22:03disbothttps://github.com/stefantalpalaru/nim-unittest2 -- 9nim-unittest2: 11fork of the "unittest" Nim module, focused on parallel test execution 15 2⭐ 1🍴
15:28:02disruptekzevv: yeah, now that i have a way to reproduce (several?) bugs i can diff the generated c and figure out where it comes from.
15:29:43*Hideki_ joined #nim
15:29:48FromGitter<alehander92> nose2 is nice
15:32:21disrupteki'm still using nose1. it's a little bigger than it used to be, but i think upgrading will be too painful.
15:35:19Zevvhaahaa disruptek has a big noohoosse
15:35:52Zevvdisruptek: "several" bugs?
15:36:13*marmotini_ quit (Remote host closed the connection)
15:36:24Zevvor can you cause the same symptom in more then one way?
15:36:51*solitudesf joined #nim
15:43:51FromGitter<kaushalmodi> @mratsim Thanks for your help on std::vector.. While trying out your snippet: ⏎ ⏎ https://github.com/numforge/agent-smith/blob/a2d9251e289f92f6b5fb68e19a98d16b00f2694c/third_party/std_cpp.nim#L27 ⏎ ⏎ I don't understand why but to make the constructor work, I needed `importcpp: "std::vector<'*0>(#)"` instead of `importcpp: "std::vector<'0>(#)"` (see the extra asterisk)
15:43:51FromGitter... [https://gitter.im/nim-lang/Nim?at=5e189bb6a74ac853778757ab]
15:46:47FromGitter<kaushalmodi> Without that asterisk, code like `var v2 = newVector[int](10)` gave this error (which I do not understand): http://ix.io/271M/text . I stole the `<'*0>` syntax from https://nim-lang.github.io/Nim/manual.html#importcpp-pragma-importcpp-for-procs
15:47:04shashlickis lscpu always available on Linux?
15:49:18Yardanicoyou can always use /proc/cpuinfo I think
15:49:52*ltriant joined #nim
15:50:06Yardanicobut lscpu is from util-linux so it should be available on pretty much any non-embedded distro
15:51:03disruptekzevv: yeah, i can cause a double free in more than one way, but it might still only be one bug.
15:52:31shashlicki need the CPU arch
15:52:35shashlickwhich isn't in /proc/cpuinfo
15:53:46Yardanicowell, there's "uname"
15:53:56Yardanicouname -m
15:54:24shashlickgood point
15:55:14*ltriant quit (Ping timeout: 268 seconds)
15:55:33Yardanicouname is also available in posix as a system call
15:55:34Yardanicohttps://nim-lang.org/docs/posix.html#uname%2CUtsname
15:55:40shashlickhttps://github.com/dom96/choosenim/blob/master/scripts/choosenim-unix-init.sh#L130
15:56:04federico3https://nim-lang.org/docs/posix_utils.html
15:56:18Yardanicofederico3: wow
15:56:28YardanicoI didn't know that existed :D
15:56:47shashlicknifty
15:58:18disruptekyeah, it worked so well as a util they decided to make it a call.
15:59:08shashlickbasically choosenim cannot get GCC arch if GCC isn't installed yet
16:00:22*Hideki_ quit (Remote host closed the connection)
16:01:26*Vladar joined #nim
16:01:50*Hideki_ joined #nim
16:06:16*Hideki_ quit (Ping timeout: 258 seconds)
16:11:58ZevvAraq: "baremetal" is not right either
16:13:52disruptek--os:byo
16:14:35Yardanico--os:myown
16:14:56Zevv--os:any
16:15:13disruptekany sounds good.
16:15:36shashlickheavyMetal
16:15:45disruptek--os:trance
16:15:52shashlicki'd prefer that
16:16:03disrupteki know. it's your special mode.
16:16:05Zevvno, light metal. --os:lithium
16:16:19disruptekheavy just sounds more badass.
16:16:24disruptek--os:tungsten
16:16:27shashlicki've made over a 100 trance songs way back when
16:16:37disruptekreally?
16:16:46disrupteki wrote most of nimph on trance.
16:17:02ZevvI thought on weed
16:17:04disruptekshow me some of your stuff.
16:17:24shashlickbeen 18 years now, was into the demoscene back then
16:17:31shashlickhttp://genotrance.com
16:17:33lqdev[m]oi, another trance lover here
16:18:07disruptekwow, shashlick has a blog.
16:18:14disruptek~shashlick
16:18:15disbotno footnotes for `shashlick`. 🙁
16:18:19disruptekoh c'mon...
16:18:24disruptekyou guys are terrible.
16:18:24shashlickthat's super obsolete as well
16:18:29Yardanico~yardanico
16:18:30disbotno footnotes for `yardanico`. 🙁
16:18:38disruptek~disruptek
16:18:38Yardanico😕
16:18:39disbotdisruptek: 11a sexy fella with magic hands. -- disruptek
16:18:54disruptekshashlick if you don't do it, i will.
16:19:09disruptekand then i'll be first.
16:19:20disruptekand your comments will be mere garnish.
16:19:46shashlickwho comments on themselves
16:19:51disruptekZevv: you owe be a drug-fueled debate on the feasibility of p2p-based pre-cognition software engineering.
16:20:21Zevvdude
16:20:41disruptek~shashlick is someone more felt than seen. no, that's not it. shashlick must be HEARD! https://genotrance.wordpress.com/
16:20:42disbotshashlick: 11someone more felt than seen. no, that's not it. shashlick must be HEARD! https://genotrance.wordpress.com/
16:20:56disruptekdude.
16:21:56Zevvdude impulsetracker
16:22:01Zevvsuddenly I feel so *old*
16:22:51disruptekimpulsetracker.
16:23:26disruptekwow, this is amazing.
16:23:43disruptekis that you singing?
16:24:18shashlickwhich song, i only sang in one if I remember correctly
16:24:25shashlickback then I used a pair of headphones to record
16:24:30disrupteki thought you were male for some reason.
16:24:42disruptekthat's so sexist of me, i know.
16:24:44shashlickI am, then that's my sister
16:24:59disruptekwow.
16:25:14disruptekyou're blowing my mind right now.
16:25:25disruptekyou're shashlick's sister?
16:25:46disrupteki may be a little too fucked up right now.
16:25:52shashlickit's 11am there, you still on weed? 😄
16:25:57disruptekdude.
16:25:58FromGitter<alehander92> shashlick is male
16:26:07disruptekedibles.
16:26:26disruptekit's what's for breakfast.
16:26:50disruptekbreakfast of champion compiler debuggers.
16:26:57disrupteki am gonna fix this thing today.
16:27:17disruptekshashlick that was so cool.
16:27:22Zevvthe mod's still play in 2020. "mikmod ge-yk.it" and go \o/
16:27:34disruptekthere's a nim-based mod player with tui.
16:27:50blackbeard420+1 for edibles while compiler debugging
16:27:52disruptekjohnnovak, i wanna say.
16:28:02disruptek!repo mod player
16:28:02disbothttps://github.com/johnnovak/nim-mod -- 9nim-mod: 11A Nim MOD player just for fun 15 14⭐ 4🍴
16:28:42shashlickdisruptek: which one
16:28:46disruptekclyybber is working on a hack of johnnovak's tui engine, for the benefit of his roguelike.
16:28:46Zevvgenotrance++ \o/
16:28:57*Vladar quit (Remote host closed the connection)
16:29:01disruptekshashlick: Tadap
16:29:16shashlickthat's a remix of a movie song
16:29:34disruptekoh, that's not you?
16:29:43disruptekis it your brother?
16:29:59disruptekwait, is this sister-shashlick or brother-shashlick?
16:30:02shashlicknope, some movie singer
16:30:14disruptekawww man.
16:30:15ZevvI think it is time to go diff your C, you man
16:30:18shashlickcom.shashlick.watched.movie
16:31:32disruptekwe should play this as background music on a stream.
16:31:48disruptekwhy don't we setup a streaming channel?
16:32:05Zevvsome of this stuff will do great on games
16:32:07disrupteki can devote a lot of hours to creating nim bugs on stream.
16:32:39Zevv"Demosha Strikes Again", I can see the paralax scroller platform before my eyes
16:32:48disrupteki'm not saying it bugs me, but shashlick's stuff is bringing on a whole litany of bugs right now.
16:33:02disruptekticks.
16:33:46shashlicklooks like 3 hours of lost productivity or extreme productivity
16:35:26disruptekwhat can i say, it's super cool to suddenly learn someone's an artist and you just never saw their art before.
16:35:58disrupteksorry shashlick, but your code just isn't art, buddy.
16:36:43shashlicki've been wanting to get back for years, will be two decades soon
16:37:00disrupteki still want to listen to code.
16:37:03shashlickof course, i'm still relatively active with guitar and singing but no where close to trance
16:37:07disruptekmaybe we should get together on that.
16:37:14disruptekimagine turning ast into sound.
16:37:34disrupteki know we've talked about this before. ima make that shit some day.
16:38:04shashlicki really want to write a music editor with nim, not a UI but perhaps with data files, automation and what not
16:38:06ZevvI make synthesizers and great plans, but the music is lacking
16:38:39shashlickyou know my fascination with automation
16:38:57disruptekone area that's ripe for exploitation is in written music composition. there's no solid piece of software for composition.
16:39:22disruptekthe state of the art is called "SCORE" and iirc it's dos-based.
16:39:37*Hideki_ joined #nim
16:39:49disruptekeach member of the competition has serious flaws.
16:40:02disruptekthis isn't /that/ hard a problem, but it's hard.
16:40:44disruptekyou want a layout engine that outputs svg.
16:40:50Zevvgraphviz
16:40:56disruptekthe rules are annoying, to say the least.
16:41:10disruptekbut the market is huge.
16:41:42FromGitter<Albus70007> i have a module and i want to use its functions in another file, but when i import i cant use its functions, why??
16:41:53ZevvDid you export* them?
16:41:59disruptekthis.
16:42:35FromGitter<Albus70007> how?
16:42:46FromDiscord<Clyybber> I wanted to make something like kakoune but for music
16:42:47disruptekadd a * after the identifier name.
16:42:49Zevvhttps://nim-lang.github.io/Nim/manual.html#procedures-export-marker
16:43:06disruptek~exports is https://nim-lang.github.io/Nim/manual.html#procedures-export-marker
16:43:06disbotexports: 11https://nim-lang.github.io/Nim/manual.html#procedures-export-marker
16:43:38FromGitter<Albus70007> thx
16:43:47disruptek~exports is export symbols by appending a `*` to the end of the identifier; see https://nim-lang.github.io/Nim/manual.html#procedures-export-marker
16:43:47disbotexports: 11export symbols by appending a `*` to the end of the identifier; see https://nim-lang.github.io/Nim/manual.html#procedures-export-marker
16:44:21ZevvClyybber: I built a hot-codable software synth a long time ago. It was fun building, but not fun to make music with :(
16:44:23disruptekclyybber: it's kinda like the origin story to latex.
16:44:25ZevvThe vim-plugin was the best par
16:44:29Zevvt
16:44:49disruptekwait, what
16:45:06disruptekoh, it had a vm you programmed it with?
16:45:22ZevvLuajit based
16:45:25Zevvhttp://worp.zevv.nl/
16:45:55disruptekwow, that's so neat.
16:46:09*Trustable joined #nim
16:46:22*sealmove joined #nim
16:46:23disruptekso i write something to turn nim ast into something like this.
16:47:14disruptekif it was a source-code filter, it could embed the worp code as comments.
16:47:41disruptekthen you could see what a procedure "sounds like" when you visit its definition.
16:48:42Zevvill have what you are having, thank you
16:48:52disrupteklol
16:48:53*aexoxea quit (Quit: Goodbye!)
16:49:02disrupteki mean, is it crazy?
16:49:24FromDiscord<Clyybber> Zevv: Ah, I know, I found it on your site some time ago
16:50:00FromDiscord<Clyybber> what I want to do is something like ORCA but a bit more logical and modular
16:50:12disrupteki kinda wish i had really learned lua. i only used it for wow mods.
16:50:15Zevvbuy a nord modular
16:50:26disruptekthat sounds like a power tool.
16:50:37Zevvit is
16:50:52FromDiscord<Clyybber> VCVRack is really nice
16:50:54Zevvas power and as tool as synths come
16:50:59Zevvand its red
16:50:59FromDiscord<Clyybber> faust and pd too
16:51:31disruptekeveryone seems to like the nord stage.
16:51:39disruptekis that the most expensive one or what?
16:52:21disruptekwhoosh.
16:52:36FromDiscord<Clyybber> I have a korg monologue that I found on the street so theres that
16:52:37ZevvI had one
16:52:38ZevvI sold it
16:52:58disruptekyou found a korg on the street?
16:53:05FromDiscord<Clyybber> yeah
16:53:08FromDiscord<Clyybber> a tiny handheld one
16:53:31disruptekthey say size doesn't matter,
16:53:32FromDiscord<Clyybber> it still works
16:53:36disruptekbut between you and me,
16:53:38disruptekit matters.
16:53:41disruptekoh boy, it matters.
16:54:04Yardanicowhat is happening
16:54:22*marmotini_ joined #nim
16:54:36disruptekwe're talkin' about little korgs.
16:54:36FromDiscord<Clyybber> yeah, I reject everything I can't play clair de lune on
16:54:50shashlickthis has turned into offtopic
16:54:54disruptekclair de lune is incredible.
16:55:00disruptekcould there be a more beautiful tune?
16:55:08FromDiscord<Clyybber> theres a game
16:55:21FromDiscord<Clyybber> one of my favorite games
16:55:22FromDiscord<Clyybber> prey
16:55:26FromDiscord<Fern & Simula (They/Them)> using c# makes me long for Nim's stdlib
16:55:49disruptekhttps://invidio.us/embed/MZpj2BujuD0
16:56:15disrupteki thought C# was nice. i think nim is better.
16:56:19FromDiscord<Clyybber> the new one, and at some point in a very stressfull and intense roguelike DLC gamemode, there is this room, where you look out into space and this https://www.youtube.com/watch?v=sHdaSX-E2Gw plays
16:56:28*Hideki_ quit (Ping timeout: 268 seconds)
16:57:04FromDiscord<Clyybber> tomitas version is also really nice
16:57:41Yardanicoremember this cursed "OOP" example from nim tutorial :D
16:57:43Yardanicostdout.write(stdin.readLine.splitWhitespace.map(parseInt).max.`$`)
16:58:17FromDiscord<gingerBill> That's just painful to read, sorry.
16:58:51FromDiscord<Clyybber> its concise
16:58:51FromDiscord<gingerBill> I understand what it does, but I am not a fan of daisy-chaining, except as a kid when I was looping daisies in a chain.
16:58:58Yardanicolol
16:59:01FromDiscord<Clyybber> at least
16:59:20FromDiscord<treeform> that looks like Haskell, not OOP
16:59:23disrupteki think that's a phase people go through, and some never leave.
16:59:40Zevv~you friggin *found* a monologue
16:59:40disbotno footnotes for `you`. 🙁
16:59:51FromDiscord<gingerBill> var lines = stdin.readLine.splitWhitespace
16:59:51FromDiscord<gingerBill> var ints = lines.map(parseInt)
16:59:51FromDiscord<gingerBill> var v = ints.max
16:59:51FromDiscord<gingerBill> stdout.write(v.$)
16:59:57FromDiscord<gingerBill> I know it is the same, but that is clearer to me
17:00:03Yardanicolet*
17:00:27FromDiscord<treeform> @gingerBill I don't think its the same, it has documented the steps with names
17:00:54FromDiscord<gingerBill> `let` would be fine too.
17:00:59FromDiscord<Clyybber> I kind of really want to make a hive
17:01:06FromDiscord<gingerBill> @treeform Well, yes it has. It has also made it vertical rather than horizontal
17:01:57disruptekwhat's the best thing to put in vertical space? horizontal?
17:02:21disruptekis x space and y time?
17:02:48FromDiscord<treeform> I am so happy my fidget UI lib has rendered a math formula:
17:02:55FromDiscord<treeform>
17:02:56FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665239147832803360/unknown.png
17:03:10disruptekawesome.
17:03:26disruptekhow do you do that?
17:03:50FromDiscord<gingerBill> Is that manual rendering or a library?
17:03:58FromDiscord<treeform> Its both.
17:04:06FromDiscord<gingerBill> (Manual as in you use something like freetype)
17:04:41FromDiscord<treeform> I did not use freetype, I parsed the fonts and used my own rasterization
17:04:43Yardanico@treeform what does it use in this screenshot? opengl?
17:05:01FromDiscord<treeform> Yardanico, yes glfw+openGL
17:05:10FromDiscord<gingerBill> @treeform Very cool
17:05:18disruptekisao tomita. wow.
17:05:26FromDiscord<gingerBill> What is the library part then?
17:06:02FromDiscord<treeform> @gingerBill rasterization and typesetting is done by: https://github.com/treeform/typography
17:06:20FromDiscord<treeform> Here is the part that freetype would do: https://github.com/treeform/typography/blob/master/src/typography/rasterizer.nim
17:06:21FromDiscord<gingerBill> Oh...
17:06:33FromDiscord<treeform> freetype is only part of the text puzzle
17:06:37euantor@gingerBill: Are you the same gingerBill that created Odin? I've had alook at it a few times and it looks neat
17:06:41FromDiscord<gingerBill> Yes
17:06:43FromDiscord<treeform> you also need pango and harfbuz
17:07:01FromDiscord<treeform> which I also trying to implement as one big "typography" lib
17:07:07FromDiscord<gingerBill> Harfbuzz is needed f you want to do anything that is non-western
17:08:22FromDiscord<treeform> I got JCK going, but Hebrew and Arabic are really hard to draw - "shaping" phase is really hard
17:09:18FromDiscord<gingerBill> Arabic is not just complicate, characters change depending where they are positioned in the word and what other characters are in the word and where.
17:09:24FromDiscord<gingerBill> Human languages are weird and wonderful
17:09:44disruptekas opposed to the other kind?
17:09:59FromDiscord<treeform> From programming standpoint Arabic has no characters but part of them, and you mix and match them with complex rules.
17:10:29Zevvhow does that work, input-wise?
17:10:36Zevvhow does one type arabic
17:11:02disruptekunlike kanji?
17:11:48FromDiscord<treeform>
17:11:49FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665241396600373291/Amiri-Regular.png
17:11:59FromDiscord<treeform> ^ soo many "parts" of letters
17:13:01Zevvoh I saw that pic before, it has that huge blob almost at the bottom
17:13:12Zevvstill wondering what that says
17:13:22FromDiscord<treeform> Me too
17:13:42FromDiscord<treeform> I think its either font's watermark or a verse
17:15:20Yardanicoah, this big letter?
17:15:40FromGitter<IamRifki> I upgraded a dependency (which is not in Nimble and is instead in a git repo which I submodule to)
17:15:49FromGitter<IamRifki> and now Nimble develop does not work
17:16:11disruptektry nimph.
17:16:14disruptek!repo nimph
17:16:14disbothttps://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 49⭐ 2🍴 7& 1 more...
17:16:26Yardanicohm, I thought it's ﷽, but it's not
17:16:27FromDiscord<treeform> Yardanico, in the font yes, but I don't think its a real letter
17:17:03FromDiscord<treeform> Many fonts have specific ligature for Allah and other common words, like Arial does.
17:17:28FromDiscord<treeform> Here is Arial:
17:17:28FromGitter<IamRifki> Do I really need an extra dependency to fix this mess?
17:17:29FromDiscord<treeform>
17:17:29FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665242824333066251/unknown.png
17:17:38FromDiscord<treeform>
17:17:39FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665242864854237185/unknown.png
17:18:02disruptekiamrifki: it's not an extra dependency; it's a package manager that you can get support for.
17:19:15FromDiscord<treeform> Yardanico, actually it looks a lot like ﷽.
17:19:27FromDiscord<treeform> Just more free flowing and stylistic.
17:19:34disruptekwow, those render beautifully on my screen.
17:19:35Yardanicodamn my quassel breaks a bit on these letters xd
17:19:41Yardanicoline width
17:19:47Yardanicoheight i mean
17:20:09shashlick@IamRifki: what's your exact issue with nimble develop
17:20:27FromGitter<IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18b25a09534142ca42f732]
17:20:57*marmotini_ quit (Read error: Connection reset by peer)
17:21:06FromGitter<IamRifki> panicoveride is a nim file inside of a folder called tonc
17:21:15FromGitter<IamRifki> but I could not redirect it to that folder
17:21:20FromGitter<IamRifki> for some reason
17:21:52*marmotini_ joined #nim
17:21:54FromGitter<IamRifki> and I'm not going to move that file for the sake of being able to compile on other people's machines
17:22:02FromDiscord<treeform> Nice it works in the browser as well:
17:22:03FromDiscord<treeform>
17:22:03FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665243974717407242/unknown.png
17:22:04shashlickis this your package?
17:22:35shashlickokay looks like exelotl
17:22:43FromGitter<IamRifki> Yes
17:22:49disruptekomg i found the bug. var variables are deref'd and let variables aren't.
17:22:49FromGitter<IamRifki> it's exelotl's
17:23:11FromDiscord<treeform> In browser it uses regular JS+HTML (not openGL, no wasm).
17:23:15disruptekthey are different types. 😜
17:23:18shashlickso you have nim-tonc in a subdir right
17:23:28FromGitter<IamRifki> Yes
17:23:31shashlickthen add a --path:"$projectPath/nim-tonc/tonc" to your nim.cfg
17:23:43*Vladar joined #nim
17:23:46shashlickyou can try with your command line itself and see if it works
17:24:58FromGitter<IamRifki> No
17:25:00FromGitter<IamRifki> it does not work
17:25:22shashlickcan you share your repo? I'll try locally
17:26:11FromGitter<IamRifki> https://send.firefox.com/download/956764690727eddc/#3-HVlx2OZ7axPpjlBPtBJw
17:27:02*icebattle joined #nim
17:27:04FromDiscord<exelotl> Did you install nim-tonc by cloning the repo, cd'ing into it and running `nimble develop` ?
17:27:11FromGitter<IamRifki> Ye
17:27:32shashlicklink expired
17:27:37FromDiscord<exelotl> Huh, it should be able to find that file then...
17:27:50shashlickwell, but that is only local right
17:28:04shashlickhe wants to use it as a submodule rather than a traditional nimble package
17:28:12FromDiscord<exelotl> Oh right
17:28:33shashlickyou need to add the right --path command to nim.cfg and nim will find it on compile
17:28:54FromGitter<IamRifki> I would use it as a package, but exelotl hasn't added it to nimble
17:30:00FromDiscord<Clyybber> submodules are superior anyways :p
17:30:35*marmotini_ quit (Quit: Leaving...)
17:30:40FromDiscord<Clyybber> just create a `config.nims` or a `nim.cfg` depending on what you like more
17:30:41disruptekyou can just specify the url.
17:30:46shashlickyour firefox send didn't work
17:31:13disruptekin your package.nimble, use a requires statement with the url#branch you want.
17:31:40disruptekthen issue a `nimble build`, and it'll install the package.
17:31:56FromDiscord<Clyybber> IamRifki: And in your config.nims put `switch "path", "./whereyournimtoncis/"`
17:32:24FromDiscord<Clyybber> don't listen to ruptek, use submodules :p
17:32:51disruptek~clyybber
17:32:52disbotclyybber: 11a dick
17:32:53disbotclyybber: 11looks like a fish but smells like a weasel. -- disruptek
17:33:04FromDiscord<Clyybber> ~disruptek is don't listen to him
17:33:04disbotdisruptek: 11a sexy fella with magic hands.
17:33:05disbotdisruptek: 11don't listen to him
17:33:06FromGitter<Varriount> exelotl: I finally understood your nickname last night. Do you have any axelotls?
17:33:25FromGitter<IamRifki> NOPE
17:33:28FromGitter<IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18b567bdcaea18912e0739]
17:33:30disrupteklol
17:34:18shashlickwhat version of nimble/nim and please share your repo
17:34:29FromGitter<IamRifki> Nightly
17:35:13Yardanicobuilt when? :)
17:35:14FromGitter<IamRifki> https://share.dmca.gripe/k84ZdkKBSWK0OFrl.7z
17:35:38FromGitter<IamRifki> https://github.com/nim-lang/nightlies/releases/tag/2020-01-09-devel-56fb909
17:36:10disruptekthey only come out at night.
17:36:43FromDiscord<Clyybber> ~~~recursive is is is test
17:36:44disbot~~recursive: 11is is test
17:36:53FromDiscord<Clyybber> smart motherfucker
17:37:30disrupteki thought about having a /see also/: ~this ~that and having it dereference them for you.
17:37:54disruptekthe problem is that i don't want one author to monopolize a 3-line output.
17:38:13disruptekwith, eg. two /see also/ tokens.
17:38:21FromDiscord<Clyybber> ~colon: is filtered
17:38:22disbotcolon:: 11filtered
17:38:27FromDiscord<Clyybber> hmm
17:38:31*tane joined #nim
17:38:42FromDiscord<Clyybber> disbot: Do you ignore yourself?
17:39:48shashlick@IamRifki: edit nim.cfg to --path:"nim-tonc"
17:39:55shashlickand you can remove the URL from the nimble file
17:40:09FromDiscord<Clyybber> embrace nimscript, become one
17:40:09shashlickor you can do the opposite, simply use the url and remove the submodule
17:40:51*sagax quit (Ping timeout: 240 seconds)
17:42:26FromGitter<IamRifki> shashlick then what?
17:42:54FromGitter<IamRifki> It still errors out
17:42:57FromGitter<IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18b7a1c39503490277a153]
17:43:03FromGitter<IamRifki> different error though
17:43:23FromGitter<IamRifki> Oh I know the reason
17:44:05FromDiscord<Clyybber> ~!eval block is echo "~!eval block is echo \"sup\""
17:44:06disbotno footnotes for `!eval`. 🙁
17:44:10FromGitter<IamRifki> There we go
17:45:00*clyybber joined #nim
17:45:14clyybber!evalecho"test"
17:45:18disruptekoh shit, he's getting serious now.
17:45:21clyybber!eval echo"test"
17:45:24NimBottest
17:45:43FromDiscord<Clyybber> hmm
17:45:47disruptekdon't do it.
17:45:53clyybberi failed
17:46:03disruptekoh, there's a way.
17:46:09disruptekbut, don't.
17:46:27clyybbermy minds telling me no
17:47:04clyybberwait, can't nimbot itself recurse?
17:47:33clyybberI don't want to test it, since I'm not sure if dom96 is here to stop it :p
17:47:42disrupteki'm sure it won't.
17:48:01clyybberare you sure enough to try?
17:48:16disruptekyep.
17:48:46clyybber!eval echo "!eval echo \"sup\""
17:48:49NimBot!eval echo "sup"
17:48:57clyybber:(
17:48:58disruptekbtdt
17:49:22disruptekbut, that's not the technique, anyway.
17:50:10clyybber~"quotes" is quotable
17:50:10disbot"quotes": 11quotable
17:50:11FromGitter<IamRifki> Is Araq somehere here?
17:50:46*ltriant joined #nim
17:52:19clyybber~!eval is command to evaluate snippets on IRC
17:52:20disbot!eval: 11command to evaluate snippets on IRC
17:52:53*Jjp137 quit (Quit: Leaving)
17:53:00*Jjp137 joined #nim
17:55:58*ltriant quit (Ping timeout: 260 seconds)
17:56:07FromGitter<matrixbot> `grantmwilliams` is toSeq(1..<10) the best way to make a sequence of a range?
17:56:15clyybberyup
17:56:19*clyybber quit (Quit: WeeChat 2.7)
18:00:58disruptekguess he gave up.
18:04:02FromDiscord<Clyybber> yeah
18:04:30disruptekyou were close.
18:04:55FromDiscord<Clyybber> I don't think its doable
18:05:02FromDiscord<Clyybber> but I'm saying this so you prove me wrong
18:05:26disruptektoo funny.
18:05:47FromDiscord<Clyybber> I don't get how you would get disbot to print out !eval somevalidnim
18:05:56FromDiscord<Clyybber> because eval has to have a space after it
18:06:07FromDiscord<Clyybber> but disbot ignores my command as soon as a space follows
18:08:38disruptekit sounds like you need an eval term with a space in it.
18:09:22FromDiscord<exelotl> @IamRifki out of interest, what was the problem?
18:09:49FromDiscord<Clyybber> disruptek: Yeah, not in the term itself, but between the eval and the term
18:09:55FromGitter<IamRifki> path issues
18:09:59FromGitter<IamRifki> basically
18:10:15FromGitter<IamRifki> had to set `--path:"nim-tonc"` in `nim.cfg`
18:10:42FromDiscord<exelotl> Ahh
18:11:03disruptekdo we have a way to compose strings with spaces?
18:11:35FromGitter<IamRifki> btw exelotl
18:11:40FromGitter<IamRifki> I tried using arc
18:11:45FromGitter<IamRifki> but it failed to compile
18:11:48FromGitter<IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18be63821b826f5a9b53f0]
18:14:06disruptekwhat if nimph helped you do code review on patches in your dependency tree?
18:14:31disruptekinteractive upgrade. like gentoo's etc-update.
18:17:02*rockcavera quit (Read error: Connection reset by peer)
18:17:37disruptek`nimph smoke npeg` produces a histogram of npeg versions that pass your tests and their performance characteristics.
18:17:45*rockcavera joined #nim
18:17:45*rockcavera quit (Changing host)
18:17:45*rockcavera joined #nim
18:18:10Araqping Zevv
18:18:17FromDiscord<exelotl> Ah, right I haven't tested with arc at all yet, it's pretty bleeding edge. But that looks like a rather spectacular error, system.nim falling over with basic macro stuff
18:18:42disrupteki just pinged him.
18:23:17FromDiscord<Clyybber> disruptek: smoke?
18:23:28disrupteksmoke test
18:24:10FromDiscord<Clyybber> heh, nice
18:32:11Araqnever mind, found it myself
18:33:34FromGitter<alehander92> so now can i kernel with anisc
18:34:30Araqdisruptek, can you do https://github.com/nim-lang/Nim/pull/13000 differently with a little proc header duplciation?
18:34:31disbotexporting normalizePathEnd
18:34:44AraqI cannot merge code that relies on a compiler bug
18:34:59disruptekokay, dupe them how?
18:35:53Araqmove the impl to a normalizePathEndImpl template
18:36:05disruptekah, okay.
18:36:10Araqand write the proc normalizePathEnd*(...) twice
18:36:14disruptekyep.
18:36:31Araqit's PR friday
18:36:42Araqeverybody needs to work on his PRs
18:37:03disruptekgood diversion from this double free.
18:37:17Araqdouble free --> run valgrind on it
18:37:28disruptekwhat does that tell me?
18:39:00Araqnim c --gc:arc foo.nim && valgrind ./foo
18:39:12Araqso you see the problem when it occurs, not afterwards
18:39:26disrupteki will play with it.
18:39:47Araq(that's actually false btw, but it's a bit hard to explain and not its fault)
18:40:00disrupteki think i get it.
18:43:11ZevvAraq: pong
18:43:18Araqtoo late
18:43:24Araqfound the bug without you
18:43:44Araqquite surprising it worked before but whatever
18:43:49Zevvsweet. It always pays to have a louse round trip time
18:44:37Zevvdisruptek: I already valgrinded away, but the problem is not there
18:45:00Araqnim c --gc:arc -d:useMalloc foo.nim && valgrind ./foo
18:45:09disrupteki've gotten it much better locallized now, though.
18:45:13Zevvit's something that makes refs_v2 unhappy, it gets asked to do more Disposes then NewObjs
18:45:15Araqforgot the -d:useMalloc
18:45:30Zevvso the allocs counter gets < 0 and it asserts
18:45:57disrupteklets make one less instance and the same number of destroys.
18:46:10disruptekif that makes sense. that's my theory.
18:48:57ZevvThe path I was following is to dump a stack trace on each nimRawDispose to see where these come from
18:49:33disruptekthat makes sense.
18:49:38disruptekhow do you dump the stack?
18:49:39ZevvI don't grok all this good enough what could lead to a superfluous nimRawDispose call - is this a case of bad API usage, or is it a problem in refs_v2 itself
18:50:08disrupteki think it's on the level of var/let optimization assumptions.
18:50:10ZevvwriteStackTrace() in Nim, or just put a breakpoint on i in gdb
18:50:56Zevvthe problem is that this is called from "outside" of the nim code (thus my wrong interpretation of the gdb stacktrace yesterday)
18:50:57disrupteklike, i think foo.get is producing an extra copy with the target is a var. when it's a let, the value is not copied to another (pair) of variables.
18:51:49disruptekno, i don't think anything is being freed on the c side to cause this.
18:51:59disruptekit's our rc that's wrong.
18:52:27disrupteki think i'm understanding you right, right?
18:54:08FromDiscord<Rika> why is there no non-var version of `strutils.removeSuffix`?
18:54:39FromDiscord<Rika> missed it
18:54:41FromDiscord<Rika> disregard
18:54:42FromDiscord<Rika> thanks
18:55:20disrupteki think i missed the prefix one.
18:58:30Zevvyes, there is no double freeing at the C level, it is the refs_v2 failing on an assumption
18:58:43Zevvthere are too many nimRawDispose() calls done
18:59:36disruptekoh, i thought you mean in c/ffi.
19:00:07disruptekyeah, there are too many frees. but is it because we expect var-like quantity instead of let-like quantity?
19:01:19FromDiscord<Clyybber> tbh, the fact that it only occurs with var also speaks for my hypothesis
19:01:31disruptekwhich hypothesis?
19:01:59FromDiscord<Clyybber> hmm nevermind
19:01:59FromDiscord<Clyybber> the a[i] thingy
19:02:00disrupteka[i] = x
19:02:05FromDiscord<Clyybber> yeah
19:02:07FromDiscord<Clyybber> that one
19:02:45disrupteki will look. i'm only starting to get a sense. there are too many moving parts.
19:03:04Zevvdisruptek: I do not know anything about the "why" of this happening yet
19:03:17disruptekdid you look at hmm.nim?
19:03:48Zevvaccording to the git logs you might want to ask the guy called Andreas Rumpf
19:04:17Yardanicolol
19:04:20Yardanicowho's he?
19:04:27disruptekthe name is so familiar.
19:04:28AraqRika: non-var versions are available via sugar.outplace
19:04:31disruptekis he a youtuber?
19:04:49Yardanicoi've seen his youtube blog
19:05:07FromDiscord<Clyybber> disruptek, Zevv: Can you try going into injectdestructors and replace isLastRead and isFirstWrite with `false` ?
19:05:13*sagax joined #nim
19:05:32FromDiscord<Clyybber> or maybe only isFirstWrite for starter
19:05:36ZevvI'm not doing anything. Last time I worked on this my battery died. That's a bad omen.
19:05:36AraqClyybber: the analysis doesn't care about var vs let
19:06:41FromDiscord<Clyybber> Araq: Ah, right, I thought maybe in isAnalysableFieldAcess
19:07:02FromDiscord<Clyybber> but its commented out
19:07:38disrupteki can push the two versions of c if you want to diff.
19:09:23Araqyou know what I want?
19:09:30Araqsome small snippet reproducing the problem
19:09:56Zevvdon't we all
19:09:58disruptekif i knew how to reproduce it without the c component...
19:10:15Zevvthe c component is probably what is causing this
19:10:42Zevvdisruptek: I'm trying to get your stuff to run here again, but I get random errors again
19:10:44disruptekhmm, maybe i can repro it.
19:10:45Zevvlike: # Build configuration failed - No build files found in /home/ico/.cache/nim/nimterop/nimgit2/libgit2Dyn
19:11:02disruptekrm -rf that nimgit2
19:11:33Zevvwhich?
19:11:41shashlickjust use -f
19:11:43ZevvI alreadt delete all of nimcache
19:11:46shashlickin nim c -f
19:11:57*ltriant joined #nim
19:11:57shashlickwill redownload libgit2
19:12:04disrupteki think it's like halfway downloaded or something.
19:12:27Zevvdamn this is *so* flakey
19:13:14disruptekis it me or is the get() a var get sometimes?
19:14:21ZevvI can't even get this to work again. Deleted all of nim cache and ~/.nimble
19:15:04Zevvthis feels like python
19:15:58shashlickZevv - what exactly is the issue? pastes will help
19:16:15Zevvhttp://ix.io/2738
19:16:53shashlickwhat's in the nim.cfg
19:17:01shashlickare there any -d:git2XXX flags defined?
19:17:06*ltriant quit (Ping timeout: 265 seconds)
19:17:37Zevvwhich nim.cfg--git2SetVer="master"
19:17:37Zevv--git2Git
19:18:31disruptekwell, i have a repro of a bug.
19:18:34disrupteknot sure it's the same one.
19:19:57ZevvIf you need more bugs, I have a few here: http://zevv.nl/bug-a-day/
19:20:34disruptekhttp://ix.io/2739/nim
19:20:56shashlickdo you have a nim.cfg for the test.nim
19:21:02shashlickI only see one for gittyup itself
19:21:09disrupteklet's fix this one first.
19:21:26shashlickyep, the test file has no -d:git2XXX defined
19:22:14disruptek'cause the tests are specified in the nimble for travis reasons.
19:22:57disrupteki guess cli args will override a nim.cfg though, so i can fix that.
19:23:56Zevvdisruptek: this crash is related nimRawDispose anyway:
19:23:57Zevvhttp://ix.io/273b
19:25:03disruptekthat's the one i just pasted?
19:26:42disruptekworks with object, not ref object.
19:27:33disruptekit's the [not void] version of get.
19:27:35disruptekhmm.
19:29:58FromDiscord<treeform> How, many of you are going to FOSDEM?
19:30:20FromDiscord<treeform> I am thinking of going but its a long trip from USA.
19:30:35dom96I'll definitely be there since I'm giving a talk :)
19:30:37disruptekdo it.
19:30:55dom96btw treeform, I had a question for you, is your font rendering library suitable for rendering of text every frame in games?
19:31:22*Hideki_ joined #nim
19:31:23FromDiscord<treeform> dom96, that is what I am using it for.
19:31:42FromDiscord<treeform> but I generate an image and stick it into a texture atlas
19:32:10dom96ahh, so I'll need to implement a texture atlas no matter what
19:32:23FromDiscord<treeform> is it a 2d game?
19:32:26dom96yeah
19:32:45FromDiscord<treeform> you could just try using fidget ... its basically a 2d game engine with texture atlas
19:32:52FromDiscord<treeform> or just grab the texture atlas part
19:33:07dom96I'm using my own poor man's game engine :)
19:33:15dom96and sdl2 so not sure I can use fidget
19:33:26FromDiscord<treeform> oh with SDL2 it should be easy as well
19:33:28dom96I'll try to see if I can reuse the texture atlas part
19:33:39FromDiscord<treeform> just create serface for every char
19:33:46FromDiscord<treeform> bit the char when you need them
19:33:50FromDiscord<treeform> blit*
19:34:07dom96hrm, okay. Sucks having to position the letters correctly yourself though
19:34:10FromDiscord<treeform> SDL2 already has font stuff though
19:34:19dom96I feel like it's not just a case of x += someConstant
19:34:19FromDiscord<treeform> dom96, I do that part too
19:34:29FromDiscord<treeform> I make it pretty easy
19:34:39FromDiscord<treeform> you typeset a layout first
19:34:46dom96I wonder if I can get sdl2 to do this for me
19:34:50FromDiscord<treeform> then you just for loop over layout gliphs and blit them in place
19:35:25dom96if I were to use your lib what would be the easiest way to blit the text onto a sdl2 texture?
19:35:52dom96actually, maybe I could just render the font texture at compile-time
19:35:57*Hideki_ quit (Ping timeout: 258 seconds)
19:36:04FromDiscord<treeform> well probably using sdl2 font stuff...
19:36:12FromDiscord<treeform> but if you want to be more nim pure... you would use mine?
19:36:15FromDiscord<treeform> https://github.com/treeform/typography/blob/master/src/typography/layout.nim#L249
19:36:28FromDiscord<treeform> you would just replace my blit with SDL's blit.
19:36:30dom96yeah, just wondering how I can integrate it with sdl2
19:36:35FromDiscord<treeform> its just a for loop
19:36:51dom96I'd have to fork the code, right?
19:36:56FromDiscord<treeform> no
19:37:04FromDiscord<treeform> you just write your own function that does this
19:37:13FromDiscord<treeform> I remmber writing one for SDL as an example for some one...
19:37:17FromDiscord<treeform> but I don't think I have the code any more
19:37:25FromDiscord<treeform> I can provide you with an example
19:38:29dom96that would be awesome, pre-rendering all these fonts at compile-time would be too much (I scale the fonts based on window resolution)
19:40:17FromDiscord<treeform> yeah pre-rendering can't really work because CJK fonts have soo many glyphs
19:40:32FromDiscord<treeform> it takes 1GB to parse and render out a CJK file.
19:40:38FromDiscord<treeform> they are huge!
19:42:01FromDiscord<treeform> dom96, I am trying to run: https://github.com/nim-lang/sdl2/blob/master/examples/sdl_skeleton.nim would you by any chance have SDL2.dll?
19:42:42dom96@treeform: https://www.libsdl.org/release/SDL2-2.0.10-win32-x86.zip
19:42:50dom96https://www.libsdl.org/download-2.0.php
19:43:19dom96As a side note, this source code is great: https://github.com/TerryCavanagh/VVVVVV
19:43:32FromDiscord<Clyybber> if you have steam installed, it provides SDL2 too
19:43:35dom96Must have been painful to use C++ for it
19:43:54FromDiscord<treeform> I do have steam, its not providing. now it wants SDL2_gfx.dll
19:44:34FromDiscord<treeform> oh its here
19:44:35FromDiscord<treeform> https://github.com/nim-lang/sdl2/wiki/Windows-Binaries
19:44:55FromDiscord<Clyybber> dom96: #FUN#: https://github.com/TerryCavanagh/VVVVVV/tree/master/desktop_version#a-word-about-compiler-quirks
19:45:25dom96ehh, dropbox really?
19:45:39FromDiscord<treeform> oh crap its 32 bit I need 64 bit
19:45:42FromDiscord<treeform> I hate looking for DLLS!
19:46:01FromDiscord<treeform> "You need compile SDL2_gfx for yourself as said in the previous comment or should contact the author of SDL2_gfx about a possibility to provide it as binary."
19:46:04FromDiscord<treeform> GARR!
19:46:08dom96you don't need sdl2_gfx
19:46:20dom96the skeleton really shouldn't use it
19:46:39dom96just get rid of the `sdl2/gfx` import
19:46:49FromDiscord<treeform> and the FpsManager
19:46:55dom96it's possibly just used for the fps manager.
19:46:56dom96yeah
19:46:57FromDiscord<treeform> thats part of `sdl2/gfx`
19:47:03FromDiscord<treeform> ok running now
19:47:14dom96I got rid of that dependency from my game because it's not official sdl2
19:47:25FromDiscord<treeform> cool
19:47:34dom96can you paste me the code that compiles?
19:47:40dom96I'll fix this example immediately
19:47:41FromDiscord<treeform> now do you have an example that blits an image?
19:48:19FromDiscord<treeform> https://gist.github.com/treeform/4538ac9c9043bdcbba28edd667f3a0b9
19:48:29dom96https://github.com/dom96/gamelight/blob/master/gamelight/graphics.nim#L937-L965
19:48:37dom96^ how I draw text in my lib
19:49:17FromDiscord<treeform> Ok so here you are rendering a full "textSurface"
19:49:23FromDiscord<treeform> I can do that too, but its kind of slow
19:49:32dom96yeah, my code sucks :P
19:49:33FromDiscord<treeform> but its faster if you cache the serface
19:49:53dom96I cache the font at least :D
19:50:04FromDiscord<treeform> I can either supply glyphs or the whole text image.
19:51:54FromDiscord<treeform> do you use `createTextureFromSurface` SDL api always confused me, so many steps for "just draw image"
19:52:10FromDiscord<treeform> oh yeah you do
19:52:16dom96It's just because text is rendered onto a surface for some reason
19:54:58Zevvdisruptek: can you remove the Results from your crashing sample?
19:55:20disruptekobvious question, but i don't think so.
19:55:40Zevvreplace it with something else inside the sample?
19:56:36disruptekcan't repro w/o get.
19:57:07dom96treeform: I'll have to bbl. Thanks for creating this example for me, I'll have a look at it later. Feel free to just link it here.
20:02:10FromDiscord<treeform> Ok I have a single glyph:
20:02:11FromDiscord<treeform>
20:02:12FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665284275091800104/unknown.png
20:04:09FromDiscord<treeform> and now text
20:04:10FromDiscord<treeform>
20:04:10FromDiscord<treeform> https://cdn.discordapp.com/attachments/371759389889003532/665284772926324736/unknown.png
20:05:13lqdev[m]@treeform using your typography lib?
20:08:09*ltriant joined #nim
20:08:19FromDiscord<treeform> yes, I am making an example for dom96 that uses SDL instead of openGL.
20:08:40FromGitter<Albus70007> why though
20:12:40Zevvprobably because of emscripten
20:13:39*ltriant quit (Ping timeout: 265 seconds)
20:16:34FromGitter<Albus70007> i have a question, how would i use this tutorial from nim, https://www.youtube.com/watch?v=ih20l3pJoeU (really cool guy btw) or to simplify the question, how would i implement headers (as nim code, not importing them) to do what they do in c++
20:20:30FromDiscord<treeform> hey, dom96 done: https://gist.github.com/treeform/632f4ae284226fd5b2bf567e3d36ec7a
20:21:25FromDiscord<treeform> Ping me if you have questions, I have added 4 different ways you might want to use it. 1 render single glyph. 2 render single image. 3 render it to textures then blit them, 4 same as 3 but with caching.
20:25:11*abm quit (Quit: Leaving)
20:27:17*leorize quit (Quit: WeeChat 2.6)
20:41:55*ltriant joined #nim
20:44:52FromDiscord<Rika> how do i make a macro that evaluates before `await` (so i can insert code needing awaits with a macro)
20:46:52*ltriant quit (Ping timeout: 258 seconds)
20:48:06disruptekmake your own await impl and import it.
20:49:24FromDiscord<Rika> ?
20:50:01FromDiscord<mratsim> create a module that imports asyncdispatch as awaitStdLib
20:50:16FromDiscord<mratsim> inside create an await template/macro, that does whatever you need
20:50:21FromDiscord<mratsim> and export that
20:54:26FromDiscord<Rika> i dont seem to understand, i tried doing as said yet have encountered the same issue
20:57:06FromDiscord<mratsim> can you share it?
20:58:54disruptekhttp://ix.io/273O/nim
20:59:46FromDiscord<mratsim> ~disruptek is an unsafe nil deref
20:59:47disbotdisruptek: 11a sexy fella with magic hands.
20:59:47disbotdisruptek: 11don't listen to him
20:59:47disbotdisruptek: 11an unsafe nil deref
21:00:23disrupteki've been called worse.
21:01:30FromDiscord<Rika> https://play.nim-lang.org/#ix=273Q ?
21:05:14*nsf joined #nim
21:07:51FromDiscord<mratsim> a macro is not a proc, you have 2 problems here. either you use waitFor sleepAsync since you are in a sync context, or you wrap the "let a" in an async proc
21:08:30FromDiscord<mratsim> and second, your macro is not returning anything, to be able to call waitFor you need to return "a"
21:10:41FromDiscord<mratsim> here is a fixed example: https://play.nim-lang.org/#ix=273Q
21:20:52*sschwarzer joined #nim
21:22:26FromDiscord<Rika> @mratsim okay, it seems like i miswrote the example
21:23:00FromDiscord<Rika> https://play.nim-lang.org/#ix=273V a more accurate example
21:23:25FromDiscord<Rika> (assuming a is used within the proc)
21:23:44FromDiscord<Rika> (i also have to slep, ill check this out when i wake up)
21:24:09sschwarzerRika: Good night :)
21:24:20*uu91 quit (Remote host closed the connection)
21:25:19*Vladar quit (Quit: Leaving)
21:26:37FromDiscord<Rika> It's already early morning though :(
21:26:40FromDiscord<mratsim> you need to pass a as an untyped parameter
21:26:51*Kaivo quit (Quit: WeeChat 2.7)
21:27:07sschwarzerRika: I see, then good morning? ;-)
21:27:36FromDiscord<mratsim> mmm regarding the async error it's curious
21:28:38*Kaivo joined #nim
21:28:40FromDiscord<mratsim> it's strange that this doesn't work: https://play.nim-lang.org/#ix=273X
21:30:01FromDiscord<Rika> I think it's similar to the strformat limitation in templates
21:30:38*narimiran quit (Ping timeout: 260 seconds)
21:30:56FromDiscord<mratsim> or it's a bug in templates that make them returning the wrong error
21:31:13FromDiscord<mratsim> because await asyncSleep(123) has no type
21:51:12*ltriant joined #nim
21:52:00disruptekokay, i think i got it.
21:54:34*Kaivo quit (Quit: WeeChat 2.7)
21:54:50disrupteki arrive at the same rev using two different mechanisms which independently decide that they are sinking the same ref. one of them gets destroyed outside of scope.
21:54:57disrupteks/same rev/same ref/
21:56:26*Kaivo joined #nim
21:56:36*ltriant quit (Ping timeout: 268 seconds)
22:12:13sschwarzerHi disruptek! :)
22:14:12disrupteksup dawg
22:16:16*filcuc joined #nim
22:16:36shashlickwhen was testament added to the bin directory?
22:17:26disruptekmaybe just before 1.0, i wanna say.
22:20:36*sschwarzer quit (Quit: leaving)
22:22:11shashlickcool
22:23:10Zevvfound im disruptek?
22:24:51disrupteki'm closer. just composing an issue to write this stuff down.
22:34:30disruptek!issue author:disruptek
22:34:31disbothttps://github.com/nim-lang/Nim/issues/13102 -- 3double free bug with arc, Result type, object refs, and iterators 7& 16 more...
22:53:33FromGitter<Varriount> Why does disbot always put a number set the beginning of it's message?
22:53:52Yardanicoit's not a number set, it's IRC color codes
22:53:52disruptekit's color on irc.
22:54:01FromGitter<Varriount> Ah
23:02:17*nsf quit (Quit: WeeChat 2.7)
23:04:38*ltriant joined #nim
23:09:14*ltriant quit (Ping timeout: 240 seconds)
23:11:46*sekao joined #nim
23:16:24sekaoi found that i can make a variant type with `string or int or float32` but how do you make a generic data structure with that kind of type? I tried `MyData[string or int or float32]()` but that doesn't work...
23:16:47disruptekstring | int | float32
23:17:08*icebattle quit (Ping timeout: 258 seconds)
23:20:08*ltriant joined #nim
23:22:02FromDiscord<mratsim> when you instantiate a generic type it must have one concrete type
23:22:18FromDiscord<mratsim> you can't have seq[string or int or float32]()
23:22:37disruptek'tis a silly rule.
23:22:50FromGitter<kayabaNerve> disruptek: I've never understood the difference between the two. I've successfully used | to create a function which accepts multiple types in a single arguments, yet it led to compiler bugs that only `or` fixed.
23:22:56sekaoi'm hoping to get the equivalent of std::variant
23:23:00FromDiscord<mratsim> well the law of physics may be silly but you have to comply :p
23:23:15disruptekyou're kidding.
23:23:16FromDiscord<mratsim> use a variant then
23:23:38FromDiscord<mratsim> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
23:23:39FromGitter<kayabaNerve> Also to Yardanico about my random stdlib question, yeah, I do get that it should be since it's a Nim implemented PRNG. Was more looking for confirmation :P
23:23:48FromDiscord<mratsim> ~variant is https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
23:23:49disbotvariant: 11https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants
23:24:17*lxbarbosa joined #nim
23:24:51*ltriant quit (Ping timeout: 240 seconds)
23:25:10sekaothanks i'll look into that
23:26:42sekaoi tried making an object variant before but it complained when i tried to use the same name for the field for each type. looks like the workaround is to give different names... `intVal`, `floatVal`, etc.
23:28:03FromGitter<Albus70007> how can i fix this error? 'board.tiles[0][1].value' cannot be assigned to
23:30:41dom96make `board` a 'var' or a 'ref'
23:32:53*Hideki_ joined #nim
23:33:20FromGitter<Albus70007> thanks
23:34:52shashlickdom96: new PR for choosenim
23:34:55shashlickcan you review real quick?
23:35:13shashlickugh i've not submitted yet
23:35:48disruptekclyybber: http://ix.io/274G/nim -- codegen with arc, segv with Results. codegen bug doesn't require results, though.
23:36:01*ltriant joined #nim
23:36:35shashlickdom96: https://github.com/dom96/choosenim/pull/156
23:36:36disbotMultiple fixes
23:37:14*Hideki_ quit (Ping timeout: 240 seconds)
23:38:18dom96shashlick, thanks. What might be a good idea is to get the CI to build a debug version of choosenim, and have the init script download that when given a -d flag
23:38:27dom96that way we'd get stack traces
23:38:47shashlickinteresting, yes
23:38:59shashlickright now, i was just adding a -d flag to the script and pass --debug and --verbose to choosenim
23:39:08shashlickbut unclear if we really get any more output
23:39:14shashlickespecially for build failures
23:39:28dom96Reviewed
23:40:05shashlickfile names look okay if you are interested - https://travis-ci.org/genotrance/choosenim/builds/635512769
23:40:54*ltriant quit (Ping timeout: 258 seconds)
23:42:23shashlickby the way, the CI builds 64-bit windows binaries so the i386 name for the 0.5.0 release is wrong
23:43:01*sekao quit (Remote host closed the connection)
23:43:21dom96we need to update the init script then IIRC
23:43:38dom96or well, I guess people won't use it on Windows :)
23:44:31shashlickoh yeah, our init script only wants 32-bit on windows
23:44:45shashlickdidn't expect to check in the init.sh changes in this PR
23:46:45shashlickhow do you suggest proceeding with the windows piece - update script to look for amd64?
23:46:59shashlickor create a separate 32-bit build
23:47:20dom96nah, I guess we're fine. I'll just make sure the next one is named properly
23:47:42shashlickwell, so I rely on choosenim's init.sh on windows CI
23:47:58shashlickso if init.sh looks for i386 and the file isn't posted, it will break
23:48:05FromDiscord<mratsim> so choosenim downloads 64-bit nim on windows now?
23:48:08dom96right, so fix it :)
23:48:11*filcuc quit (Quit: Konversation terminated!)
23:48:24shashlicknot yet mratsim, on my todo
23:48:39shashlickmainly focusing on bug fixes right now
23:48:53shashlickbut 64-bit default and 32-bit force flag are on the agenda
23:52:19FromDiscord<treeform> dom96, did you see my SDL typography thing?
23:52:55*tane quit (Quit: Leaving)
23:52:59dom96yeah, will try it out later in the weekend
23:53:04dom96will be heading to sleep soon
23:53:15dom96It's very extensive, thank you :)
23:53:16FromDiscord<treeform> dom96, I also had a question about openSSL
23:53:47FromDiscord<treeform> you have a `where false: 33% of the code`
23:53:55FromDiscord<treeform> do you know why it happened?
23:54:17dom96huh?
23:54:50FromDiscord<treeform> https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/openssl.nim#L538
23:55:04FromDiscord<treeform> sorry `when true: else: bunch of code`
23:55:27FromDiscord<treeform> I traced this back to the original commit by you 9 years ago 🙂
23:55:57dom96I probably used c2nim and then couldn't be bothered to fix those lines
23:56:36FromDiscord<treeform> dom96, can I 1) remove the unused code and 2) expose some more functions I need?
23:57:00dom96sure
23:57:17FromDiscord<treeform> I want to expose these guys: https://github.com/treeform/jwt/blob/master/src/jwt/crypto.nim#L10-L36
23:57:43dom96oh, you've got your own jwt implementation?
23:57:45FromDiscord<treeform> HMAC and RSA and friends
23:57:49dom96I've been using yglukhov's
23:57:59dom96oh, it's a fork
23:58:12FromDiscord<treeform> Mine is based on this but we have diverged by more then 70% at this point
23:58:18dom96why the fork?
23:59:10FromDiscord<treeform> there was a bug, I though the API was confusing, I though he stopped maintaining it.
23:59:27FromDiscord<treeform> he recently switched to bearSSL which is cool too.
23:59:44FromDiscord<treeform> It it like x10 the size now. While I cut his number of lines to like 150 lines.