Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • Mar 03 2017 15:52
    @dom96 banned @Octopoda7
  • Feb 12 2017 23:57
    @dom96 banned @zzz125
  • Dec 23 2016 19:43
    @dom96 banned @Izrab
Alexander Ivanov
@alehander92
i might try it later but no promises
ok
From IRC (bridge bot)
@FromIRC
<dom96> Nice. I assume this will only apply to init not new, right?
<narimiran> thanks, ping me if/when you do
<narimiran> @dom96: i haven't tested Ref variants :⁠/
Alexander Ivanov
@alehander92
Btw finally back from Japan
One guy almost assured us he wants to translate a Nim(our projeft
Related article into Japanese
But the problem is that I have to write one first
From IRC (bridge bot)
@FromIRC
<dom96> narimiran: oh, so the intention is for newTable to no longer be needed either?
<dom96> This will make things a little confusing :⁠/
<dom96> import somePkg; var x = newPkg() # hrm, do I need to do this if I don't need to do it for anything in the stdlib?
<dom96> It's a massive inconsistency
<narimiran> @dom96: nah, i think copy-pasted too much stuff :⁠) thanks for catching that :⁠)
From IRC (bridge bot)
@FromIRC
<narimiran> @alehander42 (and everybody else interested): don't test it yet. it seems my latest changes refactored working code into a non-working one :⁠D
<shashlick> Zevv: I wouldn't know the difference, pretty much day one for me on Android
<shashlick> But I'm using termux to test on the device
<shashlick> Not sure how useful it is getting the nim compiler running on Android but I'm making images nonetheless
From IRC (bridge bot)
@FromIRC
<shashlick> Compiling binaries that run on Android should be easy already with --os and --cpu
lqdev
@liquid600pgm
what should be the signature for a custom default() proc?
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
it's not generic. can you even have a custom proc?
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
maybe with term rewriting templates?
those have been removed from the manual though so I guess their use is (more) discouraged
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
yeah this works on devel:
template intDefault{default(int)}(): int = 42
template stringDefault{default(string)}(): string = "hi"
From IRC (bridge bot)
@FromIRC
<Araq> on devel there is system.default(T)
lqdev
@liquid600pgm
yeah, I noticed. that's what I want to overload
but how?
Varriount
@Varriount
@Iqdev Try proc default(t: var MyConcreteType)!
Er, sorry, I meant
for that to be a question mark
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
@Varriount result: default(float) returns 0.0, the new proc is defined but not used
Varriount
@Varriount
@jrfondren Darn
From IRC (bridge bot)
@FromIRC
<jasper> You can specialize typedescs like proc default(T: typedesc[MyType]): T = .... Though that doesn't get called automatically for var x: MyType if that is what you were after.
lqdev
@liquid600pgm
I'm after defaults for object/tuple fields
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
proc default(T: typedesc[int]): int = 42 et al. works, followed by echo default(int), but a var x: int is still initialized to 0. is that intended?
From IRC (bridge bot)
@FromIRC
<Araq> sure.
<Araq> to override the default value of obj.field write field: int = 42 in the object declaration and implement this feature
<Araq> ;⁠-)
<Araq> but even then default(int) will produce 0
<Araq> TIL https://www.includeos.org/ looks interesting
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
or proc default(T: typedesc[ObjName]): ObjName = result.field = 42
but you still have to initialize with default(ObjName)
From IRC (bridge bot)
@FromIRC
<Araq> look. what you want is reasonable but (a) it doesn't exist and (b) system.default has nothing to do with it
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
[x] performant, [x] portable, [x] secure, [x] lean, [ ] easily administered
From IRC (bridge bot)
@FromIRC
<Mister_Magister> can i compile nim compiler for arm and then use nim on arm?
Ghost
@ghost~5b68e3cbd73408ce4fa3b6b0
if an app in a OS flakes out, you can attach a debugger, you can strace it, you can check logs while it's running, you can check the network, etc. Stuff like IncludeOS is like the joke about cops doing unnecessary stuff. "Having solved all software reliability problems, we're now optimizing the OS out of our application!" with Erlang-on-Xen, Erlang itself is already an OS
there are arm builds now yeah. They use cross compilation but probably compiling from arm is even easier.
From IRC (bridge bot)
@FromIRC
<Mister_Magister> so there is nothing wrong with compiling it on arm? it should work?
<Mister_Magister> trying it rn tbh