00:04:25 | shashlick | Phew 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:37 | FromGitter | <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:42 | FromGitter | <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:23 | FromGitter | <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:34 | disruptek | finally 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:59 | FromGitter | <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:36 | Yardanico | it should? it's pseudo random number generator after all |
04:04:31 | skrylar[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:20 | disruptek | https://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:47 | Tanger | Is 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:00 | Tanger | Not possible, sorry, I mean does a helper function exist? |
04:57:05 | Yardanico | Tanger: maybe try using toSeq from sequtils? |
04:57:35 | Yardanico | it gets all values from an iterator and stores them in a sequence |
04:58:29 | Tanger | Awesome, that's perfect, thanks Yardanico ! |
05:05:38 | * | chenhq2005 quit (Ping timeout: 240 seconds) |
05:08:14 | * | chenhq2005 joined #nim |
05:23:32 | madprops | wondering 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:50 | FromGitter | <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:16 | FromGitter | <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:42 | FromGitter | <sheerluck> but I don't know how to use it |
06:17:13 | FromGitter | <Varriount> @gogolxdong What does it do? |
06:30:09 | * | ltriant joined #nim |
06:32:44 | Zevv | disruptek: 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:40 | FromGitter | <gogolxdong> it translates c/c++ to nim. |
07:05:44 | FromGitter | <gogolxdong> you tranverses ast and change each to nim ast. |
07:05:52 | Tanger | madprops, I think `.lines` only loads one line into memory at a time |
07:06:04 | Tanger | So long as it's newlined correctly. |
07:07:50 | Tanger | Actually, 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:12 | FromGitter | <gogolxdong> then replace it with the default clang or gcc so that it can translate project. |
07:12:04 | FromGitter | <gogolxdong> replace clang or gcc |
07:13:03 | FromGitter | <gogolxdong> your compilation option is helpful for those who have llvm installed. |
07:13:56 | FromGitter | <gogolxdong> It traverses ast and replace with nim ast. |
07:14:23 | FromGitter | <gogolxdong> there is still a lot to do. |
07:15:24 | FromGitter | <gogolxdong> use it as a compiler. |
07:22:50 | * | Jjp137 joined #nim |
07:23:11 | madprops | how can I .. var content: openArray[char] |
07:23:35 | narimiran | you cannot use openArray like that, AFAIK |
07:23:49 | madprops | im supposed to send a var openarray to a function, to fill it |
07:24:17 | narimiran | you can pass seq or array |
07:25:16 | narimiran | or even string |
07:26:12 | narimiran | madprops: https://play.nim-lang.org/#ix=2702 |
07:31:48 | madprops | oh cool |
07:35:03 | FromGitter | <Varriount> Tanger: isn't it already a sequence? |
07:35:19 | madprops | im confused about: proc readChars(f: File; a: var openArray[char]; start, len: Natural) |
07:35:43 | madprops | to do that, im sending a file which i opened, then sending a var seq, then 0 for start, and 300 for len |
07:35:52 | madprops | but im confused about the ; and , there |
07:35:52 | FromGitter | <Varriount> Stored in something like a 'child' field? |
07:37:41 | * | martinium quit (Quit: My MacBook has gone to sleep. ZZZzzz…) |
07:38:57 | Tanger | Varriount: .children returns an iterator type, not a seq unfortunately. But the toSeq accepts an iter |
07:39:30 | narimiran | "im confused about the ; and , there" -- there's no difference between them |
07:40:33 | Tanger | Is 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:19 | Tanger | Like, if I wanted to describe to someone what StatementLists do to a noob when dicking about with the AST |
07:42:58 | Tanger | ie "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:20 | lqdev[m] | actually it's just a statement list, without a colon, but let's omit the details |
07:43:51 | madprops | narimiran, 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:00 | madprops | i could use readLine, but the first line could be huge |
07:44:10 | madprops | or i could use readBytes |
07:44:37 | narimiran | madprops: can you go a step back and tell us what you're trying to achieve generally (without specific procs mentioned)? |
07:45:02 | Tanger | Thanks lqdev[m] |
07:45:12 | narimiran | what i'm trying to say: if you want to read from a file line by line, i would use `lines` iterator |
07:45:29 | madprops | I'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:59 | madprops | so i would rather just read the first bytes, not the whole file, and check those |
07:48:37 | madprops | i think the way to go is readBytes and finding the max number of bytes the file has |
07:50:26 | narimiran | madprops: there are `io.getFileSize` and `os.getFileSize` |
07:50:26 | Tanger | madprops: https://play.nim-lang.org/#ix=2707 |
07:51:11 | madprops | thank you both |
07:51:36 | Tanger | That'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:50 | madprops | are string and seq[int8] interchangeable? |
08:04:41 | madprops | or .. how should I convert those bytes to string? |
08:05:09 | * | gmpreussner joined #nim |
08:08:27 | madprops | ok cast works |
08:10:58 | * | solitudesf joined #nim |
08:14:13 | FromDiscord | <Rika> cast works but isnt recommended |
08:14:26 | FromDiscord | <Rika> i still do not know what the recommended way to convert between them are |
08:14:33 | * | chenhq2005 joined #nim |
08:20:34 | skrylar[m] | static assert char.sizeof == int8.sizeof; set_len(foo, bar.len); copymem(addr foo[0], bar[0], bar.len)? |
08:22:24 | skrylar[m] | though technically strings are unicode so going the other direction should pedantically come with a correctness check first |
08:35:46 | Araq | why int8? shouldn't this be uint8/byte? |
08:40:07 | Zevv | What is up-drafting? |
08:40:59 | Tanger | Zevv: In what context? |
08:41:12 | Zevv | oh, "un-draft" :) |
08:41:20 | Zevv | comment from ar_q |
08:44:24 | Zevv | Araq: is os:standalone going to stay? |
08:44:51 | Araq | sure but we won't develop it further |
08:45:03 | Araq | os:ansic is the new mode |
08:45:19 | Zevv | but not throwing it out yet |
08:45:45 | Zevv | ok |
08:59:13 | FromGitter | <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:37 | FromGitter | <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:06 | FromGitter | <Varriount> Tanger: see the source code of the macros module |
09:20:33 | skrylar[m] | had to google ansic before realizing ANSI C |
09:21:37 | FromGitter | <Varriount> It's because if you google "C", all you get is C++ |
09:22:08 | skrylar[m] | `ansi-c` |
09:23:58 | * | ltriant joined #nim |
09:29:12 | * | ltriant quit (Ping timeout: 268 seconds) |
09:34:18 | Zevv | what's with ansi C |
09:38:13 | * | letto quit (Quit: Konversation terminated!) |
09:38:26 | Araq | yeah we need a better name |
09:38:37 | Araq | --os:mallocButNoOs |
09:38:40 | WilhelmVonWeiner | cansi |
09:39:00 | FromGitter | <alehander92> --os:core |
09:39:07 | Araq | --os:ihaveAHeadNowGiveMeALolipop |
09:39:15 | Araq | *Heap lol |
09:39:22 | Araq | --os:ihaveAHeapNowGiveMeALolipop |
09:40:28 | FromGitter | <alehander92> but core is the rust name for the bare metal supported part of stdlib iirc so no |
09:43:13 | Zevv | And I wanna target C89 as well :) |
09:43:34 | Zevv | Lua 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:02 | FromGitter | <sheerluck> And I wanna Nim proof assistant to prove Pythagorean Theorem |
09:55:09 | * | NimBot joined #nim |
09:59:38 | FromDiscord | <Rika> lollipop has 3 Ls |
10:00:21 | Araq | I know but I follow the tradition |
10:00:34 | Araq | everything must be misspelt and misnamed |
10:01:32 | Araq | guys we are about to stream |
10:04:42 | FromGitter | <sheerluck> is it https://www.twitch.tv/araq4k |
10:04:49 | * | marmotini_ quit (Remote host closed the connection) |
10:06:02 | narimiran | it is |
10:07:03 | * | oculux joined #nim |
10:08:55 | narimiran | it is live now |
10:10:40 | * | letto joined #nim |
10:15:33 | FromDiscord | <Rika> can `json` |
10:15:43 | FromDiscord | <Rika> aygebpuasj why is `'` so near enter |
10:18:10 | FromDiscord | <Rika> anyway can `json.to` convert a json node to a `times.DateTime` |
10:27:30 | * | abm joined #nim |
10:54:08 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=270D i dont seem to understand what the issue is here |
11:01:58 | FromDiscord | <mratsim> there is no aDate field in your json |
11:02:22 | FromDiscord | <Rika> its not being called |
11:03:11 | FromDiscord | <Rika> j{} is not a json object, it's like `j["data"]["SomeObject"]` is it not? |
11:05:33 | FromDiscord | <Rika> if i removed all `Date` fields (assuming there are fields left), the program compiles |
11:07:15 | * | krux02 joined #nim |
11:08:21 | FromDiscord | <mratsim> I can't say, I never used the "to" proc in Nim json |
11:08:35 | FromDiscord | <mratsim> for when I know the schema I use nim-json-serialization |
11:10:36 | FromDiscord | <Rika> TIL |
11:11:44 | FromDiscord | <Rika> ok so how the hell do i use it, i dont seem to find their docs if any |
11:13:33 | FromGitter | <IamRifki> Is there a list of things I have to worry about when using Nim without garbage collection |
11:13:51 | FromGitter | <IamRifki> I'm using Nim on a GBA so I can't use GC |
11:15:41 | FromDiscord | <Rika> use destructors "gc" |
11:16:44 | FromGitter | <IamRifki> Destructors?, that's it? |
11:17:05 | FromGitter | <IamRifki> I only have to worry about destructing? |
11:17:17 | FromDiscord | <Rika> uh i mean |
11:17:24 | FromDiscord | <Rika> thats not all |
11:17:42 | FromDiscord | <Rika> i dont have much knowledge on it but afaik you have to manually manage any ref objects you make |
11:17:49 | FromDiscord | <Rika> (i dont know how) |
11:18:00 | FromDiscord | <Rika> i only have small scraps of knowhow ;; |
11:18:00 | FromGitter | <IamRifki> Welp |
11:18:26 | FromDiscord | <Rika> something about a `=destroy` proc and a `=sink` proc and stuff i dont recall |
11:24:09 | Zevv | good 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:10 | FromGitter | <sheerluck> @Araq your recursive `transform` does not have explicit "return" in non recursive path. And still works. Nim is magic |
11:27:39 | FromDiscord | <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:07 | FromGitter | <sheerluck> Rika https://i.imgur.com/jwJk1sg.png |
11:34:26 | FromGitter | <alehander92> what was the stream |
11:35:32 | FromDiscord | <Rika> result variable is implicitly returned |
11:37:40 | Araq | alehander42: finalizers and 'repr' for ARC |
11:38:48 | FromGitter | <alehander92> so `repr` stays? |
11:43:43 | Araq | yeah |
11:43:57 | Araq | its implementation is copy&paste from '$' though |
11:46:28 | FromGitter | <alehander92> yeah i still feel maybe `$`/`repr` can be unified |
11:46:28 | Zevv | stupid question: why can't it use the same implementation instead of copy&paste? |
11:46:36 | FromGitter | <alehander92> hm and this seems like an argument for that |
11:46:37 | Araq | https://github.com/nim-lang/Nim/pull/13098 well this is the result |
11:46:38 | disbot | ➥ more arc features |
11:47:49 | Araq | Zevv, 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:02 | FromDiscord | <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:37 | FromDiscord | <mratsim> and if in memory "Json.decode(JsonNode, TargetType) |
12:11:06 | FromGitter | <alehander92> Araq |
12:11:19 | FromDiscord | <Rika> mm okay |
12:12:00 | FromGitter | <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:14 | FromGitter | <alehander92> so it leads to `ambigious call` |
12:12:26 | FromGitter | <alehander92> matches both* |
12:13:13 | rockcavera | Is there any way to do recursion with iterators? |
12:25:08 | FromDiscord | <Rika> ah, okay, the `json.to` macro doesnt like ranges |
12:27:47 | Zevv | rockcavera: limited, since iterators are not reentrant at this time |
12:29:29 | rockcavera | possibility to hack? |
12:30:45 | Zevv | always, you have the full source, right? :) |
12:31:05 | rockcavera | =) |
12:37:49 | FromDiscord | <mratsim> you can do recursion if it can be unrolled at compile-time |
12:38:00 | FromDiscord | <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:22 | Araq | alehander92: dunno |
12:51:28 | * | aexoxea joined #nim |
12:57:02 | * | vsantana joined #nim |
13:09:22 | FromGitter | <alehander92> like, is it supposed to work |
13:13:15 | Araq | I 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:37 | FromGitter | <alehander92> thats what i wondered :D :D |
13:13:44 | Araq | anybody familiar with ".github/workflow"? |
13:13:52 | Araq | https://github.com/Araq/ormin/pull/24/files |
13:13:54 | disbot | ➥ Allow custom functions ; snippet at 12https://play.nim-lang.org/#ix=2712 |
13:14:49 | Araq | well it looks good enough, so nice people taking over my Ormin |
13:17:39 | Araq | open source works! |
13:17:43 | Araq | bbl |
13:17:57 | FromGitter | <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:12 | FromDiscord | <Rika> how do i post json with `httpclient.post` |
13:40:55 | * | floppydh quit (Quit: WeeChat 2.6) |
13:48:21 | Yardanico | what do you exactly mean? |
13:48:46 | Yardanico | https://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:07 | FromDiscord | <Clyybber> @IamRifki Regarding wanting to develop for the GBA with nim (that makes 3 of us!); @exelotl is already doing that |
14:06:16 | FromDiscord | <Clyybber> https://twitter.com/hot_pengu/status/1137819284246323203 |
14:06:24 | FromDiscord | <Clyybber> !repo nim-tonc |
14:06:25 | disbot | https://github.com/exelotl/nim-tonc -- 9nim-tonc: 11Nim bindings for tonclib (GBA framework) 15 12⭐ 0🍴 |
14:06:39 | FromDiscord | <exelotl> Aha, why hello there |
14:06:50 | FromDiscord | <Clyybber> Ah, general exeotl |
14:07:11 | FromDiscord | <Rika> Yardanico, i missed it |
14:07:14 | FromDiscord | <Rika> its okay now |
14:08:54 | FromDiscord | <exelotl> Way ahead of you, I already met rifki on the gbdev discord haha :P |
14:09:12 | FromDiscord | <Clyybber> hehe |
14:09:29 | FromDiscord | <Clyybber> do you have an invite link for that discord? |
14:10:16 | FromDiscord | <exelotl> https://gbdev.github.io/ |
14:10:48 | FromDiscord | <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:54 | FromDiscord | <Clyybber> Nice, thanks |
14:12:40 | FromDiscord | <exelotl> also looks like you scared them away lol |
14:13:15 | FromDiscord | <Clyybber> lol |
14:13:56 | * | aexoxea quit (Quit: Goodbye!) |
14:16:54 | * | aexoxea joined #nim |
14:21:57 | FromDiscord | <exelotl> my wrapper is starting to diverge from tonc a little |
14:22:12 | FromDiscord | <exelotl> so I'm searching for a different 4 letter name |
14:22:23 | * | chenhq2005 quit (Ping timeout: 258 seconds) |
14:24:51 | FromDiscord | <Clyybber> gbAh |
14:26:59 | FromDiscord | <niv> hello. im seeing some kind of malloc structures corruption occuring: https://gist.github.com/niv/d7d63b406fcdc2cac6cf26d87589026e |
14:26:59 | FromDiscord | <niv> i've found the bug https://github.com/nim-lang/Nim/issues/5636, which indicates this was fixed. any idea? @araq? |
14:27:00 | disbot | ➥ Segfault while trying to allocate |
14:28:44 | FromDiscord | <Clyybber> @exelotl Does it have to be 4 letters? |
14:30:37 | FromDiscord | <Clyybber> maybe ntonc is fitting, similar to ncurses vs curses |
14:34:50 | FromDiscord | <exelotl> huh that could work |
14:40:23 | Zevv | How 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:34 | FromDiscord | <Clyybber> what kind of warnings? |
14:45:21 | FromDiscord | <Clyybber> Zevv: ping |
14:45:26 | Zevv | oi |
14:45:30 | FromDiscord | <Clyybber> oi |
14:45:42 | Zevv | discarding const, things like that |
14:46:03 | Yardanico | are you about https://forum.nim-lang.org/t/5785 ? |
14:46:59 | Zevv | oh look, I I hadn't seen that yet |
14:47:09 | Zevv | I just noticed with all the crosscompiling stuff I was doing |
14:49:36 | FromDiscord | <Clyybber> I think they are safe to ignore |
14:49:54 | FromDiscord | <Clyybber> the noreturn stuff looks a bit crazy, but it shouldn't matter |
14:55:21 | Zevv | yeah, but the problem is always that you start ignoring them and miss other warnings when they *do* matter |
14:55:34 | FromDiscord | <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:07 | FromGitter | <matrixbot> `grantmwilliams` Does someone have a good project i can look at for some examples of unit testing in Nim? |
15:13:36 | FromGitter | <matrixbot> `grantmwilliams` been rewriting a python library and wanted to make sure im doing it the "correct way" |
15:14:45 | Zevv | The '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:24 | Zevv | I think about any mature library you pick will use that |
15:15:39 | Zevv | I 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:11 | disruptek | !repo unittest2 |
15:21:14 | disbot | https://github.com/nose-devs/nose2 -- 9nose2: 11The successor to nose, based on unittest2 15 595⭐ 127🍴 7& 29 more... |
15:21:21 | disruptek | nope, not that one. |
15:22:01 | disruptek | !repo stefantalpalaru/nim-unittest2 |
15:22:03 | disbot | https://github.com/stefantalpalaru/nim-unittest2 -- 9nim-unittest2: 11fork of the "unittest" Nim module, focused on parallel test execution 15 2⭐ 1🍴 |
15:28:02 | disruptek | zevv: 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:48 | FromGitter | <alehander92> nose2 is nice |
15:32:21 | disruptek | i'm still using nose1. it's a little bigger than it used to be, but i think upgrading will be too painful. |
15:35:19 | Zevv | haahaa disruptek has a big noohoosse |
15:35:52 | Zevv | disruptek: "several" bugs? |
15:36:13 | * | marmotini_ quit (Remote host closed the connection) |
15:36:24 | Zevv | or can you cause the same symptom in more then one way? |
15:36:51 | * | solitudesf joined #nim |
15:43:51 | FromGitter | <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:51 | FromGitter | ... [https://gitter.im/nim-lang/Nim?at=5e189bb6a74ac853778757ab] |
15:46:47 | FromGitter | <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:04 | shashlick | is lscpu always available on Linux? |
15:49:18 | Yardanico | you can always use /proc/cpuinfo I think |
15:49:52 | * | ltriant joined #nim |
15:50:06 | Yardanico | but lscpu is from util-linux so it should be available on pretty much any non-embedded distro |
15:51:03 | disruptek | zevv: yeah, i can cause a double free in more than one way, but it might still only be one bug. |
15:52:31 | shashlick | i need the CPU arch |
15:52:35 | shashlick | which isn't in /proc/cpuinfo |
15:53:46 | Yardanico | well, there's "uname" |
15:53:56 | Yardanico | uname -m |
15:54:24 | shashlick | good point |
15:55:14 | * | ltriant quit (Ping timeout: 268 seconds) |
15:55:33 | Yardanico | uname is also available in posix as a system call |
15:55:34 | Yardanico | https://nim-lang.org/docs/posix.html#uname%2CUtsname |
15:55:40 | shashlick | https://github.com/dom96/choosenim/blob/master/scripts/choosenim-unix-init.sh#L130 |
15:56:04 | federico3 | https://nim-lang.org/docs/posix_utils.html |
15:56:18 | Yardanico | federico3: wow |
15:56:28 | Yardanico | I didn't know that existed :D |
15:56:47 | shashlick | nifty |
15:58:18 | disruptek | yeah, it worked so well as a util they decided to make it a call. |
15:59:08 | shashlick | basically 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:58 | Zevv | Araq: "baremetal" is not right either |
16:13:52 | disruptek | --os:byo |
16:14:35 | Yardanico | --os:myown |
16:14:56 | Zevv | --os:any |
16:15:13 | disruptek | any sounds good. |
16:15:36 | shashlick | heavyMetal |
16:15:45 | disruptek | --os:trance |
16:15:52 | shashlick | i'd prefer that |
16:16:03 | disruptek | i know. it's your special mode. |
16:16:05 | Zevv | no, light metal. --os:lithium |
16:16:19 | disruptek | heavy just sounds more badass. |
16:16:24 | disruptek | --os:tungsten |
16:16:27 | shashlick | i've made over a 100 trance songs way back when |
16:16:37 | disruptek | really? |
16:16:46 | disruptek | i wrote most of nimph on trance. |
16:17:02 | Zevv | I thought on weed |
16:17:04 | disruptek | show me some of your stuff. |
16:17:24 | shashlick | been 18 years now, was into the demoscene back then |
16:17:31 | shashlick | http://genotrance.com |
16:17:33 | lqdev[m] | oi, another trance lover here |
16:18:07 | disruptek | wow, shashlick has a blog. |
16:18:14 | disruptek | ~shashlick |
16:18:15 | disbot | no footnotes for `shashlick`. 🙁 |
16:18:19 | disruptek | oh c'mon... |
16:18:24 | disruptek | you guys are terrible. |
16:18:24 | shashlick | that's super obsolete as well |
16:18:29 | Yardanico | ~yardanico |
16:18:30 | disbot | no footnotes for `yardanico`. 🙁 |
16:18:38 | disruptek | ~disruptek |
16:18:38 | Yardanico | 😕 |
16:18:39 | disbot | disruptek: 11a sexy fella with magic hands. -- disruptek |
16:18:54 | disruptek | shashlick if you don't do it, i will. |
16:19:09 | disruptek | and then i'll be first. |
16:19:20 | disruptek | and your comments will be mere garnish. |
16:19:46 | shashlick | who comments on themselves |
16:19:51 | disruptek | Zevv: you owe be a drug-fueled debate on the feasibility of p2p-based pre-cognition software engineering. |
16:20:21 | Zevv | dude |
16:20:41 | disruptek | ~shashlick is someone more felt than seen. no, that's not it. shashlick must be HEARD! https://genotrance.wordpress.com/ |
16:20:42 | disbot | shashlick: 11someone more felt than seen. no, that's not it. shashlick must be HEARD! https://genotrance.wordpress.com/ |
16:20:56 | disruptek | dude. |
16:21:56 | Zevv | dude impulsetracker |
16:22:01 | Zevv | suddenly I feel so *old* |
16:22:51 | disruptek | impulsetracker. |
16:23:26 | disruptek | wow, this is amazing. |
16:23:43 | disruptek | is that you singing? |
16:24:18 | shashlick | which song, i only sang in one if I remember correctly |
16:24:25 | shashlick | back then I used a pair of headphones to record |
16:24:30 | disruptek | i thought you were male for some reason. |
16:24:42 | disruptek | that's so sexist of me, i know. |
16:24:44 | shashlick | I am, then that's my sister |
16:24:59 | disruptek | wow. |
16:25:14 | disruptek | you're blowing my mind right now. |
16:25:25 | disruptek | you're shashlick's sister? |
16:25:46 | disruptek | i may be a little too fucked up right now. |
16:25:52 | shashlick | it's 11am there, you still on weed? 😄 |
16:25:57 | disruptek | dude. |
16:25:58 | FromGitter | <alehander92> shashlick is male |
16:26:07 | disruptek | edibles. |
16:26:26 | disruptek | it's what's for breakfast. |
16:26:50 | disruptek | breakfast of champion compiler debuggers. |
16:26:57 | disruptek | i am gonna fix this thing today. |
16:27:17 | disruptek | shashlick that was so cool. |
16:27:22 | Zevv | the mod's still play in 2020. "mikmod ge-yk.it" and go \o/ |
16:27:34 | disruptek | there's a nim-based mod player with tui. |
16:27:50 | blackbeard420 | +1 for edibles while compiler debugging |
16:27:52 | disruptek | johnnovak, i wanna say. |
16:28:02 | disruptek | !repo mod player |
16:28:02 | disbot | https://github.com/johnnovak/nim-mod -- 9nim-mod: 11A Nim MOD player just for fun 15 14⭐ 4🍴 |
16:28:42 | shashlick | disruptek: which one |
16:28:46 | disruptek | clyybber is working on a hack of johnnovak's tui engine, for the benefit of his roguelike. |
16:28:46 | Zevv | genotrance++ \o/ |
16:28:57 | * | Vladar quit (Remote host closed the connection) |
16:29:01 | disruptek | shashlick: Tadap |
16:29:16 | shashlick | that's a remix of a movie song |
16:29:34 | disruptek | oh, that's not you? |
16:29:43 | disruptek | is it your brother? |
16:29:59 | disruptek | wait, is this sister-shashlick or brother-shashlick? |
16:30:02 | shashlick | nope, some movie singer |
16:30:14 | disruptek | awww man. |
16:30:15 | Zevv | I think it is time to go diff your C, you man |
16:30:18 | shashlick | com.shashlick.watched.movie |
16:31:32 | disruptek | we should play this as background music on a stream. |
16:31:48 | disruptek | why don't we setup a streaming channel? |
16:32:05 | Zevv | some of this stuff will do great on games |
16:32:07 | disruptek | i can devote a lot of hours to creating nim bugs on stream. |
16:32:39 | Zevv | "Demosha Strikes Again", I can see the paralax scroller platform before my eyes |
16:32:48 | disruptek | i'm not saying it bugs me, but shashlick's stuff is bringing on a whole litany of bugs right now. |
16:33:02 | disruptek | ticks. |
16:33:46 | shashlick | looks like 3 hours of lost productivity or extreme productivity |
16:35:26 | disruptek | what can i say, it's super cool to suddenly learn someone's an artist and you just never saw their art before. |
16:35:58 | disruptek | sorry shashlick, but your code just isn't art, buddy. |
16:36:43 | shashlick | i've been wanting to get back for years, will be two decades soon |
16:37:00 | disruptek | i still want to listen to code. |
16:37:03 | shashlick | of course, i'm still relatively active with guitar and singing but no where close to trance |
16:37:07 | disruptek | maybe we should get together on that. |
16:37:14 | disruptek | imagine turning ast into sound. |
16:37:34 | disruptek | i know we've talked about this before. ima make that shit some day. |
16:38:04 | shashlick | i really want to write a music editor with nim, not a UI but perhaps with data files, automation and what not |
16:38:06 | Zevv | I make synthesizers and great plans, but the music is lacking |
16:38:39 | shashlick | you know my fascination with automation |
16:38:57 | disruptek | one area that's ripe for exploitation is in written music composition. there's no solid piece of software for composition. |
16:39:22 | disruptek | the state of the art is called "SCORE" and iirc it's dos-based. |
16:39:37 | * | Hideki_ joined #nim |
16:39:49 | disruptek | each member of the competition has serious flaws. |
16:40:02 | disruptek | this isn't /that/ hard a problem, but it's hard. |
16:40:44 | disruptek | you want a layout engine that outputs svg. |
16:40:50 | Zevv | graphviz |
16:40:56 | disruptek | the rules are annoying, to say the least. |
16:41:10 | disruptek | but the market is huge. |
16:41:42 | FromGitter | <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:53 | Zevv | Did you export* them? |
16:41:59 | disruptek | this. |
16:42:35 | FromGitter | <Albus70007> how? |
16:42:46 | FromDiscord | <Clyybber> I wanted to make something like kakoune but for music |
16:42:47 | disruptek | add a * after the identifier name. |
16:42:49 | Zevv | https://nim-lang.github.io/Nim/manual.html#procedures-export-marker |
16:43:06 | disruptek | ~exports is https://nim-lang.github.io/Nim/manual.html#procedures-export-marker |
16:43:06 | disbot | exports: 11https://nim-lang.github.io/Nim/manual.html#procedures-export-marker |
16:43:38 | FromGitter | <Albus70007> thx |
16:43:47 | disruptek | ~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:47 | disbot | exports: 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:21 | Zevv | Clyybber: I built a hot-codable software synth a long time ago. It was fun building, but not fun to make music with :( |
16:44:23 | disruptek | clyybber: it's kinda like the origin story to latex. |
16:44:25 | Zevv | The vim-plugin was the best par |
16:44:29 | Zevv | t |
16:44:49 | disruptek | wait, what |
16:45:06 | disruptek | oh, it had a vm you programmed it with? |
16:45:22 | Zevv | Luajit based |
16:45:25 | Zevv | http://worp.zevv.nl/ |
16:45:55 | disruptek | wow, that's so neat. |
16:46:09 | * | Trustable joined #nim |
16:46:22 | * | sealmove joined #nim |
16:46:23 | disruptek | so i write something to turn nim ast into something like this. |
16:47:14 | disruptek | if it was a source-code filter, it could embed the worp code as comments. |
16:47:41 | disruptek | then you could see what a procedure "sounds like" when you visit its definition. |
16:48:42 | Zevv | ill have what you are having, thank you |
16:48:52 | disruptek | lol |
16:48:53 | * | aexoxea quit (Quit: Goodbye!) |
16:49:02 | disruptek | i mean, is it crazy? |
16:49:24 | FromDiscord | <Clyybber> Zevv: Ah, I know, I found it on your site some time ago |
16:50:00 | FromDiscord | <Clyybber> what I want to do is something like ORCA but a bit more logical and modular |
16:50:12 | disruptek | i kinda wish i had really learned lua. i only used it for wow mods. |
16:50:15 | Zevv | buy a nord modular |
16:50:26 | disruptek | that sounds like a power tool. |
16:50:37 | Zevv | it is |
16:50:52 | FromDiscord | <Clyybber> VCVRack is really nice |
16:50:54 | Zevv | as power and as tool as synths come |
16:50:59 | Zevv | and its red |
16:50:59 | FromDiscord | <Clyybber> faust and pd too |
16:51:31 | disruptek | everyone seems to like the nord stage. |
16:51:39 | disruptek | is that the most expensive one or what? |
16:52:21 | disruptek | whoosh. |
16:52:36 | FromDiscord | <Clyybber> I have a korg monologue that I found on the street so theres that |
16:52:37 | Zevv | I had one |
16:52:38 | Zevv | I sold it |
16:52:58 | disruptek | you found a korg on the street? |
16:53:05 | FromDiscord | <Clyybber> yeah |
16:53:08 | FromDiscord | <Clyybber> a tiny handheld one |
16:53:31 | disruptek | they say size doesn't matter, |
16:53:32 | FromDiscord | <Clyybber> it still works |
16:53:36 | disruptek | but between you and me, |
16:53:38 | disruptek | it matters. |
16:53:41 | disruptek | oh boy, it matters. |
16:54:04 | Yardanico | what is happening |
16:54:22 | * | marmotini_ joined #nim |
16:54:36 | disruptek | we're talkin' about little korgs. |
16:54:36 | FromDiscord | <Clyybber> yeah, I reject everything I can't play clair de lune on |
16:54:50 | shashlick | this has turned into offtopic |
16:54:54 | disruptek | clair de lune is incredible. |
16:55:00 | disruptek | could there be a more beautiful tune? |
16:55:08 | FromDiscord | <Clyybber> theres a game |
16:55:21 | FromDiscord | <Clyybber> one of my favorite games |
16:55:22 | FromDiscord | <Clyybber> prey |
16:55:26 | FromDiscord | <Fern & Simula (They/Them)> using c# makes me long for Nim's stdlib |
16:55:49 | disruptek | https://invidio.us/embed/MZpj2BujuD0 |
16:56:15 | disruptek | i thought C# was nice. i think nim is better. |
16:56:19 | FromDiscord | <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:04 | FromDiscord | <Clyybber> tomitas version is also really nice |
16:57:41 | Yardanico | remember this cursed "OOP" example from nim tutorial :D |
16:57:43 | Yardanico | stdout.write(stdin.readLine.splitWhitespace.map(parseInt).max.`$`) |
16:58:17 | FromDiscord | <gingerBill> That's just painful to read, sorry. |
16:58:51 | FromDiscord | <Clyybber> its concise |
16:58:51 | FromDiscord | <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:58 | Yardanico | lol |
16:59:01 | FromDiscord | <Clyybber> at least |
16:59:20 | FromDiscord | <treeform> that looks like Haskell, not OOP |
16:59:23 | disruptek | i think that's a phase people go through, and some never leave. |
16:59:40 | Zevv | ~you friggin *found* a monologue |
16:59:40 | disbot | no footnotes for `you`. 🙁 |
16:59:51 | FromDiscord | <gingerBill> var lines = stdin.readLine.splitWhitespace |
16:59:51 | FromDiscord | <gingerBill> var ints = lines.map(parseInt) |
16:59:51 | FromDiscord | <gingerBill> var v = ints.max |
16:59:51 | FromDiscord | <gingerBill> stdout.write(v.$) |
16:59:57 | FromDiscord | <gingerBill> I know it is the same, but that is clearer to me |
17:00:03 | Yardanico | let* |
17:00:27 | FromDiscord | <treeform> @gingerBill I don't think its the same, it has documented the steps with names |
17:00:54 | FromDiscord | <gingerBill> `let` would be fine too. |
17:00:59 | FromDiscord | <Clyybber> I kind of really want to make a hive |
17:01:06 | FromDiscord | <gingerBill> @treeform Well, yes it has. It has also made it vertical rather than horizontal |
17:01:57 | disruptek | what's the best thing to put in vertical space? horizontal? |
17:02:21 | disruptek | is x space and y time? |
17:02:48 | FromDiscord | <treeform> I am so happy my fidget UI lib has rendered a math formula: |
17:02:55 | FromDiscord | <treeform> |
17:02:56 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665239147832803360/unknown.png |
17:03:10 | disruptek | awesome. |
17:03:26 | disruptek | how do you do that? |
17:03:50 | FromDiscord | <gingerBill> Is that manual rendering or a library? |
17:03:58 | FromDiscord | <treeform> Its both. |
17:04:06 | FromDiscord | <gingerBill> (Manual as in you use something like freetype) |
17:04:41 | FromDiscord | <treeform> I did not use freetype, I parsed the fonts and used my own rasterization |
17:04:43 | Yardanico | @treeform what does it use in this screenshot? opengl? |
17:05:01 | FromDiscord | <treeform> Yardanico, yes glfw+openGL |
17:05:10 | FromDiscord | <gingerBill> @treeform Very cool |
17:05:18 | disruptek | isao tomita. wow. |
17:05:26 | FromDiscord | <gingerBill> What is the library part then? |
17:06:02 | FromDiscord | <treeform> @gingerBill rasterization and typesetting is done by: https://github.com/treeform/typography |
17:06:20 | FromDiscord | <treeform> Here is the part that freetype would do: https://github.com/treeform/typography/blob/master/src/typography/rasterizer.nim |
17:06:21 | FromDiscord | <gingerBill> Oh... |
17:06:33 | FromDiscord | <treeform> freetype is only part of the text puzzle |
17:06:37 | euantor | @gingerBill: Are you the same gingerBill that created Odin? I've had alook at it a few times and it looks neat |
17:06:41 | FromDiscord | <gingerBill> Yes |
17:06:43 | FromDiscord | <treeform> you also need pango and harfbuz |
17:07:01 | FromDiscord | <treeform> which I also trying to implement as one big "typography" lib |
17:07:07 | FromDiscord | <gingerBill> Harfbuzz is needed f you want to do anything that is non-western |
17:08:22 | FromDiscord | <treeform> I got JCK going, but Hebrew and Arabic are really hard to draw - "shaping" phase is really hard |
17:09:18 | FromDiscord | <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:24 | FromDiscord | <gingerBill> Human languages are weird and wonderful |
17:09:44 | disruptek | as opposed to the other kind? |
17:09:59 | FromDiscord | <treeform> From programming standpoint Arabic has no characters but part of them, and you mix and match them with complex rules. |
17:10:29 | Zevv | how does that work, input-wise? |
17:10:36 | Zevv | how does one type arabic |
17:11:02 | disruptek | unlike kanji? |
17:11:48 | FromDiscord | <treeform> |
17:11:49 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665241396600373291/Amiri-Regular.png |
17:11:59 | FromDiscord | <treeform> ^ soo many "parts" of letters |
17:13:01 | Zevv | oh I saw that pic before, it has that huge blob almost at the bottom |
17:13:12 | Zevv | still wondering what that says |
17:13:22 | FromDiscord | <treeform> Me too |
17:13:42 | FromDiscord | <treeform> I think its either font's watermark or a verse |
17:15:20 | Yardanico | ah, this big letter? |
17:15:40 | FromGitter | <IamRifki> I upgraded a dependency (which is not in Nimble and is instead in a git repo which I submodule to) |
17:15:49 | FromGitter | <IamRifki> and now Nimble develop does not work |
17:16:11 | disruptek | try nimph. |
17:16:14 | disruptek | !repo nimph |
17:16:14 | disbot | https://github.com/disruptek/nimph -- 9nimph: 11Nim package hierarchy manager from the future 🧚 15 49⭐ 2🍴 7& 1 more... |
17:16:26 | Yardanico | hm, I thought it's ﷽, but it's not |
17:16:27 | FromDiscord | <treeform> Yardanico, in the font yes, but I don't think its a real letter |
17:17:03 | FromDiscord | <treeform> Many fonts have specific ligature for Allah and other common words, like Arial does. |
17:17:28 | FromDiscord | <treeform> Here is Arial: |
17:17:28 | FromGitter | <IamRifki> Do I really need an extra dependency to fix this mess? |
17:17:29 | FromDiscord | <treeform> |
17:17:29 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665242824333066251/unknown.png |
17:17:38 | FromDiscord | <treeform> |
17:17:39 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665242864854237185/unknown.png |
17:18:02 | disruptek | iamrifki: it's not an extra dependency; it's a package manager that you can get support for. |
17:19:15 | FromDiscord | <treeform> Yardanico, actually it looks a lot like ﷽. |
17:19:27 | FromDiscord | <treeform> Just more free flowing and stylistic. |
17:19:34 | disruptek | wow, those render beautifully on my screen. |
17:19:35 | Yardanico | damn my quassel breaks a bit on these letters xd |
17:19:41 | Yardanico | line width |
17:19:47 | Yardanico | height i mean |
17:20:09 | shashlick | @IamRifki: what's your exact issue with nimble develop |
17:20:27 | FromGitter | <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:06 | FromGitter | <IamRifki> panicoveride is a nim file inside of a folder called tonc |
17:21:15 | FromGitter | <IamRifki> but I could not redirect it to that folder |
17:21:20 | FromGitter | <IamRifki> for some reason |
17:21:52 | * | marmotini_ joined #nim |
17:21:54 | FromGitter | <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:02 | FromDiscord | <treeform> Nice it works in the browser as well: |
17:22:03 | FromDiscord | <treeform> |
17:22:03 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665243974717407242/unknown.png |
17:22:04 | shashlick | is this your package? |
17:22:35 | shashlick | okay looks like exelotl |
17:22:43 | FromGitter | <IamRifki> Yes |
17:22:49 | disruptek | omg i found the bug. var variables are deref'd and let variables aren't. |
17:22:49 | FromGitter | <IamRifki> it's exelotl's |
17:23:11 | FromDiscord | <treeform> In browser it uses regular JS+HTML (not openGL, no wasm). |
17:23:15 | disruptek | they are different types. 😜 |
17:23:18 | shashlick | so you have nim-tonc in a subdir right |
17:23:28 | FromGitter | <IamRifki> Yes |
17:23:31 | shashlick | then add a --path:"$projectPath/nim-tonc/tonc" to your nim.cfg |
17:23:43 | * | Vladar joined #nim |
17:23:46 | shashlick | you can try with your command line itself and see if it works |
17:24:58 | FromGitter | <IamRifki> No |
17:25:00 | FromGitter | <IamRifki> it does not work |
17:25:22 | shashlick | can you share your repo? I'll try locally |
17:26:11 | FromGitter | <IamRifki> https://send.firefox.com/download/956764690727eddc/#3-HVlx2OZ7axPpjlBPtBJw |
17:27:02 | * | icebattle joined #nim |
17:27:04 | FromDiscord | <exelotl> Did you install nim-tonc by cloning the repo, cd'ing into it and running `nimble develop` ? |
17:27:11 | FromGitter | <IamRifki> Ye |
17:27:32 | shashlick | link expired |
17:27:37 | FromDiscord | <exelotl> Huh, it should be able to find that file then... |
17:27:50 | shashlick | well, but that is only local right |
17:28:04 | shashlick | he wants to use it as a submodule rather than a traditional nimble package |
17:28:12 | FromDiscord | <exelotl> Oh right |
17:28:33 | shashlick | you need to add the right --path command to nim.cfg and nim will find it on compile |
17:28:54 | FromGitter | <IamRifki> I would use it as a package, but exelotl hasn't added it to nimble |
17:30:00 | FromDiscord | <Clyybber> submodules are superior anyways :p |
17:30:35 | * | marmotini_ quit (Quit: Leaving...) |
17:30:40 | FromDiscord | <Clyybber> just create a `config.nims` or a `nim.cfg` depending on what you like more |
17:30:41 | disruptek | you can just specify the url. |
17:30:46 | shashlick | your firefox send didn't work |
17:31:13 | disruptek | in your package.nimble, use a requires statement with the url#branch you want. |
17:31:40 | disruptek | then issue a `nimble build`, and it'll install the package. |
17:31:56 | FromDiscord | <Clyybber> IamRifki: And in your config.nims put `switch "path", "./whereyournimtoncis/"` |
17:32:24 | FromDiscord | <Clyybber> don't listen to ruptek, use submodules :p |
17:32:51 | disruptek | ~clyybber |
17:32:52 | disbot | clyybber: 11a dick |
17:32:53 | disbot | clyybber: 11looks like a fish but smells like a weasel. -- disruptek |
17:33:04 | FromDiscord | <Clyybber> ~disruptek is don't listen to him |
17:33:04 | disbot | disruptek: 11a sexy fella with magic hands. |
17:33:05 | disbot | disruptek: 11don't listen to him |
17:33:06 | FromGitter | <Varriount> exelotl: I finally understood your nickname last night. Do you have any axelotls? |
17:33:25 | FromGitter | <IamRifki> NOPE |
17:33:28 | FromGitter | <IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18b567bdcaea18912e0739] |
17:33:30 | disruptek | lol |
17:34:18 | shashlick | what version of nimble/nim and please share your repo |
17:34:29 | FromGitter | <IamRifki> Nightly |
17:35:13 | Yardanico | built when? :) |
17:35:14 | FromGitter | <IamRifki> https://share.dmca.gripe/k84ZdkKBSWK0OFrl.7z |
17:35:38 | FromGitter | <IamRifki> https://github.com/nim-lang/nightlies/releases/tag/2020-01-09-devel-56fb909 |
17:36:10 | disruptek | they only come out at night. |
17:36:43 | FromDiscord | <Clyybber> ~~~recursive is is is test |
17:36:44 | disbot | ~~recursive: 11is is test |
17:36:53 | FromDiscord | <Clyybber> smart motherfucker |
17:37:30 | disruptek | i thought about having a /see also/: ~this ~that and having it dereference them for you. |
17:37:54 | disruptek | the problem is that i don't want one author to monopolize a 3-line output. |
17:38:13 | disruptek | with, eg. two /see also/ tokens. |
17:38:21 | FromDiscord | <Clyybber> ~colon: is filtered |
17:38:22 | disbot | colon:: 11filtered |
17:38:27 | FromDiscord | <Clyybber> hmm |
17:38:31 | * | tane joined #nim |
17:38:42 | FromDiscord | <Clyybber> disbot: Do you ignore yourself? |
17:39:48 | shashlick | @IamRifki: edit nim.cfg to --path:"nim-tonc" |
17:39:55 | shashlick | and you can remove the URL from the nimble file |
17:40:09 | FromDiscord | <Clyybber> embrace nimscript, become one |
17:40:09 | shashlick | or you can do the opposite, simply use the url and remove the submodule |
17:40:51 | * | sagax quit (Ping timeout: 240 seconds) |
17:42:26 | FromGitter | <IamRifki> shashlick then what? |
17:42:54 | FromGitter | <IamRifki> It still errors out |
17:42:57 | FromGitter | <IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18b7a1c39503490277a153] |
17:43:03 | FromGitter | <IamRifki> different error though |
17:43:23 | FromGitter | <IamRifki> Oh I know the reason |
17:44:05 | FromDiscord | <Clyybber> ~!eval block is echo "~!eval block is echo \"sup\"" |
17:44:06 | disbot | no footnotes for `!eval`. 🙁 |
17:44:10 | FromGitter | <IamRifki> There we go |
17:45:00 | * | clyybber joined #nim |
17:45:14 | clyybber | !evalecho"test" |
17:45:18 | disruptek | oh shit, he's getting serious now. |
17:45:21 | clyybber | !eval echo"test" |
17:45:24 | NimBot | test |
17:45:43 | FromDiscord | <Clyybber> hmm |
17:45:47 | disruptek | don't do it. |
17:45:53 | clyybber | i failed |
17:46:03 | disruptek | oh, there's a way. |
17:46:09 | disruptek | but, don't. |
17:46:27 | clyybber | my minds telling me no |
17:47:04 | clyybber | wait, can't nimbot itself recurse? |
17:47:33 | clyybber | I don't want to test it, since I'm not sure if dom96 is here to stop it :p |
17:47:42 | disruptek | i'm sure it won't. |
17:48:01 | clyybber | are you sure enough to try? |
17:48:16 | disruptek | yep. |
17:48:46 | clyybber | !eval echo "!eval echo \"sup\"" |
17:48:49 | NimBot | !eval echo "sup" |
17:48:57 | clyybber | :( |
17:48:58 | disruptek | btdt |
17:49:22 | disruptek | but, that's not the technique, anyway. |
17:50:10 | clyybber | ~"quotes" is quotable |
17:50:10 | disbot | "quotes": 11quotable |
17:50:11 | FromGitter | <IamRifki> Is Araq somehere here? |
17:50:46 | * | ltriant joined #nim |
17:52:19 | clyybber | ~!eval is command to evaluate snippets on IRC |
17:52:20 | disbot | !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:07 | FromGitter | <matrixbot> `grantmwilliams` is toSeq(1..<10) the best way to make a sequence of a range? |
17:56:15 | clyybber | yup |
17:56:19 | * | clyybber quit (Quit: WeeChat 2.7) |
18:00:58 | disruptek | guess he gave up. |
18:04:02 | FromDiscord | <Clyybber> yeah |
18:04:30 | disruptek | you were close. |
18:04:55 | FromDiscord | <Clyybber> I don't think its doable |
18:05:02 | FromDiscord | <Clyybber> but I'm saying this so you prove me wrong |
18:05:26 | disruptek | too funny. |
18:05:47 | FromDiscord | <Clyybber> I don't get how you would get disbot to print out !eval somevalidnim |
18:05:56 | FromDiscord | <Clyybber> because eval has to have a space after it |
18:06:07 | FromDiscord | <Clyybber> but disbot ignores my command as soon as a space follows |
18:08:38 | disruptek | it sounds like you need an eval term with a space in it. |
18:09:22 | FromDiscord | <exelotl> @IamRifki out of interest, what was the problem? |
18:09:49 | FromDiscord | <Clyybber> disruptek: Yeah, not in the term itself, but between the eval and the term |
18:09:55 | FromGitter | <IamRifki> path issues |
18:09:59 | FromGitter | <IamRifki> basically |
18:10:15 | FromGitter | <IamRifki> had to set `--path:"nim-tonc"` in `nim.cfg` |
18:10:42 | FromDiscord | <exelotl> Ahh |
18:11:03 | disruptek | do we have a way to compose strings with spaces? |
18:11:35 | FromGitter | <IamRifki> btw exelotl |
18:11:40 | FromGitter | <IamRifki> I tried using arc |
18:11:45 | FromGitter | <IamRifki> but it failed to compile |
18:11:48 | FromGitter | <IamRifki> ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e18be63821b826f5a9b53f0] |
18:14:06 | disruptek | what if nimph helped you do code review on patches in your dependency tree? |
18:14:31 | disruptek | interactive upgrade. like gentoo's etc-update. |
18:17:02 | * | rockcavera quit (Read error: Connection reset by peer) |
18:17:37 | disruptek | `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:10 | Araq | ping Zevv |
18:18:17 | FromDiscord | <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:42 | disruptek | i just pinged him. |
18:23:17 | FromDiscord | <Clyybber> disruptek: smoke? |
18:23:28 | disruptek | smoke test |
18:24:10 | FromDiscord | <Clyybber> heh, nice |
18:32:11 | Araq | never mind, found it myself |
18:33:34 | FromGitter | <alehander92> so now can i kernel with anisc |
18:34:30 | Araq | disruptek, can you do https://github.com/nim-lang/Nim/pull/13000 differently with a little proc header duplciation? |
18:34:31 | disbot | ➥ exporting normalizePathEnd |
18:34:44 | Araq | I cannot merge code that relies on a compiler bug |
18:34:59 | disruptek | okay, dupe them how? |
18:35:53 | Araq | move the impl to a normalizePathEndImpl template |
18:36:05 | disruptek | ah, okay. |
18:36:10 | Araq | and write the proc normalizePathEnd*(...) twice |
18:36:14 | disruptek | yep. |
18:36:31 | Araq | it's PR friday |
18:36:42 | Araq | everybody needs to work on his PRs |
18:37:03 | disruptek | good diversion from this double free. |
18:37:17 | Araq | double free --> run valgrind on it |
18:37:28 | disruptek | what does that tell me? |
18:39:00 | Araq | nim c --gc:arc foo.nim && valgrind ./foo |
18:39:12 | Araq | so you see the problem when it occurs, not afterwards |
18:39:26 | disruptek | i will play with it. |
18:39:47 | Araq | (that's actually false btw, but it's a bit hard to explain and not its fault) |
18:40:00 | disruptek | i think i get it. |
18:43:11 | Zevv | Araq: pong |
18:43:18 | Araq | too late |
18:43:24 | Araq | found the bug without you |
18:43:44 | Araq | quite surprising it worked before but whatever |
18:43:49 | Zevv | sweet. It always pays to have a louse round trip time |
18:44:37 | Zevv | disruptek: I already valgrinded away, but the problem is not there |
18:45:00 | Araq | nim c --gc:arc -d:useMalloc foo.nim && valgrind ./foo |
18:45:09 | disruptek | i've gotten it much better locallized now, though. |
18:45:13 | Zevv | it's something that makes refs_v2 unhappy, it gets asked to do more Disposes then NewObjs |
18:45:15 | Araq | forgot the -d:useMalloc |
18:45:30 | Zevv | so the allocs counter gets < 0 and it asserts |
18:45:57 | disruptek | lets make one less instance and the same number of destroys. |
18:46:10 | disruptek | if that makes sense. that's my theory. |
18:48:57 | Zevv | The path I was following is to dump a stack trace on each nimRawDispose to see where these come from |
18:49:33 | disruptek | that makes sense. |
18:49:38 | disruptek | how do you dump the stack? |
18:49:39 | Zevv | I 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:08 | disruptek | i think it's on the level of var/let optimization assumptions. |
18:50:10 | Zevv | writeStackTrace() in Nim, or just put a breakpoint on i in gdb |
18:50:56 | Zevv | the problem is that this is called from "outside" of the nim code (thus my wrong interpretation of the gdb stacktrace yesterday) |
18:50:57 | disruptek | like, 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:49 | disruptek | no, i don't think anything is being freed on the c side to cause this. |
18:51:59 | disruptek | it's our rc that's wrong. |
18:52:27 | disruptek | i think i'm understanding you right, right? |
18:54:08 | FromDiscord | <Rika> why is there no non-var version of `strutils.removeSuffix`? |
18:54:39 | FromDiscord | <Rika> missed it |
18:54:41 | FromDiscord | <Rika> disregard |
18:54:42 | FromDiscord | <Rika> thanks |
18:55:20 | disruptek | i think i missed the prefix one. |
18:58:30 | Zevv | yes, there is no double freeing at the C level, it is the refs_v2 failing on an assumption |
18:58:43 | Zevv | there are too many nimRawDispose() calls done |
18:59:36 | disruptek | oh, i thought you mean in c/ffi. |
19:00:07 | disruptek | yeah, there are too many frees. but is it because we expect var-like quantity instead of let-like quantity? |
19:01:19 | FromDiscord | <Clyybber> tbh, the fact that it only occurs with var also speaks for my hypothesis |
19:01:31 | disruptek | which hypothesis? |
19:01:59 | FromDiscord | <Clyybber> hmm nevermind |
19:01:59 | FromDiscord | <Clyybber> the a[i] thingy |
19:02:00 | disruptek | a[i] = x |
19:02:05 | FromDiscord | <Clyybber> yeah |
19:02:07 | FromDiscord | <Clyybber> that one |
19:02:45 | disruptek | i will look. i'm only starting to get a sense. there are too many moving parts. |
19:03:04 | Zevv | disruptek: I do not know anything about the "why" of this happening yet |
19:03:17 | disruptek | did you look at hmm.nim? |
19:03:48 | Zevv | according to the git logs you might want to ask the guy called Andreas Rumpf |
19:04:17 | Yardanico | lol |
19:04:20 | Yardanico | who's he? |
19:04:27 | disruptek | the name is so familiar. |
19:04:28 | Araq | Rika: non-var versions are available via sugar.outplace |
19:04:31 | disruptek | is he a youtuber? |
19:04:49 | Yardanico | i've seen his youtube blog |
19:05:07 | FromDiscord | <Clyybber> disruptek, Zevv: Can you try going into injectdestructors and replace isLastRead and isFirstWrite with `false` ? |
19:05:13 | * | sagax joined #nim |
19:05:32 | FromDiscord | <Clyybber> or maybe only isFirstWrite for starter |
19:05:36 | Zevv | I'm not doing anything. Last time I worked on this my battery died. That's a bad omen. |
19:05:36 | Araq | Clyybber: the analysis doesn't care about var vs let |
19:06:41 | FromDiscord | <Clyybber> Araq: Ah, right, I thought maybe in isAnalysableFieldAcess |
19:07:02 | FromDiscord | <Clyybber> but its commented out |
19:07:38 | disruptek | i can push the two versions of c if you want to diff. |
19:09:23 | Araq | you know what I want? |
19:09:30 | Araq | some small snippet reproducing the problem |
19:09:56 | Zevv | don't we all |
19:09:58 | disruptek | if i knew how to reproduce it without the c component... |
19:10:15 | Zevv | the c component is probably what is causing this |
19:10:42 | Zevv | disruptek: I'm trying to get your stuff to run here again, but I get random errors again |
19:10:44 | disruptek | hmm, maybe i can repro it. |
19:10:45 | Zevv | like: # Build configuration failed - No build files found in /home/ico/.cache/nim/nimterop/nimgit2/libgit2Dyn |
19:11:02 | disruptek | rm -rf that nimgit2 |
19:11:33 | Zevv | which? |
19:11:41 | shashlick | just use -f |
19:11:43 | Zevv | I alreadt delete all of nimcache |
19:11:46 | shashlick | in nim c -f |
19:11:57 | * | ltriant joined #nim |
19:11:57 | shashlick | will redownload libgit2 |
19:12:04 | disruptek | i think it's like halfway downloaded or something. |
19:12:27 | Zevv | damn this is *so* flakey |
19:13:14 | disruptek | is it me or is the get() a var get sometimes? |
19:14:21 | Zevv | I can't even get this to work again. Deleted all of nim cache and ~/.nimble |
19:15:04 | Zevv | this feels like python |
19:15:58 | shashlick | Zevv - what exactly is the issue? pastes will help |
19:16:15 | Zevv | http://ix.io/2738 |
19:16:53 | shashlick | what's in the nim.cfg |
19:17:01 | shashlick | are there any -d:git2XXX flags defined? |
19:17:06 | * | ltriant quit (Ping timeout: 265 seconds) |
19:17:37 | Zevv | which nim.cfg--git2SetVer="master" |
19:17:37 | Zevv | --git2Git |
19:18:31 | disruptek | well, i have a repro of a bug. |
19:18:34 | disruptek | not sure it's the same one. |
19:19:57 | Zevv | If you need more bugs, I have a few here: http://zevv.nl/bug-a-day/ |
19:20:34 | disruptek | http://ix.io/2739/nim |
19:20:56 | shashlick | do you have a nim.cfg for the test.nim |
19:21:02 | shashlick | I only see one for gittyup itself |
19:21:09 | disruptek | let's fix this one first. |
19:21:26 | shashlick | yep, the test file has no -d:git2XXX defined |
19:22:14 | disruptek | 'cause the tests are specified in the nimble for travis reasons. |
19:22:57 | disruptek | i guess cli args will override a nim.cfg though, so i can fix that. |
19:23:56 | Zevv | disruptek: this crash is related nimRawDispose anyway: |
19:23:57 | Zevv | http://ix.io/273b |
19:25:03 | disruptek | that's the one i just pasted? |
19:26:42 | disruptek | works with object, not ref object. |
19:27:33 | disruptek | it's the [not void] version of get. |
19:27:35 | disruptek | hmm. |
19:29:58 | FromDiscord | <treeform> How, many of you are going to FOSDEM? |
19:30:20 | FromDiscord | <treeform> I am thinking of going but its a long trip from USA. |
19:30:35 | dom96 | I'll definitely be there since I'm giving a talk :) |
19:30:37 | disruptek | do it. |
19:30:55 | dom96 | btw 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:23 | FromDiscord | <treeform> dom96, that is what I am using it for. |
19:31:42 | FromDiscord | <treeform> but I generate an image and stick it into a texture atlas |
19:32:10 | dom96 | ahh, so I'll need to implement a texture atlas no matter what |
19:32:23 | FromDiscord | <treeform> is it a 2d game? |
19:32:26 | dom96 | yeah |
19:32:45 | FromDiscord | <treeform> you could just try using fidget ... its basically a 2d game engine with texture atlas |
19:32:52 | FromDiscord | <treeform> or just grab the texture atlas part |
19:33:07 | dom96 | I'm using my own poor man's game engine :) |
19:33:15 | dom96 | and sdl2 so not sure I can use fidget |
19:33:26 | FromDiscord | <treeform> oh with SDL2 it should be easy as well |
19:33:28 | dom96 | I'll try to see if I can reuse the texture atlas part |
19:33:39 | FromDiscord | <treeform> just create serface for every char |
19:33:46 | FromDiscord | <treeform> bit the char when you need them |
19:33:50 | FromDiscord | <treeform> blit* |
19:34:07 | dom96 | hrm, okay. Sucks having to position the letters correctly yourself though |
19:34:10 | FromDiscord | <treeform> SDL2 already has font stuff though |
19:34:19 | dom96 | I feel like it's not just a case of x += someConstant |
19:34:19 | FromDiscord | <treeform> dom96, I do that part too |
19:34:29 | FromDiscord | <treeform> I make it pretty easy |
19:34:39 | FromDiscord | <treeform> you typeset a layout first |
19:34:46 | dom96 | I wonder if I can get sdl2 to do this for me |
19:34:50 | FromDiscord | <treeform> then you just for loop over layout gliphs and blit them in place |
19:35:25 | dom96 | if I were to use your lib what would be the easiest way to blit the text onto a sdl2 texture? |
19:35:52 | dom96 | actually, maybe I could just render the font texture at compile-time |
19:35:57 | * | Hideki_ quit (Ping timeout: 258 seconds) |
19:36:04 | FromDiscord | <treeform> well probably using sdl2 font stuff... |
19:36:12 | FromDiscord | <treeform> but if you want to be more nim pure... you would use mine? |
19:36:15 | FromDiscord | <treeform> https://github.com/treeform/typography/blob/master/src/typography/layout.nim#L249 |
19:36:28 | FromDiscord | <treeform> you would just replace my blit with SDL's blit. |
19:36:30 | dom96 | yeah, just wondering how I can integrate it with sdl2 |
19:36:35 | FromDiscord | <treeform> its just a for loop |
19:36:51 | dom96 | I'd have to fork the code, right? |
19:36:56 | FromDiscord | <treeform> no |
19:37:04 | FromDiscord | <treeform> you just write your own function that does this |
19:37:13 | FromDiscord | <treeform> I remmber writing one for SDL as an example for some one... |
19:37:17 | FromDiscord | <treeform> but I don't think I have the code any more |
19:37:25 | FromDiscord | <treeform> I can provide you with an example |
19:38:29 | dom96 | that 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:17 | FromDiscord | <treeform> yeah pre-rendering can't really work because CJK fonts have soo many glyphs |
19:40:32 | FromDiscord | <treeform> it takes 1GB to parse and render out a CJK file. |
19:40:38 | FromDiscord | <treeform> they are huge! |
19:42:01 | FromDiscord | <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:42 | dom96 | @treeform: https://www.libsdl.org/release/SDL2-2.0.10-win32-x86.zip |
19:42:50 | dom96 | https://www.libsdl.org/download-2.0.php |
19:43:19 | dom96 | As a side note, this source code is great: https://github.com/TerryCavanagh/VVVVVV |
19:43:32 | FromDiscord | <Clyybber> if you have steam installed, it provides SDL2 too |
19:43:35 | dom96 | Must have been painful to use C++ for it |
19:43:54 | FromDiscord | <treeform> I do have steam, its not providing. now it wants SDL2_gfx.dll |
19:44:34 | FromDiscord | <treeform> oh its here |
19:44:35 | FromDiscord | <treeform> https://github.com/nim-lang/sdl2/wiki/Windows-Binaries |
19:44:55 | FromDiscord | <Clyybber> dom96: #FUN#: https://github.com/TerryCavanagh/VVVVVV/tree/master/desktop_version#a-word-about-compiler-quirks |
19:45:25 | dom96 | ehh, dropbox really? |
19:45:39 | FromDiscord | <treeform> oh crap its 32 bit I need 64 bit |
19:45:42 | FromDiscord | <treeform> I hate looking for DLLS! |
19:46:01 | FromDiscord | <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:04 | FromDiscord | <treeform> GARR! |
19:46:08 | dom96 | you don't need sdl2_gfx |
19:46:20 | dom96 | the skeleton really shouldn't use it |
19:46:39 | dom96 | just get rid of the `sdl2/gfx` import |
19:46:49 | FromDiscord | <treeform> and the FpsManager |
19:46:55 | dom96 | it's possibly just used for the fps manager. |
19:46:56 | dom96 | yeah |
19:46:57 | FromDiscord | <treeform> thats part of `sdl2/gfx` |
19:47:03 | FromDiscord | <treeform> ok running now |
19:47:14 | dom96 | I got rid of that dependency from my game because it's not official sdl2 |
19:47:25 | FromDiscord | <treeform> cool |
19:47:34 | dom96 | can you paste me the code that compiles? |
19:47:40 | dom96 | I'll fix this example immediately |
19:47:41 | FromDiscord | <treeform> now do you have an example that blits an image? |
19:48:19 | FromDiscord | <treeform> https://gist.github.com/treeform/4538ac9c9043bdcbba28edd667f3a0b9 |
19:48:29 | dom96 | https://github.com/dom96/gamelight/blob/master/gamelight/graphics.nim#L937-L965 |
19:48:37 | dom96 | ^ how I draw text in my lib |
19:49:17 | FromDiscord | <treeform> Ok so here you are rendering a full "textSurface" |
19:49:23 | FromDiscord | <treeform> I can do that too, but its kind of slow |
19:49:32 | dom96 | yeah, my code sucks :P |
19:49:33 | FromDiscord | <treeform> but its faster if you cache the serface |
19:49:53 | dom96 | I cache the font at least :D |
19:50:04 | FromDiscord | <treeform> I can either supply glyphs or the whole text image. |
19:51:54 | FromDiscord | <treeform> do you use `createTextureFromSurface` SDL api always confused me, so many steps for "just draw image" |
19:52:10 | FromDiscord | <treeform> oh yeah you do |
19:52:16 | dom96 | It's just because text is rendered onto a surface for some reason |
19:54:58 | Zevv | disruptek: can you remove the Results from your crashing sample? |
19:55:20 | disruptek | obvious question, but i don't think so. |
19:55:40 | Zevv | replace it with something else inside the sample? |
19:56:36 | disruptek | can't repro w/o get. |
19:57:07 | dom96 | treeform: 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:10 | FromDiscord | <treeform> Ok I have a single glyph: |
20:02:11 | FromDiscord | <treeform> |
20:02:12 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665284275091800104/unknown.png |
20:04:09 | FromDiscord | <treeform> and now text |
20:04:10 | FromDiscord | <treeform> |
20:04:10 | FromDiscord | <treeform> https://cdn.discordapp.com/attachments/371759389889003532/665284772926324736/unknown.png |
20:05:13 | lqdev[m] | @treeform using your typography lib? |
20:08:09 | * | ltriant joined #nim |
20:08:19 | FromDiscord | <treeform> yes, I am making an example for dom96 that uses SDL instead of openGL. |
20:08:40 | FromGitter | <Albus70007> why though |
20:12:40 | Zevv | probably because of emscripten |
20:13:39 | * | ltriant quit (Ping timeout: 265 seconds) |
20:16:34 | FromGitter | <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:30 | FromDiscord | <treeform> hey, dom96 done: https://gist.github.com/treeform/632f4ae284226fd5b2bf567e3d36ec7a |
20:21:25 | FromDiscord | <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:52 | FromDiscord | <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:06 | disruptek | make your own await impl and import it. |
20:49:24 | FromDiscord | <Rika> ? |
20:50:01 | FromDiscord | <mratsim> create a module that imports asyncdispatch as awaitStdLib |
20:50:16 | FromDiscord | <mratsim> inside create an await template/macro, that does whatever you need |
20:50:21 | FromDiscord | <mratsim> and export that |
20:54:26 | FromDiscord | <Rika> i dont seem to understand, i tried doing as said yet have encountered the same issue |
20:57:06 | FromDiscord | <mratsim> can you share it? |
20:58:54 | disruptek | http://ix.io/273O/nim |
20:59:46 | FromDiscord | <mratsim> ~disruptek is an unsafe nil deref |
20:59:47 | disbot | disruptek: 11a sexy fella with magic hands. |
20:59:47 | disbot | disruptek: 11don't listen to him |
20:59:47 | disbot | disruptek: 11an unsafe nil deref |
21:00:23 | disruptek | i've been called worse. |
21:01:30 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=273Q ? |
21:05:14 | * | nsf joined #nim |
21:07:51 | FromDiscord | <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:30 | FromDiscord | <mratsim> and second, your macro is not returning anything, to be able to call waitFor you need to return "a" |
21:10:41 | FromDiscord | <mratsim> here is a fixed example: https://play.nim-lang.org/#ix=273Q |
21:20:52 | * | sschwarzer joined #nim |
21:22:26 | FromDiscord | <Rika> @mratsim okay, it seems like i miswrote the example |
21:23:00 | FromDiscord | <Rika> https://play.nim-lang.org/#ix=273V a more accurate example |
21:23:25 | FromDiscord | <Rika> (assuming a is used within the proc) |
21:23:44 | FromDiscord | <Rika> (i also have to slep, ill check this out when i wake up) |
21:24:09 | sschwarzer | Rika: Good night :) |
21:24:20 | * | uu91 quit (Remote host closed the connection) |
21:25:19 | * | Vladar quit (Quit: Leaving) |
21:26:37 | FromDiscord | <Rika> It's already early morning though :( |
21:26:40 | FromDiscord | <mratsim> you need to pass a as an untyped parameter |
21:26:51 | * | Kaivo quit (Quit: WeeChat 2.7) |
21:27:07 | sschwarzer | Rika: I see, then good morning? ;-) |
21:27:36 | FromDiscord | <mratsim> mmm regarding the async error it's curious |
21:28:38 | * | Kaivo joined #nim |
21:28:40 | FromDiscord | <mratsim> it's strange that this doesn't work: https://play.nim-lang.org/#ix=273X |
21:30:01 | FromDiscord | <Rika> I think it's similar to the strformat limitation in templates |
21:30:38 | * | narimiran quit (Ping timeout: 260 seconds) |
21:30:56 | FromDiscord | <mratsim> or it's a bug in templates that make them returning the wrong error |
21:31:13 | FromDiscord | <mratsim> because await asyncSleep(123) has no type |
21:51:12 | * | ltriant joined #nim |
21:52:00 | disruptek | okay, i think i got it. |
21:54:34 | * | Kaivo quit (Quit: WeeChat 2.7) |
21:54:50 | disruptek | i 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:57 | disruptek | s/same rev/same ref/ |
21:56:26 | * | Kaivo joined #nim |
21:56:36 | * | ltriant quit (Ping timeout: 268 seconds) |
22:12:13 | sschwarzer | Hi disruptek! :) |
22:14:12 | disruptek | sup dawg |
22:16:16 | * | filcuc joined #nim |
22:16:36 | shashlick | when was testament added to the bin directory? |
22:17:26 | disruptek | maybe just before 1.0, i wanna say. |
22:20:36 | * | sschwarzer quit (Quit: leaving) |
22:22:11 | shashlick | cool |
22:23:10 | Zevv | found im disruptek? |
22:24:51 | disruptek | i'm closer. just composing an issue to write this stuff down. |
22:34:30 | disruptek | !issue author:disruptek |
22:34:31 | disbot | https://github.com/nim-lang/Nim/issues/13102 -- 3double free bug with arc, Result type, object refs, and iterators 7& 16 more... |
22:53:33 | FromGitter | <Varriount> Why does disbot always put a number set the beginning of it's message? |
22:53:52 | Yardanico | it's not a number set, it's IRC color codes |
22:53:52 | disruptek | it's color on irc. |
22:54:01 | FromGitter | <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:24 | sekao | i 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:47 | disruptek | string | int | float32 |
23:17:08 | * | icebattle quit (Ping timeout: 258 seconds) |
23:20:08 | * | ltriant joined #nim |
23:22:02 | FromDiscord | <mratsim> when you instantiate a generic type it must have one concrete type |
23:22:18 | FromDiscord | <mratsim> you can't have seq[string or int or float32]() |
23:22:37 | disruptek | 'tis a silly rule. |
23:22:50 | FromGitter | <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:56 | sekao | i'm hoping to get the equivalent of std::variant |
23:23:00 | FromDiscord | <mratsim> well the law of physics may be silly but you have to comply :p |
23:23:15 | disruptek | you're kidding. |
23:23:16 | FromDiscord | <mratsim> use a variant then |
23:23:38 | FromDiscord | <mratsim> https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
23:23:39 | FromGitter | <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:48 | FromDiscord | <mratsim> ~variant is https://nim-lang.org/docs/tut2.html#object-oriented-programming-object-variants |
23:23:49 | disbot | variant: 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:10 | sekao | thanks i'll look into that |
23:26:42 | sekao | i 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:03 | FromGitter | <Albus70007> how can i fix this error? 'board.tiles[0][1].value' cannot be assigned to |
23:30:41 | dom96 | make `board` a 'var' or a 'ref' |
23:32:53 | * | Hideki_ joined #nim |
23:33:20 | FromGitter | <Albus70007> thanks |
23:34:52 | shashlick | dom96: new PR for choosenim |
23:34:55 | shashlick | can you review real quick? |
23:35:13 | shashlick | ugh i've not submitted yet |
23:35:48 | disruptek | clyybber: 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:35 | shashlick | dom96: https://github.com/dom96/choosenim/pull/156 |
23:36:36 | disbot | ➥ Multiple fixes |
23:37:14 | * | Hideki_ quit (Ping timeout: 240 seconds) |
23:38:18 | dom96 | shashlick, 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:27 | dom96 | that way we'd get stack traces |
23:38:47 | shashlick | interesting, yes |
23:38:59 | shashlick | right now, i was just adding a -d flag to the script and pass --debug and --verbose to choosenim |
23:39:08 | shashlick | but unclear if we really get any more output |
23:39:14 | shashlick | especially for build failures |
23:39:28 | dom96 | Reviewed |
23:40:05 | shashlick | file 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:23 | shashlick | by 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:21 | dom96 | we need to update the init script then IIRC |
23:43:38 | dom96 | or well, I guess people won't use it on Windows :) |
23:44:31 | shashlick | oh yeah, our init script only wants 32-bit on windows |
23:44:45 | shashlick | didn't expect to check in the init.sh changes in this PR |
23:46:45 | shashlick | how do you suggest proceeding with the windows piece - update script to look for amd64? |
23:46:59 | shashlick | or create a separate 32-bit build |
23:47:20 | dom96 | nah, I guess we're fine. I'll just make sure the next one is named properly |
23:47:42 | shashlick | well, so I rely on choosenim's init.sh on windows CI |
23:47:58 | shashlick | so if init.sh looks for i386 and the file isn't posted, it will break |
23:48:05 | FromDiscord | <mratsim> so choosenim downloads 64-bit nim on windows now? |
23:48:08 | dom96 | right, so fix it :) |
23:48:11 | * | filcuc quit (Quit: Konversation terminated!) |
23:48:24 | shashlick | not yet mratsim, on my todo |
23:48:39 | shashlick | mainly focusing on bug fixes right now |
23:48:53 | shashlick | but 64-bit default and 32-bit force flag are on the agenda |
23:52:19 | FromDiscord | <treeform> dom96, did you see my SDL typography thing? |
23:52:55 | * | tane quit (Quit: Leaving) |
23:52:59 | dom96 | yeah, will try it out later in the weekend |
23:53:04 | dom96 | will be heading to sleep soon |
23:53:15 | dom96 | It's very extensive, thank you :) |
23:53:16 | FromDiscord | <treeform> dom96, I also had a question about openSSL |
23:53:47 | FromDiscord | <treeform> you have a `where false: 33% of the code` |
23:53:55 | FromDiscord | <treeform> do you know why it happened? |
23:54:17 | dom96 | huh? |
23:54:50 | FromDiscord | <treeform> https://github.com/nim-lang/Nim/blob/devel/lib/wrappers/openssl.nim#L538 |
23:55:04 | FromDiscord | <treeform> sorry `when true: else: bunch of code` |
23:55:27 | FromDiscord | <treeform> I traced this back to the original commit by you 9 years ago 🙂 |
23:55:57 | dom96 | I probably used c2nim and then couldn't be bothered to fix those lines |
23:56:36 | FromDiscord | <treeform> dom96, can I 1) remove the unused code and 2) expose some more functions I need? |
23:57:00 | dom96 | sure |
23:57:17 | FromDiscord | <treeform> I want to expose these guys: https://github.com/treeform/jwt/blob/master/src/jwt/crypto.nim#L10-L36 |
23:57:43 | dom96 | oh, you've got your own jwt implementation? |
23:57:45 | FromDiscord | <treeform> HMAC and RSA and friends |
23:57:49 | dom96 | I've been using yglukhov's |
23:57:59 | dom96 | oh, it's a fork |
23:58:12 | FromDiscord | <treeform> Mine is based on this but we have diverged by more then 70% at this point |
23:58:18 | dom96 | why the fork? |
23:59:10 | FromDiscord | <treeform> there was a bug, I though the API was confusing, I though he stopped maintaining it. |
23:59:27 | FromDiscord | <treeform> he recently switched to bearSSL which is cool too. |
23:59:44 | FromDiscord | <treeform> It it like x10 the size now. While I cut his number of lines to like 150 lines. |