<< 21-01-2016 >>

00:00:10ldleworkeh nm
00:01:24Araq_well a couple of days ago I managed to convince you that you don't need inheritance nor case objects ;-)
00:01:37ldleworkAraq_: yeah by using macros to generated unified types
00:01:45ldleworkBut there are some downsides to that method
00:01:54ldleworkSince each entity is now the size of all possible components combined
00:01:58ldleworkeven if it uses one or two
00:02:30ldleworkAraq_: what do you think about making Type names global enums when used in value positions? :D
00:02:35Araq_not if you go for the "entity is just an ID"
00:02:54Araq_and "have separate seqs to store the actual data" approach
00:02:56ldleworkWhere are the components then?
00:03:10ldleworkeh
00:03:14Araq_which is what is usually done
00:03:31ldleworkDoing the basic ECS is boring and I can do that in any language.
00:03:37ldleworkAnd is not egronomic
00:08:00Araq_Nim doesn't revolutionize runtime aspects
00:08:04*thotypous quit (Ping timeout: 272 seconds)
00:08:13ldleworkBut it may allow me to express them more elegantly
00:08:32Araq_yeah but under the hood you need to decide of how to store the data
00:08:54Araq_and if space efficiency is your concern
00:09:07Araq_inheritance wins over case objects for your case.
00:09:10ldleworkThere are a number of concerns. Trying to balance them out of course.
00:09:46ldleworkI can probably afford one discriminator field of memory for each component, for gains in expressability
00:10:01*thotypous joined #nim
00:10:05ldleworkBut then variants are limited with the duplicate field problem
00:10:10ldleworkI could use your suggestion above
00:10:18Araq_case objects translate into unions
00:10:23ldleworkBut then every field access has to go through two dot-accesses
00:10:31ldleworksprite_component.sprite.img, etc
00:10:33Araq_so you pay for more than just the discriminator
00:10:46ldleworkWait so each case instance is the size of all variants?!
00:11:10Araq_how else would you be able to store them in an array?
00:11:21ldleworkmagic
00:11:41Araq_template img(x): untyped = x.sprite.img
00:11:59ldleworkthen you need one for every field!
00:11:59Araq_you can generate accessors for not ambiguous fields
00:12:01ldleworklol
00:12:56Araq_when you use inheritance you save space
00:12:57ldleworkhmmmmmmmmmmmmmmmmmmmmm
00:13:12Araq_but you're forced to work with 'ref's because guess what
00:13:14ldleworkyeah, and def-'s code was not terrible
00:13:25Araq_otherwise you cannot store them in arrays either...
00:13:34Araq_arrays only work with fixed sizes
00:13:41ldleworkwould a "with x as T" syntax be possible?
00:13:54ldleworkLike lets say I accept an Animal as a parameter x
00:13:57ldleworkI could do
00:14:01ldleworkwith x as Dog:
00:14:05ldlework echo x.dog_field
00:14:28Araq_yeah but iirc 'with' is a keyword (don't ask me why)
00:14:56ldleworkmaybe, "when x is Dog"
00:14:57Araq_so you cannot have a 'with' macro (ignoring the backticks notation)
00:14:59ldleworkor something
00:15:10Araq_'when' is a keyword ...
00:15:23ldleworksupposing x isa Dog:
00:15:24ldleworklmfao
00:15:35Araq_'wis x as Dog'
00:16:25ldleworktake x as Dog:
00:16:31ldlework echo x.dog_field
00:16:42ldleworkconsider x a Dog:
00:17:36ldleworktreat x as Dog:
00:17:38ldleworkthat's not bad
00:18:01ldleworkbut what if x is not a Dog...
00:18:36ldleworkoh right that's why the block is only conditionally executed
00:18:38ldleworkhrm
00:19:32ldleworkwait
00:19:34ldleworkcan't you just do
00:19:37ldleworkwhen x of Dog: ?
00:19:47ldleworkAraq_: ^
00:19:53def-ldlework: no, how could you know at compile time what will be passed at runtime?
00:20:04ldleworkdef-: right hence the conditional
00:20:12ldleworkisn't when a conditional too?
00:20:16Araq_if x of Dog:
00:20:20def-yes, a compile time conditional
00:20:22Araq_ Dog(x).foobar
00:20:23ldleworkah right
00:20:32Araq_now let's see
00:20:32ldleworkAraq_: :'(
00:21:30ldleworkdef-'s macro as syntax would be so nice tho..
00:21:55ldleworkwith the {.inject.} thingie
00:22:07def-ldlework: well, that was a template, with a proper macro it's doable
00:22:16ldleworkoh right
00:22:17ldleworkduh
00:22:28ldleworkjust gotta parse the expr a bit
00:22:37ldleworkdef-: but what phraseology?
00:22:48def-ldlework: huh?
00:25:37ldleworkheh what should the macro be named
00:25:50def-definitely something cryptic
00:25:54ldleworkhehe
00:26:25Araq_we could remove 'with/without' from the list of keywords
00:26:48Araq_maybe I'm drunk but I don't think they are used for anything at all.
00:26:53ldleworklol
00:26:58def-Araq_: I guess "with" might have been for python's "with"?
00:27:25Araq_no, it was always clear you could do that with a template
00:27:29ldleworkIt seems like the observation here is that all of these block-y things can be made with macros
00:27:55Araq_it was done for a pragma alternative 'with boundChecks:' ...
00:28:04Araq_'without boundChecks'
00:28:40ldlework'with' doesn't really connotate that the block is condition though :(
00:28:47ldleworkconditionally executed that is
00:29:14Araq_`as` is an operator that can be overloaded. iirc.
00:29:25Araq_foo as Bar: ...
00:29:31ldleworklike, its not possible to just detect the form "if nnkIdent of nnkTypeDesc" and do the inject thingie
00:29:42ldleworkI guess that's bad, like if you didn't want it to be cast
00:29:47*gunn quit (Read error: Connection reset by peer)
00:30:11def-Araq_: cool, that works
00:30:24*gunn joined #nim
00:30:25ldleworkhow does that work?
00:30:39ldleworkcan you make an `as` macro?
00:30:42def-ldlework: yes
00:30:45ldleworklmfao
00:30:52ldleworkso crazy
00:31:07*yglukhov quit (Remote host closed the connection)
00:31:13Araq_I will call it "dark Nim"
00:31:26ldleworkcall what?
00:31:26Araq_Nim's undocumented features.
00:31:30ldleworkah
00:31:34ldleworkunreachable from the docs
00:31:36ldlework:D
00:31:54ldleworkWell its not really a feature right
00:32:00ldleworksince we can just implement it as a macro
00:32:07ldleworkoh operators as macros
00:32:22ldleworkI'm slow
00:32:35Araq_that 'as' is a keyword infix operator certainly is a feature.
00:33:12ldleworkdef-: are you updating your thing
00:33:17ldleworkjust asking!
00:33:24def-ldlework: yeah, give me a few min to write up a proper macro
00:33:53*derka quit (Quit: derka)
00:37:57def-hm, it seems to work with a template after all
00:38:55def-here you go: https://gist.github.com/def-/aa8f2d2793d800920df6
00:39:16*jaco60 quit (Ping timeout: 250 seconds)
00:39:30ldleworkinteresting
00:41:24*pregressive joined #nim
00:42:47ldleworkAraq_: so type names as a global enum. Stupid idea?
00:43:23ldleworkImagine a table like Table[TypeDesc, Component]
00:43:27ldleworkthen I'd be able to do like
00:43:42ldleworkt[CPhysics] = CPhysics(x:10, y:10)
00:43:54ldleworkbe like
00:43:57ldleworkCPhysics in t
00:43:59ldleworkand so on
00:44:16Araq_you can do something similar with a .pure enum and a template that hides the qualification
00:44:43*ldlework looks up .pure enum
00:45:08ldleworkI don't get it.
00:45:11Araq_template `|`(x): untyped = TypeEnum.x
00:45:30Araq_t[|Physics] = Physics(x: 10, y: 10)
00:45:32ldleworkOh so I'd have to generate an actual Enum
00:45:44ldleworkThat's not much better than
00:45:46Araq_not sure it if it's a good idea
00:45:53ldleworkt[EPhysics] = Physics(...)
00:47:32ephjabindings generation fun!
00:47:46*askatasuna quit (Ping timeout: 240 seconds)
00:48:07ldleworkI guess there'd be no way to differentiate between referring to the type
00:48:10ldleworkand calling the type
00:48:15ldleworkwhat does
00:48:29ldlework`let foo = Physics` mean
00:48:52ldleworkUnless that doesn't actually call the type
00:51:50*derka joined #nim
01:02:02*derka quit (Quit: derka)
01:03:05*pregressive quit (Remote host closed the connection)
01:03:54ldleworkif type names were ordinal you could do case v.type, with typetraits
01:08:43ldleworkugh damn
01:08:52ldleworkif I have a parameter of type Component
01:09:01ldleworkv.type.name just gives me Component not the subclass
01:09:06ldleworkcrap
01:12:06ldleworkah just use an if statement
01:15:39*pregressive joined #nim
01:17:24*xtagon quit ()
01:19:41ldleworkHow the hell do I convert "@" to a rune
01:22:09*girvo joined #nim
01:22:35girvoHey all :)
01:26:28ephjaldlework: runeAt("@", 0) or toRunes("@")[0]
01:27:16ldleworkSo inheritance isn't gonna work I don't think
01:27:34ldleworkAny time you pass a subclass to a superclass parameter it loses all the data.
01:27:50ldleworkLike if I have a table of T[string, BaseClass]
01:28:05ldleworkand I stick a bunch of inherited things in there, they seem to lose their data
01:28:18ephjaare they not refs?
01:28:39girvodoes anyone have any advice on what api's i should look at to let a nim app watch a directory for changes? inotify on Linux, etc.
01:29:45ephjagirvo: http://nim-lang.org/docs/fsmonitor.html
01:29:58bozaloshtshldlework: isn't that how normal OOP behaves?
01:30:03ldleworkephja: what do you mean
01:30:14ldleworkbozaloshtsh: seems useless
01:30:55ephjaldlework: are the keys values or references?
01:31:42ldleworkephja: that worked thanks
01:32:44ephjanre.replace sure seems slow
01:34:36ephjamaybe it needs shallow copying
01:35:47girvoephja: You're a champion, thanks!
01:37:54girvodoes fsmonitor work with FSEvents on OS X?
01:38:02girvoActually, don't answer
01:38:06girvoI'm going to go find out ;)
01:39:08girvoAh, it's inotify only
01:39:29girvoNow time to look at FSEvent's API and see how easy it'll be to integrate!
01:41:50bozaloshtshFor some reason I can't return early from an async proc that returns Future[void]. If I do, I get a type mismatch. Any ideas?
01:43:08Araq_bozaloshtsh: how do you return?
01:45:06*vqrs_ quit (Ping timeout: 240 seconds)
01:46:06ldleworkdef-: Check this out. I like the way entities are created, but to get a component out sucks: https://gist.github.com/dustinlacewell/fe99d77663ffb6266f96
01:46:10ldleworkcan we do any better...?
01:47:09*vqrs joined #nim
01:47:54ldleworkI suppose I could write a macro to generate entity with a field for every component and Entity wouldn't be that big since every field would be a reference.
01:48:05ephjanp. bye
01:49:42ldleworkThen whether a component is enabled or not is whether the field is null or not?
01:50:14ldleworkthen it would just be e.position.x etc
01:51:08ldleworkYou wouldn't even need cooperation from the definitions of components
01:51:49ldleworkthat's not bad..
01:52:59*ephja quit (Ping timeout: 265 seconds)
01:54:10*satbyy_ left #nim ("Kumbhakarna mode ... zzzZ")
01:55:46*lompik joined #nim
02:03:44*jsudlow joined #nim
02:13:21def-ldlework: why is an Entity a table?
02:13:29def-I'm not sure I understand the motivation
02:14:24ldleworkdef-: Because it can contain instances of any of the component types.
02:14:39ldleworkBut I'm considering using a macro to generate a type that has a field for each component type instead
02:14:56ldleworkthen you can just do if e.position != nil: # do stuff with e.position
02:15:01ldleworkor some nicer abstraction of that
02:15:20ldleworketc
02:23:24def-ldlework: this looks simpler to me and can still do the same: https://gist.github.com/def-/ab9bced6449106cf7cf1
02:23:54ldleworkdef-: right that's what I was just describing...
02:24:07ldleworkbut using a macro to generate the entity type
02:38:46bozaloshtshAraq_: I was just trying to return with "return"
03:07:49*brson quit (Quit: leaving)
03:09:22*brson joined #nim
03:09:22*brson quit (Client Quit)
03:17:38*pregressive quit (Remote host closed the connection)
03:38:00*vendethiel joined #nim
03:58:51lompikHow do use iterators without loops ?
03:59:11lompikTrying to : A.items.toSeq where A is a set
04:01:59*vendethiel quit (Ping timeout: 264 seconds)
04:05:01def-lompik: by using a closure iterator and invoking it with ()
04:05:09def-lompik: https://github.com/def-/nim-unsorted/blob/master/iteratorfinished.nim#L8
04:09:46*Spector joined #nim
04:11:34SpectorSo just started to look at Nim. Worked for a bit after I got Windows Path to update. Now I am getting this no matter how try to compile it (using the suggested mingw(gcc) that was installed by the Nim installer. Error: unhandled exception: Requested command not found: 'gcc.exe -c -w -IC:\Nim\lib -o w:\scratchpad\nim\nimcache\scratch.o w:\scratchpad\nim\nimcache\scratch.c'. OS error: The system cannot find the file specified.
04:11:52SpectorAny ideas on a solution
04:12:08def-That sounds like gcc.exe is not in PATH
04:14:39Spectordefault install path for that? doesn't seem to be in the Nim directory
04:14:57*pregressive joined #nim
04:15:36def-Nim/dist/mingw/bin
04:16:04Spectorok
04:16:43Spectorso that makes sense its windows not recursing down like it should. Ok I will give that a try. Thanks for the help
04:22:36lompikdef-: apparently toSeq(A.items) works.
04:23:10*zepolen quit (Remote host closed the connection)
04:25:13*nchambers joined #nim
04:27:41Spectordef-: Thanks added gcc to my path fully and it now works.
04:31:15def-Spector: great
04:37:55*Spector quit (Quit: Page closed)
04:47:22*Sembei joined #nim
04:49:54*Pisuke quit (Ping timeout: 272 seconds)
04:52:42*kniteli quit (Ping timeout: 250 seconds)
04:53:40*kniteli joined #nim
05:01:39*vangroan__ joined #nim
05:21:00*pregressive quit (Remote host closed the connection)
05:22:42*pregressive joined #nim
05:23:43*zepolen joined #nim
05:27:23*girvo quit (Ping timeout: 276 seconds)
05:28:22*zepolen quit (Ping timeout: 256 seconds)
05:28:43*vangroan__ is now known as vangroan
05:30:23*s4 joined #nim
05:32:16*pregressive quit (Remote host closed the connection)
05:40:50*lompik quit (Ping timeout: 260 seconds)
05:48:45*girvo joined #nim
06:11:05*xet7 quit (Quit: Leaving)
06:20:03*xet7 joined #nim
06:22:50*kniteli quit (Ping timeout: 260 seconds)
06:29:35*darkf joined #nim
06:31:35*nchambers quit (Ping timeout: 260 seconds)
06:40:55*Demon_Fox quit (Ping timeout: 260 seconds)
06:49:06*Demon_Fox joined #nim
06:59:32*derka joined #nim
07:04:15*girvo quit (Ping timeout: 240 seconds)
07:18:48*derka quit (Quit: derka)
07:24:50*Demon_Fox quit (Quit: Leaving)
07:37:24*derka joined #nim
07:44:32*derka quit (Ping timeout: 276 seconds)
07:46:44*okovko joined #nim
07:56:12*okovko left #nim ("Leaving")
08:03:24*derka joined #nim
08:03:39*derka quit (Client Quit)
08:20:30*desophos quit (Read error: Connection reset by peer)
08:21:07*gokr joined #nim
08:25:17*zepolen joined #nim
08:30:00*zepolen quit (Ping timeout: 260 seconds)
08:31:18*girvo joined #nim
08:36:32*girvo quit (Ping timeout: 276 seconds)
08:37:00*strcmp1 joined #nim
08:39:15*Arrrr joined #nim
08:43:55*kniteli joined #nim
08:55:04*Trustable joined #nim
09:09:44*bjz joined #nim
09:19:20*bjz quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
09:19:20*yglukhov joined #nim
09:19:34*coffeepot joined #nim
09:21:27*ephja joined #nim
09:26:49*gokr quit (Quit: Leaving.)
09:26:53*gokr1 joined #nim
09:27:43*bjz joined #nim
09:39:19*derka joined #nim
10:02:59yglukhovAraq: I don't have a strong opinion regarding lua support. It just seems to me that it gets severely out of date, and it's unlikely that it will be supported in future by anyone.
10:03:17Araq_JS is so close to Lua though
10:03:53Araq_but yeah, I never even tested it and at this point moving from the VM to luajit is unrealistic
10:04:07Araq_which was an idea I played with.
10:05:46yglukhovI can remove everything related to lua with one PR if you wish. Or i can leave it in place. Or i can remove it in places I modify as i did in last PR.
10:07:10Araq_no worries
10:07:12yglukhovBut i'm not likely to get lua going %)
10:10:20yglukhovI want to give some more attention to unsigned and bit ops in js, so ill do more prs on this shortly
10:10:42yglukhovAnd exceptions.
10:23:58veganskAraq, why different case sections of the object cannot have fields with same name?
10:25:05Araq_because it's not clear what that means
10:25:32Araq_instead we may remove the "branch conditions have to be disjoint" condition
10:25:45Araq_which accomplishes something similar without the ambiguity
10:25:51Araq_and inefficiencies
10:26:56*zepolen joined #nim
10:27:34Araq_https://github.com/nim-lang/Nim/issues/3629
10:28:18Araq_and the conclusion was not written down, yay
10:28:24*arnetheduck joined #nim
10:32:02*girvo joined #nim
10:33:28yglukhovAraq: when i've written nim shader translator it came to me that macros.nim kinda reflect compiler/ast.nim, but differ. Node -> NimNode. nkProc -> nnkProc, etc. And I thought that shader compilation would be great for both runtime and compile time. So the question is. How do I write code that works with Nim AST in both runtime and compile time? %)
10:34:57veganskAraq, thanks. I'm thinking about scala like case class library. It seems better to use inheritance for it instead of object variants
10:35:59veganskBtw, are there any plans to do pattern matching as a part of the language?
10:36:47*girvo quit (Ping timeout: 264 seconds)
10:43:56Araq_when I need pattern matching, I use a macro. not sure why in a language that embraces macros everything needs to be builtin.
10:44:33*zepolen quit (Remote host closed the connection)
10:45:30Araq_yglukhov: that nkProc differs from nnkProc is an unfortunate choice.
10:45:59yglukhovwell, we have to something about it eventually =)
10:46:32yglukhov* to do
10:46:49Araq_nowadays I would just share the enums
10:47:17Araq_but type PNode = NimNode in the compiler would cause great trouble
10:47:33Araq_since NimNode is now special cased and produces a .compileTime context
10:48:50Araq_and there are lots of other problems
10:49:33Araq_easiest way seems to be to build a bridge.nim module that either maps to macros.nim or uses the compiler API to translate things at runtime
10:49:58Araq_bbs
10:55:31*bjz_ joined #nim
10:57:42*bjz quit (Ping timeout: 265 seconds)
11:00:30*coffeepot quit (Quit: http://www.kiwiirc.com/ - A hand crafted IRC client)
11:00:39*coffeepot joined #nim
11:01:56*coffeepot quit (Client Quit)
11:22:33*lcm joined #nim
11:25:01*jaco60 joined #nim
11:37:38*razaaa joined #nim
11:39:36*girvo joined #nim
11:44:15*girvo quit (Ping timeout: 260 seconds)
11:45:11*zepolen joined #nim
11:46:03*razaaa left #nim ("Leaving")
11:49:59*zepolen quit (Ping timeout: 264 seconds)
12:08:06Araq_yglukhov: you can try to make the compiler get rid of the global variables. they mean the core compiler is not .gcsafe and it also means the nimscript API cannot get stable.
12:08:44Araq_with an even better nimscript we can perform shader compilation at runtime
12:09:00Araq_that would be my suggestion of how to proceed.
12:09:28yglukhovAraq: im currently focused on my own tasks which implies js uints for now, but ill try to help in my spare time
12:11:45Araq_sure.
12:18:56*arnetheduck quit (Remote host closed the connection)
12:21:22*arnetheduck joined #nim
12:28:15*BitPuffin|osx joined #nim
12:42:01yglukhovAraq: im gonna add some more changes to the js unsigned pr. It's a good time to put lua chunk back if you say.
12:43:39Araq_nah, remove the Lua stuff.
12:44:00Araq_it's unrealistic anybody will ever care about a Lua backend
12:45:11*vangroan quit (Ping timeout: 264 seconds)
12:51:39*joelmo left #nim (#nim)
12:56:08*nchambers_ joined #nim
12:58:02*nchambers_ is now known as nchambers
12:59:26*kniteli quit (Ping timeout: 256 seconds)
13:00:53yglukhovok
13:02:12*ryan2 joined #nim
13:02:46Araq_the other problem
13:03:11Araq_well 'when x: proc (x: uint64) else: proc (x: uint32)'
13:03:22Araq_what do you think can go wrong here? ;-)
13:11:05*vendethiel joined #nim
13:17:01yglukhoverr... nothing worse than with 'when x: proc (x: uint64) else: discard'?
13:18:17*gokr1 quit (Quit: Leaving.)
13:18:21dom96interesting. Does spawn block after more than some arbitrary number of spawns have been done?
13:18:29dom96(In my case 4)
13:19:35Araq_possible if it's CPU bound
13:19:58Araq_if all cores are busy it waits until a core is ready
13:20:05dom96ahh that's cool
13:20:12Araq_it's parallelism, not concurrency.
13:20:41Araq_it's also allowed to run it on the very same thread
13:21:17dom96it is using 100% across all cores, so it is working as intended, my code is still wrong somewhere though
13:22:59Araq_yglukhov: I disagree
13:23:08yglukhovAraq: what about just allowing proc $(uint64)?
13:23:27Araq_yeah, requires a compiler patch
13:23:36Araq_but seems to be way better
13:23:43yglukhovwhy patch?
13:23:49yglukhovok, let me try and see
13:23:54Araq_there is no magic for this op
13:24:43yglukhovno, i mean allow $(uint64) with magic on js, and without magic otherwise
13:25:51yglukhovIntToStr magic i mean
13:26:23yglukhovsemantically this will reflect js %)
13:27:16Araq_the other $'s for ints use compiler magic
13:27:25Araq_uint64 shouldn't be a special case
13:27:50yglukhovwhy would not we be able to use the same magic for both procs?
13:27:58Araq_we would.
13:28:06Araq_but somebody needs to patch the compiler.
13:28:56yglukhovi still don't get your point. ill push another commit to show what i mean.
13:29:12Araq_I want
13:29:31Araq_proc `$`(x: uint64): string {.magic: Int64ToStr.}
13:29:35Araq_in system.nim
13:29:42Araq_or .magic: UInt64ToStr
13:29:45Araq_doesn't matter
13:29:56Araq_but no 'when's for the above declaration in system.nim
13:30:05Araq_like it's done with the other integer types for $
13:31:13yglukhovthere: https://github.com/nim-lang/Nim/pull/3754/files#diff-5cfdfeab79c2d2b7bbc78af7060c38c3R1762
13:31:26yglukhovAraq: ok, but why not whens?
13:31:41Araq_because the others don't require it either
13:31:58Araq_and the whens are creating a nightmare in system.nim
13:32:10*vendethiel quit (Ping timeout: 260 seconds)
13:32:15Araq_this works at compile time, this only if the GC exists ... bla bli blub
13:33:20*askatasuna joined #nim
13:33:50Araq_in general it's much better to have no 'when' in system.nim but instead in the particular backend 'not supported for GC:none' or something like that
13:34:10Araq_because most restrictions are backend related and shouldn't concern compiletime evaluation
13:34:18yglukhovhow does $uin64 currently work without magic?
13:34:35Araq_implemented in sysstr.nim iirc
13:35:07*vendethiel joined #nim
13:35:23yglukhovmaybe repr.nim? cant find it in sysstr
13:38:08Araq_yeah
13:38:08yglukhovand then, why inttostr requires magic in the first place? isnt it something that can go to the lib?
13:38:38yglukhovand reduce locs in compiler =)
13:39:04Araq_we cannot run it easily at compiletime otherwise
13:39:24*pregressive joined #nim
13:40:21*girvo joined #nim
13:40:52*s4 quit (Quit: Konversation terminated!)
13:44:50*girvo quit (Ping timeout: 250 seconds)
13:48:24*lompik joined #nim
13:49:09*zepolen joined #nim
13:50:33*zepolen quit (Remote host closed the connection)
13:54:18*zepolen joined #nim
14:00:04*vendethiel quit (Ping timeout: 272 seconds)
14:05:04*vendethiel joined #nim
14:11:34*derka quit (Quit: derka)
14:12:50*derka joined #nim
14:19:45*sjums left #nim ("Leaving")
14:22:41yglukhovAraq: removed `$` from my pr, since it may be done in another pr.
14:25:29Araq_cool, good idea.
14:27:05yglukhovAraq: what do you think of supporting slices (views) for passing arrays/strings/seqs to proc expecting openarray/var openarray.
14:27:56*vendethiel quit (Ping timeout: 272 seconds)
14:28:10*zepolen quit ()
14:29:12yglukhovmyFooThatMutatesPartOfArray(myArray[5 .. 10])
14:33:16yglukhovAraq: sorry, still not used to this skipType thing. should i do the same in binaryUintExpr?
14:33:34*aziz_ joined #nim
14:34:37*aziz_ is now known as aziz
14:40:44Araq_yglukhov: we do that for spawn in a parallel statement ...
14:40:58Araq_somehow the non-parallel code should do the same
14:41:58yglukhovoh, interesting.
14:42:18yglukhovjs would require some special care now that i think of it...
14:42:22Araq_we prove array bounds correct though in parallel
14:42:35Araq_so we avoid them at runtime.
14:42:44Araq_and don't generate them. dangerous stuff.
14:42:54Araq_the serial version needs to perform index checking
14:44:25*vendethiel joined #nim
14:47:19*zepolen joined #nim
14:48:03bozaloshtshare there any known issues with nested async procs? I'm having one where my program just the GC just segfaults when the inner one's called. The line given in the stack trace is just the line of the declaration of the inner async proc
14:48:23bozaloshtshI'm having one where the GC just segfaults*
14:49:37yglukhovbozaloshtsh: a gist would help ;)
14:51:38*arnetheduck quit (Ping timeout: 256 seconds)
14:53:34*derka quit (Ping timeout: 265 seconds)
14:58:32*derka joined #nim
15:00:07bozaloshtshall right: line 44 is where the compiler complains: http://hastebin.com/uzavawefed
15:01:19*coffeepot joined #nim
15:02:00*coffeepot quit (Client Quit)
15:03:44*pregressive quit (Remote host closed the connection)
15:04:15*lompik quit (Ping timeout: 240 seconds)
15:04:40*vendethiel quit (Ping timeout: 272 seconds)
15:05:00*bozaloshtsh quit (Ping timeout: 250 seconds)
15:32:13yglukhovbozaloshtsh: sorry, its kinda hard to tell, as theres so much missing to compile the gist. my guess would be using async closures in async proc, but cant tell for sure.
15:33:20*bozaloshtsh joined #nim
15:33:44Araq_bozaloshtsh: compile with -d:useSysAssert -d:useGcAssert and see what it reports
15:41:07*girvo joined #nim
15:43:16*pregressive joined #nim
15:45:30*girvo quit (Ping timeout: 245 seconds)
15:46:30*satbyy quit (Quit: Kumbhakarna mode . . . zzZZ)
16:13:15*derka_ joined #nim
16:13:48*derka quit (Ping timeout: 256 seconds)
16:13:49*derka_ is now known as derka
16:15:49*vendethiel joined #nim
16:19:36*bozaloshtsh quit (Ping timeout: 272 seconds)
16:37:24*vendethiel quit (Ping timeout: 264 seconds)
16:42:11*derka quit (Ping timeout: 264 seconds)
16:43:54*derka joined #nim
16:45:30*derka quit (Client Quit)
16:46:06*vikaton joined #nim
16:48:32*vendethiel joined #nim
16:51:55*bozaloshtsh joined #nim
17:01:36*aziz quit (Remote host closed the connection)
17:10:18*vendethiel quit (Ping timeout: 250 seconds)
17:10:30*bozaloshtsh quit (Ping timeout: 245 seconds)
17:41:55*girvo joined #nim
17:46:59*yglukhov quit (Ping timeout: 264 seconds)
17:47:00*girvo quit (Ping timeout: 272 seconds)
17:49:05*pregressive quit (Remote host closed the connection)
17:49:51*pregressive joined #nim
18:05:12*derka joined #nim
18:16:43*Jesin quit (Quit: Leaving)
18:19:42*juanfra quit (Quit: juanfra)
18:26:50*yglukhov joined #nim
18:31:20*yglukhov quit (Ping timeout: 272 seconds)
18:36:05*derka quit (Ping timeout: 260 seconds)
18:36:34*brson joined #nim
18:36:40*brson quit (Client Quit)
18:37:00*brson joined #nim
18:39:05*lompik joined #nim
18:46:23*derka joined #nim
18:49:35*askatasuna quit (Ping timeout: 240 seconds)
18:51:39*darkf quit (Quit: Leaving)
18:54:44*vendethiel joined #nim
19:02:35*lompik quit (Ping timeout: 245 seconds)
19:04:43*brson_ joined #nim
19:06:52*brson quit (Ping timeout: 250 seconds)
19:11:30*derka quit (Read error: Connection reset by peer)
19:11:41*kniteli joined #nim
19:15:17*yglukhov joined #nim
19:20:44*vqrs quit (Ping timeout: 272 seconds)
19:20:45*D3_4dl1N3 joined #nim
19:21:31*D3_4dl1N3 left #nim (#nim)
19:22:18ldleworkAraq_: I hope you got my PM
19:22:29*yglukhov quit (Remote host closed the connection)
19:24:07*vqrs joined #nim
19:27:35*derka joined #nim
19:28:48*Matthias247 joined #nim
19:33:40derkaHello Guys
19:33:50derkaare there unikernel works with Nim
19:35:38ldleworkderka: that'd be cool
19:35:43ldleworkderka: do you ask because of the Docker news?
19:38:00derkayeah
19:38:15derkaa few month ago i wanted to do a startup on unikernel cause i knew it was the next thing
19:38:22derkalooks like docker already gonna kill the market
19:38:32derkai started looking OCaml beacuse of unikernel
19:38:35derkabut i dont like OCaml
19:38:39derkaI love python too much
19:38:44derkahopefuly there is Nim
19:39:07derkawhich is like python little brother but with a bright future
19:42:28ldleworkderka: I work at docker, am a professional Python programmer, and I think Nim deserves just about a bajillion more internet fame points than it currently has.
19:42:36ldleworkso high-five.
19:42:40*girvo joined #nim
19:42:48*yglukhov joined #nim
19:43:31derkagreat
19:43:44pigmejhello after break :)
19:43:51derkai was disapointed about docker
19:44:09derkai have a telecom company making real time voip routing software
19:44:25derkadocker network layer is not suited at all from my perspective
19:44:45derkai used to use lxc in the very begining and network layer was very nice to use with bridge
19:45:20derkalot of good ideas in docker
19:45:25derkabut execution doesnt suit me
19:45:32derkait probably fits most of use cases but not mine
19:47:06*girvo quit (Ping timeout: 250 seconds)
19:47:13ldleworkderka: gotcha
19:47:43derkaidlework i have to go run an errand quickly will be right back to tease you about docker :)
19:48:25*yglukhov quit (Remote host closed the connection)
19:49:25*yglukhov joined #nim
19:49:37*yglukhov quit (Remote host closed the connection)
19:51:27pigmejderka: docker has many not "production" ready things
19:51:38*devn joined #nim
19:51:42devnhello
19:51:51devnnoob here
19:51:56*brson_ quit (Ping timeout: 250 seconds)
19:51:58devnsuggestions for up-to-date guides/docs/tutorials/etc.
19:52:00devn?
19:52:15*yglukhov joined #nim
19:52:32devnalso, is there something like "nim new myproject"?
19:52:42*dom96_mobile joined #nim
19:52:55dom96_mobileCool. We're on HN again.
19:52:58devn:)
19:53:27devnI've seen y'all show up a couple times in the past few weeks. I've heard mixed feels on Nim, but I'd like to give it a shot.
19:54:51pigmejdom96_mobile: what's the state of async ?
19:56:02*dom96_mobile quit (Remote host closed the connection)
19:56:08*ryan2 quit (Quit: WeeChat 1.3)
19:59:06yglukhovAraq: so unfortunately i've broken js strings with my latest "unicode" fix. it works for valid unicode but is broken for arbitrary byte data strings generated in compile time, so heres a suggestion. when generating a string literal, check string for non-ascii-and-valid-utf8-chars, and if it has invalid chars, do the codegen with array-of-ints literal instead of cstrToNimstr("literal"). does it sound sane?
20:00:39ldleworkpigmej: Containerization has opened the door to massive questions in orchestration technique and standards. Basically ever large company you can name has a hand in help trying to figure out what the best solutions to these new questions. The containerization engine was just a catalyst. And that was not much than three years ago. Your statement is correct but I like to give some context. If you wanted to discuss
20:00:40ldleworkthis more we have a #nim-offtopic
20:01:27*brson joined #nim
20:02:08*Jesin joined #nim
20:05:44pigmejldlework: I know :)
20:07:55*brson quit (Ping timeout: 240 seconds)
20:08:36Araq_yglukhov: no, just revert the patch instead please.
20:08:42Araq_no heuristics for strings.
20:09:00yglukhovbut that will not work.
20:09:16yglukhovthe old implementation was broken even more.
20:10:59yglukhovit did not work for unicode.
20:12:50Araq_maybe for JS the runtime needs to provide "writeBytes" and "writeUtf8"
20:13:10Araq_or 'convertBytesToJS' vs 'convertUtf8ToJS'
20:15:48yglukhovwell.. the thing is. we dont have any troubles converting bytes to js in runtime %). the only trouble we have with the latest impl, is that it tries to create nimstrings from js string literals.
20:16:15yglukhovthe literals are generated by compiler. and it's tricky to put invalid utf data into a js literal.
20:19:36yglukhovhere's what i mean: https://gist.github.com/yglukhov/33a79660d8d551aa12b9
20:19:47*quark1 joined #nim
20:22:25*Arrrr quit (Quit: WeeChat 1.2)
20:23:22yglukhovoh, there is one more good solution you might like. use different functions for creating nim string literal and for converting cstringToNimstring
20:24:34yglukhovthat would almost completely revert my change which is what you want =)
20:24:53derkadom96: where do u see HN stuff about nim
20:24:55Araq_good, do it, but I don't follow and I'm busy
20:28:55*Jehan_ joined #nim
20:32:05def-derka: https://news.ycombinator.com/item?id=10947192
20:34:22XeAraq_: how does the nimscript compiler configuration work?
20:35:57Araq_http://nim-lang.org/docs/nims.html
20:36:13dom96pigmej: Araq_ is working on parallelizing it
20:37:32pigmejoh, cool, so multiple threads + async ?
20:37:47pigmejsounds cool :)
20:43:50*Jehan_ quit (Ping timeout: 245 seconds)
20:46:01*bamorim joined #nim
20:50:18*Demon_Fox joined #nim
20:53:02*derka quit (Read error: Connection reset by peer)
20:54:18*derka joined #nim
20:56:27*Jehan_ joined #nim
20:59:45*Jehan` joined #nim
21:00:50*Jehan_ quit (Ping timeout: 250 seconds)
21:02:53*brson joined #nim
21:05:12*derka quit (Read error: Connection reset by peer)
21:06:13*derka joined #nim
21:17:11*bozaloshtsh joined #nim
21:21:34*derka quit (Read error: Connection reset by peer)
21:21:58*derka joined #nim
21:32:06*Jehan` quit (Ping timeout: 240 seconds)
21:35:37*Jehan_ joined #nim
21:37:59*derka quit (Read error: Connection reset by peer)
21:39:18*derka joined #nim
21:43:27*girvo joined #nim
21:43:50*bjz_ quit (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
21:47:05*derka_ joined #nim
21:48:18*girvo quit (Ping timeout: 272 seconds)
21:48:56*derka quit (Ping timeout: 250 seconds)
21:48:57*derka_ is now known as derka
22:04:26*quark1 quit (Ping timeout: 240 seconds)
22:07:55*Jehan_ quit (Ping timeout: 240 seconds)
22:07:56*xet7 quit (Quit: Leaving)
22:10:58*nchambers quit (Ping timeout: 250 seconds)
22:16:46*Jehan_ joined #nim
22:17:17*derka quit (Read error: Connection reset by peer)
22:19:15*derka joined #nim
22:20:17*girvo joined #nim
22:22:24*junw joined #nim
22:28:10*vikaton quit (Quit: Connection closed for inactivity)
22:29:50*xet7 joined #nim
22:34:10*junw_ joined #nim
22:34:40*derka quit (Ping timeout: 245 seconds)
22:37:24*junw quit (Ping timeout: 250 seconds)
22:43:40*pregressive quit ()
22:44:47*kniteli quit (Ping timeout: 276 seconds)
22:45:48*Trustable quit (Remote host closed the connection)
22:49:36*Jehan_ quit (Read error: Connection reset by peer)
22:49:54*vendethiel quit (Ping timeout: 256 seconds)
22:49:57*Jehan_ joined #nim
22:53:48*Jesin quit (Quit: Leaving)
22:55:28*kniteli joined #nim
23:08:57bozaloshtshAraq_: I used those options you mentioned, here's the only new thing I got: [GCASSERT] incRef: interiorPtr
23:16:15Araq_well that's a codegen bug. can you create a snippet that I can compile?
23:17:09*Jehan` joined #nim
23:17:10*Jehan_ quit (Read error: Connection reset by peer)
23:20:45bozaloshtshI'll try
23:25:03Araq_in fact ... I fear that I have a fix for it that I forgot to merge into devel ... -.-
23:28:33*xtagon joined #nim
23:31:42*Jehan` quit (Ping timeout: 265 seconds)
23:32:16*desophos joined #nim
23:34:21*Jehan_ joined #nim
23:38:31*Matthias247 quit (Read error: Connection reset by peer)
23:42:26*ephja quit (Ping timeout: 240 seconds)