<< 12-03-2017 >>

00:00:59*libman quit (Quit: Connection closed for inactivity)
00:04:14SusWombatAnyone in here using nim-mode in emacs?
00:15:56*Matthias247 quit (Read error: Connection reset by peer)
00:43:59*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
00:45:35demi-has anyone implemented any code that uses a plugin architecture in nim?
01:09:07*def-pri-pub joined #nim
01:25:17*bjz joined #nim
01:30:50*Guest45610 quit (Quit: ...)
01:35:01*vlad1777d quit (Quit: Leaving)
02:01:24*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
02:17:18def-pri-pubIs there such a thing in the nim standard library like a file system watcher? E.g. A proc that you call to watch a file for changes, and it shoots off an event when, well, a change is made
02:26:03def-pri-pubAlso, what's the timeout for this measured in?
02:26:03def-pri-pub
02:26:05def-pri-pubhttps://nim-lang.org/docs/osproc.html#waitForExit,Process,int
02:26:08def-pri-pubIs it milliseconds?
02:31:49*chemist69 quit (Ping timeout: 240 seconds)
02:37:38*xet7 joined #nim
02:39:03*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
02:45:42*chemist69 joined #nim
03:12:43*bjz joined #nim
03:30:24*LeNsTR|away joined #nim
03:32:36*zama_ joined #nim
03:33:14*pigmej_ joined #nim
03:34:19*Jesin quit (Quit: Leaving)
03:34:43*kier joined #nim
03:34:59*Araq_ joined #nim
03:35:15*d10n_ joined #nim
03:35:40*vqrs_ joined #nim
03:35:55*jackkv joined #nim
03:36:38*roygbiv quit (*.net *.split)
03:36:38*zachcarter quit (*.net *.split)
03:36:39*kier_ quit (*.net *.split)
03:36:39*lenstr quit (*.net *.split)
03:36:39*onionhammer quit (*.net *.split)
03:36:40*jackv quit (*.net *.split)
03:36:40*zama quit (*.net *.split)
03:36:40*EastByte_ quit (*.net *.split)
03:36:41*stisa quit (*.net *.split)
03:36:42*d10n quit (*.net *.split)
03:36:42*tstm quit (*.net *.split)
03:36:42*pigmej quit (*.net *.split)
03:36:42*vqrs quit (*.net *.split)
03:36:42*Araq quit (*.net *.split)
03:36:52*pigmej_ is now known as pigmej
03:40:20*zama_ quit (Changing host)
03:40:20*zama_ joined #nim
03:40:28*zama_ is now known as zama
03:47:30*rauce quit (Quit: WeeChat 1.7)
03:47:40*rauss joined #nim
03:49:20*21WAAR6LT joined #nim
03:49:20*zachcarter joined #nim
03:49:20*onionhammer joined #nim
03:49:20*EastByte_ joined #nim
03:49:20*stisa joined #nim
03:49:20*tstm joined #nim
03:55:39*girvo joined #nim
03:55:43*girvo waves hello
03:55:57*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
03:57:03*bjz joined #nim
03:57:11girvoIf I'm defining an ADT via a "case kind" statement in my object definition, is it possible to define a given property name? Currently, it's complaining about redefinition of hte property within the case statement :(
03:58:34girvohttps://hastebin.com/ohijetepoj.nim
04:35:11*byte512 quit (Ping timeout: 264 seconds)
04:51:45*girvo quit (Ping timeout: 256 seconds)
04:59:13cheatfatedef-pri-pub, timeout in milliseconds, and there no cross-platform file watcher in stdlib yet
05:00:23cheatfatedef-pri-pub, there only linux version in lib/fsmonitor.nim
05:27:00*girvo joined #nim
05:45:31*zachcarter quit (Quit: zachcarter)
05:50:45def-pri-pubIs the `events` module threadsafe?
05:54:57*gangstaguy joined #nim
05:56:18*nsf joined #nim
06:00:54*Jesin joined #nim
06:05:56*girvo quit (Ping timeout: 240 seconds)
06:14:04FromGitter<Varriount> zachcarter: Aww, no bgfx?
06:18:37*jivank quit (Quit: WeeChat 0.3.8)
06:34:53*chemist69 quit (Ping timeout: 256 seconds)
06:37:48*chemist69 joined #nim
06:52:21*arnetheduck joined #nim
07:02:02*def-pri-pub quit (Quit: leaving)
07:17:39*rokups joined #nim
07:36:31cheatfatedef-pri-pub: nope
07:41:19*PMunch quit (Quit: leaving)
07:43:30*21WAAR6LT quit (Quit: WeeChat 1.7)
08:11:00*bjz_ joined #nim
08:11:36*bjz quit (Ping timeout: 240 seconds)
08:32:31*deavmi joined #nim
08:46:32*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
08:53:19*bjz joined #nim
08:53:21*deavmi quit (Quit: deavmi)
08:59:09*gangstaguy quit (Quit: Connection closed for inactivity)
09:34:45*Matthias247 joined #nim
10:18:23*Gonzih quit (Quit: WeeChat 1.7)
10:25:33*smt__ quit (Ping timeout: 260 seconds)
10:26:10*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
10:31:38*Guest4568 quit (Quit: ...)
10:42:09*chemist69 quit (Ping timeout: 240 seconds)
10:44:43*chemist69 joined #nim
10:57:54*bjz joined #nim
11:18:31*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
11:20:29*bjz joined #nim
11:20:29*rauss quit (Read error: Connection reset by peer)
11:23:42*Vladar joined #nim
11:34:09*rauss joined #nim
11:37:53*Snircle joined #nim
12:02:45*xmonader joined #nim
12:16:44*synshroud joined #nim
12:18:19*elrood joined #nim
12:41:47*vlad1777d joined #nim
13:20:09*gokr joined #nim
13:28:26*vlad1777d quit (Quit: Leaving)
13:30:12*vlad1777d joined #nim
14:02:17*xet7 quit (Quit: Leaving)
14:07:29*synshroud quit (Quit: ZNC 1.6.4 - http://znc.in)
14:14:00*synshroud joined #nim
14:20:53*bjz_ joined #nim
14:21:31*zachcarter joined #nim
14:22:23*bjz quit (Ping timeout: 256 seconds)
14:23:19*couven92 joined #nim
14:31:44*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
14:34:35*elrood quit (Quit: Leaving)
14:36:16*Matthias247 quit (Read error: Connection reset by peer)
14:36:50*xet7 joined #nim
14:40:28*smt joined #nim
14:41:46*synshroud left #nim ("http://quassel-irc.org - Chat comfortably. Anywhere.")
15:01:17*gokr quit (Ping timeout: 260 seconds)
15:13:11FromGitter<Almynic> I installed aporia via nimble but the aporia executable doesn't start the ide. I'm under ubuntu gnome and use nim 0.16.0.
15:21:11Araq_works for me.
15:23:54FromGitter<Almynic> I will try to compile aporia from source maybe that will work
15:27:16*sz0 joined #nim
15:28:16Araq_nimble does compile aporia from source
15:30:02FromGitter<Almynic> Ok, now I tried it with nimble install aporia@#head and it still doesn't start ...
15:31:27cheatfateAlmynic: ubuntu gnome is gtk3 based or gtk2 based?
15:33:40FromGitter<Almynic> i think it's gtk3 based
15:33:52cheatfateaporia is gtk2 based
15:33:52FromGitter<Almynic> j
15:34:35FromGitter<Almynic> but i installed gtk2 so it should still work
15:37:55FromGitter<Araq> @Almynic still like to translate Aporia to Arabic?
15:39:25*vendethiel joined #nim
15:46:53FromGitter<Almynic> ok, are there any good alternatives to aporia?
15:48:21FromGitter<Araq> VS Code. please answer my question.
15:49:30FromGitter<Almynic> no i'm don't speak arabic my family name is french not arabic ;)
15:52:17FromGitter<Almynic> I think you mistook me for someone else.
15:53:52FromGitter<Araq> we'll see about that.
15:53:53*Snircle quit (Ping timeout: 246 seconds)
15:55:10*Snircle joined #nim
16:15:45*gangstaguy joined #nim
16:21:28*couven92 quit (Ping timeout: 240 seconds)
16:26:47*vlad1777d quit (Remote host closed the connection)
16:29:29*kulelu88 joined #nim
16:30:41demi-is there any way to do string->type creation at runtime?
16:31:25demi-like, if the object type already exists, but i'm telling it to initialize a new object i might not know the name of?
16:35:14dom96Almynic: The Nimble version that Nim 0.16.0 comes with has a bug that causes executables created by it to be invalid.
16:35:49dom96Almynic: To fix this you can upgrade to Nimble 0.8.4.
16:36:58Araq_demi-: and then what? Nim is statically typed there is little you could do with such an object.
16:38:24dom96Almynic: Using VS Code nowadays is probably the right way to go though.
16:38:55*Araq_ is now known as Araq
16:38:58demi-Araq_: I want to dynamically load in modules and run them
16:41:55demi-to create plugins for an application, if i standardize the API that these plugins use then i could define the init point and then run them, though the limiting factor here is if i can do that initial type association from a string or something -- otherwise i'll have to fall back on linker behavior which wouldn't necessarily make this very portable
16:46:50AraqI can't really follow. dynamic loading doesn't mean you don't know the types. types are an approximation of the runtime behaviour. if you don't know much about the incoming data, your type can easily reflect this.
16:47:21Araqcase in point: Everything can be modeled as a Nim JsonNode.
16:50:35*chemist69 quit (Ping timeout: 246 seconds)
16:52:03demi-ok, let me back up. I want to build something with a plugin-based architecture. the application will do one rather general thing, and each plugin is designed to interface with this general thing. the application will need to know how to get the plugins to do the individual specific logic that they contain; the way i'm most familiar with this design is through a statically (and stringly) declared class name or
16:52:06demi-function in the metadata for the plugin's code. This describes the entry-point. what i'm looking for is the best way to describe that entry-point in nim to be able to interact with the plugin code at runtime.
16:53:48*chemist69 joined #nim
16:54:23*yeeve quit (Ping timeout: 264 seconds)
16:56:33Araqthat's just
16:56:45Araqtype PluginRoot = ref object of RootObj
16:57:03Araqproc create*(): PluginRoot # entry point in your DLL
16:57:31Araqproc destroy*(x: PluginRoot) # plugin is destroyed
16:58:08demi-would't that conflict if i have multiple of them?
16:59:45Araqoh yeah, *shrug*, so make it proc registerPlugin(name: string; factory: proc (): Plugin)
17:03:45demi-it looks like the dynlib functionally is directly tied to the underlying C implementation, is there a way to do the same thing with nim as it does with C?
17:09:35*yeeve joined #nim
17:22:04*Arrrr joined #nim
17:22:04*Arrrr quit (Changing host)
17:22:04*Arrrr joined #nim
17:34:22*sz0 quit (Quit: Connection closed for inactivity)
17:46:57*arnetheduck quit (Ping timeout: 260 seconds)
17:50:34*Trustable joined #nim
18:01:44*couven92 joined #nim
18:02:50*LeNsTR|away is now known as lenstr
18:03:09*lenstr quit (Changing host)
18:03:09*lenstr joined #nim
18:19:21*Matthias247 joined #nim
18:28:12*rosshadden joined #nim
18:29:09*gangstaguy quit (Quit: Connection closed for inactivity)
18:34:52*libman joined #nim
18:39:23*def-pri-pub joined #nim
18:42:06def-pri-pubIs there a simple library for audio playback in Nim (or a wrapper)?
18:42:36def-pri-pubI'm looking to do that Linux Game Jam, but I want to avoid using SDL2 or SFML, and do something that a bit more raw (and fun).
18:43:20def-pri-pubi.e., I want to slap together other audio/visual components instead of relying on one complete package.
18:44:20stisadef-pri-pub : maybe https://github.com/zacharycarter/soloud-nim ? Never used it though
18:51:09zachcarterhaving trouble getting that to work on linux :/
18:51:15zachcarterworks great on OSX though
18:52:38dom96def-pri-pub: I think you should just use SDL or SFML
18:53:37zachcarterdom96: neither of those options are ideal for some tasks
18:53:53zachcarterI guess it depends on the scope of what you’re trying to do though
18:54:29demi-dom96: i put a PR up for nimble to enhance some of the behavior around publishing packages
18:55:34zachcarterdef-pri-pub: I’m working on a cross platform 2d framework for Nim using Modern OpenGL and perhaps OpenGL ES if I get that far, it’s lower level than SDL2, maybe you’d want to consider contributing if that sounds interesting to you
19:04:13zachcarterdef-pri-pub: https://github.com/zacharycarter/dEngine
19:11:06*nsf quit (Quit: WeeChat 1.7)
19:13:08*Sentreen quit (Quit: WeeChat 1.4)
19:15:08dom96demi-: yes, thank you, I saw. Didn't get a chance to review yet.
19:26:04*vlad1777d joined #nim
19:26:29*vlad1777d quit (Remote host closed the connection)
19:31:22demi-no worries
19:38:08*gokr joined #nim
19:38:39Calinou>low-level >fun
19:38:41Calinouchoose one :)
19:46:42*Sentreen joined #nim
19:48:41Araqlow-level is fun.
19:51:40zachcarterI agree
19:51:48zachcarterand I don’t even work at that low of a level
19:52:00zachcarterbut writing your own opengl draw calls is way more challenging and fun than writing sdl.drawrect
19:52:02zachcarteror whatever
19:53:09*Ven joined #nim
19:53:40zachcarterI’m using this module - https://nim-lang.org/docs/events.html
19:54:11zachcarterI’m wondering how exactly I’m supposed to be using or customizing EventArgs
19:54:21zachcarterright now I have my own object : dEngineEventMessage* = object of EventArgs
19:54:43zachcarterbut when I try to cast eventargs into that type in my event handler, it doesn’t work, anyone have any ideas / ever used the module before
19:57:54zachcarternevermind I think I figured it out
20:03:41ArrrrThe year is 2050. Still no `clear` proc.
20:04:02ArrrrDo people actually `setLen seq, 0`? Or just define a global proc for clearing seqs?
20:08:02AraqArrrr: I use setLen 0 all the time, but tables need a clear. PR please.
20:09:30ArrrrBut tables do have a clear, as far as i'm concerned
20:10:48Araqoh? must have been a recent addition then :P
20:11:36ArrrrAlso, coffeepot tried it before but you rejected it because system was too packed already.
20:11:46*vlad1777d joined #nim
20:12:14*rokups quit (Quit: Connection closed for inactivity)
20:14:02*vlad1777d quit (Remote host closed the connection)
20:18:44*bjz joined #nim
20:25:38*vlad1777d joined #nim
20:26:10Araqyou can have your own implicitly imported modules via --import
20:26:32*vlad1777d quit (Remote host closed the connection)
20:26:37Araqand add template clear*(x) = setLen(x, 0) to it
20:27:24Araqwe could make setLen default to take 0 but it will make dom96 angry
20:28:16cheatfatelow-level is fun + 1
20:29:25ArrrrIn my opinion default to 0 would not be obvious, given the nature of the proc. Now, you can understand it once you have written enough nims
20:29:26cheatfateand maybe better, there is no real fun if there is no low-level
20:30:55dom96Yeah, that's a bad idea.
20:36:12*vlad1777d joined #nim
20:36:45*Arrrr quit (Quit: Leaving.)
20:40:53*yeeve quit (Ping timeout: 246 seconds)
20:43:16*vlad1777d quit (Remote host closed the connection)
20:51:45*yeeve joined #nim
21:11:47SusWombathow do i do a function that accepts a 2 dimensional array of any size?
21:12:07SusWombatproc*
21:13:15stisaSusWombat `proc myfn [N,M:static[int]] (m:array[N,array[M,float]]) = ...` I think
21:13:16*dexterk__ joined #nim
21:13:35*dexterk_ quit (Ping timeout: 264 seconds)
21:15:01SusWombatok thx
21:25:55def-pri-pubi think i asked this last night but I don't recall seeing an answer: Is the `events` module threadsafe?
21:26:59*PMunch joined #nim
21:27:43*Vladar quit (Quit: Leaving)
21:33:57*bozaloshtsh joined #nim
21:39:46def-pri-pubstisa: thanks for that link, but soloud was failing to build on my system.
21:41:18zachcarterdef-pri-pub: the framework moved to : https://github.com/fragworks/frag
21:43:30Araqdef-pri-pub: dunno, but it's tiny, just read its code
21:44:34*Gonzih joined #nim
21:55:13*nsf joined #nim
21:57:12*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
22:10:03*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
22:14:28*bozaloshtsh quit (Quit: WeeChat 1.7)
22:15:15*bozaloshtsh joined #nim
22:30:25ldleworkIs there a way to interface with Golang code?
22:31:55PMunchhttps://christine.website/blog/ffi-ing-golang-from-nim-for-fun-and-profit-2015-12-20
22:33:14PMunchSeems like making a dll and calling functions from the dll works
22:33:46ldleworkI'm looking to call the docker client code from Nim
22:33:57ldleworkPMunch: do you have any context about doing something like that?
22:34:07PMunchWhat do you mean?
22:34:43PMunchHave you looked at this by the way: https://github.com/kamilchm/docker-nim ?
22:35:15PMunchOr this: https://github.com/tulayang/asyncdocker ?
22:35:20*vendethiel quit (Ping timeout: 246 seconds)
22:35:51ldleworkthe former is basically nothing
22:36:02*vendethiel joined #nim
22:36:05ldleworkthe latter I haven't been able to get to work with unix sockets (or otherwise really)
22:36:38PMunchHmm, that's a shame
22:36:42PMunchWhat seems to be the problem?
22:37:58ldleworkI just dont get any output
22:38:43PMunchHmm, strange
22:39:17ldleworkIll try to get a minimal example
22:39:48PMunchBut yeah, as I said. Seems like using Go (if that's the route you want to go) would require you to basically expose the functionality you need through a dll.
22:41:50*ftsf_ joined #nim
22:45:53ldleworkI wonder if docker puts out a go dll
22:46:30*Trustable quit (Remote host closed the connection)
22:50:32ldleworkXe: you around?
22:51:40*girvo joined #nim
22:53:42ldleworkHmm, does httpclient really not support unix sockets?!
22:54:50PMunchPretty sure that it does
22:56:02ldleworkA minimal example doesn't work for me
22:56:18ldlework let resp = client.get("/var/lib/docker.sock/v1.25/info")
22:56:53ftsf_ldlework, what happens?
22:57:11ldleworkliterally nothing
22:57:18ldleworkwhen echoing resp
22:57:41ldleworkif I change it to the http://127.0.0.1:2375/v1.25/info version I get output
22:58:23PMunchMine works fine
22:58:42ldlework...?
22:58:53PMunchTrying httpclient here
22:58:55PMunchOn linux
22:58:56ldleworkah crap
22:58:58PMunchAnd it works fine
22:59:02ldlework/var/lib /var/run
22:59:03ldleworkfml
22:59:06PMunch:P
22:59:13ldleworkstill doesn't work
22:59:15PMunchBut it's still bad that it doesn't give you an error
22:59:24ldleworkError: unhandled exception:
22:59:25ldleworkAdditional info: Name or service not known [OSError]
22:59:44PMunchAh
22:59:49ldlework let resp = client.get("/var/runk/docker.sock/v1.25/info")
22:59:57ldleworkoops runk
22:59:59PMunchI don't think it works with local paths does it?
23:00:08ldleworksame
23:00:14ldleworkwhat do you mean local paths
23:00:14PMunchOr maybe you have to use file://
23:00:18ldleworkwhere-else would the socket be
23:00:20ldleworkok
23:00:42PMunchI mean httpclient is meant for HTTP
23:00:45ldleworkdifferent error
23:00:50ldleworkError: unhandled exception: Expected authority got nothing. [ValueError]
23:01:10ldleworkwonder what that means
23:01:26PMunchhttps://nim-lang.org/docs/streams.html
23:01:35ldleworkIf I ever make a programming language, I will make it so that it produces wiki links
23:01:39PMunchMaybe that's what you're looking for?
23:01:49ldleworkso that I can assume the user has no fucking clue what an "authority" is in this context
23:01:49ldleworklol
23:02:15ldleworkPMunch: why would that be what I'm looking for?
23:02:36PMunchIt seems like you're trying to read a file with a httpclient
23:02:41PMunchWhich probably isn't going to work..
23:02:44*libman quit (Quit: Connection closed for inactivity)
23:02:52PMunchSince it's not served over the http protocol..
23:03:05ldleworkPMunch: ...
23:03:18ldleworkPMunch: you can speak http or any other protocol over a unix socket file.
23:03:39ldleworkPMunch: you know that all sockets of any kind of represented as file in linux?
23:03:48PMunchYeah
23:04:02PMunchOh, so your path is a socket
23:04:04PMunchRight
23:04:06PMunchHmm
23:04:06ldleworkI don't want to read a file over httpclient, I want to use a file as a socket
23:04:08ldleworkyah
23:04:10ldlework<3
23:05:06ldleworkPMunch: huh https://forum.nim-lang.org/t/1206
23:05:26ldleworkdom96: poke
23:05:48PMunchhttps://nim-lang.org/0.11.0/sockets.html
23:05:52PMunchLook at the Domain enum
23:05:56PMunchAF_UNIX
23:06:16ldleworkWhat about it
23:08:41ldleworkYou can see the guy in the forum post started using raw sockets to implement his docker client to get unix-file socket support: https://github.com/kamilchm/docker-nim/blob/master/client.nim
23:08:47ldleworklol and then apparently gave up
23:08:49*ldlework sighs
23:09:07PMunchHmm
23:09:15PMunchWell, I'm off to bed
23:09:24PMunchHope you find a solution :)
23:09:26*PMunch quit (Quit: leaving)
23:09:27ldleworkdoh
23:11:16*nsf quit (Quit: WeeChat 1.7)
23:14:29*gokr quit (Ping timeout: 258 seconds)
23:18:40Xeldlework: one problem with unix sockets like that
23:18:49Xethere's no delimiter
23:19:03Xebetween the HTTP route and socket path that is
23:19:56ldleworkXe: usually I think, the path is greedly consumed until there is a file, then the rest is the path
23:20:17Xedoes asynchttpclient behave like that?
23:20:45ldleworkI dont know how any of this nim-stuff behaves. I literally just decided to use nim yesterday :)
23:20:59ldleworkIt doesn't work unix sockets from what I can tell
23:22:28ftsf_well it expects a _url_ as the first argument
23:23:38*vlad1777d joined #nim
23:24:12ldleworkWhere does the type Future come from
23:24:15ftsf_there's no standard url scheme for http over a unix socket afaik.
23:24:22ldleworkwe still got that mega index?
23:24:33ldleworkyou should put that mega index in the topic btw
23:25:18ftsf_./includes/asyncfutures.nim
23:25:29ftsf_ /usr/lib/nim/includes/asyncfutures.nim
23:25:42ldleworkhow come I can't import it?
23:25:47ldleworkis it built in?
23:26:06ftsf_i don't know?
23:26:22ftsf_can you use it without importing it?
23:27:13ldleworklike
23:27:26ldleworkwhat the fuck is the `Future` type being referred to in the docs here? https://nim-lang.org/docs/httpclient.html
23:28:03ldleworkGod I love Nim, but I have this bizare juxtaposiion of feeling more productive than any other language and yet constantly falling into leaf covered pits.
23:28:17ftsf_are you familiar with Promises?
23:28:35ftsf_ldlework, that's a good description of nim =)
23:28:37ldleworkC#, I just MSDN and I'm -never- wondering how any part of the language or language ecosystem works for more than the time it takes me to skim the article
23:28:44ftsf_it's a young language
23:28:58ftsf_still alpha
23:29:03ldleworklike I think there should be a MSDN/MDN worship da
23:29:05ldleworky
23:29:27stisaidlework: https://nim-lang.org/docs/asyncdispatch.html if I remember correctly, this explains futures
23:29:28*bjz joined #nim
23:29:30ldleworkJust to bring our appreciation of solid coheisive documentation the forefront of society's consciousness :)
23:29:48ldleworkstisa: thanks I'll read
23:32:54*bjz quit (Client Quit)
23:35:11ldleworkI kinda feel like nim documentation should group procs by types
23:36:27ftsf_that'd be nice, would be cool if you could specify a type/types and it'd return all procs that match that type
23:36:56stisato the left under the search box, change "group by" from section to type?
23:38:33ftsf_stisa, ooh handy, kinda
23:40:27ldleworkundeclared identifier: 'await' ?
23:40:48ldleworkdon't tell me I have to fucking import the await identifier
23:41:01ftsf_did you use {.async.} ?
23:41:34*dexterk joined #nim
23:41:37*dexterk__ quit (Ping timeout: 260 seconds)
23:41:46ftsf_actually, don't listen to me, i've never really played with the async stuff
23:41:59ldleworkwhat is the right way to write this
23:42:01ldleworkimport asyncdispatch
23:42:03ldleworkimport httpclient
23:42:05ldleworkvar client = newAsyncHttpClient()
23:42:07ldleworkproc get: {.async.} =
23:42:09ldlework await promise = client.getContent("http:///var/run/docker.sock/v1.25/info")
23:42:11ldleworkecho get
23:43:54ldleworkok I see some obvious errors
23:44:01ldleworkjust bad nimlang on my part
23:45:35ldleworkbut I still don't get it
23:45:54ftsf_what don't you get? the future/async stuff?
23:46:06*couven92 quit (Quit: Client Disconnecting)
23:46:10ldleworkI just don't know how to write this snippet the way that makes nim happy
23:46:16ldleworkan example would be crystallizing
23:46:34ldleworkI'd appreciate anyone who would just copy this to a gist and make it right
23:47:03ftsf_does the synchronous version work ok?
23:47:52ldleworkare you trollin me? :P
23:47:56ftsf_no...
23:48:01ldleworkheh ok
23:48:11ftsf_i'm curious if the problem is with the async stuff or the http connection in general
23:49:31ftsf_"Note: You will need to run asynchronous examples in an async proc otherwise you will get an Undeclared identifier: 'await' error."
23:49:48ftsf_would be good if the docs explained what that was
23:49:48ldleworkI did that though
23:50:04ldleworkimport httpclient
23:50:06ldleworkvar client = newHttpClient()
23:50:08ldleworkproc get: string =
23:50:10ldlework result = client.getContent("http:///var/run/docker.sock/v1.25/info")
23:50:12ldleworkecho get()
23:50:14ldleworkthis doesn't work either
23:50:17ldleworkError: unhandled exception: Expected authority got nothing. [ValueError]
23:50:52ldleworkhow long have I been at this
23:51:15ldlework3 hours and 50 minutes
23:51:25Xewhy not wrap /usr/bin/docker
23:51:32ldleworkI'm gonna switch to C# mono and see how far I get in that time.
23:51:38ldleworkXe: don't be insultinng
23:53:56ftsf_ldlework, https://gist.github.com/ftsf/2b74405267a3300f483ed83aebafd9a0
23:54:01ftsf_got a working thing happening
23:54:43*ldlework looks
23:55:43ldleworksill no workie on the socket file though
23:55:50ftsf_no, it's not going to work for a socket file
23:55:59ftsf_because you'd need a http over unix socket url
23:56:02ftsf_which doesn't exist
23:56:17ldleworkit does exist though
23:56:20ftsf_could try "http+unix://foo/bar" but doubt it's implemented
23:56:23ldleworkmaybe not for nim...
23:56:41*tax joined #nim
23:56:44ldleworktalking http over unix sockets is normalized
23:56:54ftsf_there's no standard url type for it afaik
23:57:08ftsf_you can talk http over the socket once you're connected
23:57:21ftsf_but there's no url form for connecting to a unix socket to speak http
23:57:28taxis nim any easier to learn than haxe? and what are the nim perks otherwise?
23:57:29ftsf_you can open a unix socket and then talk http over it
23:57:59ftsf_ldlework, you might have an easier time using lower level sockets rather than httpclient
23:58:04ldleworkI think the standard is unix+http://
23:58:23*Matthias247 quit (Read error: Connection reset by peer)
23:58:30ldleworkftsf_: no, I am tired of wasting my life on this kind of thing heh
23:58:37ftsf_ldlework, problem is it's not a defined "standard"
23:58:48ldleworkftsf_: yeah its just used everywhere I look
23:58:56ldleworkyou're technically right though!
23:59:30ftsf_so people implementing http clients aren't going to add support for something not in the standards unless there's demand for it
23:59:44ldleworkhonestly though, starting right now, with no C# of any kind on my machine
23:59:51ldleworkgonna try to solve the same problem and see how bad it is