<< 29-03-2017 >>

00:00:54*ftsf quit (Remote host closed the connection)
00:02:38SusWombattask*
00:03:11ftsf_https://nim-lang.org/docs/osproc.html#terminate,Process ?
00:04:02SusWombatftsf_, can i use that on a spawned task?
00:04:15ftsf_what do you mean by a "spawned task" ?
00:04:23SusWombatftsf_, i mean on code like "input = spawn readline(stdin)"
00:05:00ftsf_ahh threadpool stuff, i'm not sure
00:06:28SusWombatftsf_, thanks anyway!
00:06:55*arnetheduck joined #nim
00:16:09*rauss joined #nim
00:25:11*zachcarter quit (Read error: Connection reset by peer)
00:25:28*zachcarter joined #nim
00:30:04*def-pri-pub joined #nim
00:39:07*yglukhov joined #nim
00:42:34*user0___ quit (Quit: user0___)
00:43:29*yglukhov quit (Ping timeout: 240 seconds)
00:56:47*roygbiv quit (Quit: ™)
01:06:29*vivus quit (Quit: Leaving)
01:37:37*chemist69 quit (Ping timeout: 260 seconds)
01:51:03*chemist69 joined #nim
02:17:47*Serenit0r joined #nim
02:21:09*Serenitor quit (Ping timeout: 240 seconds)
02:23:49*Serenit0r quit (Quit: Leaving)
02:41:58zachcarterbleh once again in C / Nim interop hell
02:42:49ftsf_zachcarter, what's the problem?
02:43:42zachcarterit’s complicated as usual
02:43:49ftsf_oh dear
02:44:01zachcarterI’m trying to integrate with the Spine C Runtime
02:44:08zachcarterhttp://esotericsoftware.com/spine-in-depth
02:44:09zachcarteris spine
02:44:21ftsf_ahh
02:44:29zachcartertheir C runtime is here : https://github.com/EsotericSoftware/spine-runtimes
02:44:39zachcarterin the folder spine-c
02:44:44zachcarterI’ve already wrapped it
02:44:53zachcarterbindings are working and all that
02:45:19zachcarterthe author of the C runtime did this funky thing, where he allowed you to write your own methods and he stores them in a vtable
02:45:37zachcarteressentially allowing for you to write your own implementations for some methods
02:45:42zachcarterso here’s an example of that:
02:45:51zachcarterhttps://github.com/EsotericSoftware/spine-runtimes/blob/c0fdc454a2fb8df095aa47c252c20961a8059257/spine-cocos2dx/src/spine/Cocos2dAttachmentLoader.cpp
02:45:55zachcarteris the coscos2d attachment loader
02:46:20zachcarterwhich supplies custom implementations called here : https://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/AttachmentLoader.c
02:47:14zachcarterI’ve created my own attachment loader: https://gist.github.com/zacharycarter/cd34f6c93ac2755ca464f763ba2b8e48
02:47:58zachcarterbut when I try to use it ala: https://github.com/EsotericSoftware/spine-runtimes/blob/c0fdc454a2fb8df095aa47c252c20961a8059257/spine-cocos2dx/example/Classes/BatchingExample.cpp#L50-L59
02:48:03zachcarterI get EXC BAD ACCESS exceptions :/
02:48:05def-pri-pubis frag right now trying to target the C backend or C++ one by default?
02:48:10zachcarterthe C backend
02:48:27zachcarternever C++ for frag
02:48:27def-pri-pubah, good
02:48:40def-pri-pubwhatabout JS?
02:48:44zachcarterI get those exceptions specifically on this line
02:48:58def-pri-pubI don't really like writing JS, but I'd rather hav things that compile to it.
02:49:03zachcarterhttps://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/AttachmentLoader.c#L74
02:49:20zachcarterI’m guessing because the whole vtable thing isn’t working / being populated correctly
02:49:22zachcarterI’m not really sure
02:49:36zachcarterdef-pri-pub: JS is a possibility
02:49:54zachcarterI haven’t explored web targets too much but it’s on my radar
02:50:03def-pri-pubthere is always the emscripten target, but that SDL dep makes a bit of an issue right now
02:50:22def-pri-pubWorking with emscripten can also be a bit of a pain in the but
02:50:29zachcarteryeah I can potentially replace that with something else that’s web friendly
02:50:30ftsf_def-pri-pub, SDL works on emscripten, but it's a pain with the GC
02:50:50def-pri-pubftsf_: What about SDL_mixer, SDL_image, SDL_ttf
02:51:07ftsf_*shrug* they're external to SDL
02:51:11def-pri-pubYou know, those other libraries that if your using SDL, you might as well use anwyways?
02:51:27ftsf_none of them are required
02:51:39def-pri-pubBut they make your life easier if you're writing and SDL app
02:52:09ftsf_they're all pretty unmaintained afaict, easier to use stb libraries for image + fonts.
02:52:24ftsf_mixer is more difficult to replace, but not that hard to do your own mixing with SDL's audio
02:53:21def-pri-pubHas anyone made an stb ttf wrapper yet?
02:53:58zachcarteronly thing I’ve done with TTF is with opengl and whatever that font loading lib is
02:54:15zachcarterwel lthat’s a lie I’ve also done bitmap fonts and signed distance field fonts
02:54:25zachcarterbut those weren’t TTF fonts
02:54:45ftsf_def-pri-pub, not sure, but they're very easy to wrap
02:55:30def-pri-pubwell, I did one of them :]
02:55:46def-pri-pubI've paid my nimble dues
02:55:51ftsf_=)
02:57:06*BitPuffin|osx quit (Ping timeout: 240 seconds)
02:57:25zachcarterthis gd spine C runtime code is an abomination
02:57:29zachcartergood thing araq isn’t here right now
02:57:39def-pri-pubshow me
02:57:52zachcarterhttps://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/AttachmentLoader.c#L74
02:58:07zachcarterall those gd function pointers
02:58:55zachcartermight as well have just used C++ and said you’re screwed if you’re using C
02:59:07zachcarterbecause I’m pretty much screwed trying to integrate with this
02:59:10zachcarter:D
02:59:17def-pri-pubhttp://i0.kym-cdn.com/photos/images/newsfeed/000/648/220/67b.jpg
02:59:26zachcarterhahaha
03:01:04*libman quit (Quit: Connection closed for inactivity)
03:05:01FromGitter<Varriount> zachcarter: You might be able to do something with tempalates.
03:05:04FromGitter<Varriount> *templates
03:05:22FromGitter<Varriount> Nim can handle function pointers though.
03:05:43zachcarteryeah I don’t think it’s a problem with Nim
03:05:53zachcarterI’m not sure where the problem lies to be honest
03:06:31zachcarterI just know that on that line I shared when he tries to do the vtable lookup to the function I passed into the init - an exc bad access exception gets thrown
03:06:41zachcartertrying to debug in lldb but not getting anywhere really
03:06:56FromGitter<Varriount> zachcarter: Make sure that the calling convention matches up.
03:07:12zachcarterokay I’ll double check that
03:07:36zachcarterI’m wondering if it doesn’t have to do with the fact that I’m using a ref and not a ptr
03:07:42zachcartereven though a ref is just a GC’d pointer
03:07:53zachcarterand I’m trying to cast a ref into a ptr
03:08:43FromGitter<Varriount> You can try inspecting the generated C code. It's not that bad to look at.
03:13:04*krux02 quit (Remote host closed the connection)
03:13:28*gsingh93 quit (Ping timeout: 240 seconds)
03:14:16*Jesin joined #nim
03:15:59*gsingh93 joined #nim
03:18:46FromGitter<Varriount> zachcarter: Any other questions?
03:18:57zachcarterI don’t think so, thank you Varriount
03:20:44*yglukhov joined #nim
03:21:31FromGitter<Varriount> I don't really have any other ideas on what could be the problem. You would need to see where exactly the bad access was coming from - the vtable access, or the function call
03:21:57FromGitter<Varriount> zachcarter: You might also try marking the function table with the '{.pure.}' pragma
03:22:21FromGitter<Varriount> Just in case the type information Nim adds is interfering.
03:22:38zachcarterhmm okay
03:25:25*yglukhov quit (Ping timeout: 258 seconds)
03:25:34FromGitter<Varriount> zachcarter: Is this a C binding to a C++ library? If so, ensure that everything has been compiled with the same compiler.
03:25:52zachcarternope it’s just a C lib I’m binding to
03:27:24ftsf_c lib with vtables?
03:40:23FromGitter<Varriount> ftsf_: Ever used COM?
03:40:38ftsf_Varriount, fortunately not
03:42:06*ftsf_ quit (Quit: :q!)
03:43:46FromGitter<Varriount> ftsf: Essentially, every COM object is a structure full of vtables.
03:47:18*hcorion quit (Quit: Konversation terminated!)
03:48:13*def-pri-pub quit (Quit: leaving)
05:21:14cheatfateCOM object is structure of functions or 1 vtable but not many
05:21:21cheatfatevtables
05:54:43*windows quit (Ping timeout: 245 seconds)
05:56:50*SunDwarf joined #nim
06:22:16*nsf joined #nim
06:22:45*Jesin quit (Ping timeout: 260 seconds)
06:44:20*yglukhov joined #nim
06:49:28*rokups joined #nim
06:54:25*rauss quit (Quit: WeeChat 1.7)
07:09:59*Tiberium joined #nim
07:17:25Tiberiumstisa, just found your tutorial - http://stisa.space/articles/compile-nim-on-android/ . Maybe you can translate this tutorial into termux package?
07:37:19*bjz joined #nim
07:39:42FromGitter<stisa> Tiberium : I will look into it, I also need to rewrite that tutorial as it has become a bit of a mess
07:42:17*vlad1777d joined #nim
07:55:55*Arrrr joined #nim
07:55:58*Arrrr quit (Changing host)
07:55:58*Arrrr joined #nim
08:20:02*Vladar joined #nim
09:11:12*couven92 joined #nim
09:11:29*couven92 quit (Client Quit)
09:27:02Tiberiumcan I pass an arbitrary GCC compiler to nim c -cc? like nim c --cc:i686-pc-toaru-gcc --os:standalone hellotoaru.nim
09:27:58def-Tiberium: --cc:gcc --gcc.exe:i686-pc-toaru-gcc
09:28:17def-and --gcc.linkerexe:i686-pc-toaru-gcc
09:28:44Tiberiumdef-, thanks
09:31:49Tiberiumwhat can be the reason of "Error: system module needs 'nimFrame' " ?
09:32:21def-your os:standalone
09:33:21Tiberiumso there's no way?
09:33:29Tiberiumto compile it if this error happens
09:33:32def-i don't know
09:36:58Araq--stackTrace: off
09:37:27FromGitter<Varriount> Tiberium: If you use --os:standalone, you need to implement certain structures yourself
09:37:42Tiberiumdom96, and one more question about rate limiting: what if two api calls happens almost in one time? they will both sleep sadly. I want to limit it to something like: do 3req/s as fast as you can, and then sleep for 1 sec
09:38:01TiberiumVarriount: thanks about pointing it out
09:38:25AraqTiberium: I've seen no such support in any language's stdlib
09:38:34Araqyou need to write this logic on your own.
09:41:21Araqyou can also use an external proxy for this
09:41:29Araqand don't write anything.
09:42:50TiberiumAraq, no, I don't want to have many external dependencies, so I'll write it on my own
09:44:41Araqgood boy.
09:52:38Tiberiumcan I have a `data` proc so I can do this: var info = data{"message":"Test", "peer_id": "123"} ?
09:52:55TiberiumI want to wrap it around strtabs
09:53:08Tiberiumah
09:53:31Tiberiumworks
09:53:34Tiberium"var d = {"message":"Привет, лох", "peer_id": "123"}.api"
09:54:45FromGitter<Varriount> Russian?
09:54:50Tiberiumsorry
09:54:59Tiberiumit's like a bad word, but not swear word
09:55:01TiberiumVarriount: yes
09:55:27FromGitter<Varriount> No, it's fine. I find it interesting.
10:12:55*couven92 joined #nim
10:36:52Araqtoday is the day. 900 open bugs.
10:37:03FromGitter<vegansk> Guys, could you check this please, is it reproduceable? If so, then threadpool couldn't be used with channels https://github.com/nim-lang/Nim/issues/5626
10:37:25Araqthreadpool shouldn't be used with channels indeed.
10:39:14FromGitter<vegansk> @Araq, but why?
10:39:36Araqbecause it's about parallelism, channels are about concurrency
10:39:58Araqproc run(f: proc(): int {.gcsafe.}): proc() =
10:39:59Araq let r = spawn f()
10:39:59Araq return proc() = await(r)
10:40:07Araqanyway, I think this is a horrible idea
10:41:45FromGitter<vegansk> Why I can't handle the channel inside the thread from the threadpool only when the values in channel are present?
10:42:06FromGitter<vegansk> That's what about the example from the issue
10:42:23cheatfateAraq, channels is your between threads communication, channels is not about concurrency
10:43:10Araqthread communication is concurrency.
10:43:13FromGitter<vegansk> Here is an example from scala: https://github.com/scalaz/scalaz/blob/series/7.3.x/concurrent/src/main/scala/scalaz/concurrent/Strategy.scala#L71-L81
10:44:22Araqyeah, I am aware scala uses the most convoluted code everywhere and then they wonder they never get any speed out of it
10:46:01FromGitter<vegansk> @Araq, I don't want to have the thread started and waiting for the message in the empty channel. This thread can be used to handle another tasks. That's why I want to use threadpool for all of my actors.
10:48:41Araqonce we fixed your bug it'll still be slow. seems like a waste of time with these actor based designs
10:52:29FromGitter<vegansk> Then the channels module must be marked as deprecated, because it uses message passing, like the actors?
10:52:49*nhywyll joined #nim
10:56:53FromGitter<vegansk> @Araq, The problem began when I started to test the system under high load. In normal mode it was ok with the speed. But the system crashes when there are many requests, and not just working slow. And I think that it's a bug.
10:59:02Araqit could be a bug indeed. but it's just the symptom of an undebuggable design. sorry, I don't believe in the actor framework. I only use message passing when it's unavoidable not because it's cool.
11:02:28Araqand if I am after a scalable system I would implement the disruptor pattern
11:05:38Araqwhat happens when you send a message to a dead actor? exception? silent message delivery failure? either way, you replaced something that cannot fail (aka plain old function call) with something that can fail
11:06:12Araqdo that often enough and it's as reliable as you think it would be. not. at. all.
11:09:34Tiberiumzielmicha_, hi, about your reactor.nim library: await request(newHttpRequest(httpMethod="GET", url = $url).get) doesn't check if url is "https"
11:12:32*vendethiel quit (Ping timeout: 256 seconds)
11:13:22*Andris_zbx joined #nim
11:13:29*vendethiel joined #nim
11:20:57*nhywyll_ joined #nim
11:20:58*nhywyll quit (Ping timeout: 240 seconds)
11:23:08*PMunch joined #nim
11:23:41*bjz_ joined #nim
11:24:24Tiberiumzielmicha_, https://github.com/zielmicha/reactor.nim/issues/12
11:25:38*bjz quit (Ping timeout: 268 seconds)
11:27:26Araqvegansk: I can reproduce and it looks like a threadpool bug indeed
11:36:15*PMunch_ joined #nim
11:36:15*PMunch_ quit (Remote host closed the connection)
11:44:14*nhywyll_ quit (Quit: nhywyll_)
12:02:59*yglukhov_ joined #nim
12:02:59*yglukhov quit (Read error: Connection reset by peer)
12:05:04*BitPuffin|osx joined #nim
12:09:42*yglukhov_ quit (Remote host closed the connection)
12:22:11FromGitter<dom96> Channels are about concurrency? I don't recall needing to use them for async...
12:22:35*yglukhov joined #nim
12:22:58FromGitter<dom96> Tiberium: why the switch to reactor.nim's http client?
12:25:03Tiberiumdom96 I experiment with it :)
12:35:09*yglukhov quit (Remote host closed the connection)
12:36:14*yglukhov joined #nim
12:36:15*yglukhov quit (Remote host closed the connection)
12:37:49FromGitter<vegansk> @Araq, scalaz actors can't be dead. They are not like an Akka actors
12:38:13*krux02 joined #nim
12:40:10*yglukhov joined #nim
12:43:15FromGitter<vegansk> They are lightweight an even used as a synchronization primitive in some parts of scalaz library
13:04:00zachcarterdoes Nim have anything like golang’s JSON serialization?
13:04:24zachcarterwhere you can map structs to a JSON doc
13:04:24*yglukhov quit (Read error: Connection reset by peer)
13:04:30zachcarterlike this :
13:04:48zachcarterhttps://github.com/ajhager/spine/blob/master/spine.go#L16-L32
13:05:24*yglukhov joined #nim
13:06:56FromGitter<Varriount> Well, the marshal module does automatic conversion of structs to json, however the structure format is subject to change.
13:08:14FromGitter<Varriount> You might look at NimYAML, since I think that can output json too.
13:08:28zachcarterI’m more interested in the reverse process
13:08:41zachcarterjson > nim struct
13:09:04FromGitter<Varriount> Both modules do unserialization
13:09:24zachcarteralright thanks
13:10:25zachcartergoing to give nimyaml a run since you’ve been bumping it so much Varriount :P
13:10:36zachcarterI’m working on an unoffiical spine runtime for Nim
13:11:18FromGitter<Varriount> It's an excellent module.
13:13:57*bjz_ quit (Quit: Textual IRC Client: www.textualapp.com)
13:19:39*gangstacat joined #nim
13:22:01*Tiberium quit (Remote host closed the connection)
13:22:03PMunchHmm, are there any documentation on how to use Nim without the garbage collector? I know it can be turned off but then you would need to manage memory yourself right?
13:22:19zachcartercorrect PMunch
13:22:22*Tiberium joined #nim
13:22:25zachcarteryou’d have to use alloc dealloc
13:22:30zachcarterin system.nim I think
13:22:43zachcarterHrm I’m struggling a bit early on with Nim yaml
13:22:55zachcarterThe JSON deserialization example doesn’t seem to work
13:23:16cheatfatePMunch, dont use any ref objects (e.g. strings, sequences and whole stdlib), use ptr everywhere
13:24:01zachcarterah nevermind I figured out why
13:24:11PMunchHmm, doesn't that make it a bit inconvenient?
13:24:18AraqPMunch, create a thread, call GC_disable in the thread, the thread dies, everything is freed
13:24:38PMunchHmm, well that is one way of doing it :P
13:25:02*bjz joined #nim
13:25:12Tiberiumhmm, my command bot takes longer time to respond with Nim (I firstly started rewriting it from my Python version), and it takes a bit more time to respond. may be some issue in my code, since application almost fully network-bound. How can I find such places in my code?
13:25:27Tiberiuma bit longer, but still
13:25:42Tiberiumboth nim and python are written in async way
13:26:41PMunchAraq, does that apply to pthreads as well as Windows threads?
13:26:56PMunchSince pthreads doesn't by default clean up after themselves
13:27:14Araqour threads wrapper does it, so yes
13:28:03PMunchOkay, nice :)
13:28:15SusWombatWHen i disable gc and create new object after it and enable it againt does it clean uo that objects then?
13:28:53AraqSusWombat: yes
13:29:01SusWombatok thanks!
13:29:03PMunchcheatfate, so there's no way to tell those to use allocated memory instead?
13:29:20zachcarterhrmm Varriount: Nim yaml is working great so far, but first struggle I’ve encountered is optional fields in my json
13:29:26PMunchI was just thinking of stuff like satelites and rovers were this stuff is actually super important
13:30:06zachcarterah I see it has a thing for optional fields
13:34:34AraqPMunch: when the stuff is super important, you don't just throw away the GC. you throw away heap allocation and malloc/free
13:34:52Araqso that you get bounded memory usage by construction.
13:35:07zachcarterflyx: just opened https://github.com/flyx/NimYAML/issues/37
13:37:02PMunchAraq, yeah. But wouldn't that have to be done by manually? Can Nim ensure bounded memory usage?
13:37:27couven92Is there an environment variable you can set insteadt of setting the --nimcache option for the nim compiler?
13:39:22*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
13:40:49flyxzachcarter: heh, that's what I get for writing a state machine manually, I guess. fixed in devel.
13:41:11zachcarterflyx: thanks
13:41:15Tiberiumah bad, this http request for web api takes like 0.2 sec :( bad web api
13:41:38Tiberiumпривет
13:41:39Tiberiumпривет
13:41:43Tiberiumoh sorry, wrong window
13:43:00AraqPMunch: no systems programming language can do that
13:43:25Araqcouven92: Nim doesn't use envvars, you can set it in your global nim.cfg though
13:43:39zachcarterflyx: fix looks good to me thank you again for that, was so quick! :D
13:43:46couven92Araq, thanks... That's what I figured out as well :P
13:45:51FromGitter<Varriount> zachcarter: If you just need to dump data structures, marshal may be
13:46:01FromGitter<Varriount> more suitable
13:46:16zachcarterI need to deserialize a bunch of json into a huge nim data structure
13:46:45flyxzachcarter: well, it was a trivial bug ;)
13:46:49krux02zachcarter: I wrote my own option type for optional fields
13:46:56krux02then I could handle optional fields well
13:47:07zachcarterfor NimYaml krux?
13:47:21krux02nope, for my own binary serializer
13:47:27zachcarterI’m doing the whole - setDefaultValue(Bone, length, 0.0)
13:47:30zachcarterahh gotcha
13:47:37krux02I mostly did it for initialization optimization
13:47:46zachcarterright
13:47:51krux02I had I big XML file I needed to read on every startup
13:47:51flyxzachcarter: you can also use implicit variant objects
13:48:11krux02I wrote my own binary dump serializer
13:48:22krux02did not handle endianness at all
13:48:23couven92why does `koch nimble` build nimble as a Debug Build?
13:48:24krux02but did not care
13:48:26zachcarterflyx: saw that now
13:48:49flyxzachcarter: or define some type Optional[T] and write a custom deserializer for it
13:49:03krux02flyx, that is what I just said
13:49:09krux02or better meant
13:49:21zachcarterwell I think flyx means for his lbi
13:49:23flyxkrux02: I mean in the context of NimYAML
13:49:27FromGitter<Varriount> zachcarter: Did you figure out that vtable issue?
13:49:28zachcarterlib*
13:49:42zachcarterVarriount: no :( the C code is a mess that’s where the vtable is
13:50:10flyxkrux02: NimYAML allows adding custom deserializer procs to types so that they can be properly loaded. its different from writing the whole deserializer
13:50:12zachcarterI’m at a proverbial fork in the road
13:50:47zachcarterVarriount: What I’m working on is support for : http://esotericsoftware.com/spine-in-depth#What-is-Spine
13:50:50zachcarterfor Frag / Nim in general
13:51:05zachcarterThey have a C runtime, which I generated bindings to
13:51:27zachcarterbut the author of the C runtime, because he can’t ditch OOP, decided to implement his own vtable in C
13:51:43zachcarterso that you can provide your own functions to extend the runtime if you will
13:51:51krux02I just entered the conversation, for what is the serialization for
13:52:00krux02is it big data, so rather small configuration files?
13:52:15zachcarterI can give you an example of the JSON I’m going to be deserializing
13:52:16zachcarterone sec
13:52:49zachcarterhttps://gist.github.com/zacharycarter/d6cf47d87c4f24b720ee3d9c7a50506a
13:52:55zachcarterit’s essentially 2d skeletal animation data
13:53:13zachcarterso the fork in the road I’ve hit is this -
13:53:28zachcarterA) I can continue trying to struggle with interoping with the C runtime and this vtable crap
13:53:35zachcarteror B) I can write a pure Nim runtime for spine
13:53:38zachcarterB )
13:53:45*ibk joined #nim
13:53:59zachcarterthe whole deserialization effort is moving towards B
13:56:17zachcarterMost languages have their own generic runtime, so I figure making one for Nim wouldn’t be the worst thing in the world
13:56:31zachcarterand it would be a lot friendlier to use than binding to the C runtime for a few reasons
13:58:59zachcartermostly avoiding the abhorrent license that comes with using the official runtimes
13:59:18*xet7 quit (Quit: Leaving)
14:06:58FromGitter<Varriount> zachcarter: What's the license?
14:07:03zachcarterone sec
14:07:10zachcarterhttps://github.com/EsotericSoftware/spine-runtimes/blob/master/LICENSE
14:09:06FromGitter<Varriount> Hm. Certainly non-standard, but what's so bad about it?
14:10:08zachcarterwell from my understanding : if I were to bind to their runtime any project that includes my bindings would have to include that license
14:10:27zachcarterand I believe a license to use their runtimes is at the least $300
14:10:36*xet7 joined #nim
14:10:47zachcarterI’m not sure if I get around that fee by providing my own custom runtime - I doubt it
14:10:53zachcarterbut at least users wont’ have to include their license
14:11:14zachcarterI’m just trying to avoid users having to include additional licenses if possible
14:11:21FromGitter<Varriount> How difficult would the runtime be to implement?
14:11:28zachcarterI don’t think it’s going to be too bad
14:11:42zachcarteronce I get through the deserialization bit I should be in the home stretch
14:11:51FromGitter<Varriount> Really?
14:11:59zachcarteryeah that’s the majority of the work
14:12:04FromGitter<Varriount> Whay about all the math for calculations and such?
14:12:05zachcarterparsing all the texture atlas / json data
14:12:09zachcarterthose are pretty easy
14:12:47zachcarterhttps://github.com/EsotericSoftware/spine-runtimes/blob/master/spine-c/spine-c/src/spine/Animation.c
14:12:49zachcartermost of the math is in there
14:13:12zachcarter1300 LOC shouldn’t be too bad to port
14:13:14FromGitter<Varriount> Hm.
14:13:42zachcarterI think I can have something working pretty quickly, maybe in a couple of days
14:14:01zachcartermight be being optimistic, but I’m going to give it a go I think
14:14:53*Varriount|Mobile joined #nim
14:17:36*yglukhov quit (Remote host closed the connection)
14:19:53*yglukhov joined #nim
14:20:44Araqcouple of days? c2nim it
14:20:54zachcarterhaha truth
14:20:56Araqand it should be one day
14:21:01zachcarteragreed
14:21:12Araqc2nim can translate C proc bodies
14:21:13zachcarterjust the json deserialization is a headache atm
14:21:19zachcarteryeah I’ve done that before with it
14:22:00zachcarterwithout c2nim / the productivity of Nim I don’t think I would have been able to build something like frag in the amount of time I have built it in
14:22:14zachcarterI’d still be trying to find a decent build solution for C++
14:22:30zachcarteror fighting with Rust
14:23:49*yglukhov quit (Ping timeout: 240 seconds)
14:34:38*djellemah_ quit (Quit: Leaving)
14:34:59*djellemah joined #nim
14:37:39zachcarterflyx: another bug
14:37:47zachcarterCannot construct to float: "0"
14:38:12zachcarterI know technically it should be 0.0
14:38:15zachcartererr 0 . 0
14:38:25zachcarterbut I think the parser should be able to handle a 0 as well?
14:39:37FromGitter<dom96> zachcarter: consider writing a JSON deserializer for our stdlib.
14:39:52FromGitter<dom96> By looking at how marshal is implemented you should be able to get pretty far.
14:40:13flyxzachcarter: I commited a fix
14:40:17zachcarterthanks flyx
14:40:30zachcarterdom96: going to mean less progress on frag / spine runtime etc
14:40:33flyxI'm surprised this has not been discovered earlier
14:40:41flyxmy tests seem to be lacking
14:41:04zachcarterI think your tests are exceptional but I’m putting your lib through the ringer atm
14:41:18flyxfun fact: these two bugs were a regression from implementing date parsing
14:41:21FromGitter<Varriount> There's no better test than real-world use.
14:41:38zachcarterdom96: are you guys still doing the summer of stdlib?
14:41:50zachcarterif so I may tackle a project for it to contribute, and that could be one I could do
14:42:24zachcarterI’m trying to get frag to a v0.1 public alpha by like May / June
14:43:16zachcarterflyx: fix tested and working :D
14:48:35FromGitter<dom96> Summer of stdlib? Is that a thing I'm not aware of?
14:49:06FromGitter<dom96> I'd love to do that though :)
14:49:30zachcarterI dunno I heard talk about it months ago
14:49:41zachcartersomething like this sumemr the stdlib was going to get love
14:49:45zachcartersummer
14:50:00zachcarterI think it’d be a cool community project to do - figure out weak areas of the stdlib and improve them collectively over a given time frame
14:50:13zachcartercould set up projects in github since github now supports them
14:50:18zachcarterlike kanban style boards
14:51:59FromGitter<Varriount> Pick a python stdlib module, port it over to Nim. :D
14:53:56couven92I have a importcpp proc in nim here... The C++ code returns a (const char*), the nim proc says that it returns a cstring... Because of the const, I get the "Conversion loses qualifiers" compiler error message from the C++ compiler... How do I import the C++ proc correctly?
14:54:14*rauss joined #nim
14:54:56FromGitter<dom96> zachcarter: ooh, good idea on setting up projects on github
14:55:08FromGitter<dom96> In any case, I will have two months of time starting in May
14:55:26zachcarterthat’d be a good time to start I think
14:55:33FromGitter<dom96> And my plan has been to use that time to give the stdlib some love
14:55:36zachcarterI’m trying to wrap up frag alpha by then
14:55:45zachcarterawesome :D I will try to do the same
14:55:48FromGitter<dom96> cool!
14:57:49PMunchAraq, I'm having a weird issue with the genui macro
14:57:55PMunchIt won't build under 0.16.0
14:58:03PMunchBut it works fine under 0.16.1
14:58:24PMunchThe problem is that all parents are suddenly nil when run with 0.16.0
14:58:43PMunchBut I've added an echo were they are assigned and that works fine
14:58:56PMunchSo widget.identifier = genSym(nskVar) get's called
14:59:03PMunchBut it is still later evaluated to nil
14:59:24PMunchDid 0.16.0 -> 0.16.1 change something about pass by value/pass by reference?
15:01:54SusWombatzachcarter, how usable is frag yet?
15:02:13zachcarterSusWombat : I’d wait for docu / website to be ready
15:02:21zachcarterIt’s usable but you have to know what you’re doing
15:02:27AraqPMunch: yes a couple of bugs were fixed
15:02:42PMunchHmm
15:02:44zachcarterit’s also lacking in some key areas : no collision detection code atm, no tile map support, can only support texture atlases of our own internal format, etc...
15:02:51SusWombatzachcarter, Naaaah :D I just have to open a query to this zachcarter guy not? (just joking)
15:03:14zachcarteralso shaders need love - right now the sprite batch operates with its own shader, ideally you’d be able to supply your own shader
15:03:16zachcarter:P
15:03:29zachcarterI mean if you want to have a go at it , by all means go ahead. I’m willing to answer any and all questions
15:03:41zachcarterbut my recommendation would be to wait for a week or two
15:03:46couven92basically, what type is a `const char*` in nim?
15:04:00zachcarteronce I get spine integration going, I’m back to working on stabilizing the core of the framework
15:04:14SusWombatright now its a bit tricky as there are 2 engines in development O: so id need to test them bost anyways :/
15:04:27SusWombatboth*
15:05:02FromGitter<Varriount> couven92: Nim doesn't really have `const` like C++ does.
15:05:25zachcarterare you referring to Rod?
15:05:31couven92@Varriount, so how do I get rid of my compiler error?
15:05:32zachcarterSusWombat ^
15:05:49SusWombatzachcarter, frag and NimGame2
15:05:58FromGitter<Varriount> couven92: What's the current importcpp pragma line you're using?
15:06:03zachcarterah well I can break down the differences between all three game engines / frameworks right now that are in dev for nim
15:06:33zachcarterNimGame2 is the simplest of the three, but probably the most feature rich atm
15:06:40FromGitter<Varriount> couven92: If I recall correctly, you can tailor the importcpp pragma to the signature.
15:06:55Araqyup, that's about right
15:07:07zachcarterit uses SDL2 for rendering so you need to understand the intricacies of how SDL2 does drawing, but from a high level - no draw call batching and no texture atlas support
15:07:11Araq .importcpp: "(char*) Foo(...)"
15:07:27zachcarterno custom shaders
15:07:34Araq .importcpp: "(char*) #.Foo(@)"
15:07:38SusWombatzachcarter, well texture atlas support is easy to make yourself i think anyways
15:07:51SusWombatthe shader thing is acutally really a advantage of frag
15:08:09zachcarteraye, frag is more complex but you get shaders, more rendering backends, potentially more targets
15:08:23zachcarterfrag should be xbox one / ps4 / nintendo switch / iOS / android capable
15:08:47SusWombatzachcarter, oh also to be fair i think its not a very cool move to say "we support the switch" yet as that isnt a save thing at all isnt it?
15:08:54zachcarterit is
15:09:00couven92@Varriount, Araq, ok so `proc foobar():cstring {.importcpp: "Foobar", header "foo.h".}` becomes `proc foobar():cstring {.importcpp: "(char*) Foobar", header "foo.h".}`?
15:09:32zachcarterI believe the switch is running on an nvidia tegra x1
15:09:43zachcarterwe can target that cpu / architecture
15:09:57zachcarterwhatever rendering API it uses internally we can target
15:10:06zachcarterso frag should aim to support the switch
15:10:28zachcarterI’m not saying it does yet - that’s why I used the word should :P
15:10:44zachcarterobviously I have to buy a switch SDK and prototype things
15:10:53SusWombatzachcarter, games on a variety of platforms including - Windows, Linux, OSX, PS4, Xbox One, Nintendo Switch, Android, iOS, etc...
15:10:54SusWombat:D
15:11:06SusWombatoh wait ...
15:11:16zachcarterI think I make a side note that console support is to come later
15:11:17SusWombatim an idiot you did write "aim2 in that post im sry
15:11:23SusWombat"aim"*
15:11:28zachcarterah np :)
15:12:05zachcarterone of the tricky things about targetting all these platforms is all the cross compilation you have to do for the various libraries frag depends on
15:12:12zachcarterso supporting all these targets will take time and testing
15:12:29SusWombatzachcarter, well rod seems to aim for a unity like editor worklfow so thats not that intresting for me right now
15:12:49zachcarteryeah I was going to get to rod :P Frag aims to be more like libgdx less like unity
15:12:56zachcarterRod seems to be architected very much like Unity
15:13:24FromGitter<Varriount> I have a Switch. :D
15:13:32SusWombatIf i want a engine with a editor id go for godot i think.(its very likely that you coudl maybe use nim there with a certain module)
15:13:49zachcarterAhh Varriount: you may become my guinea pig if you volunteer :P
15:14:10zachcarterSusWombat: yeah I have some really bad feelings about godot but the editor is nice
15:14:22SusWombatehy the bad feelings?
15:14:34SusWombatwhy*
15:14:49zachcartermostly performance of GDScript
15:15:08zachcarteralso I don’t think it does anything terribly well - I don’t think it handles cross platform 2d as well as other options
15:15:14zachcarterand I don’t think it handles cross platform 3d as well as other options
15:15:27zachcarterunity is better for cross platform 3d
15:15:37SusWombatwell theres going to be c+ soon. And some guys are workling on a "dlscript" module where you could use shared librarys(they need c like symbold or something like that)
15:15:41zachcarterfor cross platform 2d godot is overkill and slow
15:15:43SusWombatc#*
15:15:57zachcarterah C# will be nice
15:16:04FromGitter<Varriount> zachcarter: You might need a special development edition of the Switch, unless someone finds a way to sideload binaries.
15:16:06zachcarterthat might save that engine
15:16:17zachcarterVarriount: I’m guessing that’s the case I’m assuming a SDK will ship
15:16:22Tiberiumzachcarter, they're doing c# support
15:16:27Tiberiumand also there's python-godot
15:16:34Tiberiumunofficial
15:16:36zachcarterhttps://developer.nintendo.com/
15:16:53zachcarterI’d still stay away from something like godot unless you really are hurting for an editor
15:17:04zachcarterand just as a side note, I eventually plan to add an in game editor to FRAG for 2d
15:17:11SusWombatzachcarter, would frag be able to be used with nimsl?
15:17:19zachcarternegative
15:17:24zachcarterfrag uses bgfx shaders
15:17:41SusWombatso they have a custom format?
15:17:42zachcarteryou write your shaders in a language similar to GLSL and they compile to whatever rendering backend shader language you want
15:17:59zachcartersec I’ll link you to a simple example of frag’s spritebatch shader
15:18:10zachcarterhttps://github.com/fragworks/frag/tree/master/assets/shaders/default/2d
15:18:34FromGitter<Varriount> That's actually what Unity does too. Many GPU shaders have implementation bugs
15:18:48zachcarterI use a shader tool that ships with bgfx
15:18:49SusWombati thought nimsl compiles to glsl anyway O:
15:19:00zachcarterand shaders eventaully get embedded into Nim code
15:19:05*Andris_zbx quit (Remote host closed the connection)
15:19:15zachcarterhttps://github.com/fragworks/frag/tree/master/src/frag/graphics/two_d/gl
15:19:20zachcarterhttps://github.com/fragworks/frag/tree/master/src/frag/graphics/two_d/dx
15:19:43*yglukhov joined #nim
15:20:10SusWombatzachcarter, btw why do you dislike "nested" variable assignments?
15:20:21zachcarterexample?
15:20:36SusWombathttps://github.com/fragworks/frag/blob/master/examples/desktop/04-sprite-animation/main.nim#L31
15:20:53zachcarterah that’s just quick code
15:21:04zachcarterthe examples are more like tests than anything
15:21:28zachcarterplease ignore code quality in examples in other words :P
15:22:01zachcarterhttps://github.com/fragworks/frag-samples will eventually be where sample games using frag will reside
15:22:08zachcartercode there is also very WIP
15:22:16SusWombatid really like to try frag but id have to ask you alot :/
15:22:31*yglukhov quit (Remote host closed the connection)
15:22:34zachcarteryeah if you give it another week or two we should have some docu I think
15:22:41SusWombatok
15:22:41zachcarterother guy working on frag with me is supposed to be working on that
15:27:17*yglukhov joined #nim
15:27:56SusWombatzachcarter, so just to ensure, i could use your rendering api with shaders without a problem then right? i wouldnt need to do opengl code myself?
15:28:26zachcarterSusWombat: that’s correct, when the spritebatch supports it which will be soon - you’ll be able to pass a custom shader to it for 2d rendering
15:28:35zachcarterfrag currently doesn’t support any 3d stuff so if you want 3d you’d have to write that yourself for now
15:28:51zachcartereventually I’ll add some 3d capabilities but don’t expect it to get close to like UE4 or Unity in terms of support
15:29:04zachcarterI may eventually get to deferred rendering and PBR but that’s a long way away
15:29:33zachcarteralso 3d will most likely get an editor
15:29:57SusWombatzachcarter, i dont care about 3d at all :D
15:30:04zachcarterwell that’s good :)
15:30:16zachcarterso short answer is yes - once the sprite batch supports it which it will in the next weekish
15:30:20zachcarteronce I finish spine stuff up
15:30:25SusWombatokay
15:30:30SusWombatnice to hear
15:33:01*Varriount|Phone joined #nim
15:33:20TiberiumJust curious: does JS backend support async/await features ? :D
15:35:06*Varriount|Mobile quit (Ping timeout: 240 seconds)
15:59:42*Trustable joined #nim
16:02:58hohlerdeis there a libxml2 wrapper for nim or something similiar which is able to generate canonical xml?
16:06:20*ibk quit (Quit: Connection closed for inactivity)
16:08:19*vivus joined #nim
16:11:23krux02How do I know, if an object type is packed?
16:11:24*Varriount|Phone quit (Read error: Connection reset by peer)
16:11:46*Varriount|Phone joined #nim
16:12:43krux02Araq: is there a way from an object type to know weather a type has the packed pragma?
16:13:08PMunchAraq, these bugs are weird
16:13:27PMunchecho child.parent == widget
16:13:35PMunchfalse in 0.16.0, true in 0.16.1
16:15:01krux02PMunch, in what context?
16:15:04FromGitter<Varriount> krux02: An object is packed when the packed pragma is used
16:15:42PMunchkrux02, the genui macro
16:15:46krux02Varriount well yes, but how do I know if the packed pragma is used, (from a type symbol in a macro)
16:15:56FromGitter<Varriount> I believe there's a way to get the type definitions from an object using a procedure in the macros module
16:16:12krux02PMunch, I think there was a bug fixed in the interpreter
16:16:17PMunchI call a function parseChildren which calls the function parseNode on all the children and sets their parent to the object passed to parseChildren
16:16:22PMunchWhich is a reference type
16:16:23krux02NimNodes are ref types, but often they were copied
16:16:43PMunchkrux02, yeah. Araq already said there were some fixed errors
16:17:11krux02I actually submitted the bug report
16:18:39krux02PMunch, without context I can't help you
16:18:49PMunchI've found a workaround
16:19:00PMunchThat "fixes" the problem
16:19:08PMunchhttps://github.com/PMunch/wxnim/commit/a23a212b5f39d87f955f450e0b4e290f7ad01dcc
16:19:22cheatfatekrux02, getTypeImpl can help you to get type implementation which can have Pragma node
16:19:26PMunchBasically doing a check if the parent is not set correctly and set it
16:19:44zachcarterflyx: setDefaultValue seems to fail for enums
16:19:44PMunchchild.parent and widget are not equal in that case, which is a problem
16:20:04krux02well, the bug was fixed, so it was not a bug introduced, it might have happened that you based your implemenation on false behaviour (that happens easyly in nim because I found a lot of bugs and weird stuff)
16:20:12zachcarterflyx: Error: unhandled exception: false Invalid node kind nnkAccQuoted for macros.`$`
16:20:13PMunchWhich is set here: https://github.com/PMunch/wxnim/blob/master/genui.nim#L34
16:20:41PMunchWell it works in 0.16.1 but not in 0.16.0
16:20:53PMunchSo I'm assuming it's a bug in 0.16.0 that got fixed in 0.16.1
16:20:53flyxzachcarter: hmm. this one will need investigation
16:20:58zachcarterokay
16:21:14zachcarterwant a small example?
16:21:19zachcarterI can create one and an issue
16:22:48dom96hi guys
16:23:08zachcartero/
16:25:18Tiberiumdom96, hi
16:25:44zachcarterahh flyx: I figured it out
16:25:49zachcarterwasn’t the enum
16:25:51zachcarterit was the backticks in the field name
16:25:59*vlad1777d quit (Remote host closed the connection)
16:26:53flyxzachcarter: yeah, this is currently not supported. but probably not hard to implement
16:27:04zachcartergotcha I think I can live without it
16:27:09zachcarterbut if not I’ll let you know
16:27:31zachcarterbtw so far the lib is working great, everything Varriount has been espousing about it is true :P
16:27:44PMunchUhm Araq, what is --app:gui doing on Linux?
16:27:55*vlad1777d joined #nim
16:27:56zachcartererr I used that word incorectly
16:28:04dom96PMunch: Probably nothing
16:28:13zachcarterall of Varriounts espousing of the lib is well warranted. there :P
16:28:18dom96It's only supported on Windows IIRC
16:28:25PMunchWell, it adds -mwindows as a compile flag :P
16:28:35PMunchWhich the compiler obviously doesn't like..
16:29:18flyxbunch of minimal examples work with backquoted fields, can you give me example code that breaks?
16:29:33zachcartersure
16:30:31zachcarterflyx: https://gist.github.com/zacharycarter/9c86f947ca6f87531f1c8727443562d3
16:30:55zachcarterspecifically https://gist.github.com/zacharycarter/9c86f947ca6f87531f1c8727443562d3#file-example-nim-L127
16:32:07*nsf quit (Quit: WeeChat 1.7)
16:33:46zachcarterhrm apparently I cannot live without the fix
16:33:54zachcarterunless there’s some way to alias fields
16:34:47hohlerdecompiling libiconv on windows is a pain in the ass
16:35:01hohlerdesorry, fc
16:39:00flyxzachcarter: pushed a fix
16:39:08zachcarterawesome thank you
16:39:53zachcarterperfect thank you flyx
16:41:14*PMunch quit (Quit: leaving)
16:41:31*couven92 quit (Quit: Client disconnecting)
16:51:10FromGitter<Varriount> hohlerde: Is that the one with circular dependancies?
16:51:44FromGitter<Varriount> I know I've never been able to compile x64 GTK on Windows because GTK has a circular dependancy
16:52:01hohlerdedon't know exactly, but it took me some time to get it compiling in msys2
16:58:48*vlad1777d quit (Quit: Leaving)
17:00:45zachcarterhrm flyx: not sure how to handle this, I have a field in my json that could hold either a seq of floats or a string
17:01:14zachcarterI don’t really have a way of knowing which it will be at compile time
17:01:22zachcarterdo I need a custom serializer for that case?
17:01:48zachcarteror deserializer I should say
17:02:03flyxzachcarter: well, unfortunately, the implicit variant object deserializer requires an explicit tag for the case of a non-scalar value (seq in this case)
17:02:20flyxzachcarter: so yes, you need to build a deserializer yourself
17:02:34zachcarterokay that’s what I figured, thank you
17:03:47*vlad1777d joined #nim
17:09:29flyxhmm, seems like the pointer type is not supported by the JS backend, can anybody confirm?
17:17:49*couven92 joined #nim
17:18:23*Trustable quit (Remote host closed the connection)
17:38:54TiberiumWhat's the best option to a config file, which users would change without source code?
17:39:02Tiberium*for a
17:39:12Tiberiumjust .txt? or there's better choices?
17:39:24Tiberiumah, parsecfg
17:53:49Arrrrand/or parseopt
17:55:47dom96flyx: how could it be supported?
17:56:34flyxdom96: I dunno, I guess since JS is dynamically typed, a cast from `ref anything` to `pointer` should be a noop...?
17:58:07FromGitter<stisa> pointers kind of work in js, there are some problems in casting I think
18:04:19*elrood joined #nim
18:05:41zachcarterflyx: Is there a better way to do this than -
18:05:47zachcarterresult.skeleton = Skeleton()
18:05:48zachcarter discard s.next()
18:05:49zachcarter discard s.next()
18:05:49zachcarter constructObject(s, c, result.skeleton.hash)
18:06:09zachcarterimplementing my own deserializer
18:06:17zachcartertrying to parse a key value pair from my json
18:06:35zachcarterI have to do s.next s.next to get through the name and opening tag for the map
18:07:53zachcarterah I think I know what to do
18:10:56dom96Wait, how are you parsing json?
18:11:05dom96What module are you using?
18:11:07zachcarterwell now I”m having to do it with a custom serializer
18:11:09zachcarternimyaml now
18:11:19zachcarterbut I know what I’m doing wrong
18:11:29zachcarterI should be deserializing into an object not manually parsing like I am
18:12:15dom96You can also do something like this: parseJson(jsonData)["key"]["key2"].getStr()
18:12:34dom96You can either put each field that you're interested in into your own object
18:12:40dom96or use this sort of syntax everywhere
18:12:55zachcartergotcha, may give out the marshal / json modules a try i fi can’t get further with nimyaml
18:13:01zachcarteror nimyaml becomes just as much work as ^
18:13:07zachcarterwhich it seems to be becoming
18:26:27flyxzachcarter: I'd need to see your json to understand what you're trying to do, but in general, always call constructChild(), not constructObject(), for handling child values
18:26:41zachcarterah okay
18:26:48zachcarterchild values like members of an object?
18:26:52flyxthough in your case it wouldn't make a difference since json has no tags or anchors
18:26:53flyxyes
18:26:58zachcarterokay thanks
18:28:56flyxbtw, I'd rather do `doAssert s.next().kind == yamlStartMap; doAssert s.next().kind == yamlScalar`
18:29:13flyxif you really only want to skip the mapping start and the first key
18:29:45flyxnot checking the well-formed-ness of the input will otherwise fall on your feet later on
18:35:18*nhywyll joined #nim
18:37:04*Matthias247 joined #nim
18:38:56*zaquest quit (Remote host closed the connection)
18:39:19*zaquest joined #nim
18:42:19flyxhmm, what do these _Idx parameters in the generated JS code mean?
18:42:38*djellemah quit (Ping timeout: 246 seconds)
18:43:07flyxI think I found a bug in the code generator, since at one point, a function (generated from a nim proc) is called with one parameter less than specified (in JS); one of the _Idx values is missing
18:43:21flyxwould be great if I got that into a minimal working example
18:52:06*yglukhov quit (Remote host closed the connection)
18:53:41*yglukhov joined #nim
18:57:11zachcarterflyx: https://gist.github.com/zacharycarter/af3ac7a1277f38594a35cbf2c6dd17ec
18:57:37zachcarternot sure how to parse that using my custom deserializer
18:57:57zachcarterI just get an initialized object, not an object with the values set to what’s in the json
18:58:20*yglukhov quit (Ping timeout: 256 seconds)
19:08:29*yglukhov joined #nim
19:10:42*yglukhov quit (Remote host closed the connection)
19:24:17*yglukhov joined #nim
19:26:55*yglukhov quit (Remote host closed the connection)
19:30:38*Arrrr quit (Quit: Leaving.)
19:31:14*nsf joined #nim
19:35:53flyxzachcarter: I see your problem. by implementing constructObject, you're hiding the default implementation and cannot dispatch to that anymore
19:36:11zachcarterahh okay
19:36:19zachcarterI get it
19:36:47zachcarterthank you for that explanation
19:36:54zachcarterthink I know what to do now
19:38:15*yglukhov joined #nim
19:39:41*yglukhov quit (Remote host closed the connection)
19:40:15*yglukhov joined #nim
19:43:12flyxzachcarter: I added a costructObjectDefault() proc which can be used for such cases
19:43:20flyxwith current devel, you can do this: https://gist.github.com/flyx/9b9e0de0169f0ba3cea31960c844b0a1
19:43:53flyx(assuming this is what you want)
19:44:23flyxif you wanted to have an actual SkeletonJson object, you wouldn't have needed the custom constructor at all
19:44:48*yglukhov quit (Ping timeout: 256 seconds)
19:44:49flyxer, drop the echo lines, I did some debugging ^^
19:45:07zachcarterperfect thank you
19:45:25zachcarterjust tested it out
19:51:19*bjz joined #nim
19:52:03flyxwill be off until tomorrow, but feel free to drop me messages, my bouncer will conserve them
19:52:17*rokups quit (Quit: Connection closed for inactivity)
19:52:57*brson joined #nim
19:54:01zachcarterokay will do
19:57:49*vlad1777d quit (Remote host closed the connection)
19:59:21*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
20:00:09*brson quit (Ping timeout: 240 seconds)
20:00:25*Serenitor joined #nim
20:01:25*Senketsu quit (Quit: Leaving)
20:07:26Tiberiumcan this be possible? download file from one URL into memory (don't save it to FS), and then upload this file from memory to another URL via multipart data?
20:08:50*yglukhov joined #nim
20:09:43FromGitter<stisa> mmh so I keep getting warnings `cannot prove that <x> is initialized` , when `x` is an object with an enum field and the enum doesn't start at 0
20:09:47FromGitter<stisa> any way around it?
20:10:11*Tiberium quit (Remote host closed the connection)
20:10:23def-stisa: object constructor or an explicit init proc
20:11:46*Trustable joined #nim
20:12:52ldleworkdef-: what you working on these days
20:13:30*yglukhov quit (Ping timeout: 268 seconds)
20:13:37FromGitter<stisa> thanks def-
20:24:22FromGitter<stisa> nope looks like I spoke too soon, I still have warnings, when I use the type in a Table.
20:25:47*nhywyll quit (Quit: nhywyll)
20:29:03def-stisa: hm, I seem to remember that I also had trouble removing all warnings of that kind
20:29:27def-and I decided to just ignore the warning until that's fixed in the compiler
20:30:26def-With warning[ProveInit]=off in a nim.cfg
20:30:59FromGitter<stisa> yeah, that's what I'm going to do too. Maybe I'll try looking at enum initialization though, I think if I fix that the rest should fix itself.
20:31:21def-ldlework: paid work, not much otherwise
20:31:58ldleworkdef-: what language do you do professionally
20:36:12def-C++, Python
20:37:41ldleworkcool
20:41:58onionhammer{
20:43:44*Trustable quit (Remote host closed the connection)
20:46:08*bjz joined #nim
20:51:03*nsf quit (Quit: WeeChat 1.7)
20:58:19*couven92 quit (Quit: Client Disconnecting)
21:00:52*Nobabs27 joined #nim
21:04:05*babs_ joined #nim
21:06:49*Nobabs27 quit (Ping timeout: 240 seconds)
21:10:46FromGitter<Varriount> def-: I'm glad I don't have to use C++ at my job.
21:13:08FromGitter<Varriount> tiberium: Any solution to your problem yet?
21:18:26*Vladar quit (Quit: Leaving)
21:18:40*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:19:15FromGitter<TiberiumPY> What problem? About file uploading?
21:24:18*NimBot joined #nim
21:25:41*babs_ quit (Remote host closed the connection)
21:26:03*babs_ joined #nim
21:28:19FromGitter<TiberiumPY> @Varriount so what did you wanted to ask?
21:31:12FromGitter<Varriount> I was going to ask if you've discovered a solution to your problem yet.
21:34:23FromGitter<TiberiumPY> Ah, I'll u
21:34:49FromGitter<TiberiumPY> I'll try to do it after sleep (today). It's 0:34 for me now
21:35:10*bjz joined #nim
21:37:10krux02Varriount: actually c++ can be pretty cool to use, but probly when you are, you are dealing with a horrible codebase that takes half an hour to compile and 10 minutes for incremental builds
21:40:38FromGitter<TiberiumPY> @Varriount i don't really know right now, but it may be possible just with getContent and then with newMultipartData as in second httpclient example
21:41:11FromGitter<TiberiumPY> If there wouldn't be any encoding/bytes issues
21:41:24*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:46:30babs_string a = "foo" echo a "Error: undeclared identifier: 'a'" ??
21:46:36*BitPuffin|osx quit (Ping timeout: 240 seconds)
21:47:56FromGitter<TiberiumPY> Learn Nim please
21:48:11FromGitter<TiberiumPY> a = "foo"
21:48:15FromGitter<TiberiumPY> Sorry
21:48:20babs_?
21:48:33FromGitter<TiberiumPY> var a = "foo"
21:48:35FromGitter<TiberiumPY> Or
21:48:47FromGitter<TiberiumPY> var a: string = "foo"
21:49:04babs_hmm ok
21:49:11FromGitter<TiberiumPY> And also use constants and let's where applicable
21:49:44FromGitter<TiberiumPY> (constants - if you know value of variable at compile time)
21:49:50babs_^
21:50:22FromGitter<TiberiumPY> let - if you will not change variable after its definition
21:51:58*Varriount|Phone quit (Ping timeout: 260 seconds)
21:52:29FromGitter<TiberiumPY> But please read some tutorials and read some code :) It really helps
21:53:57*Varriount|Phone joined #nim
21:56:36babs_I have, sometimes nothing beats a simplified description though :)
21:57:27*brson joined #nim
22:03:03*brson quit (Ping timeout: 260 seconds)
22:03:03*Varriount|Phone quit (Read error: Connection reset by peer)
22:03:13*Varriount|Phone joined #nim
22:06:01*Varriount|Phone quit (Read error: Connection reset by peer)
22:06:15*elrood quit (Quit: Leaving)
22:06:57*rauss quit (Quit: WeeChat 1.7)
22:11:10vivushow do I convert a row type to a string type from this statement: for x in fetchdb.rows(sql("select content_body from posts")): ... ?
22:14:46*Varriount|Phone joined #nim
22:17:26babs_is there a paramStr that does not use TaintedString ?
22:19:31FromGitter<TiberiumPY> LOL
22:19:32*Varriount|Phone quit (Read error: Connection reset by peer)
22:19:34FromGitter<TiberiumPY> http://m.imgur.com/L8RqEf3
22:20:02FromGitter<TiberiumPY> http://i.imgur.com/L8RqEf3.jpg
22:23:43FromGitter<Varriount> Yeesh. Talk about high goals.
22:26:04FromGitter<TiberiumPY> Oh wait
22:26:12FromGitter<TiberiumPY> It's a server side compiler lol
22:26:22FromGitter<TiberiumPY> And server side is closed source
22:27:56FromGitter<TiberiumPY> For example three days ago they gave a one-week access key to their compiler in their blog
22:31:24*Varriount|Phone joined #nim
22:35:52*def-pri-pub joined #nim
22:35:52*def-pri-pub quit (Changing host)
22:35:52*def-pri-pub joined #nim
22:36:35babs_can you concatenate a TaintedString and a String to make it a String?
22:36:51SusWombatclosed source server side compiler ... WTF
22:36:57SusWombatCAAS or whatß
22:37:00SusWombat?*
22:37:11ldleworkDoes Nim completion work for emacs yet?
22:38:00SusWombatldlework, i had some problems with the nim mode (i use vsc for nim) for now but autocompletion seemed to work
22:38:16ldleworkwhat were the problems?
22:38:22babs_there are two "nim-modes" for emacs? idk
22:38:27babs_https://github.com/nim-lang/nim-mode
22:38:31babs_https://github.com/reactormonk/nim-mode
22:38:32def-pri-pubWhat/where is this CAAS?
22:38:44babs_oh one is up to date the other isnt nvm
22:38:46SusWombatcouldnt get eldoc mode to work and i get instant errors from the syntax checker iirc
22:39:16SusWombatdef-pri-pub, dont know if it exists (i hope not) but i just made fun of it CompilerAsAService
22:40:44SusWombatnvm ... it exists actually lol
22:42:34vivushow do I convert a sequence of strings into 1 string ?
22:43:54babs_the & operator ? @virus
22:44:07babs_@vivus I mean
22:44:34def-pri-pubSusWombat, funny you talk about that. i was actually thinking about making something like that this weekend to make Nim->Js development a little less painful.
22:45:38*smt quit (Ping timeout: 260 seconds)
22:45:52vivusI see this type is: Row = seq[string] . So I want to take this Row type and make it into 1 string
22:51:26def-pri-pubvivus: Do you mean you want to concat all of the strings that are in the Row?
22:51:42vivusdef-pri-pub: yep, 100%
22:52:20def-pri-pubhold on, I think I know the proc for that...
22:52:49vivusbecause I am only fetching data from 1 column at a time: select content_body from posts
22:53:38def-pri-pubYou should be able to use one of the fold*() procs:
22:53:39def-pri-pubhttps://nim-lang.org/docs/sequtils.html#foldl.t,untyped,untyped
22:54:33def-pri-pubYeah, it would be: foldl(Row, a & b)
22:55:06FromGitter<TiberiumPY> Why not join?
22:55:34def-pri-pubOh yeah, you could use join again
22:55:39def-pri-pubaswell*
22:56:08def-pri-pubActually, join in strutils is probably a bit nicer
22:56:10vivus@TiberiumPY how?
22:57:08FromGitter<TiberiumPY> vivus: data = myRow.join(", ")
22:57:16FromGitter<TiberiumPY> *let data
22:57:47FromGitter<TiberiumPY> If you just want to concat then without comma, just use empty
22:57:51vivus@TiberiumPY and if I don't want them separated by a "," ?
22:57:54vivusoh
22:57:57vivusread my mind
22:58:29FromGitter<TiberiumPY> I don't remember if you can just myRow.join() without arguments
23:00:22FromGitter<TiberiumPY> @define-private-public
23:00:39FromGitter<TiberiumPY> CAAS -Ne
23:00:45FromGitter<TiberiumPY> Nectar JS
23:01:01FromGitter<TiberiumPY> They have closed source server side compiler
23:02:10FromGitter<TiberiumPY> And I actually believe that Crystal and Nim similar in at least one way:
23:02:57FromGitter<TiberiumPY> They are trying to give very good experience like in interpreted languages
23:03:09ldleworkits fair
23:12:42*Varriount|Phone quit (Remote host closed the connection)
23:12:59*Varriount|Phone joined #nim
23:17:11*Varriount|Phone quit (Read error: Connection reset by peer)
23:19:18*Varriount|Phone joined #nim
23:22:06*Varriount|Phone quit (Remote host closed the connection)
23:22:44*Varriount|Phone joined #nim
23:24:22vivuswhich csv lib is recommended for parsing strings to a csv file and separating each entry as a newline ?
23:39:17*Senketsu joined #nim
23:42:30*Varriount|Phone quit (Read error: Connection reset by peer)
23:47:32*ftsf joined #nim
23:48:46*smt joined #nim
23:50:10*gokr quit (Ping timeout: 264 seconds)
23:53:49*Matthias247 quit (Read error: Connection reset by peer)
23:53:52*sz0 joined #nim