<< 15-02-2017 >>

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:04carterzahrm
01:26:47carterzaanyone around that can give me a hand with some pointer stuff?
01:27:17ftsfask your question =)
01:28:21carterzaI’m working with a wrapped c library
01:28:47carterzathere’s a struct that translated to nim is a pointer to a uint8
01:28:49carterzaptr uint8
01:29:08carterzaI’m pretty sure I should be able to assign a sequence of objects to this property
01:29:20carterzaor at least the address of a sequence of objects
01:29:28carterzabut I’m not quite sure how to make that happen
01:29:32carterzaI’ll link to the code I”m talking about one sec
01:29:53carterzahttps://github.com/zacharycarter/nim-bgfx/blob/master/bgfx.nim#L327
01:30:32ftsfwhat does the struct look like?
01:30:53carterzaone sec I’m finding it now
01:31:35carterzahttps://github.com/bkaradzic/bgfx/blob/154464cd6df9b74aabcf2ab90a2adc09f7bc316a/include/bgfx/bgfx.h#L605
01:32:01ftsfhmm, that's not very helpful is it =)
01:32:33ftsfyeah, presumably a sequence of bytes
01:32:38carterzayeah
01:32:40carterzaI was thinking like -
01:32:55carterzacast[ptr uint8_t](addr sequence[0])
01:33:04carterzanot sure if that’s right though
01:33:54ftsfvar foo = cast[ptr array[int.high,uint8]](tvb.data)
01:34:24ftsfI guess it's expecting you to point it to some memory you've already allocated
01:34:33ftsfrather than use memory it's allocated
01:34:42carterzaI believe that’s the case
01:36:01ftsfvar myData = newSeq[float]() ... add stuff. tvb.data = cast[ptr uint8_t](myData[0].addr)
01:37:03carterzaokay 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:20carterzableh can’t get this working
02:55:18carterzanm 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:03shashlickis 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:13FromGitter<barcharcraz> not really
04:57:19FromGitter<barcharcraz> I recomend using staticExec
04:57:36FromGitter<barcharcraz> so you write something using it at runtime then call that at compile time
04:59:21shashlickbarcharcraz: thank you
04:59:35shashlickwhat exactly does that error mean?
04:59:56shashlickcannot run a wrapped c module at compile time?
05:01:00FromGitter<barcharcraz> yeah
05:01:03*djellemah_ is now known as djellemah
05:01:04FromGitter<barcharcraz> the FFI is disabled in the VM
05:01:43FromGitter<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:57FromGitter<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:12FromGitter<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:13waynecolvinif nim compiles down to C can i just download C output somewhere?
11:14:27flyxwaynecolvin: generated C sources of the Nim compiler are at https://github.com/nim-lang/csources
11:14:46waynecolvinthanks!
11:14:47flyxwaynecolvin: 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:25FromGitter<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:47zevlgwow! https://forum.nim-lang.org/t/2795
14:03:34FromGitter<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:18dom96zevlg: indeed :)
14:04:19nivundefined behaviour is the worst. it implies people know what they are doing, all evidence to the contrary
14:06:26dom96Varriount: I don't remember hearing that
14:07:01dom96I'm mainly referring to what I was told on Twitter
14:07:21dom96The person in question rejected Nim because "it compiles to C" and "C is full of undefined behaviour"
14:07:34nivthats kinda funny :)
14:07:53flyxso is asm
14:07:59niv"i dont like seatbelts, seatbelts are used in car crashes and those are dangerous"
14:08:00ehmryyea
14:08:36cheatfateAnd c is compiled to asm and asm is translated to binary code which is also full of undefined behavior
14:08:52ehmrythis is all running on interfaces to hardware that are full of UB
14:08:57dom96niv: haha
14:09:03nivand better not think about the hacks intel puts into their microcode, yeah
14:09:16flyxand if I go out the door into the real world, other people are also full of undefined behavior!
14:09:18cheatfateyeah and all this interfaces exists in world based on random chaos
14:09:29nivexistentialcrisis.gif
14:10:03ehmryjust 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:31flyxhe said and then a meteor crashed into his home
14:10:47nivjust imagine how much of your life runs on windows 98 still
14:11:15federico3my pacemaker! *grabs chest* *dies*
14:11:16*flyx misses the dinosaur mouse cursor
14:11:28nivflyx: now that you mention it ..
14:12:09*ehmry misses the custom sound schemes
14:12:18dom96So I'm currently attending a workshop on Angular 2 and it's really motivating me to start running Nim workshops.
14:12:33flyxyay!
14:12:41nivwhat would you do in a nim workshop?
14:13:08*devted quit (Quit: Sleeping.)
14:13:22dom96I could do everything from creating a web app using Jester to getting a nimkernel-like "OS" running.
14:13:28flyxbtw, some yaml guys and I put together a matrix of yaml implementations. so far, nimyaml is winning http://matrix.yaml.io/
14:13:33flyx*shameless self promotion*
14:13:57dom96flyx: oooh, nice!
14:14:03nivthats a frightening table
14:14:16*sz0 quit (Quit: Connection closed for inactivity)
14:14:25nivamazed how bad ruby looks on it
14:14:50dom96Yeah, I have a feeling that Rubyists use YAML rather extensively.
14:15:01nivi write a lot of ruby code - yeah, they do
14:15:07flyxbe aware that only the implementations tagged „event“ in the header are fully tested
14:15:10nivbut not really anything of the fancy stuff. its just for config
14:15:22ehmrya 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:27flyxfor others, we compare expected with actual json output
14:15:37flyxand that obvsly does not work for all test cases
14:15:40ehmryI don't appreciate the implications
14:15:43dom96ehmry: depends on the app
14:15:51FromGitter<Varriount> ehmry: Usually clients are doing something other than just listening on a socket.
14:16:06FromGitter<Varriount> Such as drawing GUIs, or doing some form of work.
14:16:09ehmryI mean, I don't know how much difference it makes
14:16:13nivasync adds complexity, but the nim implementation is pretty useful
14:16:29nivfor servers you HAVE to pick either an async/wait or threaded model, or it will be slow as a snail
14:16:46dom96If you're writing a CLI application like Nimble then sync is perfect.
14:17:22nivyeah. easiest, too. if you only have one customer that wants to run at a time, sync is fine
14:17:29ehmrysure, servers ought to be async
14:17:54nivis there a particular usecase you are unsure of?
14:18:32ehmryno, I'm just unsure about peppering wait throughout my code
14:18:39ehmry*await
14:18:53dom96You can also support both if you're brave :)
14:19:15dom96It's how httpclient is implemented: the wonderful {.multisync.} macro.
14:19:24nivmultisync O.o
14:19:34dom96But that's primarily useful for libraries.
14:19:45*nsf quit (Quit: WeeChat 1.7)
14:20:04nivoo, fancy
14:20:09nivthings i miss ..
14:20:28dom96https://nim-lang.org/news/2016_09_30_version_0_15_0_released.html#multisync-macro
14:20:35ehmryI'll look into it, I'm still writing libraries
14:20:45nivyeah google already hooked me up
14:20:56nivthis looks useful, i never bother with sync code if im targeting async anyways
14:20:59demi-tbh i think async is always the correct way to go for http networking
14:24:14dom96I improved this macro recently to support `Future[Socket | AsyncSocket]` (and similar) return types.
14:24:43dom96Nim's macros are truly freaking awesome.
14:25:24ehmryyea, its always going to be async if you go low enough
14:26:25ehmryyou realize this when you play with userspace IP stacks
14:29:26cheatfatewindows+iocp+threads is fast enough, linux+reuseport+threads is fast enough
14:29:38cheatfateso it depends
14:29:44cheatfatelike everything
14:29:45dom96futures add an overhead though
14:31:32nivim 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:39cheatfatedom96, i think with coroutines it is possible to avoid futures overhead
14:35:20dom96Yes, but that completely changes the way async works in Nim.
14:35:23dom96There would be no more 'await'
14:35:28dom96It would basically be Go.
14:38:14dom96flyx: surprised to see that this YAML matrix is written in Perl, I guess these guys couldn't be convinced to use Nim? :)
14:38:35flyxdom96: well they wrote the matrix generator, I wrote most of the test cases
14:38:46dom96Ahh, that's fair.
14:38:58dom96I'm gonna tweet about it :)
14:39:11flyxcan you hold back for a while?
14:39:21flyxwe still want to improve it
14:39:33AraqI 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:48nivperfection is the enemy of good enough to be tweeted out
14:39:49flyxe.g. SnakeYAML has a low-level API and we could implement events-based testing on it.
14:39:58Araqand I gave up. :P
14:40:17Araqcannot tell people their ideas are so wrong that you don't even know where to start ...
14:40:22nivAraq: 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:23dom96flyx: sure, let me know when it's okay to tweet
14:40:31flyxdom96: will do
14:41:09flyxI guess if you use a language that allows a variable to have multiple values at the same time, you have strange priorities.
14:43:07FromGitter<Varriount> @Araq Just hold up the whole "nested parenthesis" problem to them.
14:43:37GaveUpflyx: what was the criteria for including on the list?
14:44:21flyxGaveUp: one of us needed to be able to write an interface from the implementation to the test framework
14:44:41nivis the interface public somewhere?
14:44:50GaveUphah that was my next question
14:44:55*Ven joined #nim
14:45:17*chemist69 quit (Ping timeout: 240 seconds)
14:45:29flyxniv: 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:51nivcool.
14:46:10Araqhaving a bizarre broken primitive type system in the form of sigils is already a showstopper language problem for me ;-)
14:46:20flyxniv: though the data is autogenerated from https://github.com/yaml/yaml-test-suite/tree/master/test
14:46:29FromGitter<Varriount> dom95: Might also be a good hacker news submission
14:46:43Araqbut when you bring that up people argue it improves "readability".
14:46:44nivi just saw the github link on the matrix page itself. im kind of blind sometimes
14:46:56flyxniv: we're still in progress of specifying the data layout ^^
14:47:15demi-kinda disappointing to see y'all hold HN in such high regard
14:47:38dom96Varriount: Don't need me to submit there though
14:47:48FromGitter<Varriount> True..
14:48:11FromGitter<Varriount> demi-: It's a main mass of people interested in programming languages.
14:48:17flyxVarriount: well I would prefer if we could decide ourself when we deem the data good enough for a HN submission
14:48:22flyxbut well, it's already public
14:48:31dom96demi-: It brings a lot of traffic.
14:48:38FromGitter<Varriount> flyx: No, I'll respect what you want.
14:48:40dom96And generally they are fairly sane.
14:49:03dom96demi-: If you know of anything better then please let me know.
14:49:06flyxGaveUp: are you missing a yaml implementation on the list?
14:50:03Araqbtw, can we enable travis on OSX?
14:50:09*chemist69 joined #nim
14:50:24GaveUpflyx: rust one came to mind
14:51:45flyxGaveUp: 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:22flyxGaveUp: as for Rust, well, someone would need to write code that uses the parser to create the event list
14:52:43GaveUpflyx: yeah ... I make look at attempting it
14:53:08flyxGaveUp: if you want to, feel free to join #libyaml, we're supervising things there
14:56:29GaveUpbtw, 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:40FromGitter<raydf> Hello
14:58:58FromGitter<raydf> Is there any docs related to monkey patching a module?
14:59:17*Etheco joined #nim
15:02:24flyxGaveUp: the --- is the directives end marker, but it does not need any actual directives preceding it ;)
15:03:52GaveUpflyx: 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:47flyxGaveUp: well, if in doubt, file an issue and I will have a look at it
15:05:43FromGitter<raydf> Already figured it out
15:05:53GaveUpI'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:15FromGitter<Varriount> @tekjar I believe nimscript has a patchfile procedure
15:43:34ehmrydom96: multisync is great, makes debugging output cleaner
15:44:27ehmryand 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:53zachcartergot my spritebatch working with bgfx now
17:24:27dom96ehmry: 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:31krux02is here someone who know how to use nim in gdb?
18:04:29*yglukhov quit (Remote host closed the connection)
18:05:25dom96krux02: I know the basics
18:05:53krux02well, 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:31krux02I would like to be able to step to my program line by line and print local variables
18:07:41krux02but I could not do that
18:09:33dom96--debuginfo
18:09:47dom96and if you want Nim line numbers: --lineDir:on
18:10:07*yglukhov_ joined #nim
18:10:37FromGitter<Varriount> zachcarter: I assume you're using the C api, rather than the C++ one?
18:11:36zachcarterI believe so Varriount
18:11:37*yglukhov quit (Ping timeout: 260 seconds)
18:11:39zachcarterI didn’t write the bindings
18:14:00zachcarterso 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:17FromGitter<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:25dom96raydf: why do you want to do that?
18:24:18FromGitter<raydf> i'm watching nim files and on change would like a kill of the http server process and a nimble run
18:25:22dom96exec "kill" should work I think
18:25:38FromGitter<raydf> ok exec is the name
18:25:48FromGitter<raydf> thanks
18:25:51FromGitter<raydf> let me try
18:27:37krux02dom96: why is neither --debuginfo nor --lineDir:on in nim -h?
18:28:02dom96krux02: because it's in nim --advanced
18:28:18FromGitter<raydf> @dom96, didn't work ⏎ ⏎ `````` [https://gitter.im/nim-lang/Nim?at=58a49dc100c00c3d4f42bd44]
18:28:39dom96raydf: what's the error?
18:28:42krux02then you think debugging is only for advanced people?
18:29:16FromGitter<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:23FromGitter<raydf> @dom96, fixed it
18:35:31FromGitter<raydf> thanks for the tip.
18:35:57dom96krux02: I don't, and I don't think --advanced should be a thing.
18:36:43krux02I think all debug information should be enabled by default, and only disabled when specifying --release or something like that
18:36:57krux02becaues the main development build is the debug build, not he release build
18:51:55dom96perhaps 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:33FromGitter<konqoro> i think the correct parameter is --debugger:native
19:03:47*djellemah_ joined #nim
19:05:26dom96Looks like that's an alias for `--linedir:on --debuginfo`` https://github.com/nim-lang/Nim/blob/devel/compiler/commands.nim#L439
19:06:04FromGitter<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:20PMunchHmm, "/home/peter/.nimble/pkgs/ui-0.9/ui/rawui.nim(25, 12) Error: string literal expected"
19:47:53PMunchInstalled libui from my package manager and the ui package through nimble
19:48:20PMunchAnd I copied the sample from https://github.com/nim-lang/ui
19:50:25dom96You need devel nim
19:51:49PMunchAh
19:52:22PMunchMaybe the ui.nimble file should require a larger version then?
19:56:33*bjz joined #nim
19:57:56PMunchhttp://ix.io/1TtI
19:58:00PMunchNot much better
19:58:14PMunchhttp://ix.io/1TtJ
19:58:22PMunchThat's the Nim version now
19:59:21AraqPMunch: updating the install instructions
19:59:26FromGitter<raydf> @flyx, i'm trying to dump a nim object to a json stringstream, is there any code example of this working?
19:59:41FromGitter<raydf> I'm talking about NimYAML
20:00:40PMunchAraq, appreciate it :)
20:00:51PMunchWatched your Async Vodoo speech today by the way
20:00:52krux02dom96: 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:57PMunchGreat stuff
20:01:37Araqkrux02: can you elaborate of how more IO checks cause your code to fail?
20:02:07krux02Araq: I have no idea, but I double checked it, if it is the right commit
20:02:09krux02and it is
20:02:20krux02unless I faild at double checking, that is the right commit
20:02:25PMunchReally liked the template in a macro you showed off in the beginning. Should be practical for writing my own macros
20:02:27Araqbut it makes no sense
20:02:30krux02but the output has a newline in it
20:02:53Araqthe output is not affected by the IO checks
20:03:21krux02I mean not the output, I mean the commant itself has a newline between the arguments
20:03:49krux02that's why the compiler complains that there is no input file
20:03:58krux02it just has the newline before the input file
20:05:16krux02https://github.com/nim-lang/Nim/commit/794d36cf31d8f7debc2ede1f7792fdbcc0a1ef5e#diff-1c5a9419c0268c68067821d49bb27408R142
20:05:41krux02there you have a '\L' in the buffer instead of a '\l'
20:06:21krux02I 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:07krux02it'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:35Araqthe compiler doesn't use readLine iirc
20:08:12AraqPMunch: updated.
20:10:01krux02well, then I don't know
20:10:21*couven92 quit (Quit: Client disconnecting)
20:10:28Araqkrux02 what's your OS?
20:10:39krux02manjaro Linux
20:11:07*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:11:10PMunchThanks, what's the reason it has to be done that way?
20:14:29AraqPMunch: 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:04Araqthat was released before the cold war or something
20:15:13krux02PMunch: for template in a macro, I use `quote do:`, it's basically the same, just without an argument list
20:15:29krux02but Araq doesn't like it
20:15:57AraqAraq also has his reasons for his dislike. :P
20:16:31PMunchquote do?
20:16:48PMunchWait libui depends on Direct X?
20:17:01krux02I like the explicit thing `value`, it helps to distinguish ast from inserted nodes visually
20:17:37Araqwhat if my quote needs the backticks? quote do: proc `+` () ... ?
20:17:54Araqquoting always sucks ;-)
20:18:51krux02PMunch: http://ix.io/1TtS
20:19:13krux02well it doesn't
20:19:29krux02at least for me
20:21:04*bjz joined #nim
20:23:21Araqwell you know, I have no idea where your AntTweakBar project resides
20:24:09krux02git clone [email protected]:krux02/nimAntTweakBar
20:24:14krux02it is in the issue
20:24:18*brson quit (Quit: leaving)
20:24:24krux02at the end
20:25:45krux02here is a demo: https://www.youtube.com/watch?v=OEpsG2PGi-s
20:27:10*nsf joined #nim
20:30:08krux02does 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:00krux02when you think 'emacs' sounds weird, just replace it with 'visual gdb frontend'
20:32:21*bjz joined #nim
20:37:45PMunchHmm, any way to see the gcc command nim uses?
20:38:23*couven92 joined #nim
20:39:37Araq{.passC: "-I" & staticExec("nimble path AntTweakBar") & "/cAntTweakBar/include" .}
20:39:43Araqthis fails for me
20:39:51Araqshould I update my nimble?
20:41:55*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:41:57stisaPMunch try ``--verbosity:2`` or 3
20:42:02*brson joined #nim
20:45:51*bjz joined #nim
20:46:10PMunchthanks stisa :)
20:46:34Araqnimble path AntTweakBar
20:46:34Araq Tip: 1 messages have been suppressed, use --verbose to show them.
20:46:34Araq Error: Traceback (most recent call last)
20:46:34Araq ... nimble.nim(1079) nimble
20:46:35Araq ... nimble.nim(1022) doAction
20:46:36Araq ... nimble.nim(780) listPaths
20:46:37Araq ... At least one of the specified packages was not found
20:47:03krux02ah
20:47:18krux02yea you have to install it with nimble first, to use it
20:47:46krux02so 'nimble install' in the AntTweakBar folder should do it
20:48:25krux02that that when antTweakBar is installed, I can ask for it's path
20:52:33krux02yay, 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:04krux02my latest test failed with in "downloader.nim" with "cannot open 'ui'" is that my fault then?
21:01:26*Vladar joined #nim
21:02:29Araqno, I need to fix it
21:02:41Araqkrux02: you're right, it is that commit
21:03:00Araqbecause '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:42krux02yes I was sceptical, too, when I saw that commit
21:05:49*yglukhov joined #nim
21:05:50krux02that's why I double checked
21:10:54Araqok fixed
21:11:03*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:11:03Araqand appveyor should be green again too
21:11:57Araqoh and we should deprecate endOfFile :-)
21:13:27*Trustable joined #nim
21:13:57Araqkrux02: 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:47krux02ok, I will add strip to it now, even when it is fixed, good to know
21:15:20krux02but 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:41krux02so that I don't need to call staticExec in the first place
21:15:53*bjz joined #nim
21:16:30krux02creating a process, just to get to the path of a bundled header is not the fastest thing possible
21:19:36Araqoh yeah that whole thing is a total hack :P
21:19:44Araqwhat do you mean "include path"?
21:20:02Araqnimble 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:10Araqlooking 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:06krux02Araq: 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:30krux02but 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:27demi-why not use dynamic or static library linking?
22:11:28*pregressive quit (Ping timeout: 240 seconds)
22:11:44krux02because that library is not hugely available
22:12:08krux02and it would not really help, because then I would be required to trigger the compilation of AntTweakBar somehow into a library
22:12:19krux02I don't really like the idea of build files
22:12:35krux02a project should just be a set of files, not a set of script that build files
22:13:19krux02so I thought it would be the easiest idea to just add all files from AntTweakBar as C files to the project
22:13:41demi-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:02demi-you cannot have both, and it doesn't seem like nimble is meant to do the former of those two options really
22:14:07krux02yea that second option pretty much sucks for ant tweak bar
22:14:19demi-that is the truth for like 90% of code ever
22:14:26krux02I mean for SDL yes I agree, but not ant tweak bar
22:14:42demi-I don't see them as fundamentally different here
22:14:42krux02my solution doesn't suck
22:14:52krux02you just do nimble install, and there you go
22:14:56krux02batteries included
22:15:11demi-¯\_(ツ)_/¯
22:15:34Araqactually your implementation sucks quite a bit, but it's not like Nim offers something that's better
22:15:53krux02it was the best I could come up with
22:15:59demi-packaging stuff that isn't yours typically ends very poorly
22:16:41krux02I don't think that anybody will complain
22:16:43demi-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:45krux02well the problem with dependency resolution is, that it doesn't solve the problem when you throw more dependency managers at them
22:18:59demi-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:19Araqstrengths 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:36demi-you aren't wrong
22:27:19krux02well 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:59krux02ok 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:49libmanhttps://youtu.be/yVkrPH48k_I. :P
23:04:59libmanJust 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