00:01:19 | disruptek | we have that data at compile-time, why can't we stash it any way we want then? it's not like it's changing at runtime. |
00:03:22 | * | azed quit (Read error: Connection reset by peer) |
00:10:57 | * | Hideki joined #nim |
00:11:20 | * | Hideki is now known as Guest91994 |
00:15:18 | * | Guest91994 quit (Ping timeout: 260 seconds) |
00:38:36 | FromDiscord | <Clyybber> disruptek: Ugh, turns out optimus/nvidia prime doesn't work with wayland ๐ฆ |
00:47:24 | shashlick | disruptek: not about wanting, it's just about what the compiler can do today and leveraging that vs. writing some new code |
00:47:52 | disruptek | fair enough. |
00:48:02 | disruptek | remind me what optimus/nvidia prime is. |
00:48:25 | FromDiscord | <Clyybber> its when you have an nvidia card and an intel integraded gpu |
00:48:34 | disruptek | oh right. |
00:48:46 | FromDiscord | <Clyybber> and nvidia in general doesn't work in wayland, or at least wlroots |
00:48:58 | disruptek | so what's the problem? are your balls getting steamy? |
00:49:29 | * | endragor joined #nim |
00:49:40 | FromDiscord | <Clyybber> cant launch shit on the nvidia gpu |
00:50:05 | disruptek | but you were running wayfire earlier... |
00:50:13 | disruptek | only on intel? |
00:50:13 | FromDiscord | <Clyybber> yeah |
00:50:20 | FromDiscord | <Clyybber> apparently |
00:50:34 | disruptek | why aren't you running nouveau? you get better performance AND sweaty balls. |
00:50:40 | * | leorize quit (Quit: WeeChat 2.6) |
00:50:41 | disruptek | it's, like, the best of both worlds. |
00:50:41 | FromDiscord | <Clyybber> "better" |
00:51:01 | FromDiscord | <Clyybber> I don't think they support my gpu, but I was about to try it a few days ago |
00:51:07 | disruptek | which gpu? |
00:51:12 | FromDiscord | <Clyybber> But afaik it doesn't support vulkan |
00:51:15 | shashlick | disruptek: any other crucial nimterop items? |
00:51:15 | * | endragor quit (Read error: Connection reset by peer) |
00:51:21 | FromDiscord | <Clyybber> disruptek: GTX 850M |
00:51:24 | shashlick | disruptek: i'm slacking off on the hard issues |
00:51:24 | disruptek | shashlick: no, it's dynamite. |
00:51:26 | FromDiscord | <mfiano> Hello, can anyone help? I'm following a tutorial and `add_item` on a seq is not defined. |
00:51:34 | disruptek | try `add`. |
00:51:49 | * | endragor joined #nim |
00:52:03 | disruptek | 850M sounds like something that should be supported. |
00:52:06 | FromDiscord | <mfiano> type mismatch |
00:52:14 | disruptek | but, maybe not with vulkan. why is that important? |
00:52:23 | disruptek | aside from the obvious wrt your vulkan lib work. |
00:52:40 | FromDiscord | <Clyybber> aside from that: not much |
00:52:43 | disruptek | mfiano: use a horse of a different color. |
00:52:55 | disruptek | s/horse/seq/ s/color/type/ |
00:52:57 | FromDiscord | <Clyybber> but nouveau is also pretty dead afaict |
00:53:11 | disruptek | Works For Me โข |
00:53:15 | FromDiscord | <mfiano> Well I'm just trying to follow a tutorial riught now. I don't know what is available yet |
00:53:19 | FromDiscord | <mfiano> Well I'm just trying to follow a tutorial right now. I don't know what is available yet |
00:53:50 | * | Hideki joined #nim |
00:53:57 | disruptek | i do hate nvidia but, yeah, it's what i have atm. |
00:54:14 | * | Hideki is now known as Guest3940 |
00:54:21 | disruptek | cuda etc. |
00:55:08 | FromDiscord | <Clyybber> you can have cuda on amd |
00:55:09 | FromDiscord | <Clyybber> too |
00:55:17 | FromDiscord | <mfiano> `add_item` is being called at the end here: https://xmonader.github.io/nimdays/day01_dmidecode.html |
00:55:20 | FromDiscord | <Clyybber> brb gonna try nouveau |
00:56:43 | * | tane quit (Quit: Leaving) |
00:58:11 | FromDiscord | <Clyybber> nevermind, actually can't give up vulkan support |
00:59:22 | disruptek | they say once star trek gets its hooks in you, you just can't escape. |
01:03:43 | * | Guest3940 quit (Remote host closed the connection) |
01:05:26 | FromDiscord | <Clyybber> https://www.phoronix.com/scan.php?page=news_item&px=NVIDIA-Open-Source-GTC-20 |
01:05:34 | * | Hideki joined #nim |
01:05:58 | * | Hideki is now known as Guest1583 |
01:09:59 | * | Guest1583 quit (Ping timeout: 258 seconds) |
01:11:14 | * | endragor quit (Remote host closed the connection) |
01:30:49 | * | endragor joined #nim |
01:31:50 | FromDiscord | <slymilano> I have a type with a DateTime field, and it's failing to compile. I read you need to create a default value using a constructor, but I'm not sure how to do that. How do I set a constructor for my custom type? |
01:32:02 | FromDiscord | <slymilano> ``` |
01:32:02 | FromDiscord | <slymilano> import times |
01:32:02 | FromDiscord | <slymilano> |
01:32:03 | FromDiscord | <slymilano> type |
01:32:03 | FromDiscord | <slymilano> Torrent* = object |
01:32:03 | FromDiscord | <slymilano> name*: string |
01:32:03 | FromDiscord | <slymilano> uploaded_at*: DateTime |
01:32:05 | FromDiscord | <slymilano> ``` |
01:32:29 | disruptek | proc newTorrent(): Torrent = result = Torrent(uploaded_at: now()) |
01:32:43 | * | sealmove joined #nim |
01:34:08 | FromDiscord | <slymilano> Ah so newTorrent is like a reserved function for constructor |
01:34:08 | FromDiscord | <slymilano> I see |
01:34:09 | FromDiscord | <slymilano> thx |
01:34:24 | disruptek | it's just convention. |
01:35:17 | * | endragor quit (Ping timeout: 258 seconds) |
01:36:27 | FromDiscord | <slymilano> hm.. .I'm still getting that compilation error. https://pastebin.com/YZstN6Tp |
01:36:55 | FromDiscord | <slymilano> Here's how I'm calling my type: https://pastebin.com/vAnNsvFW |
01:37:29 | disruptek | https://play.nim-lang.org/#ix=25iY works fine here. |
01:38:27 | FromDiscord | <slymilano> Am I initializing wrong then? `var torrent: Torrent = Torrent()` |
01:38:37 | disruptek | yes. |
01:38:51 | disruptek | var torrent = newTorrent() |
01:39:13 | disruptek | ie. the field needs to be initialized when it is instantiated. |
01:39:19 | disruptek | some fields are grumpy like that. |
01:39:22 | disruptek | fickle beasts. |
01:39:49 | FromDiscord | <slymilano> Nice |
01:39:56 | FromDiscord | <slymilano> So it's not auto-called. I need to literally call newFoobar |
01:39:57 | FromDiscord | <slymilano> gotcha |
01:39:58 | FromDiscord | <slymilano> thank you! |
01:40:17 | disruptek | i mean, you can just Torrent(uploaded_at: whatever...) instead. |
01:40:32 | disruptek | it's just a nim convention that initializers are named thusly. |
02:02:54 | * | dddddd quit (Remote host closed the connection) |
02:14:45 | * | rockcavera quit (Remote host closed the connection) |
02:18:22 | * | jonafato quit (Ping timeout: 265 seconds) |
02:20:42 | * | rockcavera joined #nim |
02:22:08 | FromGitter | <deech> Why are `IndexError`'s uncatchable? https://nim-lang.org/docs/system.html#IndexError |
02:22:19 | disruptek | because they are defects. |
02:24:16 | FromGitter | <deech> Yes I see that but why? I can see reasons to catch them ... as an example a quick-and-dirty find in a collection with a default: โ โ ``` try: โ collection.filterIt(...)[0] โ except: โ defaultValue``` [https://gitter.im/nim-lang/Nim?at=5e0176d08897197969e9e8ce] |
02:24:41 | disruptek | but doesn't it make more sense to implement that as hasKey()? |
02:25:02 | FromGitter | <deech> `hasKey` works on `seq`'s? |
02:25:03 | disruptek | attempting to access an index that doesn't exist seems like an error to me. |
02:25:24 | disruptek | no, but you know what i mean. |
02:25:36 | disruptek | you have .low. it tells you what the lowest index is. |
02:31:14 | sealmove | it makes more sense to ensure there won't be index out of bound, that to allow it happen and then catch it |
02:31:28 | disruptek | clearly. |
02:31:39 | disruptek | oh, i wrote low. i meant high. |
02:32:01 | disruptek | low will be 0 (usually) but high will be -1 when the seq is empty. |
02:32:12 | sealmove | well, low helps too with that, but yeah, it's rarely not 0 |
02:33:08 | disruptek | enums are frequently nonzero for .low, but yeah. most people start with zero seqs and go from there as they mature. |
02:33:16 | disruptek | i mean, grow. |
02:35:17 | disruptek | sealmove has suffered with this more than anyone, most likely. |
02:35:51 | sealmove | mm? |
02:36:04 | sealmove | what makes you say so? |
02:36:13 | disruptek | didn't you have 132 tests yielding index errors? |
02:38:16 | sealmove | they yield various kinds of errors. i use the official kaitai struct tests which are written in a special syntax which is easily transpilable to almost any language. so i made the transpiler and have 132 tests while my project is still in early development. |
02:38:43 | sealmove | i need to re-write it from scratch btw |
02:38:50 | disruptek | you're kidding. |
02:38:59 | sealmove | going to use new npeg feature to seperate lexing and parsing phase |
02:38:59 | disruptek | the tests? or the whole thing? |
02:39:05 | sealmove | the whole thing |
02:48:56 | FromDiscord | <slymilano> How can I tell my function to not return anything? `proc foobar*(): discard =` errors out... |
02:49:57 | disruptek | remove the : and the discard |
02:50:02 | disruptek | foo() = discard |
02:50:31 | disruptek | ie. no type following the proc arguments definition. |
02:50:38 | FromDiscord | <slymilano> ty ๐ |
02:53:10 | * | couven92 quit (Ping timeout: 265 seconds) |
03:02:42 | FromDiscord | <slymilano> According to the docs this should work: `echo &"[database] Saving torrent: {torrent.canonical_url}"` but I'm getting an error: `Error: type mismatch: got <string>` |
03:02:56 | FromDiscord | <slymilano> `canonical_url` is a string in my `Torrent` type ๐ค |
03:02:58 | * | endragor joined #nim |
03:03:30 | * | endragor_ joined #nim |
03:03:37 | disruptek | you imported `strformat`? |
03:05:19 | FromDiscord | <slymilano> that was it, the compiler error wasn't helpful |
03:05:21 | FromDiscord | <slymilano> thanks! |
03:07:23 | * | endragor quit (Ping timeout: 260 seconds) |
03:15:16 | * | muffindrake quit (Ping timeout: 248 seconds) |
03:17:24 | * | muffindrake joined #nim |
03:21:45 | skrylar[m] | isn't & the concatenation operator by default? |
03:26:40 | FromDiscord | <mfiano> How does Nim solve "the expression problem"? |
03:28:01 | sealmove | what's the expression problem? |
03:29:36 | Tanger | https://en.wikipedia.org/wiki/Expression_problem |
03:32:29 | FromDiscord | <slymilano> I think I found a bug with the xmltree parser? https://pastebin.com/ZNfXEh72 |
03:35:15 | FromDiscord | <mfiano> Given a type, and a set of methods on that type, is it easy to add both more fields, and more methods? Unlike Java for example, which requires you to rewrite everything for the interface when adding a new method. |
03:35:26 | FromDiscord | <mfiano> How does Nim work around that? |
03:37:26 | skrylar[m] | fields take priority over methods in dot notation IIRC since you can always flip it around and use method(items) instead of items.method |
03:48:25 | FromDiscord | <slymilano> Hm.. .stuck with this cdata not parsing ๐ฆ |
03:58:31 | sealmove | mfiano: Nim doesn't have methods in this sense |
03:59:13 | sealmove | you have normal procedures which take your object as first argument |
04:00:03 | sealmove | and thanks to ufcs you can write myObj.myProc() as if it was a method |
04:07:22 | Tanger | Generics also help with that, I think. You can cover most cases with generic functions and then cover in the edge cases |
04:31:47 | Tanger | slymilano What's your inputs for that error? |
04:33:33 | FromDiscord | <slymilano> I have more details here: https://forum.nim-lang.org/t/4106 |
04:33:47 | FromDiscord | <slymilano> (not for the CDATA error, I moved on to something else to keep momentum going) |
04:41:08 | * | chemist69 quit (Ping timeout: 248 seconds) |
04:41:50 | FromDiscord | <slymilano> Well I put in my three hours tonight, I'm going to bed - hopefully you guys know what's up with my code there in the forums, I'm probably making a mistake somewhere ๐ฆ have a good night everyone |
04:41:59 | * | chemist69 joined #nim |
04:51:32 | * | chemist69 quit (Ping timeout: 260 seconds) |
04:53:13 | * | chemist69 joined #nim |
04:59:32 | Tanger | slymilano: I think you may be calling .text on the wrong element. Check out these examples, which compile against 1.04 https://pastebin.com/vUfh6wpE |
04:59:39 | Tanger | (This is for your cData issue) |
05:00:53 | Tanger | When you're calling .child in your example, you're getting the XmlNode element that is <torrent:magnetURI>, but the cData is an inner element |
05:02:21 | Tanger | Maybe try asserting that the element you're calling .text on is actually an xnCData type (just echo node.kind to see what kind of element it is) |
06:08:59 | * | nsf joined #nim |
06:31:33 | FromDiscord | <slymilano> Ah sonofabitch so c.items[0].text! |
06:31:54 | FromDiscord | <slymilano> Damn, I'll get better and scoping out these types in the docs. Appreciate your help! I will try it out tomorrow |
06:38:21 | * | gour joined #nim |
06:38:23 | * | mwbrown quit (Ping timeout: 250 seconds) |
06:39:45 | * | rockcavera quit (Remote host closed the connection) |
06:40:47 | * | mwbrown joined #nim |
06:53:58 | * | gmpreussner quit (Quit: kthxbye) |
06:54:17 | * | gmpreussner joined #nim |
07:03:03 | yumaikas | https://www.junglecoder.com/blog/tabulaScriptaFirstThoughts |
07:03:12 | yumaikas | Something that I'm building in Nim |
07:14:47 | * | Kaynato quit (Quit: Leaving) |
07:31:50 | * | solitudesf joined #nim |
07:32:16 | * | gangstacat quit (Quit: ฤis!) |
07:33:31 | * | gangstacat joined #nim |
07:41:16 | * | sealmove quit (Quit: WeeChat 2.6) |
07:47:41 | * | silvernode joined #nim |
07:59:36 | * | silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
08:00:00 | * | gmpreussner quit (Quit: kthxbye) |
08:05:03 | * | gmpreussner joined #nim |
08:13:44 | * | Vladar joined #nim |
08:30:07 | FromDiscord | <Milerius> Hey the logging module seem's unstable on windows when using thread. |
08:31:11 | FromDiscord | <Milerius> Always failing an assertion that a sequence size changed while iterating, but i did nothing just calling the log stuff |
08:31:42 | FromDiscord | <Milerius> it's fails here: `assert(len(a) == L, "the length of the seq changed while iterating over it")` |
08:35:36 | FromDiscord | <Milerius> When using echo everything is going well |
08:37:29 | FromDiscord | <Milerius> I'm forced to use it like: |
08:37:31 | FromDiscord | <Milerius> https://gist.github.com/Milerius/85166cfaeceff11302f12aee39604d1d |
08:37:55 | FromDiscord | <Milerius> i don't know if this is normal @araq ? |
08:43:38 | lqdev[m] | I don't know if that'd help, but maybe try using a lock? |
08:44:44 | lqdev[m] | @mratsim is the one that knows the most about multithreading here |
08:45:44 | FromDiscord | <funcmike> Its sad 5 years without this fixed: https://github.com/nim-lang/Nim/issues/1837 |
08:45:46 | disbot | โฅ mysql wrapper doesn't support row with NULL column. ; snippet at 12https://play.nim-lang.org/#ix=25kg |
08:48:30 | Zevv | sealmove: you here? |
09:11:29 | FromDiscord | <kelly> isn't there too many open bugs |
09:12:17 | FromDiscord | <mratsim> @mfiano, Nim doesn't really have an expression problem because you don't have interfaces so no constraints. |
09:12:17 | FromDiscord | <mratsim> |
09:12:18 | FromDiscord | <mratsim> However if we ever had those, you can metaprogrammed you way out, in this repo: https://github.com/mratsim/compute-graph-optim/blob/master/arraymancer_discussion_347.md#semantic-pass-and-the-extension-problem I have implemented the following techniques that solves the expression problem: object algebras, Tagless Final. |
09:12:18 | FromDiscord | <mratsim> |
09:12:22 | FromDiscord | <mratsim> In the end, for my own DSL compiler where this is a problem, I choose to combine shallow and deep embeddings. I.e. fixed ADT for the deep embeddings and the extensibility is provided by shallow embedding (function) which are translated to the deep embedding. |
09:13:20 | * | Vladar quit (Quit: Leaving) |
09:13:28 | FromDiscord | <mratsim> and at the root of the repo you can see my multiple experimentations: https://github.com/mratsim/compute-graph-optim |
09:16:18 | FromDiscord | <mratsim> @Milerius this is my threadsafe logging module ๐ https://github.com/mratsim/weave/blob/master/weave/instrumentation/loggers.nim#L12-L14 |
09:17:08 | FromDiscord | <mratsim> @kelly I think it's OK. A programming language is a complicated piece of software |
09:17:43 | FromDiscord | <mratsim> also unlike many other popular project, we can't just have a bot that closes issue that had no updates for 90 days ๐ |
09:24:24 | Zevv | we should! |
09:25:14 | FromDiscord | <mratsim> I get a cloudflare error on the playground |
09:34:25 | federico3 | I updated the RFC aroung the logging tree https://github.com/nim-lang/RFCs/issues/146 |
09:34:25 | disbot | โฅ logging tree support |
09:49:00 | * | Tongir joined #nim |
09:57:19 | * | nsf quit (Quit: WeeChat 2.6) |
10:12:55 | * | couven92 joined #nim |
10:14:02 | * | zyklon joined #nim |
10:15:51 | * | uvegbot quit (Ping timeout: 258 seconds) |
10:25:31 | * | zyklon quit (Quit: Konversation terminated!) |
10:25:48 | * | zyklon joined #nim |
10:37:32 | * | Trustable joined #nim |
11:07:26 | * | couven92 quit (Ping timeout: 268 seconds) |
11:18:02 | * | nsf joined #nim |
11:19:12 | FromDiscord | <Milerius> There is a problem with the current logging module for me, for example let's say you need to log into a function that have been spawned through spawn from threadpool, you will need to set the handlers inside the function because handlers are thread local etc. But on windows it's leads somehow to crash after 4-5 minutes of an application launched with different various bug (assertion in a sequence that change len) (non destroying of the log |
11:19:35 | FromDiscord | <Milerius> In my case i would like to use just echo, but i need to keep a track of all the logs into a file + rotating |
11:19:53 | FromDiscord | <Milerius> The logging module was perfect for that, but i'm unable to get it working correctly on windows + llvm 9.0 |
11:20:44 | FromDiscord | <Milerius> basically the workflow will look like: spawn -> initHandler (for the current task) -> log -> task end -> handler is destroyed ? |
11:22:19 | FromDiscord | <Milerius> One of my favorite logging library is this one: https://github.com/emilk/loguru . Ofc i can import it in nim and use it, but for me one of the good specs of this logging is that you just need to set the thread name into the current thread and then you can immediatly log the same way from all the thread/main thread |
11:23:55 | FromDiscord | <Milerius> After, on OSX, and Linux I have no problem with the logging module, but on Windows without going through mingw it is really very unstable. I really think that as nim released its first stable version we should have a logger that works everywhere without crashing. |
11:26:29 | FromDiscord | <mratsim> So it's MSVC only? |
11:40:20 | FromDiscord | <Milerius> llvm-clang |
11:40:24 | FromDiscord | <Milerius> + msvc |
11:40:34 | FromDiscord | <Milerius> all compiler that follow windows convention |
11:45:33 | * | tane joined #nim |
11:46:17 | * | uu91 joined #nim |
11:49:45 | federico3 | did you open an issue? |
11:52:09 | FromDiscord | <Milerius> not yet, still investigating on my computer |
11:52:27 | FromDiscord | <Milerius> May i ask if the unit tests of the whole default library use MSVC or clang ? |
11:52:29 | FromDiscord | <Milerius> on windows ? |
11:52:40 | FromDiscord | <Milerius> where can i check that ? |
11:53:56 | FromDiscord | <mratsim> in appveyor.yml and azure-pipelines.yml |
11:54:12 | FromDiscord | <mratsim> Otherwise for logging try: https://github.com/status-im/nim-chronicles/ |
11:54:52 | FromDiscord | <Milerius> ouch it's not tested |
11:55:03 | FromDiscord | <Milerius> it's tested only with gcc |
11:55:42 | FromDiscord | <Milerius> https://github.com/nim-lang/Nim/blob/devel/azure-pipelines.yml#L100 |
11:57:14 | FromDiscord | <Milerius> and also here: https://github.com/nim-lang/Nim/blob/devel/azure-pipelines.yml#L137 |
12:05:57 | FromDiscord | <Milerius> I understand now |
12:06:10 | FromDiscord | <Milerius> @mratsim You are using mingw on windows ? |
12:08:34 | * | Vladar joined #nim |
12:12:54 | FromDiscord | <mratsim> yes |
12:13:46 | FromDiscord | <mratsim> I did try running my multithreading runtime on with MSVC this weekend |
12:14:05 | FromDiscord | <mratsim> but I don't remember if it worked, because I tried running third-party code that for sure didn't work |
12:14:50 | FromDiscord | <mratsim> I yes I remember now, have to open an issue, MSVC fences are different than GCC, API-incompatible |
12:15:16 | FromDiscord | <Milerius> Yeah |
12:15:20 | FromDiscord | <Milerius> especially for calling convention |
12:15:23 | FromDiscord | <Milerius> we will be in big trouble |
12:15:43 | FromDiscord | <Milerius> I can help setup a github actions if you want @mratsim ? |
12:15:51 | FromDiscord | <Milerius> for the nim lang repo |
12:16:07 | FromDiscord | <Milerius> (i'm really good with github actions i don't know other CI stuff) |
12:16:51 | FromDiscord | <Milerius> Basically the workflow is: |
12:16:51 | FromDiscord | <Milerius> |
12:16:52 | FromDiscord | <Milerius> - Download clang for windows or use MSVC |
12:16:52 | FromDiscord | <Milerius> - Preparing with Koch |
12:16:52 | FromDiscord | <Milerius> - Running tests |
12:16:52 | FromDiscord | <Milerius> |
12:16:52 | FromDiscord | <Milerius> We agree ? |
12:17:22 | FromDiscord | <mratsim> Clang is done through appveyor and azure pipelines so only MSVC is needed |
12:17:31 | FromDiscord | <Milerius> clang on windows is really different |
12:17:41 | FromDiscord | <Milerius> Clang from mingw != clang from windows |
12:17:53 | FromDiscord | <Milerius> you probably want to try with the real LLVM clang windows from scoop |
12:18:22 | FromDiscord | <Milerius> https://github.com/rivy/scoop.bucket.scoop-main/blob/master/llvm.json |
12:19:05 | FromDiscord | <mratsim> ah I see |
12:19:16 | FromDiscord | <Milerius> Basically on windows is just: |
12:19:16 | FromDiscord | <Milerius> |
12:19:16 | FromDiscord | <Milerius> ```powershell |
12:19:17 | FromDiscord | <Milerius> iex (new-object net.webclient).downloadstring('https://get.scoop.sh') |
12:19:17 | FromDiscord | <Milerius> scoop install ninja llvm --global |
12:19:17 | FromDiscord | <Milerius> if ("${{ matrix.compiler }}" -eq "clang") { |
12:19:19 | FromDiscord | <Milerius> echo "::set-env name=CC::clang" |
12:19:21 | FromDiscord | <Milerius> echo "::set-env name=CXX::clang++" |
12:19:22 | FromDiscord | <Milerius> } else { |
12:19:24 | FromDiscord | <Milerius> echo "::set-env name=CC::${{ matrix.compiler }}" |
12:19:26 | FromDiscord | <Milerius> echo "::set-env name=CXX::${{ matrix.compiler }}" |
12:19:27 | FromDiscord | <Milerius> } |
12:19:29 | FromDiscord | <Milerius> & .github\workflows\vsenv.bat -arch=x64 -host_arch=x64 |
12:19:29 | FromDiscord | <Milerius> ``` |
12:19:31 | FromDiscord | <Milerius> little powershell script that do the job. |
12:19:40 | * | rockcavera joined #nim |
12:19:55 | FromDiscord | <mratsim> I can't followup on this before the weekend, but open a PR |
12:19:57 | * | tane quit (Quit: Leaving) |
12:20:10 | FromDiscord | <Rika> how can i trigger the compiler within nim? |
12:20:18 | FromDiscord | <Milerius> nim.cfg @Rika ? |
12:20:22 | FromDiscord | <Milerius> You mean change the compiler ? |
12:20:25 | FromDiscord | <Rika> no |
12:20:30 | FromDiscord | <Rika> compile a file within nim |
12:20:42 | FromDiscord | <Milerius> nim c / nim cpp file ? |
12:20:42 | FromDiscord | <Rika> i run a nim program which compiles a nim file |
12:20:47 | FromDiscord | <Milerius> Ah |
12:20:58 | FromDiscord | <Milerius> Just use exec |
12:21:01 | FromDiscord | <Milerius> + nim c / nim cpp ? |
12:21:16 | FromDiscord | <Rika> i guess that's one way, i was wondering if there were others |
12:21:26 | FromDiscord | <Milerius> I mean it's not a bad way to do that. |
12:21:35 | FromDiscord | <Rika> exec is only within nims files though |
12:21:41 | FromDiscord | <Rika> im doing it within a nim file |
12:22:07 | FromDiscord | <Milerius> If you want to compile a whole project you can probably call nimble too from a single exec |
12:22:30 | FromDiscord | <Rika> no no |
12:22:44 | FromDiscord | <Rika> im doing some logic then compiling a file depending on logic |
12:22:58 | FromDiscord | <Rika> execProcess seems like the only way...? |
12:23:01 | FromDiscord | <Rika> that's fine |
12:23:06 | FromDiscord | <Rika> it's good enough |
12:23:08 | FromDiscord | <Milerius> you have a short cmd |
12:23:10 | FromDiscord | <Milerius> like |
12:23:12 | FromDiscord | <Milerius> execCmd(= |
12:23:13 | FromDiscord | <Milerius> execCmd() |
12:23:16 | FromDiscord | <Milerius> smth like that |
12:24:11 | FromDiscord | <Rika> that's what im looking for it seems |
12:31:01 | FromDiscord | <Milerius> https://nim-lang.org/docs/osproc.html#execCmd%2Cstring @Rika |
12:31:11 | FromDiscord | <Rika> i found it |
12:31:12 | FromDiscord | <Rika> i know |
12:31:28 | FromDiscord | <Rika> i was at the page when i mentioned `that's what im looking for it seems` |
12:34:28 | * | nsf quit (Quit: WeeChat 2.6) |
12:41:34 | * | MarderIII joined #nim |
12:45:47 | * | MarderIII quit (Client Quit) |
12:46:04 | * | gour quit (Remote host closed the connection) |
12:46:41 | * | MarderIII joined #nim |
12:46:50 | * | gour joined #nim |
12:48:41 | * | gour quit (Remote host closed the connection) |
12:51:46 | Tongir | Hey, is krux02 on irc? The ast pattern matching library that he developed is unbelievably amazing. |
12:53:10 | Tongir | I just wanted to thank him, it makes macro creation a cinch |
12:54:13 | * | silvernode joined #nim |
12:56:30 | silvernode | So python and bash have spoiled me and now it's causing me problems in Nim. Basically I'd like to call a function within another function that has an if block. Clearly this is way out of scope but I don't know the Nim way to work around this. |
12:57:24 | silvernode | In bash I could just call any function from anywhere at any time which is probably not a good thing for multiple reasons. |
12:57:38 | Tongir | silvernode, Can you pastebin me an example of the kind of call you're trying to make? |
12:58:09 | silvernode | @Tongir, sure give me a minute and I'll get that to you |
13:05:08 | * | russellb joined #nim |
13:05:41 | * | russellb left #nim (#nim) |
13:06:36 | silvernode | Tongir: https://pastebin.com/HfmNCFB9 |
13:19:51 | * | gour joined #nim |
13:27:50 | * | endragor_ quit (Remote host closed the connection) |
13:28:58 | * | MarderIII quit (Quit: Leaving) |
13:36:31 | silvernode | Have a good night everyone |
13:36:35 | * | silvernode quit (Quit: https://quassel-irc.org - Chat comfortably. Anywhere.) |
13:38:58 | FromDiscord | <Rika> silvernode, what's the issue? |
13:41:57 | FromDiscord | <Rika> oh rip, i think i missed him |
13:45:56 | FromGitter | <zacharycarter> PBR materials in - |
13:45:59 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/3xhh/image.png) |
13:46:20 | FromGitter | <zacharycarter> now I just need to combine this with the rendering code I had before and hopefully I have some kickass looking maps |
13:46:29 | * | luis_ joined #nim |
13:48:18 | * | luis_ quit (Client Quit) |
13:49:15 | * | luis_ joined #nim |
13:52:30 | * | luis_ quit (Client Quit) |
13:53:26 | * | luis_ joined #nim |
14:06:37 | * | disruptek quit (Ping timeout: 258 seconds) |
14:06:53 | * | disbot quit (Ping timeout: 268 seconds) |
14:07:21 | * | luis_ quit (Quit: luis_) |
14:10:07 | * | disbot joined #nim |
14:10:37 | * | disruptek joined #nim |
14:13:57 | * | Trustable quit (Remote host closed the connection) |
14:20:26 | * | dddddd joined #nim |
14:27:31 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/Al3s/image.png) |
14:27:48 | FromGitter | <zacharycarter> added back in procedural stochastic texturing and triplanar mapping |
14:32:55 | * | uvegbot joined #nim |
14:33:40 | * | zyklon quit (Ping timeout: 248 seconds) |
14:34:29 | * | uvegbot quit (Client Quit) |
14:34:48 | * | uvegbot joined #nim |
14:42:30 | FromDiscord | <mfiano> Is it safe to turn runtime bounds checking off? |
14:47:10 | FromGitter | <zacharycarter> as long as you don't access invalid memory |
14:55:54 | * | luis_ joined #nim |
15:00:08 | * | luis_ quit (Client Quit) |
15:00:44 | * | luis_ joined #nim |
15:05:19 | * | ng0_ joined #nim |
15:05:59 | * | ng0 quit (Disconnected by services) |
15:06:14 | * | ng0_ quit (Client Quit) |
15:06:30 | * | ng0 joined #nim |
15:06:30 | * | ng0 quit (Changing host) |
15:06:30 | * | ng0 joined #nim |
15:08:46 | * | endragor joined #nim |
15:28:30 | * | luis_ quit (Quit: luis_) |
15:31:32 | * | fanta1 joined #nim |
15:45:30 | * | luis_ joined #nim |
15:50:48 | * | luis_ quit (Quit: luis_) |
15:51:28 | * | luis_ joined #nim |
15:55:24 | * | luis_ quit (Client Quit) |
15:55:51 | * | luis_ joined #nim |
16:04:15 | FromGitter | <zacharycarter> okay - this looks much better |
16:04:29 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/B7Vf/image.png) |
16:05:57 | * | endragor quit (Remote host closed the connection) |
16:30:42 | FromDiscord | <slymilano> Good morning fellas |
16:30:50 | FromDiscord | <slymilano> Merry Christmas!!! |
16:33:58 | FromDiscord | <slymilano> Anyone Have any thoughts on this? |
16:34:01 | FromDiscord | <slymilano> https://forum.nim-lang.org/t/4106 |
16:34:11 | * | dwdv joined #nim |
16:45:19 | Zevv | you're free to implement any `%` converters as suit you |
16:45:38 | Zevv | There is no standard way to format a date/time in json, so the only one who knows how to do this for you is you |
17:11:47 | * | smitop joined #nim |
17:12:37 | skrylar[m] | rfc3339 is pretty common tho. |
17:15:48 | * | luis_ quit (Quit: luis_) |
17:27:52 | * | luis_ joined #nim |
17:30:07 | * | casaca joined #nim |
17:31:21 | * | chemist69 quit (Ping timeout: 252 seconds) |
17:32:27 | * | chemist69 joined #nim |
17:37:57 | Zevv | true, but not standard |
17:38:17 | Zevv | json does not describe this |
17:46:25 | * | luis_ quit (Quit: luis_) |
17:50:01 | * | luis_ joined #nim |
17:51:21 | * | luis_ quit (Client Quit) |
17:52:25 | * | luis_ joined #nim |
17:53:30 | FromDiscord | <Rika> someone reply to sergio in that post that he can implement it himself xd dont wanna make an account to just use it once |
17:56:47 | * | NimBot joined #nim |
18:02:34 | skrylar[m] | the forum doesn't seem to honor password resets |
18:03:38 | skrylar[m] | i reset it twice and it says i can now log in, but then says the new password is invalid. |
18:03:39 | FromDiscord | <snluu> most popular json serializers just use ISO 8601 for date in json? |
18:04:29 | skrylar[m] | @dom96 fix your code >:C |
18:06:50 | skrylar[m] | https://stackoverflow.com/questions/522251/whats-the-difference-between-iso-8601-and-rfc-3339-date-formats hmm |
18:07:38 | skrylar[m] | someone did once ask for a converter between rfc and nim date objects |
18:09:42 | * | luis__ joined #nim |
18:10:02 | * | luis_ quit (Ping timeout: 240 seconds) |
18:11:43 | * | luis__ quit (Client Quit) |
18:12:30 | * | luis__ joined #nim |
18:21:25 | FromDiscord | <Milerius> how we copy a file at compile time in nim? |
18:21:29 | * | luis__ quit (Quit: luis__) |
18:22:47 | * | nsf joined #nim |
18:24:49 | shashlick | You can readFile and writeFile |
18:25:27 | shashlick | But here's what I do - https://github.com/nimterop/nimterop/blob/master/nimterop/build.nim#L133 |
18:29:50 | skrylar[m] | this is really more a job for your build scripts... |
18:44:08 | FromDiscord | <slymilano> Is this really the best way to avoid collisions of same function names in different Nim files? https://pastebin.com/mZU6f0AC - https://narimiran.github.io/2019/07/01/nim-import.html says that `from foobar import nil` is an anti-pattern in Nim but honestly it feels like best option as it's extremely explicit about what file the function youre calling is coming from. |
18:48:27 | * | fanta1 quit (Quit: fanta1) |
18:51:10 | shashlick | I just import normally and qualify when there's a collision |
18:51:19 | shashlick | How often does it happen anyway |
18:52:59 | FromDiscord | <slymilano> \> qualify - can you show me an example? trying to learn idiomatic Nim |
18:54:06 | solitudesf | it shows in the miran's blogpost |
18:54:15 | solitudesf | prefix symbol with module name |
18:58:42 | * | fanta1 joined #nim |
19:00:26 | * | fanta1 quit (Client Quit) |
19:17:13 | * | nsf quit (Quit: WeeChat 2.6) |
19:19:47 | FromDiscord | <exelotl> i have the problem in my game where the `player` module exposes a lot of top-level variables. So you'll be writing some enemy AI and you'll accidentally write `vel.x` instead of `self.vel.x`, and whoops you moved the player |
19:19:47 | * | natrys joined #nim |
19:24:31 | * | skrylar[m] laughs. |
19:25:49 | FromDiscord | <exelotl> one solution would be to move all the player properties into some self contained datatype, but that makes the player module itself way more annoying to read and write. Plus I feel more comfortable using loose variables on the GBA for this sort of thing where possible |
19:26:29 | FromDiscord | <exelotl> so yeah I've ended up using the `from x import nil` pattern when accessing the player from other modules |
19:27:09 | * | azed joined #nim |
19:28:31 | skrylar[m] | you can use function level templates to get around that in some cases by the way |
19:28:49 | skrylar[m] | template pvx = player.velocity.x |
19:30:18 | * | natrys quit (Ping timeout: 260 seconds) |
19:31:38 | FromDiscord | <exelotl> oh yeah that's true |
19:32:21 | FromDiscord | <exelotl> only recently discovered that when I was looking at Zevv's aoc code x) |
19:33:58 | * | Zevv gave up on that |
19:40:29 | skrylar[m] | i discovered it by "wonder if this works" because of gnarly array code |
19:40:42 | skrylar[m] | sometype.whatever[index].subobject nonsense |
19:41:03 | * | smitop quit (Quit: Connection closed for inactivity) |
19:41:39 | * | Tongir quit (Ping timeout: 258 seconds) |
19:46:15 | * | natrys joined #nim |
19:47:07 | FromGitter | <deech> Nim appears to allow trailing commas in seqs, eg, `@[1,2,3,]`, this is great! But unfortunately that seq can't be printed ( at least in the VM ), so doing `echo @[1,2,3,]` fails with: โ โ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=5e026b3b8dfce538b501bc76] |
19:56:45 | Zevv | https://play.nim-lang.org/#ix=25nS no problem? |
19:57:04 | Zevv | !eval echo @[1,2,3,] |
19:57:07 | NimBot | @[1, 2, 3] |
19:57:17 | Zevv | !eval static: echo @[1,2,3,] |
19:57:20 | NimBot | <no output> |
19:57:21 | FromDiscord | <slymilano> So someone said I'm free to implement my own `%` converters for DateTime object fields. Where can I read up on this? |
19:57:26 | FromDiscord | <slymilano> > <Zevv> you're free to implement any % converters as suit you |
20:00:12 | solitudesf | look at examples https://github.com/nim-lang/Nim/blob/version-1-0/lib/pure/json.nim#L292 |
20:01:20 | Zevv | ~proc `%`*(dt: DateTime): JsonNode = newJString $dt |
20:01:22 | FromDiscord | <slymilano> Dumb question but I just plop this anywhere? |
20:01:22 | FromDiscord | <slymilano> |
20:01:22 | FromDiscord | <slymilano> ``` |
20:01:22 | FromDiscord | <slymilano> proc `%`*(s: DateTime): JsonNode = |
20:01:22 | FromDiscord | <slymilano> result = someConverter(s) |
20:01:23 | FromDiscord | <slymilano> ``` |
20:02:10 | Zevv | just anywhere in your code base should do |
20:02:24 | Zevv | complete example: http://ix.io/25nU |
20:03:01 | FromDiscord | <slymilano> Thank you your help is priceless to me as a starter |
20:03:09 | skrylar[m] | @slymilano i assume you just write proc `%`*(...) |
20:03:16 | skrylar[m] | oh, was answered |
20:03:46 | skrylar[m] | i have a nimble package that will output and parse these for you tho :3 |
20:04:11 | skrylar[m] | https://github.com/Skrylar/rfc3339 |
20:04:49 | FromDiscord | <slymilano> Much appreciated but trying as much as humanly possible to not reach out for packages - keep things tight |
20:04:51 | * | luis__ joined #nim |
20:05:01 | FromDiscord | <slymilano> something very zen about writing Nim code |
20:05:30 | luis__ | Hey everyone is there a web scraper for nim, which I can use to get latest proxies from "https://thepiratebay-proxylist.org/"? |
20:05:47 | luis__ | similar to find_url_list() from pythons beautifulsoup? |
20:06:10 | skrylar[m] | i think we have an xml parser |
20:06:32 | FromDiscord | <slymilano> Yeah check my example here Luis |
20:06:51 | FromDiscord | <slymilano> https://github.com/sergiotapia/torrentinim/blob/master/src/crawlers/leetx.nim |
20:07:01 | luis__ | thanks! |
20:07:18 | FromDiscord | <slymilano> Specifically nimquery for the familiar css query selectors. |
20:07:21 | FromDiscord | <slymilano> !repo nimquery |
20:07:22 | disbot | https://github.com/GULPF/nimquery -- 9nimquery: 11Nim library for querying HTML using CSS-selectors (like JavaScripts document.querySelector) 15 46โญ 1๐ด 7& 1 more... |
20:15:06 | luis__ | <slymilano> pageUrls is from which module? |
20:16:32 | luis__ | oh, sorry, you define it at the beginnig... |
20:19:24 | * | chemist69 quit (Ping timeout: 246 seconds) |
20:20:41 | * | chemist69 joined #nim |
20:22:24 | Zevv | [ANN] NPeg 0.22.0 was just released; biggest change is parsing of sequences of any type. Also did a nice refactoring to get rid of nasty stuff that stalled new developments, so things are moving again. |
20:22:35 | Zevv | And merry christmas to all of #nim |
20:23:54 | FromDiscord | <slymilano> yep luis its my own thing |
20:29:53 | FromDiscord | <slymilano> It's alive my dudes! Reached a major milestone for my first Nim project ๐ |
20:29:53 | FromDiscord | <slymilano> https://cdn.discordapp.com/attachments/371759389889003532/659130644475019296/Screen_Shot_2019-12-24_at_3.29.05_PM.png |
20:35:49 | FromDiscord | <Clyybber> silvernode: You are missing a `let` |
20:37:43 | FromDiscord | <Clyybber> merry christmas |
20:39:14 | * | luis__ quit (Quit: luis__) |
20:44:02 | * | gour quit (Remote host closed the connection) |
20:51:21 | * | Vladar quit (Quit: Leaving) |
21:07:53 | muffindrake | What would the equivalent to a function pointer structure field be in nim? |
21:09:21 | * | xet7 quit (Quit: Leaving) |
21:12:22 | * | xet7 joined #nim |
21:12:58 | FromGitter | <bung87> `fieldA:proc(b:string):string` |
21:14:12 | skrylar[m] | ^ also check to make sure if you need something like {.cdecl.} in there, because you can put annotations on function field types |
21:14:14 | FromDiscord | <demotomohiro> https://nim-lang.org/docs/manual.html#types-procedural-type |
21:16:49 | muffindrake | Ah, similar to a forward declaration then. Thanks. |
21:17:58 | * | nsf joined #nim |
21:34:22 | * | luis__ joined #nim |
21:34:51 | Araq | Merry Christmas! |
21:35:01 | Araq | I was able to merge my ARC improvements |
21:35:15 | * | luis__ quit (Client Quit) |
21:35:46 | * | luis__ joined #nim |
21:39:10 | * | luis__ quit (Remote host closed the connection) |
21:40:14 | * | luis_ joined #nim |
21:41:11 | FromGitter | <alehander92> happy Christmas!! |
21:41:57 | FromGitter | <alehander92> rest bitt |
21:45:02 | FromDiscord | <treeform> Merry Christmas! |
21:50:20 | * | tyler569 quit (Quit: leaving) |
21:53:48 | * | natrys quit (Ping timeout: 260 seconds) |
21:56:10 | * | rockcavera quit (Remote host closed the connection) |
22:02:36 | FromGitter | <deech> Merry Christmas! |
22:04:23 | FromGitter | <zetashift> merry christmas y'all |
22:06:46 | * | natrys joined #nim |
22:07:27 | skrylar[m] | so it turned out the function to convert time was.. one line of code. hah |
22:08:20 | * | casaca quit (Ping timeout: 265 seconds) |
22:08:38 | FromGitter | <deech> Zevv, maybe it's just in NimScript but I can repro it in a Nimble file. |
22:09:44 | * | casaca joined #nim |
22:12:01 | * | Tyresc joined #nim |
22:19:43 | luis_ | What am I doing wrong in the exerpt: |
22:19:50 | luis_ | https://i.imgur.com/Zov4vIL.png |
22:20:05 | luis_ | It gives Error: type expected |
22:21:46 | FromDiscord | <Milerius> do we have a function to open an url in the main webbrowser of our os ? |
22:22:39 | Araq | luis_: use '=' for named arguments like in Python |
22:22:49 | luis_ | thanks |
22:22:57 | Araq | ':' is only for object constructors (yes, I know it's a bit confusing) |
22:23:14 | Araq | Milerius: browsers module in the stdlib |
22:26:02 | FromDiscord | <Milerius> Thanks Araq |
22:26:13 | FromDiscord | <Milerius> Did you read my message before about clang/msvc with nim ? |
22:26:25 | FromDiscord | <Milerius> We have probably tons of stuff broken using clang msvc on windows with stdlib. |
22:26:44 | FromDiscord | <Milerius> I absolutely need to run all the tests from the stdlib with clang or msvc to verify some stuff |
22:27:17 | FromDiscord | <Milerius> logging module crash directly on windows with threads when using a compiler that have windows function call convention (clang, msvc) |
22:28:31 | FromDiscord | <Milerius> also this is rly weird: https://gist.github.com/Milerius/f5ec59c6c35d36748e5fe4c16cfc6ede |
22:28:38 | FromDiscord | <Milerius> i suspect a wrong code generation |
22:29:01 | Araq | that's a known problem but not invalid C code |
22:29:08 | FromDiscord | <Milerius> yeah |
22:29:25 | FromDiscord | <Milerius> but we need a CI for windows compiler that are not gcc |
22:29:40 | FromDiscord | <Milerius> I spend 2 days thinking it's was my fault |
22:29:49 | FromDiscord | <Milerius> before switching to gcc and see that everything go very well. |
22:30:14 | Araq | agreed but please consider that the installers ask for a mingw for a reason |
22:31:04 | FromDiscord | <Milerius> Yeah i understand perfectly, but my personnal opinion (i really hate MSVC) but clang generate a really good assembly code nowadays |
22:31:11 | Araq | and it's expensive all these OS,CPU,C environment combinations |
22:31:18 | Araq | *to support |
22:31:18 | skrylar[m] | more specifically, MSVC. OpenWatcom is a bit of a corpse and Clang is highly compatib with GCC ;) |
22:31:47 | FromDiscord | <Milerius> also what do you think about having this by default for example: https://nuwen.net/mingw.html |
22:32:02 | FromDiscord | <Milerius> and also: https://github.com/mstorsjo/llvm-mingw someone tried it ? |
22:32:45 | FromDiscord | <Milerius> clang on windows (not mingw) follow windows call convention / MSVC rules, so sometimes is hard as MSVC |
22:33:46 | Araq | I routinely use MSVC fwiw |
22:33:47 | FromDiscord | <Milerius> I suspect a lot of function generated by nim to not respect: https://docs.microsoft.com/en-gb/cpp/build/x64-calling-convention?view=vs-2019 and being rewritten with wrong/unwanted value leading to some crash |
22:34:06 | FromDiscord | <Milerius> (or maybe it's just threading stuff problem= |
22:34:08 | FromDiscord | <Milerius> (or maybe it's just threading stuff problem) |
22:34:28 | Araq | I suspect it just works as I'm an expert on calling conventions |
22:34:31 | Araq | :P |
22:34:34 | FromDiscord | <Milerius> ๐ |
22:34:41 | FromDiscord | <Milerius> I trust you, but as i tell you |
22:34:47 | Araq | no really, I know these things quite well |
22:34:49 | FromDiscord | <Milerius> I write a real application for the company in nim |
22:34:55 | Araq | but threading is always tricky |
22:35:06 | FromDiscord | <Milerius> it's was crashing with clang on windows, switched to gcc now it's work |
22:35:17 | FromDiscord | <Milerius> But i'm sure your goal is that all nim code run everywhere every compiler |
22:35:26 | FromDiscord | <Milerius> so we should be concerned |
22:36:15 | Araq | my ultimate goal is 1. 1 CPU, 1 OS, 1 native Nim backend, 1 memory management strategy. |
22:36:26 | FromDiscord | <Milerius> gc arc ? ๐ |
22:36:53 | FromDiscord | <Milerius> where is my christmas gc arc ๐ |
22:37:18 | Araq | it's there, see https://forum.nim-lang.org/t/5734 |
22:37:31 | FromDiscord | <Milerius> ๐ฎ |
22:37:37 | FromDiscord | <Milerius> Do we have a newsletter ? |
22:37:41 | FromDiscord | <Milerius> so i don't miss stuff like that |
22:37:53 | Araq | iirc there is an RSS feed |
22:37:57 | FromGitter | <deech> Is there any way to specify build time dependencies in Nimble? For instance I want to use 'nimarchive' to unpack stuff at build time but don't need it for library code. |
22:39:10 | FromDiscord | <Milerius> Congratulation for arc araq ! |
22:40:44 | * | luis_ quit (Quit: luis_) |
22:41:38 | FromGitter | <deech> Yeah, congrats! |
22:43:02 | Araq | thanks :-) |
22:43:39 | skrylar[m] | i'm always amazed when i see rss feeds still existing |
22:43:57 | Araq | deech: "build time deps"? I don't think so, I would use regular deps |
22:49:29 | * | solitudesf quit (Ping timeout: 258 seconds) |
22:50:55 | FromDiscord | <Fern & Simula (They/Them)> i'm looking into wrapping a C single header library. one of the functions takes a `uint64_t*`. Would I just wrap that as an openarray of type int64? |
22:51:47 | Araq | if it is followed by a long int length |
22:52:12 | FromDiscord | <Fern & Simula (They/Them)> also congrats araq :) |
22:52:32 | FromDiscord | <Fern & Simula (They/Them)> it's followed by a `uint32_t` named size, which I assume is the length |
22:54:14 | Araq | too risky to map it to openarray, you are better off with ptr UncheckedArray[uint64] |
22:54:38 | FromDiscord | <Fern & Simula (They/Them)> awesome, thanks! very new to the C ffi haha |
22:56:42 | FromDiscord | <slymilano> Hey guys, how can I convert scientific notation to decimal notation in Nim? Here's how in Ruby: https://stackoverflow.com/questions/8586357/how-to-convert-a-scientific-notation-string-to-decimal-notation |
22:57:09 | * | mwbrown quit (Ping timeout: 265 seconds) |
22:57:41 | FromGitter | <zacharycarter> thoughts? |
22:57:50 | FromGitter | <zacharycarter> (https://files.gitter.im/nim-lang/Nim/LWfG/image.png) |
22:59:19 | * | mwbrown joined #nim |
23:01:29 | * | natrys quit (Quit: natrys) |
23:05:40 | Araq | too dark and too abstract |
23:06:13 | Araq | slymilano: maybe $parseFloat(x) |
23:06:56 | dom96 | ooh, that's a nice thread about arc |
23:07:01 | dom96 | thanks for writing it up Araq |
23:08:09 | FromGitter | <bung87> anyone can provide a job to me? |
23:08:18 | FromDiscord | <slymilano> doesn't seem to work: https://pastebin.com/9LrmZwyi |
23:10:30 | FromDiscord | <slymilano> I want `1.024e-12` to be a string `"0.000000000001024"` |
23:11:01 | dom96 | deech: what you are after is something we've considered and will still likely implement (there is an issue for it somewhere), for now we just have one kind of deps. Please be more clear about what you mean by "build-time" deps though, if I understand what you're after then it doesn't really apply to Nimble libraries (remember, they are only built at the very end). |
23:16:27 | FromGitter | <deech> dom96, I'm after being able to having an executable available in a `task`. For now I'm just doing it ad-hoc, compiling it directly but was wondering if there was a more supported approach. |
23:19:14 | Araq | slymilano: formatFloat(parseFloat(x), ...) |
23:22:32 | dom96 | deech: ahh, not right now, this will be solved by task-level deps: https://github.com/nim-lang/nimble/issues/482 |
23:22:33 | disbot | โฅ Feature: Task-level dependencies |
23:31:37 | * | nsf quit (Quit: WeeChat 2.6) |
23:36:36 | FromGitter | <zacharycarter> Araq: yeah - I'm going to re-add the rest of the materials and then a bunch of lighting |
23:58:11 | * | pbb quit (Quit: http://quassel-irc.org - Chat comfortably. Anywhere.) |
23:58:24 | zedeus | Araq: very exciting post, congrats on the progress! |
23:58:45 | * | pbb joined #nim |
23:59:03 | zedeus | I came across another memory corruption that seems to be caused by methods, but it's in the nim-markdown library which has a lot of code so I couldn't easily make a minimal example |