00:05:40 | * | dddddd quit (Remote host closed the connection) |
00:29:48 | * | sz0 joined #nim |
01:12:20 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
01:24:10 | * | arnetheduck quit (Remote host closed the connection) |
01:26:04 | carterza | hrm |
01:26:47 | carterza | anyone around that can give me a hand with some pointer stuff? |
01:27:17 | ftsf | ask your question =) |
01:28:21 | carterza | I’m working with a wrapped c library |
01:28:47 | carterza | there’s a struct that translated to nim is a pointer to a uint8 |
01:28:49 | carterza | ptr uint8 |
01:29:08 | carterza | I’m pretty sure I should be able to assign a sequence of objects to this property |
01:29:20 | carterza | or at least the address of a sequence of objects |
01:29:28 | carterza | but I’m not quite sure how to make that happen |
01:29:32 | carterza | I’ll link to the code I”m talking about one sec |
01:29:53 | carterza | https://github.com/zacharycarter/nim-bgfx/blob/master/bgfx.nim#L327 |
01:30:32 | ftsf | what does the struct look like? |
01:30:53 | carterza | one sec I’m finding it now |
01:31:35 | carterza | https://github.com/bkaradzic/bgfx/blob/154464cd6df9b74aabcf2ab90a2adc09f7bc316a/include/bgfx/bgfx.h#L605 |
01:32:01 | ftsf | hmm, that's not very helpful is it =) |
01:32:33 | ftsf | yeah, presumably a sequence of bytes |
01:32:38 | carterza | yeah |
01:32:40 | carterza | I was thinking like - |
01:32:55 | carterza | cast[ptr uint8_t](addr sequence[0]) |
01:33:04 | carterza | not sure if that’s right though |
01:33:54 | ftsf | var foo = cast[ptr array[int.high,uint8]](tvb.data) |
01:34:24 | ftsf | I guess it's expecting you to point it to some memory you've already allocated |
01:34:33 | ftsf | rather than use memory it's allocated |
01:34:42 | carterza | I believe that’s the case |
01:36:01 | ftsf | var myData = newSeq[float]() ... add stuff. tvb.data = cast[ptr uint8_t](myData[0].addr) |
01:37:03 | carterza | okay thanks |
02:00:59 | * | arnetheduck joined #nim |
02:13:31 | * | rauss joined #nim |
02:15:57 | * | Kingsquee joined #nim |
02:18:56 | * | pregressive joined #nim |
02:20:09 | * | pregress_ joined #nim |
02:20:09 | * | pregressive quit (Read error: Connection reset by peer) |
02:25:08 | * | chemist69 quit (Ping timeout: 255 seconds) |
02:25:14 | * | pregress_ quit (Ping timeout: 268 seconds) |
02:30:13 | * | Snircle_ quit (Quit: Textual IRC Client: www.textualapp.com) |
02:39:13 | * | chemist69 joined #nim |
02:39:20 | carterza | bleh can’t get this working |
02:55:18 | carterza | nm got it |
03:02:14 | * | Princess17b29a_ joined #nim |
03:03:40 | * | Syneh__ joined #nim |
03:04:15 | * | zielmicha__ joined #nim |
03:04:36 | * | BlaXpirit_ joined #nim |
03:05:19 | * | LeNsTR|away joined #nim |
03:06:25 | * | aedigix- joined #nim |
03:06:26 | * | gmpreussner_ joined #nim |
03:06:34 | * | benoliver999_ joined #nim |
03:06:35 | * | rainrawr_ joined #nim |
03:07:12 | * | djellemah_ joined #nim |
03:07:28 | * | lenstr quit (Ping timeout: 255 seconds) |
03:07:28 | * | Syneh_ quit (Ping timeout: 255 seconds) |
03:07:28 | * | benoliver999 quit (Ping timeout: 255 seconds) |
03:07:28 | * | BlaXpirit quit (Ping timeout: 255 seconds) |
03:07:28 | * | aedigix quit (Ping timeout: 255 seconds) |
03:07:28 | * | rainrawr quit (Ping timeout: 255 seconds) |
03:07:29 | * | huonw quit (Ping timeout: 255 seconds) |
03:07:29 | * | djellemah quit (Ping timeout: 255 seconds) |
03:07:29 | * | zielmicha_ quit (Ping timeout: 255 seconds) |
03:07:29 | * | gmpreussner quit (Ping timeout: 255 seconds) |
03:07:29 | * | gangstacat quit (Ping timeout: 255 seconds) |
03:07:29 | * | Princess17b29a quit (Ping timeout: 255 seconds) |
03:07:29 | * | kier quit (Ping timeout: 255 seconds) |
03:07:33 | * | benoliver999_ is now known as benoliver999 |
03:07:41 | * | BlaXpirit_ is now known as BlaXpirit |
03:07:41 | * | huonw joined #nim |
03:07:43 | * | Syneh__ is now known as Syneh_ |
03:07:52 | * | gangstacat joined #nim |
03:08:38 | * | zielmicha__ is now known as zielmicha_ |
03:10:01 | * | kier joined #nim |
03:26:44 | * | brson quit (Quit: leaving) |
03:32:11 | * | vlad1777d quit (Quit: Leaving) |
03:40:33 | * | Jesin quit (Quit: Leaving) |
04:10:13 | * | Jesin joined #nim |
04:45:40 | * | abbiya joined #nim |
04:48:16 | * | chemist69 quit (Ping timeout: 245 seconds) |
04:51:00 | * | chemist69 joined #nim |
04:57:03 | shashlick | is it possible to have zip/zlib working at compile time? am trying a macro but it errors with zip-0.1.1\zip\zlib.nim(230, 15) Error: cannot 'importc' variable at compile time |
04:57:13 | FromGitter | <barcharcraz> not really |
04:57:19 | FromGitter | <barcharcraz> I recomend using staticExec |
04:57:36 | FromGitter | <barcharcraz> so you write something using it at runtime then call that at compile time |
04:59:21 | shashlick | barcharcraz: thank you |
04:59:35 | shashlick | what exactly does that error mean? |
04:59:56 | shashlick | cannot run a wrapped c module at compile time? |
05:01:00 | FromGitter | <barcharcraz> yeah |
05:01:03 | * | djellemah_ is now known as djellemah |
05:01:04 | FromGitter | <barcharcraz> the FFI is disabled in the VM |
05:01:43 | FromGitter | <barcharcraz> it makes it safer, and probably more platform independent. Although one of the main reasons is that when the FFI was allowed it didn't work very well in the compiler time VM |
05:50:57 | FromGitter | <vegansk> @raydf , I use xmltools for SOAP :-) https://gist.github.com/vegansk/9521f6349db3deb1215e548112864696 |
06:00:51 | * | libman quit (Quit: Connection closed for inactivity) |
06:08:07 | * | xet7 joined #nim |
06:18:19 | * | nsf joined #nim |
06:24:23 | * | shashlick quit (Ping timeout: 264 seconds) |
06:40:45 | * | carterza quit (Quit: carterza) |
06:40:54 | * | bjz joined #nim |
06:59:43 | * | shashlick joined #nim |
07:03:04 | * | ftsf quit (Remote host closed the connection) |
07:10:36 | * | departedlogic joined #nim |
07:22:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
07:24:40 | * | xet7 quit (Quit: Leaving) |
07:25:37 | * | Matthias247 joined #nim |
07:27:06 | * | bjz joined #nim |
07:29:20 | * | bjz quit (Client Quit) |
07:36:56 | * | Matthias247 quit (Read error: Connection reset by peer) |
07:43:23 | * | rokups joined #nim |
07:46:48 | * | gokr joined #nim |
07:57:54 | * | chemist69 quit (Ping timeout: 276 seconds) |
07:59:51 | * | chemist69 joined #nim |
07:59:57 | * | rauss quit (Quit: WeeChat 1.7) |
08:32:27 | * | Vladar joined #nim |
08:46:55 | * | bjz joined #nim |
08:50:13 | * | Andris_zbx joined #nim |
09:02:12 | FromGitter | <Varriount> carterza: Switching to use bgfx? |
09:18:39 | * | Sentreen_ quit (Read error: Connection reset by peer) |
09:18:49 | * | filcuc joined #nim |
09:19:22 | * | Sentreen_ joined #nim |
09:39:05 | * | yglukhov joined #nim |
09:40:08 | * | Arrrr joined #nim |
09:43:06 | * | yglukhov quit (Ping timeout: 240 seconds) |
09:44:44 | * | yglukhov joined #nim |
09:47:35 | * | yglukhov quit (Remote host closed the connection) |
09:58:06 | * | gokr quit (Ping timeout: 240 seconds) |
10:04:08 | * | yglukhov joined #nim |
10:12:57 | * | gokr joined #nim |
10:21:42 | * | bjz_ joined #nim |
10:22:47 | * | PMunch joined #nim |
10:22:55 | * | bjz quit (Ping timeout: 256 seconds) |
10:24:52 | * | yglukhov quit (Remote host closed the connection) |
10:53:11 | * | yglukhov joined #nim |
11:11:46 | * | waynecolvin joined #nim |
11:13:13 | waynecolvin | if nim compiles down to C can i just download C output somewhere? |
11:14:27 | flyx | waynecolvin: generated C sources of the Nim compiler are at https://github.com/nim-lang/csources |
11:14:46 | waynecolvin | thanks! |
11:14:47 | flyx | waynecolvin: generated C sources of your nim code are located within the nimcache directory. |
11:35:57 | * | couven92 joined #nim |
11:41:15 | * | Kingsquee quit (Quit: https://i.imgur.com/qicT3GK.gif) |
11:52:09 | * | rokups quit (Quit: Connection closed for inactivity) |
11:53:57 | * | Sentreen_ quit (Quit: WeeChat 1.4) |
11:57:08 | * | gokr quit (Read error: Connection reset by peer) |
11:57:55 | * | Sentreen joined #nim |
12:02:42 | * | Snircle joined #nim |
12:04:15 | * | chemist69 quit (Ping timeout: 276 seconds) |
12:06:18 | * | chemist69 joined #nim |
12:18:30 | * | gokr joined #nim |
12:20:24 | * | devted joined #nim |
12:26:25 | FromGitter | <dom96> Wait, so even LLVM IR has undefined behaviour? http://blog.regehr.org/archives/1467 |
12:26:55 | * | bjz_ quit (Quit: Textual IRC Client: www.textualapp.com) |
12:27:47 | * | bjz joined #nim |
12:28:17 | * | Arrrr quit (Ping timeout: 240 seconds) |
12:34:44 | * | waynecolvin quit (Remote host closed the connection) |
12:35:09 | * | departedlogic quit (Ping timeout: 260 seconds) |
12:48:27 | * | sheerun joined #nim |
12:54:39 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
13:00:41 | * | byte512 joined #nim |
13:05:17 | * | synshroud quit (Quit: ZNC 1.6.4 - http://znc.in) |
13:13:13 | * | synshroud joined #nim |
13:13:26 | * | sheerun quit (Ping timeout: 258 seconds) |
13:15:59 | * | Princess17b29a_ is now known as Princess17b29a |
13:34:00 | * | vlad1777d joined #nim |
13:48:53 | * | UxerUospr joined #nim |
13:56:47 | zevlg | wow! https://forum.nim-lang.org/t/2795 |
14:03:34 | FromGitter | <Varriount> @dom96 Meh, whenever I hear someone excuse UB in the name of optimizations, I just think "Why not have both a safe and unsafe version of the function/feature/pragma" |
14:04:18 | dom96 | zevlg: indeed :) |
14:04:19 | niv | undefined behaviour is the worst. it implies people know what they are doing, all evidence to the contrary |
14:06:26 | dom96 | Varriount: I don't remember hearing that |
14:07:01 | dom96 | I'm mainly referring to what I was told on Twitter |
14:07:21 | dom96 | The person in question rejected Nim because "it compiles to C" and "C is full of undefined behaviour" |
14:07:34 | niv | thats kinda funny :) |
14:07:53 | flyx | so is asm |
14:07:59 | niv | "i dont like seatbelts, seatbelts are used in car crashes and those are dangerous" |
14:08:00 | ehmry | yea |
14:08:36 | cheatfate | And c is compiled to asm and asm is translated to binary code which is also full of undefined behavior |
14:08:52 | ehmry | this is all running on interfaces to hardware that are full of UB |
14:08:57 | dom96 | niv: haha |
14:09:03 | niv | and better not think about the hacks intel puts into their microcode, yeah |
14:09:16 | flyx | and if I go out the door into the real world, other people are also full of undefined behavior! |
14:09:18 | cheatfate | yeah and all this interfaces exists in world based on random chaos |
14:09:29 | niv | existentialcrisis.gif |
14:10:03 | ehmry | just don't turn on the computer and you'll be fine |
14:10:11 | * | LeNsTR|away quit (Changing host) |
14:10:11 | * | LeNsTR|away joined #nim |
14:10:31 | flyx | he said and then a meteor crashed into his home |
14:10:47 | niv | just imagine how much of your life runs on windows 98 still |
14:11:15 | federico3 | my pacemaker! *grabs chest* *dies* |
14:11:16 | * | flyx misses the dinosaur mouse cursor |
14:11:28 | niv | flyx: now that you mention it .. |
14:12:09 | * | ehmry misses the custom sound schemes |
14:12:18 | dom96 | So I'm currently attending a workshop on Angular 2 and it's really motivating me to start running Nim workshops. |
14:12:33 | flyx | yay! |
14:12:41 | niv | what would you do in a nim workshop? |
14:13:08 | * | devted quit (Quit: Sleeping.) |
14:13:22 | dom96 | I could do everything from creating a web app using Jester to getting a nimkernel-like "OS" running. |
14:13:28 | flyx | btw, some yaml guys and I put together a matrix of yaml implementations. so far, nimyaml is winning http://matrix.yaml.io/ |
14:13:33 | flyx | *shameless self promotion* |
14:13:57 | dom96 | flyx: oooh, nice! |
14:14:03 | niv | thats a frightening table |
14:14:16 | * | sz0 quit (Quit: Connection closed for inactivity) |
14:14:25 | niv | amazed how bad ruby looks on it |
14:14:50 | dom96 | Yeah, I have a feeling that Rubyists use YAML rather extensively. |
14:15:01 | niv | i write a lot of ruby code - yeah, they do |
14:15:07 | flyx | be aware that only the implementations tagged „event“ in the header are fully tested |
14:15:10 | niv | but not really anything of the fancy stuff. its just for config |
14:15:22 | ehmry | a quick question, is there a recommendation on when to use async and synchronous networking? sync for clients and async for servers, or async all the way? |
14:15:27 | flyx | for others, we compare expected with actual json output |
14:15:37 | flyx | and that obvsly does not work for all test cases |
14:15:40 | ehmry | I don't appreciate the implications |
14:15:43 | dom96 | ehmry: depends on the app |
14:15:51 | FromGitter | <Varriount> ehmry: Usually clients are doing something other than just listening on a socket. |
14:16:06 | FromGitter | <Varriount> Such as drawing GUIs, or doing some form of work. |
14:16:09 | ehmry | I mean, I don't know how much difference it makes |
14:16:13 | niv | async adds complexity, but the nim implementation is pretty useful |
14:16:29 | niv | for servers you HAVE to pick either an async/wait or threaded model, or it will be slow as a snail |
14:16:46 | dom96 | If you're writing a CLI application like Nimble then sync is perfect. |
14:17:22 | niv | yeah. easiest, too. if you only have one customer that wants to run at a time, sync is fine |
14:17:29 | ehmry | sure, servers ought to be async |
14:17:54 | niv | is there a particular usecase you are unsure of? |
14:18:32 | ehmry | no, I'm just unsure about peppering wait throughout my code |
14:18:39 | ehmry | *await |
14:18:53 | dom96 | You can also support both if you're brave :) |
14:19:15 | dom96 | It's how httpclient is implemented: the wonderful {.multisync.} macro. |
14:19:24 | niv | multisync O.o |
14:19:34 | dom96 | But that's primarily useful for libraries. |
14:19:45 | * | nsf quit (Quit: WeeChat 1.7) |
14:20:04 | niv | oo, fancy |
14:20:09 | niv | things i miss .. |
14:20:28 | dom96 | https://nim-lang.org/news/2016_09_30_version_0_15_0_released.html#multisync-macro |
14:20:35 | ehmry | I'll look into it, I'm still writing libraries |
14:20:45 | niv | yeah google already hooked me up |
14:20:56 | niv | this looks useful, i never bother with sync code if im targeting async anyways |
14:20:59 | demi- | tbh i think async is always the correct way to go for http networking |
14:24:14 | dom96 | I improved this macro recently to support `Future[Socket | AsyncSocket]` (and similar) return types. |
14:24:43 | dom96 | Nim's macros are truly freaking awesome. |
14:25:24 | ehmry | yea, its always going to be async if you go low enough |
14:26:25 | ehmry | you realize this when you play with userspace IP stacks |
14:29:26 | cheatfate | windows+iocp+threads is fast enough, linux+reuseport+threads is fast enough |
14:29:38 | cheatfate | so it depends |
14:29:44 | cheatfate | like everything |
14:29:45 | dom96 | futures add an overhead though |
14:31:32 | niv | im sure there's a political joke in there somewhere that mustnt be invoked |
14:34:34 | * | Arrrr joined #nim |
14:34:34 | * | Arrrr quit (Changing host) |
14:34:34 | * | Arrrr joined #nim |
14:34:39 | cheatfate | dom96, i think with coroutines it is possible to avoid futures overhead |
14:35:20 | dom96 | Yes, but that completely changes the way async works in Nim. |
14:35:23 | dom96 | There would be no more 'await' |
14:35:28 | dom96 | It would basically be Go. |
14:38:14 | dom96 | flyx: surprised to see that this YAML matrix is written in Perl, I guess these guys couldn't be convinced to use Nim? :) |
14:38:35 | flyx | dom96: well they wrote the matrix generator, I wrote most of the test cases |
14:38:46 | dom96 | Ahh, that's fair. |
14:38:58 | dom96 | I'm gonna tweet about it :) |
14:39:11 | flyx | can you hold back for a while? |
14:39:21 | flyx | we still want to improve it |
14:39:33 | Araq | I tried to convince some Perl guys once. they told me "but but but, regular expressions, in Perl you can do *everything* with them" |
14:39:48 | niv | perfection is the enemy of good enough to be tweeted out |
14:39:49 | flyx | e.g. SnakeYAML has a low-level API and we could implement events-based testing on it. |
14:39:58 | Araq | and I gave up. :P |
14:40:17 | Araq | cannot tell people their ideas are so wrong that you don't even know where to start ... |
14:40:22 | niv | Araq: on the plus side, you can open nim code half a year later and still have a hope of understanding what it does |
14:40:23 | dom96 | flyx: sure, let me know when it's okay to tweet |
14:40:31 | flyx | dom96: will do |
14:41:09 | flyx | I guess if you use a language that allows a variable to have multiple values at the same time, you have strange priorities. |
14:43:07 | FromGitter | <Varriount> @Araq Just hold up the whole "nested parenthesis" problem to them. |
14:43:37 | GaveUp | flyx: what was the criteria for including on the list? |
14:44:21 | flyx | GaveUp: one of us needed to be able to write an interface from the implementation to the test framework |
14:44:41 | niv | is the interface public somewhere? |
14:44:50 | GaveUp | hah that was my next question |
14:44:55 | * | Ven joined #nim |
14:45:17 | * | chemist69 quit (Ping timeout: 240 seconds) |
14:45:29 | flyx | niv: well it is just some data. yaml input, expected event/json output. all available here: https://github.com/yaml/yaml-test-suite/tree/data |
14:45:51 | niv | cool. |
14:46:10 | Araq | having a bizarre broken primitive type system in the form of sigils is already a showstopper language problem for me ;-) |
14:46:20 | flyx | niv: though the data is autogenerated from https://github.com/yaml/yaml-test-suite/tree/master/test |
14:46:29 | FromGitter | <Varriount> dom95: Might also be a good hacker news submission |
14:46:43 | Araq | but when you bring that up people argue it improves "readability". |
14:46:44 | niv | i just saw the github link on the matrix page itself. im kind of blind sometimes |
14:46:56 | flyx | niv: we're still in progress of specifying the data layout ^^ |
14:47:15 | demi- | kinda disappointing to see y'all hold HN in such high regard |
14:47:38 | dom96 | Varriount: Don't need me to submit there though |
14:47:48 | FromGitter | <Varriount> True.. |
14:48:11 | FromGitter | <Varriount> demi-: It's a main mass of people interested in programming languages. |
14:48:17 | flyx | Varriount: well I would prefer if we could decide ourself when we deem the data good enough for a HN submission |
14:48:22 | flyx | but well, it's already public |
14:48:31 | dom96 | demi-: It brings a lot of traffic. |
14:48:38 | FromGitter | <Varriount> flyx: No, I'll respect what you want. |
14:48:40 | dom96 | And generally they are fairly sane. |
14:49:03 | dom96 | demi-: If you know of anything better then please let me know. |
14:49:06 | flyx | GaveUp: are you missing a yaml implementation on the list? |
14:50:03 | Araq | btw, can we enable travis on OSX? |
14:50:09 | * | chemist69 joined #nim |
14:50:24 | GaveUp | flyx: rust one came to mind |
14:51:45 | flyx | GaveUp: yeah. ruamel is also missing and will probably shortly be included because as a pyyaml fork, it should be easy to apply the pyyaml shim to it |
14:52:22 | flyx | GaveUp: as for Rust, well, someone would need to write code that uses the parser to create the event list |
14:52:43 | GaveUp | flyx: yeah ... I make look at attempting it |
14:53:08 | flyx | GaveUp: if you want to, feel free to join #libyaml, we're supervising things there |
14:56:29 | GaveUp | btw, noticed a weirdish behavior with nimyaml a little while back ... if disabling the yaml tag/namespace the first --- remains which seems odd, though I hadn't looked through the spec enough to see if it was appropriate |
14:58:40 | FromGitter | <raydf> Hello |
14:58:58 | FromGitter | <raydf> Is there any docs related to monkey patching a module? |
14:59:17 | * | Etheco joined #nim |
15:02:24 | flyx | GaveUp: the --- is the directives end marker, but it does not need any actual directives preceding it ;) |
15:03:52 | GaveUp | flyx: yeah ... my hunch, though I hadn't gotten around to testing it, was that it'd cause weird behavior when reading back in through the multi-document load |
15:04:47 | flyx | GaveUp: well, if in doubt, file an issue and I will have a look at it |
15:05:43 | FromGitter | <raydf> Already figured it out |
15:05:53 | GaveUp | I'll get around to investigating it |
15:07:57 | * | Arrrr quit (Ping timeout: 256 seconds) |
15:09:02 | * | devted joined #nim |
15:11:52 | * | yglukhov quit (Remote host closed the connection) |
15:12:02 | * | libman joined #nim |
15:25:19 | * | Ven quit (Ping timeout: 268 seconds) |
15:26:02 | * | Snircle quit (Quit: Textual IRC Client: www.textualapp.com) |
15:29:15 | FromGitter | <Varriount> @tekjar I believe nimscript has a patchfile procedure |
15:43:34 | ehmry | dom96: multisync is great, makes debugging output cleaner |
15:44:27 | ehmry | and I get better socket close and cleanup coverage |
16:09:38 | * | libman quit () |
16:10:45 | * | yglukhov joined #nim |
16:15:16 | * | yglukhov quit (Ping timeout: 268 seconds) |
16:23:34 | * | yglukhov joined #nim |
16:25:36 | * | zachcarter joined #nim |
16:29:11 | * | chemist69 quit (Quit: WeeChat 1.7) |
16:40:21 | * | Trustable joined #nim |
16:43:50 | * | pregressive joined #nim |
16:46:40 | * | Andris_zbx quit (Remote host closed the connection) |
16:51:12 | * | pregressive quit () |
16:52:54 | * | pregressive joined #nim |
16:58:10 | * | brson joined #nim |
17:02:25 | * | UxerUospr quit (Ping timeout: 256 seconds) |
17:18:53 | * | gokr quit (Ping timeout: 260 seconds) |
17:23:53 | zachcarter | got my spritebatch working with bgfx now |
17:24:27 | dom96 | ehmry: glad to hear it |
17:29:54 | * | filcuc quit (Ping timeout: 276 seconds) |
17:33:26 | * | PMunch quit (Quit: leaving) |
17:34:32 | * | couven92 quit (Quit: Client disconnecting) |
17:44:06 | * | gokr joined #nim |
17:54:12 | * | SirCmpwn quit (Ping timeout: 240 seconds) |
17:54:59 | * | krux02 joined #nim |
17:58:04 | * | SirCmpwn joined #nim |
17:58:59 | * | nsf joined #nim |
18:02:31 | krux02 | is here someone who know how to use nim in gdb? |
18:04:29 | * | yglukhov quit (Remote host closed the connection) |
18:05:25 | dom96 | krux02: I know the basics |
18:05:53 | krux02 | well, what do I need to pass to get debug symbols |
18:07:05 | * | Vladar quit (Remote host closed the connection) |
18:07:07 | * | yglukhov joined #nim |
18:07:31 | krux02 | I would like to be able to step to my program line by line and print local variables |
18:07:41 | krux02 | but I could not do that |
18:09:33 | dom96 | --debuginfo |
18:09:47 | dom96 | and if you want Nim line numbers: --lineDir:on |
18:10:07 | * | yglukhov_ joined #nim |
18:10:37 | FromGitter | <Varriount> zachcarter: I assume you're using the C api, rather than the C++ one? |
18:11:36 | zachcarter | I believe so Varriount |
18:11:37 | * | yglukhov quit (Ping timeout: 260 seconds) |
18:11:39 | zachcarter | I didn’t write the bindings |
18:14:00 | zachcarter | so far so good though - at least for the 2d stuff |
18:14:19 | * | couven92 joined #nim |
18:14:47 | * | yglukhov_ quit (Ping timeout: 264 seconds) |
18:14:54 | * | libman joined #nim |
18:18:17 | FromGitter | <raydf> Hello how can i execute a kill process in a nimble task? |
18:18:32 | * | Trustable quit (Remote host closed the connection) |
18:23:25 | dom96 | raydf: why do you want to do that? |
18:24:18 | FromGitter | <raydf> i'm watching nim files and on change would like a kill of the http server process and a nimble run |
18:25:22 | dom96 | exec "kill" should work I think |
18:25:38 | FromGitter | <raydf> ok exec is the name |
18:25:48 | FromGitter | <raydf> thanks |
18:25:51 | FromGitter | <raydf> let me try |
18:27:37 | krux02 | dom96: why is neither --debuginfo nor --lineDir:on in nim -h? |
18:28:02 | dom96 | krux02: because it's in nim --advanced |
18:28:18 | FromGitter | <raydf> @dom96, didn't work ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=58a49dc100c00c3d4f42bd44] |
18:28:39 | dom96 | raydf: what's the error? |
18:28:42 | krux02 | then you think debugging is only for advanced people? |
18:29:16 | FromGitter | <raydf> runTask ⏎ usr/local/Cellar/nim/0.16.0/nim/lib/system/nimscript.nim(206) exec ⏎ usr/local/Cellar/nim/0.16.0/nim/lib/system/nimscript.nim(206, 7) Error: unhandled exception: |
18:33:32 | * | gokr quit (Ping timeout: 255 seconds) |
18:35:23 | FromGitter | <raydf> @dom96, fixed it |
18:35:31 | FromGitter | <raydf> thanks for the tip. |
18:35:57 | dom96 | krux02: I don't, and I don't think --advanced should be a thing. |
18:36:43 | krux02 | I think all debug information should be enabled by default, and only disabled when specifying --release or something like that |
18:36:57 | krux02 | becaues the main development build is the debug build, not he release build |
18:51:55 | dom96 | perhaps but I would like to hear what Araq has to say, i'm sure he has his reasons for this not being default |
18:59:33 | FromGitter | <konqoro> i think the correct parameter is --debugger:native |
19:03:47 | * | djellemah_ joined #nim |
19:05:26 | dom96 | Looks like that's an alias for `--linedir:on --debuginfo`` https://github.com/nim-lang/Nim/blob/devel/compiler/commands.nim#L439 |
19:06:04 | FromGitter | <Varriount> krux02: For what it's worth, I agree with you. |
19:09:07 | * | nsf quit (Quit: WeeChat 1.7) |
19:11:13 | * | PMunch joined #nim |
19:12:48 | * | Matthias247 joined #nim |
19:24:37 | * | formerly joined #nim |
19:31:38 | * | formerly quit (Quit: Leaving) |
19:41:18 | * | Matthias247 quit (Read error: Connection reset by peer) |
19:47:20 | PMunch | Hmm, "/home/peter/.nimble/pkgs/ui-0.9/ui/rawui.nim(25, 12) Error: string literal expected" |
19:47:53 | PMunch | Installed libui from my package manager and the ui package through nimble |
19:48:20 | PMunch | And I copied the sample from https://github.com/nim-lang/ui |
19:50:25 | dom96 | You need devel nim |
19:51:49 | PMunch | Ah |
19:52:22 | PMunch | Maybe the ui.nimble file should require a larger version then? |
19:56:33 | * | bjz joined #nim |
19:57:56 | PMunch | http://ix.io/1TtI |
19:58:00 | PMunch | Not much better |
19:58:14 | PMunch | http://ix.io/1TtJ |
19:58:22 | PMunch | That's the Nim version now |
19:59:21 | Araq | PMunch: updating the install instructions |
19:59:26 | FromGitter | <raydf> @flyx, i'm trying to dump a nim object to a json stringstream, is there any code example of this working? |
19:59:41 | FromGitter | <raydf> I'm talking about NimYAML |
20:00:40 | PMunch | Araq, appreciate it :) |
20:00:51 | PMunch | Watched your Async Vodoo speech today by the way |
20:00:52 | krux02 | dom96: when I use gdb from the command line, I see all symbol and I can do line by line debugging, but when I start gdb from within emacs, for some reason the symbols are gone |
20:00:57 | PMunch | Great stuff |
20:01:37 | Araq | krux02: can you elaborate of how more IO checks cause your code to fail? |
20:02:07 | krux02 | Araq: I have no idea, but I double checked it, if it is the right commit |
20:02:09 | krux02 | and it is |
20:02:20 | krux02 | unless I faild at double checking, that is the right commit |
20:02:25 | PMunch | Really liked the template in a macro you showed off in the beginning. Should be practical for writing my own macros |
20:02:27 | Araq | but it makes no sense |
20:02:30 | krux02 | but the output has a newline in it |
20:02:53 | Araq | the output is not affected by the IO checks |
20:03:21 | krux02 | I mean not the output, I mean the commant itself has a newline between the arguments |
20:03:49 | krux02 | that's why the compiler complains that there is no input file |
20:03:58 | krux02 | it just has the newline before the input file |
20:05:16 | krux02 | https://github.com/nim-lang/Nim/commit/794d36cf31d8f7debc2ede1f7792fdbcc0a1ef5e#diff-1c5a9419c0268c68067821d49bb27408R142 |
20:05:41 | krux02 | there you have a '\L' in the buffer instead of a '\l' |
20:06:21 | krux02 | I don't exactly know how that buffer is used, I i think it should be semantically identical, but you never know when this commit introduced a bug |
20:07:07 | krux02 | it's probably some random stuff that happens when things don't work on the right memory, but accidentially they do and then you change something that is not supposed to change anything, but it changes a lot |
20:07:35 | Araq | the compiler doesn't use readLine iirc |
20:08:12 | Araq | PMunch: updated. |
20:10:01 | krux02 | well, then I don't know |
20:10:21 | * | couven92 quit (Quit: Client disconnecting) |
20:10:28 | Araq | krux02 what's your OS? |
20:10:39 | krux02 | manjaro Linux |
20:11:07 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:11:10 | PMunch | Thanks, what's the reason it has to be done that way? |
20:14:29 | Araq | PMunch: libui DLLs crashed and I couldn't be bothered with this crap, so no DLL requirement. turns out, MingW cannot compile libui though because it depends on Direct X version 3 or something |
20:15:04 | Araq | that was released before the cold war or something |
20:15:13 | krux02 | PMunch: for template in a macro, I use `quote do:`, it's basically the same, just without an argument list |
20:15:29 | krux02 | but Araq doesn't like it |
20:15:57 | Araq | Araq also has his reasons for his dislike. :P |
20:16:31 | PMunch | quote do? |
20:16:48 | PMunch | Wait libui depends on Direct X? |
20:17:01 | krux02 | I like the explicit thing `value`, it helps to distinguish ast from inserted nodes visually |
20:17:37 | Araq | what if my quote needs the backticks? quote do: proc `+` () ... ? |
20:17:54 | Araq | quoting always sucks ;-) |
20:18:51 | krux02 | PMunch: http://ix.io/1TtS |
20:19:13 | krux02 | well it doesn't |
20:19:29 | krux02 | at least for me |
20:21:04 | * | bjz joined #nim |
20:23:21 | Araq | well you know, I have no idea where your AntTweakBar project resides |
20:24:09 | krux02 | git clone [email protected]:krux02/nimAntTweakBar |
20:24:14 | krux02 | it is in the issue |
20:24:18 | * | brson quit (Quit: leaving) |
20:24:24 | krux02 | at the end |
20:25:45 | krux02 | here is a demo: https://www.youtube.com/watch?v=OEpsG2PGi-s |
20:27:10 | * | nsf joined #nim |
20:30:08 | krux02 | does anyone know, why it could be that when I debug in gdb, I only get names and line information, when I run gdb on the command line, but not in emacs? |
20:31:17 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:32:00 | krux02 | when you think 'emacs' sounds weird, just replace it with 'visual gdb frontend' |
20:32:21 | * | bjz joined #nim |
20:37:45 | PMunch | Hmm, any way to see the gcc command nim uses? |
20:38:23 | * | couven92 joined #nim |
20:39:37 | Araq | {.passC: "-I" & staticExec("nimble path AntTweakBar") & "/cAntTweakBar/include" .} |
20:39:43 | Araq | this fails for me |
20:39:51 | Araq | should I update my nimble? |
20:41:55 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:41:57 | stisa | PMunch try ``--verbosity:2`` or 3 |
20:42:02 | * | brson joined #nim |
20:45:51 | * | bjz joined #nim |
20:46:10 | PMunch | thanks stisa :) |
20:46:34 | Araq | nimble path AntTweakBar |
20:46:34 | Araq | Tip: 1 messages have been suppressed, use --verbose to show them. |
20:46:34 | Araq | Error: Traceback (most recent call last) |
20:46:34 | Araq | ... nimble.nim(1079) nimble |
20:46:35 | Araq | ... nimble.nim(1022) doAction |
20:46:36 | Araq | ... nimble.nim(780) listPaths |
20:46:37 | Araq | ... At least one of the specified packages was not found |
20:47:03 | krux02 | ah |
20:47:18 | krux02 | yea you have to install it with nimble first, to use it |
20:47:46 | krux02 | so 'nimble install' in the AntTweakBar folder should do it |
20:48:25 | krux02 | that that when antTweakBar is installed, I can ask for it's path |
20:52:33 | krux02 | yay, when I start the debugger from qt creater (very good gdb frontend), it actually shows me NimStrings, as if they were native strings |
20:56:36 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
20:57:03 | * | nsf quit (Quit: WeeChat 1.7) |
21:00:04 | krux02 | my latest test failed with in "downloader.nim" with "cannot open 'ui'" is that my fault then? |
21:01:26 | * | Vladar joined #nim |
21:02:29 | Araq | no, I need to fix it |
21:02:41 | Araq | krux02: you're right, it is that commit |
21:03:00 | Araq | because 'endOfFile' is now broken :-( |
21:05:01 | * | bjz joined #nim |
21:05:10 | * | yglukhov joined #nim |
21:05:36 | * | yglukhov quit (Remote host closed the connection) |
21:05:42 | krux02 | yes I was sceptical, too, when I saw that commit |
21:05:49 | * | yglukhov joined #nim |
21:05:50 | krux02 | that's why I double checked |
21:10:54 | Araq | ok fixed |
21:11:03 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:11:03 | Araq | and appveyor should be green again too |
21:11:57 | Araq | oh and we should deprecate endOfFile :-) |
21:13:27 | * | Trustable joined #nim |
21:13:57 | Araq | krux02: btw it's really bad style to assume nimble's output doesn't end in a newline, so you actually should have called 'strip' on the staticExec |
21:14:47 | krux02 | ok, I will add strip to it now, even when it is fixed, good to know |
21:15:20 | krux02 | but I think it would be nice, when there would be an official way to add an include path that is bundled with a package |
21:15:41 | krux02 | so that I don't need to call staticExec in the first place |
21:15:53 | * | bjz joined #nim |
21:16:30 | krux02 | creating a process, just to get to the path of a bundled header is not the fastest thing possible |
21:19:36 | Araq | oh yeah that whole thing is a total hack :P |
21:19:44 | Araq | what do you mean "include path"? |
21:20:02 | Araq | nimble installs .nim files, not .c files, usually |
21:22:09 | * | djellemah_ quit (Remote host closed the connection) |
21:25:49 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
21:26:10 | Araq | looking further into it, Nim has --cincludes to add something to C include path, but that feature is not available as a pragma :-/ |
21:31:42 | * | gokr joined #nim |
21:32:17 | * | zachcarter quit (Quit: zachcarter) |
21:49:19 | * | Matthias247 joined #nim |
21:50:40 | * | Matthias247 quit (Read error: Connection reset by peer) |
21:51:36 | * | brson quit (Ping timeout: 260 seconds) |
21:52:03 | * | Matthias247 joined #nim |
22:01:22 | * | brson joined #nim |
22:06:44 | * | pregressive quit (Remote host closed the connection) |
22:07:19 | * | pregressive joined #nim |
22:07:54 | * | yay joined #nim |
22:10:06 | krux02 | Araq: the entire idea is to bundle the c files from AntTweakBar, as they are, no nim specific modifications. So I made sure they get installed with the nimble package, and they are found by the compiler |
22:10:30 | krux02 | but I don't like to construct a string together with '-L' because that is very compiler dependent |
22:10:46 | * | bjz joined #nim |
22:11:27 | demi- | why not use dynamic or static library linking? |
22:11:28 | * | pregressive quit (Ping timeout: 240 seconds) |
22:11:44 | krux02 | because that library is not hugely available |
22:12:08 | krux02 | and it would not really help, because then I would be required to trigger the compilation of AntTweakBar somehow into a library |
22:12:19 | krux02 | I don't really like the idea of build files |
22:12:35 | krux02 | a project should just be a set of files, not a set of script that build files |
22:13:19 | krux02 | so I thought it would be the easiest idea to just add all files from AntTweakBar as C files to the project |
22:13:41 | demi- | it depends on what you are trying to distribute, if you need to distribute the source then bundle it all up and have it build it out with the .c files, or distribute the wrapper and let everyone else figure out the AntTweakBar library requirement |
22:14:02 | demi- | you cannot have both, and it doesn't seem like nimble is meant to do the former of those two options really |
22:14:07 | krux02 | yea that second option pretty much sucks for ant tweak bar |
22:14:19 | demi- | that is the truth for like 90% of code ever |
22:14:26 | krux02 | I mean for SDL yes I agree, but not ant tweak bar |
22:14:42 | demi- | I don't see them as fundamentally different here |
22:14:42 | krux02 | my solution doesn't suck |
22:14:52 | krux02 | you just do nimble install, and there you go |
22:14:56 | krux02 | batteries included |
22:15:11 | demi- | ¯\_(ツ)_/¯ |
22:15:34 | Araq | actually your implementation sucks quite a bit, but it's not like Nim offers something that's better |
22:15:53 | krux02 | it was the best I could come up with |
22:15:59 | demi- | packaging stuff that isn't yours typically ends very poorly |
22:16:41 | krux02 | I don't think that anybody will complain |
22:16:43 | demi- | krux02: it is a hard problem -- that is why there are so many package/dependency managers; everyone wants to solve it slightly differently |
22:17:45 | krux02 | well the problem with dependency resolution is, that it doesn't solve the problem when you throw more dependency managers at them |
22:18:59 | demi- | sometimes you gotta play to the strengths of what exists, it is easier to say "build this as a shared library or static library and provide it as a path variable when `make`ing and have it linked in through the existing linkage pragmas |
22:19:47 | * | yglukhov quit (Remote host closed the connection) |
22:20:21 | * | yglukhov joined #nim |
22:21:01 | * | niv78 joined #nim |
22:24:17 | * | niv quit (Ping timeout: 256 seconds) |
22:24:19 | Araq | strengths of what exist? what exists are hacks that lived for far too long. It starts with the utterly broken idea of prefering absolute paths over relative paths (hello Unix hiearachy), goes on with a tool that distinguishes tabs and spaces (make) and ends with a broken file access model (you need to use sudo to run/install this software) |
22:24:36 | * | yglukhov quit (Ping timeout: 240 seconds) |
22:24:36 | demi- | you aren't wrong |
22:27:19 | krux02 | well are right that it is a lot of legacy, but at least the part with "you need to use sudo" is fixed in the arch based distros, fakeroot for the win |
22:27:59 | krux02 | ok it's a hack, too, but not as bad as requiring root in the first place |
22:42:38 | * | PMunch quit (Quit: leaving) |
22:48:08 | * | nsf joined #nim |
22:49:55 | * | nsf quit (Client Quit) |
22:59:16 | * | devted quit (Quit: Sleeping.) |
22:59:49 | libman | https://youtu.be/yVkrPH48k_I. :P |
23:04:59 | libman | Just came across that false-positive search result. Now, in addition to not being named after a monkey, we're also not named after an 11-year-old who lives on an island... |
23:12:00 | * | ftsf joined #nim |
23:18:16 | * | Trustable quit (Remote host closed the connection) |
23:21:18 | * | niv78 is now known as niv |
23:23:47 | * | Matthias247 quit (Read error: Connection reset by peer) |
23:24:19 | * | yay quit (Quit: yay) |
23:25:18 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:25:57 | * | Vladar quit (Remote host closed the connection) |
23:30:30 | * | def-pri-pub joined #nim |
23:34:16 | * | ofelas joined #nim |
23:42:39 | * | bjz joined #nim |
23:55:23 | * | ofelas quit (Quit: WeeChat 1.7) |
23:56:26 | * | gokr quit (Ping timeout: 260 seconds) |
23:57:02 | * | bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…) |
23:57:59 | * | bjz joined #nim |