<< 13-03-2017 >>

00:00:29*chemist69 quit (Ping timeout: 258 seconds)
00:00:52Xeyes but you should be able to support this usecase even if it is weird
00:01:27ftsf_Xe, sure, but someone's gotta do the work to implement it
00:02:40ldleworkftsf_: I love nim. I'm lifelong appreciator of the project from a conceptual point of view.
00:02:55ldleworkI'm merely demonstrating something.
00:02:58*chemist69 joined #nim
00:03:10ldleworkI migh even be wrong, never tried to install mono in a docker container
00:03:12Xeif it means modifying the `Addr -> FileDescriptor` function then allow it, etc
00:03:16ldlework(that part was super easy for nim)
00:03:39ftsf_ldlework, i love nim too, but gotta understand it's young and you'll get frustrated from time to time and probably have to implement features yourself and give back to the project =)
00:04:48*bjz joined #nim
00:04:54*def-pri-pub quit (Quit: leaving)
00:06:21ldleworkftsf_: I'm almost 30, been writing code since I was 8 or so. I'm not without context.
00:06:36ldleworkI'm merely demonstrating. Its objective data points. It doesn't admonish anyone. It orients.
00:07:03ftsf_ack
00:07:32ldleworkok c-sharp compiler working in docker
00:07:36ldleworknow to find docker client
00:07:38ldleworkwell
00:07:43ldleworklets try it just using an http client
00:09:43ldleworkshit I forgot how to write a C# console app
00:09:56ldleworkgood thing the msdn is amazing
00:37:26ldleworkthis would have went wayyyy faster
00:37:36ldleworkif I didn't systematically typo mcs for msc
00:44:48*girvo_ joined #nim
00:53:29*girvo_ quit (Ping timeout: 260 seconds)
01:17:28ldleworkWelllllll
01:17:42ldleworkapparently the C# world has never heard of a fucking domain socket either
01:17:52*ldlework wonders if he's dreaming.
01:29:57*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
01:41:53*girvo quit (Ping timeout: 246 seconds)
01:46:19demi-ftsf_: tbh, nim has been a great deal less frustrating than many languages i've used; been greatly enjoying that about it :)
01:46:59Xeldlework: this kind of frustration is why i've ended up doing things in go :/
01:49:42ldleworkXe: yeah its kinda ridiculous
01:50:01ldleworkXe it seems C# has the same problem
01:50:12ldleworkit has no way to use its httpclient with domain sockets
01:50:40ldleworkI suppose its a bit more shameful for Nim since it actually is a linux systems programming language
01:50:49ldleworkAnd Windows doesn't even have domain sockets afaik
01:50:51ldleworklol
01:53:43*yeeve quit (Ping timeout: 256 seconds)
01:58:30*girvo joined #nim
02:02:26ldleworkXe: I take this problem simply does not exist for Golang?
02:02:56Xeldlework: there's several packages for doing it and if you need to you can override that part of the HTTP client with your own Dialer
02:03:14ldleworkhaha god damn it
02:03:21*girvo quit (Ping timeout: 256 seconds)
02:03:26ldleworkXe: you busy today?
02:03:42ldleworkwanna sprint this thing in Golang?
02:03:49ldleworkI'm supposed to be learning Golang for work anyway
02:04:56*yeeve joined #nim
02:07:13*chemist69 quit (Ping timeout: 260 seconds)
02:13:40*vlad1777d quit (Remote host closed the connection)
02:19:23*bjz joined #nim
02:22:32*girvo joined #nim
02:26:26ldleworkYou know what would be a neat tool
02:26:41ldleworktake some JSON and generate the nim types for deep unmarshaling
02:26:55*girvo quit (Ping timeout: 240 seconds)
02:27:24Xeldlework: marshal in stdlib?
02:27:29ftsf_ldlework, at compile time?
02:27:32*girvo joined #nim
02:28:10Xeldlework: if this works still it will get you most of the way there: https://github.com/Xe/dev
02:31:43ldleworkftsf_: yeah
02:31:52ldleworktake some known json, generate a schemea for it
02:31:57*girvo quit (Ping timeout: 260 seconds)
02:32:04ldleworkso you can unmarshal arbitrary json trees into real types in nim
02:32:07Xeldlework: kinda like json-to-go?
02:32:10ldleworkso you don't have to use the json objects
02:32:12ldleworkis that a thing?
02:32:16Xeyeah
02:32:28ldleworkOh golang
02:32:31ldleworkstahp
02:32:37ldleworkXe: I'm gonna have to ignore you soon
02:32:38Xego is kinda horrible, but the tools people have made make it the least painful thing to use
02:32:41ldleworkAnd I really really like you
02:32:44ldleworklol
02:32:59Xeldlework: ?
02:33:31ldleworkhaha I'm just kidding because you keep pointing to golang solutions of my problems and its grating (not really I'm kidding!)
02:34:10Xeoh no
02:34:24Xei was more referring to the tools as comparators so i can fit things into my head
02:34:36Xei usually have similar tools in other languages assicated with the one in go
02:35:00Xeit's so i can look for "how do i take <input> and get <output> with <constraints>?"
02:35:05ldleworkXe: docker outputs all sorts of ridiciulous arbitrary json you know
02:36:16Xeldlework: life throws all kind of ridiculous arbitrary shit at you and the only viable solution is to take things a dat at a time and bit by bit or you'll blow your head off because of stress
02:37:59ldleworkXe: no I just mean, it'd be cool to have a json-to-nim so we'd get nice type safe objects when we parse its json
02:38:39Xeyeah
02:39:11ldleworkXe: I bet there's some crazy Nim thing that would make it like 20 line long lol
02:42:25ldleworkXe: I mean, couldn't we just load a jsonfile during compilation and use a macro to generate a type?
02:42:29ldleworkI've done crazier shit
02:42:41Xewell
02:42:43Xethat's an idea
02:42:48ldleworkhehe
02:43:04Xecompile time expansion of swagger json into full fledged api clients
02:43:12ldleworkhah
02:43:25ldleworkI wonder if the docker api has a swagger definition
02:43:29ldleworkthat'd be nuts !
02:44:26ldleworkwhaaa https://github.com/docker/docker/blob/master/api/swagger.yaml
02:47:07ldleworkI can't do a swagger thingie right now
02:47:11ldleworkbut neat to know the option is there
02:47:16ldleworkI bet nim magic might make it easy
02:53:11*chemist69 joined #nim
03:00:51*girvo joined #nim
03:05:33*girvo quit (Ping timeout: 260 seconds)
03:06:33*lenstr quit (Ping timeout: 260 seconds)
03:10:40*girvo joined #nim
03:16:11*Nobabs27 joined #nim
03:26:38*cheatfate quit (Read error: Connection reset by peer)
03:26:43*cheatfate_ joined #nim
03:27:01*cheatfate_ is now known as cheatfate
03:34:26*def-pri-pub joined #nim
03:35:47*kulelu88 quit (Quit: Leaving)
03:43:58*bozaloshtsh quit (Ping timeout: 240 seconds)
03:44:27*bozaloshtsh joined #nim
04:15:33*bozaloshtsh quit (Ping timeout: 260 seconds)
04:30:24*def-pri-pub quit (Quit: Lost terminal)
04:31:13*bozaloshtsh joined #nim
04:37:29*girvo quit (Ping timeout: 260 seconds)
04:41:25*bozaloshtsh quit (Ping timeout: 240 seconds)
04:47:57ldleworkDoes unmarshalling simply not work if there is extra data in the serialized data or something?
04:48:59ldleworkAnyone?
04:49:04*Nobabs27 quit (Quit: Leaving)
04:49:11ldleworkIts been a whole minute.
04:49:19ldleworkHELLO!?
04:49:22ldlework;)
04:53:00ftsf_ldlework, correct
04:53:12ftsf_it's annoying, i patched it so it ignored it =)
04:56:56ldleworkftsf_: can you share?
04:56:58*yeeve quit (Ping timeout: 240 seconds)
04:57:06ftsf_not currently
04:57:11ldlework...?
04:57:16ftsf_i'm at work
04:57:38ldleworkhttps://gist.github.com/
04:57:46ldleworkhttps://gist.github.com/dustinlacewell/ec6951a21b3cf08da74751d0d8f5ffa9
04:57:51ldleworkhow do I get this out as an int
04:57:56ldleworkwtf is BiggestInt
04:58:10ldleworkNim is freaking crazy town
04:58:27ldleworkI seriously just wanna work with some json
04:58:53*girvo joined #nim
04:58:59ftsf_getNum() doesn't work?
04:59:29ldleworkIt returns BiggestInteger
04:59:33ldleworkwhatever the hell that is
04:59:41ftsf_a type of int
04:59:46ldleworkI just want int
04:59:51ldleworkcuz that's what my type is
04:59:55ftsf_getNum().int
05:00:11ldleworkgot (BiggestInt) but expected 'int'
05:00:20ldleworkthe compiler can't figure that out?
05:00:33ftsf_seems not
05:00:41ftsf_you need to be explicit
05:01:01ftsf_potential for data loss i guess?
05:01:03ldleworkNim is the only language I use where I have to care about int types
05:01:21ftsf_try C =)
05:01:40ftsf_C doesn't force you to think about it until stuff breaks
05:01:51ftsf_nim forces you to think about it before it breaks
05:02:06ldleworkI dunno why you think comparing Nim to one of the first languages that has no features is a good idea
05:02:11*Snircle quit (Quit: Textual IRC Client: www.textualapp.com)
05:02:19zachcarterbecause Nim compiles to it?
05:02:42zachcarterI don’t think having to think about int types at the time of writing code is a band thing
05:02:45zachcarterbad thing*
05:03:16ldleworkNim compiling to C isn't a justification for anything that Nim does.
05:03:27zachcarterwhat?
05:03:34ftsf_nim and C are both statically typed languages that run on baremetal
05:03:35ldleworkIts clear english.
05:03:42zachcarterit’s not logical English
05:03:55ldleworkYou can disagree; it is surely coherent language.
05:04:10zachcarterthat’s what I”m doing then :P
05:04:21*tax quit (Quit: Leaving)
05:04:28ldleworkSaying, "Nim must work this way because it compiles to C"
05:04:45ldleworkis instantly refuted by showing "Nim can do this despite C not being able to do this."
05:05:06ldleworkHaving C as a transpiling intermediary has nothing to do with the behavior of Nim as designed.
05:05:07zachcarterYou can build abstractions
05:05:14ldleworkAh glad you agree.
05:05:21*yeeve joined #nim
05:05:34ldleworkNim is that abstraction, and so I'm just pointing out the reason you gave for why nim works this way is bad.
05:05:51zachcarterI think you’re over-generalizing but okay
05:06:03ldleworkIts actually the most specific point I can make
05:06:34ldleworkAnyway!
05:06:58zachcarteryeah I have better things to fight than you at the moment :P
05:07:06zachcarterlike opengl code
05:07:16*user0_ joined #nim
05:07:42user0_I'm very fascinated with Nim.
05:07:51user0_How close are we to v1.0?
05:08:00zachcarterthere’s a roadmap on github user0_
05:08:15zachcarterthat’s the short answer, I don’t know what the long answer is
05:08:55ldleworkftsf_: heh I wish I had that patch :(
05:09:30ftsf_ldlework, for clarity, i'm using the marshal module not the json module
05:09:48ftsf_i vendored it and then modified it to ignore the errors
05:18:18ldleworkftsf_: yeah that's what I want
05:18:21ldleworkpartial unmarshaling
05:28:22ldleworkI don't understand marshal.nim
05:28:25*ldlework sighs
05:28:54ftsf_just use it and when you see exceptions raised, put them in a try =)
05:29:35ldleworkI don't know what you ean just use it
05:29:38ldleworkI've written a type
05:29:44user0_zachcarter: I just read the roadmap. I'm still fascinated. I learned python as my first programming language. But after I started to learn other languages I realized python is pretty slow. *To me*, Nim is the perfect combination of comfort and speed.
05:29:49ldleworkand I'm using to[TheType](the_data)
05:29:51ldleworkno errors
05:30:00ftsf_ldlework, if no errors then great
05:30:05ldleworkand yet the return value's fields are all empty
05:30:15zachcarteruser0_ it’s a great language in my opinion, I’m working on a 2d game framework at the moment using Nim
05:30:27zachcartervery few complaints about the language thus far for my use case
05:30:34ldleworkftsf_: https://gist.github.com/dustinlacewell/e4b18274d3aa2624a299a01b5c5cb673
05:30:39ftsf_ldlework, try load
05:30:43ldleworkI did
05:31:21ldleworkthis language drives me crazy
05:31:27user0_zachcarter: Nice. I want to start my personal project. It's a text editor written in D. Am I too crazy to implement a plugin system (or plugins) written in Nim as opposed to python? I know python has larger libraries but I want performance not latency.
05:31:35ftsf_var foo: Foo; load("foo.json", foo) ?
05:31:56ldleworkftsf_: there is no file
05:32:02ldleworkI'm querying a service
05:32:08ldleworkyou want me to write the json to a file first?
05:32:27ftsf_the first argument is a stream
05:32:39zachcarterI don’t think so user0_ I believe demi- was talking earlier today about writing a plugin system
05:32:44ldleworkis a string a stream?
05:33:16ftsf_no, but i think there's a StringStream type
05:33:26ftsf_https://nim-lang.org/docs/streams.html
05:33:46ftsf_var ss = newStringStream(mystring)
05:35:00ldleworkftsf_: no error but still no data in the actual object
05:35:11ldleworkand if I print the json, its full of data
05:35:21ldleworkso I think marshal is silently failing
05:35:27user0_zachcarter: Fantastic. I'll stick around.
05:35:42ftsf_mysterious
05:36:03ldleworkftsf_: do you have docker?
05:36:07ftsf_ldlework, nope
05:36:43ftsf_user0_, you can compile libraries (.so/.dll) and load them
05:37:38ftsf_user0_, https://nim-lang.org/docs/dynlib.html
05:37:53ldleworkftsf_: I could embed the json into theh file
05:38:13ftsf_https://forum.nim-lang.org/t/1400
05:38:39ftsf_which file?
05:38:55zachcarteruser0_ sweet :)
05:39:07user0_Awesome, thanks ftsf_
05:39:25ldleworkhttps://gist.github.com/dustinlacewell/8ea556eebe6d3eb689cfa672521094d7
05:39:40ldleworkftsf_: this hardcodes the json
05:39:54ldleworkjust run `./dmt ls`
05:39:57ldleworkafter compiling
05:40:54ldleworkoops I left in an echo statement
05:41:10*bozaloshtsh joined #nim
05:41:15ldleworkupdated
05:41:24ldleworkif you run ./dmt ls you wont get any output
05:41:32ldleworkeven though that causes it to unmarshal that json
05:43:29ftsf_Error: unhandled exception: invalid field name: ID [ValueError]
05:44:15ldleworkfor what
05:44:43ftsf_when running ./docker ls
05:45:15ldleworksure, but what's the error
05:45:18ldleworklocation
05:45:21ldleworkthe nature of it
05:45:29*bjz quit (Ping timeout: 240 seconds)
05:45:43ftsf_DMed
05:45:58*bjz_ joined #nim
05:46:50ldleworkugh I badly wanna give up on this
05:46:58ldleworkhow hard could it be to read some json and deserialize it
05:47:00ldleworkffs
05:47:43ftsf_you need to use object not tuple
05:47:50ftsf_tuple loses the field names
05:48:32ldleworkdidn't fix it
05:48:56ftsf_gives another similar error for ContainersStopped
05:49:43ftsf_typo in your DockerInfo
05:49:45ftsf_ConstinersStopped
05:50:09ldleworkhow come I don't get these errors?
05:50:14ftsf_i don't know...
05:50:20ftsf_what happens when you run it?
05:50:31ldleworkI get no output
05:50:54ftsf_i get it echoing the json input and then the error
05:51:03ldleworkthis version https://gist.github.com/dustinlacewell/7367904089b39215161237cd48ad019b
05:51:09ldleworkuse this
05:51:14ldleworkit wont try to create a home directory its
05:53:56ftsf_Error: unhandled exception: invalid field name: DriverStatus [ValueError]
05:54:10ldleworkhow are you getting these errors?
05:54:16ldleworkI dont understand this whatsoever
05:54:23ldleworkHint: operation successful (44318 lines compiled; 1.050 sec total; 95.059MiB; Debug Build) [SuccessX]
05:54:25ldlework~/s/n/dmt $ ./dmt ls
05:54:27ldleworknothing
05:54:45ldleworkhow are you compiling it and running it
05:55:02ftsf_nim c -r docker ls
05:55:27ldleworkme too
05:55:30ldleworkwhat version of nim?
05:55:39ftsf_0.16.0
05:55:49ldleworkhow can this be explained?
05:56:22ftsf_what is dmt?
05:57:20ldleworkits just the name of the app I'm writing
05:57:36ldleworkyou have the full source code
05:57:48ftsf_ok
06:00:36ldleworkdunno, I think I give up on Nim for another couple years
06:01:06ftsf_also maybe try back later when the americans and europeans are online
06:01:16ftsf_rather than the 2-3 active people here at this time
06:01:52*rosshadden quit (Quit: WeeChat 1.7)
06:01:54ldleworkDunno, Nim has a strange attitude that, if someone figured it out, and it worked once, then that's literally all we can ask for
06:02:48*user0_ quit (Quit: user0_)
06:02:56*user0_ joined #nim
06:03:13ldleworkit doesn't even ship its own package manager
06:04:10ldleworkI love to hate on golang, I just feel utter sorrow to hate on Nim
06:05:15ldleworkOh look, Nim does bundle Nimble now but you have to go to the Nimble repo to find that out
06:05:31ldleworkits just like they have no awareness of user experience
06:06:18tstmldlework: I'm pretty sure feedback on that is greatly appreciated.
06:06:37ftsf_feedback and also work fixing it =)
06:07:00tstmMay of the users of nim are quite savvy and thus don't necessarily notice the hurdles of starting with nim.
06:08:21ldleworkI've been writing software for 15 years
06:09:15ldleworkIf they spent more than 0% effort/time, as in, it was literally part of the required process of managing the project, things would be a lot nicer.
06:10:01ldleworkIf I can't download your language, and download a json file from a URL and parse it into a type-safe structure in <20 minutes, your shit is fucked.
06:10:30ldleworkThere may be many reasons why one's shit is fucked, but none of thoses reasons magically un fuck the shit, so to speak.
06:11:45tstmFor sure.
06:11:52ftsf_there's a reason it's alpha
06:13:05ftsf_there's a lot of room for improvement, but if you're keen then i'm sure your help would be appreciated. if not, come back in a while once it's stable
06:13:54ftsf_i've been using it happily for my own projects for some time with the occasional hurdle, which i can usually work around or get help with here.
06:14:36ldleworkI've written a lot of code in Nim myself
06:14:57ldleworkBut its always through blood, sweat, and literally blind-folded traversal of rooms I've never seen before.
06:15:05ldleworkThe compiler messages are utterly mysterious
06:15:22ldleworkI know that when the westerners wake up tomorrow they will explain why things are the way they are
06:15:40ldleworkOr even some small simple thing I missed, but I dunno how long it'll take before they realize that isn't the point
06:17:31ldleworkI'll just use JsonNode to get on with life
06:17:42ldlework(literally interface{} all over again!)
06:19:39tstmldlework: Is your input json serialized with marshal or just some json you've written?
06:20:58ldleworktstm: Its json from a server
06:21:01ldleworkservice
06:21:15ldleworkI expect it would say "Woah, your nim type doesn't define X field."
06:21:19tstm(dislaimer: I know next to nothing about the subject)
06:21:21ldleworkor something, its just does nothihng
06:21:47ftsf_ldlework, which is what I got when I ran your code
06:21:52ftsf_not sure why it's not doing it for you
06:21:56tstmYeah. I'd expect marshal to be pretty dependant on its own structure, whatever it uses for serialization.
06:21:59ldleworkftsf_: yes I am boggled.
06:24:31FromGitter<Varriount> ldlework: Pull request?
06:25:21ldleworkVarriount for what?
06:29:35ldleworkftsf_: on interesting thing is that if I put some echo's after that deserialization line they don't get output
06:29:43ldleworkI wonder if the error is taking place and I'm just not seeing it
06:29:59ftsf_running on linux?
06:34:13ldleworkyeah
06:39:49ldleworkyyyyyeap fuck this
06:46:56*nsf joined #nim
07:15:10zachcarterCool truetype font loading via freetype and rendering is a thing now - http://imgur.com/a/6YZ28
07:24:38*user0_ quit (Read error: Connection reset by peer)
07:24:47*user0_ joined #nim
07:28:11*ftsf_ quit (Quit: :q!)
07:31:45*Vladar joined #nim
07:34:15*couven92 joined #nim
07:34:24Araqldlework: what's the problem? missing json.toNim ?
07:34:51*girvo quit (Ping timeout: 256 seconds)
07:35:36tstmAraq: I think the problem was that marshal didn't give any sensible error messages for whatever reason.
07:35:45tstmit did for the other guy
07:36:20tstmBut, marshal was used because of lack of json.toNim
07:38:25Araqyeah, maybe I can implement that later
07:40:54stisaThere's https://github.com/cjxgm/jsonob that should do json->nim
07:44:01*tankfeeder joined #nim
07:47:10Araq"Dunno, Nim has a strange attitude that, if someone figured it out, and it worked once, then that's literally all we can ask for". I have no idea what that's supposed to mean.
07:51:17*chemist69 quit (Ping timeout: 256 seconds)
07:53:06*gokr joined #nim
07:56:28*chemist69 joined #nim
07:56:48ldleworkAraq: There's no knowledge transfer
07:56:59ldleworkThe docs just report what is
07:57:25ldleworkI gave up, and having lots of success in Python
07:58:15Araqsure but that doesn't mean I don't want to improve the experience.
07:59:39Araqso there is no knowledge transfer and the docs just report what is. well what should they report instead?
08:01:23ldleworkAraq: I'm just saying, has no one ever tried to download nim, download a some json from a web service and deserialize into types?
08:01:55ldleworkEither I'm stupid, my machine is strangely configured, people have tried and failed and were unheard, or literally no one has tried this before.
08:02:17ldleworkI dunno which it is, but everytime I try Nim its a test of my loyalty to the concept of the project.
08:03:21AraqI think it's "people noticed it's missing and wrote their own json->object proc"
08:03:41ldleworkI just hope one day I will try Nim randomly, and miraculously get a bunch of work done.
08:04:12Araqwell actually I *know* people created better de/serialization and do not share it ;-)
08:09:20*Arrrr joined #nim
08:09:20*Arrrr quit (Changing host)
08:09:20*Arrrr joined #nim
08:09:55*xet7 quit (Quit: Leaving)
08:09:59Araqso ... where should we document that Nim ships with nimble? tutorials?
08:10:24Araqsearch index?
08:11:13*xet7 joined #nim
08:12:57Araqhmm github lets me resolve merge conflicts on their site now. impressive job.
08:22:35*zachcarter quit (Quit: zachcarter)
08:24:29*bozaloshtsh quit (Ping timeout: 240 seconds)
08:28:00*Andris_zbx joined #nim
08:33:48ftsfAraq, did it work out for you? i tried that in the past and it didn't work... ended up having to resolve it locally anyway
08:34:16Araqseems so, yes, the CI is still running though.
08:37:58cheatfateAraq, looks like zahary wants to break my `asyncpg` again :)
08:38:33cheatfateso it looks like macros is the most unstable part of Nim
08:38:40Araqhey #nim, stop talking in riddles please.
08:39:01Araqcheatfate: why? do you check for nkBracket in your macros?
08:39:08cheatfateyep
08:39:57AraqI can patch the code for you. ``n.kind in {nkBracket, nkArgList}``
08:40:25Araq<-- compatible with upcoming Nim version and older Nim versions
08:40:37cheatfateok, then
08:41:49*rokups joined #nim
08:43:03cheatfateAraq, is it possible to have this workaround in macros docs?
08:46:31Araqyou keep asking me for making the stdlib explain the basics of the programming language to you, but fine.
08:47:49Araq^ this 'you' here refers to #nim
08:48:01Araqin general.
08:48:29ftsfmore examples in stdlib docs would probably do wonders
08:49:02ftsfbonus points if they're also tests =)
08:49:20FromGitter<dom96> It really pains me to see ldlework trying to read JSON using the marshal module.
08:49:28FromGitter<dom96> That's not what the marshal module is for!
08:49:35ftsfdom96, sorry, that was my suggestion as it worked for me
08:50:02FromGitter<dom96> I see.
08:50:15FromGitter<dom96> We need a large warning in marshal against this I guess.
08:50:55FromGitter<dom96> And a way to actually read/write JSON this way
08:51:00*xet7 quit (Quit: Leaving)
08:57:04Araqyup.
08:59:15FromGitter<dom96> Examples would help indeed. The JSON examples are a mess IMO https://nim-lang.org/docs/json.html
08:59:38FromGitter<dom96> Compare to httpclient docs https://nim-lang.org/docs/httpclient.html
09:00:20FromGitter<dom96> It's not just about examples, it's also about how you present them.
09:02:00FromGitter<dom96> @ldlework this is not how you should be deserialising JSON in Nim.
09:02:58FromGitter<dom96> How would you do it in Python?
09:03:21*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:04:05FromGitter<dom96> In fact, you shouldn't be deseralising at all.
09:06:37*Salewski joined #nim
09:07:15SalewskiAraq, I am a bit confused about latest nimsuggest error text format...
09:07:22SalewskiStrings I get from reading socket look like this when echoed:
09:07:31Salewski"\'s\' is declared but not used [XDeclaredButNotUsed]"
09:07:35Salewskiliteral(0))\x0Abut expected
09:07:45SalewskiSo I do now 3 replace operations before displaying erros in tooltip:
09:07:53Salewskiif doc[0] == '"' : doc = doc[1 .. ^2]
09:08:01Salewskidoc = doc.replace("\\'", "'")
09:08:11Salewskidoc = doc.replace("\\x0A", "\n")
09:08:16ldleworkdom96 what kind of advice is that
09:08:17SalewskiBut ok, when that is intended I am fine.
09:08:45ldleworkI'm not "trying to read json using the marshal module"
09:09:00ldleworkI'm trying to get type-safe json, for which has a rigid and stable schema.
09:09:07ldleworkYour pitty is kind of patronizing.
09:09:51ldleworkI wouldn't do this in Python because python has no type safety. If I really wanted it, I'd invent some sort of JSON schema non-sense.
09:10:00AraqSalewski: it's always in quotes, I think?
09:10:23ldleworkBut I figure, I can write some simply Nim types, and deserialize Docker's standard REST responses to actual types so I can use dot-notations and so on
09:10:25SalewskiYes, always i ""
09:10:31ldleworkAnd to implement methods against them.
09:10:38ldleworkdom96: still feel the same?
09:10:43Araqldlework: "dom96, sorry, that was my suggestion as it worked for me"
09:10:57AraqI think he also referred to this statement
09:11:28stisaIdlework: https://gist.github.com/stisa/fa48fb24ba0929b42c7b39b2a0505029 do you mean something like this for json->object ?
09:12:18ldleworkstisa: yeah, its called the Marshall Module.
09:12:55ldleworkI assumed that since I did not totally define every single field, and every nested possible json object with a corresponding Nim type I would get errors
09:13:09ldleworkBut I just got silence and we couldn't figure out why I wasn't getting errors so I moved on
09:13:12ldleworkI'll visit it again
09:13:27ldleworkBut "oh my god that's not what marshalling is for!" isn't the right thing.
09:14:02*bjz joined #nim
09:14:26stisaoh sorry, I must have missed part of the conversation
09:14:38ldleworkIf I figure it out, I'll make sure to come back and report what I come up with
09:15:25*user0_ quit (Quit: user0_)
09:19:55FromGitter<dom96> Sorry, I didn't mean to be patronizing. I just got a bit annoyed.
09:20:54FromGitter<dom96> The marshal module is essentially a pickle module.
09:21:04FromGitter<dom96> Perhaps we should rename it?
09:21:37FromGitter<dom96> That said, the name "marshal" doesn't imply that it handles JSON.
09:23:33FromGitter<dom96> But sure, we need something like that for JSON in the stdlib.
09:25:55*Salewski left #nim (#nim)
09:32:51ArrrrIf the problem is that in the future it may change its internal representation, you might allow several backends.
09:58:15*bozaloshtsh joined #nim
10:00:00*vlad1777d joined #nim
10:00:38*chemist69 quit (Ping timeout: 246 seconds)
10:03:56*chemist69 joined #nim
10:37:41*arnetheduck joined #nim
11:02:16*Snircle joined #nim
11:09:28*couven92 quit (Quit: Client disconnecting)
11:16:00*couven92 joined #nim
11:16:53*fredrik92 joined #nim
11:20:49*couven92 quit (Ping timeout: 240 seconds)
11:42:33*fredrik92 is now known as couven92
11:44:16*couven92 quit (Quit: Disconnecting)
11:44:42*couven92 joined #nim
12:00:45*zachcarter joined #nim
12:04:58*zachcarter quit (Ping timeout: 240 seconds)
12:11:48*couven92 quit (Quit: Disconnecting)
12:19:17*zachcarter joined #nim
12:40:29*Arrrr quit (Ping timeout: 260 seconds)
12:44:10*def-pri-pub joined #nim
12:50:18def-pri-pubHey, morning guys. I got around to doing another Nim article. This one is a tutorial instead: https://16bpp.net/page/hot-loading-code-in-nim
12:57:25*elrood joined #nim
12:57:57Araqdef-pri-pub: I like it but the compiler can easily make this easier
12:58:07Araqwant to patch the compiler?
12:58:34AraqI can guide you but I don't want to do it myself
13:00:38FromGitter<Varriount> dom96: Did you just change the documentation on the marshal module?
13:01:51FromGitter<Varriount> Or has the warning "The serialization format could change in future!" always been there?
13:05:53FromGitter<Varriount> ldlework: If you don't mind using yaml (which is a superset of json) NimYaml does what you want.
13:05:57FromGitter<Varriount> https://nimyaml.org
13:09:06def-pri-pubAraq: I bet it could. I'm far too busy right now to hack up the compiler to do that
13:10:12def-pri-pubI'd rather make a system that operates a little better first,
13:10:32def-pri-pubOr some sort of "easy hot loading," package for nimble
13:11:56flyxldlework, I can confirm the NimYAML will do exactly what you expect for JSON deserializing, including emitting an error for missing / superfluous fields
13:13:00flyxif it hadn't the YAML data stream as intermediate representation, it would be a general serialization library which happens to have a YAML backend ^^
13:16:29FromGitter<Varriount> flyx: I've probably said this before, but NimYAML is an awesome module.
13:19:06flyxheh, thanks.
13:22:37*zachcarter quit (Quit: zachcarter)
13:46:18def-pri-pubAraq: actually, how could the compiler make this easier? I mentioned that I would like a system that could detect changes in the code, instead of file write times. Can you elaborate on this a little?
13:46:51Araqdef-pri-pub: system.reloadDlL(name)
13:47:02Araqrequires codegen support though.
13:47:22Araqbut it should be a simple patch, we already use dlsym under the hood for .dynlib
13:47:57Araqthe loading code needs to be moved into a generated C function that system.reloadDll calls again
13:48:24def-pri-pubWhere is reloadDll located in the Nim source? A gitHub code search didn't reveal any results.
13:50:51Araqwell it doesn't exist.
13:50:56AraqI'm asking you to implement it.
13:51:00def-pri-pubah
13:53:02def-pri-pubWould this proc then also reset all of the function pointer symbols it grabbed from the first load? That's one of the issues that I see.
13:53:27rokupsAraq: did you see https://github.com/nim-lang/Nim/issues/5507 ?
13:54:49Araqdef-pri-pub: yes, it would. that's its whole point
13:57:13def-pri-pubOkay, I'll think about it, but don't except too much from me (busy workin'). Do you think this would be done in pure Nim or C?
13:58:59Araqdon't be silly. we don't write C here.
13:59:17Araqit would be a compiler patch, the compiler is written in Nim.
14:00:02*IrcDroidClient joined #nim
14:00:50*IrcDroidClient quit (Remote host closed the connection)
14:06:17def-pri-pubAraq: can I do it in Haskell instead :)
14:23:21VladarAny Linux users wanna test out my attempt at packing AppImage game? https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run
14:23:44Vladarwaisted 3 days trying to figure it out
14:24:44*zachcarter joined #nim
14:25:05*elrood quit (Quit: Leaving)
14:39:00def-pri-pubVladar:
14:39:06def-pri-pubI dl'd it
14:39:13def-pri-pubchmod u+x'd it
14:39:18def-pri-puband tried to run it.
14:39:20def-pri-pubGot this:
14:39:24def-pri-pubbash: ./ng2planetoids-i386.run: No such file or directory
14:39:53def-pri-pub¯\_(ツ)_/¯
14:41:53Vladarthat's… strange. what ls tells?
14:42:29Vladareven ls -la
14:47:41Vladardef-pri-pub: ?
14:48:28def-pri-pubIt says that it's marked as executable
14:49:02Vladarcould you give me the output of ls -la?
14:49:59def-pri-pub-rwxrw-r-- 1 ben ben 1541392 Mar 13 10:38 ng2planetoids-i386.run
14:51:17Vladarhm, let me check something…
14:53:03Vladarok, I think I know why
14:53:28flyxwell it is a 32bit executable, it naturally does not work in 64bit environments
14:55:05Vladaractually, it should
14:55:23Vladarhere's the correct link https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run?raw=true
14:56:04Vladardef-pri-pub: what about now?
14:57:31ftsfdlopen(): error loading libfuse.so.2
14:57:36ftsfAppImages require FUSE to run.
14:57:49Vladaryes, you should have fuse installed
14:58:11*nsf quit (Quit: WeeChat 1.7)
14:58:27Vladar32bit one, probably
14:58:31ftsfi do, but no lib32-fuse available on arch it seems
14:58:41Vladarit is on aur
14:59:12ftsf"Linux apps that run anywhere" hehe
14:59:23ftsfsadly still not that easy
14:59:33Vladarbetter than nothing, I guess )
14:59:47federico3Vladar: have you looked into flatpak?
14:59:49ftsfError: unhandled exception: No such file or directory [OSError]
14:59:50ftsfruns now
14:59:55ftsfbut gives that, echos -1
15:00:24ftsfbest i've found is a shell script that sets the library path and executes the correct binary for the platform
15:00:43ftsfand just distribute a tar.gz
15:00:48Vladarftsf: flatpak requires flatpak installed, IIRC
15:00:52demi-is there any IPC mechanism in nim's standard library yet?
15:01:14demi-or would i have to fall back on whatever is available on my specific platform
15:01:54federico3Vladar: it does - however it looks like distributions are shipping it
15:03:30Vladarftsf, what are you running, btw? arch?
15:04:08ftsfVladar, yep
15:04:28Vladarit's strange, I'm running it too
15:04:49Vladarthough no errors happening
15:06:53Vladaractually, I have looked into flatpak but didn't like it much
15:07:23VladarAppImage seems like a more simple approach
15:07:59ftsftar is nicer and simpler =)
15:09:07Vladardef-pri-pub: have you tried new link?
15:11:49ftsfo/ night!
15:13:21*tankfeeder quit (Quit: Leaving)
15:16:46def-pri-pubVladar: can you resend it?
15:16:55Vladarhttps://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run?raw=true
15:17:50*rosshadden joined #nim
15:18:32def-pri-pubSame thing happened
15:18:58Vladarweird…
15:20:58Vladardef-pri-pub: let's try this command then:
15:20:59Vladarwget -O ng2planetoids-i386.run https://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run?raw=true && chmod +x ng2planetoids-i386.run && ./ng2planetoids-i386.run
15:21:38Vladarshould download and run it
15:22:25def-pri-pubYeah, that's not working either
15:22:34Vladarwhat distro are you running?
15:24:21def-pri-pubUbuntu 16.04.1
15:25:25Vladar32 or 64?
15:25:51Vladarand it still says No such file or directory ?
15:26:34def-pri-pubIm' running 64 bit
15:27:32*sz0 joined #nim
15:27:42Vladargonna try to run livecd myself to find out what the hell is going on
15:31:00rosshaddenVladar: I'll try running it on Arch. Do you have a 64bit file, or do you expect that to work anyway?
15:31:39Vladarrosshadden: it should work if you have lib32-fuse installed
15:31:46rosshaddenOkay I'll install it.
15:31:57*rauss quit (Quit: WeeChat 1.7)
15:32:02*rosshadden is now known as rauss
15:32:14VladarI'll try to build 64 bit version later, but I need to setup 64-bit Ubuntu somewhere
15:32:20*rosshadden joined #nim
15:33:10Vladarand I have exactly one 64-bit machine here — my working one >_<
15:33:29raussEhh I don't want to replace gcc with gcc-multilib
15:33:40raussI'll wait for the 64 bit version later
15:33:46Vladarsure
15:36:41VladarI'm wondering, could I just pack 32-bit app with a 64-bit AppImage?
15:36:57Vladarworth to try…
15:39:28*bozaloshtsh quit (Changing host)
15:39:28*bozaloshtsh joined #nim
15:41:54*niv quit (Remote host closed the connection)
15:42:07Vladarrauss: could you try this version? http://dropcanvas.com/68a4o
15:42:50Vladarpacked it with 64bit appimage, so, theoretically, it should work with 64bit fuse
15:47:31raussSure
15:48:25raussVladar: I get the "No such file or directory" error, which is a good thing I think for you
15:48:29raussmore people to recreate it :)
15:48:37raussPlus I'm on Arch, so it rules out Ubuntu as the issue.
15:50:03VladarI'm starting to lose my mind. Post "ls -la" output, pls
15:51:27VladarIt might be related to 32/64bit, I think. Need to build a true 64-bit app to prove it, though
15:52:38FromGitter<rosshadden> @Vladar ⏎ ⏎ ```code paste, see link``` [https://gitter.im/nim-lang/Nim?at=58c6c0447ceae5376ab11c5c]
15:53:07Vladarthanks
15:53:38VladarI'll try to set up 64bit ubuntu 12 platform and then contact you
15:54:21raussVladar: You said you use arch. Don't you use a 64bit arch?
15:54:35raussVladar: They officially deprecated 32bit arch a few weeks ago, even
15:55:09raussMaybe it wasn't you that said you used arch. I skimmed the chat log but might have misread.
15:55:34Vladarsure, and I'm sure if I build it on arch it will run for you perfectly. The thing is, it should be build on oldest possible system to run everywhere
15:56:35*Snircle quit (Ping timeout: 246 seconds)
15:57:44Vladarhowever, there's no harm to try it out too, give me a couple of minutes…
16:02:50*Snircle joined #nim
16:03:42Vladarrauss: here's arch-built one http://dropcanvas.com/p1c8v
16:07:34*Nobabs27 joined #nim
16:11:29*chemist69 quit (Ping timeout: 240 seconds)
16:11:52*chemist69 joined #nim
16:26:51*Arrrr joined #nim
16:26:57*Nobabs27 quit (Quit: Leaving)
16:33:13zachcarterTrueType font rendering via FreeType :D
16:33:15*Trustable joined #nim
16:33:17zachcarterhttp://imgur.com/a/gnmYu
16:43:57*xet7 joined #nim
16:46:24*gokr quit (Ping timeout: 268 seconds)
16:49:27*Andris_zbx quit (Remote host closed the connection)
16:56:51dom96Hello guys
16:58:00dom96demi-: I don't think IPC is a must-have for a standard library.
16:59:02dom96I created this a while back https://github.com/dom96/nim-jsonrpc
16:59:43*ofelas quit (Quit: Leaving)
17:04:25*gokr joined #nim
17:04:26*vlad1777d quit (Remote host closed the connection)
17:05:05demi-interesting, though doesn't provide the same sort of transport security that an authorized IPC/XPC process would. I might just wrap the XPC headers on OS X and stick them up as a package
17:09:38*zaquest quit (Quit: Leaving)
17:19:16*zaquest joined #nim
17:27:14raussVladar: I still get dir not found
17:27:38raussthe first thing that prints is `-1` btw.
17:28:11raussI agree with dom96 that IPC doesn't really need to be in a std lib
17:28:35*devted joined #nim
17:40:47def-pri-pubdom96: while you're here, I've been meaning to ask you about how I can go about fixing up the .nimble file for my stb_image wrapper
17:41:26def-pri-pubWhen I do an install, I get that warning about namespaces telling me to put my files in a subdirectory that has the same package name
17:42:08def-pri-pubThe only issue is that I have to separate files that are meant to be imported, each with different names
17:42:20def-pri-pub`stb_image.nim` and `stb_image_write.nim`
17:42:54def-pri-pubIs there a way I can stuff that _write.nim one in the subdir, but still have it where my users can type `import stb_image_write as stbiw`?
17:54:15*Ven joined #nim
17:56:00*gk-- joined #nim
17:56:47*gk-- quit (K-Lined)
17:58:16*gk-- joined #nim
17:58:47*gk-- quit (K-Lined)
18:00:28*Ven quit (Ping timeout: 240 seconds)
18:01:00*vlad1777d joined #nim
18:01:46*Jesin quit (Quit: Leaving)
18:02:08stisadef-pri-pub : make a folder named src and put .nim files there
18:02:24*Jesin joined #nim
18:02:30stisaThen in .nimble add srcDir = "src"
18:03:19*elrood joined #nim
18:03:25*niv joined #nim
18:04:11*gokr quit (Quit: Leaving.)
18:04:14stisaOh no wait I misread,sorry, that would still give warnings.
18:04:29*zachcarter quit (Quit: zachcarter)
18:10:16dom96def-pri-pub: make a directory called stb_image/
18:10:25dom96and create a 'write' module in there
18:10:43dom96(better to rename it to 'writer' probably)
18:11:25def-pri-pubI'm trying to keep it as similar to that of the original stb libs, e.g. `stb_image_write.h`. Guess I'll have to break that...
18:11:39dom96def-pri-pub: btw ideally Nimble's hints should explain this. Do you think there is a way to make them easier to understand?
18:12:24dom96Afraid so. The only other way would be to create a 'stb_image_write', 'stb_image_read', etc. packages
18:12:38def-pri-pubNah, I think the hints are good, I just was wondering if there was a way to get the `import`s to work the way that I want with the newer nimble
18:12:56def-pri-pubtwo separate packags? Absolutely disgusting.
18:13:43*Ven joined #nim
18:15:23*chemist69 quit (Ping timeout: 264 seconds)
18:17:54FromGitter<Varriount> Rauss: Wow, deprecation an entire architecture? The Arch team makes done pretty bold moves
18:19:48*chemist69 joined #nim
18:20:16raussVarriount: The rest of the OS's could learn something from that
18:20:16*LeNsTR joined #nim
18:21:19dom96While i'm sure it takes a load of work off their hands, I did enjoy running Arch on my old Pentium 3 IBM PC.
18:22:11FromGitter<Varriount> I'm still miffed that the Arch team stopped including an installer with their live CD iso
18:24:04*Vladar quit (Quit: Leaving)
18:26:24ehmry[m]is it possible to catch C++ exceptions from Nim? I've been putting exception handling in external code but then I have to deal with compiling an external object.
18:27:49FromGitter<Varriount> ehmry: I don't know, but if you can't do it in pure Nim, you can probably manage something with macros and the emit pragma
18:28:21ehmry[m]yea, I was consideing emit but it seemed distasteful
18:30:30FromGitter<Varriount> @Araq I'm curious - why is the `this` pragma module-wide?
18:32:17*Ven quit (Ping timeout: 260 seconds)
18:33:26*vlad1777d quit (Remote host closed the connection)
18:33:49*nsf joined #nim
18:34:32*Ven joined #nim
18:36:28*def-pri-pub quit (Quit: leaving)
18:46:17*Ven quit (Ping timeout: 260 seconds)
18:50:22*Trustable quit (Remote host closed the connection)
18:53:29*Ven joined #nim
19:02:24*Ven quit (Ping timeout: 240 seconds)
19:07:31*gokr joined #nim
19:13:25*Ven joined #nim
19:14:31*Ven quit (Read error: Connection reset by peer)
19:17:35*brson joined #nim
19:22:52*PMunch joined #nim
19:25:06*Matthias247 joined #nim
19:33:24*Ven joined #nim
19:34:49Araqvarriount: what else should we attach it too?
19:37:46Araqdom96: can we please make nimble less rigid about the directory structure somehow?
19:38:09Araqnot even the packages under nim-lang adhere to it
19:38:23Araqnor do I like excessive subdirectories, but you know that.
19:38:40Araqwe can change how --nimblePath works if that's what it takes.
19:39:16dom96Propose something
19:39:48dom96It's a small price to pay for the feature that we get
19:40:07Araqcompiler sees package/module.nim and considers package-$version/module.nim if that's in the nimble path
19:41:04dom96Do you understand why Nimble needs to be so anal about the directory structure?
19:46:22*Ven quit (Ping timeout: 260 seconds)
19:46:56PMunchI'm curious dom96, why?
19:47:03Araqbecause we like to enforce package/module in the import statements?
19:47:50*user0_ joined #nim
19:48:11dom96Because a package named 'http' shouldn't encroach on another package's namespace.
19:48:48dom96A package named 'http' shouldn't be able to install a module that can be imported via `import ftp/client`
19:49:08dom96Because this module belongs to an 'ftp' package.
19:50:15dom96Does that make sense?
19:51:04PMunchAh
19:51:22*kulelu88 joined #nim
19:51:22PMunchSo http would need to have an import like "import http/ftp/client"
19:51:33dom96yeah
19:51:41PMunch(Not that you should do that)
19:51:47PMunchThat makes sense
19:51:54dom96Indeed. You could have a package named 'network_utils'
19:52:00dom96Where that would make sense
19:52:06PMunchYeah
19:52:41Araqyeah, so what I said.
19:52:56Araq--nimblePath should work differently
19:53:14*Ven joined #nim
19:54:55*bjz quit (Ping timeout: 256 seconds)
19:54:59dom96Araq: I don't really understand what you propose
19:55:52demi-work differently how?
19:55:55*bjz_ joined #nim
19:56:34*BitPuffin|osx joined #nim
19:56:55AraqnimblePath is too greedy. it adds .nimble/pkgs/p-1.0 to the search path
19:57:14Araqand then in p-1.0 I need yet another 'p' dir to get the "namespacing"
19:57:37Araqinstead it should only add .nimble/pkgs
19:57:48dom96I see. And then treat p-1.0/ as p/
19:57:54Araqexactly.
19:57:56PMunchHopefully :P
19:58:09dom96This breaks the "Jester case"
19:58:21PMunchWhich is?
19:58:29dom96I want to be able to write `import jester`
19:58:33dom96not `import jester/jester`
19:58:52PMunchMaybe when you ignore -1.0 you could also ignore p/p?
19:59:47*nsf quit (Quit: WeeChat 1.7)
20:00:37PMunchOr maybe even add an option to the config file for a package
20:00:55PMunchSo that you would be able to do "p/p as p" or something similar
20:01:32PMunchTo allow the package creator more flexibility with folder structure
20:02:59*Ven quit (Ping timeout: 246 seconds)
20:04:34Araqwe can have some sugar like 'import jester/_' for this
20:04:54PMunchThat's still a bit ugly though..
20:05:16PMunchI mean if I run nimble install jester I assume the import will be import jseter
20:05:24PMunchs/jseter/jester
20:06:45dom96While the way it works currently may prove annoying, it does work and does ensure there are no unintended files installed.
20:06:59*kulelu88 quit (Ping timeout: 264 seconds)
20:07:37dom96Changing the way --nimblePath works won't help def-pri-pub
20:07:58PMunchdef-pri-pub?
20:08:09dom96Read the IRC logs
20:08:22PMunchSorry :Y
20:11:23PMunchHmm, he just wants to stick to the C syntax though
20:11:51PMunchIn that case I think the "Nimian" way (whatever that turns out to be) would be better for a Nim package
20:11:54*LeNsTR quit (Ping timeout: 240 seconds)
20:12:09PMunchSo you have "import stb_image/write" or something like that
20:12:14*rokups quit (Quit: Connection closed for inactivity)
20:12:21Araqwell I consider --nimblePath a mistake, I use --noNimblePath more and more often and explicit --path commands
20:12:54dom96Araq: Why?
20:13:18*Ven joined #nim
20:13:47Araqbecause I tend to have outdated stuff in my pkgs/ that interferes with my compilations
20:14:37Araqthat's what 'nimble build' itself does. it uses --noNimblePath plus explicit --paths, right?
20:14:37*Ven quit (Read error: Connection reset by peer)
20:15:19dom96yes
20:15:53Araqso nimble doesn't want this feature and I don't want it either. ;-)
20:16:08dom96Well, I do.
20:16:25Araqmaybe not. consider this:
20:17:02AraqI install 'jester'. then my program has a dependency to 'jester'.
20:17:14Araqso I add jester to my own .nimble file as dependency.
20:17:30Araqand that's enough for 'import jester' to work then, no --nimblePath required
20:18:02*couven92 joined #nim
20:18:10Araqwell that *could* be enough. maybe the compiler should read .nimble files.
20:19:08*kulelu88 joined #nim
20:19:12dom96This is not how you use this
20:19:29dom96"Hrm, I wanna try this new fangled jester package"
20:19:33dom96nimble install jester
20:19:37*dexterk_ joined #nim
20:19:47dom96echo "import jester; blah" > test.nim
20:19:49dom96nim c test.nim
20:20:06dom96Do you seriously want me to create a .nimble file every time?
20:20:11*dexterk quit (Ping timeout: 264 seconds)
20:20:51PMunchYeah that would be a pain
20:21:23Araq<cwd> nimble install jester # nimble creates the cwd.nimble file if not existing
20:21:53*chemist69 quit (Ping timeout: 246 seconds)
20:21:56Araqbut yes. I think "creating a .nimble file every time" is the lesser evil
20:22:10PMunchBut I don't install jester for every program that uses it :S
20:22:25PMunchAnd I tend to open a new shell when installing things
20:22:30Araqso add jester to your --path in your $nim.cfg
20:22:49Araqwe already have dozens of solutions for this in the config system
20:22:57*Arrrr quit (Read error: Connection reset by peer)
20:23:00PMunchBut that's annoying..
20:23:17PMunchI feel like nimble install jester, import jester should work
20:23:36PMunchOtherwise I'd say something was wrong with the package manager (or another part of the system)
20:23:52dom96Araq: The real problem is that you have outdated Nimble packages in your $nimbleDir
20:24:21Araqdom96: yes and no. I am also a control freak.
20:24:30dom96Araq: This is already an issue and will be fixed
20:24:38dom96Why not?
20:25:08dom96But hey, if you hate it so much feel free to remove `nimblePath` from your compiler's config file
20:25:24*chemist69 joined #nim
20:25:42Araqproblem with this is my config file is the config file everybody uses
20:26:00Araqsince it's in Nim's repo.
20:26:15dom96Then this problem should be fixed
20:27:06dom96yay, aporia-git in arch was updated. Thank you to whoever did that :)
20:27:40Araqwell IMO --nimblePath causes a fragile compilation model and enforces a rigid dir structure for Nimble packages. and Nimble itself doesn't use it.
20:28:05*libman joined #nim
20:28:32Araqlots of other solutions are thinkable.
20:28:48PMunchNim is still stuck on 0.15.0 in Arch though..
20:28:50Araqfor example, the existance of foo.nimble disables --nimblepath.
20:29:01*bozaloshtsh quit (Ping timeout: 268 seconds)
20:29:04Araqthen you can have your easy 'import jester' to play with
20:29:15Araqbut as soon as you have explicit deps, these are used instead.
20:30:23*shashlick quit (Ping timeout: 264 seconds)
20:31:07dom96Araq: The rigid dir structure is still necessary for packages even without --nimblepath
20:31:42dom96What does your proposed solution solve?
20:31:48dom96It only makes things more complicated
20:32:39*shashlick joined #nim
20:33:03*Ven joined #nim
20:33:47Araqfine, whatever
20:38:08dom96PMunch: btw, sorry about giving you the IRC equivalent of RTFM earlier :)
20:38:21PMunchHaha, no problem :P
20:38:34PMunchI should've read the log before asking silly questions
20:40:41*kulelu88 quit (Ping timeout: 260 seconds)
20:46:27*Ven quit (Ping timeout: 260 seconds)
20:51:59*user0_ quit (Read error: Connection reset by peer)
20:53:12*Ven joined #nim
20:53:36*kulelu88 joined #nim
20:55:54*Vladar joined #nim
20:56:03*devted quit (Quit: IRC Client has quit.)
20:56:26*user0_ joined #nim
21:00:37Vladarok, I think I finally figured out that but with appimages
21:01:14VladarIt cost me running ubuntu live usb for a couple of hours so it better be working now…
21:02:11*Ven quit (Ping timeout: 264 seconds)
21:05:47*Ven joined #nim
21:12:16Vladardef-pri-pub, rauss, are you still here?
21:19:09*bozaloshtsh joined #nim
21:20:42*Ven quit (Quit: My MacBook has gone to sleep. ZZZzzz…)
21:20:50Vladaranyway, here's working (I hope!) appimages for both architectures:
21:21:09Vladarhttps://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-i386.run
21:21:16Vladarhttps://github.com/Vladar4/ng2planetoids/blob/master/ng2planetoids-x86_64.run
21:21:55VladarIf any Linux users have free time to test-run it, go ahead =)
21:22:08AraqVladar: what was the problem?
21:22:25Araq(maybe at some point I feel like producing binaries for linux...)
21:23:13PMunchVladar, just run the .run file?
21:23:46VladarAraq, interesting bug, triggering only when run inside an appimage, caused by a const call to os module: https://github.com/Vladar4/ng2planetoids/commit/b18a43b13ea0d9fbc68b2098deef0e2ac7f26bff#diff-8886a6b85db9f93f54efa34d256d81b5
21:23:54VladarPMunch: that's the idea
21:24:50PMunchSeems to work fine
21:24:56VladarAraq: I know, stupid mistake, but worked when not in the appimage just fine for some reason
21:25:12Araqyeah well. I think you know why that couldn't work :-)
21:25:15PMunchManjaro i3
21:25:27VladarPMunch: thanks, now I could sleep well )
21:25:27Araqinteresting we actually support this at compiletime
21:25:45VladarPMunch: 32 or 64 one?
21:25:49PMunch64
21:25:53Vladarnice
21:26:03PMunchI don't have my IBM-6050 at hand :P
21:26:20PMunch(Pretty sure that's not actually a machine, and if it was it would probably be 8-bit or something :P)
21:26:55VladarIt was such a pain to build entire SDL2*, Nim and the project on a live usb… man…
21:27:27VladarI should setup persistent ubuntu usb tomorrow
21:27:42PMunchI can recommend Manjaro if you need Linux
21:28:14VladarI need ubuntu 12.04 LTS as a lowest common denominator for my appimage builds, I run Arch Linux myself
21:29:50Vladarbtw, the engine show pretty good 60FPS performance on Pentium 4, and even works on my IBM T30 nobebook _decent_ enough
21:30:14stisaare there packages for the js target that use enums a lot? I think I fixed a bug with enums with holes, but I want to check I didn't break something else
21:33:46*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:39:12FromGitter<Varriount> Are we going to be using appimages to distribute Nim now?
21:39:31dyce[m]how would you your html/css/js with jester so that everything is contained in the executable?
21:39:44FromGitter<Varriount> dyce: Use staticRead
21:39:44dyce[m]would you package*
21:40:22FromGitter<Varriount> dyce[m]: https://nim-lang.org/docs/system.html#staticRead,string
21:40:43dyce[m]Varriount: thanks
21:40:54PMunchVladar, oh that's a good point
21:40:58PMunchAnd nice that it runs so well
21:41:27VladarPMunch: Just tried it on T30 and got 60FPS most of the time!
21:41:38PMunchThat's really good!
21:41:51PMunchI mean, the game is basic enough but it's nice to see such good performance
21:41:58dyce[m]is it just me or is nodejs/bower/webpack making frontend development become over engineered like java
21:41:59PMunchUsing SDL2?
21:42:28VladarPMunch: yes, there's a lot of collision detection going on under the hood too
21:42:41PMunchOh right, that's a good point
21:43:27Vladarand now I'm ready enough for Linux game jam this weekend
21:43:31PMunchI've been playing with creating a game library (not an engine) for SDL2 in Nim myself
21:43:37PMunchOh cool
21:43:44PMunchWish there were more of those where I live
21:43:55PMunchGame jams in general, never seen a Linux one here :P
21:43:57CalinouVladar: use a chroot for building your AppImages, or a virtual machine
21:43:57Calinou:P
21:44:08Calinouor systemd-nspawn if your target is a modern enough distro
21:44:20VladarPMunch: https://forum.nim-lang.org/t/2841
21:44:25Calinoudyce[m]: Bower is pretty much dead, be happy
21:44:40Calinoudyce[m]: and unfortunately, modern web workloads tend to drive towards Webpack since gulp is too limited
21:44:46CalinouWebpack can do really nice things, but it's also really hard to master
21:44:50PMunchOh, it's a global thing :P
21:44:51VladarCalinou, any tutorials to setup ubuntu 12 this way?
21:45:00PMunchGuess I'm just not paying attention
21:45:10CalinouVladar: note that Ubuntu 12.04 does not use systemd, so you can't use systemd-nspawn, but you can use a chroot
21:45:20Calinouhttps://help.ubuntu.com/community/BasicChroot
21:45:28Vladarthanks, I'll look into it
21:45:29Calinouthis guide is valid for any host distro (or almost)
21:45:42Calinou*perhaps* systemd-nspawn can work with Ubuntu 12.04, but with caveats
21:46:05PMunchhttps://github.com/PMunch/SDLGamelib/tree/master/gamelib
21:46:11PMunchThat's my game library by the way
21:46:25dyce[m]Calinou: i started learning angular 1 and it was dead simple easy. no backend tools required, now everything requires webpack and a developer environment
21:46:32PMunchCurrently it's pretty basic, but it supports textureatlases as created by TexturePacker
21:46:40Calinoudyce[m]: Vue.js can be used without a build system (for basic usage)
21:47:43dyce[m]Calinou: yea i started using Vue, but it also recommends webpack for routing
21:47:48VladarPMunch: interesting approach
21:47:50PMunchhttp://backbonejs.org/ is pretty cool. But it requires a REST API that outputs JSON
21:48:21PMunchVladar, yeah. I was reading this: https://hookrace.net/blog/writing-a-2d-platform-game-in-nim-with-sdl2/
21:48:40PMunchAnd I liked the simplicity and transparency that the style of programming offered for game dev
21:48:54PMunchSo many times have I been annoyed by magic in the underlying engine
21:49:22Vladarmay be you could use some of my engine's code there, like collisions, etc. https://github.com/Vladar4/nimgame2/blob/master/nimgame2/collider.nim
21:49:33PMunchSo with that library I wanted to focus on letting people pick the features they needed and use that
21:50:06PMunchYeah, the collision stuff is the last I added. It was more to have at least something
21:50:13PMunchAnd there are many other things that could be added
21:51:59dyce[m]riotjs seems pretty dead simple
21:51:59*rauss quit (Quit: WeeChat 1.7)
21:52:44VladarPMunch: I struggle with any geometry stuff, but this link helped me a lot: http://paulbourke.net/geometry/
21:52:52Vladartons of ready to use algorithms
21:53:06PMunchHuh, that's cool
21:53:46PMunchI've got a pretty good grasp of it since I've been doing gamedev as a hobby and partially as a job for the past 14 years or so :P
21:54:05PMunchBut those algorithms are probably more efficient than what I would write, so it's a nice resource for sure
21:54:47Vladarwhoa, 14 years of professional gamedev?
21:55:49*bozaloshtsh quit (Ping timeout: 260 seconds)
21:56:12PMunchNo
21:56:20PMunchI started tinkering with it 14 years ago
21:56:47PMunchBut at the time I was 10, so I didn't start working with it professionally until I was 17-18
21:57:15PMunchNow I'm soon through my masters degree in computer science and I'm thinking of getting into gamedev full-time
21:58:15VladarNice. Interesting enough, I've got about 14 years of amateur/enthusiast gamedev myself, 0y professional yet, sadly )
21:59:00PMunchThat's a shame. Tried getting a job and failed or just busy with other stuff?
21:59:07PMunchGamedev is a lot of fun
21:59:47Vladarworked an engineer job previously, and doing some freelancing stuff now
22:00:08PMunchCool
22:00:34PMunchI've done some freelance besides my studies but I think it would stress me too much to live off-of it
22:03:00Vladarit depends on the work mostly )
22:03:49*gokr quit (Ping timeout: 240 seconds)
22:04:40PMunchYeah, but getting it :P
22:05:26Vladaryeah for sure )
22:06:46VladarOK, going to sleep now. See you around.
22:07:05PMunchYeah, see you
22:07:52*Vladar quit (Quit: Leaving)
22:28:15*Jesin quit (Quit: Leaving)
22:39:17*_yeeve joined #nim
22:39:32*Jesin joined #nim
22:41:49*yeeve quit (Ping timeout: 240 seconds)
22:54:21*bozaloshtsh joined #nim
22:56:11*Jesin quit (Quit: Leaving)
22:56:13*nsf joined #nim
22:58:31*rauss joined #nim
23:00:30*bozaloshtsh quit (Quit: WeeChat 1.7)
23:00:37*kulelu88 quit (Ping timeout: 260 seconds)
23:02:39*user0_ quit (Read error: Connection reset by peer)
23:03:42*user0_ joined #nim
23:06:54*def-pri-pub joined #nim
23:07:10*Jesin joined #nim
23:07:51*nsf quit (Quit: WeeChat 1.7)
23:12:39*kulelu88 joined #nim
23:17:01*couven92 quit (Quit: Switching to VPN)
23:17:33*couven92 joined #nim
23:23:16*user0_ quit (Read error: Connection reset by peer)
23:23:32*user0_ joined #nim
23:46:28*arnetheduck quit (Ping timeout: 240 seconds)
23:46:40*ftsf_ joined #nim
23:49:24*kulelu88 quit (Ping timeout: 240 seconds)
23:52:18*elrood quit (Quit: Leaving)
23:53:55*user0__ joined #nim
23:55:45*user0_ quit (Ping timeout: 256 seconds)
23:57:28*user0__ quit (Read error: Connection reset by peer)
23:58:08*user0__ joined #nim